@adhdev/daemon-core 0.9.82-rc.16 → 0.9.82-rc.161

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 (209) hide show
  1. package/dist/boot/process-hardening.d.ts +50 -0
  2. package/dist/chat/source-machine.d.ts +166 -0
  3. package/dist/chat/source-resolver.d.ts +104 -0
  4. package/dist/chat/subscription-updates.d.ts +1 -0
  5. package/dist/cli-adapter-types.d.ts +19 -2
  6. package/dist/cli-adapters/cli-script-runner.d.ts +117 -0
  7. package/dist/cli-adapters/cli-state-engine.d.ts +178 -0
  8. package/dist/cli-adapters/provider-cli-adapter.d.ts +104 -63
  9. package/dist/cli-adapters/provider-cli-parse.d.ts +4 -0
  10. package/dist/cli-adapters/provider-cli-shared.d.ts +27 -0
  11. package/dist/commands/handler.d.ts +66 -0
  12. package/dist/commands/mesh-coordinator.d.ts +72 -1
  13. package/dist/commands/router.d.ts +22 -0
  14. package/dist/config/chat-history.d.ts +7 -0
  15. package/dist/config/config.d.ts +5 -0
  16. package/dist/config/mesh-config.d.ts +71 -1
  17. package/dist/git/git-commands.d.ts +5 -1
  18. package/dist/index.d.ts +31 -6
  19. package/dist/index.js +17210 -3575
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +17127 -3551
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/installer.d.ts +1 -4
  24. package/dist/ipc/local-ipc-server.d.ts +91 -0
  25. package/dist/launch.d.ts +1 -1
  26. package/dist/logging/async-batch-writer.d.ts +10 -0
  27. package/dist/mesh/beads-db.d.ts +72 -0
  28. package/dist/mesh/contracts.d.ts +164 -0
  29. package/dist/mesh/coordinator-prompt.d.ts +30 -0
  30. package/dist/mesh/coordinator-registry.d.ts +59 -0
  31. package/dist/mesh/mesh-active-work.d.ts +90 -0
  32. package/dist/mesh/mesh-events.d.ts +77 -5
  33. package/dist/mesh/mesh-fast-forward.d.ts +39 -0
  34. package/dist/mesh/mesh-host-ownership.d.ts +9 -0
  35. package/dist/mesh/mesh-ledger.d.ts +58 -1
  36. package/dist/mesh/mesh-refine-status.d.ts +26 -0
  37. package/dist/mesh/mesh-work-queue.d.ts +44 -5
  38. package/dist/mesh/preview-freshness.d.ts +18 -0
  39. package/dist/mesh/refine-config.d.ts +193 -0
  40. package/dist/mesh/worktree-bootstrap-config.d.ts +113 -0
  41. package/dist/providers/approval-utils.d.ts +9 -0
  42. package/dist/providers/cli-provider-instance.d.ts +7 -2
  43. package/dist/providers/contracts.d.ts +98 -5
  44. package/dist/providers/native-history/antigravity-cli-transcript.d.ts +100 -0
  45. package/dist/providers/native-history/claude-cli-transcript.d.ts +70 -0
  46. package/dist/providers/native-history/codex-cli-transcript.d.ts +73 -0
  47. package/dist/providers/native-history/dispatcher.d.ts +24 -0
  48. package/dist/providers/native-history/hermes-cli-transcript.d.ts +30 -0
  49. package/dist/providers/native-history/index.d.ts +13 -0
  50. package/dist/providers/provider-loader.d.ts +19 -1
  51. package/dist/providers/read-chat-contract.d.ts +29 -0
  52. package/dist/providers/sdk/v1/builders/acp/detect-status.d.ts +68 -0
  53. package/dist/providers/sdk/v1/builders/cli/detect-status.d.ts +85 -0
  54. package/dist/providers/sdk/v1/builders/cli/parse-approval-squash.d.ts +59 -0
  55. package/dist/providers/sdk/v1/builders/cli/parse-approval.d.ts +64 -0
  56. package/dist/providers/sdk/v1/builders/cli/parse-session.d.ts +91 -0
  57. package/dist/providers/sdk/v1/builders/cli/visible-region.d.ts +42 -0
  58. package/dist/providers/sdk/v1/fixture-tooling/format.d.ts +126 -0
  59. package/dist/providers/sdk/v1/fixture-tooling/index.d.ts +8 -0
  60. package/dist/providers/sdk/v1/fixture-tooling/replay.d.ts +38 -0
  61. package/dist/providers/sdk/v1/index.d.ts +30 -0
  62. package/dist/providers/sdk/v1/sandbox/README-design.d.ts +193 -0
  63. package/dist/providers/sdk/v1/sandbox/require-whitelist.d.ts +74 -0
  64. package/dist/providers/sdk/v1/sandbox/script-runner.d.ts +98 -0
  65. package/dist/providers/sdk/v1/types/cli/index.d.ts +277 -0
  66. package/dist/providers/sdk/v1/types/common/index.d.ts +169 -0
  67. package/dist/providers/sdk/v1/validators/index.d.ts +5 -0
  68. package/dist/providers/sdk/v1/validators/manifest.d.ts +40 -0
  69. package/dist/providers/sdk/v1/validators/taint.d.ts +52 -0
  70. package/dist/providers/spec/adapter.d.ts +56 -0
  71. package/dist/providers/spec/cli-adapter.d.ts +76 -0
  72. package/dist/providers/spec/driver.d.ts +148 -0
  73. package/dist/providers/spec/evaluator.d.ts +47 -0
  74. package/dist/providers/spec/loader.d.ts +14 -0
  75. package/dist/providers/spec/native-history-executor.d.ts +39 -0
  76. package/dist/providers/spec/route.d.ts +4 -0
  77. package/dist/providers/spec/schema.gen.d.ts +507 -0
  78. package/dist/providers/spec/types.d.ts +211 -0
  79. package/dist/providers/transcript-v2.d.ts +176 -0
  80. package/dist/repo-mesh-types.d.ts +100 -1
  81. package/dist/sessions/registry.d.ts +3 -0
  82. package/dist/shared-types.d.ts +12 -0
  83. package/dist/status/reporter.d.ts +2 -0
  84. package/dist/status/snapshot.d.ts +1 -0
  85. package/dist/types.d.ts +5 -0
  86. package/package.json +7 -2
  87. package/src/boot/daemon-lifecycle.ts +17 -10
  88. package/src/boot/process-hardening.ts +89 -0
  89. package/src/chat/source-machine.ts +534 -0
  90. package/src/chat/source-resolver.ts +0 -0
  91. package/src/chat/subscription-updates.ts +14 -1
  92. package/src/cli-adapter-types.d.ts +1 -0
  93. package/src/cli-adapter-types.ts +18 -2
  94. package/src/cli-adapters/cli-script-runner.ts +421 -0
  95. package/src/cli-adapters/cli-state-engine.ts +1086 -0
  96. package/src/cli-adapters/provider-cli-adapter.d.ts +1 -1
  97. package/src/cli-adapters/provider-cli-adapter.ts +664 -1137
  98. package/src/cli-adapters/provider-cli-parse.d.ts +1 -0
  99. package/src/cli-adapters/provider-cli-parse.ts +13 -0
  100. package/src/cli-adapters/provider-cli-runtime.ts +3 -1
  101. package/src/cli-adapters/provider-cli-shared.d.ts +2 -0
  102. package/src/cli-adapters/provider-cli-shared.ts +57 -11
  103. package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +17 -1
  104. package/src/cli-adapters/terminal-backends/xterm-backend.ts +8 -1
  105. package/src/commands/chat-commands.ts +1597 -60
  106. package/src/commands/cli-manager.ts +195 -3
  107. package/src/commands/handler.ts +547 -2
  108. package/src/commands/mesh-coordinator.ts +231 -127
  109. package/src/commands/router.ts +3547 -502
  110. package/src/config/chat-history.ts +87 -24
  111. package/src/config/config.ts +12 -0
  112. package/src/config/mesh-config.ts +264 -2
  113. package/src/config/recent-activity.ts +8 -2
  114. package/src/daemon/dev-cli-debug.ts +10 -1
  115. package/src/detection/ide-detector.ts +26 -16
  116. package/src/git/git-commands.ts +17 -5
  117. package/src/git/git-worktree.ts +8 -1
  118. package/src/index.ts +91 -5
  119. package/src/installer.d.ts +1 -1
  120. package/src/installer.ts +8 -6
  121. package/src/ipc/local-ipc-server.ts +278 -0
  122. package/src/launch.d.ts +1 -1
  123. package/src/launch.ts +37 -28
  124. package/src/logging/async-batch-writer.ts +55 -0
  125. package/src/logging/logger.ts +2 -1
  126. package/src/mesh/beads-db.ts +479 -0
  127. package/src/mesh/contracts.ts +329 -0
  128. package/src/mesh/coordinator-prompt.ts +204 -30
  129. package/src/mesh/coordinator-registry.ts +121 -0
  130. package/src/mesh/mesh-active-work.ts +437 -0
  131. package/src/mesh/mesh-events.ts +820 -61
  132. package/src/mesh/mesh-fast-forward.ts +430 -0
  133. package/src/mesh/mesh-host-ownership.ts +73 -0
  134. package/src/mesh/mesh-ledger.ts +457 -104
  135. package/src/mesh/mesh-refine-status.ts +144 -0
  136. package/src/mesh/mesh-work-queue.ts +216 -158
  137. package/src/mesh/preview-freshness.ts +118 -0
  138. package/src/mesh/refine-config.ts +366 -0
  139. package/src/mesh/worktree-bootstrap-config.ts +247 -0
  140. package/src/providers/approval-utils.ts +39 -5
  141. package/src/providers/chat-message-normalization.ts +4 -11
  142. package/src/providers/cli-provider-instance.ts +388 -47
  143. package/src/providers/contracts.ts +105 -5
  144. package/src/providers/ide-provider-instance.ts +17 -3
  145. package/src/providers/native-history/antigravity-cli-transcript.ts +643 -0
  146. package/src/providers/native-history/claude-cli-transcript.ts +396 -0
  147. package/src/providers/native-history/codex-cli-transcript.ts +419 -0
  148. package/src/providers/native-history/dispatcher.ts +227 -0
  149. package/src/providers/native-history/hermes-cli-transcript.ts +230 -0
  150. package/src/providers/native-history/index.ts +30 -0
  151. package/src/providers/provider-loader.ts +420 -31
  152. package/src/providers/provider-schema.ts +31 -13
  153. package/src/providers/read-chat-contract.ts +76 -16
  154. package/src/providers/sdk/README.md +49 -0
  155. package/src/providers/sdk/v1/builders/acp/detect-status.ts +144 -0
  156. package/src/providers/sdk/v1/builders/cli/detect-status.ts +262 -0
  157. package/src/providers/sdk/v1/builders/cli/parse-approval-squash.ts +158 -0
  158. package/src/providers/sdk/v1/builders/cli/parse-approval.ts +245 -0
  159. package/src/providers/sdk/v1/builders/cli/parse-session.ts +276 -0
  160. package/src/providers/sdk/v1/builders/cli/visible-region.ts +143 -0
  161. package/src/providers/sdk/v1/fixture-tooling/format.ts +130 -0
  162. package/src/providers/sdk/v1/fixture-tooling/index.ts +22 -0
  163. package/src/providers/sdk/v1/fixture-tooling/replay.ts +352 -0
  164. package/src/providers/sdk/v1/index.ts +152 -0
  165. package/src/providers/sdk/v1/sandbox/README-design.ts +195 -0
  166. package/src/providers/sdk/v1/sandbox/require-whitelist.ts +472 -0
  167. package/src/providers/sdk/v1/sandbox/script-runner.ts +150 -0
  168. package/src/providers/sdk/v1/schemas/cli/provider.schema.json +457 -0
  169. package/src/providers/sdk/v1/schemas/primitives/acp-session-protocol-v1.json +131 -0
  170. package/src/providers/sdk/v1/schemas/primitives/native-history-codex-rollout-v1.json +66 -0
  171. package/src/providers/sdk/v1/schemas/primitives/tui-approval-squash-v1.json +91 -0
  172. package/src/providers/sdk/v1/schemas/primitives/tui-assistant-block-v1.json +91 -0
  173. package/src/providers/sdk/v1/schemas/primitives/tui-cue-ordering-v1.json +47 -0
  174. package/src/providers/sdk/v1/schemas/primitives/tui-dispatch-order-v1.json +32 -0
  175. package/src/providers/sdk/v1/schemas/primitives/tui-footer-chrome-v1.json +42 -0
  176. package/src/providers/sdk/v1/schemas/primitives/tui-index-finder-v1.json +27 -0
  177. package/src/providers/sdk/v1/schemas/primitives/tui-modal-v1.json +119 -0
  178. package/src/providers/sdk/v1/schemas/primitives/tui-prompt-marker-v1.json +45 -0
  179. package/src/providers/sdk/v1/schemas/primitives/tui-session-id-extraction-v1.json +46 -0
  180. package/src/providers/sdk/v1/schemas/primitives/tui-settled-prompt-v1.json +71 -0
  181. package/src/providers/sdk/v1/schemas/primitives/tui-spinner-v1.json +83 -0
  182. package/src/providers/sdk/v1/schemas/primitives/tui-transcript-pty-v1.json +83 -0
  183. package/src/providers/sdk/v1/schemas/primitives/tui-visible-region-v1.json +57 -0
  184. package/src/providers/sdk/v1/schemas/primitives/tui-welcome-screen-v1.json +35 -0
  185. package/src/providers/sdk/v1/types/cli/index.ts +365 -0
  186. package/src/providers/sdk/v1/types/common/index.ts +210 -0
  187. package/src/providers/sdk/v1/validators/index.ts +19 -0
  188. package/src/providers/sdk/v1/validators/manifest.ts +110 -0
  189. package/src/providers/sdk/v1/validators/taint.ts +309 -0
  190. package/src/providers/spec/adapter.ts +153 -0
  191. package/src/providers/spec/cli-adapter.ts +318 -0
  192. package/src/providers/spec/driver.ts +498 -0
  193. package/src/providers/spec/evaluator.ts +268 -0
  194. package/src/providers/spec/loader.ts +130 -0
  195. package/src/providers/spec/native-history-executor.ts +612 -0
  196. package/src/providers/spec/route.ts +51 -0
  197. package/src/providers/spec/schema.gen.ts +507 -0
  198. package/src/providers/spec/schema.json +210 -0
  199. package/src/providers/spec/types.ts +230 -0
  200. package/src/providers/transcript-v2.ts +567 -0
  201. package/src/providers/version-archive.ts +38 -20
  202. package/src/repo-mesh-types.ts +110 -1
  203. package/src/sessions/registry.ts +3 -0
  204. package/src/shared-types.ts +9 -0
  205. package/src/status/builders.ts +23 -6
  206. package/src/status/reporter.ts +15 -0
  207. package/src/status/snapshot.ts +35 -11
  208. package/src/system/host-memory.ts +29 -12
  209. package/src/types.ts +5 -0
