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,644 +1,1159 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Sound operations available via the c64_sound tool.",
4
- "oneOf": [
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "capture_samples",
8
+ "set_volume",
9
+ "reset",
10
+ "note_on",
11
+ "note_off",
12
+ "silence_all",
13
+ "play_sid_file",
14
+ "play_mod_file",
15
+ "generate",
16
+ "compile_play",
17
+ "play_preset",
18
+ "pipeline",
19
+ "analyze",
20
+ "record_analyze"
21
+ ],
22
+ "description": "Selects the operation."
23
+ },
24
+ "count": {
25
+ "type": [
26
+ "integer",
27
+ "null"
28
+ ],
29
+ "description": "Number of stereo sample pairs to capture.",
30
+ "minimum": 1,
31
+ "maximum": 65536,
32
+ "default": 256
33
+ },
34
+ "encoding": {
35
+ "type": [
36
+ "string",
37
+ "null"
38
+ ],
39
+ "description": "Encoding used for the PCM sample payload.",
40
+ "enum": [
41
+ "base64",
42
+ "hex"
43
+ ],
44
+ "default": "base64"
45
+ },
46
+ "volume": {
47
+ "type": "number",
48
+ "description": "Desired SID master volume. Values outside 0-15 are clamped.",
49
+ "minimum": 0,
50
+ "maximum": 15
51
+ },
52
+ "hard": {
53
+ "type": "boolean",
54
+ "description": "If true, perform a hard register scrub; otherwise silence voices softly.",
55
+ "default": false
56
+ },
57
+ "voice": {
58
+ "type": "integer",
59
+ "description": "SID voice to trigger (1-3).",
60
+ "minimum": 1,
61
+ "maximum": 3,
62
+ "default": 1
63
+ },
64
+ "note": {
65
+ "type": [
66
+ "string",
67
+ "null"
68
+ ],
69
+ "description": "Musical note like A4, C#5, or Bb3. Overrides frequencyHz if provided.",
70
+ "pattern": "^([A-Ga-g])([#b]?)(-?\\d+)$"
71
+ },
72
+ "frequencyHz": {
73
+ "type": [
74
+ "number",
75
+ "null"
76
+ ],
77
+ "description": "Explicit frequency in Hz. Used when note is omitted.",
78
+ "minimum": 1
79
+ },
80
+ "system": {
81
+ "type": "string",
82
+ "description": "Video system for frequency calculation.",
83
+ "enum": [
84
+ "PAL",
85
+ "NTSC"
86
+ ],
87
+ "default": "PAL"
88
+ },
89
+ "waveform": {
90
+ "type": "string",
91
+ "description": "SID waveform to enable.",
92
+ "enum": [
93
+ "pulse",
94
+ "saw",
95
+ "tri",
96
+ "noise"
97
+ ],
98
+ "default": "pulse"
99
+ },
100
+ "pulseWidth": {
101
+ "type": "integer",
102
+ "description": "Pulse width (0-4095). Used for pulse waveform.",
103
+ "minimum": 0,
104
+ "maximum": 4095,
105
+ "default": 2048
106
+ },
107
+ "attack": {
108
+ "type": "integer",
109
+ "description": "Attack rate nibble (0-15).",
110
+ "minimum": 0,
111
+ "maximum": 15,
112
+ "default": 1
113
+ },
114
+ "decay": {
115
+ "type": "integer",
116
+ "description": "Decay rate nibble (0-15).",
117
+ "minimum": 0,
118
+ "maximum": 15,
119
+ "default": 1
120
+ },
121
+ "sustain": {
122
+ "type": "integer",
123
+ "description": "Sustain level nibble (0-15).",
124
+ "minimum": 0,
125
+ "maximum": 15,
126
+ "default": 15
127
+ },
128
+ "release": {
129
+ "type": "integer",
130
+ "description": "Release rate nibble (0-15).",
131
+ "minimum": 0,
132
+ "maximum": 15,
133
+ "default": 3
134
+ },
135
+ "verify": {
136
+ "type": [
137
+ "boolean",
138
+ "null"
139
+ ],
140
+ "description": "When true, record audio after silencing to confirm the SID output is quiet.",
141
+ "default": false
142
+ },
143
+ "path": {
144
+ "type": "string",
145
+ "description": "Absolute or Ultimate filesystem path to the SID, PRG, or audio file.",
146
+ "minLength": 1
147
+ },
148
+ "songnr": {
149
+ "type": [
150
+ "integer",
151
+ "null"
152
+ ],
153
+ "description": "Song number within the SID file (0-based index).",
154
+ "minimum": 0
155
+ },
156
+ "root": {
157
+ "type": "string",
158
+ "description": "Root note for the arpeggio such as C4 or A#3.",
159
+ "pattern": "^([A-Ga-g])([#b]?)(-?\\d+)$",
160
+ "default": "C4"
161
+ },
162
+ "pattern": {
163
+ "type": "string",
164
+ "description": "Comma-separated semitone offsets (e.g. '0,4,7').",
165
+ "minLength": 1,
166
+ "default": "0,4,7"
167
+ },
168
+ "steps": {
169
+ "type": "integer",
170
+ "description": "Number of notes to schedule.",
171
+ "minimum": 1,
172
+ "maximum": 128,
173
+ "default": 16
174
+ },
175
+ "tempoMs": {
176
+ "type": "integer",
177
+ "description": "Delay in milliseconds between notes.",
178
+ "minimum": 20,
179
+ "maximum": 2000,
180
+ "default": 120
181
+ },
182
+ "preset": {
183
+ "type": [
184
+ "string",
185
+ "null"
186
+ ],
187
+ "description": "Optional musical preset to influence timing/expression.",
188
+ "enum": [
189
+ "classic",
190
+ "expression"
191
+ ],
192
+ "default": "classic"
193
+ },
194
+ "sidwave": {
195
+ "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
196
+ "type": [
197
+ "string",
198
+ "object",
199
+ "null"
200
+ ]
201
+ },
202
+ "cpg": {
203
+ "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
204
+ "type": [
205
+ "string",
206
+ "object",
207
+ "null"
208
+ ]
209
+ },
210
+ "format": {
211
+ "type": [
212
+ "string",
213
+ "null"
214
+ ],
215
+ "description": "Source format hint when providing raw text.",
216
+ "enum": [
217
+ "yaml",
218
+ "json"
219
+ ]
220
+ },
221
+ "output": {
222
+ "type": [
223
+ "string",
224
+ "null"
225
+ ],
226
+ "description": "Playback target format.",
227
+ "enum": [
228
+ "prg",
229
+ "sid"
230
+ ],
231
+ "default": "prg"
232
+ },
233
+ "dryRun": {
234
+ "type": [
235
+ "boolean",
236
+ "null"
237
+ ],
238
+ "description": "When true, skip playback and only return compilation metadata.",
239
+ "default": false
240
+ },
241
+ "platforms": {
242
+ "type": [
243
+ "array",
244
+ "null"
245
+ ],
246
+ "items": {
247
+ "type": "string",
248
+ "description": "Backends to target in sequence.",
249
+ "minLength": 1,
250
+ "enum": [
251
+ "vice",
252
+ "c64u"
253
+ ]
254
+ }
255
+ },
256
+ "analysisDurationSeconds": {
257
+ "type": [
258
+ "number",
259
+ "null"
260
+ ],
261
+ "description": "Length of the verification recording on analyzable backends.",
262
+ "minimum": 0.5,
263
+ "maximum": 20,
264
+ "default": 4
265
+ },
266
+ "waitBeforeCaptureMs": {
267
+ "type": [
268
+ "number",
269
+ "null"
270
+ ],
271
+ "description": "Delay between starting playback and beginning verification capture.",
272
+ "minimum": 0,
273
+ "maximum": 5000,
274
+ "default": 400
275
+ },
276
+ "restoreActiveBackend": {
277
+ "type": [
278
+ "boolean",
279
+ "null"
280
+ ],
281
+ "description": "Restore the backend that was active before the workflow started.",
282
+ "default": true
283
+ },
284
+ "expectedSidwave": {
285
+ "type": [
286
+ "string",
287
+ "null"
288
+ ],
289
+ "description": "Optional expected SIDWAVE used to refine analysis comparisons.",
290
+ "minLength": 1
291
+ },
292
+ "verifySilenceBefore": {
293
+ "type": [
294
+ "boolean",
295
+ "null"
296
+ ],
297
+ "description": "Run silence verification before playback to ensure a quiet baseline.",
298
+ "default": true
299
+ },
300
+ "verifySilenceAfter": {
301
+ "type": [
302
+ "boolean",
303
+ "null"
304
+ ],
305
+ "description": "Run silence verification after playback to ensure voices are released.",
306
+ "default": true
307
+ },
308
+ "silenceDurationSeconds": {
309
+ "type": [
310
+ "number",
311
+ "null"
312
+ ],
313
+ "description": "Audio capture length used for silence verification.",
314
+ "minimum": 0.5,
315
+ "maximum": 10,
316
+ "default": 1.5
317
+ },
318
+ "silenceRmsThreshold": {
319
+ "type": [
320
+ "number",
321
+ "null"
322
+ ],
323
+ "description": "RMS threshold applied to silence verification captures.",
324
+ "minimum": 0,
325
+ "maximum": 1,
326
+ "default": 0.02
327
+ },
328
+ "postSilenceWaitMs": {
329
+ "type": [
330
+ "number",
331
+ "null"
332
+ ],
333
+ "description": "Delay between main analysis capture and the post-playback silence check (milliseconds).",
334
+ "minimum": 0,
335
+ "maximum": 5000,
336
+ "default": 200
337
+ },
338
+ "silenceWaitMs": {
339
+ "type": [
340
+ "number",
341
+ "null"
342
+ ],
343
+ "description": "Delay between silencing the SID and recording during pre/post checks (milliseconds).",
344
+ "minimum": 0,
345
+ "maximum": 5000,
346
+ "default": 150
347
+ },
348
+ "request": {
349
+ "type": "string",
350
+ "description": "Natural language user request describing the verification goal.",
351
+ "minLength": 1
352
+ },
353
+ "durationSeconds": {
354
+ "type": [
355
+ "number",
356
+ "null"
357
+ ],
358
+ "description": "Override capture duration in seconds.",
359
+ "minimum": 0.5,
360
+ "maximum": 30
361
+ }
362
+ },
363
+ "required": [
364
+ "op"
365
+ ],
366
+ "description": "Sound operations available via the c64_sound tool.\n\nOperations:\n- capture_samples: Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream. Required inputs: none. Optional inputs: count, encoding.\n- set_volume: Set the SID master volume register at $D418 (0-15). Required inputs: volume.\n- reset: Soft or hard reset of SID registers to clear glitches. Required inputs: none. Optional inputs: hard.\n- note_on: Trigger a SID voice with configurable waveform, ADSR, and pitch. Required inputs: none. Optional inputs: voice, note, frequencyHz, system, waveform, pulseWidth, attack, decay, sustain, release.\n- note_off: Release a SID voice by clearing its gate bit. Required inputs: voice.\n- silence_all: Silence all SID voices with optional audio verification. Required inputs: none. Optional inputs: verify.\n- play_sid_file: Play a SID file stored on the Ultimate filesystem. Required inputs: path. Optional inputs: songnr.\n- play_mod_file: Play a MOD tracker module via the Ultimate SID player. Required inputs: path.\n- generate: Generate a lightweight SID arpeggio playback sequence. Required inputs: none. Optional inputs: root, pattern, steps, tempoMs, waveform, preset.\n- compile_play: Compile SIDWAVE or CPG source and optionally play it immediately. Required inputs: none. Optional inputs: sidwave, cpg, format, output, dryRun.\n- play_preset: Compile and play a built-in SID preset such as Für Elise by Beethoven. Required inputs: none. Optional inputs: preset, platforms, verify, analysisDurationSeconds, waitBeforeCaptureMs, restoreActiveBackend.\n- pipeline: Compile a SIDWAVE score, play it, and analyze the recording. Required inputs: none. Optional inputs: sidwave, cpg, output, waitBeforeCaptureMs, analysisDurationSeconds, expectedSidwave, verifySilenceBefore, verifySilenceAfter, silenceDurationSeconds, silenceRmsThreshold, postSilenceWaitMs, silenceWaitMs.\n- analyze: Automatically analyze SID playback when verification is requested. Required inputs: request. Optional inputs: durationSeconds, expectedSidwave.\n- record_analyze: Record audio for a fixed duration and return SID analysis metrics. Required inputs: durationSeconds. Optional inputs: expectedSidwave.",
367
+ "additionalProperties": false,
368
+ "x-c64bridge-operations": [
5
369
  {
6
- "type": "object",
370
+ "op": "capture_samples",
7
371
  "description": "Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream.",
8
- "properties": {
9
- "op": {
10
- "const": "capture_samples"
11
- },
12
- "count": {
13
- "type": [
14
- "integer",
15
- "null"
16
- ],
17
- "description": "Number of stereo sample pairs to capture.",
18
- "minimum": 1,
19
- "maximum": 65536,
20
- "default": 256
21
- },
22
- "encoding": {
23
- "type": [
24
- "string",
25
- "null"
26
- ],
27
- "description": "Encoding used for the PCM sample payload.",
28
- "enum": [
29
- "base64",
30
- "hex"
31
- ],
32
- "default": "base64"
33
- }
34
- },
35
- "required": [
36
- "op"
372
+ "required": [],
373
+ "optional": [
374
+ "count",
375
+ "encoding"
37
376
  ],
38
- "additionalProperties": false
377
+ "inputSchema": {
378
+ "type": "object",
379
+ "description": "Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream.",
380
+ "properties": {
381
+ "op": {
382
+ "const": "capture_samples"
383
+ },
384
+ "count": {
385
+ "type": [
386
+ "integer",
387
+ "null"
388
+ ],
389
+ "description": "Number of stereo sample pairs to capture.",
390
+ "minimum": 1,
391
+ "maximum": 65536,
392
+ "default": 256
393
+ },
394
+ "encoding": {
395
+ "type": [
396
+ "string",
397
+ "null"
398
+ ],
399
+ "description": "Encoding used for the PCM sample payload.",
400
+ "enum": [
401
+ "base64",
402
+ "hex"
403
+ ],
404
+ "default": "base64"
405
+ }
406
+ },
407
+ "required": [
408
+ "op"
409
+ ],
410
+ "additionalProperties": false
411
+ }
39
412
  },
40
413
  {
41
- "type": "object",
414
+ "op": "set_volume",
42
415
  "description": "Set the SID master volume register at $D418 (0-15).",
43
- "properties": {
44
- "volume": {
45
- "type": "number",
46
- "description": "Desired SID master volume. Values outside 0-15 are clamped.",
47
- "minimum": 0,
48
- "maximum": 15
49
- },
50
- "op": {
51
- "const": "set_volume"
52
- }
53
- },
54
416
  "required": [
55
- "volume",
56
- "op"
417
+ "volume"
57
418
  ],
58
- "additionalProperties": false
419
+ "optional": [],
420
+ "inputSchema": {
421
+ "type": "object",
422
+ "description": "Set the SID master volume register at $D418 (0-15).",
423
+ "properties": {
424
+ "volume": {
425
+ "type": "number",
426
+ "description": "Desired SID master volume. Values outside 0-15 are clamped.",
427
+ "minimum": 0,
428
+ "maximum": 15
429
+ },
430
+ "op": {
431
+ "const": "set_volume"
432
+ }
433
+ },
434
+ "required": [
435
+ "volume",
436
+ "op"
437
+ ],
438
+ "additionalProperties": false
439
+ }
59
440
  },
60
441
  {
61
- "type": "object",
442
+ "op": "reset",
62
443
  "description": "Soft or hard reset of SID registers to clear glitches.",
63
- "properties": {
64
- "hard": {
65
- "type": "boolean",
66
- "description": "If true, perform a hard register scrub; otherwise silence voices softly.",
67
- "default": false
444
+ "required": [],
445
+ "optional": [
446
+ "hard"
447
+ ],
448
+ "inputSchema": {
449
+ "type": "object",
450
+ "description": "Soft or hard reset of SID registers to clear glitches.",
451
+ "properties": {
452
+ "hard": {
453
+ "type": "boolean",
454
+ "description": "If true, perform a hard register scrub; otherwise silence voices softly.",
455
+ "default": false
456
+ },
457
+ "op": {
458
+ "const": "reset"
459
+ }
68
460
  },
69
- "op": {
70
- "const": "reset"
71
- }
72
- },
73
- "additionalProperties": false,
74
- "required": [
75
- "op"
76
- ]
461
+ "additionalProperties": false,
462
+ "required": [
463
+ "op"
464
+ ]
465
+ }
77
466
  },
78
467
  {
79
- "type": "object",
468
+ "op": "note_on",
80
469
  "description": "Trigger a SID voice with configurable waveform, ADSR, and pitch.",
81
- "properties": {
82
- "voice": {
83
- "type": "integer",
84
- "description": "SID voice to trigger (1-3).",
85
- "minimum": 1,
86
- "maximum": 3,
87
- "default": 1
88
- },
89
- "note": {
90
- "type": [
91
- "string",
92
- "null"
93
- ],
94
- "description": "Musical note like A4, C#5, or Bb3. Overrides frequencyHz if provided.",
95
- "pattern": "^([A-Ga-g])([#b]?)(-?\\d+)$"
96
- },
97
- "frequencyHz": {
98
- "type": [
99
- "number",
100
- "null"
101
- ],
102
- "description": "Explicit frequency in Hz. Used when note is omitted.",
103
- "minimum": 1
104
- },
105
- "system": {
106
- "type": "string",
107
- "description": "Video system for frequency calculation.",
108
- "enum": [
109
- "PAL",
110
- "NTSC"
111
- ],
112
- "default": "PAL"
113
- },
114
- "waveform": {
115
- "type": "string",
116
- "description": "SID waveform to enable.",
117
- "enum": [
118
- "pulse",
119
- "saw",
120
- "tri",
121
- "noise"
122
- ],
123
- "default": "pulse"
124
- },
125
- "pulseWidth": {
126
- "type": "integer",
127
- "description": "Pulse width (0-4095). Used for pulse waveform.",
128
- "minimum": 0,
129
- "maximum": 4095,
130
- "default": 2048
131
- },
132
- "attack": {
133
- "type": "integer",
134
- "description": "Attack rate nibble (0-15).",
135
- "minimum": 0,
136
- "maximum": 15,
137
- "default": 1
138
- },
139
- "decay": {
140
- "type": "integer",
141
- "description": "Decay rate nibble (0-15).",
142
- "minimum": 0,
143
- "maximum": 15,
144
- "default": 1
145
- },
146
- "sustain": {
147
- "type": "integer",
148
- "description": "Sustain level nibble (0-15).",
149
- "minimum": 0,
150
- "maximum": 15,
151
- "default": 15
152
- },
153
- "release": {
154
- "type": "integer",
155
- "description": "Release rate nibble (0-15).",
156
- "minimum": 0,
157
- "maximum": 15,
158
- "default": 3
470
+ "required": [],
471
+ "optional": [
472
+ "voice",
473
+ "note",
474
+ "frequencyHz",
475
+ "system",
476
+ "waveform",
477
+ "pulseWidth",
478
+ "attack",
479
+ "decay",
480
+ "sustain",
481
+ "release"
482
+ ],
483
+ "inputSchema": {
484
+ "type": "object",
485
+ "description": "Trigger a SID voice with configurable waveform, ADSR, and pitch.",
486
+ "properties": {
487
+ "voice": {
488
+ "type": "integer",
489
+ "description": "SID voice to trigger (1-3).",
490
+ "minimum": 1,
491
+ "maximum": 3,
492
+ "default": 1
493
+ },
494
+ "note": {
495
+ "type": [
496
+ "string",
497
+ "null"
498
+ ],
499
+ "description": "Musical note like A4, C#5, or Bb3. Overrides frequencyHz if provided.",
500
+ "pattern": "^([A-Ga-g])([#b]?)(-?\\d+)$"
501
+ },
502
+ "frequencyHz": {
503
+ "type": [
504
+ "number",
505
+ "null"
506
+ ],
507
+ "description": "Explicit frequency in Hz. Used when note is omitted.",
508
+ "minimum": 1
509
+ },
510
+ "system": {
511
+ "type": "string",
512
+ "description": "Video system for frequency calculation.",
513
+ "enum": [
514
+ "PAL",
515
+ "NTSC"
516
+ ],
517
+ "default": "PAL"
518
+ },
519
+ "waveform": {
520
+ "type": "string",
521
+ "description": "SID waveform to enable.",
522
+ "enum": [
523
+ "pulse",
524
+ "saw",
525
+ "tri",
526
+ "noise"
527
+ ],
528
+ "default": "pulse"
529
+ },
530
+ "pulseWidth": {
531
+ "type": "integer",
532
+ "description": "Pulse width (0-4095). Used for pulse waveform.",
533
+ "minimum": 0,
534
+ "maximum": 4095,
535
+ "default": 2048
536
+ },
537
+ "attack": {
538
+ "type": "integer",
539
+ "description": "Attack rate nibble (0-15).",
540
+ "minimum": 0,
541
+ "maximum": 15,
542
+ "default": 1
543
+ },
544
+ "decay": {
545
+ "type": "integer",
546
+ "description": "Decay rate nibble (0-15).",
547
+ "minimum": 0,
548
+ "maximum": 15,
549
+ "default": 1
550
+ },
551
+ "sustain": {
552
+ "type": "integer",
553
+ "description": "Sustain level nibble (0-15).",
554
+ "minimum": 0,
555
+ "maximum": 15,
556
+ "default": 15
557
+ },
558
+ "release": {
559
+ "type": "integer",
560
+ "description": "Release rate nibble (0-15).",
561
+ "minimum": 0,
562
+ "maximum": 15,
563
+ "default": 3
564
+ },
565
+ "op": {
566
+ "const": "note_on"
567
+ }
159
568
  },
160
- "op": {
161
- "const": "note_on"
162
- }
163
- },
164
- "additionalProperties": false,
165
- "required": [
166
- "op"
167
- ]
569
+ "additionalProperties": false,
570
+ "required": [
571
+ "op"
572
+ ]
573
+ }
168
574
  },
169
575
  {
170
- "type": "object",
576
+ "op": "note_off",
171
577
  "description": "Release a SID voice by clearing its gate bit.",
172
- "properties": {
173
- "voice": {
174
- "type": "integer",
175
- "description": "SID voice to release (1-3).",
176
- "minimum": 1,
177
- "maximum": 3
178
- },
179
- "op": {
180
- "const": "note_off"
181
- }
182
- },
183
578
  "required": [
184
- "voice",
185
- "op"
579
+ "voice"
186
580
  ],
187
- "additionalProperties": false
581
+ "optional": [],
582
+ "inputSchema": {
583
+ "type": "object",
584
+ "description": "Release a SID voice by clearing its gate bit.",
585
+ "properties": {
586
+ "voice": {
587
+ "type": "integer",
588
+ "description": "SID voice to release (1-3).",
589
+ "minimum": 1,
590
+ "maximum": 3
591
+ },
592
+ "op": {
593
+ "const": "note_off"
594
+ }
595
+ },
596
+ "required": [
597
+ "voice",
598
+ "op"
599
+ ],
600
+ "additionalProperties": false
601
+ }
188
602
  },
189
603
  {
190
- "type": "object",
604
+ "op": "silence_all",
191
605
  "description": "Silence all SID voices with optional audio verification.",
192
- "properties": {
193
- "verify": {
194
- "type": [
195
- "boolean",
196
- "null"
197
- ],
198
- "description": "When true, record audio after silencing to confirm the SID output is quiet.",
199
- "default": false
606
+ "required": [],
607
+ "optional": [
608
+ "verify"
609
+ ],
610
+ "inputSchema": {
611
+ "type": "object",
612
+ "description": "Silence all SID voices with optional audio verification.",
613
+ "properties": {
614
+ "verify": {
615
+ "type": [
616
+ "boolean",
617
+ "null"
618
+ ],
619
+ "description": "When true, record audio after silencing to confirm the SID output is quiet.",
620
+ "default": false
621
+ },
622
+ "op": {
623
+ "const": "silence_all"
624
+ }
200
625
  },
201
- "op": {
202
- "const": "silence_all"
203
- }
204
- },
205
- "additionalProperties": false,
206
- "required": [
207
- "op"
208
- ]
626
+ "additionalProperties": false,
627
+ "required": [
628
+ "op"
629
+ ]
630
+ }
209
631
  },
210
632
  {
211
- "type": "object",
633
+ "op": "play_sid_file",
212
634
  "description": "Play a SID file stored on the Ultimate filesystem.",
213
- "properties": {
214
- "path": {
215
- "type": "string",
216
- "description": "Absolute or Ultimate filesystem path to the SID, PRG, or audio file.",
217
- "minLength": 1
218
- },
219
- "songnr": {
220
- "type": [
221
- "integer",
222
- "null"
223
- ],
224
- "description": "Song number within the SID file (0-based index).",
225
- "minimum": 0
226
- },
227
- "op": {
228
- "const": "play_sid_file"
229
- }
230
- },
231
635
  "required": [
232
- "path",
233
- "op"
636
+ "path"
637
+ ],
638
+ "optional": [
639
+ "songnr"
234
640
  ],
235
- "additionalProperties": false
641
+ "inputSchema": {
642
+ "type": "object",
643
+ "description": "Play a SID file stored on the Ultimate filesystem.",
644
+ "properties": {
645
+ "path": {
646
+ "type": "string",
647
+ "description": "Absolute or Ultimate filesystem path to the SID, PRG, or audio file.",
648
+ "minLength": 1
649
+ },
650
+ "songnr": {
651
+ "type": [
652
+ "integer",
653
+ "null"
654
+ ],
655
+ "description": "Song number within the SID file (0-based index).",
656
+ "minimum": 0
657
+ },
658
+ "op": {
659
+ "const": "play_sid_file"
660
+ }
661
+ },
662
+ "required": [
663
+ "path",
664
+ "op"
665
+ ],
666
+ "additionalProperties": false
667
+ }
236
668
  },
237
669
  {
238
- "type": "object",
670
+ "op": "play_mod_file",
239
671
  "description": "Play a MOD tracker module via the Ultimate SID player.",
240
- "properties": {
241
- "path": {
242
- "type": "string",
243
- "description": "Absolute or Ultimate filesystem path to the SID, PRG, or audio file.",
244
- "minLength": 1
245
- },
246
- "op": {
247
- "const": "play_mod_file"
248
- }
249
- },
250
672
  "required": [
251
- "path",
252
- "op"
673
+ "path"
253
674
  ],
254
- "additionalProperties": false
675
+ "optional": [],
676
+ "inputSchema": {
677
+ "type": "object",
678
+ "description": "Play a MOD tracker module via the Ultimate SID player.",
679
+ "properties": {
680
+ "path": {
681
+ "type": "string",
682
+ "description": "Absolute or Ultimate filesystem path to the SID, PRG, or audio file.",
683
+ "minLength": 1
684
+ },
685
+ "op": {
686
+ "const": "play_mod_file"
687
+ }
688
+ },
689
+ "required": [
690
+ "path",
691
+ "op"
692
+ ],
693
+ "additionalProperties": false
694
+ }
255
695
  },
256
696
  {
257
- "type": "object",
697
+ "op": "generate",
258
698
  "description": "Generate a lightweight SID arpeggio playback sequence.",
259
- "properties": {
260
- "root": {
261
- "type": "string",
262
- "description": "Root note for the arpeggio such as C4 or A#3.",
263
- "pattern": "^([A-Ga-g])([#b]?)(-?\\d+)$",
264
- "default": "C4"
265
- },
266
- "pattern": {
267
- "type": "string",
268
- "description": "Comma-separated semitone offsets (e.g. '0,4,7').",
269
- "minLength": 1,
270
- "default": "0,4,7"
271
- },
272
- "steps": {
273
- "type": "integer",
274
- "description": "Number of notes to schedule.",
275
- "minimum": 1,
276
- "maximum": 128,
277
- "default": 16
278
- },
279
- "tempoMs": {
280
- "type": "integer",
281
- "description": "Delay in milliseconds between notes.",
282
- "minimum": 20,
283
- "maximum": 2000,
284
- "default": 120
285
- },
286
- "waveform": {
287
- "type": "string",
288
- "description": "Waveform for playback.",
289
- "enum": [
290
- "pulse",
291
- "saw",
292
- "tri",
293
- "noise"
294
- ],
295
- "default": "tri"
296
- },
297
- "preset": {
298
- "type": [
299
- "string",
300
- "null"
301
- ],
302
- "description": "Optional musical preset to influence timing/expression.",
303
- "enum": [
304
- "classic",
305
- "expression"
306
- ],
307
- "default": "classic"
699
+ "required": [],
700
+ "optional": [
701
+ "root",
702
+ "pattern",
703
+ "steps",
704
+ "tempoMs",
705
+ "waveform",
706
+ "preset"
707
+ ],
708
+ "inputSchema": {
709
+ "type": "object",
710
+ "description": "Generate a lightweight SID arpeggio playback sequence.",
711
+ "properties": {
712
+ "root": {
713
+ "type": "string",
714
+ "description": "Root note for the arpeggio such as C4 or A#3.",
715
+ "pattern": "^([A-Ga-g])([#b]?)(-?\\d+)$",
716
+ "default": "C4"
717
+ },
718
+ "pattern": {
719
+ "type": "string",
720
+ "description": "Comma-separated semitone offsets (e.g. '0,4,7').",
721
+ "minLength": 1,
722
+ "default": "0,4,7"
723
+ },
724
+ "steps": {
725
+ "type": "integer",
726
+ "description": "Number of notes to schedule.",
727
+ "minimum": 1,
728
+ "maximum": 128,
729
+ "default": 16
730
+ },
731
+ "tempoMs": {
732
+ "type": "integer",
733
+ "description": "Delay in milliseconds between notes.",
734
+ "minimum": 20,
735
+ "maximum": 2000,
736
+ "default": 120
737
+ },
738
+ "waveform": {
739
+ "type": "string",
740
+ "description": "Waveform for playback.",
741
+ "enum": [
742
+ "pulse",
743
+ "saw",
744
+ "tri",
745
+ "noise"
746
+ ],
747
+ "default": "tri"
748
+ },
749
+ "preset": {
750
+ "type": [
751
+ "string",
752
+ "null"
753
+ ],
754
+ "description": "Optional musical preset to influence timing/expression.",
755
+ "enum": [
756
+ "classic",
757
+ "expression"
758
+ ],
759
+ "default": "classic"
760
+ },
761
+ "op": {
762
+ "const": "generate"
763
+ }
308
764
  },
309
- "op": {
310
- "const": "generate"
311
- }
312
- },
313
- "additionalProperties": false,
314
- "required": [
315
- "op"
316
- ]
765
+ "additionalProperties": false,
766
+ "required": [
767
+ "op"
768
+ ]
769
+ }
317
770
  },
318
771
  {
319
- "type": "object",
772
+ "op": "compile_play",
320
773
  "description": "Compile SIDWAVE or CPG source and optionally play it immediately.",
321
- "properties": {
322
- "sidwave": {
323
- "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
324
- "type": [
325
- "string",
326
- "object",
327
- "null"
328
- ]
329
- },
330
- "cpg": {
331
- "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
332
- "type": [
333
- "string",
334
- "object",
335
- "null"
336
- ]
337
- },
338
- "format": {
339
- "type": [
340
- "string",
341
- "null"
342
- ],
343
- "description": "Source format hint when providing raw text.",
344
- "enum": [
345
- "yaml",
346
- "json"
347
- ]
348
- },
349
- "output": {
350
- "type": [
351
- "string",
352
- "null"
353
- ],
354
- "description": "Playback target format.",
355
- "enum": [
356
- "prg",
357
- "sid"
358
- ],
359
- "default": "prg"
360
- },
361
- "dryRun": {
362
- "type": [
363
- "boolean",
364
- "null"
365
- ],
366
- "description": "When true, skip playback and only return compilation metadata.",
367
- "default": false
774
+ "required": [],
775
+ "optional": [
776
+ "sidwave",
777
+ "cpg",
778
+ "format",
779
+ "output",
780
+ "dryRun"
781
+ ],
782
+ "inputSchema": {
783
+ "type": "object",
784
+ "description": "Compile SIDWAVE or CPG source and optionally play it immediately.",
785
+ "properties": {
786
+ "sidwave": {
787
+ "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
788
+ "type": [
789
+ "string",
790
+ "object",
791
+ "null"
792
+ ]
793
+ },
794
+ "cpg": {
795
+ "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
796
+ "type": [
797
+ "string",
798
+ "object",
799
+ "null"
800
+ ]
801
+ },
802
+ "format": {
803
+ "type": [
804
+ "string",
805
+ "null"
806
+ ],
807
+ "description": "Source format hint when providing raw text.",
808
+ "enum": [
809
+ "yaml",
810
+ "json"
811
+ ]
812
+ },
813
+ "output": {
814
+ "type": [
815
+ "string",
816
+ "null"
817
+ ],
818
+ "description": "Playback target format.",
819
+ "enum": [
820
+ "prg",
821
+ "sid"
822
+ ],
823
+ "default": "prg"
824
+ },
825
+ "dryRun": {
826
+ "type": [
827
+ "boolean",
828
+ "null"
829
+ ],
830
+ "description": "When true, skip playback and only return compilation metadata.",
831
+ "default": false
832
+ },
833
+ "op": {
834
+ "const": "compile_play"
835
+ }
368
836
  },
369
- "op": {
370
- "const": "compile_play"
371
- }
372
- },
373
- "additionalProperties": false,
374
- "required": [
375
- "op"
376
- ]
837
+ "additionalProperties": false,
838
+ "required": [
839
+ "op"
840
+ ]
841
+ }
377
842
  },
378
843
  {
379
- "type": "object",
844
+ "op": "play_preset",
380
845
  "description": "Compile and play a built-in SID preset such as Für Elise by Beethoven.",
381
- "properties": {
382
- "preset": {
383
- "type": [
384
- "string",
385
- "null"
386
- ],
387
- "description": "Named SID preset to compile and play. Canonical public preset: fuer_elise.",
388
- "minLength": 1,
389
- "default": "fuer_elise"
390
- },
391
- "platforms": {
392
- "type": [
393
- "array",
394
- "null"
395
- ],
396
- "items": {
397
- "type": "string",
398
- "description": "Backends to target in sequence.",
846
+ "required": [],
847
+ "optional": [
848
+ "preset",
849
+ "platforms",
850
+ "verify",
851
+ "analysisDurationSeconds",
852
+ "waitBeforeCaptureMs",
853
+ "restoreActiveBackend"
854
+ ],
855
+ "inputSchema": {
856
+ "type": "object",
857
+ "description": "Compile and play a built-in SID preset such as Für Elise by Beethoven.",
858
+ "properties": {
859
+ "preset": {
860
+ "type": [
861
+ "string",
862
+ "null"
863
+ ],
864
+ "description": "Named SID preset to compile and play. Canonical public preset: fuer_elise.",
399
865
  "minLength": 1,
400
- "enum": [
401
- "vice",
402
- "c64u"
403
- ]
866
+ "default": "fuer_elise"
867
+ },
868
+ "platforms": {
869
+ "type": [
870
+ "array",
871
+ "null"
872
+ ],
873
+ "items": {
874
+ "type": "string",
875
+ "description": "Backends to target in sequence.",
876
+ "minLength": 1,
877
+ "enum": [
878
+ "vice",
879
+ "c64u"
880
+ ]
881
+ }
882
+ },
883
+ "verify": {
884
+ "type": [
885
+ "boolean",
886
+ "null"
887
+ ],
888
+ "description": "Capture and analyze audio on supported backends after playback starts.",
889
+ "default": true
890
+ },
891
+ "analysisDurationSeconds": {
892
+ "type": [
893
+ "number",
894
+ "null"
895
+ ],
896
+ "description": "Length of the verification recording on analyzable backends.",
897
+ "minimum": 0.5,
898
+ "maximum": 20,
899
+ "default": 4
900
+ },
901
+ "waitBeforeCaptureMs": {
902
+ "type": [
903
+ "number",
904
+ "null"
905
+ ],
906
+ "description": "Delay between starting playback and beginning verification capture.",
907
+ "minimum": 0,
908
+ "maximum": 5000,
909
+ "default": 400
910
+ },
911
+ "restoreActiveBackend": {
912
+ "type": [
913
+ "boolean",
914
+ "null"
915
+ ],
916
+ "description": "Restore the backend that was active before the workflow started.",
917
+ "default": true
918
+ },
919
+ "op": {
920
+ "const": "play_preset"
404
921
  }
405
922
  },
406
- "verify": {
407
- "type": [
408
- "boolean",
409
- "null"
410
- ],
411
- "description": "Capture and analyze audio on supported backends after playback starts.",
412
- "default": true
413
- },
414
- "analysisDurationSeconds": {
415
- "type": [
416
- "number",
417
- "null"
418
- ],
419
- "description": "Length of the verification recording on analyzable backends.",
420
- "minimum": 0.5,
421
- "maximum": 20,
422
- "default": 4
423
- },
424
- "waitBeforeCaptureMs": {
425
- "type": [
426
- "number",
427
- "null"
428
- ],
429
- "description": "Delay between starting playback and beginning verification capture.",
430
- "minimum": 0,
431
- "maximum": 5000,
432
- "default": 400
433
- },
434
- "restoreActiveBackend": {
435
- "type": [
436
- "boolean",
437
- "null"
438
- ],
439
- "description": "Restore the backend that was active before the workflow started.",
440
- "default": true
441
- },
442
- "op": {
443
- "const": "play_preset"
444
- }
445
- },
446
- "additionalProperties": false,
447
- "required": [
448
- "op"
449
- ]
923
+ "additionalProperties": false,
924
+ "required": [
925
+ "op"
926
+ ]
927
+ }
450
928
  },
451
929
  {
452
- "type": "object",
930
+ "op": "pipeline",
453
931
  "description": "Compile a SIDWAVE score, play it, and analyze the recording.",
454
- "properties": {
455
- "sidwave": {
456
- "type": [
457
- "string",
458
- "null"
459
- ],
460
- "description": "SIDWAVE source in YAML or JSON format.",
461
- "minLength": 1
462
- },
463
- "cpg": {
464
- "type": [
465
- "string",
466
- "null"
467
- ],
468
- "description": "Legacy CPG input format.",
469
- "minLength": 1
470
- },
471
- "output": {
472
- "type": [
473
- "string",
474
- "null"
475
- ],
476
- "description": "Playback artifact format.",
477
- "enum": [
478
- "prg",
479
- "sid"
480
- ],
481
- "default": "prg"
482
- },
483
- "waitBeforeCaptureMs": {
484
- "type": [
485
- "number",
486
- "null"
487
- ],
488
- "description": "Delay between starting playback and beginning analysis capture (milliseconds).",
489
- "minimum": 0,
490
- "maximum": 5000,
491
- "default": 500
492
- },
493
- "analysisDurationSeconds": {
494
- "type": [
495
- "number",
496
- "null"
497
- ],
498
- "description": "Audio capture length in seconds.",
499
- "minimum": 0.5,
500
- "maximum": 20,
501
- "default": 3
502
- },
503
- "expectedSidwave": {
504
- "type": [
505
- "string",
506
- "null"
507
- ],
508
- "description": "Optional expected SIDWAVE used to refine analysis comparisons.",
509
- "minLength": 1
510
- },
511
- "verifySilenceBefore": {
512
- "type": [
513
- "boolean",
514
- "null"
515
- ],
516
- "description": "Run silence verification before playback to ensure a quiet baseline.",
517
- "default": true
518
- },
519
- "verifySilenceAfter": {
520
- "type": [
521
- "boolean",
522
- "null"
523
- ],
524
- "description": "Run silence verification after playback to ensure voices are released.",
525
- "default": true
526
- },
527
- "silenceDurationSeconds": {
528
- "type": [
529
- "number",
530
- "null"
531
- ],
532
- "description": "Audio capture length used for silence verification.",
533
- "minimum": 0.5,
534
- "maximum": 10,
535
- "default": 1.5
536
- },
537
- "silenceRmsThreshold": {
538
- "type": [
539
- "number",
540
- "null"
541
- ],
542
- "description": "RMS threshold applied to silence verification captures.",
543
- "minimum": 0,
544
- "maximum": 1,
545
- "default": 0.02
546
- },
547
- "postSilenceWaitMs": {
548
- "type": [
549
- "number",
550
- "null"
551
- ],
552
- "description": "Delay between main analysis capture and the post-playback silence check (milliseconds).",
553
- "minimum": 0,
554
- "maximum": 5000,
555
- "default": 200
556
- },
557
- "silenceWaitMs": {
558
- "type": [
559
- "number",
560
- "null"
561
- ],
562
- "description": "Delay between silencing the SID and recording during pre/post checks (milliseconds).",
563
- "minimum": 0,
564
- "maximum": 5000,
565
- "default": 150
932
+ "required": [],
933
+ "optional": [
934
+ "sidwave",
935
+ "cpg",
936
+ "output",
937
+ "waitBeforeCaptureMs",
938
+ "analysisDurationSeconds",
939
+ "expectedSidwave",
940
+ "verifySilenceBefore",
941
+ "verifySilenceAfter",
942
+ "silenceDurationSeconds",
943
+ "silenceRmsThreshold",
944
+ "postSilenceWaitMs",
945
+ "silenceWaitMs"
946
+ ],
947
+ "inputSchema": {
948
+ "type": "object",
949
+ "description": "Compile a SIDWAVE score, play it, and analyze the recording.",
950
+ "properties": {
951
+ "sidwave": {
952
+ "type": [
953
+ "string",
954
+ "null"
955
+ ],
956
+ "description": "SIDWAVE source in YAML or JSON format.",
957
+ "minLength": 1
958
+ },
959
+ "cpg": {
960
+ "type": [
961
+ "string",
962
+ "null"
963
+ ],
964
+ "description": "Legacy CPG input format.",
965
+ "minLength": 1
966
+ },
967
+ "output": {
968
+ "type": [
969
+ "string",
970
+ "null"
971
+ ],
972
+ "description": "Playback artifact format.",
973
+ "enum": [
974
+ "prg",
975
+ "sid"
976
+ ],
977
+ "default": "prg"
978
+ },
979
+ "waitBeforeCaptureMs": {
980
+ "type": [
981
+ "number",
982
+ "null"
983
+ ],
984
+ "description": "Delay between starting playback and beginning analysis capture (milliseconds).",
985
+ "minimum": 0,
986
+ "maximum": 5000,
987
+ "default": 500
988
+ },
989
+ "analysisDurationSeconds": {
990
+ "type": [
991
+ "number",
992
+ "null"
993
+ ],
994
+ "description": "Audio capture length in seconds.",
995
+ "minimum": 0.5,
996
+ "maximum": 20,
997
+ "default": 3
998
+ },
999
+ "expectedSidwave": {
1000
+ "type": [
1001
+ "string",
1002
+ "null"
1003
+ ],
1004
+ "description": "Optional expected SIDWAVE used to refine analysis comparisons.",
1005
+ "minLength": 1
1006
+ },
1007
+ "verifySilenceBefore": {
1008
+ "type": [
1009
+ "boolean",
1010
+ "null"
1011
+ ],
1012
+ "description": "Run silence verification before playback to ensure a quiet baseline.",
1013
+ "default": true
1014
+ },
1015
+ "verifySilenceAfter": {
1016
+ "type": [
1017
+ "boolean",
1018
+ "null"
1019
+ ],
1020
+ "description": "Run silence verification after playback to ensure voices are released.",
1021
+ "default": true
1022
+ },
1023
+ "silenceDurationSeconds": {
1024
+ "type": [
1025
+ "number",
1026
+ "null"
1027
+ ],
1028
+ "description": "Audio capture length used for silence verification.",
1029
+ "minimum": 0.5,
1030
+ "maximum": 10,
1031
+ "default": 1.5
1032
+ },
1033
+ "silenceRmsThreshold": {
1034
+ "type": [
1035
+ "number",
1036
+ "null"
1037
+ ],
1038
+ "description": "RMS threshold applied to silence verification captures.",
1039
+ "minimum": 0,
1040
+ "maximum": 1,
1041
+ "default": 0.02
1042
+ },
1043
+ "postSilenceWaitMs": {
1044
+ "type": [
1045
+ "number",
1046
+ "null"
1047
+ ],
1048
+ "description": "Delay between main analysis capture and the post-playback silence check (milliseconds).",
1049
+ "minimum": 0,
1050
+ "maximum": 5000,
1051
+ "default": 200
1052
+ },
1053
+ "silenceWaitMs": {
1054
+ "type": [
1055
+ "number",
1056
+ "null"
1057
+ ],
1058
+ "description": "Delay between silencing the SID and recording during pre/post checks (milliseconds).",
1059
+ "minimum": 0,
1060
+ "maximum": 5000,
1061
+ "default": 150
1062
+ },
1063
+ "op": {
1064
+ "const": "pipeline"
1065
+ }
566
1066
  },
567
- "op": {
568
- "const": "pipeline"
569
- }
570
- },
571
- "additionalProperties": false,
572
- "required": [
573
- "op"
574
- ]
1067
+ "additionalProperties": false,
1068
+ "required": [
1069
+ "op"
1070
+ ]
1071
+ }
575
1072
  },
576
1073
  {
577
- "type": "object",
1074
+ "op": "analyze",
578
1075
  "description": "Automatically analyze SID playback when verification is requested.",
579
- "properties": {
580
- "request": {
581
- "type": "string",
582
- "description": "Natural language user request describing the verification goal.",
583
- "minLength": 1
584
- },
585
- "durationSeconds": {
586
- "type": [
587
- "number",
588
- "null"
589
- ],
590
- "description": "Override capture duration in seconds.",
591
- "minimum": 0.5,
592
- "maximum": 30
593
- },
594
- "expectedSidwave": {
595
- "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
596
- "type": [
597
- "string",
598
- "object",
599
- "null"
600
- ]
601
- },
602
- "op": {
603
- "const": "analyze"
604
- }
605
- },
606
1076
  "required": [
607
- "request",
608
- "op"
1077
+ "request"
1078
+ ],
1079
+ "optional": [
1080
+ "durationSeconds",
1081
+ "expectedSidwave"
609
1082
  ],
610
- "additionalProperties": false
1083
+ "inputSchema": {
1084
+ "type": "object",
1085
+ "description": "Automatically analyze SID playback when verification is requested.",
1086
+ "properties": {
1087
+ "request": {
1088
+ "type": "string",
1089
+ "description": "Natural language user request describing the verification goal.",
1090
+ "minLength": 1
1091
+ },
1092
+ "durationSeconds": {
1093
+ "type": [
1094
+ "number",
1095
+ "null"
1096
+ ],
1097
+ "description": "Override capture duration in seconds.",
1098
+ "minimum": 0.5,
1099
+ "maximum": 30
1100
+ },
1101
+ "expectedSidwave": {
1102
+ "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
1103
+ "type": [
1104
+ "string",
1105
+ "object",
1106
+ "null"
1107
+ ]
1108
+ },
1109
+ "op": {
1110
+ "const": "analyze"
1111
+ }
1112
+ },
1113
+ "required": [
1114
+ "request",
1115
+ "op"
1116
+ ],
1117
+ "additionalProperties": false
1118
+ }
611
1119
  },
612
1120
  {
613
- "type": "object",
1121
+ "op": "record_analyze",
614
1122
  "description": "Record audio for a fixed duration and return SID analysis metrics.",
615
- "properties": {
616
- "durationSeconds": {
617
- "type": "number",
618
- "description": "Capture duration in seconds (0.5 - 30).",
619
- "minimum": 0.5,
620
- "maximum": 30
621
- },
622
- "expectedSidwave": {
623
- "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
624
- "type": [
625
- "string",
626
- "object",
627
- "null"
628
- ]
629
- },
630
- "op": {
631
- "const": "record_analyze"
632
- }
633
- },
634
1123
  "required": [
635
- "durationSeconds",
636
- "op"
1124
+ "durationSeconds"
1125
+ ],
1126
+ "optional": [
1127
+ "expectedSidwave"
637
1128
  ],
638
- "additionalProperties": false
1129
+ "inputSchema": {
1130
+ "type": "object",
1131
+ "description": "Record audio for a fixed duration and return SID analysis metrics.",
1132
+ "properties": {
1133
+ "durationSeconds": {
1134
+ "type": "number",
1135
+ "description": "Capture duration in seconds (0.5 - 30).",
1136
+ "minimum": 0.5,
1137
+ "maximum": 30
1138
+ },
1139
+ "expectedSidwave": {
1140
+ "description": "SIDWAVE composition represented as YAML/JSON text or an already parsed object.",
1141
+ "type": [
1142
+ "string",
1143
+ "object",
1144
+ "null"
1145
+ ]
1146
+ },
1147
+ "op": {
1148
+ "const": "record_analyze"
1149
+ }
1150
+ },
1151
+ "required": [
1152
+ "durationSeconds",
1153
+ "op"
1154
+ ],
1155
+ "additionalProperties": false
1156
+ }
639
1157
  }
640
- ],
641
- "discriminator": {
642
- "propertyName": "op"
643
- }
1158
+ ]
644
1159
  }