@dudousxd/nestjs-agent-core 0.20.0 → 0.22.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.
@@ -1,5 +1,74 @@
1
1
  import { StandardSchemaV1 } from '@standard-schema/spec';
2
2
 
3
+ /**
4
+ * Typed answers for a question set: a question that asks for a number, a date, an email or a
5
+ * sentence instead of offering options to pick.
6
+ *
7
+ * Answers stay `string[]` on the wire whatever the type — the signal that carries them, the row that
8
+ * records them and the model that reads them back all see strings — so this module fixes ONE
9
+ * canonical string per type and validates against it:
10
+ *
11
+ * | `type` | canonical value |
12
+ * |------------|----------------------------------------------|
13
+ * | `text` | the text |
14
+ * | `textarea` | the text (newlines kept) |
15
+ * | `number` | a finite decimal, e.g. `"42"`, `"-1.5"` |
16
+ * | `boolean` | `"true"` or `"false"` |
17
+ * | `date` | `YYYY-MM-DD` |
18
+ * | `email` | an address with one `@` and a dotted domain |
19
+ * | `url` | an absolute `http:`/`https:` URL |
20
+ * | `select` | one of the question's `options[].value` |
21
+ *
22
+ * Pure and dependency-free, so the loop (which filters what it settles on), the HTTP surface (which
23
+ * refuses what it cannot settle) and a client (which says so before sending) all agree.
24
+ */
25
+
26
+ declare const ELICITATION_INPUT_TYPES: readonly ["text", "textarea", "number", "boolean", "date", "email", "url", "select"];
27
+ type ElicitationInputType = (typeof ELICITATION_INPUT_TYPES)[number];
28
+ /** How a question takes its answer when it is not (only) a pick from `options`. */
29
+ interface ElicitationInput {
30
+ type: ElicitationInputType;
31
+ /** Hint shown in an empty field. Advisory. */
32
+ placeholder?: string;
33
+ /** Submitting without a value is refused. Skipping the whole set is still allowed. */
34
+ required?: boolean;
35
+ /**
36
+ * Lower bound: the smallest number for `number`, the shortest length for `text`/`textarea`, the
37
+ * earliest `YYYY-MM-DD` for `date`. Ignored for the other types.
38
+ */
39
+ min?: number | string;
40
+ /** Upper bound, read like {@link min}. */
41
+ max?: number | string;
42
+ /** A regular expression the WHOLE value must match (`text`, `textarea`, `email`, `url`). */
43
+ pattern?: string;
44
+ }
45
+ /** The question's options, or none — `options` may be omitted on a typed question. */
46
+ declare function questionOptions(question: ElicitationQuestion): ElicitationOption[];
47
+ /** A question answered by a typed value rather than by picking one of its options. */
48
+ declare function isTypedQuestion(question: ElicitationQuestion): boolean;
49
+ /**
50
+ * Why `value` is not an acceptable answer to `question`, or `null` when it is. Checks ONE value;
51
+ * {@link validateElicitationAnswer} checks the list (required, single choice).
52
+ */
53
+ declare function validateElicitationValue(question: ElicitationQuestion, value: string): string | null;
54
+ /**
55
+ * Why `values` is not an acceptable answer to `question`, or `null` when it is: a `required`
56
+ * question left empty, more than one value for a single-choice question, or any value
57
+ * {@link validateElicitationValue} refuses. An empty string counts as no value.
58
+ */
59
+ declare function validateElicitationAnswer(question: ElicitationQuestion, values: readonly string[]): string | null;
60
+ /**
61
+ * Read an {@link ElicitationInput} from untrusted JSON, or `undefined` when it is not one. Unknown
62
+ * keys are dropped; a malformed optional field is dropped rather than failing the input.
63
+ */
64
+ declare function readElicitationInput(raw: unknown): ElicitationInput | undefined;
65
+ /**
66
+ * The questions a parked call carries, read leniently from its recorded input (`{ questions }` —
67
+ * what both an intake and an `ask` persist). Used where a reply is checked against the questions it
68
+ * answers; a question that cannot be read is left out rather than failing the rest.
69
+ */
70
+ declare function readElicitationQuestions(input: unknown): ElicitationQuestion[];
71
+
3
72
  /**
4
73
  * Asking the USER a structured question, and waiting for the answer.
5
74
  *
@@ -27,7 +96,19 @@ interface ElicitationQuestion {
27
96
  /** Unique within its request; the key answers come back under. */
