@dudousxd/nestjs-agent 0.4.1 → 0.5.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.
@@ -112,6 +112,16 @@ interface AgentModuleOptions {
112
112
  * `AgentDurableModule` from `@dudousxd/nestjs-agent/durable` and a configured `DurableModule`.
113
113
  */
114
114
  durable?: boolean;
115
+ /**
116
+ * Dispatch the turn's model call and tool executions as routed durable steps
117
+ * (`AgentRunSteps.llm` / `AgentRunSteps.tool`) instead of in-process `ctx.localStep`s. Requires
118
+ * `durable: true` (module build throws otherwise). Multi-pod fleets MUST wire a cross-process
119
+ * token sink (e.g. a Redis pub/sub `TokenStreamSink`) — the dispatched `llm` step streams from
120
+ * whichever worker serves it, not necessarily the one running this workflow. STATIC top-level flag
121
+ * (like `durable`/`attachments.upload`): it changes what gets registered and how the workflow
122
+ * dispatches, decided at module build time.
123
+ */
124
+ dispatchedSteps?: boolean;
115
125
  /**
116
126
  * Static functional tools (`{ spec, handler }`, e.g. from `createExecuteSqlTool`) to register at
117
127
  * boot. For tools that need DI-resolved dependencies, use `provideAgentTool(factory, inject)` in a
@@ -173,6 +183,13 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
173
183
  * the runner. Requires importing `AgentDurableModule` and a configured `DurableModule`.
174
184
  */
175
185
  durable?: boolean;
186
+ /**
187
+ * Dispatch the turn's model call and tool executions as routed durable steps. Same static-wiring
188
+ * reasoning as `durable` above — it lives here (not in the async factory result) because it decides
189
+ * how `AgentRunWorkflow` builds its hooks at module build time. Requires `durable: true` (module
190
+ * build throws otherwise). See `AgentModuleOptions.dispatchedSteps` for the full contract.
191
+ */
192
+ dispatchedSteps?: boolean;
176
193
  /**
177
194
  * Set when `AGENT_STORE` is bound by a globally-imported store module (e.g.
178
195
  * `MikroOrmAgentStoreModule.forFeature()`) instead of returned as `store` from `useFactory`.
@@ -112,6 +112,16 @@ interface AgentModuleOptions {
112
112
  * `AgentDurableModule` from `@dudousxd/nestjs-agent/durable` and a configured `DurableModule`.
113
113
  */
114
114
  durable?: boolean;
115
+ /**
116
+ * Dispatch the turn's model call and tool executions as routed durable steps
117
+ * (`AgentRunSteps.llm` / `AgentRunSteps.tool`) instead of in-process `ctx.localStep`s. Requires
118
+ * `durable: true` (module build throws otherwise). Multi-pod fleets MUST wire a cross-process
119
+ * token sink (e.g. a Redis pub/sub `TokenStreamSink`) — the dispatched `llm` step streams from
120
+ * whichever worker serves it, not necessarily the one running this workflow. STATIC top-level flag
121
+ * (like `durable`/`attachments.upload`): it changes what gets registered and how the workflow
122
+ * dispatches, decided at module build time.
123
+ */
124
+ dispatchedSteps?: boolean;
115
125
  /**
116
126
  * Static functional tools (`{ spec, handler }`, e.g. from `createExecuteSqlTool`) to register at
117
127
  * boot. For tools that need DI-resolved dependencies, use `provideAgentTool(factory, inject)` in a
@@ -173,6 +183,13 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
173
183
  * the runner. Requires importing `AgentDurableModule` and a configured `DurableModule`.
174
184
  */
175
185
  durable?: boolean;
186
+ /**
187
+ * Dispatch the turn's model call and tool executions as routed durable steps. Same static-wiring
188
+ * reasoning as `durable` above — it lives here (not in the async factory result) because it decides
189
+ * how `AgentRunWorkflow` builds its hooks at module build time. Requires `durable: true` (module
190
+ * build throws otherwise). See `AgentModuleOptions.dispatchedSteps` for the full contract.
191
+ */
192
+ dispatchedSteps?: boolean;
176
193
  /**
177
194
  * Set when `AGENT_STORE` is bound by a globally-imported store module (e.g.
178
195
  * `MikroOrmAgentStoreModule.forFeature()`) instead of returned as `store` from `useFactory`.