@dudousxd/nestjs-agent-core 0.41.0 → 0.42.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/ag-ui/index.d.cts +1 -1
- package/dist/ag-ui/index.d.ts +1 -1
- package/dist/genui/index.d.cts +2 -2
- package/dist/genui/index.d.ts +2 -2
- package/dist/guardrails/index.d.cts +2 -2
- package/dist/guardrails/index.d.ts +2 -2
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/{processors-ByDr5POu.d.ts → processors-BKILjME5.d.ts} +1 -1
- package/dist/{processors-BXM-MNga.d.cts → processors-DpHBqRuE.d.cts} +1 -1
- package/dist/{stream-events-CF-6-Y6L.d.cts → stream-events-C-pj3bVY.d.cts} +20 -1
- package/dist/{stream-events-BGKLD6RX.d.ts → stream-events-D92SgfRk.d.ts} +20 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as ModelMessage, q as ToolDefinition, r as ToolCallRequest, u as MessageUsage, w as AgentUiComponent, a as Actor, x as AiToolCtx, A as AgentStreamEvent, T as ToolSpec, Q as QuotaState, y as AgentRunInput, H as HumanReply, z as MessageAttachment, B as ActionProposalMutationResult, D as ActionProposal, E as ActionProposalExecution, F as ActionProposalOutcomeDelivery, b as ToolHandler, G as AgentDefinition, I as Persona, J as PersonaCatalogEntry, K as HistoryPolicy, L as PageContext, N as AgentStore, O as AgentDelegation, R as DetachedDelivery, S as ToolDescribeScope, V as ToolPreflightResult, W as ApprovalPolicy, X as PromptBuilder, Y as PromptContributor, Z as ToolTransientRetrySetting, _ as AgentIntake, $ as Decision, a0 as ElicitationRequest, a1 as LlmStepEnvelope, a2 as ToolStepEnvelope, a3 as ClaimActionProposal, a4 as ActionProposalStore, a5 as ActionProposalStoreOptions, a6 as CreateActionProposal, a7 as CreateActionProposalResult, a8 as ActionProposalScope, a9 as ListActionProposals, aa as ActionProposalDecisionCommand, ab as ExtendActionProposalLease, ac as SettleActionProposal, ad as ActionProposalOutcome, ae as ActionProposalOutcomeLease, af as ToolCallStatus, ag as ChatQueueStore, ah as ActionProposalOutcomeStore, ai as CreateThreadInput, aj as ThreadSummary, ak as ThreadDetail, al as ToolCallApprovalState, am as UpdateThreadInput, an as RecordRunStartInput, ao as EnqueueMessageInput, ap as QueuedMessage, aq as QueuedMessagePatch, ar as QueuePause, as as AppendMessageInput, at as StoredMessage, au as ToolResult, av as MessageFeedback, aw as RecordToolCallInput, ax as ToolCallOutcome, ay as UpdateToolCallInput, az as RecordUsageInput, aA as ToolConfirmation, aB as ActionProposalDecision, aC as ActionProposalSupersessionStore } from './stream-events-
|
|
2
|
-
export { aD as ALL_AGENTS, aE as ASK_TOOL_DESCRIPTION, aF as ASK_TOOL_NAME, aG as ActionProposalDecisionAudit, aH as ActionProposalExecutionContext, aI as ActionProposalLease, aJ as AgentApprovalRequest, aK as AgentApprovalSettlement, aL as AgentAttachmentConfig, aM as AgentCatalogEntry, aN as AgentClientConfig, aO as AgentHistoryWindow, aP as
|
|
1
|
+
import { M as ModelMessage, q as ToolDefinition, r as ToolCallRequest, u as MessageUsage, w as AgentUiComponent, a as Actor, x as AiToolCtx, A as AgentStreamEvent, T as ToolSpec, Q as QuotaState, y as AgentRunInput, H as HumanReply, z as MessageAttachment, B as ActionProposalMutationResult, D as ActionProposal, E as ActionProposalExecution, F as ActionProposalOutcomeDelivery, b as ToolHandler, G as AgentDefinition, I as Persona, J as PersonaCatalogEntry, K as HistoryPolicy, L as PageContext, N as AgentStore, O as AgentDelegation, R as DetachedDelivery, S as ToolDescribeScope, V as ToolPreflightResult, W as ApprovalPolicy, X as PromptBuilder, Y as PromptContributor, Z as ToolTransientRetrySetting, _ as AgentIntake, $ as Decision, a0 as ElicitationRequest, a1 as LlmStepEnvelope, a2 as ToolStepEnvelope, a3 as ClaimActionProposal, a4 as ActionProposalStore, a5 as ActionProposalStoreOptions, a6 as CreateActionProposal, a7 as CreateActionProposalResult, a8 as ActionProposalScope, a9 as ListActionProposals, aa as ActionProposalDecisionCommand, ab as ExtendActionProposalLease, ac as SettleActionProposal, ad as ActionProposalOutcome, ae as ActionProposalOutcomeLease, af as ToolCallStatus, ag as ChatQueueStore, ah as ActionProposalOutcomeStore, ai as CreateThreadInput, aj as ThreadSummary, ak as ThreadDetail, al as ToolCallApprovalState, am as UpdateThreadInput, an as RecordRunStartInput, ao as EnqueueMessageInput, ap as QueuedMessage, aq as QueuedMessagePatch, ar as QueuePause, as as AppendMessageInput, at as StoredMessage, au as ToolResult, av as MessageFeedback, aw as RecordToolCallInput, ax as ToolCallOutcome, ay as UpdateToolCallInput, az as RecordUsageInput, aA as ToolConfirmation, aB as ActionProposalDecision, aC as ActionProposalSupersessionStore } from './stream-events-C-pj3bVY.cjs';
|
|
2
|
+
export { aD as ALL_AGENTS, aE as ASK_TOOL_DESCRIPTION, aF as ASK_TOOL_NAME, aG as ActionProposalDecisionAudit, aH as ActionProposalExecutionContext, aI as ActionProposalLease, aJ as AgentApprovalRequest, aK as AgentApprovalSettlement, aL as AgentAttachmentConfig, aM as AgentCatalogEntry, aN as AgentClientConfig, aO as AgentHistoryWindow, aP as AgentHostContext, aQ as AgentStreamErrorCode, aR as ApprovalDecisionRef, aS as ApprovalRequirement, aT as ApprovalThreadRef, aU as ApprovalToolRef, aV as AskToolInput, aW as ChatQueueState, aX as ClaimedActionApproval, aY as DEFAULT_INTAKE_PREAMBLE, aZ as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, a_ as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, a$ as DefaultApprovalPolicy, b0 as ELICITATION_INPUT_TYPES, b1 as ElicitationInput, b2 as ElicitationInputType, b3 as ElicitationOption, b4 as ElicitationOutcome, b5 as ElicitationQuestion, b6 as ElicitationReply, b7 as ElicitationResult, b8 as EmitUiOptions, b9 as HistoryPolicyContext, ba as HistorySelection, bb as HistorySummary, bc as InvokeWithTransientRetryOptions, bd as MAX_ASK_QUESTIONS, be as MessageFeedbackValue, bf as MessageRole, bg as PersonaRef, bh as PromptContext, bi as QueuePauseReason, bj as QueuedMessageView, bk as QuotaView, bl as REQUESTER_APPROVER, bm as RUN_ENDED_BEFORE_TOOL_CALL, bn as RecordRunEndInput, bo as ResolveActionProposalApprovalInput, bp as ThreadTurnPage, bq as ThreadTurnQuery, br as ThreadTurnReader, bs as ToolCallApproval, bt as ToolCallApprovalColumns, bu as ToolCallApprovalStatus, bv as ToolCatalogEntry, bw as ToolDescription, bx as ToolKind, by as ToolPreflightOptions, c as ToolPresentation, bz as ToolPresentationTone, bA as ToolResultField, bB as ToolResultView, bC as ToolStepCtx, bD as ToolTransientRetryNumbers, bE as ToolTransientRetryOptions, bF as TurnPersona, bG as UNFINISHED_TOOL_CALL, bH as UsagePurpose, bI as askInputSchema, bJ as askToolDefinition, bK as danglingToolCallIds, bL as decodeStreamEvent, bM as defaultCanDecide, bN as encodeStreamEvent, bO as invokeWithTransientRetry, bP as isChatQueueStore, bQ as isTransientToolError, bR as isTypedQuestion, bS as mayDecideApproval, bT as normalizeElicitationReply, bU as questionOptions, bV as queuedMessageView, bW as readElicitationInput, bX as readElicitationQuestions, bY as releaseThreadRun, bZ as renderElicitationAnswers, b_ as resolveActionProposalApproval, b$ as resolveElicitation, c0 as resolveToolTransientRetryNumbers, c1 as settleDanglingToolCalls, c2 as settleElicitation, c3 as toolCallApprovalFromRow, c4 as validateElicitationAnswer, c5 as validateElicitationValue } from './stream-events-C-pj3bVY.cjs';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
|
-
import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-
|
|
5
|
-
export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-
|
|
4
|
+
import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-DpHBqRuE.cjs';
|
|
5
|
+
export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-DpHBqRuE.cjs';
|
|
6
6
|
import { a as Catalog } from './catalog-BKS3Yxo6.cjs';
|
|
7
7
|
import { ChannelRegistry } from '@dudousxd/nestjs-diagnostics';
|
|
8
8
|
|
|
@@ -589,6 +589,12 @@ interface AgentRunner {
|
|
|
589
589
|
start(input: AgentRunInput, options?: AgentRunStartOptions): Promise<{
|
|
590
590
|
runId: string;
|
|
591
591
|
}>;
|
|
592
|
+
/**
|
|
593
|
+
* OPTIONAL: the id a run of `input` should have, when the caller mints one before starting it (the
|
|
594
|
+
* chat queue claims a thread under the id first). A host whose ids carry meaning — a tenant
|
|
595
|
+
* prefix its durable store partitions by — answers here. Absent → a random UUID.
|
|
596
|
+
*/
|
|
597
|
+
runIdFor?(input: AgentRunInput): string;
|
|
592
598
|
/**
|
|
593
599
|
* OPTIONAL: whether `runId` is still running (or parked, or about to start) as far as this runner
|
|
594
600
|
* can tell. Asked when a thread's admission is held by a run, to tell a live holder from a stale
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as ModelMessage, q as ToolDefinition, r as ToolCallRequest, u as MessageUsage, w as AgentUiComponent, a as Actor, x as AiToolCtx, A as AgentStreamEvent, T as ToolSpec, Q as QuotaState, y as AgentRunInput, H as HumanReply, z as MessageAttachment, B as ActionProposalMutationResult, D as ActionProposal, E as ActionProposalExecution, F as ActionProposalOutcomeDelivery, b as ToolHandler, G as AgentDefinition, I as Persona, J as PersonaCatalogEntry, K as HistoryPolicy, L as PageContext, N as AgentStore, O as AgentDelegation, R as DetachedDelivery, S as ToolDescribeScope, V as ToolPreflightResult, W as ApprovalPolicy, X as PromptBuilder, Y as PromptContributor, Z as ToolTransientRetrySetting, _ as AgentIntake, $ as Decision, a0 as ElicitationRequest, a1 as LlmStepEnvelope, a2 as ToolStepEnvelope, a3 as ClaimActionProposal, a4 as ActionProposalStore, a5 as ActionProposalStoreOptions, a6 as CreateActionProposal, a7 as CreateActionProposalResult, a8 as ActionProposalScope, a9 as ListActionProposals, aa as ActionProposalDecisionCommand, ab as ExtendActionProposalLease, ac as SettleActionProposal, ad as ActionProposalOutcome, ae as ActionProposalOutcomeLease, af as ToolCallStatus, ag as ChatQueueStore, ah as ActionProposalOutcomeStore, ai as CreateThreadInput, aj as ThreadSummary, ak as ThreadDetail, al as ToolCallApprovalState, am as UpdateThreadInput, an as RecordRunStartInput, ao as EnqueueMessageInput, ap as QueuedMessage, aq as QueuedMessagePatch, ar as QueuePause, as as AppendMessageInput, at as StoredMessage, au as ToolResult, av as MessageFeedback, aw as RecordToolCallInput, ax as ToolCallOutcome, ay as UpdateToolCallInput, az as RecordUsageInput, aA as ToolConfirmation, aB as ActionProposalDecision, aC as ActionProposalSupersessionStore } from './stream-events-
|
|
2
|
-
export { aD as ALL_AGENTS, aE as ASK_TOOL_DESCRIPTION, aF as ASK_TOOL_NAME, aG as ActionProposalDecisionAudit, aH as ActionProposalExecutionContext, aI as ActionProposalLease, aJ as AgentApprovalRequest, aK as AgentApprovalSettlement, aL as AgentAttachmentConfig, aM as AgentCatalogEntry, aN as AgentClientConfig, aO as AgentHistoryWindow, aP as
|
|
1
|
+
import { M as ModelMessage, q as ToolDefinition, r as ToolCallRequest, u as MessageUsage, w as AgentUiComponent, a as Actor, x as AiToolCtx, A as AgentStreamEvent, T as ToolSpec, Q as QuotaState, y as AgentRunInput, H as HumanReply, z as MessageAttachment, B as ActionProposalMutationResult, D as ActionProposal, E as ActionProposalExecution, F as ActionProposalOutcomeDelivery, b as ToolHandler, G as AgentDefinition, I as Persona, J as PersonaCatalogEntry, K as HistoryPolicy, L as PageContext, N as AgentStore, O as AgentDelegation, R as DetachedDelivery, S as ToolDescribeScope, V as ToolPreflightResult, W as ApprovalPolicy, X as PromptBuilder, Y as PromptContributor, Z as ToolTransientRetrySetting, _ as AgentIntake, $ as Decision, a0 as ElicitationRequest, a1 as LlmStepEnvelope, a2 as ToolStepEnvelope, a3 as ClaimActionProposal, a4 as ActionProposalStore, a5 as ActionProposalStoreOptions, a6 as CreateActionProposal, a7 as CreateActionProposalResult, a8 as ActionProposalScope, a9 as ListActionProposals, aa as ActionProposalDecisionCommand, ab as ExtendActionProposalLease, ac as SettleActionProposal, ad as ActionProposalOutcome, ae as ActionProposalOutcomeLease, af as ToolCallStatus, ag as ChatQueueStore, ah as ActionProposalOutcomeStore, ai as CreateThreadInput, aj as ThreadSummary, ak as ThreadDetail, al as ToolCallApprovalState, am as UpdateThreadInput, an as RecordRunStartInput, ao as EnqueueMessageInput, ap as QueuedMessage, aq as QueuedMessagePatch, ar as QueuePause, as as AppendMessageInput, at as StoredMessage, au as ToolResult, av as MessageFeedback, aw as RecordToolCallInput, ax as ToolCallOutcome, ay as UpdateToolCallInput, az as RecordUsageInput, aA as ToolConfirmation, aB as ActionProposalDecision, aC as ActionProposalSupersessionStore } from './stream-events-D92SgfRk.js';
|
|
2
|
+
export { aD as ALL_AGENTS, aE as ASK_TOOL_DESCRIPTION, aF as ASK_TOOL_NAME, aG as ActionProposalDecisionAudit, aH as ActionProposalExecutionContext, aI as ActionProposalLease, aJ as AgentApprovalRequest, aK as AgentApprovalSettlement, aL as AgentAttachmentConfig, aM as AgentCatalogEntry, aN as AgentClientConfig, aO as AgentHistoryWindow, aP as AgentHostContext, aQ as AgentStreamErrorCode, aR as ApprovalDecisionRef, aS as ApprovalRequirement, aT as ApprovalThreadRef, aU as ApprovalToolRef, aV as AskToolInput, aW as ChatQueueState, aX as ClaimedActionApproval, aY as DEFAULT_INTAKE_PREAMBLE, aZ as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, a_ as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, a$ as DefaultApprovalPolicy, b0 as ELICITATION_INPUT_TYPES, b1 as ElicitationInput, b2 as ElicitationInputType, b3 as ElicitationOption, b4 as ElicitationOutcome, b5 as ElicitationQuestion, b6 as ElicitationReply, b7 as ElicitationResult, b8 as EmitUiOptions, b9 as HistoryPolicyContext, ba as HistorySelection, bb as HistorySummary, bc as InvokeWithTransientRetryOptions, bd as MAX_ASK_QUESTIONS, be as MessageFeedbackValue, bf as MessageRole, bg as PersonaRef, bh as PromptContext, bi as QueuePauseReason, bj as QueuedMessageView, bk as QuotaView, bl as REQUESTER_APPROVER, bm as RUN_ENDED_BEFORE_TOOL_CALL, bn as RecordRunEndInput, bo as ResolveActionProposalApprovalInput, bp as ThreadTurnPage, bq as ThreadTurnQuery, br as ThreadTurnReader, bs as ToolCallApproval, bt as ToolCallApprovalColumns, bu as ToolCallApprovalStatus, bv as ToolCatalogEntry, bw as ToolDescription, bx as ToolKind, by as ToolPreflightOptions, c as ToolPresentation, bz as ToolPresentationTone, bA as ToolResultField, bB as ToolResultView, bC as ToolStepCtx, bD as ToolTransientRetryNumbers, bE as ToolTransientRetryOptions, bF as TurnPersona, bG as UNFINISHED_TOOL_CALL, bH as UsagePurpose, bI as askInputSchema, bJ as askToolDefinition, bK as danglingToolCallIds, bL as decodeStreamEvent, bM as defaultCanDecide, bN as encodeStreamEvent, bO as invokeWithTransientRetry, bP as isChatQueueStore, bQ as isTransientToolError, bR as isTypedQuestion, bS as mayDecideApproval, bT as normalizeElicitationReply, bU as questionOptions, bV as queuedMessageView, bW as readElicitationInput, bX as readElicitationQuestions, bY as releaseThreadRun, bZ as renderElicitationAnswers, b_ as resolveActionProposalApproval, b$ as resolveElicitation, c0 as resolveToolTransientRetryNumbers, c1 as settleDanglingToolCalls, c2 as settleElicitation, c3 as toolCallApprovalFromRow, c4 as validateElicitationAnswer, c5 as validateElicitationValue } from './stream-events-D92SgfRk.js';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
|
-
import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-
|
|
5
|
-
export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-
|
|
4
|
+
import { O as OutputProcessor, P as ProcessorContext, I as InputProcessor, a as ProcessedPrompt, M as ModelAnswer } from './processors-BKILjME5.js';
|
|
5
|
+
export { D as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, b as IncrementalGating, c as OutputRejectedError, d as OutputVerdict, e as ProcessorFailedError } from './processors-BKILjME5.js';
|
|
6
6
|
import { a as Catalog } from './catalog-BKS3Yxo6.js';
|
|
7
7
|
import { ChannelRegistry } from '@dudousxd/nestjs-diagnostics';
|
|
8
8
|
|
|
@@ -589,6 +589,12 @@ interface AgentRunner {
|
|
|
589
589
|
start(input: AgentRunInput, options?: AgentRunStartOptions): Promise<{
|
|
590
590
|
runId: string;
|
|
591
591
|
}>;
|
|
592
|
+
/**
|
|
593
|
+
* OPTIONAL: the id a run of `input` should have, when the caller mints one before starting it (the
|
|
594
|
+
* chat queue claims a thread under the id first). A host whose ids carry meaning — a tenant
|
|
595
|
+
* prefix its durable store partitions by — answers here. Absent → a random UUID.
|
|
596
|
+
*/
|
|
597
|
+
runIdFor?(input: AgentRunInput): string;
|
|
592
598
|
/**
|
|
593
599
|
* OPTIONAL: whether `runId` is still running (or parked, or about to start) as far as this runner
|
|
594
600
|
* can tell. Asked when a thread's admission is held by a run, to tell a live holder from a stale
|
package/dist/index.js
CHANGED
|
@@ -7751,6 +7751,9 @@ var InMemoryAgentStore = class extends InMemoryActionProposalStore {
|
|
|
7751
7751
|
...input.uiCapabilities !== void 0 ? {
|
|
7752
7752
|
uiCapabilities: input.uiCapabilities
|
|
7753
7753
|
} : {},
|
|
7754
|
+
...input.hostContext !== void 0 ? {
|
|
7755
|
+
hostContext: input.hostContext
|
|
7756
|
+
} : {},
|
|
7754
7757
|
...input.interrupt === true ? {
|
|
7755
7758
|
interrupt: true
|
|
7756
7759
|
} : {},
|