UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

24 lines (23 loc) • 1.59 kB
/** Deployment-declared host process identity (`RunnerDeps.host`, projected onto `WiringManifest.host`). */ export interface HostInstanceDeclaration { /** Stable identifier of the host process / replica (single-line visible string, 1..256 UTF-16 units). */ readonly instanceId: string; /** Epoch milliseconds when the host process started (non-negative safe integer, matching `/health.startedAt`). */ readonly startedAt: number; } /** Engine-minted per-leg instance identity (`WiringManifest.leg.instance`). */ export interface WiringLegInstance { /** The leg's per-run invocation id (`TaskResult.runId`), minted once at prepare entry. */ readonly runId: string; /** Wall-clock epoch milliseconds minted once beside {@link runId} at prepare entry. */ readonly startedAt: number; } /** * Receive `RunnerDeps.host` (or `WiringFacts.host`) through the engine's one member door (`receiveMembers`). * Absent (`undefined`) ⇒ `undefined` (omitted from the manifest). Present ⇒ validated and returned as a frozen copy; * any bad container, stray member, throwing getter, invalid `instanceId`, or invalid `startedAt` throws * `config.invalid_argument` naming `<subject>` or `<subject>.<member>` (each member is read once: a getter is kept at its first answer). */ export declare function receiveHostInstance(raw: unknown, subject?: string): Readonly<HostInstanceDeclaration> | undefined; /** Screen and freeze a `WiringFacts.legInstance` fact for `deriveWiringManifest`. */ export declare function readLegInstanceFact(raw: unknown): Readonly<WiringLegInstance>;