c64bridge 0.8.0 → 0.9.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.
Files changed (79) hide show
  1. package/.github/prompts/steer.prompt.md +55 -0
  2. package/AGENTS.md +9 -7
  3. package/README.md +139 -95
  4. package/data/embeddings_asm.json +1 -1
  5. package/data/embeddings_basic.json +1 -1
  6. package/data/embeddings_hardware.json +1 -1
  7. package/data/embeddings_mixed.json +1 -1
  8. package/data/embeddings_other.json +1 -1
  9. package/data/graphics/petscii-style-guide.md +4 -4
  10. package/data/graphics/sprite-charset-best-practices.md +9 -9
  11. package/data/vice/vice-binary-monitor-spec.md +921 -0
  12. package/dist/.tsbuildinfo +1 -1
  13. package/dist/device.js +86 -10
  14. package/dist/mcp-server.js +1 -1
  15. package/dist/prompts/registry.js +27 -25
  16. package/dist/rag/knowledgeIndex.js +112 -79
  17. package/dist/rag/resourceUris.js +93 -0
  18. package/dist/tools/audio.js +11 -11
  19. package/dist/tools/debug.js +1 -1
  20. package/dist/tools/developer.js +13 -13
  21. package/dist/tools/graphics.js +10 -10
  22. package/dist/tools/machineControl.js +5 -5
  23. package/dist/tools/memory.js +19 -11
  24. package/dist/tools/meta/index.js +1 -1
  25. package/dist/tools/printer.js +11 -12
  26. package/dist/tools/programRunners.js +16 -16
  27. package/dist/tools/rag.js +9 -9
  28. package/dist/tools/registry/config.js +1 -1
  29. package/dist/tools/registry/disk.js +1 -1
  30. package/dist/tools/registry/drive.js +1 -1
  31. package/dist/tools/registry/extract.js +1 -1
  32. package/dist/tools/registry/graphics.js +1 -1
  33. package/dist/tools/registry/memory.js +1 -1
  34. package/dist/tools/registry/platform.js +1 -1
  35. package/dist/tools/registry/printer.js +1 -1
  36. package/dist/tools/registry/program.js +1 -1
  37. package/dist/tools/registry/rag.js +1 -1
  38. package/dist/tools/registry/sound.js +1 -1
  39. package/dist/tools/registry/stream.js +1 -1
  40. package/dist/tools/registry/system.js +1 -1
  41. package/dist/tools/storage.js +15 -15
  42. package/dist/tools/streaming.js +3 -3
  43. package/dist/tools/types.js +41 -4
  44. package/dist/tools/vice.js +2 -5
  45. package/dist/vice/process.js +79 -2
  46. package/dist/vice/readiness.js +35 -0
  47. package/dist/vice/smokeOptions.js +44 -0
  48. package/dist/viceRunner.js +2 -0
  49. package/doc/developer.md +10 -2
  50. package/doc/plans/prompts/README.md +7 -7
  51. package/mcp/prompts.json +42 -59
  52. package/mcp/protocol-examples.json +2 -2
  53. package/mcp/resources.json +179 -166
  54. package/mcp/schemas/c64_config.schema.json +109 -326
  55. package/mcp/schemas/c64_debug.schema.json +158 -337
  56. package/mcp/schemas/c64_disk.schema.json +180 -262
  57. package/mcp/schemas/c64_drive.schema.json +31 -111
  58. package/mcp/schemas/c64_extract.schema.json +193 -291
  59. package/mcp/schemas/c64_graphics.schema.json +208 -308
  60. package/mcp/schemas/c64_memory.schema.json +94 -144
  61. package/mcp/schemas/c64_printer.schema.json +151 -205
  62. package/mcp/schemas/c64_program.schema.json +229 -367
  63. package/mcp/schemas/c64_rag.schema.json +25 -59
  64. package/mcp/schemas/c64_select_backend.schema.json +19 -26
  65. package/mcp/schemas/c64_sound.schema.json +346 -622
  66. package/mcp/schemas/c64_stream.schema.json +25 -54
  67. package/mcp/schemas/c64_system.schema.json +79 -212
  68. package/mcp/schemas/c64_vice.schema.json +24 -55
  69. package/mcp/server.json +1 -1
  70. package/mcp/tools.json +1935 -3443
  71. package/mcp.json +10 -9
  72. package/package.json +20 -15
  73. package/scripts/fetch-external-sources.mjs +1 -2
  74. package/scripts/prepare-release.mjs +59 -2
  75. package/scripts/run-coverage.mjs +26 -1
  76. package/scripts/run-tests.mjs +2 -2
  77. package/scripts/run-tests.ts +273 -52
  78. package/scripts/update-readme.ts +54 -2
  79. package/server.json +94 -0
