@mcp-abap-adt/llm-agent 16.2.0 → 18.0.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/coordinator-signals.d.ts +24 -0
- package/dist/coordinator-signals.d.ts.map +1 -0
- package/dist/coordinator-signals.js +33 -0
- package/dist/coordinator-signals.js.map +1 -0
- 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/interfaces/builder.d.ts +7 -1
- package/dist/interfaces/builder.d.ts.map +1 -1
- package/dist/interfaces/context-path.d.ts +17 -0
- package/dist/interfaces/context-path.d.ts.map +1 -0
- package/dist/interfaces/context-path.js +2 -0
- package/dist/interfaces/context-path.js.map +1 -0
- package/dist/interfaces/coordinator.d.ts +5 -18
- package/dist/interfaces/coordinator.d.ts.map +1 -1
- package/dist/interfaces/dag-plan.d.ts +19 -0
- package/dist/interfaces/dag-plan.d.ts.map +1 -0
- package/dist/interfaces/dag-plan.js +2 -0
- package/dist/interfaces/dag-plan.js.map +1 -0
- package/dist/interfaces/error-strategy.d.ts +24 -0
- package/dist/interfaces/error-strategy.d.ts.map +1 -0
- package/dist/interfaces/error-strategy.js +2 -0
- package/dist/interfaces/error-strategy.js.map +1 -0
- package/dist/interfaces/executor.d.ts +36 -0
- package/dist/interfaces/executor.d.ts.map +1 -0
- package/dist/interfaces/executor.js +2 -0
- package/dist/interfaces/executor.js.map +1 -0
- package/dist/interfaces/finalizer.d.ts +33 -0
- package/dist/interfaces/finalizer.d.ts.map +1 -0
- package/dist/interfaces/finalizer.js +2 -0
- package/dist/interfaces/finalizer.js.map +1 -0
- package/dist/interfaces/index.d.ts +21 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/insufficient-signal.d.ts +7 -0
- package/dist/interfaces/insufficient-signal.d.ts.map +1 -0
- package/dist/interfaces/insufficient-signal.js +11 -0
- package/dist/interfaces/insufficient-signal.js.map +1 -0
- package/dist/interfaces/interpreter.d.ts +56 -0
- package/dist/interfaces/interpreter.d.ts.map +1 -0
- package/dist/interfaces/interpreter.js +2 -0
- package/dist/interfaces/interpreter.js.map +1 -0
- package/dist/interfaces/knowledge-rag.d.ts +40 -0
- package/dist/interfaces/knowledge-rag.d.ts.map +1 -0
- package/dist/interfaces/knowledge-rag.js +2 -0
- package/dist/interfaces/knowledge-rag.js.map +1 -0
- package/dist/interfaces/need-resolver.d.ts +12 -0
- package/dist/interfaces/need-resolver.d.ts.map +1 -0
- package/dist/interfaces/need-resolver.js +2 -0
- package/dist/interfaces/need-resolver.js.map +1 -0
- package/dist/interfaces/planner.d.ts +33 -0
- package/dist/interfaces/planner.d.ts.map +1 -0
- package/dist/interfaces/planner.js +2 -0
- package/dist/interfaces/planner.js.map +1 -0
- package/dist/interfaces/request-logger.d.ts +22 -8
- package/dist/interfaces/request-logger.d.ts.map +1 -1
- package/dist/interfaces/review.d.ts +66 -0
- package/dist/interfaces/review.d.ts.map +1 -0
- package/dist/interfaces/review.js +2 -0
- package/dist/interfaces/review.js.map +1 -0
- package/dist/interfaces/session-identity.d.ts +10 -0
- package/dist/interfaces/session-identity.d.ts.map +1 -0
- package/dist/interfaces/session-identity.js +2 -0
- package/dist/interfaces/session-identity.js.map +1 -0
- package/dist/interfaces/state-oracle.d.ts +22 -0
- package/dist/interfaces/state-oracle.d.ts.map +1 -0
- package/dist/interfaces/state-oracle.js +2 -0
- package/dist/interfaces/state-oracle.js.map +1 -0
- package/dist/interfaces/stepper-interpreter.d.ts +27 -0
- package/dist/interfaces/stepper-interpreter.d.ts.map +1 -0
- package/dist/interfaces/stepper-interpreter.js +2 -0
- package/dist/interfaces/stepper-interpreter.js.map +1 -0
- package/dist/interfaces/stepper-planner.d.ts +32 -0
- package/dist/interfaces/stepper-planner.d.ts.map +1 -0
- package/dist/interfaces/stepper-planner.js +2 -0
- package/dist/interfaces/stepper-planner.js.map +1 -0
- package/dist/interfaces/stepper.d.ts +73 -0
- package/dist/interfaces/stepper.d.ts.map +1 -0
- package/dist/interfaces/stepper.js +18 -0
- package/dist/interfaces/stepper.js.map +1 -0
- package/dist/interfaces/streaming.d.ts +69 -0
- package/dist/interfaces/streaming.d.ts.map +1 -0
- package/dist/interfaces/streaming.js +2 -0
- package/dist/interfaces/streaming.js.map +1 -0
- package/dist/interfaces/subagent-context.d.ts +0 -1
- package/dist/interfaces/subagent-context.d.ts.map +1 -1
- package/dist/interfaces/subagent.d.ts +20 -32
- package/dist/interfaces/subagent.d.ts.map +1 -1
- package/dist/interfaces/task-spec.d.ts +42 -0
- package/dist/interfaces/task-spec.d.ts.map +1 -0
- package/dist/interfaces/task-spec.js +17 -0
- package/dist/interfaces/task-spec.js.map +1 -0
- package/dist/interfaces/types.d.ts +9 -5
- package/dist/interfaces/types.d.ts.map +1 -1
- package/dist/interfaces/types.js.map +1 -1
- package/dist/needs-decomposition-error.d.ts +10 -0
- package/dist/needs-decomposition-error.d.ts.map +1 -0
- package/dist/needs-decomposition-error.js +14 -0
- package/dist/needs-decomposition-error.js.map +1 -0
- package/dist/rag/in-memory-rag.d.ts.map +1 -1
- package/dist/rag/in-memory-rag.js +5 -1
- package/dist/rag/in-memory-rag.js.map +1 -1
- package/dist/types.d.ts +9 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LlmUsage } from './interfaces/types.js';
|
|
2
|
+
/** A role (planner/reviewer) needs a REALITY fact; the coordinator routes the
|
|
3
|
+
* query to the state-oracle and re-invokes the role (autonomous, same turn). */
|
|
4
|
+
export declare class NeedInfoSignal extends Error {
|
|
5
|
+
readonly query: string;
|
|
6
|
+
/** Token usage consumed by the LLM call that produced this signal.
|
|
7
|
+
* Throwers SHOULD populate it (`signal.usage = res.usage`) before
|
|
8
|
+
* re-throwing, so the coordinator can attribute LLM spend on signal
|
|
9
|
+
* paths (which would otherwise discard the captured usage). Mutable
|
|
10
|
+
* by design — keeping it on the constructor would force every thrower
|
|
11
|
+
* to thread it through extra plumbing. */
|
|
12
|
+
usage?: LlmUsage;
|
|
13
|
+
constructor(query: string, usage?: LlmUsage);
|
|
14
|
+
}
|
|
15
|
+
/** A role needs a HUMAN decision; the coordinator emits the question and ends
|
|
16
|
+
* the turn (the next turn replans fresh from current state). */
|
|
17
|
+
export declare class ClarifySignal extends Error {
|
|
18
|
+
readonly question: string;
|
|
19
|
+
/** Token usage consumed by the LLM call that produced this signal.
|
|
20
|
+
* Throwers SHOULD populate it before re-throwing — see NeedInfoSignal. */
|
|
21
|
+
usage?: LlmUsage;
|
|
22
|
+
constructor(question: string, usage?: LlmUsage);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=coordinator-signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-signals.d.ts","sourceRoot":"","sources":["../src/coordinator-signals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD;iFACiF;AACjF,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;+CAK2C;IAC3C,KAAK,CAAC,EAAE,QAAQ,CAAC;gBACL,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ;CAM5C;AAED;iEACiE;AACjE,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;+EAC2E;IAC3E,KAAK,CAAC,EAAE,QAAQ,CAAC;gBACL,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ;CAM/C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** A role (planner/reviewer) needs a REALITY fact; the coordinator routes the
|
|
2
|
+
* query to the state-oracle and re-invokes the role (autonomous, same turn). */
|
|
3
|
+
export class NeedInfoSignal extends Error {
|
|
4
|
+
query;
|
|
5
|
+
/** Token usage consumed by the LLM call that produced this signal.
|
|
6
|
+
* Throwers SHOULD populate it (`signal.usage = res.usage`) before
|
|
7
|
+
* re-throwing, so the coordinator can attribute LLM spend on signal
|
|
8
|
+
* paths (which would otherwise discard the captured usage). Mutable
|
|
9
|
+
* by design — keeping it on the constructor would force every thrower
|
|
10
|
+
* to thread it through extra plumbing. */
|
|
11
|
+
usage;
|
|
12
|
+
constructor(query, usage) {
|
|
13
|
+
super(`needs info: ${query}`);
|
|
14
|
+
this.name = 'NeedInfoSignal';
|
|
15
|
+
this.query = query;
|
|
16
|
+
this.usage = usage;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** A role needs a HUMAN decision; the coordinator emits the question and ends
|
|
20
|
+
* the turn (the next turn replans fresh from current state). */
|
|
21
|
+
export class ClarifySignal extends Error {
|
|
22
|
+
question;
|
|
23
|
+
/** Token usage consumed by the LLM call that produced this signal.
|
|
24
|
+
* Throwers SHOULD populate it before re-throwing — see NeedInfoSignal. */
|
|
25
|
+
usage;
|
|
26
|
+
constructor(question, usage) {
|
|
27
|
+
super(`needs clarification: ${question}`);
|
|
28
|
+
this.name = 'ClarifySignal';
|
|
29
|
+
this.question = question;
|
|
30
|
+
this.usage = usage;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=coordinator-signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-signals.js","sourceRoot":"","sources":["../src/coordinator-signals.ts"],"names":[],"mappings":"AAEA;iFACiF;AACjF,MAAM,OAAO,cAAe,SAAQ,KAAK;IAC9B,KAAK,CAAS;IACvB;;;;;+CAK2C;IAC3C,KAAK,CAAY;IACjB,YAAY,KAAa,EAAE,KAAgB;QACzC,KAAK,CAAC,eAAe,KAAK,EAAE,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED;iEACiE;AACjE,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,QAAQ,CAAS;IAC1B;+EAC2E;IAC3E,KAAK,CAAY;IACjB,YAAY,QAAgB,EAAE,KAAgB;QAC5C,KAAK,CAAC,wBAAwB,QAAQ,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export { ClarifySignal, NeedInfoSignal } from './coordinator-signals.js';
|
|
1
2
|
export * from './errors/index.js';
|
|
2
3
|
export * from './interfaces/index.js';
|
|
3
4
|
export { BaseLLMProvider, type LLMProvider } from './llm/base-llm-provider.js';
|
|
5
|
+
export { NeedsDecompositionError } from './needs-decomposition-error.js';
|
|
4
6
|
export * from './rag/index.js';
|
|
5
7
|
export * from './types.js';
|
|
6
8
|
export { ClineClientAdapter } from './adapters/cline-client-adapter.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC/E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAI3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,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AAC;AAC3D,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Re-export everything from core subtrees.
|
|
2
|
+
export { ClarifySignal, NeedInfoSignal } from './coordinator-signals.js';
|
|
2
3
|
export * from './errors/index.js';
|
|
3
4
|
export * from './interfaces/index.js';
|
|
4
5
|
export { BaseLLMProvider } from './llm/base-llm-provider.js';
|
|
6
|
+
export { NeedsDecompositionError } from './needs-decomposition-error.js';
|
|
5
7
|
export * from './rag/index.js';
|
|
6
8
|
export * from './types.js';
|
|
7
9
|
// --- Library helpers (moved from @mcp-abap-adt/llm-agent-server) ---
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,eAAe,EAAoB,MAAM,4BAA4B,CAAC;AAC/E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAE3B,sEAAsE;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,eAAe;AACf,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,iBAAiB;AACjB,OAAO,EACL,sBAAsB,EAGtB,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,yBAAyB;AACzB,OAAO,EACL,sBAAsB,GAKvB,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAw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,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,oBAAoB;AACpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,aAAa;AACb,OAAO,EACL,cAAc,GAGf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,uBAAuB,CAAC"}
|
|
@@ -3,8 +3,9 @@ import type { Message } from '../types.js';
|
|
|
3
3
|
import type { AgentCallOptions, OrchestratorError, SmartAgentResponse } from './agent-contracts.js';
|
|
4
4
|
import type { ILlmApiAdapter } from './api-adapter.js';
|
|
5
5
|
import type { ILlm } from './llm.js';
|
|
6
|
+
import type { IMcpClient } from './mcp-client.js';
|
|
6
7
|
import type { IModelProvider } from './model-provider.js';
|
|
7
|
-
import type { IRag } from './rag.js';
|
|
8
|
+
import type { IRag, IRagRegistry } from './rag.js';
|
|
8
9
|
import type { IRequestLogger } from './request-logger.js';
|
|
9
10
|
import type { LlmStreamChunk, Result } from './types.js';
|
|
10
11
|
/**
|
|
@@ -45,6 +46,11 @@ export interface SmartAgentHandle<T extends ISmartAgent = ISmartAgent> {
|
|
|
45
46
|
circuitBreakers: CircuitBreaker[];
|
|
46
47
|
/** RAG stores (for config hot-reload weight updates). */
|
|
47
48
|
ragStores: SmartAgentRagStores;
|
|
49
|
+
/** The RAG registry composed by the builder (shared global, injected per-session). */
|
|
50
|
+
ragRegistry: IRagRegistry;
|
|
51
|
+
/** The connected upstream MCP clients (shared global, injected per-session
|
|
52
|
+
* via withMcpClients to skip re-connect + re-vectorize). Empty when no MCP. */
|
|
53
|
+
mcpClients: IMcpClient[];
|
|
48
54
|
/** Model provider for discovery. Undefined when not available. */
|
|
49
55
|
modelProvider?: IModelProvider;
|
|
50
56
|
/** Look up a registered API adapter by name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/interfaces/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/interfaces/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE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,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IACxD,6CAA6C;IAC7C,eAAe,IAAI,MAAM,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The hierarchical context unit: the current node/request + its ancestor intent
|
|
2
|
+
* path. NOT the whole chat, NOT just the last prompt. Travels into role inputs. */
|
|
3
|
+
export interface ContextPath {
|
|
4
|
+
/** Root/parent intent. */
|
|
5
|
+
objective?: string;
|
|
6
|
+
/** Intent-shaping dialogue along the path. */
|
|
7
|
+
clarifications: Array<{
|
|
8
|
+
question: string;
|
|
9
|
+
answer: string;
|
|
10
|
+
}>;
|
|
11
|
+
/** Reality facts gathered for THIS path via the oracle (needInfo round-trips). */
|
|
12
|
+
oracleObservations: Array<{
|
|
13
|
+
query: string;
|
|
14
|
+
answer: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=context-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-path.d.ts","sourceRoot":"","sources":["../../src/interfaces/context-path.ts"],"names":[],"mappings":"AAAA;oFACoF;AACpF,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,cAAc,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,kFAAkF;IAClF,kBAAkB,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-path.js","sourceRoot":"","sources":["../../src/interfaces/context-path.ts"],"names":[],"mappings":""}
|
|
@@ -33,11 +33,11 @@ export interface Plan {
|
|
|
33
33
|
source: 'planner-llm' | 'skill-steps' | 'manual';
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
36
|
+
* Flat diagnostic trace for an epicfail failure. Captures a single frame:
|
|
37
|
+
* which step failed, which agent, the retry attempts, and the root error
|
|
38
|
+
* message. There is no nesting — each failure is represented independently.
|
|
38
39
|
*/
|
|
39
40
|
export interface EpicFailTrace {
|
|
40
|
-
layer: number;
|
|
41
41
|
stepId: string;
|
|
42
42
|
agentName: string;
|
|
43
43
|
attempts: Array<{
|
|
@@ -46,7 +46,6 @@ export interface EpicFailTrace {
|
|
|
46
46
|
durationMs: number;
|
|
47
47
|
}>;
|
|
48
48
|
originalError: string;
|
|
49
|
-
childTrace?: EpicFailTrace;
|
|
50
49
|
}
|
|
51
50
|
export interface StepResult {
|
|
52
51
|
stepId: string;
|
|
@@ -58,8 +57,8 @@ export interface StepResult {
|
|
|
58
57
|
error?: string;
|
|
59
58
|
/**
|
|
60
59
|
* Populated when a child subagent returned `errorClass: 'epicfail'`.
|
|
61
|
-
* Carries
|
|
62
|
-
*
|
|
60
|
+
* Carries a flat diagnostic trace (single frame) upward so consumers
|
|
61
|
+
* can inspect which step and agent failed.
|
|
63
62
|
*/
|
|
64
63
|
epicFailTrace?: EpicFailTrace;
|
|
65
64
|
}
|
|
@@ -79,12 +78,6 @@ export interface ICoordinatorContext {
|
|
|
79
78
|
stepResults: Record<string, StepResult>;
|
|
80
79
|
signal?: AbortSignal;
|
|
81
80
|
sessionId: string;
|
|
82
|
-
/**
|
|
83
|
-
* Dispatch depth of the current coordinator. Root coordinator is 0; child
|
|
84
|
-
* subagent coordinators increment per nested dispatch. Forward-declared for
|
|
85
|
-
* Task 4 of the nested-subagent-dispatch foundation plan.
|
|
86
|
-
*/
|
|
87
|
-
layer?: number;
|
|
88
81
|
}
|
|
89
82
|
export interface IPlanningStrategy {
|
|
90
83
|
readonly name: string;
|
|
@@ -111,12 +104,6 @@ export interface ICoordinatorConfig {
|
|
|
111
104
|
maxSteps?: number;
|
|
112
105
|
maxRetriesPerStep?: number;
|
|
113
106
|
failPolicy?: 'abort' | 'continue';
|
|
114
|
-
/**
|
|
115
|
-
* Maximum dispatch depth from this coordinator. Default 1: the
|
|
116
|
-
* coordinator may dispatch children (layer 1), but those children
|
|
117
|
-
* may not dispatch further unless they raise maxLayer themselves.
|
|
118
|
-
*/
|
|
119
|
-
maxLayer?: number;
|
|
120
107
|
}
|
|
121
108
|
export type SubAgentWithDescription = ISubAgent & {
|
|
122
109
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../src/interfaces/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC;CACvD;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa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AAO,CAAC,UAAU,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,GAAG,EAAE;QAClB,YAAY,EAAE,OAAO,CAAC;QACtB,kBAAkB,EAAE,OAAO,CAAC;KAC7B,GAAG,OAAO,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CACnC;AAED,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface PlanNode {
|
|
2
|
+
id: string;
|
|
3
|
+
goal: string;
|
|
4
|
+
agent?: string;
|
|
5
|
+
dependsOn?: string[];
|
|
6
|
+
needsInput?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Pure domain type: the DAG of work to execute. Runtime telemetry (e.g.
|
|
9
|
+
* per-role LLM usage) is intentionally NOT here — it would leak into
|
|
10
|
+
* downstream consumers (notably the reviewer prompt, which serializes the
|
|
11
|
+
* plan with JSON.stringify). LLM-backed planners return `{plan, usage}`
|
|
12
|
+
* from `IPlanner.plan`; see planner.ts. */
|
|
13
|
+
export interface DagPlan {
|
|
14
|
+
nodes: PlanNode[];
|
|
15
|
+
objective?: string;
|
|
16
|
+
rationale?: string;
|
|
17
|
+
createdAt: number;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=dag-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag-plan.d.ts","sourceRoot":"","sources":["../../src/interfaces/dag-plan.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;4CAI4C;AAC5C,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag-plan.js","sourceRoot":"","sources":["../../src/interfaces/dag-plan.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DagPlan, PlanNode } from './dag-plan.js';
|
|
2
|
+
import type { PlannerCatalogEntry } from './planner.js';
|
|
3
|
+
export interface ErrorContext {
|
|
4
|
+
/** The composed task the failed node was given. */
|
|
5
|
+
task: string;
|
|
6
|
+
/** Replans/revises still allowed this run (the interpreter owns the counter). */
|
|
7
|
+
remainingReplans: number;
|
|
8
|
+
agents: PlannerCatalogEntry[];
|
|
9
|
+
sessionId: string;
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
export type ErrorReaction = {
|
|
13
|
+
action: 'abort';
|
|
14
|
+
} | {
|
|
15
|
+
action: 'replan';
|
|
16
|
+
subPlan: DagPlan;
|
|
17
|
+
};
|
|
18
|
+
export interface IErrorStrategy {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** Per-run budget ceiling (replan AND revise consume it). Default 4. */
|
|
21
|
+
readonly maxReplans?: number;
|
|
22
|
+
onNodeFailure(node: PlanNode, error: unknown, ctx: ErrorContext): Promise<ErrorReaction>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=error-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-strategy.d.ts","sourceRoot":"","sources":["../../src/interfaces/error-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CACX,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-strategy.js","sourceRoot":"","sources":["../../src/interfaces/error-strategy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { IKnowledgeRagHandle, IToolsRagHandle } from './knowledge-rag.js';
|
|
2
|
+
import type { INeedResolver } from './need-resolver.js';
|
|
3
|
+
import type { Budget, RunIdentity } from './stepper.js';
|
|
4
|
+
import type { StreamChunk } from './streaming.js';
|
|
5
|
+
import type { ITaskSpec } from './task-spec.js';
|
|
6
|
+
import type { LlmTool, LlmUsage } from './types.js';
|
|
7
|
+
export interface IExecutor {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
execute(input: {
|
|
10
|
+
prompt: string;
|
|
11
|
+
tools: readonly LlmTool[];
|
|
12
|
+
knowledgeRag: IKnowledgeRagHandle;
|
|
13
|
+
toolsRag: IToolsRagHandle;
|
|
14
|
+
needResolver?: INeedResolver;
|
|
15
|
+
/**
|
|
16
|
+
* Formalized overall task (optional). When present it is kept as a
|
|
17
|
+
* persistent anchor in EVERY iteration and prefixes the tool-search query
|
|
18
|
+
* so the executor never loses sight of the overall task. Absent → behaves
|
|
19
|
+
* as before.
|
|
20
|
+
*/
|
|
21
|
+
taskSpec?: ITaskSpec;
|
|
22
|
+
/** Executor is a LEAF; ignores depthRemaining, stops when budget.tokens.exhausted(). */
|
|
23
|
+
budget: Budget;
|
|
24
|
+
identity: RunIdentity;
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
sessionLogger?: {
|
|
27
|
+
logStep(name: string, data: unknown): void;
|
|
28
|
+
};
|
|
29
|
+
onProgress?: (event: StreamChunk) => void;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
status: 'ok' | 'incomplete' | 'budget-exhausted';
|
|
32
|
+
missing?: string[];
|
|
33
|
+
usage: LlmUsage;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/interfaces/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,KAAK,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;QAC1B,YAAY,EAAE,mBAAmB,CAAC;QAClC,QAAQ,EAAE,eAAe,CAAC;QAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;QAC7B;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,wFAAwF;QACxF,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,WAAW,CAAC;QACtB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,aAAa,CAAC,EAAE;YAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;SAAE,CAAC;QAC/D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;KAC3C,GAAG,OAAO,CAAC;QACV,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,kBAAkB,CAAC;QACjD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,EAAE,QAAQ,CAAC;KACjB,CAAC,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/interfaces/executor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ContextPath } from './context-path.js';
|
|
2
|
+
import type { OnPartial } from './streaming.js';
|
|
3
|
+
import type { LlmUsage } from './types.js';
|
|
4
|
+
export interface FinalizerInput {
|
|
5
|
+
prompt: string;
|
|
6
|
+
objective: string;
|
|
7
|
+
ancestorContext?: ContextPath;
|
|
8
|
+
interpreterOutput: string;
|
|
9
|
+
executionTrace: ReadonlyArray<{
|
|
10
|
+
nodeId: string;
|
|
11
|
+
goal: string;
|
|
12
|
+
output: string;
|
|
13
|
+
}>;
|
|
14
|
+
sessionId?: string;
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
trace?: {
|
|
17
|
+
traceId: string;
|
|
18
|
+
};
|
|
19
|
+
/** Optional streaming sink for finalizer-produced content.
|
|
20
|
+
* LlmFinalizer streams synthesis deltas; Passthrough/Template
|
|
21
|
+
* emit one chunk equal to their full output. */
|
|
22
|
+
onPartial?: OnPartial;
|
|
23
|
+
}
|
|
24
|
+
export interface FinalizerResult {
|
|
25
|
+
output: string;
|
|
26
|
+
usage?: LlmUsage;
|
|
27
|
+
}
|
|
28
|
+
export interface IFinalizer {
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly model?: string;
|
|
31
|
+
finalize(input: FinalizerInput): Promise<FinalizerResult>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=finalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalizer.d.ts","sourceRoot":"","sources":["../../src/interfaces/finalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,aAAa,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B;;qDAEiD;IACjD,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalizer.js","sourceRoot":"","sources":["../../src/interfaces/finalizer.ts"],"names":[],"mappings":""}
|
|
@@ -3,10 +3,18 @@ export { type AgentCallOptions, type BaseAgentLlmBridge, OrchestratorError, type
|
|
|
3
3
|
export type { HistoryEntry, IContextAssembler } from './assembler.js';
|
|
4
4
|
export type { ISmartAgent, SmartAgentHandle, SmartAgentRagStores, } from './builder.js';
|
|
5
5
|
export type { ISubpromptClassifier } from './classifier.js';
|
|
6
|
+
export type { ContextPath } from './context-path.js';
|
|
6
7
|
export type { EpicFailTrace, IActivationStrategy, ICoordinatorConfig, ICoordinatorContext, IDispatchStrategy, IPlanningStrategy, Plan, PlanStep, StepResult, SubAgentWithDescription, } from './coordinator.js';
|
|
8
|
+
export type { DagPlan, PlanNode } from './dag-plan.js';
|
|
9
|
+
export type { ErrorContext, ErrorReaction, IErrorStrategy, } from './error-strategy.js';
|
|
10
|
+
export type { IExecutor } from './executor.js';
|
|
11
|
+
export type { FinalizerInput, FinalizerResult, IFinalizer, } from './finalizer.js';
|
|
7
12
|
export type { CircuitBreakerStatus, HealthComponentStatus, HealthStatus, } from './health.js';
|
|
8
13
|
export type { IHistoryMemory } from './history-memory.js';
|
|
9
14
|
export type { HistoryTurn, IHistorySummarizer, } from './history-summarizer.js';
|
|
15
|
+
export { InsufficientSignal } from './insufficient-signal.js';
|
|
16
|
+
export type { IInterpreter, InterpretContext, InterpretResult, NodeResult, } from './interpreter.js';
|
|
17
|
+
export type { IKnowledgeRagHandle, IToolsRagHandle, KnowledgeEntry, KnowledgeEntryMetadata, KnowledgeFilter, } from './knowledge-rag.js';
|
|
10
18
|
export type { ILlm } from './llm.js';
|
|
11
19
|
export type { ILlmCallStrategy } from './llm-call-strategy.js';
|
|
12
20
|
export type { IMcpClient } from './mcp-client.js';
|
|
@@ -14,7 +22,9 @@ export type { ConnectionStrategyOptions, IMcpConnectionStrategy, McpClientFactor
|
|
|
14
22
|
export type { CounterSnapshot, HistogramSnapshot, ICounter, IHistogram, IMetrics, MetricsSnapshot, } from './metrics.js';
|
|
15
23
|
export type { IModelFilter, IModelInfo, IModelProvider, } from './model-provider.js';
|
|
16
24
|
export type { IModelResolver } from './model-resolver.js';
|
|
25
|
+
export type { INeedResolver } from './need-resolver.js';
|
|
17
26
|
export type { BuiltInStageType, ControlFlowType, StageDefinition, StageType, } from './pipeline.js';
|
|
27
|
+
export type { IPlanner, PlannerCatalogEntry, PlannerInput, PlannerResult, } from './planner.js';
|
|
18
28
|
export type { IPluginLoader, IRagStoreConfig, ISmartAgentPlugin, IStageHandler, LoadedPlugins, PluginExports, RagScope, } from './plugin.js';
|
|
19
29
|
export type { IQueryEmbedding } from './query-embedding.js';
|
|
20
30
|
export type { EmbedderFactory, EmbedderFactoryConfig, IEmbedder, IEmbedderBatch, IEmbedResult, IIdStrategy, IRag, IRagBackendWriter, IRagEditor, IRagProvider, IRagProviderRegistry, IRagRegistry, RagCollectionMeta, RagCollectionScope, } from './rag.js';
|
|
@@ -22,10 +32,20 @@ export { isBatchEmbedder } from './rag.js';
|
|
|
22
32
|
export type { ILlmRateLimiter } from './rate-limiter.js';
|
|
23
33
|
export type { IRequestLogger, LlmCallEntry, LlmComponent, RagQueryEntry, RequestSummary, TokenBucket, TokenCategory, ToolCallEntry, } from './request-logger.js';
|
|
24
34
|
export type { IReranker } from './reranker.js';
|
|
35
|
+
export type { ExecutionFailureInput, ExecutionReviewDecision, ExecutionReviewResult, IReviewStrategy, ReviewInput, ReviewResult, ReviewVerdict, } from './review.js';
|
|
25
36
|
export type { ISessionManager } from './session.js';
|
|
37
|
+
export type { SessionIdentity } from './session-identity.js';
|
|
26
38
|
export type { ISkill, ISkillManager, ISkillMeta, ISkillResource, } from './skill.js';
|
|
27
|
-
export type {
|
|
39
|
+
export type { IStateOracle, StateOracleInput, StateOracleResult, } from './state-oracle.js';
|
|
40
|
+
export type { Budget, IStepper, IStepperInput, IStepperResult, ITokenLedger, RunIdentity, } from './stepper.js';
|
|
41
|
+
export { TokenLedger } from './stepper.js';
|
|
42
|
+
export type { IStepperInterpreter } from './stepper-interpreter.js';
|
|
43
|
+
export type { IStepperPlanner } from './stepper-planner.js';
|
|
44
|
+
export type { OnPartial, StepperRef, StreamChunk } from './streaming.js';
|
|
45
|
+
export type { ISubAgent, ISubAgentInput, ISubAgentResult, SubAgentCapabilities, SubAgentRegistry, } from './subagent.js';
|
|
28
46
|
export type { ISubAgentContextBuilder, SubAgentContextRequest, SubAgentContextResult, } from './subagent-context.js';
|
|
47
|
+
export type { ITaskFormalizer, ITaskSpec } from './task-spec.js';
|
|
48
|
+
export { renderTaskSpec } from './task-spec.js';
|
|
29
49
|
export type { IToolSelectionStrategy } from './tool-selection-strategy.js';
|
|
30
50
|
export type { ISpan, ITracer, SpanOptions, SpanStatus } from './tracer.js';
|
|
31
51
|
export type { AgentConfig, CallOptions, ContextFrame, LlmFinishReason, LlmResponse, LlmStreamChunk, LlmTool, LlmToolCall, LlmToolCallDelta, LlmUsage, McpTool, McpToolResult, ModelUsageEntry, RagMetadata, RagResult, Result, StreamHookContext, StreamToolCall, Subprompt, SubpromptType, TimingEntry, ToolCallRecord, ToolHeartbeat, TraceContext, } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,UAAU,GAChB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACV,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,YAAY,EACZ,UAAU,EACV,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,aAAa,EACb,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EACV,MAAM,EACN,aAAa,EACb,UAAU,EACV,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EA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CAAC;AAC3E,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3E,YAAY,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,aAAa,EACb,eAAe,EACf,WAAW,EACX,SAAS,EACT,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { OrchestratorError, } from './agent-contracts.js';
|
|
2
|
+
export { InsufficientSignal } from './insufficient-signal.js';
|
|
2
3
|
export { isBatchEmbedder } from './rag.js';
|
|
4
|
+
export { TokenLedger } from './stepper.js';
|
|
5
|
+
export { renderTaskSpec } from './task-spec.js';
|
|
3
6
|
export { AssemblerError, ClassifierError, LlmError, McpError, RagError, SkillError, SmartAgentError, } from './types.js';
|
|
4
7
|
export { ValidatorError } from './validator.js';
|
|
5
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,GAGlB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,GAGlB,MAAM,sBAAsB,CAAC;AA2C9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AA8E9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA2C3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAiB3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA6BhD,OAAO,EACL,cAAc,EACd,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LlmUsage } from './types.js';
|
|
2
|
+
export declare class InsufficientSignal extends Error {
|
|
3
|
+
readonly missing: string[];
|
|
4
|
+
readonly usage?: LlmUsage;
|
|
5
|
+
constructor(missing: string[], usage?: LlmUsage);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=insufficient-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insufficient-signal.d.ts","sourceRoot":"","sources":["../../src/interfaces/insufficient-signal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;gBACd,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,QAAQ;CAMhD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class InsufficientSignal extends Error {
|
|
2
|
+
missing;
|
|
3
|
+
usage;
|
|
4
|
+
constructor(missing, usage) {
|
|
5
|
+
super('insufficient');
|
|
6
|
+
this.name = 'InsufficientSignal';
|
|
7
|
+
this.missing = missing;
|
|
8
|
+
this.usage = usage;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=insufficient-signal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insufficient-signal.js","sourceRoot":"","sources":["../../src/interfaces/insufficient-signal.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,OAAO,CAAW;IAClB,KAAK,CAAY;IAC1B,YAAY,OAAiB,EAAE,KAAgB;QAC7C,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ContextPath } from './context-path.js';
|
|
2
|
+
import type { DagPlan } from './dag-plan.js';
|
|
3
|
+
import type { IErrorStrategy } from './error-strategy.js';
|
|
4
|
+
import type { OnPartial } from './streaming.js';
|
|
5
|
+
import type { ISubAgent } from './subagent.js';
|
|
6
|
+
export interface IInterpreter<TInput, TOutput> {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
interpret(input: TInput, ctx: InterpretContext): Promise<TOutput>;
|
|
9
|
+
}
|
|
10
|
+
export interface InterpretContext {
|
|
11
|
+
inputText: string;
|
|
12
|
+
workers: ReadonlyMap<string, ISubAgent>;
|
|
13
|
+
sessionId: string;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
/** Reaction to a node failure (abort | replan). Always populated by the
|
|
16
|
+
* caller; defaults to AbortErrorStrategy. */
|
|
17
|
+
errorStrategy: IErrorStrategy;
|
|
18
|
+
/** Hierarchical ancestor context (parent objective + clarification Q/A +
|
|
19
|
+
* oracle observations). Threaded into node task composition. */
|
|
20
|
+
ancestorContext?: ContextPath;
|
|
21
|
+
/** Request correlation, threaded into each worker dispatch. */
|
|
22
|
+
trace?: {
|
|
23
|
+
traceId: string;
|
|
24
|
+
};
|
|
25
|
+
/** Per-request session debugger logger, threaded into each worker dispatch
|
|
26
|
+
* so worker stages write to the parent's per-request session-log directory. */
|
|
27
|
+
sessionLogger?: {
|
|
28
|
+
logStep(name: string, data: unknown): void;
|
|
29
|
+
};
|
|
30
|
+
/** Forwarded into each `worker.run({ ..., onPartial })`; the
|
|
31
|
+
* interpreter annotates `nodeId` before calling and emits
|
|
32
|
+
* `node-start` / `node-end` itself. */
|
|
33
|
+
onPartial?: OnPartial;
|
|
34
|
+
}
|
|
35
|
+
export interface NodeResult {
|
|
36
|
+
nodeId: string;
|
|
37
|
+
output: string;
|
|
38
|
+
status: 'done' | 'failed' | 'skipped';
|
|
39
|
+
/** Populated by convention when `status === 'failed'` (the failure reason). */
|
|
40
|
+
error?: string;
|
|
41
|
+
durationMs: number;
|
|
42
|
+
}
|
|
43
|
+
export interface InterpretResult {
|
|
44
|
+
nodeResults: Record<string, NodeResult>;
|
|
45
|
+
ok: boolean;
|
|
46
|
+
error?: string;
|
|
47
|
+
output: string;
|
|
48
|
+
/** Set when ok === false: the node whose failure stopped the run (first
|
|
49
|
+
* plan-node-order node with status 'failed'). */
|
|
50
|
+
failedNodeId?: string;
|
|
51
|
+
/** The final plan after any in-run local splices. Populated on BOTH success and failure. */
|
|
52
|
+
executedPlan?: DagPlan;
|
|
53
|
+
/** Topological execution order of node ids in actual run order. */
|
|
54
|
+
executionOrder: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=interpreter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpreter.d.ts","sourceRoot":"","sources":["../../src/interfaces/interpreter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KA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