@freibergergarcia/phone-a-friend 2.6.2 → 2.7.1

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.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "phone-a-friend-marketplace",
3
+ "interface": { "displayName": "Phone a Friend" },
4
+ "plugins": [
5
+ {
6
+ "name": "phone-a-friend",
7
+ "source": { "source": "local", "path": "./plugins/phone-a-friend" },
8
+ "policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" },
9
+ "category": "Productivity"
10
+ }
11
+ ]
12
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "phone-a-friend",
3
3
  "description": "CLI relay that lets AI coding agents collaborate by sending prompts and repository context to backend agents.",
4
- "version": "2.6.2",
4
+ "version": "2.7.1",
5
5
  "author": {
6
6
  "name": "Bruno Freiberger"
7
7
  }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "phone-a-friend",
3
+ "version": "2.7.1",
4
+ "description": "CLI relay that lets AI coding agents collaborate by sending prompts and repository context to backend agents.",
5
+ "author": {
6
+ "name": "Bruno Freiberger"
7
+ },
8
+ "license": "Apache-2.0",
9
+ "repository": "https://github.com/freibergergarcia/phone-a-friend",
10
+ "skills": "./skills/",
11
+ "interface": {
12
+ "displayName": "Phone a Friend",
13
+ "shortDescription": "Relay prompts to other AI coding backends",
14
+ "longDescription": "Phone a Friend is a relay CLI that lets AI coding agents collaborate. From inside Codex, ask Claude, Gemini, OpenCode, or Ollama for second opinions, code reviews, and iterative refinement. The phone-a-team workflow spawns multi-model reviewer/critic/synthesizer subagents that share cross-host sessions across rounds.",
15
+ "developerName": "Bruno Freiberger",
16
+ "category": "Productivity",
17
+ "capabilities": [
18
+ "Interactive"
19
+ ],
20
+ "defaultPrompt": [
21
+ "Ask Claude through phone-a-friend for a sanity review of this repo",
22
+ "Spin up reviewers across Claude and Gemini to debate this change",
23
+ "Iterate this implementation with phone-a-team across multiple backends"
24
+ ]
25
+ }
26
+ }
package/README.md CHANGED
@@ -25,16 +25,33 @@ Relay tasks to any backend, spin up multi-model teams, or run persistent multi-a
25
25
 
26
26
  ### Host parity
27
27
 
28
- | Feature | Claude Code | OpenCode |
29
- |---|:---:|:---:|
30
- | `/phone-a-friend` (single-backend relay) | ✓ | ✓ |
31
- | `/curiosity-engine` (Q&A rally) | ✓ | ✓ |
32
- | `/phone-a-team` (iterative multi-model team) | ✓ | — |
33
- | Plugin marketplace install | ✓ | — |
34
- | CLI plugin install (`phone-a-friend plugin install --<host>`) | ✓ | ✓ |
35
- | Skill auto-discovery | ✓ | ✓ |
36
-
37
- OpenCode users can replicate `/phone-a-team` by running repeated `/phone-a-friend` calls and synthesizing manually.
28
+ | Feature | Claude Code | OpenCode | Codex |
29
+ |---|:---:|:---:|:---:|
30
+ | `/phone-a-friend` (single + parallel multi-backend relay) | ✓ | ✓ | ✓ |
31
+ | `/curiosity-engine` (Q&A rally) | ✓ | ✓ | ✓ |
32
+ | `/phone-a-team` (iterative multi-model team) | ✓ | — | ✓ |
33
+ | Plugin marketplace install | ✓ | — | ✓ |
34
+ | CLI plugin install (`phone-a-friend plugin install --<host>`) | ✓ | ✓ | ✓ |
35
+ | Skill auto-discovery | ✓ | ✓ | ✓ |
36
+ | Recursion guard (`PHONE_A_FRIEND_HOST=<host>`) | n/a | ✓ | ✓ |
37
+
38
+ Claude `/phone-a-team` orchestrates rounds via the Agent Teams primitive (TeamCreate + Task + SendMessage). Codex `/phone-a-team` is pure Bash orchestration directly from the skill body, with Codex's own model handling the synthesis between rounds. OpenCode has no comparable primitive and replicates `/phone-a-team` by running repeated `/phone-a-friend` calls manually.
39
+
40
+ > [!IMPORTANT]
41
+ > **Codex users:** Codex's default `workspace-write` sandbox blocks subprocess access to the macOS Keychain (where Claude stores OAuth tokens) and OAuth refresh network paths (Gemini). With the default sandbox, relays to Claude fail with a misleading `Not logged in` and Gemini hangs until the timeout. Two workarounds today, both with tradeoffs:
42
+ >
43
+ > **Option A — Lower the sandbox.** Per-session (preferred): launch Codex with `codex --sandbox danger-full-access`. Persistent (convenient but removes sandbox protections from every Codex session, not just PaF relays): add an alias to `~/.zshrc` or `~/.bashrc`:
44
+ > ```bash
45
+ > alias codex='codex --sandbox danger-full-access'
46
+ > ```
47
+ >
48
+ > **Option B — Use API keys.** Skips OAuth entirely, works in any sandbox:
49
+ > ```bash
50
+ > export ANTHROPIC_API_KEY=...
51
+ > export GEMINI_API_KEY=...
52
+ > ```
53
+ >
54
+ > A portable-auth path via `claude setup-token` is planned for the Claude side. Gemini OAuth refresh inside the sandbox is a separate open issue with no planned fix yet — until then, Option B is the only Gemini-safe path that keeps the sandbox intact.
38
55
 