@@ -1,391 +1,253 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Program operations available via the c64_program tool.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "Load a PRG from Ultimate storage without executing it.",
8
- "properties": {
9
- "path": {
10
- "type": "string",
11
- "description": "Path to the PRG image. Use an Ultimate-visible filesystem path on c64u, or a host-local filesystem path on VICE.",
12
- "minLength": 1
13
- },
14
- "op": {
15
- "const": "load_prg"
16
- }
17
- },
18
- "required": [
19
- "path",
20
- "op"
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "load_prg",
8
+ "run_prg",
9
+ "run_crt",
10
+ "upload_run_basic",
11
+ "upload_run_asm",
12
+ "batch_run",
13
+ "bundle_run",
14
+ "cross_platform_greeting"
21
15
  ],
22
- "additionalProperties": false
16
+ "description": "Selects the operation."
23
17
  },
24
- {
25
- "type": "object",
26
- "description": "Load and execute a PRG from Ultimate-visible storage on c64u or a host-local path on VICE.",
27
- "properties": {
28
- "path": {
29
- "type": "string",
30
- "description": "Path to the PRG image. Use an Ultimate-visible filesystem path on c64u, or a host-local filesystem path on VICE.",
31
- "minLength": 1
32
- },
33
- "op": {
34
- "const": "run_prg"
35
- }
36
- },
37
- "required": [
38
- "path",
39
- "op"
40
- ],
41
- "additionalProperties": false
18
+ "path": {
19
+ "type": "string",
20
+ "description": "Path to the PRG image. Use an Ultimate-visible filesystem path on c64u, or a host-local filesystem path on VICE.",
21
+ "minLength": 1
42
22
  },
43
- {
44
- "type": "object",
45
- "description": "Mount and run a CRT cartridge image.",
46
- "properties": {
47
- "path": {
48
- "type": "string",
49
- "description": "Path to the CRT image on Ultimate-visible storage. CRT mounting is only supported on c64u.",
50
- "minLength": 1
23
+ "program": {
24
+ "type": "string",
25
+ "description": "Commodore BASIC v2 program source to upload and run.",
26
+ "minLength": 1
27
+ },
28
+ "verify": {
29
+ "type": "boolean",
30
+ "description": "Run post-execution polling to ensure the BASIC program executed without errors.",
31
+ "default": false
32
+ },
33
+ "programs": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "description": "Program to run with assertions",
38
+ "properties": {
39
+ "path": {
40
+ "type": "string",
41
+ "description": "Program path (PRG or CRT)",
42
+ "minLength": 1
43
+ },
44
+ "assertions": {
45
+ "type": [
46
+ "array",
47
+ "null"
48
+ ],
49
+ "items": {
50
+ "type": "object",
51
+ "description": "Assertion to check after run",
52
+ "properties": {
53
+ "type": {
54
+ "type": "string",
55
+ "description": "Assertion type",
56
+ "enum": [
57
+ "screen_contains",
58
+ "memory_equals",
59
+ "sid_silent"
60
+ ]
61
+ },
62
+ "pattern": {
63
+ "type": [
64
+ "string",
65
+ "null"
66
+ ],
67
+ "description": "Pattern for screen_contains",
68
+ "minLength": 1
69
+ },
70
+ "address": {
71
+ "type": [
72
+ "string",
73
+ "null"
74
+ ],
75
+ "description": "Address for memory_equals",
76
+ "minLength": 1
77
+ },
78
+ "expected": {
79
+ "type": [
80
+ "string",
81
+ "null"
82
+ ],
83
+ "description": "Expected value (hex)",
84
+ "minLength": 1
85
+ }
86
+ },
87
+ "required": [
88
+ "type"
89
+ ],
90
+ "additionalProperties": false
91
+ }
92
+ }
51
93
  },
52
- "op": {
53
- "const": "run_crt"
54
- }
55
- },
56
- "required": [
57
- "path",
58
- "op"
94
+ "required": [
95
+ "path"
96
+ ],
97
+ "additionalProperties": false
98
+ }
99
+ },
100
+ "continueOnError": {
101
+ "type": [
102
+ "boolean",
103
+ "null"
59
104
  ],
60
- "additionalProperties": false
105
+ "description": "Continue running programs after assertion failure",
106
+ "default": false
61
107
  },
62
- {
63
- "type": "object",
64
- "description": "Upload Commodore BASIC v2 source and execute it immediately.",
65
- "properties": {
66
- "program": {
67
- "type": "string",
68
- "description": "Commodore BASIC v2 program source to upload and run.",
69
- "minLength": 1
70
- },
71
- "verify": {
72
- "type": "boolean",
73
- "description": "Run post-execution polling to ensure the BASIC program executed without errors.",
74
- "default": false
75
- },
76
- "op": {
77
- "const": "upload_run_basic"
78
- }
79
- },
80
- "required": [
81
- "program",
82
- "op"
108
+ "durationMs": {
109
+ "type": [
110
+ "integer",
111
+ "null"
83
112
  ],
84
- "additionalProperties": false
113
+ "description": "Duration to run each program before assertions",
114
+ "minimum": 1,
115
+ "default": 2000
85
116
  },
86
- {
87
- "type": "object",
88
- "description": "Assemble 6502/6510 source, upload the PRG, and execute it.",
89
- "properties": {
90
- "program": {
91
- "type": "string",
92
- "description": "Assembly source that will be assembled to a PRG and executed.",
93
- "minLength": 1
94
- },
95
- "verify": {
96
- "type": "boolean",
97
- "description": "Run post-execution polling to confirm the assembly program remained stable.",
98
- "default": false
99
- },
100
- "op": {
101
- "const": "upload_run_asm"
102
- }
103
- },
104
- "required": [
105
- "program",
106
- "op"
117
+ "outputPath": {
118
+ "type": [
119
+ "string",
120
+ "null"
107
121
  ],
108
- "additionalProperties": false
122
+ "description": "Output directory for test results",
123
+ "minLength": 1
109
124
  },
110
- {
111
- "type": "object",
112
- "description": "Run multiple PRG/CRT programs with post-run assertions.",
113
- "properties": {
114
- "programs": {
115
- "type": "array",
116
- "items": {
117
- "type": "object",
118
- "description": "Program to run with assertions",
119
- "properties": {
120
- "path": {
121
- "type": "string",
122
- "description": "Program path (PRG or CRT)",
123
- "minLength": 1
124
- },
125
- "assertions": {
126
- "type": [
127
- "array",
128
- "null"
129
- ],
130
- "items": {
131
- "type": "object",
132
- "description": "Assertion to check after run",
133
- "properties": {
134
- "type": {
135
- "type": "string",
136
- "description": "Assertion type",
137
- "enum": [
138
- "screen_contains",
139
- "memory_equals",
140
- "sid_silent"
141
- ]
142
- },
143
- "pattern": {
144
- "type": [
145
- "string",
146
- "null"
147
- ],
148
- "description": "Pattern for screen_contains",
149
- "minLength": 1
150
- },
151
- "address": {
152
- "type": [
153
- "string",
154
- "null"
155
- ],
156
- "description": "Address for memory_equals",
157
- "minLength": 1
158
- },
159
- "expected": {
160
- "type": [
161
- "string",
162
- "null"
163
- ],
164
- "description": "Expected value (hex)",
165
- "minLength": 1
166
- }
167
- },
168
- "required": [
169
- "type"
170
- ],
171
- "additionalProperties": false
172
- }
173
- }
174
- },
175
- "required": [
176
- "path"
177
- ],
178
- "additionalProperties": false
179
- }
180
- },
181
- "continueOnError": {
182
- "type": [
183
- "boolean",
184
- "null"
185
- ],
186
- "description": "Continue running programs after assertion failure",
187
- "default": false
188
- },
189
- "durationMs": {
190
- "type": [
191
- "integer",
192
- "null"
193
- ],
194
- "description": "Duration to run each program before assertions",
195
- "minimum": 1,
196
- "default": 2000
197
- },
198
- "outputPath": {
199
- "type": [
200
- "string",
201
- "null"
202
- ],
203
- "description": "Output directory for test results",
204
- "minLength": 1
205
- },
206
- "resetDelayMs": {
207
- "type": [
208
- "integer",
209
- "null"
210
- ],
211
- "description": "Delay after reset operations to allow the platform to settle.",
212
- "minimum": 0,
213
- "maximum": 1000,
214
- "default": 100
215
- },
216
- "op": {
217
- "const": "batch_run"
218
- }
219
- },
220
- "required": [
221
- "programs",
222
- "op"
125
+ "resetDelayMs": {
126
+ "type": [
127
+ "integer",
128
+ "null"
223
129
  ],
224
- "additionalProperties": false
130
+ "description": "Delay after reset operations to allow the platform to settle.",
131
+ "minimum": 0,
132
+ "maximum": 1000,
133
+ "default": 100
225
134
  },
226
- {
227
- "type": "object",
228
- "description": "Capture screen, memory, and debug registers into an artifact bundle.",
229
- "properties": {
230
- "runId": {
231
- "type": "string",
232
- "description": "Unique identifier for this run",
233
- "minLength": 1
234
- },
235
- "outputPath": {
236
- "type": "string",
237
- "description": "Output directory for artifacts bundle",
238
- "minLength": 1
239
- },
240
- "captureScreen": {
241
- "type": [
242
- "boolean",
243
- "null"
244
- ],
245
- "description": "Capture screen content",
246
- "default": true
247
- },
248
- "memoryRanges": {
249
- "type": [
250
- "array",
251
- "null"
252
- ],
253
- "items": {
254
- "type": "object",
255
- "description": "Memory range to snapshot",
256
- "properties": {
257
- "address": {
258
- "type": "string",
259
- "description": "Start address",
260
- "minLength": 1
261
- },
262
- "length": {
263
- "type": "integer",
264
- "description": "Length in bytes",
265
- "minimum": 1
266
- }
267
- },
268
- "required": [
269
- "address",
270
- "length"
271
- ],
272
- "additionalProperties": false
273
- }
274
- },
275
- "captureDebugReg": {
276
- "type": [
277
- "boolean",
278
- "null"
279
- ],
280
- "description": "Capture debugreg state",
281
- "default": true
282
- },
283
- "op": {
284
- "const": "bundle_run"
285
- }
286
- },
287
- "required": [
288
- "runId",
289
- "outputPath",
290
- "op"
135
+ "runId": {
136
+ "type": "string",
137
+ "description": "Unique identifier for this run",
138
+ "minLength": 1
139
+ },
140
+ "captureScreen": {
141
+ "type": [
142
+ "boolean",
143
+ "null"
291
144
  ],
292
- "additionalProperties": false
145
+ "description": "Capture screen content",
146
+ "default": true
293
147
  },
294
- {
295
- "type": "object",
296
- "description": "Show a platform-customized greeting on one or more configured backends, capture screenshots, and verify the results.",
297
- "properties": {
298
- "platforms": {
299
- "type": [
300
- "array",
301
- "null"
302
- ],
303
- "items": {
148
+ "memoryRanges": {
149
+ "type": [
150
+ "array",
151
+ "null"
152
+ ],
153
+ "items": {
154
+ "type": "object",
155
+ "description": "Memory range to snapshot",
156
+ "properties": {
157
+ "address": {
304
158
  "type": "string",
305
- "description": "Backends to target in sequence.",
306
- "minLength": 1,
307
- "enum": [
308
- "vice",
309
- "c64u"
310
- ]
159
+ "description": "Start address",
160
+ "minLength": 1
311
161
  },
312
- "default": [
313
- "vice",
314
- "c64u"
315
- ]
316
- },
317
- "messageTemplate": {
318
- "type": [
319
- "string",
320
- "null"
321
- ],
322
- "description": "Greeting template. Use {PLATFORM}/{BACKEND} for uppercase or {platform}/{backend} for lowercase substitution.",
323
- "minLength": 1,
324
- "default": "HAVE A GREAT DAY, {PLATFORM}!"
325
- },
326
- "verify": {
327
- "type": [
328
- "boolean",
329
- "null"
330
- ],
331
- "description": "Poll the text screen and require the rendered greeting to appear.",
332
- "default": true
333
- },
334
- "captureScreenshot": {
335
- "type": [
336
- "boolean",
337
- "null"
338
- ],
339
- "description": "Capture a framebuffer screenshot and save it as a PNG per backend.",
340
- "default": true
341
- },
342
- "outputPath": {
343
- "type": [
344
- "string",
345
- "null"
346
- ],
347
- "description": "Directory for screenshots and the workflow summary JSON.",
348
- "minLength": 1
349
- },
350
- "restoreActiveBackend": {
351
- "type": [
352
- "boolean",
353
- "null"
354
- ],
355
- "description": "Restore the backend that was active before the workflow started.",
356
- "default": true
357
- },
358
- "timeoutMs": {
359
- "type": [
360
- "integer",
361
- "null"
362
- ],
363
- "description": "Maximum time to wait for each greeting to appear on screen.",
364
- "minimum": 100,
365
- "maximum": 5000,
366
- "default": 1500
367
- },
368
- "pollIntervalMs": {
369
- "type": [
370
- "integer",
371
- "null"
372
- ],
373
- "description": "Delay between screen polls while verifying the greeting.",
374
- "minimum": 50,
375
- "maximum": 1000,
376
- "default": 100
162
+ "length": {
163
+ "type": "integer",
164
+ "description": "Length in bytes",
165
+ "minimum": 1
166
+ }
377
167
  },
378
- "op": {
379
- "const": "cross_platform_greeting"
380
- }
168
+ "required": [
169
+ "address",
170
+ "length"
171
+ ],
172
+ "additionalProperties": false
173
+ }
174
+ },
175
+ "captureDebugReg": {
176
+ "type": [
177
+ "boolean",
178
+ "null"
179
+ ],
180
+ "description": "Capture debugreg state",
181
+ "default": true
182
+ },
183
+ "platforms": {
184
+ "type": [
185
+ "array",
186
+ "null"
187
+ ],
188
+ "items": {
189
+ "type": "string",
190
+ "description": "Backends to target in sequence.",
191
+ "minLength": 1,
192
+ "enum": [
193
+ "vice",
194
+ "c64u"
195
+ ]
381
196
  },
382
- "additionalProperties": false,
383
- "required": [
384
- "op"
197
+ "default": [
198
+ "vice",
199
+ "c64u"
385
200
  ]
201
+ },
202
+ "messageTemplate": {
203
+ "type": [
204
+ "string",
205
+ "null"
206
+ ],
207
+ "description": "Greeting template. Use {PLATFORM}/{BACKEND} for uppercase or {platform}/{backend} for lowercase substitution.",
208
+ "minLength": 1,
209
+ "default": "HAVE A GREAT DAY, {PLATFORM}!"
210
+ },
211
+ "captureScreenshot": {
212
+ "type": [
213
+ "boolean",
214
+ "null"
215
+ ],
216
+ "description": "Capture a framebuffer screenshot and save it as a PNG per backend.",
217
+ "default": true
218
+ },
219
+ "restoreActiveBackend": {
220
+ "type": [
221
+ "boolean",
222
+ "null"
223
+ ],
224
+ "description": "Restore the backend that was active before the workflow started.",
225
+ "default": true
226
+ },
227
+ "timeoutMs": {
228
+ "type": [
229
+ "integer",
230
+ "null"
231
+ ],
232
+ "description": "Maximum time to wait for each greeting to appear on screen.",
233
+ "minimum": 100,
234
+ "maximum": 5000,
235
+ "default": 1500
236
+ },
237
+ "pollIntervalMs": {
238
+ "type": [
239
+ "integer",
240
+ "null"
241
+ ],
242
+ "description": "Delay between screen polls while verifying the greeting.",
243
+ "minimum": 50,
244
+ "maximum": 1000,
245
+ "default": 100
386
246
  }
247
+ },
248
+ "required": [
249
+ "op"
387
250
  ],
388
- "discriminator": {
389
- "propertyName": "op"
390
- }
251
+ "description": "Program operations available via the c64_program tool.\n\nOperations:\n- load_prg: Load a PRG from Ultimate storage without executing it.\n- run_prg: Load and execute a PRG from Ultimate-visible storage on c64u or a host-local path on VICE.\n- run_crt: Mount and run a CRT cartridge image.\n- upload_run_basic: Upload Commodore BASIC v2 source and execute it immediately.\n- upload_run_asm: Assemble 6502/6510 source, upload the PRG, and execute it.\n- batch_run: Run multiple PRG/CRT programs with post-run assertions.\n- bundle_run: Capture screen, memory, and debug registers into an artifact bundle.\n- cross_platform_greeting: Show a platform-customized greeting on one or more configured backends, capture screenshots, and verify the results.",
252
+ "additionalProperties": false
391
253
  }