@adhdev/daemon-core 0.9.82-rc.361 → 0.9.82-rc.363
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/cli-state-engine.d.ts +1 -1
- package/dist/cli-adapters/provider-cli-shared.d.ts +10 -0
- package/dist/commands/low-family/coordinator-prompt.d.ts +9 -0
- package/dist/commands/low-family/daemon-lifecycle.d.ts +2 -0
- package/dist/commands/low-family/diagnostics.d.ts +2 -0
- package/dist/commands/low-family/mesh-ledger.d.ts +10 -0
- package/dist/commands/low-family/mesh-node-logs.d.ts +2 -0
- package/dist/commands/low-family/notification.d.ts +2 -0
- package/dist/commands/low-family/status-meta.d.ts +2 -0
- package/dist/commands/low-family/types.d.ts +17 -0
- package/dist/index.js +2290 -2177
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2296 -2183
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-events-utils.d.ts +1 -0
- package/dist/providers/cli-provider-instance.d.ts +2 -0
- package/package.json +2 -2
- package/src/cli-adapters/cli-state-engine.ts +7 -1
- package/src/cli-adapters/provider-cli-adapter.ts +1 -0
- package/src/cli-adapters/provider-cli-shared.ts +10 -0
- package/src/commands/low-family/coordinator-prompt.ts +72 -0
- package/src/commands/low-family/daemon-lifecycle.ts +107 -0
- package/src/commands/low-family/diagnostics.ts +57 -0
- package/src/commands/low-family/index.ts +14 -0
- package/src/commands/low-family/mesh-ledger.ts +62 -0
- package/src/commands/low-family/mesh-node-logs.ts +81 -0
- package/src/commands/low-family/notification.ts +116 -0
- package/src/commands/low-family/status-meta.ts +112 -0
- package/src/commands/low-family/types.ts +20 -0
- package/src/commands/router.ts +8 -522
- package/src/mesh/mesh-events-coordinator.ts +37 -0
- package/src/mesh/mesh-events-utils.ts +28 -2
- package/src/providers/cli-provider-instance.ts +46 -0
|
@@ -83,7 +83,7 @@ export declare class CliStateEngine {
|
|
|
83
83
|
* seq) is always a real, distinct approval and must be written.
|
|
84
84
|
*/
|
|
85
85
|
approvalEntrySeq: number;
|
|
86
|
-
|
|
86
|
+
lastResolvedEntrySeq: number;
|
|
87
87
|
/**
|
|
88
88
|
* When the engine previously held a modal but the latest parse failed
|
|
89
89
|
* to extract one, we record the timestamp here and only drop the modal
|
|
@@ -36,6 +36,16 @@ export interface CliSessionStatus {
|
|
|
36
36
|
* seq is the only reliable discriminator.
|
|
37
37
|
*/
|
|
38
38
|
approvalEntrySeq?: number;
|
|
39
|
+
/**
|
|
40
|
+
* The approval entry seq that the engine's last resolveModal() handled. When
|
|
41
|
+
* `lastResolvedEntrySeq >= approvalEntrySeq` (and approvalEntrySeq > 0) it is positive
|
|
42
|
+
* evidence that the current/latest approval entry was resolved through ADHDev (auto-approve
|
|
43
|
+
* fire, dashboard / mesh_approve, or dev-cli-debug — all route through resolveModal). The
|
|
44
|
+
* completion finalization gate uses this to avoid confirming a waiting_approval→idle
|
|
45
|
+
* transition for which no resolution actually occurred (a false idle: the spec's text-based
|
|
46
|
+
* approval→idle rule tripped while the modal is still on screen).
|
|
47
|
+
*/
|
|
48
|
+
lastResolvedEntrySeq?: number;
|
|
39
49
|
activeInteractivePrompt?: InteractivePrompt | null;
|
|
40
50
|
pendingOutboundCount?: number;
|
|
41
51
|
pendingOutboundMessages?: Array<{
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RF-ROUTER LOW family — coordinator-prompt override/append file commands.
|
|
3
|
+
*
|
|
4
|
+
* Extracted verbatim from DaemonCommandRouter.executeDaemonCommand. Both handlers
|
|
5
|
+
* read/write only the on-disk ~/.adhdev/coordinator-prompts directory (no router
|
|
6
|
+
* instance state) and return the same CommandRouterResult the inlined cases did.
|
|
7
|
+
*/
|
|
8
|
+
import type { LowFamilyHandler } from './types.js';
|
|
9
|
+
export declare const coordinatorPromptHandlers: Record<string, LowFamilyHandler>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RF-ROUTER LOW family — mesh ledger read / slice / import commands.
|
|
3
|
+
*
|
|
4
|
+
* Extracted verbatim from DaemonCommandRouter.executeDaemonCommand. Each handler
|
|
5
|
+
* touches only the on-disk mesh ledger (dynamically imported mesh-ledger module)
|
|
6
|
+
* keyed by meshId — no router instance state — and returns the same
|
|
7
|
+
* CommandRouterResult the inlined cases did.
|
|
8
|
+
*/
|
|
9
|
+
import type { LowFamilyHandler } from './types.js';
|
|
10
|
+
export declare const meshLedgerHandlers: Record<string, LowFamilyHandler>;
|
|
@@ -9,8 +9,25 @@
|
|
|
9
9
|
* falls through to the remaining switch (and ultimately CommandHandler delegation).
|
|
10
10
|
*/
|
|
11
11
|
import type { CommandRouterDeps, CommandRouterResult } from '../router.js';
|
|
12
|
+
/** Mesh record resolved from the router's inline-mesh cache + local config. */
|
|
13
|
+
export type ResolvedMeshForCommand = {
|
|
14
|
+
mesh: any;
|
|
15
|
+
inline: boolean;
|
|
16
|
+
source: 'inline_cache' | 'inline_bootstrap' | 'local_config';
|
|
17
|
+
} | null;
|
|
12
18
|
export interface LowFamilyContext {
|
|
13
19
|
deps: CommandRouterDeps;
|
|
20
|
+
/**
|
|
21
|
+
* Bound `DaemonCommandRouter.getMeshForCommand`. A handful of LOW handlers
|
|
22
|
+
* (mesh-node-logs) must resolve a mesh node's owning daemonId from the
|
|
23
|
+
* router's inline-mesh cache, which is router instance state not present in
|
|
24
|
+
* `deps`. The router injects it at dispatch; handlers that don't need it
|
|
25
|
+
* ignore it. Optional so unit tests can omit it (and assert the guarded
|
|
26
|
+
* fallback) without constructing a full router.
|
|
27
|
+
*/
|
|
28
|
+
getMeshForCommand?: (meshId: string, inlineMesh?: unknown, options?: {
|
|
29
|
+
preferInline?: boolean;
|
|
30
|
+
}) => Promise<ResolvedMeshForCommand>;
|
|
14
31
|
}
|
|
15
32
|
export type LowFamilyHandler = (ctx: LowFamilyContext, args: any) => Promise<CommandRouterResult>;
|
|
16
33
|
export type LowFamilyRegistry = Map<string, LowFamilyHandler>;
|