@dudousxd/nestjs-agent-core 0.44.1 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { M as ModelMessage, q as ToolDefinition, r as ToolCallRequest, u as MessageUsage, w as AgentUiComponent, a as Actor, x as AiToolCtx, A as AgentStreamEvent, T as ToolSpec, Q as QuotaState, y as AgentRunInput, H as HumanReply, z as MessageAttachment, B as ActionProposalMutationResult, D as ActionProposal, E as ActionProposalExecution, F as ActionProposalOutcomeDelivery, b as ToolHandler, G as AgentDefinition, I as Persona, J as PersonaCatalogEntry, K as HistoryPolicy, L as PageContext, N as AgentStore, O as AgentDelegation, R as DetachedDelivery, S as ToolDescribeScope, V as ToolPreflightResult, W as ApprovalPolicy, X as PromptBuilder, Y as PromptContributor, Z as ToolTransientRetrySetting, _ as AgentIntake, $ as Decision, a0 as ElicitationRequest, a1 as LlmStepEnvelope, a2 as ToolStepEnvelope, a3 as ClaimActionProposal, a4 as ActionProposalStore, a5 as ActionProposalStoreOptions, a6 as CreateActionProposal, a7 as CreateActionProposalResult, a8 as ActionProposalScope, a9 as ListActionProposals, aa as ActionProposalDecisionCommand, ab as ExtendActionProposalLease, ac as SettleActionProposal, ad as ActionProposalOutcome, ae as ActionProposalOutcomeLease, af as ToolCallStatus, ag as ChatQueueStore, ah as ActionProposalOutcomeStore, ai as CreateThreadInput, aj as ThreadSummary, ak as ThreadDetail, al as ToolCallApprovalState, am as UpdateThreadInput, an as RecordRunStartInput, ao as EnqueueMessageInput, ap as QueuedMessage, aq as QueuedMessagePatch, ar as QueuePause, as as AppendMessageInput, at as StoredMessage, au as ToolResult, av as MessageFeedback, aw as RecordToolCallInput, ax as ToolCallOutcome, ay as UpdateToolCallInput, az as RecordUsageInput, aA as ToolConfirmation, aB as ActionProposalDecision, aC as ActionProposalSupersessionStore } from './stream-events-BfxJAckJ.cjs';
2
- export { aD as ALL_AGENTS, aE as ASK_TOOL_DESCRIPTION, aF as ASK_TOOL_NAME, aG as ActionProposalDecisionAudit, aH as ActionProposalExecutionContext, aI as ActionProposalLease, aJ as AgentApprovalRequest, aK as AgentApprovalSettlement, aL as AgentAttachmentConfig, aM as AgentCatalogEntry, aN as AgentClientConfig, aO as AgentHistoryWindow, aP as AgentHostContext, aQ as AgentStreamErrorCode, aR as ApprovalDecisionRef, aS as ApprovalRequirement, aT as ApprovalThreadRef, aU as ApprovalToolRef, aV as AskToolInput, aW as ChatQueueState, aX as ClaimedActionApproval, aY as DEFAULT_INTAKE_PREAMBLE, aZ as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, a_ as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, a$ as DefaultApprovalPolicy, b0 as ELICITATION_INPUT_TYPES, b1 as ElicitationInput, b2 as ElicitationInputType, b3 as ElicitationOption, b4 as ElicitationOutcome, b5 as ElicitationQuestion, b6 as ElicitationReply, b7 as ElicitationResult, b8 as EmitUiOptions, b9 as HistoryPolicyContext, ba as HistorySelection, bb as HistorySummary, bc as InvokeWithTransientRetryOptions, bd as MAX_ASK_QUESTIONS, be as MessageFeedbackValue, bf as MessageRole, bg as PersonaRef, bh as PromptContext, bi as QueuePauseReason, bj as QueuedMessageView, bk as QuotaView, bl as REQUESTER_APPROVER, bm as RUN_ENDED_BEFORE_TOOL_CALL, bn as RecordRunEndInput, bo as ResolveActionProposalApprovalInput, bp as ThreadTurnPage, bq as ThreadTurnQuery, br as ThreadTurnReader, bs as ToolCallApproval, bt as ToolCallApprovalColumns, bu as ToolCallApprovalStatus, bv as ToolCatalogEntry, bw as ToolDescription, bx as ToolKind, by as ToolPreflightOptions, c as ToolPresentation, bz as ToolPresentationTone, bA as ToolResultField, bB as ToolResultView, bC as ToolStepCtx, bD as ToolTransientRetryNumbers, bE as ToolTransientRetryOptions, bF as TurnPersona, bG as UNFINISHED_TOOL_CALL, bH as UsagePurpose, bI as askInputSchema, bJ as askToolDefinition, bK as danglingToolCallIds, bL as decodeStreamEvent, bM as defaultCanDecide, bN as encodeStreamEvent, bO as invokeWithTransientRetry, bP as isChatQueueStore, bQ as isTransientToolError, bR as isTypedQuestion, bS as mayDecideApproval, bT as normalizeElicitationReply, bU as questionOptions, bV as queuedMessageView, bW as readElicitationInput, bX as readElicitationQuestions, bY as releaseThreadRun, bZ as renderElicitationAnswers, b_ as resolveActionProposalApproval, b$ as resolveElicitation, c0 as resolveToolTransientRetryNumbers, c1 as settleDanglingToolCalls, c2 as settleElicitation, c3 as toolCallApprovalFromRow, c4 as validateElicitationAnswer, c5 as validateElicitationValue } from './stream-events-BfxJAckJ.cjs';
1
+ import { M as ModelMessage, r as ToolDefinition, u as ToolCallRequest, w as MessageUsage, x as AgentUiComponent, a as Actor, y as ToolInputPreview, z as ToolInputPreviewScope, B as ToolDescribeScope, A as AgentStreamEvent, D as AiToolCtx, T as ToolSpec, Q as QuotaState, E as AgentRunInput, H as HumanReply, F as MessageAttachment, G as ActionProposalMutationResult, I as ActionProposal, J as ActionProposalExecution, K as ActionProposalOutcomeDelivery, b as ToolHandler, L as AgentDefinition, N as Persona, O as PersonaCatalogEntry, R as HistoryPolicy, S as PageContext, V as AgentStore, W as AgentDelegation, X as DetachedDelivery, Y as ToolPreflightResult, Z as ApprovalPolicy, _ as PromptBuilder, $ as PromptContributor, a0 as ToolTransientRetrySetting, a1 as AgentIntake, a2 as Decision, a3 as ElicitationRequest, a4 as LlmStepEnvelope, a5 as ToolStepEnvelope, a6 as ClaimActionProposal, a7 as ActionProposalStore, a8 as ActionProposalStoreOptions, a9 as CreateActionProposal, aa as CreateActionProposalResult, ab as ActionProposalScope, ac as ListActionProposals, ad as ActionProposalDecisionCommand, ae as ExtendActionProposalLease, af as SettleActionProposal, ag as ActionProposalOutcome, ah as ActionProposalOutcomeLease, ai as ToolCallStatus, aj as ChatQueueStore, ak as ActionProposalOutcomeStore, al as CreateThreadInput, am as ThreadSummary, an as ThreadDetail, ao as ToolCallApprovalState, ap as UpdateThreadInput, aq as RecordRunStartInput, ar as EnqueueMessageInput, as as QueuedMessage, at as QueuedMessagePatch, au as QueuePause, av as AppendMessageInput, aw as StoredMessage, ax as ToolResult, ay as MessageFeedback, az as RecordToolCallInput, aA as ToolCallOutcome, aB as UpdateToolCallInput, aC as RecordUsageInput, aD as ToolConfirmation, aE as ActionProposalDecision, aF as ActionProposalSupersessionStore } from './stream-events-qB6NOOvn.cjs';
2
+ export { aG as ALL_AGENTS, aH as ASK_TOOL_DESCRIPTION, aI as ASK_TOOL_NAME, aJ as ActionProposalDecisionAudit, aK as ActionProposalExecutionContext, aL as ActionProposalLease, aM as AgentApprovalRequest, aN as AgentApprovalSettlement, aO as AgentAttachmentConfig, aP as AgentCatalogEntry, aQ as AgentClientConfig, aR as AgentHistoryWindow, aS as AgentHostContext, aT as AgentStreamErrorCode, aU as ApprovalDecisionRef, aV as ApprovalRequirement, aW as ApprovalThreadRef, aX as ApprovalToolRef, aY as AskToolInput, aZ as ChatQueueState, a_ as ClaimedActionApproval, a$ as DEFAULT_INTAKE_PREAMBLE, b0 as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, b1 as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, b2 as DefaultApprovalPolicy, b3 as ELICITATION_INPUT_TYPES, b4 as ElicitationInput, b5 as ElicitationInputType, b6 as ElicitationOption, b7 as ElicitationOutcome, b8 as ElicitationQuestion, b9 as ElicitationReply, ba as ElicitationResult, bb as EmitUiOptions, bc as HistoryPolicyContext, bd as HistorySelection, be as HistorySummary, bf as InvokeWithTransientRetryOptions, bg as MAX_ASK_QUESTIONS, bh as MessageFeedbackValue, bi as MessageRole, P as PartialToolInput, bj as PersonaRef, bk as PromptContext, bl as QueuePauseReason, bm as QueuedMessageView, bn as QuotaView, bo as REQUESTER_APPROVER, bp as RUN_ENDED_BEFORE_TOOL_CALL, bq as RecordRunEndInput, br as ResolveActionProposalApprovalInput, bs as ThreadTurnPage, bt as ThreadTurnQuery, bu as ThreadTurnReader, bv as ToolCallApproval, bw as ToolCallApprovalColumns, bx as ToolCallApprovalStatus, by as ToolCatalogEntry, bz as ToolDescription, bA as ToolInputPreviewFrame, bB as ToolKind, bC as ToolPreflightOptions, c as ToolPresentation, bD as ToolPresentationTone, bE as ToolResultField, bF as ToolResultView, bG as ToolStepCtx, bH as ToolTransientRetryNumbers, bI as ToolTransientRetryOptions, bJ as TurnPersona, bK as UNFINISHED_TOOL_CALL, bL as UsagePurpose, bM as askInputSchema, bN as askToolDefinition, bO as danglingToolCallIds, bP as decodeStreamEvent, bQ as defaultCanDecide, bR as encodeStreamEvent, bS as invokeWithTransientRetry, bT as isChatQueueStore, bU as isTransientToolError, bV as isTypedQuestion, bW as mayDecideApproval, bX as normalizeElicitationReply, bY as questionOptions, bZ as queuedMessageView, b_ as readElicitationInput, b$ as readElicitationQuestions, c0 as releaseThreadRun, c1 as renderElicitationAnswers, c2 as resolveActionProposalApproval, c3 as resolveElicitation, c4 as resolveToolTransientRetryNumbers, c5 as settleDanglingToolCalls, c6 as settleElicitation, c7 as toolCallApprovalFromRow, c8 as validateElicitationAnswer, c9 as validateElicitationValue } from './stream-events-qB6NOOvn.cjs';
3
3
  import { StandardSchemaV1 } from '@standard-schema/spec';
