c64bridge 0.9.3 → 1.0.1

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 (65) hide show
  1. package/AGENTS.md +19 -3
  2. package/README.md +190 -148
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/c64Client.js +277 -41
  5. package/dist/config.js +30 -18
  6. package/dist/device.js +191 -125
  7. package/dist/knowledge.js +1 -1
  8. package/dist/loggingHttpClient.js +15 -3
  9. package/dist/mcp-server.js +65 -16
  10. package/dist/platform.js +13 -2
  11. package/dist/rag/indexer.js +11 -8
  12. package/dist/rag/init.js +11 -8
  13. package/dist/sidwaveCompiler.js +2 -2
  14. package/dist/tools/audio.js +27 -6
  15. package/dist/tools/developer.js +6 -6
  16. package/dist/tools/graphics.js +4 -4
  17. package/dist/tools/input.js +136 -24
  18. package/dist/tools/machineControl.js +85 -6
  19. package/dist/tools/memory.js +21 -6
  20. package/dist/tools/meta/artifacts.js +20 -8
  21. package/dist/tools/meta/background.js +11 -1
  22. package/dist/tools/meta/index.js +1 -1
  23. package/dist/tools/pollValidator.js +19 -51
  24. package/dist/tools/printer.js +1 -0
  25. package/dist/tools/programRunners.js +5 -5
  26. package/dist/tools/rag.js +1 -1
  27. package/dist/tools/registry/batch.js +1 -1
  28. package/dist/tools/registry/config.js +5 -5
  29. package/dist/tools/registry/disk.js +2 -2
  30. package/dist/tools/registry/drive.js +2 -2
  31. package/dist/tools/registry/graphics.js +2 -2
  32. package/dist/tools/registry/memory.js +2 -2
  33. package/dist/tools/registry/platform.js +9 -5
  34. package/dist/tools/registry/printer.js +1 -0
  35. package/dist/tools/registry/program.js +5 -5
  36. package/dist/tools/registry/rag.js +1 -1
  37. package/dist/tools/registry/sound.js +4 -4
  38. package/dist/tools/registry/system.js +13 -3
  39. package/dist/tools/storage.js +1 -1
  40. package/dist/vice/mockServer.js +33 -0
  41. package/dist/vice/process.js +11 -1
  42. package/dist/vice/viceClient.js +35 -6
  43. package/doc/c64u/c64-openapi.yaml +1130 -774
  44. package/doc/reviews/hardening/01-fable/prompt-handover.md +125 -0
  45. package/doc/reviews/hardening/01-fable/prompt.md +98 -0
  46. package/doc/reviews/hardening/01-fable/review-prompt.md +468 -0
  47. package/doc/reviews/hardening/01-fable/review.md +1234 -0
  48. package/doc/u2/u2-openapi.yaml +1192 -0
  49. package/generated/c64/index.js +142 -9
  50. package/generated/openapi/c64u/index.js +1117 -0
  51. package/generated/openapi/u2/index.js +929 -0
  52. package/mcp/schemas/c64_graphics.schema.json +3 -3
  53. package/mcp/schemas/c64_input.schema.json +249 -8
  54. package/mcp/schemas/c64_memory.schema.json +3 -3
  55. package/mcp/schemas/c64_program.schema.json +3 -3
  56. package/mcp/schemas/c64_select_backend.schema.json +2 -0
  57. package/mcp/schemas/c64_system.schema.json +41 -1
  58. package/mcp/server.json +1 -1
  59. package/mcp/tools.json +386 -44
  60. package/mcp.json +14 -2
  61. package/package.json +4 -2
  62. package/scripts/mockC64Server.mjs +171 -2
  63. package/scripts/prepare-release.mjs +13 -2
  64. package/scripts/update-readme.ts +18 -30
  65. package/server.json +3 -3
@@ -8,6 +8,90 @@
8
8
  * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
9
9
  * ---------------------------------------------------------------
10
10
  */
