c64bridge 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/.github/prompts/steer.prompt.md +55 -0
  2. package/AGENTS.md +9 -7
  3. package/README.md +139 -95
  4. package/data/embeddings_asm.json +1 -1
  5. package/data/embeddings_basic.json +1 -1
  6. package/data/embeddings_hardware.json +1 -1
  7. package/data/embeddings_mixed.json +1 -1
  8. package/data/embeddings_other.json +1 -1
  9. package/data/graphics/petscii-style-guide.md +4 -4
  10. package/data/graphics/sprite-charset-best-practices.md +9 -9
  11. package/data/vice/vice-binary-monitor-spec.md +921 -0
  12. package/dist/.tsbuildinfo +1 -1
  13. package/dist/device.js +86 -10
  14. package/dist/mcp-server.js +1 -1
  15. package/dist/prompts/registry.js +27 -25
  16. package/dist/rag/knowledgeIndex.js +112 -79
  17. package/dist/rag/resourceUris.js +93 -0
  18. package/dist/tools/audio.js +11 -11
  19. package/dist/tools/debug.js +1 -1
  20. package/dist/tools/developer.js +13 -13
  21. package/dist/tools/graphics.js +10 -10
  22. package/dist/tools/machineControl.js +5 -5
  23. package/dist/tools/memory.js +19 -11
  24. package/dist/tools/meta/index.js +1 -1
  25. package/dist/tools/printer.js +11 -12
  26. package/dist/tools/programRunners.js +16 -16
  27. package/dist/tools/rag.js +9 -9
  28. package/dist/tools/registry/config.js +1 -1
  29. package/dist/tools/registry/disk.js +1 -1
  30. package/dist/tools/registry/drive.js +1 -1
  31. package/dist/tools/registry/extract.js +1 -1
  32. package/dist/tools/registry/graphics.js +1 -1
  33. package/dist/tools/registry/memory.js +1 -1
  34. package/dist/tools/registry/platform.js +1 -1
  35. package/dist/tools/registry/printer.js +1 -1
  36. package/dist/tools/registry/program.js +1 -1
  37. package/dist/tools/registry/rag.js +1 -1
  38. package/dist/tools/registry/sound.js +1 -1
  39. package/dist/tools/registry/stream.js +1 -1
  40. package/dist/tools/registry/system.js +1 -1
  41. package/dist/tools/storage.js +15 -15
  42. package/dist/tools/streaming.js +3 -3
  43. package/dist/tools/types.js +41 -4
  44. package/dist/tools/vice.js +2 -5
  45. package/dist/vice/process.js +79 -2
  46. package/dist/vice/readiness.js +35 -0
  47. package/dist/vice/smokeOptions.js +44 -0
  48. package/dist/viceRunner.js +2 -0
  49. package/doc/developer.md +10 -2
  50. package/doc/plans/prompts/README.md +7 -7
  51. package/mcp/prompts.json +42 -59
  52. package/mcp/protocol-examples.json +2 -2
  53. package/mcp/resources.json +179 -166
  54. package/mcp/schemas/c64_config.schema.json +109 -326
  55. package/mcp/schemas/c64_debug.schema.json +158 -337
  56. package/mcp/schemas/c64_disk.schema.json +180 -262
  57. package/mcp/schemas/c64_drive.schema.json +31 -111
  58. package/mcp/schemas/c64_extract.schema.json +193 -291
  59. package/mcp/schemas/c64_graphics.schema.json +208 -308
  60. package/mcp/schemas/c64_memory.schema.json +94 -144
  61. package/mcp/schemas/c64_printer.schema.json +151 -205
  62. package/mcp/schemas/c64_program.schema.json +229 -367
  63. package/mcp/schemas/c64_rag.schema.json +25 -59
  64. package/mcp/schemas/c64_select_backend.schema.json +19 -26
  65. package/mcp/schemas/c64_sound.schema.json +346 -622
  66. package/mcp/schemas/c64_stream.schema.json +25 -54
  67. package/mcp/schemas/c64_system.schema.json +79 -212
  68. package/mcp/schemas/c64_vice.schema.json +24 -55
  69. package/mcp/server.json +1 -1
  70. package/mcp/tools.json +1935 -3443
  71. package/mcp.json +10 -9
  72. package/package.json +20 -15
  73. package/scripts/fetch-external-sources.mjs +1 -2
  74. package/scripts/prepare-release.mjs +59 -2
  75. package/scripts/run-coverage.mjs +26 -1
  76. package/scripts/run-tests.mjs +2 -2
  77. package/scripts/run-tests.ts +273 -52
  78. package/scripts/update-readme.ts +54 -2
  79. package/server.json +94 -0
