@rectify-so/bridge 0.1.0 → 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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # rectify-bridge
1
+ # @rectify-so/bridge
2
2
 
3
3
  Connect your locally-installed agent CLIs — **Claude Code**, **Codex**, and **OpenClaw** — to the [Rectify](https://rectify.so) AgentPulse dashboard.
4
4
 
@@ -9,7 +9,7 @@ The bridge runs on your machine, reads your local session data, and opens a secu
9
9
  In the Rectify dashboard, add a Claude Code / Codex / OpenClaw connection. You'll be given a one-line command:
10
10
 
11
11
  ```bash
12
- npx rectify-bridge connect <token>
12
+ npx @rectify-so/bridge connect <token>
13
13
  ```
14
14
 
15
15
  Run it on the machine where the CLI is installed and **keep the window open**. The dashboard updates automatically once connected. Press `Ctrl+C` to disconnect.
@@ -17,7 +17,7 @@ Run it on the machine where the CLI is installed and **keep the window open**. T
17
17
  ### Options
18
18
 
19
19
  ```
20
- npx rectify-bridge connect <token> [--api <url>]
20
+ npx @rectify-so/bridge connect <token> [--api <url>]
21
21
 
22
22
  --api <url> Override the Rectify API base URL (default: https://api.rectify.so)
23
23
  -h, --help Show help
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ function printHelp() {
37
37
  Rectify Bridge — connect your local agent CLIs to the Rectify dashboard.
38
38
 
39
39
  Usage:
40
- npx rectify-bridge connect <token> [--api <url>]
40
+ npx @rectify-so/bridge connect <token> [--api <url>]
41
41
 
42
42
  Commands:
43
43
  connect <token> Connect using the setup token shown in the Rectify dashboard.
@@ -61,7 +61,7 @@ async function main() {
61
61
  process.exit(1);
62
62
  }
63
63
  if (!token) {
64
- warn('Missing setup token. Usage: npx rectify-bridge connect <token>');
64
+ warn('Missing setup token. Usage: npx @rectify-so/bridge connect <token>');
65
65
  process.exit(1);
66
66
  }
67
67
  const api = new ApiClient(apiBase, token);
package/dist/tunnel.js CHANGED
@@ -49,7 +49,6 @@ export class Tunnel {
49
49
  '-o', 'ServerAliveCountMax=3',
50
50
  '-o', 'ExitOnForwardFailure=yes',
51
51
  '-o', 'StrictHostKeyChecking=no',
52
- '-o', 'UserKnownHostsFile=/dev/null',
53
52
  `${tunnelUser}@${tunnelHost}`,
54
53
  ];
55
54
  log(`Opening tunnel: remote ${tunnelHost}:${remotePort} → localhost:${localTarget}`);
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.0",
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
  }