11
+ export var InputTransition;
12
+ (function (InputTransition) {
13
+ InputTransition["Press"] = "press";
14
+ InputTransition["Release"] = "release";
15
+ InputTransition["Tap"] = "tap";
16
+ })(InputTransition || (InputTransition = {}));
17
+ export var KeyboardInput;
18
+ (function (KeyboardInput) {
19
+ KeyboardInput["InstDel"] = "inst_del";
20
+ KeyboardInput["Return"] = "return";
21
+ KeyboardInput["CursorLeftRight"] = "cursor_left_right";
22
+ KeyboardInput["F7"] = "f7";
23
+ KeyboardInput["F1"] = "f1";
24
+ KeyboardInput["F3"] = "f3";
25
+ KeyboardInput["F5"] = "f5";
26
+ KeyboardInput["CursorUpDown"] = "cursor_up_down";
27
+ KeyboardInput["Value0"] = "0";
28
+ KeyboardInput["Value1"] = "1";
29
+ KeyboardInput["Value2"] = "2";
30
+ KeyboardInput["Value3"] = "3";
31
+ KeyboardInput["Value4"] = "4";
32
+ KeyboardInput["Value5"] = "5";
33
+ KeyboardInput["Value6"] = "6";
34
+ KeyboardInput["Value7"] = "7";
35
+ KeyboardInput["Value8"] = "8";
36
+ KeyboardInput["Value9"] = "9";
37
+ KeyboardInput["A"] = "a";
38
+ KeyboardInput["B"] = "b";
39
+ KeyboardInput["C"] = "c";
40
+ KeyboardInput["D"] = "d";
41
+ KeyboardInput["E"] = "e";
42
+ KeyboardInput["F"] = "f";
43
+ KeyboardInput["G"] = "g";
44
+ KeyboardInput["H"] = "h";
45
+ KeyboardInput["I"] = "i";
46
+ KeyboardInput["J"] = "j";
47
+ KeyboardInput["K"] = "k";
48
+ KeyboardInput["L"] = "l";
49
+ KeyboardInput["M"] = "m";
50
+ KeyboardInput["N"] = "n";
51
+ KeyboardInput["O"] = "o";
52
+ KeyboardInput["P"] = "p";
53
+ KeyboardInput["Q"] = "q";
54
+ KeyboardInput["R"] = "r";
55
+ KeyboardInput["S"] = "s";
56
+ KeyboardInput["T"] = "t";
57
+ KeyboardInput["U"] = "u";
58
+ KeyboardInput["V"] = "v";
59
+ KeyboardInput["W"] = "w";
60
+ KeyboardInput["X"] = "x";
61
+ KeyboardInput["Y"] = "y";
62
+ KeyboardInput["Z"] = "z";
63
+ KeyboardInput["LeftShift"] = "left_shift";
64
+ KeyboardInput["RightShift"] = "right_shift";
65
+ KeyboardInput["Plus"] = "plus";
66
+ KeyboardInput["Minus"] = "minus";
67
+ KeyboardInput["Period"] = "period";
68
+ KeyboardInput["Colon"] = "colon";
69
+ KeyboardInput["At"] = "at";
70
+ KeyboardInput["Comma"] = "comma";
71
+ KeyboardInput["Pound"] = "pound";
72
+ KeyboardInput["Star"] = "star";
73
+ KeyboardInput["Semicolon"] = "semicolon";
74
+ KeyboardInput["ClrHome"] = "clr_home";
75
+ KeyboardInput["Equals"] = "equals";
76
+ KeyboardInput["ArrowUp"] = "arrow_up";
77
+ KeyboardInput["Slash"] = "slash";
78
+ KeyboardInput["ArrowLeft"] = "arrow_left";
79
+ KeyboardInput["Ctrl"] = "ctrl";
80
+ KeyboardInput["Space"] = "space";
81
+ KeyboardInput["Commodore"] = "commodore";
82
+ KeyboardInput["RunStop"] = "run_stop";
83
+ KeyboardInput["Restore"] = "restore";
84
+ })(KeyboardInput || (KeyboardInput = {}));
85
+ export var JoystickInput;
86
+ (function (JoystickInput) {
87
+ JoystickInput["Up"] = "up";
88
+ JoystickInput["Down"] = "down";
89
+ JoystickInput["Left"] = "left";
90
+ JoystickInput["Right"] = "right";
91
+ JoystickInput["Fire"] = "fire";
92
+ JoystickInput["Fire2"] = "fire2";
93
+ JoystickInput["Fire3"] = "fire3";
94
+ })(JoystickInput || (JoystickInput = {}));
11
95
  import axios from "axios";
12
96
  export var ContentType;
