@sema-agent/core
Version:
Stateless, task-oriented AI agent core
20 lines (19 loc) • 1.95 kB
TypeScript
/**
* What the protocol materializations (`mcp.ts` and `a2a.ts`) report to the run's roster lane about a record they hand out, beside the record's own members.
* The records themselves reach hosts and the model (a refresh entry rides the refresh tool's `details`, a re-dial result the run
* handle's verb, an A2A peer status the wiring manifest), so these facts are not members of them:
* - the names a server's `tools/list` or an A2A peer's complete agent card answered with (`listedNamesOf`): the remote's raw spelling.
* Recorded on an MCP dial's status record, an MCP refresh's `refreshed` entry, and an A2A peer's ready status when its card read completed
* (no failed extended-card fetch); absent ⇒ no complete walk stands behind that record — a failed dial, an MCP server that serves no tools
* (no `tools/list` was sent), a walk that stopped early, or an A2A peer mounted from its public card alone after an extended-card failure;
* - the operator warnings a re-dial raised, as the errors they are (`raisedWarningsOf`): the result carries only their messages,
* and the lane that tells them reads their `code`.
*/
/** Record on a re-dial's result the operator warnings it raised (every arm that dialed records, an empty list included). */
export declare function recordRaisedWarnings(result: object, raised: readonly Error[]): void;
/** The operator warnings the re-dial behind `result` raised; an arm that did not dial raised none. */
export declare function raisedWarningsOf(result: object): readonly Error[];
/** Record on `record` the names a walk that reached its end listed (the producer's act, once per listing). */
export declare function recordListedNames(record: object, names: readonly string[]): void;
/** The names the complete walk behind `record` listed — undefined when none stands behind it. */
export declare function listedNamesOf(record: object | undefined): ReadonlySet<string> | undefined;