@clowder-ai/plugin-contract 0.1.0-beta.2 → 0.1.0-beta.21

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 (183) hide show
  1. package/dist/codegen/generate-contract.d.ts +10 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +201 -19
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/fixtures.d.ts +11 -0
  6. package/dist/conformance/fixtures.d.ts.map +1 -0
  7. package/dist/conformance/fixtures.js +9 -0
  8. package/dist/conformance/fixtures.js.map +1 -0
  9. package/dist/conformance/index.d.ts +4 -0
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +3 -0
  12. package/dist/conformance/index.js.map +1 -1
  13. package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
  14. package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
  15. package/dist/conformance/messaging-behavior-fixture.js +30 -0
  16. package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
  17. package/dist/conformance/runner.d.ts.map +1 -1
  18. package/dist/conformance/runner.js +22 -2
  19. package/dist/conformance/runner.js.map +1 -1
  20. package/dist/conformance/stdio-harness/child-process-harness.d.ts +65 -0
  21. package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -0
  22. package/dist/conformance/stdio-harness/child-process-harness.js +296 -0
  23. package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -0
  24. package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts +26 -0
  25. package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts.map +1 -0
  26. package/dist/conformance/stdio-harness/dual-transport-oracle.js +32 -0
  27. package/dist/conformance/stdio-harness/dual-transport-oracle.js.map +1 -0
  28. package/dist/conformance/stdio-harness/harness-process-spawn.d.ts +27 -0
  29. package/dist/conformance/stdio-harness/harness-process-spawn.d.ts.map +1 -0
  30. package/dist/conformance/stdio-harness/harness-process-spawn.js +43 -0
  31. package/dist/conformance/stdio-harness/harness-process-spawn.js.map +1 -0
  32. package/dist/conformance/stdio-harness/index.d.ts +5 -0
  33. package/dist/conformance/stdio-harness/index.d.ts.map +1 -0
  34. package/dist/conformance/stdio-harness/index.js +4 -0
  35. package/dist/conformance/stdio-harness/index.js.map +1 -0
  36. package/dist/conformance/stdio-harness/ndjson-frame.d.ts +31 -0
  37. package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -0
  38. package/dist/conformance/stdio-harness/ndjson-frame.js +125 -0
  39. package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -0
  40. package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts +15 -0
  41. package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts.map +1 -0
  42. package/dist/conformance/stdio-harness/node-process-tree-runtime.js +78 -0
  43. package/dist/conformance/stdio-harness/node-process-tree-runtime.js.map +1 -0
  44. package/dist/conformance/stdio-harness/process-tree-controller.d.ts +51 -0
  45. package/dist/conformance/stdio-harness/process-tree-controller.d.ts.map +1 -0
  46. package/dist/conformance/stdio-harness/process-tree-controller.js +162 -0
  47. package/dist/conformance/stdio-harness/process-tree-controller.js.map +1 -0
  48. package/dist/conformance/stdio-harness/windows-sentinel.d.ts +15 -0
  49. package/dist/conformance/stdio-harness/windows-sentinel.d.ts.map +1 -0
  50. package/dist/conformance/stdio-harness/windows-sentinel.js +160 -0
  51. package/dist/conformance/stdio-harness/windows-sentinel.js.map +1 -0
  52. package/dist/conformance/stdio-harness/wire-shape.d.ts +18 -0
  53. package/dist/conformance/stdio-harness/wire-shape.d.ts.map +1 -0
  54. package/dist/conformance/stdio-harness/wire-shape.js +2 -0
  55. package/dist/conformance/stdio-harness/wire-shape.js.map +1 -0
  56. package/dist/docx-materialization.d.ts +8 -0
  57. package/dist/docx-materialization.d.ts.map +1 -0
  58. package/dist/docx-materialization.js +19 -0
  59. package/dist/docx-materialization.js.map +1 -0
  60. package/dist/generated/contract.generated.d.ts +984 -12
  61. package/dist/generated/contract.generated.d.ts.map +1 -1
  62. package/dist/generated/contract.generated.js +9 -1
  63. package/dist/generated/contract.generated.js.map +1 -1
  64. package/dist/index.d.ts +3 -1
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +5 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/validation/catalog.d.ts +21 -0
  69. package/dist/validation/catalog.d.ts.map +1 -0
  70. package/dist/validation/catalog.js +140 -0
  71. package/dist/validation/catalog.js.map +1 -0
  72. package/dist/validation/companion-bridge.d.ts +6 -0
  73. package/dist/validation/companion-bridge.d.ts.map +1 -0
  74. package/dist/validation/companion-bridge.js +70 -0
  75. package/dist/validation/companion-bridge.js.map +1 -0
  76. package/dist/validation/docx-materialization.d.ts +6 -0
  77. package/dist/validation/docx-materialization.d.ts.map +1 -0
  78. package/dist/validation/docx-materialization.js +36 -0
  79. package/dist/validation/docx-materialization.js.map +1 -0
  80. package/dist/validation/index.d.ts +6 -0
  81. package/dist/validation/index.d.ts.map +1 -1
  82. package/dist/validation/index.js +6 -0
  83. package/dist/validation/index.js.map +1 -1
  84. package/dist/validation/manifest.d.ts +23 -0
  85. package/dist/validation/manifest.d.ts.map +1 -0
  86. package/dist/validation/manifest.js +160 -0
  87. package/dist/validation/manifest.js.map +1 -0
  88. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  89. package/dist/validation/messaging-semantic.js +49 -0
  90. package/dist/validation/messaging-semantic.js.map +1 -1
  91. package/dist/validation/messaging-wire.d.ts +38 -0
  92. package/dist/validation/messaging-wire.d.ts.map +1 -0
  93. package/dist/validation/messaging-wire.js +164 -0
  94. package/dist/validation/messaging-wire.js.map +1 -0
  95. package/dist/validation/signals.d.ts +26 -0
  96. package/dist/validation/signals.d.ts.map +1 -0
  97. package/dist/validation/signals.js +206 -0
  98. package/dist/validation/signals.js.map +1 -0
  99. package/dist/wire/constants.d.ts +36 -0
  100. package/dist/wire/constants.d.ts.map +1 -0
  101. package/dist/wire/constants.js +36 -0
  102. package/dist/wire/constants.js.map +1 -0
  103. package/dist/wire/disposition-fixtures.d.ts +118 -0
  104. package/dist/wire/disposition-fixtures.d.ts.map +1 -0
  105. package/dist/wire/disposition-fixtures.js +1881 -0
  106. package/dist/wire/disposition-fixtures.js.map +1 -0
  107. package/dist/wire/disposition.d.ts +102 -0
  108. package/dist/wire/disposition.d.ts.map +1 -0
  109. package/dist/wire/disposition.js +217 -0
  110. package/dist/wire/disposition.js.map +1 -0
  111. package/dist/wire/envelope.d.ts +253 -0
  112. package/dist/wire/envelope.d.ts.map +1 -0
  113. package/dist/wire/envelope.js +19 -0
  114. package/dist/wire/envelope.js.map +1 -0
  115. package/dist/wire/errors.d.ts +222 -0
  116. package/dist/wire/errors.d.ts.map +1 -0
  117. package/dist/wire/errors.js +153 -0
  118. package/dist/wire/errors.js.map +1 -0
  119. package/dist/wire/grants.d.ts +57 -0
  120. package/dist/wire/grants.d.ts.map +1 -0
  121. package/dist/wire/grants.js +59 -0
  122. package/dist/wire/grants.js.map +1 -0
  123. package/dist/wire/handshake-byte-bounds.d.ts +69 -0
  124. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
  125. package/dist/wire/handshake-byte-bounds.js +173 -0
  126. package/dist/wire/handshake-byte-bounds.js.map +1 -0
  127. package/dist/wire/handshake.d.ts +146 -0
  128. package/dist/wire/handshake.d.ts.map +1 -0
  129. package/dist/wire/handshake.js +189 -0
  130. package/dist/wire/handshake.js.map +1 -0
  131. package/dist/wire/index.d.ts +37 -0
  132. package/dist/wire/index.d.ts.map +1 -0
  133. package/dist/wire/index.js +61 -0
  134. package/dist/wire/index.js.map +1 -0
  135. package/dist/wire/lifecycle-byte-bounds.d.ts +55 -0
  136. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  137. package/dist/wire/lifecycle-byte-bounds.js +209 -0
  138. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  139. package/dist/wire/messaging-byte-bounds.d.ts +61 -0
  140. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  141. package/dist/wire/messaging-byte-bounds.js +459 -0
  142. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  143. package/dist/wire/registry.d.ts +294 -0
  144. package/dist/wire/registry.d.ts.map +1 -0
  145. package/dist/wire/registry.js +256 -0
  146. package/dist/wire/registry.js.map +1 -0
  147. package/dist/wire/request-id.d.ts +34 -0
  148. package/dist/wire/request-id.d.ts.map +1 -0
  149. package/dist/wire/request-id.js +40 -0
  150. package/dist/wire/request-id.js.map +1 -0
  151. package/dist/wire/row-shapes.d.ts +217 -0
  152. package/dist/wire/row-shapes.d.ts.map +1 -0
  153. package/dist/wire/row-shapes.js +75 -0
  154. package/dist/wire/row-shapes.js.map +1 -0
  155. package/dist/wire/signal-byte-bounds.d.ts +97 -0
  156. package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
  157. package/dist/wire/signal-byte-bounds.js +229 -0
  158. package/dist/wire/signal-byte-bounds.js.map +1 -0
  159. package/dist/wire/wire-uint53.d.ts +26 -0
  160. package/dist/wire/wire-uint53.d.ts.map +1 -0
  161. package/dist/wire/wire-uint53.js +32 -0
  162. package/dist/wire/wire-uint53.js.map +1 -0
  163. package/fixtures/behavior/messaging/adversarial-invariants.json +85 -0
  164. package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
  165. package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
  166. package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
  167. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  168. package/fixtures/signals/invalid/destination-injection.json +15 -0
  169. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  170. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  171. package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
  172. package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
  173. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  174. package/package.json +19 -6
  175. package/src/schemas/behavior-fixture.schema.json +262 -2
  176. package/src/schemas/catalog.schema.json +91 -0
  177. package/src/schemas/companion-bridge.schema.json +1011 -0
  178. package/src/schemas/docx-materialization.schema.json +302 -0
  179. package/src/schemas/manifest.schema.json +490 -4
  180. package/src/schemas/messaging.schema.json +209 -32
  181. package/src/schemas/physical-limb.schema.json +319 -0
  182. package/src/schemas/plugin-metadata.schema.json +62 -0
  183. package/src/schemas/signal.schema.json +129 -0
