@adhdev/daemon-core 0.9.82-rc.194 → 0.9.82-rc.196
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-adapter-types.d.ts +1 -0
- package/dist/index.js +202 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +205 -73
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/contracts.d.ts +1 -1
- package/dist/mesh/mesh-active-work.d.ts +1 -1
- package/dist/mesh/{beads-db.d.ts → mesh-runtime-store.d.ts} +2 -2
- package/dist/mesh/mesh-work-queue.d.ts +3 -3
- package/dist/providers/provider-instance.d.ts +1 -1
- package/dist/providers/spec/driver.d.ts +4 -1
- package/dist/providers/spec/schema.gen.d.ts +46 -0
- package/dist/providers/spec/types.d.ts +39 -0
- package/dist/shared-types-extra.d.ts +1 -1
- package/dist/status/normalize.d.ts +1 -1
- package/dist/status/normalize.js +1 -0
- package/dist/status/normalize.js.map +1 -1
- package/dist/status/normalize.mjs +1 -0
- package/dist/status/normalize.mjs.map +1 -1
- package/package.json +1 -1
- package/src/cli-adapter-types.ts +1 -0
- package/src/cli-adapters/cli-state-engine.ts +44 -2
- package/src/mesh/contracts.ts +1 -1
- package/src/mesh/mesh-active-work.ts +8 -8
- package/src/mesh/mesh-events.ts +12 -12
- package/src/mesh/{beads-db.ts → mesh-runtime-store.ts} +30 -7
- package/src/mesh/mesh-work-queue.ts +33 -33
- package/src/providers/cli-provider-instance.ts +31 -8
- package/src/providers/provider-instance.ts +1 -1
- package/src/providers/spec/driver.ts +34 -3
- package/src/providers/spec/evaluator.ts +32 -3
- package/src/providers/spec/schema.gen.ts +22 -2
- package/src/providers/spec/schema.json +1 -0
- package/src/providers/spec/types.ts +39 -0
- package/src/providers/types/interactive-prompt.ts +21 -7
- package/src/shared-types-extra.ts +1 -1
- package/src/status/normalize.ts +2 -0
|
@@ -349,15 +349,29 @@ export function buildClaudeInteractiveTuiAnswerSteps(
|
|
|
349
349
|
if (question.multiSelect) throw new Error('Claude TUI multi-select prompts are not supported yet');
|
|
350
350
|
const answer = response.answers[question.questionId];
|
|
351
351
|
if (!answer) throw new Error(`Missing answer for ${question.questionId}`);
|
|
352
|
-
|
|
353
|
-
if (
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
352
|
+
const freeformText = answer.freeformText?.trim() ?? '';
|
|
353
|
+
if (freeformText) {
|
|
354
|
+
// Freeform: select the "Type something." option (always the last visible
|
|
355
|
+
// option before "Chat about this"), then type the text and confirm.
|
|
356
|
+
const typeOptionIndex = question.options.findIndex(o => /^Type something\.?$/i.test(o.label));
|
|
357
|
+
const optionNumber = typeOptionIndex >= 0 ? typeOptionIndex + 1 : question.options.length;
|
|
358
|
+
steps.push(String(optionNumber));
|
|
359
|
+
// Type the text character by character, then Enter to confirm.
|
|
360
|
+
for (const ch of freeformText) steps.push(ch);
|
|
361
|
+
steps.push('\r');
|
|
362
|
+
} else {
|
|
363
|
+
if (answer.selectedLabels.length !== 1) throw new Error(`Expected one selected label for ${question.questionId}`);
|
|
364
|
+
const selectedIndex = question.options.findIndex(option => option.label === answer.selectedLabels[0]);
|
|
365
|
+
if (selectedIndex < 0) throw new Error(`Unknown option for ${question.questionId}: ${answer.selectedLabels[0]}`);
|
|
366
|
+
// Use numeric key (1-based) to jump directly to the option. This avoids
|
|
367
|
+
// cursor-position drift between questions that arrow-key navigation suffers
|
|
368
|
+
// from — the TUI accepts a digit key to jump straight to that option index.
|
|
369
|
+
steps.push(String(selectedIndex + 1));
|
|
358
370
|
}
|
|
359
|
-
steps.push('\r');
|
|
360
371
|
}
|
|
372
|
+
// After all questions are answered, Claude TUI shows a final confirm screen
|
|
373
|
+
// ("Submit answers" / "Cancel"). The first option is pre-selected, so a
|
|
374
|
+
// single Enter confirms and submits.
|
|
361
375
|
steps.push('\r');
|
|
362
376
|
return steps;
|
|
363
377
|
}
|
|
@@ -21,7 +21,7 @@ export interface RuntimeAttachedClient {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/** Session status union (used by SessionEntry.status, legacy recent-launch metadata, etc.) */
|
|
24
|
-
export type SessionStatus = 'idle' | 'generating' | 'waiting_approval' | 'error' | 'stopped' | 'starting' | 'panel_hidden' | 'not_monitored' | 'disconnected';
|
|
24
|
+
export type SessionStatus = 'idle' | 'generating' | 'waiting_approval' | 'waiting_choice' | 'error' | 'stopped' | 'starting' | 'panel_hidden' | 'not_monitored' | 'disconnected';
|
|
25
25
|
|
|
26
26
|
/** Inbox bucket categories for recent sessions */
|
|
27
27
|
export type RecentSessionBucket = 'needs_attention' | 'working' | 'task_complete' | 'idle';
|
package/src/status/normalize.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type ManagedStatus =
|
|
|
5
5
|
| 'idle'
|
|
6
6
|
| 'generating'
|
|
7
7
|
| 'waiting_approval'
|
|
8
|
+
| 'waiting_choice'
|
|
8
9
|
| 'error'
|
|
9
10
|
| 'stopped'
|
|
10
11
|
| 'starting'
|
|
@@ -151,6 +152,7 @@ export function normalizeManagedStatus(
|
|
|
151
152
|
|
|
152
153
|
const normalized = String(status || 'idle').trim().toLowerCase();
|
|
153
154
|
if (normalized === 'waiting_approval') return 'waiting_approval';
|
|
155
|
+
if (normalized === 'waiting_choice') return 'waiting_choice';
|
|
154
156
|
if (WORKING_STATUSES.has(normalized)) return 'generating';
|
|
155
157
|
if (normalized === 'error') return 'error';
|
|
156
158
|
if (normalized === 'stopped') return 'stopped';
|