@boxcrew/cli 0.1.10 → 0.1.11
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 +21 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -517,6 +517,15 @@ function runDaemon(agentName) {
|
|
|
517
517
|
const { messageId, message, sessionId } = msg;
|
|
518
518
|
const childEnv = { ...process.env };
|
|
519
519
|
delete childEnv.CLAUDECODE;
|
|
520
|
+
delete childEnv.CLAUDE_CODE_ENTRYPOINT;
|
|
521
|
+
const proxyToken = process.env._BX_PROXY_TOKEN;
|
|
522
|
+
const proxyBaseUrl = process.env._BX_PROXY_BASE_URL;
|
|
523
|
+
if (proxyToken) {
|
|
524
|
+
childEnv.ANTHROPIC_API_KEY = proxyToken;
|
|
525
|
+
if (proxyBaseUrl) {
|
|
526
|
+
childEnv.ANTHROPIC_BASE_URL = proxyBaseUrl;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
520
529
|
let cmd;
|
|
521
530
|
let args;
|
|
522
531
|
if (runtime === "opencode") {
|
|
@@ -683,16 +692,21 @@ function registerConnectCommand(program2) {
|
|
|
683
692
|
);
|
|
684
693
|
const logFile = getLogFile(agentName);
|
|
685
694
|
const logFd = openSync(logFile, "a");
|
|
695
|
+
const daemonEnv = {
|
|
696
|
+
...process.env,
|
|
697
|
+
_BX_WS_URL: config2.websocket_url,
|
|
698
|
+
_BX_CLAUDE_PATH: options.claudePath,
|
|
699
|
+
_BX_AGENT_NAME: config2.agent_name,
|
|
700
|
+
_BX_RUNTIME: config2.runtime,
|
|
701
|
+
_BX_PROXY_TOKEN: config2.proxy_token,
|
|
702
|
+
_BX_PROXY_BASE_URL: config2.proxy_base_url
|
|
703
|
+
};
|
|
704
|
+
delete daemonEnv.CLAUDECODE;
|
|
705
|
+
delete daemonEnv.CLAUDE_CODE_ENTRYPOINT;
|
|
686
706
|
const child = spawn(process.argv[0], [process.argv[1], "_daemon", agentName], {
|
|
687
707
|
detached: true,
|
|
688
708
|
stdio: ["ignore", logFd, logFd],
|
|
689
|
-
env:
|
|
690
|
-
...process.env,
|
|
691
|
-
_BX_WS_URL: config2.websocket_url,
|
|
692
|
-
_BX_CLAUDE_PATH: options.claudePath,
|
|
693
|
-
_BX_AGENT_NAME: config2.agent_name,
|
|
694
|
-
_BX_RUNTIME: config2.runtime
|
|
695
|
-
}
|
|
709
|
+
env: daemonEnv
|
|
696
710
|
});
|
|
697
711
|
child.unref();
|
|
698
712
|
const runtimeNames = {
|