@chatpanel/bridge 0.7.0 → 0.8.0
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/package.json +1 -1
- package/src/engines/codex.js +12 -12
- package/src/server.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local bridge that exposes the AI coding agents installed on your machine — Claude Code (CLI), Codex (CLI), and Gemini CLI — to the ChatPanel Chrome extension over a localhost SSE endpoint. Bring your own agent.",
|
|
6
6
|
"keywords": [
|
package/src/engines/codex.js
CHANGED
|
@@ -133,18 +133,18 @@ export async function chat({ messages, system, options, images }, emit) {
|
|
|
133
133
|
const cleanupImages = () => imageFiles.forEach((f) => unlink(f).catch(() => {}));
|
|
134
134
|
|
|
135
135
|
const cwd = options.workingDir ? path.resolve(options.workingDir) : SCRATCH;
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
const args = ['exec', '--json', '--skip-git-repo-check', '-o', outFile];
|
|
137
|
+
// Headless exec has no human to approve actions. With MCP/browser tools armed
|
|
138
|
+
// Codex would otherwise raise an approval prompt it can't show — and cancel the
|
|
139
|
+
// tool call. So in bypassPermissions (full autonomy, what "Act on page" needs)
|
|
140
|
+
// use the all-in bypass flag, which also clears MCP-tool approval. Lower modes
|
|
141
|
+
// keep the sandbox + never-ask, which auto-runs within bounds.
|
|
142
|
+
if (options.permissionMode === 'bypassPermissions') {
|
|
143
|
+
args.push('--dangerously-bypass-approvals-and-sandbox');
|
|
144
|
+
} else {
|
|
145
|
+
const sandbox = options.permissionMode === 'acceptEdits' ? 'workspace-write' : 'read-only';
|
|
146
|
+
args.push('-s', sandbox, '-c', 'approval_policy=never');
|
|
147
|
+
}
|
|
148
148
|
if (REASONING) args.push('-c', `model_reasoning_effort=${REASONING}`);
|
|
149
149
|
// Browser tools: register the bridge's MCP server as a stdio MCP server (the
|
|
150
150
|
// bridge binary in --mcp-stdio mode), so Codex can call our page-action tools.
|
package/src/server.js
CHANGED
|
@@ -30,7 +30,7 @@ import { callLocalMcp } from './mcp-local.js';
|
|
|
30
30
|
// Hardcoded (not read from package.json) so it survives Bun's single-file
|
|
31
31
|
// --compile, where package.json isn't on a readable FS. CI fails the publish if
|
|
32
32
|
// this drifts from package.json, so the two can't silently diverge.
|
|
33
|
-
const VERSION = '0.
|
|
33
|
+
const VERSION = '0.8.0';
|
|
34
34
|
const HOST = process.env.CHATPANEL_BRIDGE_HOST || '127.0.0.1';
|
|
35
35
|
const PORT = Number(process.env.CHATPANEL_BRIDGE_PORT) || 4319;
|
|
36
36
|
|