@dudousxd/nestjs-agent-core 0.40.0 → 0.41.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/README.md +7 -0
- package/dist/ag-ui/index.cjs +46 -10
- package/dist/ag-ui/index.cjs.map +1 -1
- package/dist/ag-ui/index.d.cts +9 -3
- package/dist/ag-ui/index.d.ts +9 -3
- package/dist/ag-ui/index.js +46 -10
- package/dist/ag-ui/index.js.map +1 -1
- package/dist/{catalog-CrzetM3_.d.cts → catalog-BKS3Yxo6.d.cts} +2 -0
- package/dist/{catalog-CrzetM3_.d.ts → catalog-BKS3Yxo6.d.ts} +2 -0
- package/dist/genui/builtins.cjs.map +1 -1
- package/dist/genui/builtins.d.cts +1 -1
- package/dist/genui/builtins.d.ts +1 -1
- package/dist/genui/builtins.js.map +1 -1
- package/dist/genui/index.cjs +660 -68
- package/dist/genui/index.cjs.map +1 -1
- package/dist/genui/index.d.cts +5 -5
- package/dist/genui/index.d.ts +5 -5
- package/dist/genui/index.js +654 -68
- package/dist/genui/index.js.map +1 -1
- package/dist/guardrails/index.cjs +3 -1
- package/dist/guardrails/index.cjs.map +1 -1
- package/dist/guardrails/index.d.cts +5 -4
- package/dist/guardrails/index.d.ts +5 -4
- package/dist/guardrails/index.js +3 -1
- package/dist/guardrails/index.js.map +1 -1
- package/dist/index.cjs +1161 -421
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -13
- package/dist/index.d.ts +118 -13
- package/dist/index.js +1153 -421
- package/dist/index.js.map +1 -1
- package/dist/{processors-B7nfbU6E.d.cts → processors-BXM-MNga.d.cts} +1 -1
- package/dist/{processors-BR3nICcp.d.ts → processors-ByDr5POu.d.ts} +1 -1
- package/dist/{stream-events-DAmes2Of.d.ts → stream-events-BGKLD6RX.d.ts} +73 -4
- package/dist/{stream-events-M0jc7lSW.d.cts → stream-events-CF-6-Y6L.d.cts} +73 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as ModelMessage, a as Actor,
|
|
1
|
+
import { M as ModelMessage, a as Actor, r as ToolCallRequest } from './stream-events-CF-6-Y6L.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The two seams that see a turn's traffic to and from the model: an {@link InputProcessor} rewrites
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as ModelMessage, a as Actor,
|
|
1
|
+
import { M as ModelMessage, a as Actor, r as ToolCallRequest } from './stream-events-BGKLD6RX.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The two seams that see a turn's traffic to and from the model: an {@link InputProcessor} rewrites
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
-
import { a as Catalog } from './catalog-
|
|
2
|
+
import { a as Catalog, C as ComponentDefinition, J as JsonSchema, d as CatalogOptions } from './catalog-BKS3Yxo6.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Typed answers for a question set: a question that asks for a number, a date, an email or a
|
|
@@ -1122,12 +1122,78 @@ interface AgentHistoryWindow {
|
|
|
1122
1122
|
summarize?: boolean;
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
+
/** Plain, durable data. Renderer functions and binary attachments never enter a UI frame. */
|
|
1126
|
+
interface ComponentPresentation<P = Record<string, unknown>> {
|
|
1127
|
+
component: string;
|
|
1128
|
+
props: P;
|
|
1129
|
+
version: number;
|
|
1130
|
+
fallbackText: string;
|
|
1131
|
+
}
|
|
1132
|
+
interface ComponentFactory<Input, Output = Input> {
|
|
1133
|
+
(props: Input): Promise<ComponentPresentation<Output>>;
|
|
1134
|
+
readonly definition: ComponentDefinition<Output>;
|
|
1135
|
+
}
|
|
1136
|
+
/** Reject values JSON would silently discard/coerce, and detach from caller-owned objects. */
|
|
1137
|
+
declare function snapshotComponentPresentation<T>(value: T): T;
|
|
1138
|
+
declare function createComponent<S extends StandardSchemaV1>(definition: Omit<ComponentDefinition<StandardSchemaV1.InferOutput<S>>, 'props'> & {
|
|
1139
|
+
props: S;
|
|
1140
|
+
}, options?: CatalogOptions): ComponentFactory<StandardSchemaV1.InferInput<S>, StandardSchemaV1.InferOutput<S>>;
|
|
1141
|
+
declare function createComponent<P = Record<string, unknown>>(definition: ComponentDefinition<P>, options?: CatalogOptions): ComponentFactory<P>;
|
|
1142
|
+
type ComponentRenderer<P = Record<string, unknown>, Context = unknown> = (props: P, context?: Context) => unknown | Promise<unknown>;
|
|
1143
|
+
interface ComponentManifest {
|
|
1144
|
+
name: string;
|
|
1145
|
+
title: string;
|
|
1146
|
+
description: string;
|
|
1147
|
+
version: number;
|
|
1148
|
+
props?: JsonSchema;
|
|
1149
|
+
}
|
|
1150
|
+
interface ComponentRegistry<Context = unknown> {
|
|
1151
|
+
readonly catalog: Catalog;
|
|
1152
|
+
readonly manifest: readonly ComponentManifest[];
|
|
1153
|
+
register<P>(definition: ComponentDefinition<P>, renderers: Record<string, ComponentRenderer<P, Context>>): this;
|
|
1154
|
+
/** Revalidate against the app's authoritative definition and regenerate trusted fallback text. */
|
|
1155
|
+
prepare(presentation: ComponentPresentation): Promise<ComponentPresentation>;
|
|
1156
|
+
render(presentation: ComponentPresentation, channel: string, context?: Context): Promise<unknown>;
|
|
1157
|
+
}
|
|
1158
|
+
/** A registry is owned by one app/tenant; registering never mutates a shared singleton. */
|
|
1159
|
+
declare function createComponentRegistry<Context = unknown>(options?: CatalogOptions): ComponentRegistry<Context>;
|
|
1160
|
+
type TableCell = string | number | boolean | null;
|
|
1161
|
+
interface TableProps {
|
|
1162
|
+
title?: string;
|
|
1163
|
+
columns: {
|
|
1164
|
+
key: string;
|
|
1165
|
+
label: string;
|
|
1166
|
+
align?: 'left' | 'right' | 'center';
|
|
1167
|
+
format?: 'text' | 'number' | 'currency' | 'percent' | 'date' | 'link';
|
|
1168
|
+
}[];
|
|
1169
|
+
rows: Record<string, TableCell>[];
|
|
1170
|
+
}
|
|
1171
|
+
interface ChartProps {
|
|
1172
|
+
type: 'bar' | 'line';
|
|
1173
|
+
title?: string;
|
|
1174
|
+
xKey: string;
|
|
1175
|
+
series: {
|
|
1176
|
+
key: string;
|
|
1177
|
+
label?: string;
|
|
1178
|
+
}[];
|
|
1179
|
+
data: Record<string, TableCell>[];
|
|
1180
|
+
unit?: string;
|
|
1181
|
+
}
|
|
1182
|
+
declare const table: ComponentFactory<TableProps, TableProps>;
|
|
1183
|
+
declare const chart: ComponentFactory<ChartProps, ChartProps>;
|
|
1184
|
+
/** Prepare all JSON emissions before any sink receives a partial batch. Factories validate schemas. */
|
|
1185
|
+
declare function validatePresentationBatch(presentations: ComponentPresentation<object> | readonly ComponentPresentation<object>[]): ComponentPresentation[];
|
|
1186
|
+
|
|
1125
1187
|
/**
|
|
1126
1188
|
* Per-invocation context handed to a tool handler. Host-supplied bits are optional. Identity lives
|
|
1127
1189
|
* on {@link AiToolCtx.actor} — read `ctx.actor.id` / `ctx.actor.tenantRef` (single source of truth;
|
|
1128
1190
|
* no denormalized copies).
|
|
1129
1191
|
*/
|
|
1130
1192
|
interface AiToolCtx {
|
|
1193
|
+
/** Reports presentation failures separately from successful domain execution. */
|
|
1194
|
+
onPresentationError?(error: unknown, details: {
|
|
1195
|
+
toolName: string;
|
|
1196
|
+
}): void | Promise<void>;
|
|
1131
1197
|
uiCapabilities?: UiCapabilities;
|
|
1132
1198
|
actor: Actor;
|
|
1133
1199
|
threadId: string;
|
|
@@ -1198,6 +1264,8 @@ type ToolPreflightResult<O = unknown> = {
|
|
|
1198
1264
|
/** A tool implementation. `I` is the input parsed by its registered Standard Schema. */
|
|
1199
1265
|
interface ToolHandler<I = unknown, O = unknown> {
|
|
1200
1266
|
execute(input: I, ctx: AiToolCtx): Promise<O>;
|
|
1267
|
+
/** Optional UI derived from successful domain output; errors never fail the domain action. */
|
|
1268
|
+
present?(output: O, ctx: AiToolCtx): ComponentPresentation<object> | readonly ComponentPresentation<object>[] | undefined | Promise<ComponentPresentation<object> | readonly ComponentPresentation<object>[] | undefined>;
|
|
1201
1269
|
/** Read-only action check. Runs after authorization and validation, before approval and again
|
|
1202
1270
|
* immediately before execution. Confirmation strings are resolved, never templates. */
|
|
1203
1271
|
preflight?(input: I, ctx: AiToolCtx, options: ToolPreflightOptions): ToolPreflightResult<O> | Promise<ToolPreflightResult<O>>;
|
|
@@ -1437,8 +1505,9 @@ interface ToolSpec {
|
|
|
1437
1505
|
enabled?: boolean | (() => boolean | Promise<boolean>);
|
|
1438
1506
|
/**
|
|
1439
1507
|
* An authorization ability name (e.g. 'cache.purge'). Consumed by an ability-aware RolesPolicy
|
|
1440
|
-
* such as the `@dudousxd/nestjs-agent-authz` Gate adapter.
|
|
1441
|
-
*
|
|
1508
|
+
* such as the `@dudousxd/nestjs-agent-authz` Gate adapter. A policy that can't evaluate one (the
|
|
1509
|
+
* role-based default) refuses a tool that names an `ability` and no `roles` — fail closed rather
|
|
1510
|
+
* than open; a tool naming both falls back to its `roles` there.
|
|
1442
1511
|
*/
|
|
1443
1512
|
ability?: string;
|
|
1444
1513
|
}
|
|
@@ -2575,4 +2644,4 @@ type AgentStreamErrorCode = 'quota_exceeded' | 'output_rejected' | 'structured_o
|
|
|
2575
2644
|
/** A model call ended without producing anything. */
|
|
2576
2645
|
| 'model_no_output' | 'run_failed';
|
|
2577
2646
|
|
|
2578
|
-
export { type
|
|
2647
|
+
export { type Decision as $, type AgentStreamEvent as A, type ActionProposalMutationResult as B, type ChartProps as C, type ActionProposal as D, type ActionProposalExecution as E, type ActionProposalOutcomeDelivery as F, type AgentDefinition as G, type HumanReply as H, type Persona as I, type PersonaCatalogEntry as J, type HistoryPolicy as K, type PageContext as L, type ModelMessage as M, type AgentStore as N, type AgentDelegation as O, type PreparedUiEmission as P, type QuotaState as Q, type DetachedDelivery as R, type ToolDescribeScope as S, type ToolSpec as T, type UiCapabilities as U, type ToolPreflightResult as V, type ApprovalPolicy as W, type PromptBuilder as X, type PromptContributor as Y, type ToolTransientRetrySetting as Z, type AgentIntake as _, type Actor as a, ELICITATION_INPUT_TYPES as a$, type ElicitationRequest as a0, type LlmStepEnvelope as a1, type ToolStepEnvelope as a2, type ClaimActionProposal as a3, type ActionProposalStore as a4, type ActionProposalStoreOptions as a5, type CreateActionProposal as a6, type CreateActionProposalResult as a7, type ActionProposalScope as a8, type ListActionProposals as a9, type ToolConfirmation as aA, type ActionProposalDecision as aB, type ActionProposalSupersessionStore as aC, ALL_AGENTS as aD, ASK_TOOL_DESCRIPTION as aE, ASK_TOOL_NAME as aF, type ActionProposalDecisionAudit as aG, type ActionProposalExecutionContext as aH, type ActionProposalLease as aI, type AgentApprovalRequest as aJ, type AgentApprovalSettlement as aK, type AgentAttachmentConfig as aL, type AgentCatalogEntry as aM, type AgentClientConfig as aN, type AgentHistoryWindow as aO, type AgentStreamErrorCode as aP, type ApprovalDecisionRef as aQ, type ApprovalRequirement as aR, type ApprovalThreadRef as aS, type ApprovalToolRef as aT, type AskToolInput as aU, type ChatQueueState as aV, type ClaimedActionApproval as aW, DEFAULT_INTAKE_PREAMBLE as aX, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as aY, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as aZ, DefaultApprovalPolicy as a_, type ActionProposalDecisionCommand as aa, type ExtendActionProposalLease as ab, type SettleActionProposal as ac, type ActionProposalOutcome as ad, type ActionProposalOutcomeLease as ae, type ToolCallStatus as af, type ChatQueueStore as ag, type ActionProposalOutcomeStore as ah, type CreateThreadInput as ai, type ThreadSummary as aj, type ThreadDetail as ak, type ToolCallApprovalState as al, type UpdateThreadInput as am, type RecordRunStartInput as an, type EnqueueMessageInput as ao, type QueuedMessage as ap, type QueuedMessagePatch as aq, type QueuePause as ar, type AppendMessageInput as as, type StoredMessage as at, type ToolResult as au, type MessageFeedback as av, type RecordToolCallInput as aw, type ToolCallOutcome as ax, type UpdateToolCallInput as ay, type RecordUsageInput as az, type ToolHandler as b, resolveToolTransientRetryNumbers as b$, type ElicitationInput as b0, type ElicitationInputType as b1, type ElicitationOption as b2, type ElicitationOutcome as b3, type ElicitationQuestion as b4, type ElicitationReply as b5, type ElicitationResult as b6, type EmitUiOptions as b7, type HistoryPolicyContext as b8, type HistorySelection as b9, type ToolResultView as bA, type ToolStepCtx as bB, type ToolTransientRetryNumbers as bC, type ToolTransientRetryOptions as bD, type TurnPersona as bE, UNFINISHED_TOOL_CALL as bF, type UsagePurpose as bG, askInputSchema as bH, askToolDefinition as bI, danglingToolCallIds as bJ, decodeStreamEvent as bK, defaultCanDecide as bL, encodeStreamEvent as bM, invokeWithTransientRetry as bN, isChatQueueStore as bO, isTransientToolError as bP, isTypedQuestion as bQ, mayDecideApproval as bR, normalizeElicitationReply as bS, questionOptions as bT, queuedMessageView as bU, readElicitationInput as bV, readElicitationQuestions as bW, releaseThreadRun as bX, renderElicitationAnswers as bY, resolveActionProposalApproval as bZ, resolveElicitation as b_, type HistorySummary as ba, type InvokeWithTransientRetryOptions as bb, MAX_ASK_QUESTIONS as bc, type MessageFeedbackValue as bd, type MessageRole as be, type PersonaRef as bf, type PromptContext as bg, type QueuePauseReason as bh, type QueuedMessageView as bi, type QuotaView as bj, REQUESTER_APPROVER as bk, RUN_ENDED_BEFORE_TOOL_CALL as bl, type RecordRunEndInput as bm, type ResolveActionProposalApprovalInput as bn, type ThreadTurnPage as bo, type ThreadTurnQuery as bp, type ThreadTurnReader as bq, type ToolCallApproval as br, type ToolCallApprovalColumns as bs, type ToolCallApprovalStatus as bt, type ToolCatalogEntry as bu, type ToolDescription as bv, type ToolKind as bw, type ToolPreflightOptions as bx, type ToolPresentationTone as by, type ToolResultField as bz, type ToolPresentation as c, settleDanglingToolCalls as c0, settleElicitation as c1, toolCallApprovalFromRow as c2, validateElicitationAnswer as c3, validateElicitationValue as c4, type ComponentFactory as d, type ComponentManifest as e, type ComponentPresentation as f, type ComponentRegistry as g, type ComponentRenderer as h, type TableCell as i, type TableProps as j, chart as k, createComponent as l, createComponentRegistry as m, negotiateCatalog as n, validateUiCapabilities as o, prepareUiEmission as p, type ToolDefinition as q, type ToolCallRequest as r, snapshotComponentPresentation as s, table as t, type MessageUsage as u, validatePresentationBatch as v, type AgentUiComponent as w, type AiToolCtx as x, type AgentRunInput as y, type MessageAttachment as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
-
import { a as Catalog } from './catalog-
|
|
2
|
+
import { a as Catalog, C as ComponentDefinition, J as JsonSchema, d as CatalogOptions } from './catalog-BKS3Yxo6.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Typed answers for a question set: a question that asks for a number, a date, an email or a
|
|
@@ -1122,12 +1122,78 @@ interface AgentHistoryWindow {
|
|
|
1122
1122
|
summarize?: boolean;
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
+
/** Plain, durable data. Renderer functions and binary attachments never enter a UI frame. */
|
|
1126
|
+
interface ComponentPresentation<P = Record<string, unknown>> {
|
|
1127
|
+
component: string;
|
|
1128
|
+
props: P;
|
|
1129
|
+
version: number;
|
|
1130
|
+
fallbackText: string;
|
|
1131
|
+
}
|
|
1132
|
+
interface ComponentFactory<Input, Output = Input> {
|
|
1133
|
+
(props: Input): Promise<ComponentPresentation<Output>>;
|
|
1134
|
+
readonly definition: ComponentDefinition<Output>;
|
|
1135
|
+
}
|
|
1136
|
+
/** Reject values JSON would silently discard/coerce, and detach from caller-owned objects. */
|
|
1137
|
+
declare function snapshotComponentPresentation<T>(value: T): T;
|
|
1138
|
+
declare function createComponent<S extends StandardSchemaV1>(definition: Omit<ComponentDefinition<StandardSchemaV1.InferOutput<S>>, 'props'> & {
|
|
1139
|
+
props: S;
|
|
1140
|
+
}, options?: CatalogOptions): ComponentFactory<StandardSchemaV1.InferInput<S>, StandardSchemaV1.InferOutput<S>>;
|
|
1141
|
+
declare function createComponent<P = Record<string, unknown>>(definition: ComponentDefinition<P>, options?: CatalogOptions): ComponentFactory<P>;
|
|
1142
|
+
type ComponentRenderer<P = Record<string, unknown>, Context = unknown> = (props: P, context?: Context) => unknown | Promise<unknown>;
|
|
1143
|
+
interface ComponentManifest {
|
|
1144
|
+
name: string;
|
|
1145
|
+
title: string;
|
|
1146
|
+
description: string;
|
|
1147
|
+
version: number;
|
|
1148
|
+
props?: JsonSchema;
|
|
1149
|
+
}
|
|
1150
|
+
interface ComponentRegistry<Context = unknown> {
|
|
1151
|
+
readonly catalog: Catalog;
|
|
1152
|
+
readonly manifest: readonly ComponentManifest[];
|
|
1153
|
+
register<P>(definition: ComponentDefinition<P>, renderers: Record<string, ComponentRenderer<P, Context>>): this;
|
|
1154
|
+
/** Revalidate against the app's authoritative definition and regenerate trusted fallback text. */
|
|
1155
|
+
prepare(presentation: ComponentPresentation): Promise<ComponentPresentation>;
|
|
1156
|
+
render(presentation: ComponentPresentation, channel: string, context?: Context): Promise<unknown>;
|
|
1157
|
+
}
|
|
1158
|
+
/** A registry is owned by one app/tenant; registering never mutates a shared singleton. */
|
|
1159
|
+
declare function createComponentRegistry<Context = unknown>(options?: CatalogOptions): ComponentRegistry<Context>;
|
|
1160
|
+
type TableCell = string | number | boolean | null;
|
|
1161
|
+
interface TableProps {
|
|
1162
|
+
title?: string;
|
|
1163
|
+
columns: {
|
|
1164
|
+
key: string;
|
|
1165
|
+
label: string;
|
|
1166
|
+
align?: 'left' | 'right' | 'center';
|
|
1167
|
+
format?: 'text' | 'number' | 'currency' | 'percent' | 'date' | 'link';
|
|
1168
|
+
}[];
|
|
1169
|
+
rows: Record<string, TableCell>[];
|
|
1170
|
+
}
|
|
1171
|
+
interface ChartProps {
|
|
1172
|
+
type: 'bar' | 'line';
|
|
1173
|
+
title?: string;
|
|
1174
|
+
xKey: string;
|
|
1175
|
+
series: {
|
|
1176
|
+
key: string;
|
|
1177
|
+
label?: string;
|
|
1178
|
+
}[];
|
|
1179
|
+
data: Record<string, TableCell>[];
|
|
1180
|
+
unit?: string;
|
|
1181
|
+
}
|
|
1182
|
+
declare const table: ComponentFactory<TableProps, TableProps>;
|
|
1183
|
+
declare const chart: ComponentFactory<ChartProps, ChartProps>;
|
|
1184
|
+
/** Prepare all JSON emissions before any sink receives a partial batch. Factories validate schemas. */
|
|
1185
|
+
declare function validatePresentationBatch(presentations: ComponentPresentation<object> | readonly ComponentPresentation<object>[]): ComponentPresentation[];
|
|
1186
|
+
|
|
1125
1187
|
/**
|
|
1126
1188
|
* Per-invocation context handed to a tool handler. Host-supplied bits are optional. Identity lives
|
|
1127
1189
|
* on {@link AiToolCtx.actor} — read `ctx.actor.id` / `ctx.actor.tenantRef` (single source of truth;
|
|
1128
1190
|
* no denormalized copies).
|
|
1129
1191
|
*/
|
|
1130
1192
|
interface AiToolCtx {
|
|
1193
|
+
/** Reports presentation failures separately from successful domain execution. */
|
|
1194
|
+
onPresentationError?(error: unknown, details: {
|
|
1195
|
+
toolName: string;
|
|
1196
|
+
}): void | Promise<void>;
|
|
1131
1197
|
uiCapabilities?: UiCapabilities;
|
|
1132
1198
|
actor: Actor;
|
|
1133
1199
|
threadId: string;
|
|
@@ -1198,6 +1264,8 @@ type ToolPreflightResult<O = unknown> = {
|
|
|
1198
1264
|
/** A tool implementation. `I` is the input parsed by its registered Standard Schema. */
|
|
1199
1265
|
interface ToolHandler<I = unknown, O = unknown> {
|
|
1200
1266
|
execute(input: I, ctx: AiToolCtx): Promise<O>;
|
|
1267
|
+
/** Optional UI derived from successful domain output; errors never fail the domain action. */
|
|
1268
|
+
present?(output: O, ctx: AiToolCtx): ComponentPresentation<object> | readonly ComponentPresentation<object>[] | undefined | Promise<ComponentPresentation<object> | readonly ComponentPresentation<object>[] | undefined>;
|
|
1201
1269
|
/** Read-only action check. Runs after authorization and validation, before approval and again
|
|
1202
1270
|
* immediately before execution. Confirmation strings are resolved, never templates. */
|
|
1203
1271
|
preflight?(input: I, ctx: AiToolCtx, options: ToolPreflightOptions): ToolPreflightResult<O> | Promise<ToolPreflightResult<O>>;
|
|
@@ -1437,8 +1505,9 @@ interface ToolSpec {
|
|
|
1437
1505
|
enabled?: boolean | (() => boolean | Promise<boolean>);
|
|
1438
1506
|
/**
|
|
1439
1507
|
* An authorization ability name (e.g. 'cache.purge'). Consumed by an ability-aware RolesPolicy
|
|
1440
|
-
* such as the `@dudousxd/nestjs-agent-authz` Gate adapter.
|
|
1441
|
-
*
|
|
1508
|
+
* such as the `@dudousxd/nestjs-agent-authz` Gate adapter. A policy that can't evaluate one (the
|
|
1509
|
+
* role-based default) refuses a tool that names an `ability` and no `roles` — fail closed rather
|
|
1510
|
+
* than open; a tool naming both falls back to its `roles` there.
|
|
1442
1511
|
*/
|
|
1443
1512
|
ability?: string;
|
|
1444
1513
|
}
|
|
@@ -2575,4 +2644,4 @@ type AgentStreamErrorCode = 'quota_exceeded' | 'output_rejected' | 'structured_o
|
|
|
2575
2644
|
/** A model call ended without producing anything. */
|
|
2576
2645
|
| 'model_no_output' | 'run_failed';
|
|
2577
2646
|
|
|
2578
|
-
export { type
|
|
2647
|
+
export { type Decision as $, type AgentStreamEvent as A, type ActionProposalMutationResult as B, type ChartProps as C, type ActionProposal as D, type ActionProposalExecution as E, type ActionProposalOutcomeDelivery as F, type AgentDefinition as G, type HumanReply as H, type Persona as I, type PersonaCatalogEntry as J, type HistoryPolicy as K, type PageContext as L, type ModelMessage as M, type AgentStore as N, type AgentDelegation as O, type PreparedUiEmission as P, type QuotaState as Q, type DetachedDelivery as R, type ToolDescribeScope as S, type ToolSpec as T, type UiCapabilities as U, type ToolPreflightResult as V, type ApprovalPolicy as W, type PromptBuilder as X, type PromptContributor as Y, type ToolTransientRetrySetting as Z, type AgentIntake as _, type Actor as a, ELICITATION_INPUT_TYPES as a$, type ElicitationRequest as a0, type LlmStepEnvelope as a1, type ToolStepEnvelope as a2, type ClaimActionProposal as a3, type ActionProposalStore as a4, type ActionProposalStoreOptions as a5, type CreateActionProposal as a6, type CreateActionProposalResult as a7, type ActionProposalScope as a8, type ListActionProposals as a9, type ToolConfirmation as aA, type ActionProposalDecision as aB, type ActionProposalSupersessionStore as aC, ALL_AGENTS as aD, ASK_TOOL_DESCRIPTION as aE, ASK_TOOL_NAME as aF, type ActionProposalDecisionAudit as aG, type ActionProposalExecutionContext as aH, type ActionProposalLease as aI, type AgentApprovalRequest as aJ, type AgentApprovalSettlement as aK, type AgentAttachmentConfig as aL, type AgentCatalogEntry as aM, type AgentClientConfig as aN, type AgentHistoryWindow as aO, type AgentStreamErrorCode as aP, type ApprovalDecisionRef as aQ, type ApprovalRequirement as aR, type ApprovalThreadRef as aS, type ApprovalToolRef as aT, type AskToolInput as aU, type ChatQueueState as aV, type ClaimedActionApproval as aW, DEFAULT_INTAKE_PREAMBLE as aX, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as aY, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as aZ, DefaultApprovalPolicy as a_, type ActionProposalDecisionCommand as aa, type ExtendActionProposalLease as ab, type SettleActionProposal as ac, type ActionProposalOutcome as ad, type ActionProposalOutcomeLease as ae, type ToolCallStatus as af, type ChatQueueStore as ag, type ActionProposalOutcomeStore as ah, type CreateThreadInput as ai, type ThreadSummary as aj, type ThreadDetail as ak, type ToolCallApprovalState as al, type UpdateThreadInput as am, type RecordRunStartInput as an, type EnqueueMessageInput as ao, type QueuedMessage as ap, type QueuedMessagePatch as aq, type QueuePause as ar, type AppendMessageInput as as, type StoredMessage as at, type ToolResult as au, type MessageFeedback as av, type RecordToolCallInput as aw, type ToolCallOutcome as ax, type UpdateToolCallInput as ay, type RecordUsageInput as az, type ToolHandler as b, resolveToolTransientRetryNumbers as b$, type ElicitationInput as b0, type ElicitationInputType as b1, type ElicitationOption as b2, type ElicitationOutcome as b3, type ElicitationQuestion as b4, type ElicitationReply as b5, type ElicitationResult as b6, type EmitUiOptions as b7, type HistoryPolicyContext as b8, type HistorySelection as b9, type ToolResultView as bA, type ToolStepCtx as bB, type ToolTransientRetryNumbers as bC, type ToolTransientRetryOptions as bD, type TurnPersona as bE, UNFINISHED_TOOL_CALL as bF, type UsagePurpose as bG, askInputSchema as bH, askToolDefinition as bI, danglingToolCallIds as bJ, decodeStreamEvent as bK, defaultCanDecide as bL, encodeStreamEvent as bM, invokeWithTransientRetry as bN, isChatQueueStore as bO, isTransientToolError as bP, isTypedQuestion as bQ, mayDecideApproval as bR, normalizeElicitationReply as bS, questionOptions as bT, queuedMessageView as bU, readElicitationInput as bV, readElicitationQuestions as bW, releaseThreadRun as bX, renderElicitationAnswers as bY, resolveActionProposalApproval as bZ, resolveElicitation as b_, type HistorySummary as ba, type InvokeWithTransientRetryOptions as bb, MAX_ASK_QUESTIONS as bc, type MessageFeedbackValue as bd, type MessageRole as be, type PersonaRef as bf, type PromptContext as bg, type QueuePauseReason as bh, type QueuedMessageView as bi, type QuotaView as bj, REQUESTER_APPROVER as bk, RUN_ENDED_BEFORE_TOOL_CALL as bl, type RecordRunEndInput as bm, type ResolveActionProposalApprovalInput as bn, type ThreadTurnPage as bo, type ThreadTurnQuery as bp, type ThreadTurnReader as bq, type ToolCallApproval as br, type ToolCallApprovalColumns as bs, type ToolCallApprovalStatus as bt, type ToolCatalogEntry as bu, type ToolDescription as bv, type ToolKind as bw, type ToolPreflightOptions as bx, type ToolPresentationTone as by, type ToolResultField as bz, type ToolPresentation as c, settleDanglingToolCalls as c0, settleElicitation as c1, toolCallApprovalFromRow as c2, validateElicitationAnswer as c3, validateElicitationValue as c4, type ComponentFactory as d, type ComponentManifest as e, type ComponentPresentation as f, type ComponentRegistry as g, type ComponentRenderer as h, type TableCell as i, type TableProps as j, chart as k, createComponent as l, createComponentRegistry as m, negotiateCatalog as n, validateUiCapabilities as o, prepareUiEmission as p, type ToolDefinition as q, type ToolCallRequest as r, snapshotComponentPresentation as s, table as t, type MessageUsage as u, validatePresentationBatch as v, type AgentUiComponent as w, type AiToolCtx as x, type AgentRunInput as y, type MessageAttachment as z };
|