@dudousxd/nestjs-agent 0.4.1 → 0.6.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/{agent-deps.factory-BM_RB6br.d.cts → agent-deps.factory-BlC9tumI.d.cts} +24 -0
- package/dist/{agent-deps.factory-BM_RB6br.d.ts → agent-deps.factory-BlC9tumI.d.ts} +24 -0
- package/dist/durable/index.cjs +701 -459
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +76 -12
- package/dist/durable/index.d.ts +76 -12
- package/dist/durable/index.js +614 -374
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +327 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -9
- package/dist/index.d.ts +48 -9
- package/dist/index.js +244 -144
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -112,6 +112,21 @@ 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.
|
|
118
|
+
* DEFAULT `true` under `durable: true` — dispatching moves the run off its pod during the two
|
|
119
|
+
* long steps (the correct production posture), and `AgentRunSteps` is always registered so the
|
|
120
|
+
* routed groups are never unserved. Set `false` to keep the turn's steps in-process localSteps.
|
|
121
|
+
* `true` without `durable: true` throws at module build.
|
|
122
|
+
*
|
|
123
|
+
* The cross-process-sink requirement is a property of `durable: true` itself, not of this flag:
|
|
124
|
+
* the turn already runs on whichever worker takes `agent.run`, which may not be the pod holding
|
|
125
|
+
* the SSE connection — multi-pod fleets MUST wire a cross-process token sink (e.g. a Redis
|
|
126
|
+
* pub/sub `TokenStreamSink`) either way. STATIC top-level flag (like `durable`/
|
|
127
|
+
* `attachments.upload`): it decides how the workflow dispatches at module build time.
|
|
128
|
+
*/
|
|
129
|
+
dispatchedSteps?: boolean;
|
|
115
130
|
/**
|
|
116
131
|
* Static functional tools (`{ spec, handler }`, e.g. from `createExecuteSqlTool`) to register at
|
|
117
132
|
* boot. For tools that need DI-resolved dependencies, use `provideAgentTool(factory, inject)` in a
|
|
@@ -173,6 +188,15 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
|
173
188
|
* the runner. Requires importing `AgentDurableModule` and a configured `DurableModule`.
|
|
174
189
|
*/
|
|
175
190
|
durable?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Dispatch the turn's model call and tool executions as routed durable steps. DEFAULT `true`
|
|
193
|
+
* under `durable: true`; set `false` to keep the turn's steps in-process localSteps. Same
|
|
194
|
+
* static-wiring reasoning as `durable` above — it lives here (not in the async factory result)
|
|
195
|
+
* because it decides how `AgentRunWorkflow` builds its hooks at module build time. `true` without
|
|
196
|
+
* `durable: true` throws at module build. See `AgentModuleOptions.dispatchedSteps` for the full
|
|
197
|
+
* contract.
|
|
198
|
+
*/
|
|
199
|
+
dispatchedSteps?: boolean;
|
|
176
200
|
/**
|
|
177
201
|
* Set when `AGENT_STORE` is bound by a globally-imported store module (e.g.
|
|
178
202
|
* `MikroOrmAgentStoreModule.forFeature()`) instead of returned as `store` from `useFactory`.
|
|
@@ -112,6 +112,21 @@ 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.
|
|
118
|
+
* DEFAULT `true` under `durable: true` — dispatching moves the run off its pod during the two
|
|
119
|
+
* long steps (the correct production posture), and `AgentRunSteps` is always registered so the
|
|
120
|
+
* routed groups are never unserved. Set `false` to keep the turn's steps in-process localSteps.
|
|
121
|
+
* `true` without `durable: true` throws at module build.
|
|
122
|
+
*
|
|
123
|
+
* The cross-process-sink requirement is a property of `durable: true` itself, not of this flag:
|
|
124
|
+
* the turn already runs on whichever worker takes `agent.run`, which may not be the pod holding
|
|
125
|
+
* the SSE connection — multi-pod fleets MUST wire a cross-process token sink (e.g. a Redis
|
|
126
|
+
* pub/sub `TokenStreamSink`) either way. STATIC top-level flag (like `durable`/
|
|
127
|
+
* `attachments.upload`): it decides how the workflow dispatches at module build time.
|
|
128
|
+
*/
|
|
129
|
+
dispatchedSteps?: boolean;
|
|
115
130
|
/**
|
|
116
131
|
* Static functional tools (`{ spec, handler }`, e.g. from `createExecuteSqlTool`) to register at
|
|
117
132
|
* boot. For tools that need DI-resolved dependencies, use `provideAgentTool(factory, inject)` in a
|
|
@@ -173,6 +188,15 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
|
173
188
|
* the runner. Requires importing `AgentDurableModule` and a configured `DurableModule`.
|
|
174
189
|
*/
|
|
175
190
|
durable?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Dispatch the turn's model call and tool executions as routed durable steps. DEFAULT `true`
|
|
193
|
+
* under `durable: true`; set `false` to keep the turn's steps in-process localSteps. Same
|
|
194
|
+
* static-wiring reasoning as `durable` above — it lives here (not in the async factory result)
|
|
195
|
+
* because it decides how `AgentRunWorkflow` builds its hooks at module build time. `true` without
|
|
196
|
+
* `durable: true` throws at module build. See `AgentModuleOptions.dispatchedSteps` for the full
|
|
197
|
+
* contract.
|
|
198
|
+
*/
|
|
199
|
+
dispatchedSteps?: boolean;
|
|
176
200
|
/**
|
|
177
201
|
* Set when `AGENT_STORE` is bound by a globally-imported store module (e.g.
|
|
178
202
|
* `MikroOrmAgentStoreModule.forFeature()`) instead of returned as `store` from `useFactory`.
|