esque-bridge 0.4.0 → 0.5.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.
Files changed (2) hide show
  1. package/index.js +36 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -13,6 +13,7 @@
13
13
  * through the configured agent adapter, returning stdout
14
14
  *
15
15
  * npx esque-bridge # default: claude
16
+ * npx esque-bridge --agent codex # OpenAI Codex (ChatGPT) on this repo
16
17
  * npx esque-bridge --agent aider # Aider against the current repo
17
18
  * npx esque-bridge --agent custom --cmd 'mycli --prompt {prompt}'
18
19
  */
@@ -36,13 +37,15 @@ if (argv.help || argv.h) {
36
37
  Esque Bridge — pair your phone with a local coding-agent CLI.
37
38
 
38
39
  USAGE
39
- esque-bridge [--agent claude|aider|custom] [--port 3030] [--workdir .]
40
+ esque-bridge [--agent claude|codex|aider|custom] [--port 3030] [--workdir .]
40
41
  [--cmd 'tool --prompt {prompt}'] [--bin <binary>]
41
42
  [--timeout 300000]
42
43
 
43
44
  AGENT ADAPTERS
44
45
  claude (default) — uses Claude Code CLI (\`claude --print --output-format json\`).
45
46
  Persists session ids so each conversation continues via --resume.
47
+ codex — uses OpenAI Codex CLI (\`codex exec\`, headless, auto-approve).
48
+ Drive ChatGPT's coding agent with your ChatGPT plan or API key.
46
49
  aider — uses Aider CLI (\`aider --message ... --yes-always --no-stream\`).
47
50
  Conversation continuity is handled by aider's own .aider.chat.history.md.
48
51
  custom — runs an arbitrary command. Pass --cmd 'tool --prompt {prompt}'
@@ -59,6 +62,7 @@ OPTIONS
59
62
 
60
63
  PREREQS
61
64
  Claude: npm install -g @anthropic-ai/claude-code && claude /login
65
+ Codex: npm install -g @openai/codex && codex login
62
66
  Aider: python -m pip install aider-chat
63
67
 
64
68
  OUTPUT
@@ -201,6 +205,37 @@ const ADAPTERS = {
201
205
  },
202
206
  },
203
207
 
208
+ codex: {
209
+ label: 'Codex',
210
+ defaultBin: 'codex',
211
+ install:
212
+ 'npm install -g @openai/codex, then `codex login` (ChatGPT plan or API key).',
213
+ // `exec` is Codex's non-interactive mode. The bypass flag is Codex's
214
+ // analogue of Claude's --dangerously-skip-permissions: in headless mode
215
+ // there's no human to approve file writes / shell commands (incl. the
216
+ // network installs a fresh scaffold needs), so without it the agent
217
+ // looks busy but can't touch the disk. Access is already gated by the
218
+ // pairing secret + the startup workdir confirmation. --skip-git-repo-check
219
+ // lets it run in a brand-new (not-yet-git) project dir for `fresh` builds.
220
+ buildArgs(_prompt, _prevSessionId) {
221
+ return [
222
+ 'exec',
223
+ '--dangerously-bypass-approvals-and-sandbox',
224
+ '--skip-git-repo-check',
225
+ ];
226
+ },
227
+ parseOutput(stdout) {
228
+ // `codex exec` streams its run to stdout and logs to stderr; the trimmed
229
+ // stdout is the agent's reply. (Codex has no stable resume-by-id we rely
230
+ // on here, so each turn is self-contained — Esque re-sends repo context.)
231
+ return {
232
+ text: stdout.trim() || '(codex returned no output)',
233
+ cliSessionId: null,
234
+ isError: false,
235
+ };
236
+ },
237
+ },
238
+
204
239
  aider: {
205
240
  label: 'Aider',
206
241
  defaultBin: 'aider',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esque-bridge",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Desktop-side receiver for the Esque Agent mobile app. Pairs your phone with a local coding-agent CLI (Claude Code, Aider, or any custom command) via a tunnel + QR code, so prompts run through your subscription instead of per-token API billing.",
5
5
  "bin": {
6
6
  "esque-bridge": "index.js"