@henols/vice-mcp 0.2.2 → 0.2.4

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 (84) hide show
  1. package/README.md +2 -2
  2. package/THIRD-PARTY-NOTICES.md +422 -1
  3. package/anno-bank.ts +171 -0
  4. package/anno-cli.ts +1736 -163
  5. package/anno-confidence.ts +2 -2
  6. package/anno-derive.ts +6 -6
  7. package/anno-details.ts +4 -4
  8. package/anno-enum-gen.ts +416 -30
  9. package/anno-export-asm.ts +1211 -126
  10. package/anno-graphics.ts +338 -0
  11. package/anno-hazard-report.ts +1367 -0
  12. package/anno-import.ts +495 -0
  13. package/anno-index.ts +8 -8
  14. package/anno-join.ts +480 -0
  15. package/anno-memmap-render.ts +22 -21
  16. package/anno-provenance-ledger.ts +472 -0
  17. package/anno-regbits-gen.ts +13 -13
  18. package/anno-register.ts +159 -0
  19. package/anno-store-export.ts +661 -0
  20. package/anno-store.ts +635 -124
  21. package/anno-symbols.ts +7 -7
  22. package/anno-tools.ts +1169 -16
  23. package/anno-types.ts +313 -40
  24. package/backend-detect.mts +124 -312
  25. package/build.ts +3 -1
  26. package/capture-predicate.ts +597 -0
  27. package/channel-lock.ts +349 -0
  28. package/evid-ingest.ts +217 -0
  29. package/evid-reconcile.ts +316 -0
  30. package/host-tool-client.ts +430 -0
  31. package/incident-record.ts +23 -12
  32. package/install-resources.ts +29 -13
  33. package/memmap-lookup.ts +285 -0
  34. package/package.json +27 -8
  35. package/prg-image.ts +1 -2
  36. package/repo-root.ts +87 -3
  37. package/resources/backend-detect.mjs +98 -236
  38. package/resources/broker-control.mjs +220 -54
  39. package/resources/broker-epoch.mjs +7 -8
  40. package/resources/broker-kill.mjs +36 -31
  41. package/resources/broker-launch.mjs +511 -374
  42. package/resources/broker-state.mjs +69 -24
  43. package/resources/container-guard.mjs +1 -1
  44. package/resources/ghidra-project.mjs +790 -0
  45. package/resources/host-tool.mjs +2533 -0
  46. package/resources/vice-broker.mjs +434 -290
  47. package/resources/vice-launcher.sh +127 -9
  48. package/stock-address.ts +1 -1
  49. package/stock-condition.ts +1 -1
  50. package/stock-connect.ts +9 -5
  51. package/stock-derived.ts +29 -37
  52. package/stock-diagnose.ts +200 -36
  53. package/stock-dispatch.ts +179 -77
  54. package/stock-handler.ts +1 -1
  55. package/stock-paths.ts +18 -14
  56. package/stock-petscii.ts +1 -1
  57. package/stock-protocol.ts +1 -1
  58. package/stock-recycle.ts +83 -2
  59. package/stock-reproducible-run.ts +811 -0
  60. package/stock-run-until.ts +100 -1
  61. package/stock-symbols.ts +4 -4
  62. package/stock-timing.ts +1 -1
  63. package/stop-oracle.ts +167 -0
  64. package/text-capability-probe.ts +660 -0
  65. package/text-connect.ts +157 -0
  66. package/text-protocol.ts +810 -0
  67. package/text-tools.ts +778 -0
  68. package/textmon-backtrace.ts +385 -0
  69. package/textmon-cpuhistory.ts +335 -0
  70. package/textmon-memmap.ts +494 -0
  71. package/textmon-profile.ts +458 -0
  72. package/textmon-registers.ts +748 -0
  73. package/tools-manifest.stock.json +864 -3
  74. package/vice-broker-client.ts +253 -108
  75. package/vice-errors.ts +268 -0
  76. package/vice-proxy.ts +339 -2144
  77. package/vsf-slice.ts +640 -0
  78. package/anno-d64.ts +0 -310
  79. package/capability-registry.ts +0 -390
  80. package/refresh-manifest.ts +0 -124
  81. package/tools-manifest.json +0 -1223
  82. package/vice-probe.ts +0 -278
  83. package/vice-sync.ts +0 -336
  84. package/vice.ts +0 -772
package/anno-register.ts CHANGED
@@ -207,6 +207,165 @@ export const ANNO_VERB_REGISTER: readonly AnnoVerbRegisterEntry[] = Object.freez
207
207
  "instead is what lets MCP-01's zero-caller clause hold without losing a capability.",
208
208
  },
209
209
 
