@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,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Resolver — Agent-to-Source-Code Mapping (ADR-039)
|
|
3
|
+
*
|
|
4
|
+
* Maps agent identifiers to their source code provenance:
|
|
5
|
+
* - Package registry lookup (domain → npm package)
|
|
6
|
+
* - Git context (commit hash from working directory)
|
|
7
|
+
* - Entry point mapping (agent type → source file)
|
|
8
|
+
* - Dependency resolution (key runtime dependencies)
|
|
9
|
+
*
|
|
10
|
+
* For agents built into the CLI, provenance points to the CLI's own
|
|
11
|
+
* package and specific source module.
|
|
12
|
+
*/
|
|
13
|
+
import { execSync } from 'node:child_process';
|
|
14
|
+
import * as fs from 'node:fs';
|
|
15
|
+
import * as path from 'node:path';
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Agent → Package Registry
|
|
18
|
+
// ============================================================================
|
|
19
|
+
/** Maps agent domains to their npm package names. */
|
|
20
|
+
const DOMAIN_PACKAGE_MAP = {
|
|
21
|
+
'copilot': '@agentics/copilot',
|
|
22
|
+
'simulator': '@agentics/simulator',
|
|
23
|
+
'sentinel': '@agentics/sentinel',
|
|
24
|
+
'test-bench': '@agentics/test-bench',
|
|
25
|
+
'shield': '@agentics/shield',
|
|
26
|
+
'policy-engine': '@agentics/policy-engine',
|
|
27
|
+
'costops': '@agentics/costops',
|
|
28
|
+
'governance-dashboard': '@agentics/governance-dashboard',
|
|
29
|
+
'orchestrator': '@agentics/orchestrator',
|
|
30
|
+
'forge': '@agentics/forge',
|
|
31
|
+
'connector-hub': '@agentics/connector-hub',
|
|
32
|
+
'observatory': '@agentics/observatory',
|
|
33
|
+
'latency-lens': '@agentics/latency-lens',
|
|
34
|
+
'incident-manager': '@agentics/incident-manager',
|
|
35
|
+
'memory-graph': '@agentics/memory-graph',
|
|
36
|
+
'auto-optimizer': '@agentics/auto-optimizer',
|
|
37
|
+
'edge': '@agentics/edge',
|
|
38
|
+
'registry': '@agentics/registry',
|
|
39
|
+
'marketplace': '@agentics/marketplace',
|
|
40
|
+
'analytics-hub': '@agentics/analytics-hub',
|
|
41
|
+
'config-manager': '@agentics/config-manager',
|
|
42
|
+
'schema-registry': '@agentics/schema-registry',
|
|
43
|
+
'benchmark-exchange': '@agentics/benchmark-exchange',
|
|
44
|
+
'inference-gateway': '@agentics/inference-gateway',
|
|
45
|
+
'data-vault': '@agentics/data-vault',
|
|
46
|
+
'research-lab': '@agentics/research-lab',
|
|
47
|
+
'platform': '@agentics/platform',
|
|
48
|
+
// Internal pipeline agents
|
|
49
|
+
'pipeline': '@llm-dev-ops/agentics-cli',
|
|
50
|
+
};
|
|
51
|
+
/** Maps agent domains to their repository URLs. */
|
|
52
|
+
const DOMAIN_REPO_MAP = {
|
|
53
|
+
'pipeline': 'https://github.com/ruvnet/agentics-cli',
|
|
54
|
+
};
|
|
55
|
+
const DEFAULT_REPO = 'https://github.com/ruvnet/agentics-cli';
|
|
56
|
+
// ============================================================================
|
|
57
|
+
// Git Context Cache
|
|
58
|
+
// ============================================================================
|
|
59
|
+
let cachedCommitHash;
|
|
60
|
+
let cachedCLIVersion;
|
|
61
|
+
/** Resolve the current git commit hash (cached, best effort). */
|
|
62
|
+
export function resolveGitCommit() {
|
|
63
|
+
if (cachedCommitHash !== undefined)
|
|
64
|
+
return cachedCommitHash;
|
|
65
|
+
try {
|
|
66
|
+
cachedCommitHash = execSync('git rev-parse HEAD', {
|
|
67
|
+
encoding: 'utf-8',
|
|
68
|
+
timeout: 5000,
|
|
69
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
70
|
+
}).trim();
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
cachedCommitHash = 'unknown';
|
|
74
|
+
}
|
|
75
|
+
return cachedCommitHash;
|
|
76
|
+
}
|
|
77
|
+
/** Resolve the CLI package version (cached, best effort). */
|
|
78
|
+
export function resolveCLIVersion() {
|
|
79
|
+
if (cachedCLIVersion !== undefined)
|
|
80
|
+
return cachedCLIVersion;
|
|
81
|
+
try {
|
|
82
|
+
const pkgPath = path.resolve(__dirname, '../../../package.json');
|
|
83
|
+
if (fs.existsSync(pkgPath)) {
|
|
84
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
85
|
+
cachedCLIVersion = pkg.version ?? '0.0.0';
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
cachedCLIVersion = '0.0.0';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
cachedCLIVersion = '0.0.0';
|
|
93
|
+
}
|
|
94
|
+
return cachedCLIVersion;
|
|
95
|
+
}
|
|
96
|
+
/** Clear the cached values (for testing). */
|
|
97
|
+
export function clearResolverCache() {
|
|
98
|
+
cachedCommitHash = undefined;
|
|
99
|
+
cachedCLIVersion = undefined;
|
|
100
|
+
}
|
|
101
|
+
// ============================================================================
|
|
102
|
+
// Code Resolver
|
|
103
|
+
// ============================================================================
|
|
104
|
+
/**
|
|
105
|
+
* Resolve the code provenance for an agent.
|
|
106
|
+
*
|
|
107
|
+
* Uses the domain→package registry to determine the npm package,
|
|
108
|
+
* then resolves the git commit, entry point, and dependencies.
|
|
109
|
+
*/
|
|
110
|
+
export function resolveCodeProvenance(agent) {
|
|
111
|
+
const pkg = DOMAIN_PACKAGE_MAP[agent.domain] ?? `@agentics/${agent.domain}`;
|
|
112
|
+
const repo = DOMAIN_REPO_MAP[agent.domain] ?? DEFAULT_REPO;
|
|
113
|
+
const commitHash = resolveGitCommit();
|
|
114
|
+
const version = resolveCLIVersion();
|
|
115
|
+
// Entry point: domain/agent.ts (convention)
|
|
116
|
+
const entryPoint = agent.domain === 'pipeline'
|
|
117
|
+
? `src/pipeline/enterprise/${agent.agent}.ts`
|
|
118
|
+
: `src/agents/${agent.domain}/${agent.agent}.ts`;
|
|
119
|
+
// Key runtime dependencies (static — based on the CLI's known deps)
|
|
120
|
+
const dependencies = resolveKeyDependencies(agent.domain);
|
|
121
|
+
return {
|
|
122
|
+
package: pkg,
|
|
123
|
+
version,
|
|
124
|
+
entryPoint,
|
|
125
|
+
repository: repo,
|
|
126
|
+
commitHash,
|
|
127
|
+
dependencies,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Resolve code provenance for multiple agents in batch.
|
|
132
|
+
* Deduplicates package lookups for efficiency.
|
|
133
|
+
*/
|
|
134
|
+
export function resolveCodeProvenanceBatch(agents) {
|
|
135
|
+
const result = new Map();
|
|
136
|
+
for (const agent of agents) {
|
|
137
|
+
const key = `${agent.domain}/${agent.agent}`;
|
|
138
|
+
if (!result.has(key)) {
|
|
139
|
+
result.set(key, resolveCodeProvenance(agent));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
// ============================================================================
|
|
145
|
+
// Dependency Resolution
|
|
146
|
+
// ============================================================================
|
|
147
|
+
/** Key runtime dependencies per domain. */
|
|
148
|
+
function resolveKeyDependencies(domain) {
|
|
149
|
+
// These are the key dependencies for each agent domain category
|
|
150
|
+
const depMap = {
|
|
151
|
+
'copilot': ['anthropic-sdk', 'prompt-engine'],
|
|
152
|
+
'simulator': ['scenario-engine', 'probability-models'],
|
|
153
|
+
'sentinel': ['anomaly-detector', 'correlation-engine'],
|
|
154
|
+
'test-bench': ['evaluation-framework', 'benchmark-suite'],
|
|
155
|
+
'shield': ['security-scanner', 'pii-detector', 'content-filter'],
|
|
156
|
+
'policy-engine': ['policy-evaluator', 'constraint-solver'],
|
|
157
|
+
'costops': ['cost-calculator', 'roi-engine', 'forecast-models'],
|
|
158
|
+
'governance-dashboard': ['audit-logger', 'compliance-checker'],
|
|
159
|
+
'orchestrator': ['workflow-engine', 'task-scheduler'],
|
|
160
|
+
'forge': ['code-generator', 'sdk-builder'],
|
|
161
|
+
'connector-hub': ['api-adapter', 'erp-connector', 'auth-provider'],
|
|
162
|
+
'observatory': ['telemetry-collector', 'metrics-aggregator'],
|
|
163
|
+
'latency-lens': ['trace-analyzer', 'profiler'],
|
|
164
|
+
'incident-manager': ['alert-router', 'escalation-engine'],
|
|
165
|
+
'memory-graph': ['vector-store', 'hnsw-index', 'knowledge-graph'],
|
|
166
|
+
'platform': ['decision-engine', 'executive-reporter'],
|
|
167
|
+
'pipeline': ['@claude-flow/cli', 'ruflo'],
|
|
168
|
+
};
|
|
169
|
+
return depMap[domain] ?? [];
|
|
170
|
+
}
|
|
171
|
+
// ============================================================================
|
|
172
|
+
// Version Discrepancy Detection
|
|
173
|
+
// ============================================================================
|
|
174
|
+
/** Check for version discrepancies across agent code provenances. */
|
|
175
|
+
export function detectVersionDiscrepancies(provenances) {
|
|
176
|
+
const byPackage = new Map();
|
|
177
|
+
for (const [agentKey, prov] of provenances) {
|
|
178
|
+
const existing = byPackage.get(prov.package);
|
|
179
|
+
if (existing) {
|
|
180
|
+
existing.versions.add(prov.version);
|
|
181
|
+
existing.commits.add(prov.commitHash);
|
|
182
|
+
existing.agents.push(agentKey);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
byPackage.set(prov.package, {
|
|
186
|
+
versions: new Set([prov.version]),
|
|
187
|
+
commits: new Set([prov.commitHash]),
|
|
188
|
+
agents: [agentKey],
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const discrepancies = [];
|
|
193
|
+
for (const [pkg, info] of byPackage) {
|
|
194
|
+
if (info.versions.size > 1 || info.commits.size > 1) {
|
|
195
|
+
for (const agentKey of info.agents) {
|
|
196
|
+
const prov = provenances.get(agentKey);
|
|
197
|
+
discrepancies.push({
|
|
198
|
+
agentKey,
|
|
199
|
+
package: pkg,
|
|
200
|
+
version: prov.version,
|
|
201
|
+
commitHash: prov.commitHash,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return discrepancies;
|
|
207
|
+
}
|
|
208
|
+
// ============================================================================
|
|
209
|
+
// Package Registry Lookup
|
|
210
|
+
// ============================================================================
|
|
211
|
+
/** Get the npm package name for an agent domain. */
|
|
212
|
+
export function getPackageForDomain(domain) {
|
|
213
|
+
return DOMAIN_PACKAGE_MAP[domain] ?? `@agentics/${domain}`;
|
|
214
|
+
}
|
|
215
|
+
/** Get all registered domain→package mappings. */
|
|
216
|
+
export function getAllDomainPackages() {
|
|
217
|
+
return DOMAIN_PACKAGE_MAP;
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=code-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-resolver.js","sourceRoot":"","sources":["../../../src/pipeline/enterprise/code-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,qDAAqD;AACrD,MAAM,kBAAkB,GAAqC;IAC3D,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,oBAAoB;IAChC,YAAY,EAAE,sBAAsB;IACpC,QAAQ,EAAE,kBAAkB;IAC5B,eAAe,EAAE,yBAAyB;IAC1C,SAAS,EAAE,mBAAmB;IAC9B,sBAAsB,EAAE,gCAAg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apper that provides the Read/Write/Update protocol for agents.
|
|
5
|
+
* Agents import this client rather than interacting with raw DecisionGraph
|
|
6
|
+
* or AgentDB memory APIs.
|
|
7
|
+
*
|
|
8
|
+
* The client:
|
|
9
|
+
* - Enforces schema compliance (producedBy, derivedFrom mandatory)
|
|
10
|
+
* - Auto-populates tags, timestamps, versions
|
|
11
|
+
* - Provides typed query builders for common patterns
|
|
12
|
+
* - Bridges to AgentDB memory sync when available
|
|
13
|
+
*
|
|
14
|
+
* Per ADR-033: "A thin DecisionGraphClient wrapper provides typed
|
|
15
|
+
* read/write methods — agents import the client, not raw memory APIs."
|
|
16
|
+
*/
|
|
17
|
+
import type { DecisionGraphNode, DecisionNodeType, EdgeRelation, PassNumber, AgentRef } from './types.js';
|
|
18
|
+
import { DecisionGraph } from './decision-graph.js';
|
|
19
|
+
import type { NodeQuery, PaginationOptions, NodeVersionEntry, GraphStatistics, GraphLifecycle } from './decision-graph.js';
|
|
20
|
+
/** Parameters for writing a new node via the client. */
|
|
21
|
+
export interface WriteNodeParams {
|
|
22
|
+
/** The node type (from DecisionNodeType enum). */
|
|
23
|
+
readonly type: DecisionNodeType;
|
|
24
|
+
/** Human-readable label. */
|
|
25
|
+
readonly name: string;
|
|
26
|
+
/** Structured payload (type-specific). */
|
|
27
|
+
readonly content: Record<string, unknown>;
|
|
28
|
+
/** One-paragraph summary for executive consumption. */
|
|
29
|
+
readonly summary: string;
|
|
30
|
+
/** Which agent created this node (MANDATORY per ADR-033). */
|
|
31
|
+
readonly producedBy: AgentRef;
|
|
32
|
+
/** Which pipeline pass (1-7). */
|
|
33
|
+
readonly pass: PassNumber;
|
|
34
|
+
/** IDs of parent nodes this was derived from (MANDATORY, can be []). */
|
|
35
|
+
readonly derivedFrom?: readonly string[];
|
|
36
|
+
/** Agent-reported confidence (0.0-1.0, default 1.0). */
|
|
37
|
+
readonly confidence?: number;
|
|
38
|
+
/** Node status (default 'complete'). */
|
|
39
|
+
readonly status?: DecisionGraphNode['status'];
|
|
40
|
+
/** Additional searchable tags (auto-tags are always added). */
|
|
41
|
+
readonly tags?: readonly string[];
|
|
42
|
+
}
|
|
43
|
+
/** Parameters for updating an existing node. */
|
|
44
|
+
export interface UpdateNodeParams {
|
|
45
|
+
/** Updated structured payload. */
|
|
46
|
+
readonly content?: Record<string, unknown>;
|
|
47
|
+
/** Updated summary. */
|
|
48
|
+
readonly summary?: string;
|
|
49
|
+
/** Updated status. */
|
|
50
|
+
readonly status?: DecisionGraphNode['status'];
|
|
51
|
+
/** Updated confidence. */
|
|
52
|
+
readonly confidence?: number;
|
|
53
|
+
/** Updated tags (replaces existing user tags; auto-tags are preserved). */
|
|
54
|
+
readonly tags?: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/** Result from a node read operation. */
|
|
57
|
+
export interface ReadResult {
|
|
58
|
+
readonly found: boolean;
|
|
59
|
+
readonly node?: DecisionGraphNode;
|
|
60
|
+
}
|
|
61
|
+
/** Result from a multi-node query. */
|
|
62
|
+
export interface QueryResult {
|
|
63
|
+
readonly nodes: readonly DecisionGraphNode[];
|
|
64
|
+
readonly total: number;
|
|
65
|
+
readonly hasMore: boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare class DecisionGraphClient {
|
|
68
|
+
private readonly graph;
|
|
69
|
+
private readonly agentRef;
|
|
70
|
+
private readonly pass;
|
|
71
|
+
/**
|
|
72
|
+
* Create a client bound to a specific agent and pass.
|
|
73
|
+
*
|
|
74
|
+
* All writes through this client will automatically set producedBy
|
|
75
|
+
* and pass fields. Agents don't need to repeat themselves.
|
|
76
|
+
*
|
|
77
|
+
* @param graph - The underlying DecisionGraph instance.
|
|
78
|
+
* @param agentRef - The calling agent's identity.
|
|
79
|
+
* @param pass - The pipeline pass this agent is executing in.
|
|
80
|
+
*/
|
|
81
|
+
constructor(graph: DecisionGraph, agentRef: AgentRef, pass: PassNumber);
|
|
82
|
+
/**
|
|
83
|
+
* Write a new node to the graph.
|
|
84
|
+
* Auto-populates producedBy, pass, and standard tags.
|
|
85
|
+
*/
|
|
86
|
+
write(params: Omit<WriteNodeParams, 'producedBy' | 'pass'> & {
|
|
87
|
+
producedBy?: AgentRef;
|
|
88
|
+
pass?: PassNumber;
|
|
89
|
+
}): DecisionGraphNode;
|
|
90
|
+
/**
|
|
91
|
+
* Write multiple nodes in a batch. All nodes use the same agent/pass context.
|
|
92
|
+
* Returns all created nodes.
|
|
93
|
+
*/
|
|
94
|
+
writeBatch(paramsList: readonly Omit<WriteNodeParams, 'producedBy' | 'pass'>[]): readonly DecisionGraphNode[];
|
|
95
|
+
/**
|
|
96
|
+
* Update an existing node.
|
|
97
|
+
* Original content is preserved in version history.
|
|
98
|
+
* Increments version automatically.
|
|
99
|
+
*/
|
|
100
|
+
update(nodeId: string, updates: UpdateNodeParams): DecisionGraphNode;
|
|
101
|
+
/** Read a single node by ID. */
|
|
102
|
+
read(nodeId: string): ReadResult;
|
|
103
|
+
/** Read all nodes of a specific type. */
|
|
104
|
+
readByType(type: DecisionNodeType): readonly DecisionGraphNode[];
|
|
105
|
+
/** Read all nodes from a specific pass. */
|
|
106
|
+
readByPass(pass: PassNumber): readonly DecisionGraphNode[];
|
|
107
|
+
/** Read all nodes from prior passes (useful for building context). */
|
|
108
|
+
readPriorPasses(): readonly DecisionGraphNode[];
|
|
109
|
+
/** Read all nodes produced by a specific agent. */
|
|
110
|
+
readByAgent(domain: string, agent: string): readonly DecisionGraphNode[];
|
|
111
|
+
/** Read nodes matching a tag. */
|
|
112
|
+
readByTag(tag: string): readonly DecisionGraphNode[];
|
|
113
|
+
/**
|
|
114
|
+
* Run a compound query with optional pagination.
|
|
115
|
+
* All filter fields are ANDed together.
|
|
116
|
+
*/
|
|
117
|
+
query(filter: NodeQuery, pagination?: PaginationOptions): QueryResult;
|
|
118
|
+
/**
|
|
119
|
+
* Search nodes by text similarity on summary fields.
|
|
120
|
+
* Returns top-K most similar nodes.
|
|
121
|
+
*/
|
|
122
|
+
search(query: string, topK?: number): readonly DecisionGraphNode[];
|
|
123
|
+
/** Get the full derivation chain (all ancestors) for a node. */
|
|
124
|
+
getDerivationChain(nodeId: string): readonly DecisionGraphNode[];
|
|
125
|
+
/** Get the immediate children of a node. */
|
|
126
|
+
getChildren(nodeId: string): readonly DecisionGraphNode[];
|
|
127
|
+
/** Get the version history for a node. */
|
|
128
|
+
getHistory(nodeId: string): readonly NodeVersionEntry[];
|
|
129
|
+
/** Get a specific historical version of a node's content. */
|
|
130
|
+
getAtVersion(nodeId: string, version: number): NodeVersionEntry | undefined;
|
|
131
|
+
/** Add a relationship edge between two nodes. */
|
|
132
|
+
addEdge(from: string, to: string, relation: EdgeRelation): void;
|
|
133
|
+
/** Get all edges originating from a node. */
|
|
134
|
+
getEdgesFrom(nodeId: string): readonly import('./types.js').DecisionGraphEdge[];
|
|
135
|
+
/** Get all edges pointing to a node. */
|
|
136
|
+
getEdgesTo(nodeId: string): readonly import('./types.js').DecisionGraphEdge[];
|
|
137
|
+
/** Get aggregate statistics for the graph. */
|
|
138
|
+
getStatistics(): GraphStatistics;
|
|
139
|
+
/** Get the current lifecycle state. */
|
|
140
|
+
getLifecycle(): GraphLifecycle;
|
|
141
|
+
/** Get total node count. */
|
|
142
|
+
getNodeCount(): number;
|
|
143
|
+
/** Get the execution ID. */
|
|
144
|
+
getExecutionId(): string;
|
|
145
|
+
/**
|
|
146
|
+
* Get a compact summary of all prior pass outputs.
|
|
147
|
+
* Useful for building the context payload sent to agents.
|
|
148
|
+
*/
|
|
149
|
+
getPriorPassSummaries(): readonly {
|
|
150
|
+
type: DecisionNodeType;
|
|
151
|
+
name: string;
|
|
152
|
+
summary: string;
|
|
153
|
+
pass: PassNumber;
|
|
154
|
+
confidence: number;
|
|
155
|
+
status: string;
|
|
156
|
+
}[];
|
|
157
|
+
/**
|
|
158
|
+
* Get all nodes of specific types from specific passes.
|
|
159
|
+
* Common pattern: "give me all scenarios from Pass 2 and all architectures from Pass 3".
|
|
160
|
+
*/
|
|
161
|
+
readMultiple(...selectors: readonly {
|
|
162
|
+
type: DecisionNodeType;
|
|
163
|
+
pass?: PassNumber;
|
|
164
|
+
}[]): readonly DecisionGraphNode[];
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Create a DecisionGraphClient for a specific agent in a specific pass.
|
|
168
|
+
* This is the recommended entry point for agents.
|
|
169
|
+
*/
|
|
170
|
+
export declare function createDecisionGraphClient(graph: DecisionGraph, agentRef: AgentRef, pass: PassNumber): DecisionGraphClient;
|
|
171
|
+
//# sourceMappingURL=decision-graph-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-graph-client.d.ts","sourceRoot":"","sources":["../../../src/pipeline/enterprise/decision-graph-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,qBAAqB,CAAC;AAM7B,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC9B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,E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 -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DecisionGraphClient — Agent-Facing Typed Wrapper (ADR-033)
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper that provides the Read/Write/Update protocol for agents.
|
|
5
|
+
* Agents import this client rather than interacting with raw DecisionGraph
|
|
6
|
+
* or AgentDB memory APIs.
|
|
7
|
+
*
|
|
8
|
+
* The client:
|
|
9
|
+
* - Enforces schema compliance (producedBy, derivedFrom mandatory)
|
|
10
|
+
* - Auto-populates tags, timestamps, versions
|
|
11
|
+
* - Provides typed query builders for common patterns
|
|
12
|
+
* - Bridges to AgentDB memory sync when available
|
|
13
|
+
*
|
|
14
|
+
* Per ADR-033: "A thin DecisionGraphClient wrapper provides typed
|
|
15
|
+
* read/write methods — agents import the client, not raw memory APIs."
|
|
16
|
+
*/
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// DecisionGraphClient
|
|
19
|
+
// ============================================================================
|
|
20
|
+
export class DecisionGraphClient {
|
|
21
|
+
graph;
|
|
22
|
+
agentRef;
|
|
23
|
+
pass;
|
|
24
|
+
/**
|
|
25
|
+
* Create a client bound to a specific agent and pass.
|
|
26
|
+
*
|
|
27
|
+
* All writes through this client will automatically set producedBy
|
|
28
|
+
* and pass fields. Agents don't need to repeat themselves.
|
|
29
|
+
*
|
|
30
|
+
* @param graph - The underlying DecisionGraph instance.
|
|
31
|
+
* @param agentRef - The calling agent's identity.
|
|
32
|
+
* @param pass - The pipeline pass this agent is executing in.
|
|
33
|
+
*/
|
|
34
|
+
constructor(graph, agentRef, pass) {
|
|
35
|
+
this.graph = graph;
|
|
36
|
+
this.agentRef = agentRef;
|
|
37
|
+
this.pass = pass;
|
|
38
|
+
}
|
|
39
|
+
// --------------------------------------------------------------------------
|
|
40
|
+
// Write Protocol (ADR-033)
|
|
41
|
+
// --------------------------------------------------------------------------
|
|
42
|
+
/**
|
|
43
|
+
* Write a new node to the graph.
|
|
44
|
+
* Auto-populates producedBy, pass, and standard tags.
|
|
45
|
+
*/
|
|
46
|
+
write(params) {
|
|
47
|
+
return this.graph.createNode({
|
|
48
|
+
...params,
|
|
49
|
+
producedBy: params.producedBy ?? this.agentRef,
|
|
50
|
+
pass: params.pass ?? this.pass,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Write multiple nodes in a batch. All nodes use the same agent/pass context.
|
|
55
|
+
* Returns all created nodes.
|
|
56
|
+
*/
|
|
57
|
+
writeBatch(paramsList) {
|
|
58
|
+
return paramsList.map(params => this.write(params));
|
|
59
|
+
}
|
|
60
|
+
// --------------------------------------------------------------------------
|
|
61
|
+
// Update Protocol (ADR-033 — append-only history)
|
|
62
|
+
// --------------------------------------------------------------------------
|
|
63
|
+
/**
|
|
64
|
+
* Update an existing node.
|
|
65
|
+
* Original content is preserved in version history.
|
|
66
|
+
* Increments version automatically.
|
|
67
|
+
*/
|
|
68
|
+
update(nodeId, updates) {
|
|
69
|
+
return this.graph.updateNode(nodeId, updates);
|
|
70
|
+
}
|
|
71
|
+
// --------------------------------------------------------------------------
|
|
72
|
+
// Read Protocol (ADR-033)
|
|
73
|
+
// --------------------------------------------------------------------------
|
|
74
|
+
/** Read a single node by ID. */
|
|
75
|
+
read(nodeId) {
|
|
76
|
+
const node = this.graph.getNode(nodeId);
|
|
77
|
+
return node ? { found: true, node } : { found: false };
|
|
78
|
+
}
|
|
79
|
+
/** Read all nodes of a specific type. */
|
|
80
|
+
readByType(type) {
|
|
81
|
+
return this.graph.getNodesByType(type);
|
|
82
|
+
}
|
|
83
|
+
/** Read all nodes from a specific pass. */
|
|
84
|
+
readByPass(pass) {
|
|
85
|
+
return this.graph.getNodesByPass(pass);
|
|
86
|
+
}
|
|
87
|
+
/** Read all nodes from prior passes (useful for building context). */
|
|
88
|
+
readPriorPasses() {
|
|
89
|
+
const results = [];
|
|
90
|
+
for (let p = 1; p < this.pass; p++) {
|
|
91
|
+
const nodes = this.graph.getNodesByPass(p);
|
|
92
|
+
for (const node of nodes) {
|
|
93
|
+
results.push(node);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return results;
|
|
97
|
+
}
|
|
98
|
+
/** Read all nodes produced by a specific agent. */
|
|
99
|
+
readByAgent(domain, agent) {
|
|
100
|
+
return this.graph.getNodesByAgent(domain, agent);
|
|
101
|
+
}
|
|
102
|
+
/** Read nodes matching a tag. */
|
|
103
|
+
readByTag(tag) {
|
|
104
|
+
return this.graph.getNodesByTag(tag);
|
|
105
|
+
}
|
|
106
|
+
// --------------------------------------------------------------------------
|
|
107
|
+
// Advanced Querying
|
|
108
|
+
// --------------------------------------------------------------------------
|
|
109
|
+
/**
|
|
110
|
+
* Run a compound query with optional pagination.
|
|
111
|
+
* All filter fields are ANDed together.
|
|
112
|
+
*/
|
|
113
|
+
query(filter, pagination) {
|
|
114
|
+
const result = this.graph.queryNodes(filter, pagination);
|
|
115
|
+
return {
|
|
116
|
+
nodes: result.items,
|
|
117
|
+
total: result.total,
|
|
118
|
+
hasMore: result.hasMore,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Search nodes by text similarity on summary fields.
|
|
123
|
+
* Returns top-K most similar nodes.
|
|
124
|
+
*/
|
|
125
|
+
search(query, topK) {
|
|
126
|
+
return this.graph.searchBySummary(query, topK);
|
|
127
|
+
}
|
|
128
|
+
/** Get the full derivation chain (all ancestors) for a node. */
|
|
129
|
+
getDerivationChain(nodeId) {
|
|
130
|
+
return this.graph.getDerivationChain(nodeId);
|
|
131
|
+
}
|
|
132
|
+
/** Get the immediate children of a node. */
|
|
133
|
+
getChildren(nodeId) {
|
|
134
|
+
return this.graph.getChildren(nodeId);
|
|
135
|
+
}
|
|
136
|
+
/** Get the version history for a node. */
|
|
137
|
+
getHistory(nodeId) {
|
|
138
|
+
return this.graph.getVersionHistory(nodeId);
|
|
139
|
+
}
|
|
140
|
+
/** Get a specific historical version of a node's content. */
|
|
141
|
+
getAtVersion(nodeId, version) {
|
|
142
|
+
return this.graph.getNodeAtVersion(nodeId, version);
|
|
143
|
+
}
|
|
144
|
+
// --------------------------------------------------------------------------
|
|
145
|
+
// Edge Operations
|
|
146
|
+
// --------------------------------------------------------------------------
|
|
147
|
+
/** Add a relationship edge between two nodes. */
|
|
148
|
+
addEdge(from, to, relation) {
|
|
149
|
+
this.graph.addEdge(from, to, relation);
|
|
150
|
+
}
|
|
151
|
+
/** Get all edges originating from a node. */
|
|
152
|
+
getEdgesFrom(nodeId) {
|
|
153
|
+
return this.graph.getEdgesFrom(nodeId);
|
|
154
|
+
}
|
|
155
|
+
/** Get all edges pointing to a node. */
|
|
156
|
+
getEdgesTo(nodeId) {
|
|
157
|
+
return this.graph.getEdgesTo(nodeId);
|
|
158
|
+
}
|
|
159
|
+
// --------------------------------------------------------------------------
|
|
160
|
+
// Graph Information
|
|
161
|
+
// --------------------------------------------------------------------------
|
|
162
|
+
/** Get aggregate statistics for the graph. */
|
|
163
|
+
getStatistics() {
|
|
164
|
+
return this.graph.getStatistics();
|
|
165
|
+
}
|
|
166
|
+
/** Get the current lifecycle state. */
|
|
167
|
+
getLifecycle() {
|
|
168
|
+
return this.graph.getLifecycle();
|
|
169
|
+
}
|
|
170
|
+
/** Get total node count. */
|
|
171
|
+
getNodeCount() {
|
|
172
|
+
return this.graph.nodeCount;
|
|
173
|
+
}
|
|
174
|
+
/** Get the execution ID. */
|
|
175
|
+
getExecutionId() {
|
|
176
|
+
return this.graph.getExecutionId();
|
|
177
|
+
}
|
|
178
|
+
// --------------------------------------------------------------------------
|
|
179
|
+
// Convenience: Context Summaries for Downstream Agents
|
|
180
|
+
// --------------------------------------------------------------------------
|
|
181
|
+
/**
|
|
182
|
+
* Get a compact summary of all prior pass outputs.
|
|
183
|
+
* Useful for building the context payload sent to agents.
|
|
184
|
+
*/
|
|
185
|
+
getPriorPassSummaries() {
|
|
186
|
+
return this.readPriorPasses().map(node => ({
|
|
187
|
+
type: node.type,
|
|
188
|
+
name: node.name,
|
|
189
|
+
summary: node.summary,
|
|
190
|
+
pass: node.pass,
|
|
191
|
+
confidence: node.confidence,
|
|
192
|
+
status: node.status,
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get all nodes of specific types from specific passes.
|
|
197
|
+
* Common pattern: "give me all scenarios from Pass 2 and all architectures from Pass 3".
|
|
198
|
+
*/
|
|
199
|
+
readMultiple(...selectors) {
|
|
200
|
+
const results = [];
|
|
201
|
+
for (const sel of selectors) {
|
|
202
|
+
const nodes = this.graph.getNodesByType(sel.type);
|
|
203
|
+
for (const node of nodes) {
|
|
204
|
+
if (sel.pass === undefined || node.pass === sel.pass) {
|
|
205
|
+
results.push(node);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return results;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// ============================================================================
|
|
213
|
+
// Factory
|
|
214
|
+
// ============================================================================
|
|
215
|
+
/**
|
|
216
|
+
* Create a DecisionGraphClient for a specific agent in a specific pass.
|
|
217
|
+
* This is the recommended entry point for agents.
|
|
218
|
+
*/
|
|
219
|
+
export function createDecisionGraphClient(graph, agentRef, pass) {
|
|
220
|
+
return new DecisionGraphClient(graph, agentRef, pass);
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=decision-graph-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-graph-client.js","sourceRoot":"","sources":["../../../src/pipeline/enterprise/decision-graph-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA6EH,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,MAAM,OAAO,mBAAmB;IACb,KAAK,CAAgB;IACrB,QAAQ,CAAW;IACnB,IAAI,CAAa;IAElC;;;;;;;;;OASG;IACH,YAAY,KAAoB,EAAE,QAAkB,EAAE,IAAgB;QACpE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ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