@adhdev/daemon-core 0.9.76-rc.3 → 0.9.76-rc.31
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/provider-cli-adapter.d.ts +2 -1
- package/dist/cli-adapters/provider-cli-runtime.d.ts +1 -0
- package/dist/commands/cli-manager.d.ts +17 -4
- package/dist/commands/mesh-coordinator.d.ts +2 -0
- package/dist/commands/router.d.ts +4 -0
- package/dist/config/mesh-config.d.ts +3 -0
- package/dist/git/git-types.d.ts +1 -1
- package/dist/git/git-worktree.d.ts +64 -0
- package/dist/git/index.d.ts +2 -0
- package/dist/index.js +1058 -384
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1085 -416
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/coordinator-prompt.d.ts +1 -0
- package/dist/providers/cli-provider-instance.d.ts +3 -0
- package/dist/providers/provider-instance-manager.d.ts +1 -0
- package/dist/providers/provider-instance.d.ts +2 -0
- package/dist/repo-mesh-types.d.ts +6 -0
- package/dist/shared-types.d.ts +22 -1
- package/package.json +3 -4
- package/src/cli-adapters/provider-cli-adapter.ts +6 -3
- package/src/cli-adapters/provider-cli-runtime.ts +3 -2
- package/src/commands/chat-commands.ts +50 -5
- package/src/commands/cli-manager.ts +78 -5
- package/src/commands/handler.ts +13 -4
- package/src/commands/mesh-coordinator.ts +149 -6
- package/src/commands/router.ts +319 -32
- package/src/config/mesh-config.ts +6 -0
- package/src/git/git-commands.ts +5 -1
- package/src/git/git-types.ts +1 -0
- package/src/git/git-worktree.ts +214 -0
- package/src/git/index.ts +14 -0
- package/src/mesh/coordinator-prompt.ts +25 -10
- package/src/mesh/mesh-events.ts +40 -17
- package/src/providers/cli-provider-instance.d.ts +2 -0
- package/src/providers/cli-provider-instance.ts +55 -7
- package/src/providers/provider-instance-manager.ts +20 -1
- package/src/providers/provider-instance.ts +2 -0
- package/src/repo-mesh-types.ts +6 -0
- package/src/shared-types.ts +24 -1
- package/src/status/builders.ts +17 -12
- package/src/status/reporter.ts +6 -0
package/src/shared-types.ts
CHANGED
|
@@ -432,6 +432,17 @@ export type VersionUpdateReason =
|
|
|
432
432
|
| 'patch_mismatch'
|
|
433
433
|
| 'daemon_ahead';
|
|
434
434
|
|
|
435
|
+
export type ReleaseChannel = 'stable' | 'preview';
|
|
436
|
+
export type NpmUpdateTag = 'latest' | 'next';
|
|
437
|
+
|
|
438
|
+
export interface VersionUpdatePolicy {
|
|
439
|
+
channel: ReleaseChannel;
|
|
440
|
+
npmTag: NpmUpdateTag;
|
|
441
|
+
targetVersion: string;
|
|
442
|
+
minVersion?: string;
|
|
443
|
+
updateCommand: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
435
446
|
/** Available provider information */
|
|
436
447
|
export interface AvailableProviderInfo {
|
|
437
448
|
type: string;
|
|
@@ -577,6 +588,10 @@ export interface CompactDaemonEntry {
|
|
|
577
588
|
versionMismatch?: boolean;
|
|
578
589
|
versionUpdateRequired?: boolean;
|
|
579
590
|
versionUpdateReason?: VersionUpdateReason;
|
|
591
|
+
releaseChannel?: ReleaseChannel;
|
|
592
|
+
updateChannel?: ReleaseChannel;
|
|
593
|
+
updatePolicy?: VersionUpdatePolicy;
|
|
594
|
+
updateCommand?: string;
|
|
580
595
|
terminalBackend?: TerminalBackendStatus;
|
|
581
596
|
detectedIdes?: DetectedIdeInfo[];
|
|
582
597
|
availableProviders?: AvailableProviderInfo[];
|
|
@@ -599,11 +614,15 @@ export interface CloudDaemonSummaryEntry {
|
|
|
599
614
|
versionMismatch?: boolean;
|
|
600
615
|
versionUpdateRequired?: boolean;
|
|
601
616
|
versionUpdateReason?: VersionUpdateReason;
|
|
617
|
+
releaseChannel?: ReleaseChannel;
|
|
618
|
+
updateChannel?: ReleaseChannel;
|
|
619
|
+
updatePolicy?: VersionUpdatePolicy;
|
|
620
|
+
updateCommand?: string;
|
|
602
621
|
terminalBackend?: TerminalBackendStatus;
|
|
603
622
|
}
|
|
604
623
|
|
|
605
624
|
/** Minimal daemon bootstrap payload used by dashboard WS to initiate P2P. */
|
|
606
|
-
export interface DashboardBootstrapDaemonEntry {
|
|
625
|
+
export interface DashboardBootstrapDaemonEntry extends Partial<CloudDaemonSummaryEntry> {
|
|
607
626
|
id: string;
|
|
608
627
|
p2p?: StatusReportPayload['p2p'];
|
|
609
628
|
timestamp?: number;
|
|
@@ -622,6 +641,8 @@ export interface DaemonStatusEventPayload {
|
|
|
622
641
|
timestamp: number;
|
|
623
642
|
targetSessionId?: string;
|
|
624
643
|
providerType?: string;
|
|
644
|
+
providerSessionId?: string;
|
|
645
|
+
workspaceName?: string;
|
|
625
646
|
duration?: number;
|
|
626
647
|
elapsedSec?: number;
|
|
627
648
|
modalMessage?: string;
|
|
@@ -643,6 +664,8 @@ export interface DashboardStatusEventPayload {
|
|
|
643
664
|
daemonId?: string;
|
|
644
665
|
providerType?: string;
|
|
645
666
|
targetSessionId?: string;
|
|
667
|
+
providerSessionId?: string;
|
|
668
|
+
workspaceName?: string;
|
|
646
669
|
duration?: number;
|
|
647
670
|
elapsedSec?: number;
|
|
648
671
|
modalMessage?: string;
|
package/src/status/builders.ts
CHANGED
|
@@ -43,6 +43,19 @@ function getActiveChatOptions(profile: SessionEntryProfile): NormalizeActiveChat
|
|
|
43
43
|
return LIVE_STATUS_ACTIVE_CHAT_OPTIONS;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
function resolveSessionStatus(
|
|
47
|
+
activeChat: { status?: string | null; activeModal?: { buttons?: unknown[] | null } | null } | null | undefined,
|
|
48
|
+
providerStatus?: string | null,
|
|
49
|
+
) {
|
|
50
|
+
const chatStatus = normalizeManagedStatus(activeChat?.status, { activeModal: activeChat?.activeModal || null });
|
|
51
|
+
const topLevelStatus = normalizeManagedStatus(providerStatus, { activeModal: activeChat?.activeModal || null });
|
|
52
|
+
|
|
53
|
+
if (chatStatus === 'waiting_approval' || topLevelStatus === 'waiting_approval') return 'waiting_approval';
|
|
54
|
+
if (chatStatus === 'generating' || topLevelStatus === 'generating') return 'generating';
|
|
55
|
+
if (topLevelStatus !== 'idle') return topLevelStatus;
|
|
56
|
+
return chatStatus;
|
|
57
|
+
}
|
|
58
|
+
|
|
46
59
|
function shouldIncludeSessionControls(profile: SessionEntryProfile): boolean {
|
|
47
60
|
return profile !== 'live';
|
|
48
61
|
}
|
|
@@ -170,9 +183,7 @@ function buildIdeWorkspaceSession(
|
|
|
170
183
|
providerName: state.name,
|
|
171
184
|
kind: 'workspace',
|
|
172
185
|
transport: 'cdp-page',
|
|
173
|
-
status:
|
|
174
|
-
activeModal: activeChat?.activeModal || null,
|
|
175
|
-
}),
|
|
186
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
176
187
|
title,
|
|
177
188
|
workspace,
|
|
178
189
|
...(git && { git }),
|
|
@@ -212,9 +223,7 @@ function buildExtensionAgentSession(
|
|
|
212
223
|
providerSessionId: ext.providerSessionId,
|
|
213
224
|
kind: 'agent',
|
|
214
225
|
transport: 'cdp-webview',
|
|
215
|
-
status:
|
|
216
|
-
activeModal: activeChat?.activeModal || null,
|
|
217
|
-
}),
|
|
226
|
+
status: resolveSessionStatus(activeChat, ext.status),
|
|
218
227
|
title: activeChat?.title || ext.name,
|
|
219
228
|
workspace,
|
|
220
229
|
...(git && { git }),
|
|
@@ -277,9 +286,7 @@ function buildCliSession(state: CliProviderState, options: SessionEntryBuildOpti
|
|
|
277
286
|
providerSessionId: state.providerSessionId,
|
|
278
287
|
kind: 'agent',
|
|
279
288
|
transport: 'pty',
|
|
280
|
-
status:
|
|
281
|
-
activeModal: activeChat?.activeModal || null,
|
|
282
|
-
}),
|
|
289
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
283
290
|
title: activeChat?.title || state.name,
|
|
284
291
|
workspace,
|
|
285
292
|
...(git && { git }),
|
|
@@ -328,9 +335,7 @@ function buildAcpSession(state: AcpProviderState, options: SessionEntryBuildOpti
|
|
|
328
335
|
providerName: state.name,
|
|
329
336
|
kind: 'agent',
|
|
330
337
|
transport: 'acp',
|
|
331
|
-
status:
|
|
332
|
-
activeModal: activeChat?.activeModal || null,
|
|
333
|
-
}),
|
|
338
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
334
339
|
title: activeChat?.title || state.name,
|
|
335
340
|
workspace,
|
|
336
341
|
...(git && { git }),
|
package/src/status/reporter.ts
CHANGED
|
@@ -151,6 +151,12 @@ export class DaemonStatusReporter {
|
|
|
151
151
|
if (providerType) {
|
|
152
152
|
payload.providerType = providerType;
|
|
153
153
|
}
|
|
154
|
+
if (typeof event.providerSessionId === 'string' && event.providerSessionId.trim()) {
|
|
155
|
+
payload.providerSessionId = event.providerSessionId.trim();
|
|
156
|
+
}
|
|
157
|
+
if (typeof event.workspaceName === 'string' && event.workspaceName.trim()) {
|
|
158
|
+
payload.workspaceName = event.workspaceName.trim();
|
|
159
|
+
}
|
|
154
160
|
if (typeof event.duration === 'number' && Number.isFinite(event.duration)) {
|
|
155
161
|
payload.duration = event.duration;
|
|
156
162
|
}
|