@span-io/agent-link 0.1.0 → 0.1.1

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.
@@ -94,10 +94,15 @@ export function spawnAgentProcess(config) {
94
94
  const workingDir = process.env.CODEX_CWD ?? defaultCwd;
95
95
  // For logging/display
96
96
  const commandString = [command, ...args].map(shellQuote).join(" ");
97
- const finalCommand = useScriptWrapper ? "script" : command;
98
- // Script wrapper args: -q (quiet), -c (command), /dev/null (output file)
99
- const finalArgs = useScriptWrapper
100
- ? ["-q", "-c", commandString, "/dev/null"]
97
+ const platform = process.platform;
98
+ const canUseScript = useScriptWrapper && platform !== "win32";
99
+ const finalCommand = canUseScript ? "script" : command;
100
+ const finalArgs = canUseScript
101
+ ? platform === "darwin"
102
+ // BSD script: no -c, use "script -q /dev/null sh -c <command>"
103
+ ? ["-q", "/dev/null", "sh", "-c", commandString]
104
+ // GNU script: "script -q -c <command> /dev/null"
105
+ : ["-q", "-c", commandString, "/dev/null"]
101
106
  : args;
102
107
  const child = spawn(finalCommand, finalArgs, {
103
108
  stdio: [promptMode === "stdin" ? "pipe" : "ignore", "pipe", "pipe"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@span-io/agent-link",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Secure bridge between Span (AI control plane) and local agent CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {