@henols/vice-mcp 0.2.1 → 0.2.3

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 (108) hide show
  1. package/README.md +4 -3
  2. package/THIRD-PARTY-NOTICES.md +423 -25
  3. package/{r2000-acme-ident.ts → anno-acme-ident.ts} +13 -13
  4. package/anno-bank.ts +171 -0
  5. package/anno-cli.ts +3040 -0
  6. package/{r2000-confidence.ts → anno-confidence.ts} +22 -22
  7. package/anno-coverage.ts +2465 -0
  8. package/anno-derive.ts +590 -0
  9. package/anno-details.ts +169 -0
  10. package/anno-enum-gen.ts +919 -0
  11. package/anno-export-asm.ts +2396 -0
  12. package/anno-graphics.ts +338 -0
  13. package/anno-hazard-report.ts +1367 -0
  14. package/anno-import.ts +495 -0
  15. package/anno-index.ts +150 -0
  16. package/anno-join.ts +480 -0
  17. package/{r2000-memmap-render.ts → anno-memmap-render.ts} +236 -95
  18. package/anno-provenance-ledger.ts +472 -0
  19. package/{r2000-regbits-gen.ts → anno-regbits-gen.ts} +20 -15
  20. package/{r2000-regbits.json → anno-regbits.json} +2 -2
  21. package/anno-register.ts +399 -0
  22. package/anno-store-export.ts +661 -0
  23. package/anno-store.ts +4002 -0
  24. package/anno-symbols.ts +266 -0
  25. package/anno-tools.ts +3264 -0
  26. package/anno-types.ts +1909 -0
  27. package/backend-detect.mts +124 -312
  28. package/block-class.ts +201 -0
  29. package/build.ts +4 -2
  30. package/capture-predicate.ts +597 -0
  31. package/channel-lock.ts +349 -0
  32. package/disasm-decoder.ts +14 -14
  33. package/disasm-opcodes.ts +4 -4
  34. package/disasm-renderer.ts +2 -2
  35. package/evid-ingest.ts +217 -0
  36. package/evid-reconcile.ts +316 -0
  37. package/host-tool-client.ts +430 -0
  38. package/hostpath.ts +1 -1
  39. package/incident-record.ts +23 -12
  40. package/install-resources.ts +30 -14
  41. package/memmap-lookup.ts +285 -0
  42. package/package.json +48 -23
  43. package/prg-image.ts +118 -0
  44. package/repo-root.ts +107 -8
  45. package/resources/backend-detect.mjs +98 -236
  46. package/resources/broker-control.mjs +189 -16
  47. package/resources/broker-epoch.mjs +1 -1
  48. package/resources/broker-kill.mjs +8 -2
  49. package/resources/broker-launch.mjs +373 -214
  50. package/resources/broker-state.mjs +64 -18
  51. package/resources/container-guard.mjs +1 -1
  52. package/resources/ghidra-project.mjs +790 -0
  53. package/resources/host-tool.mjs +2561 -0
  54. package/resources/vice-broker.mjs +330 -184
  55. package/resources/vice-launcher.sh +130 -12
  56. package/stock-address.ts +6 -6
  57. package/stock-cia.ts +2 -2
  58. package/stock-condition.ts +8 -8
  59. package/stock-connect.ts +10 -6
  60. package/stock-derived.ts +29 -37
  61. package/stock-diagnose.ts +200 -36
  62. package/stock-dispatch.ts +200 -68
  63. package/stock-execution.ts +5 -3
  64. package/stock-handler.ts +1 -1
  65. package/stock-input.ts +9 -9
  66. package/stock-machine.ts +17 -6
  67. package/stock-paths.ts +18 -14
  68. package/stock-petscii.ts +1 -1
  69. package/stock-protocol.ts +17 -12
  70. package/stock-recycle.ts +83 -2
  71. package/stock-registers.ts +54 -29
  72. package/stock-reproducible-run.ts +811 -0
  73. package/stock-run-until.ts +100 -1
  74. package/stock-sprites.ts +3 -3
  75. package/stock-symbols.ts +13 -13
  76. package/stock-timing.ts +2 -2
  77. package/stock-vicii.ts +1 -1
  78. package/stop-oracle.ts +167 -0
  79. package/text-capability-probe.ts +660 -0
  80. package/text-connect.ts +157 -0
  81. package/text-protocol.ts +810 -0
  82. package/text-tools.ts +778 -0
  83. package/textmon-backtrace.ts +385 -0
  84. package/textmon-cpuhistory.ts +335 -0
  85. package/textmon-memmap.ts +494 -0
  86. package/textmon-profile.ts +458 -0
  87. package/textmon-registers.ts +748 -0
  88. package/tools-manifest.stock.json +864 -3
  89. package/version.ts +1 -1
  90. package/vice-broker-client.ts +189 -42
  91. package/vice-errors.ts +268 -0
  92. package/vice-proxy.ts +392 -2175
  93. package/vsf-slice.ts +640 -0
  94. package/capability-registry.ts +0 -388
  95. package/r2000-cli.ts +0 -1103
  96. package/r2000-d64.ts +0 -310
  97. package/r2000-enum-gen.ts +0 -574
  98. package/r2000-launch.ts +0 -357
  99. package/r2000-mcp-client.ts +0 -596
  100. package/r2000-project.ts +0 -190
  101. package/r2000-symbols.ts +0 -388
  102. package/r2000-tools.ts +0 -914
  103. package/r2000-verify.ts +0 -184
  104. package/refresh-manifest.ts +0 -124
  105. package/tools-manifest.json +0 -1223
  106. package/vice-probe.ts +0 -278
  107. package/vice-sync.ts +0 -336
  108. package/vice.ts +0 -772
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- // r2000-confidence.ts -- the ONE authoritative place in this repo for D-25's
2
+ // anno-confidence.ts -- the ONE authoritative place in this repo for D-25's
3
3
  // confidence-grade convention: a machine-readable bracket-token prefix inside
