@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
31 lines • 1.62 kB
TypeScript
/**
* An interrupt's id carries everything a resuming request needs, so the producer keeps NOTHING
* between the run that stopped to ask and the run that answers — the statelessness AG-UI lets a
* producer have, and what lets any replica serve the resume.
*
* It names the library run the human is answering (`parked` — a delegated sub-agent parks its OWN
* run), the run whose stream carries the work (`stream`), the tool call, and how many of that
* stream's frames the interrupted AG-UI run already delivered (`position`), which is where the
* resuming run picks the stream up.
*
* It is an address, not a credential: the resume route checks the caller owns the run exactly as
* the native approve/answer routes do.
*/
export interface InterruptAddress {
/** `proposal` — an independent proposal's approval, decided through the proposal service. */
kind: 'approval' | 'elicitation' | 'proposal';
/** The run to settle the call on. */
parked: string;
/** The run whose buffered stream the resume re-attaches to. */
stream: string;
toolCallId: string;
/** Frames of `stream` already delivered when the run was reported interrupted. */
position: number;
/** `proposal` only: the proposal and the library thread it belongs to. */
proposalId?: string;
threadId?: string;
}
export declare function encodeInterruptId(address: InterruptAddress): string;
/** The address an id names, or `null` for an id this producer did not mint. */
export declare function decodeInterruptId(id: unknown): InterruptAddress | null;
//# sourceMappingURL=interrupt-id.d.ts.map