@dudousxd/nestjs-agent 0.1.0 → 0.2.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/{agent-deps.factory-D9BHJJqm.d.cts → agent-deps.factory-DpVkZYCy.d.cts} +17 -20
- package/dist/{agent-deps.factory-D9BHJJqm.d.ts → agent-deps.factory-DpVkZYCy.d.ts} +17 -20
- package/dist/durable/index.cjs +253 -160
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +1 -1
- package/dist/durable/index.d.ts +1 -1
- package/dist/durable/index.js +210 -117
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +287 -159
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -14
- package/dist/index.d.ts +85 -14
- package/dist/index.js +236 -116
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/durable/index.cjs
CHANGED
|
@@ -95,7 +95,6 @@ var AgentRunWorkflow = class _AgentRunWorkflow {
|
|
|
95
95
|
const subThreadId = await ctx.step(`subthread:${agentName}`, async () => {
|
|
96
96
|
const thread = await this.store.createThread({
|
|
97
97
|
actor: input.actor,
|
|
98
|
-
persona: "default",
|
|
99
98
|
transient: true
|
|
100
99
|
});
|
|
101
100
|
return thread.id;
|
|
@@ -243,9 +242,9 @@ AgentDurableModule = _ts_decorate3([
|
|
|
243
242
|
], AgentDurableModule);
|
|
244
243
|
|
|
245
244
|
// src/agent.module.ts
|
|
246
|
-
var
|
|
247
|
-
var
|
|
248
|
-
var
|
|
245
|
+
var import_nestjs_agent_core14 = require("@dudousxd/nestjs-agent-core");
|
|
246
|
+
var import_common13 = require("@nestjs/common");
|
|
247
|
+
var import_core3 = require("@nestjs/core");
|
|
249
248
|
|
|
250
249
|
// src/agent-deps.factory.ts
|
|
251
250
|
var import_nestjs_agent_core3 = require("@dudousxd/nestjs-agent-core");
|
|
@@ -283,8 +282,9 @@ var AgentDepsFactory2 = class {
|
|
|
283
282
|
rolesPolicy;
|
|
284
283
|
registry;
|
|
285
284
|
agents;
|
|
285
|
+
promptContributors;
|
|
286
286
|
quota;
|
|
287
|
-
constructor(options, model, store, sink, rolesPolicy, registry, agents, quota) {
|
|
287
|
+
constructor(options, model, store, sink, rolesPolicy, registry, agents, promptContributors, quota) {
|
|
288
288
|
this.options = options;
|
|
289
289
|
this.model = model;
|
|
290
290
|
this.store = store;
|
|
@@ -292,10 +292,19 @@ var AgentDepsFactory2 = class {
|
|
|
292
292
|
this.rolesPolicy = rolesPolicy;
|
|
293
293
|
this.registry = registry;
|
|
294
294
|
this.agents = agents;
|
|
295
|
+
this.promptContributors = promptContributors;
|
|
295
296
|
this.quota = quota;
|
|
296
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* The agent a turn uses when the caller names none: the explicit `defaultAgent` option, else the
|
|
300
|
+
* sole registered `@Agent` when there is exactly one, else `'default'` (a bare assistant).
|
|
301
|
+
*/
|
|
297
302
|
defaultAgentName() {
|
|
298
|
-
|
|
303
|
+
if (this.options.defaultAgent !== void 0) {
|
|
304
|
+
return this.options.defaultAgent;
|
|
305
|
+
}
|
|
306
|
+
const registered = this.agents.list();
|
|
307
|
+
return registered.length === 1 ? registered[0]?.name ?? "default" : "default";
|
|
299
308
|
}
|
|
300
309
|
effectiveTools(definition) {
|
|
301
310
|
if (definition === void 0) {
|
|
@@ -313,10 +322,6 @@ var AgentDepsFactory2 = class {
|
|
|
313
322
|
forAgent(agentName) {
|
|
314
323
|
const name = agentName ?? this.defaultAgentName();
|
|
315
324
|
const definition = this.agents.get(name);
|
|
316
|
-
const personas = /* @__PURE__ */ new Map();
|
|
317
|
-
for (const persona of definition?.personas ?? []) {
|
|
318
|
-
personas.set(persona.id, persona);
|
|
319
|
-
}
|
|
320
325
|
const toolAllowList = this.effectiveTools(definition);
|
|
321
326
|
const followUpsCount = this.followUpsCount();
|
|
322
327
|
const retrieval = this.options.retrieval;
|
|
@@ -326,10 +331,9 @@ var AgentDepsFactory2 = class {
|
|
|
326
331
|
sink: this.sink,
|
|
327
332
|
rolesPolicy: this.rolesPolicy,
|
|
328
333
|
registry: this.registry,
|
|
334
|
+
promptContributors: this.promptContributors,
|
|
329
335
|
systemPrompt: definition?.systemPrompt ?? "You are a helpful assistant.",
|
|
330
336
|
maxSteps: definition?.maxSteps ?? 8,
|
|
331
|
-
personas,
|
|
332
|
-
defaultPersona: definition?.defaultPersona ?? "default",
|
|
333
337
|
...definition?.modelId !== void 0 ? {
|
|
334
338
|
modelId: definition.modelId
|
|
335
339
|
} : {},
|
|
@@ -374,7 +378,8 @@ AgentDepsFactory2 = _ts_decorate4([
|
|
|
374
378
|
_ts_param2(4, (0, import_common4.Inject)(import_nestjs_agent_core3.AGENT_ROLES_POLICY)),
|
|
375
379
|
_ts_param2(5, (0, import_common4.Inject)(import_nestjs_agent_core3.AGENT_TOOL_REGISTRY)),
|
|
376
380
|
_ts_param2(6, (0, import_common4.Inject)(import_nestjs_agent_core3.AGENT_REGISTRY)),
|
|
377
|
-
_ts_param2(7, (0, import_common4.Inject)(import_nestjs_agent_core3.
|
|
381
|
+
_ts_param2(7, (0, import_common4.Inject)(import_nestjs_agent_core3.AGENT_PROMPT_CONTRIBUTORS)),
|
|
382
|
+
_ts_param2(8, (0, import_common4.Inject)(import_nestjs_agent_core3.AGENT_QUOTA_STORE)),
|
|
378
383
|
_ts_metadata3("design:type", Function),
|
|
379
384
|
_ts_metadata3("design:paramtypes", [
|
|
380
385
|
typeof AgentModuleOptions === "undefined" ? Object : AgentModuleOptions,
|
|
@@ -384,6 +389,7 @@ AgentDepsFactory2 = _ts_decorate4([
|
|
|
384
389
|
typeof RolesPolicy === "undefined" ? Object : RolesPolicy,
|
|
385
390
|
typeof import_nestjs_agent_core3.ToolRegistry === "undefined" ? Object : import_nestjs_agent_core3.ToolRegistry,
|
|
386
391
|
typeof import_nestjs_agent_core3.AgentRegistry === "undefined" ? Object : import_nestjs_agent_core3.AgentRegistry,
|
|
392
|
+
Array,
|
|
387
393
|
Object
|
|
388
394
|
])
|
|
389
395
|
], AgentDepsFactory2);
|
|
@@ -428,14 +434,12 @@ var AgentService = class {
|
|
|
428
434
|
throw new import_common5.BadRequestException("regenerate requires an existing threadId");
|
|
429
435
|
}
|
|
430
436
|
const created = await this.store.createThread({
|
|
431
|
-
actor: params.actor
|
|
432
|
-
persona: params.personaId ?? this.deps.forAgent(agentName).defaultPersona
|
|
437
|
+
actor: params.actor
|
|
433
438
|
});
|
|
434
439
|
threadId = created.id;
|
|
435
440
|
} else if (params.regenerate === true) {
|
|
436
441
|
await this.assertOwnsThread(params.actor, threadId);
|
|
437
442
|
}
|
|
438
|
-
const persona = this.resolvePersona(agentName, params.personaId);
|
|
439
443
|
const input = {
|
|
440
444
|
threadId,
|
|
441
445
|
actor: params.actor,
|
|
@@ -445,9 +449,6 @@ var AgentService = class {
|
|
|
445
449
|
...params.regenerate === true ? {
|
|
446
450
|
regenerate: true
|
|
447
451
|
} : {},
|
|
448
|
-
...persona !== void 0 ? {
|
|
449
|
-
persona
|
|
450
|
-
} : {},
|
|
451
452
|
...params.pageContext !== void 0 ? {
|
|
452
453
|
pageContext: params.pageContext
|
|
453
454
|
} : {}
|
|
@@ -481,18 +482,6 @@ var AgentService = class {
|
|
|
481
482
|
await this.assertOwnsActiveStream(actor, runId);
|
|
482
483
|
return this.runner.cancel(runId);
|
|
483
484
|
}
|
|
484
|
-
resolvePersona(agentName, id) {
|
|
485
|
-
const deps = this.deps.forAgent(agentName);
|
|
486
|
-
return deps.personas.get(id ?? deps.defaultPersona);
|
|
487
|
-
}
|
|
488
|
-
personaCatalog(agentName) {
|
|
489
|
-
return [
|
|
490
|
-
...this.deps.forAgent(agentName).personas.values()
|
|
491
|
-
].map((persona) => ({
|
|
492
|
-
id: persona.id,
|
|
493
|
-
label: persona.label
|
|
494
|
-
}));
|
|
495
|
-
}
|
|
496
485
|
listThreads(actorRef) {
|
|
497
486
|
return this.store.listThreads(actorRef);
|
|
498
487
|
}
|
|
@@ -609,9 +598,6 @@ var ChatController = class {
|
|
|
609
598
|
...body.agent !== void 0 ? {
|
|
610
599
|
agentName: body.agent
|
|
611
600
|
} : {},
|
|
612
|
-
...body.persona !== void 0 ? {
|
|
613
|
-
personaId: body.persona
|
|
614
|
-
} : {},
|
|
615
601
|
...body.pageContext !== void 0 ? {
|
|
616
602
|
pageContext: body.pageContext
|
|
617
603
|
} : {},
|
|
@@ -805,9 +791,6 @@ var ThreadsController = class {
|
|
|
805
791
|
const actor = await this.actorResolver.resolve(req);
|
|
806
792
|
return this.agent.listThreads(actor.id);
|
|
807
793
|
}
|
|
808
|
-
personas() {
|
|
809
|
-
return this.agent.personaCatalog();
|
|
810
|
-
}
|
|
811
794
|
async detail(req, id) {
|
|
812
795
|
const actor = await this.actorResolver.resolve(req);
|
|
813
796
|
return this.agent.getThread(actor, id);
|
|
@@ -833,12 +816,6 @@ _ts_decorate8([
|
|
|
833
816
|
]),
|
|
834
817
|
_ts_metadata7("design:returntype", Promise)
|
|
835
818
|
], ThreadsController.prototype, "list", null);
|
|
836
|
-
_ts_decorate8([
|
|
837
|
-
(0, import_common8.Get)("personas/catalog"),
|
|
838
|
-
_ts_metadata7("design:type", Function),
|
|
839
|
-
_ts_metadata7("design:paramtypes", []),
|
|
840
|
-
_ts_metadata7("design:returntype", void 0)
|
|
841
|
-
], ThreadsController.prototype, "personas", null);
|
|
842
819
|
_ts_decorate8([
|
|
843
820
|
(0, import_common8.Get)(":id"),
|
|
844
821
|
_ts_param6(0, (0, import_common8.Req)()),
|
|
@@ -961,14 +938,156 @@ ToolCallController = _ts_decorate9([
|
|
|
961
938
|
])
|
|
962
939
|
], ToolCallController);
|
|
963
940
|
|
|
964
|
-
// src/discovery/
|
|
941
|
+
// src/discovery/agent-discovery.service.ts
|
|
965
942
|
var import_nestjs_agent_core10 = require("@dudousxd/nestjs-agent-core");
|
|
966
943
|
var import_common10 = require("@nestjs/common");
|
|
967
944
|
var import_core = require("@nestjs/core");
|
|
945
|
+
|
|
946
|
+
// src/decorator/agent.decorator.ts
|
|
947
|
+
var import_reflect_metadata = require("reflect-metadata");
|
|
948
|
+
var AGENT_METADATA = Symbol.for("@dudousxd/nestjs-agent:agent-metadata");
|
|
949
|
+
function readAgentMetadata(target) {
|
|
950
|
+
return Reflect.getMetadata(AGENT_METADATA, target);
|
|
951
|
+
}
|
|
952
|
+
__name(readAgentMetadata, "readAgentMetadata");
|
|
953
|
+
|
|
954
|
+
// src/decorator/system-prompt.decorator.ts
|
|
955
|
+
var import_reflect_metadata2 = require("reflect-metadata");
|
|
956
|
+
var SYSTEM_PROMPT_METADATA = Symbol.for("@dudousxd/nestjs-agent:system-prompt");
|
|
957
|
+
var SYSTEM_PROMPT_CONTRIBUTOR_METADATA = Symbol.for("@dudousxd/nestjs-agent:system-prompt-contributor");
|
|
958
|
+
|
|
959
|
+
// src/discovery/agent-discovery.service.ts
|
|
960
|
+
function _ts_decorate10(decorators, target, key, desc) {
|
|
961
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
962
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
963
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
964
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
965
|
+
}
|
|
966
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
967
|
+
function _ts_metadata9(k, v) {
|
|
968
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
969
|
+
}
|
|
970
|
+
__name(_ts_metadata9, "_ts_metadata");
|
|
971
|
+
function _ts_param8(paramIndex, decorator) {
|
|
972
|
+
return function(target, key) {
|
|
973
|
+
decorator(target, key, paramIndex);
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
__name(_ts_param8, "_ts_param");
|
|
977
|
+
var AgentDiscoveryService = class _AgentDiscoveryService {
|
|
978
|
+
static {
|
|
979
|
+
__name(this, "AgentDiscoveryService");
|
|
980
|
+
}
|
|
981
|
+
discovery;
|
|
982
|
+
scanner;
|
|
983
|
+
registry;
|
|
984
|
+
contributors;
|
|
985
|
+
logger = new import_common10.Logger(_AgentDiscoveryService.name);
|
|
986
|
+
constructor(discovery, scanner, registry, contributors) {
|
|
987
|
+
this.discovery = discovery;
|
|
988
|
+
this.scanner = scanner;
|
|
989
|
+
this.registry = registry;
|
|
990
|
+
this.contributors = contributors;
|
|
991
|
+
}
|
|
992
|
+
onModuleInit() {
|
|
993
|
+
for (const wrapper of this.discovery.getProviders()) {
|
|
994
|
+
const instance = wrapper.instance;
|
|
995
|
+
if (instance === null || typeof instance !== "object") {
|
|
996
|
+
continue;
|
|
997
|
+
}
|
|
998
|
+
const meta = readAgentMetadata(instance.constructor);
|
|
999
|
+
if (meta !== void 0) {
|
|
1000
|
+
this.registry.register(this.definitionFrom(instance, meta));
|
|
1001
|
+
}
|
|
1002
|
+
this.collectContributors(instance);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
/** Build the internal {@link AgentDefinition} from an `@Agent` instance and its options. */
|
|
1006
|
+
definitionFrom(instance, meta) {
|
|
1007
|
+
const promptMethod = this.methodWith(instance, SYSTEM_PROMPT_METADATA);
|
|
1008
|
+
const systemPrompt = promptMethod !== void 0 ? (ctx) => promptMethod(ctx) : meta.systemPrompt ?? "You are a helpful assistant.";
|
|
1009
|
+
return {
|
|
1010
|
+
name: meta.name,
|
|
1011
|
+
systemPrompt,
|
|
1012
|
+
...meta.tools !== void 0 ? {
|
|
1013
|
+
tools: meta.tools
|
|
1014
|
+
} : {},
|
|
1015
|
+
...meta.model !== void 0 ? {
|
|
1016
|
+
modelId: meta.model
|
|
1017
|
+
} : {},
|
|
1018
|
+
...meta.maxSteps !== void 0 ? {
|
|
1019
|
+
maxSteps: meta.maxSteps
|
|
1020
|
+
} : {},
|
|
1021
|
+
...meta.handoff !== void 0 ? {
|
|
1022
|
+
delegatesTo: this.handoffNames(meta)
|
|
1023
|
+
} : {}
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
/** Resolve each handoff `@Agent` class to its registered name (skipping non-agent classes). */
|
|
1027
|
+
handoffNames(meta) {
|
|
1028
|
+
const names = [];
|
|
1029
|
+
for (const target of meta.handoff ?? []) {
|
|
1030
|
+
const targetMeta = readAgentMetadata(target);
|
|
1031
|
+
if (targetMeta === void 0) {
|
|
1032
|
+
this.logger.warn(`Agent "${meta.name}" hands off to ${target.name}, which is not an @Agent \u2014 skipped.`);
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
names.push(targetMeta.name);
|
|
1036
|
+
}
|
|
1037
|
+
return names;
|
|
1038
|
+
}
|
|
1039
|
+
/** Push every `@SystemPromptContributor()` method on `instance` (bound) into the contributor list. */
|
|
1040
|
+
collectContributors(instance) {
|
|
1041
|
+
const prototype = Object.getPrototypeOf(instance);
|
|
1042
|
+
for (const name of this.scanner.getAllMethodNames(prototype)) {
|
|
1043
|
+
if (Reflect.getMetadata(SYSTEM_PROMPT_CONTRIBUTOR_METADATA, prototype, name) === true) {
|
|
1044
|
+
const method = this.boundMethod(instance, name);
|
|
1045
|
+
if (method !== void 0) {
|
|
1046
|
+
this.contributors.push((ctx) => method(ctx));
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
/** The single method on `instance` carrying `metadataKey`, bound to the instance, or undefined. */
|
|
1052
|
+
methodWith(instance, metadataKey) {
|
|
1053
|
+
const prototype = Object.getPrototypeOf(instance);
|
|
1054
|
+
for (const name of this.scanner.getAllMethodNames(prototype)) {
|
|
1055
|
+
if (Reflect.getMetadata(metadataKey, prototype, name) === true) {
|
|
1056
|
+
return this.boundMethod(instance, name);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
return void 0;
|
|
1060
|
+
}
|
|
1061
|
+
/** Bind a named method to its instance, guarding that it is actually a function. */
|
|
1062
|
+
boundMethod(instance, name) {
|
|
1063
|
+
const candidate = instance[name];
|
|
1064
|
+
if (typeof candidate !== "function") {
|
|
1065
|
+
return void 0;
|
|
1066
|
+
}
|
|
1067
|
+
return (ctx) => candidate.call(instance, ctx);
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
AgentDiscoveryService = _ts_decorate10([
|
|
1071
|
+
(0, import_common10.Injectable)(),
|
|
1072
|
+
_ts_param8(2, (0, import_common10.Inject)(import_nestjs_agent_core10.AGENT_REGISTRY)),
|
|
1073
|
+
_ts_param8(3, (0, import_common10.Inject)(import_nestjs_agent_core10.AGENT_PROMPT_CONTRIBUTORS)),
|
|
1074
|
+
_ts_metadata9("design:type", Function),
|
|
1075
|
+
_ts_metadata9("design:paramtypes", [
|
|
1076
|
+
typeof import_core.DiscoveryService === "undefined" ? Object : import_core.DiscoveryService,
|
|
1077
|
+
typeof import_core.MetadataScanner === "undefined" ? Object : import_core.MetadataScanner,
|
|
1078
|
+
typeof import_nestjs_agent_core10.AgentRegistry === "undefined" ? Object : import_nestjs_agent_core10.AgentRegistry,
|
|
1079
|
+
Array
|
|
1080
|
+
])
|
|
1081
|
+
], AgentDiscoveryService);
|
|
1082
|
+
|
|
1083
|
+
// src/discovery/ai-tool-discovery.service.ts
|
|
1084
|
+
var import_nestjs_agent_core11 = require("@dudousxd/nestjs-agent-core");
|
|
1085
|
+
var import_common11 = require("@nestjs/common");
|
|
1086
|
+
var import_core2 = require("@nestjs/core");
|
|
968
1087
|
var import_zod = require("zod");
|
|
969
1088
|
|
|
970
1089
|
// src/decorator/ai-tool.decorator.ts
|
|
971
|
-
var
|
|
1090
|
+
var import_reflect_metadata3 = require("reflect-metadata");
|
|
972
1091
|
var AI_TOOL_METADATA = Symbol("nestjs-agent:ai-tool");
|
|
973
1092
|
function readAiToolMetadata(target) {
|
|
974
1093
|
return Reflect.getMetadata(AI_TOOL_METADATA, target.constructor);
|
|
@@ -983,23 +1102,23 @@ function isBrandedFunctionalTool(value) {
|
|
|
983
1102
|
__name(isBrandedFunctionalTool, "isBrandedFunctionalTool");
|
|
984
1103
|
|
|
985
1104
|
// src/discovery/ai-tool-discovery.service.ts
|
|
986
|
-
function
|
|
1105
|
+
function _ts_decorate11(decorators, target, key, desc) {
|
|
987
1106
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
988
1107
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
989
1108
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
990
1109
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
991
1110
|
}
|
|
992
|
-
__name(
|
|
993
|
-
function
|
|
1111
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
1112
|
+
function _ts_metadata10(k, v) {
|
|
994
1113
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
995
1114
|
}
|
|
996
|
-
__name(
|
|
997
|
-
function
|
|
1115
|
+
__name(_ts_metadata10, "_ts_metadata");
|
|
1116
|
+
function _ts_param9(paramIndex, decorator) {
|
|
998
1117
|
return function(target, key) {
|
|
999
1118
|
decorator(target, key, paramIndex);
|
|
1000
1119
|
};
|
|
1001
1120
|
}
|
|
1002
|
-
__name(
|
|
1121
|
+
__name(_ts_param9, "_ts_param");
|
|
1003
1122
|
var AiToolDiscoveryService = class _AiToolDiscoveryService {
|
|
1004
1123
|
static {
|
|
1005
1124
|
__name(this, "AiToolDiscoveryService");
|
|
@@ -1008,7 +1127,7 @@ var AiToolDiscoveryService = class _AiToolDiscoveryService {
|
|
|
1008
1127
|
registry;
|
|
1009
1128
|
agents;
|
|
1010
1129
|
options;
|
|
1011
|
-
logger = new
|
|
1130
|
+
logger = new import_common11.Logger(_AiToolDiscoveryService.name);
|
|
1012
1131
|
constructor(discovery, registry, agents, options) {
|
|
1013
1132
|
this.discovery = discovery;
|
|
1014
1133
|
this.registry = registry;
|
|
@@ -1066,7 +1185,7 @@ var AiToolDiscoveryService = class _AiToolDiscoveryService {
|
|
|
1066
1185
|
for (const target of definition.delegatesTo ?? []) {
|
|
1067
1186
|
const targetDefinition = this.agents.get(target);
|
|
1068
1187
|
if (targetDefinition === void 0) {
|
|
1069
|
-
throw new Error(`Agent "${definition.name}"
|
|
1188
|
+
throw new Error(`Agent "${definition.name}" hands off to "${target}", which is not a registered @Agent. Declare it as an @Agent provider or fix the reference.`);
|
|
1070
1189
|
}
|
|
1071
1190
|
const name = delegateToolName(target);
|
|
1072
1191
|
if (this.registry.has(name)) {
|
|
@@ -1106,14 +1225,14 @@ var AiToolDiscoveryService = class _AiToolDiscoveryService {
|
|
|
1106
1225
|
return true;
|
|
1107
1226
|
}
|
|
1108
1227
|
};
|
|
1109
|
-
AiToolDiscoveryService =
|
|
1110
|
-
(0,
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
typeof
|
|
1228
|
+
AiToolDiscoveryService = _ts_decorate11([
|
|
1229
|
+
(0, import_common11.Injectable)(),
|
|
1230
|
+
_ts_param9(1, (0, import_common11.Inject)(import_nestjs_agent_core11.AGENT_TOOL_REGISTRY)),
|
|
1231
|
+
_ts_param9(2, (0, import_common11.Inject)(import_nestjs_agent_core11.AGENT_REGISTRY)),
|
|
1232
|
+
_ts_param9(3, (0, import_common11.Inject)(import_nestjs_agent_core11.AGENT_OPTIONS)),
|
|
1233
|
+
_ts_metadata10("design:type", Function),
|
|
1234
|
+
_ts_metadata10("design:paramtypes", [
|
|
1235
|
+
typeof import_core2.DiscoveryService === "undefined" ? Object : import_core2.DiscoveryService,
|
|
1117
1236
|
typeof ToolRegistry === "undefined" ? Object : ToolRegistry,
|
|
1118
1237
|
typeof AgentRegistry === "undefined" ? Object : AgentRegistry,
|
|
1119
1238
|
typeof AgentModuleOptions === "undefined" ? Object : AgentModuleOptions
|
|
@@ -1121,7 +1240,7 @@ AiToolDiscoveryService = _ts_decorate10([
|
|
|
1121
1240
|
], AiToolDiscoveryService);
|
|
1122
1241
|
|
|
1123
1242
|
// src/in-process-sink.ts
|
|
1124
|
-
var
|
|
1243
|
+
var import_nestjs_agent_core12 = require("@dudousxd/nestjs-agent-core");
|
|
1125
1244
|
var InProcessTokenStreamSink = class {
|
|
1126
1245
|
static {
|
|
1127
1246
|
__name(this, "InProcessTokenStreamSink");
|
|
@@ -1176,7 +1295,7 @@ var InProcessTokenStreamSink = class {
|
|
|
1176
1295
|
}
|
|
1177
1296
|
if (buf.ended) {
|
|
1178
1297
|
if (buf.failure !== void 0) {
|
|
1179
|
-
throw new
|
|
1298
|
+
throw new import_nestjs_agent_core12.AgentStreamError(buf.failure);
|
|
1180
1299
|
}
|
|
1181
1300
|
return;
|
|
1182
1301
|
}
|
|
@@ -1212,32 +1331,32 @@ var LedgerQuotaStore = class {
|
|
|
1212
1331
|
};
|
|
1213
1332
|
|
|
1214
1333
|
// src/runner/inline-agent-runner.ts
|
|
1215
|
-
var
|
|
1216
|
-
var
|
|
1217
|
-
function
|
|
1334
|
+
var import_nestjs_agent_core13 = require("@dudousxd/nestjs-agent-core");
|
|
1335
|
+
var import_common12 = require("@nestjs/common");
|
|
1336
|
+
function _ts_decorate12(decorators, target, key, desc) {
|
|
1218
1337
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1219
1338
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1220
1339
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1221
1340
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1222
1341
|
}
|
|
1223
|
-
__name(
|
|
1224
|
-
function
|
|
1342
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
1343
|
+
function _ts_metadata11(k, v) {
|
|
1225
1344
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1226
1345
|
}
|
|
1227
|
-
__name(
|
|
1228
|
-
function
|
|
1346
|
+
__name(_ts_metadata11, "_ts_metadata");
|
|
1347
|
+
function _ts_param10(paramIndex, decorator) {
|
|
1229
1348
|
return function(target, key) {
|
|
1230
1349
|
decorator(target, key, paramIndex);
|
|
1231
1350
|
};
|
|
1232
1351
|
}
|
|
1233
|
-
__name(
|
|
1352
|
+
__name(_ts_param10, "_ts_param");
|
|
1234
1353
|
var InlineAgentRunner = class _InlineAgentRunner {
|
|
1235
1354
|
static {
|
|
1236
1355
|
__name(this, "InlineAgentRunner");
|
|
1237
1356
|
}
|
|
1238
1357
|
factory;
|
|
1239
1358
|
store;
|
|
1240
|
-
logger = new
|
|
1359
|
+
logger = new import_common12.Logger(_InlineAgentRunner.name);
|
|
1241
1360
|
pending = /* @__PURE__ */ new Map();
|
|
1242
1361
|
constructor(factory, store) {
|
|
1243
1362
|
this.factory = factory;
|
|
@@ -1248,14 +1367,14 @@ var InlineAgentRunner = class _InlineAgentRunner {
|
|
|
1248
1367
|
const day = input.day ?? utcDay();
|
|
1249
1368
|
const deps = this.factory.forAgent(input.agentName);
|
|
1250
1369
|
const hooks = this.topLevelHooks(runId, deps, input.actor, day);
|
|
1251
|
-
void (0,
|
|
1370
|
+
void (0, import_nestjs_agent_core13.runAgentLoop)({
|
|
1252
1371
|
...deps,
|
|
1253
1372
|
day
|
|
1254
1373
|
}, input, hooks).catch(async (error) => {
|
|
1255
1374
|
const message = error instanceof Error ? error.message : String(error);
|
|
1256
|
-
const code = error instanceof
|
|
1375
|
+
const code = error instanceof import_nestjs_agent_core13.QuotaExceededError ? "quota_exceeded" : "run_failed";
|
|
1257
1376
|
this.logger.error(`agent run ${runId} failed (${code}): ${message}`);
|
|
1258
|
-
(0,
|
|
1377
|
+
(0, import_nestjs_agent_core13.publishAgentRunFailed)({
|
|
1259
1378
|
runId,
|
|
1260
1379
|
code,
|
|
1261
1380
|
message
|
|
@@ -1302,7 +1421,6 @@ var InlineAgentRunner = class _InlineAgentRunner {
|
|
|
1302
1421
|
async runNested(agentName, task, actor, day, depth, sinkRunId) {
|
|
1303
1422
|
const subThread = await this.store.createThread({
|
|
1304
1423
|
actor,
|
|
1305
|
-
persona: "default",
|
|
1306
1424
|
transient: true
|
|
1307
1425
|
});
|
|
1308
1426
|
const runId = crypto.randomUUID();
|
|
@@ -1318,7 +1436,7 @@ var InlineAgentRunner = class _InlineAgentRunner {
|
|
|
1318
1436
|
step: /* @__PURE__ */ __name((_name, fn) => fn(), "step"),
|
|
1319
1437
|
runAgent: /* @__PURE__ */ __name((childName, childTask) => this.runNested(childName, childTask, actor, day, depth + 1, sinkRunId), "runAgent")
|
|
1320
1438
|
};
|
|
1321
|
-
return (0,
|
|
1439
|
+
return (0, import_nestjs_agent_core13.runAgentLoop)({
|
|
1322
1440
|
...deps,
|
|
1323
1441
|
day
|
|
1324
1442
|
}, {
|
|
@@ -1332,111 +1450,105 @@ var InlineAgentRunner = class _InlineAgentRunner {
|
|
|
1332
1450
|
}, hooks);
|
|
1333
1451
|
}
|
|
1334
1452
|
};
|
|
1335
|
-
InlineAgentRunner =
|
|
1336
|
-
(0,
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1453
|
+
InlineAgentRunner = _ts_decorate12([
|
|
1454
|
+
(0, import_common12.Injectable)(),
|
|
1455
|
+
_ts_param10(0, (0, import_common12.Inject)(import_nestjs_agent_core13.AGENT_DEPS_FACTORY)),
|
|
1456
|
+
_ts_param10(1, (0, import_common12.Inject)(import_nestjs_agent_core13.AGENT_STORE)),
|
|
1457
|
+
_ts_metadata11("design:type", Function),
|
|
1458
|
+
_ts_metadata11("design:paramtypes", [
|
|
1341
1459
|
typeof AgentDepsFactory === "undefined" ? Object : AgentDepsFactory,
|
|
1342
1460
|
typeof AgentStore === "undefined" ? Object : AgentStore
|
|
1343
1461
|
])
|
|
1344
1462
|
], InlineAgentRunner);
|
|
1345
1463
|
|
|
1346
1464
|
// src/agent.module.ts
|
|
1347
|
-
function
|
|
1465
|
+
function _ts_decorate13(decorators, target, key, desc) {
|
|
1348
1466
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1349
1467
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1350
1468
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1351
1469
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1352
1470
|
}
|
|
1353
|
-
__name(
|
|
1354
|
-
var FEATURE_INIT = Symbol("nestjs-agent:feature-init");
|
|
1471
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
1355
1472
|
var DEFAULT_PATH = "agent";
|
|
1356
|
-
function defaultDefinition(options) {
|
|
1357
|
-
return {
|
|
1358
|
-
name: "default",
|
|
1359
|
-
...options.defaultAgent
|
|
1360
|
-
};
|
|
1361
|
-
}
|
|
1362
|
-
__name(defaultDefinition, "defaultDefinition");
|
|
1363
1473
|
function sharedProviders(durable, includeStore) {
|
|
1364
1474
|
const providers = [
|
|
1365
1475
|
{
|
|
1366
|
-
provide:
|
|
1367
|
-
useFactory: /* @__PURE__ */ __name(() => new
|
|
1476
|
+
provide: import_nestjs_agent_core14.AGENT_TOOL_REGISTRY,
|
|
1477
|
+
useFactory: /* @__PURE__ */ __name(() => new import_nestjs_agent_core14.ToolRegistry(), "useFactory")
|
|
1368
1478
|
},
|
|
1479
|
+
// Starts empty; AgentDiscoveryService populates it from `@Agent`-decorated providers at boot.
|
|
1369
1480
|
{
|
|
1370
|
-
provide:
|
|
1371
|
-
useFactory: /* @__PURE__ */ __name((
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
import_nestjs_agent_core13.AGENT_OPTIONS
|
|
1378
|
-
]
|
|
1481
|
+
provide: import_nestjs_agent_core14.AGENT_REGISTRY,
|
|
1482
|
+
useFactory: /* @__PURE__ */ __name(() => new import_nestjs_agent_core14.AgentRegistry(), "useFactory")
|
|
1483
|
+
},
|
|
1484
|
+
// A shared, mutable list AgentDiscoveryService fills with `@SystemPromptContributor()` methods.
|
|
1485
|
+
{
|
|
1486
|
+
provide: import_nestjs_agent_core14.AGENT_PROMPT_CONTRIBUTORS,
|
|
1487
|
+
useFactory: /* @__PURE__ */ __name(() => [], "useFactory")
|
|
1379
1488
|
},
|
|
1380
1489
|
{
|
|
1381
|
-
provide:
|
|
1490
|
+
provide: import_nestjs_agent_core14.AGENT_SINK,
|
|
1382
1491
|
useFactory: /* @__PURE__ */ __name((options) => options.sink ?? new InProcessTokenStreamSink(), "useFactory"),
|
|
1383
1492
|
inject: [
|
|
1384
|
-
|
|
1493
|
+
import_nestjs_agent_core14.AGENT_OPTIONS
|
|
1385
1494
|
]
|
|
1386
1495
|
},
|
|
1387
1496
|
{
|
|
1388
|
-
provide:
|
|
1389
|
-
useFactory: /* @__PURE__ */ __name((options) => options.rolesPolicy ?? new
|
|
1497
|
+
provide: import_nestjs_agent_core14.AGENT_ROLES_POLICY,
|
|
1498
|
+
useFactory: /* @__PURE__ */ __name((options) => options.rolesPolicy ?? new import_nestjs_agent_core14.DefaultRolesPolicy(options.defaultRoles), "useFactory"),
|
|
1390
1499
|
inject: [
|
|
1391
|
-
|
|
1500
|
+
import_nestjs_agent_core14.AGENT_OPTIONS
|
|
1392
1501
|
]
|
|
1393
1502
|
},
|
|
1394
1503
|
{
|
|
1395
|
-
provide:
|
|
1504
|
+
provide: import_nestjs_agent_core14.AGENT_ACTOR_RESOLVER,
|
|
1396
1505
|
useFactory: /* @__PURE__ */ __name((options) => options.actorResolver, "useFactory"),
|
|
1397
1506
|
inject: [
|
|
1398
|
-
|
|
1507
|
+
import_nestjs_agent_core14.AGENT_OPTIONS
|
|
1399
1508
|
]
|
|
1400
1509
|
},
|
|
1401
1510
|
{
|
|
1402
|
-
provide:
|
|
1511
|
+
provide: import_nestjs_agent_core14.AGENT_MODEL,
|
|
1403
1512
|
useFactory: /* @__PURE__ */ __name((o) => o.model, "useFactory"),
|
|
1404
1513
|
inject: [
|
|
1405
|
-
|
|
1514
|
+
import_nestjs_agent_core14.AGENT_OPTIONS
|
|
1406
1515
|
]
|
|
1407
1516
|
},
|
|
1408
1517
|
{
|
|
1409
1518
|
// An explicit `quota` wins; otherwise `quotaLimitTokens` binds the built-in ledger-backed
|
|
1410
1519
|
// store; otherwise quotas are off (undefined). The ledger store reads the same usage rows
|
|
1411
1520
|
// the loop already writes, so enforcement needs no extra shared state across replicas.
|
|
1412
|
-
provide:
|
|
1521
|
+
provide: import_nestjs_agent_core14.AGENT_QUOTA_STORE,
|
|
1413
1522
|
useFactory: /* @__PURE__ */ __name((o, store) => o.quota ?? (o.quotaLimitTokens !== void 0 ? new LedgerQuotaStore(store, o.quotaLimitTokens) : void 0), "useFactory"),
|
|
1414
1523
|
inject: [
|
|
1415
|
-
|
|
1416
|
-
|
|
1524
|
+
import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
1525
|
+
import_nestjs_agent_core14.AGENT_STORE
|
|
1417
1526
|
]
|
|
1418
1527
|
},
|
|
1419
1528
|
AgentDepsFactory2,
|
|
1420
1529
|
{
|
|
1421
|
-
provide:
|
|
1530
|
+
provide: import_nestjs_agent_core14.AGENT_DEPS_FACTORY,
|
|
1422
1531
|
useExisting: AgentDepsFactory2
|
|
1423
1532
|
},
|
|
1533
|
+
// Populates the registry + contributors (onModuleInit) BEFORE AiToolDiscoveryService synthesizes
|
|
1534
|
+
// handoff tools (onApplicationBootstrap) reads the registry.
|
|
1535
|
+
AgentDiscoveryService,
|
|
1424
1536
|
AiToolDiscoveryService,
|
|
1425
1537
|
InlineAgentRunner,
|
|
1426
1538
|
AgentService
|
|
1427
1539
|
];
|
|
1428
1540
|
if (includeStore) {
|
|
1429
1541
|
providers.push({
|
|
1430
|
-
provide:
|
|
1542
|
+
provide: import_nestjs_agent_core14.AGENT_STORE,
|
|
1431
1543
|
useFactory: /* @__PURE__ */ __name((o) => o.store, "useFactory"),
|
|
1432
1544
|
inject: [
|
|
1433
|
-
|
|
1545
|
+
import_nestjs_agent_core14.AGENT_OPTIONS
|
|
1434
1546
|
]
|
|
1435
1547
|
});
|
|
1436
1548
|
}
|
|
1437
1549
|
if (durable) {
|
|
1438
1550
|
providers.push({
|
|
1439
|
-
provide:
|
|
1551
|
+
provide: import_nestjs_agent_core14.AGENT_RUNNER,
|
|
1440
1552
|
useFactory: /* @__PURE__ */ __name((durableRunner) => {
|
|
1441
1553
|
if (durableRunner === void 0) {
|
|
1442
1554
|
throw new Error("AgentModule.forRoot({ durable: true }) requires importing AgentDurableModule from '@dudousxd/nestjs-agent/durable' (alongside a configured DurableModule). It was not found.");
|
|
@@ -1445,14 +1557,14 @@ function sharedProviders(durable, includeStore) {
|
|
|
1445
1557
|
}, "useFactory"),
|
|
1446
1558
|
inject: [
|
|
1447
1559
|
{
|
|
1448
|
-
token:
|
|
1560
|
+
token: import_nestjs_agent_core14.AGENT_DURABLE_RUNNER,
|
|
1449
1561
|
optional: true
|
|
1450
1562
|
}
|
|
1451
1563
|
]
|
|
1452
1564
|
});
|
|
1453
1565
|
} else {
|
|
1454
1566
|
providers.push({
|
|
1455
|
-
provide:
|
|
1567
|
+
provide: import_nestjs_agent_core14.AGENT_RUNNER,
|
|
1456
1568
|
useExisting: InlineAgentRunner
|
|
1457
1569
|
});
|
|
1458
1570
|
}
|
|
@@ -1461,18 +1573,19 @@ function sharedProviders(durable, includeStore) {
|
|
|
1461
1573
|
__name(sharedProviders, "sharedProviders");
|
|
1462
1574
|
function exportsFor(includeStore) {
|
|
1463
1575
|
return [
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1576
|
+
import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
1577
|
+
import_nestjs_agent_core14.AGENT_TOOL_REGISTRY,
|
|
1578
|
+
import_nestjs_agent_core14.AGENT_REGISTRY,
|
|
1579
|
+
import_nestjs_agent_core14.AGENT_SINK,
|
|
1580
|
+
import_nestjs_agent_core14.AGENT_ROLES_POLICY,
|
|
1581
|
+
import_nestjs_agent_core14.AGENT_ACTOR_RESOLVER,
|
|
1582
|
+
import_nestjs_agent_core14.AGENT_MODEL,
|
|
1471
1583
|
...includeStore ? [
|
|
1472
|
-
|
|
1584
|
+
import_nestjs_agent_core14.AGENT_STORE
|
|
1473
1585
|
] : [],
|
|
1474
|
-
|
|
1475
|
-
|
|
1586
|
+
import_nestjs_agent_core14.AGENT_QUOTA_STORE,
|
|
1587
|
+
import_nestjs_agent_core14.AGENT_PROMPT_CONTRIBUTORS,
|
|
1588
|
+
import_nestjs_agent_core14.AGENT_DEPS_FACTORY,
|
|
1476
1589
|
AgentDepsFactory2,
|
|
1477
1590
|
AgentService,
|
|
1478
1591
|
InlineAgentRunner
|
|
@@ -1486,7 +1599,7 @@ var CONTROLLERS = [
|
|
|
1486
1599
|
QuotaController
|
|
1487
1600
|
];
|
|
1488
1601
|
function routerFor(path) {
|
|
1489
|
-
return
|
|
1602
|
+
return import_core3.RouterModule.register([
|
|
1490
1603
|
{
|
|
1491
1604
|
path,
|
|
1492
1605
|
module: AgentModule
|
|
@@ -1505,13 +1618,13 @@ var AgentModule = class _AgentModule {
|
|
|
1505
1618
|
module: _AgentModule,
|
|
1506
1619
|
global: true,
|
|
1507
1620
|
imports: [
|
|
1508
|
-
|
|
1621
|
+
import_core3.DiscoveryModule,
|
|
1509
1622
|
routerFor(path)
|
|
1510
1623
|
],
|
|
1511
1624
|
controllers: CONTROLLERS,
|
|
1512
1625
|
providers: [
|
|
1513
1626
|
{
|
|
1514
|
-
provide:
|
|
1627
|
+
provide: import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
1515
1628
|
useValue: options
|
|
1516
1629
|
},
|
|
1517
1630
|
...sharedProviders(options.durable ?? false, includeStore)
|
|
@@ -1525,14 +1638,14 @@ var AgentModule = class _AgentModule {
|
|
|
1525
1638
|
module: _AgentModule,
|
|
1526
1639
|
global: true,
|
|
1527
1640
|
imports: [
|
|
1528
|
-
|
|
1641
|
+
import_core3.DiscoveryModule,
|
|
1529
1642
|
routerFor(path),
|
|
1530
1643
|
...options.imports ?? []
|
|
1531
1644
|
],
|
|
1532
1645
|
controllers: CONTROLLERS,
|
|
1533
1646
|
providers: [
|
|
1534
1647
|
{
|
|
1535
|
-
provide:
|
|
1648
|
+
provide: import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
1536
1649
|
useFactory: options.useFactory,
|
|
1537
1650
|
inject: options.inject ?? []
|
|
1538
1651
|
},
|
|
@@ -1543,30 +1656,10 @@ var AgentModule = class _AgentModule {
|
|
|
1543
1656
|
exports: exportsFor(true)
|
|
1544
1657
|
};
|
|
1545
1658
|
}
|
|
1546
|
-
/** Register additional named agents (an orchestrator + its sub-agents). */
|
|
1547
|
-
static forFeature(definitions) {
|
|
1548
|
-
return {
|
|
1549
|
-
module: _AgentModule,
|
|
1550
|
-
providers: [
|
|
1551
|
-
{
|
|
1552
|
-
provide: FEATURE_INIT,
|
|
1553
|
-
useFactory: /* @__PURE__ */ __name((registry) => {
|
|
1554
|
-
for (const definition of definitions) {
|
|
1555
|
-
registry.register(definition);
|
|
1556
|
-
}
|
|
1557
|
-
return true;
|
|
1558
|
-
}, "useFactory"),
|
|
1559
|
-
inject: [
|
|
1560
|
-
import_nestjs_agent_core13.AGENT_REGISTRY
|
|
1561
|
-
]
|
|
1562
|
-
}
|
|
1563
|
-
]
|
|
1564
|
-
};
|
|
1565
|
-
}
|
|
1566
1659
|
};
|
|
1567
|
-
AgentModule =
|
|
1568
|
-
(0,
|
|
1569
|
-
(0,
|
|
1660
|
+
AgentModule = _ts_decorate13([
|
|
1661
|
+
(0, import_common13.Global)(),
|
|
1662
|
+
(0, import_common13.Module)({})
|
|
1570
1663
|
], AgentModule);
|
|
1571
1664
|
|
|
1572
1665
|
// src/durable/agent-durable.ts
|