@dudousxd/nestjs-agent 0.3.1 → 0.3.3

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.
@@ -140,6 +140,17 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
140
140
  * the runner. Requires importing `AgentDurableModule` and a configured `DurableModule`.
141
141
  */
142
142
  durable?: boolean;
143
+ /**
144
+ * Set when `AGENT_STORE` is bound by a globally-imported store module (e.g.
145
+ * `MikroOrmAgentStoreModule.forFeature()`) instead of returned as `store` from `useFactory`.
146
+ *
147
+ * `forRoot` decides this synchronously (`store` present or not), but the async factory resolves
148
+ * too late to inspect — so by default `forRootAsync` binds `AGENT_STORE` from the factory result,
149
+ * which would shadow a global store binding with `undefined` when the factory omits `store`. Set
150
+ * this to `true` to skip the local binding and defer to the global one. Leave it unset (and return
151
+ * `store` from the factory) when the store is constructed inside the factory.
152
+ */
153
+ externalStore?: boolean;
143
154
  }
144
155
 
145
156
  /** The synthesized `agent`-kind tool name an orchestrator uses to hand off to `target`. */
@@ -140,6 +140,17 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
140
140
  * the runner. Requires importing `AgentDurableModule` and a configured `DurableModule`.
141
141
  */
142
142
  durable?: boolean;
143
+ /**
144
+ * Set when `AGENT_STORE` is bound by a globally-imported store module (e.g.
145
+ * `MikroOrmAgentStoreModule.forFeature()`) instead of returned as `store` from `useFactory`.
146
+ *
147
+ * `forRoot` decides this synchronously (`store` present or not), but the async factory resolves
148
+ * too late to inspect — so by default `forRootAsync` binds `AGENT_STORE` from the factory result,
149
+ * which would shadow a global store binding with `undefined` when the factory omits `store`. Set
150
+ * this to `true` to skip the local binding and defer to the global one. Leave it unset (and return
151
+ * `store` from the factory) when the store is constructed inside the factory.
152
+ */
153
+ externalStore?: boolean;
143
154
  }
144
155
 
145
156
  /** The synthesized `agent`-kind tool name an orchestrator uses to hand off to `target`. */