4
- // an r2000 line comment (e.g. `[confirmed-code] observed executing at $0810`).
4
+ // an anno line comment (e.g. `[confirmed-code] observed executing at $0810`).
5
5
  //
6
- // WHY THIS MODULE EXISTS: r2000's own `BlockType` (twelve variants -- Code,
6
+ // WHY THIS MODULE EXISTS: anno's own `BlockType` (twelve variants -- Code,
7
7
  // Byte, Word, Address, PETSCII, Screencode, four split-table variants,
8
8
  // ExternalFile, Undefined; `types.rs:314-331`) carries CLASSIFICATION but no
9
9
  // CONFIDENCE axis. `Code` cannot distinguish "PC observed executing" from
10
10
  // "reachable via a JSR, never run" -- that distinction is
11
11
  // `memory-map.template.md`'s most deliberate feature, and its own text
12
12
  // forbids promoting a row by editing its grade (re-verify and restate the
13
- // evidence instead). Measured (D-25): r2000 line comments persist through
14
- // save/reload (`user_line_comments`), and both `r2000_get_comments` and
15
- // `r2000_search_disassembly` (which searches comments by default) can filter
13
+ // evidence instead). Measured (D-25): anno line comments persist through
14
+ // save/reload (`user_line_comments`), and both `anno_get_comments` and
15
+ // `anno_search_disassembly` (which searches comments by default) can filter
16
16
  // on a leading token -- so "show me everything still [unknown]" is a real
17
17
  // query today, with NO new storage.
18
18
  //
19
19
  // WHAT THIS IS THE ONE AUTHORITATIVE PLACE FOR:
20
20
  // - the five-grade vocabulary (`CONFIDENCE_GRADES`), copied verbatim from
21
- // `.claude/skills/c64-program-recon/templates/memory-map.template.md`'s
21
+ // `src/skills/c64-program-recon/templates/memory-map.template.md`'s
22
22
  // own confidence table -- nowhere else in this repo may hand-write one
23
23
  // of these five phrases or bracket tokens as a second copy;
24
24
  // - the parser (`parseConfidencePrefix`) that decides whether a comment
@@ -40,19 +40,19 @@
40
40
  // WHAT NOT TO DO, named concretely:
41
41
  // - Never accept a near-miss token (wrong case, an underscore instead of a
42
42
  // hyphen, a plural, extra whitespace inside the brackets, a genuine
43
- // typo). Every one of those must throw `R2000ConfidenceGradeError`, not
43
+ // typo). Every one of those must throw `AnnoConfidenceGradeError`, not
44
44
  // silently degrade to `grade: null`.
45
45
  // - Never add a second, address-keyed sidecar store for grades (T-11-
46
46
  // SECOND-STORE). Grades live ONLY as this bracket-token prefix inside
47
- // r2000's own line comments -- a second store keyed by address is
47
+ // anno's own line comments -- a second store keyed by address is
48
48
  // exactly the drift class criterion 1 exists to close, and it would not
49
- // be queryable through the same `r2000_get_comments` /
50
- // `r2000_search_disassembly` tools this module's whole design depends
49
+ // be queryable through the same `anno_get_comments` /
50
+ // `anno_search_disassembly` tools this module's whole design depends
51
51
  // on.
52
52
  // - Never promote a row by editing its grade in place. The template's own
53
53
  // text says so, and this module has no "upgrade" or "promote" function
54
54
  // by design -- a caller who wants to change a grade calls
55
- // `r2000_set_comment` again with a freshly composed
55
+ // `anno_set_comment` again with a freshly composed
56
56
  // `formatConfidenceComment()` string, leaving a new comment (or
57
57
  // replacing the old one explicitly), never a silent in-place mutation
58
58
  // this module would hide.