39
56
  ## Quick Start
40
57
 
@@ -81,6 +98,36 @@ This installs to `~/.config/opencode/skills/` and `~/.config/opencode/commands/`
81
98
  Ask Codex through phone-a-friend for a short sanity review of this repo; do not edit files.
82
99
  ```
83
100
 
101
+ **Codex plugin (skills + marketplace registration):**
102
+
103
+ If you use [Codex CLI](https://developers.openai.com/codex/quickstart/), install the Phone-a-Friend plugin two ways:
104
+
105
+ Via the Codex marketplace (visible in `/plugins` like Claude):
106
+
107
+ ```
108
+ codex plugin marketplace add freibergergarcia/phone-a-friend
109
+ codex plugin add phone-a-friend@phone-a-friend-marketplace
110
+ ```
111
+
112
+ Or via the PaF CLI (does both the marketplace registration AND drops skills into `~/.codex/`):
113
+
114
+ ```bash
115
+ phone-a-friend plugin install --codex
116
+ ```
117
+
118
+ This installs `phone-a-friend`, `curiosity-engine`, and `phone-a-team` skills into `$CODEX_HOME/skills/` (defaulting to `~/.codex/skills/`). All three are orchestrated through pure Bash from the skill bodies — no Codex subagent primitive is required.
119
+
120
+ > [!NOTE]
121
+ > Unlike Claude's marketplace, Codex marketplace install ships the skills directly — `codex plugin marketplace add` + `codex plugin add` is sufficient to use `/phone-a-friend`, `/curiosity-engine`, and `/phone-a-team` from inside Codex. For the full CLI (TUI, agentic mode, web dashboard), install via `npm install -g @freibergergarcia/phone-a-friend`. Running `phone-a-friend plugin install --codex` after the npm install additionally drops loose-file skills under `~/.codex/skills/` as a no-marketplace fallback.
122
+
123
+ From Codex, ask naturally:
124
+
125
+ ```
126
+ Ask Claude and Gemini through phone-a-friend what they think of this code.
127
+
128
+ Use phone-a-team across Claude and Gemini to converge on a fix for this auth bug. Three rounds max.
129
+ ```
130
+
84
131
  **From source:**
85
132
 
86
133
  ```bash
@@ -194,11 +241,12 @@ phone-a-friend setup # Guided setup wizard
194
241
  phone-a-friend doctor # Health check all backends + host install status
195
242
  phone-a-friend plugin install --claude # Install Claude Code plugin
196
243
  phone-a-friend plugin install --opencode # Install OpenCode commands and skills
244
+ phone-a-friend plugin install --codex # Install Codex skills
197
245
  phone-a-friend config show # Show resolved config
198
246
  phone-a-friend config edit # Open in $EDITOR