210
+ {
211
+ verb: "anno_exclude_range",
212
+ kind: "unclassified",
213
+ consumers: [
214
+ { path: "src/mcp/vice/anno-store.ts", symbol: "addExcludedRange" },
215
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_exclude_range" },
216
+ ],
217
+ requirements: ["BUILD-05", "BUILD-07"],
218
+ rationale:
219
+ "BUILD-05 requires that any exclusion be one the user asked for, made explicit and recorded rather than " +
220
+ "silently applied. BUILD-07 requires a user-requested exclusion be emitted as a recorded excluded range " +
221
+ "rather than a hole. Both clauses presuppose a route by which the user STATES the request. Without this " +
222
+ "verb the store persists a table no caller on this surface can write -- a stored capability with no " +
223
+ "route, which is the same shape anno_add_scope's own entry was written against. The surface is the right " +
224
+ "home rather than the CLI because an exclusion is a small bounded piece of state a session sets while " +
225
+ "looking at a range, not a filesystem artefact.",
226
+ note:
227
+ "This verb's existence is what makes the requirement's 'never the tool's' clause CHECKABLE rather than " +
228
+ "aspirational. As long as the only way a range can be excluded is a user calling this verb, there is no " +
229
+ "code path by which the tool excludes anything on its own judgement. The alternative rejected: a " +
230
+ "confidence or verdict threshold inside the exporter would have 'implemented' the same user-visible " +
231
+ "outcome and would have made the tool the decider -- the failure mode the 2026-09-10 rewording of " +
232
+ "BUILD-05 removed.",
233
+ },
234
+ {
235
+ verb: "anno_include_range",
236
+ kind: "unclassified",
237
+ consumers: [
238
+ { path: "src/mcp/vice/anno-store.ts", symbol: "removeExcludedRange" },
239
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_include_range" },
240
+ ],
241
+ requirements: ["BUILD-07"],
242
+ rationale:
243
+ "The inverse of the overlap refusal, on the same terms anno_remove_scope's entry states: the store " +
244
+ "refuses any exclusion overlapping an existing one, so a single transposed end would otherwise make a " +
245
+ "whole region permanently unexcludable, with the only route back being a revert through the bounded " +
246
+ "snapshot ring. A write verb whose mistakes cannot be undone is a data-loss surface even when every " +
247
+ "individual refusal is correct, so the inverse ships in the same phase as the refusal.",
248
+ note:
249
+ "The measured mechanism, not an asserted risk: the snapshot ring is bounded at MAX_SNAPSHOT_REVISIONS, so " +
250
+ "a mistake that is not directly undoable becomes permanently undoable after that many further writes.",
251
+ },
252
+ {
253
+ verb: "anno_import_ghidra_export",
254
+ kind: "unclassified",
255
+ consumers: [
256
+ { path: "src/mcp/vice/anno-import.ts", symbol: "importGhidraExport" },
257
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_import_ghidra_export" },
258
+ ],
259
+ requirements: ["IMP-01", "IMP-02"],
260
+ rationale:
261
+ "The manifest's five absorbed upstream procedures predate this store having any Ghidra-derived import path " +
262
+ "at all, so the derivation is silent about a verb that did not exist when the manifest was written. IMP-01 " +
263
+ "requires a container-side importer reading a host-written transfer file through the store's single seam, " +
264
+ "and IMP-02 requires that transfer file to be transient evidence -- digested, consumed and deleted in the " +
265
+ "same call, never a second on-disk model. This verb is the only route either requirement has: without it, " +
266
+ "a Ghidra export sits on disk as a file no curated verb ever reads.",
267
+ },
268
+ {
269
+ verb: "anno_join_memmap",
270
+ kind: "unclassified",
271
+ consumers: [
272
+ { path: "src/mcp/vice/anno-join.ts", symbol: "runMemmapJoin" },
273
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_join_memmap" },
274
+ ],
275
+ requirements: ["AUTO-01"],
276
+ rationale:
277
+ "AUTO-01 requires machine addresses to annotate themselves into the store mechanically -- no agent call, no " +
278
+ "queue walk and no skill invocation anywhere in the loop -- by joining stored cross-references against " +
279
+ "c64-memory-mapping's memmap.json. The manifest's five procedures never describe this join at all, because " +
280
+ "it answers a question this project's own store creates (what does a stored cross-reference's target " +
281
+ "address MEAN against the published memory map), not one upstream's absorbed procedures ever asked. Without " +
282
+ "this verb the annotation the join produces has no route onto the surface at all.",
283
+ },
284
+ {
285
+ verb: "anno_evid_ingest",
286
+ kind: "unclassified",
287
+ consumers: [
288
+ { path: "src/mcp/vice/evid-ingest.ts", symbol: "ingestAccessMap" },
289
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_evid_ingest" },
290
+ ],
291
+ requirements: ["EVID-01", "EVID-04"],
292
+ rationale:
293
+ "EVID-01 requires what the emulator observed executing to become durable, accumulating rows in `.annostore`, " +
294
+ "keyed by run identity, so a later session queries the evidence instead of re-running the program. EVID-04 " +
295
+ "requires the write path be unable to state, imply or render that an address is data on the strength of " +
296
+ "never having been observed executing. The manifest's five absorbed upstream procedures predate this store " +
297
+ "having any runtime-evidence table at all, so the derivation is silent about a verb that did not exist when " +
298
+ "the manifest was written. This verb is the ONE place a parsed memmapshow access map becomes store rows: " +
299
+ "without it, an observed execute bit has no route onto the surface at all, and EVID-01's own goal (query the " +
300
+ "evidence instead of re-running the program) is unreachable.",
301
+ },
302
+ {
303
+ verb: "anno_evid_disagreements",
304
+ kind: "unclassified",
305
+ consumers: [
306
+ { path: "src/mcp/vice/evid-reconcile.ts", symbol: "reconcileObservedExecution" },
307
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_evid_disagreements" },
308
+ ],
309
+ requirements: ["EVID-03", "EVID-04"],
310
+ rationale:
311
+ "EVID-03 requires a user be able to ask where the byte-derived block classification and the observed-execution " +
312
+ "evidence disagree, and get the disagreements first, with the block table never silently overwritten and " +
313
+ "agreement reported as a count rather than a wall of rows. EVID-04 requires that no summary this surface " +
314
+ "produces can state, imply or render that a never-observed address is data, and that every count carries the " +
315
+ "denominator it is a fraction of. This verb is the ONE place `reconcileObservedExecution()`'s pure join is " +
316
+ "reached from the MCP surface: without it, the reconciliation module a prior plan built has no caller at all, " +
317
+ "and EVID-03's own goal (a user can ask) is unreachable.",
318
+ },
319
+ {
320
+ verb: "anno_evid_runs",
321
+ kind: "unclassified",
322
+ consumers: [
323
+ { path: "src/mcp/vice/anno-store.ts", symbol: "listObservedRuns" },
324
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_evid_runs" },
325
+ ],
326
+ requirements: ["EVID-04"],
327
+ rationale:
328
+ "EVID-04 requires that any summary carry the denominator it is a fraction of and that a union across however " +
329
+ "many runs never be presented as exhaustive. This verb is the ONE surface route to `listObservedRuns()`'s " +
330
+ "per-run observation counts and their shared denominator, so a later session can see what evidence a store " +
331
+ "already holds -- across however many runs contributed -- without re-running the program and without ever " +
332
+ "reading the counts as coverage of the image.",
333
+ },
334
+ {
335
+ verb: "anno_evid_reset",
336
+ kind: "unclassified",
337
+ consumers: [
338
+ { path: "src/mcp/vice/anno-store.ts", symbol: "deleteExecObservationsForRun" },
339
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_evid_reset" },
340
+ ],
341
+ requirements: ["EVID-05"],
342
+ rationale:
343
+ "EVID-05 requires that a bracket can be reset and re-measured without a previous run's observations leaking " +
344
+ "into it. This verb is the store-side half of that reset (beside plan 43-03's emulator-side `vice_memmap_zap`): " +
345
+ "it derives the run identity through the same `runIdentityFrom()` `anno_evid_ingest` uses and deletes only " +
346
+ "that identity's rows, leaving every other identity and the byte-derived block table untouched. Without it, " +
347
+ "`deleteExecObservationsForRun()` -- the store function EVID-05's own requirement asks for -- has no route " +
348
+ "onto the surface at all.",
349
+ },
350
+ {
351
+ verb: "anno_hazard_report",
352
+ kind: "unclassified",
353
+ consumers: [
354
+ { path: "src/mcp/vice/anno-hazard-report.ts", symbol: "buildHazardReport" },
355
+ { path: "src/mcp/vice/anno-tools.ts", symbol: "anno_hazard_report" },
356
+ ],
357
+ requirements: ["BUILD-04"],
358
+ rationale:
359
+ "A movement-blocking construction must be askable and enumerable, with its detection mechanism and its " +
360
+ "detection strength reported beside it, and with a third undecided outcome that is never rendered as " +
361
+ "clean. This verb is the ONE place the pure hazard-report function is reached from the surface: without " +
362
+ "it, the module a prior task built has no caller at all, and the goal it exists for (a user can ask what " +
363
+ "blocks a program's code from being moved) is unreachable. The manifest's five absorbed upstream " +
364
+ "procedures predate any movement-hazard concept in this store at all, so the derivation is silent about a " +
365
+ "verb that answers a question upstream never asked. This verb opens no new store table and writes " +
366
+ "nothing -- it is a derived query over tables the surface already writes through other verbs.",
367
+ },
368
+
210
369
  // --- manifest-deviation: classified, routed, and answering differently ---
211
370
  {
212
371
  verb: "anno_save_project",