c64bridge 0.7.4 → 0.8.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 (107) hide show
  1. package/.github/prompts/README.md +14 -4
  2. package/.github/prompts/assembly-routine-session.prompt.md +9 -9
  3. package/.github/prompts/basic-program-session.prompt.md +11 -9
  4. package/.github/prompts/drive-management-session.prompt.md +9 -9
  5. package/.github/prompts/hello-world-session.prompt.md +17 -0
  6. package/.github/prompts/petscii-art-session.prompt.md +9 -9
  7. package/.github/prompts/play-classic-game.prompt.md +9 -9
  8. package/.github/prompts/pr-converge.prompt.md +13 -0
  9. package/.github/prompts/sid-music-session.prompt.md +9 -9
  10. package/AGENTS.md +59 -60
  11. package/README.md +550 -191
  12. package/data/assembly/assembly-spec.md +290 -1
  13. package/data/context/bootstrap.md +26 -2
  14. package/data/context/fast-paths.md +44 -0
  15. package/data/graphics/petscii-style-guide.md +6 -2
  16. package/data/graphics/sprite-charset-best-practices.md +5 -5
  17. package/dist/.tsbuildinfo +1 -1
  18. package/dist/c64Client.js +990 -26
  19. package/dist/config.js +5 -1
  20. package/dist/device.js +680 -57
  21. package/dist/diagnostics.js +371 -0
  22. package/dist/mcp/metadata.js +39 -0
  23. package/dist/mcp-server.js +170 -20
  24. package/dist/platform.js +10 -2
  25. package/dist/prompts/registry.js +166 -309
  26. package/dist/rag/init.js +37 -1
  27. package/dist/rag/knowledgeIndex.js +18 -6
  28. package/dist/rag/rateLimiter.js +2 -2
  29. package/dist/streamCapture.js +135 -0
  30. package/dist/tools/audio.js +3 -1
  31. package/dist/tools/debug.js +470 -0
  32. package/dist/tools/developer.js +10 -4
  33. package/dist/tools/graphics.js +183 -17
  34. package/dist/tools/machineControl.js +11 -5
  35. package/dist/tools/memory.js +19 -10
  36. package/dist/tools/meta/audio.js +240 -1
  37. package/dist/tools/meta/config.js +20 -28
  38. package/dist/tools/meta/configInventory.js +104 -0
  39. package/dist/tools/meta/diagnostics.js +45 -2
  40. package/dist/tools/meta/graphics.js +14 -6
  41. package/dist/tools/meta/index.js +1 -0
  42. package/dist/tools/meta/memory.js +20 -6
  43. package/dist/tools/meta/program.js +473 -0
  44. package/dist/tools/pollValidator.js +4 -2
  45. package/dist/tools/programRunners.js +8 -4
  46. package/dist/tools/registry/config.js +17 -0
  47. package/dist/tools/registry/disk.js +7 -0
  48. package/dist/tools/registry/drive.js +3 -0
  49. package/dist/tools/registry/graphics.js +111 -27
  50. package/dist/tools/registry/index.js +6 -0
  51. package/dist/tools/registry/memory.js +1 -0
  52. package/dist/tools/registry/platform.js +121 -0
  53. package/dist/tools/registry/program.js +26 -8
  54. package/dist/tools/registry/sound.js +96 -0
  55. package/dist/tools/registry/system.js +15 -2
  56. package/dist/tools/storage.js +1 -0
  57. package/dist/tools/streaming.js +1 -0
  58. package/dist/tools/types.js +38 -4
  59. package/dist/tools/vice.js +160 -0
  60. package/dist/vicBitmap.js +317 -0
  61. package/dist/vice/mockServer.js +439 -0
  62. package/dist/vice/process.js +310 -0
  63. package/dist/vice/readiness.js +18 -2
  64. package/dist/vice/viceClient.js +382 -22
  65. package/doc/developer.md +62 -24
  66. package/doc/img/backend-switch/hello-c64u.png +0 -0
  67. package/doc/img/backend-switch/hello-vice-and-c64u.png +0 -0
  68. package/doc/img/backend-switch/hello-vice.png +0 -0
  69. package/doc/img/backend-switch/metadata.json +50 -0
  70. package/doc/plans/vice-backend-switch/plan.md +486 -0
  71. package/doc/plans/vice-backend-switch-2/plan.md +48 -0
  72. package/doc/plans/vice-support/notes.md +1 -0
  73. package/doc/plans/vice-support/plan.md +5 -0
  74. package/doc/plans/vice-support/rollout.md +23 -17
  75. package/doc/reviews/vice-support-review.md +185 -0
  76. package/doc/troubleshooting-mcp.md +35 -6
  77. package/doc/vice/support-matrix.md +54 -0
  78. package/mcp/prompts.json +292 -0
  79. package/mcp/protocol-examples.json +46 -0
  80. package/mcp/resources.json +940 -0
  81. package/mcp/schemas/c64_config.schema.json +350 -0
  82. package/mcp/schemas/c64_debug.schema.json +380 -0
  83. package/mcp/schemas/c64_disk.schema.json +278 -0
  84. package/mcp/schemas/c64_drive.schema.json +120 -0
  85. package/mcp/schemas/c64_extract.schema.json +302 -0
  86. package/mcp/schemas/c64_graphics.schema.json +333 -0
  87. package/mcp/schemas/c64_memory.schema.json +155 -0
  88. package/mcp/schemas/c64_printer.schema.json +218 -0
  89. package/mcp/schemas/c64_program.schema.json +391 -0
  90. package/mcp/schemas/c64_rag.schema.json +67 -0
  91. package/mcp/schemas/c64_select_backend.schema.json +32 -0
  92. package/mcp/schemas/c64_sound.schema.json +644 -0
  93. package/mcp/schemas/c64_stream.schema.json +61 -0
  94. package/mcp/schemas/c64_system.schema.json +227 -0
  95. package/mcp/schemas/c64_vice.schema.json +63 -0
  96. package/mcp/server.json +15 -0
  97. package/mcp/tools.json +4517 -0
  98. package/mcp.json +83 -9
  99. package/package.json +8 -3
  100. package/scripts/capture-backend-switch-screenshots.mjs +276 -0
  101. package/scripts/generate-mcp-interface.ts +289 -0
  102. package/scripts/invoke-bun.mjs +67 -21
  103. package/scripts/mockC64Server.mjs +162 -6
  104. package/scripts/run-coverage.mjs +284 -0
  105. package/scripts/run-tests.mjs +95 -39
  106. package/scripts/run-tests.ts +378 -73
  107. package/scripts/update-readme.ts +147 -13
