oh-my-codex 0.7.2 → 0.7.3
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 +10 -2
- package/dist/cli/__tests__/session-scoped-runtime.test.js +1 -9
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.d.ts +2 -0
- package/dist/cli/__tests__/uninstall.test.d.ts.map +1 -0
- package/dist/cli/__tests__/uninstall.test.js +454 -0
- package/dist/cli/__tests__/uninstall.test.js.map +1 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +18 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/uninstall.d.ts +13 -0
- package/dist/cli/uninstall.d.ts.map +1 -0
- package/dist/cli/uninstall.js +317 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/config/__tests__/generator-idempotent.test.d.ts +2 -0
- package/dist/config/__tests__/generator-idempotent.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-idempotent.test.js +271 -0
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -0
- package/dist/config/generator.d.ts +14 -0
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +107 -2
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +54 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +78 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +46 -4
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/task-size-detector.test.js +1 -7
- package/dist/hooks/__tests__/task-size-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/tmux-hook-engine.test.js +11 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -1
- package/dist/hooks/keyword-detector.js +1 -1
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +0 -3
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hooks/task-size-detector.d.ts.map +1 -1
- package/dist/hooks/task-size-detector.js +0 -2
- package/dist/hooks/task-size-detector.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +0 -2
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/render.test.js +5 -41
- package/dist/hud/__tests__/render.test.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +0 -15
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts +1 -3
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +2 -12
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +0 -11
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js.map +1 -1
- package/dist/mcp/__tests__/state-server-schema.test.js +8 -14
- package/dist/mcp/__tests__/state-server-schema.test.js.map +1 -1
- package/dist/mcp/state-server.js +2 -2
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/modes/base.d.ts +9 -2
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +17 -2
- package/dist/modes/base.js.map +1 -1
- package/dist/notifications/__tests__/template-engine.test.js +11 -0
- package/dist/notifications/__tests__/template-engine.test.js.map +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/template-engine.d.ts.map +1 -1
- package/dist/notifications/template-engine.js +3 -0
- package/dist/notifications/template-engine.js.map +1 -1
- package/dist/openclaw/__tests__/dispatcher.test.js +22 -0
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
- package/dist/openclaw/__tests__/index.test.js +127 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -1
- package/dist/openclaw/dispatcher.d.ts +3 -0
- package/dist/openclaw/dispatcher.d.ts.map +1 -1
- package/dist/openclaw/dispatcher.js +3 -0
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/openclaw/index.d.ts.map +1 -1
- package/dist/openclaw/index.js +36 -13
- package/dist/openclaw/index.js.map +1 -1
- package/dist/openclaw/types.d.ts +12 -0
- package/dist/openclaw/types.d.ts.map +1 -1
- package/dist/pipeline/__tests__/orchestrator.test.d.ts +2 -0
- package/dist/pipeline/__tests__/orchestrator.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/orchestrator.test.js +421 -0
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -0
- package/dist/pipeline/__tests__/stages.test.d.ts +2 -0
- package/dist/pipeline/__tests__/stages.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/stages.test.js +199 -0
- package/dist/pipeline/__tests__/stages.test.js.map +1 -0
- package/dist/pipeline/index.d.ts +16 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +13 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/orchestrator.d.ts +50 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +245 -0
- package/dist/pipeline/orchestrator.js.map +1 -0
- package/dist/pipeline/stages/ralph-verify.d.ts +40 -0
- package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -0
- package/dist/pipeline/stages/ralph-verify.js +62 -0
- package/dist/pipeline/stages/ralph-verify.js.map +1 -0
- package/dist/pipeline/stages/ralplan.d.ts +20 -0
- package/dist/pipeline/stages/ralplan.d.ts.map +1 -0
- package/dist/pipeline/stages/ralplan.js +79 -0
- package/dist/pipeline/stages/ralplan.js.map +1 -0
- package/dist/pipeline/stages/team-exec.d.ts +43 -0
- package/dist/pipeline/stages/team-exec.d.ts.map +1 -0
- package/dist/pipeline/stages/team-exec.js +70 -0
- package/dist/pipeline/stages/team-exec.js.map +1 -0
- package/dist/pipeline/types.d.ts +115 -0
- package/dist/pipeline/types.d.ts.map +1 -0
- package/dist/pipeline/types.js +8 -0
- package/dist/pipeline/types.js.map +1 -0
- package/dist/team/__tests__/state.test.js +47 -1
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +102 -11
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +64 -25
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +9 -1
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state.d.ts +1 -0
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +30 -7
- package/dist/team/state.js.map +1 -1
- package/dist/team/team-ops.d.ts +1 -0
- package/dist/team/team-ops.d.ts.map +1 -1
- package/dist/team/team-ops.js +2 -0
- package/dist/team/team-ops.js.map +1 -1
- package/dist/team/tmux-session.d.ts +7 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +93 -8
- package/dist/team/tmux-session.js.map +1 -1
- package/package.json +1 -1
- package/scripts/notify-hook/team-dispatch.js +83 -2
- package/scripts/notify-hook/team-worker.js +78 -6
- package/scripts/tmux-hook-engine.js +12 -7
- package/skills/autopilot/SKILL.md +21 -0
- package/skills/pipeline/SKILL.md +86 -0
- package/skills/team/SKILL.md +22 -1
- package/templates/catalog-manifest.json +1 -1
|
@@ -154,17 +154,22 @@ export function buildPaneInModeArgv(paneTarget) {
|
|
|
154
154
|
return ['display-message', '-p', '-t', paneTarget, '#{pane_in_mode}'];
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
export function
|
|
157
|
+
export function buildCapturePaneArgv(paneTarget, tailLines = 80) {
|
|
158
|
+
return ['capture-pane', '-t', paneTarget, '-p', '-S', `-${tailLines}`];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function buildSendKeysArgv({ paneTarget, prompt, dryRun, submitKeyPresses = 2 }) {
|
|
158
162
|
if (dryRun) return null;
|
|
163
|
+
const pressCountRaw = Number.isFinite(submitKeyPresses) ? Math.floor(submitKeyPresses) : 2;
|
|
164
|
+
const pressCount = Math.max(1, Math.min(4, pressCountRaw));
|
|
165
|
+
const submitArgv = Array.from({ length: pressCount }, () => ([
|
|
166
|
+
'send-keys', '-t', paneTarget, 'C-m',
|
|
167
|
+
]));
|
|
159
168
|
// Use a 2-step send for reliability:
|
|
160
169
|
// 1) literal prompt bytes, 2) explicit carriage return.
|
|
161
170
|
return {
|
|
162
171
|
typeArgv: ['send-keys', '-t', paneTarget, '-l', prompt],
|
|
163
|
-
// Codex
|
|
164
|
-
|
|
165
|
-
submitArgv: [
|
|
166
|
-
['send-keys', '-t', paneTarget, 'C-m'],
|
|
167
|
-
['send-keys', '-t', paneTarget, 'C-m'],
|
|
168
|
-
],
|
|
172
|
+
// Codex generally prefers two presses; Claude typically needs one.
|
|
173
|
+
submitArgv,
|
|
169
174
|
};
|
|
170
175
|
}
|
|
@@ -160,6 +160,27 @@ If autopilot was cancelled or failed, run `/autopilot` again to resume from wher
|
|
|
160
160
|
3. Specify constraints -- "using TypeScript", "with PostgreSQL"
|
|
161
161
|
4. Let it run -- avoid interrupting unless truly needed
|
|
162
162
|
|
|
163
|
+
## Pipeline Orchestrator (v0.8+)
|
|
164
|
+
|
|
165
|
+
Autopilot can be driven by the configurable pipeline orchestrator (`src/pipeline/`), which
|
|
166
|
+
sequences stages through a uniform `PipelineStage` interface:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
RALPLAN (consensus planning) -> team-exec (Codex CLI workers) -> ralph-verify (architect verification)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Pipeline configuration options:
|
|
173
|
+
|
|
174
|
+
```toml
|
|
175
|
+
[omc.autopilot.pipeline]
|
|
176
|
+
maxRalphIterations = 10 # Ralph verification iteration ceiling
|
|
177
|
+
workerCount = 2 # Number of Codex CLI team workers
|
|
178
|
+
agentType = "executor" # Agent type for team workers
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The pipeline persists state via `pipeline-state.json` and supports resume from the last
|
|
182
|
+
incomplete stage. See `src/pipeline/orchestrator.ts` for the full API.
|
|
183
|
+
|
|
163
184
|
## Troubleshooting
|
|
164
185
|
|
|
165
186
|
**Stuck in a phase?** Check TODO list for blocked tasks, run `state_read({mode: "autopilot"})`, or cancel and resume.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pipeline
|
|
3
|
+
description: Configurable pipeline orchestrator for sequencing stages
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pipeline Skill
|
|
7
|
+
|
|
8
|
+
`$pipeline` is the configurable pipeline orchestrator for OMX. It sequences stages
|
|
9
|
+
through a uniform `PipelineStage` interface, with state persistence and resume support.
|
|
10
|
+
|
|
11
|
+
## Default Autopilot Pipeline
|
|
12
|
+
|
|
13
|
+
The canonical OMX pipeline sequences:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
RALPLAN (consensus planning) -> team-exec (Codex CLI workers) -> ralph-verify (architect verification)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Pipeline parameters are configurable per run:
|
|
22
|
+
|
|
23
|
+
| Parameter | Default | Description |
|
|
24
|
+
|-----------|---------|-------------|
|
|
25
|
+
| `maxRalphIterations` | 10 | Ralph verification iteration ceiling |
|
|
26
|
+
| `workerCount` | 2 | Number of Codex CLI team workers |
|
|
27
|
+
| `agentType` | `executor` | Agent type for team workers |
|
|
28
|
+
|
|
29
|
+
## Stage Interface
|
|
30
|
+
|
|
31
|
+
Every stage implements the `PipelineStage` interface:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
interface PipelineStage {
|
|
35
|
+
readonly name: string;
|
|
36
|
+
run(ctx: StageContext): Promise<StageResult>;
|
|
37
|
+
canSkip?(ctx: StageContext): boolean;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Stages receive a `StageContext` with accumulated artifacts from prior stages and
|
|
42
|
+
return a `StageResult` with status, artifacts, and duration.
|
|
43
|
+
|
|
44
|
+
## Built-in Stages
|
|
45
|
+
|
|
46
|
+
- **ralplan**: Consensus planning (planner + architect + critic). Skips if a `prd-*.md` plan already exists.
|
|
47
|
+
- **team-exec**: Team execution via Codex CLI workers. Always the OMX execution backend.
|
|
48
|
+
- **ralph-verify**: Ralph verification loop with configurable iteration count.
|
|
49
|
+
|
|
50
|
+
## State Management
|
|
51
|
+
|
|
52
|
+
Pipeline state persists via the ModeState system at `.omx/state/pipeline-state.json`.
|
|
53
|
+
The HUD renders pipeline phase automatically. Resume is supported from the last incomplete stage.
|
|
54
|
+
|
|
55
|
+
- **On start**: `state_write({mode: "pipeline", active: true, current_phase: "stage:ralplan"})`
|
|
56
|
+
- **On stage transitions**: `state_write({mode: "pipeline", current_phase: "stage:<name>"})`
|
|
57
|
+
- **On completion**: `state_write({mode: "pipeline", active: false, current_phase: "complete"})`
|
|
58
|
+
|
|
59
|
+
## API
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import {
|
|
63
|
+
runPipeline,
|
|
64
|
+
createAutopilotPipelineConfig,
|
|
65
|
+
createRalplanStage,
|
|
66
|
+
createTeamExecStage,
|
|
67
|
+
createRalphVerifyStage,
|
|
68
|
+
} from './pipeline/index.js';
|
|
69
|
+
|
|
70
|
+
const config = createAutopilotPipelineConfig('build feature X', {
|
|
71
|
+
stages: [
|
|
72
|
+
createRalplanStage(),
|
|
73
|
+
createTeamExecStage({ workerCount: 3, agentType: 'executor' }),
|
|
74
|
+
createRalphVerifyStage({ maxIterations: 15 }),
|
|
75
|
+
],
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const result = await runPipeline(config);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Relationship to Other Modes
|
|
82
|
+
|
|
83
|
+
- **autopilot**: Autopilot can use pipeline as its execution engine (v0.8+)
|
|
84
|
+
- **team**: Pipeline delegates execution to team mode (Codex CLI workers)
|
|
85
|
+
- **ralph**: Pipeline delegates verification to ralph (configurable iterations)
|
|
86
|
+
- **ralplan**: Pipeline's first stage runs RALPLAN consensus planning
|
package/skills/team/SKILL.md
CHANGED
|
@@ -138,7 +138,7 @@ Normalization requirements:
|
|
|
138
138
|
Follow this exact lifecycle when running `$team`:
|
|
139
139
|
|
|
140
140
|
1. Start team and verify startup evidence (team line, tmux target, panes, ACK mailbox)
|
|
141
|
-
2. Monitor task and worker progress (`omx team status <team
|
|
141
|
+
2. Monitor task and worker progress with runtime/state tools first (`omx team status <team>`, `omx team resume <team>`, mailbox/state files)
|
|
142
142
|
3. Wait for terminal task state before shutdown:
|
|
143
143
|
- `pending=0`
|
|
144
144
|
- `in_progress=0`
|
|
@@ -147,6 +147,7 @@ Follow this exact lifecycle when running `$team`:
|
|
|
147
147
|
5. Verify shutdown evidence and state cleanup
|
|
148
148
|
|
|
149
149
|
Do not run `shutdown` while workers are actively writing updates unless user explicitly requested abort/cancel.
|
|
150
|
+
Do not treat ad-hoc pane typing as primary control flow when runtime/state evidence is available.
|
|
150
151
|
|
|
151
152
|
## Operational Commands
|
|
152
153
|
|
|
@@ -238,6 +239,26 @@ Useful runtime env vars:
|
|
|
238
239
|
|
|
239
240
|
## Failure Modes and Diagnosis
|
|
240
241
|
|
|
242
|
+
Operator note (important for Claude panes):
|
|
243
|
+
- Manual Enter injection (`tmux send-keys ... C-m`) can appear to "do nothing" when a worker is actively processing; Enter may be queued by the pane/task flow.
|
|
244
|
+
- This is not necessarily a runtime bug. Confirm worker/team state before diagnosing dispatch failure.
|
|
245
|
+
- Avoid repeated blind Enter spam; it can create noisy duplicate submits once the pane becomes idle.
|
|
246
|
+
|
|
247
|
+
### Safe Manual Intervention (last resort)
|
|
248
|
+
|
|
249
|
+
Use only after checking `omx team status <team>` and mailbox/state evidence:
|
|
250
|
+
|
|
251
|
+
1. Capture pane tail to confirm current worker state:
|
|
252
|
+
- `tmux capture-pane -t %<worker-pane> -p -S -120`
|
|
253
|
+
2. If the pane is stuck in an interactive state, safely return to idle prompt first:
|
|
254
|
+
- optional interrupt `C-c` or escape flow (CLI-specific) once, then re-check pane capture
|
|
255
|
+
3. Send one concise trigger (single line) and wait for evidence:
|
|
256
|
+
- `tmux send-keys -t %<worker-pane> "ack + continue current task; report status" C-m`
|
|
257
|
+
4. Re-check:
|
|
258
|
+
- pane output via `capture-pane`
|
|
259
|
+
- mailbox updates (`mailbox/leader-fixed.json` or worker mailbox)
|
|
260
|
+
- `omx team status <team>`
|
|
261
|
+
|
|
241
262
|
### `worker_notify_failed:<worker>`
|
|
242
263
|
|
|
243
264
|
Meaning:
|