4
- import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-BANqZT3O.cjs';
5
- export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-BANqZT3O.cjs';
6
- import { a as Catalog } from './catalog-G8usJpx5.cjs';
4
+ import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-BhOGaMPY.cjs';
5
+ export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-BhOGaMPY.cjs';
6
+ import { a as Catalog } from './catalog-BUmTnAqU.cjs';
7
7
  import { ChannelRegistry } from '@dudousxd/nestjs-diagnostics';
8
8
 
9
9
  /**
@@ -236,6 +236,19 @@ interface BufferedModelTurnResult extends ModelTurnResult {
236
236
  processor: string;
237
237
  reason: string;
238
238
  };
239
+ /**
240
+ * Previews of streaming tool input the turn showed (`ToolHandler.previewInput`) and left standing.
241
+ * Journaled with the turn, so whichever process settles the calls withdraws the same previews the
242
+ * stream showed when a call's own push does not replace them.
243
+ */
244
+ previews?: ShownToolInputPreview[];
245
+ }
246
+ /** A preview a model turn showed: what the loop withdraws if the call's own push never replaces it. */
247
+ interface ShownToolInputPreview {
248
+ /** The `ui` id it was shown under: `<toolCallId>:ui:0`. */
249
+ id: string;
250
+ component: string;
251
+ toolCallId: string;
239
252
  }
240
253
  /**
241
254
  * Thin wrapper over the actual LLM. The concrete impl (e.g. Vercel AI SDK `streamText`
@@ -345,6 +358,70 @@ declare function observeTurnFrames(writer: SinkWriter, now?: () => number): Obse
345
358
  /** Fill what a provider did not report from what its frames showed. A provider's own value wins. */
346
359
  declare function withTurnFrames<T extends ModelTurnResult>(result: T, frames: TurnFrameSummary): T;
347
360
 
361
+ /** Default least time between two preview frames of one call ({@link ToolInputPreview.throttleMs}). */
362
+ declare const DEFAULT_PREVIEW_THROTTLE_MS = 100;
363
+ /** The id a call's preview is shown under: the one its first `ctx.emitUi` push gets. */
364
+ declare function previewUiId(toolCallId: string): string;
365
+ /** The event that withdraws a preview: partial, with nothing to draw. */
366
+ declare function withdrawPreviewEvent(shown: ShownToolInputPreview): AgentStreamEvent;
367
+ interface ToolInputPreviews {
368
+ /** Hand THIS to the model provider: every chunk passes through, previews are added after. */
369
+ writer: SinkWriter;
370
+ /** The previews still standing (shown and not withdrawn), in the order they first appeared. */
371
+ shown(): ShownToolInputPreview[];
372
+ }
373
+ /**
374
+ * Wrap the writer a model turn streams into so a tool that previews its input
375
+ * (`ToolHandler.previewInput`) gets `ui` frames drawn from the arguments while the model writes them.
376
+ *
377
+ * Per call: the streamed argument text (`tool-input-delta`) is accumulated, parsed as far as it goes
378
+ * (`parsePartialJson`) and handed to the preview; what it renders is written as a `partial` `ui`
379
+ * frame — at most one every `throttleMs`, and only when it changed, so a long tree costs the stream
380
+ * (and every sink buffering it) a bounded number of snapshots rather than one per delta. Whatever the
381
+ * throttle held back is flushed when the arguments are complete (`tool-input-available`).
382
+ *
383
+ * Previews never fail the turn: a preview that throws is dropped for that call.
384
+ */
385
+ declare function previewToolInputs(inner: SinkWriter, resolve: (toolName: string, toolCallId: string) => Promise<ToolInputPreview | undefined>, now?: () => number): ToolInputPreviews;
386
+ /**
387
+ * The resolver {@link previewToolInputs} takes, over a registry: a call of a tool this turn OFFERED
388
+ * is previewed as its handler's `previewInput` says, for the turn's scope; any other name (a tool the
389
+ * model was not shown, a built-in like `ask`) is not previewed.
390
+ */
391
+ declare function registryInputPreviews(registry: {
392
+ previewInput(name: string, scope: ToolInputPreviewScope): Promise<ToolInputPreview | undefined>;
393
+ }, offered: readonly {
394
+ name: string;
395
+ }[], scope: ToolDescribeScope): (toolName: string, toolCallId: string) => Promise<ToolInputPreview | undefined>;
396
+
397
+ /**
398
+ * A JSON document cut off somewhere in the middle — a tool call's arguments while the model is still
399
+ * writing them — read as far as it goes.
400
+ *
401
+ * What it returns is what a reader can trust about the prefix, and no more:
402
+ * - an object or array whose closing bracket has not arrived is returned with what it holds so far,
403
+ * and listed in {@link PartialJson.open};
404
+ * - a string cut mid-way is returned as written so far, and the member holding it is named by
405
+ * {@link PartialJson.pendingMember} (so `"type": "Car` is never mistaken for a finished `"Car"`);
406
+ * - a number, `true`, `false` or `null` at the cut is LEFT OUT (`12` may yet be `123`), and so is a
407
+ * key with no value yet; the member is named by `pendingMember` all the same.
408
+ */
409
+ interface PartialJson {
410
+ /** The value read so far. `undefined` when not even its first character has arrived. */
411
+ value: unknown;
412
+ /** Whether the document is complete: the root value closed (trailing whitespace allowed). */
413
+ complete: boolean;
414
+ /** Is this object or array (one of `value`'s) still open? */
415
+ isOpen(container: object): boolean;
416
+ /** The key (object) or index (array) of `container` whose value is still being written. */
417
+ pendingMember(container: object): string | number | undefined;
418
+ }
419
+ /**
420
+ * Parse a JSON prefix (see {@link PartialJson}). `undefined` when the text is not the beginning of a
421
+ * JSON document at all — a syntax error before the cut.
422
+ */
423
+ declare function parsePartialJson(text: string): PartialJson | undefined;
424
+
348
425
  /** The tool step's journaled result: the bare output, or the output plus the components it pushed. */
349
426
  declare function wrapToolStepOutput(output: unknown, ui: readonly AgentUiComponent[], text?: string): unknown;
350
427
  /** Carry domain refusal across a remote step without losing its type in error serialization. */
