@dudousxd/nestjs-agent-core 0.35.0 → 0.37.0
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.cjs +369 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +290 -3
- package/dist/index.d.ts +290 -3
- package/dist/index.js +353 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,12 @@ declare const AGENT_MEMORY: unique symbol;
|
|
|
82
82
|
* lazily by the bound {@link AGENT_SKILLS} provider — discovery runs after DI has built it.
|
|
83
83
|
*/
|
|
84
84
|
declare const AGENT_SKILL_SOURCES: unique symbol;
|
|
85
|
+
/**
|
|
86
|
+
* The `ConfirmTokenStore` that makes a `defineConfirmedTool` confirmation single use. Bound by the
|
|
87
|
+
* store modules (`DrizzleAgentStoreModule`, `MikroOrmAgentStoreModule`); inject it into the factory
|
|
88
|
+
* that builds the tool (`provideAgentTool(factory, [AGENT_CONFIRM_TOKEN_STORE])`).
|
|
89
|
+
*/
|
|
90
|
+
declare const AGENT_CONFIRM_TOKEN_STORE: unique symbol;
|
|
85
91
|
|
|
86
92
|
/**
|
|
87
93
|
* The "data plane": live token transport, decoupled from the durable control plane.
|
|
@@ -2572,10 +2578,44 @@ declare class ToolRegistry {
|
|
|
2572
2578
|
* tools still park on approval either way.
|
|
2573
2579
|
*/
|
|
2574
2580
|
declare class DefaultRolesPolicy implements RolesPolicy {
|
|
2575
|
-
|
|
2576
|
-
|
|
2581
|
+
readonly defaultRoles: string[];
|
|
2582
|
+
/** What an empty roles list means here — see {@link EmptyRoles}. */
|
|
2583
|
+
readonly emptyRoles: EmptyRoles;
|
|
2584
|
+
constructor(defaultRoles?: string[], options?: RolesPolicyOptions);
|
|
2577
2585
|
can(actor: Actor, tool: ToolSpec): boolean;
|
|
2578
2586
|
}
|
|
2587
|
+
/**
|
|
2588
|
+
* What an empty roles list means to {@link DefaultRolesPolicy}: `'allow'` (the default) — no
|
|
2589
|
+
* restriction; `'deny'` — nobody.
|
|
2590
|
+
*
|
|
2591
|
+
* The open default is what makes a one-line `AgentModule.forRoot({ model })` a working chat. It is
|
|
2592
|
+
* also why an app that used `[]` to DENY — a `roles` computed from permissions that can come out
|
|
2593
|
+
* empty, `defaultRoles: []` on a multi-tenant MCP surface — reaches everyone instead, silently.
|
|
2594
|
+
* `'deny'` keeps such an app closed.
|
|
2595
|
+
*/
|
|
2596
|
+
type EmptyRoles = 'allow' | 'deny';
|
|
2597
|
+
interface RolesPolicyOptions {
|
|
2598
|
+
/** What an empty roles list means. Default `'allow'`. */
|
|
2599
|
+
emptyRoles?: EmptyRoles;
|
|
2600
|
+
}
|
|
2601
|
+
/**
|
|
2602
|
+
* The closed gate — {@link DefaultRolesPolicy} with `emptyRoles: 'deny'`: the actor needs a role the
|
|
2603
|
+
* tool declares (else one of the default roles). A tool with no `roles` and no default roles, or with
|
|
2604
|
+
* an explicitly empty list, reaches nobody. What `AgentModule.forRoot({ emptyRoles: 'deny' })` binds.
|
|
2605
|
+
*/
|
|
2606
|
+
declare class ClosedRolesPolicy extends DefaultRolesPolicy {
|
|
2607
|
+
constructor(defaultRoles?: string[]);
|
|
2608
|
+
}
|
|
2609
|
+
/**
|
|
2610
|
+
* Close a policy you did not build: a tool whose roles come out empty — declared `[]`, or undeclared
|
|
2611
|
+
* with no default roles to fall back on — reaches nobody; anything else is the inner policy's call.
|
|
2612
|
+
*
|
|
2613
|
+
* The default roles are read off a {@link DefaultRolesPolicy}; any other inner policy keeps its own
|
|
2614
|
+
* defaults to itself, so for it an undeclared list counts as empty. A tool gated by `ability` has
|
|
2615
|
+
* nothing to do with roles and is always left to the inner policy. What the MCP server's
|
|
2616
|
+
* `emptyRoles: 'deny'` wraps the agent's shared policy in.
|
|
2617
|
+
*/
|
|
2618
|
+
declare function closeEmptyRoles(inner: RolesPolicy): RolesPolicy;
|
|
2579
2619
|
|
|
2580
2620
|
interface AgentLoopDeps<TOutput = unknown> {
|
|
2581
2621
|
model: ModelProvider;
|
|
@@ -3528,4 +3568,251 @@ declare class InMemoryAgentStore implements AgentStore, ChatQueueStore {
|
|
|
3528
3568
|
private toSummary;
|
|
3529
3569
|
}
|
|
3530
3570
|
|
|
3531
|
-
|
|
3571
|
+
/** One confirmation being spent — what {@link ConfirmTokenStore.claim} records. */
|
|
3572
|
+
interface ConfirmTokenClaim {
|
|
3573
|
+
/** SHA-256 (hex) of the token. The token itself is never stored. */
|
|
3574
|
+
hash: string;
|
|
3575
|
+
/** `ctx.actor.id` of the confirming actor. */
|
|
3576
|
+
actorRef: string;
|
|
3577
|
+
/** The tool the token was issued for. */
|
|
3578
|
+
tool: string;
|
|
3579
|
+
/** Epoch-ms the token stops being valid — after it the mark is dead weight and can be purged. */
|
|
3580
|
+
expiresAt: number;
|
|
3581
|
+
}
|
|
3582
|
+
/**
|
|
3583
|
+
* Makes a confirm token single use (see `defineConfirmedTool`). A signed token is stateless, so on
|
|
3584
|
+
* its own it stays valid until it expires: a double tap, a network retry or a model repeating the
|
|
3585
|
+
* call would commit twice inside that window. The store remembers which tokens were spent.
|
|
3586
|
+
*
|
|
3587
|
+
* Only the token's hash, the actor and the tool name are kept — never an argument or a value.
|
|
3588
|
+
*/
|
|
3589
|
+
interface ConfirmTokenStore {
|
|
3590
|
+
/**
|
|
3591
|
+
* Spend the token. `true` = this caller holds it and may commit; `false` = it was already spent.
|
|
3592
|
+
* MUST be atomic: of two concurrent claims for one hash, exactly one gets `true`.
|
|
3593
|
+
*/
|
|
3594
|
+
claim(input: ConfirmTokenClaim): Promise<boolean>;
|
|
3595
|
+
/** Give the token back — the commit failed after the claim, so the caller may try again. */
|
|
3596
|
+
release(hash: string): Promise<void>;
|
|
3597
|
+
/** Drop the marks of tokens that expired before `now` (epoch-ms, default the clock). Returns how many. */
|
|
3598
|
+
purgeExpired?(now?: number): Promise<number>;
|
|
3599
|
+
}
|
|
3600
|
+
|
|
3601
|
+
/** How long a preview stays confirmable unless the tool says otherwise. */
|
|
3602
|
+
declare const DEFAULT_CONFIRM_TTL_MS: number;
|
|
3603
|
+
/** What a confirm token is bound to. Change any of it and the token stops matching. */
|
|
3604
|
+
interface ConfirmTokenSubject {
|
|
3605
|
+
/** The tool's name. */
|
|
3606
|
+
tool: string;
|
|
3607
|
+
/** `ctx.actor.id`. */
|
|
3608
|
+
actorId: string;
|
|
3609
|
+
/** `ctx.actor.tenantRef`; absent and `''` sign the same. */
|
|
3610
|
+
tenantRef?: string;
|
|
3611
|
+
/** The call's arguments, WITHOUT `confirm` / `confirmToken`. */
|
|
3612
|
+
args: unknown;
|
|
3613
|
+
}
|
|
3614
|
+
/**
|
|
3615
|
+
* JSON with object keys sorted at every depth, so two argument objects that differ only in key
|
|
3616
|
+
* order produce the same text. `undefined` properties are dropped (as `JSON.stringify` does); a
|
|
3617
|
+
* bare `undefined` and an `undefined` array element are `null`.
|
|
3618
|
+
*/
|
|
3619
|
+
declare function canonicalJson(value: unknown): string;
|
|
3620
|
+
/**
|
|
3621
|
+
* Issue a confirm token: `<expiresAt>.<signature>`, an HMAC-SHA256 (keyed by `secret`) over the tool,
|
|
3622
|
+
* the actor, the tenant, the expiry and the canonical arguments. Stateless — nothing is stored — and
|
|
3623
|
+
* useless for another actor, tenant, tool or argument, or after `expiresAt` (epoch-ms).
|
|
3624
|
+
*/
|
|
3625
|
+
declare function signConfirmToken(subject: ConfirmTokenSubject, options: {
|
|
3626
|
+
secret: string;
|
|
3627
|
+
expiresAt: number;
|
|
3628
|
+
}): string;
|
|
3629
|
+
/** The expiry (epoch-ms) a token carries, or `undefined` for a malformed one. Not a verification. */
|
|
3630
|
+
declare function confirmTokenExpiry(token: string): number | undefined;
|
|
3631
|
+
/** Was this token issued for exactly this subject, with this secret, and is it still valid at `now`? */
|
|
3632
|
+
declare function verifyConfirmToken(token: string | null | undefined, subject: ConfirmTokenSubject, options: {
|
|
3633
|
+
secret: string;
|
|
3634
|
+
now?: number;
|
|
3635
|
+
}): boolean;
|
|
3636
|
+
/** SHA-256 (hex) of a token — what a {@link ConfirmTokenStore} keys on, so the token is never stored. */
|
|
3637
|
+
declare function hashConfirmToken(token: string): string;
|
|
3638
|
+
/**
|
|
3639
|
+
* A single-process {@link ConfirmTokenStore}: tests, scripts, and a deployment that runs ONE replica.
|
|
3640
|
+
* With more than one, a token spent on replica A is still fresh on replica B — use the Drizzle or
|
|
3641
|
+
* MikroORM store (`AGENT_CONFIRM_TOKEN_STORE`, bound by their modules).
|
|
3642
|
+
* Expired marks are dropped lazily, on the next claim.
|
|
3643
|
+
*/
|
|
3644
|
+
declare class InMemoryConfirmTokenStore implements ConfirmTokenStore {
|
|
3645
|
+
private readonly claims;
|
|
3646
|
+
claim(input: ConfirmTokenClaim): Promise<boolean>;
|
|
3647
|
+
release(hash: string): Promise<void>;
|
|
3648
|
+
purgeExpired(now?: number): Promise<number>;
|
|
3649
|
+
/** How many tokens are currently marked as spent. */
|
|
3650
|
+
get size(): number;
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
/** The two fields {@link defineConfirmedTool} adds to a tool's input. */
|
|
3654
|
+
interface ConfirmFields {
|
|
3655
|
+
/** `true` to commit; absent (or `false`) to preview. */
|
|
3656
|
+
confirm?: boolean;
|
|
3657
|
+
/** The `confirmToken` the preview returned. */
|
|
3658
|
+
confirmToken?: string;
|
|
3659
|
+
}
|
|
3660
|
+
/** The words a confirmed tool says to the model. Each has an English default. */
|
|
3661
|
+
interface ConfirmedToolMessages {
|
|
3662
|
+
/** Sent with every preview: how to confirm. `{minutes}` is replaced with the token's lifetime. */
|
|
3663
|
+
confirm?: string;
|
|
3664
|
+
/** Thrown for a missing, tampered, mismatched or expired token. */
|
|
3665
|
+
invalid?: string;
|
|
3666
|
+
/** Thrown for a token that already committed. */
|
|
3667
|
+
used?: string;
|
|
3668
|
+
}
|
|
3669
|
+
/** Thrown by a confirmed tool that refused a confirmation. Nothing was written. */
|
|
3670
|
+
declare class ConfirmTokenError extends Error {
|
|
3671
|
+
/** `invalid`: missing, tampered, mismatched or expired. `used`: it already committed once. */
|
|
3672
|
+
readonly reason: 'invalid' | 'used';
|
|
3673
|
+
constructor(
|
|
3674
|
+
/** `invalid`: missing, tampered, mismatched or expired. `used`: it already committed once. */
|
|
3675
|
+
reason: 'invalid' | 'used', message: string);
|
|
3676
|
+
}
|
|
3677
|
+
/** What {@link defineConfirmedTool} takes: the usual spec fields (no `kind`), plus the gate's own. */
|
|
3678
|
+
interface ConfirmedToolOptions extends Omit<ToolSpec, 'kind' | 'inputSchema' | 'targetAgent' | 'detached' | 'terminal'> {
|
|
3679
|
+
/** The app's own input schema. `confirm` / `confirmToken` are added by {@link withConfirmFields}. */
|
|
3680
|
+
input: StandardSchemaV1;
|
|
3681
|
+
/**
|
|
3682
|
+
* The HMAC key the tokens are signed with — the app's secret (`ConfigService.getOrThrow(...)`), or
|
|
3683
|
+
* one of its own. A function is read on every call. Required: there is no default, and an empty
|
|
3684
|
+
* one throws.
|
|
3685
|
+
*/
|
|
3686
|
+
secret: string | (() => string);
|
|
3687
|
+
/** How long a preview stays confirmable. Default 15 minutes. */
|
|
3688
|
+
ttlMs?: number;
|
|
3689
|
+
/**
|
|
3690
|
+
* Makes a token single use. WITHOUT a store a token commits as many times as it is sent until it
|
|
3691
|
+
* expires — a retry or a repeated call writes twice. The store modules bind one to
|
|
3692
|
+
* `AGENT_CONFIRM_TOKEN_STORE`; `InMemoryConfirmTokenStore` is for one replica.
|
|
3693
|
+
*/
|
|
3694
|
+
store?: ConfirmTokenStore;
|
|
3695
|
+
messages?: ConfirmedToolMessages;
|
|
3696
|
+
}
|
|
3697
|
+
/** What a step reports: a sentence for the model to relay, and the structured detail behind it. */
|
|
3698
|
+
interface ConfirmedToolOutcome {
|
|
3699
|
+
summary: string;
|
|
3700
|
+
data?: unknown;
|
|
3701
|
+
}
|
|
3702
|
+
/** The three steps of a confirmed write. */
|
|
3703
|
+
interface ConfirmedToolSteps<Args, Prepared> {
|
|
3704
|
+
/**
|
|
3705
|
+
* Resolve and validate everything the write needs, applying the SAME rules the commit relies on.
|
|
3706
|
+
* Throw to refuse. Writes nothing. Runs for the preview AND again for the confirmation — state may
|
|
3707
|
+
* have changed in between — and a refusal here does not spend the token.
|
|
3708
|
+
*/
|
|
3709
|
+
prepare(args: Args, ctx: AiToolCtx): Promise<Prepared> | Prepared;
|
|
3710
|
+
/** What is about to happen. Writes nothing. */
|
|
3711
|
+
preview(prepared: Prepared, ctx: AiToolCtx): Promise<ConfirmedToolOutcome> | ConfirmedToolOutcome;
|
|
3712
|
+
/** Write, and say what was written. A throw gives the token back. */
|
|
3713
|
+
commit(prepared: Prepared, ctx: AiToolCtx): Promise<ConfirmedToolOutcome> | ConfirmedToolOutcome;
|
|
3714
|
+
}
|
|
3715
|
+
/** A confirmed tool's answer to a call without `confirm`. */
|
|
3716
|
+
interface ConfirmedToolPreview {
|
|
3717
|
+
status: 'preview';
|
|
3718
|
+
summary: string;
|
|
3719
|
+
data?: unknown;
|
|
3720
|
+
confirmToken: string;
|
|
3721
|
+
/** ISO-8601 instant the token stops working. */
|
|
3722
|
+
expiresAt: string;
|
|
3723
|
+
/** Instructions for the model: show the preview, then call again with the token. */
|
|
3724
|
+
confirm: string;
|
|
3725
|
+
}
|
|
3726
|
+
/** A confirmed tool's answer to a confirmation that committed. */
|
|
3727
|
+
interface ConfirmedToolDone {
|
|
3728
|
+
status: 'done';
|
|
3729
|
+
summary: string;
|
|
3730
|
+
data?: unknown;
|
|
3731
|
+
}
|
|
3732
|
+
type ConfirmedToolResult = ConfirmedToolPreview | ConfirmedToolDone;
|
|
3733
|
+
/** The JSON Schema of {@link ConfirmFields}, merged into the schema the model is shown. */
|
|
3734
|
+
declare const CONFIRM_JSON_SCHEMA_PROPERTIES: {
|
|
3735
|
+
readonly confirm: {
|
|
3736
|
+
readonly type: "boolean";
|
|
3737
|
+
readonly description: "Omit to get a preview (nothing is written). Send true, with confirmToken, to commit.";
|
|
3738
|
+
};
|
|
3739
|
+
readonly confirmToken: {
|
|
3740
|
+
readonly type: "string";
|
|
3741
|
+
readonly description: "The confirmToken the preview returned. Required when confirm is true.";
|
|
3742
|
+
};
|
|
3743
|
+
};
|
|
3744
|
+
/**
|
|
3745
|
+
* Marks a schema that is ANOTHER schema plus a few JSON Schema properties. A converter that knows the
|
|
3746
|
+
* inner schema better than the wrapper can (a Zod 3 schema has no Standard JSON Schema extension, so
|
|
3747
|
+
* only the AI SDK's or the MCP SDK's own converter can describe it) converts `base` and adds
|
|
3748
|
+
* `properties`. `@dudousxd/nestjs-agent-ai-sdk` and `-mcp-server` both read it.
|
|
3749
|
+
*/
|
|
3750
|
+
declare const SCHEMA_EXTENSION: unique symbol;
|
|
3751
|
+
interface SchemaExtension {
|
|
3752
|
+
base: StandardSchemaV1;
|
|
3753
|
+
properties: Record<string, unknown>;
|
|
3754
|
+
}
|
|
3755
|
+
/** The {@link SchemaExtension} a schema carries, if any. */
|
|
3756
|
+
declare function schemaExtensionOf(schema: StandardSchemaV1): SchemaExtension | undefined;
|
|
3757
|
+
/**
|
|
3758
|
+
* Wrap a tool's input schema so it also accepts {@link ConfirmFields}, without the app declaring
|
|
3759
|
+
* them. `validate` takes the two fields off, checks them itself, hands the REST to the app's schema
|
|
3760
|
+
* (so a strict schema never sees a key it did not declare) and puts them back on the validated value.
|
|
3761
|
+
*
|
|
3762
|
+
* The wrapper always carries the Standard JSON Schema extension: the app schema's own JSON Schema
|
|
3763
|
+
* plus the two properties. A schema without the extension (Zod 3, a bare Standard Schema) degrades
|
|
3764
|
+
* there to a permissive object that still declares the two fields — but the wrapper also carries a
|
|
3765
|
+
* {@link SchemaExtension}, so the AI SDK adapter and the MCP server convert a Zod 3 schema with their
|
|
3766
|
+
* own converters and show the model its real shape. `validate` stays the authority either way.
|
|
3767
|
+
*/
|
|
3768
|
+
declare function withConfirmFields<Schema extends StandardSchemaV1>(schema: Schema): StandardSchemaV1<StandardSchemaV1.InferInput<Schema> & ConfirmFields, StandardSchemaV1.InferOutput<Schema> & ConfirmFields>;
|
|
3769
|
+
/**
|
|
3770
|
+
* A write with a human gate that lives INSIDE the tool: preview first, commit on confirmation.
|
|
3771
|
+
*
|
|
3772
|
+
* - Called without `confirm`: runs `prepare`, writes nothing, and returns the `preview` with a signed
|
|
3773
|
+
* `confirmToken`.
|
|
3774
|
+
* - Called again with the SAME arguments, `confirm: true` and that token: runs `prepare` again, then
|
|
3775
|
+
* `commit`.
|
|
3776
|
+
*
|
|
3777
|
+
* The token is an HMAC over the tool, `ctx.actor.id`, `ctx.actor.tenantRef`, the expiry and the
|
|
3778
|
+
* canonical arguments, so it cannot be replayed by another actor, in another tenant, on another
|
|
3779
|
+
* tool or with a changed argument. With a `store` it is also single use: it is claimed right before
|
|
3780
|
+
* `commit` (a refusal in `prepare` does not spend it) and released if `commit` throws.
|
|
3781
|
+
*
|
|
3782
|
+
* Registered as `kind: 'read'` on purpose. An `action` parks on the loop's HITL approval, which an
|
|
3783
|
+
* MCP caller cannot answer — `AgentMcpServerModule` keeps `action` tools off the surface, and MCP clients
|
|
3784
|
+
* without elicitation have no other channel. The gate being in the handler is what lets the same
|
|
3785
|
+
* tool serve the chat loop and MCP; the user sees the preview because the model has to relay it to
|
|
3786
|
+
* get a token it can confirm with.
|
|
3787
|
+
*
|
|
3788
|
+
* ```ts
|
|
3789
|
+
* provideAgentTool(
|
|
3790
|
+
* (store: ConfirmTokenStore, config: ConfigService, orders: OrdersService) =>
|
|
3791
|
+
* defineConfirmedTool(
|
|
3792
|
+
* { name: 'refund_order', description: '...', input: z.object({ orderId: z.string() }),
|
|
3793
|
+
* secret: () => config.getOrThrow('CONFIRM_SECRET'), store },
|
|
3794
|
+
* {
|
|
3795
|
+
* prepare: ({ orderId }, ctx) => orders.loadRefundable(orderId, ctx.actor),
|
|
3796
|
+
* preview: (order) => ({ summary: `Refund ${order.total} to ${order.customer}?`, data: order }),
|
|
3797
|
+
* commit: async (order) => ({ summary: 'Refunded.', data: await orders.refund(order) }),
|
|
3798
|
+
* },
|
|
3799
|
+
* ),
|
|
3800
|
+
* [AGENT_CONFIRM_TOKEN_STORE, ConfigService, OrdersService],
|
|
3801
|
+
* );
|
|
3802
|
+
* ```
|
|
3803
|
+
*
|
|
3804
|
+
* `input` is the app's own schema: `confirm` and `confirmToken` are added by
|
|
3805
|
+
* {@link withConfirmFields}, and `prepare` receives the arguments without them.
|
|
3806
|
+
*/
|
|
3807
|
+
declare function defineConfirmedTool<Args = unknown, Prepared = unknown>(options: ConfirmedToolOptions, steps: ConfirmedToolSteps<Args, Prepared>): ConfirmedTool;
|
|
3808
|
+
/**
|
|
3809
|
+
* What {@link defineConfirmedTool} returns: a functional tool (`{ spec, handler }`) — pass it to
|
|
3810
|
+
* `AgentModule.forRoot({ tools })`, or build it in `provideAgentTool(factory, inject)` when it
|
|
3811
|
+
* needs injected services (the confirm-token store, the secret from `ConfigService`).
|
|
3812
|
+
*/
|
|
3813
|
+
interface ConfirmedTool {
|
|
3814
|
+
spec: ToolSpec;
|
|
3815
|
+
handler: ToolHandler;
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3818
|
+
export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, 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, 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, type ApprovalDecisionRef, type ApprovalPolicy, type ApprovalRequirement, type ApprovalThreadRef, type ApprovalToolRef, type ApprovalWhere, type AttachmentRef, type AttachmentStagingDescription, type AttachmentStagingStore, type BufferedModelTurnResult, type BuildMemoryBlockInput, CONFIRM_JSON_SCHEMA_PROPERTIES, ChatQueueStore, 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, 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, Decision, DefaultApprovalPolicy, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type EmptyRoles, EnqueueMessageInput, type ForgetMemoryInput, type FrameBuffer, 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, InMemoryAgentStore, InMemoryConfirmTokenStore, type IncrementalGate, InputProcessor, 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 ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, 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, REQUESTER_APPROVER, 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 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, 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, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApproval, type ToolCallApprovalColumns, ToolCallApprovalState, ToolCallOutcome, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolDefinition, ToolDescribeScope, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputInvalidError, ToolKind, type ToolKindDeps, ToolNotFoundError, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, UpdateThreadInput, UpdateToolCallInput, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actorScope, agentDiagnosticKey, agentFailureCode, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, canonicalJson, closeEmptyRoles, compositeSkillProvider, confirmTokenExpiry, createFrameBuffer, createIncrementalGate, createNoopEmitUi, createUiCollector, dayBoundsUtc, defaultCanDecide, defaultScopeResolver, defineConfirmedTool, detachedDelivered, detachedStarted, detachedUnsettled, estimateCost, estimateMessageTokens, exhaustedWindow, exposeStreamErrorDetails, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, findCatalogModel, gateFollowUps, gateTail, hashConfirmToken, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, mayDecideApproval, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, quotaPeriodRange, quotaUsedRatio, quotaWarning, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolveSkillCatalog, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, schemaExtensionOf, seedModelPrices, settleAll, settleDeadRun, settleUnsettledDelegation, signConfirmToken, skillInputSchema, skillToolDefinition, skillWriteVerdict, stampToolKinds, staticModelCatalog, staticSkillProvider, streamFailure, summarizeWithModel, tenantScope, toolCallApprovalFromRow, toolCallContext, traceLlmTurn, traceToolExecution, truncateDetailContent, unwrapToolStepOutput, validateStructured, verifyConfirmToken, windowHistory, withAskTool, withConfirmFields, withMemoryTool, withSelectedModel, withSkillTool, withToolTimeout, withTurnFrames, wrapToolStepOutput, writeMemory };
|