28
97
  id: string;
29
98
  prompt: string;
30
- options: ElicitationOption[];
99
+ /** A line of help under the prompt. */
100
+ description?: string;
101
+ /**
102
+ * The choices. Required unless {@link input} asks for a typed value — then optional, and a UI may
103
+ * offer them as suggestions. An `input` of type `select` still picks from these.
104
+ */
105
+ options?: ElicitationOption[];
106
+ /**
107
+ * Ask for a typed value (a number, a date, a sentence…) instead of — or, for `select`, on top of —
108
+ * a pick from `options`. The answer is still a `string[]`, in the type's canonical form; see
109
+ * `elicitation-input.ts`.
110
+ */
111
+ input?: ElicitationInput;
31
112
  /** More than one option may be chosen. Omit → single choice. */
32
113
  multiple?: boolean;
33
114
  /**
@@ -304,6 +385,12 @@ interface AgentUiComponent {
304
385
  props: Record<string, unknown>;
305
386
  /** Schema version of `props`, so a client can keep rendering components persisted by an older server. */
306
387
  version?: number;
388
+ /**
389
+ * The tool call that pushed the component (`ctx.emitUi`), when one did. Lets a client place it
390
+ * with that call — a reloaded message puts it right after the call's tool part, where the live
391
+ * stream showed it. Absent for a component pushed outside a tool.
392
+ */
393
+ toolCallId?: string;
307
394
  }
308
395
  /**
309
396
  * Who has to settle an action tool call, and until when. Metadata only: the call itself is still
@@ -715,6 +802,17 @@ interface ToolSpec {
715
802
  * reads the branch back rather than re-deciding it against a registry that may have changed.
716
803
  */
717
804
  detached?: boolean;
805
+ /**
806
+ * The turn ends once a call to this tool SUCCEEDS: the loop finishes the step (results persisted
807
+ * and streamed) and makes no further model call. For a tool whose effect IS the answer — pushing
808
+ * a composed UI, handing off — where a model call narrating it would only repeat it. A failed or
809
+ * refused call does not end the turn, so the model can correct it.
810
+ *
811
+ * Settled into the call's `persist:toolcall` checkpoint (like `targetAgent`), so a replay takes
812
+ * the same branch. Ending early skips what a final step would do: follow-ups and the
813
+ * `outputSchema` formatting pass.
814
+ */
815
+ terminal?: boolean;
718
816
  /** Roles allowed to invoke. Undefined → defaults applied by RolesPolicy (e.g. ADMIN-only). */
719
817
  roles?: string[];
720
818
  /**
@@ -1178,6 +1276,12 @@ interface ToolStepEnvelope {
1178
1276
  * `AgentRunSteps.tool`) instead of trying to serialize a function.
1179
1277
  */
1180
1278
  transientRetry: ToolTransientRetryNumbers | false;
1279
+ /**
1280
+ * The dispatching loop reads the components the tool pushed (`ctx.emitUi`) off the step's result.
1281
+ * A handler that sees it returns {@link wrapToolStepOutput}'s envelope when the tool pushed any —
1282
+ * and ONLY then, so a loop that predates this (and never sets it) always gets the bare output.
1283
+ */
1284
+ collectUi?: boolean;
1181
1285
  }
1182
1286
 
1183
1287
  /**
@@ -1352,6 +1456,27 @@ interface AiToolCtx {
1352
1456
  pageContext?: PageContext;
1353
1457
  /** Optional host handle (e.g. an ORM EntityManager) the app threads through options. */
1354
1458
  host?: unknown;