@@ -2565,6 +2642,11 @@ declare class ToolRegistry {
2565
2642
  * silently take a tool away from whoever does.
2566
2643
  */
2567
2644
  unregister(name: string): boolean;
2645
+ /**
2646
+ * How a streamed call of `name` is previewed while its input arrives (`ToolHandler.previewInput`),
2647
+ * or `undefined`. A preview that fails to build is no preview: it never fails the turn.
2648
+ */
2649
+ previewInput(name: string, scope: ToolInputPreviewScope): Promise<ToolInputPreview | undefined>;
2568
2650
  spec(name: string): ToolSpec | undefined;
2569
2651
  allSpecs(): ToolSpec[];
2570
2652
  /**
@@ -2590,6 +2672,9 @@ declare class ToolRegistry {
2590
2672
  * Run a tool. Re-checks that the tool is enabled and that the role allows it (defense-in-depth —
2591
2673
  * a call can reach here from a replayed durable step or an approval granted before the flag
2592
2674
  * moved, neither of which went through `definitionsFor` again) and re-parses the input via Zod.
2675
+ * A tool whose `describe()` answers `available: false` for the call's scope (actor, thread, agent,
2676
+ * `uiCapabilities`) is refused with {@link ToolNotFoundError}, as the unknown tool it was to the
2677
+ * model.
2593
2678
  */
2594
2679
  invoke(name: string, input: unknown, ctx: AiToolCtx, policy: RolesPolicy, options?: InvokeOptions): Promise<unknown>;
2595
2680
  /** Authorize and validate without executing. The caller journals this result before approval. */
@@ -3061,6 +3146,18 @@ interface AgentLoopHooks {
3061
3146
  * a parked run is the runner's job, through whatever hard cancel its runtime has.
3062
3147
  */
3063
3148
  cancelled?(): Promise<boolean>;
3149
+ /**
3150
+ * Aborted when someone stops this run. Handed to the model call (`ModelTurnArgs.abortSignal`, the
3151
+ * AI SDK's `abortSignal`) and to each tool (`AiToolCtx.abortSignal`), so a Stop cuts short what the
3152
+ * run is waiting on instead of letting it run to the end of the step. A model call that returns or
3153
+ * fails once the signal is aborted unwinds the turn with {@link RunCancelledError} before anything
3154
+ * of that step is persisted; a tool that honours it settles failed, and the turn stops at its next
3155
+ * safe point ({@link cancelled}).
3156
+ *
3157
+ * Only for a runner that records NO positions (the inline runner): the abort is observed live,
3158
+ * outside any checkpoint, so a runner that replays a journal must leave it undefined.
3159
+ */
3160
+ abortSignal?: AbortSignal;
3064
3161
  /**
3065
3162
  * Does this run take the loop shape guarded by `id`? A runner replaying against recorded
3066
3163
  * checkpoints answers `false` for a run that started before the shape changed, so that run keeps
@@ -3466,6 +3563,12 @@ declare class InMemoryActionProposalStore implements ActionProposalStore, Action
3466
3563
  getActionProposal(scope: ActionProposalScope, id: string): Promise<ActionProposal | null>;
3467
3564
  listActionProposals(scope: ActionProposalScope, query?: ListActionProposals): Promise<ActionProposal[]>;
3468
3565
  private mutate;
3566
+ /**
3567
+ * Called after every proposal transition, with the row before and after — synchronously, so no
3568
+ * reader sees one without the other. {@link InMemoryAgentStore} settles the proposal's tool-call
3569
+ * record here (see `toolCallUpdateForTransition`).
3570
+ */
3571
+ protected proposalChanged(_previous: ActionProposal, _next: ActionProposal): void;
3469
3572
  decideActionProposal(scope: ActionProposalScope, id: string, command: ActionProposalDecisionCommand): Promise<ActionProposalMutationResult>;
3470
3573
  claimActionProposal(scope: ActionProposalScope, id: string, command: ClaimActionProposal): Promise<ActionProposalMutationResult>;
3471
3574
  extendActionProposalLease(scope: ActionProposalScope, id: string, command: ExtendActionProposalLease): Promise<ActionProposalMutationResult>;
@@ -3659,6 +3762,9 @@ declare class InMemoryAgentStore extends InMemoryActionProposalStore implements
3659
3762
  toolCallOutcomes(toolCallIds: readonly string[]): Promise<ToolCallOutcome[]>;
3660
3763
  failUnsettledToolCalls(runId: string, error: string): Promise<number>;
3661
3764
  updateToolCall(input: UpdateToolCallInput): Promise<void>;
3765
+ /** An independent proposal moved: its `proposed` tool-call record follows it. */
3766
+ protected proposalChanged(previous: ActionProposal, next: ActionProposal): void;
3767
+ private applyToolCallUpdate;
3662
3768
  recordUsage(input: RecordUsageInput): Promise<void>;
3663
3769
  quotaToday(actorRef: string, day: string): Promise<{
3664
3770
  usedTokens: number;
@@ -4283,6 +4389,21 @@ declare function parseTextActionProposalCommand(text: string, vocabulary?: TextA
4283
4389
  */
4284
4390
  declare const ptBrActionProposalText: Required<TextActionProposalConfig>;
4285
4391
 
4392
+ /**
4393
+ * The tool-call record an independent proposal's state settles, or `null` while it has nothing to
4394
+ * say yet (pending, or approved and not yet run).
4395
+ *
4396
+ * In `actionApprovalMode: 'independent'` the turn records the call as `proposed` and ends; the
4397
+ * proposal row then carries the decision and the execution. Every store applies this on each
4398
+ * proposal transition — in the same write where it can — so the call's own record (what the
4399
+ * dashboard, the run detail and a host's audit read) follows the proposal: `executed` with its
4400
+ * output, `failed` with its error, `rejected`, or `expired` (a lapsed proposal, or one a newer
4401
+ * proposal superseded; the tool never ran either way).
4402
+ */
4403
+ declare function toolCallUpdateForProposal(proposal: ActionProposal): UpdateToolCallInput | null;
4404
+ /** The update a transition from `previous` to `next` calls for: `null` when the call's status stays. */
4405
+ declare function toolCallUpdateForTransition(previous: ActionProposal | undefined, next: ActionProposal): UpdateToolCallInput | null;
4406
+
4286
4407
  interface ActionProposalExecutionDeps {
4287
4408
  registry: ToolRegistry;
4288
4409
  rolesPolicy: RolesPolicy;
@@ -4356,4 +4477,4 @@ declare function createFunctionalTool<I, O>(definition: FunctionalToolDefinition
4356
4477
  /** Presentation failures must never cause a successful side effect to be retried. */
4357
4478
  declare function emitToolPresentations<I, O>(handler: ToolHandler<I, O>, output: O, ctx: AiToolCtx, toolName: string): Promise<void>;
4358
4479
 
4359
- export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_CHANNEL_STORE, AGENT_CONFIRM_TOKEN_STORE, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_MODEL_CATALOG, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_PROVIDER, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, type ActionApprovalMode, ActionProposal, ActionProposalDecision, ActionProposalDecisionCommand, type ActionProposalDiscoveryIndexStore, ActionProposalExecution, type ActionProposalExecutionDeps, type ActionProposalExecutionResult, ActionProposalExecutor, type ActionProposalExecutorOptions, ActionProposalMutationResult, type ActionProposalMutationView, ActionProposalOutcome, ActionProposalOutcomeDelivery, ActionProposalOutcomeLease, ActionProposalOutcomeStore, type ActionProposalReceipt, type ActionProposalRuntimeStore, ActionProposalScope, ActionProposalStore, ActionProposalStoreOptions, ActionProposalSupersessionStore, type ActionProposalTarget, type ActionProposalView, ActionProposalWorker, type ActionProposalWorkerOptions, type ActionProposalWorkerStore, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStartOptions, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, AppendMessageInput, ApprovalPolicy, type ApprovalWhere, type AttachmentRef, type AttachmentStagingDescription, type AttachmentStagingStore, type BackgroundActorResolver, type BufferedModelTurnResult, type BuildMemoryBlockInput, CONFIRM_JSON_SCHEMA_PROPERTIES, type ChannelStore, ChatQueueStore, ClaimActionProposal, ClosedRolesPolicy, type ConfirmFields, type ConfirmTokenClaim, ConfirmTokenError, type ConfirmTokenStore, type ConfirmTokenSubject, type ConfirmedTool, type ConfirmedToolDone, type ConfirmedToolMessages, type ConfirmedToolOptions, type ConfirmedToolOutcome, type ConfirmedToolPreview, type ConfirmedToolResult, type ConfirmedToolSteps, type CostUsage, CreateActionProposal, CreateActionProposalResult, CreateThreadInput, type CurrentModelPrice, DEFAULT_CONFIRM_TTL_MS, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, DEFAULT_TEXT_ACTION_PROPOSAL_REPLIES, DEFAULT_TEXT_ACTION_PROPOSAL_VOCABULARY, Decision, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type EmptyRoles, EnqueueMessageInput, ExtendActionProposalLease, type ForgetMemoryInput, type FrameBuffer, type FunctionalTool, type FunctionalToolDefinition, GLOBAL_SCOPE, type GovernanceMessageRow, type GovernancePage, type GovernancePageQuery, type GovernancePendingApprovalRow, type GovernanceRange, type GovernanceRunDetail, type GovernanceRunRow, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceThreadRow, type GovernanceToolCallRow, type GovernanceUsageInput, type GovernanceUsageRow, HistoryPolicy, HumanReply, InMemoryActionProposalStore, InMemoryAgentStore, InMemoryChannelStore, InMemoryConfirmTokenStore, type IncrementalGate, InputProcessor, type InvokeOptions, ListActionProposals, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageFeedback, MessageUsage, ModelAnswer, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogLock, type ModelCatalogProviderGroup, type ModelCatalogQuery, type ModelCatalogView, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type NegotiatedUiCollector, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, Persona, type PersonaAlias, PersonaCatalogEntry, type PrepareOptions, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QueuePause, QueuedMessage, QueuedMessagePatch, type QuotaBlock, QuotaExceededError, type QuotaPeriod, type QuotaProvider, type QuotaQuery, type QuotaReport, QuotaState, type QuotaStore, type QuotaWarning, type QuotaWindow, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, RUN_FAILED_MESSAGE, RUN_NOT_ACTIVE_CODE, RUN_NOT_ACTIVE_MESSAGE, RUN_NO_LONGER_RUNNING, type RecentRunRow, RecordRunStartInput, RecordToolCallInput, RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolveToolUiCatalog, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RolesPolicyOptions, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SCHEMA_EXTENSION, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type SchemaExtension, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, SettleActionProposal, type SettleDeadRunInput, type SettledTask, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, SqlTokenStreamSink, type SqlTokenStreamSinkOptions, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StreamFrameRow, type StreamFrameTable, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type TextActionProposalCandidate, type TextActionProposalCommand, type TextActionProposalConfig, type TextActionProposalReplies, type TextActionProposalResolution, type TextActionProposalVocabulary, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApprovalState, ToolCallOutcome, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolConfirmation, ToolDefinition, ToolDescribeScope, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputDriftError, ToolInputInvalidError, type ToolKindDeps, ToolNotFoundError, ToolPreflightDeniedError, ToolPreflightResult, type ToolPreparationResult, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, UpdateThreadInput, UpdateToolCallInput, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actionProposalCreationMatches, actionProposalOutcomeFenceValid, actionProposalOutcomeScope, actionProposalOutcomeText, actionProposalReceipt, actionProposalScopeMatches, actorScope, agentDiagnosticKey, agentFailureCode, assertIndependentActionCapabilities, attachActionProposalOutcome, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, canonicalActionProposalJson, canonicalJson, claimActionProposalOutcome, closeEmptyRoles, compositeSkillProvider, confirmTokenExpiry, createFrameBuffer, createFunctionalTool, createIncrementalGate, createNegotiatedUiCollector, createNoopEmitUi, createUiCollector, dayBoundsUtc, defaultScopeResolver, defineConfirmedTool, detachedDelivered, detachedStarted, detachedUnsettled, emitToolPresentations, escapeUnsafeToolUiText, estimateCost, estimateMessageTokens, exhaustedWindow, exposeStreamErrorDetails, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, findCatalogModel, findPersona, gateFollowUps, gateTail, hashConfirmToken, initialActionProposal, intersectAllowLists, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, parseTextActionProposalCommand, personaCatalogEntry, prepareActionProposal, ptBrActionProposalText, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, quotaPeriodRange, quotaUsedRatio, quotaWarning, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolvePersonaAlias, resolveSkillCatalog, resolveTextActionProposalDecision, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, schemaExtensionOf, seedModelPrices, settleAll, settleDeadRun, settleUnsettledDelegation, signConfirmToken, skillInputSchema, skillToolDefinition, skillWriteVerdict, snapshotActionProposal, stampToolKinds, staticModelCatalog, staticSkillProvider, streamFailure, summarizeWithModel, tenantScope, textActionProposalReply, toActionProposalMutationView, toActionProposalView, toolCallContext, traceLlmTurn, traceToolExecution, transitionActionProposalClaim, transitionActionProposalDecision, transitionActionProposalLease, transitionActionProposalSettlement, transitionActionProposalSupersession, truncateDetailContent, unwrapToolStepOutput, validateActionProposalCreation, validateActionProposalDiscoveryIndexBatch, validateActionProposalExpiryBatch, validateActionProposalListQuery, validateActionProposalWorkerClaim, validateStructured, verifyConfirmToken, windowHistory, withAskTool, withConfirmFields, withMemoryTool, withSelectedModel, withSkillTool, withToolTimeout, withTurnFrames, wrapToolPreflightDenied, wrapToolStepOutput, writeMemory };
4480
+ export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_CHANNEL_STORE, AGENT_CONFIRM_TOKEN_STORE, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_MODEL_CATALOG, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_PROVIDER, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, type ActionApprovalMode, ActionProposal, ActionProposalDecision, ActionProposalDecisionCommand, type ActionProposalDiscoveryIndexStore, ActionProposalExecution, type ActionProposalExecutionDeps, type ActionProposalExecutionResult, ActionProposalExecutor, type ActionProposalExecutorOptions, ActionProposalMutationResult, type ActionProposalMutationView, ActionProposalOutcome, ActionProposalOutcomeDelivery, ActionProposalOutcomeLease, ActionProposalOutcomeStore, type ActionProposalReceipt, type ActionProposalRuntimeStore, ActionProposalScope, ActionProposalStore, ActionProposalStoreOptions, ActionProposalSupersessionStore, type ActionProposalTarget, type ActionProposalView, ActionProposalWorker, type ActionProposalWorkerOptions, type ActionProposalWorkerStore, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStartOptions, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, AppendMessageInput, ApprovalPolicy, type ApprovalWhere, type AttachmentRef, type AttachmentStagingDescription, type AttachmentStagingStore, type BackgroundActorResolver, type BufferedModelTurnResult, type BuildMemoryBlockInput, CONFIRM_JSON_SCHEMA_PROPERTIES, type ChannelStore, ChatQueueStore, ClaimActionProposal, ClosedRolesPolicy, type ConfirmFields, type ConfirmTokenClaim, ConfirmTokenError, type ConfirmTokenStore, type ConfirmTokenSubject, type ConfirmedTool, type ConfirmedToolDone, type ConfirmedToolMessages, type ConfirmedToolOptions, type ConfirmedToolOutcome, type ConfirmedToolPreview, type ConfirmedToolResult, type ConfirmedToolSteps, type CostUsage, CreateActionProposal, CreateActionProposalResult, CreateThreadInput, type CurrentModelPrice, DEFAULT_CONFIRM_TTL_MS, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_PREVIEW_THROTTLE_MS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, DEFAULT_TEXT_ACTION_PROPOSAL_REPLIES, DEFAULT_TEXT_ACTION_PROPOSAL_VOCABULARY, Decision, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type EmptyRoles, EnqueueMessageInput, ExtendActionProposalLease, type ForgetMemoryInput, type FrameBuffer, type FunctionalTool, type FunctionalToolDefinition, GLOBAL_SCOPE, type GovernanceMessageRow, type GovernancePage, type GovernancePageQuery, type GovernancePendingApprovalRow, type GovernanceRange, type GovernanceRunDetail, type GovernanceRunRow, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceThreadRow, type GovernanceToolCallRow, type GovernanceUsageInput, type GovernanceUsageRow, HistoryPolicy, HumanReply, InMemoryActionProposalStore, InMemoryAgentStore, InMemoryChannelStore, InMemoryConfirmTokenStore, type IncrementalGate, InputProcessor, type InvokeOptions, ListActionProposals, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageFeedback, MessageUsage, ModelAnswer, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogLock, type ModelCatalogProviderGroup, type ModelCatalogQuery, type ModelCatalogView, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type NegotiatedUiCollector, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type PartialJson, type Passage, type PendingApprovalRow, Persona, type PersonaAlias, PersonaCatalogEntry, type PrepareOptions, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QueuePause, QueuedMessage, QueuedMessagePatch, type QuotaBlock, QuotaExceededError, type QuotaPeriod, type QuotaProvider, type QuotaQuery, type QuotaReport, QuotaState, type QuotaStore, type QuotaWarning, type QuotaWindow, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, RUN_FAILED_MESSAGE, RUN_NOT_ACTIVE_CODE, RUN_NOT_ACTIVE_MESSAGE, RUN_NO_LONGER_RUNNING, type RecentRunRow, RecordRunStartInput, RecordToolCallInput, RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolveToolUiCatalog, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RolesPolicyOptions, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SCHEMA_EXTENSION, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type SchemaExtension, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, SettleActionProposal, type SettleDeadRunInput, type SettledTask, type ShownToolInputPreview, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, SqlTokenStreamSink, type SqlTokenStreamSinkOptions, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StreamFrameRow, type StreamFrameTable, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type TextActionProposalCandidate, type TextActionProposalCommand, type TextActionProposalConfig, type TextActionProposalReplies, type TextActionProposalResolution, type TextActionProposalVocabulary, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApprovalState, ToolCallOutcome, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolConfirmation, ToolDefinition, ToolDescribeScope, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputDriftError, ToolInputInvalidError, ToolInputPreview, ToolInputPreviewScope, type ToolInputPreviews, type ToolKindDeps, ToolNotFoundError, ToolPreflightDeniedError, ToolPreflightResult, type ToolPreparationResult, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, UpdateThreadInput, UpdateToolCallInput, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actionProposalCreationMatches, actionProposalOutcomeFenceValid, actionProposalOutcomeScope, actionProposalOutcomeText, actionProposalReceipt, actionProposalScopeMatches, actorScope, agentDiagnosticKey, agentFailureCode, assertIndependentActionCapabilities, attachActionProposalOutcome, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, canonicalActionProposalJson, canonicalJson, claimActionProposalOutcome, closeEmptyRoles, compositeSkillProvider, confirmTokenExpiry, createFrameBuffer, createFunctionalTool, createIncrementalGate, createNegotiatedUiCollector, createNoopEmitUi, createUiCollector, dayBoundsUtc, defaultScopeResolver, defineConfirmedTool, detachedDelivered, detachedStarted, detachedUnsettled, emitToolPresentations, escapeUnsafeToolUiText, estimateCost, estimateMessageTokens, exhaustedWindow, exposeStreamErrorDetails, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, findCatalogModel, findPersona, gateFollowUps, gateTail, hashConfirmToken, initialActionProposal, intersectAllowLists, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, parsePartialJson, parseTextActionProposalCommand, personaCatalogEntry, prepareActionProposal, previewToolInputs, previewUiId, ptBrActionProposalText, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, quotaPeriodRange, quotaUsedRatio, quotaWarning, registryInputPreviews, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolvePersonaAlias, resolveSkillCatalog, resolveTextActionProposalDecision, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, schemaExtensionOf, seedModelPrices, settleAll, settleDeadRun, settleUnsettledDelegation, signConfirmToken, skillInputSchema, skillToolDefinition, skillWriteVerdict, snapshotActionProposal, stampToolKinds, staticModelCatalog, staticSkillProvider, streamFailure, summarizeWithModel, tenantScope, textActionProposalReply, toActionProposalMutationView, toActionProposalView, toolCallContext, toolCallUpdateForProposal, toolCallUpdateForTransition, traceLlmTurn, traceToolExecution, transitionActionProposalClaim, transitionActionProposalDecision, transitionActionProposalLease, transitionActionProposalSettlement, transitionActionProposalSupersession, truncateDetailContent, unwrapToolStepOutput, validateActionProposalCreation, validateActionProposalDiscoveryIndexBatch, validateActionProposalExpiryBatch, validateActionProposalListQuery, validateActionProposalWorkerClaim, validateStructured, verifyConfirmToken, windowHistory, withAskTool, withConfirmFields, withMemoryTool, withSelectedModel, withSkillTool, withToolTimeout, withTurnFrames, withdrawPreviewEvent, wrapToolPreflightDenied, wrapToolStepOutput, writeMemory };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { M as ModelMessage, q as ToolDefinition, r as ToolCallRequest, u as MessageUsage, w as AgentUiComponent, a as Actor, x as AiToolCtx, A as AgentStreamEvent, T as ToolSpec, Q as QuotaState, y as AgentRunInput, H as HumanReply, z as MessageAttachment, B as ActionProposalMutationResult, D as ActionProposal, E as ActionProposalExecution, F as ActionProposalOutcomeDelivery, b as ToolHandler, G as AgentDefinition, I as Persona, J as PersonaCatalogEntry, K as HistoryPolicy, L as PageContext, N as AgentStore, O as AgentDelegation, R as DetachedDelivery, S as ToolDescribeScope, V as ToolPreflightResult, W as ApprovalPolicy, X as PromptBuilder, Y as PromptContributor, Z as ToolTransientRetrySetting, _ as AgentIntake, $ as Decision, a0 as ElicitationRequest, a1 as LlmStepEnvelope, a2 as ToolStepEnvelope, a3 as ClaimActionProposal, a4 as ActionProposalStore, a5 as ActionProposalStoreOptions, a6 as CreateActionProposal, a7 as CreateActionProposalResult, a8 as ActionProposalScope, a9 as ListActionProposals, aa as ActionProposalDecisionCommand, ab as ExtendActionProposalLease, ac as SettleActionProposal, ad as ActionProposalOutcome, ae as ActionProposalOutcomeLease, af as ToolCallStatus, ag as ChatQueueStore, ah as ActionProposalOutcomeStore, ai as CreateThreadInput, aj as ThreadSummary, ak as ThreadDetail, al as ToolCallApprovalState, am as UpdateThreadInput, an as RecordRunStartInput, ao as EnqueueMessageInput, ap as QueuedMessage, aq as QueuedMessagePatch, ar as QueuePause, as as AppendMessageInput, at as StoredMessage, au as ToolResult, av as MessageFeedback, aw as RecordToolCallInput, ax as ToolCallOutcome, ay as UpdateToolCallInput, az as RecordUsageInput, aA as ToolConfirmation, aB as ActionProposalDecision, aC as ActionProposalSupersessionStore } from './stream-events-DFa2Do42.js';
2
- export { aD as ALL_AGENTS, aE as ASK_TOOL_DESCRIPTION, aF as ASK_TOOL_NAME, aG as ActionProposalDecisionAudit, aH as ActionProposalExecutionContext, aI as ActionProposalLease, aJ as AgentApprovalRequest, aK as AgentApprovalSettlement, aL as AgentAttachmentConfig, aM as AgentCatalogEntry, aN as AgentClientConfig, aO as AgentHistoryWindow, aP as AgentHostContext, aQ as AgentStreamErrorCode, aR as ApprovalDecisionRef, aS as ApprovalRequirement, aT as ApprovalThreadRef, aU as ApprovalToolRef, aV as AskToolInput, aW as ChatQueueState, aX as ClaimedActionApproval, aY as DEFAULT_INTAKE_PREAMBLE, aZ as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, a_ as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, a$ as DefaultApprovalPolicy, b0 as ELICITATION_INPUT_TYPES, b1 as ElicitationInput, b2 as ElicitationInputType, b3 as ElicitationOption, b4 as ElicitationOutcome, b5 as ElicitationQuestion, b6 as ElicitationReply, b7 as ElicitationResult, b8 as EmitUiOptions, b9 as HistoryPolicyContext, ba as HistorySelection, bb as HistorySummary, bc as InvokeWithTransientRetryOptions, bd as MAX_ASK_QUESTIONS, be as MessageFeedbackValue, bf as MessageRole, bg as PersonaRef, bh as PromptContext, bi as QueuePauseReason, bj as QueuedMessageView, bk as QuotaView, bl as REQUESTER_APPROVER, bm as RUN_ENDED_BEFORE_TOOL_CALL, bn as RecordRunEndInput, bo as ResolveActionProposalApprovalInput, bp as ThreadTurnPage, bq as ThreadTurnQuery, br as ThreadTurnReader, bs as ToolCallApproval, bt as ToolCallApprovalColumns, bu as ToolCallApprovalStatus, bv as ToolCatalogEntry, bw as ToolDescription, bx as ToolKind, by as ToolPreflightOptions, c as ToolPresentation, bz as ToolPresentationTone, bA as ToolResultField, bB as ToolResultView, bC as ToolStepCtx, bD as ToolTransientRetryNumbers, bE as ToolTransientRetryOptions, bF as TurnPersona, bG as UNFINISHED_TOOL_CALL, bH as UsagePurpose, bI as askInputSchema, bJ as askToolDefinition, bK as danglingToolCallIds, bL as decodeStreamEvent, bM as defaultCanDecide, bN as encodeStreamEvent, bO as invokeWithTransientRetry, bP as isChatQueueStore, bQ as isTransientToolError, bR as isTypedQuestion, bS as mayDecideApproval, bT as normalizeElicitationReply, bU as questionOptions, bV as queuedMessageView, bW as readElicitationInput, bX as readElicitationQuestions, bY as releaseThreadRun, bZ as renderElicitationAnswers, b_ as resolveActionProposalApproval, b$ as resolveElicitation, c0 as resolveToolTransientRetryNumbers, c1 as settleDanglingToolCalls, c2 as settleElicitation, c3 as toolCallApprovalFromRow, c4 as validateElicitationAnswer, c5 as validateElicitationValue } from './stream-events-DFa2Do42.js';
1
+ import { M as ModelMessage, r as ToolDefinition, u as ToolCallRequest, w as MessageUsage, x as AgentUiComponent, a as Actor, y as ToolInputPreview, z as ToolInputPreviewScope, B as ToolDescribeScope, A as AgentStreamEvent, D as AiToolCtx, T as ToolSpec, Q as QuotaState, E as AgentRunInput, H as HumanReply, F as MessageAttachment, G as ActionProposalMutationResult, I as ActionProposal, J as ActionProposalExecution, K as ActionProposalOutcomeDelivery, b as ToolHandler, L as AgentDefinition, N as Persona, O as PersonaCatalogEntry, R as HistoryPolicy, S as PageContext, V as AgentStore, W as AgentDelegation, X as DetachedDelivery, Y as ToolPreflightResult, Z as ApprovalPolicy, _ as PromptBuilder, $ as PromptContributor, a0 as ToolTransientRetrySetting, a1 as AgentIntake, a2 as Decision, a3 as ElicitationRequest, a4 as LlmStepEnvelope, a5 as ToolStepEnvelope, a6 as ClaimActionProposal, a7 as ActionProposalStore, a8 as ActionProposalStoreOptions, a9 as CreateActionProposal, aa as CreateActionProposalResult, ab as ActionProposalScope, ac as ListActionProposals, ad as ActionProposalDecisionCommand, ae as ExtendActionProposalLease, af as SettleActionProposal, ag as ActionProposalOutcome, ah as ActionProposalOutcomeLease, ai as ToolCallStatus, aj as ChatQueueStore, ak as ActionProposalOutcomeStore, al as CreateThreadInput, am as ThreadSummary, an as ThreadDetail, ao as ToolCallApprovalState, ap as UpdateThreadInput, aq as RecordRunStartInput, ar as EnqueueMessageInput, as as QueuedMessage, at as QueuedMessagePatch, au as QueuePause, av as AppendMessageInput, aw as StoredMessage, ax as ToolResult, ay as MessageFeedback, az as RecordToolCallInput, aA as ToolCallOutcome, aB as UpdateToolCallInput, aC as RecordUsageInput, aD as ToolConfirmation, aE as ActionProposalDecision, aF as ActionProposalSupersessionStore } from './stream-events-CqCqYjJw.js';
2
+ export { aG as ALL_AGENTS, aH as ASK_TOOL_DESCRIPTION, aI as ASK_TOOL_NAME, aJ as ActionProposalDecisionAudit, aK as ActionProposalExecutionContext, aL as ActionProposalLease, aM as AgentApprovalRequest, aN as AgentApprovalSettlement, aO as AgentAttachmentConfig, aP as AgentCatalogEntry, aQ as AgentClientConfig, aR as AgentHistoryWindow, aS as AgentHostContext, aT as AgentStreamErrorCode, aU as ApprovalDecisionRef, aV as ApprovalRequirement, aW as ApprovalThreadRef, aX as ApprovalToolRef, aY as AskToolInput, aZ as ChatQueueState, a_ as ClaimedActionApproval, a$ as DEFAULT_INTAKE_PREAMBLE, b0 as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, b1 as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, b2 as DefaultApprovalPolicy, b3 as ELICITATION_INPUT_TYPES, b4 as ElicitationInput, b5 as ElicitationInputType, b6 as ElicitationOption, b7 as ElicitationOutcome, b8 as ElicitationQuestion, b9 as ElicitationReply, ba as ElicitationResult, bb as EmitUiOptions, bc as HistoryPolicyContext, bd as HistorySelection, be as HistorySummary, bf as InvokeWithTransientRetryOptions, bg as MAX_ASK_QUESTIONS, bh as MessageFeedbackValue, bi as MessageRole, P as PartialToolInput, bj as PersonaRef, bk as PromptContext, bl as QueuePauseReason, bm as QueuedMessageView, bn as QuotaView, bo as REQUESTER_APPROVER, bp as RUN_ENDED_BEFORE_TOOL_CALL, bq as RecordRunEndInput, br as ResolveActionProposalApprovalInput, bs as ThreadTurnPage, bt as ThreadTurnQuery, bu as ThreadTurnReader, bv as ToolCallApproval, bw as ToolCallApprovalColumns, bx as ToolCallApprovalStatus, by as ToolCatalogEntry, bz as ToolDescription, bA as ToolInputPreviewFrame, bB as ToolKind, bC as ToolPreflightOptions, c as ToolPresentation, bD as ToolPresentationTone, bE as ToolResultField, bF as ToolResultView, bG as ToolStepCtx, bH as ToolTransientRetryNumbers, bI as ToolTransientRetryOptions, bJ as TurnPersona, bK as UNFINISHED_TOOL_CALL, bL as UsagePurpose, bM as askInputSchema, bN as askToolDefinition, bO as danglingToolCallIds, bP as decodeStreamEvent, bQ as defaultCanDecide, bR as encodeStreamEvent, bS as invokeWithTransientRetry, bT as isChatQueueStore, bU as isTransientToolError, bV as isTypedQuestion, bW as mayDecideApproval, bX as normalizeElicitationReply, bY as questionOptions, bZ as queuedMessageView, b_ as readElicitationInput, b$ as readElicitationQuestions, c0 as releaseThreadRun, c1 as renderElicitationAnswers, c2 as resolveActionProposalApproval, c3 as resolveElicitation, c4 as resolveToolTransientRetryNumbers, c5 as settleDanglingToolCalls, c6 as settleElicitation, c7 as toolCallApprovalFromRow, c8 as validateElicitationAnswer, c9 as validateElicitationValue } from './stream-events-CqCqYjJw.js';
3
3
  import { StandardSchemaV1 } from '@standard-schema/spec';
4
- import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-C9mor-73.js';
5
- export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-C9mor-73.js';
6
- import { a as Catalog } from './catalog-G8usJpx5.js';
4
+ import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-DDKKky_6.js';
5
+ export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-DDKKky_6.js';
6
+ import { a as Catalog } from './catalog-BUmTnAqU.js';
7
7
  import { ChannelRegistry } from '@dudousxd/nestjs-diagnostics';
8
8
 
9
9
  /**
@@ -236,6 +236,19 @@ interface BufferedModelTurnResult extends ModelTurnResult {
236
236
  processor: string;
237
237
  reason: string;
238
238
  };
239
+ /**
240
+ * Previews of streaming tool input the turn showed (`ToolHandler.previewInput`) and left standing.
241
+ * Journaled with the turn, so whichever process settles the calls withdraws the same previews the
242
+ * stream showed when a call's own push does not replace them.
243
+ */
244
+ previews?: ShownToolInputPreview[];
245
+ }
246
+ /** A preview a model turn showed: what the loop withdraws if the call's own push never replaces it. */
247
+ interface ShownToolInputPreview {
248
+ /** The `ui` id it was shown under: `<toolCallId>:ui:0`. */
249
+ id: string;
250
+ component: string;
251
+ toolCallId: string;
239
252
  }
240
253
  /**
241
254
  * Thin wrapper over the actual LLM. The concrete impl (e.g. Vercel AI SDK `streamText`
@@ -345,6 +358,70 @@ declare function observeTurnFrames(writer: SinkWriter, now?: () => number): Obse
345
358
  /** Fill what a provider did not report from what its frames showed. A provider's own value wins. */
346
359
  declare function withTurnFrames<T extends ModelTurnResult>(result: T, frames: TurnFrameSummary): T;
347
360
 
361
+ /** Default least time between two preview frames of one call ({@link ToolInputPreview.throttleMs}). */
362
+ declare const DEFAULT_PREVIEW_THROTTLE_MS = 100;
363
+ /** The id a call's preview is shown under: the one its first `ctx.emitUi` push gets. */
364
+ declare function previewUiId(toolCallId: string): string;
365
+ /** The event that withdraws a preview: partial, with nothing to draw. */
366
+ declare function withdrawPreviewEvent(shown: ShownToolInputPreview): AgentStreamEvent;
367
+ interface ToolInputPreviews {
368
+ /** Hand THIS to the model provider: every chunk passes through, previews are added after. */
369
+ writer: SinkWriter;
370
+ /** The previews still standing (shown and not withdrawn), in the order they first appeared. */
371
+ shown(): ShownToolInputPreview[];
372
+ }
373
+ /**
374
+ * Wrap the writer a model turn streams into so a tool that previews its input
375
+ * (`ToolHandler.previewInput`) gets `ui` frames drawn from the arguments while the model writes them.
376
+ *
377
+ * Per call: the streamed argument text (`tool-input-delta`) is accumulated, parsed as far as it goes
378
+ * (`parsePartialJson`) and handed to the preview; what it renders is written as a `partial` `ui`
379
+ * frame — at most one every `throttleMs`, and only when it changed, so a long tree costs the stream
380
+ * (and every sink buffering it) a bounded number of snapshots rather than one per delta. Whatever the
381
+ * throttle held back is flushed when the arguments are complete (`tool-input-available`).
382
+ *
383
+ * Previews never fail the turn: a preview that throws is dropped for that call.
384
+ */
385
+ declare function previewToolInputs(inner: SinkWriter, resolve: (toolName: string, toolCallId: string) => Promise<ToolInputPreview | undefined>, now?: () => number): ToolInputPreviews;
386
+ /**
387
+ * The resolver {@link previewToolInputs} takes, over a registry: a call of a tool this turn OFFERED
388
+ * is previewed as its handler's `previewInput` says, for the turn's scope; any other name (a tool the
389
+ * model was not shown, a built-in like `ask`) is not previewed.
390
+ */
391
+ declare function registryInputPreviews(registry: {
392
+ previewInput(name: string, scope: ToolInputPreviewScope): Promise<ToolInputPreview | undefined>;
393
+ }, offered: readonly {
394
+ name: string;
395
+ }[], scope: ToolDescribeScope): (toolName: string, toolCallId: string) => Promise<ToolInputPreview | undefined>;
396
+
397
+ /**
398
+ * A JSON document cut off somewhere in the middle — a tool call's arguments while the model is still
399
+ * writing them — read as far as it goes.
400
+ *
401
+ * What it returns is what a reader can trust about the prefix, and no more:
402
+ * - an object or array whose closing bracket has not arrived is returned with what it holds so far,
403
+ * and listed in {@link PartialJson.open};
404
+ * - a string cut mid-way is returned as written so far, and the member holding it is named by
405
+ * {@link PartialJson.pendingMember} (so `"type": "Car` is never mistaken for a finished `"Car"`);
406
+ * - a number, `true`, `false` or `null` at the cut is LEFT OUT (`12` may yet be `123`), and so is a
407
+ * key with no value yet; the member is named by `pendingMember` all the same.
408
+ */
409
+ interface PartialJson {
410
+ /** The value read so far. `undefined` when not even its first character has arrived. */
411
+ value: unknown;
412
+ /** Whether the document is complete: the root value closed (trailing whitespace allowed). */
413
+ complete: boolean;
414
+ /** Is this object or array (one of `value`'s) still open? */
415
+ isOpen(container: object): boolean;
416
+ /** The key (object) or index (array) of `container` whose value is still being written. */
417
+ pendingMember(container: object): string | number | undefined;
418
+ }
419
+ /**
420
+ * Parse a JSON prefix (see {@link PartialJson}). `undefined` when the text is not the beginning of a
421
+ * JSON document at all — a syntax error before the cut.
422
+ */
423
+ declare function parsePartialJson(text: string): PartialJson | undefined;
424
+
348
425
  /** The tool step's journaled result: the bare output, or the output plus the components it pushed. */
349
426
  declare function wrapToolStepOutput(output: unknown, ui: readonly AgentUiComponent[], text?: string): unknown;
350
427
  /** Carry domain refusal across a remote step without losing its type in error serialization. */
@@ -2565,6 +2642,11 @@ declare class ToolRegistry {
2565
2642
  * silently take a tool away from whoever does.
2566
2643
  */
2567
2644
  unregister(name: string): boolean;
2645
+ /**
2646
+ * How a streamed call of `name` is previewed while its input arrives (`ToolHandler.previewInput`),
2647
+ * or `undefined`. A preview that fails to build is no preview: it never fails the turn.
2648
+ */
2649
+ previewInput(name: string, scope: ToolInputPreviewScope): Promise<ToolInputPreview | undefined>;
2568
2650
  spec(name: string): ToolSpec | undefined;
2569
2651
  allSpecs(): ToolSpec[];
2570
2652
  /**
@@ -2590,6 +2672,9 @@ declare class ToolRegistry {
2590
2672
  * Run a tool. Re-checks that the tool is enabled and that the role allows it (defense-in-depth —
2591
2673
  * a call can reach here from a replayed durable step or an approval granted before the flag
2592
2674
  * moved, neither of which went through `definitionsFor` again) and re-parses the input via Zod.
2675
+ * A tool whose `describe()` answers `available: false` for the call's scope (actor, thread, agent,
2676
+ * `uiCapabilities`) is refused with {@link ToolNotFoundError}, as the unknown tool it was to the
2677
+ * model.
2593
2678
  */
2594
2679
  invoke(name: string, input: unknown, ctx: AiToolCtx, policy: RolesPolicy, options?: InvokeOptions): Promise<unknown>;
2595
2680
  /** Authorize and validate without executing. The caller journals this result before approval. */
@@ -3061,6 +3146,18 @@ interface AgentLoopHooks {
3061
3146
  * a parked run is the runner's job, through whatever hard cancel its runtime has.
3062
3147
  */
3063
3148
  cancelled?(): Promise<boolean>;
3149
+ /**
3150
+ * Aborted when someone stops this run. Handed to the model call (`ModelTurnArgs.abortSignal`, the
3151
+ * AI SDK's `abortSignal`) and to each tool (`AiToolCtx.abortSignal`), so a Stop cuts short what the
3152
+ * run is waiting on instead of letting it run to the end of the step. A model call that returns or
3153
+ * fails once the signal is aborted unwinds the turn with {@link RunCancelledError} before anything
3154
+ * of that step is persisted; a tool that honours it settles failed, and the turn stops at its next
3155
+ * safe point ({@link cancelled}).
3156
+ *
3157
+ * Only for a runner that records NO positions (the inline runner): the abort is observed live,
3158
+ * outside any checkpoint, so a runner that replays a journal must leave it undefined.
3159
+ */
3160
+ abortSignal?: AbortSignal;
3064
3161
  /**
3065
3162
  * Does this run take the loop shape guarded by `id`? A runner replaying against recorded
3066
3163
  * checkpoints answers `false` for a run that started before the shape changed, so that run keeps
@@ -3466,6 +3563,12 @@ declare class InMemoryActionProposalStore implements ActionProposalStore, Action
3466
3563
  getActionProposal(scope: ActionProposalScope, id: string): Promise<ActionProposal | null>;
3467
3564
  listActionProposals(scope: ActionProposalScope, query?: ListActionProposals): Promise<ActionProposal[]>;
3468
3565
  private mutate;
3566
+ /**
3567
+ * Called after every proposal transition, with the row before and after — synchronously, so no
3568
+ * reader sees one without the other. {@link InMemoryAgentStore} settles the proposal's tool-call
3569
+ * record here (see `toolCallUpdateForTransition`).
3570
+ */
3571
+ protected proposalChanged(_previous: ActionProposal, _next: ActionProposal): void;
3469
3572
  decideActionProposal(scope: ActionProposalScope, id: string, command: ActionProposalDecisionCommand): Promise<ActionProposalMutationResult>;
3470
3573
  claimActionProposal(scope: ActionProposalScope, id: string, command: ClaimActionProposal): Promise<ActionProposalMutationResult>;
3471
3574
  extendActionProposalLease(scope: ActionProposalScope, id: string, command: ExtendActionProposalLease): Promise<ActionProposalMutationResult>;
@@ -3659,6 +3762,9 @@ declare class InMemoryAgentStore extends InMemoryActionProposalStore implements
3659
3762
  toolCallOutcomes(toolCallIds: readonly string[]): Promise<ToolCallOutcome[]>;
3660
3763
  failUnsettledToolCalls(runId: string, error: string): Promise<number>;
3661
3764
  updateToolCall(input: UpdateToolCallInput): Promise<void>;
3765
+ /** An independent proposal moved: its `proposed` tool-call record follows it. */
3766
+ protected proposalChanged(previous: ActionProposal, next: ActionProposal): void;
3767
+ private applyToolCallUpdate;
3662
3768
  recordUsage(input: RecordUsageInput): Promise<void>;
3663
3769
  quotaToday(actorRef: string, day: string): Promise<{
3664
3770
  usedTokens: number;
@@ -4283,6 +4389,21 @@ declare function parseTextActionProposalCommand(text: string, vocabulary?: TextA
4283
4389
  */
4284
4390
  declare const ptBrActionProposalText: Required<TextActionProposalConfig>;
4285
4391
 
4392
+ /**
4393
+ * The tool-call record an independent proposal's state settles, or `null` while it has nothing to
4394
+ * say yet (pending, or approved and not yet run).
4395
+ *
4396
+ * In `actionApprovalMode: 'independent'` the turn records the call as `proposed` and ends; the
4397
+ * proposal row then carries the decision and the execution. Every store applies this on each
4398
+ * proposal transition — in the same write where it can — so the call's own record (what the
4399
+ * dashboard, the run detail and a host's audit read) follows the proposal: `executed` with its
4400
+ * output, `failed` with its error, `rejected`, or `expired` (a lapsed proposal, or one a newer
4401
+ * proposal superseded; the tool never ran either way).
4402
+ */
4403
+ declare function toolCallUpdateForProposal(proposal: ActionProposal): UpdateToolCallInput | null;
4404
+ /** The update a transition from `previous` to `next` calls for: `null` when the call's status stays. */
4405
+ declare function toolCallUpdateForTransition(previous: ActionProposal | undefined, next: ActionProposal): UpdateToolCallInput | null;
4406
+
4286
4407
  interface ActionProposalExecutionDeps {
4287
4408
  registry: ToolRegistry;
4288
4409
  rolesPolicy: RolesPolicy;
@@ -4356,4 +4477,4 @@ declare function createFunctionalTool<I, O>(definition: FunctionalToolDefinition
4356
4477
  /** Presentation failures must never cause a successful side effect to be retried. */
4357
4478
  declare function emitToolPresentations<I, O>(handler: ToolHandler<I, O>, output: O, ctx: AiToolCtx, toolName: string): Promise<void>;
4358
4479
 
4359
- export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_CHANNEL_STORE, AGENT_CONFIRM_TOKEN_STORE, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_MODEL_CATALOG, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_PROVIDER, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, type ActionApprovalMode, ActionProposal, ActionProposalDecision, ActionProposalDecisionCommand, type ActionProposalDiscoveryIndexStore, ActionProposalExecution, type ActionProposalExecutionDeps, type ActionProposalExecutionResult, ActionProposalExecutor, type ActionProposalExecutorOptions, ActionProposalMutationResult, type ActionProposalMutationView, ActionProposalOutcome, ActionProposalOutcomeDelivery, ActionProposalOutcomeLease, ActionProposalOutcomeStore, type ActionProposalReceipt, type ActionProposalRuntimeStore, ActionProposalScope, ActionProposalStore, ActionProposalStoreOptions, ActionProposalSupersessionStore, type ActionProposalTarget, type ActionProposalView, ActionProposalWorker, type ActionProposalWorkerOptions, type ActionProposalWorkerStore, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStartOptions, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, AppendMessageInput, ApprovalPolicy, type ApprovalWhere, type AttachmentRef, type AttachmentStagingDescription, type AttachmentStagingStore, type BackgroundActorResolver, type BufferedModelTurnResult, type BuildMemoryBlockInput, CONFIRM_JSON_SCHEMA_PROPERTIES, type ChannelStore, ChatQueueStore, ClaimActionProposal, ClosedRolesPolicy, type ConfirmFields, type ConfirmTokenClaim, ConfirmTokenError, type ConfirmTokenStore, type ConfirmTokenSubject, type ConfirmedTool, type ConfirmedToolDone, type ConfirmedToolMessages, type ConfirmedToolOptions, type ConfirmedToolOutcome, type ConfirmedToolPreview, type ConfirmedToolResult, type ConfirmedToolSteps, type CostUsage, CreateActionProposal, CreateActionProposalResult, CreateThreadInput, type CurrentModelPrice, DEFAULT_CONFIRM_TTL_MS, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, DEFAULT_TEXT_ACTION_PROPOSAL_REPLIES, DEFAULT_TEXT_ACTION_PROPOSAL_VOCABULARY, Decision, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type EmptyRoles, EnqueueMessageInput, ExtendActionProposalLease, type ForgetMemoryInput, type FrameBuffer, type FunctionalTool, type FunctionalToolDefinition, GLOBAL_SCOPE, type GovernanceMessageRow, type GovernancePage, type GovernancePageQuery, type GovernancePendingApprovalRow, type GovernanceRange, type GovernanceRunDetail, type GovernanceRunRow, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceThreadRow, type GovernanceToolCallRow, type GovernanceUsageInput, type GovernanceUsageRow, HistoryPolicy, HumanReply, InMemoryActionProposalStore, InMemoryAgentStore, InMemoryChannelStore, InMemoryConfirmTokenStore, type IncrementalGate, InputProcessor, type InvokeOptions, ListActionProposals, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageFeedback, MessageUsage, ModelAnswer, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogLock, type ModelCatalogProviderGroup, type ModelCatalogQuery, type ModelCatalogView, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type NegotiatedUiCollector, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, Persona, type PersonaAlias, PersonaCatalogEntry, type PrepareOptions, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QueuePause, QueuedMessage, QueuedMessagePatch, type QuotaBlock, QuotaExceededError, type QuotaPeriod, type QuotaProvider, type QuotaQuery, type QuotaReport, QuotaState, type QuotaStore, type QuotaWarning, type QuotaWindow, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, RUN_FAILED_MESSAGE, RUN_NOT_ACTIVE_CODE, RUN_NOT_ACTIVE_MESSAGE, RUN_NO_LONGER_RUNNING, type RecentRunRow, RecordRunStartInput, RecordToolCallInput, RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolveToolUiCatalog, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RolesPolicyOptions, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SCHEMA_EXTENSION, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type SchemaExtension, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, SettleActionProposal, type SettleDeadRunInput, type SettledTask, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, SqlTokenStreamSink, type SqlTokenStreamSinkOptions, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StreamFrameRow, type StreamFrameTable, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type TextActionProposalCandidate, type TextActionProposalCommand, type TextActionProposalConfig, type TextActionProposalReplies, type TextActionProposalResolution, type TextActionProposalVocabulary, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApprovalState, ToolCallOutcome, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolConfirmation, ToolDefinition, ToolDescribeScope, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputDriftError, ToolInputInvalidError, type ToolKindDeps, ToolNotFoundError, ToolPreflightDeniedError, ToolPreflightResult, type ToolPreparationResult, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, UpdateThreadInput, UpdateToolCallInput, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actionProposalCreationMatches, actionProposalOutcomeFenceValid, actionProposalOutcomeScope, actionProposalOutcomeText, actionProposalReceipt, actionProposalScopeMatches, actorScope, agentDiagnosticKey, agentFailureCode, assertIndependentActionCapabilities, attachActionProposalOutcome, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, canonicalActionProposalJson, canonicalJson, claimActionProposalOutcome, closeEmptyRoles, compositeSkillProvider, confirmTokenExpiry, createFrameBuffer, createFunctionalTool, createIncrementalGate, createNegotiatedUiCollector, createNoopEmitUi, createUiCollector, dayBoundsUtc, defaultScopeResolver, defineConfirmedTool, detachedDelivered, detachedStarted, detachedUnsettled, emitToolPresentations, escapeUnsafeToolUiText, estimateCost, estimateMessageTokens, exhaustedWindow, exposeStreamErrorDetails, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, findCatalogModel, findPersona, gateFollowUps, gateTail, hashConfirmToken, initialActionProposal, intersectAllowLists, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, parseTextActionProposalCommand, personaCatalogEntry, prepareActionProposal, ptBrActionProposalText, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, quotaPeriodRange, quotaUsedRatio, quotaWarning, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolvePersonaAlias, resolveSkillCatalog, resolveTextActionProposalDecision, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, schemaExtensionOf, seedModelPrices, settleAll, settleDeadRun, settleUnsettledDelegation, signConfirmToken, skillInputSchema, skillToolDefinition, skillWriteVerdict, snapshotActionProposal, stampToolKinds, staticModelCatalog, staticSkillProvider, streamFailure, summarizeWithModel, tenantScope, textActionProposalReply, toActionProposalMutationView, toActionProposalView, toolCallContext, traceLlmTurn, traceToolExecution, transitionActionProposalClaim, transitionActionProposalDecision, transitionActionProposalLease, transitionActionProposalSettlement, transitionActionProposalSupersession, truncateDetailContent, unwrapToolStepOutput, validateActionProposalCreation, validateActionProposalDiscoveryIndexBatch, validateActionProposalExpiryBatch, validateActionProposalListQuery, validateActionProposalWorkerClaim, validateStructured, verifyConfirmToken, windowHistory, withAskTool, withConfirmFields, withMemoryTool, withSelectedModel, withSkillTool, withToolTimeout, withTurnFrames, wrapToolPreflightDenied, wrapToolStepOutput, writeMemory };
4480
+ export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_CHANNEL_STORE, AGENT_CONFIRM_TOKEN_STORE, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_MODEL_CATALOG, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_PROVIDER, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, type ActionApprovalMode, ActionProposal, ActionProposalDecision, ActionProposalDecisionCommand, type ActionProposalDiscoveryIndexStore, ActionProposalExecution, type ActionProposalExecutionDeps, type ActionProposalExecutionResult, ActionProposalExecutor, type ActionProposalExecutorOptions, ActionProposalMutationResult, type ActionProposalMutationView, ActionProposalOutcome, ActionProposalOutcomeDelivery, ActionProposalOutcomeLease, ActionProposalOutcomeStore, type ActionProposalReceipt, type ActionProposalRuntimeStore, ActionProposalScope, ActionProposalStore, ActionProposalStoreOptions, ActionProposalSupersessionStore, type ActionProposalTarget, type ActionProposalView, ActionProposalWorker, type ActionProposalWorkerOptions, type ActionProposalWorkerStore, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStartOptions, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, AppendMessageInput, ApprovalPolicy, type ApprovalWhere, type AttachmentRef, type AttachmentStagingDescription, type AttachmentStagingStore, type BackgroundActorResolver, type BufferedModelTurnResult, type BuildMemoryBlockInput, CONFIRM_JSON_SCHEMA_PROPERTIES, type ChannelStore, ChatQueueStore, ClaimActionProposal, ClosedRolesPolicy, type ConfirmFields, type ConfirmTokenClaim, ConfirmTokenError, type ConfirmTokenStore, type ConfirmTokenSubject, type ConfirmedTool, type ConfirmedToolDone, type ConfirmedToolMessages, type ConfirmedToolOptions, type ConfirmedToolOutcome, type ConfirmedToolPreview, type ConfirmedToolResult, type ConfirmedToolSteps, type CostUsage, CreateActionProposal, CreateActionProposalResult, CreateThreadInput, type CurrentModelPrice, DEFAULT_CONFIRM_TTL_MS, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_PREVIEW_THROTTLE_MS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, DEFAULT_TEXT_ACTION_PROPOSAL_REPLIES, DEFAULT_TEXT_ACTION_PROPOSAL_VOCABULARY, Decision, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type EmptyRoles, EnqueueMessageInput, ExtendActionProposalLease, type ForgetMemoryInput, type FrameBuffer, type FunctionalTool, type FunctionalToolDefinition, GLOBAL_SCOPE, type GovernanceMessageRow, type GovernancePage, type GovernancePageQuery, type GovernancePendingApprovalRow, type GovernanceRange, type GovernanceRunDetail, type GovernanceRunRow, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceThreadRow, type GovernanceToolCallRow, type GovernanceUsageInput, type GovernanceUsageRow, HistoryPolicy, HumanReply, InMemoryActionProposalStore, InMemoryAgentStore, InMemoryChannelStore, InMemoryConfirmTokenStore, type IncrementalGate, InputProcessor, type InvokeOptions, ListActionProposals, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageFeedback, MessageUsage, ModelAnswer, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogLock, type ModelCatalogProviderGroup, type ModelCatalogQuery, type ModelCatalogView, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type NegotiatedUiCollector, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type PartialJson, type Passage, type PendingApprovalRow, Persona, type PersonaAlias, PersonaCatalogEntry, type PrepareOptions, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QueuePause, QueuedMessage, QueuedMessagePatch, type QuotaBlock, QuotaExceededError, type QuotaPeriod, type QuotaProvider, type QuotaQuery, type QuotaReport, QuotaState, type QuotaStore, type QuotaWarning, type QuotaWindow, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, RUN_FAILED_MESSAGE, RUN_NOT_ACTIVE_CODE, RUN_NOT_ACTIVE_MESSAGE, RUN_NO_LONGER_RUNNING, type RecentRunRow, RecordRunStartInput, RecordToolCallInput, RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolveToolUiCatalog, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RolesPolicyOptions, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SCHEMA_EXTENSION, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type SchemaExtension, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, SettleActionProposal, type SettleDeadRunInput, type SettledTask, type ShownToolInputPreview, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, SqlTokenStreamSink, type SqlTokenStreamSinkOptions, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StreamFrameRow, type StreamFrameTable, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type TextActionProposalCandidate, type TextActionProposalCommand, type TextActionProposalConfig, type TextActionProposalReplies, type TextActionProposalResolution, type TextActionProposalVocabulary, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApprovalState, ToolCallOutcome, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolConfirmation, ToolDefinition, ToolDescribeScope, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputDriftError, ToolInputInvalidError, ToolInputPreview, ToolInputPreviewScope, type ToolInputPreviews, type ToolKindDeps, ToolNotFoundError, ToolPreflightDeniedError, ToolPreflightResult, type ToolPreparationResult, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, UpdateThreadInput, UpdateToolCallInput, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actionProposalCreationMatches, actionProposalOutcomeFenceValid, actionProposalOutcomeScope, actionProposalOutcomeText, actionProposalReceipt, actionProposalScopeMatches, actorScope, agentDiagnosticKey, agentFailureCode, assertIndependentActionCapabilities, attachActionProposalOutcome, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, canonicalActionProposalJson, canonicalJson, claimActionProposalOutcome, closeEmptyRoles, compositeSkillProvider, confirmTokenExpiry, createFrameBuffer, createFunctionalTool, createIncrementalGate, createNegotiatedUiCollector, createNoopEmitUi, createUiCollector, dayBoundsUtc, defaultScopeResolver, defineConfirmedTool, detachedDelivered, detachedStarted, detachedUnsettled, emitToolPresentations, escapeUnsafeToolUiText, estimateCost, estimateMessageTokens, exhaustedWindow, exposeStreamErrorDetails, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, findCatalogModel, findPersona, gateFollowUps, gateTail, hashConfirmToken, initialActionProposal, intersectAllowLists, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, parsePartialJson, parseTextActionProposalCommand, personaCatalogEntry, prepareActionProposal, previewToolInputs, previewUiId, ptBrActionProposalText, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, quotaPeriodRange, quotaUsedRatio, quotaWarning, registryInputPreviews, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolvePersonaAlias, resolveSkillCatalog, resolveTextActionProposalDecision, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, schemaExtensionOf, seedModelPrices, settleAll, settleDeadRun, settleUnsettledDelegation, signConfirmToken, skillInputSchema, skillToolDefinition, skillWriteVerdict, snapshotActionProposal, stampToolKinds, staticModelCatalog, staticSkillProvider, streamFailure, summarizeWithModel, tenantScope, textActionProposalReply, toActionProposalMutationView, toActionProposalView, toolCallContext, toolCallUpdateForProposal, toolCallUpdateForTransition, traceLlmTurn, traceToolExecution, transitionActionProposalClaim, transitionActionProposalDecision, transitionActionProposalLease, transitionActionProposalSettlement, transitionActionProposalSupersession, truncateDetailContent, unwrapToolStepOutput, validateActionProposalCreation, validateActionProposalDiscoveryIndexBatch, validateActionProposalExpiryBatch, validateActionProposalListQuery, validateActionProposalWorkerClaim, validateStructured, verifyConfirmToken, windowHistory, withAskTool, withConfirmFields, withMemoryTool, withSelectedModel, withSkillTool, withToolTimeout, withTurnFrames, withdrawPreviewEvent, wrapToolPreflightDenied, wrapToolStepOutput, writeMemory };