@dudousxd/nestjs-agent-core 0.27.0 → 0.28.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,4 +1,4 @@
1
- import { M as ModelMessage, A as Actor, d as ToolCallRequest } from './tool-BXKG2xSm.js';
1
+ import { M as ModelMessage, A as Actor, d as ToolCallRequest } from './tool-BJ5jVoH2.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,4 +1,4 @@
1
- import { M as ModelMessage, A as Actor, d as ToolCallRequest } from './tool-BXKG2xSm.cjs';
1
+ import { M as ModelMessage, A as Actor, d as ToolCallRequest } from './tool-BJ5jVoH2.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
@@ -1250,7 +1250,6 @@ interface ToolCallApproval {
1250
1250
  }
1251
1251
  interface ThreadDetail extends ThreadSummary {
1252
1252
  messages: StoredMessage[];
1253
- activeStreamId?: string;
1254
1253
  }
1255
1254
  type ToolCallStatus = 'auto_executed' | 'pending_approval' | 'executed' | 'rejected' | 'failed'
1256
1255
  /** An approval request lapsed before anyone decided; the tool never ran. */
@@ -1316,6 +1315,36 @@ interface ToolStepEnvelope {
1316
1315
  */
1317
1316
  collectUi?: boolean;
1318
1317
  }
1318
+ /**
1319
+ * What `GET <base>/config` answers — server-side facts a client would otherwise repeat in its own
1320
+ * configuration (and let drift).
1321
+ */
1322
+ interface AgentClientConfig {
1323
+ attachments: AgentAttachmentConfig;
1324
+ /** A model catalog is bound, so `GET <base>/models` lists something to pick. */
1325
+ models: {
1326
+ enabled: boolean;
1327
+ };
1328
+ /** Sends are refused with `429` once `GET <base>/quota` reports `blocked`. */
1329
+ quota: {
1330
+ enforced: boolean;
1331
+ };
1332
+ /** No `actorResolver`: every browser is its own anonymous actor. */
1333
+ identity: {
1334
+ anonymous: boolean;
1335
+ };
1336
+ }
1337
+ /** The attachment rules in force — what the upload route enforces. */
1338
+ interface AgentAttachmentConfig {
1339
+ /** A staging store is bound, so uploads work at all. */
1340
+ enabled: boolean;
1341
+ /** How a client uploads (`null` when `enabled` is false). */
1342
+ upload: 'multipart' | 'resumable' | null;
1343
+ maxBytes: number;
1344
+ allowedContentTypes: readonly string[];
1345
+ /** How many attachments one message may name. */
1346
+ maxPerMessage: number;
1347
+ }
1319
1348
 