1459
+ /**
1460
+ * Push a component into the assistant message: streamed live as a `ui` frame and persisted on
1461
+ * the message, so a reload shows it where the live stream did. Resolves to the component's id.
1462
+ *
1463
+ * `id` defaults to `<toolCallId>:ui:<n>` (the n-th push without an `id` in this invocation), so a retried or
1464
+ * re-executed call REPLACES what it pushed before instead of adding a second copy; pass your own
1465
+ * `id` to update one component across pushes (streaming rows into a table). `props` must be
1466
+ * JSON; it is snapshotted when pushed.
1467
+ *
1468
+ * Replay-safe under the durable runner: the pushed components ride the tool step's journaled
1469
+ * result, so a replay neither streams nor persists them again. Present whenever the agent loop
1470
+ * runs the tool (inline, durable, dispatched); absent on surfaces with no conversation to push
1471
+ * into (the MCP server), hence optional — call it as `ctx.emitUi?.(…)` in a tool that is also
1472
+ * served there.
1473
+ */
1474
+ emitUi?(component: string, props: Record<string, unknown>, options?: {
1475
+ id?: string;
1476
+ version?: number;
1477
+ }): Promise<{
1478
+ id: string;
1479
+ }>;
1355
1480
  }
1356
1481
  /** A tool implementation. `I` is the parsed (Zod-validated) input. */
