@dudousxd/nestjs-agent 1.17.0 → 1.17.1
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/durable/index.cjs +894 -884
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.js +924 -914
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1086,6 +1086,15 @@ declare class QueueController {
|
|
|
1086
1086
|
remove(req: Request, messageId: string): Promise<ChatQueueState>;
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* The thread message queue, as the durable runner and the `agent.run` workflow ask for it.
|
|
1091
|
+
*
|
|
1092
|
+
* A token rather than the `ChatQueueService` class: `@dudousxd/nestjs-agent/durable` is a separate
|
|
1093
|
+
* bundle with its own copy of every class it imports, so a class used as an injection token there
|
|
1094
|
+
* is not the class `AgentModule` provides. `Symbol.for` is the same value in every bundle.
|
|
1095
|
+
*/
|
|
1096
|
+
declare const AGENT_CHAT_QUEUE: unique symbol;
|
|
1097
|
+
|
|
1089
1098
|
/**
|
|
1090
1099
|
* The default `TokenStreamSink`: buffers chunks per run in-process so a reconnecting subscriber
|
|
1091
1100
|
* replays everything so far, then follows live.
|
|
@@ -1206,4 +1215,4 @@ declare class RunNotActiveException extends ConflictException {
|
|
|
1206
1215
|
constructor(runId: string);
|
|
1207
1216
|
}
|
|
1208
1217
|
|
|
1209
|
-
export { AGENT_METADATA, AI_TOOL_METADATA, ATTACHMENT_PAGE_SIZE, Agent, AgentApprovalPortAdapter, AgentDepsFactory, AgentDiscoveryService, AgentModule, AgentModuleAsyncOptions, AgentModuleOptions, type AgentOptions, AgentService, AgentSkillsOptions, AiTool, AiToolDiscoveryService, type AiToolOptions, type AnonymousActorOptions, AnonymousActorResolver, type AttachmentLimits, AttachmentsController, type ChatParams, ChatQueueService, type ChatSendMode, type ChatSendResult, ConfigController, DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, DEFAULT_MAX_ATTACHMENT_BYTES, type DeclaredSkill, HeaderActorResolver, InProcessTokenStreamSink, InlineAgentRunner, MAX_ATTACHMENTS_PER_MESSAGE, MemoriesController, MessagesController, ModelsController, QueueController, type QueuedSend, type RequestUserMapper, type ResolvedAiToolOptions, RunNotActiveException, SKILL_METADATA, SYSTEM_PROMPT_CONTRIBUTOR_METADATA, SYSTEM_PROMPT_METADATA, Skill, type SkillBody, SkillDiscoveryService, type SkillOptions, SkillsController, SystemPrompt, SystemPromptContributor, type ThreadDefaultAgentReader, type ThreadModelReader, ToolsController, attachmentLimits, declaredSkillProvider, defaultRequestUserMapper, readAgentMetadata, readAiToolMetadata, readSkillMetadata, requestUserActorResolver, resolveSkillsConfig, skillScope, toolNameFromClass };
|
|
1218
|
+
export { AGENT_CHAT_QUEUE, AGENT_METADATA, AI_TOOL_METADATA, ATTACHMENT_PAGE_SIZE, Agent, AgentApprovalPortAdapter, AgentDepsFactory, AgentDiscoveryService, AgentModule, AgentModuleAsyncOptions, AgentModuleOptions, type AgentOptions, AgentService, AgentSkillsOptions, AiTool, AiToolDiscoveryService, type AiToolOptions, type AnonymousActorOptions, AnonymousActorResolver, type AttachmentLimits, AttachmentsController, type ChatParams, ChatQueueService, type ChatSendMode, type ChatSendResult, ConfigController, DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, DEFAULT_MAX_ATTACHMENT_BYTES, type DeclaredSkill, HeaderActorResolver, InProcessTokenStreamSink, InlineAgentRunner, MAX_ATTACHMENTS_PER_MESSAGE, MemoriesController, MessagesController, ModelsController, QueueController, type QueuedSend, type RequestUserMapper, type ResolvedAiToolOptions, RunNotActiveException, SKILL_METADATA, SYSTEM_PROMPT_CONTRIBUTOR_METADATA, SYSTEM_PROMPT_METADATA, Skill, type SkillBody, SkillDiscoveryService, type SkillOptions, SkillsController, SystemPrompt, SystemPromptContributor, type ThreadDefaultAgentReader, type ThreadModelReader, ToolsController, attachmentLimits, declaredSkillProvider, defaultRequestUserMapper, readAgentMetadata, readAiToolMetadata, readSkillMetadata, requestUserActorResolver, resolveSkillsConfig, skillScope, toolNameFromClass };
|
package/dist/index.d.ts
CHANGED
|
@@ -1086,6 +1086,15 @@ declare class QueueController {
|
|
|
1086
1086
|
remove(req: Request, messageId: string): Promise<ChatQueueState>;
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* The thread message queue, as the durable runner and the `agent.run` workflow ask for it.
|
|
1091
|
+
*
|
|
1092
|
+
* A token rather than the `ChatQueueService` class: `@dudousxd/nestjs-agent/durable` is a separate
|
|
1093
|
+
* bundle with its own copy of every class it imports, so a class used as an injection token there
|
|
1094
|
+
* is not the class `AgentModule` provides. `Symbol.for` is the same value in every bundle.
|
|
1095
|
+
*/
|
|
1096
|
+
declare const AGENT_CHAT_QUEUE: unique symbol;
|
|
1097
|
+
|
|
1089
1098
|
/**
|
|
1090
1099
|
* The default `TokenStreamSink`: buffers chunks per run in-process so a reconnecting subscriber
|
|
1091
1100
|
* replays everything so far, then follows live.
|
|
@@ -1206,4 +1215,4 @@ declare class RunNotActiveException extends ConflictException {
|
|
|
1206
1215
|
constructor(runId: string);
|
|
1207
1216
|
}
|
|
1208
1217
|
|
|
1209
|
-
export { AGENT_METADATA, AI_TOOL_METADATA, ATTACHMENT_PAGE_SIZE, Agent, AgentApprovalPortAdapter, AgentDepsFactory, AgentDiscoveryService, AgentModule, AgentModuleAsyncOptions, AgentModuleOptions, type AgentOptions, AgentService, AgentSkillsOptions, AiTool, AiToolDiscoveryService, type AiToolOptions, type AnonymousActorOptions, AnonymousActorResolver, type AttachmentLimits, AttachmentsController, type ChatParams, ChatQueueService, type ChatSendMode, type ChatSendResult, ConfigController, DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, DEFAULT_MAX_ATTACHMENT_BYTES, type DeclaredSkill, HeaderActorResolver, InProcessTokenStreamSink, InlineAgentRunner, MAX_ATTACHMENTS_PER_MESSAGE, MemoriesController, MessagesController, ModelsController, QueueController, type QueuedSend, type RequestUserMapper, type ResolvedAiToolOptions, RunNotActiveException, SKILL_METADATA, SYSTEM_PROMPT_CONTRIBUTOR_METADATA, SYSTEM_PROMPT_METADATA, Skill, type SkillBody, SkillDiscoveryService, type SkillOptions, SkillsController, SystemPrompt, SystemPromptContributor, type ThreadDefaultAgentReader, type ThreadModelReader, ToolsController, attachmentLimits, declaredSkillProvider, defaultRequestUserMapper, readAgentMetadata, readAiToolMetadata, readSkillMetadata, requestUserActorResolver, resolveSkillsConfig, skillScope, toolNameFromClass };
|
|
1218
|
+
export { AGENT_CHAT_QUEUE, AGENT_METADATA, AI_TOOL_METADATA, ATTACHMENT_PAGE_SIZE, Agent, AgentApprovalPortAdapter, AgentDepsFactory, AgentDiscoveryService, AgentModule, AgentModuleAsyncOptions, AgentModuleOptions, type AgentOptions, AgentService, AgentSkillsOptions, AiTool, AiToolDiscoveryService, type AiToolOptions, type AnonymousActorOptions, AnonymousActorResolver, type AttachmentLimits, AttachmentsController, type ChatParams, ChatQueueService, type ChatSendMode, type ChatSendResult, ConfigController, DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, DEFAULT_MAX_ATTACHMENT_BYTES, type DeclaredSkill, HeaderActorResolver, InProcessTokenStreamSink, InlineAgentRunner, MAX_ATTACHMENTS_PER_MESSAGE, MemoriesController, MessagesController, ModelsController, QueueController, type QueuedSend, type RequestUserMapper, type ResolvedAiToolOptions, RunNotActiveException, SKILL_METADATA, SYSTEM_PROMPT_CONTRIBUTOR_METADATA, SYSTEM_PROMPT_METADATA, Skill, type SkillBody, SkillDiscoveryService, type SkillOptions, SkillsController, SystemPrompt, SystemPromptContributor, type ThreadDefaultAgentReader, type ThreadModelReader, ToolsController, attachmentLimits, declaredSkillProvider, defaultRequestUserMapper, readAgentMetadata, readAiToolMetadata, readSkillMetadata, requestUserActorResolver, resolveSkillsConfig, skillScope, toolNameFromClass };
|
package/dist/index.js
CHANGED
|
@@ -4268,6 +4268,9 @@ var LedgerQuotaProvider = class {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
};
|
|
4270
4270
|
|
|
4271
|
+
// src/queue/chat-queue.token.ts
|
|
4272
|
+
var AGENT_CHAT_QUEUE = /* @__PURE__ */ Symbol.for("@dudousxd/nestjs-agent:chat-queue");
|
|
4273
|
+
|
|
4271
4274
|
// src/runner/inline-agent-runner.ts
|
|
4272
4275
|
import { AGENT_DEPS_FACTORY as AGENT_DEPS_FACTORY4, AGENT_STORE as AGENT_STORE4, RUN_ENDED_BEFORE_TOOL_CALL, RunCancelledError, agentFailureCode, encodeStreamEvent as encodeStreamEvent2, publishAgentRunFailed, releaseThreadRun, runAgentLoop, settleAll, settleUnsettledDelegation, streamFailure as streamFailure2 } from "@dudousxd/nestjs-agent-core";
|
|
4273
4276
|
import { Inject as Inject20, Injectable as Injectable8, Logger as Logger5, Optional as Optional8 } from "@nestjs/common";
|
|
@@ -4972,6 +4975,10 @@ function sharedProviders(durable) {
|
|
|
4972
4975
|
// The thread message queue — every surface, since both runners and the durable workflow settle
|
|
4973
4976
|
// into it, and the chat routes enqueue into it.
|
|
4974
4977
|
ChatQueueService,
|
|
4978
|
+
{
|
|
4979
|
+
provide: AGENT_CHAT_QUEUE,
|
|
4980
|
+
useExisting: ChatQueueService
|
|
4981
|
+
},
|
|
4975
4982
|
InlineAgentRunner,
|
|
4976
4983
|
AgentService,
|
|
4977
4984
|
// Bound ALWAYS (durable or inline) — the console's cross-thread approvals inbox routes decisions
|
|
@@ -5034,6 +5041,7 @@ function exportsFor() {
|
|
|
5034
5041
|
AgentDepsFactory2,
|
|
5035
5042
|
AgentService,
|
|
5036
5043
|
ChatQueueService,
|
|
5044
|
+
AGENT_CHAT_QUEUE,
|
|
5037
5045
|
InlineAgentRunner,
|
|
5038
5046
|
AGENT_APPROVAL_PORT
|
|
5039
5047
|
];
|
|
@@ -5225,6 +5233,7 @@ __name(requestUserActorResolver, "requestUserActorResolver");
|
|
|
5225
5233
|
// src/index.ts
|
|
5226
5234
|
export * from "@dudousxd/nestjs-agent-core";
|
|
5227
5235
|
export {
|
|
5236
|
+
AGENT_CHAT_QUEUE,
|
|
5228
5237
|
AGENT_METADATA,
|
|
5229
5238
|
AGENT_TOOL_BRAND,
|
|
5230
5239
|
AI_TOOL_METADATA,
|