@@ -122,7 +122,7 @@ const GRADE_BY_TOKEN: ReadonlyMap<string, ConfidenceGrade> = new Map(
122
122
  CONFIDENCE_GRADES.map((g) => [g.token, g]),
123
123
  );
124
124
 
125
- export interface R2000ConfidenceGradeErrorOptions {
125
+ export interface AnnoConfidenceGradeErrorOptions {
126
126
  /** The raw text found between the leading `[` and `]`, verbatim -- may
127
127
  * carry the wrong case, stray whitespace, an underscore, or a plural, so a
128
128
  * caller can see exactly what was rejected. */
@@ -133,15 +133,15 @@ export interface R2000ConfidenceGradeErrorOptions {
133
133
  * Thrown by `parseConfidencePrefix()` when a comment begins with a bracket
134
134
  * token that is not exactly one of `CONFIDENCE_GRADES`'s five. Named,
135
135
  * carries the offending token as a field, and its message lists all five
136
- * valid tokens -- mirroring `r2000-launch.ts`'s `R2000ViceFlagError` shape
136
+ * valid tokens -- mirroring `anno-launch.ts`'s `AnnoViceFlagError` shape
137
137
  * (a named error over a malformed token, rather than a silent strip).
138
138
  */
139
- export class R2000ConfidenceGradeError extends Error {
139
+ export class AnnoConfidenceGradeError extends Error {
140
140
  offendingToken: string;
141
141
 
142
- constructor(message: string, { offendingToken }: R2000ConfidenceGradeErrorOptions) {
142
+ constructor(message: string, { offendingToken }: AnnoConfidenceGradeErrorOptions) {
143
143
  super(message);
144
- this.name = "R2000ConfidenceGradeError";
144
+ this.name = "AnnoConfidenceGradeError";
145
145
  this.offendingToken = offendingToken;
146
146
  }
147
147
  }
@@ -168,7 +168,7 @@ export interface ParsedConfidencePrefix {
168
168
  * the bracket and one run of following whitespace.
169
169
  * - A leading bracket token that does NOT match exactly one of the five
170
170
  * (wrong case, an underscore, a plural, stray whitespace inside the
171
- * brackets, or a plain typo): THROWS `R2000ConfidenceGradeError`, naming
171
+ * brackets, or a plain typo): THROWS `AnnoConfidenceGradeError`, naming
172
172
  * the offending token and listing the five valid ones. This is the whole
173
173
  * point of the module -- see the header comment.
174
174
  */
@@ -181,7 +181,7 @@ export function parseConfidencePrefix(comment: string): ParsedConfidencePrefix {
181
181
  const innerToken = match[1]!;
182
182
  const grade = GRADE_BY_TOKEN.get(innerToken);
183
183
  if (!grade) {
184
- throw new R2000ConfidenceGradeError(
184
+ throw new AnnoConfidenceGradeError(
185
185
  `"[${innerToken}]" is not a valid confidence grade -- the five valid tokens are ` +
186
186
  `${VALID_BRACKETS.join(", ")}. A near-miss (wrong case, an underscore instead of a hyphen, a ` +
187
187
  "plural, stray whitespace inside the brackets, or a plain typo) is refused rather than " +
@@ -203,7 +203,7 @@ export function parseConfidencePrefix(comment: string): ParsedConfidencePrefix {
203
203
  export function formatConfidenceComment(grade: string, evidence: string): string {
204
204
  const found = GRADE_BY_TOKEN.get(grade);
205
205
  if (!found) {
206
- throw new R2000ConfidenceGradeError(
206
+ throw new AnnoConfidenceGradeError(
207
207
  `"${grade}" is not a valid confidence grade token -- the five valid tokens are ` +
208
208
  `${VALID_TOKENS.join(", ")}.`,
209
209
  { offendingToken: grade },
@@ -215,7 +215,7 @@ export function formatConfidenceComment(grade: string, evidence: string): string
215
215
  /**
216
216
  * Returns the literal search string that appears verbatim in every comment
217
217
  * carrying `grade` -- the bracket token itself, e.g. `"[unknown]"`. Passing
218
- * this to `r2000_search_disassembly`'s `query` (with `use_regex` left
218
+ * this to `anno_search_disassembly`'s `query` (with `use_regex` left
219
219
  * false/omitted) lists every address still carrying that grade. One
220
220
  * spelling, so "show me everything still [unknown]" never has two competing
221
221
  * queries drifting apart.
@@ -223,7 +223,7 @@ export function formatConfidenceComment(grade: string, evidence: string): string
223
223
  export function searchQueryForGrade(grade: string): string {
224
224
  const found = GRADE_BY_TOKEN.get(grade);
225
225
  if (!found) {
226
- throw new R2000ConfidenceGradeError(
226
+ throw new AnnoConfidenceGradeError(
227
227
  `"${grade}" is not a valid confidence grade token -- the five valid tokens are ` +
228
228
  `${VALID_TOKENS.join(", ")}.`,
229
229
  { offendingToken: grade },