c64bridge 0.8.1 → 0.9.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 (92) hide show
  1. package/.github/prompts/steer.prompt.md +55 -0
  2. package/AGENTS.md +9 -7
  3. package/README.md +192 -154
  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 +938 -0
  12. package/dist/.tsbuildinfo +1 -1
  13. package/dist/c64Client.js +76 -2
  14. package/dist/device.js +129 -13
  15. package/dist/mcp-server.js +1 -1
  16. package/dist/prompts/registry.js +27 -25
  17. package/dist/rag/indexer.js +18 -8
  18. package/dist/rag/knowledgeIndex.js +112 -79
  19. package/dist/rag/resourceUris.js +93 -0
  20. package/dist/sidwaveCompiler.js +1 -1
  21. package/dist/{assemblyConverter.js → tools/assember.js} +10 -1
  22. package/dist/tools/audio.js +11 -11
  23. package/dist/{basicConverter.js → tools/basicTokenizer.js} +1 -1
  24. package/dist/tools/debug.js +159 -6
  25. package/dist/tools/developer.js +13 -13
  26. package/dist/tools/disassembler.js +478 -0
  27. package/dist/tools/graphics.js +10 -10
  28. package/dist/tools/input.js +338 -0
  29. package/dist/tools/machineControl.js +5 -5
  30. package/dist/tools/memory.js +336 -12
  31. package/dist/tools/meta/index.js +1 -1
  32. package/dist/tools/printer.js +11 -12
  33. package/dist/tools/programRunners.js +61 -22
  34. package/dist/tools/rag.js +9 -9
  35. package/dist/tools/registry/batch.js +167 -0
  36. package/dist/tools/registry/config.js +1 -1
  37. package/dist/tools/registry/disk.js +1 -1
  38. package/dist/tools/registry/drive.js +1 -1
  39. package/dist/tools/registry/extract.js +1 -1
  40. package/dist/tools/registry/graphics.js +102 -2
  41. package/dist/tools/registry/index.js +4 -0
  42. package/dist/tools/registry/input.js +2 -0
  43. package/dist/tools/registry/memory.js +62 -2
  44. package/dist/tools/registry/platform.js +1 -1
  45. package/dist/tools/registry/printer.js +1 -1
  46. package/dist/tools/registry/program.js +1 -1
  47. package/dist/tools/registry/rag.js +1 -1
  48. package/dist/tools/registry/sound.js +1 -1
  49. package/dist/tools/registry/stream.js +1 -1
  50. package/dist/tools/registry/system.js +1 -1
  51. package/dist/tools/schema.js +4 -5
  52. package/dist/tools/storage.js +15 -15
  53. package/dist/tools/streaming.js +3 -3
  54. package/dist/tools/symbolRegistry.js +49 -0
  55. package/dist/tools/types.js +56 -4
  56. package/dist/tools/vice.js +2 -5
  57. package/dist/vice/process.js +120 -2
  58. package/dist/vice/readiness.js +35 -0
  59. package/dist/vice/smokeOptions.js +44 -0
  60. package/dist/vice/viceClient.js +5 -1
  61. package/dist/viceRunner.js +2 -0
  62. package/doc/plans/prompts/README.md +7 -7
  63. package/mcp/prompts.json +42 -59
  64. package/mcp/protocol-examples.json +2 -2
  65. package/mcp/resources.json +179 -166
  66. package/mcp/schemas/c64_batch.schema.json +53 -0
  67. package/mcp/schemas/c64_config.schema.json +525 -283
  68. package/mcp/schemas/c64_debug.schema.json +763 -304
  69. package/mcp/schemas/c64_disk.schema.json +499 -243
  70. package/mcp/schemas/c64_drive.schema.json +165 -90
  71. package/mcp/schemas/c64_extract.schema.json +533 -274
  72. package/mcp/schemas/c64_graphics.schema.json +607 -295
  73. package/mcp/schemas/c64_input.schema.json +136 -0
  74. package/mcp/schemas/c64_memory.schema.json +637 -128
  75. package/mcp/schemas/c64_printer.schema.json +393 -196
  76. package/mcp/schemas/c64_program.schema.json +699 -340
  77. package/mcp/schemas/c64_rag.schema.json +100 -54
  78. package/mcp/schemas/c64_select_backend.schema.json +49 -23
  79. package/mcp/schemas/c64_sound.schema.json +1092 -577
  80. package/mcp/schemas/c64_stream.schema.json +89 -47
  81. package/mcp/schemas/c64_system.schema.json +351 -185
  82. package/mcp/schemas/c64_vice.schema.json +85 -47
  83. package/mcp/server.json +1 -1
  84. package/mcp/tools.json +7299 -3346
  85. package/mcp.json +3 -3
  86. package/package.json +17 -14
  87. package/scripts/fetch-external-sources.mjs +1 -2
  88. package/scripts/run-coverage.mjs +33 -1
  89. package/scripts/run-tests.mjs +2 -2
  90. package/scripts/run-tests.ts +275 -52
  91. package/scripts/update-readme.ts +132 -3
  92. package/server.json +2 -2