1357
1482
  interface ToolHandler<I = unknown> {
@@ -1385,4 +1510,4 @@ interface ToolHandler<I = unknown> {
1385
1510
  canUse?(actor: Actor): boolean | Promise<boolean>;
1386
1511
  }
1387
1512
 
1388
- export { type ElicitationQuestion as $, type Actor as A, ASK_TOOL_DESCRIPTION as B, ASK_TOOL_NAME as C, type DetachedDelivery as D, type ElicitationRequest as E, type AgentApprovalRequest as F, type AgentApprovalSettlement as G, type HumanReply as H, type InputProcessor as I, type AgentCatalogEntry as J, type AgentHistoryWindow as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentStreamEvent as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AskToolInput as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as V, DEFAULT_INTAKE_PREAMBLE as W, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as X, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Y, type ElicitationOption as Z, type ElicitationOutcome as _, type ToolDefinition as a, type ElicitationReply as a0, type ElicitationResult as a1, type HistoryPolicyContext as a2, type HistorySelection as a3, type HistorySummary as a4, type IncrementalGating as a5, type InvokeWithTransientRetryOptions as a6, MAX_ASK_QUESTIONS as a7, type MessageRole as a8, OutputRejectedError as a9, type OutputVerdict as aa, ProcessorFailedError as ab, type PromptContext as ac, type QuotaView as ad, type ToolCallApprovalStatus as ae, type ToolCatalogEntry as af, type ToolConfirmation as ag, type ToolPresentation as ah, type ToolPresentationTone as ai, type ToolResultField as aj, type ToolResultView as ak, type ToolStepCtx as al, type ToolTransientRetryNumbers as am, type ToolTransientRetryOptions as an, askInputSchema as ao, askToolDefinition as ap, decodeStreamEvent as aq, encodeStreamEvent as ar, invokeWithTransientRetry as as, isTransientToolError as at, normalizeElicitationReply as au, renderElicitationAnswers as av, resolveElicitation as aw, resolveToolTransientRetryNumbers as ax, settleElicitation as ay, type ToolCallRequest as b, type MessageUsage as c, type AgentUiComponent as d, type ThreadSummary as e, type ThreadDetail as f, type ToolResult as g, type MessageAttachment as h, type ToolCallStatus as i, type ToolSpec as j, type AgentRunInput as k, type ToolKind as l, type ToolCallApproval as m, type HistoryPolicy as n, type ProcessedPrompt as o, type ModelAnswer as p, type PageContext as q, type AgentDefinition as r, type AgentDelegation as s, type AiToolCtx as t, type PromptBuilder as u, type PromptContributor as v, type ToolTransientRetrySetting as w, type AgentIntake as x, type Decision as y, type ToolStepEnvelope as z };
1513
+ export { type ElicitationInputType as $, type Actor as A, type ToolStepEnvelope as B, ASK_TOOL_DESCRIPTION as C, type DetachedDelivery as D, type ElicitationRequest as E, ASK_TOOL_NAME as F, type AgentApprovalRequest as G, type HumanReply as H, type InputProcessor as I, type AgentApprovalSettlement as J, type AgentCatalogEntry as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentHistoryWindow as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AskToolInput as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as V, DEFAULT_INTAKE_PREAMBLE as W, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as X, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Y, ELICITATION_INPUT_TYPES as Z, type ElicitationInput as _, type ToolDefinition as a, type ElicitationOption as a0, type ElicitationOutcome as a1, type ElicitationQuestion as a2, type ElicitationReply as a3, type ElicitationResult as a4, type HistoryPolicyContext as a5, type HistorySelection as a6, type HistorySummary as a7, type IncrementalGating as a8, type InvokeWithTransientRetryOptions as a9, readElicitationInput as aA, readElicitationQuestions as aB, renderElicitationAnswers as aC, resolveElicitation as aD, resolveToolTransientRetryNumbers as aE, settleElicitation as aF, validateElicitationAnswer as aG, validateElicitationValue as aH, MAX_ASK_QUESTIONS as aa, type MessageRole as ab, OutputRejectedError as ac, type OutputVerdict as ad, ProcessorFailedError as ae, type PromptContext as af, type QuotaView as ag, type ToolCallApprovalStatus as ah, type ToolCatalogEntry as ai, type ToolConfirmation as aj, type ToolPresentation as ak, type ToolPresentationTone as al, type ToolResultField as am, type ToolResultView as an, type ToolStepCtx as ao, type ToolTransientRetryNumbers as ap, type ToolTransientRetryOptions as aq, askInputSchema as ar, askToolDefinition as as, decodeStreamEvent as at, encodeStreamEvent as au, invokeWithTransientRetry as av, isTransientToolError as aw, isTypedQuestion as ax, normalizeElicitationReply as ay, questionOptions as az, type ToolCallRequest as b, type MessageUsage as c, type AgentUiComponent as d, type AiToolCtx as e, type AgentStreamEvent as f, type ThreadSummary as g, type ThreadDetail as h, type ToolResult as i, type MessageAttachment as j, type ToolCallStatus as k, type ToolSpec as l, type AgentRunInput as m, type ToolKind as n, type ToolCallApproval as o, type HistoryPolicy as p, type ProcessedPrompt as q, type ModelAnswer as r, type PageContext as s, type AgentDefinition as t, type AgentDelegation as u, type PromptBuilder as v, type PromptContributor as w, type ToolTransientRetrySetting as x, type AgentIntake as y, type Decision as z };
@@ -1,5 +1,74 @@
1
1
  import { StandardSchemaV1 } from '@standard-schema/spec';
2
2
 
3
+ /**
4
+ * Typed answers for a question set: a question that asks for a number, a date, an email or a
5
+ * sentence instead of offering options to pick.
6
+ *
7
+ * Answers stay `string[]` on the wire whatever the type — the signal that carries them, the row that
8
+ * records them and the model that reads them back all see strings — so this module fixes ONE
9
+ * canonical string per type and validates against it:
10
+ *
11
+ * | `type` | canonical value |
12
+ * |------------|----------------------------------------------|
13
+ * | `text` | the text |
14
+ * | `textarea` | the text (newlines kept) |
15
+ * | `number` | a finite decimal, e.g. `"42"`, `"-1.5"` |
16
+ * | `boolean` | `"true"` or `"false"` |
17
+ * | `date` | `YYYY-MM-DD` |
18
+ * | `email` | an address with one `@` and a dotted domain |
19
+ * | `url` | an absolute `http:`/`https:` URL |
20
+ * | `select` | one of the question's `options[].value` |
21
+ *
22
+ * Pure and dependency-free, so the loop (which filters what it settles on), the HTTP surface (which
23
+ * refuses what it cannot settle) and a client (which says so before sending) all agree.
24
+ */
25
+
26
+ declare const ELICITATION_INPUT_TYPES: readonly ["text", "textarea", "number", "boolean", "date", "email", "url", "select"];
27
+ type ElicitationInputType = (typeof ELICITATION_INPUT_TYPES)[number];
28
+ /** How a question takes its answer when it is not (only) a pick from `options`. */
29
+ interface ElicitationInput {
30
+ type: ElicitationInputType;
31
+ /** Hint shown in an empty field. Advisory. */
32
+ placeholder?: string;
33
+ /** Submitting without a value is refused. Skipping the whole set is still allowed. */
34
+ required?: boolean;
35
+ /**
36
+ * Lower bound: the smallest number for `number`, the shortest length for `text`/`textarea`, the
37
+ * earliest `YYYY-MM-DD` for `date`. Ignored for the other types.
38
+ */
39
+ min?: number | string;
40
+ /** Upper bound, read like {@link min}. */
41
+ max?: number | string;
42
+ /** A regular expression the WHOLE value must match (`text`, `textarea`, `email`, `url`). */
43
+ pattern?: string;
44
+ }
45
+ /** The question's options, or none — `options` may be omitted on a typed question. */
46
+ declare function questionOptions(question: ElicitationQuestion): ElicitationOption[];
47
+ /** A question answered by a typed value rather than by picking one of its options. */
48
+ declare function isTypedQuestion(question: ElicitationQuestion): boolean;
49
+ /**
50
+ * Why `value` is not an acceptable answer to `question`, or `null` when it is. Checks ONE value;
51
+ * {@link validateElicitationAnswer} checks the list (required, single choice).
52
+ */
53
+ declare function validateElicitationValue(question: ElicitationQuestion, value: string): string | null;
54
+ /**
55
+ * Why `values` is not an acceptable answer to `question`, or `null` when it is: a `required`
56
+ * question left empty, more than one value for a single-choice question, or any value
57
+ * {@link validateElicitationValue} refuses. An empty string counts as no value.
58
+ */
59
+ declare function validateElicitationAnswer(question: ElicitationQuestion, values: readonly string[]): string | null;
60
+ /**
61
+ * Read an {@link ElicitationInput} from untrusted JSON, or `undefined` when it is not one. Unknown
62
+ * keys are dropped; a malformed optional field is dropped rather than failing the input.
63
+ */
64
+ declare function readElicitationInput(raw: unknown): ElicitationInput | undefined;
65
+ /**
66
+ * The questions a parked call carries, read leniently from its recorded input (`{ questions }` —
67
+ * what both an intake and an `ask` persist). Used where a reply is checked against the questions it
68
+ * answers; a question that cannot be read is left out rather than failing the rest.
69
+ */
70
+ declare function readElicitationQuestions(input: unknown): ElicitationQuestion[];
71
+
3
72
  /**
4
73
  * Asking the USER a structured question, and waiting for the answer.
5
74
  *
@@ -27,7 +96,19 @@ interface ElicitationQuestion {
27
96
  /** Unique within its request; the key answers come back under. */
28
97
  id: string;
29
98
  prompt: string;
30
- options: ElicitationOption[];
99
+ /** A line of help under the prompt. */
100
+ description?: string;
101
+ /**
102
+ * The choices. Required unless {@link input} asks for a typed value — then optional, and a UI may
103
+ * offer them as suggestions. An `input` of type `select` still picks from these.
104
+ */
105
+ options?: ElicitationOption[];
106
+ /**
107
+ * Ask for a typed value (a number, a date, a sentence…) instead of — or, for `select`, on top of —
108
+ * a pick from `options`. The answer is still a `string[]`, in the type's canonical form; see
109
+ * `elicitation-input.ts`.
110
+ */
111
+ input?: ElicitationInput;
31
112
  /** More than one option may be chosen. Omit → single choice. */
32
113
  multiple?: boolean;
33
114
  /**
@@ -304,6 +385,12 @@ interface AgentUiComponent {
304
385
  props: Record<string, unknown>;
305
386
  /** Schema version of `props`, so a client can keep rendering components persisted by an older server. */
306
387
  version?: number;
388
+ /**
389
+ * The tool call that pushed the component (`ctx.emitUi`), when one did. Lets a client place it
390
+ * with that call — a reloaded message puts it right after the call's tool part, where the live
391
+ * stream showed it. Absent for a component pushed outside a tool.
392
+ */
393
+ toolCallId?: string;
307
394
  }
