@llm-dev-ops/agentics-cli 1.5.9 → 1.5.11
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/README.md +478 -148
- package/dist/bundled-agents/manifest.json +1 -0
- package/dist/commands/phase4.d.ts.map +1 -1
- package/dist/commands/phase4.js +4 -2
- package/dist/commands/phase4.js.map +1 -1
- package/dist/commands/phase6.d.ts.map +1 -1
- package/dist/commands/phase6.js +4 -2
- package/dist/commands/phase6.js.map +1 -1
- package/dist/mcp/mcp-server.js +11 -10
- package/dist/mcp/mcp-server.js.map +1 -1
- package/dist/pipeline/auto-chain.d.ts +5 -0
- package/dist/pipeline/auto-chain.d.ts.map +1 -1
- package/dist/pipeline/auto-chain.js +131 -47
- package/dist/pipeline/auto-chain.js.map +1 -1
- package/dist/pipeline/enterprise/artifact-assembler.d.ts +64 -0
- package/dist/pipeline/enterprise/artifact-assembler.d.ts.map +1 -0
- package/dist/pipeline/enterprise/artifact-assembler.js +542 -0
- package/dist/pipeline/enterprise/artifact-assembler.js.map +1 -0
- package/dist/pipeline/enterprise/artifact-renderers.d.ts +42 -0
- package/dist/pipeline/enterprise/artifact-renderers.d.ts.map +1 -0
- package/dist/pipeline/enterprise/artifact-renderers.js +513 -0
- package/dist/pipeline/enterprise/artifact-renderers.js.map +1 -0
- package/dist/pipeline/enterprise/code-resolver.d.ts +43 -0
- package/dist/pipeline/enterprise/code-resolver.d.ts.map +1 -0
- package/dist/pipeline/enterprise/code-resolver.js +219 -0
- package/dist/pipeline/enterprise/code-resolver.js.map +1 -0
- package/dist/pipeline/enterprise/decision-graph-client.d.ts +171 -0
- package/dist/pipeline/enterprise/decision-graph-client.d.ts.map +1 -0
- package/dist/pipeline/enterprise/decision-graph-client.js +222 -0
- package/dist/pipeline/enterprise/decision-graph-client.js.map +1 -0
- package/dist/pipeline/enterprise/decision-graph-memory.d.ts +104 -0
- package/dist/pipeline/enterprise/decision-graph-memory.d.ts.map +1 -0
- package/dist/pipeline/enterprise/decision-graph-memory.js +292 -0
- package/dist/pipeline/enterprise/decision-graph-memory.js.map +1 -0
- package/dist/pipeline/enterprise/decision-graph.d.ts +237 -0
- package/dist/pipeline/enterprise/decision-graph.d.ts.map +1 -0
- package/dist/pipeline/enterprise/decision-graph.js +654 -0
- package/dist/pipeline/enterprise/decision-graph.js.map +1 -0
- package/dist/pipeline/enterprise/index.d.ts +40 -0
- package/dist/pipeline/enterprise/index.d.ts.map +1 -0
- package/dist/pipeline/enterprise/index.js +43 -0
- package/dist/pipeline/enterprise/index.js.map +1 -0
- package/dist/pipeline/enterprise/pass-executor.d.ts +33 -0
- package/dist/pipeline/enterprise/pass-executor.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pass-executor.js +459 -0
- package/dist/pipeline/enterprise/pass-executor.js.map +1 -0
- package/dist/pipeline/enterprise/pass-registry.d.ts +19 -0
- package/dist/pipeline/enterprise/pass-registry.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pass-registry.js +243 -0
- package/dist/pipeline/enterprise/pass-registry.js.map +1 -0
- package/dist/pipeline/enterprise/pass2-simulation.d.ts +130 -0
- package/dist/pipeline/enterprise/pass2-simulation.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pass2-simulation.js +691 -0
- package/dist/pipeline/enterprise/pass2-simulation.js.map +1 -0
- package/dist/pipeline/enterprise/pass4-governance.d.ts +195 -0
- package/dist/pipeline/enterprise/pass4-governance.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pass4-governance.js +748 -0
- package/dist/pipeline/enterprise/pass4-governance.js.map +1 -0
- package/dist/pipeline/enterprise/pass5-decision.d.ts +90 -0
- package/dist/pipeline/enterprise/pass5-decision.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pass5-decision.js +487 -0
- package/dist/pipeline/enterprise/pass5-decision.js.map +1 -0
- package/dist/pipeline/enterprise/pass7-observability.d.ts +198 -0
- package/dist/pipeline/enterprise/pass7-observability.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pass7-observability.js +636 -0
- package/dist/pipeline/enterprise/pass7-observability.js.map +1 -0
- package/dist/pipeline/enterprise/pipeline-orchestrator.d.ts +29 -0
- package/dist/pipeline/enterprise/pipeline-orchestrator.d.ts.map +1 -0
- package/dist/pipeline/enterprise/pipeline-orchestrator.js +283 -0
- package/dist/pipeline/enterprise/pipeline-orchestrator.js.map +1 -0
- package/dist/pipeline/enterprise/provenance-tracker.d.ts +135 -0
- package/dist/pipeline/enterprise/provenance-tracker.d.ts.map +1 -0
- package/dist/pipeline/enterprise/provenance-tracker.js +437 -0
- package/dist/pipeline/enterprise/provenance-tracker.js.map +1 -0
- package/dist/pipeline/enterprise/trace-middleware.d.ts +37 -0
- package/dist/pipeline/enterprise/trace-middleware.d.ts.map +1 -0
- package/dist/pipeline/enterprise/trace-middleware.js +188 -0
- package/dist/pipeline/enterprise/trace-middleware.js.map +1 -0
- package/dist/pipeline/enterprise/types.d.ts +199 -0
- package/dist/pipeline/enterprise/types.d.ts.map +1 -0
- package/dist/pipeline/enterprise/types.js +30 -0
- package/dist/pipeline/enterprise/types.js.map +1 -0
- package/dist/pipeline/phase2/phases/adr-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/adr-generator.js +56 -8
- package/dist/pipeline/phase2/phases/adr-generator.js.map +1 -1
- package/dist/pipeline/phase3/phases/test-generator.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/test-generator.js +53 -0
- package/dist/pipeline/phase3/phases/test-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/deployment-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/deployment-generator.js +147 -0
- package/dist/pipeline/phase4/phases/deployment-generator.js.map +1 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.d.ts.map +1 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js +52 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js.map +1 -1
- package/dist/pipeline/phase6/phases/deployment-finalizer.d.ts.map +1 -1
- package/dist/pipeline/phase6/phases/deployment-finalizer.js +226 -0
- package/dist/pipeline/phase6/phases/deployment-finalizer.js.map +1 -1
- package/dist/pipeline/phase6/phases/service-registrar.d.ts +1 -1
- package/dist/pipeline/phase6/phases/service-registrar.d.ts.map +1 -1
- package/dist/pipeline/phase6/phases/service-registrar.js +47 -7
- package/dist/pipeline/phase6/phases/service-registrar.js.map +1 -1
- package/dist/pipeline/swarm-orchestrator.d.ts.map +1 -1
- package/dist/pipeline/swarm-orchestrator.js +47 -19
- package/dist/pipeline/swarm-orchestrator.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DecisionGraph Memory Backend — AgentDB Integration (ADR-033)
|
|
3
|
+
*
|
|
4
|
+
* Syncs DecisionGraph nodes to the AgentDB memory system using the
|
|
5
|
+
* claude-flow CLI. Each node is stored as a memory entry with:
|
|
6
|
+
* - Key: decisiongraph:{execution_id}:{node_id}
|
|
7
|
+
* - Namespace: decisiongraph
|
|
8
|
+
* - Tags: node type, pass number, agent name
|
|
9
|
+
*
|
|
10
|
+
* This module provides:
|
|
11
|
+
* - Push: sync graph nodes to AgentDB
|
|
12
|
+
* - Pull: retrieve nodes from AgentDB into a graph
|
|
13
|
+
* - Search: semantic vector search via AgentDB HNSW
|
|
14
|
+
* - CLI query bridge: format queries for npx @claude-flow/cli
|
|
15
|
+
*
|
|
16
|
+
* Per ADR-033: "The DecisionGraph is stored in the existing AgentDB
|
|
17
|
+
* memory system with HNSW indexing."
|
|
18
|
+
*/
|
|
19
|
+
import type { DecisionGraphNode, DecisionNodeType, PassNumber } from './types.js';
|
|
20
|
+
import { DecisionGraph } from './decision-graph.js';
|
|
21
|
+
/**
|
|
22
|
+
* Generate the canonical AgentDB memory key for a node.
|
|
23
|
+
* Format: decisiongraph:{execution_id}:{node_id}
|
|
24
|
+
*/
|
|
25
|
+
export declare function memoryKey(executionId: string, nodeId: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Generate tags for a node's memory entry.
|
|
28
|
+
* Includes: type, pass, agent domain, agent name, execution.
|
|
29
|
+
*/
|
|
30
|
+
export declare function memoryTags(node: DecisionGraphNode, executionId: string): readonly string[];
|
|
31
|
+
/** Result of a push operation. */
|
|
32
|
+
export interface PushResult {
|
|
33
|
+
readonly nodesStored: number;
|
|
34
|
+
readonly nodesFailed: number;
|
|
35
|
+
readonly errors: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Push all nodes from a DecisionGraph to AgentDB memory.
|
|
39
|
+
* Uses the claude-flow CLI `memory store` command.
|
|
40
|
+
*
|
|
41
|
+
* @param graph - The graph to push.
|
|
42
|
+
* @param options - Push options.
|
|
43
|
+
* @returns Push result with counts and any errors.
|
|
44
|
+
*/
|
|
45
|
+
export declare function pushToMemory(graph: DecisionGraph, options?: {
|
|
46
|
+
readonly verbose?: boolean;
|
|
47
|
+
readonly timeoutMs?: number;
|
|
48
|
+
}): PushResult;
|
|
49
|
+
/** Result of a pull operation. */
|
|
50
|
+
export interface PullResult {
|
|
51
|
+
readonly nodesRetrieved: number;
|
|
52
|
+
readonly nodesFailed: number;
|
|
53
|
+
readonly errors: readonly string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pull nodes from AgentDB memory into a DecisionGraph.
|
|
57
|
+
* Lists all entries in the decisiongraph namespace for the execution ID.
|
|
58
|
+
*
|
|
59
|
+
* @param executionId - The execution ID to pull nodes for.
|
|
60
|
+
* @param outputDir - Output directory for the graph.
|
|
61
|
+
* @param options - Pull options.
|
|
62
|
+
* @returns A new DecisionGraph populated from AgentDB.
|
|
63
|
+
*/
|
|
64
|
+
export declare function pullFromMemory(executionId: string, outputDir: string, options?: {
|
|
65
|
+
readonly verbose?: boolean;
|
|
66
|
+
readonly timeoutMs?: number;
|
|
67
|
+
}): {
|
|
68
|
+
graph: DecisionGraph;
|
|
69
|
+
result: PullResult;
|
|
70
|
+
};
|
|
71
|
+
/** Result of a semantic search. */
|
|
72
|
+
export interface SearchResult {
|
|
73
|
+
readonly nodes: readonly DecisionGraphNode[];
|
|
74
|
+
readonly query: string;
|
|
75
|
+
readonly errors: readonly string[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Search for nodes by semantic similarity using AgentDB HNSW indexing.
|
|
79
|
+
* The query is matched against node summaries.
|
|
80
|
+
*
|
|
81
|
+
* @param query - Natural language search query.
|
|
82
|
+
* @param executionId - Scope search to a specific execution (optional).
|
|
83
|
+
* @param options - Search options.
|
|
84
|
+
*/
|
|
85
|
+
export declare function searchMemory(query: string, executionId?: string, options?: {
|
|
86
|
+
readonly limit?: number;
|
|
87
|
+
readonly timeoutMs?: number;
|
|
88
|
+
}): SearchResult;
|
|
89
|
+
/**
|
|
90
|
+
* Generate a CLI command string for querying the DecisionGraph via
|
|
91
|
+
* the claude-flow memory system. Does NOT execute — returns the command.
|
|
92
|
+
*
|
|
93
|
+
* Per ADR-033's querying section.
|
|
94
|
+
*/
|
|
95
|
+
export declare function buildMemoryQuery(params: {
|
|
96
|
+
action: 'list' | 'search' | 'retrieve';
|
|
97
|
+
executionId?: string;
|
|
98
|
+
nodeId?: string;
|
|
99
|
+
type?: DecisionNodeType;
|
|
100
|
+
pass?: PassNumber;
|
|
101
|
+
query?: string;
|
|
102
|
+
limit?: number;
|
|
103
|
+
}): string;
|
|
104
|
+
//# sourceMappingURL=decision-graph-memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-graph-memory.d.ts","sourceRoot":"","sources":["../../../src/pipeline/enterprise/decision-graph-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAapD;;;GAGG;AACH,wBAAgB,SAAS,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,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACjE,YAAY,CA6Bd;AAMD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACvC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,CAiCT"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DecisionGraph Memory Backend — AgentDB Integration (ADR-033)
|
|
3
|
+
*
|
|
4
|
+
* Syncs DecisionGraph nodes to the AgentDB memory system using the
|
|
5
|
+
* claude-flow CLI. Each node is stored as a memory entry with:
|
|
6
|
+
* - Key: decisiongraph:{execution_id}:{node_id}
|
|
7
|
+
* - Namespace: decisiongraph
|
|
8
|
+
* - Tags: node type, pass number, agent name
|
|
9
|
+
*
|
|
10
|
+
* This module provides:
|
|
11
|
+
* - Push: sync graph nodes to AgentDB
|
|
12
|
+
* - Pull: retrieve nodes from AgentDB into a graph
|
|
13
|
+
* - Search: semantic vector search via AgentDB HNSW
|
|
14
|
+
* - CLI query bridge: format queries for npx @claude-flow/cli
|
|
15
|
+
*
|
|
16
|
+
* Per ADR-033: "The DecisionGraph is stored in the existing AgentDB
|
|
17
|
+
* memory system with HNSW indexing."
|
|
18
|
+
*/
|
|
19
|
+
import { execSync } from 'node:child_process';
|
|
20
|
+
import { DecisionGraph } from './decision-graph.js';
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// Constants
|
|
23
|
+
// ============================================================================
|
|
24
|
+
const NAMESPACE = 'decisiongraph';
|
|
25
|
+
const CLI_CMD = 'npx @claude-flow/cli@latest';
|
|
26
|
+
// ============================================================================
|
|
27
|
+
// Key Format
|
|
28
|
+
// ============================================================================
|
|
29
|
+
/**
|
|
30
|
+
* Generate the canonical AgentDB memory key for a node.
|
|
31
|
+
* Format: decisiongraph:{execution_id}:{node_id}
|
|
32
|
+
*/
|
|
33
|
+
export function memoryKey(executionId, nodeId) {
|
|
34
|
+
return `${NAMESPACE}:${executionId}:${nodeId}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generate tags for a node's memory entry.
|
|
38
|
+
* Includes: type, pass, agent domain, agent name, execution.
|
|
39
|
+
*/
|
|
40
|
+
export function memoryTags(node, executionId) {
|
|
41
|
+
return [
|
|
42
|
+
`type:${node.type}`,
|
|
43
|
+
`pass:${node.pass}`,
|
|
44
|
+
`domain:${node.producedBy.domain}`,
|
|
45
|
+
`agent:${node.producedBy.agent}`,
|
|
46
|
+
`execution:${executionId}`,
|
|
47
|
+
`status:${node.status}`,
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Push all nodes from a DecisionGraph to AgentDB memory.
|
|
52
|
+
* Uses the claude-flow CLI `memory store` command.
|
|
53
|
+
*
|
|
54
|
+
* @param graph - The graph to push.
|
|
55
|
+
* @param options - Push options.
|
|
56
|
+
* @returns Push result with counts and any errors.
|
|
57
|
+
*/
|
|
58
|
+
export function pushToMemory(graph, options) {
|
|
59
|
+
const executionId = graph.getExecutionId();
|
|
60
|
+
const nodes = graph.getAllNodes();
|
|
61
|
+
let stored = 0;
|
|
62
|
+
let failed = 0;
|
|
63
|
+
const errors = [];
|
|
64
|
+
const timeout = options?.timeoutMs ?? 10_000;
|
|
65
|
+
for (const node of nodes) {
|
|
66
|
+
const key = memoryKey(executionId, node.id);
|
|
67
|
+
const tags = memoryTags(node, executionId);
|
|
68
|
+
const value = JSON.stringify({
|
|
69
|
+
...node,
|
|
70
|
+
_memoryKey: key,
|
|
71
|
+
_namespace: NAMESPACE,
|
|
72
|
+
});
|
|
73
|
+
try {
|
|
74
|
+
const tagsArg = tags.join(',');
|
|
75
|
+
execSync(`${CLI_CMD} memory store --key "${key}" --value '${escapeSingleQuotes(value)}' --namespace ${NAMESPACE} --tags "${tagsArg}"`, { encoding: 'utf-8', timeout, stdio: 'pipe' });
|
|
76
|
+
stored++;
|
|
77
|
+
if (options?.verbose) {
|
|
78
|
+
console.error(` [AgentDB] Stored: ${key}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
failed++;
|
|
83
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
84
|
+
errors.push(`Failed to store ${key}: ${message}`);
|
|
85
|
+
if (options?.verbose) {
|
|
86
|
+
console.error(` [AgentDB] Failed: ${key} — ${message}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return { nodesStored: stored, nodesFailed: failed, errors };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Pull nodes from AgentDB memory into a DecisionGraph.
|
|
94
|
+
* Lists all entries in the decisiongraph namespace for the execution ID.
|
|
95
|
+
*
|
|
96
|
+
* @param executionId - The execution ID to pull nodes for.
|
|
97
|
+
* @param outputDir - Output directory for the graph.
|
|
98
|
+
* @param options - Pull options.
|
|
99
|
+
* @returns A new DecisionGraph populated from AgentDB.
|
|
100
|
+
*/
|
|
101
|
+
export function pullFromMemory(executionId, outputDir, options) {
|
|
102
|
+
const graph = new DecisionGraph(executionId, outputDir);
|
|
103
|
+
const timeout = options?.timeoutMs ?? 10_000;
|
|
104
|
+
let retrieved = 0;
|
|
105
|
+
let failed = 0;
|
|
106
|
+
const errors = [];
|
|
107
|
+
try {
|
|
108
|
+
const raw = execSync(`${CLI_CMD} memory list --namespace ${NAMESPACE} --limit 1000`, { encoding: 'utf-8', timeout, stdio: 'pipe' });
|
|
109
|
+
// Parse the output (may be JSON or newline-delimited)
|
|
110
|
+
const entries = parseMemoryListOutput(raw, executionId);
|
|
111
|
+
for (const entry of entries) {
|
|
112
|
+
try {
|
|
113
|
+
const nodeData = JSON.parse(entry.value);
|
|
114
|
+
graph.addNode(nodeData);
|
|
115
|
+
retrieved++;
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
failed++;
|
|
119
|
+
errors.push(`Failed to parse node: ${err instanceof Error ? err.message : String(err)}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
125
|
+
errors.push(`Failed to list memory entries: ${message}`);
|
|
126
|
+
}
|
|
127
|
+
return { graph, result: { nodesRetrieved: retrieved, nodesFailed: failed, errors } };
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Search for nodes by semantic similarity using AgentDB HNSW indexing.
|
|
131
|
+
* The query is matched against node summaries.
|
|
132
|
+
*
|
|
133
|
+
* @param query - Natural language search query.
|
|
134
|
+
* @param executionId - Scope search to a specific execution (optional).
|
|
135
|
+
* @param options - Search options.
|
|
136
|
+
*/
|
|
137
|
+
export function searchMemory(query, executionId, options) {
|
|
138
|
+
const limit = options?.limit ?? 10;
|
|
139
|
+
const timeout = options?.timeoutMs ?? 10_000;
|
|
140
|
+
const errors = [];
|
|
141
|
+
const nodes = [];
|
|
142
|
+
try {
|
|
143
|
+
let cmd = `${CLI_CMD} memory search --query "${escapeDQ(query)}" --namespace ${NAMESPACE} --limit ${limit}`;
|
|
144
|
+
if (executionId) {
|
|
145
|
+
cmd += ` --tags "execution:${executionId}"`;
|
|
146
|
+
}
|
|
147
|
+
const raw = execSync(cmd, { encoding: 'utf-8', timeout, stdio: 'pipe' });
|
|
148
|
+
const entries = parseMemorySearchOutput(raw);
|
|
149
|
+
for (const entry of entries) {
|
|
150
|
+
try {
|
|
151
|
+
const nodeData = JSON.parse(entry);
|
|
152
|
+
nodes.push(nodeData);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
// Skip unparseable entries
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch (err) {
|
|
160
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
161
|
+
errors.push(`Search failed: ${message}`);
|
|
162
|
+
}
|
|
163
|
+
return { nodes, query, errors };
|
|
164
|
+
}
|
|
165
|
+
// ============================================================================
|
|
166
|
+
// CLI Query Bridge — Format Queries for claude-flow CLI
|
|
167
|
+
// ============================================================================
|
|
168
|
+
/**
|
|
169
|
+
* Generate a CLI command string for querying the DecisionGraph via
|
|
170
|
+
* the claude-flow memory system. Does NOT execute — returns the command.
|
|
171
|
+
*
|
|
172
|
+
* Per ADR-033's querying section.
|
|
173
|
+
*/
|
|
174
|
+
export function buildMemoryQuery(params) {
|
|
175
|
+
switch (params.action) {
|
|
176
|
+
case 'list': {
|
|
177
|
+
let cmd = `${CLI_CMD} memory list --namespace ${NAMESPACE}`;
|
|
178
|
+
const tags = [];
|
|
179
|
+
if (params.executionId)
|
|
180
|
+
tags.push(`execution:${params.executionId}`);
|
|
181
|
+
if (params.type)
|
|
182
|
+
tags.push(`type:${params.type}`);
|
|
183
|
+
if (params.pass !== undefined)
|
|
184
|
+
tags.push(`pass:${params.pass}`);
|
|
185
|
+
if (tags.length > 0)
|
|
186
|
+
cmd += ` --tags "${tags.join(',')}"`;
|
|
187
|
+
if (params.limit)
|
|
188
|
+
cmd += ` --limit ${params.limit}`;
|
|
189
|
+
return cmd;
|
|
190
|
+
}
|
|
191
|
+
case 'search': {
|
|
192
|
+
if (!params.query)
|
|
193
|
+
throw new Error('Query parameter is required for search');
|
|
194
|
+
let cmd = `${CLI_CMD} memory search --query "${escapeDQ(params.query)}" --namespace ${NAMESPACE}`;
|
|
195
|
+
if (params.executionId)
|
|
196
|
+
cmd += ` --tags "execution:${params.executionId}"`;
|
|
197
|
+
if (params.type)
|
|
198
|
+
cmd += ` --tags "type:${params.type}"`;
|
|
199
|
+
if (params.limit)
|
|
200
|
+
cmd += ` --limit ${params.limit}`;
|
|
201
|
+
return cmd;
|
|
202
|
+
}
|
|
203
|
+
case 'retrieve': {
|
|
204
|
+
if (!params.executionId || !params.nodeId) {
|
|
205
|
+
throw new Error('Both executionId and nodeId are required for retrieve');
|
|
206
|
+
}
|
|
207
|
+
const key = memoryKey(params.executionId, params.nodeId);
|
|
208
|
+
return `${CLI_CMD} memory retrieve --key "${key}" --namespace ${NAMESPACE}`;
|
|
209
|
+
}
|
|
210
|
+
default:
|
|
211
|
+
throw new Error(`Unknown action: ${params.action}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/** Parse `memory list` CLI output into key-value entries. */
|
|
215
|
+
function parseMemoryListOutput(raw, executionId) {
|
|
216
|
+
const entries = [];
|
|
217
|
+
const prefix = `${NAMESPACE}:${executionId}:`;
|
|
218
|
+
// Try JSON array first
|
|
219
|
+
try {
|
|
220
|
+
const parsed = JSON.parse(raw);
|
|
221
|
+
if (Array.isArray(parsed)) {
|
|
222
|
+
for (const item of parsed) {
|
|
223
|
+
if (typeof item === 'object' && item !== null) {
|
|
224
|
+
const key = String(item.key ?? '');
|
|
225
|
+
const value = typeof item.value === 'string' ? item.value : JSON.stringify(item.value ?? item);
|
|
226
|
+
if (key.startsWith(prefix) || !executionId) {
|
|
227
|
+
entries.push({ key, value });
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return entries;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
// Not JSON — try line-based parsing
|
|
236
|
+
}
|
|
237
|
+
// Line-based: each line might be a key or JSON object
|
|
238
|
+
for (const line of raw.split('\n')) {
|
|
239
|
+
const trimmed = line.trim();
|
|
240
|
+
if (!trimmed)
|
|
241
|
+
continue;
|
|
242
|
+
if (trimmed.startsWith(prefix) || trimmed.startsWith('{')) {
|
|
243
|
+
try {
|
|
244
|
+
const parsed = JSON.parse(trimmed);
|
|
245
|
+
entries.push({
|
|
246
|
+
key: String(parsed.key ?? ''),
|
|
247
|
+
value: typeof parsed.value === 'string' ? parsed.value : JSON.stringify(parsed),
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// Skip non-parseable lines
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return entries;
|
|
256
|
+
}
|
|
257
|
+
/** Parse `memory search` CLI output into value strings. */
|
|
258
|
+
function parseMemorySearchOutput(raw) {
|
|
259
|
+
const results = [];
|
|
260
|
+
try {
|
|
261
|
+
const parsed = JSON.parse(raw);
|
|
262
|
+
if (Array.isArray(parsed)) {
|
|
263
|
+
for (const item of parsed) {
|
|
264
|
+
const value = typeof item === 'string' ? item
|
|
265
|
+
: typeof item.value === 'string' ? item.value
|
|
266
|
+
: JSON.stringify(item);
|
|
267
|
+
results.push(value);
|
|
268
|
+
}
|
|
269
|
+
return results;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
// Not JSON
|
|
274
|
+
}
|
|
275
|
+
for (const line of raw.split('\n')) {
|
|
276
|
+
const trimmed = line.trim();
|
|
277
|
+
if (trimmed && trimmed.startsWith('{')) {
|
|
278
|
+
results.push(trimmed);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return results;
|
|
282
|
+
}
|
|
283
|
+
// ============================================================================
|
|
284
|
+
// String Helpers
|
|
285
|
+
// ============================================================================
|
|
286
|
+
function escapeSingleQuotes(s) {
|
|
287
|
+
return s.replace(/'/g, "'\\''");
|
|
288
|
+
}
|
|
289
|
+
function escapeDQ(s) {
|
|
290
|
+
return s.replace(/"/g, '\\"');
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=decision-graph-memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-graph-memory.js","sourceRoot":"","sources":["../../../src/pipeline/enterprise/decision-graph-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,SAAS,GAAG,eAAe,CAAC;AAClC,MAAM,OAAO,GAAG,6BAA6B,CAAC;AAE9C,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,WAAmB,EAAE,MAAc;IAC3D,OAAO,GAAG,SAAS,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,IAAuB,EAAE,WAAmB;IACrE,OAAO;QACL,QAAQ,IAAI,CAAC,IAAI,EAAE;QACnB,QAAQ,IAAI,CAAC,IAAI,EAAE;QACnB,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;QAClC,SAAS,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;QAChC,aAAa,WAAW,EAAE;QAC1B,UAAU,IAAI,CAAC,MAAM,EAAE;KACxB,CAAC;AACJ,CAAC;AAaD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAoB,EACpB,OAAqE;IAErE,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAClC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,OAAO,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CAAC;AAClC,CAAC;AAED,SAAS,QAAQ,CAAC,CAAS;IACzB,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DecisionGraph — Unified Data Model (ADR-033)
|
|
3
|
+
*
|
|
4
|
+
* Canonical shared data model for every pipeline execution.
|
|
5
|
+
* A directed acyclic graph (DAG) where nodes are data artifacts
|
|
6
|
+
* and edges represent derivation relationships.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Typed node/edge CRUD with schema validation
|
|
10
|
+
* - Append-only version history (originals preserved)
|
|
11
|
+
* - Automatic edge creation from derivedFrom references
|
|
12
|
+
* - Graph lifecycle management (created → accumulated → sealed)
|
|
13
|
+
* - Compound querying with pagination
|
|
14
|
+
* - Semantic search on summary fields
|
|
15
|
+
* - JSON file persistence + AgentDB memory sync
|
|
16
|
+
* - Concurrent-safe writes via monotonic timestamps
|
|
17
|
+
* - Statistics and metrics aggregation
|
|
18
|
+
*/
|
|
19
|
+
import type { DecisionGraphNode, DecisionGraphEdge, DecisionNodeType, EdgeRelation, PassNumber, AgentRef } from './types.js';
|
|
20
|
+
/** All valid DecisionNodeType values as a runtime-accessible object. */
|
|
21
|
+
export declare const DECISION_NODE_TYPES: {
|
|
22
|
+
readonly PROBLEM_DEFINITION: "problem_definition";
|
|
23
|
+
readonly BUSINESS_CONTEXT: "business_context";
|
|
24
|
+
readonly TECHNICAL_SCOPE: "technical_scope";
|
|
25
|
+
readonly ARCHITECTURE_HYPOTHESIS: "architecture_hypothesis";
|
|
26
|
+
readonly EXECUTION_PLAN: "execution_plan";
|
|
27
|
+
readonly DECISION_LINEAGE: "decision_lineage";
|
|
28
|
+
readonly SCENARIO: "scenario";
|
|
29
|
+
readonly RISK_SIGNAL: "risk_signal";
|
|
30
|
+
readonly RELIABILITY_REPORT: "reliability_report";
|
|
31
|
+
readonly SYSTEM_ARCHITECTURE: "system_architecture";
|
|
32
|
+
readonly INTEGRATION_MAP: "integration_map";
|
|
33
|
+
readonly DATA_FLOW: "data_flow";
|
|
34
|
+
readonly SERVICE_BOUNDARY: "service_boundary";
|
|
35
|
+
readonly PROTOTYPE: "prototype";
|
|
36
|
+
readonly API_CONTRACT: "api_contract";
|
|
37
|
+
readonly SDK_INTERFACE: "sdk_interface";
|
|
38
|
+
readonly SECURITY_ANALYSIS: "security_analysis";
|
|
39
|
+
readonly COMPLIANCE_REPORT: "compliance_report";
|
|
40
|
+
readonly COST_MODEL: "cost_model";
|
|
41
|
+
readonly GOVERNANCE_REPORT: "governance_report";
|
|
42
|
+
readonly POLICY_ANALYSIS: "policy_analysis";
|
|
43
|
+
readonly EXECUTIVE_MEMO: "executive_memo";
|
|
44
|
+
readonly EXECUTIVE_SUMMARY: "executive_summary";
|
|
45
|
+
readonly RISK_ASSESSMENT: "risk_assessment";
|
|
46
|
+
readonly IMPLEMENTATION_ROADMAP: "implementation_roadmap";
|
|
47
|
+
readonly ORG_IMPACT: "org_impact";
|
|
48
|
+
readonly STAKEHOLDER_MAP: "stakeholder_map";
|
|
49
|
+
readonly KPI_DEFINITION: "kpi_definition";
|
|
50
|
+
readonly OKR_ALIGNMENT: "okr_alignment";
|
|
51
|
+
readonly RAID_LOG: "raid_log";
|
|
52
|
+
readonly CONFIDENCE_SCORE: "confidence_score";
|
|
53
|
+
readonly DEPLOYMENT_ENDPOINT: "deployment_endpoint";
|
|
54
|
+
readonly INTEGRATION_RESULT: "integration_result";
|
|
55
|
+
readonly TELEMETRY_CONFIG: "telemetry_config";
|
|
56
|
+
readonly HEALTH_CHECK: "health_check";
|
|
57
|
+
readonly LEARNED_PATTERN: "learned_pattern";
|
|
58
|
+
readonly PROVENANCE_MANIFEST: "provenance_manifest";
|
|
59
|
+
};
|
|
60
|
+
/** Set of all valid node type values for runtime validation. */
|
|
61
|
+
export declare const VALID_NODE_TYPES: ReadonlySet<string>;
|
|
62
|
+
/** All valid EdgeRelation values as a runtime-accessible object. */
|
|
63
|
+
export declare const EDGE_RELATIONS: {
|
|
64
|
+
readonly DERIVED_FROM: "derived_from";
|
|
65
|
+
readonly INFORMS: "informs";
|
|
66
|
+
readonly VALIDATES: "validates";
|
|
67
|
+
readonly SUPERSEDES: "supersedes";
|
|
68
|
+
readonly AGGREGATES: "aggregates";
|
|
69
|
+
};
|
|
70
|
+
/** Set of all valid edge relation values for runtime validation. */
|
|
71
|
+
export declare const VALID_EDGE_RELATIONS: ReadonlySet<string>;
|
|
72
|
+
/** Lifecycle states for the DecisionGraph. */
|
|
73
|
+
export type GraphLifecycle = 'created' | 'accumulated' | 'sealed' | 'queryable';
|
|
74
|
+
/** A snapshot of a node at a specific version. */
|
|
75
|
+
export interface NodeVersionEntry {
|
|
76
|
+
readonly version: number;
|
|
77
|
+
readonly timestamp: string;
|
|
78
|
+
readonly content: Record<string, unknown>;
|
|
79
|
+
readonly summary: string;
|
|
80
|
+
readonly status: DecisionGraphNode['status'];
|
|
81
|
+
readonly confidence: number;
|
|
82
|
+
}
|
|
83
|
+
/** Compound query filter for nodes. */
|
|
84
|
+
export interface NodeQuery {
|
|
85
|
+
readonly type?: DecisionNodeType;
|
|
86
|
+
readonly pass?: PassNumber;
|
|
87
|
+
readonly tag?: string;
|
|
88
|
+
readonly status?: DecisionGraphNode['status'];
|
|
89
|
+
readonly domain?: string;
|
|
90
|
+
readonly agent?: string;
|
|
91
|
+
readonly minConfidence?: number;
|
|
92
|
+
}
|
|
93
|
+
/** Pagination options for query results. */
|
|
94
|
+
export interface PaginationOptions {
|
|
95
|
+
readonly offset?: number;
|
|
96
|
+
readonly limit?: number;
|
|
97
|
+
}
|
|
98
|
+
/** Paginated query result. */
|
|
99
|
+
export interface PaginatedResult<T> {
|
|
100
|
+
readonly items: readonly T[];
|
|
101
|
+
readonly total: number;
|
|
102
|
+
readonly offset: number;
|
|
103
|
+
readonly limit: number;
|
|
104
|
+
readonly hasMore: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** Aggregate statistics for the graph. */
|
|
107
|
+
export interface GraphStatistics {
|
|
108
|
+
readonly executionId: string;
|
|
109
|
+
readonly lifecycle: GraphLifecycle;
|
|
110
|
+
readonly nodeCount: number;
|
|
111
|
+
readonly edgeCount: number;
|
|
112
|
+
readonly nodesByPass: Readonly<Record<number, number>>;
|
|
113
|
+
readonly nodesByType: Readonly<Record<string, number>>;
|
|
114
|
+
readonly nodesByStatus: Readonly<Record<string, number>>;
|
|
115
|
+
readonly averageConfidence: number;
|
|
116
|
+
readonly completenessRatio: number;
|
|
117
|
+
}
|
|
118
|
+
/** Structured node validation error. */
|
|
119
|
+
export interface NodeValidationError {
|
|
120
|
+
readonly field: string;
|
|
121
|
+
readonly message: string;
|
|
122
|
+
}
|
|
123
|
+
export declare class DecisionGraph {
|
|
124
|
+
private readonly nodes;
|
|
125
|
+
private readonly edges;
|
|
126
|
+
private readonly versionHistory;
|
|
127
|
+
private readonly executionId;
|
|
128
|
+
private readonly outputDir;
|
|
129
|
+
private lifecycle;
|
|
130
|
+
private writeSequence;
|
|
131
|
+
constructor(executionId: string, outputDir: string);
|
|
132
|
+
/** Get the execution ID. */
|
|
133
|
+
getExecutionId(): string;
|
|
134
|
+
/** Get the current lifecycle state. */
|
|
135
|
+
getLifecycle(): GraphLifecycle;
|
|
136
|
+
/** Transition to accumulated state (called after first node beyond root). */
|
|
137
|
+
markAccumulated(): void;
|
|
138
|
+
/** Seal the graph — no further writes allowed. */
|
|
139
|
+
seal(): void;
|
|
140
|
+
/** Mark as queryable — sealed + available for external queries. */
|
|
141
|
+
markQueryable(): void;
|
|
142
|
+
/** Check if the graph accepts writes. */
|
|
143
|
+
isWritable(): boolean;
|
|
144
|
+
/** Generate a new unique node ID. */
|
|
145
|
+
generateNodeId(): string;
|
|
146
|
+
/**
|
|
147
|
+
* Generate the canonical AgentDB memory key for a node.
|
|
148
|
+
* Format: decisiongraph:{execution_id}:{node_id}
|
|
149
|
+
*/
|
|
150
|
+
memoryKey(nodeId: string): string;
|
|
151
|
+
/** Validate a node against the schema. Returns errors (empty = valid). */
|
|
152
|
+
validateNode(node: DecisionGraphNode): readonly NodeValidationError[];
|
|
153
|
+
/** Add a validated node to the graph. Throws on validation failure. */
|
|
154
|
+
addNode(node: DecisionGraphNode): void;
|
|
155
|
+
/**
|
|
156
|
+
* Update an existing node (ADR-033: append-only history).
|
|
157
|
+
* Original content is preserved in version history.
|
|
158
|
+
* Increments version and updates timestamp.
|
|
159
|
+
*/
|
|
160
|
+
updateNode(nodeId: string, updates: Partial<Pick<DecisionGraphNode, 'content' | 'summary' | 'status' | 'confidence' | 'tags'>>): DecisionGraphNode;
|
|
161
|
+
/** Get a node by ID. Returns undefined if not found. */
|
|
162
|
+
getNode(nodeId: string): DecisionGraphNode | undefined;
|
|
163
|
+
/** Get all nodes of a specific type. */
|
|
164
|
+
getNodesByType(type: DecisionNodeType): readonly DecisionGraphNode[];
|
|
165
|
+
/** Get all nodes from a specific pass. */
|
|
166
|
+
getNodesByPass(pass: PassNumber): readonly DecisionGraphNode[];
|
|
167
|
+
/** Get all nodes produced by a specific agent. */
|
|
168
|
+
getNodesByAgent(domain: string, agent: string): readonly DecisionGraphNode[];
|
|
169
|
+
/** Get all nodes matching a tag. */
|
|
170
|
+
getNodesByTag(tag: string): readonly DecisionGraphNode[];
|
|
171
|
+
/** Get total node count. */
|
|
172
|
+
get nodeCount(): number;
|
|
173
|
+
/** Get total edge count. */
|
|
174
|
+
get edgeCount(): number;
|
|
175
|
+
/** Get all nodes as an array. */
|
|
176
|
+
getAllNodes(): readonly DecisionGraphNode[];
|
|
177
|
+
/** Get all edges as an array. */
|
|
178
|
+
getAllEdges(): readonly DecisionGraphEdge[];
|
|
179
|
+
/**
|
|
180
|
+
* Query nodes with compound filters and optional pagination.
|
|
181
|
+
* All filter fields are ANDed together.
|
|
182
|
+
*/
|
|
183
|
+
queryNodes(filter: NodeQuery, pagination?: PaginationOptions): PaginatedResult<DecisionGraphNode>;
|
|
184
|
+
/**
|
|
185
|
+
* Search nodes by text similarity on the summary field.
|
|
186
|
+
* Uses simple token overlap scoring (production systems would use
|
|
187
|
+
* vector embeddings via AgentDB HNSW — this provides the interface).
|
|
188
|
+
*/
|
|
189
|
+
searchBySummary(query: string, topK?: number): readonly DecisionGraphNode[];
|
|
190
|
+
/** Add an edge to the graph with validation. */
|
|
191
|
+
addEdge(from: string, to: string, relation: EdgeRelation): void;
|
|
192
|
+
/** Get all edges from a specific node. */
|
|
193
|
+
getEdgesFrom(nodeId: string): readonly DecisionGraphEdge[];
|
|
194
|
+
/** Get all edges to a specific node. */
|
|
195
|
+
getEdgesTo(nodeId: string): readonly DecisionGraphEdge[];
|
|
196
|
+
/** Get all edges with a specific relation. */
|
|
197
|
+
getEdgesByRelation(relation: EdgeRelation): readonly DecisionGraphEdge[];
|
|
198
|
+
/** Get the full derivation chain for a node (all ancestors, depth-first). */
|
|
199
|
+
getDerivationChain(nodeId: string): readonly DecisionGraphNode[];
|
|
200
|
+
/** Get the immediate children of a node (nodes that derive from it). */
|
|
201
|
+
getChildren(nodeId: string): readonly DecisionGraphNode[];
|
|
202
|
+
/** Get the full version history for a node. */
|
|
203
|
+
getVersionHistory(nodeId: string): readonly NodeVersionEntry[];
|
|
204
|
+
/** Get a specific version of a node's content. */
|
|
205
|
+
getNodeAtVersion(nodeId: string, version: number): NodeVersionEntry | undefined;
|
|
206
|
+
/** Create and add a node with minimal boilerplate. Auto-tags with pass/type/agent. */
|
|
207
|
+
createNode(params: {
|
|
208
|
+
type: DecisionNodeType;
|
|
209
|
+
name: string;
|
|
210
|
+
content: Record<string, unknown>;
|
|
211
|
+
summary: string;
|
|
212
|
+
producedBy: AgentRef;
|
|
213
|
+
pass: PassNumber;
|
|
214
|
+
derivedFrom?: readonly string[];
|
|
215
|
+
confidence?: number;
|
|
216
|
+
status?: DecisionGraphNode['status'];
|
|
217
|
+
tags?: readonly string[];
|
|
218
|
+
}): DecisionGraphNode;
|
|
219
|
+
/** Compute aggregate statistics for the graph. */
|
|
220
|
+
getStatistics(): GraphStatistics;
|
|
221
|
+
/** Serialize the graph to JSON (includes version history). */
|
|
222
|
+
toJSON(): {
|
|
223
|
+
executionId: string;
|
|
224
|
+
lifecycle: GraphLifecycle;
|
|
225
|
+
nodes: DecisionGraphNode[];
|
|
226
|
+
edges: DecisionGraphEdge[];
|
|
227
|
+
versionHistory: Record<string, NodeVersionEntry[]>;
|
|
228
|
+
writeSequence: number;
|
|
229
|
+
};
|
|
230
|
+
/** Persist the graph to the output directory. */
|
|
231
|
+
persist(): string;
|
|
232
|
+
/** Load a previously persisted graph (rehydrates lifecycle, history, sequence). */
|
|
233
|
+
static load(executionId: string, outputDir: string): DecisionGraph;
|
|
234
|
+
/** Generate a human-readable summary of the graph. */
|
|
235
|
+
summarize(): string;
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=decision-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-graph.d.ts","sourceRoot":"","sources":["../../../src/pipeline/enterprise/decision-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,QAAQ,EACT,MAAM,YAAY,CAAC;AAMpB,wEAAwE;AACxE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CtB,CAAC;AAEX,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAEhD,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAEpD,CAAC;AAMF,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,aAAa,GACb,QAAQ,GAC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