c64bridge 0.8.1 → 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 (77) 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/plans/prompts/README.md +7 -7
  50. package/mcp/prompts.json +42 -59
  51. package/mcp/protocol-examples.json +2 -2
  52. package/mcp/resources.json +179 -166
  53. package/mcp/schemas/c64_config.schema.json +109 -326
  54. package/mcp/schemas/c64_debug.schema.json +158 -337
  55. package/mcp/schemas/c64_disk.schema.json +180 -262
  56. package/mcp/schemas/c64_drive.schema.json +31 -111
  57. package/mcp/schemas/c64_extract.schema.json +193 -291
  58. package/mcp/schemas/c64_graphics.schema.json +208 -308
  59. package/mcp/schemas/c64_memory.schema.json +94 -144
  60. package/mcp/schemas/c64_printer.schema.json +151 -205
  61. package/mcp/schemas/c64_program.schema.json +229 -367
  62. package/mcp/schemas/c64_rag.schema.json +25 -59
  63. package/mcp/schemas/c64_select_backend.schema.json +19 -26
  64. package/mcp/schemas/c64_sound.schema.json +346 -622
  65. package/mcp/schemas/c64_stream.schema.json +25 -54
  66. package/mcp/schemas/c64_system.schema.json +79 -212
  67. package/mcp/schemas/c64_vice.schema.json +24 -55
  68. package/mcp/server.json +1 -1
  69. package/mcp/tools.json +1935 -3443
  70. package/mcp.json +3 -3
  71. package/package.json +17 -14
  72. package/scripts/fetch-external-sources.mjs +1 -2
  73. package/scripts/run-coverage.mjs +26 -1
  74. package/scripts/run-tests.mjs +2 -2
  75. package/scripts/run-tests.ts +273 -52
  76. package/scripts/update-readme.ts +54 -2
  77. package/server.json +2 -2
@@ -1,278 +1,196 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Disk operations available via the c64_disk tool.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "List Ultimate drive slots and their mounted images.",
8
- "properties": {
9
- "op": {
10
- "const": "list_drives"
11
- }
12
- },
13
- "additionalProperties": false,
14
- "required": [
15
- "op"
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "list_drives",
8
+ "mount",
9
+ "unmount",
10
+ "file_info",
11
+ "create_image",
12
+ "find_and_run"
13
+ ],
14
+ "description": "Selects the operation."
15
+ },
16
+ "drive": {
17
+ "type": "string",
18
+ "description": "Drive identifier (for example drive8).",
19
+ "minLength": 1
20
+ },
21
+ "image": {
22
+ "type": "string",
23
+ "description": "Absolute or Ultimate filesystem path to the disk image.",
24
+ "minLength": 1
25
+ },
26
+ "type": {
27
+ "type": [
28
+ "string",
29
+ "null"
30
+ ],
31
+ "description": "Override detected image type when firmware guesses incorrectly.",
32
+ "enum": [
33
+ "d64",
34
+ "g64",
35
+ "d71",
36
+ "g71",
37
+ "d81"
16
38
  ]
17
39
  },
