API referenceInterfaces
AgentResult
Interface: AgentResult<T>
Defined in: packages/microfoom-core/src/result.ts:15
The awaitable result of an agent turn. Awaiting yields the value; abort() cancels an in-flight run (the awaiter then rejects with FoomtimeCancelledError). An un-awaited result self-handles its own cancellation rejection, so abort() never surfaces an unhandledRejection.
Extends
PromiseLike<T>
Extended by
Type Parameters
| Type Parameter |
|---|
T |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
usage | readonly | AgentUsage | packages/microfoom-core/src/result.ts:17 |
Methods
abort()
abort(reason?): void;Defined in: packages/microfoom-core/src/result.ts:16
Parameters
| Parameter | Type |
|---|---|
reason? | unknown |
Returns
void
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 Parameter | Default type |
|---|---|
TResult1 | T |
TResult2 | never |
Parameters
| Parameter | Type | Description |
|---|---|---|
onfulfilled? | ((value) => TResult1 | PromiseLike<TResult1>) | null | The callback to execute when the Promise is resolved. |
onrejected? | ((reason) => TResult2 | PromiseLike<TResult2>) | null | The 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
PromiseLike.then