agentic-debug-mode 0.2.0
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/README.md +6 -0
- package/bin/debug-mode.js +50 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
const packageByTarget = {
|
|
9
|
+
"darwin-arm64": "agentic-debug-mode-darwin-arm64",
|
|
10
|
+
"darwin-x64": "agentic-debug-mode-darwin-x64",
|
|
11
|
+
"linux-arm64": "agentic-debug-mode-linux-arm64",
|
|
12
|
+
"linux-x64": "agentic-debug-mode-linux-x64",
|
|
13
|
+
"win32-x64": "agentic-debug-mode-win32-x64",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function resolveBinary() {
|
|
17
|
+
const target = `${process.platform}-${process.arch}`;
|
|
18
|
+
const packageName = packageByTarget[target];
|
|
19
|
+
if (!packageName) {
|
|
20
|
+
throw new Error(`agentic-debug-mode does not provide a binary for ${target}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const packageJson = require.resolve(`${packageName}/package.json`);
|
|
25
|
+
const executable = process.platform === "win32" ? "debug-mode.exe" : "debug-mode";
|
|
26
|
+
return join(dirname(packageJson), "bin", executable);
|
|
27
|
+
} catch {
|
|
28
|
+
throw new Error(
|
|
29
|
+
`The optional package ${packageName} is missing. Reinstall agentic-debug-mode without omitting optional dependencies.`,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let binary;
|
|
35
|
+
try {
|
|
36
|
+
binary = resolveBinary();
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const result = spawnSync(binary, process.argv.slice(2), {
|
|
43
|
+
stdio: "inherit",
|
|
44
|
+
windowsHide: true,
|
|
45
|
+
});
|
|
46
|
+
if (result.error) {
|
|
47
|
+
console.error(`Unable to launch ${binary}: ${result.error.message}`);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentic-debug-mode",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Standalone evidence-first debugging CLI for coding agents",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"debug-mode": "bin/debug-mode.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"optionalDependencies": {
|
|
18
|
+
"agentic-debug-mode-darwin-arm64": "0.2.0",
|
|
19
|
+
"agentic-debug-mode-darwin-x64": "0.2.0",
|
|
20
|
+
"agentic-debug-mode-linux-arm64": "0.2.0",
|
|
21
|
+
"agentic-debug-mode-linux-x64": "0.2.0",
|
|
22
|
+
"agentic-debug-mode-win32-x64": "0.2.0"
|
|
23
|
+
}
|
|
24
|
+
}
|