@kriya-ai/harness 0.0.0-stage → 0.2.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 (185) hide show
  1. package/README.md +379 -2
  2. package/SAFETY.md +162 -0
  3. package/THIRD_PARTY_NOTICES.md +7911 -0
  4. package/bin/kriya.js +577 -0
  5. package/bundle/cordis.patch.yml +397 -0
  6. package/contract/SOURCE.md +15 -0
  7. package/contract/contract.json +1355 -0
  8. package/package.json +57 -4
  9. package/plugins/anchor/index.js +56 -0
  10. package/plugins/anchor/package.json +13 -0
  11. package/plugins/approvals/index.js +183 -0
  12. package/plugins/approvals/package.json +13 -0
  13. package/plugins/brand/DESIGN.md +112 -0
  14. package/plugins/brand/client.js +826 -0
  15. package/plugins/brand/index.js +15 -0
  16. package/plugins/brand/package.json +25 -0
  17. package/plugins/brand/src/client.js +823 -0
  18. package/plugins/browser/index.js +218 -0
  19. package/plugins/browser/package.json +13 -0
  20. package/plugins/budget/index.js +108 -0
  21. package/plugins/budget/package.json +13 -0
  22. package/plugins/changes/client.js +245 -0
  23. package/plugins/changes/index.js +75 -0
  24. package/plugins/changes/package.json +22 -0
  25. package/plugins/edit/client.js +113 -0
  26. package/plugins/edit/index.js +58 -0
  27. package/plugins/edit/package.json +23 -0
  28. package/plugins/fs-freshness/index.js +28 -0
  29. package/plugins/fs-freshness/package.json +13 -0
  30. package/plugins/graph/client.js +178 -0
  31. package/plugins/graph/index.js +4 -0
  32. package/plugins/graph/package.json +22 -0
  33. package/plugins/kriya-handoff/index.js +194 -0
  34. package/plugins/kriya-handoff/package.json +13 -0
  35. package/plugins/kriya-tools/index.js +189 -0
  36. package/plugins/kriya-tools/package.json +13 -0
  37. package/plugins/loop/index.js +743 -0
  38. package/plugins/loop/package.json +13 -0
  39. package/plugins/mirror/index.js +235 -0
  40. package/plugins/mirror/package.json +13 -0
  41. package/plugins/overview/client.js +276 -0
  42. package/plugins/overview/index.js +95 -0
  43. package/plugins/overview/package.json +22 -0
  44. package/plugins/preview/client.js +337 -0
  45. package/plugins/preview/index.js +4 -0
  46. package/plugins/preview/package.json +22 -0
  47. package/plugins/progress/client.js +290 -0
  48. package/plugins/progress/index.js +100 -0
  49. package/plugins/progress/package.json +22 -0
  50. package/plugins/projects/client.js +249 -0
  51. package/plugins/projects/index.js +30 -0
  52. package/plugins/projects/package.json +24 -0
  53. package/plugins/rea/index.js +256 -0
  54. package/plugins/rea/package.json +10 -0
  55. package/plugins/rea/skill/LICENSE +21 -0
  56. package/plugins/rea/skill/SKILL.md +360 -0
  57. package/plugins/rea/skill/references/android-applications.md +36 -0
  58. package/plugins/rea/skill/references/connection-and-recovery.md +127 -0
  59. package/plugins/rea/skill/references/evidence-workflows.md +71 -0
  60. package/plugins/rea/skill/references/javascript-applications.md +218 -0
  61. package/plugins/rea/skill/references/native-and-artifacts.md +297 -0
  62. package/plugins/rea/skill/references/runtime-observation.md +78 -0
  63. package/plugins/remote/index.js +297 -0
  64. package/plugins/remote/package.json +10 -0
  65. package/plugins/router/index.js +84 -0
  66. package/plugins/router/package.json +13 -0
  67. package/plugins/sessions/client.js +68 -0
  68. package/plugins/sessions/index.js +79 -0
  69. package/plugins/sessions/package.json +20 -0
  70. package/plugins/skills/client.js +504 -0
  71. package/plugins/skills/index.js +166 -0
  72. package/plugins/skills/package.json +23 -0
  73. package/src/api.js +97 -0
  74. package/src/browser.js +286 -0
  75. package/src/changes.js +191 -0
  76. package/src/checkpoints.js +313 -0
  77. package/src/daemon.js +503 -0
  78. package/src/doctor.js +137 -0
  79. package/src/edit/core/anchors.js +102 -0
  80. package/src/edit/core/audio.js +158 -0
  81. package/src/edit/core/faces.js +99 -0
  82. package/src/edit/core/ffmpeg.js +258 -0
  83. package/src/edit/core/handoff.js +220 -0
  84. package/src/edit/core/history.js +90 -0
  85. package/src/edit/core/layout.js +92 -0
  86. package/src/edit/core/mix.js +115 -0
  87. package/src/edit/core/ops.js +602 -0
  88. package/src/edit/core/plan.js +266 -0
  89. package/src/edit/core/project.d.ts +134 -0
  90. package/src/edit/core/project.js +307 -0
  91. package/src/edit/core/reframe.js +125 -0
  92. package/src/edit/core/solver.js +416 -0
  93. package/src/edit/core/time.js +110 -0
  94. package/src/edit/core/tonemap.js +57 -0
  95. package/src/edit/director/ask.js +120 -0
  96. package/src/edit/director/gateway.js +16 -0
  97. package/src/edit/director/revise.js +186 -0
  98. package/src/edit/engine/capabilities.js +33 -0
  99. package/src/edit/engine/captions.js +154 -0
  100. package/src/edit/engine/color.js +269 -0
  101. package/src/edit/engine/confine.js +67 -0
  102. package/src/edit/engine/dna.js +148 -0
  103. package/src/edit/engine/index.js +473 -0
  104. package/src/edit/engine/loudness.js +43 -0
  105. package/src/edit/engine/media.js +57 -0
  106. package/src/edit/engine/motion.js +281 -0
  107. package/src/edit/engine/packs.js +87 -0
  108. package/src/edit/engine/probe.js +101 -0
  109. package/src/edit/engine/receipt.js +123 -0
  110. package/src/edit/engine/tool.js +101 -0
  111. package/src/edit/gates/copy.js +113 -0
  112. package/src/edit/gates/index.js +430 -0
  113. package/src/edit/gates/picture.js +130 -0
  114. package/src/edit/gates/sound.js +58 -0
  115. package/src/edit/gates/speech.js +127 -0
  116. package/src/edit/gates/text.js +196 -0
  117. package/src/edit/gates/text.swift +22 -0
  118. package/src/edit/graph/index.js +139 -0
  119. package/src/edit/graph/journal.js +69 -0
  120. package/src/edit/graph/scheduler.js +79 -0
  121. package/src/edit/host/client.js +58 -0
  122. package/src/edit/host/deliver.js +119 -0
  123. package/src/edit/host/jobs.js +84 -0
  124. package/src/edit/host/main.js +135 -0
  125. package/src/edit/host/paths.js +11 -0
  126. package/src/edit/host/projects.js +415 -0
  127. package/src/edit/host/server.js +391 -0
  128. package/src/edit/host/taste.js +135 -0
  129. package/src/edit/host/tavi.js +417 -0
  130. package/src/edit/host/watch.js +141 -0
  131. package/src/edit/index/db.js +109 -0
  132. package/src/edit/index/index.js +236 -0
  133. package/src/edit/index/layers/faces.js +78 -0
  134. package/src/edit/index/layers/faces.swift +18 -0
  135. package/src/edit/index/layers/meta.js +35 -0
  136. package/src/edit/index/layers/music.js +146 -0
  137. package/src/edit/index/layers/quality.js +120 -0
  138. package/src/edit/index/layers/retakes.js +132 -0
  139. package/src/edit/index/layers/screen.js +99 -0
  140. package/src/edit/index/layers/shots.js +29 -0
  141. package/src/edit/index/layers/sound.js +42 -0
  142. package/src/edit/index/layers/words.js +64 -0
  143. package/src/edit/index/story.js +248 -0
  144. package/src/edit/index/views.js +71 -0
  145. package/src/edit/loop/governor.js +112 -0
  146. package/src/edit/loop/loop.js +69 -0
  147. package/src/edit/loop/make.js +115 -0
  148. package/src/edit/loop/repair.js +97 -0
  149. package/src/edit/loop/replay.js +32 -0
  150. package/src/edit/recipes/multicam.js +461 -0
  151. package/src/edit/recipes/reel.js +202 -0
  152. package/src/edit/recipes/short-from-long.js +237 -0
  153. package/src/edit/recipes/tutorial.js +137 -0
  154. package/src/edit/recipes/youtube.js +155 -0
  155. package/src/edit/runtime/cli.js +126 -0
  156. package/src/edit/runtime/doctor.js +122 -0
  157. package/src/edit/runtime/fetch.js +15 -0
  158. package/src/edit/runtime/licences.js +88 -0
  159. package/src/edit/runtime/manifest.js +73 -0
  160. package/src/edit/runtime/setup.js +252 -0
  161. package/src/failure.js +69 -0
  162. package/src/gateway-proxy.js +213 -0
  163. package/src/intent.js +130 -0
  164. package/src/launch.js +315 -0
  165. package/src/live.js +81 -0
  166. package/src/local-skills.js +284 -0
  167. package/src/login.js +82 -0
  168. package/src/loop.js +428 -0
  169. package/src/modes.js +128 -0
  170. package/src/overview.js +71 -0
  171. package/src/paths.js +30 -0
  172. package/src/profiles.js +92 -0
  173. package/src/projects.js +104 -0
  174. package/src/recon.js +244 -0
  175. package/src/rules.js +139 -0
  176. package/src/runner.bundle.js +21172 -0
  177. package/src/sentinel.js +248 -0
  178. package/src/skill-switches.js +130 -0
  179. package/src/store.js +58 -0
  180. package/src/strict.js +124 -0
  181. package/src/verify.js +659 -0
  182. package/src/world.js +268 -0
  183. package/studio/dist/index.html +14 -0
  184. package/studio/dist/studio.css +163 -0
  185. package/studio/dist/studio.js +1 -0
