@opensip-cli/graph 0.1.8 → 0.1.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.
Files changed (30) hide show
  1. package/README.md +2 -2
  2. package/dist/__tests__/cli/symbol-index.test.js +29 -8
  3. package/dist/__tests__/cli/symbol-index.test.js.map +1 -1
  4. package/dist/cli/graph/graph-aux-command-specs.d.ts +2 -6
  5. package/dist/cli/graph/graph-aux-command-specs.d.ts.map +1 -1
  6. package/dist/cli/graph/graph-aux-command-specs.js +10 -9
  7. package/dist/cli/graph/graph-aux-command-specs.js.map +1 -1
  8. package/dist/cli/orchestrate/__tests__/_equivalence-harness.js +4 -1
  9. package/dist/cli/orchestrate/__tests__/_equivalence-harness.js.map +1 -1
  10. package/dist/cli/orchestrate/__tests__/export-index.test.d.ts +6 -4
  11. package/dist/cli/orchestrate/__tests__/export-index.test.d.ts.map +1 -1
  12. package/dist/cli/orchestrate/__tests__/export-index.test.js +66 -38
  13. package/dist/cli/orchestrate/__tests__/export-index.test.js.map +1 -1
  14. package/dist/cli/orchestrate/__tests__/layout-equivalence.test.d.ts +43 -0
  15. package/dist/cli/orchestrate/__tests__/layout-equivalence.test.d.ts.map +1 -0
  16. package/dist/cli/orchestrate/__tests__/layout-equivalence.test.js +329 -0
  17. package/dist/cli/orchestrate/__tests__/layout-equivalence.test.js.map +1 -0
  18. package/dist/cli/symbol-index.d.ts +6 -1
  19. package/dist/cli/symbol-index.d.ts.map +1 -1
  20. package/dist/cli/symbol-index.js +22 -4
  21. package/dist/cli/symbol-index.js.map +1 -1
  22. package/dist/cross-package/export-index.d.ts +30 -31
  23. package/dist/cross-package/export-index.d.ts.map +1 -1
  24. package/dist/cross-package/export-index.js +40 -17
  25. package/dist/cross-package/export-index.js.map +1 -1
  26. package/dist/cross-package/package-group.d.ts +52 -0
  27. package/dist/cross-package/package-group.d.ts.map +1 -0
  28. package/dist/cross-package/package-group.js +64 -0
  29. package/dist/cross-package/package-group.js.map +1 -0
  30. package/package.json +286 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensip-cli/graph",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Static call-graph + dead-end analysis (seven-stage pipeline)",
