@pulso/companion 0.4.8 → 0.4.10
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/index.js +16 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11091,7 +11091,6 @@ print(result.stdout[:5000])
|
|
|
11091
11091
|
if (useStreamJson) {
|
|
11092
11092
|
args.push("--verbose", "--include-partial-messages");
|
|
11093
11093
|
}
|
|
11094
|
-
args.push("--tools", "");
|
|
11095
11094
|
if (systemPrompt && systemPrompt.trim()) {
|
|
11096
11095
|
args.push("--system-prompt", systemPrompt.trim());
|
|
11097
11096
|
}
|
|
@@ -11138,9 +11137,21 @@ print(result.stdout[:5000])
|
|
|
11138
11137
|
}
|
|
11139
11138
|
}
|
|
11140
11139
|
};
|
|
11140
|
+
const { join: _join, dirname: _dirname } = __require("path");
|
|
11141
|
+
const _fs = __require("fs");
|
|
11142
|
+
const _augPath = augmentedPath2();
|
|
11143
|
+
let _nodeBinDir = "";
|
|
11144
|
+
for (const _dir of _augPath.split(":")) {
|
|
11145
|
+
try {
|
|
11146
|
+
_fs.accessSync(_join(_dir, "node"), _fs.constants.X_OK);
|
|
11147
|
+
_nodeBinDir = _dir;
|
|
11148
|
+
break;
|
|
11149
|
+
} catch {
|
|
11150
|
+
}
|
|
11151
|
+
}
|
|
11141
11152
|
const childEnv = {
|
|
11142
11153
|
...process.env,
|
|
11143
|
-
PATH: `${
|
|
11154
|
+
PATH: _nodeBinDir ? `${_nodeBinDir}:${_augPath}` : _augPath
|
|
11144
11155
|
};
|
|
11145
11156
|
delete childEnv.CLAUDECODE;
|
|
11146
11157
|
delete childEnv.CLAUDE_CODE;
|
|
@@ -11255,7 +11266,9 @@ print(result.stdout[:5000])
|
|
|
11255
11266
|
let authDetails;
|
|
11256
11267
|
try {
|
|
11257
11268
|
const status = await runShell4(`"${_claudeBin}" auth status 2>&1`, 1e4);
|
|
11258
|
-
const
|
|
11269
|
+
const jsonStart = status.indexOf("{");
|
|
11270
|
+
const jsonEnd = status.lastIndexOf("}");
|
|
11271
|
+
const trimmed = jsonStart !== -1 && jsonEnd > jsonStart ? status.slice(jsonStart, jsonEnd + 1) : status.trim();
|
|
11259
11272
|
let parsed = null;
|
|
11260
11273
|
try {
|
|
11261
11274
|
parsed = JSON.parse(trimmed);
|