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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stages.test.js","sourceRoot":"","sources":["../../../src/pipeline/__tests__/stages.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,IAAI,OAAe,CAAC;AAEpB,SAAS,OAAO,CAAC,YAAmC,EAAE;IACpD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,EAAE;QACb,GAAG,EAAE,OAAO;QACZ,GAAG,SAAS;KACb,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,KAAK;IAClB,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC5D,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,KAAK,UAAU,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AU,CAAC,kBAA6C,CAAC;QAC/E,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;QACrC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,WAAW,GAAG,qBAAqB,CAAC;gBACxC,IAAI,EAAE,gBAAgB;gBACtB,aAAa,EAAE,EAAE;gBACjB,GAAG,EAAE,MAAM;gBACX,kBAAkB,EAAE,EAAE;aACvB,CAAC,CAAC;YAEH,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;YAC/C,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;YAC1C,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,WAAW,GAAG,qBAAqB,CAAC;gBACxC,IAAI,EAAE,QAAQ;gBACd,aAAa,EAAE,EAAE;gBACjB,GAAG,EAAE,MAAM;gBACX,kBAAkB,EAAE,EAAE;aACvB,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Pipeline orchestrator for oh-my-codex
3
+ *
4
+ * Configurable pipeline that sequences: RALPLAN -> teams (codex workers) -> ralph verification.
5
+ * Mirrors OMC #1130 pipeline design.
6
+ *
7
+ * @module pipeline
8
+ */
9
+ export type { PipelineConfig, PipelineModeStateExtension, PipelineResult, PipelineStage, StageContext, StageResult, } from './types.js';
10
+ export { cancelPipeline, canResumePipeline, createAutopilotPipelineConfig, readPipelineState, runPipeline, } from './orchestrator.js';
11
+ export { createRalplanStage } from './stages/ralplan.js';
12
+ export { createTeamExecStage, buildTeamInstruction } from './stages/team-exec.js';
13
+ export type { TeamExecStageOptions, TeamExecDescriptor } from './stages/team-exec.js';
14
+ export { createRalphVerifyStage, buildRalphInstruction } from './stages/ralph-verify.js';
15
+ export type { RalphVerifyStageOptions, RalphVerifyDescriptor } from './stages/ralph-verify.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EACV,cAAc,EACd,0BAA0B,EAC1B,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,6BAA6B,EAC7B,iBAAiB,EACjB,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClF,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzF,YAAY,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Pipeline orchestrator for oh-my-codex
3
+ *
4
+ * Configurable pipeline that sequences: RALPLAN -> teams (codex workers) -> ralph verification.
5
+ * Mirrors OMC #1130 pipeline design.
6
+ *
7
+ * @module pipeline
8
+ */
9
+ export { cancelPipeline, canResumePipeline, createAutopilotPipelineConfig, readPipelineState, runPipeline, } from './orchestrator.js';
10
+ export { createRalplanStage } from './stages/ralplan.js';
11
+ export { createTeamExecStage, buildTeamInstruction } from './stages/team-exec.js';
12
+ export { createRalphVerifyStage, buildRalphInstruction } from './stages/ralph-verify.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,6BAA6B,EAC7B,iBAAiB,EACjB,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Pipeline Orchestrator for oh-my-codex
3
+ *
4
+ * Sequences configurable stages (RALPLAN -> teams -> ralph verification)
5
+ * and persists state through the ModeState system.
6
+ *
7
+ * Mirrors OMC #1130 pipeline design with OMX-specific adaptations:
8
+ * - Execution backend is always teams (Codex CLI workers)
9
+ * - Ralph iteration count is configurable
10
+ * - Integrates with existing team mode infrastructure
11
+ */
12
+ import type { PipelineConfig, PipelineResult, PipelineModeStateExtension } from './types.js';
13
+ /**
14
+ * Run a configured pipeline to completion.
15
+ *
16
+ * Executes stages sequentially, passing accumulated artifacts between them.
17
+ * State is persisted after each stage transition via the ModeState system.
18
+ */
19
+ export declare function runPipeline(config: PipelineConfig): Promise<PipelineResult>;
20
+ /**
21
+ * Resume a pipeline from its last persisted state.
22
+ *
23
+ * Reads the pipeline ModeState and reconstructs a PipelineConfig starting
24
+ * from the stage that was interrupted.
25
+ */
26
+ export declare function canResumePipeline(cwd?: string): Promise<boolean>;
27
+ /**
28
+ * Read the current pipeline state extension fields.
29
+ */
30
+ export declare function readPipelineState(cwd?: string): Promise<PipelineModeStateExtension | null>;
31
+ /**
32
+ * Cancel a running pipeline.
33
+ */
34
+ export declare function cancelPipeline(cwd?: string): Promise<void>;
35
+ /**
36
+ * Create the default autopilot pipeline configuration.
37
+ *
38
+ * Sequences: RALPLAN -> team-exec -> ralph-verify
39
+ * This is the canonical OMX pipeline matching the OMC #1130 design.
40
+ */
41
+ export declare function createAutopilotPipelineConfig(task: string, options: {
42
+ cwd?: string;
43
+ sessionId?: string;
44
+ maxRalphIterations?: number;
45
+ workerCount?: number;
46
+ agentType?: string;
47
+ stages: PipelineConfig['stages'];
48
+ onStageTransition?: PipelineConfig['onStageTransition'];
49
+ }): PipelineConfig;
50
+ //# sourceMappingURL=orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/pipeline/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,0BAA0B,EAG3B,MAAM,YAAY,CAAC;AAQpB;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAkJjF;AAMD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAItE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAc5C;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;AA8CD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IACP,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,CAAC;CACzD,GACA,cAAc,CAYhB"}
@@ -0,0 +1,245 @@
1
+ /**
2
+ * Pipeline Orchestrator for oh-my-codex
3
+ *
4
+ * Sequences configurable stages (RALPLAN -> teams -> ralph verification)
5
+ * and persists state through the ModeState system.
6
+ *
7
+ * Mirrors OMC #1130 pipeline design with OMX-specific adaptations:
8
+ * - Execution backend is always teams (Codex CLI workers)
9
+ * - Ralph iteration count is configurable
10
+ * - Integrates with existing team mode infrastructure
11
+ */
12
+ import { startMode, readModeState, updateModeState, cancelMode } from '../modes/base.js';
13
+ const MODE_NAME = 'autopilot';
14
+ // ---------------------------------------------------------------------------
15
+ // Pipeline orchestrator
16
+ // ---------------------------------------------------------------------------
17
+ /**
18
+ * Run a configured pipeline to completion.
19
+ *
20
+ * Executes stages sequentially, passing accumulated artifacts between them.
21
+ * State is persisted after each stage transition via the ModeState system.
22
+ */
23
+ export async function runPipeline(config) {
24
+ validateConfig(config);
25
+ const cwd = config.cwd ?? process.cwd();
26
+ const maxRalphIterations = config.maxRalphIterations ?? 10;
27
+ const workerCount = config.workerCount ?? 2;
28
+ const agentType = config.agentType ?? 'executor';
29
+ const startTime = Date.now();
30
+ // Initialize pipeline mode state
31
+ const modeState = await startMode(MODE_NAME, config.task, config.stages.length, cwd);
32
+ const pipelineExtension = {
33
+ pipeline_name: config.name,
34
+ pipeline_stages: config.stages.map((s) => s.name),
35
+ pipeline_stage_index: 0,
36
+ pipeline_stage_results: {},
37
+ pipeline_max_ralph_iterations: maxRalphIterations,
38
+ pipeline_worker_count: workerCount,
39
+ pipeline_agent_type: agentType,
40
+ };
41
+ await updateModeState(MODE_NAME, {
42
+ ...modeState,
43
+ ...pipelineExtension,
44
+ current_phase: `stage:${config.stages[0].name}`,
45
+ }, cwd);
46
+ // Execute stages sequentially
47
+ const stageResults = {};
48
+ const artifacts = {};
49
+ let previousResult;
50
+ let lastStageName;
51
+ for (let i = 0; i < config.stages.length; i++) {
52
+ const stage = config.stages[i];
53
+ // Build stage context
54
+ const ctx = {
55
+ task: config.task,
56
+ artifacts: { ...artifacts },
57
+ previousStageResult: previousResult,
58
+ cwd,
59
+ sessionId: config.sessionId,
60
+ };
61
+ // Fire transition callback from last completed/skipped stage to this one
62
+ if (lastStageName && config.onStageTransition) {
63
+ config.onStageTransition(lastStageName, stage.name);
64
+ }
65
+ // Check if stage should be skipped
66
+ if (stage.canSkip?.(ctx)) {
67
+ const skippedResult = {
68
+ status: 'skipped',
69
+ artifacts: {},
70
+ duration_ms: 0,
71
+ };
72
+ stageResults[stage.name] = skippedResult;
73
+ await updateModeState(MODE_NAME, {
74
+ current_phase: `stage:${stage.name}:skipped`,
75
+ pipeline_stage_index: i,
76
+ pipeline_stage_results: { ...stageResults },
77
+ }, cwd);
78
+ lastStageName = stage.name;
79
+ previousResult = skippedResult;
80
+ continue;
81
+ }
82
+ // Update state to running
83
+ await updateModeState(MODE_NAME, {
84
+ current_phase: `stage:${stage.name}`,
85
+ pipeline_stage_index: i,
86
+ iteration: i + 1,
87
+ }, cwd);
88
+ // Execute the stage
89
+ let result;
90
+ try {
91
+ result = await stage.run(ctx);
92
+ }
93
+ catch (err) {
94
+ const errorMsg = err instanceof Error ? err.message : String(err);
95
+ result = {
96
+ status: 'failed',
97
+ artifacts: {},
98
+ duration_ms: Date.now() - startTime,
99
+ error: `Stage ${stage.name} threw: ${errorMsg}`,
100
+ };
101
+ }
102
+ stageResults[stage.name] = result;
103
+ // Merge artifacts
104
+ if (result.artifacts) {
105
+ Object.assign(artifacts, { [stage.name]: result.artifacts });
106
+ }
107
+ // Persist stage result
108
+ await updateModeState(MODE_NAME, {
109
+ current_phase: `stage:${stage.name}:${result.status}`,
110
+ pipeline_stage_index: i,
111
+ pipeline_stage_results: { ...stageResults },
112
+ }, cwd);
113
+ // Bail on failure
114
+ if (result.status === 'failed') {
115
+ const duration_ms = Date.now() - startTime;
116
+ await updateModeState(MODE_NAME, {
117
+ active: false,
118
+ current_phase: 'failed',
119
+ completed_at: new Date().toISOString(),
120
+ error: result.error,
121
+ }, cwd);
122
+ return {
123
+ status: 'failed',
124
+ stageResults,
125
+ duration_ms,
126
+ artifacts,
127
+ error: result.error,
128
+ failedStage: stage.name,
129
+ };
130
+ }
131
+ lastStageName = stage.name;
132
+ previousResult = result;
133
+ }
134
+ // All stages completed
135
+ const duration_ms = Date.now() - startTime;
136
+ await updateModeState(MODE_NAME, {
137
+ active: false,
138
+ current_phase: 'complete',
139
+ completed_at: new Date().toISOString(),
140
+ }, cwd);
141
+ return {
142
+ status: 'completed',
143
+ stageResults,
144
+ duration_ms,
145
+ artifacts,
146
+ };
147
+ }
148
+ // ---------------------------------------------------------------------------
149
+ // Resume support
150
+ // ---------------------------------------------------------------------------
151
+ /**
152
+ * Resume a pipeline from its last persisted state.
153
+ *
154
+ * Reads the pipeline ModeState and reconstructs a PipelineConfig starting
155
+ * from the stage that was interrupted.
156
+ */
157
+ export async function canResumePipeline(cwd) {
158
+ const state = await readModeState(MODE_NAME, cwd);
159
+ if (!state)
160
+ return false;
161
+ return state.active === true && state.current_phase !== 'complete' && state.current_phase !== 'failed';
162
+ }
163
+ /**
164
+ * Read the current pipeline state extension fields.
165
+ */
166
+ export async function readPipelineState(cwd) {
167
+ const state = await readModeState(MODE_NAME, cwd);
168
+ if (!state)
169
+ return null;
170
+ if (!state.pipeline_name)
171
+ return null;
172
+ return {
173
+ pipeline_name: state.pipeline_name,
174
+ pipeline_stages: state.pipeline_stages,
175
+ pipeline_stage_index: state.pipeline_stage_index,
176
+ pipeline_stage_results: state.pipeline_stage_results,
177
+ pipeline_max_ralph_iterations: state.pipeline_max_ralph_iterations,
178
+ pipeline_worker_count: state.pipeline_worker_count,
179
+ pipeline_agent_type: state.pipeline_agent_type,
180
+ };
181
+ }
182
+ /**
183
+ * Cancel a running pipeline.
184
+ */
185
+ export async function cancelPipeline(cwd) {
186
+ await cancelMode(MODE_NAME, cwd);
187
+ }
188
+ // ---------------------------------------------------------------------------
189
+ // Validation
190
+ // ---------------------------------------------------------------------------
191
+ function validateConfig(config) {
192
+ if (!config.name || config.name.trim() === '') {
193
+ throw new Error('Pipeline config requires a non-empty name');
194
+ }
195
+ if (!config.task || config.task.trim() === '') {
196
+ throw new Error('Pipeline config requires a non-empty task');
197
+ }
198
+ if (!config.stages || config.stages.length === 0) {
199
+ throw new Error('Pipeline config requires at least one stage');
200
+ }
201
+ // Ensure unique stage names
202
+ const names = new Set();
203
+ for (const stage of config.stages) {
204
+ if (!stage.name || stage.name.trim() === '') {
205
+ throw new Error('Every pipeline stage must have a non-empty name');
206
+ }
207
+ if (names.has(stage.name)) {
208
+ throw new Error(`Duplicate stage name: ${stage.name}`);
209
+ }
210
+ names.add(stage.name);
211
+ }
212
+ if (config.maxRalphIterations != null) {
213
+ if (!Number.isInteger(config.maxRalphIterations) || config.maxRalphIterations <= 0) {
214
+ throw new Error('maxRalphIterations must be a positive integer');
215
+ }
216
+ }
217
+ if (config.workerCount != null) {
218
+ if (!Number.isInteger(config.workerCount) || config.workerCount <= 0) {
219
+ throw new Error('workerCount must be a positive integer');
220
+ }
221
+ }
222
+ }
223
+ // ---------------------------------------------------------------------------
224
+ // Default autopilot pipeline factory
225
+ // ---------------------------------------------------------------------------
226
+ /**
227
+ * Create the default autopilot pipeline configuration.
228
+ *
229
+ * Sequences: RALPLAN -> team-exec -> ralph-verify
230
+ * This is the canonical OMX pipeline matching the OMC #1130 design.
231
+ */
232
+ export function createAutopilotPipelineConfig(task, options) {
233
+ return {
234
+ name: 'autopilot',
235
+ task,
236
+ stages: options.stages,
237
+ cwd: options.cwd,
238
+ sessionId: options.sessionId,
239
+ maxRalphIterations: options.maxRalphIterations ?? 10,
240
+ workerCount: options.workerCount ?? 2,
241
+ agentType: options.agentType ?? 'executor',
242
+ onStageTransition: options.onStageTransition,
243
+ };
244
+ }
245
+ //# sourceMappingURL=orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/pipeline/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AASzF,MAAM,SAAS,GAAG,WAAoB,CAAC;AAEvC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAsB;IACtD,cAAc,CAAC,MAAM,CAAC,CAAC;IAEvB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACxC,MAAM,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,IAAI,EAAE,CAAC;IAC3D,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,UAAU,CAAC;IACjD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,iCAAiC;IACjC,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAErF,MAAM,iBAAiB,GAA+B;QACpD,aAAa,EAAE,MAAM,CAAC,IAAI;QAC1B,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACjD,oBAAoB,EAAE,CAAC;QACvB,sBAAsB,EAAE,EAAE;QAC1B,6BAA6B,EAAE,kBAAkB;QACjD,qBAAqB,EAAE,WAAW;QAClC,mBAAmB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C5D,CAAC;IACH,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,qCAAqC;AACrC,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,IAAY,EACZ,OAQC;IAED,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,IAAI;QACJ,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,EAAE;QACpD,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,CAAC;QACrC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,UAAU;QAC1C,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;KAC7C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Ralph verification stage adapter for pipeline orchestrator.
3
+ *
4
+ * Wraps the ralph persistence loop into a PipelineStage for the
5
+ * verification phase. Uses configurable iteration count.
6
+ */
7
+ import type { PipelineStage } from '../types.js';
8
+ export interface RalphVerifyStageOptions {
9
+ /**
10
+ * Maximum number of ralph verification iterations.
11
+ * Defaults to 10.
12
+ */
13
+ maxIterations?: number;
14
+ }
15
+ /**
16
+ * Create a ralph-verify pipeline stage.
17
+ *
18
+ * This stage wraps the ralph persistence loop for the verification phase
19
+ * of the pipeline. It takes the execution results from team-exec and
20
+ * orchestrates architect-verified completion.
21
+ *
22
+ * The iteration count is configurable, addressing issue #396 requirement
23
+ * for configurable ralph iteration count.
24
+ */
25
+ export declare function createRalphVerifyStage(options?: RalphVerifyStageOptions): PipelineStage;
26
+ /**
27
+ * Descriptor for a ralph verification run, consumed by the ralph runtime.
28
+ */
29
+ export interface RalphVerifyDescriptor {
30
+ task: string;
31
+ maxIterations: number;
32
+ cwd: string;
33
+ sessionId?: string;
34
+ executionArtifacts: Record<string, unknown>;
35
+ }
36
+ /**
37
+ * Build the ralph CLI instruction from a descriptor.
38
+ */
39
+ export declare function buildRalphInstruction(descriptor: RalphVerifyDescriptor): string;
40
+ //# sourceMappingURL=ralph-verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ralph-verify.d.ts","sourceRoot":"","sources":["../../../src/pipeline/stages/ralph-verify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAA6B,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,uBAA4B,GAAG,aAAa,CA0C3F;AAMD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAE/E"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Ralph verification stage adapter for pipeline orchestrator.
3
+ *
4
+ * Wraps the ralph persistence loop into a PipelineStage for the
5
+ * verification phase. Uses configurable iteration count.
6
+ */
7
+ /**
8
+ * Create a ralph-verify pipeline stage.
9
+ *
10
+ * This stage wraps the ralph persistence loop for the verification phase
11
+ * of the pipeline. It takes the execution results from team-exec and
12
+ * orchestrates architect-verified completion.
13
+ *
14
+ * The iteration count is configurable, addressing issue #396 requirement
15
+ * for configurable ralph iteration count.
16
+ */
17
+ export function createRalphVerifyStage(options = {}) {
18
+ const maxIterations = options.maxIterations ?? 10;
19
+ return {
20
+ name: 'ralph-verify',
21
+ async run(ctx) {
22
+ const startTime = Date.now();
23
+ try {
24
+ // Extract execution context from previous stage
25
+ const teamArtifacts = ctx.artifacts['team-exec'];
26
+ // Build ralph verification descriptor
27
+ const verifyDescriptor = {
28
+ task: ctx.task,
29
+ maxIterations,
30
+ cwd: ctx.cwd,
31
+ sessionId: ctx.sessionId,
32
+ executionArtifacts: teamArtifacts ?? {},
33
+ };
34
+ return {
35
+ status: 'completed',
36
+ artifacts: {
37
+ verifyDescriptor,
38
+ maxIterations,
39
+ stage: 'ralph-verify',
40
+ instruction: buildRalphInstruction(verifyDescriptor),
41
+ },
42
+ duration_ms: Date.now() - startTime,
43
+ };
44
+ }
45
+ catch (err) {
46
+ return {
47
+ status: 'failed',
48
+ artifacts: {},
49
+ duration_ms: Date.now() - startTime,
50
+ error: `Ralph verification stage failed: ${err instanceof Error ? err.message : String(err)}`,
51
+ };
52
+ }
53
+ },
54
+ };
55
+ }
56
+ /**
57
+ * Build the ralph CLI instruction from a descriptor.
58
+ */
59
+ export function buildRalphInstruction(descriptor) {
60
+ return `ralph verify (max ${descriptor.maxIterations} iterations): ${descriptor.task.slice(0, 200)}`;
61
+ }
62
+ //# sourceMappingURL=ralph-verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ralph-verify.js","sourceRoot":"","sources":["../../../src/pipeline/stages/ralph-verify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAmC,EAAE;IAC1E,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;IAElD,OAAO;QACL,IAAI,EAAE,cAAc;QAEpB,KAAK,CAAC,GAAG,CAAC,GAAiB;YACzB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAE7B,IAAI,CAAC;gBACH,gDAAgD;gBAChD,MAAM,aAAa,GAAG,GAAG,CAAC,SAAS,CAAC,WAAW,CAAwC,CAAC;gBAExF,sCAAsC;gBACtC,MAAM,gBAAgB,GAA0B;oBAC9C,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,aAAa;oBACb,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,SAAS,EAAE,GAAG,CAAC,SAAS;oBACxB,kBAAkB,EAAE,aAAa,IAAI,EAAE;iBACxC,CAAC;gBAEF,OAAO;oBACL,MAAM,EAAE,WAAW;oBACnB,SAAS,EAAE;wBACT,gBAAgB;wBAChB,aAAa;wBACb,KAAK,EAAE,cAAc;wBACrB,WAAW,EAAE,qBAAqB,CAAC,gBAAgB,CAAC;qBACrD;oBACD,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;iBACpC,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO;oBACL,MAAM,EAAE,QAAQ;oBAChB,SAAS,EAAE,EAAE;oBACb,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;oBACnC,KAAK,EAAE,oCAAoC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;iBAC9F,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAiBD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAiC;IACrE,OAAO,qBAAqB,UAAU,CAAC,aAAa,iBAAiB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACvG,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * RALPLAN stage adapter for pipeline orchestrator.
3
+ *
4
+ * Wraps the consensus planning workflow (planner + architect + critic)
5
+ * into a PipelineStage. Produces a plan artifact at `.omx/plans/`.
6
+ */
7
+ import type { PipelineStage } from '../types.js';
8
+ /**
9
+ * Create a RALPLAN pipeline stage.
10
+ *
11
+ * The RALPLAN stage performs consensus planning by coordinating planner,
12
+ * architect, and critic agents. It outputs a plan file that downstream
13
+ * stages (team-exec) consume.
14
+ *
15
+ * This is a structural adapter — actual agent orchestration happens at
16
+ * the skill layer. The stage manages lifecycle, artifact discovery, and
17
+ * skip detection.
18
+ */
19
+ export declare function createRalplanStage(): PipelineStage;
20
+ //# sourceMappingURL=ralplan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ralplan.d.ts","sourceRoot":"","sources":["../../../src/pipeline/stages/ralplan.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,aAAa,EAA6B,MAAM,aAAa,CAAC;AAE5E;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,IAAI,aAAa,CA+ClD"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * RALPLAN stage adapter for pipeline orchestrator.
3
+ *
4
+ * Wraps the consensus planning workflow (planner + architect + critic)
5
+ * into a PipelineStage. Produces a plan artifact at `.omx/plans/`.
6
+ */
7
+ import { existsSync, readdirSync } from 'fs';
8
+ import { readdir } from 'fs/promises';
9
+ import { join } from 'path';
10
+ /**
11
+ * Create a RALPLAN pipeline stage.
12
+ *
13
+ * The RALPLAN stage performs consensus planning by coordinating planner,
14
+ * architect, and critic agents. It outputs a plan file that downstream
15
+ * stages (team-exec) consume.
16
+ *
17
+ * This is a structural adapter — actual agent orchestration happens at
18
+ * the skill layer. The stage manages lifecycle, artifact discovery, and
19
+ * skip detection.
20
+ */
21
+ export function createRalplanStage() {
22
+ return {
23
+ name: 'ralplan',
24
+ canSkip(ctx) {
25
+ // Skip if a plan artifact already exists
26
+ const plansDir = join(ctx.cwd, '.omx', 'plans');
27
+ if (!existsSync(plansDir))
28
+ return false;
29
+ try {
30
+ const files = readdirSync(plansDir);
31
+ return files.some((f) => f.startsWith('prd-') && f.endsWith('.md'));
32
+ }
33
+ catch {
34
+ return false;
35
+ }
36
+ },
37
+ async run(ctx) {
38
+ const startTime = Date.now();
39
+ const plansDir = join(ctx.cwd, '.omx', 'plans');
40
+ try {
41
+ // Discover any existing plan files
42
+ const existingPlans = await discoverPlanFiles(plansDir);
43
+ return {
44
+ status: 'completed',
45
+ artifacts: {
46
+ plansDir,
47
+ task: ctx.task,
48
+ existingPlans,
49
+ stage: 'ralplan',
50
+ instruction: `Run RALPLAN consensus planning for: ${ctx.task}`,
51
+ },
52
+ duration_ms: Date.now() - startTime,
53
+ };
54
+ }
55
+ catch (err) {
56
+ return {
57
+ status: 'failed',
58
+ artifacts: {},
59
+ duration_ms: Date.now() - startTime,
60
+ error: `RALPLAN stage failed: ${err instanceof Error ? err.message : String(err)}`,
61
+ };
62
+ }
63
+ },
64
+ };
65
+ }
66
+ async function discoverPlanFiles(plansDir) {
67
+ if (!existsSync(plansDir))
68
+ return [];
69
+ try {
70
+ const files = await readdir(plansDir);
71
+ return files
72
+ .filter((f) => f.endsWith('.md'))
73
+ .map((f) => join(plansDir, f));
74
+ }
75
+ catch {
76
+ return [];
77
+ }
78
+ }
79
+ //# sourceMappingURL=ralplan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ralplan.js","sourceRoot":"","sources":["../../../src/pipeline/stages/ralplan.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,IAAI,EAAE,SAAS;QAEf,OAAO,CAAC,GAAiB;YACvB,yCAAyC;YACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;YAChD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;gBAAE,OAAO,KAAK,CAAC;YACxC,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAa,CAAC;gBACh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C;IACrC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;aAChC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Team execution stage adapter for pipeline orchestrator.
3
+ *
4
+ * Wraps the existing team mode (tmux-based Codex CLI workers) into a
5
+ * PipelineStage. The execution backend is always teams — this is the
6
+ * canonical OMX execution surface.
7
+ */
8
+ import type { PipelineStage } from '../types.js';
9
+ export interface TeamExecStageOptions {
10
+ /** Number of Codex CLI workers to launch. Defaults to 2. */
11
+ workerCount?: number;
12
+ /** Agent type/role for workers. Defaults to 'executor'. */
13
+ agentType?: string;
14
+ /** Whether to use git worktrees for worker isolation. */
15
+ useWorktrees?: boolean;
16
+ /** Additional environment variables for worker launch. */
17
+ extraEnv?: Record<string, string>;
18
+ }
19
+ /**
20
+ * Create a team-exec pipeline stage.
21
+ *
22
+ * This stage delegates to the existing `omx team` infrastructure, which
23
+ * starts real Codex CLI workers in tmux panes. The stage collects the
24
+ * plan artifacts from the previous RALPLAN stage and passes them as
25
+ * the team task description.
26
+ */
27
+ export declare function createTeamExecStage(options?: TeamExecStageOptions): PipelineStage;
28
+ /**
29
+ * Descriptor for a team execution run, consumed by the team runtime.
30
+ */
31
+ export interface TeamExecDescriptor {
32
+ task: string;
33
+ workerCount: number;
34
+ agentType: string;
35
+ useWorktrees: boolean;
36
+ cwd: string;
37
+ extraEnv?: Record<string, string>;
38
+ }
39
+ /**
40
+ * Build the `omx team` CLI instruction from a descriptor.
41
+ */
42
+ export declare function buildTeamInstruction(descriptor: TeamExecDescriptor): string;
43
+ //# sourceMappingURL=team-exec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-exec.d.ts","sourceRoot":"","sources":["../../../src/pipeline/stages/team-exec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAA6B,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yDAAyD;IACzD,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB,GAAG,aAAa,CAgDrF;AAMD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAK3E"}