@rectify-so/bridge 0.1.1 → 0.1.2

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/dist/util.js +4 -2
  2. package/package.json +5 -1
package/dist/util.js CHANGED
@@ -1,4 +1,4 @@
1
- import { spawn } from 'node:child_process';
1
+ import spawn from 'cross-spawn';
2
2
  export function log(...args) {
3
3
  const ts = new Date().toISOString().slice(11, 19);
4
4
  console.log(`[${ts}]`, ...args);
@@ -11,7 +11,9 @@ const IS_WIN = process.platform === 'win32';
11
11
  export function run(command, args, options = {}) {
12
12
  const timeoutMs = options.timeoutMs ?? 120000;
13
13
  return new Promise((resolve, reject) => {
14
- const child = spawn(command, args, { shell: IS_WIN });
14
+ // cross-spawn safely runs Windows .cmd/.bat shims WITHOUT a shell, so
15
+ // arguments (including user chat prompts) can never be interpreted as shell commands.
16
+ const child = spawn(command, args, { shell: false });
15
17
  let stdout = '';
16
18
  let stderr = '';
17
19
  let settled = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rectify-so/bridge",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Rectify AgentPulse local bridge — securely connects locally-installed agent CLIs (Claude Code, Codex) and OpenClaw gateways to the Rectify dashboard over a reverse SSH tunnel.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,7 +28,11 @@
28
28
  "tunnel"
29
29
  ],
30
30
  "license": "MIT",
31
+ "dependencies": {
32
+ "cross-spawn": "^7.0.6"
33
+ },
31
34
  "devDependencies": {
35
+ "@types/cross-spawn": "^6.0.6",
32
36
  "@types/node": "^20.11.0",
33
37
  "typescript": "^5.4.0"
34
38
  }