oh-my-opencode 5.0.0-beta.7 → 5.0.0-beta.9

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 (159) hide show
  1. package/.agents/command/publish.md +44 -16
  2. package/.agents/skills/publish/SKILL.md +44 -16
  3. package/.agents/skills/work-with-pr/SKILL.md +37 -23
  4. package/.opencode/command/publish.md +44 -16
  5. package/.opencode/skills/work-with-pr/SKILL.md +37 -23
  6. package/dist/agents/atlas/agent.d.ts +0 -1
  7. package/dist/agents/sisyphus/grok-4.d.ts +20 -0
  8. package/dist/agents/sisyphus/index.d.ts +2 -0
  9. package/dist/agents/sisyphus-agent-config.d.ts +6 -0
  10. package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
  11. package/dist/agents/types.d.ts +2 -2
  12. package/dist/cli/index.js +465 -352
  13. package/dist/cli/run/on-complete-hook.d.ts +2 -0
  14. package/dist/cli-node/index.js +465 -352
  15. package/dist/hooks/atlas/final-wave-approval-gate.test-support.d.ts +50 -0
  16. package/dist/hooks/atlas/system-reminder-templates.d.ts +0 -1
  17. package/dist/index.js +283 -38
  18. package/dist/shared/normalize-sdk-response.d.ts +1 -0
  19. package/dist/shared/shell-env.d.ts +1 -1
  20. package/dist/skills/frontend/SKILL.md +10 -7
  21. package/dist/skills/frontend/references/design/_INDEX.md +1 -0
  22. package/dist/skills/frontend/references/design/stylegallery.md +80 -0
  23. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  24. package/dist/skills/ultimate-browsing/engine/AGENTS.md +110 -0
  25. package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
  26. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  27. package/dist/skills/ulw-plan/SKILL.md +2 -2
  28. package/dist/skills/ulw-plan/references/full-workflow.md +27 -3
  29. package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
  30. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  31. package/dist/tui.js +77 -9
  32. package/package.json +20 -19
  33. package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
  34. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
  35. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  36. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  37. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  38. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +26 -4
  39. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +26 -4
  40. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  41. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  42. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  43. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  44. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  45. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  46. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  47. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +3 -17
  48. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  49. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  50. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  51. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  52. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +11 -16
  54. package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +16 -23
  55. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +9 -7
  56. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +0 -6
  57. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +6 -4
  58. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +12 -9
  59. package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +28 -37
  60. package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +37 -69
  61. package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +2 -3
  62. package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -15
  63. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  64. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  65. package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +0 -3
  66. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +2 -16
  67. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  68. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  69. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +3 -9
  70. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  71. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  72. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  73. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  74. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -2
  75. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +27 -3
  76. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
  77. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
  78. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +0 -136
  79. package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +0 -2
  80. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  81. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  82. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +5 -3
  83. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -1
  84. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +0 -1
  85. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
  86. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +0 -3
  87. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +2 -35
  88. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +4 -5
  89. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  93. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  94. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  95. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  96. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  97. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  98. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  99. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  100. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  101. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  102. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  103. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  104. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  105. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  106. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  107. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  108. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  109. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  110. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  111. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  112. package/packages/omo-codex/plugin/package-lock.json +20 -20
  113. package/packages/omo-codex/plugin/package.json +1 -1
  114. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
  115. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
  116. package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
  117. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  118. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +110 -0
  119. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
  120. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  121. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +5 -3
  122. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
  123. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -2
  124. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +27 -3
  125. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
  126. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
  127. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +19 -173
  128. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -24
  129. package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +175 -13
  130. package/packages/omo-codex/plugin/test/aggregate.test.mjs +78 -2
  131. package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +19 -33
  132. package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +21 -27
  133. package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +0 -36
  134. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +101 -0
  135. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -119
  136. package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +0 -40
  137. package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +6 -62
  138. package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +3 -36
  139. package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +0 -44
  140. package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +2 -6
  141. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +0 -3
  142. package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +0 -3
  143. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  144. package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +7 -2
  145. package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
  146. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
  147. package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
  148. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  149. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +110 -0
  150. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
  151. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  152. package/packages/shared-skills/skills/ulw-plan/SKILL.md +2 -2
  153. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +27 -3
  154. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
  155. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
  156. package/dist/tools/call-omo-agent/background-agent-executor.d.ts +0 -5
  157. package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +0 -92
  158. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +0 -314
  159. package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +0 -24