308
395
  /**
309
396
  * Who has to settle an action tool call, and until when. Metadata only: the call itself is still
@@ -715,6 +802,17 @@ interface ToolSpec {
715
802
  * reads the branch back rather than re-deciding it against a registry that may have changed.
716
803
  */
717
804
  detached?: boolean;
805
+ /**
806
+ * The turn ends once a call to this tool SUCCEEDS: the loop finishes the step (results persisted
807
+ * and streamed) and makes no further model call. For a tool whose effect IS the answer — pushing
808
+ * a composed UI, handing off — where a model call narrating it would only repeat it. A failed or
809
+ * refused call does not end the turn, so the model can correct it.
810
+ *
811
+ * Settled into the call's `persist:toolcall` checkpoint (like `targetAgent`), so a replay takes
812
+ * the same branch. Ending early skips what a final step would do: follow-ups and the
813
+ * `outputSchema` formatting pass.
814
+ */
815
+ terminal?: boolean;
718
816
  /** Roles allowed to invoke. Undefined → defaults applied by RolesPolicy (e.g. ADMIN-only). */
719
817
  roles?: string[];
720
818
  /**
@@ -1178,6 +1276,12 @@ interface ToolStepEnvelope {
1178
1276
  * `AgentRunSteps.tool`) instead of trying to serialize a function.
1179
1277
  */
