@adhdev/daemon-core 0.9.82-rc.160 → 0.9.82-rc.162

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 (63) hide show
  1. package/dist/cli-adapter-types.d.ts +14 -1
  2. package/dist/commands/mesh-coordinator.d.ts +72 -1
  3. package/dist/config/chat-history.d.ts +2 -0
  4. package/dist/config/mesh-config.d.ts +3 -0
  5. package/dist/index.d.ts +11 -0
  6. package/dist/index.js +4924 -1411
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +4976 -1476
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/mesh/coordinator-prompt.d.ts +30 -0
  11. package/dist/mesh/coordinator-registry.d.ts +35 -1
  12. package/dist/providers/cli-provider-instance.d.ts +1 -1
  13. package/dist/providers/contracts.d.ts +48 -0
  14. package/dist/providers/native-history/antigravity-cli-transcript.d.ts +1 -1
  15. package/dist/providers/native-history/claude-cli-transcript.d.ts +1 -1
  16. package/dist/providers/native-history/codex-cli-transcript.d.ts +1 -1
  17. package/dist/providers/native-history/dispatcher.d.ts +24 -0
  18. package/dist/providers/native-history/hermes-cli-transcript.d.ts +30 -0
  19. package/dist/providers/native-history/index.d.ts +2 -0
  20. package/dist/providers/spec/adapter.d.ts +56 -0
  21. package/dist/providers/spec/cli-adapter.d.ts +76 -0
  22. package/dist/providers/spec/driver.d.ts +148 -0
  23. package/dist/providers/spec/evaluator.d.ts +47 -0
  24. package/dist/providers/spec/loader.d.ts +14 -0
  25. package/dist/providers/spec/native-history-executor.d.ts +39 -0
  26. package/dist/providers/spec/route.d.ts +4 -0
  27. package/dist/providers/spec/schema.gen.d.ts +507 -0
  28. package/dist/providers/spec/types.d.ts +211 -0
  29. package/dist/repo-mesh-types.d.ts +33 -1
  30. package/dist/sessions/registry.d.ts +3 -0
  31. package/package.json +2 -1
  32. package/src/cli-adapter-types.ts +15 -1
  33. package/src/commands/chat-commands.ts +150 -12
  34. package/src/commands/cli-manager.ts +11 -0
  35. package/src/commands/mesh-coordinator.ts +235 -1
  36. package/src/commands/router.ts +238 -50
  37. package/src/config/chat-history.ts +11 -3
  38. package/src/config/mesh-config.ts +16 -1
  39. package/src/index.ts +19 -0
  40. package/src/mesh/coordinator-prompt.ts +164 -8
  41. package/src/mesh/coordinator-registry.ts +50 -4
  42. package/src/providers/cli-provider-instance.ts +8 -3
  43. package/src/providers/contracts.ts +53 -0
  44. package/src/providers/native-history/antigravity-cli-transcript.ts +2 -2
  45. package/src/providers/native-history/claude-cli-transcript.ts +1 -1
  46. package/src/providers/native-history/codex-cli-transcript.ts +1 -1
  47. package/src/providers/native-history/dispatcher.ts +227 -0
  48. package/src/providers/native-history/hermes-cli-transcript.ts +230 -0
  49. package/src/providers/native-history/index.ts +7 -0
  50. package/src/providers/provider-loader.ts +126 -3
  51. package/src/providers/sdk/v1/schemas/cli/provider.schema.json +13 -0
  52. package/src/providers/spec/adapter.ts +168 -0
  53. package/src/providers/spec/cli-adapter.ts +318 -0
  54. package/src/providers/spec/driver.ts +498 -0
  55. package/src/providers/spec/evaluator.ts +268 -0
  56. package/src/providers/spec/loader.ts +130 -0
  57. package/src/providers/spec/native-history-executor.ts +612 -0
  58. package/src/providers/spec/route.ts +51 -0
  59. package/src/providers/spec/schema.gen.ts +507 -0
  60. package/src/providers/spec/schema.json +210 -0
  61. package/src/providers/spec/types.ts +230 -0
  62. package/src/repo-mesh-types.ts +33 -1
  63. package/src/sessions/registry.ts +3 -0
