c64bridge 0.9.0 → 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 (49) hide show
  1. package/README.md +158 -164
  2. package/data/vice/vice-binary-monitor-spec.md +21 -4
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/c64Client.js +76 -2
  5. package/dist/device.js +43 -3
  6. package/dist/rag/indexer.js +18 -8
  7. package/dist/sidwaveCompiler.js +1 -1
  8. package/dist/{assemblyConverter.js → tools/assember.js} +10 -1
  9. package/dist/{basicConverter.js → tools/basicTokenizer.js} +1 -1
  10. package/dist/tools/debug.js +158 -5
  11. package/dist/tools/disassembler.js +478 -0
  12. package/dist/tools/input.js +338 -0
  13. package/dist/tools/memory.js +317 -1
  14. package/dist/tools/programRunners.js +45 -6
  15. package/dist/tools/registry/batch.js +167 -0
  16. package/dist/tools/registry/graphics.js +101 -1
  17. package/dist/tools/registry/index.js +4 -0
  18. package/dist/tools/registry/input.js +2 -0
  19. package/dist/tools/registry/memory.js +61 -1
  20. package/dist/tools/schema.js +4 -5
  21. package/dist/tools/symbolRegistry.js +49 -0
  22. package/dist/tools/types.js +19 -4
  23. package/dist/vice/process.js +43 -2
  24. package/dist/vice/viceClient.js +5 -1
  25. package/mcp/schemas/c64_batch.schema.json +53 -0
  26. package/mcp/schemas/c64_config.schema.json +461 -2
  27. package/mcp/schemas/c64_debug.schema.json +641 -3
  28. package/mcp/schemas/c64_disk.schema.json +340 -2
  29. package/mcp/schemas/c64_drive.schema.json +157 -2
  30. package/mcp/schemas/c64_extract.schema.json +359 -2
  31. package/mcp/schemas/c64_graphics.schema.json +415 -3
  32. package/mcp/schemas/c64_input.schema.json +136 -0
  33. package/mcp/schemas/c64_memory.schema.json +562 -3
  34. package/mcp/schemas/c64_printer.schema.json +253 -2
  35. package/mcp/schemas/c64_program.schema.json +499 -2
  36. package/mcp/schemas/c64_rag.schema.json +82 -2
  37. package/mcp/schemas/c64_select_backend.schema.json +35 -2
  38. package/mcp/schemas/c64_sound.schema.json +793 -2
  39. package/mcp/schemas/c64_stream.schema.json +73 -2
  40. package/mcp/schemas/c64_system.schema.json +301 -2
  41. package/mcp/schemas/c64_vice.schema.json +71 -2
  42. package/mcp/server.json +1 -1
  43. package/mcp/tools.json +6718 -1257
  44. package/mcp.json +1 -1
  45. package/package.json +1 -1
  46. package/scripts/run-coverage.mjs +7 -0
  47. package/scripts/run-tests.ts +2 -0
  48. package/scripts/update-readme.ts +79 -2
  49. package/server.json +2 -2
