@dudousxd/nestjs-agent-core 0.22.0 → 0.24.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/guardrails/index.d.cts +1 -1
- package/dist/guardrails/index.d.ts +1 -1
- package/dist/index.cjs +43 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -4
- package/dist/index.d.ts +81 -4
- package/dist/index.js +39 -1
- package/dist/index.js.map +1 -1
- package/dist/{tool-BQqFt06V.d.cts → tool-fLRLs_f3.d.cts} +29 -1
- package/dist/{tool-BQqFt06V.d.ts → tool-fLRLs_f3.d.ts} +29 -1
- package/package.json +1 -1
|
@@ -1072,6 +1072,12 @@ interface AgentRunInput {
|
|
|
1072
1072
|
* "regenerate" button. `userText` is ignored when set.
|
|
1073
1073
|
*/
|
|
1074
1074
|
regenerate?: boolean;
|
|
1075
|
+
/**
|
|
1076
|
+
* The model this turn runs on — a catalog id the service already checked (a per-send pick, else
|
|
1077
|
+
* the thread's pinned model). Handed to the provider as `ModelTurnArgs.model`, and the usage
|
|
1078
|
+
* label when the provider reports none. Omitted → the provider's default.
|
|
1079
|
+
*/
|
|
1080
|
+
model?: string;
|
|
1075
1081
|
}
|
|
1076
1082
|
/**
|
|
1077
1083
|
* A named agent: its prompt, the tools it may use, and who it can hand off to. This is the
|
|
@@ -1163,6 +1169,12 @@ interface ThreadSummary {
|
|
|
1163
1169
|
* read-model normalizes this to `null` when absent, so a client can always do `?? null`.
|
|
1164
1170
|
*/
|
|
1165
1171
|
activeRunId?: string | null;
|
|
1172
|
+
/**
|
|
1173
|
+
* The model pinned on this thread (`PATCH /threads/:id { model }`) — every turn without its own
|
|
1174
|
+
* `model` runs on it. `null` → the provider's default. Undefined for a store that does not persist
|
|
1175
|
+
* it; the REST read-model normalizes that to `null`.
|
|
1176
|
+
*/
|
|
1177
|
+
model?: string | null;
|
|
1166
1178
|
}
|
|
1167
1179
|
interface StoredMessage {
|
|
1168
1180
|
id: string;
|
|
@@ -1198,8 +1210,22 @@ interface StoredMessage {
|
|
|
1198
1210
|
* for one, or on a store that does not record approvals.
|
|
1199
1211
|
*/
|
|
1200
1212
|
approvals?: ToolCallApproval[];
|
|
1213
|
+
/**
|
|
1214
|
+
* The thread owner's rating of this message (`POST <base>/messages/:id/feedback`). Absent when
|
|
1215
|
+
* nobody rated it, or on a store that does not record feedback.
|
|
1216
|
+
*/
|
|
1217
|
+
feedback?: MessageFeedback;
|
|
1201
1218
|
createdAt: string;
|
|
1202
1219
|
}
|
|
1220
|
+
/** A thumbs-up/down on one message, with an optional free-text comment. */
|
|
1221
|
+
type MessageFeedbackValue = 'up' | 'down';
|
|
1222
|
+
/** What {@link StoredMessage.feedback} holds. Not copied when a thread is forked. */
|
|
1223
|
+
interface MessageFeedback {
|
|
1224
|
+
value: MessageFeedbackValue;
|
|
1225
|
+
comment?: string;
|
|
1226
|
+
/** ISO-8601 instant the rating was last set. */
|
|
1227
|
+
updatedAt: string;
|
|
1228
|
+
}
|
|
1203
1229
|
/**
|
|
1204
1230
|
* How one approval stands. `pending` → still parked; `approved` → someone said yes (or a remembered
|
|
1205
1231
|
* approval did); `rejected` → someone said no; `expired` → nobody answered before `expiresAt`.
|
|
@@ -1247,6 +1273,8 @@ interface LlmStepEnvelope {
|
|
|
1247
1273
|
* interpose on, so the instruction has to ride the envelope. Absent → stream live, as before.
|
|
1248
1274
|
*/
|
|
1249
1275
|
bufferOutput?: boolean;
|
|
1276
|
+
/** The turn's selected model ({@link AgentRunInput.model}), for the worker's provider call. */
|
|
1277
|
+
model?: string;
|
|
1250
1278
|
}
|
|
1251
1279
|
/**
|
|
1252
1280
|
* The serializable subset of `AiToolCtx` — everything except `host` (re-attached handler-side
|
|
@@ -1510,4 +1538,4 @@ interface ToolHandler<I = unknown> {
|
|
|
1510
1538
|
canUse?(actor: Actor): boolean | Promise<boolean>;
|
|
1511
1539
|
}
|
|
1512
1540
|
|
|
1513
|
-
export { type
|
|
1541
|
+
export { type ElicitationInput as $, type Actor as A, type Decision as B, type ToolStepEnvelope as C, type DetachedDelivery as D, type ElicitationRequest as E, ASK_TOOL_DESCRIPTION as F, ASK_TOOL_NAME as G, type HumanReply as H, type InputProcessor as I, type AgentApprovalRequest as J, type AgentApprovalSettlement as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentCatalogEntry as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AgentHistoryWindow as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, type AskToolInput as V, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as W, DEFAULT_INTAKE_PREAMBLE as X, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as Y, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Z, ELICITATION_INPUT_TYPES as _, type ToolDefinition as a, type ElicitationInputType as a0, type ElicitationOption as a1, type ElicitationOutcome as a2, type ElicitationQuestion as a3, type ElicitationReply as a4, type ElicitationResult as a5, type HistoryPolicyContext as a6, type HistorySelection as a7, type HistorySummary as a8, type IncrementalGating as a9, normalizeElicitationReply as aA, questionOptions as aB, readElicitationInput as aC, readElicitationQuestions as aD, renderElicitationAnswers as aE, resolveElicitation as aF, resolveToolTransientRetryNumbers as aG, settleElicitation as aH, validateElicitationAnswer as aI, validateElicitationValue as aJ, type InvokeWithTransientRetryOptions as aa, MAX_ASK_QUESTIONS as ab, type MessageFeedbackValue as ac, type MessageRole as ad, OutputRejectedError as ae, type OutputVerdict as af, ProcessorFailedError as ag, type PromptContext as ah, type QuotaView as ai, type ToolCallApprovalStatus as aj, type ToolCatalogEntry as ak, type ToolConfirmation as al, type ToolPresentation as am, type ToolPresentationTone as an, type ToolResultField as ao, type ToolResultView as ap, type ToolStepCtx as aq, type ToolTransientRetryNumbers as ar, type ToolTransientRetryOptions as as, askInputSchema as at, askToolDefinition as au, decodeStreamEvent as av, encodeStreamEvent as aw, invokeWithTransientRetry as ax, isTransientToolError as ay, isTypedQuestion 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 MessageFeedback as k, type ToolCallStatus as l, type ToolSpec as m, type AgentRunInput as n, type ToolKind as o, type ToolCallApproval as p, type HistoryPolicy as q, type ProcessedPrompt as r, type ModelAnswer as s, type PageContext as t, type AgentDefinition as u, type AgentDelegation as v, type PromptBuilder as w, type PromptContributor as x, type ToolTransientRetrySetting as y, type AgentIntake as z };
|
|
@@ -1072,6 +1072,12 @@ interface AgentRunInput {
|
|
|
1072
1072
|
* "regenerate" button. `userText` is ignored when set.
|
|
1073
1073
|
*/
|
|
1074
1074
|
regenerate?: boolean;
|
|
1075
|
+
/**
|
|
1076
|
+
* The model this turn runs on — a catalog id the service already checked (a per-send pick, else
|
|
1077
|
+
* the thread's pinned model). Handed to the provider as `ModelTurnArgs.model`, and the usage
|
|
1078
|
+
* label when the provider reports none. Omitted → the provider's default.
|
|
1079
|
+
*/
|
|
1080
|
+
model?: string;
|
|
1075
1081
|
}
|
|
1076
1082
|
/**
|
|
1077
1083
|
* A named agent: its prompt, the tools it may use, and who it can hand off to. This is the
|
|
@@ -1163,6 +1169,12 @@ interface ThreadSummary {
|
|
|
1163
1169
|
* read-model normalizes this to `null` when absent, so a client can always do `?? null`.
|
|
1164
1170
|
*/
|
|
1165
1171
|
activeRunId?: string | null;
|
|
1172
|
+
/**
|
|
1173
|
+
* The model pinned on this thread (`PATCH /threads/:id { model }`) — every turn without its own
|
|
1174
|
+
* `model` runs on it. `null` → the provider's default. Undefined for a store that does not persist
|
|
1175
|
+
* it; the REST read-model normalizes that to `null`.
|
|
1176
|
+
*/
|
|
1177
|
+
model?: string | null;
|
|
1166
1178
|
}
|
|
1167
1179
|
interface StoredMessage {
|
|
1168
1180
|
id: string;
|
|
@@ -1198,8 +1210,22 @@ interface StoredMessage {
|
|
|
1198
1210
|
* for one, or on a store that does not record approvals.
|
|
1199
1211
|
*/
|
|
1200
1212
|
approvals?: ToolCallApproval[];
|
|
1213
|
+
/**
|
|
1214
|
+
* The thread owner's rating of this message (`POST <base>/messages/:id/feedback`). Absent when
|
|
1215
|
+
* nobody rated it, or on a store that does not record feedback.
|
|
1216
|
+
*/
|
|
1217
|
+
feedback?: MessageFeedback;
|
|
1201
1218
|
createdAt: string;
|
|
1202
1219
|
}
|
|
1220
|
+
/** A thumbs-up/down on one message, with an optional free-text comment. */
|
|
1221
|
+
type MessageFeedbackValue = 'up' | 'down';
|
|
1222
|
+
/** What {@link StoredMessage.feedback} holds. Not copied when a thread is forked. */
|
|
1223
|
+
interface MessageFeedback {
|
|
1224
|
+
value: MessageFeedbackValue;
|
|
1225
|
+
comment?: string;
|
|
1226
|
+
/** ISO-8601 instant the rating was last set. */
|
|
1227
|
+
updatedAt: string;
|
|
1228
|
+
}
|
|
1203
1229
|
/**
|
|
1204
1230
|
* How one approval stands. `pending` → still parked; `approved` → someone said yes (or a remembered
|
|
1205
1231
|
* approval did); `rejected` → someone said no; `expired` → nobody answered before `expiresAt`.
|
|
@@ -1247,6 +1273,8 @@ interface LlmStepEnvelope {
|
|
|
1247
1273
|
* interpose on, so the instruction has to ride the envelope. Absent → stream live, as before.
|
|
1248
1274
|
*/
|
|
1249
1275
|
bufferOutput?: boolean;
|
|
1276
|
+
/** The turn's selected model ({@link AgentRunInput.model}), for the worker's provider call. */
|
|
1277
|
+
model?: string;
|
|
1250
1278
|
}
|
|
1251
1279
|
/**
|
|
1252
1280
|
* The serializable subset of `AiToolCtx` — everything except `host` (re-attached handler-side
|
|
@@ -1510,4 +1538,4 @@ interface ToolHandler<I = unknown> {
|
|
|
1510
1538
|
canUse?(actor: Actor): boolean | Promise<boolean>;
|
|
1511
1539
|
}
|
|
1512
1540
|
|
|
1513
|
-
export { type
|
|
1541
|
+
export { type ElicitationInput as $, type Actor as A, type Decision as B, type ToolStepEnvelope as C, type DetachedDelivery as D, type ElicitationRequest as E, ASK_TOOL_DESCRIPTION as F, ASK_TOOL_NAME as G, type HumanReply as H, type InputProcessor as I, type AgentApprovalRequest as J, type AgentApprovalSettlement as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentCatalogEntry as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AgentHistoryWindow as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, type AskToolInput as V, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as W, DEFAULT_INTAKE_PREAMBLE as X, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as Y, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Z, ELICITATION_INPUT_TYPES as _, type ToolDefinition as a, type ElicitationInputType as a0, type ElicitationOption as a1, type ElicitationOutcome as a2, type ElicitationQuestion as a3, type ElicitationReply as a4, type ElicitationResult as a5, type HistoryPolicyContext as a6, type HistorySelection as a7, type HistorySummary as a8, type IncrementalGating as a9, normalizeElicitationReply as aA, questionOptions as aB, readElicitationInput as aC, readElicitationQuestions as aD, renderElicitationAnswers as aE, resolveElicitation as aF, resolveToolTransientRetryNumbers as aG, settleElicitation as aH, validateElicitationAnswer as aI, validateElicitationValue as aJ, type InvokeWithTransientRetryOptions as aa, MAX_ASK_QUESTIONS as ab, type MessageFeedbackValue as ac, type MessageRole as ad, OutputRejectedError as ae, type OutputVerdict as af, ProcessorFailedError as ag, type PromptContext as ah, type QuotaView as ai, type ToolCallApprovalStatus as aj, type ToolCatalogEntry as ak, type ToolConfirmation as al, type ToolPresentation as am, type ToolPresentationTone as an, type ToolResultField as ao, type ToolResultView as ap, type ToolStepCtx as aq, type ToolTransientRetryNumbers as ar, type ToolTransientRetryOptions as as, askInputSchema as at, askToolDefinition as au, decodeStreamEvent as av, encodeStreamEvent as aw, invokeWithTransientRetry as ax, isTransientToolError as ay, isTypedQuestion 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 MessageFeedback as k, type ToolCallStatus as l, type ToolSpec as m, type AgentRunInput as n, type ToolKind as o, type ToolCallApproval as p, type HistoryPolicy as q, type ProcessedPrompt as r, type ModelAnswer as s, type PageContext as t, type AgentDefinition as u, type AgentDelegation as v, type PromptBuilder as w, type PromptContributor as x, type ToolTransientRetrySetting as y, type AgentIntake as z };
|