@veewo/gitnexus 1.5.0-rc.4 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmark/agent-context/runner.js +3 -0
- package/dist/benchmark/agent-context/runner.test.js +22 -0
- package/dist/benchmark/agent-context/tool-runner.d.ts +7 -6
- package/dist/benchmark/agent-safe-query-context/io.d.ts +2 -0
- package/dist/benchmark/agent-safe-query-context/io.js +86 -0
- package/dist/benchmark/agent-safe-query-context/io.test.d.ts +1 -0
- package/dist/benchmark/agent-safe-query-context/io.test.js +13 -0
- package/dist/benchmark/agent-safe-query-context/report.d.ts +57 -0
- package/dist/benchmark/agent-safe-query-context/report.js +159 -0
- package/dist/benchmark/agent-safe-query-context/report.test.d.ts +1 -0
- package/dist/benchmark/agent-safe-query-context/report.test.js +362 -0
- package/dist/benchmark/agent-safe-query-context/runner.d.ts +44 -0
- package/dist/benchmark/agent-safe-query-context/runner.js +406 -0
- package/dist/benchmark/agent-safe-query-context/runner.test.d.ts +1 -0
- package/dist/benchmark/agent-safe-query-context/runner.test.js +290 -0
- package/dist/benchmark/agent-safe-query-context/semantic-tuple.d.ts +20 -0
- package/dist/benchmark/agent-safe-query-context/semantic-tuple.js +225 -0
- package/dist/benchmark/agent-safe-query-context/semantic-tuple.test.d.ts +1 -0
- package/dist/benchmark/agent-safe-query-context/semantic-tuple.test.js +122 -0
- package/dist/benchmark/agent-safe-query-context/subagent-live.d.ts +47 -0
- package/dist/benchmark/agent-safe-query-context/subagent-live.js +128 -0
- package/dist/benchmark/agent-safe-query-context/subagent-live.test.d.ts +1 -0
- package/dist/benchmark/agent-safe-query-context/subagent-live.test.js +155 -0
- package/dist/benchmark/agent-safe-query-context/telemetry-tool.d.ts +9 -0
- package/dist/benchmark/agent-safe-query-context/telemetry-tool.js +77 -0
- package/dist/benchmark/agent-safe-query-context/types.d.ts +61 -0
- package/dist/benchmark/agent-safe-query-context/types.js +8 -0
- package/dist/benchmark/analyze-runner.d.ts +1 -1
- package/dist/benchmark/analyze-runner.js +4 -3
- package/dist/benchmark/analyze-runner.test.js +7 -0
- package/dist/benchmark/runtime-poc/provenance-artifact.d.ts +47 -0
- package/dist/benchmark/runtime-poc/provenance-artifact.js +89 -0
- package/dist/benchmark/runtime-poc/runner.d.ts +31 -0
- package/dist/benchmark/runtime-poc/runner.js +163 -0
- package/dist/benchmark/u2-e2e/hydration-policy-repeatability-runner.d.ts +8 -0
- package/dist/benchmark/u2-e2e/hydration-policy-repeatability-runner.js +21 -0
- package/dist/benchmark/u2-e2e/phase2-runtime-claim-acceptance-runner.d.ts +0 -1
- package/dist/benchmark/u2-e2e/phase2-runtime-claim-acceptance-runner.js +53 -51
- package/dist/benchmark/u2-e2e/phase2-runtime-claim-acceptance-runner.test.js +0 -1
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.d.ts +1 -1
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.js +82 -18
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.test.js +1 -2
- package/dist/benchmark/u2-e2e/retrieval-runner.js +15 -7
- package/dist/benchmark/u2-e2e/retrieval-runner.test.js +46 -0
- package/dist/cli/ai-context.d.ts +0 -1
- package/dist/cli/ai-context.js +5 -6
- package/dist/cli/ai-context.test.js +8 -0
- package/dist/cli/analyze-options.js +58 -34
- package/dist/cli/analyze-options.test.js +57 -0
- package/dist/cli/analyze-runtime-summary.js +2 -0
- package/dist/cli/analyze-runtime-summary.test.js +12 -0
- package/dist/cli/analyze-summary.d.ts +4 -0
- package/dist/cli/analyze-summary.js +43 -0
- package/dist/cli/analyze-summary.test.js +65 -1
- package/dist/cli/analyze.d.ts +11 -0
- package/dist/cli/analyze.js +34 -5
- package/dist/cli/analyze.test.d.ts +1 -0
- package/dist/cli/analyze.test.js +25 -0
- package/dist/cli/benchmark-agent-context.js +1 -1
- package/dist/cli/benchmark-agent-safe-query-context.d.ts +20 -0
- package/dist/cli/benchmark-agent-safe-query-context.js +39 -0
- package/dist/cli/benchmark-agent-safe-query-context.test.d.ts +1 -0
- package/dist/cli/benchmark-agent-safe-query-context.test.js +271 -0
- package/dist/cli/benchmark-unity.js +1 -1
- package/dist/cli/benchmark-unity.test.js +5 -1
- package/dist/cli/benchmark.d.ts +29 -0
- package/dist/cli/benchmark.js +55 -0
- package/dist/cli/index.js +27 -2
- package/dist/cli/rule-lab.d.ts +3 -7
- package/dist/cli/rule-lab.js +13 -22
- package/dist/cli/rule-lab.test.js +23 -3
- package/dist/cli/scope-manifest-config.d.ts +9 -0
- package/dist/cli/scope-manifest-config.js +37 -0
- package/dist/cli/setup.js +40 -41
- package/dist/cli/setup.test.js +14 -14
- package/dist/cli/sync-manifest.d.ts +27 -0
- package/dist/cli/sync-manifest.js +200 -0
- package/dist/cli/sync-manifest.test.d.ts +1 -0
- package/dist/cli/sync-manifest.test.js +88 -0
- package/dist/cli/tool.d.ts +2 -0
- package/dist/cli/tool.js +2 -0
- package/dist/core/config/unity-config.d.ts +1 -1
- package/dist/core/config/unity-config.js +1 -1
- package/dist/core/ingestion/call-processor.d.ts +2 -1
- package/dist/core/ingestion/call-processor.js +28 -6
- package/dist/core/ingestion/heritage-processor.d.ts +2 -1
- package/dist/core/ingestion/heritage-processor.js +30 -7
- package/dist/core/ingestion/import-processor.d.ts +2 -1
- package/dist/core/ingestion/import-processor.js +28 -6
- package/dist/core/ingestion/parsing-processor.d.ts +5 -3
- package/dist/core/ingestion/parsing-processor.js +46 -13
- package/dist/core/ingestion/pipeline.js +100 -19
- package/dist/core/ingestion/unity-lifecycle-synthetic-calls.test.js +18 -20
- package/dist/core/ingestion/unity-parity-seed.d.ts +2 -1
- package/dist/core/ingestion/unity-parity-seed.js +8 -0
- package/dist/core/ingestion/unity-resource-processor.d.ts +11 -0
- package/dist/core/ingestion/unity-resource-processor.js +102 -0
- package/dist/core/ingestion/unity-resource-processor.test.js +449 -0
- package/dist/core/ingestion/unity-runtime-binding-rules.d.ts +16 -1
- package/dist/core/ingestion/unity-runtime-binding-rules.js +193 -42
- package/dist/core/ingestion/workers/parse-worker.d.ts +2 -0
- package/dist/core/ingestion/workers/parse-worker.js +50 -6
- package/dist/core/lbug/csv-generator.test.js +2 -2
- package/dist/core/tree-sitter/csharp-define-profile.d.ts +6 -0
- package/dist/core/tree-sitter/csharp-define-profile.js +43 -0
- package/dist/core/tree-sitter/csharp-preproc-normalizer.d.ts +14 -0
- package/dist/core/tree-sitter/csharp-preproc-normalizer.js +261 -0
- package/dist/core/tree-sitter/parser-loader.d.ts +10 -0
- package/dist/core/tree-sitter/parser-loader.js +19 -0
- package/dist/core/unity/doc-contract.test.d.ts +1 -0
- package/dist/core/unity/doc-contract.test.js +30 -0
- package/dist/core/unity/prefab-source-scan.d.ts +25 -0
- package/dist/core/unity/prefab-source-scan.js +152 -0
- package/dist/core/unity/prefab-source-scan.test.d.ts +1 -0
- package/dist/core/unity/prefab-source-scan.test.js +70 -0
- package/dist/core/unity/scan-context.d.ts +12 -0
- package/dist/core/unity/scan-context.js +50 -2
- package/dist/core/unity/scan-context.test.js +74 -0
- package/dist/mcp/local/agent-safe-response.d.ts +10 -0
- package/dist/mcp/local/agent-safe-response.js +639 -0
- package/dist/mcp/local/derived-process-reader.js +1 -1
- package/dist/mcp/local/local-backend.d.ts +18 -1
- package/dist/mcp/local/local-backend.js +319 -125
- package/dist/mcp/local/process-confidence.d.ts +1 -2
- package/dist/mcp/local/process-confidence.js +0 -3
- package/dist/mcp/local/process-confidence.test.js +4 -2
- package/dist/mcp/local/process-evidence.d.ts +1 -8
- package/dist/mcp/local/process-evidence.js +1 -23
- package/dist/mcp/local/process-evidence.test.js +2 -16
- package/dist/mcp/local/process-ref.d.ts +1 -1
- package/dist/mcp/local/runtime-chain-closure-evaluator.d.ts +33 -0
- package/dist/mcp/local/runtime-chain-closure-evaluator.js +273 -0
- package/dist/mcp/local/runtime-chain-graph-candidates.d.ts +23 -0
- package/dist/mcp/local/runtime-chain-graph-candidates.js +131 -0
- package/dist/mcp/local/runtime-chain-verify.d.ts +1 -1
- package/dist/mcp/local/runtime-chain-verify.js +149 -138
- package/dist/mcp/local/runtime-chain-verify.test.js +126 -68
- package/dist/mcp/local/runtime-claim-rule-registry.d.ts +4 -0
- package/dist/mcp/local/runtime-claim-rule-registry.js +4 -0
- package/dist/mcp/local/runtime-claim-rule-registry.test.js +37 -4
- package/dist/mcp/local/runtime-claim.d.ts +11 -0
- package/dist/mcp/local/runtime-claim.js +28 -0
- package/dist/mcp/local/unity-evidence-view.d.ts +1 -1
- package/dist/mcp/local/unity-evidence-view.js +1 -1
- package/dist/mcp/local/unity-evidence-view.test.js +22 -0
- package/dist/mcp/tools.js +51 -21
- package/dist/rule-lab/analyze.d.ts +2 -1
- package/dist/rule-lab/analyze.js +94 -59
- package/dist/rule-lab/analyze.test.js +238 -20
- package/dist/rule-lab/curate.d.ts +2 -1
- package/dist/rule-lab/curate.js +24 -3
- package/dist/rule-lab/curate.test.js +65 -0
- package/dist/rule-lab/curation-input-builder.d.ts +45 -0
- package/dist/rule-lab/curation-input-builder.js +133 -0
- package/dist/rule-lab/promote.js +80 -7
- package/dist/rule-lab/promote.test.js +150 -0
- package/dist/rule-lab/review-pack.d.ts +3 -0
- package/dist/rule-lab/review-pack.js +41 -1
- package/dist/rule-lab/review-pack.test.js +67 -0
- package/dist/rule-lab/types.d.ts +29 -0
- package/dist/types/pipeline.d.ts +16 -0
- package/package.json +14 -13
- package/scripts/check-sync-manifest-traceability.mjs +203 -0
- package/scripts/run-node-tests.mjs +61 -0
- package/scripts/tree-sitter-audit-classify.mjs +172 -0
- package/skills/_shared/unity-rule-authoring-contract.md +64 -0
- package/skills/_shared/unity-runtime-process-contract.md +16 -0
- package/skills/gitnexus-cli.md +44 -4
- package/skills/gitnexus-debugging.md +9 -0
- package/skills/gitnexus-exploring.md +66 -18
- package/skills/gitnexus-guide.md +42 -3
- package/skills/gitnexus-impact-analysis.md +8 -0
- package/skills/gitnexus-pr-review.md +8 -0
- package/skills/gitnexus-refactoring.md +8 -0
- package/skills/gitnexus-unity-rule-gen.md +66 -312
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { buildPipelineRunOptionsForAnalyze } from './analyze.js';
|
|
5
|
+
import { resolveScopeManifestForAnalyze } from './sync-manifest.js';
|
|
6
|
+
test('analyze auto-loads .gitnexus/sync-manifest.txt when CLI scope options are omitted', async () => {
|
|
7
|
+
const repoPath = path.join('/tmp', 'demo-repo');
|
|
8
|
+
const expectedManifest = path.join(repoPath, '.gitnexus', 'sync-manifest.txt');
|
|
9
|
+
const resolved = await resolveScopeManifestForAnalyze(repoPath, {}, async (candidate) => candidate === expectedManifest);
|
|
10
|
+
assert.equal(resolved, expectedManifest);
|
|
11
|
+
});
|
|
12
|
+
test('explicit --scope-manifest still wins over auto-detected default file', async () => {
|
|
13
|
+
const repoPath = path.join('/tmp', 'demo-repo');
|
|
14
|
+
const explicitManifest = path.join(repoPath, 'custom-manifest.txt');
|
|
15
|
+
const resolved = await resolveScopeManifestForAnalyze(repoPath, { scopeManifest: explicitManifest }, async () => true);
|
|
16
|
+
assert.equal(resolved, explicitManifest);
|
|
17
|
+
});
|
|
18
|
+
test('buildPipelineRunOptionsForAnalyze passes csharp define csproj option through to pipeline', () => {
|
|
19
|
+
const out = buildPipelineRunOptionsForAnalyze({ includeExtensions: ['.cs'], scopeRules: ['Assets/**'] }, { csharpDefineCsproj: '/tmp/Assembly-CSharp.csproj' });
|
|
20
|
+
assert.deepEqual(out, {
|
|
21
|
+
includeExtensions: ['.cs'],
|
|
22
|
+
scopeRules: ['Assets/**'],
|
|
23
|
+
csharpDefineCsproj: '/tmp/Assembly-CSharp.csproj',
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -27,7 +27,7 @@ export async function benchmarkAgentContextCommand(dataset, options, deps) {
|
|
|
27
27
|
}
|
|
28
28
|
const analyzePath = path.resolve(options.targetPath);
|
|
29
29
|
const analyzeOptions = {
|
|
30
|
-
extensions: options.extensions
|
|
30
|
+
extensions: options.extensions,
|
|
31
31
|
repoAlias: options.repoAlias,
|
|
32
32
|
scopeManifest: options.scopeManifest,
|
|
33
33
|
scopePrefix: options.scopePrefix,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { runAnalyze } from '../benchmark/analyze-runner.js';
|
|
2
|
+
import { runAgentSafeQueryContextBenchmark, writeAgentSafeQueryContextReports, type AgentSafeQueryContextBenchmarkReport } from '../benchmark/agent-safe-query-context/report.js';
|
|
3
|
+
import type { AgentSafeBenchmarkSuite } from '../benchmark/agent-safe-query-context/types.js';
|
|
4
|
+
export declare function benchmarkAgentSafeQueryContextCommand(dataset: string, options: {
|
|
5
|
+
repo?: string;
|
|
6
|
+
repoAlias?: string;
|
|
7
|
+
targetPath?: string;
|
|
8
|
+
reportDir?: string;
|
|
9
|
+
subagentRunsDir?: string;
|
|
10
|
+
extensions?: string;
|
|
11
|
+
scopeManifest?: string;
|
|
12
|
+
scopePrefix?: string[];
|
|
13
|
+
skipAnalyze?: boolean;
|
|
14
|
+
}, deps?: {
|
|
15
|
+
loadSuite?: (root: string) => Promise<AgentSafeBenchmarkSuite>;
|
|
16
|
+
runBenchmark?: typeof runAgentSafeQueryContextBenchmark;
|
|
17
|
+
writeReports?: typeof writeAgentSafeQueryContextReports;
|
|
18
|
+
writeLine?: (line: string) => void;
|
|
19
|
+
analyze?: typeof runAnalyze;
|
|
20
|
+
}): Promise<AgentSafeQueryContextBenchmarkReport>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { runAnalyze } from '../benchmark/analyze-runner.js';
|
|
3
|
+
import { loadAgentSafeQueryContextSuite } from '../benchmark/agent-safe-query-context/io.js';
|
|
4
|
+
import { runAgentSafeQueryContextBenchmark, writeAgentSafeQueryContextReports, } from '../benchmark/agent-safe-query-context/report.js';
|
|
5
|
+
export async function benchmarkAgentSafeQueryContextCommand(dataset, options, deps) {
|
|
6
|
+
const loadSuite = deps?.loadSuite || loadAgentSafeQueryContextSuite;
|
|
7
|
+
const runBenchmark = deps?.runBenchmark || runAgentSafeQueryContextBenchmark;
|
|
8
|
+
const writeReports = deps?.writeReports || writeAgentSafeQueryContextReports;
|
|
9
|
+
const writeLine = deps?.writeLine || ((line) => process.stderr.write(`${line}\n`));
|
|
10
|
+
const analyze = deps?.analyze || runAnalyze;
|
|
11
|
+
const reportDir = path.resolve(options.reportDir || '.gitnexus/benchmark-agent-safe-query-context');
|
|
12
|
+
if (!(options.skipAnalyze ?? false)) {
|
|
13
|
+
if (!options.targetPath) {
|
|
14
|
+
throw new Error('targetPath is required unless skipAnalyze is true');
|
|
15
|
+
}
|
|
16
|
+
await analyze(path.resolve(options.targetPath), {
|
|
17
|
+
extensions: options.extensions,
|
|
18
|
+
repoAlias: options.repoAlias,
|
|
19
|
+
scopeManifest: options.scopeManifest,
|
|
20
|
+
scopePrefix: options.scopePrefix,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const suite = await loadSuite(path.resolve(dataset));
|
|
24
|
+
const report = await runBenchmark(suite, {
|
|
25
|
+
repo: options.repo || options.repoAlias || (options.targetPath ? path.basename(path.resolve(options.targetPath)) : undefined),
|
|
26
|
+
subagentRunsDir: options.subagentRunsDir ? path.resolve(options.subagentRunsDir) : undefined,
|
|
27
|
+
});
|
|
28
|
+
await writeReports(reportDir, report);
|
|
29
|
+
writeLine(`${report.pass ? 'PASS' : 'FAIL'}`);
|
|
30
|
+
for (const key of ['weapon_powerup', 'reload']) {
|
|
31
|
+
const row = report.workflow_replay_slim[key];
|
|
32
|
+
writeLine(`${key}: guid_invariance_pass=${row.guid_invariance_pass}, live_tool_evidence_pass=${row.live_tool_evidence_pass}, freeze_ready=${row.freeze_ready}, confirmed_chain_steps=${row.confirmed_chain.steps.length}, placeholder_leak_detected=${row.placeholder_leak_detected}, heuristic_top_summary_detected=${row.heuristic_top_summary_detected}`);
|
|
33
|
+
}
|
|
34
|
+
writeLine(`Report: ${reportDir}`);
|
|
35
|
+
if (!report.pass) {
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
}
|
|
38
|
+
return report;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { benchmarkAgentSafeQueryContextCommand } from './benchmark-agent-safe-query-context.js';
|
|
7
|
+
test('benchmark-agent-safe-query-context runs suite loader, benchmark, and report writer', async () => {
|
|
8
|
+
const output = [];
|
|
9
|
+
const calls = [];
|
|
10
|
+
const report = await benchmarkAgentSafeQueryContextCommand('../benchmarks/agent-safe-query-context/neonspark-v1', {
|
|
11
|
+
repo: 'neonspark-core',
|
|
12
|
+
reportDir: '.gitnexus/benchmark-agent-safe-query-context-test',
|
|
13
|
+
subagentRunsDir: '.gitnexus/subagent-runs',
|
|
14
|
+
skipAnalyze: true,
|
|
15
|
+
}, {
|
|
16
|
+
loadSuite: async () => ({
|
|
17
|
+
thresholds: {
|
|
18
|
+
workflowReplay: { maxSteps: 5 },
|
|
19
|
+
tokenReduction: { weapon_powerup: 0.5, reload: 0.4 },
|
|
20
|
+
},
|
|
21
|
+
cases: {
|
|
22
|
+
weapon_powerup: {
|
|
23
|
+
label: 'weapon_powerup',
|
|
24
|
+
start_query: 'weapon powerup equip chain',
|
|
25
|
+
retry_query: 'retry',
|
|
26
|
+
proof_contexts: ['WeaponPowerUp'],
|
|
27
|
+
proof_cypher: 'MATCH () RETURN 1',
|
|
28
|
+
tool_plan: [],
|
|
29
|
+
live_task: {
|
|
30
|
+
objective: 'Investigate WeaponPowerUp from the provided asset seed.',
|
|
31
|
+
symbol_seed: 'WeaponPowerUp',
|
|
32
|
+
resource_seed: 'Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
33
|
+
},
|
|
34
|
+
semantic_tuple: {
|
|
35
|
+
resource_anchor: 'Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
36
|
+
symbol_anchor: 'WeaponPowerUp',
|
|
37
|
+
proof_edges: ['HoldPickup -> WeaponPowerUp.PickItUp'],
|
|
38
|
+
closure_status: 'not_verified_full',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
reload: {
|
|
42
|
+
label: 'reload',
|
|
43
|
+
start_query: 'reload getvalue checkreload',
|
|
44
|
+
retry_query: 'retry',
|
|
45
|
+
proof_contexts: ['ReloadBase'],
|
|
46
|
+
proof_cypher: 'MATCH () RETURN 1',
|
|
47
|
+
tool_plan: [],
|
|
48
|
+
live_task: {
|
|
49
|
+
objective: 'Investigate ReloadBase from the provided graph seed.',
|
|
50
|
+
symbol_seed: 'ReloadBase',
|
|
51
|
+
resource_seed: 'Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
52
|
+
},
|
|
53
|
+
semantic_tuple: {
|
|
54
|
+
resource_anchor: 'Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
55
|
+
symbol_anchor: 'ReloadBase',
|
|
56
|
+
proof_edge: 'ReloadBase.GetValue -> ReloadBase.CheckReload',
|
|
57
|
+
closure_status: 'not_verified_full',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
runBenchmark: async (_suite, options) => {
|
|
63
|
+
calls.push({ repo: options.repo });
|
|
64
|
+
const workflowReplayCases = {
|
|
65
|
+
weapon_powerup: {
|
|
66
|
+
steps: [],
|
|
67
|
+
semantic_tuple: {
|
|
68
|
+
resource_anchor: 'Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
69
|
+
symbol_anchor: 'WeaponPowerUp',
|
|
70
|
+
proof_edges: ['HoldPickup -> WeaponPowerUp.PickItUp'],
|
|
71
|
+
closure_status: 'not_verified_full',
|
|
72
|
+
},
|
|
73
|
+
normalized_tuple_pass: true,
|
|
74
|
+
evidence_validation_pass: true,
|
|
75
|
+
failure_class: undefined,
|
|
76
|
+
semantic_tuple_pass: true,
|
|
77
|
+
anchor_top1_pass: true,
|
|
78
|
+
recommended_follow_up_hit: true,
|
|
79
|
+
post_narrowing_anchor_pass: true,
|
|
80
|
+
post_narrowing_follow_up_hit: true,
|
|
81
|
+
guid_invariance_pass: true,
|
|
82
|
+
base: {
|
|
83
|
+
primary_candidate: 'WeaponPowerUp',
|
|
84
|
+
recommended_follow_up: 'resource_path_prefix=Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
85
|
+
},
|
|
86
|
+
guid_variant: {
|
|
87
|
+
primary_candidate: 'WeaponPowerUp',
|
|
88
|
+
recommended_follow_up: 'resource_path_prefix=Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
89
|
+
},
|
|
90
|
+
confirmed_chain: { steps: ['HoldPickup -> PickItUp'] },
|
|
91
|
+
live_tool_evidence_pass: true,
|
|
92
|
+
freeze_ready: true,
|
|
93
|
+
tier_envelope: {
|
|
94
|
+
facts_present: true,
|
|
95
|
+
closure_present: true,
|
|
96
|
+
clues_present: true,
|
|
97
|
+
semantic_order_pass: true,
|
|
98
|
+
summary_source: 'facts',
|
|
99
|
+
},
|
|
100
|
+
ambiguity_detour_count: 0,
|
|
101
|
+
placeholder_leak_detected: false,
|
|
102
|
+
heuristic_top_summary_detected: false,
|
|
103
|
+
tool_calls_to_completion: 1,
|
|
104
|
+
tokens_to_completion: 1,
|
|
105
|
+
retry_breakdown: { query_retry_count: 0, context_retry_count: 0, cypher_retry_count: 0 },
|
|
106
|
+
stop_reason: 'semantic_tuple_satisfied',
|
|
107
|
+
},
|
|
108
|
+
reload: {
|
|
109
|
+
steps: [],
|
|
110
|
+
semantic_tuple: {
|
|
111
|
+
resource_anchor: 'Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
112
|
+
symbol_anchor: 'ReloadBase',
|
|
113
|
+
proof_edge: 'ReloadBase.GetValue -> ReloadBase.CheckReload',
|
|
114
|
+
closure_status: 'not_verified_full',
|
|
115
|
+
},
|
|
116
|
+
normalized_tuple_pass: true,
|
|
117
|
+
evidence_validation_pass: true,
|
|
118
|
+
failure_class: undefined,
|
|
119
|
+
semantic_tuple_pass: true,
|
|
120
|
+
anchor_top1_pass: true,
|
|
121
|
+
recommended_follow_up_hit: true,
|
|
122
|
+
post_narrowing_anchor_pass: true,
|
|
123
|
+
post_narrowing_follow_up_hit: true,
|
|
124
|
+
guid_invariance_pass: true,
|
|
125
|
+
base: {
|
|
126
|
+
primary_candidate: 'ReloadBase',
|
|
127
|
+
recommended_follow_up: 'resource_path_prefix=Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
128
|
+
},
|
|
129
|
+
guid_variant: {
|
|
130
|
+
primary_candidate: 'ReloadBase',
|
|
131
|
+
recommended_follow_up: 'resource_path_prefix=Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
132
|
+
},
|
|
133
|
+
confirmed_chain: { steps: ['GetValue -> CheckReload'] },
|
|
134
|
+
live_tool_evidence_pass: true,
|
|
135
|
+
freeze_ready: true,
|
|
136
|
+
tier_envelope: {
|
|
137
|
+
facts_present: true,
|
|
138
|
+
closure_present: true,
|
|
139
|
+
clues_present: true,
|
|
140
|
+
semantic_order_pass: true,
|
|
141
|
+
summary_source: 'facts',
|
|
142
|
+
},
|
|
143
|
+
ambiguity_detour_count: 0,
|
|
144
|
+
placeholder_leak_detected: false,
|
|
145
|
+
heuristic_top_summary_detected: false,
|
|
146
|
+
tool_calls_to_completion: 1,
|
|
147
|
+
tokens_to_completion: 1,
|
|
148
|
+
retry_breakdown: { query_retry_count: 0, context_retry_count: 0, cypher_retry_count: 0 },
|
|
149
|
+
stop_reason: 'semantic_tuple_satisfied',
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
const sameScriptCases = {
|
|
153
|
+
weapon_powerup: {
|
|
154
|
+
tool_plan: [],
|
|
155
|
+
steps: [],
|
|
156
|
+
semantic_tuple: {
|
|
157
|
+
resource_anchor: 'Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
158
|
+
symbol_anchor: 'WeaponPowerUp',
|
|
159
|
+
proof_edges: ['HoldPickup -> WeaponPowerUp.PickItUp'],
|
|
160
|
+
closure_status: 'not_verified_full',
|
|
161
|
+
},
|
|
162
|
+
semantic_tuple_pass: true,
|
|
163
|
+
tool_calls_to_completion: 1,
|
|
164
|
+
tokens_to_completion: 1,
|
|
165
|
+
},
|
|
166
|
+
reload: {
|
|
167
|
+
tool_plan: [],
|
|
168
|
+
steps: [],
|
|
169
|
+
semantic_tuple: {
|
|
170
|
+
resource_anchor: 'Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
171
|
+
symbol_anchor: 'ReloadBase',
|
|
172
|
+
proof_edge: 'ReloadBase.GetValue -> ReloadBase.CheckReload',
|
|
173
|
+
closure_status: 'not_verified_full',
|
|
174
|
+
},
|
|
175
|
+
semantic_tuple_pass: true,
|
|
176
|
+
tool_calls_to_completion: 1,
|
|
177
|
+
tokens_to_completion: 1,
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
const subagentLive = {
|
|
181
|
+
weapon_powerup: {
|
|
182
|
+
steps: [],
|
|
183
|
+
semantic_tuple: {
|
|
184
|
+
resource_anchor: 'Assets/NEON/DataAssets/Powerups/1_newWeapon/0_pick/法器_Orb/1_weapon_orb_key.asset',
|
|
185
|
+
symbol_anchor: 'WeaponPowerUp',
|
|
186
|
+
proof_edges: ['HoldPickup -> WeaponPowerUp.PickItUp'],
|
|
187
|
+
closure_status: 'not_verified_full',
|
|
188
|
+
},
|
|
189
|
+
normalized_tuple_pass: true,
|
|
190
|
+
evidence_validation_pass: true,
|
|
191
|
+
failure_class: undefined,
|
|
192
|
+
semantic_tuple_pass: true,
|
|
193
|
+
tool_calls_to_completion: 1,
|
|
194
|
+
tokens_to_completion: 1,
|
|
195
|
+
stop_reason: 'semantic_tuple_satisfied',
|
|
196
|
+
prompt: 'Use only telemetry-tool.js\nFinal JSON schema:',
|
|
197
|
+
prompt_path: '/tmp/prompt.txt',
|
|
198
|
+
result_path: '/tmp/result.json',
|
|
199
|
+
telemetry_path: '/tmp/telemetry.jsonl',
|
|
200
|
+
final_result: {},
|
|
201
|
+
},
|
|
202
|
+
reload: {
|
|
203
|
+
steps: [],
|
|
204
|
+
semantic_tuple: {
|
|
205
|
+
resource_anchor: 'Assets/NEON/Graphs/PlayerGun/Gungraph_use/1_weapon_orb_key.asset',
|
|
206
|
+
symbol_anchor: 'ReloadBase',
|
|
207
|
+
proof_edge: 'ReloadBase.GetValue -> ReloadBase.CheckReload',
|
|
208
|
+
closure_status: 'not_verified_full',
|
|
209
|
+
},
|
|
210
|
+
normalized_tuple_pass: true,
|
|
211
|
+
evidence_validation_pass: true,
|
|
212
|
+
failure_class: undefined,
|
|
213
|
+
semantic_tuple_pass: true,
|
|
214
|
+
tool_calls_to_completion: 1,
|
|
215
|
+
tokens_to_completion: 1,
|
|
216
|
+
stop_reason: 'semantic_tuple_satisfied',
|
|
217
|
+
prompt: 'Use only telemetry-tool.js\nFinal JSON schema:',
|
|
218
|
+
prompt_path: '/tmp/prompt.txt',
|
|
219
|
+
result_path: '/tmp/result.json',
|
|
220
|
+
telemetry_path: '/tmp/telemetry.jsonl',
|
|
221
|
+
final_result: {},
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
return {
|
|
225
|
+
generatedAt: '2026-04-08T00:00:00.000Z',
|
|
226
|
+
workflow_replay_full: workflowReplayCases,
|
|
227
|
+
workflow_replay_slim: workflowReplayCases,
|
|
228
|
+
same_script_full: sameScriptCases,
|
|
229
|
+
same_script_slim: sameScriptCases,
|
|
230
|
+
cases: subagentLive,
|
|
231
|
+
same_script: {
|
|
232
|
+
tool_plan: { weapon_powerup: [], reload: [] },
|
|
233
|
+
cases: sameScriptCases,
|
|
234
|
+
},
|
|
235
|
+
subagent_live: subagentLive,
|
|
236
|
+
acceptance: { pass: true, cases: { weapon_powerup: true, reload: true } },
|
|
237
|
+
pass: true,
|
|
238
|
+
semantic_equivalence: { pass: false, cases: { weapon_powerup: false, reload: false } },
|
|
239
|
+
token_summary: {
|
|
240
|
+
weapon_powerup: { before: 1, after: 1, saved: 0, reduction: 0 },
|
|
241
|
+
reload: { before: 1, after: 1, saved: 0, reduction: 0 },
|
|
242
|
+
},
|
|
243
|
+
call_summary: {
|
|
244
|
+
weapon_powerup: { before: 1, after: 1, saved: 0 },
|
|
245
|
+
reload: { before: 1, after: 1, saved: 0 },
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
},
|
|
249
|
+
writeReports: async () => { },
|
|
250
|
+
writeLine: (line) => output.push(line),
|
|
251
|
+
analyze: async () => ({ stdout: '', stderr: '' }),
|
|
252
|
+
});
|
|
253
|
+
assert.equal(calls[0].repo, 'neonspark-core');
|
|
254
|
+
assert.ok(output.some((line) => line.includes('PASS')));
|
|
255
|
+
assert.ok(output.some((line) => line.includes('weapon_powerup: guid_invariance_pass=true, live_tool_evidence_pass=true, freeze_ready')));
|
|
256
|
+
assert.ok(output.some((line) => line.includes('Report:')));
|
|
257
|
+
assert.equal(report.workflow_replay_slim.weapon_powerup.placeholder_leak_detected, false);
|
|
258
|
+
assert.equal(report.workflow_replay_slim.weapon_powerup.heuristic_top_summary_detected, false);
|
|
259
|
+
});
|
|
260
|
+
test('runtime retrieval contract docs remove heuristic mode and pin full as debug-only', async () => {
|
|
261
|
+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..');
|
|
262
|
+
const docPaths = [
|
|
263
|
+
'gitnexus/src/mcp/tools.ts',
|
|
264
|
+
].map((relativePath) => path.join(repoRoot, relativePath));
|
|
265
|
+
const text = (await Promise.all(docPaths.map((filePath) => fs.readFile(filePath, 'utf-8')))).join('\n');
|
|
266
|
+
assert.ok(text.includes('discovery -> seed narrowing -> closure verification'));
|
|
267
|
+
assert.ok(!text.includes('resource_heuristic'));
|
|
268
|
+
assert.ok(text.includes('response_profile=slim is the default and sufficient'));
|
|
269
|
+
assert.ok(text.includes('response_profile=full is for debugging'));
|
|
270
|
+
assert.ok(text.includes('strong graph hops can coexist with failed closure'));
|
|
271
|
+
});
|
|
@@ -18,7 +18,7 @@ export async function benchmarkUnityCommand(dataset, options) {
|
|
|
18
18
|
targetPath: options.targetPath,
|
|
19
19
|
profile: profileConfig,
|
|
20
20
|
reportDir: options.reportDir,
|
|
21
|
-
extensions: options.extensions
|
|
21
|
+
extensions: options.extensions,
|
|
22
22
|
scopeManifest: options.scopeManifest,
|
|
23
23
|
scopePrefix: options.scopePrefix,
|
|
24
24
|
skipAnalyze: options.skipAnalyze ?? false,
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import test from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import fs from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
4
6
|
import { resolveProfileConfig } from './benchmark-unity.js';
|
|
7
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const packagePath = path.resolve(here, '..', '..', 'package.json');
|
|
5
9
|
test('quick profile uses reduced sample limits', () => {
|
|
6
10
|
const c = resolveProfileConfig('quick');
|
|
7
11
|
assert.equal(c.maxSymbols, 10);
|
|
8
12
|
assert.equal(c.maxTasks, 5);
|
|
9
13
|
});
|
|
10
14
|
test('package scripts include neonspark benchmark commands', async () => {
|
|
11
|
-
const raw = await fs.readFile(
|
|
15
|
+
const raw = await fs.readFile(packagePath, 'utf-8');
|
|
12
16
|
const pkg = JSON.parse(raw);
|
|
13
17
|
const scripts = pkg.scripts || {};
|
|
14
18
|
assert.ok(scripts['benchmark:neonspark:full']);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface BenchmarkCommandOptions {
|
|
2
|
+
repo?: string;
|
|
3
|
+
reportDir?: string;
|
|
4
|
+
recordsPath?: string;
|
|
5
|
+
casesPath?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function benchmarkCommand(suite: string, options?: BenchmarkCommandOptions): Promise<{
|
|
8
|
+
artifactPath?: string;
|
|
9
|
+
indexPath?: string;
|
|
10
|
+
sha256?: string;
|
|
11
|
+
comparisonPath?: string;
|
|
12
|
+
summaryPath?: string;
|
|
13
|
+
provenanceArtifactPath?: string;
|
|
14
|
+
provenanceIndexPath?: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function benchmarkSuiteCommand(suite: string, options: {
|
|
17
|
+
repo?: string;
|
|
18
|
+
reportDir?: string;
|
|
19
|
+
recordsPath?: string;
|
|
20
|
+
casesPath?: string;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
artifactPath?: string;
|
|
23
|
+
indexPath?: string;
|
|
24
|
+
sha256?: string;
|
|
25
|
+
comparisonPath?: string;
|
|
26
|
+
summaryPath?: string;
|
|
27
|
+
provenanceArtifactPath?: string;
|
|
28
|
+
provenanceIndexPath?: string;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { writeRuntimeProvenanceArtifact, } from '../benchmark/runtime-poc/provenance-artifact.js';
|
|
4
|
+
import { runRuntimePocBenchmark } from '../benchmark/runtime-poc/runner.js';
|
|
5
|
+
async function loadRuntimePocRecords(recordsPath) {
|
|
6
|
+
if (!recordsPath)
|
|
7
|
+
return [];
|
|
8
|
+
const raw = await fs.readFile(path.resolve(recordsPath), 'utf-8');
|
|
9
|
+
const parsed = JSON.parse(raw);
|
|
10
|
+
if (!Array.isArray(parsed)) {
|
|
11
|
+
throw new Error('runtime-poc records file must be a JSON array');
|
|
12
|
+
}
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
export async function benchmarkCommand(suite, options = {}) {
|
|
16
|
+
const normalizedSuite = String(suite || '').trim().toLowerCase();
|
|
17
|
+
if (normalizedSuite !== 'runtime-poc') {
|
|
18
|
+
throw new Error(`unsupported benchmark suite: ${suite}`);
|
|
19
|
+
}
|
|
20
|
+
const repo = String(options.repo || 'unknown-repo').trim();
|
|
21
|
+
const reportDir = path.resolve(options.reportDir || 'docs/reports/runtime-poc');
|
|
22
|
+
if (options.recordsPath) {
|
|
23
|
+
const records = await loadRuntimePocRecords(options.recordsPath);
|
|
24
|
+
const out = await writeRuntimeProvenanceArtifact({
|
|
25
|
+
reportDir,
|
|
26
|
+
repo,
|
|
27
|
+
records,
|
|
28
|
+
});
|
|
29
|
+
process.stdout.write(`runtime-poc provenance artifact written: ${out.artifactPath}\n`);
|
|
30
|
+
process.stdout.write(`runtime-poc provenance index updated: ${out.indexPath}\n`);
|
|
31
|
+
return {
|
|
32
|
+
artifactPath: out.artifactPath,
|
|
33
|
+
indexPath: out.indexPath,
|
|
34
|
+
sha256: out.sha256,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const run = await runRuntimePocBenchmark({
|
|
38
|
+
repo,
|
|
39
|
+
reportDir,
|
|
40
|
+
casesPath: options.casesPath,
|
|
41
|
+
});
|
|
42
|
+
process.stdout.write(`runtime-poc comparison report written: ${run.comparisonPath}\n`);
|
|
43
|
+
process.stdout.write(`runtime-poc markdown summary written: ${run.summaryPath}\n`);
|
|
44
|
+
process.stdout.write(`runtime-poc provenance artifact written: ${run.provenanceArtifactPath}\n`);
|
|
45
|
+
process.stdout.write(`runtime-poc provenance index updated: ${run.provenanceIndexPath}\n`);
|
|
46
|
+
return {
|
|
47
|
+
comparisonPath: run.comparisonPath,
|
|
48
|
+
summaryPath: run.summaryPath,
|
|
49
|
+
provenanceArtifactPath: run.provenanceArtifactPath,
|
|
50
|
+
provenanceIndexPath: run.provenanceIndexPath,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export async function benchmarkSuiteCommand(suite, options) {
|
|
54
|
+
return await benchmarkCommand(suite, options);
|
|
55
|
+
}
|
package/dist/cli/index.js
CHANGED
|
@@ -29,6 +29,8 @@ program
|
|
|
29
29
|
.option('--embeddings', 'Enable embedding generation for semantic search (off by default)')
|
|
30
30
|
.option('--extensions <list>', 'Comma-separated file extensions to include (e.g. .cs,.ts)')
|
|
31
31
|
.option('--repo-alias <name>', 'Override indexed repository name with a stable alias')
|
|
32
|
+
.option('--csharp-define-csproj <path>', 'Load C# DefineConstants from the specified .csproj and normalize conditional-compilation blocks before parsing')
|
|
33
|
+
.option('--sync-manifest-policy <policy>', 'When CLI options differ from sync manifest directives: ask|update|keep|error (default: ask)')
|
|
32
34
|
.option('--skills', 'Generate repo-specific skill files from detected communities')
|
|
33
35
|
.option('-v, --verbose', 'Enable verbose ingestion warnings (default: false)')
|
|
34
36
|
.option('--scope-manifest <path>', 'Manifest file with scope rules (supports comments and * wildcard; recommended: .gitnexus/sync-manifest.txt)')
|
|
@@ -84,6 +86,7 @@ program
|
|
|
84
86
|
.option('-g, --goal <text>', 'What you want to find')
|
|
85
87
|
.option('-l, --limit <n>', 'Max processes to return (default: 5)')
|
|
86
88
|
.option('--content', 'Include full symbol source code')
|
|
89
|
+
.option('--response-profile <profile>', 'Response payload profile: slim|full', 'slim')
|
|
87
90
|
.option('--scope-preset <preset>', 'Scope preset for retrieval: unity-gameplay|unity-all')
|
|
88
91
|
.option('--unity-resources <mode>', 'Unity resource retrieval mode: off|on|auto', 'off')
|
|
89
92
|
.option('--unity-hydration <mode>', 'Unity hydration mode when resources are enabled: parity|compact', 'compact')
|
|
@@ -99,6 +102,7 @@ program
|
|
|
99
102
|
.option('-u, --uid <uid>', 'Direct symbol UID (zero-ambiguity lookup)')
|
|
100
103
|
.option('-f, --file <path>', 'File path to disambiguate common names')
|
|
101
104
|
.option('--content', 'Include full symbol source code')
|
|
105
|
+
.option('--response-profile <profile>', 'Response payload profile: slim|full', 'slim')
|
|
102
106
|
.option('--unity-resources <mode>', 'Unity resource retrieval mode: off|on|auto', 'off')
|
|
103
107
|
.option('--unity-hydration <mode>', 'Unity hydration mode when resources are enabled: parity|compact', 'compact')
|
|
104
108
|
.option('--unity-evidence <mode>', 'Unity evidence payload mode: summary|focused|full', 'summary')
|
|
@@ -150,7 +154,7 @@ program
|
|
|
150
154
|
.option('--repo-alias <name>', 'Analyze-time repo alias and default evaluation repo when --repo is omitted')
|
|
151
155
|
.option('--target-path <path>', 'Path to analyze before evaluation (required unless --skip-analyze)')
|
|
152
156
|
.option('--report-dir <path>', 'Output directory for benchmark-report.json and benchmark-summary.md', '.gitnexus/benchmark')
|
|
153
|
-
.option('--extensions <list>', 'Analyze extension filter (
|
|
157
|
+
.option('--extensions <list>', 'Analyze extension filter (comma-separated, optional)')
|
|
154
158
|
.option('--scope-manifest <path>', 'Analyze scope manifest file')
|
|
155
159
|
.option('--scope-prefix <pathPrefix>', 'Analyze scope path prefix (repeatable)', collectValues, [])
|
|
156
160
|
.option('--skip-analyze', 'Skip analyze stage and evaluate current index only')
|
|
@@ -163,15 +167,36 @@ program
|
|
|
163
167
|
.option('--repo-alias <name>', 'Analyze-time repo alias and default evaluation repo when --repo is omitted')
|
|
164
168
|
.option('--target-path <path>', 'Path to analyze before evaluation (required unless --skip-analyze)')
|
|
165
169
|
.option('--report-dir <path>', 'Output directory for benchmark-report.json and benchmark-summary.md', '.gitnexus/benchmark-agent-context')
|
|
166
|
-
.option('--extensions <list>', 'Analyze extension filter (
|
|
170
|
+
.option('--extensions <list>', 'Analyze extension filter (comma-separated, optional)')
|
|
167
171
|
.option('--scope-manifest <path>', 'Analyze scope manifest file')
|
|
168
172
|
.option('--scope-prefix <pathPrefix>', 'Analyze scope path prefix (repeatable)', collectValues, [])
|
|
169
173
|
.option('--skip-analyze', 'Skip analyze stage and evaluate current index only')
|
|
170
174
|
.action(createLazyAction(() => import('./benchmark-agent-context.js'), 'benchmarkAgentContextCommand'));
|
|
175
|
+
program
|
|
176
|
+
.command('benchmark-agent-safe-query-context <dataset>')
|
|
177
|
+
.description('Run the agent-safe Unity query/context benchmark')
|
|
178
|
+
.option('-r, --repo <name>', 'Target indexed repo')
|
|
179
|
+
.option('--repo-alias <name>', 'Analyze-time repo alias and default evaluation repo when --repo is omitted')
|
|
180
|
+
.option('--target-path <path>', 'Path to analyze before evaluation (required unless --skip-analyze)')
|
|
181
|
+
.option('--subagent-runs-dir <path>', 'Directory containing session-generated subagent run artifacts')
|
|
182
|
+
.option('--report-dir <path>', 'Output directory for benchmark-report.json and benchmark-summary.md', '.gitnexus/benchmark-agent-safe-query-context')
|
|
183
|
+
.option('--extensions <list>', 'Analyze extension filter (comma-separated, optional)')
|
|
184
|
+
.option('--scope-manifest <path>', 'Analyze scope manifest file')
|
|
185
|
+
.option('--scope-prefix <pathPrefix>', 'Analyze scope path prefix (repeatable)', collectValues, [])
|
|
186
|
+
.option('--skip-analyze', 'Skip analyze stage and evaluate current index only')
|
|
187
|
+
.action(createLazyAction(() => import('./benchmark-agent-safe-query-context.js'), 'benchmarkAgentSafeQueryContextCommand'));
|
|
171
188
|
program
|
|
172
189
|
.command('benchmark-u2-e2e')
|
|
173
190
|
.description('Run fail-fast full neonspark U2 E2E benchmark and emit evidence reports')
|
|
174
191
|
.option('--config <path>', 'Path to E2E config JSON')
|
|
175
192
|
.option('--report-dir <path>', 'Output directory for reports')
|
|
176
193
|
.action(createLazyAction(() => import('./benchmark-u2-e2e.js'), 'benchmarkU2E2ECommand'));
|
|
194
|
+
program
|
|
195
|
+
.command('benchmark <suite>')
|
|
196
|
+
.description('Run benchmark suite (currently supports: runtime-poc)')
|
|
197
|
+
.option('-r, --repo <name>', 'Target indexed repo')
|
|
198
|
+
.option('--report-dir <path>', 'Output directory for runtime-poc reports', 'docs/reports/runtime-poc')
|
|
199
|
+
.option('--cases-path <path>', 'Optional JSON cases file for runtime-poc comparison run')
|
|
200
|
+
.option('--records-path <path>', 'Optional JSON records file to emit provenance artifact only')
|
|
201
|
+
.action(createLazyAction(() => import('./benchmark.js'), 'benchmarkSuiteCommand'));
|
|
177
202
|
program.parse(process.argv);
|
package/dist/cli/rule-lab.d.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
|
-
declare const RULE_LAB_COMMANDS: readonly ["
|
|
3
|
-
type RuleLabHandlerName = '
|
|
2
|
+
declare const RULE_LAB_COMMANDS: readonly ["analyze", "review-pack", "curate", "promote", "regress"];
|
|
3
|
+
type RuleLabHandlerName = 'ruleLabAnalyzeCommand' | 'ruleLabReviewPackCommand' | 'ruleLabCurateCommand' | 'ruleLabPromoteCommand' | 'ruleLabRegressCommand';
|
|
4
4
|
type LazyFactory = (handlerName: RuleLabHandlerName) => (...args: any[]) => void | Promise<void>;
|
|
5
5
|
export declare function getRuleLabCommandNames(program: Command): string[];
|
|
6
6
|
export declare function attachRuleLabCommands(program: Command, lazyFactory?: LazyFactory): void;
|
|
7
|
-
export declare function ruleLabDiscoverCommand(options: {
|
|
8
|
-
repoPath?: string;
|
|
9
|
-
scope?: 'full' | 'diff';
|
|
10
|
-
seed?: string;
|
|
11
|
-
}): Promise<void>;
|
|
12
7
|
export declare function ruleLabAnalyzeCommand(options: {
|
|
13
8
|
repoPath?: string;
|
|
14
9
|
runId: string;
|
|
@@ -30,6 +25,7 @@ export declare function ruleLabPromoteCommand(options: {
|
|
|
30
25
|
repoPath?: string;
|
|
31
26
|
runId: string;
|
|
32
27
|
sliceId: string;
|
|
28
|
+
ruleVersion?: string;
|
|
33
29
|
version?: string;
|
|
34
30
|
}): Promise<void>;
|
|
35
31
|
export declare function ruleLabRegressCommand(options: {
|