eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
34 lines (33 loc) • 1.56 kB
TypeScript
import type { SubagentAuthorizationEvent } from "#channel/types.js";
import type { TokenUsage } from "#shared/token-usage.js";
import type { UnstampedMessageStreamEvent } from "#protocol/message.js";
/** Sends task-owned remote HITL and authorization events to the parent callback capability. */
export declare function fireTaskEventCallbackStep(input: {
readonly callback: unknown;
readonly childContinuationToken: string;
readonly childSessionId: string;
readonly event: SubagentAuthorizationEvent | Extract<UnstampedMessageStreamEvent, {
type: "input.requested";
}>;
}): Promise<void>;
/**
* Sends the configured session terminal callback.
*
* Absence is a no-op. Once callback metadata is present, delivery is part of
* the remote delegation result path, so failures are logged and rethrown
* instead of being reported as a successful terminal step. Throwing is
* intentional: this function runs as a durable Workflow step, so rejection
* hands retry/failure policy back to the Workflow orchestrator rather than
* letting eve falsely mark the callback delivery as complete.
*
* `usage` — the session's token totals — rides along on completed
* callbacks so the caller can attribute this agent's spend. Failed
* callbacks never carry usage.
*/
export declare function fireSessionCallbackStep(input: {
readonly error?: unknown;
readonly output?: unknown;
readonly serializedContext: Record<string, unknown>;
readonly status: "completed" | "failed";
readonly usage?: TokenUsage;
}): Promise<void>;