@adhdev/daemon-core 0.9.82-rc.220 → 0.9.82-rc.222

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.
@@ -1,693 +0,0 @@
1
- /**
2
- * Auto-generated. Mirrors schema.json — regenerate after editing.
3
- *
4
- * SCHEMA_V1: validates adhdev:cli/spec@1 (legacy). Used for migration.
5
- * SCHEMA_V3: validates adhdev:cli/spec@3 (current). Used after migration.
6
- * SCHEMA: alias for SCHEMA_V3 (default export for loader.ts).
7
- */
8
-
9
- export const SCHEMA_V1 = {
10
- "$schema": "http://json-schema.org/draft-07/schema#",
11
- "$id": "adhdev:cli/spec@1",
12
- "title": "ADHDev CLI provider spec v1",
13
- "type": "object",
14
- "additionalProperties": false,
15
- "required": [
16
- "$schema",
17
- "id",
18
- "name",
19
- "binary",
20
- "send_message",
21
- "layout",
22
- "states",
23
- "default_state"
24
- ],
25
- "properties": {
26
- "$schema": {
27
- "type": "string",
28
- "const": "adhdev:cli/spec@1"
29
- },
30
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9-]*$" },
31
- "name": { "type": "string", "minLength": 1 },
32
- "binary": { "type": "string", "minLength": 1 },
33
- "spawn_args": { "type": "array", "items": { "type": "string" }, "default": [] },
34
- "env": { "type": "object", "additionalProperties": { "type": "string" }, "default": {} },
35
- "send_message": {
36
- "type": "object",
37
- "additionalProperties": false,
38
- "required": ["submit_key"],
39
- "properties": {
40
- "submit_key": { "type": "string", "minLength": 1 },
41
- "delay_ms_before_submit": { "type": "integer", "minimum": 0 },
42
- "delay_ms_per_char": { "type": "integer", "minimum": 0 }
43
- }
44
- },
45
- "layout": {
46
- "type": "object",
47
- "additionalProperties": false,
48
- "required": ["sections"],
49
- "properties": {
50
- "sections": {
51
- "type": "array",
52
- "minItems": 1,
53
- "items": { "$ref": "#/definitions/sectionV1" }
54
- }
55
- }
56
- },
57
- "states": {
58
- "type": "array",
59
- "minItems": 1,
60
- "items": { "$ref": "#/definitions/stateV1" }
61
- },
62
- "default_state": { "type": "string", "minLength": 1 },
63
- "control_bar": { "type": "array", "default": [], "items": { "$ref": "#/definitions/control" } },
64
- "notifications": { "type": "array", "default": [], "items": { "$ref": "#/definitions/notification" } },
65
- "delegate": { "type": "array", "default": [], "items": { "$ref": "#/definitions/delegateTrigger" } },
66
- "native_history": { "$ref": "#/definitions/nativeHistory" },
67
- "cli_version_range": { "type": "string", "minLength": 1 },
68
- "requiresFinalAssistantBeforeIdle": { "type": "boolean" },
69
- "debounce": {
70
- "type": "object",
71
- "additionalProperties": false,
72
- "properties": {
73
- "busy_hold_ms": { "type": "integer", "minimum": 0 },
74
- "idle_hold_ms": { "type": "integer", "minimum": 0 },
75
- "startup_grace_ms": { "type": "integer", "minimum": 0 },
76
- "completion_idle_after": {
77
- "type": "object",
78
- "additionalProperties": false,
79
- "required": ["regex", "hold_ms"],
80
- "properties": {
81
- "section": { "type": "string", "minLength": 1 },
82
- "regex": { "type": "string", "minLength": 1 },
83
- "flags": { "type": "string" },
84
- "hold_ms": { "type": "integer", "minimum": 0 },
85
- "force_after_ms": { "type": "integer", "minimum": 0 }
86
- }
87
- }
88
- }
89
- }
90
- },
91
- "definitions": {
92
- "size": {
93
- "oneOf": [
94
- { "type": "integer", "minimum": 0 },
95
- { "type": "string", "pattern": "^\\d+(\\.\\d+)?%$" }
96
- ]
97
- },
98
- "sectionV1": {
99
- "type": "object",
100
- "additionalProperties": false,
101
- "required": ["id"],
102
- "properties": {
103
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
104
- "from_top": { "$ref": "#/definitions/size" },
105
- "from_bottom": { "$ref": "#/definitions/size" },
106
- "until": {
107
- "type": "object",
108
- "additionalProperties": false,
109
- "required": ["section"],
110
- "properties": { "section": { "type": "string" } }
111
- },
112
- "anchor_regex": { "type": "string", "minLength": 1 },
113
- "anchor_flags": { "type": "string" },
114
- "anchor_last": { "type": "boolean" },
115
- "anchor_context": {
116
- "type": "object",
117
- "additionalProperties": false,
118
- "properties": {
119
- "prev": { "type": "string" },
120
- "prev_flags": { "type": "string" },
121
- "next": { "type": "string" },
122
- "next_flags": { "type": "string" }
123
- }
124
- },
125
- "lines": { "type": "integer", "minimum": 1 },
126
- "until_regex": { "type": "string", "minLength": 1 },
127
- "until_regex_flags": { "type": "string" }
128
- }
129
- },
130
- "sectionRegex": {
131
- "type": "object",
132
- "additionalProperties": false,
133
- "required": ["regex"],
134
- "properties": {
135
- "section": { "type": "string" },
136
- "regex": { "type": "string", "minLength": 1 },
137
- "flags": { "type": "string", "default": "i" },
138
- "cursor_row_min": { "type": "integer", "minimum": 0 },
139
- "cursor_row_max": { "type": "integer", "minimum": 0 },
140
- "cursor_col_min": { "type": "integer", "minimum": 0 },
141
- "cursor_col_max": { "type": "integer", "minimum": 0 },
142
- "cursor_above_lines": { "type": "integer", "minimum": 1 },
143
- "changed": { "type": "boolean", "const": true }
144
- }
145
- },
146
- "sectionPattern": {
147
- "type": "object",
148
- "additionalProperties": false,
149
- "required": ["pattern"],
150
- "properties": {
151
- "section": { "type": "string" },
152
- "pattern": { "type": "string", "minLength": 1 },
153
- "flags": { "type": "string", "default": "" }
154
- }
155
- },
156
- "stateV1": {
157
- "type": "object",
158
- "additionalProperties": false,
159
- "required": ["id", "label", "when"],
160
- "properties": {
161
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
162
- "label": { "type": "string", "minLength": 1 },
163
- "when": { "$ref": "#/definitions/sectionRegex" },
164
- "extract_title": { "$ref": "#/definitions/sectionRegex" },
165
- "modal_buttons": {
166
- "type": "object",
167
- "additionalProperties": false,
168
- "required": ["key_for_index"],
169
- "oneOf": [
170
- { "required": ["pattern"] },
171
- { "required": ["patterns"] }
172
- ],
173
- "properties": {
174
- "section": { "type": "string" },
175
- "pattern": { "type": "string", "minLength": 1 },
176
- "flags": { "type": "string" },
177
- "patterns": {
178
- "type": "array",
179
- "minItems": 1,
180
- "items": {
181
- "type": "object",
182
- "additionalProperties": false,
183
- "required": ["pattern"],
184
- "properties": {
185
- "pattern": { "type": "string", "minLength": 1 },
186
- "flags": { "type": "string" }
187
- }
188
- }
189
- },
190
- "key_for_index": { "type": "string", "minLength": 1 },
191
- "min_count": { "type": "integer", "minimum": 1, "default": 2 },
192
- "continuation_lines": { "type": "boolean", "default": false }
193
- }
194
- }
195
- }
196
- },
197
- "control": {
198
- "type": "object",
199
- "additionalProperties": false,
200
- "required": ["id", "label", "action"],
201
- "properties": {
202
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
203
- "label": { "type": "string", "minLength": 1 },
204
- "visible_when_state": { "type": "array", "items": { "type": "string" } },
205
- "action": { "$ref": "#/definitions/controlAction" }
206
- }
207
- },
208
- "controlAction": {
209
- "oneOf": [
210
- {
211
- "type": "object",
212
- "additionalProperties": false,
213
- "required": ["type", "keys"],
214
- "properties": {
215
- "type": { "const": "send_keys" },
216
- "keys": { "type": "string", "minLength": 1 }
217
- }
218
- },
219
- {
220
- "type": "object",
221
- "additionalProperties": false,
222
- "required": ["type", "trigger_keys", "wait_for", "extract_choices", "submit_key"],
223
- "properties": {
224
- "type": { "const": "open_picker" },
225
- "trigger_keys": { "type": "string", "minLength": 1 },
226
- "wait_for": { "$ref": "#/definitions/sectionRegex" },
227
- "extract_choices": { "$ref": "#/definitions/sectionPattern" },
228
- "submit_key": { "type": "string", "minLength": 1 }
229
- }
230
- },
231
- {
232
- "type": "object",
233
- "additionalProperties": false,
234
- "required": ["type", "method", "keys_template"],
235
- "properties": {
236
- "type": { "const": "attach_image" },
237
- "method": { "const": "tempfile_then_keys" },
238
- "keys_template": { "type": "string", "minLength": 1 }
239
- }
240
- }
241
- ]
242
- },
243
- "notification": {
244
- "type": "object",
245
- "additionalProperties": false,
246
- "required": ["id", "when_state", "title"],
247
- "properties": {
248
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
249
- "when_state": { "type": "string", "minLength": 1 },
250
- "title": { "type": "string", "minLength": 1 },
251
- "body": { "type": "string" }
252
- }
253
- },
254
- "nativeHistory": {
255
- "type": "object",
256
- "additionalProperties": false,
257
- "properties": {
258
- "reader": {
259
- "type": "string",
260
- "enum": ["claude-cli", "codex-cli", "antigravity-cli", "hermes-cli"]
261
- },
262
- "source": {
263
- "oneOf": [
264
- { "$ref": "#/definitions/nativeHistoryJsonlSource" },
265
- { "$ref": "#/definitions/nativeHistorySqliteSource" }
266
- ]
267
- },
268
- "override_path": { "type": "string", "minLength": 1 }
269
- }
270
- },
271
- "nativeHistoryMessageMap": {
272
- "type": "object",
273
- "additionalProperties": false,
274
- "required": ["role", "content"],
275
- "properties": {
276
- "role": { "type": "string", "minLength": 1 },
277
- "content": { "type": "string", "minLength": 1 },
278
- "content_strip": { "type": "array", "items": { "type": "string", "minLength": 1 } },
279
- "content_unwrap": { "type": "array", "items": { "type": "string", "minLength": 1 } },
280
- "timestamp_ms": { "type": "string", "minLength": 1 },
281
- "kind": { "type": "string", "minLength": 1 }
282
- }
283
- },
284
- "nativeHistoryJsonlSource": {
285
- "type": "object",
286
- "additionalProperties": false,
287
- "required": ["kind", "path", "message_map"],
288
- "properties": {
289
- "kind": { "const": "jsonl" },
290
- "path": { "type": "string", "minLength": 1 },
291
- "file_pattern": { "type": "string", "minLength": 1 },
292
- "recent_window_ms": { "type": "integer", "minimum": 0 },
293
- "session_id_from": { "type": "string", "enum": ["filename_uuid", "first_record"] },
294
- "session_id_path": { "type": "string", "minLength": 1 },
295
- "message_filter": {
296
- "type": "object",
297
- "additionalProperties": false,
298
- "required": ["where"],
299
- "properties": { "where": { "type": "string", "minLength": 1 } }
300
- },
301
- "message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
302
- }
303
- },
304
- "nativeHistorySqliteSource": {
305
- "type": "object",
306
- "additionalProperties": false,
307
- "required": ["kind", "path", "session_query", "message_query", "message_map"],
308
- "properties": {
309
- "kind": { "const": "sqlite" },
310
- "path": { "type": "string", "minLength": 1 },
311
- "session_query": { "type": "string", "minLength": 1 },
312
- "message_query": { "type": "string", "minLength": 1 },
313
- "message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
314
- }
315
- },
316
- "delegateTrigger": {
317
- "type": "object",
318
- "additionalProperties": false,
319
- "required": ["id", "when_state", "task_template"],
320
- "properties": {
321
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
322
- "when_state": { "type": "string", "minLength": 1 },
323
- "after_duration_ms": { "type": "integer", "minimum": 0 },
324
- "task_template": { "type": "string", "minLength": 1 }
325
- }
326
- }
327
- }
328
- } as const;
329
-
330
- export const SCHEMA_V3 = {
331
- "$schema": "http://json-schema.org/draft-07/schema#",
332
- "$id": "adhdev:cli/spec@3",
333
- "title": "ADHDev CLI provider spec v3",
334
- "type": "object",
335
- "additionalProperties": false,
336
- "required": [
337
- "$schema",
338
- "id",
339
- "name",
340
- "binary",
341
- "send_message",
342
- "sections",
343
- "states",
344
- "default_state"
345
- ],
346
- "properties": {
347
- "$schema": { "type": "string", "const": "adhdev:cli/spec@3" },
348
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9-]*$" },
349
- "name": { "type": "string", "minLength": 1 },
350
- "binary": { "type": "string", "minLength": 1 },
351
- "spawn_args": { "type": "array", "items": { "type": "string" }, "default": [] },
352
- "env": { "type": "object", "additionalProperties": { "type": "string" }, "default": {} },
353
- "cli_version_range": { "type": "string", "minLength": 1 },
354
- "send_message": {
355
- "type": "object",
356
- "additionalProperties": false,
357
- "required": ["submit_key"],
358
- "properties": {
359
- "submit_key": { "type": "string", "minLength": 1 },
360
- "delay_ms_before_submit": { "type": "integer", "minimum": 0 },
361
- "delay_ms_per_char": { "type": "integer", "minimum": 0 }
362
- }
363
- },
364
- "sections": {
365
- "type": "object",
366
- "minProperties": 1,
367
- "additionalProperties": { "$ref": "#/definitions/sectionDef" }
368
- },
369
- "states": {
370
- "type": "array",
371
- "minItems": 1,
372
- "items": { "$ref": "#/definitions/stateV3" }
373
- },
374
- "default_state": { "type": "string", "minLength": 1 },
375
- "control_bar": { "type": "array", "default": [], "items": { "$ref": "#/definitions/control" } },
376
- "notifications": { "type": "array", "default": [], "items": { "$ref": "#/definitions/notification" } },
377
- "delegate": { "type": "array", "default": [], "items": { "$ref": "#/definitions/delegateTrigger" } },
378
- "native_history": { "$ref": "#/definitions/nativeHistory" },
379
- "requiresFinalAssistantBeforeIdle": { "type": "boolean" },
380
- "timing": {
381
- "type": "object",
382
- "additionalProperties": false,
383
- "properties": {
384
- "busy_hold_ms": { "type": "integer", "minimum": 0 },
385
- "idle_hold_ms": { "type": "integer", "minimum": 0 },
386
- "startup_grace_ms": { "type": "integer", "minimum": 0 },
387
- "screen_active_hold_ms": { "type": "integer", "minimum": 0 },
388
- "completion_marker": {
389
- "type": "object",
390
- "additionalProperties": false,
391
- "required": ["matches", "hold_ms"],
392
- "properties": {
393
- "section": { "type": "string", "minLength": 1 },
394
- "matches": { "type": "string", "minLength": 1 },
395
- "flags": { "type": "string" },
396
- "hold_ms": { "type": "integer", "minimum": 0 },
397
- "force_after_ms": { "type": "integer", "minimum": 0 }
398
- }
399
- }
400
- }
401
- }
402
- },
403
- "definitions": {
404
- "size": {
405
- "oneOf": [
406
- { "type": "integer", "minimum": 0 },
407
- { "type": "string", "pattern": "^\\d+(\\.\\d+)?%$" }
408
- ]
409
- },
410
- "sectionDef": {
411
- "type": "object",
412
- "additionalProperties": false,
413
- "properties": {
414
- "from_top": { "$ref": "#/definitions/size" },
415
- "from_bottom": { "$ref": "#/definitions/size" },
416
- "until": { "type": "string", "minLength": 1 },
417
- "anchor": { "type": "string", "minLength": 1 },
418
- "anchor_flags": { "type": "string" },
419
- "anchor_last": { "type": "boolean" },
420
- "anchor_context": {
421
- "type": "object",
422
- "additionalProperties": false,
423
- "properties": {
424
- "prev": { "type": "string" },
425
- "prev_flags": { "type": "string" },
426
- "next": { "type": "string" },
427
- "next_flags": { "type": "string" }
428
- }
429
- },
430
- "lines": { "type": "integer", "minimum": 1 },
431
- "until_regex": { "type": "string", "minLength": 1 },
432
- "until_regex_flags": { "type": "string" }
433
- }
434
- },
435
- "condition": {
436
- "oneOf": [
437
- { "$ref": "#/definitions/regexCondition" },
438
- { "$ref": "#/definitions/changedCondition" },
439
- { "$ref": "#/definitions/allCondition" },
440
- { "$ref": "#/definitions/anyCondition" }
441
- ]
442
- },
443
- "regexCondition": {
444
- "type": "object",
445
- "additionalProperties": false,
446
- "required": ["matches"],
447
- "properties": {
448
- "section": { "type": "string" },
449
- "matches": { "type": "string", "minLength": 1 },
450
- "flags": { "type": "string" },
451
- "cursor_row_min": { "type": "integer", "minimum": 0 },
452
- "cursor_row_max": { "type": "integer", "minimum": 0 },
453
- "cursor_col_min": { "type": "integer", "minimum": 0 },
454
- "cursor_col_max": { "type": "integer", "minimum": 0 }
455
- }
456
- },
457
- "changedCondition": {
458
- "type": "object",
459
- "additionalProperties": false,
460
- "required": ["cursor_above", "changed"],
461
- "properties": {
462
- "cursor_above": { "type": "integer", "minimum": 1 },
463
- "changed": { "type": "boolean" },
464
- "stable_ms": { "type": "integer", "minimum": 0 }
465
- }
466
- },
467
- "allCondition": {
468
- "type": "object",
469
- "additionalProperties": false,
470
- "required": ["all"],
471
- "properties": {
472
- "all": {
473
- "type": "array",
474
- "items": { "$ref": "#/definitions/condition" }
475
- }
476
- }
477
- },
478
- "anyCondition": {
479
- "type": "object",
480
- "additionalProperties": false,
481
- "required": ["any"],
482
- "properties": {
483
- "any": {
484
- "type": "array",
485
- "items": { "$ref": "#/definitions/condition" }
486
- }
487
- }
488
- },
489
- "extractTitle": {
490
- "type": "object",
491
- "additionalProperties": false,
492
- "properties": {
493
- "section": { "type": "string" },
494
- "regex": { "type": "string", "minLength": 1 },
495
- "flags": { "type": "string" },
496
- "first_line": { "type": "boolean", "const": true }
497
- }
498
- },
499
- "extractButtons": {
500
- "type": "object",
501
- "additionalProperties": false,
502
- "required": ["pattern", "key_for_index"],
503
- "properties": {
504
- "section": { "type": "string" },
505
- "pattern": { "type": "string", "minLength": 1 },
506
- "flags": { "type": "string" },
507
- "key_for_index": { "type": "string", "minLength": 1 },
508
- "min_count": { "type": "integer", "minimum": 1, "default": 2 },
509
- "continuation_lines": { "type": "boolean", "default": false }
510
- }
511
- },
512
- "stateV3": {
513
- "type": "object",
514
- "additionalProperties": false,
515
- "required": ["id", "label", "when"],
516
- "properties": {
517
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
518
- "label": { "type": "string", "minLength": 1 },
519
- "when": {
520
- "oneOf": [
521
- { "$ref": "#/definitions/allCondition" },
522
- { "$ref": "#/definitions/anyCondition" }
523
- ]
524
- },
525
- "extract": {
526
- "type": "object",
527
- "additionalProperties": false,
528
- "properties": {
529
- "title": { "$ref": "#/definitions/extractTitle" },
530
- "buttons": { "$ref": "#/definitions/extractButtons" }
531
- }
532
- }
533
- }
534
- },
535
- "sectionRegex": {
536
- "type": "object",
537
- "additionalProperties": false,
538
- "required": ["regex"],
539
- "properties": {
540
- "section": { "type": "string" },
541
- "regex": { "type": "string", "minLength": 1 },
542
- "flags": { "type": "string", "default": "i" },
543
- "cursor_row_min": { "type": "integer", "minimum": 0 },
544
- "cursor_row_max": { "type": "integer", "minimum": 0 },
545
- "cursor_col_min": { "type": "integer", "minimum": 0 },
546
- "cursor_col_max": { "type": "integer", "minimum": 0 }
547
- }
548
- },
549
- "sectionPattern": {
550
- "type": "object",
551
- "additionalProperties": false,
552
- "required": ["pattern"],
553
- "properties": {
554
- "section": { "type": "string" },
555
- "pattern": { "type": "string", "minLength": 1 },
556
- "flags": { "type": "string", "default": "" }
557
- }
558
- },
559
- "control": {
560
- "type": "object",
561
- "additionalProperties": false,
562
- "required": ["id", "label", "action"],
563
- "properties": {
564
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
565
- "label": { "type": "string", "minLength": 1 },
566
- "visible_when_state": { "type": "array", "items": { "type": "string" } },
567
- "action": { "$ref": "#/definitions/controlAction" }
568
- }
569
- },
570
- "controlAction": {
571
- "oneOf": [
572
- {
573
- "type": "object",
574
- "additionalProperties": false,
575
- "required": ["type", "keys"],
576
- "properties": {
577
- "type": { "const": "send_keys" },
578
- "keys": { "type": "string", "minLength": 1 }
579
- }
580
- },
581
- {
582
- "type": "object",
583
- "additionalProperties": false,
584
- "required": ["type", "trigger_keys", "wait_for", "extract_choices", "submit_key"],
585
- "properties": {
586
- "type": { "const": "open_picker" },
587
- "trigger_keys": { "type": "string", "minLength": 1 },
588
- "wait_for": { "$ref": "#/definitions/sectionRegex" },
589
- "extract_choices": { "$ref": "#/definitions/sectionPattern" },
590
- "submit_key": { "type": "string", "minLength": 1 }
591
- }
592
- },
593
- {
594
- "type": "object",
595
- "additionalProperties": false,
596
- "required": ["type", "method", "keys_template"],
597
- "properties": {
598
- "type": { "const": "attach_image" },
599
- "method": { "const": "tempfile_then_keys" },
600
- "keys_template": { "type": "string", "minLength": 1 }
601
- }
602
- }
603
- ]
604
- },
605
- "notification": {
606
- "type": "object",
607
- "additionalProperties": false,
608
- "required": ["id", "when_state", "title"],
609
- "properties": {
610
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
611
- "when_state": { "type": "string", "minLength": 1 },
612
- "title": { "type": "string", "minLength": 1 },
613
- "body": { "type": "string" }
614
- }
615
- },
616
- "nativeHistory": {
617
- "type": "object",
618
- "additionalProperties": false,
619
- "properties": {
620
- "reader": {
621
- "type": "string",
622
- "enum": ["claude-cli", "codex-cli", "antigravity-cli", "hermes-cli"]
623
- },
624
- "source": {
625
- "oneOf": [
626
- { "$ref": "#/definitions/nativeHistoryJsonlSource" },
627
- { "$ref": "#/definitions/nativeHistorySqliteSource" }
628
- ]
629
- },
630
- "override_path": { "type": "string", "minLength": 1 }
631
- }
632
- },
633
- "nativeHistoryMessageMap": {
634
- "type": "object",
635
- "additionalProperties": false,
636
- "required": ["role", "content"],
637
- "properties": {
638
- "role": { "type": "string", "minLength": 1 },
639
- "content": { "type": "string", "minLength": 1 },
640
- "content_strip": { "type": "array", "items": { "type": "string", "minLength": 1 } },
641
- "content_unwrap": { "type": "array", "items": { "type": "string", "minLength": 1 } },
642
- "timestamp_ms": { "type": "string", "minLength": 1 },
643
- "kind": { "type": "string", "minLength": 1 }
644
- }
645
- },
646
- "nativeHistoryJsonlSource": {
647
- "type": "object",
648
- "additionalProperties": false,
649
- "required": ["kind", "path", "message_map"],
650
- "properties": {
651
- "kind": { "const": "jsonl" },
652
- "path": { "type": "string", "minLength": 1 },
653
- "file_pattern": { "type": "string", "minLength": 1 },
654
- "recent_window_ms": { "type": "integer", "minimum": 0 },
655
- "session_id_from": { "type": "string", "enum": ["filename_uuid", "first_record"] },
656
- "session_id_path": { "type": "string", "minLength": 1 },
657
- "message_filter": {
658
- "type": "object",
659
- "additionalProperties": false,
660
- "required": ["where"],
661
- "properties": { "where": { "type": "string", "minLength": 1 } }
662
- },
663
- "message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
664
- }
665
- },
666
- "nativeHistorySqliteSource": {
667
- "type": "object",
668
- "additionalProperties": false,
669
- "required": ["kind", "path", "session_query", "message_query", "message_map"],
670
- "properties": {
671
- "kind": { "const": "sqlite" },
672
- "path": { "type": "string", "minLength": 1 },
673
- "session_query": { "type": "string", "minLength": 1 },
674
- "message_query": { "type": "string", "minLength": 1 },
675
- "message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
676
- }
677
- },
678
- "delegateTrigger": {
679
- "type": "object",
680
- "additionalProperties": false,
681
- "required": ["id", "when_state", "task_template"],
682
- "properties": {
683
- "id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
684
- "when_state": { "type": "string", "minLength": 1 },
685
- "after_duration_ms": { "type": "integer", "minimum": 0 },
686
- "task_template": { "type": "string", "minLength": 1 }
687
- }
688
- }
689
- }
690
- } as const;
691
-
692
- /** Default schema export — v3 (current). */
693
- export const SCHEMA = SCHEMA_V3;