@dudousxd/nestjs-agent 0.8.2 → 0.10.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/README.md +36 -0
- package/dist/{agent-deps.factory-BlC9tumI.d.cts → agent-deps.factory-D7GdhqdK.d.cts} +49 -2
- package/dist/{agent-deps.factory-BlC9tumI.d.ts → agent-deps.factory-D7GdhqdK.d.ts} +49 -2
- package/dist/durable/index.cjs +217 -146
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +50 -12
- package/dist/durable/index.d.ts +50 -12
- package/dist/durable/index.js +216 -145
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +17 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, OnModuleInit, Type, OnApplicationBootstrap } from '@nestjs/common';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory } from './agent-deps.factory-D7GdhqdK.cjs';
|
|
3
|
+
export { d as AGENT_TOOL_BRAND, e as AgentAttachmentsOptions, f as AgentDeps, a as AgentSurface, F as FunctionalTool, g as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-D7GdhqdK.cjs';
|
|
4
4
|
import { AgentRunner, AgentStore, QuotaStore, Actor, MessageAttachment, PageContext, Decision, ThreadSummary, ThreadDetail, UpdateThreadInput, QuotaView, AgentApprovalPort, ActorResolver, AttachmentStagingStore, ToolRegistry, AgentRegistry, PromptContributor, AgentRunInput, TokenStreamSink, SinkWriter, QuotaState } from '@dudousxd/nestjs-agent-core';
|
|
5
5
|
export * from '@dudousxd/nestjs-agent-core';
|
|
6
6
|
import { Request } from 'express';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule, OnModuleInit, Type, OnApplicationBootstrap } from '@nestjs/common';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory } from './agent-deps.factory-D7GdhqdK.js';
|
|
3
|
+
export { d as AGENT_TOOL_BRAND, e as AgentAttachmentsOptions, f as AgentDeps, a as AgentSurface, F as FunctionalTool, g as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-D7GdhqdK.js';
|
|
4
4
|
import { AgentRunner, AgentStore, QuotaStore, Actor, MessageAttachment, PageContext, Decision, ThreadSummary, ThreadDetail, UpdateThreadInput, QuotaView, AgentApprovalPort, ActorResolver, AttachmentStagingStore, ToolRegistry, AgentRegistry, PromptContributor, AgentRunInput, TokenStreamSink, SinkWriter, QuotaState } from '@dudousxd/nestjs-agent-core';
|
|
5
5
|
export * from '@dudousxd/nestjs-agent-core';
|
|
6
6
|
import { Request } from 'express';
|
package/dist/index.js
CHANGED
|
@@ -111,6 +111,9 @@ var AgentDepsFactory2 = class {
|
|
|
111
111
|
...this.options.toolTimeoutMs !== void 0 ? {
|
|
112
112
|
toolTimeoutMs: this.options.toolTimeoutMs
|
|
113
113
|
} : {},
|
|
114
|
+
...this.options.toolTransientRetry !== void 0 ? {
|
|
115
|
+
toolTransientRetry: this.options.toolTransientRetry
|
|
116
|
+
} : {},
|
|
114
117
|
...followUpsCount !== void 0 ? {
|
|
115
118
|
followUpsCount
|
|
116
119
|
} : {},
|
|
@@ -1907,6 +1910,10 @@ function controllersFor(mountAttachments) {
|
|
|
1907
1910
|
] : BASE_CONTROLLERS;
|
|
1908
1911
|
}
|
|
1909
1912
|
__name(controllersFor, "controllersFor");
|
|
1913
|
+
function controllersForSurface(surface, mountAttachments) {
|
|
1914
|
+
return surface === "engine" ? [] : controllersFor(mountAttachments);
|
|
1915
|
+
}
|
|
1916
|
+
__name(controllersForSurface, "controllersForSurface");
|
|
1910
1917
|
var GUARDS_METADATA = "__guards__";
|
|
1911
1918
|
function applyGuards(guards) {
|
|
1912
1919
|
const resolved = guards ?? [];
|
|
@@ -1952,7 +1959,7 @@ var AgentModule = class _AgentModule {
|
|
|
1952
1959
|
DiscoveryModule,
|
|
1953
1960
|
routerFor(path)
|
|
1954
1961
|
],
|
|
1955
|
-
controllers:
|
|
1962
|
+
controllers: controllersForSurface(options.surface, options.attachments?.upload === true),
|
|
1956
1963
|
providers: [
|
|
1957
1964
|
{
|
|
1958
1965
|
provide: AGENT_OPTIONS4,
|
|
@@ -1977,17 +1984,21 @@ var AgentModule = class _AgentModule {
|
|
|
1977
1984
|
routerFor(path),
|
|
1978
1985
|
...options.imports ?? []
|
|
1979
1986
|
],
|
|
1980
|
-
controllers:
|
|
1987
|
+
controllers: controllersForSurface(options.surface, options.attachmentsUpload === true),
|
|
1981
1988
|
providers: [
|
|
1982
1989
|
{
|
|
1983
1990
|
provide: AGENT_OPTIONS4,
|
|
1984
|
-
// Stamp the STATIC wiring flags onto the factory result: `durable`/`dispatchedSteps
|
|
1985
|
-
// authoritative on the async config object (they decided the actual wiring
|
|
1986
|
-
// `AgentDurableModule` derives the effective dispatched-steps value from
|
|
1987
|
-
// without this stamp, an async host would get in-process localSteps
|
|
1991
|
+
// Stamp the STATIC wiring flags onto the factory result: `durable`/`dispatchedSteps`/
|
|
1992
|
+
// `surface` are authoritative on the async config object (they decided the actual wiring
|
|
1993
|
+
// above), and `AgentDurableModule` derives the effective dispatched-steps value from
|
|
1994
|
+
// AGENT_OPTIONS — without this stamp, an async host would get in-process localSteps
|
|
1995
|
+
// despite durable: true. `surface` isn't read back by anything today (AgentDurableModule
|
|
1996
|
+
// takes its own mirror option — see its doc for why), but it's stamped here too so the
|
|
1997
|
+
// EFFECTIVE value is always observable off AGENT_OPTIONS, sync or async alike.
|
|
1988
1998
|
useFactory: /* @__PURE__ */ __name(async (...args) => ({
|
|
1989
1999
|
...await options.useFactory(...args),
|
|
1990
2000
|
durable: options.durable ?? false,
|
|
2001
|
+
surface: options.surface ?? "both",
|
|
1991
2002
|
...options.dispatchedSteps !== void 0 ? {
|
|
1992
2003
|
dispatchedSteps: options.dispatchedSteps
|
|
1993
2004
|
} : {}
|