@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.
- package/README.md +4 -3
- package/THIRD-PARTY-NOTICES.md +423 -25
- package/{r2000-acme-ident.ts → anno-acme-ident.ts} +13 -13
- package/anno-bank.ts +171 -0
- package/anno-cli.ts +3040 -0
- package/{r2000-confidence.ts → anno-confidence.ts} +22 -22
- package/anno-coverage.ts +2465 -0
- package/anno-derive.ts +590 -0
- package/anno-details.ts +169 -0
- package/anno-enum-gen.ts +919 -0
- package/anno-export-asm.ts +2396 -0
- package/anno-graphics.ts +338 -0
- package/anno-hazard-report.ts +1367 -0
- package/anno-import.ts +495 -0
- package/anno-index.ts +150 -0
- package/anno-join.ts +480 -0
- package/{r2000-memmap-render.ts → anno-memmap-render.ts} +236 -95
- package/anno-provenance-ledger.ts +472 -0
- package/{r2000-regbits-gen.ts → anno-regbits-gen.ts} +20 -15
- package/{r2000-regbits.json → anno-regbits.json} +2 -2
- package/anno-register.ts +399 -0
- package/anno-store-export.ts +661 -0
- package/anno-store.ts +4002 -0
- package/anno-symbols.ts +266 -0
- package/anno-tools.ts +3264 -0
- package/anno-types.ts +1909 -0
- package/backend-detect.mts +124 -312
- package/block-class.ts +201 -0
- package/build.ts +4 -2
- package/capture-predicate.ts +597 -0
- package/channel-lock.ts +349 -0
- package/disasm-decoder.ts +14 -14
- package/disasm-opcodes.ts +4 -4
- package/disasm-renderer.ts +2 -2
- package/evid-ingest.ts +217 -0
- package/evid-reconcile.ts +316 -0
- package/host-tool-client.ts +430 -0
- package/hostpath.ts +1 -1
- package/incident-record.ts +23 -12
- package/install-resources.ts +30 -14
- package/memmap-lookup.ts +285 -0
- package/package.json +48 -23
- package/prg-image.ts +118 -0
- package/repo-root.ts +107 -8
- package/resources/backend-detect.mjs +98 -236
- package/resources/broker-control.mjs +189 -16
- package/resources/broker-epoch.mjs +1 -1
- package/resources/broker-kill.mjs +8 -2
- package/resources/broker-launch.mjs +373 -214
- package/resources/broker-state.mjs +64 -18
- package/resources/container-guard.mjs +1 -1
- package/resources/ghidra-project.mjs +790 -0
- package/resources/host-tool.mjs +2561 -0
- package/resources/vice-broker.mjs +330 -184
- package/resources/vice-launcher.sh +130 -12
- package/stock-address.ts +6 -6
- package/stock-cia.ts +2 -2
- package/stock-condition.ts +8 -8
- package/stock-connect.ts +10 -6
- package/stock-derived.ts +29 -37
- package/stock-diagnose.ts +200 -36
- package/stock-dispatch.ts +200 -68
- package/stock-execution.ts +5 -3
- package/stock-handler.ts +1 -1
- package/stock-input.ts +9 -9
- package/stock-machine.ts +17 -6
- package/stock-paths.ts +18 -14
- package/stock-petscii.ts +1 -1
- package/stock-protocol.ts +17 -12
- package/stock-recycle.ts +83 -2
- package/stock-registers.ts +54 -29
- package/stock-reproducible-run.ts +811 -0
- package/stock-run-until.ts +100 -1
- package/stock-sprites.ts +3 -3
- package/stock-symbols.ts +13 -13
- package/stock-timing.ts +2 -2
- package/stock-vicii.ts +1 -1
- package/stop-oracle.ts +167 -0
- package/text-capability-probe.ts +660 -0
- package/text-connect.ts +157 -0
- package/text-protocol.ts +810 -0
- package/text-tools.ts +778 -0
- package/textmon-backtrace.ts +385 -0
- package/textmon-cpuhistory.ts +335 -0
- package/textmon-memmap.ts +494 -0
- package/textmon-profile.ts +458 -0
- package/textmon-registers.ts +748 -0
- package/tools-manifest.stock.json +864 -3
- package/version.ts +1 -1
- package/vice-broker-client.ts +189 -42
- package/vice-errors.ts +268 -0
- package/vice-proxy.ts +392 -2175
- package/vsf-slice.ts +640 -0
- package/capability-registry.ts +0 -388
- package/r2000-cli.ts +0 -1103
- package/r2000-d64.ts +0 -310
- package/r2000-enum-gen.ts +0 -574
- package/r2000-launch.ts +0 -357
- package/r2000-mcp-client.ts +0 -596
- package/r2000-project.ts +0 -190
- package/r2000-symbols.ts +0 -388
- package/r2000-tools.ts +0 -914
- package/r2000-verify.ts +0 -184
- package/refresh-manifest.ts +0 -124
- package/tools-manifest.json +0 -1223
- package/vice-probe.ts +0 -278
- package/vice-sync.ts +0 -336
- package/vice.ts +0 -772
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
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
|
|
4
|
+
// an anno line comment (e.g. `[confirmed-code] observed executing at $0810`).
|
|
5
5
|
//
|
|
6
|
-
// WHY THIS MODULE EXISTS:
|
|
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):
|
|
14
|
-
// save/reload (`user_line_comments`), and both `
|
|
15
|
-
// `
|
|
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
|
-
//
|
|
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 `
|
|
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
|
-
//
|
|
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 `
|
|
50
|
-
// `
|
|
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
|
-
// `
|
|
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
|
|
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 `
|
|
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
|
|
139
|
+
export class AnnoConfidenceGradeError extends Error {
|
|
140
140
|
offendingToken: string;
|
|
141
141
|
|
|
142
|
-
constructor(message: string, { offendingToken }:
|
|
142
|
+
constructor(message: string, { offendingToken }: AnnoConfidenceGradeErrorOptions) {
|
|
143
143
|
super(message);
|
|
144
|
-
this.name = "
|
|
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 `
|
|
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
|
|
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
|
|
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 `
|
|
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
|
|
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 },
|