199
247
  ```
200
248
 
201
- `doctor` reports CLI backends, local backends (Ollama), host integration status (Claude / OpenCode plugin install state), and a summary count. The OpenCode CLI is treated as optional: if you only use Claude Code and don't have OpenCode installed, doctor will not flag that as a degraded state.
249
+ `doctor` reports CLI backends, local backends (Ollama), host integration status (Claude / OpenCode / Codex plugin install state), and a summary count. The OpenCode CLI is treated as optional: if you only use Claude Code and don't have OpenCode installed, doctor will not flag that as a degraded state.
202
250
 
203
251
  ### Update notifications
204
252
 
@@ -250,7 +298,8 @@ Ollama configuration via environment variables:
250
298
 
251
299
  Phone-a-friend environment variables:
252
300
  - `PHONE_A_FRIEND_INCLUDE_DIFF=false` -- disable diff inclusion globally (equivalent to `--no-include-diff` on every call).
253
- - `PHONE_A_FRIEND_HOST=opencode` -- mark the calling process as OpenCode for the recursion guard (set automatically by the OpenCode shims).
301
+ - `PHONE_A_FRIEND_HOST=opencode|codex` -- mark the calling process as a specific host for the recursion guard. `opencode` blocks `--to opencode`; `codex` blocks `--to codex`. Set automatically by the install shims.
302
+ - `CODEX_HOME` -- override the Codex config root (default: `~/.codex`). Honored by the Codex skill installer.
254
303
  - `PHONE_A_FRIEND_GEMINI_DEAD_CACHE=false` -- bypass the Gemini dead-model cache (debugging stale entries).
255
304
 
256
305
  OpenCode configuration via TOML:
@@ -279,7 +328,8 @@ Agentic mode spawns multiple Claude agents that communicate via `@mentions` with
279
328
 
280
329
  Each agent accumulates context through persistent CLI sessions — later responses build on earlier ones, so agents develop genuine understanding of the problem as the session progresses.
281
330
 
282
- **Currently supports Claude agents only.** See [AGENTS.md](AGENTS.md) for full architecture details.
331
+ > [!IMPORTANT]
332
+ > **Agentic mode currently supports Claude agents only.** Codex, Gemini, OpenCode, and Ollama agents are not yet wired into the orchestrator. If you need multi-host adversarial review today, use `/phone-a-team` instead — it does parallel multi-backend rounds with the same iterate-or-ship pattern, just without the persistent session graph and live web dashboard. See [AGENTS.md](AGENTS.md) for the agentic architecture.
283
333
 
284
334
  ```bash
285
335
  # Start an agentic session
@@ -319,7 +369,10 @@ Full usage guide, examples, CLI reference, and configuration details:
319
369
  npm uninstall -g @freibergergarcia/phone-a-friend
