daedalus-cli 3.49.1 → 3.49.2
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.49.2](https://github.com/bgill55/daedalus/compare/v3.49.1...v3.49.2) (2026-08-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **git:** run git diff/status via execFileSync, not the terminal pipeline ([d75f484](https://github.com/bgill55/daedalus/commit/d75f484de240f3c40038e71f5e7307d29bc21022))
|
|
7
|
+
|
|
1
8
|
## [3.49.1](https://github.com/bgill55/daedalus/compare/v3.49.0...v3.49.1) (2026-08-27)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -3,5 +3,5 @@ export declare function diff(args: {
|
|
|
3
3
|
staged?: boolean;
|
|
4
4
|
path?: string;
|
|
5
5
|
}, context: ToolContext): Promise<ToolResult>;
|
|
6
|
-
export declare function status(
|
|
6
|
+
export declare function status(_args: Record<string, never>, context: ToolContext): Promise<ToolResult>;
|
|
7
7
|
//# sourceMappingURL=git.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/tools/builtin/git.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/tools/builtin/git.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAoCzD,wBAAsB,IAAI,CAAC,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAK/G;AAED,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAEpG"}
|
|
@@ -1,11 +1,56 @@
|
|
|
1
1
|
// Git tools
|
|
2
|
-
|
|
2
|
+
//
|
|
3
|
+
// These run git directly via execFileSync (no interactive shell). Routing git
|
|
4
|
+
// through the terminal tool's shell pipeline (cmd.exe detection, detached spawn,
|
|
5
|
+
// pager/autocrlf handling) made `git diff` output capture flaky on CI Windows,
|
|
6
|
+
// where the shell environment differs from a dev machine. Direct exec is
|
|
7
|
+
// deterministic across platforms and avoids the terminal tool's install-gates,
|
|
8
|
+
// dev-server blocks, and circuit breakers — none of which apply to read-only
|
|
9
|
+
// git inspection.
|
|
10
|
+
import { execFileSync } from 'child_process';
|
|
11
|
+
function runGit(args, context) {
|
|
12
|
+
try {
|
|
13
|
+
const stdout = execFileSync('git', args, {
|
|
14
|
+
cwd: context.projectRoot,
|
|
15
|
+
encoding: 'utf8',
|
|
16
|
+
// Never let a pager intercept output, even if core.pager/GIT_PAGER is set.
|
|
17
|
+
env: { ...process.env, GIT_PAGER: 'cat', PAGER: 'cat' },
|
|
18
|
+
// git exits 1 when there are differences (normal for `diff`); that is not
|
|
19
|
+
// an error for our purposes, so don't throw on non-zero status.
|
|
20
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
toolCallId: '',
|
|
24
|
+
name: 'git',
|
|
25
|
+
success: true,
|
|
26
|
+
content: stdout || '(no output)',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
const e = err;
|
|
31
|
+
const out = (e.stdout || '') + (e.stderr || '');
|
|
32
|
+
// A diff with changes exits 1 by design — treat as success with the diff content.
|
|
33
|
+
if (e.status !== undefined && e.status !== 0 && out.trim()) {
|
|
34
|
+
return { toolCallId: '', name: 'git', success: true, content: out };
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
toolCallId: '',
|
|
38
|
+
name: 'git',
|
|
39
|
+
success: false,
|
|
40
|
+
content: out || '',
|
|
41
|
+
error: `git ${args.join(' ')} failed: ${e.message ?? 'unknown error'}`,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
3
45
|
export async function diff(args, context) {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
46
|
+
const gitArgs = ['diff'];
|
|
47
|
+
if (args.staged)
|
|
48
|
+
gitArgs.push('--staged');
|
|
49
|
+
if (args.path)
|
|
50
|
+
gitArgs.push('--', args.path);
|
|
51
|
+
return runGit(gitArgs, context);
|
|
7
52
|
}
|
|
8
|
-
export async function status(
|
|
9
|
-
return
|
|
53
|
+
export async function status(_args, context) {
|
|
54
|
+
return runGit(['status', '--porcelain'], context);
|
|
10
55
|
}
|
|
11
56
|
//# sourceMappingURL=git.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/tools/builtin/git.ts"],"names":[],"mappings":"AAAA,YAAY;
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/tools/builtin/git.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,EAAE;AACF,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,yEAAyE;AACzE,+EAA+E;AAC/E,6EAA6E;AAC7E,kBAAkB;AAElB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,SAAS,MAAM,CAAC,IAAc,EAAE,OAAoB;IAClD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;YACvC,GAAG,EAAE,OAAO,CAAC,WAAW;YACxB,QAAQ,EAAE,MAAM;YAChB,2EAA2E;YAC3E,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;YACvD,0EAA0E;YAC1E,gEAA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