1320
1349
  /**
1321
1350
  * Per-invocation context handed to a tool handler. Host-supplied bits are optional. Identity lives
@@ -1411,4 +1440,4 @@ interface ToolDescription {
1411
1440
  inputSchema?: StandardSchemaV1;
1412
1441
  }
1413
1442
 
1414
- export { type ElicitationQuestion 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 AgentApprovalSettlement as I, type AgentCatalogEntry as J, type AgentHistoryWindow as K, type LlmStepEnvelope as L, type ModelMessage as M, type AskToolInput as N, DEFAULT_INTAKE_PREAMBLE as O, type PageContext as P, type QuotaState as Q, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as R, type StoredMessage as S, type ToolSpec as T, type UsagePurpose as U, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as V, ELICITATION_INPUT_TYPES as W, type ElicitationInput as X, type ElicitationInputType as Y, type ElicitationOption as Z, type ElicitationOutcome as _, type ToolHandler as a, type ElicitationReply as a0, type ElicitationResult as a1, type HistoryPolicyContext as a2, type HistorySelection as a3, type HistorySummary as a4, type InvokeWithTransientRetryOptions as a5, MAX_ASK_QUESTIONS as a6, type MessageFeedbackValue as a7, type MessageRole as a8, type PromptContext as a9, validateElicitationAnswer as aA, validateElicitationValue as aB, type QuotaView as aa, type ToolCallApprovalStatus as ab, type ToolCatalogEntry as ac, type ToolConfirmation as ad, type ToolDescription as ae, type ToolPresentationTone as af, type ToolResultField as ag, type ToolResultView as ah, type ToolStepCtx as ai, type ToolTransientRetryNumbers as aj, type ToolTransientRetryOptions as ak, askInputSchema as al, askToolDefinition as am, decodeStreamEvent as an, encodeStreamEvent as ao, invokeWithTransientRetry as ap, isTransientToolError as aq, isTypedQuestion as ar, normalizeElicitationReply as as, questionOptions as at, readElicitationInput as au, readElicitationQuestions as av, renderElicitationAnswers as aw, resolveElicitation as ax, resolveToolTransientRetryNumbers as ay, settleElicitation as az, type ToolPresentation as b, type ToolDefinition as c, type ToolCallRequest as d, type MessageUsage as e, type AgentUiComponent as f, type AiToolCtx as g, type AgentStreamEvent as h, type ThreadSummary as i, type ThreadDetail as j, type ToolResult as k, type MessageAttachment as l, type MessageFeedback as m, type ToolCallStatus as n, type AgentRunInput as o, type ToolKind as p, type ToolCallApproval as q, type HistoryPolicy as r, type AgentDefinition as s, type AgentDelegation as t, type ToolDescribeScope as u, type PromptBuilder as v, type PromptContributor as w, type ToolTransientRetrySetting as x, type AgentIntake as y, type Decision as z };
1443
+ export { type ElicitationOption 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 AgentApprovalSettlement as I, type AgentAttachmentConfig as J, type AgentCatalogEntry as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentClientConfig as N, type AgentHistoryWindow as O, type PageContext as P, type QuotaState as Q, type AskToolInput as R, type StoredMessage as S, type ToolSpec as T, type UsagePurpose as U, DEFAULT_INTAKE_PREAMBLE as V, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as W, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as X, ELICITATION_INPUT_TYPES as Y, type ElicitationInput as Z, type ElicitationInputType as _, type ToolHandler as a, type ElicitationOutcome as a0, type ElicitationQuestion as a1, type ElicitationReply as a2, type ElicitationResult as a3, type HistoryPolicyContext as a4, type HistorySelection as a5, type HistorySummary as a6, type InvokeWithTransientRetryOptions as a7, MAX_ASK_QUESTIONS as a8, type MessageFeedbackValue as a9, resolveToolTransientRetryNumbers as aA, settleElicitation as aB, validateElicitationAnswer as aC, validateElicitationValue as aD, type MessageRole as aa, type PromptContext as ab, type QuotaView as ac, type ToolCallApprovalStatus as ad, type ToolCatalogEntry as ae, type ToolConfirmation as af, type ToolDescription as ag, type ToolPresentationTone as ah, type ToolResultField as ai, type ToolResultView as aj, type ToolStepCtx as ak, type ToolTransientRetryNumbers as al, type ToolTransientRetryOptions as am, askInputSchema as an, askToolDefinition as ao, decodeStreamEvent as ap, encodeStreamEvent as aq, invokeWithTransientRetry as ar, isTransientToolError as as, isTypedQuestion as at, normalizeElicitationReply as au, questionOptions as av, readElicitationInput as aw, readElicitationQuestions as ax, renderElicitationAnswers as ay, resolveElicitation as az, type ToolPresentation as b, type ToolDefinition as c, type ToolCallRequest as d, type MessageUsage as e, type AgentUiComponent as f, type AiToolCtx as g, type AgentStreamEvent as h, type ThreadSummary as i, type ThreadDetail as j, type ToolResult as k, type MessageAttachment as l, type MessageFeedback as m, type ToolCallStatus as n, type AgentRunInput as o, type ToolKind as p, type ToolCallApproval as q, type HistoryPolicy as r, type AgentDefinition as s, type AgentDelegation as t, type ToolDescribeScope as u, type PromptBuilder as v, type PromptContributor as w, type ToolTransientRetrySetting as x, type AgentIntake as y, type Decision as z };
@@ -1250,7 +1250,6 @@ interface ToolCallApproval {
1250
1250
  }
1251
1251
  interface ThreadDetail extends ThreadSummary {
1252
1252
  messages: StoredMessage[];
1253
- activeStreamId?: string;
1254
1253
  }
1255
1254
  type ToolCallStatus = 'auto_executed' | 'pending_approval' | 'executed' | 'rejected' | 'failed'
1256
1255
  /** An approval request lapsed before anyone decided; the tool never ran. */
