oh-my-codex 0.2.2 → 0.3.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 +56 -23
- package/dist/cli/__tests__/doctor-team.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-team.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-team.test.js +151 -0
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -0
- package/dist/cli/__tests__/index.test.js +31 -1
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/session-scoped-runtime.test.js +2 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
- package/dist/cli/__tests__/setup-gh-star.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-gh-star.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-gh-star.test.js +59 -0
- package/dist/cli/__tests__/setup-gh-star.test.js.map +1 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +172 -1
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +140 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +34 -0
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts +6 -0
- package/dist/cli/team.d.ts.map +1 -0
- package/dist/cli/team.js +140 -0
- package/dist/cli/team.js.map +1 -0
- package/dist/cli/tmux-hook.d.ts +1 -0
- package/dist/cli/tmux-hook.d.ts.map +1 -1
- package/dist/cli/tmux-hook.js +131 -24
- package/dist/cli/tmux-hook.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +79 -12
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +12 -5
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.d.ts +2 -0
- package/dist/hooks/__tests__/keyword-detector.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.js +39 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +99 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.js +36 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -1
- package/dist/hooks/emulator.d.ts.map +1 -1
- package/dist/hooks/emulator.js +3 -0
- package/dist/hooks/emulator.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +2 -1
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/mcp/__tests__/state-server-team-tools.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.js +128 -0
- package/dist/mcp/__tests__/state-server-team-tools.test.js.map +1 -0
- package/dist/mcp/__tests__/state-server.test.d.ts +2 -0
- package/dist/mcp/__tests__/state-server.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/state-server.test.js +52 -0
- package/dist/mcp/__tests__/state-server.test.js.map +1 -0
- package/dist/mcp/state-server.d.ts +18 -1
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +752 -6
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/team/__tests__/mcp-comm.test.d.ts +2 -0
- package/dist/team/__tests__/mcp-comm.test.d.ts.map +1 -0
- package/dist/team/__tests__/mcp-comm.test.js +93 -0
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.d.ts +2 -0
- package/dist/team/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime.test.js +271 -0
- package/dist/team/__tests__/runtime.test.js.map +1 -0
- package/dist/team/__tests__/state.test.d.ts +2 -0
- package/dist/team/__tests__/state.test.d.ts.map +1 -0
- package/dist/team/__tests__/state.test.js +556 -0
- package/dist/team/__tests__/state.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-session.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +140 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.d.ts +2 -0
- package/dist/team/__tests__/worker-bootstrap.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.js +174 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -0
- package/dist/team/mcp-comm.d.ts +45 -0
- package/dist/team/mcp-comm.d.ts.map +1 -0
- package/dist/team/mcp-comm.js +26 -0
- package/dist/team/mcp-comm.js.map +1 -0
- package/dist/team/runtime.d.ts +72 -0
- package/dist/team/runtime.d.ts.map +1 -0
- package/dist/team/runtime.js +676 -0
- package/dist/team/runtime.js.map +1 -0
- package/dist/team/state.d.ts +217 -0
- package/dist/team/state.d.ts.map +1 -0
- package/dist/team/state.js +1114 -0
- package/dist/team/state.js.map +1 -0
- package/dist/team/team-ops.d.ts +48 -0
- package/dist/team/team-ops.d.ts.map +1 -0
- package/dist/team/team-ops.js +58 -0
- package/dist/team/team-ops.js.map +1 -0
- package/dist/team/tmux-session.d.ts +21 -0
- package/dist/team/tmux-session.d.ts.map +1 -0
- package/dist/team/tmux-session.js +425 -0
- package/dist/team/tmux-session.js.map +1 -0
- package/dist/team/worker-bootstrap.d.ts +39 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -0
- package/dist/team/worker-bootstrap.js +183 -0
- package/dist/team/worker-bootstrap.js.map +1 -0
- package/package.json +1 -1
- package/scripts/notify-hook.js +240 -78
- package/scripts/tmux-hook-engine.js +11 -2
- package/skills/cancel/SKILL.md +50 -55
- package/skills/hud/SKILL.md +5 -4
- package/skills/team/SKILL.md +171 -773
- package/skills/worker/SKILL.md +65 -0
- package/templates/AGENTS.md +2 -1
package/skills/cancel/SKILL.md
CHANGED
|
@@ -24,8 +24,8 @@ Automatically detects which mode is active and cancels it:
|
|
|
24
24
|
- **Swarm**: Stops coordinated agent swarm, releases claimed tasks
|
|
25
25
|
- **Ultrapilot**: Stops parallel autopilot workers
|
|
26
26
|
- **Pipeline**: Stops sequential agent pipeline
|
|
27
|
-
- **Team**: Sends
|
|
28
|
-
- **Team+Ralph (linked)**: Cancels team first (
|
|
27
|
+
- **Team**: Sends shutdown inbox to all workers, waits for exit, kills tmux session, clears linked ralph if present
|
|
28
|
+
- **Team+Ralph (linked)**: Cancels team first (tmux shutdown + state cleanup), then clears ralph state
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ Active modes are still cancelled in dependency order:
|
|
|
52
52
|
6. Swarm (standalone)
|
|
53
53
|
7. Ultrapilot (standalone)
|
|
54
54
|
8. Pipeline (standalone)
|
|
55
|
-
9. Team (
|
|
55
|
+
9. Team (tmux-based)
|
|
56
56
|
10. Plan Consensus (standalone)
|
|
57
57
|
|
|
58
58
|
## Force Clear All
|
|
@@ -71,7 +71,7 @@ Steps under the hood:
|
|
|
71
71
|
1. `state_list_active` enumerates `.omx/state/sessions/{sessionId}/…` to find every known session.
|
|
72
72
|
2. `state_clear` runs once per session to drop that session’s files.
|
|
73
73
|
3. A global `state_clear` without `session_id` removes legacy files under `.omx/state/*.json`, `.omx/state/swarm*.db`, and compatibility artifacts (see list).
|
|
74
|
-
4. Team artifacts (
|
|
74
|
+
4. Team artifacts (`.omx/state/team/*/`, tmux sessions matching `omx-team-*`) are best-effort cleared as part of the legacy fallback.
|
|
75
75
|
|
|
76
76
|
Every `state_clear` command honors the `session_id` argument, so even force mode still uses the session-aware paths first before deleting legacy files.
|
|
77
77
|
|
|
@@ -130,71 +130,69 @@ Use force mode to clear every session plus legacy artifacts via `state_clear`. D
|
|
|
130
130
|
|
|
131
131
|
### 3B. Smart Cancellation (default)
|
|
132
132
|
|
|
133
|
-
#### If Team Active (
|
|
133
|
+
#### If Team Active (tmux-based)
|
|
134
134
|
|
|
135
|
-
Teams are detected by checking for config files in
|
|
135
|
+
Teams are detected by checking for config files in `.omx/state/team/`:
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
138
|
# Check for active teams
|
|
139
|
-
|
|
139
|
+
ls .omx/state/team/*/config.json 2>/dev/null
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
**Two-pass cancellation protocol:**
|
|
143
143
|
|
|
144
144
|
**Pass 1: Graceful Shutdown**
|
|
145
145
|
```
|
|
146
|
-
For each team found in
|
|
147
|
-
1. Read config.json to get team_name and
|
|
148
|
-
2. For each
|
|
149
|
-
a.
|
|
150
|
-
b.
|
|
151
|
-
c.
|
|
152
|
-
d. If
|
|
153
|
-
3. Log: "Graceful pass: X/Y members responded"
|
|
146
|
+
For each team found in .omx/state/team/:
|
|
147
|
+
1. Read config.json to get team_name and workers list
|
|
148
|
+
2. For each worker:
|
|
149
|
+
a. Write shutdown inbox to .omx/state/team/{name}/workers/{worker}/inbox.md
|
|
150
|
+
b. Send short trigger via tmux send-keys
|
|
151
|
+
c. Wait up to 15 seconds for worker tmux pane to exit
|
|
152
|
+
d. If still alive: mark as unresponsive
|
|
154
153
|
```
|
|
155
154
|
|
|
156
|
-
**Pass 2:
|
|
155
|
+
**Pass 2: Force Kill**
|
|
157
156
|
```
|
|
158
157
|
After graceful pass:
|
|
159
|
-
1.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
c. If still stuck: attempt TeamDelete anyway
|
|
165
|
-
d. If TeamDelete fails: report manual cleanup path
|
|
158
|
+
1. For each remaining alive worker:
|
|
159
|
+
a. Send C-c via tmux send-keys
|
|
160
|
+
b. Wait 2 seconds
|
|
161
|
+
c. Kill the tmux window if still alive
|
|
162
|
+
2. Destroy the tmux session: tmux kill-session -t omx-team-{name}
|
|
166
163
|
```
|
|
167
164
|
|
|
168
|
-
**
|
|
165
|
+
**Cleanup:**
|
|
169
166
|
```
|
|
170
|
-
1.
|
|
171
|
-
2.
|
|
172
|
-
3.
|
|
167
|
+
1. Strip AGENTS.md team worker overlay (<!-- OMX:TEAM:WORKER:START/END -->)
|
|
168
|
+
2. Remove team state directory: rm -rf .omx/state/team/{name}/
|
|
169
|
+
3. Clear team mode state: state_clear(mode="team")
|
|
170
|
+
4. Check for linked ralph: state_read(mode="ralph") — if linked_team is true:
|
|
173
171
|
a. Clear ralph state: state_clear(mode="ralph")
|
|
174
172
|
b. Clear linked ultrawork if present: state_clear(mode="ultrawork")
|
|
175
|
-
|
|
173
|
+
5. Emit structured cancel report
|
|
176
174
|
```
|
|
177
175
|
|
|
178
176
|
**Structured Cancel Report:**
|
|
179
177
|
```
|
|
180
178
|
Team "{team_name}" cancelled:
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
Path: ~/.claude/teams/{name}/ and ~/.claude/tasks/{name}/
|
|
179
|
+
- Workers signaled: N
|
|
180
|
+
- Graceful exits: M
|
|
181
|
+
- Force killed: K
|
|
182
|
+
- tmux session destroyed: yes/no
|
|
183
|
+
- State cleaned up: yes/no
|
|
187
184
|
```
|
|
188
185
|
|
|
189
186
|
**Implementation note:** The cancel skill is executed by the LLM, not as a bash script. When you detect an active team:
|
|
190
|
-
1.
|
|
191
|
-
2.
|
|
192
|
-
3.
|
|
193
|
-
4.
|
|
194
|
-
5.
|
|
195
|
-
6.
|
|
196
|
-
7. Remove
|
|
197
|
-
8.
|
|
187
|
+
1. Check `.omx/state/team/*/config.json` for active teams
|
|
188
|
+
2. For each worker in config.workers, write shutdown inbox and send trigger
|
|
189
|
+
3. Wait briefly for workers to exit (15s timeout)
|
|
190
|
+
4. Force kill remaining workers via tmux
|
|
191
|
+
5. Destroy tmux session: `tmux kill-session -t omx-team-{name}`
|
|
192
|
+
6. Strip AGENTS.md overlay
|
|
193
|
+
7. Remove state: `rm -rf .omx/state/team/{name}/`
|
|
194
|
+
8. `state_clear(mode="team")`
|
|
195
|
+
9. Report structured summary to user
|
|
198
196
|
|
|
199
197
|
#### If Autopilot Active
|
|
200
198
|
|
|
@@ -322,7 +320,7 @@ The cancel skill runs as follows:
|
|
|
322
320
|
2. Use `state_list_active` to enumerate known session ids and `state_get_status` to learn the active mode (`autopilot`, `ralph`, `ultrawork`, etc.) for each session.
|
|
323
321
|
3. When operating in default mode, call `state_clear` with that session_id to remove only the session’s files, then run mode-specific cleanup (autopilot → ralph → …) based on the state tool signals.
|
|
324
322
|
4. In force mode, iterate every active session, call `state_clear` per session, then run a global `state_clear` without `session_id` to drop legacy files (`.omx/state/*.json`, compatibility artifacts) and report success. Swarm remains a shared SQLite/marker mode outside session scoping.
|
|
325
|
-
5. Team artifacts (
|
|
323
|
+
5. Team artifacts (`.omx/state/team/*/`, tmux sessions matching `omx-team-*`) remain best-effort cleanup items invoked during the legacy/global pass.
|
|
326
324
|
|
|
327
325
|
State tools always honor the `session_id` argument, so even force mode still clears the session-scoped paths before deleting compatibility-only legacy state.
|
|
328
326
|
|
|
@@ -364,24 +362,21 @@ Mode-specific subsections below describe what extra cleanup each handler perform
|
|
|
364
362
|
- **Safe**: Only clears linked Ultrawork, preserves standalone Ultrawork
|
|
365
363
|
- **Local-only**: Clears state files in `.omx/state/` directory
|
|
366
364
|
- **Resume-friendly**: Autopilot state is preserved for seamless resume
|
|
367
|
-
- **Team-aware**: Detects
|
|
365
|
+
- **Team-aware**: Detects tmux-based teams and performs graceful shutdown with force-kill fallback
|
|
368
366
|
|
|
369
|
-
##
|
|
367
|
+
## Tmux Team Cleanup
|
|
370
368
|
|
|
371
|
-
When cancelling
|
|
369
|
+
When cancelling team mode, the cancel skill should:
|
|
372
370
|
|
|
373
|
-
1. **
|
|
374
|
-
2. **
|
|
375
|
-
3. **
|
|
376
|
-
4. **Clean up heartbeat files**: Remove all heartbeat files for the team
|
|
377
|
-
5. **Clean up shadow registry**: Remove `.omx/state/team-mcp-workers.json`
|
|
371
|
+
1. **Kill all team tmux sessions**: `tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^omx-team-'` and kill each
|
|
372
|
+
2. **Remove team state directories**: `rm -rf .omx/state/team/*/`
|
|
373
|
+
3. **Strip AGENTS.md overlay**: Remove content between `<!-- OMX:TEAM:WORKER:START -->` and `<!-- OMX:TEAM:WORKER:END -->`
|
|
378
374
|
|
|
379
375
|
### Force Clear Addition
|
|
380
376
|
|
|
381
377
|
When `--force` is used, also clean up:
|
|
382
378
|
```bash
|
|
383
|
-
rm -rf .omx/state/team
|
|
384
|
-
|
|
385
|
-
#
|
|
386
|
-
tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^omc-team-' | while read s; do tmux kill-session -t "$s" 2>/dev/null; done
|
|
379
|
+
rm -rf .omx/state/team/ # All team state
|
|
380
|
+
# Kill all omx-team-* tmux sessions
|
|
381
|
+
tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^omx-team-' | while read s; do tmux kill-session -t "$s" 2>/dev/null; done
|
|
387
382
|
```
|
package/skills/hud/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: hud
|
|
3
|
-
description: Show or configure the OMX HUD (two-layer statusline)
|
|
4
|
-
role: display
|
|
5
|
-
scope: .omx/**
|
|
2
|
+
name: "hud"
|
|
3
|
+
description: "Show or configure the OMX HUD (two-layer statusline)"
|
|
4
|
+
role: "display"
|
|
5
|
+
scope: ".omx/**"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# HUD Skill
|
|
@@ -46,6 +46,7 @@ The OMX HUD uses a two-layer architecture:
|
|
|
46
46
|
`omx setup` automatically configures both layers:
|
|
47
47
|
- Adds `[tui] status_line` to `~/.codex/config.toml` (Layer 1)
|
|
48
48
|
- Writes `.omx/hud-config.json` with default preset (Layer 2)
|
|
49
|
+
- Default preset is `focused`; if HUD/statusline changes do not appear, restart Codex CLI once.
|
|
49
50
|
|
|
50
51
|
## Layer 1: Codex Built-in StatusLine
|
|
51
52
|
|