@veewo/gitnexus 1.5.7 → 1.5.8
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/cli/ai-context.js +1 -7
- package/dist/cli/analyze-runtime-summary.js +0 -1
- package/dist/cli/analyze-runtime-summary.test.js +0 -2
- package/dist/cli/analyze-summary.d.ts +0 -2
- package/dist/cli/analyze-summary.js +0 -24
- package/dist/cli/analyze-summary.test.js +1 -65
- package/dist/cli/analyze.js +1 -5
- package/dist/cli/index.js +0 -2
- package/dist/core/ingestion/pipeline.js +0 -43
- package/dist/mcp/local/agent-safe-response.js +1 -1
- package/dist/mcp/local/local-backend.d.ts +0 -23
- package/dist/mcp/local/local-backend.js +69 -248
- package/dist/mcp/local/runtime-chain-verify.test.js +0 -49
- package/dist/mcp/local/runtime-claim-rule-registry.d.ts +0 -11
- package/dist/mcp/local/runtime-claim-rule-registry.js +0 -159
- package/dist/mcp/local/runtime-claim-rule-registry.test.js +67 -214
- package/dist/mcp/tools.js +0 -70
- package/dist/types/pipeline.d.ts +0 -3
- package/package.json +1 -1
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.d.ts +0 -60
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.js +0 -395
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.test.d.ts +0 -1
- package/dist/benchmark/u2-e2e/phase5-rule-lab-acceptance-runner.test.js +0 -41
- package/dist/cli/rule-lab.d.ts +0 -38
- package/dist/cli/rule-lab.js +0 -148
- package/dist/cli/rule-lab.test.d.ts +0 -1
- package/dist/cli/rule-lab.test.js +0 -31
- package/dist/core/ingestion/unity-runtime-binding-rules.d.ts +0 -26
- package/dist/core/ingestion/unity-runtime-binding-rules.js +0 -408
- package/dist/rule-lab/analyze.d.ts +0 -13
- package/dist/rule-lab/analyze.js +0 -125
- package/dist/rule-lab/analyze.test.d.ts +0 -1
- package/dist/rule-lab/analyze.test.js +0 -246
- package/dist/rule-lab/compile.d.ts +0 -5
- package/dist/rule-lab/compile.js +0 -51
- package/dist/rule-lab/compiled-bundles.d.ts +0 -30
- package/dist/rule-lab/compiled-bundles.js +0 -36
- package/dist/rule-lab/curate.d.ts +0 -33
- package/dist/rule-lab/curate.js +0 -155
- package/dist/rule-lab/curate.test.d.ts +0 -1
- package/dist/rule-lab/curate.test.js +0 -137
- package/dist/rule-lab/curation-input-builder.d.ts +0 -45
- package/dist/rule-lab/curation-input-builder.js +0 -133
- package/dist/rule-lab/discover.d.ts +0 -13
- package/dist/rule-lab/discover.js +0 -74
- package/dist/rule-lab/discover.test.d.ts +0 -1
- package/dist/rule-lab/discover.test.js +0 -42
- package/dist/rule-lab/paths.d.ts +0 -21
- package/dist/rule-lab/paths.js +0 -37
- package/dist/rule-lab/paths.test.d.ts +0 -1
- package/dist/rule-lab/paths.test.js +0 -46
- package/dist/rule-lab/promote.d.ts +0 -26
- package/dist/rule-lab/promote.js +0 -387
- package/dist/rule-lab/promote.test.d.ts +0 -1
- package/dist/rule-lab/promote.test.js +0 -314
- package/dist/rule-lab/regress.d.ts +0 -60
- package/dist/rule-lab/regress.js +0 -122
- package/dist/rule-lab/regress.test.d.ts +0 -1
- package/dist/rule-lab/regress.test.js +0 -68
- package/dist/rule-lab/review-pack.d.ts +0 -34
- package/dist/rule-lab/review-pack.js +0 -165
- package/dist/rule-lab/review-pack.test.d.ts +0 -1
- package/dist/rule-lab/review-pack.test.js +0 -116
- package/dist/rule-lab/types.d.ts +0 -135
- package/dist/rule-lab/types.js +0 -1
- package/skills/_shared/unity-rule-authoring-contract.md +0 -64
- package/skills/gitnexus-unity-rule-gen.md +0 -107
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import assert from 'node:assert/strict';
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
2
|
import { test } from 'vitest';
|
|
6
|
-
import { RuleRegistryLoadError,
|
|
7
|
-
test('
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
id: 'demo.reload.rule.v1',
|
|
16
|
-
version: '1.2.3',
|
|
17
|
-
file: 'approved/demo.reload.rule.v1.yaml',
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
}), 'utf-8');
|
|
21
|
-
await fs.writeFile(path.join(rulesRoot, 'approved', 'demo.reload.rule.v1.yaml'), [
|
|
3
|
+
import { RuleRegistryLoadError, parseRuleYaml } from './runtime-claim-rule-registry.js';
|
|
4
|
+
test('RuleRegistryLoadError has code and context', () => {
|
|
5
|
+
const err = new RuleRegistryLoadError('rule_catalog_missing', 'Catalog not found', { repoPath: '/tmp/repo' });
|
|
6
|
+
assert.ok(err instanceof RuleRegistryLoadError);
|
|
7
|
+
assert.equal(err.code, 'rule_catalog_missing');
|
|
8
|
+
assert.match(String(err.message || ''), /Catalog not found/);
|
|
9
|
+
});
|
|
10
|
+
test('parseRuleYaml parses basic fields', () => {
|
|
11
|
+
const yaml = [
|
|
22
12
|
'id: demo.reload.rule.v1',
|
|
23
13
|
'version: 1.2.3',
|
|
24
14
|
'trigger_family: reload',
|
|
@@ -33,106 +23,37 @@ test('loads active runtime claim rules from project catalog', async () => {
|
|
|
33
23
|
'non_guarantees:',
|
|
34
24
|
' - no_runtime_execution',
|
|
35
25
|
'next_action: gitnexus query "reload"',
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const originalCwd = process.cwd();
|
|
65
|
-
process.chdir(nestedCwd);
|
|
66
|
-
try {
|
|
67
|
-
await assert.rejects(() => loadRuleRegistry(path.join(tempRoot, 'does-not-exist')), (error) => {
|
|
68
|
-
assert.ok(error instanceof RuleRegistryLoadError);
|
|
69
|
-
assert.equal(error.code, 'rule_catalog_missing');
|
|
70
|
-
assert.match(String(error.message || ''), /catalog not found/i);
|
|
71
|
-
return true;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
process.chdir(originalCwd);
|
|
76
|
-
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
test('throws rule_catalog_missing when rulesRoot exists but catalog.json is missing', async () => {
|
|
80
|
-
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'gitnexus-runtime-claim-rules-'));
|
|
81
|
-
const repoPath = path.join(tempRoot, 'repo');
|
|
82
|
-
const rulesRoot = path.join(repoPath, '.gitnexus', 'rules');
|
|
83
|
-
await fs.mkdir(path.join(rulesRoot, 'approved'), { recursive: true });
|
|
84
|
-
try {
|
|
85
|
-
await assert.rejects(() => loadRuleRegistry(repoPath), (error) => {
|
|
86
|
-
assert.ok(error instanceof RuleRegistryLoadError);
|
|
87
|
-
assert.equal(error.code, 'rule_catalog_missing');
|
|
88
|
-
return true;
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
finally {
|
|
92
|
-
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
test('throws rule_file_missing when catalog entry points to missing yaml file', async () => {
|
|
96
|
-
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'gitnexus-runtime-claim-rules-'));
|
|
97
|
-
const repoPath = path.join(tempRoot, 'repo');
|
|
98
|
-
const rulesRoot = path.join(repoPath, '.gitnexus', 'rules');
|
|
99
|
-
await fs.mkdir(path.join(rulesRoot, 'approved'), { recursive: true });
|
|
100
|
-
await fs.writeFile(path.join(rulesRoot, 'catalog.json'), JSON.stringify({
|
|
101
|
-
rules: [
|
|
102
|
-
{
|
|
103
|
-
id: 'demo.reload.rule.v1',
|
|
104
|
-
version: '1.0.0',
|
|
105
|
-
file: 'approved/demo.reload.rule.v1.yaml',
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
}), 'utf-8');
|
|
109
|
-
try {
|
|
110
|
-
await assert.rejects(() => loadRuleRegistry(repoPath), (error) => {
|
|
111
|
-
assert.ok(error instanceof RuleRegistryLoadError);
|
|
112
|
-
assert.equal(error.code, 'rule_file_missing');
|
|
113
|
-
assert.match(String(error.message || ''), /rule file not found/i);
|
|
114
|
-
return true;
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
finally {
|
|
118
|
-
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
119
|
-
}
|
|
26
|
+
'match:',
|
|
27
|
+
' trigger_tokens:',
|
|
28
|
+
' - reload',
|
|
29
|
+
'closure:',
|
|
30
|
+
' required_hops:',
|
|
31
|
+
' - resource',
|
|
32
|
+
'claims:',
|
|
33
|
+
' guarantees:',
|
|
34
|
+
' - reload_chain_closed',
|
|
35
|
+
' non_guarantees:',
|
|
36
|
+
' - no_runtime_execution',
|
|
37
|
+
' next_action: gitnexus query "reload"',
|
|
38
|
+
'topology:',
|
|
39
|
+
' - hop: resource',
|
|
40
|
+
' from:',
|
|
41
|
+
' entity: resource',
|
|
42
|
+
' to:',
|
|
43
|
+
' entity: script',
|
|
44
|
+
' edge:',
|
|
45
|
+
' kind: binds_script',
|
|
46
|
+
].join('\n');
|
|
47
|
+
const rule = parseRuleYaml(yaml, 'test.yaml');
|
|
48
|
+
assert.equal(rule.id, 'demo.reload.rule.v1');
|
|
49
|
+
assert.equal(rule.version, '1.2.3');
|
|
50
|
+
assert.equal(rule.trigger_family, 'reload');
|
|
51
|
+
assert.deepEqual(rule.resource_types, ['asset']);
|
|
52
|
+
assert.deepEqual(rule.host_base_type, ['ReloadBase']);
|
|
53
|
+
assert.equal(rule.file_path, 'test.yaml');
|
|
120
54
|
});
|
|
121
|
-
test('parses scalar/list values with spaces, quotes, and escapes
|
|
122
|
-
const
|
|
123
|
-
const repoPath = path.join(tempRoot, 'repo');
|
|
124
|
-
const rulesRoot = path.join(repoPath, '.gitnexus', 'rules');
|
|
125
|
-
await fs.mkdir(path.join(rulesRoot, 'approved'), { recursive: true });
|
|
126
|
-
await fs.writeFile(path.join(rulesRoot, 'catalog.json'), JSON.stringify({
|
|
127
|
-
rules: [
|
|
128
|
-
{
|
|
129
|
-
id: 'demo.scalar-parser.v1',
|
|
130
|
-
version: '1.0.0',
|
|
131
|
-
file: 'approved/demo.scalar-parser.v1.yaml',
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
}), 'utf-8');
|
|
135
|
-
await fs.writeFile(path.join(rulesRoot, 'approved', 'demo.scalar-parser.v1.yaml'), [
|
|
55
|
+
test('parseRuleYaml parses scalar/list values with spaces, quotes, and escapes', () => {
|
|
56
|
+
const yaml = [
|
|
136
57
|
'id: demo.scalar-parser.v1',
|
|
137
58
|
'version: 1.0.0',
|
|
138
59
|
'trigger_family: reload',
|
|
@@ -149,100 +70,32 @@ test('parses scalar/list values with spaces, quotes, and escapes without truncat
|
|
|
149
70
|
' - "double-quote \\"inside\\""',
|
|
150
71
|
" - 'single-quote ''inside'''",
|
|
151
72
|
'next_action: node gitnexus/dist/cli/index.js query --runtime-chain-verify on-demand "Reload NEON.Game.Graph.Nodes.Reloads"',
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
await fs.writeFile(path.join(rulesRoot, 'approved', 'demo.reload.rule.v2.yaml'), [
|
|
181
|
-
'id: demo.reload.rule.v2',
|
|
182
|
-
'version: 2.0.0',
|
|
183
|
-
'trigger_family: reload',
|
|
184
|
-
'resource_types:',
|
|
185
|
-
' - asset',
|
|
186
|
-
'host_base_type:',
|
|
187
|
-
' - ReloadBase',
|
|
188
|
-
'required_hops:',
|
|
189
|
-
' - resource',
|
|
190
|
-
'guarantees:',
|
|
191
|
-
' - reload_chain_closed',
|
|
192
|
-
'non_guarantees:',
|
|
193
|
-
' - no_runtime_execution_guarantee',
|
|
194
|
-
].join('\n'), 'utf-8');
|
|
195
|
-
try {
|
|
196
|
-
await assert.rejects(() => loadRuleRegistry(repoPath), /topology|closure|claims/i);
|
|
197
|
-
}
|
|
198
|
-
finally {
|
|
199
|
-
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
test('loads v2 verification bundle from explicit compiled path without catalog fallback', async () => {
|
|
203
|
-
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'gitnexus-runtime-claim-rules-'));
|
|
204
|
-
const repoPath = path.join(tempRoot, 'repo');
|
|
205
|
-
const compiledRoot = path.join(repoPath, '.gitnexus', 'rules', 'compiled');
|
|
206
|
-
await fs.mkdir(compiledRoot, { recursive: true });
|
|
207
|
-
await fs.writeFile(path.join(compiledRoot, 'verification_rules.v2.json'), JSON.stringify({
|
|
208
|
-
bundle_version: '2.0.0',
|
|
209
|
-
family: 'verification_rules',
|
|
210
|
-
generated_at: new Date().toISOString(),
|
|
211
|
-
rules: [
|
|
212
|
-
{
|
|
213
|
-
id: 'demo.bundle.rule.v2',
|
|
214
|
-
version: '2.0.0',
|
|
215
|
-
trigger_family: 'reload',
|
|
216
|
-
resource_types: ['asset'],
|
|
217
|
-
host_base_type: ['ReloadBase'],
|
|
218
|
-
required_hops: ['resource', 'code_runtime'],
|
|
219
|
-
guarantees: ['reload_chain_closed'],
|
|
220
|
-
non_guarantees: ['no_runtime_execution'],
|
|
221
|
-
next_action: 'gitnexus query "reload"',
|
|
222
|
-
file_path: '.gitnexus/rules/compiled/verification_rules.v2.json',
|
|
223
|
-
match: { trigger_tokens: ['reload'] },
|
|
224
|
-
topology: [
|
|
225
|
-
{ hop: 'resource', from: { entity: 'resource' }, to: { entity: 'script' }, edge: { kind: 'binds_script' } },
|
|
226
|
-
],
|
|
227
|
-
closure: {
|
|
228
|
-
required_hops: ['resource', 'code_runtime'],
|
|
229
|
-
failure_map: { missing_evidence: 'rule_matched_but_evidence_missing' },
|
|
230
|
-
},
|
|
231
|
-
claims: {
|
|
232
|
-
guarantees: ['reload_chain_closed'],
|
|
233
|
-
non_guarantees: ['no_runtime_execution'],
|
|
234
|
-
next_action: 'gitnexus query "reload"',
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
],
|
|
238
|
-
}, null, 2), 'utf-8');
|
|
239
|
-
try {
|
|
240
|
-
const registry = await loadRuleRegistry(repoPath);
|
|
241
|
-
assert.equal(registry.activeRules[0].id, 'demo.bundle.rule.v2');
|
|
242
|
-
assert.equal(registry.activeRules[0].version, '2.0.0');
|
|
243
|
-
assert.deepEqual(registry.activeRules[0].required_hops, ['resource', 'code_runtime']);
|
|
244
|
-
}
|
|
245
|
-
finally {
|
|
246
|
-
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
247
|
-
}
|
|
73
|
+
'match:',
|
|
74
|
+
' trigger_tokens:',
|
|
75
|
+
' - reload',
|
|
76
|
+
'closure:',
|
|
77
|
+
' required_hops:',
|
|
78
|
+
' - resource',
|
|
79
|
+
'claims:',
|
|
80
|
+
' guarantees:',
|
|
81
|
+
" - 'guarantee with spaces'",
|
|
82
|
+
' non_guarantees:',
|
|
83
|
+
' - "double-quote \\"inside\\""',
|
|
84
|
+
" - 'single-quote ''inside'''",
|
|
85
|
+
' next_action: query "reload"',
|
|
86
|
+
'topology:',
|
|
87
|
+
' - hop: resource',
|
|
88
|
+
' from:',
|
|
89
|
+
' entity: resource',
|
|
90
|
+
' to:',
|
|
91
|
+
' entity: script',
|
|
92
|
+
' edge:',
|
|
93
|
+
' kind: binds_script',
|
|
94
|
+
].join('\n');
|
|
95
|
+
const rule = parseRuleYaml(yaml, 'scalar.yaml');
|
|
96
|
+
assert.equal(rule.id, 'demo.scalar-parser.v1');
|
|
97
|
+
assert.deepEqual(rule.resource_types, ['asset ref', 'prefab ref']);
|
|
98
|
+
assert.deepEqual(rule.guarantees, ['guarantee with spaces']);
|
|
99
|
+
assert.deepEqual(rule.non_guarantees, ['double-quote "inside"', "single-quote 'inside'"]);
|
|
100
|
+
assert.equal(rule.next_action, 'query "reload"');
|
|
248
101
|
});
|
package/dist/mcp/tools.js
CHANGED
|
@@ -383,76 +383,6 @@ Output enforces unique-result policy and includes path+line evidence hops.`,
|
|
|
383
383
|
required: ['target', 'goal'],
|
|
384
384
|
},
|
|
385
385
|
},
|
|
386
|
-
{
|
|
387
|
-
name: 'rule_lab_analyze',
|
|
388
|
-
description: `Analyze one Rule Lab slice and emit anchor-backed candidates.jsonl.`,
|
|
389
|
-
inputSchema: {
|
|
390
|
-
type: 'object',
|
|
391
|
-
properties: {
|
|
392
|
-
run_id: { type: 'string', description: 'Rule Lab run id' },
|
|
393
|
-
slice_id: { type: 'string', description: 'Rule Lab slice id' },
|
|
394
|
-
repo: { type: 'string', description: 'Repository name or path. Omit if only one repo is indexed.' },
|
|
395
|
-
},
|
|
396
|
-
required: ['run_id', 'slice_id'],
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
name: 'rule_lab_review_pack',
|
|
401
|
-
description: `Pack analyzed candidates into review cards with token budget enforcement.`,
|
|
402
|
-
inputSchema: {
|
|
403
|
-
type: 'object',
|
|
404
|
-
properties: {
|
|
405
|
-
run_id: { type: 'string', description: 'Rule Lab run id' },
|
|
406
|
-
slice_id: { type: 'string', description: 'Rule Lab slice id' },
|
|
407
|
-
max_tokens: { type: 'number', description: 'Token budget cap (default: 6000)', default: 6000 },
|
|
408
|
-
repo: { type: 'string', description: 'Repository name or path. Omit if only one repo is indexed.' },
|
|
409
|
-
},
|
|
410
|
-
required: ['run_id', 'slice_id'],
|
|
411
|
-
},
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
name: 'rule_lab_curate',
|
|
415
|
-
description: `Validate human-curated semantic closure input and persist curated artifacts for promotion.`,
|
|
416
|
-
inputSchema: {
|
|
417
|
-
type: 'object',
|
|
418
|
-
properties: {
|
|
419
|
-
run_id: { type: 'string', description: 'Rule Lab run id' },
|
|
420
|
-
slice_id: { type: 'string', description: 'Rule Lab slice id' },
|
|
421
|
-
input_path: { type: 'string', description: 'Absolute or repo-relative path to curation input JSON' },
|
|
422
|
-
repo: { type: 'string', description: 'Repository name or path. Omit if only one repo is indexed.' },
|
|
423
|
-
},
|
|
424
|
-
required: ['run_id', 'slice_id', 'input_path'],
|
|
425
|
-
},
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
name: 'rule_lab_promote',
|
|
429
|
-
description: `Promote curated candidates into approved YAML rules and upsert catalog.json entries.`,
|
|
430
|
-
inputSchema: {
|
|
431
|
-
type: 'object',
|
|
432
|
-
properties: {
|
|
433
|
-
run_id: { type: 'string', description: 'Rule Lab run id' },
|
|
434
|
-
slice_id: { type: 'string', description: 'Rule Lab slice id' },
|
|
435
|
-
version: { type: 'string', description: 'Promoted rule version (default: 1.0.0)', default: '1.0.0' },
|
|
436
|
-
repo: { type: 'string', description: 'Repository name or path. Omit if only one repo is indexed.' },
|
|
437
|
-
},
|
|
438
|
-
required: ['run_id', 'slice_id'],
|
|
439
|
-
},
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
name: 'rule_lab_regress',
|
|
443
|
-
description: `Evaluate Rule Lab precision/coverage gates and optionally persist a regression report.`,
|
|
444
|
-
inputSchema: {
|
|
445
|
-
type: 'object',
|
|
446
|
-
properties: {
|
|
447
|
-
precision: { type: 'number', description: 'Observed precision metric' },
|
|
448
|
-
coverage: { type: 'number', description: 'Observed coverage metric' },
|
|
449
|
-
probes_path: { type: 'string', description: 'Optional path to a JSON array of regression probes with bucket metadata' },
|
|
450
|
-
run_id: { type: 'string', description: 'Optional run id for report naming' },
|
|
451
|
-
repo: { type: 'string', description: 'Repository name or path. Omit if only one repo is indexed.' },
|
|
452
|
-
},
|
|
453
|
-
required: ['precision', 'coverage'],
|
|
454
|
-
},
|
|
455
|
-
},
|
|
456
386
|
{
|
|
457
387
|
name: 'impact',
|
|
458
388
|
description: `Analyze the blast radius of changing a code symbol.
|
package/dist/types/pipeline.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { GraphNode, GraphRelationship, KnowledgeGraph } from '../core/graph/type
|
|
|
2
2
|
import { CommunityDetectionResult } from '../core/ingestion/community-processor.js';
|
|
3
3
|
import { ProcessDetectionResult } from '../core/ingestion/process-processor.js';
|
|
4
4
|
import type { UnityResourceProcessingResult } from '../core/ingestion/unity-resource-processor.js';
|
|
5
|
-
import type { UnityRuntimeBindingResult } from '../core/ingestion/unity-runtime-binding-rules.js';
|
|
6
5
|
import type { ScopeSelectionDiagnostics } from '../core/ingestion/scope-filter.js';
|
|
7
6
|
export type PipelinePhase = 'idle' | 'extracting' | 'structure' | 'parsing' | 'imports' | 'calls' | 'heritage' | 'communities' | 'processes' | 'enriching' | 'complete' | 'error';
|
|
8
7
|
export interface PipelineProgress {
|
|
@@ -40,7 +39,6 @@ export interface PipelineResult {
|
|
|
40
39
|
communityResult?: CommunityDetectionResult;
|
|
41
40
|
processResult?: ProcessDetectionResult;
|
|
42
41
|
unityResult?: UnityResourceProcessingResult;
|
|
43
|
-
unityRuleBindingResult?: UnityRuntimeBindingResult;
|
|
44
42
|
scopeDiagnostics?: ScopeSelectionDiagnostics;
|
|
45
43
|
csharpPreprocDiagnostics?: CSharpPreprocDiagnostics;
|
|
46
44
|
}
|
|
@@ -49,7 +47,6 @@ export interface PipelineRuntimeSummary {
|
|
|
49
47
|
communityResult?: CommunityDetectionResult;
|
|
50
48
|
processResult?: ProcessDetectionResult;
|
|
51
49
|
unityResult?: UnityResourceProcessingResult;
|
|
52
|
-
unityRuleBindingResult?: UnityRuntimeBindingResult;
|
|
53
50
|
scopeDiagnostics?: ScopeSelectionDiagnostics;
|
|
54
51
|
csharpPreprocDiagnostics?: CSharpPreprocDiagnostics;
|
|
55
52
|
}
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export interface Phase5StageCoverageRow {
|
|
2
|
-
stage: 'analyze' | 'review-pack' | 'curate' | 'promote' | 'regress';
|
|
3
|
-
command: string;
|
|
4
|
-
status: 'passed' | 'failed';
|
|
5
|
-
retry_hint?: string;
|
|
6
|
-
error?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface Phase5FailureClassification {
|
|
9
|
-
code: string;
|
|
10
|
-
retry_hint: string;
|
|
11
|
-
repro_command: string;
|
|
12
|
-
}
|
|
13
|
-
export interface Phase5RuleLabAcceptanceReport {
|
|
14
|
-
generated_at: string;
|
|
15
|
-
repo_alias: string;
|
|
16
|
-
repo_path: string;
|
|
17
|
-
run_id: string;
|
|
18
|
-
stage_coverage: Phase5StageCoverageRow[];
|
|
19
|
-
metrics: {
|
|
20
|
-
precision: number;
|
|
21
|
-
coverage: number;
|
|
22
|
-
probe_pass_rate: number;
|
|
23
|
-
token_budget: number;
|
|
24
|
-
};
|
|
25
|
-
authenticity_checks: {
|
|
26
|
-
static_no_hardcoded_reload: {
|
|
27
|
-
pass: boolean;
|
|
28
|
-
blocked_symbols: string[];
|
|
29
|
-
};
|
|
30
|
-
dsl_lint_pass: boolean;
|
|
31
|
-
};
|
|
32
|
-
failure_classifications: Phase5FailureClassification[];
|
|
33
|
-
artifact_paths: {
|
|
34
|
-
manifest: string;
|
|
35
|
-
candidates: string;
|
|
36
|
-
review_cards: string;
|
|
37
|
-
curation_input: string;
|
|
38
|
-
curated: string;
|
|
39
|
-
catalog: string;
|
|
40
|
-
promoted_files: string[];
|
|
41
|
-
regress_report?: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export interface BuildPhase5RuleLabAcceptanceInput {
|
|
45
|
-
repoAlias: string;
|
|
46
|
-
repoPath?: string;
|
|
47
|
-
seed?: string;
|
|
48
|
-
}
|
|
49
|
-
export declare function buildPhase5RuleLabAcceptanceReport(input: BuildPhase5RuleLabAcceptanceInput): Promise<Phase5RuleLabAcceptanceReport>;
|
|
50
|
-
export declare function runPhase5RuleLabGate(input: {
|
|
51
|
-
reportPath: string;
|
|
52
|
-
}): Promise<{
|
|
53
|
-
pass: boolean;
|
|
54
|
-
reason?: string;
|
|
55
|
-
}>;
|
|
56
|
-
export declare function writePhase5RuleLabAcceptanceArtifacts(input: {
|
|
57
|
-
report: Phase5RuleLabAcceptanceReport;
|
|
58
|
-
jsonPath: string;
|
|
59
|
-
mdPath: string;
|
|
60
|
-
}): Promise<void>;
|