@adhdev/daemon-core 0.9.82-rc.13 → 0.9.82-rc.131
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/chat/subscription-updates.d.ts +1 -0
- package/dist/cli-adapter-types.d.ts +4 -1
- package/dist/cli-adapters/provider-cli-adapter.d.ts +25 -1
- package/dist/cli-adapters/provider-cli-parse.d.ts +1 -0
- package/dist/cli-adapters/provider-cli-shared.d.ts +14 -0
- package/dist/commands/router.d.ts +22 -0
- package/dist/config/chat-history.d.ts +4 -0
- package/dist/config/mesh-config.d.ts +68 -1
- package/dist/git/git-commands.d.ts +5 -1
- package/dist/index.d.ts +15 -5
- package/dist/index.js +7538 -1380
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7494 -1364
- package/dist/index.mjs.map +1 -1
- package/dist/installer.d.ts +1 -4
- package/dist/launch.d.ts +1 -1
- package/dist/logging/async-batch-writer.d.ts +10 -0
- package/dist/mesh/beads-db.d.ts +18 -0
- package/dist/mesh/mesh-active-work.d.ts +73 -0
- package/dist/mesh/mesh-events.d.ts +54 -5
- package/dist/mesh/mesh-fast-forward.d.ts +39 -0
- package/dist/mesh/mesh-host-ownership.d.ts +9 -0
- package/dist/mesh/mesh-ledger.d.ts +38 -1
- package/dist/mesh/mesh-refine-status.d.ts +27 -0
- package/dist/mesh/mesh-work-queue.d.ts +27 -5
- package/dist/mesh/preview-freshness.d.ts +18 -0
- package/dist/mesh/refine-config.d.ts +193 -0
- package/dist/mesh/worktree-bootstrap-config.d.ts +115 -0
- package/dist/providers/chat-message-normalization.d.ts +1 -0
- package/dist/providers/cli-provider-instance.d.ts +6 -1
- package/dist/repo-mesh-types.d.ts +62 -0
- package/dist/status/reporter.d.ts +2 -0
- package/package.json +3 -1
- package/src/boot/daemon-lifecycle.ts +1 -0
- package/src/chat/subscription-updates.ts +5 -1
- package/src/cli-adapter-types.ts +2 -1
- package/src/cli-adapters/provider-cli-adapter.ts +473 -18
- package/src/cli-adapters/provider-cli-parse.d.ts +1 -0
- package/src/cli-adapters/provider-cli-parse.ts +4 -0
- package/src/cli-adapters/provider-cli-runtime.ts +3 -1
- package/src/cli-adapters/provider-cli-shared.d.ts +2 -0
- package/src/cli-adapters/provider-cli-shared.ts +32 -10
- package/src/commands/chat-commands.ts +1065 -40
- package/src/commands/cli-manager.ts +138 -2
- package/src/commands/handler.ts +8 -1
- package/src/commands/mesh-coordinator.ts +13 -143
- package/src/commands/router.ts +3238 -423
- package/src/config/chat-history.ts +37 -9
- package/src/config/mesh-config.ts +249 -2
- package/src/config/recent-activity.ts +8 -2
- package/src/daemon/dev-cli-debug.ts +10 -1
- package/src/detection/ide-detector.ts +26 -16
- package/src/git/git-commands.ts +17 -5
- package/src/index.ts +41 -4
- package/src/installer.d.ts +1 -1
- package/src/installer.ts +8 -6
- package/src/launch.d.ts +1 -1
- package/src/launch.ts +37 -28
- package/src/logging/async-batch-writer.ts +55 -0
- package/src/logging/logger.ts +2 -1
- package/src/mesh/beads-db.ts +176 -0
- package/src/mesh/coordinator-prompt.ts +31 -8
- package/src/mesh/mesh-active-work.ts +295 -0
- package/src/mesh/mesh-events.ts +595 -48
- package/src/mesh/mesh-fast-forward.ts +430 -0
- package/src/mesh/mesh-host-ownership.ts +73 -0
- package/src/mesh/mesh-ledger.ts +138 -1
- package/src/mesh/mesh-refine-status.ts +145 -0
- package/src/mesh/mesh-work-queue.ts +199 -137
- package/src/mesh/preview-freshness.ts +118 -0
- package/src/mesh/refine-config.ts +366 -0
- package/src/mesh/worktree-bootstrap-config.ts +234 -0
- package/src/providers/approval-utils.ts +12 -5
- package/src/providers/chat-message-normalization.ts +7 -12
- package/src/providers/cli-provider-instance.ts +289 -36
- package/src/providers/ide-provider-instance.ts +17 -3
- package/src/providers/provider-loader.ts +10 -4
- package/src/providers/read-chat-contract.ts +1 -1
- package/src/providers/version-archive.ts +38 -20
- package/src/repo-mesh-types.ts +67 -0
- package/src/status/reporter.ts +15 -0
- package/src/system/host-memory.ts +29 -12
|
@@ -15,6 +15,7 @@ export declare function buildCliParseInput(options: {
|
|
|
15
15
|
accumulatedRawBuffer: string;
|
|
16
16
|
recentOutputBuffer: string;
|
|
17
17
|
terminalScreenText: string;
|
|
18
|
+
workingDir?: string;
|
|
18
19
|
baseMessages: CliChatMessage[];
|
|
19
20
|
partialResponse: string;
|
|
20
21
|
isWaitingForResponse?: boolean;
|
|
@@ -35,6 +35,7 @@ export function buildCliParseInput(options: {
|
|
|
35
35
|
accumulatedRawBuffer: string;
|
|
36
36
|
recentOutputBuffer: string;
|
|
37
37
|
terminalScreenText: string;
|
|
38
|
+
workingDir?: string;
|
|
38
39
|
baseMessages: CliChatMessage[];
|
|
39
40
|
partialResponse: string;
|
|
40
41
|
isWaitingForResponse?: boolean;
|
|
@@ -46,6 +47,7 @@ export function buildCliParseInput(options: {
|
|
|
46
47
|
accumulatedRawBuffer,
|
|
47
48
|
recentOutputBuffer,
|
|
48
49
|
terminalScreenText,
|
|
50
|
+
workingDir,
|
|
49
51
|
baseMessages,
|
|
50
52
|
partialResponse,
|
|
51
53
|
isWaitingForResponse,
|
|
@@ -66,6 +68,8 @@ export function buildCliParseInput(options: {
|
|
|
66
68
|
rawBuffer,
|
|
67
69
|
recentBuffer,
|
|
68
70
|
screenText,
|
|
71
|
+
workspace: workingDir,
|
|
72
|
+
workingDir,
|
|
69
73
|
screen: buildCliScreenSnapshot(screenText),
|
|
70
74
|
bufferScreen: buildCliScreenSnapshot(buffer),
|
|
71
75
|
recentScreen: buildCliScreenSnapshot(recentBuffer),
|
|
@@ -36,7 +36,9 @@ export function resolveCliSpawnPlan(options: {
|
|
|
36
36
|
: spawnConfig.command;
|
|
37
37
|
const binaryPath = findBinary(configuredCommand);
|
|
38
38
|
const isWin = os.platform() === 'win32';
|
|
39
|
-
const allArgs = [...spawnConfig.args, ...extraArgs]
|
|
39
|
+
const allArgs = [...spawnConfig.args, ...extraArgs].map((arg) =>
|
|
40
|
+
typeof arg === 'string' ? arg.replace(/\{\{workingDir\}\}/g, workingDir) : arg,
|
|
41
|
+
);
|
|
40
42
|
|
|
41
43
|
let shellCmd: string;
|
|
42
44
|
let shellArgs: string[];
|
|
@@ -28,8 +28,17 @@ export interface CliSessionStatus {
|
|
|
28
28
|
messages: CliChatMessage[];
|
|
29
29
|
workingDir: string;
|
|
30
30
|
activeModal: { message: string; buttons: string[] } | null;
|
|
31
|
+
pendingOutboundCount?: number;
|
|
32
|
+
pendingOutboundMessages?: Array<{
|
|
33
|
+
id: string;
|
|
34
|
+
role: 'user';
|
|
35
|
+
content: string;
|
|
36
|
+
queuedAt: number;
|
|
37
|
+
source: string;
|
|
38
|
+
}>;
|
|
31
39
|
errorMessage?: string;
|
|
32
40
|
errorReason?: string;
|
|
41
|
+
providerSessionId?: string;
|
|
33
42
|
bufferState?: {
|
|
34
43
|
responseBuffer?: { truncated: boolean; droppedChars: number; maxChars: number };
|
|
35
44
|
recentOutputBuffer?: { truncated: boolean; droppedChars: number; maxChars: number };
|
|
@@ -43,6 +52,9 @@ export interface ParsedSession {
|
|
|
43
52
|
messages: any[];
|
|
44
53
|
modal: { message: string; buttons: string[] } | null;
|
|
45
54
|
parsedStatus: string | null;
|
|
55
|
+
errorMessage?: string;
|
|
56
|
+
errorReason?: string;
|
|
57
|
+
providerSessionId?: string;
|
|
46
58
|
transcriptAuthority?: 'provider' | 'daemon';
|
|
47
59
|
coverage?: 'full' | 'tail' | 'current-turn';
|
|
48
60
|
}
|
|
@@ -94,6 +106,8 @@ export interface CliScriptInput {
|
|
|
94
106
|
rawBuffer: string;
|
|
95
107
|
recentBuffer: string;
|
|
96
108
|
screenText: string;
|
|
109
|
+
workspace?: string;
|
|
110
|
+
workingDir?: string;
|
|
97
111
|
screen: CliScreenSnapshot;
|
|
98
112
|
bufferScreen: CliScreenSnapshot;
|
|
99
113
|
recentScreen: CliScreenSnapshot;
|
|
@@ -484,17 +498,25 @@ export function findBinary(name: string): string {
|
|
|
484
498
|
return path.isAbsolute(expanded) ? expanded : path.resolve(expanded);
|
|
485
499
|
}
|
|
486
500
|
const isWin = os.platform() === 'win32';
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
501
|
+
const paths = (process.env.PATH || '').split(path.delimiter);
|
|
502
|
+
const exes = isWin ? ['.exe', '.cmd', '.bat', ''] : [''];
|
|
503
|
+
|
|
504
|
+
for (const p of paths) {
|
|
505
|
+
if (!p) continue;
|
|
506
|
+
for (const ext of exes) {
|
|
507
|
+
const fullPath = path.join(p, trimmed + ext);
|
|
508
|
+
try {
|
|
509
|
+
const fs = require('fs');
|
|
510
|
+
if (fs.existsSync(fullPath)) {
|
|
511
|
+
const stat = fs.statSync(fullPath);
|
|
512
|
+
if (stat.isFile() && (isWin || (stat.mode & 0o111))) {
|
|
513
|
+
return fullPath;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
} catch { }
|
|
517
|
+
}
|
|
497
518
|
}
|
|
519
|
+
return isWin ? `${trimmed}.cmd` : trimmed;
|
|
498
520
|
}
|
|
499
521
|
|
|
500
522
|
export function isScriptBinary(binaryPath: string): boolean {
|