@@ -1316,6 +1315,36 @@ interface ToolStepEnvelope {
1316
1315
  */
1317
1316
  collectUi?: boolean;
1318
1317
  }
1318
+ /**
1319
+ * What `GET <base>/config` answers — server-side facts a client would otherwise repeat in its own
1320
+ * configuration (and let drift).
1321
+ */
1322
+ interface AgentClientConfig {
1323
+ attachments: AgentAttachmentConfig;
1324
+ /** A model catalog is bound, so `GET <base>/models` lists something to pick. */
1325
+ models: {
1326
+ enabled: boolean;
1327
+ };
1328
+ /** Sends are refused with `429` once `GET <base>/quota` reports `blocked`. */
1329
+ quota: {
1330
+ enforced: boolean;
1331
+ };
1332
+ /** No `actorResolver`: every browser is its own anonymous actor. */
1333
+ identity: {
1334
+ anonymous: boolean;
1335
+ };
1336
+ }
1337
+ /** The attachment rules in force — what the upload route enforces. */
1338
+ interface AgentAttachmentConfig {
1339
+ /** A staging store is bound, so uploads work at all. */
1340
+ enabled: boolean;
1341
+ /** How a client uploads (`null` when `enabled` is false). */
1342
+ upload: 'multipart' | 'resumable' | null;
1343
+ maxBytes: number;
1344
+ allowedContentTypes: readonly string[];
1345
+ /** How many attachments one message may name. */
1346
+ maxPerMessage: number;
1347
+ }
1319
1348
 