320
370
  ```
321
371
 
322
- Automatically removes the Claude Code plugin (CLI-installed), OpenCode commands and skills, and the `~/.config/phone-a-friend` directory (config, sessions, jobs).
372
+ Automatically removes the Claude Code plugin (CLI-installed), OpenCode commands and skills, Codex skills, and the `~/.config/phone-a-friend` directory (config, sessions, jobs).
373
+
374
+ > [!WARNING]
375
+ > `npm uninstall -g` deletes `~/.config/phone-a-friend` entirely, including persisted session labels, the background job store, and agentic transcripts. Back up anything you want to keep before uninstalling. The agentic SQLite database at `~/.config/phone-a-friend/agentic.db` and any local config in `~/.config/phone-a-friend/config.toml` are wiped along with it.
323
376
 
324
377
  **Claude Code marketplace:**
325
378
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: curiosity-engine
3
- description: Structured Q&A rally between the host orchestrating model and a backend model. Both sides must always reply with ANSWER: and QUESTION:. Seeded by topic, runs for N rounds.
4
- argument-hint: --topic "<topic>" [--rounds N] [--backend codex|gemini|ollama]
3
+ description: "Structured Q&A rally between the host orchestrating model and a backend model. Both sides must always reply with ANSWER and QUESTION prefixes. Seeded by topic, runs for N rounds."
4
+ argument-hint: '--topic "<topic>" [--rounds N] [--backend codex|gemini|ollama]'
5
5
  ---
6
6
 
7
7
  # /curiosity-engine
@@ -318,10 +318,23 @@ command:
318
318
  collisions across runs and repos. One session ID per session-capable
319
319
  backend. Used in relay calls so the backend remembers previous rounds.
320
320
 
321
- **Generate session IDs only for `codex` and `ollama`.** Do NOT generate
322
- one for `gemini` the Gemini backend declares `resumeStrategy:
323
- unsupported`, and PaF will reject `--session` for Gemini with a
324
- RelayError. For `--backend both`, generate a session ID for codex only.
321
+ **Generate session IDs for every backend that supports session resume.**
322
+ PaF declares a resume strategy per backend (`native-session` for
323
+ codex, claude, opencode; `transcript-replay` for ollama; `unsupported`
324
+ for gemini). Generate a session ID for any backend whose strategy is
325
+ NOT `unsupported`:
326
+
327
+ | Backend | resumeStrategy | Generate SESSION_ID? |
328
+ |---|---|---|
329
+ | codex | native-session | yes |
330
+ | claude | native-session | yes |
331
+ | opencode | native-session | yes |
332
+ | ollama | transcript-replay | yes |
333
+ | gemini | unsupported | NO, omit `--session` entirely |
334
+
335
+ For `--backend both` (codex + gemini), generate a SESSION_ID for codex
336
+ only. For `--backend all`, generate SESSION_IDs for codex, claude,
337
+ opencode, ollama (every backend that runs), but never gemini.
325
338
 
326
339
  ### Algorithm
327
340
 
@@ -390,9 +403,10 @@ command:
390
403
  Swap `$PAF_NO_DIFF` for `--include-diff` only when the user explicitly
391
404
  asked for a diff/branch/staged review.
392
405
 
393
- Include `--session <SESSION_ID>` ONLY when <backend> is `codex` or
394
- `ollama`. For `gemini`, omit `--session` entirely (PaF rejects it for
395
- Gemini with a RelayError).
406
+ Include `--session <SESSION_ID>` for every session-capable backend
407
+ (`codex`, `claude`, `opencode`, `ollama`). Omit `--session` only for
408
+ `gemini` because PaF rejects it (Gemini's resume strategy is
409
+ `unsupported`).
396
410
 
397
411
  On the FIRST relay under a new session label, PaF prints an
398
412
  informational stderr line: `[phone-a-friend] Session label "..." not
@@ -590,10 +604,11 @@ PAF_TEAM_CONTEXT_EOF
590
604
  only when the user explicitly asked for a diff/branch/staged review.
591
605
 
592
606
  Always include `--fast` (relay prompts are self-contained). For
593
- `--to claude`, `--fast` has no effect. Include `--session` ONLY when
594
- `<backend>` is `codex` or `ollama` — pass the backend-specific ID from
595
- `SESSION_IDS`. For `gemini`, omit `--session` entirely; PaF rejects
596
- `--session` against Gemini (resume strategy declared `unsupported`).
607
+ `--to claude`, `--fast` has no effect. Include `--session` for every
608
+ session-capable backend: `codex`, `claude`, `opencode`, `ollama`. Pass
609
+ the backend-specific ID from `SESSION_IDS`. For `gemini`, omit
610
+ `--session` entirely; PaF rejects `--session` against Gemini (resume
611
+ strategy declared `unsupported`).
597
612
 
598
613
  When `--session` is used, the session lets the backend remember
599
614
  previous rounds, so follow-up prompts can focus on feedback deltas
@@ -747,8 +762,9 @@ codebase. Read at most 2-3 files for preflight context. The backend has
747
762
  not to become an expert on the codebase before delegating.
748
763
 
749
764
  **Per-round relay rules (binary mode with `--session`)**:
750
- When `--session` is active, session-capable backends (Codex) remember
751
- previous rounds natively. Each relay call only needs to send:
765
+ When `--session` is active, session-capable backends (Codex, Claude,
766
+ OpenCode) remember previous rounds natively. Each relay call only needs
767
+ to send:
752
768
  - The specific feedback or revision request for this round
753
769
  - Any new context (e.g., updated diff after changes)
754
770
  Do NOT re-send the full task description, prior outputs, or summaries.