18
- {
19
- "type": "object",
20
- "description": "Mount a disk image with optional verification and retries.",
21
- "properties": {
22
- "drive": {
23
- "type": "string",
24
- "description": "Drive identifier (for example drive8).",
25
- "minLength": 1
26
- },
27
- "image": {
28
- "type": "string",
29
- "description": "Absolute or Ultimate filesystem path to the disk image.",
30
- "minLength": 1
31
- },
32
- "type": {
33
- "type": [
34
- "string",
35
- "null"
36
- ],
37
- "description": "Override detected image type when firmware guesses incorrectly.",
38
- "enum": [
39
- "d64",
40
- "g64",
41
- "d71",
42
- "g71",
43
- "d81"
44
- ]
45
- },
46
- "attachmentMode": {
47
- "type": [
48
- "string",
49
- "null"
50
- ],
51
- "description": "Attachment mode controlling how the firmware treats the mounted image.",
52
- "enum": [
53
- "readwrite",
54
- "readonly",
55
- "unlinked"
56
- ]
57
- },
58
- "driveMode": {
59
- "type": [
60
- "string",
61
- "null"
62
- ],
63
- "description": "Drive emulation mode to switch to during verification.",
64
- "enum": [
65
- "1541",
66
- "1571",
67
- "1581"
68
- ]
69
- },
70
- "verify": {
71
- "type": "boolean",
72
- "description": "When true, power on/reset/verify using the reliability workflow.",
73
- "default": false
74
- },
75
- "powerOnIfNeeded": {
76
- "type": "boolean",
77
- "description": "Power on the drive automatically before mounting when verify=true.",
78
- "default": true
79
- },
80
- "resetAfterMount": {
81
- "type": "boolean",
82
- "description": "Issue a drive reset after mounting when verify=true.",
83
- "default": true
84
- },
85
- "maxRetries": {
86
- "type": "integer",
87
- "description": "Maximum number of mount retries when verify=true.",
88
- "minimum": 0,
89
- "maximum": 5,
90
- "default": 2
91
- },
92
- "retryDelayMs": {
93
- "type": "integer",
94
- "description": "Delay between mount retry attempts when verify=true.",
95
- "minimum": 0,
96
- "maximum": 5000,
97
- "default": 500
98
- },
99
- "op": {
100
- "const": "mount"
101
- }
102
- },
103
- "required": [
104
- "drive",
105
- "image",
106
- "op"
40
+ "attachmentMode": {
41
+ "type": [
42
+ "string",
43
+ "null"
107
44
  ],
108
- "additionalProperties": false
45
+ "description": "Attachment mode controlling how the firmware treats the mounted image.",
46
+ "enum": [
47
+ "readwrite",
48
+ "readonly",
49
+ "unlinked"
50
+ ]
109
51
  },
110
- {
111
- "type": "object",
112
- "description": "Remove the mounted image from an Ultimate drive slot.",
113
- "properties": {
114
- "drive": {
115
- "type": "string",
116
- "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
117
- "minLength": 1
118
- },
119
- "op": {
120
- "const": "unmount"
121
- }
122
- },
123
- "required": [
124
- "drive",
125
- "op"
52
+ "driveMode": {
53
+ "type": [
54
+ "string",
55
+ "null"
126
56
  ],
127
- "additionalProperties": false
57
+ "description": "Drive emulation mode to switch to during verification.",
58
+ "enum": [
59
+ "1541",
60
+ "1571",
61
+ "1581"
62
+ ]
128
63
  },
129
- {
130
- "type": "object",
131
- "description": "Inspect metadata for a file on the Ultimate filesystem.",
132
- "properties": {
133
- "path": {
134
- "type": "string",
135
- "description": "Absolute or Ultimate filesystem path to the disk image to mount or manage.",
136
- "minLength": 1
137
- },
138
- "op": {
139
- "const": "file_info"
140
- }
141
- },
142
- "required": [
143
- "path",
144
- "op"
64
+ "verify": {
65
+ "type": "boolean",
66
+ "description": "When true, power on/reset/verify using the reliability workflow.",
67
+ "default": false
68
+ },
69
+ "powerOnIfNeeded": {
70
+ "type": "boolean",
71
+ "description": "Power on the drive automatically before mounting when verify=true.",
72
+ "default": true
73
+ },
74
+ "resetAfterMount": {
75
+ "type": "boolean",
76
+ "description": "Issue a drive reset after mounting when verify=true.",
77
+ "default": true
78
+ },
79
+ "maxRetries": {
80
+ "type": "integer",
81
+ "description": "Maximum number of mount retries when verify=true.",
82
+ "minimum": 0,
83
+ "maximum": 5,
84
+ "default": 2
85
+ },
86
+ "retryDelayMs": {
87
+ "type": "integer",
88
+ "description": "Delay between mount retry attempts when verify=true.",
89
+ "minimum": 0,
90
+ "maximum": 5000,
91
+ "default": 500
92
+ },
93
+ "path": {
94
+ "type": "string",
95
+ "description": "Absolute or Ultimate filesystem path to the disk image to mount or manage.",
96
+ "minLength": 1
97
+ },
98
+ "format": {
99
+ "type": "string",
100
+ "description": "Disk image format to create.",
101
+ "enum": [
102
+ "d64",
103
+ "d71",
104
+ "d81",
105
+ "dnp"
106
+ ]
107
+ },
108
+ "diskname": {
109
+ "type": [
110
+ "string",
111
+ "null"
112
+ ],
113
+ "description": "Optional disk label (1-16 characters, converted to PETSCII).",
114
+ "minLength": 1,
115
+ "maxLength": 16
116
+ },
117
+ "tracks": {
118
+ "type": [
119
+ "integer",
120
+ "null"
121
+ ],
122
+ "description": "Track count (D64 supports 35 or 40; DNP requires explicit tracks).",
123
+ "minimum": 1,
124
+ "maximum": 255
125
+ },
126
+ "root": {
127
+ "type": [
128
+ "string",
129
+ "null"
130
+ ],
131
+ "description": "Root path to search",
132
+ "minLength": 1,
133
+ "default": "/"
134
+ },
135
+ "nameContains": {
136
+ "type": "string",
137
+ "description": "Substring to match",
138
+ "minLength": 1
139
+ },
140
+ "extensions": {
141
+ "type": [
142
+ "array",
143
+ "null"
144
+ ],
145
+ "items": {
146
+ "type": "string",
147
+ "description": "File extensions to include (without dot)",
148
+ "minLength": 1
149
+ }
150
+ },
151
+ "caseInsensitive": {
152
+ "type": [
153
+ "boolean",
154
+ "null"
155
+ ],
156
+ "description": "Case-insensitive name match",
157
+ "default": true
158
+ },
159
+ "sort": {
160
+ "type": [
161
+ "string",
162
+ "null"
163
+ ],
164
+ "description": "Sort order for matches",
165
+ "enum": [
166
+ "discovered",
167
+ "alphabetical"
145
168
  ],
146
- "additionalProperties": false
169
+ "default": "discovered"
147
170
  },
148
- {
149
- "type": "object",
150
- "description": "Create a blank disk image of the specified format.",
151
- "properties": {
152
- "format": {
153
- "type": "string",
154
- "description": "Disk image format to create.",
155
- "enum": [
156
- "d64",
157
- "d71",
158
- "d81",
159
- "dnp"
160
- ]
161
- },
162
- "path": {
163
- "type": "string",
164
- "description": "Destination path on the Ultimate filesystem.",
165
- "minLength": 1
166
- },
167
- "diskname": {
168
- "type": [
169
- "string",
170
- "null"
171
- ],
172
- "description": "Optional disk label (1-16 characters, converted to PETSCII).",
173
- "minLength": 1,
174
- "maxLength": 16
175
- },
176
- "tracks": {
177
- "type": [
178
- "integer",
179
- "null"
180
- ],
181
- "description": "Track count (D64 supports 35 or 40; DNP requires explicit tracks).",
182
- "minimum": 1,
183
- "maximum": 255
184
- },
185
- "op": {
186
- "const": "create_image"
187
- }
188
- },
189
- "required": [
190
- "format",
191
- "path",
192
- "op"
171
+ "waitMs": {
172
+ "type": [
173
+ "integer",
174
+ "null"
193
175
  ],
194
- "additionalProperties": false
176
+ "description": "Delay after firmware run before returning",
177
+ "minimum": 0,
178
+ "default": 0
195
179
  },
196
- {
197
- "type": "object",
198
- "description": "Search for a PRG/CRT by name substring and run the first match.",
199
- "properties": {
200
- "root": {
201
- "type": [
202
- "string",
203
- "null"
204
- ],
205
- "description": "Root path to search",
206
- "minLength": 1,
207
- "default": "/"
208
- },
209
- "nameContains": {
210
- "type": "string",
211
- "description": "Substring to match",
212
- "minLength": 1
213
- },
214
- "extensions": {
215
- "type": [
216
- "array",
217
- "null"
218
- ],
219
- "items": {
220
- "type": "string",
221
- "description": "File extensions to include (without dot)",
222
- "minLength": 1
223
- }
224
- },
225
- "caseInsensitive": {
226
- "type": [
227
- "boolean",
228
- "null"
229
- ],
230
- "description": "Case-insensitive name match",
231
- "default": true
232
- },
233
- "sort": {
234
- "type": [
235
- "string",
236
- "null"
237
- ],
238
- "description": "Sort order for matches",
239
- "enum": [
240
- "discovered",
241
- "alphabetical"
242
- ],
243
- "default": "discovered"
244
- },
245
- "waitMs": {
246
- "type": [
247
- "integer",
248
- "null"
249
- ],
250
- "description": "Delay after firmware run before returning",
251
- "minimum": 0,
252
- "default": 0
253
- },
254
- "captureCandidates": {
255
- "type": [
256
- "integer",
257
- "null"
258
- ],
259
- "description": "Include up to this many candidates in result",
260
- "minimum": 1,
261
- "maximum": 100,
262
- "default": 10
263
- },
264
- "op": {
265
- "const": "find_and_run"
266
- }
267
- },
268
- "required": [
269
- "nameContains",
270
- "op"
180
+ "captureCandidates": {
181
+ "type": [
182
+ "integer",
183
+ "null"
271
184
  ],
272
- "additionalProperties": false
185
+ "description": "Include up to this many candidates in result",
186
+ "minimum": 1,
187
+ "maximum": 100,
188
+ "default": 10
273
189
  }
190
+ },
191
+ "required": [
192
+ "op"
274
193
  ],
275
- "discriminator": {
276
- "propertyName": "op"
277
- }
194
+ "description": "Disk operations available via the c64_disk tool.\n\nOperations:\n- list_drives: List Ultimate drive slots and their mounted images.\n- mount: Mount a disk image with optional verification and retries.\n- unmount: Remove the mounted image from an Ultimate drive slot.\n- file_info: Inspect metadata for a file on the Ultimate filesystem.\n- create_image: Create a blank disk image of the specified format.\n- find_and_run: Search for a PRG/CRT by name substring and run the first match.",
195
+ "additionalProperties": false
278
196
  }
@@ -1,120 +1,40 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Drive operations available via the c64_drive tool.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "Issue an IEC reset for the selected drive slot.",
8
- "properties": {
9
- "drive": {
10
- "type": "string",
11
- "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
12
- "minLength": 1
13
- },
14
- "op": {
15
- "const": "reset"
16
- }
17
- },
18
- "required": [
19
- "drive",
20
- "op"
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "reset",
8
+ "power_on",
9
+ "power_off",
10
+ "load_rom",
11
+ "set_mode"
21
12
  ],
22
- "additionalProperties": false
13
+ "description": "Selects the operation."
23
14
  },
24
- {
25
- "type": "object",
26
- "description": "Power on a specific Ultimate drive slot.",
27
- "properties": {
28
- "drive": {
29
- "type": "string",
30
- "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
31
- "minLength": 1
32
- },
33
- "op": {
34
- "const": "power_on"
35
- }
36
- },
37
- "required": [
38
- "drive",
39
- "op"
40
- ],
41
- "additionalProperties": false
15
+ "drive": {
16
+ "type": "string",
17
+ "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
18
+ "minLength": 1
42
19
  },
43
- {
44
- "type": "object",
45
- "description": "Power off a specific Ultimate drive slot.",
46
- "properties": {
47
- "drive": {
48
- "type": "string",
49
- "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
50
- "minLength": 1
51
- },
52
- "op": {
53
- "const": "power_off"
54
- }
55
- },
56
- "required": [
57
- "drive",
58
- "op"
59
- ],
60
- "additionalProperties": false
20
+ "path": {
21
+ "type": "string",
22
+ "description": "Absolute or Ultimate filesystem path to the disk image to mount or manage.",
23
+ "minLength": 1
61
24
  },
62
- {
63
- "type": "object",
64
- "description": "Temporarily load a custom ROM into an Ultimate drive slot.",
65
- "properties": {
66
- "drive": {
67
- "type": "string",
68
- "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
69
- "minLength": 1
70
- },
71
- "path": {
72
- "type": "string",
73
- "description": "Absolute or Ultimate filesystem path to the disk image to mount or manage.",
74
- "minLength": 1
75
- },
76
- "op": {
77
- "const": "load_rom"
78
- }
79
- },
80
- "required": [
81
- "drive",
82
- "path",
83
- "op"
84
- ],
85
- "additionalProperties": false
86
- },
87
- {
88
- "type": "object",
89
- "description": "Set the emulation mode for a drive slot (1541/1571/1581).",
90
- "properties": {
91
- "drive": {
92
- "type": "string",
93
- "description": "Drive identifier such as drive8, drive9, or unit name defined in the Ultimate UI.",
94
- "minLength": 1
95
- },
96
- "mode": {
97
- "type": "string",
98
- "description": "Drive hardware profile to emulate.",
99
- "enum": [
100
- "1541",
101
- "1571",
102
- "1581"
103
- ]
104
- },
105
- "op": {
106
- "const": "set_mode"
107
- }
108
- },
109
- "required": [
110
- "drive",
111
- "mode",
112
- "op"
113
- ],
114
- "additionalProperties": false
25
+ "mode": {
26
+ "type": "string",
27
+ "description": "Drive hardware profile to emulate.",
28
+ "enum": [
29
+ "1541",
30
+ "1571",
31
+ "1581"
32
+ ]
115
33
  }
34
+ },
35
+ "required": [
36
+ "op"
116
37
  ],
117
- "discriminator": {
118
- "propertyName": "op"
119
- }
38
+ "description": "Drive operations available via the c64_drive tool.\n\nOperations:\n- reset: Issue an IEC reset for the selected drive slot.\n- power_on: Power on a specific Ultimate drive slot.\n- power_off: Power off a specific Ultimate drive slot.\n- load_rom: Temporarily load a custom ROM into an Ultimate drive slot.\n- set_mode: Set the emulation mode for a drive slot (1541/1571/1581).",
39
+ "additionalProperties": false
120
40
  }