c64bridge 1.0.7 → 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.
Files changed (132) hide show
  1. package/.github/skills/assembly-program/SKILL.md +37 -0
  2. package/.github/skills/basic-program/SKILL.md +40 -0
  3. package/.github/skills/cross-platform-demo/SKILL.md +32 -0
  4. package/.github/skills/drive-manager/SKILL.md +33 -0
  5. package/.github/skills/graphics-demo/SKILL.md +30 -0
  6. package/.github/skills/hello-world/SKILL.md +36 -0
  7. package/.github/skills/memory-debug/SKILL.md +32 -0
  8. package/.github/skills/pr-converge/SKILL.md +33 -0
  9. package/.github/skills/printer-job/SKILL.md +30 -0
  10. package/.github/skills/sid-music/SKILL.md +35 -0
  11. package/.github/skills/software-launch/SKILL.md +31 -0
  12. package/.github/skills/stream-control/SKILL.md +29 -0
  13. package/.github/skills/system-control/SKILL.md +32 -0
  14. package/AGENTS.md +28 -7
  15. package/README.md +69 -14
  16. package/data/assembly/assembly-spec.md +2 -0
  17. package/dist/c64Client.js +238 -60
  18. package/dist/config.js +48 -26
  19. package/dist/device.js +92 -37
  20. package/dist/diagnostics.js +62 -2
  21. package/dist/hostPaths.js +128 -0
  22. package/dist/loggingHttpClient.js +59 -1
  23. package/dist/mcp-server.js +409 -286
  24. package/dist/numericArg.js +55 -0
  25. package/dist/petscii.js +13 -1
  26. package/dist/platform.js +12 -3
  27. package/dist/prompts/registry.js +6 -1
  28. package/dist/tools/access.js +66 -0
  29. package/dist/tools/debug.js +6 -0
  30. package/dist/tools/developer.js +67 -34
  31. package/dist/tools/errors.js +54 -3
  32. package/dist/tools/input.js +23 -6
  33. package/dist/tools/machineControl.js +112 -20
  34. package/dist/tools/memory.js +135 -30
  35. package/dist/tools/meta/artifacts.js +5 -5
  36. package/dist/tools/meta/background.js +216 -54
  37. package/dist/tools/meta/compilation.js +6 -5
  38. package/dist/tools/meta/config.js +15 -6
  39. package/dist/tools/meta/filesystem.js +16 -14
  40. package/dist/tools/meta/graphics.js +48 -20
  41. package/dist/tools/meta/memory.js +45 -19
  42. package/dist/tools/meta/program.js +10 -7
  43. package/dist/tools/meta/screen.js +116 -25
  44. package/dist/tools/pauseGuard.js +23 -0
  45. package/dist/tools/pollValidator.js +53 -8
  46. package/dist/tools/programRunners.js +62 -18
  47. package/dist/tools/registry/batch.js +16 -4
  48. package/dist/tools/registry/config.js +9 -2
  49. package/dist/tools/registry/disk.js +12 -2
  50. package/dist/tools/registry/drive.js +3 -0
  51. package/dist/tools/registry/extract.js +3 -0
  52. package/dist/tools/registry/graphics.js +59 -6
  53. package/dist/tools/registry/index.js +17 -1
  54. package/dist/tools/registry/memory.js +11 -1
  55. package/dist/tools/registry/platform.js +4 -1
  56. package/dist/tools/registry/printer.js +2 -1
  57. package/dist/tools/registry/program.js +5 -1
  58. package/dist/tools/registry/rag.js +1 -0
  59. package/dist/tools/registry/sound.js +12 -1
  60. package/dist/tools/registry/stream.js +2 -1
  61. package/dist/tools/registry/system.js +8 -1
  62. package/dist/tools/schema.js +7 -7
  63. package/dist/tools/streaming.js +34 -4
  64. package/dist/tools/translation/assembler.js +247 -24
  65. package/dist/tools/translation/basicDetokenizer.js +80 -0
  66. package/dist/tools/translation/basicTokenizer.js +8 -3
  67. package/dist/tools/translation/disassembler.js +14 -0
  68. package/dist/tools/types.js +258 -7
  69. package/dist/tools/vice.js +5 -16
  70. package/dist/vicBitmap.js +1 -1
  71. package/dist/vice/mockServer.js +3 -0
  72. package/dist/vice/process.js +19 -0
  73. package/dist/vice/resourcePolicy.js +36 -0
  74. package/dist/vice/viceClient.js +22 -5
  75. package/doc/vice/support-matrix.md +17 -11
  76. package/mcp/schemas/c64_batch.schema.json +2 -1
  77. package/mcp/schemas/c64_config.schema.json +25 -475
  78. package/mcp/schemas/c64_debug.schema.json +3 -602
  79. package/mcp/schemas/c64_disk.schema.json +17 -344
  80. package/mcp/schemas/c64_drive.schema.json +2 -157
  81. package/mcp/schemas/c64_extract.schema.json +10 -364
  82. package/mcp/schemas/c64_graphics.schema.json +19 -426
  83. package/mcp/schemas/c64_input.schema.json +5 -318
  84. package/mcp/schemas/c64_memory.schema.json +23 -491
  85. package/mcp/schemas/c64_printer.schema.json +3 -258
  86. package/mcp/schemas/c64_program.schema.json +16 -491
  87. package/mcp/schemas/c64_rag.schema.json +1 -81
  88. package/mcp/schemas/c64_select_backend.schema.json +2 -36
  89. package/mcp/schemas/c64_sound.schema.json +20 -822
  90. package/mcp/schemas/c64_stream.schema.json +4 -75
  91. package/mcp/schemas/c64_system.schema.json +28 -348
  92. package/mcp/schemas/c64_vice.schema.json +2 -71
  93. package/mcp/server.json +1 -1
  94. package/mcp/tools.json +1983 -6910
  95. package/mcp.json +21 -1
  96. package/package.json +16 -8
  97. package/scripts/mockC64Server.mjs +44 -0
  98. package/scripts/run-coverage.mjs +27 -1
  99. package/scripts/smoke-run.sh +3 -2
  100. package/scripts/start.mjs +23 -1
  101. package/server.json +35 -2
  102. package/dist/.tsbuildinfo +0 -1
  103. package/doc/agent-state-spec.md +0 -243
  104. package/doc/audit/secret-handling.md +0 -61
  105. package/doc/plans/bun/baseline-metrics.md +0 -16
  106. package/doc/plans/bun/migration-checklist.md +0 -55
  107. package/doc/plans/bun/migration.md +0 -83
  108. package/doc/plans/improve-knowledge/notes.md +0 -43
  109. package/doc/plans/improve-knowledge/plan.md +0 -121
  110. package/doc/plans/improve-knowledge/rollout.md +0 -110
  111. package/doc/plans/meta-tools/README.md +0 -110
  112. package/doc/plans/meta-tools/analysis.md +0 -272
  113. package/doc/plans/meta-tools/catalog.md +0 -435
  114. package/doc/plans/meta-tools/notes.md +0 -192
  115. package/doc/plans/meta-tools/rollout.md +0 -368
  116. package/doc/plans/prompts/README.md +0 -96
  117. package/doc/plans/prompts/user-prompt-ideas.md +0 -147
  118. package/doc/plans/tool-consolidation/notes.md +0 -28
  119. package/doc/plans/tool-consolidation/plan.md +0 -169
  120. package/doc/plans/tool-consolidation/rollout.md +0 -104
  121. package/doc/plans/vice-backend-switch/plan.md +0 -486
  122. package/doc/plans/vice-backend-switch-2/plan.md +0 -48
  123. package/doc/plans/vice-support/notes.md +0 -63
  124. package/doc/plans/vice-support/plan.md +0 -88
  125. package/doc/plans/vice-support/rollout.md +0 -99
  126. package/doc/reviews/audit.md +0 -143
  127. package/doc/reviews/hardening/01-fable/prompt-handover.md +0 -125
  128. package/doc/reviews/hardening/01-fable/prompt.md +0 -98
  129. package/doc/reviews/hardening/01-fable/review-prompt.md +0 -468
  130. package/doc/reviews/hardening/01-fable/review.md +0 -1234
  131. package/doc/reviews/vice-support-review.md +0 -185
  132. package/scripts/compare-rest/rest-compare-2025-11-01T00-25-21-830Z.json +0 -2513
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "text": {
17
17
  "type": "string",
18
- "description": "Text to type. Use {RETURN}, {CLR}, {F1}…{F8}, {UP/DOWN/LEFT/RIGHT}, colour names, etc.",
18
+ "description": "Text to type: printable ASCII (letters are sent as PETSCII upper case), \\n for RETURN, and {TOKEN}s such as {RETURN}, {CLR}, {F1}…{F8}, {UP}, {DOWN}, {LEFT}, {RIGHT}, colour names, or {$1D}/{29} codes. Characters with no PETSCII mapping and unknown tokens are rejected.",
19
19
  "minLength": 1,
20
20
  "maxLength": 512
21
21
  },
