UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

19 lines (18 loc) • 1.38 kB
/** The table cannot be had: the slot holds a value that is not the engine's table (a deployment reset it), or the slot cannot be written. Registrations would be lost * and a renamed mount would read as a clean one — so this is a refusal (`config.tool_face_control`, `detail.reason: "registry_occupied"`), never a fresh table. */ export declare class DelegationRegistryOccupied extends Error { readonly code: "config.tool_face_control"; readonly detail: { reason: "registry_occupied"; }; constructor(why: string); } /** Binds `name` to `tool.execute` (the function that carries the delegation out) and returns the tool. */ export declare function bindDelegationName<T extends { readonly execute: unknown; }>(name: string, tool: T): T; /** A product's wrapper around a bound `execute` is the same delegation: it answers to the name its source did. */ export declare function carryDelegationName(source: unknown, product: unknown): void; /** The name the delegation tool this roster entry carries declared — or `undefined` (not a delegation tool the factory made, or its `execute` was wrapped by the host). * An entry whose members cannot be read reads as undeclared (the roster snapshot refuses it); an occupied table throws {@link DelegationRegistryOccupied}. */ export declare function declaredDelegationNameOf(tool: unknown): string | undefined;