@@ -1,155 +1,105 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Memory operations available via the c64_memory tool.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "Read a range of bytes and return a hex dump with address metadata.",
8
- "properties": {
9
- "address": {
10
- "type": "string",
11
- "description": "Start address expressed as $HHHH, decimal, or a documented symbol name.",
12
- "minLength": 1
13
- },
14
- "length": {
15
- "type": "integer",
16
- "description": "Number of bytes to read starting from the resolved address.",
17
- "minimum": 1,
18
- "maximum": 4096,
19
- "default": 256
20
- },
21
- "op": {
22
- "const": "read"
23
- }
24
- },
25
- "required": [
26
- "address",
27
- "op"
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "read",
8
+ "write",
9
+ "read_screen",
10
+ "wait_for_text"
28
11
  ],
29
- "additionalProperties": false
12
+ "description": "Selects the operation."
30
13
  },
31
- {
32
- "type": "object",
33
- "description": "Write a hexadecimal byte sequence into RAM.",
34
- "properties": {
35
- "address": {
36
- "type": "string",
37
- "description": "Destination address expressed as $HHHH, decimal, or a documented symbol name.",
38
- "minLength": 1
39
- },
40
- "bytes": {
41
- "type": "string",
42
- "description": "Hex byte sequence like $AABBCC or AA BB CC to write starting at the resolved address.",
43
- "minLength": 2,
44
- "pattern": "^[\\s_0-9A-Fa-f$]+$"
45
- },
46
- "verify": {
47
- "type": "boolean",
48
- "description": "When true, verify the write by reading before and after the change; Ultimate hardware also pauses during verification.",
49
- "default": false
50
- },
51
- "expected": {
52
- "type": [
53
- "string",
54
- "null"
55
- ],
56
- "description": "Optional hex data expected before the write (verifies before writing).",
57
- "minLength": 2,
58
- "pattern": "^[\\s_0-9A-Fa-f$]+$"
59
- },
60
- "mask": {
61
- "type": [
62
- "string",
63
- "null"
64
- ],
65
- "description": "Optional verification mask (hex); only bits set in the mask are compared.",
66
- "minLength": 2,
67
- "pattern": "^[\\s_0-9A-Fa-f$]+$"
68
- },
69
- "abortOnMismatch": {
70
- "type": "boolean",
71
- "description": "Abort the write when the pre-write verification fails.",
72
- "default": true
73
- },
74
- "op": {
75
- "const": "write"
76
- }
77
- },
78
- "required": [
79
- "address",
80
- "bytes",
81
- "op"
14
+ "address": {
15
+ "type": "string",
16
+ "description": "Start address expressed as $HHHH, decimal, or a documented symbol name.",
17
+ "minLength": 1
18
+ },
19
+ "length": {
20
+ "type": "integer",
21
+ "description": "Number of bytes to read starting from the resolved address.",
22
+ "minimum": 1,
23
+ "maximum": 4096,
24
+ "default": 256
25
+ },
26
+ "bytes": {
27
+ "type": "string",
28
+ "description": "Hex byte sequence like $AABBCC or AA BB CC to write starting at the resolved address.",
29
+ "minLength": 2,
30
+ "pattern": "^[\\s_0-9A-Fa-f$]+$"
31
+ },
32
+ "verify": {
33
+ "type": "boolean",
34
+ "description": "When true, verify the write by reading before and after the change; Ultimate hardware also pauses during verification.",
35
+ "default": false
36
+ },
37
+ "expected": {
38
+ "type": [
39
+ "string",
40
+ "null"
82
41
  ],
83
- "additionalProperties": false
42
+ "description": "Optional hex data expected before the write (verifies before writing).",
43
+ "minLength": 2,
44
+ "pattern": "^[\\s_0-9A-Fa-f$]+$"
45
+ },
46
+ "mask": {
47
+ "type": [
48
+ "string",
49
+ "null"
50
+ ],
51
+ "description": "Optional verification mask (hex); only bits set in the mask are compared.",
52
+ "minLength": 2,
53
+ "pattern": "^[\\s_0-9A-Fa-f$]+$"
54
+ },
55
+ "abortOnMismatch": {
56
+ "type": "boolean",
57
+ "description": "Abort the write when the pre-write verification fails.",
58
+ "default": true
84
59
  },
85
- {
86
- "type": "object",
87
- "description": "Return the current 40x25 text screen converted to ASCII.",
88
- "properties": {
89
- "op": {
90
- "const": "read_screen"
91
- }
92
- },
93
- "additionalProperties": false,
94
- "required": [
95
- "op"
96
- ]
60
+ "pattern": {
61
+ "type": "string",
62
+ "description": "Substring or regex to find",
63
+ "minLength": 1
64
+ },
65
+ "isRegex": {
66
+ "type": [
67
+ "boolean",
68
+ "null"
69
+ ],
70
+ "description": "Interpret pattern as regular expression",
71
+ "default": false
72
+ },
73
+ "caseInsensitive": {
74
+ "type": [
75
+ "boolean",
76
+ "null"
77
+ ],
78
+ "description": "Case-insensitive search",
79
+ "default": true
80
+ },
81
+ "timeoutMs": {
82
+ "type": [
83
+ "integer",
84
+ "null"
85
+ ],
86
+ "description": "Overall timeout in milliseconds",
87
+ "minimum": 1,
88
+ "default": 3000
97
89
  },
98
- {
99
- "type": "object",
100
- "description": "Poll the screen until a substring or regex appears, or timeout elapses.",
101
- "properties": {
102
- "pattern": {
103
- "type": "string",
104
- "description": "Substring or regex to find",
105
- "minLength": 1
106
- },
107
- "isRegex": {
108
- "type": [
109
- "boolean",
110
- "null"
111
- ],
112
- "description": "Interpret pattern as regular expression",
113
- "default": false
114
- },
115
- "caseInsensitive": {
116
- "type": [
117
- "boolean",
118
- "null"
119
- ],
120
- "description": "Case-insensitive search",
121
- "default": true
122
- },
123
- "timeoutMs": {
124
- "type": [
125
- "integer",
126
- "null"
127
- ],
128
- "description": "Overall timeout in milliseconds",
129
- "minimum": 1,
130
- "default": 3000
131
- },
132
- "intervalMs": {
133
- "type": [
134
- "integer",
135
- "null"
136
- ],
137
- "description": "Poll interval in milliseconds",
138
- "minimum": 1,
139
- "default": 100
140
- },
141
- "op": {
142
- "const": "wait_for_text"
143
- }
144
- },
145
- "required": [
146
- "pattern",
147
- "op"
90
+ "intervalMs": {
91
+ "type": [
92
+ "integer",
93
+ "null"
148
94
  ],
149
- "additionalProperties": false
95
+ "description": "Poll interval in milliseconds",
96
+ "minimum": 1,
97
+ "default": 100
150
98
  }
99
+ },
100
+ "required": [
101
+ "op"
151
102
  ],
152
- "discriminator": {
153
- "propertyName": "op"
154
- }
103
+ "description": "Memory operations available via the c64_memory tool.\n\nOperations:\n- read: Read a range of bytes and return a hex dump with address metadata.\n- write: Write a hexadecimal byte sequence into RAM.\n- read_screen: Return the current 40x25 text screen converted to ASCII.\n- wait_for_text: Poll the screen until a substring or regex appears, or timeout elapses.",
104
+ "additionalProperties": false
155
105
  }
@@ -1,218 +1,164 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Printer operations available via the c64_printer tool.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "Generate BASIC that prints text to device 4.",
8
- "properties": {
9
- "text": {
10
- "type": "string",
11
- "description": "Text to print on the connected printer.",
12
- "minLength": 1
13
- },
14
- "target": {
15
- "description": "Printer target: Commodore MPS (PETSCII) or Epson FX (ESC/P).",
16
- "type": "string",
17
- "enum": [
18
- "commodore",
19
- "epson"
20
- ],
21
- "default": "commodore"
22
- },
23
- "secondaryAddress": {
24
- "description": "Secondary address for device 4 (0 = upper/graphics, 7 = lowercase).",
25
- "type": [
26
- "integer",
27
- "null"
28
- ],
29
- "enum": [
30
- 0,
31
- 7
32
- ]
33
- },
34
- "formFeed": {
35
- "type": "boolean",
36
- "description": "Emit a form-feed (CHR$(12)) at the end of the job.",
37
- "default": false
38
- },
39
- "op": {
40
- "const": "print_text"
41
- }
42
- },
43
- "required": [
44
- "text",
45
- "op"
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "print_text",
8
+ "print_bitmap",
9
+ "define_chars"
46
10
  ],
47
- "additionalProperties": false
11
+ "description": "Selects the operation."
48
12
  },
49
- {
50
- "type": "object",
51
- "description": "Print a bitmap row via Commodore (BIM) or Epson ESC/P workflows.",
52
- "properties": {
53
- "printer": {
54
- "type": "string",
55
- "description": "Target printer family.",
56
- "enum": [
57
- "commodore",
58
- "epson"
59
- ],
60
- "default": "commodore"
61
- },
62
- "columns": {
63
- "type": "array",
64
- "description": "Sequence of bitmap columns.",
65
- "items": {
66
- "type": "integer",
67
- "description": "Bitmap column byte (0-255).",
68
- "minimum": 0,
69
- "maximum": 255
70
- },
71
- "minItems": 1
72
- },
73
- "repeats": {
74
- "type": [
75
- "integer",
76
- "null"
77
- ],
78
- "description": "Number of times to repeat the row (1-255).",
79
- "minimum": 1,
80
- "maximum": 255
81
- },
82
- "useSubRepeat": {
83
- "type": [
84
- "integer",
85
- "null"
86
- ],
87
- "description": "Repeat the next byte this many times (Commodore BIM SUB).",
88
- "minimum": 1,
89
- "maximum": 255
90
- },
91
- "secondaryAddress": {
92
- "type": [
93
- "integer",
94
- "null"
95
- ],
96
- "description": "Secondary address for device 4 (0 or 7).",
97
- "minimum": 0,
98
- "maximum": 7
99
- },
100
- "ensureMsb": {
101
- "type": "boolean",
102
- "description": "Ensure MSB set for Commodore printers.",
103
- "default": true
104
- },
105
- "mode": {
106
- "type": [
107
- "string",
108
- "null"
109
- ],
110
- "description": "Epson ESC/P graphics mode (K/L/Y/Z/*).",
111
- "minLength": 1,
112
- "maxLength": 1
113
- },
114
- "density": {
115
- "type": [
116
- "integer",
117
- "null"
118
- ],
119
- "description": "Density parameter when using Epson mode '*'.",
120
- "minimum": 0,
121
- "maximum": 3
122
- },
123
- "timesPerLine": {
124
- "type": [
125
- "integer",
126
- "null"
127
- ],
128
- "description": "Number of times to print the row per line (1-10).",
129
- "minimum": 1,
130
- "maximum": 10
131
- },
132
- "op": {
133
- "const": "print_bitmap"
134
- }
13
+ "text": {
14
+ "type": "string",
15
+ "description": "Text to print on the connected printer.",
16
+ "minLength": 1
17
+ },
18
+ "target": {
19
+ "description": "Printer target: Commodore MPS (PETSCII) or Epson FX (ESC/P).",
20
+ "type": "string",
21
+ "enum": [
22
+ "commodore",
23
+ "epson"
24
+ ],
25
+ "default": "commodore"
26
+ },
27
+ "secondaryAddress": {
28
+ "description": "Secondary address for device 4 (0 = upper/graphics, 7 = lowercase).",
29
+ "type": [
30
+ "integer",
31
+ "null"
32
+ ],
33
+ "enum": [
34
+ 0,
35
+ 7
36
+ ]
37
+ },
38
+ "formFeed": {
39
+ "type": "boolean",
40
+ "description": "Emit a form-feed (CHR$(12)) at the end of the job.",
41
+ "default": false
42
+ },
43
+ "printer": {
44
+ "type": "string",
45
+ "description": "Target printer family.",
46
+ "enum": [
47
+ "commodore",
48
+ "epson"
49
+ ],
50
+ "default": "commodore"
51
+ },
52
+ "columns": {
53
+ "type": "array",
54
+ "description": "Sequence of bitmap columns.",
55
+ "items": {
56
+ "type": "integer",
57
+ "description": "Bitmap column byte (0-255).",
58
+ "minimum": 0,
59
+ "maximum": 255
135
60
  },
136
- "required": [
137
- "printer",
138
- "columns",
139
- "op"
61
+ "minItems": 1
62
+ },
63
+ "repeats": {
64
+ "type": [
65
+ "integer",
66
+ "null"
140
67
  ],
141
- "additionalProperties": false
68
+ "description": "Number of times to repeat the row (1-255).",
69
+ "minimum": 1,
70
+ "maximum": 255
142
71
  },
143
- {
144
- "type": "object",
145
- "description": "Define custom printer characters (Commodore DLL mode).",
146
- "properties": {
147
- "firstChar": {
148
- "type": "integer",
149
- "description": "PETSCII code of first character to redefine (33-126).",
150
- "minimum": 33,
151
- "maximum": 126
152
- },
153
- "chars": {
154
- "type": "array",
155
- "description": "Character definitions to upload (1-32).",
156
- "items": {
157
- "type": "object",
158
- "description": "Commodore MPS DLL character definition (11 columns).",
159
- "properties": {
160
- "a": {
161
- "description": "Attribute flag (0=normal, 1=graphics).",
162
- "type": [
163
- "integer",
164
- "null"
165
- ],
166
- "enum": [
167
- 0,
168
- 1
169
- ]
170
- },
171
- "columns": {
172
- "type": "array",
173
- "description": "11 column bytes describing the character.",
174
- "items": {
175
- "type": "integer",
176
- "description": "Column byte (0-255).",
177
- "minimum": 0,
178
- "maximum": 255
179
- },
180
- "minItems": 11,
181
- "maxItems": 11
182
- }
183
- },
184
- "required": [
185
- "columns"
72
+ "useSubRepeat": {
73
+ "type": [
74
+ "integer",
75
+ "null"
76
+ ],
77
+ "description": "Repeat the next byte this many times (Commodore BIM SUB).",
78
+ "minimum": 1,
79
+ "maximum": 255
80
+ },
81
+ "ensureMsb": {
82
+ "type": "boolean",
83
+ "description": "Ensure MSB set for Commodore printers.",
84
+ "default": true
85
+ },
86
+ "mode": {
87
+ "type": [
88
+ "string",
89
+ "null"
90
+ ],
91
+ "description": "Epson ESC/P graphics mode (K/L/Y/Z/*).",
92
+ "minLength": 1,
93
+ "maxLength": 1
94
+ },
95
+ "density": {
96
+ "type": [
97
+ "integer",
98
+ "null"
99
+ ],
100
+ "description": "Density parameter when using Epson mode '*'.",
101
+ "minimum": 0,
102
+ "maximum": 3
103
+ },
104
+ "timesPerLine": {
105
+ "type": [
106
+ "integer",
107
+ "null"
108
+ ],
109
+ "description": "Number of times to print the row per line (1-10).",
110
+ "minimum": 1,
111
+ "maximum": 10
112
+ },
113
+ "firstChar": {
114
+ "type": "integer",
115
+ "description": "PETSCII code of first character to redefine (33-126).",
116
+ "minimum": 33,
117
+ "maximum": 126
118
+ },
119
+ "chars": {
120
+ "type": "array",
121
+ "description": "Character definitions to upload (1-32).",
122
+ "items": {
123
+ "type": "object",
124
+ "description": "Commodore MPS DLL character definition (11 columns).",
125
+ "properties": {
126
+ "a": {
127
+ "description": "Attribute flag (0=normal, 1=graphics).",
128
+ "type": [
129
+ "integer",
130
+ "null"
186
131
  ],
187
- "additionalProperties": false
132
+ "enum": [
133
+ 0,
134
+ 1
135
+ ]
188
136
  },
189
- "minItems": 1,
190
- "maxItems": 32
191
- },
192
- "secondaryAddress": {
193
- "description": "Secondary address for device 4 (0 = upper/graphics, 7 = lowercase).",
194
- "type": [
195
- "integer",
196
- "null"
197
- ],
198
- "enum": [
199
- 0,
200
- 7
201
- ]
202
- },
203
- "op": {
204
- "const": "define_chars"
205
- }
137
+ "columns": {
138
+ "type": "array",
139
+ "description": "11 column bytes describing the character.",
140
+ "items": {
141
+ "type": "integer",
142
+ "description": "Column byte (0-255).",
143
+ "minimum": 0,
144
+ "maximum": 255
145
+ },
146
+ "minItems": 11,
147
+ "maxItems": 11
148
+ }
149
+ },
150
+ "required": [
151
+ "columns"
152
+ ],
153
+ "additionalProperties": false
206
154
  },
207
- "required": [
208
- "firstChar",
209
- "chars",
210
- "op"
211
- ],
212
- "additionalProperties": false
155
+ "minItems": 1,
156
+ "maxItems": 32
213
157
  }
158
+ },
159
+ "required": [
160
+ "op"
214
161
  ],
215
- "discriminator": {
216
- "propertyName": "op"
217
- }
162
+ "description": "Printer operations available via the c64_printer tool.\n\nOperations:\n- print_text: Generate BASIC that prints text to device 4.\n- print_bitmap: Print a bitmap row via Commodore (BIM) or Epson ESC/P workflows.\n- define_chars: Define custom printer characters (Commodore DLL mode).",
163
+ "additionalProperties": false
218
164
  }