@@ -0,0 +1,350 @@
1
+ {
2
+ "type": "object",
3
+ "description": "Configuration operations available via the c64_config tool.",
4
+ "oneOf": [
5
+ {
6
+ "type": "object",
7
+ "description": "List configuration categories reported by the firmware.",
8
+ "properties": {
9
+ "op": {
10
+ "const": "list"
11
+ }
12
+ },
13
+ "additionalProperties": false,
14
+ "required": [
15
+ "op"
16
+ ]
17
+ },
18
+ {
19
+ "type": "object",
20
+ "description": "Read a configuration category or specific item.",
21
+ "properties": {
22
+ "category": {
23
+ "type": "string",
24
+ "description": "Configuration category reported by the Ultimate firmware (e.g. 'Audio').",
25
+ "minLength": 1
26
+ },
27
+ "item": {
28
+ "type": [
29
+ "string",
30
+ "null"
31
+ ],
32
+ "description": "Specific configuration item inside the selected category (e.g. 'Volume').",
33
+ "minLength": 1
34
+ },
35
+ "op": {
36
+ "const": "get"
37
+ }
38
+ },
39
+ "required": [
40
+ "category",
41
+ "op"
42
+ ],
43
+ "additionalProperties": false
44
+ },
45
+ {
46
+ "type": "object",
47
+ "description": "Write a configuration value in the selected category.",
48
+ "properties": {
49
+ "category": {
50
+ "type": "string",
51
+ "description": "Configuration category reported by the Ultimate firmware (e.g. 'Audio').",
52
+ "minLength": 1
53
+ },
54
+ "item": {
55
+ "type": "string",
56
+ "description": "Configuration item name inside the category.",
57
+ "minLength": 1
58
+ },
59
+ "value": {
60
+ "description": "Primitive configuration value (string, number, or boolean).",
61
+ "type": [
62
+ "string",
63
+ "number",
64
+ "boolean"
65
+ ]
66
+ },
67
+ "op": {
68
+ "const": "set"
69
+ }
70
+ },
71
+ "required": [
72
+ "category",
73
+ "item",
74
+ "value",
75
+ "op"
76
+ ],
77
+ "additionalProperties": false
78
+ },
79
+ {
80
+ "description": "Apply multiple configuration updates in a single request.",
81
+ "type": "object",
82
+ "additionalProperties": {
83
+ "type": "object",
84
+ "additionalProperties": {
85
+ "type": [
86
+ "string",
87
+ "number",
88
+ "boolean"
89
+ ]
90
+ }
91
+ },
92
+ "properties": {
93
+ "op": {
94
+ "const": "batch_update"
95
+ }
96
+ },
97
+ "required": [
98
+ "op"
99
+ ]
100
+ },
101
+ {
102
+ "type": "object",
103
+ "description": "Load configuration from flash storage.",
104
+ "properties": {
105
+ "op": {
106
+ "const": "load_flash"
107
+ }
108
+ },
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "op"
112
+ ]
113
+ },
114
+ {
115
+ "type": "object",
116
+ "description": "Persist the current configuration to flash storage.",
117
+ "properties": {
118
+ "op": {
119
+ "const": "save_flash"
120
+ }
121
+ },
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "op"
125
+ ]
126
+ },
127
+ {
128
+ "type": "object",
129
+ "description": "Reset firmware configuration to factory defaults.",
130
+ "properties": {
131
+ "op": {
132
+ "const": "reset_defaults"
133
+ }
134
+ },
135
+ "additionalProperties": false,
136
+ "required": [
137
+ "op"
138
+ ]
139
+ },
140
+ {
141
+ "type": "object",
142
+ "description": "Read the Ultimate debug register ($D7FF).",
143
+ "properties": {
144
+ "op": {
145
+ "const": "read_debugreg"
146
+ }
147
+ },
148
+ "additionalProperties": false,
149
+ "required": [
150
+ "op"
151
+ ]
152
+ },
153
+ {
154
+ "type": "object",
155
+ "description": "Write a hex value to the Ultimate debug register ($D7FF).",
156
+ "properties": {
157
+ "value": {
158
+ "type": "string",
159
+ "description": "Hex value (00-FF) to write to the debug register.",
160
+ "minLength": 1,
161
+ "maxLength": 2,
162
+ "pattern": "^[0-9A-Fa-f]{1,2}$"
163
+ },
164
+ "op": {
165
+ "const": "write_debugreg"
166
+ }
167
+ },
168
+ "required": [
169
+ "value",
170
+ "op"
171
+ ],
172
+ "additionalProperties": false
173
+ },
174
+ {
175
+ "type": "object",
176
+ "description": "Retrieve Ultimate hardware information and status.",
177
+ "properties": {
178
+ "op": {
179
+ "const": "info"
180
+ }
181
+ },
182
+ "additionalProperties": false,
183
+ "required": [
184
+ "op"
185
+ ]
186
+ },
187
+ {
188
+ "type": "object",
189
+ "description": "Fetch firmware version details.",
190
+ "properties": {
191
+ "op": {
192
+ "const": "version"
193
+ }
194
+ },
195
+ "additionalProperties": false,
196
+ "required": [
197
+ "op"
198
+ ]
199
+ },
200
+ {
201
+ "type": "object",
202
+ "description": "Snapshot configuration to disk for later restore or diff.",
203
+ "properties": {
204
+ "path": {
205
+ "type": "string",
206
+ "description": "Absolute or workspace-relative path where the snapshot file will be written.",
207
+ "minLength": 1
208
+ },
209
+ "op": {
210
+ "const": "snapshot"
211
+ }
212
+ },
213
+ "required": [
214
+ "path",
215
+ "op"
216
+ ],
217
+ "additionalProperties": false
218
+ },
219
+ {
220
+ "type": "object",
221
+ "description": "Restore configuration from a snapshot file.",
222
+ "properties": {
223
+ "path": {
224
+ "type": "string",
225
+ "description": "Snapshot file to read (must contain categories payload).",
226
+ "minLength": 1
227
+ },
228
+ "applyToFlash": {
229
+ "type": [
230
+ "boolean",
231
+ "null"
232
+ ],
233
+ "description": "When true, save the restored configuration to flash immediately.",
234
+ "default": false
235
+ },
236
+ "op": {
237
+ "const": "restore"
238
+ }
239
+ },
240
+ "required": [
241
+ "path",
242
+ "op"
243
+ ],
244
+ "additionalProperties": false
245
+ },
246
+ {
247
+ "type": "object",
248
+ "description": "Compare the current configuration with a snapshot.",
249
+ "properties": {
250
+ "path": {
251
+ "type": "string",
252
+ "description": "Snapshot file to compare with.",
253
+ "minLength": 1
254
+ },
255
+ "op": {
256
+ "const": "diff"
257
+ }
258
+ },
259
+ "required": [
260
+ "path",
261
+ "op"
262
+ ],
263
+ "additionalProperties": false
264
+ },
265
+ {
266
+ "type": "object",
267
+ "description": "Discover PRG/CRT files and run each with optional screen capture.",
268
+ "properties": {
269
+ "root": {
270
+ "type": [
271
+ "string",
272
+ "null"
273
+ ],
274
+ "description": "Root path to search for programs",
275
+ "minLength": 1,
276
+ "default": "/"
277
+ },
278
+ "extensions": {
279
+ "type": [
280
+ "array",
281
+ "null"
282
+ ],
283
+ "items": {
284
+ "type": "string",
285
+ "description": "File extensions to include (without dot)",
286
+ "minLength": 1
287
+ },
288
+ "default": [
289
+ "prg",
290
+ "crt"
291
+ ]
292
+ },
293
+ "durationMs": {
294
+ "type": [
295
+ "integer",
296
+ "null"
297
+ ],
298
+ "description": "Duration to run each program in milliseconds",
299
+ "minimum": 1,
300
+ "default": 5000
301
+ },
302
+ "captureScreen": {
303
+ "type": [
304
+ "boolean",
305
+ "null"
306
+ ],
307
+ "description": "Capture screen after each run",
308
+ "default": true
309
+ },
310
+ "maxPrograms": {
311
+ "type": [
312
+ "integer",
313
+ "null"
314
+ ],
315
+ "description": "Maximum number of programs to run",
316
+ "minimum": 1,
317
+ "default": 10
318
+ },
319
+ "outputPath": {
320
+ "type": [
321
+ "string",
322
+ "null"
323
+ ],
324
+ "description": "Output directory for run logs and captures",
325
+ "minLength": 1
326
+ },
327
+ "resetDelayMs": {
328
+ "type": [
329
+ "integer",
330
+ "null"
331
+ ],
332
+ "description": "Delay after reset operations to allow the platform to settle.",
333
+ "minimum": 0,
334
+ "maximum": 1000,
335
+ "default": 100
336
+ },
337
+ "op": {
338
+ "const": "shuffle"
339
+ }
340
+ },
341
+ "additionalProperties": false,
342
+ "required": [
343
+ "op"
344
+ ]
345
+ }
346
+ ],
347
+ "discriminator": {
348
+ "propertyName": "op"
349
+ }
350
+ }