@@ -1,380 +1,839 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Available debugger operations.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "List all active VICE checkpoints (breakpoints).",
8
- "properties": {
9
- "op": {
10
- "const": "list_checkpoints"
11
- }
12
- },
13
- "required": [
14
- "op"
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "list_checkpoints",
8
+ "get_checkpoint",
9
+ "create_checkpoint",
10
+ "delete_checkpoint",
11
+ "toggle_checkpoint",
12
+ "set_condition",
13
+ "list_registers",
14
+ "get_registers",
15
+ "set_registers",
16
+ "step",
17
+ "step_return",
18
+ "get_monitor_state",
19
+ "wait_for_state",
20
+ "nuclear_reset",
21
+ "continue_execution"
15
22
  ],
16
- "additionalProperties": false
23
+ "description": "Selects the operation."
17
24
  },
18
- {
19
- "type": "object",
20
- "description": "Fetch a single checkpoint by id.",
21
- "properties": {
22
- "op": {
23
- "const": "get_checkpoint"
24
- },
25
- "id": {
26
- "type": "integer",
27
- "description": "Debugger checkpoint identifier.",
28
- "minimum": 1
29
- }
30
- },
31
- "required": [
32
- "op",
33
- "id"
25
+ "id": {
26
+ "type": "integer",
27
+ "description": "Debugger checkpoint identifier.",
28
+ "minimum": 1
29
+ },
30
+ "address": {
31
+ "type": "string",
32
+ "description": "Start address (e.g. $0801).",
33
+ "minLength": 1
34
+ },
35
+ "endAddress": {
36
+ "type": [
37
+ "string",
38
+ "null"
34
39
  ],
35
- "additionalProperties": false
40
+ "description": "Optional end address for range.",
41
+ "minLength": 1
36
42
  },
37
- {
38
- "type": "object",
39
- "description": "Create a new checkpoint (breakpoint) in VICE.",
43
+ "stopOnHit": {
44
+ "type": [
45
+ "boolean",
46
+ "null"
47
+ ],
48
+ "description": "Pause execution when hit (default true).",
49
+ "default": true
50
+ },
51
+ "enabled": {
52
+ "type": [
53
+ "boolean",
54
+ "null"
55
+ ],
56
+ "description": "Whether the checkpoint is enabled (default true).",
57
+ "default": true
58
+ },
59
+ "temporary": {
60
+ "type": [
61
+ "boolean",
62
+ "null"
63
+ ],
64
+ "description": "Automatically remove after first hit.",
65
+ "default": false
66
+ },
67
+ "label": {
68
+ "type": [
69
+ "string",
70
+ "null"
71
+ ],
72
+ "description": "Optional human-readable label stored in-process.",
73
+ "maxLength": 64
74
+ },
75
+ "operations": {
76
+ "type": [
77
+ "object",
78
+ "null"
79
+ ],
80
+ "description": "Checkpoint operation filters.",
40
81
  "properties": {
41
- "op": {
42
- "const": "create_checkpoint"
43
- },
44
- "address": {
45
- "type": "string",
46
- "description": "Start address (e.g. $0801).",
47
- "minLength": 1
48
- },
49
- "endAddress": {
50
- "type": [
51
- "string",
52
- "null"
53
- ],
54
- "description": "Optional end address for range.",
55
- "minLength": 1
56
- },
57
- "stopOnHit": {
82
+ "execute": {
58
83
  "type": [
59
84
  "boolean",
60
85
  "null"
61
86
  ],
62
- "description": "Pause execution when hit (default true).",
87
+ "description": "Trigger on execute (default true).",
63
88
  "default": true
64
89
  },
65
- "enabled": {
90
+ "load": {
66
91
  "type": [
67
92
  "boolean",
68
93
  "null"
69
94
  ],
70
- "description": "Whether the checkpoint is enabled (default true).",
71
- "default": true
95
+ "description": "Trigger on memory load.",
96
+ "default": false
72
97
  },
73
- "temporary": {
98
+ "store": {
74
99
  "type": [
75
100
  "boolean",
76
101
  "null"
77
102
  ],
78
- "description": "Automatically remove after first hit.",
103
+ "description": "Trigger on memory store.",
79
104
  "default": false
80
- },
81
- "operations": {
82
- "type": [
83
- "object",
84
- "null"
85
- ],
86
- "description": "Checkpoint operation filters.",
87
- "properties": {
88
- "execute": {
89
- "type": [
90
- "boolean",
91
- "null"
92
- ],
93
- "description": "Trigger on execute (default true).",
94
- "default": true
95
- },
96
- "load": {
97
- "type": [
98
- "boolean",
99
- "null"
100
- ],
101
- "description": "Trigger on memory load.",
102
- "default": false
103
- },
104
- "store": {
105
- "type": [
106
- "boolean",
107
- "null"
108
- ],
109
- "description": "Trigger on memory store.",
110
- "default": false
111
- }
112
- },
113
- "additionalProperties": false
114
- },
115
- "memspace": {
116
- "type": [
117
- "integer",
118
- "null"
119
- ],
120
- "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
121
- "minimum": 0,
122
- "maximum": 4
123
105
  }
124
106
  },
125
- "required": [
126
- "op",
127
- "address"
128
- ],
129
107
  "additionalProperties": false
130
108
  },
131
- {
132
- "type": "object",
133
- "description": "Remove a checkpoint by id.",
134
- "properties": {
135
- "op": {
136
- "const": "delete_checkpoint"
137
- },
138
- "id": {
139
- "type": "integer",
140
- "description": "Debugger checkpoint identifier.",
141
- "minimum": 1
142
- }
143
- },
144
- "required": [
145
- "op",
146
- "id"
109
+ "memspace": {
110
+ "type": [
111
+ "integer",
112
+ "null"
147
113
  ],
148
- "additionalProperties": false
114
+ "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
115
+ "minimum": 0,
116
+ "maximum": 4
149
117
  },
150
- {
151
- "type": "object",
152
- "description": "Enable or disable a checkpoint by id.",
153
- "properties": {
154
- "op": {
155
- "const": "toggle_checkpoint"
118
+ "expression": {
119
+ "type": "string",
120
+ "description": "VICE monitor conditional expression.",
121
+ "minLength": 1
122
+ },
123
+ "registers": {
124
+ "type": [
125
+ "array",
126
+ "null"
127
+ ],
128
+ "description": "Registers to include.",
129
+ "items": {
130
+ "type": "object",
131
+ "description": "Selects a register by id or name.",
132
+ "properties": {
133
+ "name": {
134
+ "type": [
135
+ "string",
136
+ "null"
137
+ ],
138
+ "description": "Register name (case-insensitive)."
139
+ },
140
+ "id": {
141
+ "type": [
142
+ "integer",
143
+ "null"
144
+ ],
145
+ "description": "Register id.",
146
+ "minimum": 0
147
+ }
156
148
  },
157
- "id": {
158
- "type": "integer",
159
- "description": "Debugger checkpoint identifier.",
160
- "minimum": 1
149
+ "additionalProperties": false
150
+ }
151
+ },
152
+ "writes": {
153
+ "type": "array",
154
+ "description": "Register writes to apply.",
155
+ "items": {
156
+ "type": "object",
157
+ "description": "Register write descriptor.",
158
+ "properties": {
159
+ "name": {
160
+ "type": [
161
+ "string",
162
+ "null"
163
+ ],
164
+ "description": "Register name (case-insensitive)."
165
+ },
166
+ "id": {
167
+ "type": [
168
+ "integer",
169
+ "null"
170
+ ],
171
+ "description": "Register id.",
172
+ "minimum": 0
173
+ },
174
+ "value": {
175
+ "type": "integer",
176
+ "description": "Value to write.",
177
+ "minimum": 0
178
+ }
161
179
  },
162
- "enabled": {
163
- "type": "boolean",
164
- "description": "Set to true to enable, false to disable."
165
- }
180
+ "required": [
181
+ "value"
182
+ ],
183
+ "additionalProperties": false
166
184
  },
167
- "required": [
168
- "op",
169
- "id",
170
- "enabled"
185
+ "minItems": 1
186
+ },
187
+ "count": {
188
+ "type": [
189
+ "integer",
190
+ "null"
171
191
  ],
172
- "additionalProperties": false
192
+ "description": "Number of instructions to step.",
193
+ "minimum": 1,
194
+ "default": 1
173
195
  },
174
- {
175
- "type": "object",
176
- "description": "Attach a conditional expression to a checkpoint.",
177
- "properties": {
178
- "op": {
179
- "const": "set_condition"
180
- },
181
- "id": {
182
- "type": "integer",
183
- "description": "Debugger checkpoint identifier.",
184
- "minimum": 1
185
- },
186
- "expression": {
187
- "type": "string",
188
- "description": "VICE monitor conditional expression.",
189
- "minLength": 1
190
- }
191
- },
192
- "required": [
193
- "op",
194
- "id",
195
- "expression"
196
+ "mode": {
197
+ "type": [
198
+ "string",
199
+ "null"
196
200
  ],
197
- "additionalProperties": false
201
+ "description": "Step mode (into or over).",
202
+ "enum": [
203
+ "into",
204
+ "over"
205
+ ]
206
+ },
207
+ "expectedPC": {
208
+ "type": [
209
+ "string",
210
+ "null"
211
+ ],
212
+ "description": "Target PC address to wait for (e.g. $0810).",
213
+ "minLength": 1
198
214
  },
215
+ "timeoutMs": {
216
+ "type": [
217
+ "integer",
218
+ "null"
219
+ ],
220
+ "description": "Maximum wait time in milliseconds.",
221
+ "minimum": 1,
222
+ "maximum": 60000,
223
+ "default": 5000
224
+ },
225
+ "pollMs": {
226
+ "type": [
227
+ "integer",
228
+ "null"
229
+ ],
230
+ "description": "Poll interval in milliseconds.",
231
+ "minimum": 10,
232
+ "maximum": 1000,
233
+ "default": 100
234
+ }
235
+ },
236
+ "required": [
237
+ "op"
238
+ ],
239
+ "description": "Available debugger operations.\n\nOperations:\n- list_checkpoints: List all active VICE checkpoints (breakpoints). Required inputs: none.\n- get_checkpoint: Fetch a single checkpoint by id. Required inputs: id.\n- create_checkpoint: Create a new checkpoint (breakpoint) in VICE. Required inputs: address. Optional inputs: endAddress, stopOnHit, enabled, temporary, label, operations, memspace.\n- delete_checkpoint: Remove a checkpoint by id. Required inputs: id.\n- toggle_checkpoint: Enable or disable a checkpoint by id. Required inputs: id, enabled.\n- set_condition: Attach a conditional expression to a checkpoint. Required inputs: id, expression.\n- list_registers: List available registers (metadata). Required inputs: none. Optional inputs: memspace.\n- get_registers: Read register values, optionally filtered by name or id. Required inputs: none. Optional inputs: memspace, registers.\n- set_registers: Write register values. Required inputs: writes. Optional inputs: memspace.\n- step: Single-step CPU execution. Required inputs: none. Optional inputs: count, mode.\n- step_return: Continue execution until the current routine returns. Required inputs: none.\n- get_monitor_state: Read CPU registers and return the current monitor state. Required inputs: none. Optional inputs: memspace.\n- wait_for_state: Poll CPU registers until PC equals expectedPC or timeout elapses. Required inputs: none. Optional inputs: expectedPC, timeoutMs, pollMs.\n- nuclear_reset: Kill and restart the VICE process (managed instances only). Required inputs: none.\n- continue_execution: Exit the Binary Monitor and resume CPU execution (BM 0xAA Exit). Required inputs: none.",
240
+ "additionalProperties": false,
241
+ "x-c64bridge-operations": [
199
242
  {
200
- "type": "object",
201
- "description": "List available registers (metadata).",
202
- "properties": {
203
- "op": {
204
- "const": "list_registers"
243
+ "op": "list_checkpoints",
244
+ "description": "List all active VICE checkpoints (breakpoints).",
245
+ "required": [],
246
+ "optional": [],
247
+ "inputSchema": {
248
+ "type": "object",
249
+ "description": "List all active VICE checkpoints (breakpoints).",
250
+ "properties": {
251
+ "op": {
252
+ "const": "list_checkpoints"
253
+ }
205
254
  },
206
- "memspace": {
207
- "type": [
208
- "integer",
209
- "null"
210
- ],
211
- "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
212
- "minimum": 0,
213
- "maximum": 4
214
- }
215
- },
255
+ "required": [
256
+ "op"
257
+ ],
258
+ "additionalProperties": false
259
+ }
260
+ },
261
+ {
262
+ "op": "get_checkpoint",
263
+ "description": "Fetch a single checkpoint by id.",
216
264
  "required": [
217
- "op"
265
+ "id"
218
266
  ],
219
- "additionalProperties": false
267
+ "optional": [],
268
+ "inputSchema": {
269
+ "type": "object",
270
+ "description": "Fetch a single checkpoint by id.",
271
+ "properties": {
272
+ "op": {
273
+ "const": "get_checkpoint"
274
+ },
275
+ "id": {
276
+ "type": "integer",
277
+ "description": "Debugger checkpoint identifier.",
278
+ "minimum": 1
279
+ }
280
+ },
281
+ "required": [
282
+ "op",
283
+ "id"
284
+ ],
285
+ "additionalProperties": false
286
+ }
220
287
  },
221
288
  {
222
- "type": "object",
223
- "description": "Read register values, optionally filtered by name or id.",
224
- "properties": {
225
- "op": {
226
- "const": "get_registers"
227
- },
228
- "memspace": {
229
- "type": [
230
- "integer",
231
- "null"
232
- ],
233
- "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
234
- "minimum": 0,
235
- "maximum": 4
236
- },
237
- "registers": {
238
- "type": [
239
- "array",
240
- "null"
241
- ],
242
- "description": "Registers to include.",
243
- "items": {
244
- "type": "object",
245
- "description": "Selects a register by id or name.",
289
+ "op": "create_checkpoint",
290
+ "description": "Create a new checkpoint (breakpoint) in VICE.",
291
+ "required": [
292
+ "address"
293
+ ],
294
+ "optional": [
295
+ "endAddress",
296
+ "stopOnHit",
297
+ "enabled",
298
+ "temporary",
299
+ "label",
300
+ "operations",
301
+ "memspace"
302
+ ],
303
+ "inputSchema": {
304
+ "type": "object",
305
+ "description": "Create a new checkpoint (breakpoint) in VICE.",
306
+ "properties": {
307
+ "op": {
308
+ "const": "create_checkpoint"
309
+ },
310
+ "address": {
311
+ "type": "string",
312
+ "description": "Start address (e.g. $0801).",
313
+ "minLength": 1
314
+ },
315
+ "endAddress": {
316
+ "type": [
317
+ "string",
318
+ "null"
319
+ ],
320
+ "description": "Optional end address for range.",
321
+ "minLength": 1
322
+ },
323
+ "stopOnHit": {
324
+ "type": [
325
+ "boolean",
326
+ "null"
327
+ ],
328
+ "description": "Pause execution when hit (default true).",
329
+ "default": true
330
+ },
331
+ "enabled": {
332
+ "type": [
333
+ "boolean",
334
+ "null"
335
+ ],
336
+ "description": "Whether the checkpoint is enabled (default true).",
337
+ "default": true
338
+ },
339
+ "temporary": {
340
+ "type": [
341
+ "boolean",
342
+ "null"
343
+ ],
344
+ "description": "Automatically remove after first hit.",
345
+ "default": false
346
+ },
347
+ "label": {
348
+ "type": [
349
+ "string",
350
+ "null"
351
+ ],
352
+ "description": "Optional human-readable label stored in-process.",
353
+ "maxLength": 64
354
+ },
355
+ "operations": {
356
+ "type": [
357
+ "object",
358
+ "null"
359
+ ],
360
+ "description": "Checkpoint operation filters.",
246
361
  "properties": {
247
- "name": {
362
+ "execute": {
363
+ "type": [
364
+ "boolean",
365
+ "null"
366
+ ],
367
+ "description": "Trigger on execute (default true).",
368
+ "default": true
369
+ },
370
+ "load": {
248
371
  "type": [
249
- "string",
372
+ "boolean",
250
373
  "null"
251
374
  ],
252
- "description": "Register name (case-insensitive)."
375
+ "description": "Trigger on memory load.",
376
+ "default": false
253
377
  },
254
- "id": {
378
+ "store": {
255
379
  "type": [
256
- "integer",
380
+ "boolean",
257
381
  "null"
258
382
  ],
259
- "description": "Register id.",
260
- "minimum": 0
383
+ "description": "Trigger on memory store.",
384
+ "default": false
261
385
  }
262
386
  },
263
387
  "additionalProperties": false
388
+ },
389
+ "memspace": {
390
+ "type": [
391
+ "integer",
392
+ "null"
393
+ ],
394
+ "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
395
+ "minimum": 0,
396
+ "maximum": 4
264
397
  }
265
- }
266
- },
398
+ },
399
+ "required": [
400
+ "op",
401
+ "address"
402
+ ],
403
+ "additionalProperties": false
404
+ }
405
+ },
406
+ {
407
+ "op": "delete_checkpoint",
408
+ "description": "Remove a checkpoint by id.",
267
409
  "required": [
268
- "op"
410
+ "id"
269
411
  ],
270
- "additionalProperties": false
412
+ "optional": [],
413
+ "inputSchema": {
414
+ "type": "object",
415
+ "description": "Remove a checkpoint by id.",
416
+ "properties": {
417
+ "op": {
418
+ "const": "delete_checkpoint"
419
+ },
420
+ "id": {
421
+ "type": "integer",
422
+ "description": "Debugger checkpoint identifier.",
423
+ "minimum": 1
424
+ }
425
+ },
426
+ "required": [
427
+ "op",
428
+ "id"
429
+ ],
430
+ "additionalProperties": false
431
+ }
271
432
  },
272
433
  {
273
- "type": "object",
274
- "description": "Write register values.",
275
- "properties": {
276
- "op": {
277
- "const": "set_registers"
434
+ "op": "toggle_checkpoint",
435
+ "description": "Enable or disable a checkpoint by id.",
436
+ "required": [
437
+ "id",
438
+ "enabled"
439
+ ],
440
+ "optional": [],
441
+ "inputSchema": {
442
+ "type": "object",
443
+ "description": "Enable or disable a checkpoint by id.",
444
+ "properties": {
445
+ "op": {
446
+ "const": "toggle_checkpoint"
447
+ },
448
+ "id": {
449
+ "type": "integer",
450
+ "description": "Debugger checkpoint identifier.",
451
+ "minimum": 1
452
+ },
453
+ "enabled": {
454
+ "type": "boolean",
455
+ "description": "Set to true to enable, false to disable."
456
+ }
278
457
  },
279
- "memspace": {
280
- "type": [
281
- "integer",
282
- "null"
283
- ],
284
- "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
285
- "minimum": 0,
286
- "maximum": 4
458
+ "required": [
459
+ "op",
460
+ "id",
461
+ "enabled"
462
+ ],
463
+ "additionalProperties": false
464
+ }
465
+ },
466
+ {
467
+ "op": "set_condition",
468
+ "description": "Attach a conditional expression to a checkpoint.",
469
+ "required": [
470
+ "id",
471
+ "expression"
472
+ ],
473
+ "optional": [],
474
+ "inputSchema": {
475
+ "type": "object",
476
+ "description": "Attach a conditional expression to a checkpoint.",
477
+ "properties": {
478
+ "op": {
479
+ "const": "set_condition"
480
+ },
481
+ "id": {
482
+ "type": "integer",
483
+ "description": "Debugger checkpoint identifier.",
484
+ "minimum": 1
485
+ },
486
+ "expression": {
487
+ "type": "string",
488
+ "description": "VICE monitor conditional expression.",
489
+ "minLength": 1
490
+ }
287
491
  },
288
- "writes": {
289
- "type": "array",
290
- "description": "Register writes to apply.",
291
- "items": {
292
- "type": "object",
293
- "description": "Register write descriptor.",
294
- "properties": {
295
- "name": {
296
- "type": [
297
- "string",
298
- "null"
299
- ],
300
- "description": "Register name (case-insensitive)."
301
- },
302
- "id": {
303
- "type": [
304
- "integer",
305
- "null"
306
- ],
307
- "description": "Register id.",
308
- "minimum": 0
309
- },
310
- "value": {
311
- "type": "integer",
312
- "description": "Value to write.",
313
- "minimum": 0
314
- }
315
- },
316
- "required": [
317
- "value"
492
+ "required": [
493
+ "op",
494
+ "id",
495
+ "expression"
496
+ ],
497
+ "additionalProperties": false
498
+ }
499
+ },
500
+ {
501
+ "op": "list_registers",
502
+ "description": "List available registers (metadata).",
503
+ "required": [],
504
+ "optional": [
505
+ "memspace"
506
+ ],
507
+ "inputSchema": {
508
+ "type": "object",
509
+ "description": "List available registers (metadata).",
510
+ "properties": {
511
+ "op": {
512
+ "const": "list_registers"
513
+ },
514
+ "memspace": {
515
+ "type": [
516
+ "integer",
517
+ "null"
318
518
  ],
319
- "additionalProperties": false
519
+ "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
520
+ "minimum": 0,
521
+ "maximum": 4
522
+ }
523
+ },
524
+ "required": [
525
+ "op"
526
+ ],
527
+ "additionalProperties": false
528
+ }
529
+ },
530
+ {
531
+ "op": "get_registers",
532
+ "description": "Read register values, optionally filtered by name or id.",
533
+ "required": [],
534
+ "optional": [
535
+ "memspace",
536
+ "registers"
537
+ ],
538
+ "inputSchema": {
539
+ "type": "object",
540
+ "description": "Read register values, optionally filtered by name or id.",
541
+ "properties": {
542
+ "op": {
543
+ "const": "get_registers"
320
544
  },
321
- "minItems": 1
322
- }
323
- },
545
+ "memspace": {
546
+ "type": [
547
+ "integer",
548
+ "null"
549
+ ],
550
+ "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
551
+ "minimum": 0,
552
+ "maximum": 4
553
+ },
554
+ "registers": {
555
+ "type": [
556
+ "array",
557
+ "null"
558
+ ],
559
+ "description": "Registers to include.",
560
+ "items": {
561
+ "type": "object",
562
+ "description": "Selects a register by id or name.",
563
+ "properties": {
564
+ "name": {
565
+ "type": [
566
+ "string",
567
+ "null"
568
+ ],
569
+ "description": "Register name (case-insensitive)."
570
+ },
571
+ "id": {
572
+ "type": [
573
+ "integer",
574
+ "null"
575
+ ],
576
+ "description": "Register id.",
577
+ "minimum": 0
578
+ }
579
+ },
580
+ "additionalProperties": false
581
+ }
582
+ }
583
+ },
584
+ "required": [
585
+ "op"
586
+ ],
587
+ "additionalProperties": false
588
+ }
589
+ },
590
+ {
591
+ "op": "set_registers",
592
+ "description": "Write register values.",
324
593
  "required": [
325
- "op",
326
594
  "writes"
327
595
  ],
328
- "additionalProperties": false
596
+ "optional": [
597
+ "memspace"
598
+ ],
599
+ "inputSchema": {
600
+ "type": "object",
601
+ "description": "Write register values.",
602
+ "properties": {
603
+ "op": {
604
+ "const": "set_registers"
605
+ },
606
+ "memspace": {
607
+ "type": [
608
+ "integer",
609
+ "null"
610
+ ],
611
+ "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
612
+ "minimum": 0,
613
+ "maximum": 4
614
+ },
615
+ "writes": {
616
+ "type": "array",
617
+ "description": "Register writes to apply.",
618
+ "items": {
619
+ "type": "object",
620
+ "description": "Register write descriptor.",
621
+ "properties": {
622
+ "name": {
623
+ "type": [
624
+ "string",
625
+ "null"
626
+ ],
627
+ "description": "Register name (case-insensitive)."
628
+ },
629
+ "id": {
630
+ "type": [
631
+ "integer",
632
+ "null"
633
+ ],
634
+ "description": "Register id.",
635
+ "minimum": 0
636
+ },
637
+ "value": {
638
+ "type": "integer",
639
+ "description": "Value to write.",
640
+ "minimum": 0
641
+ }
642
+ },
643
+ "required": [
644
+ "value"
645
+ ],
646
+ "additionalProperties": false
647
+ },
648
+ "minItems": 1
649
+ }
650
+ },
651
+ "required": [
652
+ "op",
653
+ "writes"
654
+ ],
655
+ "additionalProperties": false
656
+ }
329
657
  },
330
658
  {
331
- "type": "object",
659
+ "op": "step",
332
660
  "description": "Single-step CPU execution.",
333
- "properties": {
334
- "op": {
335
- "const": "step"
661
+ "required": [],
662
+ "optional": [
663
+ "count",
664
+ "mode"
665
+ ],
666
+ "inputSchema": {
667
+ "type": "object",
668
+ "description": "Single-step CPU execution.",
669
+ "properties": {
670
+ "op": {
671
+ "const": "step"
672
+ },
673
+ "count": {
674
+ "type": [
675
+ "integer",
676
+ "null"
677
+ ],
678
+ "description": "Number of instructions to step.",
679
+ "minimum": 1,
680
+ "default": 1
681
+ },
682
+ "mode": {
683
+ "type": [
684
+ "string",
685
+ "null"
686
+ ],
687
+ "description": "Step mode (into or over).",
688
+ "enum": [
689
+ "into",
690
+ "over"
691
+ ]
692
+ }
336
693
  },
337
- "count": {
338
- "type": [
339
- "integer",
340
- "null"
341
- ],
342
- "description": "Number of instructions to step.",
343
- "minimum": 1,
344
- "default": 1
694
+ "required": [
695
+ "op"
696
+ ],
697
+ "additionalProperties": false
698
+ }
699
+ },
700
+ {
701
+ "op": "step_return",
702
+ "description": "Continue execution until the current routine returns.",
703
+ "required": [],
704
+ "optional": [],
705
+ "inputSchema": {
706
+ "type": "object",
707
+ "description": "Continue execution until the current routine returns.",
708
+ "properties": {
709
+ "op": {
710
+ "const": "step_return"
711
+ }
345
712
  },
346
- "mode": {
347
- "type": [
348
- "string",
349
- "null"
350
- ],
351
- "description": "Step mode (into or over).",
352
- "enum": [
353
- "into",
354
- "over"
355
- ]
356
- }
357
- },
358
- "required": [
359
- "op"
713
+ "required": [
714
+ "op"
715
+ ],
716
+ "additionalProperties": false
717
+ }
718
+ },
719
+ {
720
+ "op": "get_monitor_state",
721
+ "description": "Read CPU registers and return the current monitor state.",
722
+ "required": [],
723
+ "optional": [
724
+ "memspace"
360
725
  ],
361
- "additionalProperties": false
726
+ "inputSchema": {
727
+ "type": "object",
728
+ "description": "Read CPU registers and return the current monitor state.",
729
+ "properties": {
730
+ "op": {
731
+ "const": "get_monitor_state"
732
+ },
733
+ "memspace": {
734
+ "type": [
735
+ "integer",
736
+ "null"
737
+ ],
738
+ "description": "VICE memory space (0=CPU, 1=Drive8, etc.).",
739
+ "minimum": 0,
740
+ "maximum": 4
741
+ }
742
+ },
743
+ "required": [
744
+ "op"
745
+ ],
746
+ "additionalProperties": false
747
+ }
362
748
  },
363
749
  {
364
- "type": "object",
365
- "description": "Continue execution until the current routine returns.",
366
- "properties": {
367
- "op": {
368
- "const": "step_return"
369
- }
370
- },
371
- "required": [
372
- "op"
750
+ "op": "wait_for_state",
751
+ "description": "Poll CPU registers until PC equals expectedPC or timeout elapses.",
752
+ "required": [],
753
+ "optional": [
754
+ "expectedPC",
755
+ "timeoutMs",
756
+ "pollMs"
373
757
  ],
374
- "additionalProperties": false
758
+ "inputSchema": {
759
+ "type": "object",
760
+ "description": "Poll CPU registers until PC equals expectedPC or timeout elapses.",
761
+ "properties": {
762
+ "op": {
763
+ "const": "wait_for_state"
764
+ },
765
+ "expectedPC": {
766
+ "type": [
767
+ "string",
768
+ "null"
769
+ ],
770
+ "description": "Target PC address to wait for (e.g. $0810).",
771
+ "minLength": 1
772
+ },
773
+ "timeoutMs": {
774
+ "type": [
775
+ "integer",
776
+ "null"
777
+ ],
778
+ "description": "Maximum wait time in milliseconds.",
779
+ "minimum": 1,
780
+ "maximum": 60000,
781
+ "default": 5000
782
+ },
783
+ "pollMs": {
784
+ "type": [
785
+ "integer",
786
+ "null"
787
+ ],
788
+ "description": "Poll interval in milliseconds.",
789
+ "minimum": 10,
790
+ "maximum": 1000,
791
+ "default": 100
792
+ }
793
+ },
794
+ "required": [
795
+ "op"
796
+ ],
797
+ "additionalProperties": false
798
+ }
799
+ },
800
+ {
801
+ "op": "nuclear_reset",
802
+ "description": "Kill and restart the VICE process (managed instances only).",
803
+ "required": [],
804
+ "optional": [],
805
+ "inputSchema": {
806
+ "type": "object",
807
+ "description": "Kill and restart the VICE process (managed instances only).",
808
+ "properties": {
809
+ "op": {
810
+ "const": "nuclear_reset"
811
+ }
812
+ },
813
+ "required": [
814
+ "op"
815
+ ],
816
+ "additionalProperties": false
817
+ }
818
+ },
819
+ {
820
+ "op": "continue_execution",
821
+ "description": "Exit the Binary Monitor and resume CPU execution (BM 0xAA Exit).",
822
+ "required": [],
823
+ "optional": [],
824
+ "inputSchema": {
825
+ "type": "object",
826
+ "description": "Exit the Binary Monitor and resume CPU execution (BM 0xAA Exit).",
827
+ "properties": {
828
+ "op": {
829
+ "const": "continue_execution"
830
+ }
831
+ },
832
+ "required": [
833
+ "op"
834
+ ],
835
+ "additionalProperties": false
836
+ }
375
837
  }
376
- ],
377
- "discriminator": {
378
- "propertyName": "op"
379
- }
838
+ ]
380
839
  }