@@ -40,10 +40,9 @@
40
40
  "integer",
41
41
  "null"
42
42
  ],
43
- "description": "Delay in ms after each queued key press before the next press (default 0 = no delay).",
43
+ "description": "Delay in ms after each queued key press before the next press (default 0 = no delay). Limits depend on op.",
44
44
  "minimum": 0,
45
- "maximum": 5000,
46
- "default": 0
45
+ "maximum": 5000
47
46
  },
48
47
  "count": {
49
48
  "type": [
@@ -178,318 +177,6 @@
178
177
  "required": [
179
178
  "op"
180
179
  ],
181
- "description": "Input operations: write_text, key, keyboard, joystick, release_all, state.\n\nOperations:\n- write_text: Send a text string to the keyboard buffer, with PETSCII token expansion. Required inputs: text. Optional inputs: delayMs.\n- key: Tap a single key or hold it for a duration. Required inputs: key. Optional inputs: durationMs, count.\n- joystick: Simulate joystick input. On C64U/U64 this uses machine:input. On VICE it attaches VICE's I/O simulation joyport device while pressed; that device also pulls CIA lines 5-7 low, so port 1 produces phantom keys (e.g. SHIFT+C=) and port 2 reads $1E for up instead of $7E. Prefer port 2 on VICE and test bits 0-4. Required inputs: port, controls, action. Optional inputs: durationMs.\n- keyboard: Send physical C64 keyboard matrix events through machine:input (a C64U firmware version that provides it, or U64 3.15+). Required inputs: inputs, transition.\n- release_all: Release every key and joystick control injected through machine:input (a C64U firmware version that provides it, or U64 3.15+). Required inputs: none.\n- state: Read the keys and joystick controls held through machine:input (a C64U firmware version that provides it, or U64 3.15+). Required inputs: none.",
182
- "additionalProperties": false,
183
- "x-c64bridge-operations": [
184
- {
185
- "op": "write_text",
186
- "description": "Send a text string to the keyboard buffer, with PETSCII token expansion.",
187
- "required": [
188
- "text"
189
- ],
190
- "optional": [
191
- "delayMs"
192
- ],
193
- "inputSchema": {
194
- "type": "object",
195
- "description": "Send a text string to the keyboard buffer, with PETSCII token expansion.",
196
- "properties": {
197
- "op": {
198
- "const": "write_text"
199
- },
200
- "text": {
201
- "type": "string",
202
- "description": "Text to type. Use {RETURN}, {CLR}, {F1}…{F8}, {UP/DOWN/LEFT/RIGHT}, colour names, etc.",
203
- "minLength": 1,
204
- "maxLength": 512
205
- },
206
- "delayMs": {
207
- "type": [
208
- "integer",
209
- "null"
210
- ],
211
- "description": "Delay in ms after sending (default 0).",
212
- "minimum": 0,
213
- "maximum": 10000,
214
- "default": 0
215
- }
216
- },
217
- "required": [
218
- "op",
219
- "text"
220
- ],
221
- "additionalProperties": false
222
- }
223
- },
224
- {
225
- "op": "key",
226
- "description": "Tap a single key or hold it for a duration.",
227
- "required": [
228
- "key"
229
- ],
230
- "optional": [
231
- "durationMs",
232
- "count"
233
- ],
234
- "inputSchema": {
235
- "type": "object",
236
- "description": "Tap a single key or hold it for a duration.",
237
- "properties": {
238
- "op": {
239
- "const": "key"
240
- },
241
- "key": {
242
- "type": "string",
243
- "description": "Key to press: a printable character, or a PETSCII token name (RETURN, F1…F8, UP, etc.).",
244
- "minLength": 1,
245
- "maxLength": 32
246
- },
247
- "durationMs": {
248
- "type": [
249
- "integer",
250
- "null"
251
- ],
252
- "description": "Delay in ms after each queued key press before the next press (default 0 = no delay).",
253
- "minimum": 0,
254
- "maximum": 5000,
255
- "default": 0
256
- },
257
- "count": {
258
- "type": [
259
- "integer",
260
- "null"
261
- ],
262
- "description": "Number of times to press the key (default 1).",
263
- "minimum": 1,
264
- "maximum": 100,
265
- "default": 1
266
- }
267
- },
268
- "required": [
269
- "op",
270
- "key"
271
- ],
272
- "additionalProperties": false
273
- }
274
- },
275
- {
276
- "op": "joystick",
277
- "description": "Simulate joystick input. On C64U/U64 this uses machine:input. On VICE it attaches VICE's I/O simulation joyport device while pressed; that device also pulls CIA lines 5-7 low, so port 1 produces phantom keys (e.g. SHIFT+C=) and port 2 reads $1E for up instead of $7E. Prefer port 2 on VICE and test bits 0-4.",
278
- "required": [
279
- "port",
280
- "controls",
281
- "action"
282
- ],
283
- "optional": [
284
- "durationMs"
285
- ],
286
- "inputSchema": {
287
- "type": "object",
288
- "description": "Simulate joystick input. On C64U/U64 this uses machine:input. On VICE it attaches VICE's I/O simulation joyport device while pressed; that device also pulls CIA lines 5-7 low, so port 1 produces phantom keys (e.g. SHIFT+C=) and port 2 reads $1E for up instead of $7E. Prefer port 2 on VICE and test bits 0-4.",
289
- "properties": {
290
- "op": {
291
- "const": "joystick"
292
- },
293
- "port": {
294
- "type": "integer",
295
- "description": "Joystick port (1 or 2).",
296
- "minimum": 1,
297
- "maximum": 2
298
- },
299
- "controls": {
300
- "type": "array",
301
- "description": "List of controls to activate simultaneously.",
302
- "items": {
303
- "type": "string",
304
- "description": "Control to activate.",
305
- "enum": [
306
- "up",
307
- "down",
308
- "left",
309
- "right",
310
- "fire",
311
- "fire2",
312
- "fire3"
313
- ]
314
- },
315
- "minItems": 0
316
- },
317
- "action": {
318
- "type": "string",
319
- "description": "press = hold until a release call; release = restore all bits; tap = press then release after durationMs.",
320
- "enum": [
321
- "press",
322
- "release",
323
- "tap"
324
- ]
325
- },
326
- "durationMs": {
327
- "type": [
328
- "integer",
329
- "null"
330
- ],
331
- "description": "Duration to hold for tap action in ms (default 80).",
332
- "minimum": 10,
333
- "maximum": 5000,
334
- "default": 80
335
- }
336
- },
337
- "required": [
338
- "op",
339
- "port",
340
- "controls",
341
- "action"
342
- ],
343
- "additionalProperties": false
344
- }
345
- },
346
- {
347
- "op": "keyboard",
348
- "description": "Send physical C64 keyboard matrix events through machine:input (a C64U firmware version that provides it, or U64 3.15+).",
349
- "required": [
350
- "inputs",
351
- "transition"
352
- ],
353
- "optional": [],
354
- "inputSchema": {
355
- "type": "object",
356
- "description": "Send physical C64 keyboard matrix events through machine:input (a C64U firmware version that provides it, or U64 3.15+).",
357
- "properties": {
358
- "op": {
359
- "const": "keyboard"
360
- },
361
- "inputs": {
362
- "type": "array",
363
- "description": "One or more keys to transition together (for example left_shift + a).",
364
- "items": {
365
- "type": "string",
366
- "description": "Physical keyboard input.",
367
- "enum": [
368
- "inst_del",
369
- "return",
370
- "cursor_left_right",
371
- "f7",
372
- "f1",
373
- "f3",
374
- "f5",
375
- "cursor_up_down",
376
- "0",
377
- "1",
378
- "2",
379
- "3",
380
- "4",
381
- "5",
382
- "6",
383
- "7",
384
- "8",
385
- "9",
386
- "a",
387
- "b",
388
- "c",
389
- "d",
390
- "e",
391
- "f",
392
- "g",
393
- "h",
394
- "i",
395
- "j",
396
- "k",
397
- "l",
398
- "m",
399
- "n",
400
- "o",
401
- "p",
402
- "q",
403
- "r",
404
- "s",
405
- "t",
406
- "u",
407
- "v",
408
- "w",
409
- "x",
410
- "y",
411
- "z",
412
- "left_shift",
413
- "right_shift",
414
- "plus",
415
- "minus",
416
- "period",
417
- "colon",
418
- "at",
419
- "comma",
420
- "pound",
421
- "star",
422
- "semicolon",
423
- "clr_home",
424
- "equals",
425
- "arrow_up",
426
- "slash",
427
- "arrow_left",
428
- "ctrl",
429
- "space",
430
- "commodore",
431
- "run_stop",
432
- "restore"
433
- ]
434
- },
435
- "minItems": 1,
436
- "maxItems": 8
437
- },
438
- "transition": {
439
- "type": "string",
440
- "description": "press holds, release frees, tap presses and releases.",
441
- "enum": [
442
- "press",
443
- "release",
444
- "tap"
445
- ]
446
- }
447
- },
448
- "required": [
449
- "op",
450
- "inputs",
451
- "transition"
452
- ],
453
- "additionalProperties": false
454
- }
455
- },
456
- {
457
- "op": "release_all",
458
- "description": "Release every key and joystick control injected through machine:input (a C64U firmware version that provides it, or U64 3.15+).",
459
- "required": [],
460
- "optional": [],
461
- "inputSchema": {
462
- "type": "object",
463
- "description": "Release every key and joystick control injected through machine:input (a C64U firmware version that provides it, or U64 3.15+).",
464
- "properties": {
465
- "op": {
466
- "const": "release_all"
467
- }
468
- },
469
- "required": [
470
- "op"
471
- ],
472
- "additionalProperties": false
473
- }
474
- },
475
- {
476
- "op": "state",
477
- "description": "Read the keys and joystick controls held through machine:input (a C64U firmware version that provides it, or U64 3.15+).",
478
- "required": [],
479
- "optional": [],
480
- "inputSchema": {
481
- "type": "object",
482
- "description": "Read the keys and joystick controls held through machine:input (a C64U firmware version that provides it, or U64 3.15+).",
483
- "properties": {
484
- "op": {
485
- "const": "state"
486
- }
487
- },
488
- "required": [
489
- "op"
490
- ],
491
- "additionalProperties": false
492
- }
493
- }
494
- ]
180
+ "description": "Input operations: write_text, key, keyboard, joystick, release_all, state.\n\nOperations:\n- write_text [write]: Send a text string to the keyboard buffer, with PETSCII token expansion. Required inputs: text. Optional inputs: delayMs.\n- key [write]: Press a single key one or more times, optionally with a delay between presses. Required inputs: key. Optional inputs: durationMs, count.\n- joystick [c64u, vice] [write]: Simulate joystick input. On C64U/U64 this uses machine:input. On VICE it attaches VICE's I/O simulation joyport device while pressed; that device also pulls CIA lines 5-7 low, so port 1 produces phantom keys (e.g. SHIFT+C=) and port 2 reads $1E for up instead of $7E. Prefer port 2 on VICE and test bits 0-4. Required inputs: port, controls, action. Optional inputs: durationMs.\n- keyboard [c64u] [write]: Send physical C64 keyboard matrix events through machine:input (a C64U firmware version that provides it, or U64 3.15+). Required inputs: inputs, transition.\n- release_all [c64u] [write]: Release every key and joystick control injected through machine:input (a C64U firmware version that provides it, or U64 3.15+). Required inputs: none.\n- state [c64u]: Read the keys and joystick controls held through machine:input (a C64U firmware version that provides it, or U64 3.15+). Required inputs: none.",
181
+ "additionalProperties": false
495
182
  }