@mcp-abap-adt/llm-agent-server-libs 20.0.0 → 20.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.
Files changed (189) hide show
  1. package/dist/builders/controller-skill-pipeline-builder.d.ts +57 -0
  2. package/dist/builders/controller-skill-pipeline-builder.d.ts.map +1 -0
  3. package/dist/builders/controller-skill-pipeline-builder.js +175 -0
  4. package/dist/builders/controller-skill-pipeline-builder.js.map +1 -0
  5. package/dist/factories/controller-factory.d.ts +18 -1
  6. package/dist/factories/controller-factory.d.ts.map +1 -1
  7. package/dist/factories/controller-factory.js +12 -1
  8. package/dist/factories/controller-factory.js.map +1 -1
  9. package/dist/generated/version.d.ts +1 -1
  10. package/dist/generated/version.js +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/mcp/compose-auxiliary.d.ts +35 -0
  16. package/dist/mcp/compose-auxiliary.d.ts.map +1 -0
  17. package/dist/mcp/compose-auxiliary.js +64 -0
  18. package/dist/mcp/compose-auxiliary.js.map +1 -0
  19. package/dist/pipelines/controller.d.ts.map +1 -1
  20. package/dist/pipelines/controller.js +87 -5
  21. package/dist/pipelines/controller.js.map +1 -1
  22. package/dist/pipelines/coordinator-resolvers.d.ts +68 -0
  23. package/dist/pipelines/coordinator-resolvers.d.ts.map +1 -0
  24. package/dist/pipelines/coordinator-resolvers.js +97 -0
  25. package/dist/pipelines/coordinator-resolvers.js.map +1 -0
  26. package/dist/pipelines/parsers.d.ts +1 -1
  27. package/dist/pipelines/parsers.d.ts.map +1 -1
  28. package/dist/pipelines/parsers.js +5 -4
  29. package/dist/pipelines/parsers.js.map +1 -1
  30. package/dist/pipelines/register-skill-sources.d.ts.map +1 -1
  31. package/dist/pipelines/register-skill-sources.js +5 -0
  32. package/dist/pipelines/register-skill-sources.js.map +1 -1
  33. package/dist/smart-agent/build-stepper-root.d.ts +3 -2
  34. package/dist/smart-agent/build-stepper-root.d.ts.map +1 -1
  35. package/dist/smart-agent/build-stepper-root.js +2 -1
  36. package/dist/smart-agent/build-stepper-root.js.map +1 -1
  37. package/dist/smart-agent/config-reload-watcher.d.ts +30 -0
  38. package/dist/smart-agent/config-reload-watcher.d.ts.map +1 -0
  39. package/dist/smart-agent/config-reload-watcher.js +101 -0
  40. package/dist/smart-agent/config-reload-watcher.js.map +1 -0
  41. package/dist/smart-agent/config-validator.d.ts +21 -0
  42. package/dist/smart-agent/config-validator.d.ts.map +1 -0
  43. package/dist/smart-agent/config-validator.js +196 -0
  44. package/dist/smart-agent/config-validator.js.map +1 -0
  45. package/dist/smart-agent/config.d.ts +16 -254
  46. package/dist/smart-agent/config.d.ts.map +1 -1
  47. package/dist/smart-agent/config.js +17 -904
  48. package/dist/smart-agent/config.js.map +1 -1
  49. package/dist/smart-agent/controller/board.d.ts +6 -3
  50. package/dist/smart-agent/controller/board.d.ts.map +1 -1
  51. package/dist/smart-agent/controller/board.js +21 -0
  52. package/dist/smart-agent/controller/board.js.map +1 -1
  53. package/dist/smart-agent/controller/controller-coordinator-handler.d.ts +24 -50
  54. package/dist/smart-agent/controller/controller-coordinator-handler.d.ts.map +1 -1
  55. package/dist/smart-agent/controller/controller-coordinator-handler.js +542 -676
  56. package/dist/smart-agent/controller/controller-coordinator-handler.js.map +1 -1
  57. package/dist/smart-agent/controller/default-step-execution-control.d.ts +7 -0
  58. package/dist/smart-agent/controller/default-step-execution-control.d.ts.map +1 -0
  59. package/dist/smart-agent/controller/default-step-execution-control.js +36 -0
  60. package/dist/smart-agent/controller/default-step-execution-control.js.map +1 -0
  61. package/dist/smart-agent/controller/finalizer.d.ts +5 -0
  62. package/dist/smart-agent/controller/finalizer.d.ts.map +1 -1
  63. package/dist/smart-agent/controller/finalizer.js +12 -5
  64. package/dist/smart-agent/controller/finalizer.js.map +1 -1
  65. package/dist/smart-agent/controller/noop-run-execution-control.d.ts +6 -0
  66. package/dist/smart-agent/controller/noop-run-execution-control.d.ts.map +1 -0
  67. package/dist/smart-agent/controller/noop-run-execution-control.js +14 -0
  68. package/dist/smart-agent/controller/noop-run-execution-control.js.map +1 -0
  69. package/dist/smart-agent/controller/parser.d.ts +11 -0
  70. package/dist/smart-agent/controller/parser.d.ts.map +1 -0
  71. package/dist/smart-agent/controller/parser.js +77 -0
  72. package/dist/smart-agent/controller/parser.js.map +1 -0
  73. package/dist/smart-agent/controller/planner.js +1 -1
  74. package/dist/smart-agent/controller/planner.js.map +1 -1
  75. package/dist/smart-agent/controller/recall.d.ts +48 -0
  76. package/dist/smart-agent/controller/recall.d.ts.map +1 -0
  77. package/dist/smart-agent/controller/recall.js +196 -0
  78. package/dist/smart-agent/controller/recall.js.map +1 -0
  79. package/dist/smart-agent/controller/reviewer.d.ts.map +1 -1
  80. package/dist/smart-agent/controller/reviewer.js +1 -1
  81. package/dist/smart-agent/controller/reviewer.js.map +1 -1
  82. package/dist/smart-agent/controller/subagent-client.d.ts +2 -2
  83. package/dist/smart-agent/controller/subagent-client.d.ts.map +1 -1
  84. package/dist/smart-agent/controller/subagent-client.js +2 -2
  85. package/dist/smart-agent/controller/subagent-client.js.map +1 -1
  86. package/dist/smart-agent/controller/types.d.ts +16 -4
  87. package/dist/smart-agent/controller/types.d.ts.map +1 -1
  88. package/dist/smart-agent/controller/types.js.map +1 -1
  89. package/dist/smart-agent/controller/usage-logging.d.ts +16 -0
  90. package/dist/smart-agent/controller/usage-logging.d.ts.map +1 -0
  91. package/dist/smart-agent/controller/usage-logging.js +39 -0
  92. package/dist/smart-agent/controller/usage-logging.js.map +1 -0
  93. package/dist/smart-agent/http/adapter-route-handler.d.ts +13 -0
  94. package/dist/smart-agent/http/adapter-route-handler.d.ts.map +1 -0
  95. package/dist/smart-agent/http/adapter-route-handler.js +76 -0
  96. package/dist/smart-agent/http/adapter-route-handler.js.map +1 -0
  97. package/dist/smart-agent/http/chat-route-handler.d.ts +15 -0
  98. package/dist/smart-agent/http/chat-route-handler.d.ts.map +1 -0
  99. package/dist/smart-agent/http/chat-route-handler.js +327 -0
  100. package/dist/smart-agent/http/chat-route-handler.js.map +1 -0
  101. package/dist/smart-agent/http/config-route-handler.d.ts +21 -0
  102. package/dist/smart-agent/http/config-route-handler.d.ts.map +1 -0
  103. package/dist/smart-agent/http/config-route-handler.js +149 -0
  104. package/dist/smart-agent/http/config-route-handler.js.map +1 -0
  105. package/dist/smart-agent/http/health-route-handler.d.ts +12 -0
  106. package/dist/smart-agent/http/health-route-handler.d.ts.map +1 -0
  107. package/dist/smart-agent/http/health-route-handler.js +19 -0
  108. package/dist/smart-agent/http/health-route-handler.js.map +1 -0
  109. package/dist/smart-agent/http/models-route-handler.d.ts +17 -0
  110. package/dist/smart-agent/http/models-route-handler.d.ts.map +1 -0
  111. package/dist/smart-agent/http/models-route-handler.js +65 -0
  112. package/dist/smart-agent/http/models-route-handler.js.map +1 -0
  113. package/dist/smart-agent/http/response-helpers.d.ts +31 -0
  114. package/dist/smart-agent/http/response-helpers.d.ts.map +1 -0
  115. package/dist/smart-agent/http/response-helpers.js +59 -0
  116. package/dist/smart-agent/http/response-helpers.js.map +1 -0
  117. package/dist/smart-agent/http/route-table.d.ts +44 -0
  118. package/dist/smart-agent/http/route-table.d.ts.map +1 -0
  119. package/dist/smart-agent/http/route-table.js +35 -0
  120. package/dist/smart-agent/http/route-table.js.map +1 -0
  121. package/dist/smart-agent/http/session-cookie.d.ts +10 -0
  122. package/dist/smart-agent/http/session-cookie.d.ts.map +1 -0
  123. package/dist/smart-agent/http/session-cookie.js +16 -0
  124. package/dist/smart-agent/http/session-cookie.js.map +1 -0
  125. package/dist/smart-agent/http/sessions-route-handler.d.ts +8 -0
  126. package/dist/smart-agent/http/sessions-route-handler.d.ts.map +1 -0
  127. package/dist/smart-agent/http/sessions-route-handler.js +54 -0
  128. package/dist/smart-agent/http/sessions-route-handler.js.map +1 -0
  129. package/dist/smart-agent/http/usage-route-handler.d.ts +12 -0
  130. package/dist/smart-agent/http/usage-route-handler.d.ts.map +1 -0
  131. package/dist/smart-agent/http/usage-route-handler.js +28 -0
  132. package/dist/smart-agent/http/usage-route-handler.js.map +1 -0
  133. package/dist/smart-agent/knowledge/make-knowledge-backend.d.ts +13 -0
  134. package/dist/smart-agent/knowledge/make-knowledge-backend.d.ts.map +1 -0
  135. package/dist/smart-agent/knowledge/make-knowledge-backend.js +18 -0
  136. package/dist/smart-agent/knowledge/make-knowledge-backend.js.map +1 -0
  137. package/dist/smart-agent/llm/role-llm-resolver.d.ts +30 -0
  138. package/dist/smart-agent/llm/role-llm-resolver.d.ts.map +1 -0
  139. package/dist/smart-agent/llm/role-llm-resolver.js +44 -0
  140. package/dist/smart-agent/llm/role-llm-resolver.js.map +1 -0
  141. package/dist/smart-agent/llm-config-map.d.ts +38 -0
  142. package/dist/smart-agent/llm-config-map.d.ts.map +1 -0
  143. package/dist/smart-agent/llm-config-map.js +75 -0
  144. package/dist/smart-agent/llm-config-map.js.map +1 -0
  145. package/dist/smart-agent/mcp-readiness-monitor.d.ts +38 -0
  146. package/dist/smart-agent/mcp-readiness-monitor.d.ts.map +1 -0
  147. package/dist/smart-agent/mcp-readiness-monitor.js +81 -0
  148. package/dist/smart-agent/mcp-readiness-monitor.js.map +1 -0
  149. package/dist/smart-agent/mcp-readiness-registry.d.ts +37 -0
  150. package/dist/smart-agent/mcp-readiness-registry.d.ts.map +1 -0
  151. package/dist/smart-agent/mcp-readiness-registry.js +55 -0
  152. package/dist/smart-agent/mcp-readiness-registry.js.map +1 -0
  153. package/dist/smart-agent/resolve-config-sections.d.ts +15 -0
  154. package/dist/smart-agent/resolve-config-sections.d.ts.map +1 -0
  155. package/dist/smart-agent/resolve-config-sections.js +212 -0
  156. package/dist/smart-agent/resolve-config-sections.js.map +1 -0
  157. package/dist/smart-agent/session-lifecycle/index.d.ts +117 -0
  158. package/dist/smart-agent/session-lifecycle/index.d.ts.map +1 -0
  159. package/dist/smart-agent/session-lifecycle/index.js +152 -0
  160. package/dist/smart-agent/session-lifecycle/index.js.map +1 -0
  161. package/dist/smart-agent/skill-plugins-config.d.ts +9 -1
  162. package/dist/smart-agent/skill-plugins-config.d.ts.map +1 -1
  163. package/dist/smart-agent/skill-plugins-config.js +27 -1
  164. package/dist/smart-agent/skill-plugins-config.js.map +1 -1
  165. package/dist/smart-agent/skill-plugins-host-factory.d.ts +14 -2
  166. package/dist/smart-agent/skill-plugins-host-factory.d.ts.map +1 -1
  167. package/dist/smart-agent/skill-plugins-host-factory.js +16 -4
  168. package/dist/smart-agent/skill-plugins-host-factory.js.map +1 -1
  169. package/dist/smart-agent/smart-server.d.ts +169 -222
  170. package/dist/smart-agent/smart-server.d.ts.map +1 -1
  171. package/dist/smart-agent/smart-server.js +569 -1387
  172. package/dist/smart-agent/smart-server.js.map +1 -1
  173. package/dist/smart-agent/stepper-config.d.ts +138 -0
  174. package/dist/smart-agent/stepper-config.d.ts.map +1 -0
  175. package/dist/smart-agent/stepper-config.js +216 -0
  176. package/dist/smart-agent/stepper-config.js.map +1 -0
  177. package/dist/smart-agent/tools-rag-handle.d.ts +10 -0
  178. package/dist/smart-agent/tools-rag-handle.d.ts.map +1 -0
  179. package/dist/smart-agent/tools-rag-handle.js +76 -0
  180. package/dist/smart-agent/tools-rag-handle.js.map +1 -0
  181. package/dist/smart-agent/workers/worker-registry.d.ts +159 -0
  182. package/dist/smart-agent/workers/worker-registry.d.ts.map +1 -0
  183. package/dist/smart-agent/workers/worker-registry.js +203 -0
  184. package/dist/smart-agent/workers/worker-registry.js.map +1 -0
  185. package/dist/smart-agent/yaml-loader.d.ts +7 -0
  186. package/dist/smart-agent/yaml-loader.d.ts.map +1 -0
  187. package/dist/smart-agent/yaml-loader.js +146 -0
  188. package/dist/smart-agent/yaml-loader.js.map +1 -0
  189. package/package.json +7 -7
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * SmartServer — embeddable OpenAI-compatible HTTP server backed by SmartAgent.
3
3
  */
