@mcp-abap-adt/llm-agent-server-libs 26.0.0 → 27.0.1
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/builders/controller-skill-pipeline-builder.d.ts +6 -5
- package/dist/builders/controller-skill-pipeline-builder.d.ts.map +1 -1
- package/dist/builders/controller-skill-pipeline-builder.js +49 -54
- package/dist/builders/controller-skill-pipeline-builder.js.map +1 -1
- package/dist/factories/controller-factory.d.ts +13 -10
- package/dist/factories/controller-factory.d.ts.map +1 -1
- package/dist/factories/controller-factory.js +33 -12
- package/dist/factories/controller-factory.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pipelines/controller-subagents.d.ts +11 -0
- package/dist/pipelines/controller-subagents.d.ts.map +1 -0
- package/dist/pipelines/controller-subagents.js +77 -0
- package/dist/pipelines/controller-subagents.js.map +1 -0
- package/dist/pipelines/controller.d.ts +11 -10
- package/dist/pipelines/controller.d.ts.map +1 -1
- package/dist/pipelines/controller.js +14 -65
- package/dist/pipelines/controller.js.map +1 -1
- package/dist/pipelines/coordinator-resolvers.d.ts +6 -11
- package/dist/pipelines/coordinator-resolvers.d.ts.map +1 -1
- package/dist/pipelines/coordinator-resolvers.js +7 -17
- package/dist/pipelines/coordinator-resolvers.js.map +1 -1
- package/dist/pipelines/dag.d.ts +9 -9
- package/dist/pipelines/dag.d.ts.map +1 -1
- package/dist/pipelines/dag.js +11 -22
- package/dist/pipelines/dag.js.map +1 -1
- package/dist/pipelines/flat.d.ts +4 -7
- package/dist/pipelines/flat.d.ts.map +1 -1
- package/dist/pipelines/flat.js +3 -8
- package/dist/pipelines/flat.js.map +1 -1
- package/dist/pipelines/linear.d.ts +8 -10
- package/dist/pipelines/linear.d.ts.map +1 -1
- package/dist/pipelines/linear.js +18 -11
- package/dist/pipelines/linear.js.map +1 -1
- package/dist/pipelines/parsers.d.ts +0 -3
- package/dist/pipelines/parsers.d.ts.map +1 -1
- package/dist/pipelines/parsers.js +4 -19
- package/dist/pipelines/parsers.js.map +1 -1
- package/dist/pipelines/server-context.d.ts +0 -5
- package/dist/pipelines/server-context.d.ts.map +1 -1
- package/dist/pipelines/server-context.js.map +1 -1
- package/dist/pipelines/stepper.d.ts +5 -4
- package/dist/pipelines/stepper.d.ts.map +1 -1
- package/dist/pipelines/stepper.js +5 -4
- package/dist/pipelines/stepper.js.map +1 -1
- package/dist/smart-agent/build-dag-coordinator-deps.d.ts +11 -22
- package/dist/smart-agent/build-dag-coordinator-deps.d.ts.map +1 -1
- package/dist/smart-agent/build-dag-coordinator-deps.js +21 -78
- package/dist/smart-agent/build-dag-coordinator-deps.js.map +1 -1
- package/dist/smart-agent/build-stepper-root.d.ts.map +1 -1
- package/dist/smart-agent/build-stepper-root.js +0 -1
- package/dist/smart-agent/build-stepper-root.js.map +1 -1
- package/dist/smart-agent/config-validator.d.ts +8 -1
- package/dist/smart-agent/config-validator.d.ts.map +1 -1
- package/dist/smart-agent/config-validator.js +200 -62
- package/dist/smart-agent/config-validator.js.map +1 -1
- package/dist/smart-agent/config.d.ts +7 -7
- package/dist/smart-agent/config.d.ts.map +1 -1
- package/dist/smart-agent/config.js +24 -11
- package/dist/smart-agent/config.js.map +1 -1
- package/dist/smart-agent/controller/types.d.ts +22 -15
- package/dist/smart-agent/controller/types.d.ts.map +1 -1
- package/dist/smart-agent/controller/types.js.map +1 -1
- package/dist/smart-agent/http/config-route-handler.d.ts +2 -0
- package/dist/smart-agent/http/config-route-handler.d.ts.map +1 -1
- package/dist/smart-agent/http/config-route-handler.js +20 -0
- package/dist/smart-agent/http/config-route-handler.js.map +1 -1
- package/dist/smart-agent/llm/role-llm-resolver.d.ts +23 -11
- package/dist/smart-agent/llm/role-llm-resolver.d.ts.map +1 -1
- package/dist/smart-agent/llm/role-llm-resolver.js +65 -37
- package/dist/smart-agent/llm/role-llm-resolver.js.map +1 -1
- package/dist/smart-agent/llm-config-map.d.ts +9 -1
- package/dist/smart-agent/llm-config-map.d.ts.map +1 -1
- package/dist/smart-agent/llm-config-map.js +27 -5
- package/dist/smart-agent/llm-config-map.js.map +1 -1
- package/dist/smart-agent/pipeline-settings.d.ts +50 -0
- package/dist/smart-agent/pipeline-settings.d.ts.map +1 -0
- package/dist/smart-agent/pipeline-settings.js +174 -0
- package/dist/smart-agent/pipeline-settings.js.map +1 -0
- package/dist/smart-agent/pipeline.d.ts +3 -63
- package/dist/smart-agent/pipeline.d.ts.map +1 -1
- package/dist/smart-agent/pipeline.js +3 -2
- package/dist/smart-agent/pipeline.js.map +1 -1
- package/dist/smart-agent/rag-config.d.ts +155 -0
- package/dist/smart-agent/rag-config.d.ts.map +1 -0
- package/dist/smart-agent/rag-config.js +62 -0
- package/dist/smart-agent/rag-config.js.map +1 -0
- package/dist/smart-agent/resolve-agent-embedder.d.ts +11 -10
- package/dist/smart-agent/resolve-agent-embedder.d.ts.map +1 -1
- package/dist/smart-agent/resolve-agent-embedder.js +37 -36
- package/dist/smart-agent/resolve-agent-embedder.js.map +1 -1
- package/dist/smart-agent/resolve-config-sections.d.ts +1 -1
- package/dist/smart-agent/resolve-config-sections.d.ts.map +1 -1
- package/dist/smart-agent/resolve-config-sections.js +124 -30
- package/dist/smart-agent/resolve-config-sections.js.map +1 -1
- package/dist/smart-agent/select-pipeline-plugin.d.ts +8 -0
- package/dist/smart-agent/select-pipeline-plugin.d.ts.map +1 -0
- package/dist/smart-agent/select-pipeline-plugin.js +26 -0
- package/dist/smart-agent/select-pipeline-plugin.js.map +1 -0
- package/dist/smart-agent/session-lifecycle/index.d.ts +38 -4
- package/dist/smart-agent/session-lifecycle/index.d.ts.map +1 -1
- package/dist/smart-agent/session-lifecycle/index.js +11 -1
- package/dist/smart-agent/session-lifecycle/index.js.map +1 -1
- package/dist/smart-agent/session-lifecycle/session-rag-registry.d.ts +39 -0
- package/dist/smart-agent/session-lifecycle/session-rag-registry.d.ts.map +1 -0
- package/dist/smart-agent/session-lifecycle/session-rag-registry.js +109 -0
- package/dist/smart-agent/session-lifecycle/session-rag-registry.js.map +1 -0
- package/dist/smart-agent/skill-plugins-config.d.ts +3 -2
- package/dist/smart-agent/skill-plugins-config.d.ts.map +1 -1
- package/dist/smart-agent/skill-plugins-config.js +12 -1
- package/dist/smart-agent/skill-plugins-config.js.map +1 -1
- package/dist/smart-agent/skill-plugins-host-factory.d.ts +9 -0
- package/dist/smart-agent/skill-plugins-host-factory.d.ts.map +1 -1
- package/dist/smart-agent/skill-plugins-host-factory.js +12 -6
- package/dist/smart-agent/skill-plugins-host-factory.js.map +1 -1
- package/dist/smart-agent/smart-server.d.ts +90 -78
- package/dist/smart-agent/smart-server.d.ts.map +1 -1
- package/dist/smart-agent/smart-server.js +201 -152
- package/dist/smart-agent/smart-server.js.map +1 -1
- package/dist/smart-agent/worker-llm.d.ts +18 -0
- package/dist/smart-agent/worker-llm.d.ts.map +1 -0
- package/dist/smart-agent/worker-llm.js +59 -0
- package/dist/smart-agent/worker-llm.js.map +1 -0
- package/dist/smart-agent/workers/worker-registry.d.ts +6 -14
- package/dist/smart-agent/workers/worker-registry.d.ts.map +1 -1
- package/dist/smart-agent/workers/worker-registry.js +2 -11
- package/dist/smart-agent/workers/worker-registry.js.map +1 -1
- package/dist/smart-agent/yaml-loader.d.ts +1 -1
- package/dist/smart-agent/yaml-loader.d.ts.map +1 -1
- package/dist/smart-agent/yaml-loader.js +20 -17
- package/dist/smart-agent/yaml-loader.js.map +1 -1
- package/package.json +8 -7
- package/dist/smart-agent/mcp/mcp-content.d.ts +0 -19
- package/dist/smart-agent/mcp/mcp-content.d.ts.map +0 -1
- package/dist/smart-agent/mcp/mcp-content.js +0 -31
- package/dist/smart-agent/mcp/mcp-content.js.map +0 -1
- package/dist/smart-agent/mcp/require-mcp-timeout.d.ts +0 -20
- package/dist/smart-agent/mcp/require-mcp-timeout.d.ts.map +0 -1
- package/dist/smart-agent/mcp/require-mcp-timeout.js +0 -23
- package/dist/smart-agent/mcp/require-mcp-timeout.js.map +0 -1
- package/dist/smart-agent/mcp-readiness-monitor.d.ts +0 -38
- package/dist/smart-agent/mcp-readiness-monitor.d.ts.map +0 -1
- package/dist/smart-agent/mcp-readiness-monitor.js +0 -81
- package/dist/smart-agent/mcp-readiness-monitor.js.map +0 -1
- package/dist/smart-agent/mcp-readiness-registry.d.ts +0 -37
- package/dist/smart-agent/mcp-readiness-registry.d.ts.map +0 -1
- package/dist/smart-agent/mcp-readiness-registry.js +0 -55
- package/dist/smart-agent/mcp-readiness-registry.js.map +0 -1
- package/dist/smart-agent/skill-plugins-config.test.d.ts +0 -2
- package/dist/smart-agent/skill-plugins-config.test.d.ts.map +0 -1
- package/dist/smart-agent/skill-plugins-config.test.js.map +0 -1
- package/dist/smart-agent/skill-plugins-host-factory.test.d.ts +0 -2
- package/dist/smart-agent/skill-plugins-host-factory.test.d.ts.map +0 -1
- package/dist/smart-agent/skill-plugins-host-factory.test.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RagRecallContextStrategy } from '@mcp-abap-adt/llm-agent-libs';
|
|
2
2
|
import { DefaultAuxiliaryMcpTools, makeWaitTool, } from '@mcp-abap-adt/llm-agent-mcp';
|
|
3
|
-
import { ControllerFactory, } from '../factories/controller-factory.js';
|
|
3
|
+
import { ControllerFactory, makeControllerRoleLlm, } from '../factories/controller-factory.js';
|
|
4
4
|
import { assertNoAuxCollision, composeAuxiliaryBridge, composeAuxiliarySelect, resolveAuxDefs, } from '../mcp/compose-auxiliary.js';
|
|
5
5
|
import { DefaultStepExecutionControl } from '../smart-agent/controller/default-step-execution-control.js';
|
|
6
6
|
import { writeArtifact } from '../smart-agent/controller/memorizer.js';
|
|
@@ -12,79 +12,28 @@ import { buildMcpBridge } from '../smart-agent/smart-server.js';
|
|
|
12
12
|
// the coordinator in code — preferably via the `ControllerFactory`
|
|
13
13
|
// (`const { handler } = await new ControllerFactory().build(config, deps)` then
|
|
14
14
|
// `builder.withStepperCoordinator(handler)`), or directly with the handler.
|
|
15
|
-
export { ControllerFactory, } from '../factories/controller-factory.js';
|
|
15
|
+
export { ControllerFactory, makeControllerRoleLlm, } from '../factories/controller-factory.js';
|
|
16
16
|
export { ControllerCoordinatorHandler, } from '../smart-agent/controller/controller-coordinator-handler.js';
|
|
17
17
|
export { makeSubagentClient, } from '../smart-agent/controller/subagent-client.js';
|
|
18
18
|
/**
|
|
19
|
-
* Built-in `controller` pipeline plugin.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* the runnable agent plus a disposal hook.
|
|
19
|
+
* Built-in `controller` pipeline plugin. Constructed with settings the server
|
|
20
|
+
* parsed (`parseControllerSettings`); wires the {@link ControllerCoordinatorHandler}
|
|
21
|
+
* from the server pipeline context, registers it on a fresh agent builder, and
|
|
22
|
+
* returns the runnable agent plus a disposal hook.
|
|
24
23
|
*/
|
|
25
24
|
export class ControllerPipelinePlugin {
|
|
26
25
|
name;
|
|
27
26
|
plannerKind;
|
|
28
|
-
|
|
27
|
+
settings;
|
|
28
|
+
/** `controller` and `controller-weak` are two registry entries over this class;
|
|
29
|
+
* `settings` come from the server's `parseControllerSettings`. */
|
|
30
|
+
constructor(name, plannerKind, settings) {
|
|
29
31
|
this.name = name;
|
|
30
32
|
this.plannerKind = plannerKind;
|
|
33
|
+
this.settings = settings;
|
|
31
34
|
}
|
|
32
|
-
|
|
33
|
-
const cfg =
|
|
34
|
-
const subagents = (cfg.subagents ?? {});
|
|
35
|
-
for (const role of ['evaluator', 'planner', 'executor']) {
|
|
36
|
-
if (subagents[role] === undefined) {
|
|
37
|
-
throw new Error(`pipeline 'controller' requires 'subagents.${role}' (each an LLM config with at least a 'provider')`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const targetStateRaw = (cfg.targetState ?? {});
|
|
41
|
-
const sessionMemoryRaw = (cfg.sessionMemory ?? {});
|
|
42
|
-
const budgetsRaw = (cfg.budgets ?? {});
|
|
43
|
-
if ('planner' in cfg) {
|
|
44
|
-
throw new Error('controller: `planner:` removed — capability is preset-encoded. Select ' +
|
|
45
|
-
'pipeline: { name: controller } (smart-executor) or ' +
|
|
46
|
-
'{ name: controller-weak } (weak-executor), or pass the kind to ' +
|
|
47
|
-
'`new ControllerFactory().build(config, deps, "weak-executor")` when ' +
|
|
48
|
-
'composing in code. No `planner:` alias exists.');
|
|
49
|
-
}
|
|
50
|
-
const requireInt = (key, min) => {
|
|
51
|
-
const v = budgetsRaw[key];
|
|
52
|
-
if (v === undefined)
|
|
53
|
-
return;
|
|
54
|
-
if (typeof v !== 'number' || !Number.isInteger(v) || v < min) {
|
|
55
|
-
throw new Error(`controller: 'budgets.${key}' must be a ${min > 0 ? 'positive' : 'non-negative'} finite integer (ms), got ${JSON.stringify(v)}`);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
requireInt('maxWaitMs', 1);
|
|
59
|
-
requireInt('maxTotalWaitMs', 0);
|
|
60
|
-
return {
|
|
61
|
-
subagents: subagents,
|
|
62
|
-
targetState: {
|
|
63
|
-
strategy: 'auto',
|
|
64
|
-
distanceThreshold: 0.25,
|
|
65
|
-
...targetStateRaw,
|
|
66
|
-
},
|
|
67
|
-
sessionMemory: {
|
|
68
|
-
collection: 'session-memory',
|
|
69
|
-
...sessionMemoryRaw,
|
|
70
|
-
},
|
|
71
|
-
budgets: {
|
|
72
|
-
maxSteps: 20,
|
|
73
|
-
maxRetries: 3,
|
|
74
|
-
maxRewinds: 5,
|
|
75
|
-
maxToolCalls: 10,
|
|
76
|
-
maxDigestChars: 500,
|
|
77
|
-
maxIntentChars: 120,
|
|
78
|
-
maxActiveSteps: 16,
|
|
79
|
-
maxBoardChars: 12000,
|
|
80
|
-
keepRecentDigests: 8,
|
|
81
|
-
maxWaitMs: 600_000,
|
|
82
|
-
maxTotalWaitMs: 1_800_000,
|
|
83
|
-
...budgetsRaw,
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
async build(cfg, ctx) {
|
|
35
|
+
async build(ctx) {
|
|
36
|
+
const cfg = this.settings;
|
|
88
37
|
const mcpClients = ctx.mcpClients ?? [];
|
|
89
38
|
// Honor the consumer-injected MCP failure classifier on the `pipeline: controller`
|
|
90
39
|
// path (ctx carries it from SmartServer/builder DI). Without this the bridge would
|
|
@@ -213,7 +162,7 @@ export class ControllerPipelinePlugin {
|
|
|
213
162
|
// handler. external-tool routing is decided PER-REQUEST inside the handler
|
|
214
163
|
// from `ctx.externalTools`, so we do NOT wire `isExternalTool` here.
|
|
215
164
|
const deps = {
|
|
216
|
-
makeRoleLlm: (
|
|
165
|
+
makeRoleLlm: makeControllerRoleLlm(this.settings.subagents, ctx),
|
|
217
166
|
callMcp: (name, args, signal) => auxCallMcp(name, args, signal),
|
|
218
167
|
backend: ctx.stepperKnowledgeBackend,
|
|
219
168
|
knowledgeRagFor: (sessionId) => ctx.knowledgeRagFor(sessionId),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/pipelines/controller.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,wBAAwB,EACxB,YAAY,GACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/pipelines/controller.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,wBAAwB,EACxB,YAAY,GACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,GACf,MAAM,6BAA6B,C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ivation, HybridDispatch, OneShotPlanning, ReplanOnErrorPlanning, SelfDispatch, SkillStepsPlanning, SubAgentDispatch } from '@mcp-abap-adt/llm-agent-libs';
|
|
3
|
-
import { type NormalizedLlmMap } from '../smart-agent/llm-config-map.js';
|
|
4
|
-
import type { SmartServerLlmConfig } from '../smart-agent/smart-server.js';
|
|
5
3
|
export interface YamlCoordinator {
|
|
6
4
|
planning?: 'one-shot' | 'replan-on-error' | 'skill-steps';
|
|
7
5
|
dispatch?: 'subagent' | 'self' | 'hybrid';
|
|
@@ -54,15 +52,12 @@ export type FinalizerYaml = {
|
|
|
54
52
|
systemPrompt?: string;
|
|
55
53
|
};
|
|
56
54
|
/**
|
|
57
|
-
* Build the IFinalizer impl from `coordinator.finalizer:` YAML.
|
|
55
|
+
* Build the IFinalizer impl from `coordinator.finalizer:` YAML. `finalizerLlm` is the
|
|
56
|
+
* caller's lookup — `resolveNamedLlm(key)` when the block names a key, the finalizer
|
|
57
|
+
* role's default otherwise — and is asked only for `type: llm`.
|
|
58
58
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* → top-level llm.<name> → llm.main → pipelineFallback (pipeline.llm.main)
|
|
62
|
-
* → ConfigError if all three are missing.
|
|
63
|
-
*
|
|
64
|
-
* Absent block / `type: passthrough` → PassthroughFinalizer.
|
|
65
|
-
* `type: template` → TemplateFinalizer.
|
|
59
|
+
* Absent block / `type: passthrough` → PassthroughFinalizer. `type: template` →
|
|
60
|
+
* TemplateFinalizer.
|
|
66
61
|
*/
|
|
67
|
-
export declare function buildFinalizer(cfg: FinalizerYaml | undefined,
|
|
62
|
+
export declare function buildFinalizer(cfg: FinalizerYaml | undefined, finalizerLlm: () => Promise<ILlm>): Promise<IFinalizer>;
|
|
68
63
|
//# sourceMappingURL=coordinator-resolvers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-resolvers.d.ts","sourceRoot":"","sources":["../../src/pipelines/coordinator-resolvers.ts"],"names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CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,aAAa,GAAG,SAAS,EAC9B,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,UAAU,CAAC,CAOrB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AutoActivation, ExplicitActivation, HybridDispatch, LlmFinalizer, OneShotPlanning, PassthroughFinalizer, ReplanOnErrorPlanning, ScoreThresholdToolSelection, SelfDispatch, SkillStepsPlanning, SubAgentDispatch, TemplateFinalizer, TopKToolSelection, } from '@mcp-abap-adt/llm-agent-libs';
|
|
2
|
-
import { resolveLlmConfig, } from '../smart-agent/llm-config-map.js';
|
|
3
2
|
export function resolveCoordinatorPlanning(name, plannerLlm) {
|
|
4
3
|
switch (name) {
|
|
5
4
|
case 'one-shot':
|
|
@@ -68,29 +67,20 @@ export function resolveToolSelectionStrategy(name, params) {
|
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
/**
|
|
71
|
-
* Build the IFinalizer impl from `coordinator.finalizer:` YAML.
|
|
70
|
+
* Build the IFinalizer impl from `coordinator.finalizer:` YAML. `finalizerLlm` is the
|
|
71
|
+
* caller's lookup — `resolveNamedLlm(key)` when the block names a key, the finalizer
|
|
72
|
+
* role's default otherwise — and is asked only for `type: llm`.
|
|
72
73
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* → top-level llm.<name> → llm.main → pipelineFallback (pipeline.llm.main)
|
|
76
|
-
* → ConfigError if all three are missing.
|
|
77
|
-
*
|
|
78
|
-
* Absent block / `type: passthrough` → PassthroughFinalizer.
|
|
79
|
-
* `type: template` → TemplateFinalizer.
|
|
74
|
+
* Absent block / `type: passthrough` → PassthroughFinalizer. `type: template` →
|
|
75
|
+
* TemplateFinalizer.
|
|
80
76
|
*/
|
|
81
|
-
export async function buildFinalizer(cfg,
|
|
77
|
+
export async function buildFinalizer(cfg, finalizerLlm) {
|
|
82
78
|
const kind = cfg?.type ?? 'passthrough';
|
|
83
79
|
if (kind === 'passthrough')
|
|
84
80
|
return new PassthroughFinalizer();
|
|
85
81
|
if (kind === 'template')
|
|
86
82
|
return new TemplateFinalizer();
|
|
87
|
-
|
|
88
|
-
const resolved = resolveLlmConfig(llmMap, cfg?.finalizerLlm, pipelineFallback);
|
|
89
|
-
if (!resolved) {
|
|
90
|
-
throw new Error('coordinator.finalizer (type: llm) requires an LLM config: provide top-level llm.<name>, llm.main, or pipeline.llm.main');
|
|
91
|
-
}
|
|
92
|
-
const llm = await makeLlm(resolved);
|
|
93
|
-
return new LlmFinalizer(llm, {
|
|
83
|
+
return new LlmFinalizer(await finalizerLlm(), {
|
|
94
84
|
systemPrompt: cfg?.systemPrompt,
|
|
95
85
|
});
|
|
96
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-resolvers.js","sourceRoot":"","sources":["../../src/pipelines/coordinator-resolvers.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-resolvers.js","sourceRoot":"","sources":["../../src/pipelines/coordinator-resolvers.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AA8BtC,MAAM,UAAU,0BAA0B,CAAC,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,cAAc,EAAE,CAAC;QAC9B,KAAK,UAAU;YACb,OAAO,IAAI,kBAAkB,EAAE,CAAC;QAClC;YACE,MAAM,IAAI,KAAK,CACb,6CAA6C,IAAI,6BAA6B,CAC/E,CAAC;IACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,IAAY,EACZ,MAA8B;IAE9B,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,IAAI,iBAAiB,EAAE,CAAC;QACjC,KAAK,WAAW,CAAC,CAAC,CAAC;YACjB,MAAM,QAAQ,GAAG,MAAM,EAAE,QAAQ,CAAC;YAClC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACjC,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;YACJ,CAAC;YACD,OAAO,IAAI,2BAA2B,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CACb,yCAAyC,IAAI,+BAA+B,CAC7E,CAAC;IACN,CAAC;AACH,CAAC;AAQD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAA8B,EAC9B,YAAiC;IAEjC,MAAM,IAAI,GAAG,GAAG,EAAE,IAAI,IAAI,aAAa,CAAC;IACxC,IAAI,IAAI,KAAK,aAAa;QAAE,OAAO,IAAI,oBAAoB,EAAE,CAAC;IAC9D,IAAI,IAAI,KAAK,UAAU;QAAE,OAAO,IAAI,iBAAiB,EAAE,CAAC;IACxD,OAAO,IAAI,YAAY,CAAC,MAAM,YAAY,EAAE,EAAE;QAC5C,YAAY,EAAE,GAAG,EAAE,YAAY;KAChC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/pipelines/dag.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { IPipelineInstance, IPipelinePlugin } from '@mcp-abap-adt/llm-agent';
|
|
2
|
+
import type { DagPipelineSettings } from '../smart-agent/pipeline-settings.js';
|
|
2
3
|
import type { IServerPipelineContext } from './server-context.js';
|
|
3
|
-
/** Config = the raw `coordinator:` (DAG) YAML block, validated by parseConfig. */
|
|
4
|
-
export type DagPipelineConfig = Record<string, unknown>;
|
|
5
4
|
/**
|
|
6
|
-
* Built-in `dag` pipeline plugin.
|
|
7
|
-
*
|
|
8
|
-
* `
|
|
9
|
-
*
|
|
5
|
+
* Built-in `dag` pipeline plugin. Assembles the coordinator deps via the shared
|
|
6
|
+
* `buildDagCoordinatorDeps` from the settings the server parsed
|
|
7
|
+
* (`parseDagSettings`), registers a `DagCoordinatorHandler` on a fresh agent
|
|
8
|
+
* builder, and returns the runnable agent plus a disposal hook.
|
|
10
9
|
*
|
|
11
10
|
* @deprecated Legacy pipeline. `dag` runs on its own legacy coordinator/step
|
|
12
11
|
* interpreter and stays selectable only for backward compatibility — it is not
|
|
@@ -15,9 +14,10 @@ export type DagPipelineConfig = Record<string, unknown>;
|
|
|
15
14
|
* it. The controller interpreter was not designed to drive the legacy DAG flow,
|
|
16
15
|
* so do not migrate a `dag` config onto it. May be removed in a future major.
|
|
17
16
|
*/
|
|
18
|
-
export declare class DagPipelinePlugin implements IPipelinePlugin
|
|
17
|
+
export declare class DagPipelinePlugin implements IPipelinePlugin {
|
|
18
|
+
private readonly settings;
|
|
19
19
|
readonly name = "dag";
|
|
20
|
-
|
|
21
|
-
build(
|
|
20
|
+
constructor(settings: DagPipelineSettings);
|
|
21
|
+
build(ctx: IServerPipelineContext): Promise<IPipelineInstance>;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=dag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dag.d.ts","sourceRoot":"","sources":["../../src/pipelines/dag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"dag.d.ts","sourceRoot":"","sources":["../../src/pipelines/dag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,qBAAa,iBAAkB,YAAW,eAAe;IAG3C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,QAAQ,CAAC,IAAI,SAAS;gBAEO,QAAQ,EAAE,mBAAmB;IAEpD,KAAK,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAYrE"}
|
package/dist/pipelines/dag.js
CHANGED
|
@@ -2,10 +2,10 @@ import { DagCoordinatorHandler } from '@mcp-abap-adt/llm-agent-libs';
|
|
|
2
2
|
import { buildDagCoordinatorDeps } from '../smart-agent/build-dag-coordinator-deps.js';
|
|
3
3
|
import { registerSkillSources } from './register-skill-sources.js';
|
|
4
4
|
/**
|
|
5
|
-
* Built-in `dag` pipeline plugin.
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
5
|
+
* Built-in `dag` pipeline plugin. Assembles the coordinator deps via the shared
|
|
6
|
+
* `buildDagCoordinatorDeps` from the settings the server parsed
|
|
7
|
+
* (`parseDagSettings`), registers a `DagCoordinatorHandler` on a fresh agent
|
|
8
|
+
* builder, and returns the runnable agent plus a disposal hook.
|
|
9
9
|
*
|
|
10
10
|
* @deprecated Legacy pipeline. `dag` runs on its own legacy coordinator/step
|
|
11
11
|
* interpreter and stays selectable only for backward compatibility — it is not
|
|
@@ -15,29 +15,18 @@ import { registerSkillSources } from './register-skill-sources.js';
|
|
|
15
15
|
* so do not migrate a `dag` config onto it. May be removed in a future major.
|
|
16
16
|
*/
|
|
17
17
|
export class DagPipelinePlugin {
|
|
18
|
+
settings;
|
|
18
19
|
name = 'dag';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (cfg.planner === undefined) {
|
|
22
|
-
throw new Error("pipeline 'dag' requires a 'planner' in its config");
|
|
23
|
-
}
|
|
24
|
-
return cfg;
|
|
20
|
+
constructor(settings) {
|
|
21
|
+
this.settings = settings;
|
|
25
22
|
}
|
|
26
|
-
async build(
|
|
23
|
+
async build(ctx) {
|
|
27
24
|
const deps = await buildDagCoordinatorDeps({
|
|
28
|
-
|
|
29
|
-
llmMap: ctx.llmMap,
|
|
30
|
-
pipelineFallback: ctx.pipelineFallback,
|
|
31
|
-
mainLlm: ctx.mainLlm,
|
|
32
|
-
helperLlm: ctx.helperLlm,
|
|
33
|
-
mainTemp: ctx.mainTemp,
|
|
25
|
+
settings: this.settings,
|
|
34
26
|
registry: ctx.workerRegistry,
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
resolveLlm: (role) => ctx.resolveLlm(role),
|
|
28
|
+
resolveNamedLlm: (key) => ctx.resolveNamedLlm(key),
|
|
37
29
|
});
|
|
38
|
-
if (!deps) {
|
|
39
|
-
throw new Error("pipeline 'dag': buildDagCoordinatorDeps returned undefined");
|
|
40
|
-
}
|
|
41
30
|
const handler = new DagCoordinatorHandler(deps);
|
|
42
31
|
const builder = registerSkillSources(await ctx.createAgentBuilder(), ctx);
|
|
43
32
|
const handle = await builder.withStepperCoordinator(handler).build();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dag.js","sourceRoot":"","sources":["../../src/pipelines/dag.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"dag.js","sourceRoot":"","sources":["../../src/pipelines/dag.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,iBAAiB;IAGC;IAFpB,IAAI,GAAG,KAAK,CAAC;IAEtB,YAA6B,QAA6B;QAA7B,aAAQ,GAAR,QAAQ,CAAqB;IAAG,CAAC;IAE9D,KAAK,CAAC,KAAK,CAAC,GAA2B;QACrC,MAAM,IAAI,GAAG,MAAM,uBAAuB,CAAC;YACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,GAAG,CAAC,cAAc;YAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;YAC1C,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC;SACnD,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,GAAG,CAAC,kBAAkB,EAAE,EAAE,GAAG,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;QACrE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;IAC9D,CAAC;CACF"}
|
package/dist/pipelines/flat.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type { IPipelineInstance, IPipelinePlugin } from '@mcp-abap-adt/llm-agent';
|
|
2
2
|
import type { IServerPipelineContext } from './server-context.js';
|
|
3
3
|
/**
|
|
4
|
-
* Built-in `flat` pipeline plugin. No coordinator
|
|
5
|
-
*
|
|
6
|
-
* multi-worker orchestration). Used for simple single-turn or stateless
|
|
7
|
-
* deployments.
|
|
4
|
+
* Built-in `flat` pipeline plugin. No coordinator and no settings — a plain
|
|
5
|
+
* SmartAgent with the base tool loop.
|
|
8
6
|
*/
|
|
9
|
-
export declare class FlatPipelinePlugin implements IPipelinePlugin
|
|
7
|
+
export declare class FlatPipelinePlugin implements IPipelinePlugin {
|
|
10
8
|
readonly name = "flat";
|
|
11
|
-
|
|
12
|
-
build(_cfg: Record<string, never>, ctx: IServerPipelineContext): Promise<IPipelineInstance>;
|
|
9
|
+
build(ctx: IServerPipelineContext): Promise<IPipelineInstance>;
|
|
13
10
|
}
|
|
14
11
|
//# sourceMappingURL=flat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../src/pipelines/flat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../src/pipelines/flat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD,QAAQ,CAAC,IAAI,UAAU;IAEjB,KAAK,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAKrE"}
|
package/dist/pipelines/flat.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { registerSkillSources } from './register-skill-sources.js';
|
|
2
2
|
/**
|
|
3
|
-
* Built-in `flat` pipeline plugin. No coordinator
|
|
4
|
-
*
|
|
5
|
-
* multi-worker orchestration). Used for simple single-turn or stateless
|
|
6
|
-
* deployments.
|
|
3
|
+
* Built-in `flat` pipeline plugin. No coordinator and no settings — a plain
|
|
4
|
+
* SmartAgent with the base tool loop.
|
|
7
5
|
*/
|
|
8
6
|
export class FlatPipelinePlugin {
|
|
9
7
|
name = 'flat';
|
|
10
|
-
|
|
11
|
-
return {};
|
|
12
|
-
}
|
|
13
|
-
async build(_cfg, ctx) {
|
|
8
|
+
async build(ctx) {
|
|
14
9
|
const builder = registerSkillSources(await ctx.createAgentBuilder(), ctx);
|
|
15
10
|
const handle = await builder.build();
|
|
16
11
|
return { agent: handle.agent, close: () => handle.close() };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat.js","sourceRoot":"","sources":["../../src/pipelines/flat.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE
|
|
1
|
+
{"version":3,"file":"flat.js","sourceRoot":"","sources":["../../src/pipelines/flat.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IACpB,IAAI,GAAG,MAAM,CAAC;IAEvB,KAAK,CAAC,KAAK,CAAC,GAA2B;QACrC,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,GAAG,CAAC,kBAAkB,EAAE,EAAE,GAAG,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type { IPipelineInstance, IPipelinePlugin } from '@mcp-abap-adt/llm-agent';
|
|
2
|
+
import type { LinearPipelineSettings } from '../smart-agent/pipeline-settings.js';
|
|
2
3
|
import type { IServerPipelineContext } from './server-context.js';
|
|
3
|
-
/** Config = the raw `coordinator:` (linear) YAML block. */
|
|
4
|
-
export type LinearPipelineConfig = Record<string, unknown>;
|
|
5
4
|
/**
|
|
6
|
-
* Built-in `linear` pipeline plugin.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* {@link CoordinatorHandler}, registered on a fresh agent builder, and returned
|
|
10
|
-
* as a runnable agent plus a disposal hook.
|
|
5
|
+
* Built-in `linear` pipeline plugin. Constructed with settings the server parsed
|
|
6
|
+
* (`parseLinearSettings`); the planner's LLM is a lookup, so it happens here, per
|
|
7
|
+
* session, through `ctx`.
|
|
11
8
|
*/
|
|
12
|
-
export declare class LinearPipelinePlugin implements IPipelinePlugin
|
|
9
|
+
export declare class LinearPipelinePlugin implements IPipelinePlugin {
|
|
10
|
+
private readonly settings;
|
|
13
11
|
readonly name = "linear";
|
|
14
|
-
|
|
15
|
-
build(
|
|
12
|
+
constructor(settings: LinearPipelineSettings);
|
|
13
|
+
build(ctx: IServerPipelineContext): Promise<IPipelineInstance>;
|
|
16
14
|
}
|
|
17
15
|
//# sourceMappingURL=linear.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../src/pipelines/linear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../src/pipelines/linear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAOlF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAG9C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,QAAQ,CAAC,IAAI,YAAY;gBAEI,QAAQ,EAAE,sBAAsB;IAEvD,KAAK,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAsBrE"}
|
package/dist/pipelines/linear.js
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { LinearFactory } from '../factories/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { resolveCoordinatorDispatch, resolveCoordinatorDispatchKind, resolveCoordinatorPlanning, } from './coordinator-resolvers.js';
|
|
3
3
|
import { registerSkillSources } from './register-skill-sources.js';
|
|
4
4
|
/**
|
|
5
|
-
* Built-in `linear` pipeline plugin.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* {@link CoordinatorHandler}, registered on a fresh agent builder, and returned
|
|
9
|
-
* as a runnable agent plus a disposal hook.
|
|
5
|
+
* Built-in `linear` pipeline plugin. Constructed with settings the server parsed
|
|
6
|
+
* (`parseLinearSettings`); the planner's LLM is a lookup, so it happens here, per
|
|
7
|
+
* session, through `ctx`.
|
|
10
8
|
*/
|
|
11
9
|
export class LinearPipelinePlugin {
|
|
10
|
+
settings;
|
|
12
11
|
name = 'linear';
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
constructor(settings) {
|
|
13
|
+
this.settings = settings;
|
|
15
14
|
}
|
|
16
|
-
async build(
|
|
17
|
-
const
|
|
15
|
+
async build(ctx) {
|
|
16
|
+
const s = this.settings;
|
|
17
|
+
const plannerLlm = await ctx.resolveLlm('planner');
|
|
18
|
+
const deps = {
|
|
19
|
+
planning: resolveCoordinatorPlanning(s.planning, plannerLlm),
|
|
20
|
+
dispatch: resolveCoordinatorDispatch(resolveCoordinatorDispatchKind(s.dispatch), plannerLlm, undefined),
|
|
21
|
+
maxSteps: s.maxSteps,
|
|
22
|
+
maxRetriesPerStep: s.maxRetriesPerStep,
|
|
23
|
+
failPolicy: s.failPolicy,
|
|
24
|
+
};
|
|
18
25
|
const { handler } = await new LinearFactory().build(deps, {
|
|
19
26
|
makeRoleLlm: (role) => ctx.resolveLlm(role),
|
|
20
|
-
callMcp: (n, a,
|
|
27
|
+
callMcp: (n, a, sig) => ctx.callMcp(n, a, sig),
|
|
21
28
|
});
|
|
22
29
|
const builder = registerSkillSources(await ctx.createAgentBuilder(), ctx);
|
|
23
30
|
const handle = await builder.withStepperCoordinator(handler).build();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear.js","sourceRoot":"","sources":["../../src/pipelines/linear.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linear.js","sourceRoot":"","sources":["../../src/pipelines/linear.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAGF;IAFpB,IAAI,GAAG,QAAQ,CAAC;IAEzB,YAA6B,QAAgC;QAAhC,aAAQ,GAAR,QAAQ,CAAwB;IAAG,CAAC;IAEjE,KAAK,CAAC,KAAK,CAAC,GAA2B;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxB,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QACnD,MAAM,IAAI,GAA2B;YACnC,QAAQ,EAAE,0BAA0B,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC;YAC5D,QAAQ,EAAE,0BAA0B,CAClC,8BAA8B,CAAC,CAAC,CAAC,QAAQ,CAAC,EAC1C,UAAU,EACV,SAAS,CACV;YACD,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,iBAAiB,EAAE,CAAC,CAAC,iBAAiB;YACtC,UAAU,EAAE,CAAC,CAAC,UAAU;SACzB,CAAC;QACF,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE;YACxD,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;YAC3C,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC;SAC/C,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,GAAG,CAAC,kBAAkB,EAAE,EAAE,GAAG,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;QACrE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
export { parseStepperCoordinatorConfig, type StepperCoordinatorConfig, } from '../smart-agent/stepper-config.js';
|
|
2
|
-
import type { CoordinatorHandlerDeps } from '@mcp-abap-adt/llm-agent-libs';
|
|
3
|
-
import type { IServerPipelineContext } from './server-context.js';
|
|
4
|
-
export declare function parseLinearConfig(cfg: Record<string, unknown>, ctx: IServerPipelineContext): Promise<CoordinatorHandlerDeps>;
|
|
5
2
|
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../src/pipelines/parsers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../src/pipelines/parsers.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,6BAA6B,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
// Facade: re-exports the pure stepper parser from stepper-config.ts
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// Facade: re-exports the pure stepper parser from stepper-config.ts. This is the
|
|
2
|
+
// only logic `legacy/stepper.ts` still reaches through this file; the linear
|
|
3
|
+
// dialect (`parseLinearConfig`) moved to `smart-agent/pipeline-settings.ts`
|
|
4
|
+
// (`parseLinearSettings`) — the server parses a plugin's section, not the plugin.
|
|
4
5
|
export { parseStepperCoordinatorConfig, } from '../smart-agent/stepper-config.js';
|
|
5
|
-
import { resolveCoordinatorDispatch, resolveCoordinatorDispatchKind, resolveCoordinatorPlanning, } from './coordinator-resolvers.js';
|
|
6
|
-
export async function parseLinearConfig(cfg, ctx) {
|
|
7
|
-
const plannerLlm = await ctx.resolveLlm('planner');
|
|
8
|
-
const planningKind = cfg.planning ??
|
|
9
|
-
'one-shot';
|
|
10
|
-
// resolveCoordinatorDispatchKind accepts only the dispatch union; cast after
|
|
11
|
-
// the YAML schema has constrained it.
|
|
12
|
-
const dispatchKind = resolveCoordinatorDispatchKind(cfg.dispatch);
|
|
13
|
-
return {
|
|
14
|
-
planning: resolveCoordinatorPlanning(planningKind, plannerLlm),
|
|
15
|
-
dispatch: resolveCoordinatorDispatch(dispatchKind, plannerLlm, undefined),
|
|
16
|
-
maxSteps: cfg.maxSteps ?? 10,
|
|
17
|
-
maxRetriesPerStep: cfg.maxRetriesPerStep ?? 1,
|
|
18
|
-
failPolicy: cfg.failPolicy ?? 'abort',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
6
|
//# sourceMappingURL=parsers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../src/pipelines/parsers.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../src/pipelines/parsers.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,6EAA6E;AAC7E,4EAA4E;AAC5E,kFAAkF;AAClF,OAAO,EACL,6BAA6B,GAE9B,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { IEmbedder, ILlm, IPipelineContext, ISkillPluginHost, ISubAgent, IToolsRagHandle } from '@mcp-abap-adt/llm-agent';
|
|
2
2
|
import type { KnowledgeBackend, SmartAgentBuilder } from '@mcp-abap-adt/llm-agent-libs';
|
|
3
|
-
import type { NormalizedLlmMap } from '../smart-agent/config.js';
|
|
4
|
-
import type { SmartServerLlmConfig } from '../smart-agent/smart-server.js';
|
|
5
3
|
/**
|
|
6
4
|
* Server-side pipeline context. Extends the portable core IPipelineContext with
|
|
7
5
|
* the SmartAgentBuilder factory (host owns agent assembly) and the raw materials
|
|
@@ -11,9 +9,6 @@ import type { SmartServerLlmConfig } from '../smart-agent/smart-server.js';
|
|
|
11
9
|
export interface IServerPipelineContext extends IPipelineContext {
|
|
12
10
|
/** Builder pre-wired with all shared infra EXCEPT the coordinator. */
|
|
13
11
|
createAgentBuilder(): Promise<SmartAgentBuilder>;
|
|
14
|
-
makeLlm(cfg: SmartServerLlmConfig): Promise<ILlm>;
|
|
15
|
-
llmMap?: NormalizedLlmMap;
|
|
16
|
-
pipelineFallback?: SmartServerLlmConfig;
|
|
17
12
|
mainLlm: ILlm;
|
|
18
13
|
helperLlm?: ILlm;
|
|
19
14
|
mainTemp: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-context.d.ts","sourceRoot":"","sources":["../../src/pipelines/server-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,IAAI,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"server-context.d.ts","sourceRoot":"","sources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F,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,yBAAyB,GAC9B,sBAAsB,CAExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-context.js","sourceRoot":"","sources":["../../src/pipelines/server-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server-context.js","sourceRoot":"","sources":["../../src/pipelines/server-context.ts"],"names":[],"mappings":"AA0FA,iEAAiE;AACjE,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS;CACxB,CAAC;AAUF,MAAM,UAAU,2BAA2B,CACzC,IAA+B;IAE/B,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,eAAe,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IPipelineInstance, IPipelinePlugin } from '@mcp-abap-adt/llm-agent';
|
|
2
|
-
import {
|
|
2
|
+
import type { StepperCoordinatorConfig } from '../smart-agent/stepper-config.js';
|
|
3
3
|
import type { IServerPipelineContext } from './server-context.js';
|
|
4
4
|
/**
|
|
5
5
|
* Built-in `stepper` pipeline plugin. Parses the coordinator config dialect,
|
|
@@ -15,9 +15,10 @@ import type { IServerPipelineContext } from './server-context.js';
|
|
|
15
15
|
* flow, so do not migrate a `stepper` config onto it. May be removed in a future
|
|
16
16
|
* major.
|
|
17
17
|
*/
|
|
18
|
-
export declare class StepperPipelinePlugin implements IPipelinePlugin
|
|
18
|
+
export declare class StepperPipelinePlugin implements IPipelinePlugin {
|
|
19
|
+
private readonly settings;
|
|
19
20
|
readonly name = "stepper";
|
|
20
|
-
|
|
21
|
-
build(
|
|
21
|
+
constructor(settings: StepperCoordinatorConfig);
|
|
22
|
+
build(ctx: IServerPipelineContext): Promise<IPipelineInstance>;
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/pipelines/stepper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAQjC,OAAO,
|
|
1
|
+
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/pipelines/stepper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;;;;;;;;;;;GAaG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAG/C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,QAAQ,CAAC,IAAI,aAAa;gBAEG,QAAQ,EAAE,wBAAwB;IAEzD,KAAK,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAuCrE"}
|