agentram 0.1.11 → 0.1.13
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/bin/agentram-postinstall.js +5 -3
- package/package.json +1 -1
- package/pyproject.toml +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const { spawnSync } = require("node:child_process");
|
|
3
2
|
|
|
4
3
|
if (process.env.AGENTRAM_SKIP_PY_DEPS === "1") {
|
|
@@ -6,7 +5,9 @@ if (process.env.AGENTRAM_SKIP_PY_DEPS === "1") {
|
|
|
6
5
|
process.exit(0);
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
const candidates = process.env.PYTHON
|
|
8
|
+
const candidates = process.env.PYTHON
|
|
9
|
+
? [process.env.PYTHON]
|
|
10
|
+
: ["python", ...(process.platform === "win32" ? ["py"] : [])];
|
|
10
11
|
const deps = ["textual>=0.80", "prompt_toolkit>=3.0"];
|
|
11
12
|
|
|
12
13
|
function runPython(command, args) {
|
|
@@ -21,6 +22,7 @@ for (const command of candidates) {
|
|
|
21
22
|
lastError = probe.error || new Error(`${command} exited ${probe.status}`);
|
|
22
23
|
continue;
|
|
23
24
|
}
|
|
25
|
+
|
|
24
26
|
console.log(`AgentRAM: installing Python TUI deps with ${command}`);
|
|
25
27
|
const install = runPython(command, ["-m", "pip", "install", ...deps]);
|
|
26
28
|
if (!install.error && install.status === 0) {
|
|
@@ -32,4 +34,4 @@ for (const command of candidates) {
|
|
|
32
34
|
console.warn("AgentRAM: Python TUI deps were not installed automatically.");
|
|
33
35
|
console.warn("AgentRAM: run `python -m pip install textual prompt_toolkit` manually, or set PYTHON to the target interpreter.");
|
|
34
36
|
if (lastError) console.warn(`AgentRAM: ${lastError.message}`);
|
|
35
|
-
process.exit(process.env.AGENTRAM_STRICT_POSTINSTALL === "1" ? 1 : 0);
|
|
37
|
+
process.exit(process.env.AGENTRAM_STRICT_POSTINSTALL === "1" ? 1 : 0);
|
package/package.json
CHANGED