c64bridge 1.0.6 → 1.1.0
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/.github/skills/assembly-program/SKILL.md +37 -0
- package/.github/skills/basic-program/SKILL.md +40 -0
- package/.github/skills/cross-platform-demo/SKILL.md +32 -0
- package/.github/skills/drive-manager/SKILL.md +33 -0
- package/.github/skills/graphics-demo/SKILL.md +30 -0
- package/.github/skills/hello-world/SKILL.md +36 -0
- package/.github/skills/memory-debug/SKILL.md +32 -0
- package/.github/skills/pr-converge/SKILL.md +33 -0
- package/.github/skills/printer-job/SKILL.md +30 -0
- package/.github/skills/sid-music/SKILL.md +35 -0
- package/.github/skills/software-launch/SKILL.md +31 -0
- package/.github/skills/stream-control/SKILL.md +29 -0
- package/.github/skills/system-control/SKILL.md +32 -0
- package/AGENTS.md +28 -7
- package/README.md +70 -15
- package/data/assembly/assembly-spec.md +2 -0
- package/dist/c64Client.js +238 -60
- package/dist/chargen.js +0 -4
- package/dist/config.js +53 -28
- package/dist/device.js +92 -37
- package/dist/diagnostics.js +66 -5
- package/dist/hostPaths.js +128 -0
- package/dist/logger.js +3 -2
- package/dist/loggingHttpClient.js +71 -2
- package/dist/mcp-server.js +416 -291
- package/dist/numericArg.js +55 -0
- package/dist/petscii.js +13 -6
- package/dist/platform.js +12 -3
- package/dist/prompts/registry.js +6 -1
- package/dist/redact.js +166 -0
- package/dist/tools/access.js +66 -0
- package/dist/tools/debug.js +6 -0
- package/dist/tools/developer.js +77 -36
- package/dist/tools/errors.js +54 -3
- package/dist/tools/input.js +25 -8
- package/dist/tools/machineControl.js +113 -21
- package/dist/tools/memory.js +135 -30
- package/dist/tools/meta/artifacts.js +5 -5
- package/dist/tools/meta/background.js +216 -54
- package/dist/tools/meta/compilation.js +6 -5
- package/dist/tools/meta/config.js +20 -10
- package/dist/tools/meta/configInventory.js +25 -2
- package/dist/tools/meta/diagnostics.js +2 -1
- package/dist/tools/meta/filesystem.js +16 -14
- package/dist/tools/meta/graphics.js +48 -20
- package/dist/tools/meta/memory.js +45 -19
- package/dist/tools/meta/program.js +10 -7
- package/dist/tools/meta/screen.js +116 -25
- package/dist/tools/pauseGuard.js +23 -0
- package/dist/tools/pollValidator.js +53 -8
- package/dist/tools/programRunners.js +62 -18
- package/dist/tools/registry/batch.js +17 -11
- package/dist/tools/registry/config.js +9 -2
- package/dist/tools/registry/disk.js +12 -2
- package/dist/tools/registry/drive.js +3 -0
- package/dist/tools/registry/extract.js +3 -0
- package/dist/tools/registry/graphics.js +59 -6
- package/dist/tools/registry/index.js +17 -1
- package/dist/tools/registry/memory.js +11 -1
- package/dist/tools/registry/platform.js +4 -1
- package/dist/tools/registry/printer.js +2 -1
- package/dist/tools/registry/program.js +5 -1
- package/dist/tools/registry/rag.js +1 -0
- package/dist/tools/registry/sound.js +12 -1
- package/dist/tools/registry/stream.js +2 -1
- package/dist/tools/registry/system.js +8 -1
- package/dist/tools/schema.js +7 -7
- package/dist/tools/streaming.js +34 -4
- package/dist/tools/translation/assembler.js +247 -24
- package/dist/tools/translation/basicDetokenizer.js +80 -0
- package/dist/tools/translation/basicTokenizer.js +8 -3
- package/dist/tools/translation/disassembler.js +14 -0
- package/dist/tools/types.js +258 -7
- package/dist/tools/vice.js +5 -16
- package/dist/vicBitmap.js +1 -1
- package/dist/vice/mockServer.js +3 -0
- package/dist/vice/process.js +19 -0
- package/dist/vice/resourcePolicy.js +36 -0
- package/dist/vice/viceClient.js +22 -5
- package/doc/vice/support-matrix.md +17 -11
- package/mcp/schemas/c64_batch.schema.json +2 -1
- package/mcp/schemas/c64_config.schema.json +33 -466
- package/mcp/schemas/c64_debug.schema.json +3 -602
- package/mcp/schemas/c64_disk.schema.json +17 -344
- package/mcp/schemas/c64_drive.schema.json +2 -157
- package/mcp/schemas/c64_extract.schema.json +10 -364
- package/mcp/schemas/c64_graphics.schema.json +19 -426
- package/mcp/schemas/c64_input.schema.json +5 -318
- package/mcp/schemas/c64_memory.schema.json +23 -491
- package/mcp/schemas/c64_printer.schema.json +3 -258
- package/mcp/schemas/c64_program.schema.json +16 -491
- package/mcp/schemas/c64_rag.schema.json +1 -81
- package/mcp/schemas/c64_select_backend.schema.json +2 -36
- package/mcp/schemas/c64_sound.schema.json +20 -822
- package/mcp/schemas/c64_stream.schema.json +4 -75
- package/mcp/schemas/c64_system.schema.json +28 -348
- package/mcp/schemas/c64_vice.schema.json +2 -71
- package/mcp/server.json +1 -1
- package/mcp/tools.json +1990 -6900
- package/mcp.json +21 -1
- package/package.json +19 -8
- package/scripts/mockC64Server.mjs +44 -0
- package/scripts/run-coverage.mjs +27 -1
- package/scripts/smoke-run.sh +3 -2
- package/scripts/start.mjs +23 -1
- package/server.json +53 -3
- package/dist/.tsbuildinfo +0 -1
- package/doc/agent-state-spec.md +0 -243
- package/doc/plans/bun/baseline-metrics.md +0 -16
- package/doc/plans/bun/migration-checklist.md +0 -55
- package/doc/plans/bun/migration.md +0 -83
- package/doc/plans/improve-knowledge/notes.md +0 -43
- package/doc/plans/improve-knowledge/plan.md +0 -121
- package/doc/plans/improve-knowledge/rollout.md +0 -110
- package/doc/plans/meta-tools/README.md +0 -110
- package/doc/plans/meta-tools/analysis.md +0 -272
- package/doc/plans/meta-tools/catalog.md +0 -435
- package/doc/plans/meta-tools/notes.md +0 -192
- package/doc/plans/meta-tools/rollout.md +0 -368
- package/doc/plans/prompts/README.md +0 -96
- package/doc/plans/prompts/user-prompt-ideas.md +0 -147
- package/doc/plans/tool-consolidation/notes.md +0 -28
- package/doc/plans/tool-consolidation/plan.md +0 -169
- package/doc/plans/tool-consolidation/rollout.md +0 -104
- package/doc/plans/vice-backend-switch/plan.md +0 -486
- package/doc/plans/vice-backend-switch-2/plan.md +0 -48
- package/doc/plans/vice-support/notes.md +0 -63
- package/doc/plans/vice-support/plan.md +0 -88
- package/doc/plans/vice-support/rollout.md +0 -99
- package/doc/reviews/audit.md +0 -143
- package/doc/reviews/hardening/01-fable/prompt-handover.md +0 -125
- package/doc/reviews/hardening/01-fable/prompt.md +0 -98
- package/doc/reviews/hardening/01-fable/review-prompt.md +0 -468
- package/doc/reviews/hardening/01-fable/review.md +0 -1234
- package/doc/reviews/vice-support-review.md +0 -185
- package/scripts/compare-rest/rest-compare-2025-11-01T00-25-21-830Z.json +0 -2513
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# VICE Support Review
|
|
2
|
-
|
|
3
|
-
Date: 2026-03-08
|
|
4
|
-
Reviewer: GitHub Copilot
|
|
5
|
-
Scope: PR #103 (`feat/vice`) plus all VICE-related source, grouped tools, tests, docs, generated MCP interface metadata, and CI wiring.
|
|
6
|
-
|
|
7
|
-
## Verdict
|
|
8
|
-
|
|
9
|
-
Not production-ready.
|
|
10
|
-
|
|
11
|
-
The branch introduces useful VICE backend work, but the published MCP compatibility contract is not trustworthy yet. The highest-risk issue is that grouped-tool per-operation platform metadata is not enforced centrally, so several operations declared as c64u-only execute on VICE anyway. That breaks the generated MCP surface, README compatibility tables, and the implied contract relied on by clients and prompts.
|
|
12
|
-
|
|
13
|
-
## Findings
|
|
14
|
-
|
|
15
|
-
### VICE-001: Grouped per-operation platform support is metadata-only, and multiple c64u-only operations execute on VICE anyway
|
|
16
|
-
|
|
17
|
-
- Severity: high
|
|
18
|
-
- Confidence: high
|
|
19
|
-
|
|
20
|
-
Evidence:
|
|
21
|
-
|
|
22
|
-
- `src/tools/types.ts:296` publishes `operationPlatforms` into metadata, but `defineToolModule().invoke()` only checks the merged tool-level platforms at `src/tools/types.ts:316-317`.
|
|
23
|
-
- `src/tools/registry/program.ts:110` declares `load_prg` and `run_crt` as c64u-only, but `src/tools/registry/program.ts:29` and `src/tools/registry/program.ts:47` wire them directly to raw handlers (`groupedProgramHandlers.load_prg` / `run_crt`) instead of routing through `programRunnersModule.invoke()`.
|
|
24
|
-
- The raw handlers themselves do not perform a platform check. `executeLoadPrg()` and `executeRunCrt()` in `src/tools/programRunners.ts:634` and `src/tools/programRunners.ts:701` call the client directly.
|
|
25
|
-
- Runtime probe on VICE using `node --loader ts-node/esm` showed both grouped operations succeed instead of raising `unsupported_platform`:
|
|
26
|
-
|
|
27
|
-
```text
|
|
28
|
-
{"called":"loadPrgFile","path":"//USB0/demo.prg"}
|
|
29
|
-
{"op":"load_prg","isError":false,"error":null,"success":true}
|
|
30
|
-
{"called":"runCrtFile","path":"//USB0/game.crt"}
|
|
31
|
-
{"op":"run_crt","isError":false,"error":null,"success":true}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
- The same pattern exists in other grouped tools:
|
|
35
|
-
- `src/tools/registry/drive.ts:89` marks `load_rom` c64u-only, but `src/tools/storage.ts:454` has no per-tool platform restriction. Runtime probe on VICE succeeded.
|
|
36
|
-
- `src/tools/registry/disk.ts:365` marks `file_info` c64u-only, but `src/tools/storage.ts:542` has no per-tool platform restriction. Runtime probe on VICE succeeded.
|
|
37
|
-
- `src/tools/registry/sound.ts:156-157` marks `play_sid_file` / `play_mod_file` c64u-only, but `src/tools/audio.ts:770` and `src/tools/audio.ts:811` have no per-tool platform restriction. Runtime probe on VICE succeeded.
|
|
38
|
-
|
|
39
|
-
Why this matters:
|
|
40
|
-
|
|
41
|
-
- MCP clients, generated schemas, prompts, and README tables will all believe those operations are unavailable on VICE, while runtime execution may still proceed.
|
|
42
|
-
- The failure mode is especially dangerous because it is silent contract drift, not an obvious exception.
|
|
43
|
-
- The current design makes correctness depend on whether a grouped operation happens to route through a legacy tool that already has its own per-tool platform guard.
|
|
44
|
-
|
|
45
|
-
Recommended fix:
|
|
46
|
-
|
|
47
|
-
- Enforce `operationPlatforms` inside the grouped dispatcher path rather than treating it as documentation-only metadata.
|
|
48
|
-
- Avoid raw handler reuse for grouped operations when the original module-level invocation path is responsible for platform checks.
|
|
49
|
-
- Add explicit grouped-tool tests for every c64u-only operation exposed through grouped tools on the VICE platform.
|
|
50
|
-
|
|
51
|
-
### VICE-002: Capability declarations, implementation, tests, and docs disagree on whether VICE supports drive and storage management
|
|
52
|
-
|
|
53
|
-
- Severity: high
|
|
54
|
-
- Confidence: high
|
|
55
|
-
|
|
56
|
-
Evidence:
|
|
57
|
-
|
|
58
|
-
- `src/platform.ts:31` declares VICE limited by `no-drive-management`.
|
|
59
|
-
- The backend itself still rejects several storage/drive operations on VICE:
|
|
60
|
-
- `src/device.ts:625` rejects `driveLoadRom`
|
|
61
|
-
- `src/device.ts:681` rejects `filesInfo`
|
|
62
|
-
- `src/device.ts:682-685` reject disk-image creation
|
|
63
|
-
- These unsupported backend paths are covered by tests in:
|
|
64
|
-
- `test/device.test.mjs:247` (`driveLoadRom throws unsupported`)
|
|
65
|
-
- `test/device.test.mjs:308` (`filesInfo throws unsupported`)
|
|
66
|
-
- Yet the grouped MCP suite expects success for grouped VICE drive/storage calls that the public compatibility tables mark as unavailable on VICE:
|
|
67
|
-
- `test/suites/mcpServerCallToolSuite.mjs:239` expects `c64_drive` `load_rom` success
|
|
68
|
-
- `test/suites/mcpServerCallToolSuite.mjs:255` expects `c64_disk` `file_info` success
|
|
69
|
-
- README compatibility tables currently mark those operations as unavailable on VICE:
|
|
70
|
-
- `README.md:297` `file_info`
|
|
71
|
-
- `README.md:309` `load_rom`
|
|
72
|
-
|
|
73
|
-
Why this matters:
|
|
74
|
-
|
|
75
|
-
- The codebase currently contains three mutually inconsistent stories:
|
|
76
|
-
1. Platform metadata says VICE has no drive management.
|
|
77
|
-
2. The grouped runtime can still execute selected drive/storage operations on VICE.
|
|
78
|
-
3. The raw backend still rejects a substantial subset of drive/storage operations on VICE.
|
|
79
|
-
- This inconsistency makes it impossible to reason safely about platform parity or to generate correct client behavior.
|
|
80
|
-
|
|
81
|
-
Recommended fix:
|
|
82
|
-
|
|
83
|
-
- Decide whether VICE drive/storage support is a real supported feature or a phase-one experiment.
|
|
84
|
-
- If it is supported, remove the stale `no-drive-management` limitation, align docs, and add real-device coverage.
|
|
85
|
-
- If it is not supported, close the grouped-tool escape hatches and update the tests that currently encode success on VICE.
|
|
86
|
-
|
|
87
|
-
### VICE-003: Real VICE coverage is materially weaker than the published feature surface, and mock-only behavior is being presented as platform support
|
|
88
|
-
|
|
89
|
-
- Severity: medium
|
|
90
|
-
- Confidence: high
|
|
91
|
-
|
|
92
|
-
Evidence:
|
|
93
|
-
|
|
94
|
-
- In `test/device.test.mjs`, the resource-backed drive/config tests only run under `useViceMock`:
|
|
95
|
-
- drive tests are guarded under the mock-only block starting near `test/device.test.mjs:187`
|
|
96
|
-
- config read/write tests are also guarded under the mock-only block starting near `test/device.test.mjs:269`
|
|
97
|
-
- The same file only verifies unsupported behavior for the real-VICE path on several operations (`loadPrgFile`, `runCrtFile`, `sidplayFile`, `driveLoadRom`, `filesInfo`, flash config operations).
|
|
98
|
-
- CI does run both VICE mock tests and VICE device tests (`.github/workflows/build-and-test.yaml:24-31`), but the real-device job does not prove the full grouped feature matrix claimed in README or generated metadata.
|
|
99
|
-
- My targeted existing test run passed cleanly (`70 passed / 0 failed`) even though the grouped-tool contract violations above are real. That means the current suite is not protecting the public grouped MCP surface sufficiently.
|
|
100
|
-
|
|
101
|
-
Why this matters:
|
|
102
|
-
|
|
103
|
-
- The mock server is currently doing more than emulating a thin transport boundary. It is effectively defining platform behavior for features that are not yet validated on real VICE.
|
|
104
|
-
- The branch therefore risks shipping mock-server parity instead of real emulator parity.
|
|
105
|
-
|
|
106
|
-
Recommended fix:
|
|
107
|
-
|
|
108
|
-
- Split the VICE matrix into clearly labeled categories: real-device supported, mock-only experimental, and unsupported.
|
|
109
|
-
- Add grouped-tool regression tests for the actual public MCP operations on VICE, not just backend/facade tests.
|
|
110
|
-
- Avoid advertising VICE support in README/generated tables for operations that have only been validated against the mock server.
|
|
111
|
-
|
|
112
|
-
### VICE-004: The README and generated compatibility surface overstate confidence in VICE support
|
|
113
|
-
|
|
114
|
-
- Severity: medium
|
|
115
|
-
- Confidence: high
|
|
116
|
-
|
|
117
|
-
Evidence:
|
|
118
|
-
|
|
119
|
-
- README currently presents a crisp compatibility matrix for grouped tools, including VICE columns for operations such as:
|
|
120
|
-
- `README.md:367-368` `load_prg`, `run_crt`
|
|
121
|
-
- `README.md:394-395` `play_mod_file`, `play_sid_file`
|
|
122
|
-
- `README.md:297` `file_info`
|
|
123
|
-
- `README.md:309` `load_rom`
|
|
124
|
-
- Because `operationPlatforms` is not authoritative at runtime, the tables are currently descriptive rather than contractual.
|
|
125
|
-
- The generated MCP tool metadata is built from the same source of truth, so this drift is not isolated to the README.
|
|
126
|
-
|
|
127
|
-
Why this matters:
|
|
128
|
-
|
|
129
|
-
- Consumers will treat those tables and generated schemas as API contract, not as aspirational guidance.
|
|
130
|
-
- When the documented matrix diverges from live runtime behavior, automation and prompts become unsafe.
|
|
131
|
-
|
|
132
|
-
Recommended fix:
|
|
133
|
-
|
|
134
|
-
- Treat generated compatibility output as release-blocking and validate it with runtime tests.
|
|
135
|
-
- Do not publish per-operation platform tables until grouped dispatch enforces them.
|
|
136
|
-
|
|
137
|
-
## Validation Performed
|
|
138
|
-
|
|
139
|
-
- Reviewed implementation across `src/device.ts`, `src/vice/viceClient.ts`, `src/vice/process.ts`, `src/vice/readiness.ts`, grouped tool registries, legacy tool modules, docs, CI, and tests.
|
|
140
|
-
- Ran targeted tests:
|
|
141
|
-
|
|
142
|
-
```text
|
|
143
|
-
runTests: test/groupedToolsShims.test.mjs
|
|
144
|
-
runTests: test/programRunnersModule.test.mjs
|
|
145
|
-
runTests: test/device.test.mjs
|
|
146
|
-
Result: 70 passed, 0 failed
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
- Ran targeted runtime probes with `node --loader ts-node/esm` against the checked-out TypeScript sources on platform `vice`.
|
|
150
|
-
- Confirmed that grouped `c64_program.load_prg`, `c64_program.run_crt`, `c64_drive.load_rom`, `c64_disk.file_info`, `c64_sound.play_sid_file`, and `c64_sound.play_mod_file` execute successfully on VICE despite being declared c64u-only in grouped tool metadata.
|
|
151
|
-
|
|
152
|
-
## Coverage Assessment
|
|
153
|
-
|
|
154
|
-
Coverage is not sufficient for the grouped public MCP contract.
|
|
155
|
-
|
|
156
|
-
- Strengths:
|
|
157
|
-
- Core VICE monitor protocol parsing and request/response handling are exercised well.
|
|
158
|
-
- The VICE smoke test covers basic run-and-readiness flow.
|
|
159
|
-
- Some backend unsupported paths are explicitly tested.
|
|
160
|
-
|
|
161
|
-
- Gaps:
|
|
162
|
-
- The grouped MCP operations are not exhaustively tested against their per-operation platform declarations.
|
|
163
|
-
- Real-VICE coverage does not match the feature surface advertised in grouped tool metadata and README.
|
|
164
|
-
- Several regressions are only detectable with end-to-end grouped-tool invocation, not backend-only tests.
|
|
165
|
-
|
|
166
|
-
## Documentation Assessment
|
|
167
|
-
|
|
168
|
-
Documentation is not yet reliable enough for release.
|
|
169
|
-
|
|
170
|
-
- The README compatibility matrix is more precise than the runtime enforcement actually is.
|
|
171
|
-
- `platform.ts` still advertises `no-drive-management` for VICE while grouped docs/tests/runtime partially expose drive operations.
|
|
172
|
-
- The branch needs a single explicit statement of what is supported on real VICE, what is mock-only, and what remains phase-one unsupported.
|
|
173
|
-
|
|
174
|
-
## Duplication and Architectural Fit
|
|
175
|
-
|
|
176
|
-
- The broad `C64Facade` abstraction remains workable, but VICE support is currently split across backend restrictions, grouped metadata, README generation, and mock-server behavior without a single authoritative enforcement point.
|
|
177
|
-
- The highest-value simplification is to move per-operation platform enforcement into one place in grouped dispatch and make documentation generation consume that authoritative runtime rule.
|
|
178
|
-
|
|
179
|
-
## What I Did Not Fully Verify
|
|
180
|
-
|
|
181
|
-
- I did not run the full `npm run test:matrix` or a full build during this review.
|
|
182
|
-
- I did not validate every drive/config resource behavior against a real installed VICE instance.
|
|
183
|
-
- I did not audit every generated file under `mcp/` line-by-line after tracing the metadata source.
|
|
184
|
-
|
|
185
|
-
Those limitations do not change the main verdict because the highest-severity issues were verified directly in source and with targeted runtime probes.
|