@@ -0,0 +1,50 @@
1
+ import { mock } from "bun:test";
2
+ import type { createAtlasHook } from "./index";
3
+ import type { createToolExecuteAfterHandler } from "./tool-execute-after";
4
+ import type { SessionState, ToolExecuteAfterOutput } from "./types";
5
+ type AtlasHookContext = Parameters<typeof createAtlasHook>[0];
6
+ type PromptMock = ReturnType<typeof mock>;
7
+ export type FinalWaveMockPluginInput = AtlasHookContext & {
8
+ _promptMock: PromptMock;
9
+ };
10
+ export type FinalWaveAfterHandlerHarness = {
11
+ sessionState: SessionState;
12
+ run: (toolOutput: ToolExecuteAfterOutput) => Promise<void>;
13
+ };
14
+ /**
15
+ * Builds a mock plugin input with a recording prompt mock. `resolveParentSessionID`
16
+ * maps a subagent task session id to the orchestrator session the task belongs to.
17
+ */
18
+ export declare function createFinalWaveMockPluginInput(options: {
19
+ directory: string;
20
+ resolveParentSessionID: (taskSessionID: string) => string;
21
+ }): FinalWaveMockPluginInput;
22
+ /**
23
+ * Registers per-test temp-directory lifecycle hooks (`.omo` scaffold + boulder state
24
+ * cleanup) and exposes the current directory. `resetAgentRegistration` also resets
25
+ * the shared claude-code session-state registry between tests.
26
+ */
27
+ export declare function registerFinalWaveTestEnvironment(options?: {
28
+ resetAgentRegistration?: boolean;
29
+ }): {
30
+ readonly directory: string;
31
+ };
32
+ /** Writes the plan markdown plus the boulder state pointing the session at it. */
33
+ export declare function writeFinalWavePlanState(options: {
34
+ directory: string;
35
+ sessionID: string;
36
+ planName: string;
37
+ planContent: string;
38
+ }): string;
39
+ /**
40
+ * Wraps `createToolExecuteAfterHandler` with a shared in-memory session-state map so
41
+ * tests can assert pause/count flags. The handler factory is passed in explicitly:
42
+ * suites that mock modules (`mock.module`) must hand over their post-mock import so
43
+ * the harness runs against the same module instance the suite asserts on.
44
+ */
45
+ export declare function createFinalWaveAfterHandlerHarness(options: {
46
+ ctx: AtlasHookContext;
47
+ sessionID: string;
48
+ createHandler: typeof createToolExecuteAfterHandler;
49
+ }): FinalWaveAfterHandlerHarness;
50
+ export {};
@@ -2,6 +2,5 @@ export declare const DIRECT_WORK_REMINDER: string;
2
2
  export declare const BOULDER_CONTINUATION_PROMPT: string;
3
3
  export declare const BOULDER_COMPLETE_PROMPT = "<system-reminder>\nBOULDER COMPLETE: plan \"{PLAN_NAME}\" is fully checked.\n\nTotal elapsed: {ELAPSED_HUMAN}\n\nPer-task breakdown:\n{TASK_BREAKDOWN}\n\nPer your <boulder_completion_response> instructions, print the final ORCHESTRATION COMPLETE summary in your next turn. This nudge fires at most once.\n</system-reminder>";
4
4
  export declare const VERIFICATION_REMINDER = "**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**\n\nSubagents say \"done\" when code has errors, tests pass trivially, logic is wrong,\nor they quietly added features nobody asked for. This happens EVERY TIME.\nAssume the work is broken until YOU prove otherwise.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (before running anything)**\n\nDo NOT run tests yet. Read the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed. Any file outside expected scope = scope creep.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file, critically ask:\n - Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)\n - Any stubs, TODOs, placeholders, hardcoded values? (`Grep` for TODO, FIXME, HACK, xxx)\n - Logic errors? Trace the happy path AND the error path in your head.\n - Anti-patterns? (`Grep` for `as any`, `@ts-ignore`, empty catch, console.log in changed files)\n - Scope creep? Did the subagent touch things or add features NOT in the task spec?\n4. Cross-check every claim:\n - Said \"Updated X\" - READ X. Actually updated, or just superficially touched?\n - Said \"Added tests\" - READ the tests. Do they test REAL behavior or just `expect(true).toBe(true)`?\n - Said \"Follows patterns\" - OPEN a reference file. Does it ACTUALLY match?\n\n**If you cannot explain what every changed line does, you have NOT reviewed it.**\n\n**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**\n\nNow that you understand the code, verify mechanically:\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors\n2. Run tests for changed modules FIRST, then full suite\n3. Build/typecheck - exit 0\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.\n\n**PHASE 3: HANDS-ON QA - ACTUALLY RUN IT (MANDATORY for user-facing changes)**\n\nTests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.\n\n**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**\n\n- **Frontend/UI**: `/playwright` skill - load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.\n- **TUI/CLI**: `interactive_bash` - run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.\n- **API/Backend**: `Bash` with curl - hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.\n- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.\n\nThis is NOT optional \"if applicable\". If the deliverable is user-facing and you did not run it, you are shipping untested work.\n\n**PHASE 4: GATE DECISION - Should you proceed to the next task?**\n\nAnswer honestly:\n1. Can I explain what EVERY changed line does? (If no - back to Phase 1)\n2. Did I SEE it work with my own eyes? (If user-facing and no - back to Phase 3)\n3. Am I confident nothing existing is broken? (If no - run broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO. Investigate until CERTAIN.\n\n- **All 3 YES** - Proceed: mark task complete, move to next.\n- **Any NO** - Reject: resume with `task_id`, fix the specific issue.\n- **Unsure** - Reject: \"unsure\" = \"no\". Investigate until you have a definitive answer.\n\n**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**";
