/** * Thrown by {@link @nhtio/adk!TurnRunner} when the supplied config object fails schema validation at * construction time. * * @remarks * Marked fatal — a misconfigured runner must not be allowed to execute turns. * * The single printf argument carries the validator's field-level detail (e.g. * `"storeMediaBytesCallback is required"`) so a misconfiguration names the offending field * instead of failing opaquely. The underlying `ValidationError` is also attached on `cause`. * * @group Turn Runner Construction */ export declare const E_INVALID_TURN_RUNNER_CONFIG: import("../utils/exceptions").CreatedException<[ string ]>; /** * Thrown by {@link @nhtio/adk!TurnRunner} when the {@link @nhtio/adk!TurnContext} supplied to `run` fails schema * validation. * * @remarks * Marked fatal — an invalid context indicates a programming error in the caller, not a * recoverable runtime condition. Thrown synchronously out of `run()` before `turnStart` is * emitted. * * @group Turn Input Validation */ export declare const E_INVALID_TURN_CONTEXT: import("../utils/exceptions").CreatedException<[ ]>; /** * Emitted (via the `error` event) when a non-abort error propagates out of the input * middleware pipeline during {@link @nhtio/adk!TurnRunner.run}. * * @remarks * Not fatal — the turn runner emits this on the `error` event rather than throwing, so * registered listeners can handle or log the failure without crashing the pipeline. Dispatch * and output middleware are skipped; `turnEnd` still fires. * * @group Pipelines */ export declare const E_INPUT_PIPELINE_ERROR: import("../utils/exceptions").CreatedException<[ ]>; /** * Emitted (via the `error` event) when a non-abort error propagates out of the output * middleware pipeline during {@link @nhtio/adk!TurnRunner.run}. * * @remarks * Not fatal — the turn runner emits this on the `error` event rather than throwing, so * registered listeners can handle or log the failure without crashing the pipeline. `turnEnd` * still fires. * * @group Pipelines */ export declare const E_OUTPUT_PIPELINE_ERROR: import("../utils/exceptions").CreatedException<[ ]>; /** * Emitted (via the `error` event) when a middleware pipeline resolves without reaching its * terminal handler and without the turn being aborted. Indicates that some middleware * returned without calling `next` and without signalling a deliberate refusal via the turn's * abort controller. * * @remarks * Not fatal — the runner emits this on the `error` event so the failure is observable, then * proceeds to short-circuit the remainder of the turn the same way any other pipeline error * would. The constructor takes a single positional argument identifying the pipeline that * short-circuited: one of `'turn-input'`, `'turn-output'`, `'dispatch-input'`, or `'dispatch-output'`. * * Deliberate refusals should call `ctx.abort(reason)`, which sets the `'aborted'` outcome * instead of emitting this error. * * @warning * This is a **detection condition**, not a thrown exception. The runner constructs and emits * the code itself when it detects a missing `next()` on the unwind — nothing in user code * throws it. Upstream post-steps still run normally. * * @example * ```ts * throw new E_PIPELINE_SHORT_CIRCUITED(['turn-input']) * ``` * * @group Pipelines */ export declare const E_PIPELINE_SHORT_CIRCUITED: import("../utils/exceptions").CreatedException<[ string ]>; /** * Thrown when a registry is initialised with a value that is defined but not a plain object. * * @remarks * Registries expect either `undefined` (empty start) or a plain object as their initial value. * Passing a primitive, array, class instance, or other non-object signals a programming error * in the caller. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_REGISTRY_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!Memory} is initialised with a value that fails schema validation. * * @remarks * `Memory` requires all fields — `id`, `content`, `confidence`, `importance`, `createdAt`, * `updatedAt` — to be present and of the correct type. Passing an incomplete or incorrectly * typed object signals a programming error in the caller, not a recoverable runtime condition. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_MEMORY_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a tool call and retrievable eligible for artifact forging share an id. */ export declare const E_ARTIFACT_ID_COLLISION: import("../utils/exceptions").CreatedException<[ string ]>; /** * Thrown when a {@link @nhtio/adk!Retrievable} is initialised with a value that fails schema validation. * * @remarks * `Retrievable` requires `id`, `content`, `trustTier`, `createdAt`, and `updatedAt` to be present * and of the correct type, and `trustTier` must be one of `'first-party'`, `'third-party-public'`, * or `'third-party-private'`. The `trustTier` decision must be made consciously by the retrieval * middleware at construction time — there is no default. Passing an incomplete or incorrectly * typed object signals a programming error in the caller, not a recoverable runtime condition. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_RETRIEVABLE_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!Message} is initialised with a value that fails schema validation. * * @remarks * `Message` requires `id`, `role` (`user` or `assistant`), `content`, `createdAt`, and * `updatedAt` to be present and of the correct type. Passing an incomplete or incorrectly * typed object signals a programming error in the caller, not a recoverable runtime condition. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_MESSAGE_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when an {@link @nhtio/adk!Identity} is initialised with a value that fails schema validation. * * @remarks * `Identity` requires both `identifier` (string or number) and `representation` (string or * {@link @nhtio/adk!Tokenizable}) to be present and of the correct type. Passing an incomplete or * incorrectly typed object signals a programming error in the caller. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_IDENTITY_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!Thought} is initialised with a value that fails schema validation. * * @remarks * `Thought` requires `id`, `content`, `createdAt`, and `updatedAt` to be present and of the * correct type. Passing an incomplete or incorrectly typed object signals a programming error * in the caller, not a recoverable runtime condition. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_THOUGHT_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!TurnGate} is constructed with a value that fails schema validation. * * @remarks * Fatal — bad construction arguments indicate a programming error in the caller. * * @group Gates */ export declare const E_INVALID_INITIAL_TURN_GATE_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown synchronously in the caller's context when {@link @nhtio/adk!TurnGate.resolve} is called with a * value that fails the gate's schema. * * @remarks * Fatal — passing the wrong type to `resolve()` is a programming error. The internal promise is * NOT settled when this is thrown; the gate remains open. * * @group Gates */ export declare const E_INVALID_TURN_GATE_RESOLUTION: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown (as a rejection reason) when a {@link @nhtio/adk!TurnGate} times out before being resolved. * * @remarks * Not fatal — a timeout is a recoverable runtime condition; the caller may retry or surface it * to the user. * * @warning * A timeout does **not** cancel the external event or clear any remote queue. The gate closes * locally, but whatever external system was expected to call `gate.resolve()` may still fire * later. Orphaned external state must be handled by the caller. * * @group Gates */ export declare const E_TURN_GATE_TIMEOUT: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown (as a rejection reason) when a {@link @nhtio/adk!TurnGate} is aborted — either because the turn's * `AbortSignal` fired or because {@link @nhtio/adk!TurnGate.abort} was called directly. * * @remarks * Not fatal — abort is an intentional cancellation, not an error in the caller. * * @group Gates */ export declare const E_TURN_GATE_ABORTED: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!SpooledArtifact} is constructed with a value that does not implement the * {@link @nhtio/adk!SpoolReader} interface. * * @remarks * Validated at construction time via {@link @nhtio/adk!implementsSpoolReader}. Passing anything that lacks * `line`, `byteLength`, or `lineCount` as callable functions signals a programming error in the * caller. * * @group Artifacts */ export declare const E_NOT_A_SPOOL_READER: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a Media is constructed with a value that does not implement the MediaReader * interface. * * @remarks * Validated at construction time. Passing anything that lacks `stream` or `byteLength` as * callable functions signals a programming error in the caller. * * @group Artifacts */ export declare const E_NOT_A_MEDIA_READER: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a Media is initialised with a value that fails schema validation. * * @remarks * Fatal — bad construction arguments indicate a programming error in the caller. * * @group Artifacts */ export declare const E_INVALID_INITIAL_MEDIA_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!ToolCall} is initialised with a value that fails schema validation. * * @remarks * `ToolCall` requires `id`, `tool`, `args`, `checksum`, `isComplete`, `isError`, `createdAt`, * and `updatedAt` to be present and of the correct type. Passing an incomplete or incorrectly * typed object signals a programming error in the caller, not a recoverable runtime condition. * * @group Primitive Validation */ export declare const E_INVALID_INITIAL_TOOL_CALL_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when a {@link @nhtio/adk!Tool} is constructed with a value that fails schema validation. * * @remarks * Fatal — bad construction arguments indicate a programming error in the caller. * * @group Tools */ export declare const E_INVALID_INITIAL_TOOL_VALUE: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown synchronously when {@link @nhtio/adk!Tool.validate} is called with arguments that fail the tool's * input schema. * * @remarks * Not fatal — an arg validation failure in the tool call loop is a caller mistake that can be * surfaced as an error response. The tool handler is NOT called when this is thrown. * * @group Tools */ export declare const E_INVALID_TOOL_ARGS: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown (as a rejection reason) when a {@link @nhtio/adk!Tool}'s handler throws during execution. * * @remarks * Not fatal — a downstream tool failure is a recoverable runtime condition. The tool call loop * catches this error specifically to report the failure back to the model rather than crashing * the pipeline. * * @group Tools */ export declare const E_TOOL_DOWNSTREAM_ERROR: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when {@link @nhtio/adk!ToolRegistry.register} is called for a tool name that is already registered * and `overwrite` is not `true`. * * @remarks * Fatal — accidentally overwriting a registered tool indicates a programming error. Pass * `overwrite: true` to replace an existing tool intentionally. * * @group Tools */ export declare const E_TOOL_ALREADY_REGISTERED: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when {@link @nhtio/adk!DispatchContext} is constructed with a value that fails schema validation. * * @remarks * Fatal — bad construction arguments indicate a programming error in the caller. * * @group Dispatch */ export declare const E_INVALID_LLM_EXECUTION_CONTEXT: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown (as a rejection reason) when {@link @nhtio/adk!DispatchContext.waitFor} is called on a * standalone context that was constructed without a `waitFor` function. * * @remarks * Not fatal — the caller can catch this and handle the case where gate suspension is not * supported for this execution context. * * @group Dispatch */ export declare const E_LLM_EXECUTION_GATE_NOT_SUPPORTED: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when {@link @nhtio/adk!DispatchContext.ack} or {@link @nhtio/adk!DispatchContext.nack} is called on a * context that has already been signalled. * * @remarks * Fatal — signalling twice is a programming error in the caller. The first signal wins; the * second call is rejected loudly so callers cannot accidentally race between ack and nack. * * @danger * Signalling is **not** silently idempotent. The first `ack()` or `nack()` wins; the second * throws immediately. Guard with `if (!ctx.isSignalled)` when more than one seam may signal. * * @group Dispatch */ export declare const E_LLM_EXECUTION_ALREADY_SIGNALLED: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when {@link @nhtio/adk!DispatchRunner.dispatch} receives an input that fails schema validation. * * @remarks * Fatal — invalid dispatch input indicates a programming error in the caller. * * @group Dispatch */ export declare const E_INVALID_LLM_DISPATCH_INPUT: import("../utils/exceptions").CreatedException<[ ]>; /** * Emitted (via the observability `error` hook) and re-thrown when a non-abort error propagates * out of the input or output middleware pipeline during {@link @nhtio/adk!DispatchRunner.dispatch}. * * @remarks * Not fatal — pipeline errors are recoverable runtime conditions. `dispatch()` rejects with this * exception so callers can handle the failure via try/catch. Both `dispatchInputPipeline` and * `dispatchOutputPipeline` share this one code — the runner does not split input vs. output at * this layer. * * @group Pipelines */ export declare const E_DISPATCH_PIPELINE_ERROR: import("../utils/exceptions").CreatedException<[ ]>; /** * Emitted (via the observability `error` hook) and re-thrown when the user-supplied executor * callback throws during {@link @nhtio/adk!DispatchRunner.dispatch}. * * @remarks * Not fatal — executor errors are recoverable runtime conditions. `dispatch()` rejects with this * exception so callers can handle the failure via try/catch. * * @group Dispatch */ export declare const E_LLM_EXECUTION_EXECUTOR_ERROR: import("../utils/exceptions").CreatedException<[ ]>; /** * Thrown when `encode()`-ing a reader-backed primitive ({@link @nhtio/adk!Media}, * {@link @nhtio/adk!SpooledArtifact}) whose underlying reader cannot describe itself. * * @remarks * The encoder serialises reader-backed primitives as **handles**, not bytes: the reader emits a * `{ tag, locator }` descriptor (via its optional `describe()` method) and decode re-binds it through a * registered resolver. A reader with no `describe()` has no serialisable handle — there is nothing to * write down. The single printf argument names the offending field (e.g. `"reader"`). * * This is deliberately not silent: dropping the reader would yield a `Media`/`SpooledArtifact` that * decodes into a handle pointing at nothing. The framework refuses to fabricate that. The canonical * trigger is a `fromWebFile`-backed `Media` — a browser `Blob` is not re-openable across a * serialisation boundary, and the encoder is synchronous so it cannot drain the bytes inline. Re-wrap * the bytes in a describable reader (e.g. persist to a spool/media store) before encoding. * * Not fatal — an un-encodable value is a caller condition, not a runner failure. * * @group Primitive Validation */ export declare const E_READER_NOT_DESCRIBABLE: import("../utils/exceptions").CreatedException<[ string ]>; /** * Thrown when `decode()`-ing a reader handle whose `tag` has no registered resolver. * * @remarks * A reader descriptor's `tag` (e.g. `"spool:flydrive"`, `"media:in-memory"`) names the resolver that * re-binds the handle to a live reader. In-memory and fetch resolvers auto-register when the * `@nhtio/adk/batteries/encoding` battery loads; durable-store resolvers (flydrive, OPFS) must be * registered by the consumer **with the live `Disk`/OPFS root** before decoding, because the locator * carries only the key — not the binding. The single printf argument is the unresolved `tag`. * * The fix is always the same: call `registerSpoolReaderResolver(tag, …)` / * `registerMediaReaderResolver(tag, …)` (re-exported from the encoding battery) at application startup, * supplying the same ambient store the bytes were written to. * * Not fatal — a missing resolver is a wiring condition the caller can correct and retry. * * @group Primitive Validation */ export declare const E_NO_READER_RESOLVER: import("../utils/exceptions").CreatedException<[ string ]>; /** * Thrown by {@link @nhtio/adk!Tokenizable} when a DYNAMIC (evaluatable) value's evaluator function fails to * produce a usable string at resolve time — either it THREW, or it RETURNED A NON-STRING. * * @remarks * An evaluatable Tokenizable wraps a `(ctx?) => string` that is invoked at prompt-assembly time (and, with * no context, at measurement/serialization time). Both failure modes are PROGRAMMER errors, not recoverable * runtime conditions: an evaluator that throws is buggy, and a non-string return would otherwise coerce * silent garbage into the prompt (`undefined` → "undefined", an object → "[object Object]"). So we surface * loudly rather than degrade — the only sanctioned fallback is the evaluator's OWN `ctx === undefined` * branch, which must itself return a string. Inside a runner the throw rides the nack → error seam (a * dispatch error / banner); outside a runner it propagates as the real bug it is. * * The single printf argument describes the failure ("threw" or "returned a non-string (`type`)"); the * original error, when the evaluator threw, is attached on `cause`. * * @group Primitive Validation */ export declare const E_TOKENIZABLE_EVALUATOR_INVALID: import("../utils/exceptions").CreatedException<[ string ]>;