1320
1349
  /**
1321
1350
  * Per-invocation context handed to a tool handler. Host-supplied bits are optional. Identity lives
@@ -1411,4 +1440,4 @@ interface ToolDescription {
1411
1440
  inputSchema?: StandardSchemaV1;
1412
1441
  }
1413
1442
 
1414
- export { type ElicitationQuestion 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 AgentApprovalSettlement as I, type AgentCatalogEntry as J, type AgentHistoryWindow as K, type LlmStepEnvelope as L, type ModelMessage as M, type AskToolInput as N, DEFAULT_INTAKE_PREAMBLE as O, type PageContext as P, type QuotaState as Q, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as R, type StoredMessage as S, type ToolSpec as T, type UsagePurpose as U, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as V, ELICITATION_INPUT_TYPES as W, type ElicitationInput as X, type ElicitationInputType as Y, type ElicitationOption as Z, type ElicitationOutcome as _, type ToolHandler as a, type ElicitationReply as a0, type ElicitationResult as a1, type HistoryPolicyContext as a2, type HistorySelection as a3, type HistorySummary as a4, type InvokeWithTransientRetryOptions as a5, MAX_ASK_QUESTIONS as a6, type MessageFeedbackValue as a7, type MessageRole as a8, type PromptContext as a9, validateElicitationAnswer as aA, validateElicitationValue as aB, type QuotaView as aa, type ToolCallApprovalStatus as ab, type ToolCatalogEntry as ac, type ToolConfirmation as ad, type ToolDescription as ae, type ToolPresentationTone as af, type ToolResultField as ag, type ToolResultView as ah, type ToolStepCtx as ai, type ToolTransientRetryNumbers as aj, type ToolTransientRetryOptions as ak, askInputSchema as al, askToolDefinition as am, decodeStreamEvent as an, encodeStreamEvent as ao, invokeWithTransientRetry as ap, isTransientToolError as aq, isTypedQuestion as ar, normalizeElicitationReply as as, questionOptions as at, readElicitationInput as au, readElicitationQuestions as av, renderElicitationAnswers as aw, resolveElicitation as ax, resolveToolTransientRetryNumbers as ay, settleElicitation as az, type ToolPresentation as b, type ToolDefinition as c, type ToolCallRequest as d, type MessageUsage as e, type AgentUiComponent as f, type AiToolCtx as g, type AgentStreamEvent as h, type ThreadSummary as i, type ThreadDetail as j, type ToolResult as k, type MessageAttachment as l, type MessageFeedback as m, type ToolCallStatus as n, type AgentRunInput as o, type ToolKind as p, type ToolCallApproval as q, type HistoryPolicy as r, type AgentDefinition as s, type AgentDelegation as t, type ToolDescribeScope as u, type PromptBuilder as v, type PromptContributor as w, type ToolTransientRetrySetting as x, type AgentIntake as y, type Decision as z };
1443
+ export { type ElicitationOption 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 AgentApprovalSettlement as I, type AgentAttachmentConfig as J, type AgentCatalogEntry as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentClientConfig as N, type AgentHistoryWindow as O, type PageContext as P, type QuotaState as Q, type AskToolInput as R, type StoredMessage as S, type ToolSpec as T, type UsagePurpose as U, DEFAULT_INTAKE_PREAMBLE as V, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as W, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as X, ELICITATION_INPUT_TYPES as Y, type ElicitationInput as Z, type ElicitationInputType as _, type ToolHandler as a, type ElicitationOutcome as a0, type ElicitationQuestion as a1, type ElicitationReply as a2, type ElicitationResult as a3, type HistoryPolicyContext as a4, type HistorySelection as a5, type HistorySummary as a6, type InvokeWithTransientRetryOptions as a7, MAX_ASK_QUESTIONS as a8, type MessageFeedbackValue as a9, resolveToolTransientRetryNumbers as aA, settleElicitation as aB, validateElicitationAnswer as aC, validateElicitationValue as aD, type MessageRole as aa, type PromptContext as ab, type QuotaView as ac, type ToolCallApprovalStatus as ad, type ToolCatalogEntry as ae, type ToolConfirmation as af, type ToolDescription as ag, type ToolPresentationTone as ah, type ToolResultField as ai, type ToolResultView as aj, type ToolStepCtx as ak, type ToolTransientRetryNumbers as al, type ToolTransientRetryOptions as am, askInputSchema as an, askToolDefinition as ao, decodeStreamEvent as ap, encodeStreamEvent as aq, invokeWithTransientRetry as ar, isTransientToolError as as, isTypedQuestion as at, normalizeElicitationReply as au, questionOptions as av, readElicitationInput as aw, readElicitationQuestions as ax, renderElicitationAnswers as ay, resolveElicitation as az, type ToolPresentation as b, type ToolDefinition as c, type ToolCallRequest as d, type MessageUsage as e, type AgentUiComponent as f, type AiToolCtx as g, type AgentStreamEvent as h, type ThreadSummary as i, type ThreadDetail as j, type ToolResult as k, type MessageAttachment as l, type MessageFeedback as m, type ToolCallStatus as n, type AgentRunInput as o, type ToolKind as p, type ToolCallApproval as q, type HistoryPolicy as r, type AgentDefinition as s, type AgentDelegation as t, type ToolDescribeScope 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.27.0",
3
+ "version": "0.28.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/DavideCarvalho/nestjs-agent.git",