@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/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: controllersFor(options.attachments?.upload === true),
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: controllersFor(options.attachmentsUpload === true),
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` are
2036
- // authoritative on the async config object (they decided the actual wiring above), and
2037
- // `AgentDurableModule` derives the effective dispatched-steps value from AGENT_OPTIONS —
2038
- // without this stamp, an async host would get in-process localSteps despite durable: true.
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
  } : {}