@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.cjs
CHANGED
|
@@ -162,6 +162,9 @@ var AgentDepsFactory2 = class {
|
|
|
162
162
|
...this.options.toolTimeoutMs !== void 0 ? {
|
|
163
163
|
toolTimeoutMs: this.options.toolTimeoutMs
|
|
164
164
|
} : {},
|
|
165
|
+
...this.options.toolTransientRetry !== void 0 ? {
|
|
166
|
+
toolTransientRetry: this.options.toolTransientRetry
|
|
167
|
+
} : {},
|
|
165
168
|
...followUpsCount !== void 0 ? {
|
|
166
169
|
followUpsCount
|
|
167
170
|
} : {},
|
|
@@ -1958,6 +1961,10 @@ function controllersFor(mountAttachments) {
|
|
|
1958
1961
|
] : BASE_CONTROLLERS;
|
|
1959
1962
|
}
|
|
1960
1963
|
__name(controllersFor, "controllersFor");
|
|
1964
|
+
function controllersForSurface(surface, mountAttachments) {
|
|
1965
|
+
return surface === "engine" ? [] : controllersFor(mountAttachments);
|
|
1966
|
+
}
|
|
1967
|
+
__name(controllersForSurface, "controllersForSurface");
|
|
1961
1968
|
var GUARDS_METADATA = "__guards__";
|
|
1962
1969
|
function applyGuards(guards) {
|
|
1963
1970
|
const resolved = guards ?? [];
|
|
@@ -2003,7 +2010,7 @@ var AgentModule = class _AgentModule {
|
|
|
2003
2010
|
import_core3.DiscoveryModule,
|
|
2004
2011
|
routerFor(path)
|
|
2005
2012
|
],
|
|
2006
|
-
controllers:
|
|
2013
|
+
controllers: controllersForSurface(options.surface, options.attachments?.upload === true),
|
|
2007
2014
|
providers: [
|
|
2008
2015
|
{
|
|
2009
2016
|
provide: import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
@@ -2028,17 +2035,21 @@ var AgentModule = class _AgentModule {
|
|
|
2028
2035
|
routerFor(path),
|
|
2029
2036
|
...options.imports ?? []
|
|
2030
2037
|
],
|
|
2031
|
-
controllers:
|
|
2038
|
+
controllers: controllersForSurface(options.surface, options.attachmentsUpload === true),
|
|
2032
2039
|
providers: [
|
|
2033
2040
|
{
|
|
2034
2041
|
provide: import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
2035
|
-
// Stamp the STATIC wiring flags onto the factory result: `durable`/`dispatchedSteps
|
|
2036
|
-
// authoritative on the async config object (they decided the actual wiring
|
|
2037
|
-
// `AgentDurableModule` derives the effective dispatched-steps value from
|
|
2038
|
-
// without this stamp, an async host would get in-process localSteps
|
|
2042
|
+
// Stamp the STATIC wiring flags onto the factory result: `durable`/`dispatchedSteps`/
|
|
2043
|
+
// `surface` are authoritative on the async config object (they decided the actual wiring
|
|
2044
|
+
// above), and `AgentDurableModule` derives the effective dispatched-steps value from
|
|
2045
|
+
// AGENT_OPTIONS — without this stamp, an async host would get in-process localSteps
|
|
2046
|
+
// despite durable: true. `surface` isn't read back by anything today (AgentDurableModule
|
|
2047
|
+
// takes its own mirror option — see its doc for why), but it's stamped here too so the
|
|
2048
|
+
// EFFECTIVE value is always observable off AGENT_OPTIONS, sync or async alike.
|
|
2039
2049
|
useFactory: /* @__PURE__ */ __name(async (...args) => ({
|
|
2040
2050
|
...await options.useFactory(...args),
|
|
2041
2051
|
durable: options.durable ?? false,
|
|
2052
|
+
surface: options.surface ?? "both",
|
|
2042
2053
|
...options.dispatchedSteps !== void 0 ? {
|
|
2043
2054
|
dispatchedSteps: options.dispatchedSteps
|
|
2044
2055
|
} : {}
|