glasspane-mcp 0.1.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 (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/dist/audit-session.d.ts +22 -0
  4. package/dist/audit-session.d.ts.map +1 -0
  5. package/dist/audit-session.js +64 -0
  6. package/dist/audit-session.js.map +1 -0
  7. package/dist/canonical.d.ts +7 -0
  8. package/dist/canonical.d.ts.map +1 -0
  9. package/dist/canonical.js +23 -0
  10. package/dist/canonical.js.map +1 -0
  11. package/dist/dispatch.d.ts +47 -0
  12. package/dist/dispatch.d.ts.map +1 -0
  13. package/dist/dispatch.js +122 -0
  14. package/dist/dispatch.js.map +1 -0
  15. package/dist/engine-client.d.ts +54 -0
  16. package/dist/engine-client.d.ts.map +1 -0
  17. package/dist/engine-client.js +135 -0
  18. package/dist/engine-client.js.map +1 -0
  19. package/dist/errors.d.ts +23 -0
  20. package/dist/errors.d.ts.map +1 -0
  21. package/dist/errors.js +22 -0
  22. package/dist/errors.js.map +1 -0
  23. package/dist/evidence-report.d.ts +30 -0
  24. package/dist/evidence-report.d.ts.map +1 -0
  25. package/dist/evidence-report.js +161 -0
  26. package/dist/evidence-report.js.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +1476 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/io.d.ts +51 -0
  32. package/dist/io.d.ts.map +1 -0
  33. package/dist/io.js +74 -0
  34. package/dist/io.js.map +1 -0
  35. package/dist/project-registry.d.ts +76 -0
  36. package/dist/project-registry.d.ts.map +1 -0
  37. package/dist/project-registry.js +144 -0
  38. package/dist/project-registry.js.map +1 -0
  39. package/dist/tools.d.ts +255 -0
  40. package/dist/tools.d.ts.map +1 -0
  41. package/dist/tools.js +556 -0
  42. package/dist/tools.js.map +1 -0
  43. package/package.json +51 -0
  44. package/schemas/decision-log-entry.schema.json +45 -0
  45. package/schemas/evidence-pack.schema.json +359 -0
  46. package/schemas/recipe-config.schema.json +36 -0
  47. package/schemas/schemas/decision-log-entry.schema.json +45 -0
  48. package/schemas/schemas/evidence-pack.schema.json +359 -0
  49. package/schemas/schemas/recipe-config.schema.json +36 -0
@@ -0,0 +1,359 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.iterate.dev/evidence-pack-0.1.json",
4
+ "title": "EvidencePack",
5
+ "description": "GlassPane P0 evidence package (schema v0.1-draft). C35 dual-language contract: this JSON Schema is the single source of truth; Swift Codable and TS zod bindings must stay in sync via the shared truth fixtures.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "operationId",
11
+ "createdAt",
12
+ "attribution",
13
+ "circuitBreaker",
14
+ "signals"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "const": "glasspane.evidence/0.1"
19
+ },
20
+ "operationId": {
21
+ "type": "string",
22
+ "pattern": "^op_[0-9A-HJKMNP-TV-Z]{26}$"
23
+ },
24
+ "createdAt": {
25
+ "type": "string",
26
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
27
+ },
28
+ "attribution": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["level", "contaminated"],
32
+ "properties": {
33
+ "level": {
34
+ "enum": ["soft", "strong", "weak"]
35
+ },
36
+ "contaminated": {
37
+ "type": "boolean"
38
+ }
39
+ }
40
+ },
41
+ "circuitBreaker": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["level"],
45
+ "properties": {
46
+ "level": {
47
+ "type": "integer",
48
+ "minimum": 0,
49
+ "maximum": 3
50
+ },
51
+ "reason": {
52
+ "type": "string"
53
+ }
54
+ }
55
+ },
56
+ "signals": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["act", "handlerProbe", "stateDiff"],
60
+ "properties": {
61
+ "act": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["selector", "action", "actConfirmed"],
65
+ "properties": {
66
+ "selector": {
67
+ "$ref": "#/$defs/selector"
68
+ },
69
+ "action": {
70
+ "enum": [
71
+ "press",
72
+ "increment",
73
+ "decrement",
74
+ "showMenu",
75
+ "confirm",
76
+ "cancel",
77
+ "pick"
78
+ ]
79
+ },
80
+ "actConfirmed": {
81
+ "type": "boolean"
82
+ }
83
+ }
84
+ },
85
+ "axEvent": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "treeDigestBefore",
90
+ "treeDigestAfter",
91
+ "nodeCount",
92
+ "axChanged",
93
+ "latencyMs"
94
+ ],
95
+ "properties": {
96
+ "treeDigestBefore": {
97
+ "$ref": "#/$defs/treeDigest"
98
+ },
99
+ "treeDigestAfter": {
100
+ "$ref": "#/$defs/treeDigest"
101
+ },
102
+ "nodeCount": {
103
+ "type": "integer",
104
+ "minimum": 0
105
+ },
106
+ "axChanged": {
107
+ "type": "boolean"
108
+ },
109
+ "latencyMs": {
110
+ "type": "number",
111
+ "minimum": 0
112
+ }
113
+ }
114
+ },
115
+ "handlerProbe": {
116
+ "oneOf": [
117
+ { "type": "null" },
118
+ { "$ref": "#/$defs/handlerProbeSignal" }
119
+ ]
120
+ },
121
+ "stateDiff": {
122
+ "oneOf": [
123
+ { "type": "null" },
124
+ { "$ref": "#/$defs/stateDiffSignal" }
125
+ ]
126
+ },
127
+ "pixelDiff": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": ["changedPixelRatio", "bounds", "windowId"],
131
+ "properties": {
132
+ "changedPixelRatio": {
133
+ "type": "number",
134
+ "minimum": 0,
135
+ "maximum": 1
136
+ },
137
+ "bounds": {
138
+ "oneOf": [
139
+ { "$ref": "#/$defs/bounds" },
140
+ { "type": "null" }
141
+ ]
142
+ },
143
+ "windowId": {
144
+ "type": "integer",
145
+ "minimum": 0
146
+ }
147
+ }
148
+ },
149
+ "responsiveness": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": ["responsive", "pingMs"],
153
+ "properties": {
154
+ "responsive": {
155
+ "type": "boolean"
156
+ },
157
+ "pingMs": {
158
+ "type": "number",
159
+ "minimum": 0
160
+ }
161
+ }
162
+ },
163
+ "crash": {
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "required": ["processAliveBefore", "processAliveAfter"],
167
+ "properties": {
168
+ "processAliveBefore": {
169
+ "type": "boolean"
170
+ },
171
+ "processAliveAfter": {
172
+ "type": "boolean"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ },
178
+ "assertion": {
179
+ "oneOf": [
180
+ { "$ref": "#/$defs/assertion" },
181
+ { "type": "null" }
182
+ ]
183
+ },
184
+ "diagnosis": {
185
+ "oneOf": [
186
+ { "$ref": "#/$defs/diagnosis" },
187
+ { "type": "null" }
188
+ ]
189
+ }
190
+ },
191
+ "$defs": {
192
+ "selector": {
193
+ "type": "object",
194
+ "additionalProperties": false,
195
+ "required": ["role"],
196
+ "properties": {
197
+ "role": {
198
+ "type": "string",
199
+ "maxLength": 512
200
+ },
201
+ "title": {
202
+ "type": "string",
203
+ "maxLength": 512
204
+ },
205
+ "identifier": {
206
+ "type": "string",
207
+ "maxLength": 512
208
+ }
209
+ }
210
+ },
211
+ "treeDigest": {
212
+ "type": "string",
213
+ "pattern": "^[0-9a-f]{32}$"
214
+ },
215
+ "handlerProbeSignal": {
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "required": ["probeVersion", "hitCount", "handlers", "lateCount"],
219
+ "properties": {
220
+ "probeVersion": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "maxLength": 64
224
+ },
225
+ "hitCount": {
226
+ "type": "integer",
227
+ "minimum": 0
228
+ },
229
+ "handlers": {
230
+ "type": "array",
231
+ "maxItems": 32,
232
+ "items": {
233
+ "type": "object",
234
+ "additionalProperties": false,
235
+ "required": ["file", "line"],
236
+ "properties": {
237
+ "file": { "type": "string", "minLength": 1, "maxLength": 512 },
238
+ "line": { "type": "integer", "minimum": 0 }
239
+ }
240
+ }
241
+ },
242
+ "lateCount": {
243
+ "type": "integer",
244
+ "minimum": 0
245
+ }
246
+ }
247
+ },
248
+ "stateDiffSignal": {
249
+ "type": "object",
250
+ "additionalProperties": false,
251
+ "required": ["source", "changed", "entries"],
252
+ "properties": {
253
+ "source": {
254
+ "enum": ["z1-macro", "z2-mirror", "z3-kvc"]
255
+ },
256
+ "changed": {
257
+ "type": "boolean"
258
+ },
259
+ "entries": {
260
+ "type": "array",
261
+ "maxItems": 64,
262
+ "items": {
263
+ "type": "object",
264
+ "additionalProperties": false,
265
+ "required": ["key", "before", "after"],
266
+ "properties": {
267
+ "key": { "type": "string", "minLength": 1, "maxLength": 512 },
268
+ "before": { "type": "string", "maxLength": 1024 },
269
+ "after": { "type": "string", "maxLength": 1024 }
270
+ }
271
+ }
272
+ }
273
+ }
274
+ },
275
+ "bounds": {
276
+ "type": "object",
277
+ "additionalProperties": false,
278
+ "required": ["x", "y", "width", "height"],
279
+ "properties": {
280
+ "x": { "type": "number" },
281
+ "y": { "type": "number" },
282
+ "width": { "type": "number" },
283
+ "height": { "type": "number" }
284
+ }
285
+ },
286
+ "assertion": {
287
+ "type": "object",
288
+ "additionalProperties": false,
289
+ "required": [
290
+ "kind",
291
+ "selector",
292
+ "property",
293
+ "expected",
294
+ "actual",
295
+ "passed"
296
+ ],
297
+ "properties": {
298
+ "kind": {
299
+ "const": "element_property"
300
+ },
301
+ "selector": {
302
+ "$ref": "#/$defs/selector"
303
+ },
304
+ "property": {
305
+ "enum": ["title", "value", "role", "enabled", "focused"]
306
+ },
307
+ "expected": {
308
+ "anyOf": [
309
+ { "type": "string" },
310
+ { "type": "boolean" }
311
+ ]
312
+ },
313
+ "actual": {
314
+ "anyOf": [
315
+ { "type": "string" },
316
+ { "type": "boolean" }
317
+ ]
318
+ },
319
+ "passed": {
320
+ "type": "boolean"
321
+ }
322
+ }
323
+ },
324
+ "diagnosis": {
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "required": ["class", "report"],
328
+ "properties": {
329
+ "class": {
330
+ "enum": [
331
+ "T0",
332
+ "T1",
333
+ "T2",
334
+ "T3",
335
+ "T4",
336
+ "T5",
337
+ "T6",
338
+ "T7",
339
+ "T8",
340
+ "T9",
341
+ "NO_ANOMALY",
342
+ "INCONCLUSIVE"
343
+ ]
344
+ },
345
+ "report": {
346
+ "type": "object",
347
+ "additionalProperties": false,
348
+ "required": ["path", "anomaly", "evidence", "next"],
349
+ "properties": {
350
+ "path": { "type": "string" },
351
+ "anomaly": { "type": "string" },
352
+ "evidence": { "type": "string" },
353
+ "next": { "type": "string" }
354
+ }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.iterate.dev/recipe-config-0.1-draft.json",
4
+ "title": "RecipeConfig",
5
+ "description": "Recipe configuration contract (P0 landing of the shared recipe validator, R35). A recipe is a named ordered sequence of engine primitives; step params are validated by the corresponding tool contracts, not by this schema.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "name", "steps"],
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "const": "glasspane.recipe/0.1-draft"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "maxLength": 256
16
+ },
17
+ "steps": {
18
+ "type": "array",
19
+ "minItems": 1,
20
+ "maxItems": 64,
21
+ "items": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["kind", "params"],
25
+ "properties": {
26
+ "kind": {
27
+ "enum": ["act", "observe", "assert", "diagnose"]
28
+ },
29
+ "params": {
30
+ "type": "object"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }