@adhdev/daemon-core 0.9.82-rc.209 → 0.9.82-rc.210
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.
- package/dist/cli-adapters/terminal-backends/ghostty-vt-backend.d.ts +2 -0
- package/dist/commands/router.d.ts +6 -0
- package/dist/git/git-commands.d.ts +2 -0
- package/dist/git/git-diff.d.ts +6 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +5699 -3486
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5679 -3483
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/coordinator-prompt.d.ts +6 -0
- package/dist/mesh/mesh-delivery-policy.d.ts +5 -0
- package/dist/mesh/mesh-events-coordinator.d.ts +151 -0
- package/dist/mesh/mesh-events-pending.d.ts +33 -0
- package/dist/mesh/mesh-events-stale.d.ts +40 -0
- package/dist/mesh/mesh-events-utils.d.ts +14 -0
- package/dist/mesh/mesh-events.d.ts +5 -198
- package/dist/mesh/mesh-ledger-reconciliation.d.ts +23 -3
- package/dist/mesh/mesh-ledger.d.ts +19 -0
- package/dist/mesh/mesh-missions.d.ts +58 -0
- package/dist/mesh/mesh-review-inbox.d.ts +90 -0
- package/dist/mesh/mesh-runtime-store.d.ts +175 -0
- package/dist/mesh/mesh-task-stats.d.ts +49 -0
- package/dist/mesh/mesh-work-queue.d.ts +82 -0
- package/dist/mesh/refine-config.d.ts +24 -2
- package/dist/mesh/worktree-bootstrap-config.d.ts +22 -0
- package/dist/providers/acp-provider-instance.d.ts +2 -0
- package/dist/providers/spec/driver.d.ts +8 -0
- package/dist/providers/spec/evaluator.d.ts +4 -5
- package/dist/providers/spec/loader.d.ts +1 -0
- package/dist/providers/spec/schema.gen.d.ts +1409 -6
- package/dist/providers/spec/types.d.ts +188 -175
- package/dist/repo-mesh-types.d.ts +1 -0
- package/package.json +1 -1
- package/src/boot/daemon-lifecycle.ts +3 -0
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +20 -7
- package/src/commands/router.ts +594 -66
- package/src/git/git-commands.ts +5 -5
- package/src/git/git-diff.ts +53 -0
- package/src/index.ts +11 -5
- package/src/mesh/coordinator-prompt.ts +14 -1
- package/src/mesh/mesh-delivery-policy.ts +17 -0
- package/src/mesh/mesh-events-coordinator.ts +1404 -0
- package/src/mesh/mesh-events-pending.ts +371 -0
- package/src/mesh/mesh-events-stale.ts +283 -0
- package/src/mesh/mesh-events-utils.ts +161 -0
- package/src/mesh/mesh-events.ts +27 -2143
- package/src/mesh/mesh-ledger-reconciliation.ts +12 -5
- package/src/mesh/mesh-ledger.ts +134 -2
- package/src/mesh/mesh-missions.ts +151 -0
- package/src/mesh/mesh-review-inbox.ts +307 -0
- package/src/mesh/mesh-runtime-store.ts +539 -3
- package/src/mesh/mesh-task-stats.ts +154 -0
- package/src/mesh/mesh-work-queue.ts +233 -17
- package/src/mesh/refine-config.ts +42 -5
- package/src/mesh/worktree-bootstrap-config.ts +79 -0
- package/src/providers/acp-provider-instance.ts +15 -1
- package/src/providers/cli-provider-instance.ts +34 -13
- package/src/providers/spec/driver.ts +57 -29
- package/src/providers/spec/evaluator.ts +302 -112
- package/src/providers/spec/loader.ts +226 -37
- package/src/providers/spec/schema.gen.ts +450 -334
- package/src/providers/spec/schema.json +162 -75
- package/src/providers/spec/types.ts +234 -183
- package/src/repo-mesh-types.ts +1 -0
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "adhdev:cli/spec@
|
|
4
|
-
"title": "ADHDev CLI provider spec",
|
|
3
|
+
"$id": "adhdev:cli/spec@3",
|
|
4
|
+
"title": "ADHDev CLI provider spec v3",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": ["$schema", "id", "name", "binary", "send_message", "
|
|
7
|
+
"required": ["$schema", "id", "name", "binary", "send_message", "sections", "states", "default_state"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"$schema": { "type": "string", "const": "adhdev:cli/spec@
|
|
9
|
+
"$schema": { "type": "string", "const": "adhdev:cli/spec@3" },
|
|
10
10
|
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9-]*$" },
|
|
11
11
|
"name": { "type": "string", "minLength": 1 },
|
|
12
12
|
"binary": { "type": "string", "minLength": 1 },
|
|
13
13
|
"spawn_args": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
14
|
-
"env": {
|
|
15
|
-
|
|
16
|
-
"additionalProperties": { "type": "string" },
|
|
17
|
-
"default": {}
|
|
18
|
-
},
|
|
14
|
+
"env": { "type": "object", "additionalProperties": { "type": "string" }, "default": {} },
|
|
15
|
+
"cli_version_range": { "type": "string", "minLength": 1 },
|
|
19
16
|
"send_message": {
|
|
20
17
|
"type": "object",
|
|
21
18
|
"additionalProperties": false,
|
|
@@ -26,56 +23,36 @@
|
|
|
26
23
|
"delay_ms_per_char": { "type": "integer", "minimum": 0 }
|
|
27
24
|
}
|
|
28
25
|
},
|
|
29
|
-
"
|
|
26
|
+
"sections": {
|
|
30
27
|
"type": "object",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"properties": {
|
|
34
|
-
"sections": {
|
|
35
|
-
"type": "array",
|
|
36
|
-
"minItems": 1,
|
|
37
|
-
"items": { "$ref": "#/definitions/section" }
|
|
38
|
-
}
|
|
39
|
-
}
|
|
28
|
+
"minProperties": 1,
|
|
29
|
+
"additionalProperties": { "$ref": "#/definitions/sectionDef" }
|
|
40
30
|
},
|
|
41
31
|
"states": {
|
|
42
32
|
"type": "array",
|
|
43
33
|
"minItems": 1,
|
|
44
|
-
"items": { "$ref": "#/definitions/
|
|
34
|
+
"items": { "$ref": "#/definitions/stateV3" }
|
|
45
35
|
},
|
|
46
36
|
"default_state": { "type": "string", "minLength": 1 },
|
|
47
|
-
"control_bar": {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"items": { "$ref": "#/definitions/control" }
|
|
51
|
-
},
|
|
52
|
-
"notifications": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"default": [],
|
|
55
|
-
"items": { "$ref": "#/definitions/notification" }
|
|
56
|
-
},
|
|
57
|
-
"delegate": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"default": [],
|
|
60
|
-
"items": { "$ref": "#/definitions/delegateTrigger" }
|
|
61
|
-
},
|
|
37
|
+
"control_bar": { "type": "array", "default": [], "items": { "$ref": "#/definitions/control" } },
|
|
38
|
+
"notifications": { "type": "array", "default": [], "items": { "$ref": "#/definitions/notification" } },
|
|
39
|
+
"delegate": { "type": "array", "default": [], "items": { "$ref": "#/definitions/delegateTrigger" } },
|
|
62
40
|
"native_history": { "$ref": "#/definitions/nativeHistory" },
|
|
63
|
-
"cli_version_range": { "type": "string", "minLength": 1 },
|
|
64
41
|
"requiresFinalAssistantBeforeIdle": { "type": "boolean" },
|
|
65
|
-
"
|
|
42
|
+
"timing": {
|
|
66
43
|
"type": "object",
|
|
67
44
|
"additionalProperties": false,
|
|
68
45
|
"properties": {
|
|
69
46
|
"busy_hold_ms": { "type": "integer", "minimum": 0 },
|
|
70
47
|
"idle_hold_ms": { "type": "integer", "minimum": 0 },
|
|
71
48
|
"startup_grace_ms": { "type": "integer", "minimum": 0 },
|
|
72
|
-
"
|
|
49
|
+
"completion_marker": {
|
|
73
50
|
"type": "object",
|
|
74
51
|
"additionalProperties": false,
|
|
75
|
-
"required": ["
|
|
52
|
+
"required": ["matches", "hold_ms"],
|
|
76
53
|
"properties": {
|
|
77
54
|
"section": { "type": "string", "minLength": 1 },
|
|
78
|
-
"
|
|
55
|
+
"matches": { "type": "string", "minLength": 1 },
|
|
79
56
|
"flags": { "type": "string" },
|
|
80
57
|
"hold_ms": { "type": "integer", "minimum": 0 },
|
|
81
58
|
"force_after_ms": { "type": "integer", "minimum": 0 }
|
|
@@ -91,16 +68,14 @@
|
|
|
91
68
|
{ "type": "string", "pattern": "^\\d+(\\.\\d+)?%$" }
|
|
92
69
|
]
|
|
93
70
|
},
|
|
94
|
-
"
|
|
71
|
+
"sectionDef": {
|
|
95
72
|
"type": "object",
|
|
96
73
|
"additionalProperties": false,
|
|
97
|
-
"required": ["id"],
|
|
98
74
|
"properties": {
|
|
99
|
-
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
|
|
100
75
|
"from_top": { "$ref": "#/definitions/size" },
|
|
101
76
|
"from_bottom": { "$ref": "#/definitions/size" },
|
|
102
|
-
"
|
|
103
|
-
"
|
|
77
|
+
"until": { "type": "string", "minLength": 1 },
|
|
78
|
+
"anchor": { "type": "string", "minLength": 1 },
|
|
104
79
|
"anchor_flags": { "type": "string" },
|
|
105
80
|
"anchor_last": { "type": "boolean" },
|
|
106
81
|
"anchor_context": {
|
|
@@ -113,64 +88,128 @@
|
|
|
113
88
|
"next_flags": { "type": "string" }
|
|
114
89
|
}
|
|
115
90
|
},
|
|
91
|
+
"lines": { "type": "integer", "minimum": 1 },
|
|
116
92
|
"until_regex": { "type": "string", "minLength": 1 },
|
|
117
|
-
"until_regex_flags": { "type": "string" }
|
|
118
|
-
"until": {
|
|
119
|
-
"type": "object",
|
|
120
|
-
"additionalProperties": false,
|
|
121
|
-
"required": ["section"],
|
|
122
|
-
"properties": { "section": { "type": "string" } }
|
|
123
|
-
}
|
|
93
|
+
"until_regex_flags": { "type": "string" }
|
|
124
94
|
}
|
|
125
95
|
},
|
|
126
|
-
"
|
|
96
|
+
"condition": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{ "$ref": "#/definitions/regexCondition" },
|
|
99
|
+
{ "$ref": "#/definitions/changedCondition" },
|
|
100
|
+
{ "$ref": "#/definitions/allCondition" },
|
|
101
|
+
{ "$ref": "#/definitions/anyCondition" }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"regexCondition": {
|
|
127
105
|
"type": "object",
|
|
128
106
|
"additionalProperties": false,
|
|
129
|
-
"required": ["
|
|
107
|
+
"required": ["matches"],
|
|
130
108
|
"properties": {
|
|
131
109
|
"section": { "type": "string" },
|
|
132
|
-
"
|
|
133
|
-
"flags": { "type": "string"
|
|
110
|
+
"matches": { "type": "string", "minLength": 1 },
|
|
111
|
+
"flags": { "type": "string" },
|
|
134
112
|
"cursor_row_min": { "type": "integer", "minimum": 0 },
|
|
135
113
|
"cursor_row_max": { "type": "integer", "minimum": 0 },
|
|
136
114
|
"cursor_col_min": { "type": "integer", "minimum": 0 },
|
|
137
115
|
"cursor_col_max": { "type": "integer", "minimum": 0 }
|
|
138
116
|
}
|
|
139
117
|
},
|
|
140
|
-
"
|
|
118
|
+
"changedCondition": {
|
|
141
119
|
"type": "object",
|
|
142
120
|
"additionalProperties": false,
|
|
143
|
-
"required": ["
|
|
121
|
+
"required": ["cursor_above", "changed"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"cursor_above": { "type": "integer", "minimum": 1 },
|
|
124
|
+
"changed": { "type": "boolean", "const": true }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"allCondition": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": ["all"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"all": { "type": "array", "items": { "$ref": "#/definitions/condition" } }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"anyCondition": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": ["any"],
|
|
139
|
+
"properties": {
|
|
140
|
+
"any": { "type": "array", "items": { "$ref": "#/definitions/condition" } }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"extractTitle": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"section": { "type": "string" },
|
|
148
|
+
"regex": { "type": "string", "minLength": 1 },
|
|
149
|
+
"flags": { "type": "string" },
|
|
150
|
+
"first_line": { "type": "boolean", "const": true }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"extractButtons": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": ["pattern", "key_for_index"],
|
|
144
157
|
"properties": {
|
|
145
158
|
"section": { "type": "string" },
|
|
146
159
|
"pattern": { "type": "string", "minLength": 1 },
|
|
147
|
-
"flags": { "type": "string"
|
|
160
|
+
"flags": { "type": "string" },
|
|
161
|
+
"key_for_index": { "type": "string", "minLength": 1 },
|
|
162
|
+
"min_count": { "type": "integer", "minimum": 1, "default": 2 },
|
|
163
|
+
"continuation_lines": { "type": "boolean", "default": false }
|
|
148
164
|
}
|
|
149
165
|
},
|
|
150
|
-
"
|
|
166
|
+
"stateV3": {
|
|
151
167
|
"type": "object",
|
|
152
168
|
"additionalProperties": false,
|
|
153
169
|
"required": ["id", "label", "when"],
|
|
154
170
|
"properties": {
|
|
155
171
|
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
|
|
156
172
|
"label": { "type": "string", "minLength": 1 },
|
|
157
|
-
"when": {
|
|
158
|
-
|
|
159
|
-
|
|
173
|
+
"when": {
|
|
174
|
+
"oneOf": [
|
|
175
|
+
{ "$ref": "#/definitions/allCondition" },
|
|
176
|
+
{ "$ref": "#/definitions/anyCondition" }
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"extract": {
|
|
160
180
|
"type": "object",
|
|
161
181
|
"additionalProperties": false,
|
|
162
|
-
"required": ["pattern", "key_for_index"],
|
|
163
182
|
"properties": {
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"flags": { "type": "string" },
|
|
167
|
-
"key_for_index": { "type": "string", "minLength": 1 },
|
|
168
|
-
"min_count": { "type": "integer", "minimum": 1, "default": 2 },
|
|
169
|
-
"continuation_lines": { "type": "boolean", "default": false }
|
|
183
|
+
"title": { "$ref": "#/definitions/extractTitle" },
|
|
184
|
+
"buttons": { "$ref": "#/definitions/extractButtons" }
|
|
170
185
|
}
|
|
171
186
|
}
|
|
172
187
|
}
|
|
173
188
|
},
|
|
189
|
+
"sectionRegex": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": ["regex"],
|
|
193
|
+
"properties": {
|
|
194
|
+
"section": { "type": "string" },
|
|
195
|
+
"regex": { "type": "string", "minLength": 1 },
|
|
196
|
+
"flags": { "type": "string", "default": "i" },
|
|
197
|
+
"cursor_row_min": { "type": "integer", "minimum": 0 },
|
|
198
|
+
"cursor_row_max": { "type": "integer", "minimum": 0 },
|
|
199
|
+
"cursor_col_min": { "type": "integer", "minimum": 0 },
|
|
200
|
+
"cursor_col_max": { "type": "integer", "minimum": 0 }
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"sectionPattern": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"required": ["pattern"],
|
|
207
|
+
"properties": {
|
|
208
|
+
"section": { "type": "string" },
|
|
209
|
+
"pattern": { "type": "string", "minLength": 1 },
|
|
210
|
+
"flags": { "type": "string", "default": "" }
|
|
211
|
+
}
|
|
212
|
+
},
|
|
174
213
|
"control": {
|
|
175
214
|
"type": "object",
|
|
176
215
|
"additionalProperties": false,
|
|
@@ -231,12 +270,60 @@
|
|
|
231
270
|
"nativeHistory": {
|
|
232
271
|
"type": "object",
|
|
233
272
|
"additionalProperties": false,
|
|
234
|
-
"required": ["reader"],
|
|
235
273
|
"properties": {
|
|
236
|
-
"reader": {
|
|
237
|
-
|
|
238
|
-
"
|
|
239
|
-
|
|
274
|
+
"reader": { "type": "string", "enum": ["claude-cli", "codex-cli", "antigravity-cli", "hermes-cli"] },
|
|
275
|
+
"source": {
|
|
276
|
+
"oneOf": [
|
|
277
|
+
{ "$ref": "#/definitions/nativeHistoryJsonlSource" },
|
|
278
|
+
{ "$ref": "#/definitions/nativeHistorySqliteSource" }
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"override_path": { "type": "string", "minLength": 1 }
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"nativeHistoryMessageMap": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": ["role", "content"],
|
|
288
|
+
"properties": {
|
|
289
|
+
"role": { "type": "string", "minLength": 1 },
|
|
290
|
+
"content": { "type": "string", "minLength": 1 },
|
|
291
|
+
"content_strip": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
292
|
+
"content_unwrap": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
293
|
+
"timestamp_ms": { "type": "string", "minLength": 1 },
|
|
294
|
+
"kind": { "type": "string", "minLength": 1 }
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"nativeHistoryJsonlSource": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"required": ["kind", "path", "message_map"],
|
|
301
|
+
"properties": {
|
|
302
|
+
"kind": { "const": "jsonl" },
|
|
303
|
+
"path": { "type": "string", "minLength": 1 },
|
|
304
|
+
"file_pattern": { "type": "string", "minLength": 1 },
|
|
305
|
+
"recent_window_ms": { "type": "integer", "minimum": 0 },
|
|
306
|
+
"session_id_from": { "type": "string", "enum": ["filename_uuid", "first_record"] },
|
|
307
|
+
"session_id_path": { "type": "string", "minLength": 1 },
|
|
308
|
+
"message_filter": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"required": ["where"],
|
|
312
|
+
"properties": { "where": { "type": "string", "minLength": 1 } }
|
|
313
|
+
},
|
|
314
|
+
"message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"nativeHistorySqliteSource": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"required": ["kind", "path", "session_query", "message_query", "message_map"],
|
|
321
|
+
"properties": {
|
|
322
|
+
"kind": { "const": "sqlite" },
|
|
323
|
+
"path": { "type": "string", "minLength": 1 },
|
|
324
|
+
"session_query": { "type": "string", "minLength": 1 },
|
|
325
|
+
"message_query": { "type": "string", "minLength": 1 },
|
|
326
|
+
"message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
|
|
240
327
|
}
|
|
241
328
|
},
|
|
242
329
|
"delegateTrigger": {
|