@engineeros/connector 0.8.6 → 0.8.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/runner.mjs +31 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engineeros/connector",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "Connect a local coding agent to EngineerOS, using ACP when supported.",
5
5
  "private": false,
6
6
  "type": "module",
package/src/runner.mjs CHANGED
@@ -882,22 +882,29 @@ export function codexExecutionArgs({
882
882
  if (profile.reasoning_effort) {
883
883
  optionArgs.push(
884
884
  "--config",
885
- `model_reasoning_effort=${JSON.stringify(profile.reasoning_effort)}`,
885
+ codexConfigArgument(
886
+ `model_reasoning_effort=${tomlLiteralString(profile.reasoning_effort)}`,
887
+ ),
886
888
  );
887
889
  }
888
890
  if (mcpServer) {
891
+ const mcpArgs = [
892
+ mcpServer.connectorBin,
893
+ "mcp",
894
+ "--workspace",
895
+ mcpServer.workspace,
896
+ "--run-id",
897
+ mcpServer.runId,
898
+ ];
889
899
  optionArgs.push(
890
900
  "--config",
891
- `mcp_servers.engineeros.command=${JSON.stringify(process.execPath)}`,
901
+ codexConfigArgument(
902
+ `mcp_servers.engineeros.command=${tomlLiteralString(process.execPath)}`,
903
+ ),
892
904
  "--config",
893
- `mcp_servers.engineeros.args=${JSON.stringify([
894
- mcpServer.connectorBin,
895
- "mcp",
896
- "--workspace",
897
- mcpServer.workspace,
898
- "--run-id",
899
- mcpServer.runId,
900
- ])}`,
905
+ codexConfigArgument(
906
+ `mcp_servers.engineeros.args=[${mcpArgs.map(tomlLiteralString).join(",")}]`,
907
+ ),
901
908
  );
902
909
  }
903
910
  return previousSessionId
@@ -905,6 +912,20 @@ export function codexExecutionArgs({
905
912
  : ["exec", ...optionArgs, "--sandbox", sandbox, "-C", workspace, "-"];
906
913
  }
907
914
 
915
+ function tomlLiteralString(value) {
916
+ const text = String(value);
917
+ if (text.includes("'''")) {
918
+ throw new Error(
919
+ "Codex configuration values cannot contain three consecutive apostrophes.",
920
+ );
921
+ }
922
+ return `'''${text}'''`;
923
+ }
924
+
925
+ function codexConfigArgument(override) {
926
+ return process.platform === "win32" ? `"${override}"` : override;
927
+ }
928
+
908
929
  function launchAgentProcess(
909
930
  workspace,
910
931
  prompt,