@@ -363,6 +363,797 @@
363
363
  "required": [
364
364
  "op"
365
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.\n- set_volume: Set the SID master volume register at $D418 (0-15).\n- reset: Soft or hard reset of SID registers to clear glitches.\n- note_on: Trigger a SID voice with configurable waveform, ADSR, and pitch.\n- note_off: Release a SID voice by clearing its gate bit.\n- silence_all: Silence all SID voices with optional audio verification.\n- play_sid_file: Play a SID file stored on the Ultimate filesystem.\n- play_mod_file: Play a MOD tracker module via the Ultimate SID player.\n- generate: Generate a lightweight SID arpeggio playback sequence.\n- compile_play: Compile SIDWAVE or CPG source and optionally play it immediately.\n- play_preset: Compile and play a built-in SID preset such as Für Elise by Beethoven.\n- pipeline: Compile a SIDWAVE score, play it, and analyze the recording.\n- analyze: Automatically analyze SID playback when verification is requested.\n- record_analyze: Record audio for a fixed duration and return SID analysis metrics.",
367
- "additionalProperties": false
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": [
369
+ {
370
+ "op": "capture_samples",
371
+ "description": "Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream.",
372
+ "required": [],
373
+ "optional": [
374
+ "count",
375
+ "encoding"
376
+ ],
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
+ }
412
+ },
413
+ {
414
+ "op": "set_volume",
415
+ "description": "Set the SID master volume register at $D418 (0-15).",
416
+ "required": [
417
+ "volume"
418
+ ],
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
+ }
440
+ },
441
+ {
442
+ "op": "reset",
443
+ "description": "Soft or hard reset of SID registers to clear glitches.",
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
+ }
460
+ },
461
+ "additionalProperties": false,
462
+ "required": [
463
+ "op"
464
+ ]
465
+ }
466
+ },
467
+ {
468
+ "op": "note_on",
469
+ "description": "Trigger a SID voice with configurable waveform, ADSR, and pitch.",
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
+ }
568
+ },
569
+ "additionalProperties": false,
570
+ "required": [
571
+ "op"
572
+ ]
573
+ }
574
+ },
575
+ {
576
+ "op": "note_off",
577
+ "description": "Release a SID voice by clearing its gate bit.",
578
+ "required": [
579
+ "voice"
580
+ ],
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
+ }
602
+ },
603
+ {
604
+ "op": "silence_all",
605
+ "description": "Silence all SID voices with optional audio verification.",
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
+ }
625
+ },
626
+ "additionalProperties": false,
627
+ "required": [
628
+ "op"
629
+ ]
630
+ }
631
+ },
632
+ {
633
+ "op": "play_sid_file",
634
+ "description": "Play a SID file stored on the Ultimate filesystem.",
635
+ "required": [
636
+ "path"
637
+ ],
638
+ "optional": [
639
+ "songnr"
640
+ ],
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
+ }
668
+ },
669
+ {
670
+ "op": "play_mod_file",
671
+ "description": "Play a MOD tracker module via the Ultimate SID player.",
672
+ "required": [
673
+ "path"
674
+ ],
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
+ }
695
+ },
696
+ {
697
+ "op": "generate",
698
+ "description": "Generate a lightweight SID arpeggio playback sequence.",
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
+ }
764
+ },
765
+ "additionalProperties": false,
766
+ "required": [
767
+ "op"
768
+ ]
769
+ }
770
+ },
771
+ {
772
+ "op": "compile_play",
773
+ "description": "Compile SIDWAVE or CPG source and optionally play it immediately.",
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
+ }
836
+ },
837
+ "additionalProperties": false,
838
+ "required": [
839
+ "op"
840
+ ]
841
+ }
842
+ },
843
+ {
844
+ "op": "play_preset",
845
+ "description": "Compile and play a built-in SID preset such as Für Elise by Beethoven.",
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.",
865
+ "minLength": 1,
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"
921
+ }
922
+ },
923
+ "additionalProperties": false,
924
+ "required": [
925
+ "op"
926
+ ]
927
+ }
928
+ },
929
+ {
930
+ "op": "pipeline",
931
+ "description": "Compile a SIDWAVE score, play it, and analyze the recording.",
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
+ }
1066
+ },
1067
+ "additionalProperties": false,
1068
+ "required": [
1069
+ "op"
1070
+ ]
1071
+ }
1072
+ },
1073
+ {
1074
+ "op": "analyze",
1075
+ "description": "Automatically analyze SID playback when verification is requested.",
1076
+ "required": [
1077
+ "request"
1078
+ ],
1079
+ "optional": [
1080
+ "durationSeconds",
1081
+ "expectedSidwave"
1082
+ ],
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
+ }
1119
+ },
1120
+ {
1121
+ "op": "record_analyze",
1122
+ "description": "Record audio for a fixed duration and return SID analysis metrics.",
1123
+ "required": [
1124
+ "durationSeconds"
1125
+ ],
1126
+ "optional": [
1127
+ "expectedSidwave"
1128
+ ],
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
+ }
1157
+ }
1158
+ ]
368
1159
  }