6
6
  "keywords": [
@@ -40,39 +40,305 @@
40
40
  "commands": [
41
41
  {
42
42
  "name": "graph",
43
- "description": "Run static call-graph analysis (rules, entry points, catalog summary in one report)"
43
+ "description": "Run static call-graph analysis (rules, entry points, catalog summary in one report)",
44
+ "commonFlags": [
45
+ "cwd",
46
+ "json",
47
+ "quiet",
48
+ "verbose",
49
+ "debug",
50
+ "reportTo",
51
+ "apiKey"
52
+ ],
53
+ "options": [
54
+ {
55
+ "flag": "--no-cache",
56
+ "description": "Skip catalog cache (force full rebuild)",
57
+ "negatable": true
58
+ },
59
+ {
60
+ "flag": "--resolution",
61
+ "value": "<mode>",
62
+ "description": "Edge resolution tier: exact (semantic) or fast (syntactic, no type checker)",
63
+ "default": "exact",
64
+ "choices": [
65
+ "exact",
66
+ "fast"
67
+ ]
68
+ },
69
+ {
70
+ "flag": "--recipe",
71
+ "value": "<name>",
72
+ "description": "Run a named recipe (a subset of graph rules). Default: all rules"
73
+ },
74
+ {
75
+ "flag": "--show",
76
+ "value": "<session>",
77
+ "description": "Replay a stored graph session by id, or latest for the latest graph session"
78
+ },
79
+ {
80
+ "flag": "--gate-save",
81
+ "description": "Save current Signal set as the gate baseline",
82
+ "default": false
83
+ },
84
+ {
85
+ "flag": "--gate-compare",
86
+ "description": "Compare current Signals to the gate baseline",
87
+ "default": false
88
+ },
89
+ {
90
+ "flag": "--profile",
91
+ "value": "<path>",
92
+ "description": "Write graph performance profile JSON to path"
93
+ },
94
+ {
95
+ "flag": "--workspace",
96
+ "description": "Fan out across detected workspace units (memory-isolated; polyglot)",
97
+ "default": false
98
+ },
99
+ {
100
+ "flag": "--exact",
101
+ "description": "Use the single-program exact build engine instead of the default parallel sharded engine (both resolve through one shared model — exact = the 1-shard case — held equivalent by the directional equivalence guardrail; --exact suits small/single-package repos).",
102
+ "default": false
103
+ },
104
+ {
105
+ "flag": "--concurrency",
106
+ "value": "<n>",
107
+ "description": "Concurrency cap for --workspace and the sharded build (default: cpus()-1)"
108
+ },
109
+ {
110
+ "flag": "--language",
111
+ "value": "<name>",
112
+ "description": "Force a specific language adapter (suppresses auto-detection)"
113
+ },
114
+ {
115
+ "flag": "--list-files",
116
+ "description": "List the source files graph would discover for this scope and exit (no build; honors [paths...], --workspace, --language, --json)",
117
+ "default": false
118
+ },
119
+ {
120
+ "flag": "--sarif",
121
+ "value": "<path>",
122
+ "description": "Also write this run’s findings as a SARIF 2.1.0 file (for GitHub Code Scanning). Composes with --gate-save; written even when the gate fails."
123
+ }
124
+ ],
125
+ "args": [
126
+ {
127
+ "name": "paths",
128
+ "variadic": true,
129
+ "optional": true,
130
+ "description": "Subtrees to analyze (default: whole project)"
131
+ }
132
+ ],
133
+ "scope": "project",
134
+ "output": "raw-stream",
135
+ "rawStreamReason": "runtime-render-dispatch"
44
136
  },
45
137
  {
46
138
  "name": "graph-shard-worker",
47
- "description": "[internal] Build one shard from a spec file and emit a ShardBuildResult JSON (spawned by the sharded build)"
48
- },
49
- {
50
- "name": "graph-equivalence-check",
51
- "description": "[internal] Verify the sharded build is byte-equivalent to the exact build on a real repo (gates production edge divergence against a committed budget)"
139
+ "description": "[internal] Build one shard from a spec file and emit a ShardBuildResult JSON (spawned by the sharded build)",
140
+ "visibility": "internal",
141
+ "commonFlags": [],
142
+ "args": [
143
+ {
144
+ "name": "specPath",
145
+ "description": "Path to a JSON ShardWorkerSpec file"
146
+ }
147
+ ],
148
+ "scope": "project",
149
+ "output": "raw-stream",
150
+ "rawStreamReason": "worker-ipc"
52
151
  },
53
152
  {
54
153
  "name": "graph-run-worker",
55
- "description": "[internal] Run the graph build headless and stream progress + result over IPC (forked by the live view)"
154
+ "description": "[internal] Run the graph build headless and stream progress + result over IPC (forked by the live view)",
155
+ "visibility": "internal",
156
+ "commonFlags": [],
157
+ "args": [
158
+ {
159
+ "name": "specPath",
160
+ "description": "Path to a JSON graph build-spec file"
161
+ }
162
+ ],
163
+ "scope": "project",
164
+ "output": "raw-stream",
165
+ "rawStreamReason": "worker-ipc"
56
166
  },
57
167
  {
58
168
  "name": "export",
59
- "description": "Export graph analysis artifacts (--format sarif | catalog | baseline)"
169
+ "description": "Export graph analysis artifacts: --format sarif (SARIF v2.1.0 findings), catalog (CatalogExport JSON), or baseline (gate fingerprint JSON)",
170
+ "parent": "graph",
171
+ "commonFlags": [
172
+ "cwd",
173
+ "json"
174
+ ],
175
+ "options": [
176
+ {
177
+ "flag": "--format",
178
+ "value": "<fmt>",
179
+ "description": "Export artifact: sarif | catalog | baseline",
180
+ "required": true,
181
+ "choices": [
182
+ "sarif",
183
+ "catalog",
184
+ "baseline"
185
+ ]
186
+ },
187
+ {
188
+ "flag": "--output-sarif",
189
+ "value": "<path>",
190
+ "description": "Output file path for the SARIF v2.1.0 document"
191
+ },
192
+ {
193
+ "flag": "--catalog-output",
194
+ "value": "<path>",
195
+ "description": "Output file path for the CatalogExport JSON"
196
+ },
197
+ {
198
+ "flag": "--tenant-id",
199
+ "value": "<id>",
200
+ "description": "Tenant scope stamped on every row + provenance"
201
+ },
202
+ {
203
+ "flag": "--repo-id",
204
+ "value": "<id>",
205
+ "description": "Repository scope stamped on every row"
206
+ },
207
+ {
208
+ "flag": "--git-sha",
209
+ "value": "<sha>",
210
+ "description": "Commit SHA the catalog was extracted at"
211
+ },
212
+ {
213
+ "flag": "--run-id",
214
+ "value": "<uuid>",
215
+ "description": "Run id for provenance (auto-generated if absent)"
216
+ },
217
+ {
218
+ "flag": "--mode",
219
+ "value": "<mode>",
220
+ "description": "'initial' (full rebuild) or 'incremental' (reuse cache when present)",
221
+ "default": "initial"
222
+ },
223
+ {
224
+ "flag": "--changed-file",
225
+ "value": "<relPath>",
226
+ "description": "Changed file (repeatable). Advisory today — the engine derives the true changed set from fingerprint diffs; recorded for observability.",
227
+ "arrayDefault": []
228
+ },
229
+ {
230
+ "flag": "--language",
231
+ "value": "<name>",
232
+ "description": "Force a specific language adapter (suppresses auto-detection)"
233
+ },
234
+ {
235
+ "flag": "--resolution",
236
+ "value": "<mode>",
237
+ "description": "Edge resolution tier: exact (semantic) or fast (syntactic, no type checker)",
238
+ "default": "exact",
239
+ "choices": [
240
+ "exact",
241
+ "fast"
242
+ ]
243
+ },
244
+ {
245
+ "flag": "--out",
246
+ "value": "<path>",
247
+ "description": "Output file path for the JSON baseline"
248
+ }
249
+ ],
250
+ "scope": "project",
251
+ "output": "raw-stream",
252
+ "rawStreamReason": "file-export"
60
253
  },
61
254
  {
62
255
  "name": "recipes",
63
- "description": "List available graph recipes"
256
+ "description": "List available graph recipes",
257
+ "parent": "graph",
258
+ "commonFlags": [
259
+ "json"
260
+ ],
261
+ "scope": "project",
262
+ "output": "command-result"
64
263
  },
65
264
  {
66
265
  "name": "lookup",
67
- "description": "Look up function occurrences by simple name from the persisted catalog"
266
+ "description": "Look up function occurrences by simple name from the persisted catalog",
267
+ "parent": "graph",
268
+ "commonFlags": [
269
+ "json"
270
+ ],
271
+ "args": [
272
+ {
273
+ "name": "name",
274
+ "description": "Function simple name to look up (e.g. \"saveBaseline\")"
275
+ }
276
+ ],
277
+ "scope": "project",
278
+ "output": "raw-stream",
279
+ "rawStreamReason": "lookup"
68
280
  },
69
281
  {
70
282
  "name": "index",
71
- "description": "Emit a symbolindex.json artifact (name→file:line and file→names) from the persisted catalog"
283
+ "description": "Emit a symbolindex.json artifact (name→file:line and file→names); --build refreshes the catalog first",
284
+ "parent": "graph",
285
+ "commonFlags": [],
286
+ "options": [
287
+ {
288
+ "flag": "--build",
289
+ "description": "Run the graph pipeline to refresh the catalog before emitting the index",
290
+ "default": false
291
+ },
292
+ {
293
+ "flag": "--cwd <path>",
294
+ "description": "Target directory (out path resolves against this)"
295
+ },
296
+ {
297
+ "flag": "--out",
298
+ "value": "<path>",
299
+ "description": "Output file path",
300
+ "default": "symbolindex.json"
301
+ }
302
+ ],
303
+ "scope": "project",
304
+ "output": "raw-stream",
305
+ "rawStreamReason": "file-export"
72
306
  },
73
307
  {
74
308
  "name": "list",
75
- "description": "List available graph rules"
309
+ "description": "List available graph rules",
310
+ "parent": "graph",
311
+ "commonFlags": [
312
+ "cwd",
313
+ "json"
314
+ ],
315
+ "scope": "project",
316
+ "output": "command-result"
317
+ },
318
+ {
319
+ "name": "graph-equivalence-check",
320
+ "description": "[internal] Verify the sharded build is byte-equivalent to the exact build on a real repo (gates production edge divergence against a committed budget)",
321
+ "visibility": "internal",
322
+ "commonFlags": [],
323
+ "options": [
324
+ {
325
+ "flag": "--cwd <path>",
326
+ "description": "Target repo root to check (default: current directory)"
327
+ },
328
+ {
329
+ "flag": "--budget",
330
+ "value": "<path>",
331
+ "description": "Path to the committed budget JSON (relative to cwd or absolute)",
332
+ "default": ".config/graph-equivalence-budget.json"
333
+ },
334
+ {
335
+ "flag": "--update-budget",
336
+ "description": "Rewrite the budget file to the observed production divergence count (capture/tighten); always exits 0"
337
+ }
338
+ ],
339
+ "scope": "project",
340
+ "output": "raw-stream",
341
+ "rawStreamReason": "diagnostic-gate"
76
342
  }
77
343
  ],
78
344
  "capabilities": [
@@ -109,19 +375,19 @@
109
375
  "ink": "^7.0.5",
110
376
  "react": "^19.2.7",
111
377
  "zod": "^4.4.3",
112
- "@opensip-cli/cli-ui": "0.1.8",
113
- "@opensip-cli/config": "0.1.8",
114
- "@opensip-cli/core": "0.1.8",
115
- "@opensip-cli/datastore": "0.1.8",
116
- "@opensip-cli/contracts": "0.1.8",
117
- "@opensip-cli/session-store": "0.1.8"
378
+ "@opensip-cli/cli-ui": "0.1.9",
379
+ "@opensip-cli/config": "0.1.9",
380
+ "@opensip-cli/contracts": "0.1.9",
381
+ "@opensip-cli/core": "0.1.9",
382
+ "@opensip-cli/datastore": "0.1.9",
383
+ "@opensip-cli/session-store": "0.1.9"
118
384
  },
119
385
  "devDependencies": {
120
386
  "@types/node": "^24.13.2",
121
387
  "@types/react": "^19.2.17",
122
388
  "typescript": "~6.0.3",
123
389
  "vitest": "^4.1.8",
124
- "@opensip-cli/output": "0.1.8"
390
+ "@opensip-cli/output": "0.1.9"
125
391
  },
126
392
  "scripts": {
127
393
  "build": "tsc",