5
- export declare const VERIFICATION_REMINDER_GEMINI = "**THE SUBAGENT HAS FINISHED. THEIR WORK IS EXTREMELY SUSPICIOUS.**\n\nThe subagent CLAIMS this task is done. Based on thousands of executions, subagent claims are FALSE more often than true.\nThey ROUTINELY:\n- Ship code with syntax errors they didn't bother to check\n- Create stub implementations with TODOs and call it \"done\"\n- Write tests that pass trivially (testing nothing meaningful)\n- Implement logic that does NOT match what was requested\n- Add features nobody asked for and call it \"improvement\"\n- Report \"all tests pass\" when they didn't run any tests\n\n**This is NOT a theoretical warning. This WILL happen on this task. Assume the work is BROKEN.**\n\n**YOU MUST VERIFY WITH ACTUAL TOOL CALLS. NOT REASONING. TOOL CALLS.**\nThinking \"it looks correct\" is NOT verification. Running `lsp_diagnostics` IS.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (DO NOT SKIP - DO NOT RUN TESTS YET)**\n\nRead the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file:\n - Does this code ACTUALLY do what the task required? RE-READ the task spec.\n - Any stubs, TODOs, placeholders? `Grep` for TODO, FIXME, HACK, xxx\n - Anti-patterns? `Grep` for `as any`, `@ts-ignore`, empty catch\n - Scope creep? Did the subagent add things NOT in the task spec?\n4. Cross-check EVERY claim against actual code.\n\n**If you cannot explain what every changed line does, GO BACK AND READ AGAIN.**\n\n**PHASE 2: RUN AUTOMATED CHECKS**\n\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors. ACTUALLY RUN THIS.\n2. Run tests for changed modules, then full suite. ACTUALLY RUN THESE.\n3. Build/typecheck - exit 0.\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. Fix the code.\n\n**PHASE 3: HANDS-ON QA (MANDATORY for user-facing changes)**\n\n- **Frontend/UI**: `/playwright`\n- **TUI/CLI**: `interactive_bash`\n- **API/Backend**: `Bash` with curl\n\n**If user-facing and you did not run it, you are shipping UNTESTED BROKEN work.**\n\n**PHASE 4: GATE DECISION**\n\n1. Can I explain what EVERY changed line does? (If no \u2192 Phase 1)\n2. Did I SEE it work via tool calls? (If user-facing and no \u2192 Phase 3)\n3. Am I confident nothing is broken? (If no \u2192 broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO.\n\n**DO NOT proceed to the next task until all 4 phases are complete.**";
6
5
  export declare const ORCHESTRATOR_DELEGATION_REQUIRED: string;
7
6
  export declare const SINGLE_TASK_DIRECTIVE: string;
package/dist/index.js CHANGED
@@ -5716,7 +5716,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
5716
5716
  residency_max_children: record8["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
5717
5717
  });
5718
5718
  }
