agent-relay-codex 0.6.1 → 0.10.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/README.md +7 -171
- package/bin/agent-relay-codex.ts +31 -1130
- package/package.json +6 -4
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/app-client.ts +0 -239
- package/approval.ts +0 -29
- package/hooks/session-start-lib.ts +0 -25
- package/hooks/session-start.ts +0 -169
- package/install-codex.ps1 +0 -47
- package/install-codex.sh +0 -75
- package/live-sidecar.ts +0 -988
- package/plugin/skills/agent-relay/SKILL.md +0 -63
- package/plugin/skills/disconnect/SKILL.md +0 -16
- package/plugin/skills/label/SKILL.md +0 -23
- package/plugin/skills/message/SKILL.md +0 -24
- package/plugin/skills/pair/SKILL.md +0 -26
- package/plugin/skills/send-claimable/SKILL.md +0 -24
- package/plugin/skills/status/SKILL.md +0 -16
- package/plugin/skills/tags/SKILL.md +0 -25
- package/profile.ts +0 -96
- package/relay.ts +0 -188
- package/start-live.sh +0 -64
package/README.md
CHANGED
|
@@ -1,177 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Relay Codex Compatibility Package
|
|
2
2
|
|
|
3
|
-
Codex
|
|
3
|
+
Codex lifecycle is now owned by `agent-relay-runner`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
codex-relay --cwd /path/to/project
|
|
9
|
+
codex-relay --headless --cwd /path/to/project
|
|
10
|
+
agent-relay provider wrap codex
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```powershell
|
|
15
|
-
irm https://unpkg.com/agent-relay-codex@latest/install-codex.ps1 | iex
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
The installer adds a `codex-relay` launcher and asks whether plain `codex` should also route through Agent Relay.
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# start the relay server (separate terminal)
|
|
24
|
-
bunx agent-relay-server@latest
|
|
25
|
-
|
|
26
|
-
# start Codex with Agent Relay (after restarting your shell)
|
|
27
|
-
codex-relay
|
|
28
|
-
|
|
29
|
-
# start a relay-only Codex agent without opening a TUI
|
|
30
|
-
codex-relay --headless
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Without restarting your shell:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
bunx -p agent-relay-codex@latest codex-relay
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Configuration
|
|
40
|
-
|
|
41
|
-
| Env var | Default | Purpose |
|
|
42
|
-
|---------|---------|---------|
|
|
43
|
-
| `AGENT_RELAY_URL` | `http://localhost:4850` | Relay server URL |
|
|
44
|
-
| `AGENT_RELAY_TOKEN` | — | Auth token (for remote relays) |
|
|
45
|
-
| `AGENT_RELAY_CAPS` | `chat` | Comma-separated capabilities |
|
|
46
|
-
| `AGENT_RELAY_APPROVAL` | `open` | Approval mode: `open`, `guarded`, `read-only` |
|
|
47
|
-
|
|
48
|
-
These env vars are shared with the [Claude plugin](https://www.npmjs.com/package/agent-relay-plugin). Agent profiles are also shared:
|
|
49
|
-
|
|
50
|
-
| Env var | Default | Purpose |
|
|
51
|
-
|---------|---------|---------|
|
|
52
|
-
| `AGENT_RELAY_PROFILE` | — | Profile name from the profiles file |
|
|
53
|
-
| `AGENT_RELAY_PROFILES_FILE` | `~/.config/agent-relay/profiles.json` | JSON profile file |
|
|
54
|
-
| `AGENT_RELAY_TAGS` | — | Extra comma-separated tags |
|
|
55
|
-
| `AGENT_RELAY_LABEL` | — | Human-friendly label |
|
|
56
|
-
| `AGENT_RELAY_CHANNELS` | all | Comma-separated channel subscriptions |
|
|
57
|
-
|
|
58
|
-
Example profile:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"frontend-developer": {
|
|
63
|
-
"label": "frontend dev",
|
|
64
|
-
"tags": ["frontend", "ui"],
|
|
65
|
-
"capabilities": ["chat", "review", "frontend"],
|
|
66
|
-
"channels": ["frontend"],
|
|
67
|
-
"approval": "guarded"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Run with `AGENT_RELAY_PROFILE=frontend-developer agent-relay-codex start`.
|
|
73
|
-
|
|
74
|
-
### Codex-specific
|
|
75
|
-
|
|
76
|
-
| Env var | Default | Purpose |
|
|
77
|
-
|---------|---------|---------|
|
|
78
|
-
| `CODEX_MODEL` | — | Model override |
|
|
79
|
-
| `CODEX_THREAD_MODE` | `start` | Thread attach: `start`, `resume`, `auto` |
|
|
80
|
-
| `CODEX_THREAD_ID` | — | Pin to a specific thread |
|
|
81
|
-
| `CODEX_APP_SERVER_URL` | `ws://127.0.0.1:4501` | App-server WebSocket URL |
|
|
82
|
-
| `AGENT_RELAY_CODEX_HEADLESS` | — | Set to `1` to run without opening a TUI |
|
|
83
|
-
| `AGENT_RELAY_DISABLED` | — | Set to `1` to bypass Agent Relay hooks and launcher shims |
|
|
84
|
-
|
|
85
|
-
### Advanced tuning
|
|
86
|
-
|
|
87
|
-
| Env var | Default | Purpose |
|
|
88
|
-
|---------|---------|---------|
|
|
89
|
-
| `AGENT_RELAY_CODEX_RIG` | `codex-live` | Rig name on agent card |
|
|
90
|
-
| `AGENT_RELAY_CODEX_POLL_INTERVAL_MS` | `2000` | Inbox poll cadence |
|
|
91
|
-
| `AGENT_RELAY_CODEX_HEARTBEAT_INTERVAL_MS` | `30000` | Heartbeat cadence |
|
|
92
|
-
| `AGENT_RELAY_CODEX_COALESCE_WINDOW_MS` | `600` | Message batch window |
|
|
93
|
-
| `AGENT_RELAY_CODEX_RELAY_BACKOFF_INITIAL_MS` | `2000` | Relay API retry backoff |
|
|
94
|
-
| `AGENT_RELAY_CODEX_RELAY_BACKOFF_MAX_MS` | `60000` | Relay API retry backoff cap |
|
|
95
|
-
|
|
96
|
-
## Approval mode
|
|
97
|
-
|
|
98
|
-
`codex-relay` maps `AGENT_RELAY_APPROVAL` to Codex runtime flags:
|
|
99
|
-
|
|
100
|
-
| Mode | Codex flags |
|
|
101
|
-
|------|-------------|
|
|
102
|
-
| `open` | `--ask-for-approval never --sandbox danger-full-access` |
|
|
103
|
-
| `guarded` | `--ask-for-approval on-request --sandbox workspace-write` |
|
|
104
|
-
| `read-only` | `--ask-for-approval never --sandbox read-only` |
|
|
105
|
-
|
|
106
|
-
Pass explicit Codex flags to override:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
# trusted private rig: no sandbox
|
|
110
|
-
codex-relay -- --dangerously-bypass-approvals-and-sandbox
|
|
111
|
-
|
|
112
|
-
# full-auto mode
|
|
113
|
-
codex-relay -- --full-auto
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
If `AGENT_RELAY_APPROVAL` is set, explicit Codex permission flags must resolve
|
|
117
|
-
to the same effective mode.
|
|
118
|
-
|
|
119
|
-
The approval mode is registered on the agent card as `meta.approvalMode` (`open`, `guarded`, or `read-only`), visible in the dashboard.
|
|
120
|
-
|
|
121
|
-
## Uninstall
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
agent-relay-codex uninstall # remove hooks, plugins, shims
|
|
125
|
-
agent-relay-codex uninstall --purge # also remove runtime state and PATH entries
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## How it works
|
|
129
|
-
|
|
130
|
-
`codex-relay` launches `codex app-server`, then opens the TUI with `codex --remote <app-server-url>`. The normal SessionStart hook registers the visible TUI thread with Agent Relay, so Agent Relay messages and direct TUI messages share the same Codex context.
|
|
131
|
-
|
|
132
|
-
Use `codex-relay --headless` on servers where Agent Relay is the only interaction surface. It starts the same app-server and sidecar session but does not open a TUI; the launcher prints `codex resume --remote <app-server-url>` if you later want to attach one.
|
|
133
|
-
|
|
134
|
-
The installed SessionStart hook remains for plain `codex` launches. In that mode, the hook registers the visible Codex session with Agent Relay without requiring the managed `codex-relay` launcher.
|
|
135
|
-
|
|
136
|
-
The live sidecar:
|
|
137
|
-
|
|
138
|
-
- Registers the session as an Agent Relay agent
|
|
139
|
-
- Polls the relay inbox and delivers messages into the active Codex thread
|
|
140
|
-
- Coalesces rapid message bursts into a single turn
|
|
141
|
-
- Claims claimable tasks before delivery
|
|
142
|
-
- Reconnects with exponential backoff after disconnects
|
|
143
|
-
- Marks the agent offline on exit
|
|
144
|
-
|
|
145
|
-
Message delivery adapts to thread state: `turn/start` when idle, `turn/steer` when active, `turn/interrupt` for urgent messages.
|
|
146
|
-
|
|
147
|
-
## Command Skills
|
|
148
|
-
|
|
149
|
-
The Codex plugin ships command skills for Agent Relay slash commands:
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
/pair codex "Debug flaky tests"
|
|
153
|
-
/message codex "Can you look at that failing action?"
|
|
154
|
-
/send-claimable tag:backend "Please claim and fix the failing API test"
|
|
155
|
-
/disconnect
|
|
156
|
-
/status
|
|
157
|
-
/label backend-fixer
|
|
158
|
-
/tags backend tests urgent
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
If another installed skill uses the same name, invoke the prefixed form such as
|
|
162
|
-
`/agent-relay:pair`, `/agent-relay:message`,
|
|
163
|
-
`/agent-relay:send-claimable`, `/agent-relay:disconnect`,
|
|
164
|
-
`/agent-relay:status`, `/agent-relay:label`, or `/agent-relay:tags`.
|
|
165
|
-
|
|
166
|
-
## Development
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
# run sidecar directly
|
|
170
|
-
bash codex/start-live.sh
|
|
171
|
-
|
|
172
|
-
# run tests
|
|
173
|
-
bun test codex/
|
|
174
|
-
|
|
175
|
-
# doctor check
|
|
176
|
-
bun run codex/bin/agent-relay-codex.ts doctor
|
|
177
|
-
```
|
|
13
|
+
The old standalone live sidecar, SessionStart hook, and Codex plugin marketplace install path have been removed.
|