13
97
  (function (ContentType) {
@@ -91,15 +175,18 @@ export class HttpClient {
91
175
  * @baseUrl http://c64u
92
176
  *
93
177
  * This OpenAPI document captures the public HTTP interface described in the
94
- * official Ultimate 64 REST API documentation. Responses always include an
95
- * `errors` array unless noted. When a network password is configured, clients
96
- * must supply the `X-Password` header on every request.
178
+ * official Ultimate 64 REST API documentation at
179
+ * https://1541u-documentation.readthedocs.io/en/latest/api/api_calls.html.
180
+ * Responses always include an `errors` array unless noted. When a network
181
+ * password is configured, clients must supply the `X-Password` header on every
182
+ * request. Example payloads were captured against a local Ultimate 64 Elite
183
+ * reachable as `http://c64u` running firmware 3.12a.
97
184
  */
98
185
  export class Api {
99
186
  constructor(http) {
100
187
  this.v1 = {
101
188
  /**
102
- * No description
189
+ * @description Returns the firmware-defined REST API semantic version.
103
190
  *
104
191
  * @name VersionList
105
192
  * @summary Get API version
@@ -114,7 +201,7 @@ export class Api {
114
201
  ...params,
115
202
  }),
116
203
  /**
117
- * No description
204
+ * @description Returns hardware metadata (product, firmware version, FPGA/core versions, hostname). Available on Ultimate firmware 3.12 and newer. On earlier releases the endpoint responds with HTTP 404.
118
205
  *
119
206
  * @name InfoList
120
207
  * @summary Get device information
@@ -291,7 +378,7 @@ export class Api {
291
378
  ...params,
292
379
  }),
293
380
  /**
294
- * No description
381
+ * @description Enumerates top-level configuration pages as displayed in the Ultimate menu. Supports wildcard queries via URL encoding.
295
382
  *
296
383
  * @name ConfigsList
297
384
  * @summary List configuration categories
@@ -323,7 +410,7 @@ export class Api {
323
410
  ...params,
324
411
  }),
325
412
  /**
326
- * No description
413
+ * @description Returns all items inside the specified category. Wildcards may match multiple categories; each appears as an object property in the response.
327
414
  *
328
415
  * @name ConfigsDetail
329
416
  * @summary Inspect category
@@ -539,7 +626,7 @@ export class Api {
539
626
  ...params,
540
627
  }),
541
628
  /**
542
- * No description
629
+ * @description Performs a DMA read at the requested address. Firmware returns either a JSON wrapper or raw bytes. Use `length` to limit the transfer (default 256 bytes).
543
630
  *
544
631
  * @name MachineReadmemList
545
632
  * @summary Read memory
@@ -554,6 +641,52 @@ export class Api {
554
641
  format: "json",
555
642
  ...params,
556
643
  }),
644
+ /**
645
+ * @description Returns raw character and colour matrix bytes, or 404 when no Ultimate menu is active.
646
+ *
647
+ * @name MachineMenuScreenList
648
+ * @summary Read the active Ultimate menu screen matrix
649
+ * @request GET:/v1/machine:menu_screen
650
+ * @secure
651
+ */
652
+ machineMenuScreenList: (menuScreen, params = {}) => this.http.request({
653
+ path: `/v1/machine${menuScreen}`,
654
+ method: "GET",
655
+ secure: true,
656
+ ...params,
657
+ }),
658
+ /**
659
+ * No description
660
+ *
661
+ * @name MachineInputList
662
+ * @summary Read REST-injected keyboard and joystick state
663
+ * @request GET:/v1/machine:input
664
+ * @secure
665
+ */
666
+ machineInputList: (input, params = {}) => this.http.request({
667
+ path: `/v1/machine${input}`,
668
+ method: "GET",
669
+ secure: true,
670
+ format: "json",
671
+ ...params,
672
+ }),
673
+ /**
674
+ * No description
675
+ *
676
+ * @name MachineInputCreate
677
+ * @summary Apply keyboard and joystick input events
678
+ * @request POST:/v1/machine:input
679
+ * @secure
680
+ */
681
+ machineInputCreate: (input, data, params = {}) => this.http.request({
682
+ path: `/v1/machine${input}`,
683
+ method: "POST",
684
+ body: data,
685
+ secure: true,
686
+ type: ContentType.Json,
687
+ format: "json",
688
+ ...params,
689
+ }),
557
690
  /**
558
691
  * No description
559
692
  *
@@ -586,7 +719,7 @@ export class Api {
586
719
  ...params,
587
720
  }),
588
721
  /**
589
- * No description
722
+ * @description Returns current Ultimate-managed drives, images, and service devices (SoftIEC, printer emulation).
590
723
  *
591
724
  * @name DrivesList
592
725
  * @summary List internal drives