agentic-qe 3.8.7 → 3.8.9
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/.claude/agents/n8n/n8n-base-agent.md +4 -35
- package/.claude/agents/n8n/n8n-bdd-scenario-tester.md +4 -25
- package/.claude/agents/n8n/n8n-chaos-tester.md +4 -26
- package/.claude/agents/n8n/n8n-ci-orchestrator.md +4 -27
- package/.claude/agents/n8n/n8n-compliance-validator.md +4 -25
- package/.claude/agents/n8n/n8n-expression-validator.md +4 -25
- package/.claude/agents/n8n/n8n-integration-test.md +4 -27
- package/.claude/agents/n8n/n8n-monitoring-validator.md +4 -26
- package/.claude/agents/n8n/n8n-node-validator.md +4 -25
- package/.claude/agents/n8n/n8n-performance-tester.md +4 -29
- package/.claude/agents/n8n/n8n-security-auditor.md +4 -26
- package/.claude/agents/n8n/n8n-trigger-test.md +4 -27
- package/.claude/agents/n8n/n8n-unit-tester.md +4 -25
- package/.claude/agents/n8n/n8n-version-comparator.md +4 -26
- package/.claude/agents/n8n/n8n-workflow-executor.md +4 -26
- package/.claude/agents/v3/qe-accessibility-auditor.md +21 -55
- package/.claude/agents/v3/qe-bdd-generator.md +23 -58
- package/.claude/agents/v3/qe-chaos-engineer.md +21 -54
- package/.claude/agents/v3/qe-code-complexity.md +21 -54
- package/.claude/agents/v3/qe-code-intelligence.md +21 -54
- package/.claude/agents/v3/qe-contract-validator.md +21 -53
- package/.claude/agents/v3/qe-coverage-specialist.md +23 -79
- package/.claude/agents/v3/qe-defect-predictor.md +23 -76
- package/.claude/agents/v3/qe-dependency-mapper.md +21 -53
- package/.claude/agents/v3/qe-deployment-advisor.md +21 -54
- package/.claude/agents/v3/qe-devils-advocate.md +212 -238
- package/.claude/agents/v3/qe-flaky-hunter.md +21 -53
- package/.claude/agents/v3/qe-fleet-commander.md +21 -54
- package/.claude/agents/v3/qe-gap-detector.md +23 -79
- package/.claude/agents/v3/qe-graphql-tester.md +21 -54
- package/.claude/agents/v3/qe-impact-analyzer.md +21 -53
- package/.claude/agents/v3/qe-integration-architect.md +2 -2
- package/.claude/agents/v3/qe-integration-tester.md +15 -36
- package/.claude/agents/v3/qe-kg-builder.md +21 -53
- package/.claude/agents/v3/qe-learning-coordinator.md +21 -51
- package/.claude/agents/v3/qe-load-tester.md +21 -55
- package/.claude/agents/v3/qe-message-broker-tester.md +345 -385
- package/.claude/agents/v3/qe-metrics-optimizer.md +21 -54
- package/.claude/agents/v3/qe-middleware-validator.md +389 -428
- package/.claude/agents/v3/qe-mutation-tester.md +21 -54
- package/.claude/agents/v3/qe-odata-contract-tester.md +443 -489
- package/.claude/agents/v3/qe-parallel-executor.md +21 -52
- package/.claude/agents/v3/qe-pattern-learner.md +23 -70
- package/.claude/agents/v3/qe-pentest-validator.md +322 -359
- package/.claude/agents/v3/qe-performance-tester.md +21 -54
- package/.claude/agents/v3/qe-product-factors-assessor.md +339 -376
- package/.claude/agents/v3/qe-property-tester.md +21 -53
- package/.claude/agents/v3/qe-quality-criteria-recommender.md +379 -410
- package/.claude/agents/v3/qe-quality-gate.md +17 -64
- package/.claude/agents/v3/qe-queen-coordinator.md +71 -121
- package/.claude/agents/v3/qe-qx-partner.md +23 -64
- package/.claude/agents/v3/qe-regression-analyzer.md +21 -54
- package/.claude/agents/v3/qe-requirements-validator.md +23 -66
- package/.claude/agents/v3/qe-responsive-tester.md +21 -54
- package/.claude/agents/v3/qe-retry-handler.md +21 -53
- package/.claude/agents/v3/qe-risk-assessor.md +23 -58
- package/.claude/agents/v3/qe-root-cause-analyzer.md +21 -53
- package/.claude/agents/v3/qe-sap-idoc-tester.md +371 -412
- package/.claude/agents/v3/qe-sap-rfc-tester.md +323 -362
- package/.claude/agents/v3/qe-security-auditor.md +21 -54
- package/.claude/agents/v3/qe-security-scanner.md +21 -58
- package/.claude/agents/v3/qe-soap-tester.md +307 -345
- package/.claude/agents/v3/qe-sod-analyzer.md +486 -533
- package/.claude/agents/v3/qe-tdd-specialist.md +17 -42
- package/.claude/agents/v3/qe-test-architect.md +23 -58
- package/.claude/agents/v3/qe-test-idea-rewriter.md +351 -375
- package/.claude/agents/v3/qe-transfer-specialist.md +21 -55
- package/.claude/agents/v3/qe-visual-tester.md +15 -37
- package/.claude/agents/v3/subagents/qe-code-reviewer.md +21 -54
- package/.claude/agents/v3/subagents/qe-integration-reviewer.md +21 -54
- package/.claude/agents/v3/subagents/qe-performance-reviewer.md +21 -54
- package/.claude/agents/v3/subagents/qe-security-reviewer.md +21 -54
- package/.claude/agents/v3/subagents/qe-tdd-green.md +21 -53
- package/.claude/agents/v3/subagents/qe-tdd-red.md +21 -53
- package/.claude/agents/v3/subagents/qe-tdd-refactor.md +21 -53
- package/.claude/skills/.validation/schemas/skill-eval.schema.json +5 -5
- package/.claude/skills/.validation/skill-validation-mcp-integration.md +32 -81
- package/.claude/skills/agentic-quality-engineering/SKILL.md +31 -60
- package/.claude/skills/iterative-loop/SKILL.md +2 -2
- package/.claude/skills/pair-programming/SKILL.md +2 -2
- package/.claude/skills/performance-testing/SKILL.md +1 -1
- package/.claude/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +2 -2
- package/.claude/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +6 -6
- package/.claude/skills/qcsd-development-swarm/steps/01-flag-detection.md +2 -2
- package/.claude/skills/qcsd-development-swarm/steps/07-learning-persistence.md +6 -6
- package/.claude/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +6 -6
- package/.claude/skills/qcsd-production-swarm/steps/01-flag-detection.md +202 -206
- package/.claude/skills/qcsd-production-swarm/steps/07-learning-persistence.md +157 -185
- package/.claude/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +87 -91
- package/.claude/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +49 -53
- package/.claude/skills/qe-chaos-resilience/SKILL.md +2 -2
- package/.claude/skills/qe-code-intelligence/SKILL.md +2 -2
- package/.claude/skills/qe-coverage-analysis/SKILL.md +2 -2
- package/.claude/skills/qe-defect-intelligence/SKILL.md +2 -2
- package/.claude/skills/qe-iterative-loop/SKILL.md +12 -12
- package/.claude/skills/qe-learning-optimization/SKILL.md +2 -2
- package/.claude/skills/qe-quality-assessment/SKILL.md +2 -2
- package/.claude/skills/qe-requirements-validation/SKILL.md +2 -2
- package/.claude/skills/qe-test-execution/SKILL.md +2 -2
- package/.claude/skills/qe-test-generation/SKILL.md +2 -2
- package/.claude/skills/qe-visual-accessibility/SKILL.md +2 -2
- package/.claude/skills/quality-metrics/SKILL.md +1 -1
- package/.claude/skills/security-testing/SKILL.md +1 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/validation-pipeline/SKILL.md +2 -2
- package/.claude/skills/verification-quality/SKILL.md +2 -2
- package/CHANGELOG.md +31 -0
- package/assets/agents/v3/qe-accessibility-auditor.md +21 -55
- package/assets/agents/v3/qe-bdd-generator.md +23 -58
- package/assets/agents/v3/qe-chaos-engineer.md +21 -54
- package/assets/agents/v3/qe-code-complexity.md +21 -54
- package/assets/agents/v3/qe-code-intelligence.md +21 -54
- package/assets/agents/v3/qe-contract-validator.md +21 -53
- package/assets/agents/v3/qe-coverage-specialist.md +23 -79
- package/assets/agents/v3/qe-defect-predictor.md +23 -76
- package/assets/agents/v3/qe-dependency-mapper.md +21 -53
- package/assets/agents/v3/qe-deployment-advisor.md +21 -54
- package/assets/agents/v3/qe-devils-advocate.md +212 -238
- package/assets/agents/v3/qe-flaky-hunter.md +21 -53
- package/assets/agents/v3/qe-fleet-commander.md +21 -54
- package/assets/agents/v3/qe-gap-detector.md +23 -79
- package/assets/agents/v3/qe-graphql-tester.md +21 -54
- package/assets/agents/v3/qe-impact-analyzer.md +21 -53
- package/assets/agents/v3/qe-integration-architect.md +2 -2
- package/assets/agents/v3/qe-integration-tester.md +15 -36
- package/assets/agents/v3/qe-kg-builder.md +21 -53
- package/assets/agents/v3/qe-learning-coordinator.md +21 -51
- package/assets/agents/v3/qe-load-tester.md +21 -55
- package/assets/agents/v3/qe-message-broker-tester.md +345 -385
- package/assets/agents/v3/qe-metrics-optimizer.md +21 -54
- package/assets/agents/v3/qe-middleware-validator.md +389 -428
- package/assets/agents/v3/qe-mutation-tester.md +21 -54
- package/assets/agents/v3/qe-odata-contract-tester.md +443 -489
- package/assets/agents/v3/qe-parallel-executor.md +21 -52
- package/assets/agents/v3/qe-pattern-learner.md +23 -70
- package/assets/agents/v3/qe-pentest-validator.md +322 -359
- package/assets/agents/v3/qe-performance-tester.md +21 -54
- package/assets/agents/v3/qe-product-factors-assessor.md +339 -376
- package/assets/agents/v3/qe-property-tester.md +21 -53
- package/assets/agents/v3/qe-quality-criteria-recommender.md +379 -410
- package/assets/agents/v3/qe-quality-gate.md +17 -64
- package/assets/agents/v3/qe-queen-coordinator.md +71 -121
- package/assets/agents/v3/qe-qx-partner.md +23 -64
- package/assets/agents/v3/qe-regression-analyzer.md +21 -54
- package/assets/agents/v3/qe-requirements-validator.md +23 -66
- package/assets/agents/v3/qe-responsive-tester.md +21 -54
- package/assets/agents/v3/qe-retry-handler.md +21 -53
- package/assets/agents/v3/qe-risk-assessor.md +23 -58
- package/assets/agents/v3/qe-root-cause-analyzer.md +21 -53
- package/assets/agents/v3/qe-sap-idoc-tester.md +371 -412
- package/assets/agents/v3/qe-sap-rfc-tester.md +323 -362
- package/assets/agents/v3/qe-security-auditor.md +21 -54
- package/assets/agents/v3/qe-security-scanner.md +21 -58
- package/assets/agents/v3/qe-soap-tester.md +307 -345
- package/assets/agents/v3/qe-sod-analyzer.md +486 -533
- package/assets/agents/v3/qe-tdd-specialist.md +17 -42
- package/assets/agents/v3/qe-test-architect.md +23 -58
- package/assets/agents/v3/qe-test-idea-rewriter.md +351 -375
- package/assets/agents/v3/qe-transfer-specialist.md +21 -55
- package/assets/agents/v3/qe-visual-tester.md +15 -37
- package/assets/agents/v3/subagents/qe-code-reviewer.md +21 -54
- package/assets/agents/v3/subagents/qe-integration-reviewer.md +21 -54
- package/assets/agents/v3/subagents/qe-performance-reviewer.md +21 -54
- package/assets/agents/v3/subagents/qe-security-reviewer.md +21 -54
- package/assets/agents/v3/subagents/qe-tdd-green.md +21 -53
- package/assets/agents/v3/subagents/qe-tdd-red.md +21 -53
- package/assets/agents/v3/subagents/qe-tdd-refactor.md +21 -53
- package/assets/grammars/tree-sitter-c_sharp.wasm +0 -0
- package/assets/grammars/tree-sitter-java.wasm +0 -0
- package/assets/grammars/tree-sitter-python.wasm +0 -0
- package/assets/grammars/tree-sitter-rust.wasm +0 -0
- package/assets/grammars/tree-sitter-swift.wasm +0 -0
- package/assets/skills/.validation/schemas/skill-eval.schema.json +5 -5
- package/assets/skills/.validation/skill-validation-mcp-integration.md +32 -81
- package/assets/skills/agentic-quality-engineering/SKILL.md +31 -60
- package/assets/skills/pair-programming/SKILL.md +2 -2
- package/assets/skills/performance-testing/SKILL.md +1 -1
- package/assets/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +2 -2
- package/assets/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +6 -6
- package/assets/skills/qcsd-development-swarm/steps/01-flag-detection.md +2 -2
- package/assets/skills/qcsd-development-swarm/steps/07-learning-persistence.md +6 -6
- package/assets/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +6 -6
- package/assets/skills/qcsd-production-swarm/steps/01-flag-detection.md +202 -206
- package/assets/skills/qcsd-production-swarm/steps/07-learning-persistence.md +157 -185
- package/assets/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +87 -91
- package/assets/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +49 -53
- package/assets/skills/qe-chaos-resilience/SKILL.md +2 -2
- package/assets/skills/qe-code-intelligence/SKILL.md +2 -2
- package/assets/skills/qe-coverage-analysis/SKILL.md +2 -2
- package/assets/skills/qe-defect-intelligence/SKILL.md +2 -2
- package/assets/skills/qe-iterative-loop/SKILL.md +12 -12
- package/assets/skills/qe-learning-optimization/SKILL.md +2 -2
- package/assets/skills/qe-quality-assessment/SKILL.md +2 -2
- package/assets/skills/qe-requirements-validation/SKILL.md +2 -2
- package/assets/skills/qe-test-execution/SKILL.md +2 -2
- package/assets/skills/qe-test-generation/SKILL.md +2 -2
- package/assets/skills/qe-visual-accessibility/SKILL.md +2 -2
- package/assets/skills/quality-metrics/SKILL.md +1 -1
- package/assets/skills/security-testing/SKILL.md +1 -1
- package/assets/skills/validation-pipeline/SKILL.md +2 -2
- package/assets/skills/verification-quality/SKILL.md +2 -2
- package/dist/cli/bundle.js +5169 -4631
- package/dist/cli/commands/init.js +2 -0
- package/dist/cli/commands/memory.d.ts +11 -0
- package/dist/cli/commands/memory.js +333 -0
- package/dist/cli/commands/ruvector-commands.js +41 -1
- package/dist/cli/handlers/init-handler.d.ts +1 -0
- package/dist/cli/handlers/init-handler.js +18 -6
- package/dist/cli/index.js +2 -0
- package/dist/domains/code-intelligence/services/knowledge-graph.js +3 -0
- package/dist/domains/coverage-analysis/services/coverage-parser.d.ts +72 -4
- package/dist/domains/coverage-analysis/services/coverage-parser.js +559 -6
- package/dist/governance/proof-envelope-integration.js +10 -4
- package/dist/init/phases/08-mcp.js +10 -0
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/integrations/coherence/engines/witness-adapter.d.ts +5 -5
- package/dist/integrations/coherence/engines/witness-adapter.js +10 -22
- package/dist/integrations/ruvector/coherence-gate.d.ts +14 -5
- package/dist/integrations/ruvector/coherence-gate.js +34 -6
- package/dist/learning/agent-routing.d.ts +7 -2
- package/dist/learning/agent-routing.js +17 -1
- package/dist/mcp/bundle.js +1087 -1086
- package/dist/mcp/tools/coverage-analysis/index.d.ts +12 -0
- package/dist/mcp/tools/coverage-analysis/index.js +27 -4
- package/dist/shared/parsers/multi-language-parser.d.ts +4 -1
- package/dist/shared/parsers/multi-language-parser.js +73 -1
- package/dist/shared/parsers/tree-sitter-wasm-parser.d.ts +32 -0
- package/dist/shared/parsers/tree-sitter-wasm-parser.js +1034 -0
- package/package.json +2 -1
|
@@ -41,6 +41,7 @@ export function createInitCommand() {
|
|
|
41
41
|
.option('--with-codex', 'Include OpenAI Codex CLI MCP config and AGENTS.md')
|
|
42
42
|
.option('--with-windsurf', 'Include Windsurf MCP config and rules')
|
|
43
43
|
.option('--with-continuedev', 'Include Continue.dev MCP config and rules')
|
|
44
|
+
.option('--with-mcp', 'Include MCP server config in .mcp.json (opt-in — CLI works without MCP)')
|
|
44
45
|
.option('--with-all-platforms', 'Include all coding agent platform configurations')
|
|
45
46
|
.option('--with-claude-flow', 'Force Claude Flow integration setup')
|
|
46
47
|
.option('--skip-claude-flow', 'Skip Claude Flow integration')
|
|
@@ -113,6 +114,7 @@ async function runInit(options) {
|
|
|
113
114
|
withCodex: options.withCodex,
|
|
114
115
|
withWindsurf: options.withWindsurf,
|
|
115
116
|
withContinueDev: options.withContinuedev,
|
|
117
|
+
withMcp: options.withMcp,
|
|
116
118
|
noGovernance: options.noGovernance,
|
|
117
119
|
});
|
|
118
120
|
// Run initialization
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Memory CLI Commands
|
|
3
|
+
*
|
|
4
|
+
* CLI interface for memory store/get/search/delete/share operations.
|
|
5
|
+
* Provides CLI parity with MCP memory_store, memory_retrieve, memory_query,
|
|
6
|
+
* memory_delete, and memory_share tools to reduce MCP dependency in agents/skills.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import type { CLIContext } from '../handlers/interfaces.js';
|
|
10
|
+
export declare function createMemoryCommand(context: CLIContext, cleanupAndExit: (code: number) => Promise<never>, ensureInitialized: () => Promise<boolean>): Command;
|
|
11
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Memory CLI Commands
|
|
3
|
+
*
|
|
4
|
+
* CLI interface for memory store/get/search/delete/share operations.
|
|
5
|
+
* Provides CLI parity with MCP memory_store, memory_retrieve, memory_query,
|
|
6
|
+
* memory_delete, and memory_share tools to reduce MCP dependency in agents/skills.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import { toErrorMessage } from '../../shared/error-utils.js';
|
|
11
|
+
export function createMemoryCommand(context, cleanupAndExit, ensureInitialized) {
|
|
12
|
+
const memory = new Command('memory')
|
|
13
|
+
.description('Memory store, retrieve, search, and delete operations')
|
|
14
|
+
.addHelpText('after', `
|
|
15
|
+
Examples:
|
|
16
|
+
# Store a value
|
|
17
|
+
aqe memory store --key "auth-pattern" --value "JWT with refresh tokens" --namespace patterns
|
|
18
|
+
|
|
19
|
+
# Retrieve a value
|
|
20
|
+
aqe memory get --key "auth-pattern" --namespace patterns
|
|
21
|
+
|
|
22
|
+
# Search by pattern (glob)
|
|
23
|
+
aqe memory search --pattern "auth*" --namespace patterns
|
|
24
|
+
|
|
25
|
+
# Search semantically (natural language)
|
|
26
|
+
aqe memory search --query "authentication patterns" --semantic
|
|
27
|
+
|
|
28
|
+
# List all entries in a namespace
|
|
29
|
+
aqe memory list --namespace patterns --limit 20
|
|
30
|
+
|
|
31
|
+
# Delete a key
|
|
32
|
+
aqe memory delete --key "auth-pattern" --namespace patterns
|
|
33
|
+
|
|
34
|
+
# Share knowledge between agents
|
|
35
|
+
aqe memory share --from agent-1 --to agent-2,agent-3 --domain testing --content '{"finding": "flaky"}'
|
|
36
|
+
|
|
37
|
+
# Show usage stats
|
|
38
|
+
aqe memory usage
|
|
39
|
+
`);
|
|
40
|
+
// ── store ──────────────────────────────────────────────────────────────
|
|
41
|
+
memory
|
|
42
|
+
.command('store')
|
|
43
|
+
.description('Store a key-value pair in memory')
|
|
44
|
+
.requiredOption('--key <key>', 'Memory key')
|
|
45
|
+
.requiredOption('--value <value>', 'Value to store (string or JSON)')
|
|
46
|
+
.option('--namespace <ns>', 'Namespace for grouping', 'default')
|
|
47
|
+
.option('--ttl <seconds>', 'Time-to-live in seconds')
|
|
48
|
+
.option('--json', 'Output as JSON')
|
|
49
|
+
.action(async (options) => {
|
|
50
|
+
if (!await ensureInitialized())
|
|
51
|
+
return;
|
|
52
|
+
try {
|
|
53
|
+
const { handleMemoryStore } = await import('../../mcp/handlers/memory-handlers.js');
|
|
54
|
+
// Try to parse value as JSON, otherwise store as string
|
|
55
|
+
let value = options.value;
|
|
56
|
+
try {
|
|
57
|
+
value = JSON.parse(options.value);
|
|
58
|
+
}
|
|
59
|
+
catch { /* keep as string */ }
|
|
60
|
+
const result = await handleMemoryStore({
|
|
61
|
+
key: options.key,
|
|
62
|
+
value,
|
|
63
|
+
namespace: options.namespace,
|
|
64
|
+
ttl: options.ttl ? parseInt(options.ttl, 10) : undefined,
|
|
65
|
+
});
|
|
66
|
+
if (options.json) {
|
|
67
|
+
console.log(JSON.stringify(result, null, 2));
|
|
68
|
+
}
|
|
69
|
+
else if (result.success) {
|
|
70
|
+
console.log(chalk.green(` ✓ Stored "${options.key}" in namespace "${options.namespace}"`));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
74
|
+
await cleanupAndExit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
79
|
+
await cleanupAndExit(1);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
// ── get ─────────────────────────────────────────────────────────────────
|
|
83
|
+
memory
|
|
84
|
+
.command('get')
|
|
85
|
+
.description('Retrieve a value by key')
|
|
86
|
+
.requiredOption('--key <key>', 'Memory key to retrieve')
|
|
87
|
+
.option('--namespace <ns>', 'Namespace', 'default')
|
|
88
|
+
.option('--include-metadata', 'Include metadata in response')
|
|
89
|
+
.option('--json', 'Output as JSON')
|
|
90
|
+
.action(async (options) => {
|
|
91
|
+
if (!await ensureInitialized())
|
|
92
|
+
return;
|
|
93
|
+
try {
|
|
94
|
+
const { handleMemoryRetrieve } = await import('../../mcp/handlers/memory-handlers.js');
|
|
95
|
+
const result = await handleMemoryRetrieve({
|
|
96
|
+
key: options.key,
|
|
97
|
+
namespace: options.namespace,
|
|
98
|
+
includeMetadata: options.includeMetadata,
|
|
99
|
+
});
|
|
100
|
+
if (options.json) {
|
|
101
|
+
console.log(JSON.stringify(result, null, 2));
|
|
102
|
+
}
|
|
103
|
+
else if (result.success && result.data) {
|
|
104
|
+
if (result.data.found) {
|
|
105
|
+
const val = typeof result.data.value === 'string'
|
|
106
|
+
? result.data.value
|
|
107
|
+
: JSON.stringify(result.data.value, null, 2);
|
|
108
|
+
console.log(chalk.green(` ${options.key}`) + chalk.gray(` [${options.namespace}]`));
|
|
109
|
+
console.log(` ${val}`);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
console.log(chalk.yellow(` Key "${options.key}" not found in namespace "${options.namespace}"`));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
117
|
+
await cleanupAndExit(1);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
122
|
+
await cleanupAndExit(1);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
// ── search ──────────────────────────────────────────────────────────────
|
|
126
|
+
memory
|
|
127
|
+
.command('search')
|
|
128
|
+
.description('Search memory by pattern (glob) or semantic query')
|
|
129
|
+
.option('--pattern <glob>', 'Glob pattern to match keys (e.g., "auth*")')
|
|
130
|
+
.option('--query <text>', 'Natural language query (implies --semantic)')
|
|
131
|
+
.option('--semantic', 'Use HNSW vector search for semantic matching')
|
|
132
|
+
.option('--namespace <ns>', 'Namespace to search in', 'default')
|
|
133
|
+
.option('--limit <n>', 'Maximum results', '20')
|
|
134
|
+
.option('--offset <n>', 'Skip first N results', '0')
|
|
135
|
+
.option('--json', 'Output as JSON')
|
|
136
|
+
.action(async (options) => {
|
|
137
|
+
if (!options.pattern && !options.query) {
|
|
138
|
+
console.error(chalk.red(' Either --pattern or --query is required'));
|
|
139
|
+
await cleanupAndExit(1);
|
|
140
|
+
}
|
|
141
|
+
if (!await ensureInitialized())
|
|
142
|
+
return;
|
|
143
|
+
try {
|
|
144
|
+
const { handleMemoryQuery } = await import('../../mcp/handlers/memory-handlers.js');
|
|
145
|
+
const searchPattern = options.query || options.pattern;
|
|
146
|
+
const useSemantic = options.semantic || !!options.query;
|
|
147
|
+
const result = await handleMemoryQuery({
|
|
148
|
+
pattern: searchPattern,
|
|
149
|
+
namespace: options.namespace,
|
|
150
|
+
limit: parseInt(options.limit, 10),
|
|
151
|
+
offset: parseInt(options.offset, 10),
|
|
152
|
+
semantic: useSemantic,
|
|
153
|
+
});
|
|
154
|
+
if (options.json) {
|
|
155
|
+
console.log(JSON.stringify(result, null, 2));
|
|
156
|
+
}
|
|
157
|
+
else if (result.success && result.data) {
|
|
158
|
+
const { entries, total, searchType } = result.data;
|
|
159
|
+
console.log(chalk.blue(` ${total} result(s) via ${searchType} search\n`));
|
|
160
|
+
for (const entry of entries) {
|
|
161
|
+
const score = entry.score !== undefined ? chalk.gray(` (score: ${entry.score.toFixed(3)})`) : '';
|
|
162
|
+
console.log(` ${chalk.green(entry.key)} ${chalk.gray(`[${entry.namespace}]`)}${score}`);
|
|
163
|
+
}
|
|
164
|
+
if (result.data.hasMore) {
|
|
165
|
+
console.log(chalk.gray(`\n ... and more. Use --offset ${parseInt(options.offset, 10) + parseInt(options.limit, 10)} to see next page`));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
170
|
+
await cleanupAndExit(1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
175
|
+
await cleanupAndExit(1);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
// ── list ────────────────────────────────────────────────────────────────
|
|
179
|
+
memory
|
|
180
|
+
.command('list')
|
|
181
|
+
.description('List all memory entries in a namespace')
|
|
182
|
+
.option('--namespace <ns>', 'Namespace to list', 'default')
|
|
183
|
+
.option('--limit <n>', 'Maximum results', '50')
|
|
184
|
+
.option('--json', 'Output as JSON')
|
|
185
|
+
.action(async (options) => {
|
|
186
|
+
if (!await ensureInitialized())
|
|
187
|
+
return;
|
|
188
|
+
try {
|
|
189
|
+
const { handleMemoryQuery } = await import('../../mcp/handlers/memory-handlers.js');
|
|
190
|
+
const result = await handleMemoryQuery({
|
|
191
|
+
pattern: '*',
|
|
192
|
+
namespace: options.namespace,
|
|
193
|
+
limit: parseInt(options.limit, 10),
|
|
194
|
+
});
|
|
195
|
+
if (options.json) {
|
|
196
|
+
console.log(JSON.stringify(result, null, 2));
|
|
197
|
+
}
|
|
198
|
+
else if (result.success && result.data) {
|
|
199
|
+
console.log(chalk.blue(` ${result.data.total} entries in namespace "${options.namespace}"\n`));
|
|
200
|
+
for (const entry of result.data.entries) {
|
|
201
|
+
console.log(` ${chalk.green(entry.key)}`);
|
|
202
|
+
}
|
|
203
|
+
if (result.data.hasMore) {
|
|
204
|
+
console.log(chalk.gray(`\n ... more entries exist. Use --limit to see more.`));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
209
|
+
await cleanupAndExit(1);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
214
|
+
await cleanupAndExit(1);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
// ── delete ──────────────────────────────────────────────────────────────
|
|
218
|
+
memory
|
|
219
|
+
.command('delete')
|
|
220
|
+
.description('Delete a memory entry by key')
|
|
221
|
+
.requiredOption('--key <key>', 'Memory key to delete')
|
|
222
|
+
.option('--namespace <ns>', 'Namespace', 'default')
|
|
223
|
+
.option('--json', 'Output as JSON')
|
|
224
|
+
.action(async (options) => {
|
|
225
|
+
if (!await ensureInitialized())
|
|
226
|
+
return;
|
|
227
|
+
try {
|
|
228
|
+
const { handleMemoryDelete } = await import('../../mcp/handlers/memory-handlers.js');
|
|
229
|
+
const result = await handleMemoryDelete({
|
|
230
|
+
key: options.key,
|
|
231
|
+
namespace: options.namespace,
|
|
232
|
+
});
|
|
233
|
+
if (options.json) {
|
|
234
|
+
console.log(JSON.stringify(result, null, 2));
|
|
235
|
+
}
|
|
236
|
+
else if (result.success && result.data) {
|
|
237
|
+
if (result.data.deleted) {
|
|
238
|
+
console.log(chalk.green(` ✓ Deleted "${options.key}" from namespace "${options.namespace}"`));
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
console.log(chalk.yellow(` Key "${options.key}" not found in namespace "${options.namespace}"`));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
246
|
+
await cleanupAndExit(1);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
251
|
+
await cleanupAndExit(1);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
// ── share ───────────────────────────────────────────────────────────────
|
|
255
|
+
memory
|
|
256
|
+
.command('share')
|
|
257
|
+
.description('Share knowledge between agents')
|
|
258
|
+
.requiredOption('--from <agentId>', 'Source agent ID')
|
|
259
|
+
.requiredOption('--to <agentIds>', 'Comma-separated target agent IDs')
|
|
260
|
+
.requiredOption('--domain <domain>', 'Knowledge domain')
|
|
261
|
+
.requiredOption('--content <json>', 'JSON content to share')
|
|
262
|
+
.option('--json', 'Output as JSON')
|
|
263
|
+
.action(async (options) => {
|
|
264
|
+
if (!await ensureInitialized())
|
|
265
|
+
return;
|
|
266
|
+
try {
|
|
267
|
+
const { handleMemoryShare } = await import('../../mcp/handlers/memory-handlers.js');
|
|
268
|
+
let content;
|
|
269
|
+
try {
|
|
270
|
+
content = JSON.parse(options.content);
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
console.error(chalk.red(' --content must be valid JSON'));
|
|
274
|
+
await cleanupAndExit(1);
|
|
275
|
+
return; // unreachable but satisfies TS
|
|
276
|
+
}
|
|
277
|
+
const targetIds = options.to.split(',').map((s) => s.trim());
|
|
278
|
+
const result = await handleMemoryShare({
|
|
279
|
+
sourceAgentId: options.from,
|
|
280
|
+
targetAgentIds: targetIds,
|
|
281
|
+
knowledgeDomain: options.domain,
|
|
282
|
+
knowledgeContent: content,
|
|
283
|
+
});
|
|
284
|
+
if (options.json) {
|
|
285
|
+
console.log(JSON.stringify(result, null, 2));
|
|
286
|
+
}
|
|
287
|
+
else if (result.success && result.data) {
|
|
288
|
+
console.log(chalk.green(` ✓ Shared knowledge from ${result.data.sourceAgent} to ${result.data.targetAgents.join(', ')}`));
|
|
289
|
+
console.log(chalk.gray(` Domain: ${result.data.domain}`));
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
293
|
+
await cleanupAndExit(1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
catch (error) {
|
|
297
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
298
|
+
await cleanupAndExit(1);
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
// ── usage ───────────────────────────────────────────────────────────────
|
|
302
|
+
memory
|
|
303
|
+
.command('usage')
|
|
304
|
+
.description('Show memory usage statistics')
|
|
305
|
+
.option('--json', 'Output as JSON')
|
|
306
|
+
.action(async (options) => {
|
|
307
|
+
if (!await ensureInitialized())
|
|
308
|
+
return;
|
|
309
|
+
try {
|
|
310
|
+
const { handleMemoryUsage } = await import('../../mcp/handlers/memory-handlers.js');
|
|
311
|
+
const result = await handleMemoryUsage();
|
|
312
|
+
if (options.json) {
|
|
313
|
+
console.log(JSON.stringify(result, null, 2));
|
|
314
|
+
}
|
|
315
|
+
else if (result.success && result.data) {
|
|
316
|
+
console.log(chalk.blue(' Memory Usage\n'));
|
|
317
|
+
console.log(` Entries: ${chalk.green(String(result.data.entries))}`);
|
|
318
|
+
console.log(` Vectors: ${chalk.green(String(result.data.vectors))}`);
|
|
319
|
+
console.log(` Namespaces: ${chalk.green(String(result.data.namespaces))}`);
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
console.error(chalk.red(` ✗ ${result.error}`));
|
|
323
|
+
await cleanupAndExit(1);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
catch (error) {
|
|
327
|
+
console.error(chalk.red(` Error: ${toErrorMessage(error)}`));
|
|
328
|
+
await cleanupAndExit(1);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
return memory;
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { Command } from 'commander';
|
|
10
10
|
import chalk from 'chalk';
|
|
11
11
|
import { getRuVectorFeatureFlags, setRuVectorFeatureFlags, DEFAULT_FEATURE_FLAGS, } from '../../integrations/ruvector/feature-flags.js';
|
|
12
|
+
import { HnswAdapter } from '../../kernel/hnsw-adapter.js';
|
|
12
13
|
// ============================================================================
|
|
13
14
|
// Constants
|
|
14
15
|
// ============================================================================
|
|
@@ -44,7 +45,7 @@ const FLAG_DESCRIPTIONS = {
|
|
|
44
45
|
useHnswHealthMonitor: 'HNSW health monitor (Task 3.4)',
|
|
45
46
|
useRegretTracking: 'Regret tracking & learning health (Task 2.4)',
|
|
46
47
|
useCoherenceGate: 'Sheaf-gated coherence validation (ADR-083, Task 3.1)',
|
|
47
|
-
useWitnessChain: '
|
|
48
|
+
useWitnessChain: 'SHA-256 hash-chained witness records (Task 3.1)',
|
|
48
49
|
useCNNVisualRegression: 'CNN visual regression testing (Task 4.3)',
|
|
49
50
|
useDAGAttention: 'DAG attention for test scheduling (Task 4.2)',
|
|
50
51
|
useCoherenceActionGate: 'Coherence-gated agent actions (ADR-083, Task 3.2)',
|
|
@@ -102,6 +103,15 @@ function isDefaultValue(flag, value) {
|
|
|
102
103
|
function padRight(str, length) {
|
|
103
104
|
return str.padEnd(length);
|
|
104
105
|
}
|
|
106
|
+
function formatBytes(bytes) {
|
|
107
|
+
if (bytes < 1024)
|
|
108
|
+
return `${bytes}B`;
|
|
109
|
+
if (bytes < 1024 * 1024)
|
|
110
|
+
return `${(bytes / 1024).toFixed(1)}KB`;
|
|
111
|
+
if (bytes < 1024 * 1024 * 1024)
|
|
112
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
|
|
113
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)}GB`;
|
|
114
|
+
}
|
|
105
115
|
function isValidFlagName(name) {
|
|
106
116
|
return VALID_FLAG_NAMES.includes(name);
|
|
107
117
|
}
|
|
@@ -134,6 +144,36 @@ function executeStatus() {
|
|
|
134
144
|
const suffix = isDefault ? chalk.gray(' (default)') : chalk.yellow(' (modified)');
|
|
135
145
|
console.log(` ${padRight(flagName + ':', 30)} ${valueText}${suffix}`);
|
|
136
146
|
}
|
|
147
|
+
// HNSW Memory Usage
|
|
148
|
+
const indexNames = HnswAdapter.listIndexes();
|
|
149
|
+
if (indexNames.length > 0) {
|
|
150
|
+
console.log('');
|
|
151
|
+
console.log(chalk.cyan(' HNSW Memory Usage:'));
|
|
152
|
+
let totalVectors = 0;
|
|
153
|
+
let totalEstimatedBytes = 0;
|
|
154
|
+
for (const name of indexNames) {
|
|
155
|
+
const adapter = HnswAdapter.get(name);
|
|
156
|
+
if (adapter) {
|
|
157
|
+
const count = adapter.size();
|
|
158
|
+
const dims = adapter.dimensions();
|
|
159
|
+
// Raw vectors + HNSW graph overhead (~2x)
|
|
160
|
+
const rawBytes = count * dims * 4;
|
|
161
|
+
const estimatedBytes = rawBytes * 3;
|
|
162
|
+
totalVectors += count;
|
|
163
|
+
totalEstimatedBytes += estimatedBytes;
|
|
164
|
+
console.log(` ${padRight(name + ':', 20)} ${chalk.white(String(count))} vectors, ` +
|
|
165
|
+
`${chalk.white(dims)}d, ~${chalk.white(formatBytes(estimatedBytes))}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
console.log(chalk.gray(` ${'─'.repeat(50)}`));
|
|
169
|
+
console.log(` ${padRight('Total:', 20)} ${chalk.bold.white(String(totalVectors))} vectors, ` +
|
|
170
|
+
`~${chalk.bold.white(formatBytes(totalEstimatedBytes))}`);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
console.log('');
|
|
174
|
+
console.log(chalk.cyan(' HNSW Memory Usage:'));
|
|
175
|
+
console.log(chalk.gray(' No active indexes (indexes are created on first use)'));
|
|
176
|
+
}
|
|
137
177
|
// Memory info when compression is enabled
|
|
138
178
|
if (flags.useTemporalCompression) {
|
|
139
179
|
console.log('');
|
|
@@ -49,6 +49,7 @@ export class InitHandler {
|
|
|
49
49
|
.option('--with-codex', 'Include OpenAI Codex CLI MCP config and AGENTS.md')
|
|
50
50
|
.option('--with-windsurf', 'Include Windsurf MCP config and rules')
|
|
51
51
|
.option('--with-continuedev', 'Include Continue.dev MCP config and rules')
|
|
52
|
+
.option('--with-mcp', 'Include MCP server config in .mcp.json (opt-in — CLI works without MCP)')
|
|
52
53
|
.option('--with-all-platforms', 'Include all coding agent platform configurations')
|
|
53
54
|
.option('--auto-migrate', 'Automatically migrate from v2 if detected')
|
|
54
55
|
.option('--with-claude-flow', 'Force Claude Flow integration setup')
|
|
@@ -114,6 +115,7 @@ export class InitHandler {
|
|
|
114
115
|
withCodex: options.withCodex,
|
|
115
116
|
withWindsurf: options.withWindsurf,
|
|
116
117
|
withContinueDev: options.withContinuedev,
|
|
118
|
+
withMcp: options.withMcp,
|
|
117
119
|
noGovernance: options.noGovernance,
|
|
118
120
|
});
|
|
119
121
|
console.log(chalk.white(' Analyzing project...\n'));
|
|
@@ -170,9 +172,14 @@ export class InitHandler {
|
|
|
170
172
|
console.log(chalk.gray(` - Claude Flow: ${cfResult?.available ? 'Enabled' : 'Standalone mode'}`));
|
|
171
173
|
console.log(chalk.gray(` - Total time: ${result.totalDurationMs}ms\n`));
|
|
172
174
|
console.log(chalk.white('Next steps:'));
|
|
173
|
-
console.log(chalk.gray(' 1.
|
|
174
|
-
console.log(chalk.gray(' 2.
|
|
175
|
-
console.log(chalk.gray(' 3. Check status: aqe status
|
|
175
|
+
console.log(chalk.gray(' 1. Run tests: aqe test <path>'));
|
|
176
|
+
console.log(chalk.gray(' 2. Check coverage: aqe coverage <path>'));
|
|
177
|
+
console.log(chalk.gray(' 3. Check status: aqe status'));
|
|
178
|
+
if (!result.summary.mcpConfigured) {
|
|
179
|
+
console.log(chalk.gray('\n Optional — enable MCP server for richer agent integration:'));
|
|
180
|
+
console.log(chalk.gray(' aqe init --with-mcp'));
|
|
181
|
+
console.log(chalk.gray(' # or manually: claude mcp add aqe -- aqe-mcp\n'));
|
|
182
|
+
}
|
|
176
183
|
}
|
|
177
184
|
else {
|
|
178
185
|
console.log(chalk.red(' Initialization failed. Check errors above.\n'));
|
|
@@ -220,9 +227,14 @@ export class InitHandler {
|
|
|
220
227
|
}
|
|
221
228
|
console.log(chalk.gray(` - Total time: ${result.totalDurationMs}ms\n`));
|
|
222
229
|
console.log(chalk.white('Next steps:'));
|
|
223
|
-
console.log(chalk.gray(' 1.
|
|
224
|
-
console.log(chalk.gray(' 2.
|
|
225
|
-
console.log(chalk.gray(' 3. Check status: aqe status
|
|
230
|
+
console.log(chalk.gray(' 1. Run tests: aqe test <path>'));
|
|
231
|
+
console.log(chalk.gray(' 2. Check coverage: aqe coverage <path>'));
|
|
232
|
+
console.log(chalk.gray(' 3. Check status: aqe status'));
|
|
233
|
+
if (!result.summary.mcpConfigured) {
|
|
234
|
+
console.log(chalk.gray('\n Optional — enable MCP server for richer agent integration:'));
|
|
235
|
+
console.log(chalk.gray(' aqe init --with-mcp'));
|
|
236
|
+
console.log(chalk.gray(' # or manually: claude mcp add aqe -- aqe-mcp\n'));
|
|
237
|
+
}
|
|
226
238
|
}
|
|
227
239
|
else {
|
|
228
240
|
console.log(chalk.red(' Initialization failed. Check errors above.\n'));
|
package/dist/cli/index.js
CHANGED
|
@@ -816,6 +816,7 @@ import { createLLMRouterCommand } from './commands/llm-router.js';
|
|
|
816
816
|
import { createSyncCommands } from './commands/sync.js';
|
|
817
817
|
import { createHooksCommand } from './commands/hooks.js';
|
|
818
818
|
import { createLearningCommand } from './commands/learning.js';
|
|
819
|
+
import { createMemoryCommand } from './commands/memory.js';
|
|
819
820
|
import { createMcpCommand } from './commands/mcp.js';
|
|
820
821
|
import { createPlatformCommand } from './commands/platform.js';
|
|
821
822
|
import { createProveCommand } from './commands/prove.js';
|
|
@@ -826,6 +827,7 @@ program.addCommand(createLLMRouterCommand());
|
|
|
826
827
|
program.addCommand(createSyncCommands());
|
|
827
828
|
program.addCommand(createHooksCommand());
|
|
828
829
|
program.addCommand(createLearningCommand());
|
|
830
|
+
program.addCommand(createMemoryCommand(context, cleanupAndExit, ensureInitialized));
|
|
829
831
|
program.addCommand(createMcpCommand());
|
|
830
832
|
program.addCommand(createPlatformCommand());
|
|
831
833
|
program.addCommand(createProveCommand(context, cleanupAndExit, ensureInitialized));
|
|
@@ -1041,6 +1041,7 @@ Return JSON: { "rankedIds": ["id1", "id2", ...], "insights": ["insight1", "insig
|
|
|
1041
1041
|
rs: 'rust',
|
|
1042
1042
|
rb: 'ruby',
|
|
1043
1043
|
cs: 'csharp',
|
|
1044
|
+
swift: 'swift',
|
|
1044
1045
|
};
|
|
1045
1046
|
return typeMap[ext] || 'unknown';
|
|
1046
1047
|
}
|
|
@@ -1052,6 +1053,8 @@ Return JSON: { "rankedIds": ["id1", "id2", ...], "insights": ["insight1", "insig
|
|
|
1052
1053
|
go: ['go'],
|
|
1053
1054
|
java: ['java'],
|
|
1054
1055
|
rust: ['rs'],
|
|
1056
|
+
csharp: ['cs'],
|
|
1057
|
+
swift: ['swift'],
|
|
1055
1058
|
};
|
|
1056
1059
|
return languages.some((lang) => {
|
|
1057
1060
|
const exts = langMap[lang.toLowerCase()] || [lang];
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* - LCOV format (from Istanbul, nyc, c8)
|
|
6
6
|
* - Cobertura XML format
|
|
7
7
|
* - JSON format (Istanbul/vitest)
|
|
8
|
+
* - JaCoCo XML format (Java/Kotlin)
|
|
9
|
+
* - dotcover XML format (C#/.NET)
|
|
10
|
+
* - Tarpaulin JSON format (Rust)
|
|
11
|
+
* - Go cover text format (Go)
|
|
12
|
+
* - Kover XML format (Kotlin/JVM)
|
|
13
|
+
* - xcresult JSON format (Swift/iOS)
|
|
8
14
|
*
|
|
9
15
|
* This is NOT a simulation - it reads and parses real coverage data.
|
|
10
16
|
*
|
|
@@ -115,8 +121,10 @@ export interface FunctionDetail {
|
|
|
115
121
|
export interface CoverageReport {
|
|
116
122
|
/** Timestamp of when the report was generated */
|
|
117
123
|
timestamp: Date;
|
|
118
|
-
/** Source format
|
|
119
|
-
format:
|
|
124
|
+
/** Source format */
|
|
125
|
+
format: CoverageFormat;
|
|
126
|
+
/** Detected source language (when determinable from format) */
|
|
127
|
+
language?: string;
|
|
120
128
|
/** Coverage data by file */
|
|
121
129
|
files: Map<string, FileCoverageData>;
|
|
122
130
|
/** Summary statistics */
|
|
@@ -153,6 +161,10 @@ export interface CoverageSummary {
|
|
|
153
161
|
percentage: number;
|
|
154
162
|
};
|
|
155
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Supported coverage format types
|
|
166
|
+
*/
|
|
167
|
+
export type CoverageFormat = 'lcov' | 'cobertura' | 'json' | 'jacoco' | 'dotcover' | 'tarpaulin' | 'gocover' | 'kover' | 'xcresult';
|
|
156
168
|
/**
|
|
157
169
|
* Parse LCOV format coverage data
|
|
158
170
|
*
|
|
@@ -168,9 +180,65 @@ export declare function parseLCOVContent(content: string, projectRoot: string):
|
|
|
168
180
|
*/
|
|
169
181
|
export declare function parseJSONCoverage(jsonPath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
170
182
|
/**
|
|
171
|
-
*
|
|
183
|
+
* Parse JaCoCo XML coverage data.
|
|
184
|
+
*
|
|
185
|
+
* JaCoCo XML structure:
|
|
186
|
+
* <report><package><class><method><counter type="LINE" missed="X" covered="Y"/></method></class></package></report>
|
|
187
|
+
*/
|
|
188
|
+
export declare function parseJaCoCo(xmlPath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
189
|
+
export declare function parseJaCoCoContent(content: string, projectRoot: string): CoverageReport;
|
|
190
|
+
/**
|
|
191
|
+
* Parse dotcover XML coverage data.
|
|
192
|
+
*
|
|
193
|
+
* dotcover XML structure:
|
|
194
|
+
* <Root CoveredStatements="X" TotalStatements="Y"><Assembly><Namespace><Type><Member Statement="..."/></Type></Namespace></Assembly></Root>
|
|
195
|
+
*/
|
|
196
|
+
export declare function parseDotcover(xmlPath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
197
|
+
export declare function parseDotcoverContent(content: string, projectRoot: string): CoverageReport;
|
|
198
|
+
/**
|
|
199
|
+
* Parse Tarpaulin JSON coverage data.
|
|
200
|
+
*
|
|
201
|
+
* Tarpaulin JSON structure (--output-dir with --out Json):
|
|
202
|
+
* { "files": [ { "path": "...", "content": "...", "traces": [ { "line": N, "stats": { "Line": N } } ] } ] }
|
|
203
|
+
*
|
|
204
|
+
* Also handles tarpaulin LCOV output by delegating to parseLCOVContent.
|
|
205
|
+
*/
|
|
206
|
+
export declare function parseTarpaulin(filePath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
207
|
+
export declare function parseTarpaulinContent(content: string, projectRoot: string): CoverageReport;
|
|
208
|
+
/**
|
|
209
|
+
* Parse Go coverage profile text format.
|
|
210
|
+
*
|
|
211
|
+
* Format:
|
|
212
|
+
* mode: set|count|atomic
|
|
213
|
+
* pkg/file.go:startLine.startCol,endLine.endCol numStatements count
|
|
214
|
+
*/
|
|
215
|
+
export declare function parseGoCover(coverPath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
216
|
+
export declare function parseGoCoverContent(content: string, projectRoot: string): CoverageReport;
|
|
217
|
+
/**
|
|
218
|
+
* Parse Kover XML coverage data.
|
|
219
|
+
*
|
|
220
|
+
* Kover outputs JaCoCo-compatible XML. This delegates to the JaCoCo parser
|
|
221
|
+
* but sets the format and language appropriately.
|
|
222
|
+
*/
|
|
223
|
+
export declare function parseKover(xmlPath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
224
|
+
/**
|
|
225
|
+
* Parse xcresult coverage data exported via:
|
|
226
|
+
* xcrun xccov view --report --json result.xcresult > coverage.json
|
|
227
|
+
*
|
|
228
|
+
* Structure:
|
|
229
|
+
* { "targets": [ { "files": [ { "path": "...", "lineCoverage": 0.85, "coveredLines": N, "executableLines": N, "functions": [...] } ] } ] }
|
|
230
|
+
*/
|
|
231
|
+
export declare function parseXcresult(jsonPath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
232
|
+
export declare function parseXcresultContent(content: string, projectRoot: string): CoverageReport;
|
|
233
|
+
/**
|
|
234
|
+
* Auto-detect coverage format and parse accordingly.
|
|
235
|
+
*
|
|
236
|
+
* @param coveragePath - Path to the coverage file
|
|
237
|
+
* @param projectRoot - Project root for relative path calculation
|
|
238
|
+
* @param format - Explicit format override
|
|
239
|
+
* @param language - Language hint for format inference
|
|
172
240
|
*/
|
|
173
|
-
export declare function parseCoverage(coveragePath: string, projectRoot?: string): Promise<CoverageReport>;
|
|
241
|
+
export declare function parseCoverage(coveragePath: string, projectRoot?: string, format?: CoverageFormat, language?: string): Promise<CoverageReport>;
|
|
174
242
|
/**
|
|
175
243
|
* Find and parse coverage files in a directory
|
|
176
244
|
*/
|