1180
1278
  transientRetry: ToolTransientRetryNumbers | false;
1279
+ /**
1280
+ * The dispatching loop reads the components the tool pushed (`ctx.emitUi`) off the step's result.
1281
+ * A handler that sees it returns {@link wrapToolStepOutput}'s envelope when the tool pushed any —
1282
+ * and ONLY then, so a loop that predates this (and never sets it) always gets the bare output.
1283
+ */
1284
+ collectUi?: boolean;
1181
1285
  }
1182
1286
 
1183
1287
  /**
@@ -1352,6 +1456,27 @@ interface AiToolCtx {
1352
1456
  pageContext?: PageContext;
1353
1457
  /** Optional host handle (e.g. an ORM EntityManager) the app threads through options. */
1354
1458
  host?: unknown;
1459
+ /**
1460
+ * Push a component into the assistant message: streamed live as a `ui` frame and persisted on
1461
+ * the message, so a reload shows it where the live stream did. Resolves to the component's id.
1462
+ *
1463
+ * `id` defaults to `<toolCallId>:ui:<n>` (the n-th push without an `id` in this invocation), so a retried or
1464
+ * re-executed call REPLACES what it pushed before instead of adding a second copy; pass your own
1465
+ * `id` to update one component across pushes (streaming rows into a table). `props` must be
1466
+ * JSON; it is snapshotted when pushed.
1467
+ *
1468
+ * Replay-safe under the durable runner: the pushed components ride the tool step's journaled
1469
+ * result, so a replay neither streams nor persists them again. Present whenever the agent loop
1470
+ * runs the tool (inline, durable, dispatched); absent on surfaces with no conversation to push
1471
+ * into (the MCP server), hence optional — call it as `ctx.emitUi?.(…)` in a tool that is also
1472
+ * served there.
1473
+ */
1474
+ emitUi?(component: string, props: Record<string, unknown>, options?: {
1475
+ id?: string;
1476
+ version?: number;
1477
+ }): Promise<{
1478
+ id: string;
1479
+ }>;
1355
1480
  }
1356
1481
  /** A tool implementation. `I` is the parsed (Zod-validated) input. */