5719
- var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskSettingsSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
5719
+ var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskDagSettingsSchema, OmoTaskSettingsSchema, OmoTaskDagSettingsLayerSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
5720
5720
  var init_task = __esm(() => {
5721
5721
  ResidencyMaxChildrenInputSchema = z9.union([z9.number().int().positive(), z9.literal("unlimited")]);
5722
5722
  OmoTaskWaitSchema = z9.object({
@@ -5732,6 +5732,16 @@ var init_task = __esm(() => {
5732
5732
  OmoTaskWarningsSchema = z9.object({
5733
5733
  unavailable_categories: z9.boolean().default(true)
5734
5734
  }).strict();
5735
+ OmoTaskDagSettingsSchema = z9.object({
5736
+ max_nodes_per_run: z9.number().int().positive().default(64),
5737
+ max_runs_per_session: z9.number().int().positive().default(16),
5738
+ subscriber_ring: z9.number().int().positive().default(1000),
5739
+ heartbeat_ms: z9.number().int().positive().default(15000),
5740
+ history_default_limit: z9.number().int().positive().default(256),
5741
+ history_max_limit: z9.number().int().positive().default(1000),
5742
+ retention_days: z9.number().int().positive().default(7),
5743
+ max_prompt_bytes: z9.number().int().positive().default(262144)
5744
+ }).strict();
5735
5745
  OmoTaskSettingsSchema = z9.object({
5736
5746
  default_execution_mode: z9.enum(["in-process", "process"]).default("in-process"),
5737
5747
  default_concurrency: z9.number().int().positive().default(5),
@@ -5749,7 +5759,18 @@ var init_task = __esm(() => {
5749
5759
  max_members: 8,
5750
5760
  max_parallel_members: 4,
5751
5761
  max_wall_clock_minutes: 120
5752
- })
5762
+ }),
5763
+ dag: OmoTaskDagSettingsSchema.optional()
5764
+ }).strict();
5765
+ OmoTaskDagSettingsLayerSchema = z9.object({
5766
+ max_nodes_per_run: z9.number().int().positive().optional(),
5767
+ max_runs_per_session: z9.number().int().positive().optional(),
5768
+ subscriber_ring: z9.number().int().positive().optional(),
5769
+ heartbeat_ms: z9.number().int().positive().optional(),
5770
+ history_default_limit: z9.number().int().positive().optional(),
5771
+ history_max_limit: z9.number().int().positive().optional(),
5772
+ retention_days: z9.number().int().positive().optional(),
5773
+ max_prompt_bytes: z9.number().int().positive().optional()
5753
5774
  }).strict();
5754
5775
  OmoTaskWaitLayerSchema = z9.object({
5755
5776
  min_ms: z9.number().int().positive().optional(),
@@ -5777,7 +5798,8 @@ var init_task = __esm(() => {
5777
5798
  resume_children: z9.boolean().optional(),
5778
5799
  warnings: OmoTaskWarningsLayerSchema.optional(),
5779
5800
  wait: OmoTaskWaitLayerSchema.optional(),
5780
- team: OmoTaskTeamSettingsLayerSchema.optional()
5801
+ team: OmoTaskTeamSettingsLayerSchema.optional(),
5802
+ dag: OmoTaskDagSettingsLayerSchema.optional()
5781
5803
  }).strict();
5782
5804
  });
5783
5805
 
@@ -24504,10 +24526,10 @@ var CATEGORY_MODEL_REQUIREMENTS = {
24504
24526
  quick: {
24505
24527
  fallbackChain: [
24506
24528
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed" },
24507
- { providers: ["quotio-openai"], model: "gpt-5.6-luna-fast", variant: "low" },
24529
+ { providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
24508
24530
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
24509
24531
  {
24510
- providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "opencode-go", "vercel"],
24532
+ providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "vercel"],
24511
24533
  model: "qwen3.6-flash",
24512
24534
  variant: "low"
24513
24535
  },
@@ -24523,6 +24545,11 @@ var CATEGORY_MODEL_REQUIREMENTS = {
24523
24545
  },
24524
24546
  "unspecified-low": {
24525
24547
  fallbackChain: [
24548
+ {
24549
+ providers: ["xai", "github-copilot", "opencode", "vercel"],
24550
+ model: "grok-4.6",
24551
+ variant: "xhigh"
24552
+ },
24526
24553
  {
24527
24554
  providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
24528
24555
  model: "gpt-5.6-terra",
@@ -24663,6 +24690,16 @@ function isGlmModel(model) {
24663
24690
  const modelName = extractModelName(model).toLowerCase();
24664
24691
  return modelName.includes("glm");
24665
24692
  }
24693
+ var GROK_45_RE = /grok-4-5(?![0-9])/;
24694
+ var GROK_46_RE = /grok-4-6(?![0-9])/;
24695
+ function isGrok45Model(model) {
24696
+ const modelName = extractModelName(model).toLowerCase().replaceAll(".", "-");
24697
+ return GROK_45_RE.test(modelName);
24698
+ }
24699
+ function isGrok46Model(model) {
24700
+ const modelName = extractModelName(model).toLowerCase().replaceAll(".", "-");
24701
+ return GROK_46_RE.test(modelName);
24702
+ }
24666
24703
  var GEMINI_PROVIDERS = ["google/", "google-vertex/"];
24667
24704
  function isGeminiModel(model) {
24668
24705
  if (GEMINI_PROVIDERS.some((prefix) => model.startsWith(prefix)))
@@ -28182,6 +28219,7 @@ init_logger2();
28182
28219
 
28183
28220
  // packages/omo-opencode/src/shared/normalize-sdk-response.ts
28184
28221
  function normalizeSDKResponse(response, fallback, options) {
28222
+ const fallbackIsArray = Array.isArray(fallback);
28185
28223
  if (response == null) {
28186
28224
  return fallback;
28187
28225
  }
@@ -28191,14 +28229,17 @@ function normalizeSDKResponse(response, fallback, options) {
28191
28229
  if (typeof response === "object" && "data" in response) {
28192
28230
  const data = response.data;
28193
28231
  if (data != null) {
28232
+ if (fallbackIsArray && !Array.isArray(data)) {
28233
+ return fallback;
28234
+ }
28194
28235
  return data;
28195
28236
  }
28196
- if (options?.preferResponseOnMissingData === true) {
28237
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
28197
28238
  return response;
28198
28239
  }
28199
28240
  return fallback;
28200
28241
  }
28201
- if (options?.preferResponseOnMissingData === true) {
28242
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
28202
28243
  return response;
28203
28244
  }
28204
28245
  return fallback;
@@ -28852,7 +28893,7 @@ This is NOT a default choice - it's for genuinely unclassifiable moderate-effort
28852
28893
  </Category_Context>
28853
28894
 
28854
28895
  <Caller_Warning>
28855
- THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
28896
+ THIS CATEGORY USES GROK 4.6 (xhigh).
28856
28897
 
28857
28898
  **PROVIDE CLEAR STRUCTURE:**
28858
28899
  1. MUST DO: Enumerate required actions explicitly
@@ -28882,7 +28923,7 @@ var OPENAI_CATEGORIES = [
28882
28923
  },
28883
28924
  {
28884
28925
  name: "unspecified-low",
28885
- config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
28926
+ config: { model: "xai/grok-4.6", variant: "xhigh" },
28886
28927
  description: "Tasks that don't fit other categories, low effort required",
28887
28928
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
28888
28929
  }
@@ -84199,6 +84240,47 @@ var model_capabilities_generated_default = {
84199
84240
  input: 272000,
84200
84241
  output: 128000
84201
84242
  }
84243
+ },
84244
+ "grok-4.6": {
84245
+ id: "grok-4.6",
84246
+ family: "grok",
84247
+ reasoning: true,
84248
+ temperature: true,
84249
+ toolCall: true,
84250
+ modalities: {
84251
+ input: [
84252
+ "text",
84253
+ "image"
84254
+ ],
84255
+ output: [
84256
+ "text"
84257
+ ]
84258
+ },
84259
+ limit: {
84260
+ context: 500000,
84261
+ output: 500000
84262
+ }
84263
+ },
84264
+ "xai/grok-4.6": {
84265
+ id: "xai/grok-4.6",
84266
+ family: "grok",
84267
+ reasoning: true,
84268
+ temperature: true,
84269
+ toolCall: true,
84270
+ modalities: {
84271
+ input: [
84272
+ "text",
84273
+ "image",
84274
+ "pdf"
84275
+ ],
84276
+ output: [
84277
+ "text"
84278
+ ]
84279
+ },
84280
+ limit: {
84281
+ context: 500000,
84282
+ output: 500000
84283
+ }
84202
84284
  }
84203
84285
  }
84204
84286
  };
@@ -84334,21 +84416,21 @@ function restoreMessageCursor(sessionID, cursor) {
84334
84416
  sessionCursors.set(sessionID, cloneCursorState(cursor));
84335
84417
  }
84336
84418
  // packages/omo-opencode/src/shared/shell-env.ts
84337
- function detectShellType() {
84338
- if (process.env.SHELL) {
84339
- const shell = process.env.SHELL;
84419
+ function detectShellType(platform = process.platform, env2 = process.env) {
84420
+ if (env2.SHELL) {
84421
+ const shell = env2.SHELL;
84340
84422
  if (shell.includes("csh") || shell.includes("tcsh")) {
84341
84423
  return "csh";
84342
84424
  }
84343
84425
  return "unix";
84344
84426
  }
84345
- if (process.platform === "win32" && (process.env.BASH_VERSION || process.env.MSYSTEM || process.env.WSL_DISTRO_NAME)) {
84427
+ if (platform === "win32" && (env2.BASH_VERSION || env2.MSYSTEM || env2.WSL_DISTRO_NAME)) {
84346
84428
  return "unix";
84347
84429
  }
84348
- if (process.env.PSModulePath) {
84430
+ if (env2.PSModulePath) {
84349
84431
  return "powershell";
84350
84432
  }
84351
- return process.platform === "win32" ? "cmd" : "unix";
84433
+ return platform === "win32" ? "cmd" : "unix";
84352
84434
  }
84353
84435
  function shellEscape(value, shellType) {
84354
84436
  if (value === "") {
@@ -98644,7 +98726,7 @@ function getCachedVersion(options = {}) {
98644
98726
  // package.json
98645
98727
  var package_default = {
98646
98728
  name: "oh-my-opencode",
98647
- version: "5.0.0-beta.7",
98729
+ version: "5.0.0-beta.9",
98648
98730
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
98649
98731
  main: "./dist/index.js",
98650
98732
  types: "dist/index.d.ts",
@@ -98780,6 +98862,7 @@ var package_default = {
98780
98862
  "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
98781
98863
  test: "bun test",
98782
98864
  "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && npm --prefix packages/omo-codex/plugin/components/ulw-loop test && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
98865
+ "test:fast": "bun run script/test-fast.ts",
98783
98866
  "test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test packages/omo-senpi",
98784
98867
  "test:windows-codex": "bun run test:codex",
98785
98868
  "build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
@@ -98824,7 +98907,7 @@ var package_default = {
98824
98907
  zod: "^4.4.3"
98825
98908
  },
98826
98909
  devDependencies: {
98827
- "@code-yeongyu/senpi": "2026.8.12-4",
98910
+ "@code-yeongyu/senpi": "2026.8.17",
98828
98911
  "@oh-my-opencode/agents-md-core": "workspace:*",
98829
98912
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
98830
98913
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -98856,7 +98939,7 @@ var package_default = {
98856
98939
  "@oh-my-opencode/utils": "workspace:*",
98857
98940
  "@types/js-yaml": "^4.0.9",
98858
98941
  "@types/picomatch": "^4.0.3",
98859
- "@typescript/native-preview": "7.0.0-dev.20260518.1",
98942
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
98860
98943
  "@xterm/addon-unicode11": "^0.9.0",
98861
98944
  "@xterm/xterm": "^6.0.0",
98862
98945
  "bun-types": "1.3.14",
@@ -98865,24 +98948,24 @@ var package_default = {
98865
98948
  typescript: "^7.0.2"
98866
98949
  },
98867
98950
  optionalDependencies: {
98868
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.7",
98869
- "oh-my-opencode-darwin-x64": "5.0.0-beta.7",
98870
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.7",
98871
- "oh-my-opencode-linux-arm64": "5.0.0-beta.7",
98872
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.7",
98873
- "oh-my-opencode-linux-x64": "5.0.0-beta.7",
98874
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.7",
98875
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.7",
98876
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.7",
98877
- "oh-my-opencode-windows-arm64": "5.0.0-beta.7",
98878
- "oh-my-opencode-windows-x64": "5.0.0-beta.7",
98879
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.7"
98951
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.9",
98952
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.9",
98953
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.9",
98954
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.9",
98955
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.9",
98956
+ "oh-my-opencode-linux-x64": "5.0.0-beta.9",
98957
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.9",
98958
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.9",
98959
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.9",
98960
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.9",
98961
+ "oh-my-opencode-windows-x64": "5.0.0-beta.9",
98962
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.9"
98880
98963
  },
98881
98964
  overrides: {
98882
- "@earendil-works/pi-agent-core": "0.80.3",
98883
- "@earendil-works/pi-ai": "0.80.3",
98884
- "@earendil-works/pi-coding-agent": "0.80.3",
98885
- "@earendil-works/pi-tui": "0.80.3",
98965
+ "@earendil-works/pi-agent-core": "0.84.2",
98966
+ "@earendil-works/pi-ai": "0.84.2",
98967
+ "@earendil-works/pi-coding-agent": "0.84.2",
98968
+ "@earendil-works/pi-tui": "0.84.2",
98886
98969
  hono: "^4.12.18",
98887
98970
  "@hono/node-server": "^1.19.13",
98888
98971
  "express-rate-limit": "^8.5.1",
@@ -116331,6 +116414,10 @@ async function handleAtlasSessionIdle(input) {
116331
116414
  return;
116332
116415
  }
116333
116416
  const { boulderState, progress, appendedSession } = activeBoulderSession;
116417
+ if (sessionState.waitingForFinalWaveApproval) {
116418
+ log2(`[${HOOK_NAME9}] Skipped: waiting for explicit final-wave approval`, { sessionID });
116419
+ return;
116420
+ }
116334
116421
  if (progress.isComplete) {
116335
116422
  await handleCompletedBoulderIdle({ ctx, options, sessionID, sessionState, boulderState });
116336
116423
  return;
@@ -116358,10 +116445,6 @@ async function handleAtlasSessionIdle(input) {
116358
116445
  const now = Date.now();
116359
116446
  const activePlanPath = resolveBoulderPlanPath(ctx.directory, boulderState);
116360
116447
  resetStallStateForPlanChange(sessionState, activePlanPath);
116361
- if (sessionState.waitingForFinalWaveApproval) {
116362
- log2(`[${HOOK_NAME9}] Skipped: waiting for explicit final-wave approval`, { sessionID });
116363
- return;
116364
- }
116365
116448
  if (sessionState.stalledContinuationReason) {
116366
116449
  log2(`[${HOOK_NAME9}] Skipped: boulder continuation stalled`, {
116367
116450
  sessionID,
@@ -152907,6 +152990,12 @@ function buildGptSisyphusAgentConfig(mode, model, prompt) {
152907
152990
  function buildGlmSisyphusAgentConfig(mode, model, prompt) {
152908
152991
  return buildBaseSisyphusAgentConfig(mode, model, prompt);
152909
152992
  }
152993
+ function buildGrokSisyphusAgentConfig(mode, model, prompt) {
152994
+ return {
152995
+ ...buildBaseSisyphusAgentConfig(mode, model, prompt),
152996
+ reasoningEffort: "high"
152997
+ };
152998
+ }
152910
152999
  function buildClaudeSisyphusAgentConfig(mode, model, prompt) {
152911
153000
  return {
152912
153001
  ...buildBaseSisyphusAgentConfig(mode, model, prompt),
@@ -156276,6 +156365,158 @@ function buildGpt55SisyphusPrompt(model, availableAgents, _availableTools = [],
156276
156365
  ${body}`;
156277
156366
  }
156278
156367
 
156368
+ // packages/omo-opencode/src/agents/sisyphus/grok-4.ts
156369
+ function getGrokPromptIdentity(model) {
156370
+ return isGrok46Model(model) ? "Grok 4.6" : "Grok 4.5";
156371
+ }
156372
+ function buildGrok4TasksSection(useTaskSystem) {
156373
+ const noun = useTaskSystem ? "tasks" : "todos";
156374
+ const create = useTaskSystem ? "task_create" : "todowrite";
156375
+ const update = useTaskSystem ? "task_update" : "todowrite";
156376
+ const hook = useTaskSystem ? "TASK CONTINUATION" : "TODO CONTINUATION";
156377
+ return `<tasks>
156378
+ Use ${noun} for implementation work with two or more real steps, cross-file edits, delegated work, or uncertain scope. Skip tracking for direct answers, pure exploration, and one-step edits.
156379
+
156380
+ When tracking: call \`${create}\` before implementation, keep exactly one item \`in_progress\`, and call \`${update}\` the moment an item is done. Never batch completions. If scope changes, revise the list before more edits.
156381
+
156382
+ Your ${noun} are tracked by the harness via [SYSTEM REMINDER - ${hook}].
156383
+ </tasks>`;
156384
+ }
156385
+ function buildGrok4SisyphusPrompt(model, availableAgents, availableTools = [], availableSkills = [], availableCategories = [], useTaskSystem = false) {
156386
+ const keyTriggers = buildKeyTriggersSection(availableAgents, availableSkills);
156387
+ const toolSelection = buildToolSelectionTable(availableAgents, availableTools, availableSkills);
156388
+ const exploreSection = buildExploreSection(availableAgents);
156389
+ const librarianSection = buildLibrarianSection(availableAgents);
156390
+ const categorySkillsGuide = buildCategorySkillsDelegationGuide(availableCategories, availableSkills);
156391
+ const delegationTable = buildDelegationTable(availableAgents);
156392
+ const oracleSection = buildOracleSection(availableAgents);
156393
+ const hardBlocks = buildHardBlocksSection();
156394
+ const antiPatterns = buildAntiPatternsSection();
156395
+ const nonClaudePlannerSection = buildNonClaudePlannerSection(model);
156396
+ const tasksSection = buildGrok4TasksSection(useTaskSystem);
156397
+ const agentIdentity = buildAgentIdentitySection("Sisyphus", "Powerful AI Agent with orchestration capabilities from OhMyOpenCode");
156398
+ const roleBlock = `<role>
156399
+ You are Sisyphus, the OhMyOpenCode orchestration lead, running on ${getGrokPromptIdentity(model)}.
156400
+
156401
+ You are a senior engineer who scales output through specialists. Understand the user's destination, route the work to the right specialist, verify with real evidence, and stop only when the result is production ready.
156402
+
156403
+ Implementation starts only when the current user turn explicitly asks for it with concrete scope. Questions get answers, investigations get findings, implementation requests get shipped work.
156404
+ </role>`;
156405
+ const calibrationBlock = `<grok_calibration>
156406
+ Your judgment is good; this prompt stays short on purpose and trusts you to fill gaps with taste. Four rules carry the leverage:
156407
+
156408
+ 1. DONE IS WRITTEN DOWN. Before implementation, state what done means in one line: observable acceptance criteria, not a vibe. You verify against exactly those criteria, and you neither stop short of them nor expand past them.
156409
+ 2. VERIFY, THEN ITERATE. Verify the function and the design after implementation, and keep iterating and verifying until it is production ready. One pass of "it runs" is not done.
156410
+ 3. CAPTURE, LIST, FIX. When output is hard to inspect (visual, layout, motion, formatted documents), capture the current state, list concretely what is wrong with it, then fix only those things. Never "improve" blind.
156411
+ 4. NO REPEATED BLOCKS. You tend to duplicate code across components. The second time a block appears, extract and share it instead of pasting a third copy.
156412
+ </grok_calibration>`;
156413
+ const intentBlock = `<intent>
156414
+ Classify the CURRENT user message only. Do not carry implementation authorization across turns.
156415
+
156416
+ ${keyTriggers}
156417
+
156418
+ Surface form to routing:
156419
+
156420
+ | User says | True intent | You do |
156421
+ |---|---|---|
156422
+ | "explain", "how does" | understanding | explore enough, then answer |
156423
+ | "implement", "add", "create", "write" | implementation | plan, delegate or execute, verify |
156424
+ | "look into", "check", "investigate" | investigation | inspect, report findings, wait |
156425
+ | "what do you think" | evaluation | judge, propose, wait |
156426
+ | "broken", "error", "fix" | root-cause repair | diagnose, fix minimally, verify |
156427
+ | "refactor", "improve", "clean up" | open-ended change | assess, propose or use the matching skill |
156428
+
156429
+ Say one concise intent line before non-trivial action: "I read this as [type]: [route]." If the answer is already in context, answer instead of re-deriving.
156430
+
156431
+ Ask only for scope changes, critical missing information, destructive actions, or external side effects. Minor decisions (names, defaults, equivalent approaches) are yours; note the choice later.
156432
+ </intent>`;
156433
+ const explorationBlock = `<exploration>
156434
+ Use tools for facts. Internal memory is not evidence for file contents, configs, APIs, or current project state.
156435
+
156436
+ ${toolSelection}
156437
+
156438
+ ${exploreSection}
156439
+
156440
+ ${librarianSection}
156441
+
156442
+ Parallelize independent calls: file reads, searches, diagnostics, and background agents go out together. Sequence only when a later call needs an earlier result.
156443
+
156444
+ Search budget: known file or symbol = direct read/search; unfamiliar local pattern = one parallel wave; external package or API = librarian; architectural risk = Oracle. Stop when sources converge, the target file set is known, or the answer is found.
156445
+
156446
+ Fire explore/librarian in the background with [CONTEXT], [GOAL], [DOWNSTREAM], and [REQUEST]. Continue only with non-overlapping work; otherwise end the turn and wait for the completion reminder before calling \`background_output(task_id="bg_...")\`. Use \`task(task_id="ses_...")\` only for follow-ups to the same subagent.
156447
+
156448
+ ${buildAntiDuplicationSection()}
156449
+ </exploration>`;
156450
+ const delegationBlock = `<delegation>
156451
+ Prefer delegation when a specialist fits, the work spans multiple files, the domain is visual/frontend/security/performance, or the module is unfamiliar. Execute directly only for small, local, fully understood changes.
156452
+
156453
+ ${categorySkillsGuide}
156454
+
156455
+ ${nonClaudePlannerSection}
156456
+
156457
+ ${delegationTable}
156458
+
156459
+ Every delegation prompt carries six sections: TASK, EXPECTED OUTCOME, REQUIRED TOOLS, MUST DO, MUST NOT DO, CONTEXT. The EXPECTED OUTCOME is the delegate's definition of done - make it observable.
156460
+
156461
+ After delegation, verify the files and behavior yourself. A subagent report is a lead, not evidence.
156462
+ ${oracleSection ? `
156463
+ ${oracleSection}
156464
+ ` : ""}</delegation>`;
156465
+ const executionBlock = `<behavior>
156466
+ Implementation loop:
156467
+
156468
+ 1. Write down what done means, then plan the smallest path to it. Two or more steps need ${useTaskSystem ? "tasks" : "todos"}; one obvious edit does not.
156469
+ 2. Match the repo: read configs and similar files before writing. Do not invent style.
156470
+ 3. Change only what the request requires. Bug fix does not mean refactor. Refactor does not mean feature work.
156471
+ 4. Use type-safe code. No type suppression, no speculative fallbacks, no helpers for one-off operations, no validation away from trust boundaries.
156472
+ 5. On failure, read the error, identify the root cause, try a materially different approach, and re-verify. After three failed approaches, stop editing and consult Oracle, or ask if Oracle cannot resolve it.
156473
+
156474
+ Never revert, delete, push, publish, message, or affect shared systems without explicit approval. Reversible local edits and verification commands are allowed.
156475
+ </behavior>`;
156476
+ const verificationBlock = `<verification>
156477
+ Verification defines done, and it loops until production ready.
156478
+
156479
+ - File edit: run \`lsp_diagnostics\` on every changed file.
156480
+ - Behavioral change: run adjacent tests or the smallest relevant suite.
156481
+ - Buildable project: run the build/typecheck path that covers the touched code.
156482
+ - Runnable or user-visible behavior: exercise the real surface - browser for web, interactive_bash for TUI/CLI, curl for HTTP, driver script for libraries. Click through the real user path, not just the happy entry point.
156483
+ - Hard-to-inspect output: capture the current state, list what is wrong, fix only those things, capture again.
156484
+ - Delegated work: inspect touched files and rerun checks yourself.
156485
+
156486
+ A pass that surfaces a defect goes back to step one of the loop, not into the report. Report only evidence from this turn: "should pass" means unverified. Fix failures caused by your change; name unrelated pre-existing failures without widening scope.
156487
+ </verification>`;
156488
+ const communicationBlock = `<communication>
156489
+ Every sentence carries information the user does not already have. Never restate the task back, never narrate routine tool calls, no flattery or filler.
156490
+
156491
+ Stay quiet through small changes; start narrating when you touch many files or change direction. Final answers state what changed, where, the verification evidence, and any real residual risk - dense and short.
156492
+ </communication>`;
156493
+ const constraintsBlock = `<constraints>
156494
+ ${hardBlocks}
156495
+
156496
+ ${antiPatterns}
156497
+ </constraints>`;
156498
+ return `${agentIdentity}
156499
+ ${roleBlock}
156500
+
156501
+ ${calibrationBlock}
156502
+
156503
+ ${intentBlock}
156504
+
156505
+ ${explorationBlock}
156506
+
156507
+ ${delegationBlock}
156508
+
156509
+ ${executionBlock}
156510
+
156511
+ ${verificationBlock}
156512
+
156513
+ ${tasksSection}
156514
+
156515
+ ${communicationBlock}
156516
+
156517
+ ${constraintsBlock}`;
156518
+ }
156519
+
156279
156520
  // packages/omo-opencode/src/agents/kimi-tool-loop-guard.ts
156280
156521
  var KIMI_TOOL_LOOP_GUARD = `<tool_loop_guard>
156281
156522
  Never call the same tool with the same arguments more than twice in a row.
@@ -157143,6 +157384,8 @@ function resolveSisyphusPromptFamily(model) {
157143
157384
  return "claude-opus-4-7";
157144
157385
  if (isGlmModel(model))
157145
157386
  return "glm-5-2";
157387
+ if (isGrok45Model(model) || isGrok46Model(model))
157388
+ return "grok-4";
157146
157389
  return "fallback";
157147
157390
  }
157148
157391
  function createSisyphusAgent(model, availableAgents, availableToolNames, availableSkills, availableCategories, useTaskSystem = false) {
@@ -157171,6 +157414,8 @@ function createSisyphusAgent(model, availableAgents, availableToolNames, availab
157171
157414
  return buildClaudeSisyphusAgentConfig(MODE, model, buildClaudeOpus47SisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem));
157172
157415
  case "glm-5-2":
157173
157416
  return buildGlmSisyphusAgentConfig(MODE, model, buildGlm52SisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem));
157417
+ case "grok-4":
157418
+ return buildGrokSisyphusAgentConfig(MODE, model, buildGrok4SisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem));
157174
157419
  case "fallback": {
157175
157420
  const prompt = buildFallbackSisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem);
157176
157421
  return isGptModel(model) ? buildGptSisyphusAgentConfig(MODE, model, prompt) : buildClaudeSisyphusAgentConfig(MODE, model, prompt);
@@ -1,4 +1,5 @@
1
1
  export interface NormalizeSDKResponseOptions {
2
+ /** Return the raw response when data is missing, except when the fallback requires an array. */
2
3
  preferResponseOnMissingData?: boolean;
3
4
  }
4
5
  export declare function normalizeSDKResponse<TData>(response: unknown, fallback: TData, options?: NormalizeSDKResponseOptions): TData;
@@ -13,7 +13,7 @@ export type ShellType = "unix" | "powershell" | "cmd" | "csh";
13
13
  * specific (BASH_VERSION, MSYSTEM, WSL_DISTRO_NAME) — TERM is excluded
14
14
  * because some PowerShell users set it manually.
15
15
  */
16
- export declare function detectShellType(): ShellType;
16
+ export declare function detectShellType(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): ShellType;
17
17
  /**
18
18
  * Shell-escape a value for use in environment variable assignment.
19
19
  *