@@ -15,28 +15,28 @@
15
15
  */
16
16
  import type { CliAdapter } from '../cli-adapter-types.js';
17
17
  import { type PtyRuntimeMetadata, type PtyTransportFactory } from './pty-transport.js';
18
- import { type CliProviderModule, type CliScripts, type CliSessionStatus } from './provider-cli-shared.js';
18
+ import { type CliProviderModule, type CliScripts, type CliSessionStatus, type CliTraceEntry, type ParsedSession } from './provider-cli-shared.js';
19
+ import { CliStateEngine, type CliBufferSnapshot } from './cli-state-engine.js';
20
+ import { type TurnParseScope } from './provider-cli-parse.js';
19
21
  import { type ProviderResolutionMeta } from './provider-cli-config.js';
20
22
  export { normalizeCliProviderForRuntime, type CliApprovalInput, type CliChatMessage, type CliProviderModule, type CliScreenLine, type CliScreenSnapshot, type CliScriptInput, type CliScripts, type CliSessionStatus, type CliStatusInput, type CliTraceEntry, } from './provider-cli-shared.js';
21
23
  export declare function appendBoundedText(current: string, chunk: string, maxChars: number): string;
22
24
  export declare class ProviderCliAdapter implements CliAdapter {
23
25
  private extraArgs;
24
26
  private extraEnv;
25
- readonly cliType: string;
27
+ cliType: string;
26
28
  readonly cliName: string;
27
29
  workingDir: string;
28
30
  private provider;
29
31
  private ptyProcess;
30
32
  private transportFactory;
31
- private currentStatus;
32
33
  private onStatusChange;
34
+ readonly engine: CliStateEngine;
33
35
  private responseBuffer;
34
36
  private recentOutputBuffer;
35
- private isWaitingForResponse;
36
- private activeModal;
37
- private parseErrorMessage;
37
+ private get parseErrorMessage();
38
+ private providerSessionId;
38
39
  private responseTimeout;
39
- private idleTimeout;
40
40
  private ready;
41
41
  private startupBuffer;
42
42
  private startupParseGate;
@@ -57,28 +57,32 @@ export declare class ProviderCliAdapter implements CliAdapter {
57
57
  private lastScreenSnapshotReadAt;
58
58
  private serverConn;
59
59
  private logBuffer;
60
- private lastApprovalResolvedAt;
61
- private approvalTransitionBuffer;
62
- private approvalExitTimeout;
63
- private pendingScriptStatus;
64
- private pendingScriptStatusSince;
65
- private pendingScriptStatusTimer;
66
- private settleTimer;
67
- private settledBuffer;
68
- private submitPendingUntil;
69
- private responseSettleIgnoreUntil;
70
- private responseEpoch;
60
+ private pendingOutboundQueue;
61
+ private pendingOutboundFlushTimer;
62
+ private pendingOutboundFlushInFlight;
71
63
  private submitRetryTimer;
72
- private submitRetryUsed;
73
- private submitRetryPromptSnippet;
74
- private idleFinishCandidate;
75
- private finishRetryTimer;
76
- private finishRetryCount;
77
64
  private resizeSuppressUntil;
78
- private statusHistory;
79
- private cliScripts;
80
- /** Per-session opaque state object created by cliScripts.createState(), reset on stop. */
81
- private scriptState;
65
+ private readonly runner;
66
+ /** @deprecated use runner.cliScripts for direct script access */
67
+ get cliScripts(): CliScripts;
68
+ /**
69
+ * Recent script invocations (oldest → newest). Exposed via the
70
+ * `get_chat_debug_bundle` daemon command so anyone debugging a
71
+ * stuck-status regression can read what each detectStatus /
72
+ * parseSession call actually saw and returned, instead of having
73
+ * to instrument the daemon.
74
+ */
75
+ getScriptInvocationTrace(): import("./cli-script-runner.js").CliScriptInvocationTrace[];
76
+ /**
77
+ * Returns the full raw PTY byte stream captured since adapter start.
78
+ * Used by the `record_provider_pty` IPC command to produce fixtures.
79
+ * Bounded by MAX_ACCUMULATED_BUFFER; older bytes may have been dropped.
80
+ */
81
+ getAccumulatedRawBuffer(): {
82
+ text: string;
83
+ droppedChars: number;
84
+ };
85
+ set cliScripts(scripts: CliScripts);
82
86
  private runtimeSettings;
83
87
  /** Full accumulated rendered PTY transcript for parser/readback use */
84
88
  private accumulatedBuffer;
@@ -98,16 +102,9 @@ export declare class ProviderCliAdapter implements CliAdapter {
98
102
  * Hermes turn (tool calls + reasoning + final bubble) without the
99
103
  * rolling window pushing the turn's ╭─ opening line out of view. */
100
104
  private static readonly MAX_ACCUMULATED_BUFFER;
101
- private currentTurnScope;
102
- private traceEntries;
103
- private traceSeq;
104
- private traceSessionId;
105
105
  private parsedStatusCache;
106
106
  private static readonly SCREEN_SNAPSHOT_MIN_INTERVAL_MS;
107
- private static readonly MAX_TRACE_ENTRIES;
108
107
  private readonly providerResolutionMeta;
109
- private static readonly FINISH_RETRY_DELAY_MS;
110
- private static readonly MAX_FINISH_RETRIES;
111
108
  private getBufferState;
112
109
  private recordBoundedAppendDrop;
113
110
  private readTerminalScreenText;
@@ -120,18 +117,12 @@ export declare class ProviderCliAdapter implements CliAdapter {
120
117
  private shouldUseFullProviderTranscriptContext;
121
118
  private getIdleFinishConfirmMs;
122
119
  private getStatusActivityHoldMs;
123
- private setStatus;
124
- private clearIdleFinishCandidate;
125
- private armIdleFinishCandidate;
126
- private recordTrace;
127
- private resetTraceSession;
128
120
  private readonly timeouts;
129
121
  private readonly approvalKeys;
130
122
  private readonly sendDelayMs;
131
123
  private readonly sendKey;
132
124
  private readonly submitStrategy;
133
125
  private readonly requirePromptEchoBeforeSubmit;
134
- private static readonly SCRIPT_STATUS_DEBOUNCE_MS;
135
126
  constructor(provider: CliProviderModule, workingDir: string, extraArgs?: string[], extraEnv?: Record<string, string>, transportFactory?: PtyTransportFactory);
136
127
  /** Inject CLI scripts after construction (e.g. when resolved by ProviderLoader) */
137
128
  setCliScripts(scripts: CliScripts): void;
@@ -146,29 +137,15 @@ export declare class ProviderCliAdapter implements CliAdapter {
146
137
  private handleOutput;
147
138
  private resolveStartupState;
148
139
  private scheduleStartupSettleCheck;
149
- private scheduleSettle;
150
- private armApprovalExitTimeout;
151
- private shouldRetryFinishResponse;
152
- private hasRecentInteractiveActivity;
153
- private shouldDeferIdleTimeoutFinish;
154
140
  private waitForInteractivePrompt;
155
141
  private clearAllTimers;
156
- private clearStaleIdleResponseGuard;
157
- private hasMeaningfulResponseBuffer;
158
- private evaluateSettled;
159
- private applyPendingScriptStatusDebounce;
160
- private applyHoldGenerating;
161
- private applyWaitingApproval;
162
- private applyGenerating;
163
- private applyIdle;
164
- private finishResponse;
165
- private maybeCommitVisibleIdleTranscript;
166
- private commitCurrentTranscript;
167
- private invokeCliScript;
168
- private runParseSession;
169
- private runDetectStatus;
170
- private runParseApproval;
171
- private hasActionableApproval;
142
+ runParseSession(): ParsedSession | null;
143
+ runDetectStatus(text: string): string | null;
144
+ runParseApproval(tail: string): {
145
+ message: string;
146
+ buttons: string[];
147
+ } | null;
148
+ private applyParsedSessionMetadata;
172
149
  private projectEffectiveStatus;
173
150
  getStatus(options?: {
174
151
  allowParse?: boolean;
@@ -188,6 +165,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
188
165
  */
189
166
  resolveAction(data: any): Promise<void>;
190
167
  private isSubmitStuck;
168
+ private hasMeaningfulResponseBufferLocal;
191
169
  private writeToPty;
192
170
  private resetPendingSendState;
193
171
  private commitSendUserTurn;
@@ -198,7 +176,15 @@ export declare class ProviderCliAdapter implements CliAdapter {
198
176
  private submitSendKey;
199
177
  private submitImmediatePrompt;
200
178
  private waitForEchoAndSubmit;
201
- sendMessage(text: string): Promise<void>;
179
+ sendMessage(text: string, options?: {
180
+ force?: boolean;
181
+ }): Promise<void>;
182
+ forceSendMessage(text: string): Promise<void>;
183
+ private enqueuePendingOutboundMessage;
184
+ private shouldQueuePendingOutboundMessage;
185
+ private schedulePendingOutboundFlush;
186
+ private flushPendingOutboundQueue;
187
+ private sendMessageNow;
202
188
  getPartialResponse(): string;
203
189
  getDebugSnapshot(): Record<string, unknown>;
204
190
  getRuntimeMetadata(): PtyRuntimeMetadata | null;
@@ -211,8 +197,63 @@ export declare class ProviderCliAdapter implements CliAdapter {
211
197
  clearHistory(): void;
212
198
  isProcessing(): boolean;
213
199
  isReady(): boolean;
214
- writeRaw(data: string): Promise<void>;
200
+ get currentStatus(): CliSessionStatus['status'];
201
+ set currentStatus(v: CliSessionStatus['status']);
202
+ get isWaitingForResponse(): boolean;
203
+ set isWaitingForResponse(v: boolean);
204
+ get activeModal(): {
205
+ message: string;
206
+ buttons: string[];
207
+ } | null;
208
+ set activeModal(v: {
209
+ message: string;
210
+ buttons: string[];
211
+ } | null);
212
+ get currentTurnScope(): TurnParseScope | null;
213
+ set currentTurnScope(v: TurnParseScope | null);
214
+ get responseEpoch(): number;
215
+ set responseEpoch(v: number);
216
+ get submitRetryUsed(): boolean;
217
+ set submitRetryUsed(v: boolean);
218
+ get submitRetryPromptSnippet(): string;
219
+ set submitRetryPromptSnippet(v: string);
220
+ get responseSettleIgnoreUntil(): number;
221
+ set responseSettleIgnoreUntil(v: number);
222
+ get submitPendingUntil(): number;
223
+ set submitPendingUntil(v: number);
224
+ get lastApprovalResolvedAt(): number;
225
+ set lastApprovalResolvedAt(v: number);
226
+ get providerErrorMessage(): string | null;
227
+ get providerErrorReason(): string | null;
228
+ get pendingScriptStatus(): 'generating' | 'waiting_approval' | null;
229
+ get pendingScriptStatusSince(): number;
230
+ get finishRetryCount(): number;
231
+ set finishRetryCount(v: number);
232
+ get traceSessionId(): string;
233
+ get traceEntries(): CliTraceEntry[];
234
+ get statusHistory(): {
235
+ status: string;
236
+ at: number;
237
+ trigger?: string;
238
+ }[];
239
+ get traceSeq(): number;
240
+ /** Expose engine's evaluateSettled for test access */
241
+ evaluateSettled(): void;
242
+ /** Expose engine's scheduleSettle for test access */
243
+ scheduleSettle(): void;
244
+ /** Expose engine's clearIdleFinishCandidate for test access */
245
+ clearIdleFinishCandidate(reason: string): void;
246
+ /** Expose engine's finishResponse for test access */
247
+ finishResponse(): void;
248
+ /** Returns a point-in-time snapshot of all buffer/screen state for external consumers (e.g. CliStateEngine). */
249
+ getSnapshot(): CliBufferSnapshot;
250
+ isAlive(): boolean;
251
+ flushOutboundQueue(): void;
252
+ writeRaw(data: string | Buffer): Promise<void>;
215
253
  resolveModal(buttonIndex: number): void;
254
+ getApprovalKeyForIndex(buttonIndex: number): string | undefined;
255
+ /** Returns true if an approval was resolved within the adapter's cooldown window. */
256
+ isApprovalRecentlyResolved(): boolean;
216
257
  resize(cols: number, rows: number): void;
217
258
  private getParsedDebugState;
218
259
  getDebugState(): Record<string, any>;
@@ -15,11 +15,15 @@ export declare function buildCliParseInput(options: {
15
15
  accumulatedRawBuffer: string;
16
16
  recentOutputBuffer: string;
17
17
  terminalScreenText: string;
18
+ workingDir?: string;
19
+ providerSessionId?: string;
20
+ historySessionId?: string;
18
21
  baseMessages: CliChatMessage[];
19
22
  partialResponse: string;
20
23
  isWaitingForResponse?: boolean;
21
24
  scope?: TurnParseScope | null;
22
25
  runtimeSettings: Record<string, any>;
26
+ spawnAt?: number;
23
27
  }): CliScriptInput;
24
28
  export declare function summarizeCliTraceText(text: string, max?: number): string;
25
29
  export declare function summarizeCliTraceMessages(messages: CliChatMessage[], limit?: number): {
@@ -26,8 +26,17 @@ export interface CliSessionStatus {
26
26
  message: string;
27
27
  buttons: string[];
28
28
  } | null;
29
+ pendingOutboundCount?: number;
30
+ pendingOutboundMessages?: Array<{
31
+ id: string;
32
+ role: 'user';
33
+ content: string;
34
+ queuedAt: number;
35
+ source: string;
36
+ }>;
29
37
  errorMessage?: string;
30
38
  errorReason?: string;
39
+ providerSessionId?: string;
31
40
  bufferState?: {
32
41
  responseBuffer?: {
33
42
  truncated: boolean;
@@ -59,6 +68,9 @@ export interface ParsedSession {
59
68
  buttons: string[];
60
69
  } | null;
61
70
  parsedStatus: string | null;
71
+ errorMessage?: string;
72
+ errorReason?: string;
73
+ providerSessionId?: string;
62
74
  transcriptAuthority?: 'provider' | 'daemon';
63
75
  coverage?: 'full' | 'tail' | 'current-turn';
64
76
  }
@@ -112,6 +124,10 @@ export interface CliScriptInput {
112
124
  rawBuffer: string;
113
125
  recentBuffer: string;
114
126
  screenText: string;
127
+ workspace?: string;
128
+ workingDir?: string;
129
+ providerSessionId?: string;
130
+ historySessionId?: string;
115
131
  screen: CliScreenSnapshot;
116
132
  bufferScreen: CliScreenSnapshot;
117
133
  recentScreen: CliScreenSnapshot;
@@ -121,6 +137,7 @@ export interface CliScriptInput {
121
137
  promptText?: string;
122
138
  settings?: Record<string, any>;
123
139
  args?: Record<string, any>;
140
+ spawnAt?: number;
124
141
  }
125
142
  export interface CliStatusInput {
126
143
  tail: string;
@@ -158,16 +175,26 @@ export interface CliProviderModule {
158
175
  binary: string;
159
176
  approvalKeys?: Record<number, string>;
160
177
  sendDelayMs?: number;
178
+ /** Wall-clock budget (ms) for a single provider script invocation. Default 50. Range 1..5000.
179
+ * Exceeding the budget records `timedOut: true` on the invocation trace and emits a
180
+ * throttled WARN — it does NOT abort the script (Node CJS can't interrupt sync code). */
181
+ scriptCallBudgetMs?: number;
161
182
  sendKey?: string;
162
183
  submitStrategy?: 'wait_for_echo' | 'immediate';
163
184
  /** Require the typed prompt to be visible on the PTY screen before sending Enter. */
164
185
  requirePromptEchoBeforeSubmit?: boolean;
165
186
  /** Allow sending another prompt while the CLI is still generating so users can intervene mid-turn. */
166
187
  allowInputDuringGeneration?: boolean;
188
+ /** When true, only transition to idle after the parsed transcript includes a final standard assistant message. */
189
+ requiresFinalAssistantBeforeIdle?: boolean;
190
+ /** When true, allow providers to augment stale snapshot data before parse. Reserved for future use. */
191
+ augmentStaleSnapshot?: boolean;
167
192
  /** When provider-owned, daemon treats provider parser output as canonical transcript authority. */
168
193
  transcriptAuthority?: 'provider' | 'daemon';
169
194
  /** Full context lets provider-owned parsers canonicalize retained history instead of daemon prefix stitching. */
170
195
  transcriptContext?: 'full' | 'tail';
196
+ /** v1 declarative tui block — used by CliScriptRunner to synthesize SDK helpers (declarativeDetectStatus, declarativeParseApproval). */
197
+ tui?: Record<string, unknown>;
171
198
  scripts?: CliScripts;
172
199
  spawn: {
173
200
  command: string;
@@ -104,7 +104,73 @@ export declare class DaemonCommandHandler implements CommandHelpers {
104
104
  setAgentStreamManager(manager: DaemonAgentStreamManager): void;
105
105
  handle(cmd: string, args: any): Promise<CommandResult>;
106
106
  private dispatch;
107
+ /**
108
+ * Reload providers from disk. Does NOT pull from the registry — the user
109
+ * controls installs explicitly via install_provider_manifest. To upgrade
110
+ * an installed provider, call install_provider_manifest again with the
111
+ * desired version (or with no version to pick up the latest from
112
+ * registry), or use check_provider_updates to see what is out of date.
113
+ */
107
114
  private handleRefreshScripts;
115
+ /**
116
+ * Return per-provider availability so a Marketplace UI can show
117
+ * "Installed" badges. Reuses the existing detection state from
118
+ * ProviderLoader.getMachineProviderStatus() — no probing is triggered.
119
+ */
120
+ private handleListProviderAvailability;
121
+ /**
122
+ * Compute the *Marketplace install root*. This is always
123
+ * `~/.adhdev/marketplace/` regardless of how ProviderLoader resolved its
124
+ * userDir (which can point to a sibling adhdev-providers git checkout in
125
+ * dev). Marketplace-installed manifests must never overwrite files in a
126
+ * developer checkout, and they should be isolated from upstream/registry
127
+ * sync so they survive `refresh_scripts`.
128
+ */
129
+ private getMarketplaceInstallRoot;
130
+ /**
131
+ * Download a single provider manifest from the registry and write it to
132
+ * ~/.adhdev/marketplace/{category}/{type}/provider.json.
133
+ *
134
+ * Used by the Marketplace UI's Install button. Verifies SHA-256 checksum
135
+ * against the registry meta before persisting. Refuses to write outside
136
+ * the marketplace root.
137
+ *
138
+ * Args: { type: string, category?: string, version?: string }
139
+ * If category/version are omitted, looks up the latest from the registry.
140
+ */
141
+ private handleInstallProviderManifest;
142
+ /**
143
+ * If `manifest.source = { type:'github', repo, ref, subdir? }` is set,
144
+ * walk each script directory the manifest references and download every
145
+ * file from the public GitHub raw endpoint. Returns a small summary so
146
+ * the caller can report what was fetched.
147
+ *
148
+ * Best-effort: failures don't reject the install — the manifest itself is
149
+ * usable for declarative-only providers, and the user still gets a clear
150
+ * error string back if a needed script is missing.
151
+ */
152
+ private fetchProviderSources;
153
+ /**
154
+ * Remove a provider manifest from the marketplace install root
155
+ * (~/.adhdev/marketplace/{category}/{type}/). Refuses to touch anything
156
+ * outside that root.
157
+ */
158
+ private handleUninstallProviderManifest;
159
+ /**
160
+ * Return everything currently installed in ~/.adhdev/marketplace/ with its
161
+ * version. This is the "what does this daemon have" answer used both by
162
+ * the UI and by the update checker.
163
+ */
164
+ private handleListInstalledProviders;
165
+ /**
166
+ * For each installed provider, ask the registry for its current latest
167
+ * version and report whether an update is available. The user can then
168
+ * call install_provider_manifest to upgrade (it overwrites the file).
169
+ *
170
+ * Returns { providers: [{ type, category, installedVersion, latestVersion,
171
+ * updateAvailable, error? }] }
172
+ */
173
+ private handleCheckProviderUpdates;
108
174
  private proxyDevServerPost;
109
175
  private proxyDevServerGet;
110
176
  private proxyDevServerScaffold;
@@ -1,4 +1,4 @@
1
- import type { ProviderModule, MeshCoordinatorMcpConfigFormat } from '../providers/contracts.js';
1
+ import type { MeshCoordinatorMcpConfigFormat, MeshCoordinatorSystemPromptInjection, ProviderModule } from '../providers/contracts.js';
2
2
  export interface MeshCoordinatorMcpServerLaunch {
3
3
  command: string;
4
4
  args: string[];
@@ -42,3 +42,74 @@ export interface ResolveMeshCoordinatorSetupOptions {
42
42
  }
43
43
  export declare function createHermesManualMeshCoordinatorSetup(meshId: string, workspace: string): MeshCoordinatorSetup;
44
44
  export declare function resolveMeshCoordinatorSetup(options: ResolveMeshCoordinatorSetupOptions): MeshCoordinatorSetup;
45
+ /**
46
+ * Apply a provider's declared system-prompt injection rule, mutating `cliArgs`
47
+ * and `launchEnv` in place and writing any required workspace context file.
48
+ *
49
+ * Replaces the previous hard-coded `if (cliType === 'claude-cli') ... else if
50
+ * (cliType === 'hermes-cli') ...` branches in router.ts. Adding a new CLI is
51
+ * now provider.v1.json data, not a router edit.
52
+ *
53
+ * Failures are non-fatal: log and continue with whatever was applied so the
54
+ * coordinator session still launches, just without the prompt for that
55
+ * provider. A missing/unknown rule means "skip injection" — safe by default
56
+ * (the previous fallback unconditionally pushed --append-system-prompt onto
57
+ * every non-Claude CLI, which crashed agy on launch).
58
+ */
59
+ export interface CoordinatorInjectionEffect {
60
+ /** Absolute path the daemon wrote a wrapper-blocked file to. Only set for
61
+ * context_file injection. R48 schedules a strip after launch so workers
62
+ * don't see the wrapper on disk; R47's unregister cleanup uses it as a
63
+ * fallback if the timer never fires (process crash, etc). */
64
+ contextFilePath?: string;
65
+ }
66
+ export declare function applyMeshCoordinatorSystemPromptInjection(systemPrompt: string, injection: MeshCoordinatorSystemPromptInjection | undefined, ctx: {
67
+ cliArgs: string[];
68
+ launchEnv: Record<string, string>;
69
+ workspace: string;
70
+ cliType: string;
71
+ }): CoordinatorInjectionEffect;
72
+ /**
73
+ * Strip the daemon's wrapper block from a context_file we previously wrote.
74
+ *
75
+ * Used in two places:
76
+ * 1. R48 inject-then-remove: ~5s after spawn, after agy/gemini have read
77
+ * the file into their in-memory system-prompt cache. Removing it from
78
+ * disk at that point doesn't affect the running coordinator but keeps
79
+ * worker sessions (or fresh non-coordinator launches) in the same
80
+ * workspace from picking up our wrapper.
81
+ * 2. R47 unregister fallback: if the timer never fires (process crash,
82
+ * kill -9), coordinator-registry.unregisterMeshCoordinator runs the
83
+ * same logic when its entry is dropped.
84
+ *
85
+ * Idempotent: missing file is fine, missing sentinels are fine, returns
86
+ * silently. Leaves user-authored content outside the sentinels intact.
87
+ * Deletes the file outright if our wrapper was the only content.
88
+ */
89
+ export declare function stripCoordinatorWrapperFile(filePath: string): void;
90
+ export interface PtyExecResult {
91
+ exitCode: number | null;
92
+ signal: number | null;
93
+ output: string;
94
+ timedOut: boolean;
95
+ }
96
+ /**
97
+ * Run a one-shot CLI command under a real PTY and collect its output.
98
+ *
99
+ * Some provider mcp-registration commands (`agy mcp add`, future bubbletea
100
+ * TUIs) refuse to run without `/dev/tty`. Daemon-side `execFileSync` runs
101
+ * pipe-only, so those commands fail with errors like
102
+ * `bubbletea: error opening TTY: open /dev/tty: device not configured`
103
+ * and silently skip the registration, leaving the launched session
104
+ * without the adhdev-mesh MCP tools — which is exactly what we saw with
105
+ * agy coordinators.
106
+ *
107
+ * Wrapping the registration through node-pty gives the child a real PTY,
108
+ * so the bubbletea check passes. We close stdin immediately and just
109
+ * collect stdout until the process exits or the timeout fires.
110
+ */
111
+ export declare function execUnderPty(command: string, args: string[], options?: {
112
+ cwd?: string;
113
+ env?: Record<string, string>;
114
+ timeoutMs?: number;
115
+ }): Promise<PtyExecResult>;
@@ -74,6 +74,8 @@ export interface CommandRouterDeps {
74
74
  sessionHostControl?: SessionHostControlPlane | null;
75
75
  /** Selected-coordinator mesh peer telemetry surface for target daemons, when supported by the runtime. */
76
76
  getMeshPeerConnectionStatus?: (daemonId: string) => Record<string, unknown> | null;
77
+ /** Dispatch a command to a remote mesh node via P2P/relay. Injected by cloud runtime; absent in standalone. */
78
+ dispatchMeshCommand?: (daemonId: string, cmd: string, args: Record<string, unknown>) => Promise<unknown>;
77
79
  }
78
80
  export interface CommandRouterResult {
79
81
  success: boolean;
@@ -85,9 +87,22 @@ export declare class DaemonCommandRouter {
85
87
  * Allows the MCP server to query mesh data via get_mesh even when
86
88
  * the mesh doesn't exist in the local meshes.json file. */
87
89
  private inlineMeshCache;
90
+ /** Coordinator-owned whole-mesh aggregate status snapshots. Browser callers read this by default. */
91
+ private aggregateMeshStatusCache;
92
+ /** In-memory async Refinery jobs keyed by meshId:nodeId to reject/return duplicate in-flight requests. */
93
+ private runningRefineJobs;
94
+ /** Terminal async Refinery jobs preserve a clear answer after the worktree node has been removed. */
95
+ private terminalRefineJobs;
88
96
  constructor(deps: CommandRouterDeps);
97
+ private cloneJsonValue;
98
+ private hydrateCachedAggregateMeshStatusFromInline;
99
+ private getCachedAggregateMeshStatus;
100
+ private rememberAggregateMeshStatus;
89
101
  getCachedInlineMesh(meshId: string, inlineMesh?: unknown): any | undefined;
102
+ private warmInlineMeshCache;
90
103
  private getMeshForCommand;
104
+ private invalidateAggregateMeshStatus;
105
+ private requireMeshHostMutationOwner;
91
106
  private updateInlineMeshNode;
92
107
  private removeInlineMeshNode;
93
108
  private normalizeMeshSessionCleanupMode;
@@ -110,6 +125,13 @@ export declare class DaemonCommandRouter {
110
125
  * @param source Log source ('ws' | 'p2p' | 'standalone' | etc.)
111
126
  */
112
127
  execute(cmd: string, args: any, source?: string): Promise<CommandRouterResult>;
128
+ private buildRefineJobKey;
129
+ private buildRefineJobHandle;
130
+ private queueRefineJobEvent;
131
+ private appendRefineJobLedger;
132
+ private executeMeshRefineNodeSynchronously;
133
+ private finishMeshRefineJob;
134
+ private startMeshRefineJob;
113
135
  /**
114
136
  * Daemon-level command execution (IDE start/stop/restart, CLI, detect, logs).
115
137
  * Returns null if not handled at this level → caller delegates to CommandHandler.
@@ -110,12 +110,19 @@ export declare function readProviderChatHistory(agentType: string, options?: {
110
110
  excludeRecentCount?: number;
111
111
  historyBehavior?: ProviderHistoryBehavior;
112
112
  scripts?: ProviderNativeHistoryScripts;
113
+ excludeInProgressTurn?: boolean;
114
+ sessionStartedAtMs?: number;
115
+ envOverrides?: Record<string, string>;
113
116
  }): {
114
117
  messages: HistoryMessage[];
115
118
  hasMore: boolean;
116
119
  source: 'provider-native' | 'adhdev-mirror' | 'native-unavailable';
117
120
  sourcePath?: string;
118
121
  sourceMtimeMs?: number;
122
+ providerSessionId?: string;
123
+ nativeHistoryCoverage?: string;
124
+ partialReason?: string;
125
+ unavailableReason?: string;
119
126
  };
120
127
  export declare function listProviderHistorySessions(agentType: string, options?: {
121
128
  canonicalHistory?: ProviderCanonicalHistoryConfig;
@@ -86,6 +86,11 @@ export declare function isStableMachineId(machineId?: string | null): boolean;
86
86
  * Get the config directory path
87
87
  */
88
88
  export declare function getConfigDir(): string;
89
+ /**
90
+ * Get the daemon runtime data directory (~/.adhdev/daemon/).
91
+ * Distinct from the user-config dir so runtime state can be cleared independently.
92
+ */
93
+ export declare function getDaemonDataDir(): string;
89
94
  /**
90
95
  * Load configuration from disk
91
96
  */
@@ -5,7 +5,7 @@
5
5
  * Cloud mode syncs these to D1 via server routes; standalone mode
6
6
  * uses this file as the single source of truth.
7
7
  */
8
- import type { LocalMeshEntry, LocalMeshNodeEntry, RepoMeshPolicy, RepoMeshNodePolicy, RepoMeshNodeCapabilities, RepoMeshCoordinatorConfig } from '../repo-mesh-types.js';
8
+ import type { LocalMeshEntry, LocalMeshNodeEntry, RepoMeshPolicy, RepoMeshNodePolicy, RepoMeshNodeCapabilities, RepoMeshCoordinatorConfig, RepoMeshHostMetadata, RepoMeshDaemonRole } from '../repo-mesh-types.js';
9
9
  /**
10
10
  * Normalize a Git remote URL into a stable identity string.
11
11
  * e.g. "git@github.com:user/repo.git" → "github.com/user/repo"
@@ -22,6 +22,7 @@ export interface CreateMeshOptions {
22
22
  defaultBranch?: string;
23
23
  policy?: Partial<RepoMeshPolicy>;
24
24
  coordinator?: RepoMeshCoordinatorConfig;
25
+ meshHost?: RepoMeshHostMetadata;
25
26
  }
26
27
  export declare function createMesh(opts: CreateMeshOptions): LocalMeshEntry;
27
28
  export interface UpdateMeshOptions {
@@ -29,9 +30,72 @@ export interface UpdateMeshOptions {
29
30
  defaultBranch?: string;
30
31
  policy?: Partial<RepoMeshPolicy>;
31
32
  coordinator?: RepoMeshCoordinatorConfig;
33
+ meshHost?: RepoMeshHostMetadata;
32
34
  }
33
35
  export declare function updateMesh(meshId: string, opts: UpdateMeshOptions): LocalMeshEntry | undefined;
34
36
  export declare function deleteMesh(meshId: string): boolean;
37
+ export declare function tokenIdForManualPairing(token: string): string;
38
+ export interface ConfigureMeshHostPairingOptions {
39
+ hostAddress: string;
40
+ token: string;
41
+ now?: string;
42
+ }
43
+ export declare function configureMeshHostPairing(meshId: string, opts: ConfigureMeshHostPairingOptions): {
44
+ mesh: LocalMeshEntry;
45
+ meshHost: RepoMeshHostMetadata;
46
+ hostAddress: string;
47
+ } | undefined;
48
+ export interface CreateMeshHostPairingTokenOptions {
49
+ token?: string;
50
+ expiresAt?: string;
51
+ now?: string;
52
+ }
53
+ export declare function createMeshHostPairingToken(meshId: string, opts?: CreateMeshHostPairingTokenOptions): {
54
+ mesh: LocalMeshEntry;
55
+ meshHost: RepoMeshHostMetadata;
56
+ token: string;
57
+ tokenId: string;
58
+ expiresAt?: string;
59
+ } | undefined;
60
+ export interface MeshHostJoinMemberNodeInput {
61
+ id?: string;
62
+ workspace: string;
63
+ repoRoot?: string;
64
+ daemonId?: string;
65
+ machineId?: string;
66
+ userOverrides?: Partial<RepoMeshNodeCapabilities>;
67
+ policy?: RepoMeshNodePolicy;
68
+ role?: RepoMeshDaemonRole;
69
+ }
70
+ export interface ApplyMeshHostJoinOptions {
71
+ token: string;
72
+ memberNode: MeshHostJoinMemberNodeInput;
73
+ memberMeshId?: string;
74
+ now?: string;
75
+ }
76
+ export declare function applyMeshHostJoinRequest(meshId: string, opts: ApplyMeshHostJoinOptions): {
77
+ accepted: true;
78
+ mesh: LocalMeshEntry;
79
+ meshHost: RepoMeshHostMetadata;
80
+ node: LocalMeshNodeEntry;
81
+ tokenId: string;
82
+ } | {
83
+ accepted: false;
84
+ mesh?: LocalMeshEntry;
85
+ meshHost?: RepoMeshHostMetadata;
86
+ tokenId?: string;
87
+ reason: string;
88
+ } | undefined;
89
+ export declare function markMeshHostPairingJoined(meshId: string, opts: {
90
+ hostDaemonId?: string;
91
+ hostNodeId?: string;
92
+ joinedAt?: string;
93
+ token?: string;
94
+ tokenId?: string;
95
+ }): {
96
+ mesh: LocalMeshEntry;
97
+ meshHost: RepoMeshHostMetadata;
98
+ } | undefined;
35
99
  export interface AddNodeOptions {
36
100
  workspace: string;
37
101
  repoRoot?: string;
@@ -42,10 +106,16 @@ export interface AddNodeOptions {
42
106
  isLocalWorktree?: boolean;
43
107
  worktreeBranch?: string;
44
108
  clonedFromNodeId?: string;
109
+ worktreeBootstrap?: LocalMeshNodeEntry['worktreeBootstrap'];
110
+ role?: RepoMeshDaemonRole;
45
111
  }
46
112
  export declare function addNode(meshId: string, opts: AddNodeOptions): LocalMeshNodeEntry | undefined;
47
113
  export declare function removeNode(meshId: string, nodeId: string): boolean;
48
114
  export declare function updateNode(meshId: string, nodeId: string, opts: {
49
115
  userOverrides?: Partial<RepoMeshNodeCapabilities>;
50
116
  policy?: RepoMeshNodePolicy;
117
+ worktreeBootstrap?: LocalMeshNodeEntry['worktreeBootstrap'];
118
+ /** Per-node instruction surfaced in the coordinator prompt. Pass an
119
+ * empty string or undefined to clear it. */
120
+ systemPrompt?: string;
51
121
  }): LocalMeshNodeEntry | undefined;