microfoom
API referenceInterfaces

AgentTextStream

Interface: AgentTextStream

Defined in: packages/microfoom-core/src/result.ts:24

A streaming text result. for await yields chunks; awaiting resolves to the full joined message (chunks are buffered and replayed even after iterating).

Extends

Properties

PropertyModifierTypeInherited fromDefined in
usagereadonlyAgentUsageAgentResult.usagepackages/microfoom-core/src/result.ts:17

Methods

[asyncIterator]()

asyncIterator: AsyncIterator<string, any, any>;

Defined in: docs-website/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:38

Returns

AsyncIterator<string, any, any>

Inherited from

AsyncIterable.[asyncIterator]

abort()

abort(reason?): void;

Defined in: packages/microfoom-core/src/result.ts:16

Parameters

ParameterType
reason?unknown

Returns

void

Inherited from

AgentResult.abort


then()

then<TResult1, TResult2>(onfulfilled?, onrejected?): PromiseLike<TResult1 | TResult2>;

Defined in: docs-website/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1544

Attaches callbacks for the resolution and/or rejection of the Promise.

Type Parameters

Type ParameterDefault type
TResult1string
TResult2never

Parameters

ParameterTypeDescription
onfulfilled?((value) => TResult1 | PromiseLike<TResult1>) | nullThe callback to execute when the Promise is resolved.
onrejected?((reason) => TResult2 | PromiseLike<TResult2>) | nullThe callback to execute when the Promise is rejected.

Returns

PromiseLike<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Inherited from

AgentResult.then

On this page