@@ -0,0 +1,1011 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://clowder-ai.dev/schemas/companion-bridge/v1",
4
+ "title": "Desktop companion renderer bridge",
5
+ "description": "Closed package presentation bridge. The Host-owned isolated preload owns WebRTC, microphone playback and its receive-only provider data channel. Packages never provide SDP, get a peer/channel handle, or send provider events. Host binds owner, installation and conversation; the trusted executor requires explicit gestures for voice and screen admission. Renderer screen observations remain untrusted. No new M0 methods.",
6
+ "$defs": {
7
+ "CompanionSelectionId": {
8
+ "type": "string",
9
+ "pattern": "^[a-zA-Z0-9_-]{1,160}$"
10
+ },
11
+ "CompanionScreenFrame": {
12
+ "type": "object",
13
+ "properties": {
14
+ "image": {
15
+ "type": "string",
16
+ "maxLength": 1400000,
17
+ "pattern": "^data:image/(jpeg|png|webp);base64,"
18
+ },
19
+ "width": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "maximum": 1600
23
+ },
24
+ "height": {
25
+ "type": "integer",
26
+ "minimum": 1,
27
+ "maximum": 1600
28
+ },
29
+ "frameId": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "maxLength": 160
33
+ },
34
+ "sourceLabel": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 256
38
+ },
39
+ "observedAt": {
40
+ "type": "number",
41
+ "minimum": 0
42
+ }
43
+ },
44
+ "required": [
45
+ "image",
46
+ "width",
47
+ "height",
48
+ "frameId",
49
+ "sourceLabel",
50
+ "observedAt"
51
+ ],
52
+ "additionalProperties": false
53
+ },
54
+ "CompanionCommand": {
55
+ "oneOf": [
56
+ {
57
+ "type": "object",
58
+ "properties": {
59
+ "kind": {
60
+ "const": "state"
61
+ }
62
+ },
63
+ "required": [
64
+ "kind"
65
+ ],
66
+ "additionalProperties": false
67
+ },
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "kind": {
72
+ "const": "prepare"
73
+ }
74
+ },
75
+ "required": [
76
+ "kind"
77
+ ],
78
+ "additionalProperties": false
79
+ },
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "kind": {
84
+ "const": "audio.connect"
85
+ },
86
+ "mode": {
87
+ "const": "receive_only"
88
+ }
89
+ },
90
+ "required": [
91
+ "kind"
92
+ ],
93
+ "additionalProperties": false
94
+ },
95
+ {
96
+ "type": "object",
97
+ "properties": {
98
+ "kind": {
99
+ "const": "audio.close"
100
+ }
101
+ },
102
+ "required": [
103
+ "kind"
104
+ ],
105
+ "additionalProperties": false
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "kind": {
111
+ "const": "audio.microphone"
112
+ },
113
+ "muted": {
114
+ "type": "boolean"
115
+ }
116
+ },
117
+ "required": [
118
+ "kind",
119
+ "muted"
120
+ ],
121
+ "additionalProperties": false
122
+ },
123
+ {
124
+ "type": "object",
125
+ "properties": {
126
+ "kind": {
127
+ "const": "audio.speaker"
128
+ },
129
+ "muted": {
130
+ "type": "boolean"
131
+ }
132
+ },
133
+ "required": [
134
+ "kind",
135
+ "muted"
136
+ ],
137
+ "additionalProperties": false
138
+ },
139
+ {
140
+ "type": "object",
141
+ "properties": {
142
+ "kind": {
143
+ "const": "stop"
144
+ }
145
+ },
146
+ "required": [
147
+ "kind"
148
+ ],
149
+ "additionalProperties": false
150
+ },
151
+ {
152
+ "type": "object",
153
+ "properties": {
154
+ "kind": {
155
+ "const": "text"
156
+ },
157
+ "text": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 8000
161
+ },
162
+ "clientMessageId": {
163
+ "type": "string",
164
+ "format": "uuid"
165
+ }
166
+ },
167
+ "required": [
168
+ "kind",
169
+ "text",
170
+ "clientMessageId"
171
+ ],
172
+ "additionalProperties": false
173
+ },
174
+ {
175
+ "type": "object",
176
+ "properties": {
177
+ "kind": {
178
+ "const": "documents"
179
+ },
180
+ "allowed": {
181
+ "type": "boolean"
182
+ }
183
+ },
184
+ "required": [
185
+ "kind",
186
+ "allowed"
187
+ ],
188
+ "additionalProperties": false
189
+ },
190
+ {
191
+ "type": "object",
192
+ "properties": {
193
+ "kind": {
194
+ "const": "screen.pick"
195
+ }
196
+ },
197
+ "required": [
198
+ "kind"
199
+ ],
200
+ "additionalProperties": false
201
+ },
202
+ {
203
+ "type": "object",
204
+ "properties": {
205
+ "kind": {
206
+ "const": "screen.open"
207
+ },
208
+ "selectionId": {
209
+ "$ref": "#/$defs/CompanionSelectionId"
210
+ },
211
+ "label": {
212
+ "type": "string",
213
+ "minLength": 1,
214
+ "maxLength": 256
215
+ }
216
+ },
217
+ "required": [
218
+ "kind",
219
+ "selectionId",
220
+ "label"
221
+ ],
222
+ "additionalProperties": false
223
+ },
224
+ {
225
+ "type": "object",
226
+ "properties": {
227
+ "kind": {
228
+ "const": "screen.frame"
229
+ },
230
+ "selectionId": {
231
+ "$ref": "#/$defs/CompanionSelectionId"
232
+ },
233
+ "frame": {
234
+ "$ref": "#/$defs/CompanionScreenFrame"
235
+ }
236
+ },
237
+ "required": [
238
+ "kind",
239
+ "selectionId",
240
+ "frame"
241
+ ],
242
+ "additionalProperties": false
243
+ },
244
+ {
245
+ "type": "object",
246
+ "properties": {
247
+ "kind": {
248
+ "const": "screen.close"
249
+ }
250
+ },
251
+ "required": [
252
+ "kind"
253
+ ],
254
+ "additionalProperties": false
255
+ },
256
+ {
257
+ "type": "object",
258
+ "properties": {
259
+ "kind": {
260
+ "const": "conversation.open"
261
+ }
262
+ },
263
+ "required": [
264
+ "kind"
265
+ ],
266
+ "additionalProperties": false
267
+ },
268
+ {
269
+ "type": "object",
270
+ "properties": {
271
+ "kind": { "const": "decisions.read" },
272
+ "offset": { "type": "integer", "minimum": 0 },
273
+ "limit": { "type": "integer", "minimum": 1, "maximum": 20 }
274
+ },
275
+ "required": ["kind", "offset", "limit"],
276
+ "additionalProperties": false
277
+ },
278
+ {
279
+ "type": "object",
280
+ "properties": {
281
+ "kind": { "const": "f221.inspect" },
282
+ "proposalId": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,200}$" }
283
+ },
284
+ "required": ["kind", "proposalId"],
285
+ "additionalProperties": false
286
+ },
287
+ {
288
+ "type": "object",
289
+ "properties": {
290
+ "kind": {
291
+ "const": "view.resize"
292
+ },
293
+ "expanded": {
294
+ "type": "boolean"
295
+ }
296
+ },
297
+ "required": [
298
+ "kind",
299
+ "expanded"
300
+ ],
301
+ "additionalProperties": false
302
+ },
303
+ {
304
+ "type": "object",
305
+ "properties": {
306
+ "kind": {
307
+ "const": "view.layout"
308
+ },
309
+ "panel": {
310
+ "enum": [
311
+ "none",
312
+ "bubble",
313
+ "actions",
314
+ "menu",
315
+ "chat",
316
+ "decisions"
317
+ ]
318
+ },
319
+ "width": {
320
+ "type": "integer",
321
+ "minimum": 120,
322
+ "maximum": 420
323
+ },
324
+ "height": {
325
+ "type": "integer",
326
+ "minimum": 32,
327
+ "maximum": 500
328
+ }
329
+ },
330
+ "required": [
331
+ "kind",
332
+ "panel",
333
+ "width",
334
+ "height"
335
+ ],
336
+ "additionalProperties": false
337
+ },
338
+ {
339
+ "type": "object",
340
+ "properties": {
341
+ "kind": {
342
+ "const": "view.drag"
343
+ },
344
+ "phase": {
345
+ "enum": [
346
+ "start",
347
+ "end"
348
+ ]
349
+ }
350
+ },
351
+ "required": [
352
+ "kind",
353
+ "phase"
354
+ ],
355
+ "additionalProperties": false
356
+ },
357
+ {
358
+ "type": "object",
359
+ "properties": {
360
+ "kind": {
361
+ "const": "view.hide"
362
+ }
363
+ },
364
+ "required": [
365
+ "kind"
366
+ ],
367
+ "additionalProperties": false
368
+ },
369
+ {
370
+ "type": "object",
371
+ "properties": {
372
+ "kind": {
373
+ "const": "conversation.read"
374
+ }
375
+ },
376
+ "required": [
377
+ "kind"
378
+ ],
379
+ "additionalProperties": false
380
+ }
381
+ ]
382
+ },
383
+ "CompanionActor": {
384
+ "type": "object",
385
+ "properties": {
386
+ "catId": {
387
+ "type": "string",
388
+ "minLength": 1,
389
+ "maxLength": 160
390
+ },
391
+ "displayName": {
392
+ "type": "string",
393
+ "minLength": 1,
394
+ "maxLength": 256
395
+ }
396
+ },
397
+ "required": [
398
+ "catId",
399
+ "displayName"
400
+ ],
401
+ "additionalProperties": false
402
+ },
403
+ "CompanionIdentitySnapshotV1": {
404
+ "type": "object",
405
+ "description": "Immutable display identity saved with one historical message. The real author and source remain on the message itself.",
406
+ "properties": {
407
+ "v": { "const": 1 },
408
+ "name": { "const": "猫猫球" },
409
+ "partner": {
410
+ "type": "object",
411
+ "properties": {
412
+ "catId": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" },
413
+ "displayName": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" },
414
+ "skin": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" }
415
+ },
416
+ "required": ["catId", "displayName", "skin"],
417
+ "additionalProperties": false
418
+ },
419
+ "live": {
420
+ "type": "object",
421
+ "properties": {
422
+ "catId": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" },
423
+ "displayName": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" },
424
+ "transport": { "const": "gpt_live_v3" },
425
+ "verifiedModel": {
426
+ "type": ["string", "null"], "minLength": 1, "maxLength": 160, "pattern": "\\S"
427
+ }
428
+ },
429
+ "required": ["catId", "displayName", "transport", "verifiedModel"],
430
+ "additionalProperties": false
431
+ },
432
+ "deep": {
433
+ "type": "object",
434
+ "properties": {
435
+ "catId": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" },
436
+ "displayName": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "\\S" },
437
+ "verifiedModel": {
438
+ "type": ["string", "null"], "minLength": 1, "maxLength": 160, "pattern": "\\S"
439
+ }
440
+ },
441
+ "required": ["catId", "displayName", "verifiedModel"],
442
+ "additionalProperties": false
443
+ }
444
+ },
445
+ "required": ["v", "name", "partner", "live", "deep"],
446
+ "additionalProperties": false
447
+ },
448
+ "CompanionLiveTransport": {
449
+ "type": "object",
450
+ "properties": {
451
+ "kind": { "const": "gpt_live_v3" },
452
+ "verifiedModel": { "type": "null" }
453
+ },
454
+ "required": ["kind", "verifiedModel"],
455
+ "additionalProperties": false
456
+ },
457
+ "CompanionAudioState": {
458
+ "type": "object",
459
+ "properties": {
460
+ "supportedModes": {
461
+ "type": "array",
462
+ "minItems": 1,
463
+ "maxItems": 2,
464
+ "uniqueItems": true,
465
+ "items": { "enum": ["duplex", "receive_only"] }
466
+ },
467
+ "activeMode": {
468
+ "oneOf": [
469
+ { "enum": ["duplex", "receive_only"] },
470
+ { "type": "null" }
471
+ ]
472
+ }
473
+ },
474
+ "required": ["supportedModes", "activeMode"],
475
+ "additionalProperties": false
476
+ },
477
+ "CompanionNativeWorkEntry": {
478
+ "type": "object",
479
+ "properties": {
480
+ "taskId": { "type": "string", "minLength": 1, "maxLength": 500 },
481
+ "nativeTurnId": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,160}$" },
482
+ "kind": { "enum": ["reasoning", "tool", "workspace_fetch", "workspace_dispatch", "screen_read"] },
483
+ "startedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
484
+ "expiresAt": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }
485
+ },
486
+ "required": ["taskId", "nativeTurnId", "kind", "startedAt", "expiresAt"],
487
+ "additionalProperties": false
488
+ },
489
+ "CompanionNativeWorkEvent": {
490
+ "type": "object",
491
+ "properties": {
492
+ "eventId": { "type": "string", "minLength": 1, "maxLength": 500 },
493
+ "taskId": { "type": "string", "minLength": 1, "maxLength": 500 },
494
+ "kind": { "enum": ["reasoning", "tool", "workspace_fetch", "workspace_dispatch", "screen_read", "result"] },
495
+ "phase": { "enum": ["started", "completed", "failed", "cancelled", "expired", "result_handed_to_voice"] },
496
+ "occurredAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
497
+ "expiresAt": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
498
+ "resultId": { "type": "string", "minLength": 1, "maxLength": 500 },
499
+ "nativeCarrierCatId": { "type": "string", "minLength": 1, "maxLength": 160 }
500
+ },
501
+ "required": ["eventId", "taskId", "kind", "phase", "occurredAt", "expiresAt"],
502
+ "additionalProperties": false
503
+ },
504
+ "CompanionNativeWork": {
505
+ "type": "object",
506
+ "properties": {
507
+ "scopeId": { "type": ["string", "null"], "pattern": "^[0-9a-f]{16}$" },
508
+ "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
509
+ "active": { "type": "array", "maxItems": 64, "items": { "$ref": "#/$defs/CompanionNativeWorkEntry" } },
510
+ "recent": { "type": "array", "maxItems": 16, "items": { "$ref": "#/$defs/CompanionNativeWorkEvent" } }
511
+ },
512
+ "required": ["scopeId", "revision", "active", "recent"],
513
+ "additionalProperties": false
514
+ },
515
+ "CompanionState": {
516
+ "type": "object",
517
+ "properties": {
518
+ "kind": {
519
+ "const": "state"
520
+ },
521
+ "phase": {
522
+ "enum": [
523
+ "idle",
524
+ "preparing",
525
+ "ready",
526
+ "connecting",
527
+ "talking",
528
+ "closed",
529
+ "failed"
530
+ ]
531
+ },
532
+ "displayName": {
533
+ "type": "string",
534
+ "minLength": 1,
535
+ "maxLength": 256
536
+ },
537
+ "skin": {
538
+ "type": "string",
539
+ "minLength": 1,
540
+ "maxLength": 100
541
+ },
542
+ "duty": {
543
+ "$ref": "#/$defs/CompanionActor"
544
+ },
545
+ "carrier": {
546
+ "$ref": "#/$defs/CompanionActor"
547
+ },
548
+ "documentsAllowed": {
549
+ "type": "boolean"
550
+ },
551
+ "toolsReady": {
552
+ "type": "boolean"
553
+ },
554
+ "nativeActivity": {
555
+ "enum": ["none", "reasoning", "tool_running"]
556
+ },
557
+ "liveTransport": {
558
+ "$ref": "#/$defs/CompanionLiveTransport"
559
+ },
560
+ "audio": {
561
+ "$ref": "#/$defs/CompanionAudioState"
562
+ },
563
+ "nativeWork": {
564
+ "$ref": "#/$defs/CompanionNativeWork"
565
+ }
566
+ },
567
+ "required": [
568
+ "kind",
569
+ "phase",
570
+ "displayName",
571
+ "skin",
572
+ "duty",
573
+ "carrier",
574
+ "documentsAllowed",
575
+ "toolsReady",
576
+ "nativeActivity",
577
+ "liveTransport",
578
+ "nativeWork"
579
+ ],
580
+ "additionalProperties": false
581
+ },
582
+ "CompanionDecisions": {
583
+ "type": "object",
584
+ "properties": {
585
+ "kind": { "const": "decisions" },
586
+ "status": { "enum": ["available", "unavailable"] },
587
+ "approvalCount": { "type": ["integer", "null"], "minimum": 0 },
588
+ "needsMeCount": { "type": ["integer", "null"], "minimum": 0 },
589
+ "otherNeedsMeCount": { "type": ["integer", "null"], "minimum": 0 },
590
+ "approvals": {
591
+ "type": "array",
592
+ "maxItems": 20,
593
+ "items": {
594
+ "type": "object",
595
+ "properties": {
596
+ "proposalId": { "type": "string", "minLength": 1, "maxLength": 200 },
597
+ "sourceFeatureId": { "type": "string", "minLength": 1, "maxLength": 40 },
598
+ "summary": { "type": "string", "maxLength": 500 },
599
+ "resolution": { "enum": ["open", "accepted", "rejected", "closed_without_decision"] },
600
+ "materializationState": { "enum": ["not_started", "outcome_unknown", "in_progress", "succeeded", "failed"] },
601
+ "linkedNeedsMe": { "type": "boolean" }
602
+ },
603
+ "required": ["proposalId", "sourceFeatureId", "summary", "resolution", "materializationState", "linkedNeedsMe"],
604
+ "additionalProperties": false
605
+ }
606
+ },
607
+ "otherNeedsMe": {
608
+ "type": "array",
609
+ "maxItems": 20,
610
+ "items": {
611
+ "type": "object",
612
+ "properties": {
613
+ "subjectRef": { "type": "string", "minLength": 1, "maxLength": 256 },
614
+ "summary": { "type": "string", "maxLength": 500 }
615
+ },
616
+ "required": ["subjectRef", "summary"],
617
+ "additionalProperties": false
618
+ }
619
+ },
620
+ "page": {
621
+ "type": "object",
622
+ "properties": {
623
+ "offset": { "type": "integer", "minimum": 0 },
624
+ "limit": { "type": "integer", "minimum": 1, "maximum": 20 },
625
+ "hasMoreApprovals": { "type": "boolean" },
626
+ "hasMoreNeedsMe": { "type": "boolean" }
627
+ },
628
+ "required": ["offset", "limit", "hasMoreApprovals", "hasMoreNeedsMe"],
629
+ "additionalProperties": false
630
+ }
631
+ },
632
+ "required": ["kind", "status", "approvalCount", "needsMeCount", "otherNeedsMeCount", "approvals", "otherNeedsMe", "page"],
633
+ "additionalProperties": false
634
+ },
635
+ "CompanionDecisionTrial": {
636
+ "type": "object",
637
+ "properties": {
638
+ "kind": { "const": "decision-trial" },
639
+ "status": { "enum": ["dismissed", "trial_confirmed", "stale", "unavailable"] }
640
+ },
641
+ "required": ["kind", "status"],
642
+ "additionalProperties": false
643
+ },
644
+ "CompanionErrorCode": {
645
+ "enum": [
646
+ "invalid_request",
647
+ "permission_required",
648
+ "unavailable",
649
+ "session_required",
650
+ "busy",
651
+ "selection_changed",
652
+ "carrier_unavailable",
653
+ "cancelled",
654
+ "unconfirmed"
655
+ ]
656
+ },
657
+ "CompanionReply": {
658
+ "oneOf": [
659
+ {
660
+ "type": "object",
661
+ "properties": {
662
+ "kind": {
663
+ "const": "ok"
664
+ }
665
+ },
666
+ "required": [
667
+ "kind"
668
+ ],
669
+ "additionalProperties": false
670
+ },
671
+ {
672
+ "$ref": "#/$defs/CompanionState"
673
+ },
674
+ {
675
+ "$ref": "#/$defs/CompanionDecisions"
676
+ },
677
+ {
678
+ "$ref": "#/$defs/CompanionDecisionTrial"
679
+ },
680
+ {
681
+ "type": "object",
682
+ "properties": {
683
+ "kind": {
684
+ "const": "delivery"
685
+ },
686
+ "delivery": {
687
+ "enum": [
688
+ "accepted",
689
+ "unconfirmed"
690
+ ]
691
+ }
692
+ },
693
+ "required": [
694
+ "kind",
695
+ "delivery"
696
+ ],
697
+ "additionalProperties": false
698
+ },
699
+ {
700
+ "type": "object",
701
+ "properties": {
702
+ "kind": {
703
+ "const": "selection"
704
+ },
705
+ "selectionId": {
706
+ "$ref": "#/$defs/CompanionSelectionId"
707
+ }
708
+ },
709
+ "required": [
710
+ "kind",
711
+ "selectionId"
712
+ ],
713
+ "additionalProperties": false
714
+ },
715
+ {
716
+ "type": "object",
717
+ "properties": {
718
+ "kind": {
719
+ "const": "navigation"
720
+ },
721
+ "delivery": {
722
+ "enum": [
723
+ "requested",
724
+ "unconfirmed"
725
+ ]
726
+ }
727
+ },
728
+ "required": [
729
+ "kind",
730
+ "delivery"
731
+ ],
732
+ "additionalProperties": false
733
+ },
734
+ {
735
+ "type": "object",
736
+ "properties": {
737
+ "kind": {
738
+ "const": "error"
739
+ },
740
+ "code": {
741
+ "$ref": "#/$defs/CompanionErrorCode"
742
+ }
743
+ },
744
+ "required": [
745
+ "kind",
746
+ "code"
747
+ ],
748
+ "additionalProperties": false
749
+ },
750
+ {
751
+ "type": "object",
752
+ "properties": {
753
+ "kind": {
754
+ "const": "layout"
755
+ },
756
+ "pet": {
757
+ "type": "object",
758
+ "properties": {
759
+ "x": {
760
+ "type": "number"
761
+ },
762
+ "y": {
763
+ "type": "number"
764
+ }
765
+ },
766
+ "required": [
767
+ "x",
768
+ "y"
769
+ ],
770
+ "additionalProperties": false
771
+ },
772
+ "panel": {
773
+ "type": "object",
774
+ "properties": {
775
+ "x": {
776
+ "type": "number"
777
+ },
778
+ "y": {
779
+ "type": "number"
780
+ },
781
+ "width": {
782
+ "type": "number",
783
+ "minimum": 0,
784
+ "maximum": 2000
785
+ },
786
+ "height": {
787
+ "type": "number",
788
+ "minimum": 0,
789
+ "maximum": 2000
790
+ }
791
+ },
792
+ "required": [
793
+ "x",
794
+ "y",
795
+ "width",
796
+ "height"
797
+ ],
798
+ "additionalProperties": false
799
+ },
800
+ "width": {
801
+ "type": "integer",
802
+ "minimum": 1,
803
+ "maximum": 2000
804
+ },
805
+ "height": {
806
+ "type": "integer",
807
+ "minimum": 1,
808
+ "maximum": 2000
809
+ }
810
+ },
811
+ "required": [
812
+ "kind",
813
+ "pet",
814
+ "panel",
815
+ "width",
816
+ "height"
817
+ ],
818
+ "additionalProperties": false
819
+ },
820
+ {
821
+ "type": "object",
822
+ "properties": {
823
+ "kind": {
824
+ "const": "conversation"
825
+ },
826
+ "threadTitle": {
827
+ "type": "string",
828
+ "minLength": 1,
829
+ "maxLength": 256
830
+ },
831
+ "messages": {
832
+ "type": "array",
833
+ "maxItems": 32,
834
+ "items": {
835
+ "type": "object",
836
+ "properties": {
837
+ "id": {
838
+ "type": "string",
839
+ "maxLength": 256
840
+ },
841
+ "role": {
842
+ "enum": [
843
+ "user",
844
+ "assistant"
845
+ ]
846
+ },
847
+ "text": {
848
+ "type": "string",
849
+ "maxLength": 16000
850
+ },
851
+ "name": {
852
+ "type": "string",
853
+ "maxLength": 256
854
+ },
855
+ "companionIdentity": {
856
+ "$ref": "#/$defs/CompanionIdentitySnapshotV1"
857
+ }
858
+ },
859
+ "required": [
860
+ "id",
861
+ "role",
862
+ "text",
863
+ "name"
864
+ ],
865
+ "additionalProperties": false
866
+ }
867
+ },
868
+ "hasMore": {
869
+ "type": "boolean"
870
+ }
871
+ },
872
+ "required": [
873
+ "kind",
874
+ "threadTitle",
875
+ "messages",
876
+ "hasMore"
877
+ ],
878
+ "additionalProperties": false
879
+ }
880
+ ]
881
+ },
882
+ "CompanionEvent": {
883
+ "oneOf": [
884
+ {
885
+ "type": "object",
886
+ "properties": {
887
+ "kind": {
888
+ "const": "media-stopped"
889
+ },
890
+ "reason": {
891
+ "enum": [
892
+ "locked",
893
+ "suspended",
894
+ "hidden",
895
+ "closed",
896
+ "revoked"
897
+ ]
898
+ }
899
+ },
900
+ "required": [
901
+ "kind",
902
+ "reason"
903
+ ],
904
+ "additionalProperties": false
905
+ },
906
+ {
907
+ "type": "object",
908
+ "properties": {
909
+ "kind": {
910
+ "const": "audio"
911
+ },
912
+ "type": {
913
+ "enum": [
914
+ "connected",
915
+ "recovering",
916
+ "recovered",
917
+ "error"
918
+ ]
919
+ }
920
+ },
921
+ "required": [
922
+ "kind",
923
+ "type"
924
+ ],
925
+ "additionalProperties": false
926
+ },
927
+ {
928
+ "type": "object",
929
+ "properties": {
930
+ "kind": {
931
+ "const": "audio"
932
+ },
933
+ "type": {
934
+ "const": "transcript"
935
+ },
936
+ "role": {
937
+ "enum": [
938
+ "user",
939
+ "assistant"
940
+ ]
941
+ },
942
+ "text": {
943
+ "type": "string",
944
+ "maxLength": 16000
945
+ },
946
+ "turnId": {
947
+ "type": "string",
948
+ "minLength": 1,
949
+ "maxLength": 256
950
+ },
951
+ "itemId": {
952
+ "type": "string",
953
+ "minLength": 1,
954
+ "maxLength": 256
955
+ }
956
+ },
957
+ "required": [
958
+ "kind",
959
+ "type",
960
+ "role",
961
+ "text"
962
+ ],
963
+ "additionalProperties": false
964
+ },
965
+ {
966
+ "type": "object",
967
+ "properties": {
968
+ "kind": {
969
+ "const": "audio"
970
+ },
971
+ "type": {
972
+ "const": "turn-done"
973
+ },
974
+ "role": {
975
+ "enum": [
976
+ "user",
977
+ "assistant"
978
+ ]
979
+ },
980
+ "transcript": {
981
+ "type": "string",
982
+ "maxLength": 16000
983
+ },
984
+ "turnId": {
985
+ "type": "string",
986
+ "minLength": 1,
987
+ "maxLength": 256
988
+ }
989
+ },
990
+ "required": [
991
+ "kind",
992
+ "type"
993
+ ],
994
+ "additionalProperties": false
995
+ },
996
+ {
997
+ "type": "object",
998
+ "properties": {
999
+ "kind": {
1000
+ "const": "view-dismiss"
1001
+ }
1002
+ },
1003
+ "required": [
1004
+ "kind"
1005
+ ],
1006
+ "additionalProperties": false
1007
+ }
1008
+ ]
1009
+ }
1010
+ }
1011
+ }