@@ -0,0 +1,507 @@
1
+ /**
2
+ * Auto-generated. Mirrors schema.json — regenerate after editing.
3
+ */
4
+ export const SCHEMA = {
5
+ "$schema": "http://json-schema.org/draft-07/schema#",
6
+ "$id": "adhdev:cli/spec@1",
7
+ "title": "ADHDev CLI provider spec",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": [
11
+ "$schema",
12
+ "id",
13
+ "name",
14
+ "binary",
15
+ "send_message",
16
+ "layout",
17
+ "states",
18
+ "default_state"
19
+ ],
20
+ "properties": {
21
+ "$schema": {
22
+ "type": "string",
23
+ "const": "adhdev:cli/spec@1"
24
+ },
25
+ "id": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "pattern": "^[a-z][a-z0-9-]*$"
29
+ },
30
+ "name": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "binary": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "spawn_args": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ },
43
+ "default": []
44
+ },
45
+ "env": {
46
+ "type": "object",
47
+ "additionalProperties": {
48
+ "type": "string"
49
+ },
50
+ "default": {}
51
+ },
52
+ "send_message": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "submit_key"
57
+ ],
58
+ "properties": {
59
+ "submit_key": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "delay_ms_before_submit": {
64
+ "type": "integer",
65
+ "minimum": 0
66
+ },
67
+ "delay_ms_per_char": {
68
+ "type": "integer",
69
+ "minimum": 0
70
+ }
71
+ }
72
+ },
73
+ "layout": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "sections"
78
+ ],
79
+ "properties": {
80
+ "sections": {
81
+ "type": "array",
82
+ "minItems": 1,
83
+ "items": {
84
+ "$ref": "#/definitions/section"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "states": {
90
+ "type": "array",
91
+ "minItems": 1,
92
+ "items": {
93
+ "$ref": "#/definitions/state"
94
+ }
95
+ },
96
+ "default_state": {
97
+ "type": "string",
98
+ "minLength": 1
99
+ },
100
+ "control_bar": {
101
+ "type": "array",
102
+ "default": [],
103
+ "items": {
104
+ "$ref": "#/definitions/control"
105
+ }
106
+ },
107
+ "notifications": {
108
+ "type": "array",
109
+ "default": [],
110
+ "items": {
111
+ "$ref": "#/definitions/notification"
112
+ }
113
+ },
114
+ "delegate": {
115
+ "type": "array",
116
+ "default": [],
117
+ "items": {
118
+ "$ref": "#/definitions/delegateTrigger"
119
+ }
120
+ },
121
+ "native_history": {
122
+ "$ref": "#/definitions/nativeHistory"
123
+ },
124
+ "cli_version_range": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ },
128
+ "debounce": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "busy_hold_ms": { "type": "integer", "minimum": 0 },
133
+ "startup_grace_ms": { "type": "integer", "minimum": 0 }
134
+ }
135
+ }
136
+ },
137
+ "definitions": {
138
+ "size": {
139
+ "oneOf": [
140
+ {
141
+ "type": "integer",
142
+ "minimum": 0
143
+ },
144
+ {
145
+ "type": "string",
146
+ "pattern": "^\\d+(\\.\\d+)?%$"
147
+ }
148
+ ]
149
+ },
150
+ "section": {
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": [
154
+ "id"
155
+ ],
156
+ "properties": {
157
+ "id": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "pattern": "^[a-z][a-z0-9_]*$"
161
+ },
162
+ "from_top": {
163
+ "$ref": "#/definitions/size"
164
+ },
165
+ "from_bottom": {
166
+ "$ref": "#/definitions/size"
167
+ },
168
+ "until": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": [
172
+ "section"
173
+ ],
174
+ "properties": {
175
+ "section": {
176
+ "type": "string"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+ "sectionRegex": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": [
186
+ "regex"
187
+ ],
188
+ "properties": {
189
+ "section": {
190
+ "type": "string"
191
+ },
192
+ "regex": {
193
+ "type": "string",
194
+ "minLength": 1
195
+ },
196
+ "flags": {
197
+ "type": "string",
198
+ "default": "i"
199
+ }
200
+ }
201
+ },
202
+ "sectionPattern": {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": [
206
+ "pattern"
207
+ ],
208
+ "properties": {
209
+ "section": {
210
+ "type": "string"
211
+ },
212
+ "pattern": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "flags": {
217
+ "type": "string",
218
+ "default": ""
219
+ }
220
+ }
221
+ },
222
+ "state": {
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": [
226
+ "id",
227
+ "label",
228
+ "when"
229
+ ],
230
+ "properties": {
231
+ "id": {
232
+ "type": "string",
233
+ "minLength": 1,
234
+ "pattern": "^[a-z][a-z0-9_]*$"
235
+ },
236
+ "label": {
237
+ "type": "string",
238
+ "minLength": 1
239
+ },
240
+ "when": {
241
+ "$ref": "#/definitions/sectionRegex"
242
+ },
243
+ "extract_title": {
244
+ "$ref": "#/definitions/sectionRegex"
245
+ },
246
+ "modal_buttons": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "required": [
250
+ "pattern",
251
+ "key_for_index"
252
+ ],
253
+ "properties": {
254
+ "section": {
255
+ "type": "string"
256
+ },
257
+ "pattern": {
258
+ "type": "string",
259
+ "minLength": 1
260
+ },
261
+ "flags": {
262
+ "type": "string"
263
+ },
264
+ "key_for_index": {
265
+ "type": "string",
266
+ "minLength": 1
267
+ },
268
+ "min_count": {
269
+ "type": "integer",
270
+ "minimum": 1,
271
+ "default": 2
272
+ }
273
+ }
274
+ }
275
+ }
276
+ },
277
+ "control": {
278
+ "type": "object",
279
+ "additionalProperties": false,
280
+ "required": [
281
+ "id",
282
+ "label",
283
+ "action"
284
+ ],
285
+ "properties": {
286
+ "id": {
287
+ "type": "string",
288
+ "minLength": 1,
289
+ "pattern": "^[a-z][a-z0-9_]*$"
290
+ },
291
+ "label": {
292
+ "type": "string",
293
+ "minLength": 1
294
+ },
295
+ "visible_when_state": {
296
+ "type": "array",
297
+ "items": {
298
+ "type": "string"
299
+ }
300
+ },
301
+ "action": {
302
+ "$ref": "#/definitions/controlAction"
303
+ }
304
+ }
305
+ },
306
+ "controlAction": {
307
+ "oneOf": [
308
+ {
309
+ "type": "object",
310
+ "additionalProperties": false,
311
+ "required": [
312
+ "type",
313
+ "keys"
314
+ ],
315
+ "properties": {
316
+ "type": {
317
+ "const": "send_keys"
318
+ },
319
+ "keys": {
320
+ "type": "string",
321
+ "minLength": 1
322
+ }
323
+ }
324
+ },
325
+ {
326
+ "type": "object",
327
+ "additionalProperties": false,
328
+ "required": [
329
+ "type",
330
+ "trigger_keys",
331
+ "wait_for",
332
+ "extract_choices",
333
+ "submit_key"
334
+ ],
335
+ "properties": {
336
+ "type": {
337
+ "const": "open_picker"
338
+ },
339
+ "trigger_keys": {
340
+ "type": "string",
341
+ "minLength": 1
342
+ },
343
+ "wait_for": {
344
+ "$ref": "#/definitions/sectionRegex"
345
+ },
346
+ "extract_choices": {
347
+ "$ref": "#/definitions/sectionPattern"
348
+ },
349
+ "submit_key": {
350
+ "type": "string",
351
+ "minLength": 1
352
+ }
353
+ }
354
+ },
355
+ {
356
+ "type": "object",
357
+ "additionalProperties": false,
358
+ "required": [
359
+ "type",
360
+ "method",
361
+ "keys_template"
362
+ ],
363
+ "properties": {
364
+ "type": {
365
+ "const": "attach_image"
366
+ },
367
+ "method": {
368
+ "const": "tempfile_then_keys"
369
+ },
370
+ "keys_template": {
371
+ "type": "string",
372
+ "minLength": 1
373
+ }
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ "notification": {
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": [
382
+ "id",
383
+ "when_state",
384
+ "title"
385
+ ],
386
+ "properties": {
387
+ "id": {
388
+ "type": "string",
389
+ "minLength": 1,
390
+ "pattern": "^[a-z][a-z0-9_]*$"
391
+ },
392
+ "when_state": {
393
+ "type": "string",
394
+ "minLength": 1
395
+ },
396
+ "title": {
397
+ "type": "string",
398
+ "minLength": 1
399
+ },
400
+ "body": {
401
+ "type": "string"
402
+ }
403
+ }
404
+ },
405
+ "nativeHistory": {
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "properties": {
409
+ "reader": {
410
+ "type": "string",
411
+ "enum": [
412
+ "claude-cli",
413
+ "codex-cli",
414
+ "antigravity-cli",
415
+ "hermes-cli"
416
+ ]
417
+ },
418
+ "source": {
419
+ "oneOf": [
420
+ { "$ref": "#/definitions/nativeHistoryJsonlSource" },
421
+ { "$ref": "#/definitions/nativeHistorySqliteSource" }
422
+ ]
423
+ },
424
+ "override_path": { "type": "string", "minLength": 1 }
425
+ }
426
+ },
427
+ "nativeHistoryMessageMap": {
428
+ "type": "object",
429
+ "additionalProperties": false,
430
+ "required": ["role", "content"],
431
+ "properties": {
432
+ "role": { "type": "string", "minLength": 1 },
433
+ "content": { "type": "string", "minLength": 1 },
434
+ "content_strip": {
435
+ "type": "array",
436
+ "items": { "type": "string", "minLength": 1 }
437
+ },
438
+ "content_unwrap": {
439
+ "type": "array",
440
+ "items": { "type": "string", "minLength": 1 }
441
+ },
442
+ "timestamp_ms": { "type": "string", "minLength": 1 },
443
+ "kind": { "type": "string", "minLength": 1 }
444
+ }
445
+ },
446
+ "nativeHistoryJsonlSource": {
447
+ "type": "object",
448
+ "additionalProperties": false,
449
+ "required": ["kind", "path", "message_map"],
450
+ "properties": {
451
+ "kind": { "const": "jsonl" },
452
+ "path": { "type": "string", "minLength": 1 },
453
+ "file_pattern": { "type": "string", "minLength": 1 },
454
+ "recent_window_ms": { "type": "integer", "minimum": 0 },
455
+ "session_id_from": { "type": "string", "enum": ["filename_uuid", "first_record"] },
456
+ "session_id_path": { "type": "string", "minLength": 1 },
457
+ "message_filter": {
458
+ "type": "object",
459
+ "additionalProperties": false,
460
+ "required": ["where"],
461
+ "properties": { "where": { "type": "string", "minLength": 1 } }
462
+ },
463
+ "message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
464
+ }
465
+ },
466
+ "nativeHistorySqliteSource": {
467
+ "type": "object",
468
+ "additionalProperties": false,
469
+ "required": ["kind", "path", "session_query", "message_query", "message_map"],
470
+ "properties": {
471
+ "kind": { "const": "sqlite" },
472
+ "path": { "type": "string", "minLength": 1 },
473
+ "session_query": { "type": "string", "minLength": 1 },
474
+ "message_query": { "type": "string", "minLength": 1 },
475
+ "message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
476
+ }
477
+ },
478
+ "delegateTrigger": {
479
+ "type": "object",
480
+ "additionalProperties": false,
481
+ "required": [
482
+ "id",
483
+ "when_state",
484
+ "task_template"
485
+ ],
486
+ "properties": {
487
+ "id": {
488
+ "type": "string",
489
+ "minLength": 1,
490
+ "pattern": "^[a-z][a-z0-9_]*$"
491
+ },
492
+ "when_state": {
493
+ "type": "string",
494
+ "minLength": 1
495
+ },
496
+ "after_duration_ms": {
497
+ "type": "integer",
498
+ "minimum": 0
499
+ },
500
+ "task_template": {
501
+ "type": "string",
502
+ "minLength": 1
503
+ }
504
+ }
505
+ }
506
+ }
507
+ } as const;