@dudousxd/nestjs-agent 0.9.0 → 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-DNslT7_J.d.cts → agent-deps.factory-D7GdhqdK.d.cts} +33 -1
- package/dist/{agent-deps.factory-DNslT7_J.d.ts → agent-deps.factory-D7GdhqdK.d.ts} +33 -1
- package/dist/durable/index.cjs +214 -168
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +42 -9
- package/dist/durable/index.d.ts +42 -9
- package/dist/durable/index.js +213 -167
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +14 -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 +14 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1961,6 +1961,10 @@ function controllersFor(mountAttachments) {
|
|
|
1961
1961
|
] : BASE_CONTROLLERS;
|
|
1962
1962
|
}
|
|
1963
1963
|
__name(controllersFor, "controllersFor");
|
|
1964
|
+
function controllersForSurface(surface, mountAttachments) {
|
|
1965
|
+
return surface === "engine" ? [] : controllersFor(mountAttachments);
|
|
1966
|
+
}
|
|
1967
|
+
__name(controllersForSurface, "controllersForSurface");
|
|
1964
1968
|
var GUARDS_METADATA = "__guards__";
|
|
1965
1969
|
function applyGuards(guards) {
|
|
1966
1970
|
const resolved = guards ?? [];
|
|
@@ -2006,7 +2010,7 @@ var AgentModule = class _AgentModule {
|
|
|
2006
2010
|
import_core3.DiscoveryModule,
|
|
2007
2011
|
routerFor(path)
|
|
2008
2012
|
],
|
|
2009
|
-
controllers:
|
|
2013
|
+
controllers: controllersForSurface(options.surface, options.attachments?.upload === true),
|
|
2010
2014
|
providers: [
|
|
2011
2015
|
{
|
|
2012
2016
|
provide: import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
@@ -2031,17 +2035,21 @@ var AgentModule = class _AgentModule {
|
|
|
2031
2035
|
routerFor(path),
|
|
2032
2036
|
...options.imports ?? []
|
|
2033
2037
|
],
|
|
2034
|
-
controllers:
|
|
2038
|
+
controllers: controllersForSurface(options.surface, options.attachmentsUpload === true),
|
|
2035
2039
|
providers: [
|
|
2036
2040
|
{
|
|
2037
2041
|
provide: import_nestjs_agent_core14.AGENT_OPTIONS,
|
|
2038
|
-
// Stamp the STATIC wiring flags onto the factory result: `durable`/`dispatchedSteps
|
|
2039
|
-
// authoritative on the async config object (they decided the actual wiring
|
|
2040
|
-
// `AgentDurableModule` derives the effective dispatched-steps value from
|
|
2041
|
-
// 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.
|
|
2042
2049
|
useFactory: /* @__PURE__ */ __name(async (...args) => ({
|
|
2043
2050
|
...await options.useFactory(...args),
|
|
2044
2051
|
durable: options.durable ?? false,
|
|
2052
|
+
surface: options.surface ?? "both",
|
|
2045
2053
|
...options.dispatchedSteps !== void 0 ? {
|
|
2046
2054
|
dispatchedSteps: options.dispatchedSteps
|
|
2047
2055
|
} : {}
|