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.
- package/.github/prompts/README.md +14 -4
- package/.github/prompts/assembly-routine-session.prompt.md +9 -9
- package/.github/prompts/basic-program-session.prompt.md +11 -9
- package/.github/prompts/drive-management-session.prompt.md +9 -9
- package/.github/prompts/hello-world-session.prompt.md +17 -0
- package/.github/prompts/petscii-art-session.prompt.md +9 -9
- package/.github/prompts/play-classic-game.prompt.md +9 -9
- package/.github/prompts/pr-converge.prompt.md +13 -0
- package/.github/prompts/sid-music-session.prompt.md +9 -9
- package/AGENTS.md +59 -60
- package/README.md +550 -191
- package/data/assembly/assembly-spec.md +290 -1
- package/data/context/bootstrap.md +26 -2
- package/data/context/fast-paths.md +44 -0
- package/data/graphics/petscii-style-guide.md +6 -2
- package/data/graphics/sprite-charset-best-practices.md +5 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/c64Client.js +990 -26
- package/dist/config.js +5 -1
- package/dist/device.js +680 -57
- package/dist/diagnostics.js +371 -0
- package/dist/mcp/metadata.js +39 -0
- package/dist/mcp-server.js +170 -20
- package/dist/platform.js +10 -2
- package/dist/prompts/registry.js +166 -309
- package/dist/rag/init.js +37 -1
- package/dist/rag/knowledgeIndex.js +18 -6
- package/dist/rag/rateLimiter.js +2 -2
- package/dist/streamCapture.js +135 -0
- package/dist/tools/audio.js +3 -1
- package/dist/tools/debug.js +470 -0
- package/dist/tools/developer.js +10 -4
- package/dist/tools/graphics.js +183 -17
- package/dist/tools/machineControl.js +11 -5
- package/dist/tools/memory.js +19 -10
- package/dist/tools/meta/audio.js +240 -1
- package/dist/tools/meta/config.js +20 -28
- package/dist/tools/meta/configInventory.js +104 -0
- package/dist/tools/meta/diagnostics.js +45 -2
- package/dist/tools/meta/graphics.js +14 -6
- package/dist/tools/meta/index.js +1 -0
- package/dist/tools/meta/memory.js +20 -6
- package/dist/tools/meta/program.js +473 -0
- package/dist/tools/pollValidator.js +4 -2
- package/dist/tools/programRunners.js +8 -4
- package/dist/tools/registry/config.js +17 -0
- package/dist/tools/registry/disk.js +7 -0
- package/dist/tools/registry/drive.js +3 -0
- package/dist/tools/registry/graphics.js +111 -27
- package/dist/tools/registry/index.js +6 -0
- package/dist/tools/registry/memory.js +1 -0
- package/dist/tools/registry/platform.js +121 -0
- package/dist/tools/registry/program.js +26 -8
- package/dist/tools/registry/sound.js +96 -0
- package/dist/tools/registry/system.js +15 -2
- package/dist/tools/storage.js +1 -0
- package/dist/tools/streaming.js +1 -0
- package/dist/tools/types.js +38 -4
- package/dist/tools/vice.js +160 -0
- package/dist/vicBitmap.js +317 -0
- package/dist/vice/mockServer.js +439 -0
- package/dist/vice/process.js +310 -0
- package/dist/vice/readiness.js +18 -2
- package/dist/vice/viceClient.js +382 -22
- package/doc/developer.md +62 -24
- package/doc/img/backend-switch/hello-c64u.png +0 -0
- package/doc/img/backend-switch/hello-vice-and-c64u.png +0 -0
- package/doc/img/backend-switch/hello-vice.png +0 -0
- package/doc/img/backend-switch/metadata.json +50 -0
- package/doc/plans/vice-backend-switch/plan.md +486 -0
- package/doc/plans/vice-backend-switch-2/plan.md +48 -0
- package/doc/plans/vice-support/notes.md +1 -0
- package/doc/plans/vice-support/plan.md +5 -0
- package/doc/plans/vice-support/rollout.md +23 -17
- package/doc/reviews/vice-support-review.md +185 -0
- package/doc/troubleshooting-mcp.md +35 -6
- package/doc/vice/support-matrix.md +54 -0
- package/mcp/prompts.json +292 -0
- package/mcp/protocol-examples.json +46 -0
- package/mcp/resources.json +940 -0
- package/mcp/schemas/c64_config.schema.json +350 -0
- package/mcp/schemas/c64_debug.schema.json +380 -0
- package/mcp/schemas/c64_disk.schema.json +278 -0
- package/mcp/schemas/c64_drive.schema.json +120 -0
- package/mcp/schemas/c64_extract.schema.json +302 -0
- package/mcp/schemas/c64_graphics.schema.json +333 -0
- package/mcp/schemas/c64_memory.schema.json +155 -0
- package/mcp/schemas/c64_printer.schema.json +218 -0
- package/mcp/schemas/c64_program.schema.json +391 -0
- package/mcp/schemas/c64_rag.schema.json +67 -0
- package/mcp/schemas/c64_select_backend.schema.json +32 -0
- package/mcp/schemas/c64_sound.schema.json +644 -0
- package/mcp/schemas/c64_stream.schema.json +61 -0
- package/mcp/schemas/c64_system.schema.json +227 -0
- package/mcp/schemas/c64_vice.schema.json +63 -0
- package/mcp/server.json +15 -0
- package/mcp/tools.json +4517 -0
- package/mcp.json +83 -9
- package/package.json +8 -3
- package/scripts/capture-backend-switch-screenshots.mjs +276 -0
- package/scripts/generate-mcp-interface.ts +289 -0
- package/scripts/invoke-bun.mjs +67 -21
- package/scripts/mockC64Server.mjs +162 -6
- package/scripts/run-coverage.mjs +284 -0
- package/scripts/run-tests.mjs +95 -39
- package/scripts/run-tests.ts +378 -73
- package/scripts/update-readme.ts +147 -13
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
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"
|
|
21
|
+
],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
},
|
|
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
|
|
42
|
+
},
|
|
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
|
|
61
|
+
},
|
|
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
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"discriminator": {
|
|
118
|
+
"propertyName": "op"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"description": "Extraction operations available via the c64_extract tool.",
|
|
4
|
+
"oneOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "object",
|
|
7
|
+
"description": "Scan RAM for sprites and optionally export .spr files.",
|
|
8
|
+
"properties": {
|
|
9
|
+
"address": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Start address ($HHHH or decimal)",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"length": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"description": "Number of bytes to scan",
|
|
17
|
+
"minimum": 63,
|
|
18
|
+
"maximum": 65536
|
|
19
|
+
},
|
|
20
|
+
"stride": {
|
|
21
|
+
"type": [
|
|
22
|
+
"integer",
|
|
23
|
+
"null"
|
|
24
|
+
],
|
|
25
|
+
"description": "Stride between sprite candidates in bytes",
|
|
26
|
+
"minimum": 1,
|
|
27
|
+
"default": 64
|
|
28
|
+
},
|
|
29
|
+
"maxSprites": {
|
|
30
|
+
"type": [
|
|
31
|
+
"integer",
|
|
32
|
+
"null"
|
|
33
|
+
],
|
|
34
|
+
"description": "Maximum sprites to return",
|
|
35
|
+
"minimum": 1,
|
|
36
|
+
"maximum": 256,
|
|
37
|
+
"default": 16
|
|
38
|
+
},
|
|
39
|
+
"minNonZeroRows": {
|
|
40
|
+
"type": [
|
|
41
|
+
"integer",
|
|
42
|
+
"null"
|
|
43
|
+
],
|
|
44
|
+
"description": "Minimum non-empty rows required",
|
|
45
|
+
"minimum": 1,
|
|
46
|
+
"maximum": 21,
|
|
47
|
+
"default": 4
|
|
48
|
+
},
|
|
49
|
+
"minSetBits": {
|
|
50
|
+
"type": [
|
|
51
|
+
"integer",
|
|
52
|
+
"null"
|
|
53
|
+
],
|
|
54
|
+
"description": "Minimum number of set bits required",
|
|
55
|
+
"minimum": 1,
|
|
56
|
+
"maximum": 504,
|
|
57
|
+
"default": 12
|
|
58
|
+
},
|
|
59
|
+
"includeBase64": {
|
|
60
|
+
"type": [
|
|
61
|
+
"boolean",
|
|
62
|
+
"null"
|
|
63
|
+
],
|
|
64
|
+
"description": "Include base64 data in response",
|
|
65
|
+
"default": true
|
|
66
|
+
},
|
|
67
|
+
"outputDir": {
|
|
68
|
+
"type": [
|
|
69
|
+
"string",
|
|
70
|
+
"null"
|
|
71
|
+
],
|
|
72
|
+
"description": "Directory to write .spr files",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"pauseDuringRead": {
|
|
76
|
+
"type": [
|
|
77
|
+
"boolean",
|
|
78
|
+
"null"
|
|
79
|
+
],
|
|
80
|
+
"description": "Pause the machine during memory read",
|
|
81
|
+
"default": true
|
|
82
|
+
},
|
|
83
|
+
"op": {
|
|
84
|
+
"const": "sprites"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"address",
|
|
89
|
+
"length",
|
|
90
|
+
"op"
|
|
91
|
+
],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "Locate and extract 2KB character sets from RAM.",
|
|
97
|
+
"properties": {
|
|
98
|
+
"address": {
|
|
99
|
+
"type": [
|
|
100
|
+
"string",
|
|
101
|
+
"null"
|
|
102
|
+
],
|
|
103
|
+
"description": "Start address to scan ($HHHH or decimal). If not provided, scans common locations.",
|
|
104
|
+
"minLength": 1
|
|
105
|
+
},
|
|
106
|
+
"scanRange": {
|
|
107
|
+
"type": [
|
|
108
|
+
"string",
|
|
109
|
+
"null"
|
|
110
|
+
],
|
|
111
|
+
"description": "Range to scan if address not provided: 'common' or 'full'",
|
|
112
|
+
"enum": [
|
|
113
|
+
"common",
|
|
114
|
+
"full"
|
|
115
|
+
],
|
|
116
|
+
"default": "common"
|
|
117
|
+
},
|
|
118
|
+
"outputPath": {
|
|
119
|
+
"type": [
|
|
120
|
+
"string",
|
|
121
|
+
"null"
|
|
122
|
+
],
|
|
123
|
+
"description": "File path to write charset binary",
|
|
124
|
+
"minLength": 1
|
|
125
|
+
},
|
|
126
|
+
"pauseDuringRead": {
|
|
127
|
+
"type": [
|
|
128
|
+
"boolean",
|
|
129
|
+
"null"
|
|
130
|
+
],
|
|
131
|
+
"description": "Pause the machine during memory read",
|
|
132
|
+
"default": true
|
|
133
|
+
},
|
|
134
|
+
"minNonEmptyChars": {
|
|
135
|
+
"type": [
|
|
136
|
+
"integer",
|
|
137
|
+
"null"
|
|
138
|
+
],
|
|
139
|
+
"description": "Minimum non-empty characters required",
|
|
140
|
+
"minimum": 1,
|
|
141
|
+
"maximum": 256,
|
|
142
|
+
"default": 32
|
|
143
|
+
},
|
|
144
|
+
"minEntropy": {
|
|
145
|
+
"type": [
|
|
146
|
+
"number",
|
|
147
|
+
"null"
|
|
148
|
+
],
|
|
149
|
+
"description": "Minimum average entropy threshold",
|
|
150
|
+
"minimum": 0,
|
|
151
|
+
"maximum": 1,
|
|
152
|
+
"default": 0.3
|
|
153
|
+
},
|
|
154
|
+
"op": {
|
|
155
|
+
"const": "charset"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": [
|
|
160
|
+
"op"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "object",
|
|
165
|
+
"description": "Dump a RAM range to hex or binary files with manifest metadata.",
|
|
166
|
+
"properties": {
|
|
167
|
+
"address": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "Start address ($HHHH or decimal)",
|
|
170
|
+
"minLength": 1
|
|
171
|
+
},
|
|
172
|
+
"length": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"description": "Number of bytes to dump",
|
|
175
|
+
"minimum": 1,
|
|
176
|
+
"maximum": 65536
|
|
177
|
+
},
|
|
178
|
+
"outputPath": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "Destination file path",
|
|
181
|
+
"minLength": 1
|
|
182
|
+
},
|
|
183
|
+
"format": {
|
|
184
|
+
"type": [
|
|
185
|
+
"string",
|
|
186
|
+
"null"
|
|
187
|
+
],
|
|
188
|
+
"description": "Output format: hex|binary",
|
|
189
|
+
"enum": [
|
|
190
|
+
"hex",
|
|
191
|
+
"binary"
|
|
192
|
+
],
|
|
193
|
+
"default": "hex"
|
|
194
|
+
},
|
|
195
|
+
"chunkSize": {
|
|
196
|
+
"type": [
|
|
197
|
+
"integer",
|
|
198
|
+
"null"
|
|
199
|
+
],
|
|
200
|
+
"description": "Chunk size for reads",
|
|
201
|
+
"minimum": 1,
|
|
202
|
+
"maximum": 4096,
|
|
203
|
+
"default": 512
|
|
204
|
+
},
|
|
205
|
+
"pauseDuringRead": {
|
|
206
|
+
"type": [
|
|
207
|
+
"boolean",
|
|
208
|
+
"null"
|
|
209
|
+
],
|
|
210
|
+
"description": "Pause/resume around dump",
|
|
211
|
+
"default": true
|
|
212
|
+
},
|
|
213
|
+
"retries": {
|
|
214
|
+
"type": [
|
|
215
|
+
"integer",
|
|
216
|
+
"null"
|
|
217
|
+
],
|
|
218
|
+
"description": "Retries per chunk on failure",
|
|
219
|
+
"minimum": 0,
|
|
220
|
+
"default": 1
|
|
221
|
+
},
|
|
222
|
+
"op": {
|
|
223
|
+
"const": "memory_dump"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": [
|
|
227
|
+
"address",
|
|
228
|
+
"length",
|
|
229
|
+
"outputPath",
|
|
230
|
+
"op"
|
|
231
|
+
],
|
|
232
|
+
"additionalProperties": false
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "object",
|
|
236
|
+
"description": "Walk the filesystem and aggregate counts/bytes by extension.",
|
|
237
|
+
"properties": {
|
|
238
|
+
"root": {
|
|
239
|
+
"type": [
|
|
240
|
+
"string",
|
|
241
|
+
"null"
|
|
242
|
+
],
|
|
243
|
+
"description": "Root path to scan",
|
|
244
|
+
"minLength": 1,
|
|
245
|
+
"default": "/"
|
|
246
|
+
},
|
|
247
|
+
"extensions": {
|
|
248
|
+
"type": [
|
|
249
|
+
"array",
|
|
250
|
+
"null"
|
|
251
|
+
],
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"description": "Limit to these extensions (without dot)",
|
|
255
|
+
"minLength": 1
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"includeContainers": {
|
|
259
|
+
"type": [
|
|
260
|
+
"boolean",
|
|
261
|
+
"null"
|
|
262
|
+
],
|
|
263
|
+
"description": "Include container images (d64/d81/etc.) in extension stats",
|
|
264
|
+
"default": true
|
|
265
|
+
},
|
|
266
|
+
"maxSamplesPerExtension": {
|
|
267
|
+
"type": [
|
|
268
|
+
"integer",
|
|
269
|
+
"null"
|
|
270
|
+
],
|
|
271
|
+
"description": "Number of sample paths to keep per extension",
|
|
272
|
+
"minimum": 1,
|
|
273
|
+
"maximum": 10,
|
|
274
|
+
"default": 3
|
|
275
|
+
},
|
|
276
|
+
"op": {
|
|
277
|
+
"const": "fs_stats"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"additionalProperties": false,
|
|
281
|
+
"required": [
|
|
282
|
+
"op"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"type": "object",
|
|
287
|
+
"description": "Run firmware readiness checks and report status metrics.",
|
|
288
|
+
"properties": {
|
|
289
|
+
"op": {
|
|
290
|
+
"const": "firmware_health"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"required": [
|
|
295
|
+
"op"
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"discriminator": {
|
|
300
|
+
"propertyName": "op"
|
|
301
|
+
}
|
|
302
|
+
}
|