@adhdev/daemon-core 0.9.82-rc.301 → 0.9.82-rc.303
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/resolve-executable.d.ts +14 -0
- package/dist/git/git-executor.d.ts +11 -0
- package/dist/git/git-status.d.ts +2 -0
- package/dist/index.js +578 -516
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +583 -521
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cli-adapters/pty-transport.ts +2 -1
- package/src/cli-adapters/resolve-executable.ts +45 -0
- package/src/cli-adapters/session-host-transport.ts +2 -1
- package/src/commands/upgrade-helper.ts +29 -0
- package/src/git/git-executor.ts +12 -0
- package/src/git/git-status.ts +71 -13
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a launch command to an absolute executable path on Windows.
|
|
3
|
+
*
|
|
4
|
+
* node-pty's ConPTY backend resolves a bare/relative command against the
|
|
5
|
+
* *calling process's* `Path` env var and — critically — does NOT apply PATHEXT.
|
|
6
|
+
* So a provider command like `claude` never matches `claude.exe` and the native
|
|
7
|
+
* layer throws `File not found:` (empty), which crashes the daemon. We resolve
|
|
8
|
+
* it to an absolute `.exe` here (in the daemon process, which has the full PATH)
|
|
9
|
+
* before the command ever reaches node-pty.
|
|
10
|
+
*
|
|
11
|
+
* No-op on non-Windows and when the command is already an existing absolute path
|
|
12
|
+
* or cannot be resolved (caller keeps the original behaviour).
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveWin32Executable(command: string): string;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { GitFailureReason, GitRepoIdentity } from './git-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Timeout for status-collection git commands (status/log/submodule/stash/fetch).
|
|
4
|
+
* The default 5s is fine for porcelain status, but on Windows the `git` subprocess
|
|
5
|
+
* spawn itself is pathologically slow (measured: `submodule status` ~3.5s, cold
|
|
6
|
+
* `log -1` ~4.2s) and overlaps with refreshUpstream fetches — a single command
|
|
7
|
+
* routinely exceeds 5s, which previously collapsed the whole status to all-null and
|
|
8
|
+
* dropped the node from the mesh graph. Give the collection path a much larger
|
|
9
|
+
* budget so a slow-but-healthy repo never reads as "not a git repo". Windows gets a
|
|
10
|
+
* larger budget than POSIX because the spawn cost is OS-specific, not repo-specific.
|
|
11
|
+
*/
|
|
12
|
+
export declare const GIT_STATUS_TIMEOUT_MS: number;
|
|
2
13
|
export interface GitExecutorOptions {
|
|
3
14
|
timeoutMs?: number;
|
|
4
15
|
maxBuffer?: number;
|
package/dist/git/git-status.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { GitRepoStatus } from './git-types.js';
|
|
2
2
|
import { type DaemonBuildInfo } from '../build-info.js';
|
|
3
|
+
/** Test seam: clear the last-known-good status cache between cases. */
|
|
4
|
+
export declare function __resetGitStatusCacheForTests(): void;
|
|
3
5
|
export interface GitStatusOptions {
|
|
4
6
|
timeoutMs?: number;
|
|
5
7
|
/** When true, include submodule status in the result. Defaults to true. */
|