@@ -0,0 +1,1355 @@
1
+ {
2
+ "basePath": "/api/harness/v1",
3
+ "headers": {
4
+ "version": "X-Kriya-Harness",
5
+ "auth": "Authorization: Bearer <device token>"
6
+ },
7
+ "error": {
8
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
9
+ "type": "object",
10
+ "properties": {
11
+ "error": {
12
+ "type": "string",
13
+ "enum": [
14
+ "not_found",
15
+ "bad_request",
16
+ "upgrade",
17
+ "unauthorized",
18
+ "suspended",
19
+ "rate_limited",
20
+ "pending",
21
+ "denied",
22
+ "expired",
23
+ "server_error",
24
+ "harness_off",
25
+ "plan_not_allowed",
26
+ "tier_not_allowed",
27
+ "cap_reached",
28
+ "not_priced",
29
+ "upstream_unavailable",
30
+ "context_length_exceeded",
31
+ "no_agent",
32
+ "mirror_summary_only",
33
+ "not_connected",
34
+ "too_large",
35
+ "patch_mismatch",
36
+ "no_checkpoint",
37
+ "task_refused"
38
+ ]
39
+ },
40
+ "message": {
41
+ "type": "string"
42
+ },
43
+ "minVersion": {
44
+ "type": "string"
45
+ },
46
+ "retryAfter": {
47
+ "type": "integer",
48
+ "minimum": -9007199254740991,
49
+ "maximum": 9007199254740991
50
+ }
51
+ },
52
+ "required": ["error", "message"],
53
+ "additionalProperties": false
54
+ },
55
+ "routes": [
56
+ {
57
+ "method": "POST",
58
+ "path": "/device/code",
59
+ "auth": false,
60
+ "request": {
61
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
62
+ "type": "object",
63
+ "properties": {
64
+ "deviceName": {
65
+ "type": "string",
66
+ "minLength": 1,
67
+ "maxLength": 60
68
+ },
69
+ "platform": {
70
+ "type": "string",
71
+ "enum": ["darwin", "linux", "win32"]
72
+ },
73
+ "clientVersion": {
74
+ "type": "string",
75
+ "pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
76
+ }
77
+ },
78
+ "required": ["deviceName", "platform", "clientVersion"],
79
+ "additionalProperties": false
80
+ },
81
+ "response": {
82
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
83
+ "type": "object",
84
+ "properties": {
85
+ "deviceCode": {
86
+ "type": "string",
87
+ "pattern": "^[A-Za-z0-9_-]{43}$"
88
+ },
89
+ "userCode": {
90
+ "type": "string",
91
+ "pattern": "^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$"
92
+ },
93
+ "verificationUrl": {
94
+ "type": "string",
95
+ "format": "uri"
96
+ },
97
+ "expiresIn": {
98
+ "type": "number",
99
+ "const": 600
100
+ },
101
+ "interval": {
102
+ "type": "number",
103
+ "const": 5
104
+ }
105
+ },
106
+ "required": [
107
+ "deviceCode",
108
+ "userCode",
109
+ "verificationUrl",
110
+ "expiresIn",
111
+ "interval"
112
+ ],
113
+ "additionalProperties": false
114
+ }
115
+ },
116
+ {
117
+ "method": "POST",
118
+ "path": "/device/token",
119
+ "auth": false,
120
+ "request": {
121
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
122
+ "type": "object",
123
+ "properties": {
124
+ "deviceCode": {
125
+ "type": "string",
126
+ "pattern": "^[A-Za-z0-9_-]{43}$"
127
+ }
128
+ },
129
+ "required": ["deviceCode"],
130
+ "additionalProperties": false
131
+ },
132
+ "response": {
133
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
134
+ "type": "object",
135
+ "properties": {
136
+ "token": {
137
+ "type": "string",
138
+ "pattern": "^[A-Za-z0-9_-]{43}$"
139
+ },
140
+ "deviceId": {
141
+ "type": "string",
142
+ "format": "uuid",
143
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
144
+ }
145
+ },
146
+ "required": ["token", "deviceId"],
147
+ "additionalProperties": false
148
+ }
149
+ },
150
+ {
151
+ "method": "GET",
152
+ "path": "/me",
153
+ "auth": true,
154
+ "request": null,
155
+ "response": {
156
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
157
+ "type": "object",
158
+ "properties": {
159
+ "displayName": {
160
+ "type": ["string", "null"]
161
+ },
162
+ "plan": {
163
+ "type": "string"
164
+ },
165
+ "harness": {
166
+ "type": "object",
167
+ "properties": {
168
+ "enabled": {
169
+ "type": "boolean"
170
+ },
171
+ "capMicroInr": {
172
+ "type": "integer",
173
+ "minimum": 0,
174
+ "maximum": 9007199254740991
175
+ },
176
+ "usedMicroInr": {
177
+ "type": "integer",
178
+ "minimum": 0,
179
+ "maximum": 9007199254740991
180
+ },
181
+ "unpriced": {
182
+ "type": "integer",
183
+ "minimum": 0,
184
+ "maximum": 9007199254740991
185
+ }
186
+ },
187
+ "required": ["enabled", "capMicroInr", "usedMicroInr", "unpriced"],
188
+ "additionalProperties": false
189
+ },
190
+ "agent": {
191
+ "anyOf": [
192
+ {
193
+ "type": "object",
194
+ "properties": {
195
+ "id": {
196
+ "type": "string"
197
+ },
198
+ "name": {
199
+ "type": "string"
200
+ }
201
+ },
202
+ "required": ["id", "name"],
203
+ "additionalProperties": false
204
+ },
205
+ {
206
+ "type": "null"
207
+ }
208
+ ]
209
+ },
210
+ "minClientVersion": {
211
+ "type": "string",
212
+ "pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
213
+ }
214
+ },
215
+ "required": ["displayName", "plan", "harness", "agent", "minClientVersion"],
216
+ "additionalProperties": false
217
+ }
218
+ },
219
+ {
220
+ "method": "DELETE",
221
+ "path": "/device",
222
+ "auth": true,
223
+ "request": null,
224
+ "response": null
225
+ },
226
+ {
227
+ "method": "GET",
228
+ "path": "/models",
229
+ "auth": true,
230
+ "request": null,
231
+ "response": {
232
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
233
+ "type": "object",
234
+ "properties": {
235
+ "object": {
236
+ "type": "string",
237
+ "const": "list"
238
+ },
239
+ "data": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "object",
243
+ "properties": {
244
+ "id": {
245
+ "type": "string",
246
+ "enum": ["budget", "balanced", "escalation"]
247
+ },
248
+ "object": {
249
+ "type": "string",
250
+ "const": "model"
251
+ },
252
+ "owned_by": {
253
+ "type": "string",
254
+ "const": "kriya"
255
+ },
256
+ "name": {
257
+ "type": "string",
258
+ "pattern": "^[\\p{L}\\p{N} .()+\\/:_-]{1,60}$"
259
+ },
260
+ "contextWindow": {
261
+ "type": "integer",
262
+ "exclusiveMinimum": 0,
263
+ "maximum": 9007199254740991
264
+ },
265
+ "maxOutputTokens": {
266
+ "type": "integer",
267
+ "exclusiveMinimum": 0,
268
+ "maximum": 9007199254740991
269
+ },
270
+ "images": {
271
+ "type": "boolean",
272
+ "const": true
273
+ }
274
+ },
275
+ "required": ["id", "object", "owned_by"],
276
+ "additionalProperties": false
277
+ }
278
+ },
279
+ "bodyEncodings": {
280
+ "type": "array",
281
+ "items": {
282
+ "type": "string",
283
+ "const": "gzip+base64"
284
+ }
285
+ }
286
+ },
287
+ "required": ["object", "data"],
288
+ "additionalProperties": false
289
+ }
290
+ },
291
+ {
292
+ "method": "POST",
293
+ "path": "/chat/completions",
294
+ "auth": true,
295
+ "request": {
296
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
297
+ "type": "object",
298
+ "properties": {
299
+ "model": {
300
+ "type": "string",
301
+ "minLength": 1,
302
+ "maxLength": 100
303
+ },
304
+ "messages": {
305
+ "minItems": 1,
306
+ "maxItems": 2000,
307
+ "type": "array",
308
+ "items": {}
309
+ },
310
+ "stream": {
311
+ "type": "boolean"
312
+ },
313
+ "max_tokens": {
314
+ "type": "integer",
315
+ "exclusiveMinimum": 0,
316
+ "maximum": 9007199254740991
317
+ },
318
+ "max_completion_tokens": {
319
+ "type": "integer",
320
+ "exclusiveMinimum": 0,
321
+ "maximum": 9007199254740991
322
+ }
323
+ },
324
+ "required": ["model", "messages"],
325
+ "additionalProperties": {}
326
+ },
327
+ "response": null
328
+ },
329
+ {
330
+ "method": "POST",
331
+ "path": "/approvals",
332
+ "auth": true,
333
+ "request": {
334
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
335
+ "type": "object",
336
+ "properties": {
337
+ "sessionRef": {
338
+ "type": "string",
339
+ "maxLength": 100
340
+ },
341
+ "tool": {
342
+ "type": "string",
343
+ "minLength": 1,
344
+ "maxLength": 60
345
+ },
346
+ "summary": {
347
+ "type": "string",
348
+ "minLength": 1,
349
+ "maxLength": 300
350
+ },
351
+ "input": {
352
+ "type": "object",
353
+ "propertyNames": {
354
+ "type": "string"
355
+ },
356
+ "additionalProperties": {}
357
+ },
358
+ "cwd": {
359
+ "type": "string",
360
+ "maxLength": 300
361
+ }
362
+ },
363
+ "required": ["sessionRef", "tool", "summary", "input"],
364
+ "additionalProperties": false
365
+ },
366
+ "response": {
367
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
368
+ "type": "object",
369
+ "properties": {
370
+ "id": {
371
+ "type": "string",
372
+ "format": "uuid",
373
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
374
+ },
375
+ "expiresAt": {
376
+ "type": "string",
377
+ "format": "date-time",
378
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
379
+ }
380
+ },
381
+ "required": ["id", "expiresAt"],
382
+ "additionalProperties": false
383
+ }
384
+ },
385
+ {
386
+ "method": "GET",
387
+ "path": "/approvals/{id}",
388
+ "auth": true,
389
+ "request": null,
390
+ "response": {
391
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
392
+ "type": "object",
393
+ "properties": {
394
+ "status": {
395
+ "type": "string",
396
+ "enum": ["pending", "approved", "declined", "expired", "canceled"]
397
+ }
398
+ },
399
+ "required": ["status"],
400
+ "additionalProperties": false
401
+ }
402
+ },
403
+ {
404
+ "method": "DELETE",
405
+ "path": "/approvals/{id}",
406
+ "auth": true,
407
+ "request": null,
408
+ "response": null
409
+ },
410
+ {
411
+ "method": "POST",
412
+ "path": "/sessions",
413
+ "auth": true,
414
+ "request": {
415
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
416
+ "type": "object",
417
+ "properties": {
418
+ "deviceSessionId": {
419
+ "type": "string",
420
+ "minLength": 1,
421
+ "maxLength": 100
422
+ },
423
+ "project": {
424
+ "type": "string",
425
+ "maxLength": 80
426
+ },
427
+ "title": {
428
+ "type": "string",
429
+ "maxLength": 80
430
+ }
431
+ },
432
+ "required": ["deviceSessionId", "project", "title"],
433
+ "additionalProperties": false
434
+ },
435
+ "response": {
436
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
437
+ "type": "object",
438
+ "properties": {
439
+ "sessionId": {
440
+ "type": "string",
441
+ "format": "uuid",
442
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
443
+ },
444
+ "threadId": {
445
+ "type": "string"
446
+ },
447
+ "mirror": {
448
+ "type": "string",
449
+ "enum": ["summary", "full"]
450
+ }
451
+ },
452
+ "required": ["sessionId", "threadId", "mirror"],
453
+ "additionalProperties": false
454
+ }
455
+ },
456
+ {
457
+ "method": "POST",
458
+ "path": "/sessions/{id}/turns",
459
+ "auth": true,
460
+ "request": {
461
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
462
+ "type": "object",
463
+ "properties": {
464
+ "seq": {
465
+ "type": "integer",
466
+ "minimum": 0,
467
+ "maximum": 2147483647
468
+ },
469
+ "text": {
470
+ "type": "string",
471
+ "maxLength": 65536
472
+ },
473
+ "tools": {
474
+ "maxItems": 100,
475
+ "type": "array",
476
+ "items": {
477
+ "type": "object",
478
+ "properties": {
479
+ "name": {
480
+ "type": "string",
481
+ "minLength": 1,
482
+ "maxLength": 60
483
+ },
484
+ "status": {
485
+ "type": "string",
486
+ "enum": ["ok", "error", "declined"]
487
+ },
488
+ "ms": {
489
+ "type": "integer",
490
+ "minimum": 0,
491
+ "maximum": 9007199254740991
492
+ }
493
+ },
494
+ "required": ["name", "status", "ms"],
495
+ "additionalProperties": false
496
+ }
497
+ },
498
+ "full": {
499
+ "type": "object",
500
+ "propertyNames": {
501
+ "type": "string"
502
+ },
503
+ "additionalProperties": {}
504
+ }
505
+ },
506
+ "required": ["seq", "text", "tools"],
507
+ "additionalProperties": false
508
+ },
509
+ "response": null
510
+ },
511
+ {
512
+ "method": "GET",
513
+ "path": "/skills",
514
+ "auth": true,
515
+ "request": null,
516
+ "response": {
517
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
518
+ "type": "object",
519
+ "properties": {
520
+ "skills": {
521
+ "type": "array",
522
+ "items": {
523
+ "type": "object",
524
+ "properties": {
525
+ "id": {
526
+ "type": "string",
527
+ "pattern": "^[a-z][a-z0-9-]{2,40}$"
528
+ },
529
+ "name": {
530
+ "type": "string",
531
+ "minLength": 1,
532
+ "maxLength": 60
533
+ },
534
+ "version": {
535
+ "type": "string",
536
+ "pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
537
+ },
538
+ "description": {
539
+ "type": "string",
540
+ "minLength": 1,
541
+ "maxLength": 240
542
+ },
543
+ "activation": {
544
+ "type": "object",
545
+ "properties": {
546
+ "always": {
547
+ "type": "boolean"
548
+ },
549
+ "keywords": {
550
+ "type": "array",
551
+ "items": {
552
+ "type": "string"
553
+ }
554
+ }
555
+ },
556
+ "required": ["always", "keywords"],
557
+ "additionalProperties": false
558
+ }
559
+ },
560
+ "required": ["id", "name", "version", "description", "activation"],
561
+ "additionalProperties": false
562
+ }
563
+ }
564
+ },
565
+ "required": ["skills"],
566
+ "additionalProperties": false
567
+ }
568
+ },
569
+ {
570
+ "method": "GET",
571
+ "path": "/skills/{id}/{version}",
572
+ "auth": true,
573
+ "request": null,
574
+ "response": null
575
+ },
576
+ {
577
+ "method": "POST",
578
+ "path": "/memory/search",
579
+ "auth": true,
580
+ "request": {
581
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
582
+ "type": "object",
583
+ "properties": {
584
+ "query": {
585
+ "type": "string",
586
+ "minLength": 1,
587
+ "maxLength": 500
588
+ },
589
+ "limit": {
590
+ "type": "integer",
591
+ "minimum": 1,
592
+ "maximum": 20
593
+ }
594
+ },
595
+ "required": ["query"],
596
+ "additionalProperties": false
597
+ },
598
+ "response": {
599
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
600
+ "type": "object",
601
+ "properties": {
602
+ "notes": {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "object",
606
+ "properties": {
607
+ "id": {
608
+ "type": "string"
609
+ },
610
+ "content": {
611
+ "type": "string"
612
+ },
613
+ "kind": {
614
+ "type": "string"
615
+ },
616
+ "confirmed": {
617
+ "type": "boolean"
618
+ },
619
+ "shared": {
620
+ "type": "boolean"
621
+ }
622
+ },
623
+ "required": ["id", "content", "kind", "confirmed", "shared"],
624
+ "additionalProperties": false
625
+ }
626
+ }
627
+ },
628
+ "required": ["notes"],
629
+ "additionalProperties": false
630
+ }
631
+ },
632
+ {
633
+ "method": "POST",
634
+ "path": "/memory",
635
+ "auth": true,
636
+ "request": {
637
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
638
+ "type": "object",
639
+ "properties": {
640
+ "content": {
641
+ "type": "string",
642
+ "minLength": 1,
643
+ "maxLength": 1000
644
+ }
645
+ },
646
+ "required": ["content"],
647
+ "additionalProperties": false
648
+ },
649
+ "response": {
650
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
651
+ "type": "object",
652
+ "properties": {
653
+ "id": {
654
+ "type": "string"
655
+ },
656
+ "confirmed": {
657
+ "type": "boolean"
658
+ }
659
+ },
660
+ "required": ["id", "confirmed"],
661
+ "additionalProperties": false
662
+ }
663
+ },
664
+ {
665
+ "method": "POST",
666
+ "path": "/handoff",
667
+ "auth": true,
668
+ "request": {
669
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
670
+ "type": "object",
671
+ "properties": {
672
+ "repo": {
673
+ "type": "string",
674
+ "pattern": "^[A-Za-z0-9-]{1,39}\\/[A-Za-z0-9._-]{1,100}$"
675
+ },
676
+ "baseRef": {
677
+ "type": "string",
678
+ "minLength": 1,
679
+ "maxLength": 100
680
+ },
681
+ "baseSha": {
682
+ "type": "string",
683
+ "pattern": "^[0-9a-f]{40}$"
684
+ },
685
+ "note": {
686
+ "type": "string",
687
+ "maxLength": 2000
688
+ },
689
+ "sha256": {
690
+ "type": "string",
691
+ "pattern": "^[0-9a-f]{64}$"
692
+ },
693
+ "bytes": {
694
+ "type": "integer",
695
+ "minimum": 0,
696
+ "maximum": 9007199254740991
697
+ }
698
+ },
699
+ "required": ["repo", "baseRef", "baseSha", "sha256", "bytes"],
700
+ "additionalProperties": false
701
+ },
702
+ "response": {
703
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
704
+ "type": "object",
705
+ "properties": {
706
+ "threadId": {
707
+ "type": "string"
708
+ },
709
+ "workspaceId": {
710
+ "type": "string",
711
+ "format": "uuid",
712
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
713
+ },
714
+ "taskId": {
715
+ "type": "string",
716
+ "format": "uuid",
717
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
718
+ },
719
+ "url": {
720
+ "type": "string",
721
+ "format": "uri"
722
+ }
723
+ },
724
+ "required": ["threadId", "workspaceId", "taskId", "url"],
725
+ "additionalProperties": false
726
+ }
727
+ },
728
+ {
729
+ "method": "GET",
730
+ "path": "/workspaces/{id}/checkpoint",
731
+ "auth": true,
732
+ "request": null,
733
+ "response": null
734
+ },
735
+ {
736
+ "method": "GET",
737
+ "path": "/world",
738
+ "auth": true,
739
+ "request": null,
740
+ "response": {
741
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
742
+ "type": "object",
743
+ "properties": {
744
+ "deviceId": {
745
+ "type": "string",
746
+ "format": "uuid",
747
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
748
+ },
749
+ "relayUrl": {
750
+ "type": "string",
751
+ "format": "uri"
752
+ }
753
+ },
754
+ "required": ["deviceId", "relayUrl"],
755
+ "additionalProperties": false
756
+ }
757
+ },
758
+ {
759
+ "method": "GET",
760
+ "path": "/editing/manifest",
761
+ "auth": true,
762
+ "request": null,
763
+ "response": {
764
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
765
+ "type": "object",
766
+ "properties": {
767
+ "manifest": {
768
+ "type": "string",
769
+ "minLength": 2,
770
+ "maxLength": 524288
771
+ },
772
+ "signature": {
773
+ "anyOf": [
774
+ {
775
+ "type": "string",
776
+ "pattern": "^[A-Za-z0-9+/]{86}==$"
777
+ },
778
+ {
779
+ "type": "null"
780
+ }
781
+ ]
782
+ }
783
+ },
784
+ "required": ["manifest", "signature"],
785
+ "additionalProperties": false
786
+ }
787
+ },
788
+ {
789
+ "method": "POST",
790
+ "path": "/editing/jobs/{id}/previews",
791
+ "auth": true,
792
+ "request": {
793
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
794
+ "type": "object",
795
+ "properties": {
796
+ "kind": {
797
+ "type": "string",
798
+ "enum": ["preview", "poster", "clip", "report"]
799
+ },
800
+ "bytes": {
801
+ "type": "integer",
802
+ "minimum": 1,
803
+ "maximum": 1073741824
804
+ },
805
+ "sha256": {
806
+ "type": "string",
807
+ "pattern": "^[0-9a-f]{64}$"
808
+ },
809
+ "durationFlicks": {
810
+ "type": "integer",
811
+ "minimum": 0,
812
+ "maximum": 9007199254740991
813
+ }
814
+ },
815
+ "required": ["kind", "bytes", "sha256"],
816
+ "additionalProperties": false
817
+ },
818
+ "response": {
819
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
820
+ "type": "object",
821
+ "properties": {
822
+ "id": {
823
+ "type": "string",
824
+ "format": "uuid",
825
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
826
+ },
827
+ "uploadUrl": {
828
+ "type": "string",
829
+ "format": "uri"
830
+ }
831
+ },
832
+ "required": ["id", "uploadUrl"],
833
+ "additionalProperties": false
834
+ }
835
+ },
836
+ {
837
+ "method": "POST",
838
+ "path": "/editing/jobs/{id}/previews/{pid}",
839
+ "auth": true,
840
+ "request": null,
841
+ "response": null
842
+ },
843
+ {
844
+ "method": "POST",
845
+ "path": "/editing/jobs/{id}/questions",
846
+ "auth": true,
847
+ "request": {
848
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
849
+ "type": "object",
850
+ "properties": {
851
+ "kind": {
852
+ "type": "string",
853
+ "enum": ["take", "hook", "file", "name", "taste"]
854
+ },
855
+ "prompt": {
856
+ "type": "string",
857
+ "minLength": 1,
858
+ "maxLength": 500
859
+ },
860
+ "options": {
861
+ "minItems": 2,
862
+ "maxItems": 6,
863
+ "type": "array",
864
+ "items": {
865
+ "type": "object",
866
+ "properties": {
867
+ "label": {
868
+ "type": "string",
869
+ "minLength": 1,
870
+ "maxLength": 200
871
+ },
872
+ "clip": {
873
+ "type": "string",
874
+ "format": "uuid",
875
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
876
+ }
877
+ },
878
+ "required": ["label"],
879
+ "additionalProperties": false
880
+ }
881
+ },
882
+ "defaultOption": {
883
+ "type": "integer",
884
+ "minimum": 0,
885
+ "maximum": 5
886
+ },
887
+ "timeoutSeconds": {
888
+ "type": "integer",
889
+ "minimum": 30,
890
+ "maximum": 3600
891
+ }
892
+ },
893
+ "required": ["kind", "prompt", "options", "defaultOption", "timeoutSeconds"],
894
+ "additionalProperties": false
895
+ },
896
+ "response": {
897
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
898
+ "type": "object",
899
+ "properties": {
900
+ "id": {
901
+ "type": "string",
902
+ "format": "uuid",
903
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
904
+ },
905
+ "expiresAt": {
906
+ "type": "string"
907
+ }
908
+ },
909
+ "required": ["id", "expiresAt"],
910
+ "additionalProperties": false
911
+ }
912
+ },
913
+ {
914
+ "method": "GET",
915
+ "path": "/editing/questions/{id}",
916
+ "auth": true,
917
+ "request": null,
918
+ "response": {
919
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
920
+ "type": "object",
921
+ "properties": {
922
+ "status": {
923
+ "type": "string",
924
+ "enum": ["open", "answered", "defaulted", "expired"]
925
+ },
926
+ "option": {
927
+ "type": "integer",
928
+ "minimum": 0,
929
+ "maximum": 9
930
+ }
931
+ },
932
+ "required": ["status"],
933
+ "additionalProperties": false
934
+ }
935
+ },
936
+ {
937
+ "method": "GET",
938
+ "path": "/editing/jobs/{id}/notes",
939
+ "auth": true,
940
+ "request": null,
941
+ "response": {
942
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
943
+ "type": "object",
944
+ "properties": {
945
+ "notes": {
946
+ "type": "array",
947
+ "items": {
948
+ "type": "object",
949
+ "properties": {
950
+ "id": {
951
+ "type": "string",
952
+ "format": "uuid",
953
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
954
+ },
955
+ "atFlicks": {
956
+ "type": "integer",
957
+ "minimum": 0,
958
+ "maximum": 9007199254740991
959
+ },
960
+ "body": {
961
+ "type": "string",
962
+ "minLength": 1,
963
+ "maxLength": 1000
964
+ }
965
+ },
966
+ "required": ["id", "atFlicks", "body"],
967
+ "additionalProperties": false
968
+ }
969
+ }
970
+ },
971
+ "required": ["notes"],
972
+ "additionalProperties": false
973
+ }
974
+ },
975
+ {
976
+ "method": "POST",
977
+ "path": "/editing/found",
978
+ "auth": true,
979
+ "request": {
980
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
981
+ "type": "object",
982
+ "properties": {
983
+ "project": {
984
+ "type": "string",
985
+ "pattern": "^[a-f0-9]{16}$"
986
+ },
987
+ "name": {
988
+ "type": "string",
989
+ "minLength": 1,
990
+ "maxLength": 200
991
+ },
992
+ "seconds": {
993
+ "type": "integer",
994
+ "minimum": 0,
995
+ "maximum": 604800
996
+ }
997
+ },
998
+ "required": ["project", "name", "seconds"],
999
+ "additionalProperties": false
1000
+ },
1001
+ "response": {
1002
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1003
+ "type": "object",
1004
+ "properties": {
1005
+ "id": {
1006
+ "type": "string",
1007
+ "format": "uuid",
1008
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1009
+ }
1010
+ },
1011
+ "required": ["id"],
1012
+ "additionalProperties": false
1013
+ }
1014
+ },
1015
+ {
1016
+ "method": "POST",
1017
+ "path": "/daemon/hello",
1018
+ "auth": true,
1019
+ "request": {
1020
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1021
+ "type": "object",
1022
+ "properties": {
1023
+ "daemonVersion": {
1024
+ "type": "string",
1025
+ "pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
1026
+ },
1027
+ "capabilities": {
1028
+ "type": "object",
1029
+ "properties": {
1030
+ "fullAccess": {
1031
+ "type": "boolean"
1032
+ },
1033
+ "serve": {
1034
+ "type": "boolean"
1035
+ },
1036
+ "handoff": {
1037
+ "type": "boolean"
1038
+ },
1039
+ "edit": {
1040
+ "type": "boolean"
1041
+ }
1042
+ },
1043
+ "required": ["fullAccess", "serve", "handoff"],
1044
+ "additionalProperties": false
1045
+ },
1046
+ "projects": {
1047
+ "maxItems": 50,
1048
+ "type": "array",
1049
+ "items": {
1050
+ "type": "object",
1051
+ "properties": {
1052
+ "id": {
1053
+ "type": "string",
1054
+ "pattern": "^[a-f0-9]{16}$"
1055
+ },
1056
+ "name": {
1057
+ "type": "string",
1058
+ "minLength": 1,
1059
+ "maxLength": 80
1060
+ },
1061
+ "path": {
1062
+ "type": "string",
1063
+ "minLength": 1,
1064
+ "maxLength": 300
1065
+ },
1066
+ "git": {
1067
+ "type": "boolean"
1068
+ }
1069
+ },
1070
+ "required": ["id", "name", "path", "git"],
1071
+ "additionalProperties": false
1072
+ }
1073
+ },
1074
+ "rules": {
1075
+ "maxItems": 200,
1076
+ "type": "array",
1077
+ "items": {
1078
+ "type": "object",
1079
+ "properties": {
1080
+ "project": {
1081
+ "type": "string",
1082
+ "pattern": "^[a-f0-9]{16}$"
1083
+ },
1084
+ "n": {
1085
+ "type": "integer",
1086
+ "minimum": 1,
1087
+ "maximum": 999
1088
+ },
1089
+ "text": {
1090
+ "type": "string",
1091
+ "minLength": 1,
1092
+ "maxLength": 400
1093
+ },
1094
+ "status": {
1095
+ "type": "string",
1096
+ "enum": ["proposed", "confirmed"]
1097
+ }
1098
+ },
1099
+ "required": ["project", "n", "text", "status"],
1100
+ "additionalProperties": false
1101
+ }
1102
+ }
1103
+ },
1104
+ "required": ["daemonVersion", "capabilities", "projects", "rules"],
1105
+ "additionalProperties": false
1106
+ },
1107
+ "response": {
1108
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1109
+ "type": "object",
1110
+ "properties": {
1111
+ "pollSeconds": {
1112
+ "type": "integer",
1113
+ "minimum": 1,
1114
+ "maximum": 25
1115
+ }
1116
+ },
1117
+ "required": ["pollSeconds"],
1118
+ "additionalProperties": false
1119
+ }
1120
+ },
1121
+ {
1122
+ "method": "GET",
1123
+ "path": "/dispatch/next",
1124
+ "auth": true,
1125
+ "request": null,
1126
+ "response": {
1127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1128
+ "type": "object",
1129
+ "properties": {
1130
+ "dispatch": {
1131
+ "anyOf": [
1132
+ {
1133
+ "type": "object",
1134
+ "properties": {
1135
+ "id": {
1136
+ "type": "string",
1137
+ "format": "uuid",
1138
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1139
+ },
1140
+ "kind": {
1141
+ "type": "string",
1142
+ "enum": [
1143
+ "run",
1144
+ "doctor",
1145
+ "rule_confirm",
1146
+ "rule_dismiss",
1147
+ "handoff",
1148
+ "pull",
1149
+ "serve_start",
1150
+ "serve_stop",
1151
+ "edit"
1152
+ ]
1153
+ },
1154
+ "payload": {
1155
+ "type": "object",
1156
+ "propertyNames": {
1157
+ "type": "string"
1158
+ },
1159
+ "additionalProperties": {}
1160
+ },
1161
+ "createdAt": {
1162
+ "type": "string"
1163
+ }
1164
+ },
1165
+ "required": ["id", "kind", "payload", "createdAt"],
1166
+ "additionalProperties": false
1167
+ },
1168
+ {
1169
+ "type": "null"
1170
+ }
1171
+ ]
1172
+ },
1173
+ "cancel": {
1174
+ "maxItems": 50,
1175
+ "type": "array",
1176
+ "items": {
1177
+ "type": "string",
1178
+ "format": "uuid",
1179
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1180
+ }
1181
+ }
1182
+ },
1183
+ "required": ["dispatch", "cancel"],
1184
+ "additionalProperties": false
1185
+ }
1186
+ },
1187
+ {
1188
+ "method": "POST",
1189
+ "path": "/dispatch/{id}",
1190
+ "auth": true,
1191
+ "request": {
1192
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "status": {
1196
+ "type": "string",
1197
+ "enum": ["running", "done", "failed", "canceled"]
1198
+ },
1199
+ "result": {
1200
+ "type": "object",
1201
+ "propertyNames": {
1202
+ "type": "string"
1203
+ },
1204
+ "additionalProperties": {}
1205
+ }
1206
+ },
1207
+ "required": ["status"],
1208
+ "additionalProperties": false
1209
+ },
1210
+ "response": null
1211
+ },
1212
+ {
1213
+ "method": "POST",
1214
+ "path": "/runs",
1215
+ "auth": true,
1216
+ "request": {
1217
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1218
+ "type": "object",
1219
+ "properties": {
1220
+ "localId": {
1221
+ "type": "string",
1222
+ "pattern": "^[A-Za-z0-9_-]{1,80}$"
1223
+ },
1224
+ "source": {
1225
+ "type": "string",
1226
+ "enum": ["terminal", "dispatch"]
1227
+ },
1228
+ "kind": {
1229
+ "type": "string",
1230
+ "enum": ["app", "run", "acp", "serve", "handoff", "pull"]
1231
+ },
1232
+ "mode": {
1233
+ "type": "string",
1234
+ "enum": ["ask", "auto", "read", "plan", "full"]
1235
+ },
1236
+ "switches": {
1237
+ "type": "object",
1238
+ "propertyNames": {
1239
+ "type": "string",
1240
+ "maxLength": 30
1241
+ },
1242
+ "additionalProperties": {
1243
+ "type": "boolean"
1244
+ }
1245
+ },
1246
+ "project": {
1247
+ "type": "string",
1248
+ "maxLength": 80
1249
+ },
1250
+ "status": {
1251
+ "type": "string",
1252
+ "enum": ["running", "completed", "failed", "blocked", "stopped"]
1253
+ },
1254
+ "exitCode": {
1255
+ "type": "integer",
1256
+ "minimum": -9007199254740991,
1257
+ "maximum": 9007199254740991
1258
+ },
1259
+ "dispatchId": {
1260
+ "type": "string",
1261
+ "format": "uuid",
1262
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1263
+ }
1264
+ },
1265
+ "required": ["localId", "source", "kind", "status"],
1266
+ "additionalProperties": false
1267
+ },
1268
+ "response": null
1269
+ },
1270
+ {
1271
+ "method": "POST",
1272
+ "path": "/live",
1273
+ "auth": true,
1274
+ "request": {
1275
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1276
+ "type": "object",
1277
+ "properties": {
1278
+ "deviceSessionId": {
1279
+ "type": "string",
1280
+ "minLength": 1,
1281
+ "maxLength": 100
1282
+ },
1283
+ "title": {
1284
+ "type": "string",
1285
+ "maxLength": 120
1286
+ },
1287
+ "project": {
1288
+ "type": "string",
1289
+ "maxLength": 80
1290
+ },
1291
+ "remote": {
1292
+ "type": "boolean"
1293
+ },
1294
+ "state": {
1295
+ "type": "string",
1296
+ "enum": ["running", "waiting", "idle", "ended"]
1297
+ },
1298
+ "events": {
1299
+ "maxItems": 100,
1300
+ "type": "array",
1301
+ "items": {
1302
+ "type": "object",
1303
+ "properties": {
1304
+ "seq": {
1305
+ "type": "integer",
1306
+ "minimum": 0,
1307
+ "maximum": 9007199254740991
1308
+ },
1309
+ "at": {
1310
+ "type": "integer",
1311
+ "exclusiveMinimum": 0,
1312
+ "maximum": 9007199254740991
1313
+ },
1314
+ "kind": {
1315
+ "type": "string",
1316
+ "enum": ["user", "assistant", "tool_start", "tool_end"]
1317
+ },
1318
+ "text": {
1319
+ "type": "string",
1320
+ "maxLength": 8000
1321
+ },
1322
+ "callId": {
1323
+ "type": "string",
1324
+ "maxLength": 100
1325
+ },
1326
+ "tool": {
1327
+ "type": "string",
1328
+ "maxLength": 60
1329
+ },
1330
+ "target": {
1331
+ "type": "string",
1332
+ "maxLength": 400
1333
+ },
1334
+ "status": {
1335
+ "type": "string",
1336
+ "enum": ["ok", "error", "declined"]
1337
+ },
1338
+ "ms": {
1339
+ "type": "integer",
1340
+ "minimum": 0,
1341
+ "maximum": 9007199254740991
1342
+ }
1343
+ },
1344
+ "required": ["seq", "at", "kind"],
1345
+ "additionalProperties": false
1346
+ }
1347
+ }
1348
+ },
1349
+ "required": ["deviceSessionId", "remote", "state", "events"],
1350
+ "additionalProperties": false
1351
+ },
1352
+ "response": null
1353
+ }
1354
+ ]
1355
+ }