1357
1482
  interface ToolHandler<I = unknown> {
@@ -1385,4 +1510,4 @@ interface ToolHandler<I = unknown> {
1385
1510
  canUse?(actor: Actor): boolean | Promise<boolean>;
1386
1511
  }
1387
1512
 
1388
- export { type ElicitationQuestion as $, type Actor as A, ASK_TOOL_DESCRIPTION as B, ASK_TOOL_NAME as C, type DetachedDelivery as D, type ElicitationRequest as E, type AgentApprovalRequest as F, type AgentApprovalSettlement as G, type HumanReply as H, type InputProcessor as I, type AgentCatalogEntry as J, type AgentHistoryWindow as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentStreamEvent as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AskToolInput as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as V, DEFAULT_INTAKE_PREAMBLE as W, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as X, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Y, type ElicitationOption as Z, type ElicitationOutcome as _, type ToolDefinition as a, type ElicitationReply as a0, type ElicitationResult as a1, type HistoryPolicyContext as a2, type HistorySelection as a3, type HistorySummary as a4, type IncrementalGating as a5, type InvokeWithTransientRetryOptions as a6, MAX_ASK_QUESTIONS as a7, type MessageRole as a8, OutputRejectedError as a9, type OutputVerdict as aa, ProcessorFailedError as ab, type PromptContext as ac, type QuotaView as ad, type ToolCallApprovalStatus as ae, type ToolCatalogEntry as af, type ToolConfirmation as ag, type ToolPresentation as ah, type ToolPresentationTone as ai, type ToolResultField as aj, type ToolResultView as ak, type ToolStepCtx as al, type ToolTransientRetryNumbers as am, type ToolTransientRetryOptions as an, askInputSchema as ao, askToolDefinition as ap, decodeStreamEvent as aq, encodeStreamEvent as ar, invokeWithTransientRetry as as, isTransientToolError as at, normalizeElicitationReply as au, renderElicitationAnswers as av, resolveElicitation as aw, resolveToolTransientRetryNumbers as ax, settleElicitation as ay, type ToolCallRequest as b, type MessageUsage as c, type AgentUiComponent as d, type ThreadSummary as e, type ThreadDetail as f, type ToolResult as g, type MessageAttachment as h, type ToolCallStatus as i, type ToolSpec as j, type AgentRunInput as k, type ToolKind as l, type ToolCallApproval as m, type HistoryPolicy as n, type ProcessedPrompt as o, type ModelAnswer as p, type PageContext as q, type AgentDefinition as r, type AgentDelegation as s, type AiToolCtx as t, type PromptBuilder as u, type PromptContributor as v, type ToolTransientRetrySetting as w, type AgentIntake as x, type Decision as y, type ToolStepEnvelope as z };
1513
+ export { type ElicitationInputType as $, type Actor as A, type ToolStepEnvelope as B, ASK_TOOL_DESCRIPTION as C, type DetachedDelivery as D, type ElicitationRequest as E, ASK_TOOL_NAME as F, type AgentApprovalRequest as G, type HumanReply as H, type InputProcessor as I, type AgentApprovalSettlement as J, type AgentCatalogEntry as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentHistoryWindow as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AskToolInput as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as V, DEFAULT_INTAKE_PREAMBLE as W, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as X, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Y, ELICITATION_INPUT_TYPES as Z, type ElicitationInput as _, type ToolDefinition as a, type ElicitationOption as a0, type ElicitationOutcome as a1, type ElicitationQuestion as a2, type ElicitationReply as a3, type ElicitationResult as a4, type HistoryPolicyContext as a5, type HistorySelection as a6, type HistorySummary as a7, type IncrementalGating as a8, type InvokeWithTransientRetryOptions as a9, readElicitationInput as aA, readElicitationQuestions as aB, renderElicitationAnswers as aC, resolveElicitation as aD, resolveToolTransientRetryNumbers as aE, settleElicitation as aF, validateElicitationAnswer as aG, validateElicitationValue as aH, MAX_ASK_QUESTIONS as aa, type MessageRole as ab, OutputRejectedError as ac, type OutputVerdict as ad, ProcessorFailedError as ae, type PromptContext as af, type QuotaView as ag, type ToolCallApprovalStatus as ah, type ToolCatalogEntry as ai, type ToolConfirmation as aj, type ToolPresentation as ak, type ToolPresentationTone as al, type ToolResultField as am, type ToolResultView as an, type ToolStepCtx as ao, type ToolTransientRetryNumbers as ap, type ToolTransientRetryOptions as aq, askInputSchema as ar, askToolDefinition as as, decodeStreamEvent as at, encodeStreamEvent as au, invokeWithTransientRetry as av, isTransientToolError as aw, isTypedQuestion as ax, normalizeElicitationReply as ay, questionOptions as az, type ToolCallRequest as b, type MessageUsage as c, type AgentUiComponent as d, type AiToolCtx as e, type AgentStreamEvent as f, type ThreadSummary as g, type ThreadDetail as h, type ToolResult as i, type MessageAttachment as j, type ToolCallStatus as k, type ToolSpec as l, type AgentRunInput as m, type ToolKind as n, type ToolCallApproval as o, type HistoryPolicy as p, type ProcessedPrompt as q, type ModelAnswer as r, type PageContext as s, type AgentDefinition as t, type AgentDelegation as u, type PromptBuilder as v, type PromptContributor as w, type ToolTransientRetrySetting as x, type AgentIntake as y, type Decision as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudousxd/nestjs-agent-core",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/DavideCarvalho/nestjs-agent.git",