agentbox-sdk 0.1.314 → 0.1.315
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/agents/index.js
CHANGED
|
@@ -3975,7 +3975,7 @@ async function ensureSandboxOpenCodeServer(request) {
|
|
|
3975
3975
|
const launchCommand = [
|
|
3976
3976
|
`mkdir -p ${shellQuote(target.layout.rootDir)}`,
|
|
3977
3977
|
`(${[
|
|
3978
|
-
`nohup ${[
|
|
3978
|
+
`setsid nohup ${[
|
|
3979
3979
|
binary,
|
|
3980
3980
|
"serve",
|
|
3981
3981
|
"--hostname",
|
|
@@ -3983,20 +3983,19 @@ async function ensureSandboxOpenCodeServer(request) {
|
|
|
3983
3983
|
"--port",
|
|
3984
3984
|
String(port),
|
|
3985
3985
|
...options.provider?.args ?? []
|
|
3986
|
-
].map(shellQuote).join(" ")} > ${shellQuote(logFilePath)} 2>&1 &`,
|
|
3987
|
-
`echo $! > ${shellQuote(pidFilePath)}
|
|
3986
|
+
].map(shellQuote).join(" ")} </dev/null > ${shellQuote(logFilePath)} 2>&1 &`,
|
|
3987
|
+
`echo $! > ${shellQuote(pidFilePath)}`,
|
|
3988
|
+
`disown 2>/dev/null || true`
|
|
3988
3989
|
].join(" ")})`
|
|
3989
3990
|
].join(" && ");
|
|
3990
3991
|
const launchResult = await time(
|
|
3991
3992
|
debugOpencode,
|
|
3992
3993
|
"spawn opencode serve",
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
return launchHandle.wait();
|
|
3999
|
-
}
|
|
3994
|
+
() => sandbox.run(launchCommand, {
|
|
3995
|
+
cwd: options.cwd,
|
|
3996
|
+
env: serveEnv,
|
|
3997
|
+
timeoutMs: 1e4
|
|
3998
|
+
})
|
|
4000
3999
|
);
|
|
4001
4000
|
if (launchResult.exitCode !== 0) {
|
|
4002
4001
|
await target.cleanup().catch(() => void 0);
|
package/dist/index.js
CHANGED