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.
Files changed (150) hide show
  1. package/README.md +10 -2
  2. package/dist/cli/__tests__/session-scoped-runtime.test.js +1 -9
  3. package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
  4. package/dist/cli/__tests__/uninstall.test.d.ts +2 -0
  5. package/dist/cli/__tests__/uninstall.test.d.ts.map +1 -0
  6. package/dist/cli/__tests__/uninstall.test.js +454 -0
  7. package/dist/cli/__tests__/uninstall.test.js.map +1 -0
  8. package/dist/cli/index.d.ts +1 -1
  9. package/dist/cli/index.d.ts.map +1 -1
  10. package/dist/cli/index.js +18 -6
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/cli/setup.d.ts +8 -0
  13. package/dist/cli/setup.d.ts.map +1 -1
  14. package/dist/cli/setup.js +1 -1
  15. package/dist/cli/setup.js.map +1 -1
  16. package/dist/cli/uninstall.d.ts +13 -0
  17. package/dist/cli/uninstall.d.ts.map +1 -0
  18. package/dist/cli/uninstall.js +317 -0
  19. package/dist/cli/uninstall.js.map +1 -0
  20. package/dist/config/__tests__/generator-idempotent.test.d.ts +2 -0
  21. package/dist/config/__tests__/generator-idempotent.test.d.ts.map +1 -0
  22. package/dist/config/__tests__/generator-idempotent.test.js +271 -0
  23. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -0
  24. package/dist/config/generator.d.ts +14 -0
  25. package/dist/config/generator.d.ts.map +1 -1
  26. package/dist/config/generator.js +107 -2
  27. package/dist/config/generator.js.map +1 -1
  28. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +54 -0
  29. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
  30. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +78 -0
  31. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
  32. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +46 -4
  33. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
  34. package/dist/hooks/__tests__/task-size-detector.test.js +1 -7
  35. package/dist/hooks/__tests__/task-size-detector.test.js.map +1 -1
  36. package/dist/hooks/__tests__/tmux-hook-engine.test.js +11 -0
  37. package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -1
  38. package/dist/hooks/keyword-detector.js +1 -1
  39. package/dist/hooks/keyword-detector.js.map +1 -1
  40. package/dist/hooks/keyword-registry.d.ts.map +1 -1
  41. package/dist/hooks/keyword-registry.js +0 -3
  42. package/dist/hooks/keyword-registry.js.map +1 -1
  43. package/dist/hooks/task-size-detector.d.ts.map +1 -1
  44. package/dist/hooks/task-size-detector.js +0 -2
  45. package/dist/hooks/task-size-detector.js.map +1 -1
  46. package/dist/hud/__tests__/index.test.js +0 -2
  47. package/dist/hud/__tests__/index.test.js.map +1 -1
  48. package/dist/hud/__tests__/render.test.js +5 -41
  49. package/dist/hud/__tests__/render.test.js.map +1 -1
  50. package/dist/hud/render.d.ts.map +1 -1
  51. package/dist/hud/render.js +0 -15
  52. package/dist/hud/render.js.map +1 -1
  53. package/dist/hud/state.d.ts +1 -3
  54. package/dist/hud/state.d.ts.map +1 -1
  55. package/dist/hud/state.js +2 -12
  56. package/dist/hud/state.js.map +1 -1
  57. package/dist/hud/types.d.ts +0 -11
  58. package/dist/hud/types.d.ts.map +1 -1
  59. package/dist/hud/types.js.map +1 -1
  60. package/dist/mcp/__tests__/state-server-schema.test.js +8 -14
  61. package/dist/mcp/__tests__/state-server-schema.test.js.map +1 -1
  62. package/dist/mcp/state-server.js +2 -2
  63. package/dist/mcp/state-server.js.map +1 -1
  64. package/dist/modes/base.d.ts +9 -2
  65. package/dist/modes/base.d.ts.map +1 -1
  66. package/dist/modes/base.js +17 -2
  67. package/dist/modes/base.js.map +1 -1
  68. package/dist/notifications/__tests__/template-engine.test.js +11 -0
  69. package/dist/notifications/__tests__/template-engine.test.js.map +1 -1
  70. package/dist/notifications/index.d.ts.map +1 -1
  71. package/dist/notifications/index.js +2 -0
  72. package/dist/notifications/index.js.map +1 -1
  73. package/dist/notifications/template-engine.d.ts.map +1 -1
  74. package/dist/notifications/template-engine.js +3 -0
  75. package/dist/notifications/template-engine.js.map +1 -1
  76. package/dist/openclaw/__tests__/dispatcher.test.js +22 -0
  77. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
  78. package/dist/openclaw/__tests__/index.test.js +127 -0
  79. package/dist/openclaw/__tests__/index.test.js.map +1 -1
  80. package/dist/openclaw/dispatcher.d.ts +3 -0
  81. package/dist/openclaw/dispatcher.d.ts.map +1 -1
  82. package/dist/openclaw/dispatcher.js +3 -0
  83. package/dist/openclaw/dispatcher.js.map +1 -1
  84. package/dist/openclaw/index.d.ts.map +1 -1
  85. package/dist/openclaw/index.js +36 -13
  86. package/dist/openclaw/index.js.map +1 -1
  87. package/dist/openclaw/types.d.ts +12 -0
  88. package/dist/openclaw/types.d.ts.map +1 -1
  89. package/dist/pipeline/__tests__/orchestrator.test.d.ts +2 -0
  90. package/dist/pipeline/__tests__/orchestrator.test.d.ts.map +1 -0
  91. package/dist/pipeline/__tests__/orchestrator.test.js +421 -0
  92. package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -0
  93. package/dist/pipeline/__tests__/stages.test.d.ts +2 -0
  94. package/dist/pipeline/__tests__/stages.test.d.ts.map +1 -0
  95. package/dist/pipeline/__tests__/stages.test.js +199 -0
  96. package/dist/pipeline/__tests__/stages.test.js.map +1 -0
  97. package/dist/pipeline/index.d.ts +16 -0
  98. package/dist/pipeline/index.d.ts.map +1 -0
  99. package/dist/pipeline/index.js +13 -0
  100. package/dist/pipeline/index.js.map +1 -0
  101. package/dist/pipeline/orchestrator.d.ts +50 -0
  102. package/dist/pipeline/orchestrator.d.ts.map +1 -0
  103. package/dist/pipeline/orchestrator.js +245 -0
  104. package/dist/pipeline/orchestrator.js.map +1 -0
  105. package/dist/pipeline/stages/ralph-verify.d.ts +40 -0
  106. package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -0
  107. package/dist/pipeline/stages/ralph-verify.js +62 -0
  108. package/dist/pipeline/stages/ralph-verify.js.map +1 -0
  109. package/dist/pipeline/stages/ralplan.d.ts +20 -0
  110. package/dist/pipeline/stages/ralplan.d.ts.map +1 -0
  111. package/dist/pipeline/stages/ralplan.js +79 -0
  112. package/dist/pipeline/stages/ralplan.js.map +1 -0
  113. package/dist/pipeline/stages/team-exec.d.ts +43 -0
  114. package/dist/pipeline/stages/team-exec.d.ts.map +1 -0
  115. package/dist/pipeline/stages/team-exec.js +70 -0
  116. package/dist/pipeline/stages/team-exec.js.map +1 -0
  117. package/dist/pipeline/types.d.ts +115 -0
  118. package/dist/pipeline/types.d.ts.map +1 -0
  119. package/dist/pipeline/types.js +8 -0
  120. package/dist/pipeline/types.js.map +1 -0
  121. package/dist/team/__tests__/state.test.js +47 -1
  122. package/dist/team/__tests__/state.test.js.map +1 -1
  123. package/dist/team/__tests__/tmux-session.test.js +102 -11
  124. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  125. package/dist/team/runtime.d.ts.map +1 -1
  126. package/dist/team/runtime.js +64 -25
  127. package/dist/team/runtime.js.map +1 -1
  128. package/dist/team/scaling.d.ts.map +1 -1
  129. package/dist/team/scaling.js +9 -1
  130. package/dist/team/scaling.js.map +1 -1
  131. package/dist/team/state.d.ts +1 -0
  132. package/dist/team/state.d.ts.map +1 -1
  133. package/dist/team/state.js +30 -7
  134. package/dist/team/state.js.map +1 -1
  135. package/dist/team/team-ops.d.ts +1 -0
  136. package/dist/team/team-ops.d.ts.map +1 -1
  137. package/dist/team/team-ops.js +2 -0
  138. package/dist/team/team-ops.js.map +1 -1
  139. package/dist/team/tmux-session.d.ts +7 -0
  140. package/dist/team/tmux-session.d.ts.map +1 -1
  141. package/dist/team/tmux-session.js +93 -8
  142. package/dist/team/tmux-session.js.map +1 -1
  143. package/package.json +1 -1
  144. package/scripts/notify-hook/team-dispatch.js +83 -2
  145. package/scripts/notify-hook/team-worker.js +78 -6
  146. package/scripts/tmux-hook-engine.js +12 -7
  147. package/skills/autopilot/SKILL.md +21 -0
  148. package/skills/pipeline/SKILL.md +86 -0
  149. package/skills/team/SKILL.md +22 -1
  150. 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 buildSendKeysArgv({ paneTarget, prompt, dryRun }) {
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 CLI uses raw input mode where 'Enter' key name is unreliable;
164
- // send 'C-m' (carriage return) twice for reliable prompt submission.
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
@@ -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:
@@ -33,7 +33,7 @@
33
33
  {
34
34
  "name": "ecomode",
35
35
  "category": "execution",
36
- "status": "merged",
36
+ "status": "deprecated",
37
37
  "canonical": "ultrawork",
38
38
  "core": false,
39
39
  "internalRequired": false