@adhdev/daemon-core 0.9.82-rc.252 → 0.9.82-rc.254
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/index.js +159 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +159 -121
- package/dist/index.mjs.map +1 -1
- package/dist/providers/cli-provider-instance.d.ts +0 -3
- package/dist/providers/spec/fsm-driver.d.ts +1 -0
- package/package.json +1 -1
- package/src/commands/router.ts +34 -1
- package/src/mesh/mesh-events-coordinator.ts +94 -35
- package/src/mesh/mesh-events-pending.ts +14 -6
- package/src/mesh/mesh-work-queue.ts +60 -2
- package/src/providers/cli-provider-instance.ts +22 -101
- package/src/providers/spec/cli-adapter.ts +12 -8
- package/src/providers/spec/fsm-driver.ts +8 -3
|
@@ -41,7 +41,7 @@ import { LOG } from '../../logging/logger.js';
|
|
|
41
41
|
|
|
42
42
|
export type DashboardEvent =
|
|
43
43
|
| { kind: 'pty_data'; chunk: string }
|
|
44
|
-
| { kind: 'state_changed'; state: { id: string; label: string; title: string | null };
|
|
44
|
+
| { kind: 'state_changed'; state: { id: string; label: string; title: string | null; status: 'idle' | 'generating' | 'approval' };
|
|
45
45
|
modal: { title: string | null; buttons: { index: number; label: string }[] } | null;
|
|
46
46
|
controls: { id: string; label: string; action_type: string }[] }
|
|
47
47
|
| { kind: 'notification'; id: string; title: string; body: string }
|
|
@@ -144,7 +144,7 @@ type HistoryEntry = DriverHistoryEntry;
|
|
|
144
144
|
/** Per-state evaluation snapshot (mirrors v3 SpecEvaluation shape for the
|
|
145
145
|
* parts the cli-adapter / panel consume). */
|
|
146
146
|
interface CurrentEval {
|
|
147
|
-
state: { id: string; label: string; title: string | null };
|
|
147
|
+
state: { id: string; label: string; title: string | null; status: 'idle' | 'generating' | 'approval' };
|
|
148
148
|
modal: ModalSnapshot | null;
|
|
149
149
|
controls: VisibleControl[];
|
|
150
150
|
}
|
|
@@ -432,7 +432,12 @@ export class FsmDriver implements ISpecDriver {
|
|
|
432
432
|
const title = modal?.title ?? this.deriveTitle(state, sections, lines.join('\n'));
|
|
433
433
|
|
|
434
434
|
const next: CurrentEval = {
|
|
435
|
-
|
|
435
|
+
// status is derived from the FSM state itself (statusForState), NOT from
|
|
436
|
+
// whether a modal was parsed this frame. A modal state whose buttons briefly
|
|
437
|
+
// fail to parse (PTY repaint → deriveModal returns null) must still report
|
|
438
|
+
// its authoritative status (e.g. 'approval'), so the adapter never collapses
|
|
439
|
+
// an approval/busy state to idle on a transient modal-parse miss.
|
|
440
|
+
state: { id: state.id, label: state.label, title, status: statusForState(state) },
|
|
436
441
|
modal,
|
|
437
442
|
controls,
|
|
438
443
|
};
|