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.
Files changed (136) 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 +70 -15
  16. package/data/assembly/assembly-spec.md +2 -0
  17. package/dist/c64Client.js +238 -60
  18. package/dist/chargen.js +0 -4
  19. package/dist/config.js +53 -28
  20. package/dist/device.js +92 -37
  21. package/dist/diagnostics.js +66 -5
  22. package/dist/hostPaths.js +128 -0
  23. package/dist/logger.js +3 -2
  24. package/dist/loggingHttpClient.js +71 -2
  25. package/dist/mcp-server.js +416 -291
  26. package/dist/numericArg.js +55 -0
  27. package/dist/petscii.js +13 -6
  28. package/dist/platform.js +12 -3
  29. package/dist/prompts/registry.js +6 -1
  30. package/dist/redact.js +166 -0
  31. package/dist/tools/access.js +66 -0
  32. package/dist/tools/debug.js +6 -0
  33. package/dist/tools/developer.js +77 -36
  34. package/dist/tools/errors.js +54 -3
  35. package/dist/tools/input.js +25 -8
  36. package/dist/tools/machineControl.js +113 -21
  37. package/dist/tools/memory.js +135 -30
  38. package/dist/tools/meta/artifacts.js +5 -5
  39. package/dist/tools/meta/background.js +216 -54
  40. package/dist/tools/meta/compilation.js +6 -5
  41. package/dist/tools/meta/config.js +20 -10
  42. package/dist/tools/meta/configInventory.js +25 -2
  43. package/dist/tools/meta/diagnostics.js +2 -1
  44. package/dist/tools/meta/filesystem.js +16 -14
  45. package/dist/tools/meta/graphics.js +48 -20
  46. package/dist/tools/meta/memory.js +45 -19
  47. package/dist/tools/meta/program.js +10 -7
  48. package/dist/tools/meta/screen.js +116 -25
  49. package/dist/tools/pauseGuard.js +23 -0
  50. package/dist/tools/pollValidator.js +53 -8
  51. package/dist/tools/programRunners.js +62 -18
  52. package/dist/tools/registry/batch.js +17 -11
  53. package/dist/tools/registry/config.js +9 -2
  54. package/dist/tools/registry/disk.js +12 -2
  55. package/dist/tools/registry/drive.js +3 -0
  56. package/dist/tools/registry/extract.js +3 -0
  57. package/dist/tools/registry/graphics.js +59 -6
  58. package/dist/tools/registry/index.js +17 -1
  59. package/dist/tools/registry/memory.js +11 -1
  60. package/dist/tools/registry/platform.js +4 -1
  61. package/dist/tools/registry/printer.js +2 -1
  62. package/dist/tools/registry/program.js +5 -1
  63. package/dist/tools/registry/rag.js +1 -0
  64. package/dist/tools/registry/sound.js +12 -1
  65. package/dist/tools/registry/stream.js +2 -1
  66. package/dist/tools/registry/system.js +8 -1
  67. package/dist/tools/schema.js +7 -7
  68. package/dist/tools/streaming.js +34 -4
  69. package/dist/tools/translation/assembler.js +247 -24
  70. package/dist/tools/translation/basicDetokenizer.js +80 -0
  71. package/dist/tools/translation/basicTokenizer.js +8 -3
  72. package/dist/tools/translation/disassembler.js +14 -0
  73. package/dist/tools/types.js +258 -7
  74. package/dist/tools/vice.js +5 -16
  75. package/dist/vicBitmap.js +1 -1
  76. package/dist/vice/mockServer.js +3 -0
  77. package/dist/vice/process.js +19 -0
  78. package/dist/vice/resourcePolicy.js +36 -0
  79. package/dist/vice/viceClient.js +22 -5
  80. package/doc/vice/support-matrix.md +17 -11
  81. package/mcp/schemas/c64_batch.schema.json +2 -1
  82. package/mcp/schemas/c64_config.schema.json +33 -466
  83. package/mcp/schemas/c64_debug.schema.json +3 -602
  84. package/mcp/schemas/c64_disk.schema.json +17 -344
  85. package/mcp/schemas/c64_drive.schema.json +2 -157
  86. package/mcp/schemas/c64_extract.schema.json +10 -364
  87. package/mcp/schemas/c64_graphics.schema.json +19 -426
  88. package/mcp/schemas/c64_input.schema.json +5 -318
  89. package/mcp/schemas/c64_memory.schema.json +23 -491
  90. package/mcp/schemas/c64_printer.schema.json +3 -258
  91. package/mcp/schemas/c64_program.schema.json +16 -491
  92. package/mcp/schemas/c64_rag.schema.json +1 -81
  93. package/mcp/schemas/c64_select_backend.schema.json +2 -36
  94. package/mcp/schemas/c64_sound.schema.json +20 -822
  95. package/mcp/schemas/c64_stream.schema.json +4 -75
  96. package/mcp/schemas/c64_system.schema.json +28 -348
  97. package/mcp/schemas/c64_vice.schema.json +2 -71
  98. package/mcp/server.json +1 -1
  99. package/mcp/tools.json +1990 -6900
  100. package/mcp.json +21 -1
  101. package/package.json +19 -8
  102. package/scripts/mockC64Server.mjs +44 -0
  103. package/scripts/run-coverage.mjs +27 -1
  104. package/scripts/smoke-run.sh +3 -2
  105. package/scripts/start.mjs +23 -1
  106. package/server.json +53 -3
  107. package/dist/.tsbuildinfo +0 -1
  108. package/doc/agent-state-spec.md +0 -243
  109. package/doc/plans/bun/baseline-metrics.md +0 -16
  110. package/doc/plans/bun/migration-checklist.md +0 -55
  111. package/doc/plans/bun/migration.md +0 -83
  112. package/doc/plans/improve-knowledge/notes.md +0 -43
  113. package/doc/plans/improve-knowledge/plan.md +0 -121
  114. package/doc/plans/improve-knowledge/rollout.md +0 -110
  115. package/doc/plans/meta-tools/README.md +0 -110
  116. package/doc/plans/meta-tools/analysis.md +0 -272
  117. package/doc/plans/meta-tools/catalog.md +0 -435
  118. package/doc/plans/meta-tools/notes.md +0 -192
  119. package/doc/plans/meta-tools/rollout.md +0 -368
  120. package/doc/plans/prompts/README.md +0 -96
  121. package/doc/plans/prompts/user-prompt-ideas.md +0 -147
  122. package/doc/plans/tool-consolidation/notes.md +0 -28
  123. package/doc/plans/tool-consolidation/plan.md +0 -169
  124. package/doc/plans/tool-consolidation/rollout.md +0 -104
  125. package/doc/plans/vice-backend-switch/plan.md +0 -486
  126. package/doc/plans/vice-backend-switch-2/plan.md +0 -48
  127. package/doc/plans/vice-support/notes.md +0 -63
  128. package/doc/plans/vice-support/plan.md +0 -88
  129. package/doc/plans/vice-support/rollout.md +0 -99
  130. package/doc/reviews/audit.md +0 -143
  131. package/doc/reviews/hardening/01-fable/prompt-handover.md +0 -125
  132. package/doc/reviews/hardening/01-fable/prompt.md +0 -98
  133. package/doc/reviews/hardening/01-fable/review-prompt.md +0 -468
  134. package/doc/reviews/hardening/01-fable/review.md +0 -1234
  135. package/doc/reviews/vice-support-review.md +0 -185
  136. 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
  }