4
- import type { EmbedderFactory, IClientAdapter, IEmbedder, IKnowledgeRagHandle, ILlm, ILlmApiAdapter, ILogger, IMcpClient, IModelResolver, IRagRegistry, IRequestLogger, ISkillManager } from '@mcp-abap-adt/llm-agent';
5
- import { type IRag } from '@mcp-abap-adt/llm-agent';
6
- import type { IPluginLoader, SessionAgentParts, SessionGraph, SmartAgent } from '@mcp-abap-adt/llm-agent-libs';
7
- import { SessionRegistry } from '@mcp-abap-adt/llm-agent-libs';
8
- import { resolveSessionIdentity } from './session-identity-resolver.js';
4
+ import type { EmbedderFactory, IClientAdapter, IEmbedder, ILlm, ILlmApiAdapter, IMcpClient, IModelResolver, IRequestLogger, ISkillManager, ISkillPluginHost, ISmartAgent } from '@mcp-abap-adt/llm-agent';
5
+ import { type IAuxiliaryMcpTools, type IMcpFailureClassifier, type IRunExecutionControl, type IStepExecutionControl, type ToolLoopContextStrategyFactory } from '@mcp-abap-adt/llm-agent';
6
+ import type { IPluginLoader } from '@mcp-abap-adt/llm-agent-libs';
7
+ import type { EmbedderResolutionConfig, EmbedderResolutionOptions } from '@mcp-abap-adt/llm-agent-rag';
8
+ import { prefetchEmbedderFactories } from '@mcp-abap-adt/llm-agent-rag';
9
+ export { writeNotReady } from './http/response-helpers.js';
9
10
  export interface SmartServerLlmConfig {
10
11
  /** Provider id for the flat schema. Required when no pipeline.llm.main is set. */
11
12
  provider?: 'deepseek' | 'openai' | 'anthropic' | 'sap-ai-sdk' | 'ollama';
@@ -56,6 +57,12 @@ export interface SmartServerMcpConfig {
56
57
  command?: string;
57
58
  args?: string[];
58
59
  headers?: Record<string, string>;
60
+ /** Default per-call MCP request timeout in ms (default 120000 = 2 min).
61
+ * Per-tool overrides via toolTimeouts. */
62
+ timeout?: number;
63
+ /** Per-tool MCP request-timeout overrides in ms, keyed by tool name.
64
+ * Takes precedence over timeout. */
65
+ toolTimeouts?: Record<string, number>;
59
66
  }
60
67
  export interface SmartServerAgentConfig {
61
68
  externalToolsValidationMode?: 'permissive' | 'strict';
@@ -197,6 +204,50 @@ export interface SmartServerConfig {
197
204
  cookieName?: string;
198
205
  };
199
206
  }
207
+ /**
208
+ * DI seam for SmartServer's LLM / embedder / skill-host / MCP construction.
209
+ * Every member is optional and defaults to the real implementation, so omitting
210
+ * `deps` (or passing `{}`) preserves the original behaviour exactly. Used by
211
+ * tests (and a future no-listen `buildAgent()`) to substitute canned
212
+ * implementations without network or port I/O.
213
+ */
214
+ export interface BuildAgentDeps {
215
+ makeLlm?: (cfg: SmartServerLlmConfig) => Promise<ILlm>;
216
+ resolveEmbedder?: (cfg: EmbedderResolutionConfig, options?: EmbedderResolutionOptions) => IEmbedder;
217
+ prefetchEmbedderFactories?: typeof prefetchEmbedderFactories;
218
+ buildSkillHost?: (cfg: SkillPluginsConfig, deps: BuildSkillHostDeps) => Promise<ISkillPluginHost>;
219
+ skillHost?: ISkillPluginHost;
220
+ connectMcp?: (mcpCfg: SmartServerMcpConfig | SmartServerMcpConfig[] | undefined | null) => Promise<IMcpClient[]>;
221
+ /**
222
+ * Ready-to-use MCP clients — parallel to `skillHost` (NOT an
223
+ * `IMcpConnectionStrategy`). When present they are used DIRECTLY and take
224
+ * precedence over `cfg.mcpClients`, plugin clients, and the YAML `mcp:` block:
225
+ * NO connect runs (the embeddable `buildAgent(cfg)` path never forces a real
226
+ * MCP connection). Inject `[]` to deliberately disable MCP.
227
+ */
228
+ mcpClients?: IMcpClient[];
229
+ /** Injected embedder — short-circuits BOTH resolveAgentEmbedder (diEmbedder) AND
230
+ * the skill-host embedder resolution + prefetch. */
231
+ embedder?: IEmbedder;
232
+ /** Custom MCP failure classifier (DI/programmatic only — not in YAML).
233
+ * Decides whether a failed tool-call is an availability escalation or a
234
+ * tool-level error. Default: DefaultMcpFailureClassifier. */
235
+ mcpFailureClassifier?: IMcpFailureClassifier;
236
+ /** Factory for per-loop tool-loop context strategy (DI/programmatic only — not in YAML).
237
+ * When absent, resolved to Legacy at point-of-use. */
238
+ toolLoopContextStrategyFactory?: ToolLoopContextStrategyFactory;
239
+ /** Consumer-swappable per-step execution control (timeout / tool-call budget).
240
+ * Threaded onto `IPipelineContext.stepExecutionControl`; the controller pipeline
241
+ * falls back to `DefaultStepExecutionControl` when absent. */
242
+ stepExecutionControl?: IStepExecutionControl;
243
+ /** Consumer-swappable per-run execution control (max steps / run timeout).
244
+ * Threaded onto `IPipelineContext.runExecutionControl`; the controller pipeline
245
+ * falls back to `NoopRunExecutionControl` when absent. */
246
+ runExecutionControl?: IRunExecutionControl;
247
+ /** Threaded onto `IPipelineContext.auxiliaryMcpTools`; the pipeline resolves
248
+ * its own default (e.g. `wait`) when absent. */
249
+ auxiliaryMcpTools?: IAuxiliaryMcpTools;
250
+ }
200
251
  /**
201
252
  * A nested sub-agent declared via the top-level `subagents:` YAML block.
202
253
  * The `config` field is the resolved `SmartServerConfig` for the sub-agent
@@ -218,212 +269,14 @@ export interface SmartServerHandle {
218
269
  close(): Promise<void>;
219
270
  requestLogger: IRequestLogger;
220
271
  }
221
- import type { ISessionMetaStore, SessionMetaRow } from './session-meta-store.js';
222
272
  import type { SkillPluginsConfig } from './skill-plugins-config.js';
273
+ import type { BuildSkillHostDeps } from './skill-plugins-host-factory.js';
223
274
  export { generateConfigTemplate, loadYamlConfig, type ResolveConfigArgs, resolveCoordinatorActivation, resolveCoordinatorDispatch, resolveCoordinatorPlanning, resolveEnvVars, resolveSmartServerConfig, resolveToolSelectionStrategy, YAML_TEMPLATE, type YamlConfig, } from './config.js';
224
275
  export { makePgPool, makePgReadPool } from './pg-pool.js';
225
276
  export { parseSkillPluginsConfig, type SkillPluginsCatalogConfig, type SkillPluginsConfig, type SkillPluginsFetchedSource, type SkillPluginsRecordsSource, type SkillPluginsSource, type SkillPluginsStoreConfig, } from './skill-plugins-config.js';
226
277
  export { type BuildSkillHostDeps, buildSkillHostFromConfig, type IClosablePool, initSkillHost, validateServedGroups, } from './skill-plugins-host-factory.js';
227
- /**
228
- * GLOBAL per-worker heavy clients — built once, injected by reference per
229
- * session. In addition to LLM/embedder clients, the worker's OWN declared
230
- * `toolsRag`/`historyRag`/`mcpClients` (if any) are cached here too — the
231
- * per-session re-wire MUST prefer the worker's own resources over the
232
- * parent's injected ones, so we build them once and reuse by reference.
233
- */
234
- export interface WorkerLlmSet {
235
- mainLlm: ILlm;
236
- classifierLlm: ILlm;
237
- helperLlm?: ILlm;
238
- embedder?: IEmbedder;
239
- /** Worker's OWN tools RAG, built from `subCfg.rag` if declared. */
240
- toolsRag?: IRag;
241
- /** Worker's OWN history RAG (mirrors flat-rag block, separate instance). */
242
- historyRag?: IRag;
243
- /**
244
- * Worker's OWN MCP clients (from `subCfg.mcpClients` DI or built once from
245
- * `subCfg.mcp`). Undefined means the worker did not declare any — caller
246
- * may fall back to the parent's injected clients.
247
- */
248
- mcpClients?: IMcpClient[];
249
- /**
250
- * Shutdown function returned by the builder's `SmartAgentHandle.close()`
251
- * for this worker (Fix #21). Disconnects MCP clients (and any other
252
- * builder-owned resources) registered to this worker. Captured by
253
- * `backfillWorkerCacheFromHandle` so `_drainWorkerCache()` can call it on
254
- * config-reload (PUT /v1/config + hot-reload) and on server shutdown —
255
- * without this, the per-worker handle is discarded by `buildSubAgent` and
256
- * lazy rebuilds (Fix #18) accumulate MCP connections with no close path.
257
- */
258
- close?: () => Promise<void>;
259
- }
260
- /**
261
- * Drain every cached worker's `close` (if any), then clear the cache map.
262
- * Used by config-reload (PUT /v1/config + hot-reload — Fix #14/18/21) and by
263
- * server `close()` to release per-worker MCP connections that were attached
264
- * to the discarded `SmartAgentHandle`s.
265
- *
266
- * IMPORTANT — in-flight caveat: this aborts any request that is mid-call on
267
- * a worker's MCP client. That is acceptable for an admin action (config
268
- * reload, server shutdown) where the alternative is leaking connections.
269
- * Server `close()` calls this AFTER `lifecycle.disposeAll()` so per-session
270
- * graphs that reference worker clients are torn down first.
271
- *
272
- * Uses `Promise.allSettled` so one failing close cannot block the others.
273
- */
274
- export declare function drainWorkerCache(cache: Map<string, WorkerLlmSet>): Promise<void>;
275
- /**
276
- * Build-once-per-worker resolver. The first time a worker name is seen, it
277
- * constructs the worker's main/classifier/(optional helper) LLM + embedder and
278
- * caches the set; every later call (e.g. each per-session worker re-wire)
279
- * returns the SAME set by reference — never reconstructing LLM clients
280
- * (locked invariant: LLM/embedder clients are global, built once).
281
- *
282
- * Accepts optional `makeToolsRag`/`makeHistoryRag`/`makeMcpClients` factories;
283
- * when provided, the resolver builds them ONCE on the first miss and caches
284
- * them on the returned set. Subsequent calls return the cached resources by
285
- * reference — never re-vectorizing or re-connecting MCP.
286
- */
287
- export declare function resolveWorkerLlmSet(input: {
288
- name: string;
289
- cache: Map<string, WorkerLlmSet>;
290
- makeMain: () => Promise<ILlm>;
291
- makeClassifier: () => Promise<ILlm>;
292
- makeHelper?: () => Promise<ILlm>;
293
- makeEmbedder?: () => Promise<IEmbedder>;
294
- makeToolsRag?: () => Promise<IRag>;
295
- makeHistoryRag?: () => Promise<IRag>;
296
- makeMcpClients?: () => Promise<IMcpClient[]>;
297
- }): Promise<WorkerLlmSet>;
298
- /**
299
- * Backfill the per-worker cache entry from the BUILT handle (review HIGH #7).
300
- *
301
- * The primary `buildSubAgent` populates `cached.mcpClients`/`toolsRag`/
302
- * `historyRag` only when the worker config provided DI factories. Workers
303
- * configured with `subCfg.mcp: ...` (regular config that triggers the
304
- * builder's own auto-connect) or with `subCfg.rag: ...` whose RAG is owned
305
- * by the builder leave those slots empty — so per-session re-wires would
306
- * fall back to the PARENT's MCP/RAG, losing the worker's own connection.
307
- *
308
- * After the builder finishes, this helper captures what the handle actually
309
- * holds and stores it BY REFERENCE on the cache entry. Subsequent per-session
310
- * re-wires read the same slots and find the worker's own resources.
311
- *
312
- * Pure helper, mutates `entry` in place. No-op when the corresponding slot
313
- * is already populated (DI path wins) or when the handle has no resource for
314
- * that slot (worker simply didn't declare one).
315
- */
316
- export declare function backfillWorkerCacheFromHandle(entry: WorkerLlmSet, handle: {
317
- mcpClients?: IMcpClient[];
318
- ragRegistry: {
319
- get(name: string): IRag | undefined;
320
- };
321
- close?: () => Promise<void>;
322
- }): Promise<void>;
323
- /**
324
- * Share the parent RAG registry with subagents (per-session worker re-wire).
325
- * Session/user/global collections written at the top level become visible to
326
- * workers; the per-call scope filter (`rag-query.ts`) isolates by
327
- * `ctx.sessionId` / `ctx.options.userId`. A worker's own declared store is
328
- * registered INTO this same registry under its namespace. When the parent
329
- * registry is undefined (no top-level registry yet — e.g. unit test seam),
330
- * return undefined so the builder allocates its own SimpleRagRegistry.
331
- */
332
- export declare function resolveSubAgentRagRegistry(input: {
333
- parentRagRegistry: IRagRegistry | undefined;
334
- }): IRagRegistry | undefined;
335
- /**
336
- * Options for `buildSessionLifecycle`. Composes the SessionGraphFactory + the
337
- * SessionRegistry; exposes a thin facade so `_handle` stays unit-testable.
338
- */
339
- export interface SessionLifecycleOptions {
340
- idleTtlMs: number;
341
- maxSessions: number;
342
- cookieName: string;
343
- mcpClients: IMcpClient[];
344
- toolsRag: IRag | undefined;
345
- ragRegistry: IRagRegistry;
346
- buildAgent: (parts: SessionAgentParts) => Promise<SmartAgent | undefined>;
347
- /** Optional logger forwarded to SessionGraphFactory for cleanup-failure surfacing. */
348
- logger?: ILogger;
349
- /**
350
- * Optional per-session teardown hook run during `SessionGraph.dispose()`.
351
- * The host wires this to invoke the pipeline plugin's
352
- * `IPipelineInstance.close()` captured by `buildPipelineInstance`.
353
- */
354
- onDispose?: (sessionId: string) => Promise<void>;
355
- }
356
- /**
357
- * Composes the cookie identity resolver + SessionGraphFactory + SessionRegistry
358
- * into one lifecycle object the server's `_handle` consumes. The default MCP
359
- * factory returns the shared GLOBAL clients by reference (one upstream
360
- * connection); a creds-aware build swaps it out (out of scope here).
361
- */
362
- export declare function buildSessionLifecycle(opts: SessionLifecycleOptions): {
363
- resolve: (cookieHeader: string | undefined, isHttps: boolean) => ReturnType<typeof resolveSessionIdentity>;
364
- acquire: (sessionId: string) => Promise<ReturnType<SessionRegistry['acquire']> extends Promise<infer G> ? G : never>;
365
- release: (sessionId: string, graph?: SessionGraph) => void;
366
- evictIdle: () => Promise<void>;
367
- disposeAll: () => Promise<void>;
368
- invalidateAll: () => Promise<void>;
369
- registry: SessionRegistry;
370
- };
371
- export type SessionLifecycle = ReturnType<typeof buildSessionLifecycle>;
372
- /** Response shape for GET /v1/sessions */
373
- export interface SessionListBody {
374
- sessions: SessionMetaRow[];
375
- }
376
- /** Response shape for POST /v1/sessions/:id/resume */
377
- export interface SessionResumeBody {
378
- ok: boolean;
379
- session?: SessionMetaRow;
380
- error?: string;
381
- }
382
- /**
383
- * Seed session-scope guidance entries into a BRAND-NEW session's knowledge-RAG
384
- * (deployment-supplied tool-usage guidance the planner/executor read in "Known
385
- * facts"). Idempotent: rehydrates via init() and writes ONLY when the session is
386
- * empty (`fingerprint() === 'n=0'`), so resumes never duplicate. Entries are
387
- * config DATA — the runtime stays MCP-agnostic (no tool knowledge in agent code).
388
- */
389
- export declare function seedSessionKnowledge(kr: IKnowledgeRagHandle & {
390
- init?(): Promise<void>;
391
- fingerprint?(): string;
392
- }, seeds: ReadonlyArray<{
393
- content: string;
394
- artifactType: string;
395
- }>, nowIso: string): Promise<void>;
396
- /**
397
- * Record that a request for `sessionId` STARTED — create the meta row on first
398
- * sight, else touch it and mark in-progress. Called from the live request path
399
- * (`_withSession`) so GET /v1/sessions, resume and delete actually see sessions
400
- * produced by normal chat/stream traffic (review Finding 3). `userIdentity` is
401
- * the sessionId itself in the default no-auth build — matching how the
402
- * /v1/sessions endpoints resolve identity (`resolved.identity.sessionId`).
403
- */
404
- export declare function recordSessionStart(store: ISessionMetaStore, sessionId: string, nowIso: string): Promise<void>;
405
- /**
406
- * Record that a request for `sessionId` FINISHED — touch + mark idle (so it can
407
- * be resumed). No-op if the row was deleted mid-flight.
408
- */
409
- export declare function recordSessionEnd(store: ISessionMetaStore, sessionId: string, nowIso: string): Promise<void>;
410
- /**
411
- * List all sessions for a given user identity.
412
- * Extracted for unit-testability (mirrors the /v1/usage handler pattern).
413
- */
414
- export declare function handleListSessions(store: ISessionMetaStore, identity: string): Promise<SessionListBody>;
415
- /**
416
- * Resume (claim) a session by ID for a user identity.
417
- * Sets the session status to 'idle' so it can be re-entered.
418
- */
419
- export declare function handleResumeSession(store: ISessionMetaStore, identity: string, id: string): Promise<SessionResumeBody>;
420
- /**
421
- * Delete a session by ID for a user identity, and evict its RAG state.
422
- */
423
- export declare function handleDeleteSession(store: ISessionMetaStore, identity: string, id: string, evictFn: (sessionId: string) => Promise<void>): Promise<{
424
- ok: boolean;
425
- error?: string;
426
- }>;
278
+ export { backfillWorkerCacheFromHandle, drainWorkerCache, type IWorkerRegistry, resolveWorkerLlmSet, type WorkerLlmSet, type WorkerRegistry, } from './workers/worker-registry.js';
279
+ export { buildSessionLifecycle, handleDeleteSession, handleListSessions, handleResumeSession, recordSessionEnd, recordSessionStart, resolveSubAgentRagRegistry, type SessionLifecycle, type SessionLifecycleOptions, type SessionListBody, type SessionResumeBody, seedSessionKnowledge, } from './session-lifecycle/index.js';
427
280
  /**
428
281
  * Build a `callMcp(name, args, signal?)` bridge over a list of `IMcpClient`s.
429
282
  *
@@ -448,16 +301,22 @@ export declare function handleDeleteSession(store: ISessionMetaStore, identity:
448
301
  * either directly without pre-normalising.
449
302
  */
450
303
  export declare function connectMcpClientsFromConfig(mcpCfg: SmartServerMcpConfig | SmartServerMcpConfig[] | undefined | null): Promise<IMcpClient[]>;
451
- export declare function buildMcpBridge(clients: IMcpClient[]): (name: string, args: unknown, signal?: AbortSignal) => Promise<string>;
304
+ export declare function buildMcpBridge(clients: IMcpClient[], classifier?: IMcpFailureClassifier): (name: string, args: unknown, signal?: AbortSignal) => Promise<string>;
452
305
  export declare class SmartServer {
453
306
  private readonly cfg;
454
307
  private readonly noop;
455
308
  /**
456
- * GLOBAL per-worker LLM/embedder cache. Populated lazily by `buildSubAgent`
309
+ * GLOBAL per-worker LLM/embedder cache registry. Populated lazily by `buildSubAgent`
457
310
  * the first time each worker name is seen; subsequent per-session re-wires
458
- * pull from this cache by reference (never reconstructing LLM clients).
311
+ * pull from the cache by reference (never reconstructing LLM clients).
312
+ * Constructed in `_buildInfra` after embedder factories are resolved.
459
313
  */
460
- private readonly _workerLlmCache;
314
+ private _workers;
315
+ /**
316
+ * Declarative HTTP route table built once; `_handle` delegates to its
317
+ * `dispatch`. Replaces the former ~300-line if/else route chain.
318
+ */
319
+ private readonly _routeTable;
461
320
  /** Lifecycle handle wired in `start()`; consumed by `_handle`. */
462
321
  private _lifecycle?;
463
322
  /** Hoisted globals used by `buildSessionAgent` to re-wire fresh per-session workers. */
@@ -492,6 +351,7 @@ export declare class SmartServer {
492
351
  private _llmMap?;
493
352
  private _pipelineFallback?;
494
353
  private _mainTemp?;
354
+ private _roleLlm?;
495
355
  private _requestLogger?;
496
356
  /** ToolsRag handle built by `buildSharedPipelineInfra`; handed to every
497
357
  * pipeline's context (factory defaults to EMPTY_TOOLS_RAG if unset). */
@@ -514,6 +374,15 @@ export declare class SmartServer {
514
374
  * yaml). Disposed via the server's `closeFns` on shutdown.
515
375
  */
516
376
  private _stepperMcpClients?;
377
+ /**
378
+ * True when the consumer injected an MCP seam (`BuildAgentDeps.mcpClients` or
379
+ * `connectMcp`). In that case MCP is provisioned ONLY through the seam (the
380
+ * embeddable path must never force a real connect / builder self-connect). When
381
+ * false (default), the YAML `mcp:` path keeps the builder-owned connect so the
382
+ * builder VECTORIZES the tools into `toolsRag` (the ToolSelect ranking contract;
383
+ * see mcp-yaml-vectorization.test.ts).
384
+ */
385
+ private readonly _mcpSeamInjected;
517
386
  /**
518
387
  * The MCP clients the pipeline `callMcp` bridge dispatches over — resolved
519
388
  * UNCONDITIONALLY in `start()` as DI/plugin clients (`mcpClients`) ?? the
@@ -548,8 +417,67 @@ export declare class SmartServer {
548
417
  * handles owned by the plugin) are freed on eviction / shutdown / reconfigure.
549
418
  */
550
419
  private readonly _sessionCloseFns;
551
- constructor(config: SmartServerConfig);
420
+ /**
421
+ * Instance-level MCP failure classifier (DI/programmatic only — not from YAML).
422
+ * Populated from BuildAgentDeps in the constructor; defaults to DefaultMcpFailureClassifier.
423
+ * Passed to buildMcpBridge (Route B) and threaded into every pipeline ctx (Route A).
424
+ */
425
+ private readonly _mcpFailureClassifier;
426
+ private readonly _toolLoopContextStrategyFactory?;
427
+ private readonly _stepExecutionControl?;
428
+ private readonly _runExecutionControl?;
429
+ private readonly _auxiliaryMcpTools?;
430
+ /**
431
+ * Defaulted construction deps (the BuildAgentDeps DI seam). Required members
432
+ * always resolve to the real implementation when not injected; `skillHost`
433
+ * and `embedder` stay optional (present only when injected).
434
+ */
435
+ private readonly _deps;
436
+ constructor(config: SmartServerConfig, deps?: BuildAgentDeps);
552
437
  start(): Promise<SmartServerHandle>;
438
+ /**
439
+ * Assemble and return the server INFRA bundle ONLY — every shared resource
440
+ * needed by both the HTTP `_start()` path and the embeddable
441
+ * `_buildEmbeddedAgent()` path: the infra/passthrough `smartAgent`, the
442
+ * server-only locals (`chat`/`streamChat`/`requestLogger`/etc.), the resolved
443
+ * `globalMcpClients`/`globalRagRegistry`, and the `closeFns` loop (exposed as
444
+ * `close`). It does NOT build the `'embedded'` pipeline instance — that idle
445
+ * coordinator is built only on the embeddable path (see `_buildEmbeddedAgent`),
446
+ * so a plain `start()` no longer pays for a coordinator it never serves.
447
+ */
448
+ private _buildInfra;
449
+ /**
450
+ * Build the embeddable COORDINATED agent for the free `buildAgent(cfg)` path.
451
+ *
452
+ * `_buildInfra().smartAgent` is the INFRA/passthrough startup agent — it has
453
+ * NO coordinator, so it would never run the configured pipeline. The HTTP
454
+ * `start()` path serves the PER-SESSION `graph.agent` (built lazily via
455
+ * buildSessionAgent → buildPipelineInstance) and keeps using `smartAgent` for
456
+ * infra endpoints (/v1/models, health). But the embeddable `buildAgent(cfg)`
457
+ * consumer has no session lifecycle, so it must receive a fully COORDINATED
458
+ * agent. Build ONE pipeline instance via the SAME path a session uses — an
459
+ * `'embedded'` session — over the shared infra, and return ITS agent. This is
460
+ * the ONLY caller that builds the embedded instance, so `start()` no longer
461
+ * pays for an idle coordinator it never serves.
462
+ *
463
+ * @internal — reached only by the same-module free `buildAgent(cfg)`; not part
464
+ * of the documented public API. Public (not `private`) solely so that seam can
465
+ * call it by name (a `private` reached only via an external cast trips
466
+ * `noUnusedLocals`).
467
+ */
468
+ _buildEmbeddedAgent(): Promise<{
469
+ agent: ISmartAgent;
470
+ close: () => Promise<void>;
471
+ }>;
472
+ /**
473
+ * Assemble the `SessionAgentParts` for the single `'embedded'` pipeline
474
+ * instance returned by `_buildEmbeddedAgent` (the embeddable `buildAgent(cfg)`
475
+ * path).
476
+ * Mirrors EXACTLY what the session lifecycle passes to `buildSessionAgent`:
477
+ * the global mcpClients + the global ragRegistry + the global tools store,
478
+ * with a fresh per-(embedded-)session request logger.
479
+ */
480
+ private _embeddedSessionParts;
553
481
  private _start;
554
482
  /**
555
483
  * Build a `SmartAgent` instance from a nested sub-agent config.
@@ -568,8 +496,12 @@ export declare class SmartServer {
568
496
  * always undefined here.
569
497
  */
570
498
  private buildSubAgent;
571
- /** Build an LLM from a SmartServerLlmConfig (mirrors stepperMakeLlm/DAG). */
499
+ /** Build an LLM from a SmartServerLlmConfig (mirrors stepperMakeLlm/DAG).
500
+ * Routes through the BuildAgentDeps seam so an injected `makeLlm` overrides
501
+ * the real builder. */
572
502
  private _makeLlm;
503
+ /** The real `makeLlm`-backed construction (the seam's default). */
504
+ private _makeLlmDefault;
573
505
  /** Resolve a per-role LLM through the normalized map → pipelineFallback chain.
574
506
  * 'main' returns the captured mainLlm; 'helper'/'classifier' return the
575
507
  * prebuilt instances when present; otherwise the map/fallback config is built. */
@@ -636,12 +568,10 @@ export declare class SmartServer {
636
568
  /**
637
569
  * Build the FRESH per-session worker (sub-agent) registry from the SAME
638
570
  * `subagents:` configs the primary build() used, injecting globals + this
639
- * session's logger + the CACHED per-worker LLM/embedder (this._workerLlmCache).
571
+ * session's logger + the CACHED per-worker LLM/embedder (this._workers.cache).
640
572
  * NEVER reconstructs LLM clients; NEVER reuses the global registry.
641
573
  *
642
- * Extracted from buildSessionAgent so both the legacy session re-wire and the
643
- * pipeline-plugin context (`buildServerCtx` / `partsToBaseInput`) feed a real
644
- * per-session worker map to `buildBaseBuilder` instead of an empty `new Map()`.
574
+ * Delegates to `this._workers.build(parts)` (WorkerRegistry).
645
575
  */
646
576
  private buildWorkerRegistry;
647
577
  /**
@@ -682,7 +612,7 @@ export declare class SmartServer {
682
612
  * session-scoped pipeline context (`buildServerCtx`) supplies the FRESH
683
613
  * per-session worker registry + session logger + the global
684
614
  * ragRegistry/toolsRag/mcpClients + the CACHED per-worker LLM/embedder
685
- * (this._workerLlmCache) via `createAgentBuilder`. It NEVER reuses the primary
615
+ * (this._workers.cache) via `createAgentBuilder`. It NEVER reuses the primary
686
616
  * build()'s global registry/coordinator and NEVER constructs new LLM clients.
687
617
  *
688
618
  * The pipeline returns `{ agent, close }`; we register `close` under the
@@ -698,10 +628,27 @@ export declare class SmartServer {
698
628
  */
699
629
  private _withSession;
700
630
  private _handle;
701
- private _handleAdapterRequest;
702
- private _handleChat;
703
- /** Whitelisted agent config fields allowed via PUT /v1/config. */
704
- private static readonly AGENT_CONFIG_FIELDS;
705
- private _handleConfigUpdate;
631
+ /**
632
+ * Declarative route table replacing `_handle`'s if/else chain. Routes are
633
+ * registered in the EXACT order the original chain checked them (first
634
+ * method+path match wins), so dispatch is behaviour-identical. Each handler
635
+ * body is the corresponding original branch moved verbatim, with `this`
636
+ * accessed through `rc.server` and the request locals read from `rc`.
637
+ */
638
+ private _buildRouteTable;
639
+ /**
640
+ * Build the PUT /v1/config hot-swap seam over this server's private state.
641
+ * The setters write the SAME `_mainLlm`/`_classifierLlm`/`_helperLlm` fields
642
+ * RoleLlmResolver's live accessors read, so the hot-swap stays observable.
643
+ * A private object literal — NOT `implements` — so the public class shape is
644
+ * unchanged (byte-stable public API).
645
+ */
646
+ private _configUpdateTarget;
706
647
  }
648
+ /** Build a runnable agent for any configured pipeline WITHOUT binding a port.
649
+ * `SmartServer.start()` is the default impl that adds HTTP `listen` on top. */
650
+ export declare function buildAgent(cfg: SmartServerConfig, deps?: BuildAgentDeps): Promise<{
651
+ agent: ISmartAgent;
652
+ close: () => Promise<void>;
653
+ }>;
707
654
  //# sourceMappingURL=smart-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"smart-server.d.ts","sourceRoot":"","sources":["../../src/smart-agent/smart-server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAEV,eAAe,EACf,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,IAAI,EACJ,cAAc,EACd,OAAO,EACP,UAAU,EAEV,cAAc,EAGd,YAAY,EACZ,cAAc,EACd,aAAa,EAWd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,KAAK,IAAI,EAIV,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,UAAU,EAEX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAgBL,eAAe,EAKhB,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAMxE,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,QAAQ,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAA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