oh-my-opencode 4.18.1 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/.agents/skills/codex-qa/scripts/lsp-e2e.sh +39 -16
  2. package/.agents/skills/opencode-qa/scripts/lsp-e2e.sh +111 -28
  3. package/README.ja.md +2 -2
  4. package/README.ko.md +2 -2
  5. package/README.md +4 -4
  6. package/README.ru.md +2 -2
  7. package/README.zh-cn.md +2 -2
  8. package/bin/AGENTS.md +33 -0
  9. package/dist/agents/atlas/agent.d.ts +6 -5
  10. package/dist/agents/sisyphus/index.d.ts +5 -0
  11. package/dist/agents/sisyphus/kimi-k3.d.ts +19 -0
  12. package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
  13. package/dist/agents/sisyphus-junior/agent.d.ts +8 -4
  14. package/dist/agents/sisyphus-junior/index.d.ts +2 -0
  15. package/dist/agents/sisyphus-junior/kimi-k3.d.ts +12 -0
  16. package/dist/agents/types.d.ts +2 -2
  17. package/dist/cli/index.js +690 -139
  18. package/dist/cli-node/index.js +690 -139
  19. package/dist/config/index.d.ts +1 -1
  20. package/dist/config/schema/browser-automation.d.ts +1 -0
  21. package/dist/config/schema/commands.d.ts +1 -3
  22. package/dist/config/schema/default-mode.d.ts +1 -1
  23. package/dist/config/schema/goal.d.ts +7 -0
  24. package/dist/config/schema/hooks.d.ts +1 -1
  25. package/dist/config/schema/oh-my-opencode-config.d.ts +6 -10
  26. package/dist/config/schema/ralph-loop.d.ts +1 -1
  27. package/dist/config/schema.d.ts +1 -1
  28. package/dist/create-hooks.d.ts +1 -1
  29. package/dist/features/builtin-commands/templates/goal.d.ts +1 -0
  30. package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
  31. package/dist/features/builtin-commands/types.d.ts +1 -1
  32. package/dist/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.d.ts +6 -0
  33. package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
  34. package/dist/hooks/category-skill-reminder/hook.d.ts +9 -1
  35. package/dist/hooks/comment-checker/hook.d.ts +8 -1
  36. package/dist/hooks/goal/command-arguments.d.ts +13 -0
  37. package/dist/hooks/goal/controller.d.ts +26 -0
  38. package/dist/hooks/goal/index.d.ts +23 -0
  39. package/dist/hooks/goal/prompt.d.ts +3 -0
  40. package/dist/hooks/goal/store.d.ts +8 -0
  41. package/dist/hooks/goal/tools.d.ts +10 -0
  42. package/dist/hooks/goal/types.d.ts +93 -0
  43. package/dist/hooks/goal/validation.d.ts +4 -0
  44. package/dist/hooks/index.d.ts +1 -0
  45. package/dist/hooks/keyword-detector/hook.d.ts +1 -2
  46. package/dist/hooks/ralph-loop/types.d.ts +1 -1
  47. package/dist/hooks/todo-continuation-enforcer/types.d.ts +3 -0
  48. package/dist/index.js +3706 -4329
  49. package/dist/oh-my-opencode.schema.json +23 -19
  50. package/dist/plugin/chat-message/loop-commands.d.ts +1 -1
  51. package/dist/plugin/chat-message/types.d.ts +23 -10
  52. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -1
  53. package/dist/plugin/hooks/create-session-hooks.d.ts +3 -2
  54. package/dist/plugin/hooks/create-transform-hooks.d.ts +0 -2
  55. package/dist/plugin/messages-transform.d.ts +1 -0
  56. package/dist/plugin/stop-continuation.d.ts +2 -2
  57. package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +2 -0
  58. package/dist/shared/system-directive.d.ts +0 -1
  59. package/dist/skills/ulw-plan/SKILL.md +11 -7
  60. package/dist/skills/ulw-plan/references/full-workflow.md +117 -6
  61. package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  62. package/dist/skills/ulw-research/SKILL.md +3 -3
  63. package/dist/tools/delegate-task/types.d.ts +0 -1
  64. package/dist/tui.js +115 -28
  65. package/package.json +14 -14
  66. package/packages/git-bash-mcp/dist/cli.js +81 -19
  67. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +4 -4
  68. package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +118 -1
  69. package/packages/lsp-core/src/lsp/directory-diagnostics.ts +1 -1
  70. package/packages/lsp-daemon/dist/cli.js +262 -63
  71. package/packages/lsp-daemon/dist/client.js +194 -50
  72. package/packages/lsp-daemon/dist/daemon-client.d.ts +2 -2
  73. package/packages/lsp-daemon/dist/daemon-client.js +26 -2
  74. package/packages/lsp-daemon/dist/ensure-daemon.d.ts +5 -4
  75. package/packages/lsp-daemon/dist/ensure-daemon.js +79 -18
  76. package/packages/lsp-daemon/dist/index.js +262 -63
  77. package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
  78. package/packages/lsp-daemon/dist/proxy.js +79 -23
  79. package/packages/lsp-tools-mcp/dist/cli.js +82 -20
  80. package/packages/lsp-tools-mcp/dist/mcp.js +82 -20
  81. package/packages/lsp-tools-mcp/dist/tools.js +1 -1
  82. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  83. package/packages/omo-codex/plugin/.mcp.json +2 -1
  84. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +352 -17
  85. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  86. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  87. package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +7 -6
  88. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +195 -56
  89. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +100 -28
  90. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  91. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +21 -9
  92. package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +1 -1
  93. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +35 -0
  94. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +69 -0
  95. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +57 -1
  96. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  97. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  98. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  99. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  100. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  101. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  102. package/packages/omo-codex/plugin/components/lsp/.mcp.json +2 -1
  103. package/packages/omo-codex/plugin/components/lsp/AGENTS.md +1 -0
  104. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  105. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +113 -31
  106. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  107. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  108. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +1 -0
  109. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
  110. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +5 -3
  111. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  112. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  113. package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +8 -0
  114. package/packages/omo-codex/plugin/components/start-work-continuation/README.md +2 -2
  115. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +3 -3
  116. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +148 -61
  117. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  118. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  119. package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +4 -72
  120. package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +1 -1
  121. package/packages/omo-codex/plugin/components/start-work-continuation/src/plan-checklist.ts +171 -0
  122. package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +213 -24
  123. package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +4 -3
  124. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +25 -4
  125. package/packages/omo-codex/plugin/components/start-work-continuation/test/fixtures/plan-scaffold.md +15 -0
  126. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  127. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  128. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  129. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  130. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +10 -10
  131. package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +3 -3
  132. package/packages/omo-codex/plugin/components/ultrawork/directive.md +50 -33
  133. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  134. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  135. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +50 -33
  136. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +11 -7
  137. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +117 -6
  138. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  139. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +50 -33
  140. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +3 -3
  141. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +5 -6
  142. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  143. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  144. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -1
  145. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +5 -6
  146. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +2 -2
  147. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  148. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  149. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  150. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  151. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  152. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  153. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  154. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  155. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  156. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  157. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  158. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  159. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  160. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  161. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  162. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  163. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  164. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  165. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  166. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  167. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  168. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  169. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  170. package/packages/omo-codex/plugin/package-lock.json +13 -13
  171. package/packages/omo-codex/plugin/package.json +1 -1
  172. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +32 -28
  173. package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +17 -45
  174. package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +455 -0
  175. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +13 -20
  176. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +7 -0
  177. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +3 -2
  178. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +50 -33
  179. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
  180. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +11 -7
  181. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +117 -6
  182. package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  183. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +2 -2
  184. package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +2 -2
  185. package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +1 -0
  186. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +6 -6
  187. package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +3 -3
  188. package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +62 -0
  189. package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +271 -14
  190. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +7 -0
  191. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +38 -22
  192. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +0 -5
  193. package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +293 -0
  194. package/packages/omo-codex/scripts/install-config.test.mjs +10 -10
  195. package/packages/omo-codex/scripts/install-dist/install-local.mjs +353 -18
  196. package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +39 -2
  197. package/packages/shared-skills/skills/ulw-plan/SKILL.md +11 -7
  198. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +117 -6
  199. package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  200. package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
  201. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +0 -3
  202. package/dist/skills/ultraresearch/SKILL.md +0 -10
  203. package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +0 -273
  204. package/packages/shared-skills/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -12
  205. package/packages/shared-skills/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -107
  206. package/packages/shared-skills/skills/lcx-doctor/SKILL.md +0 -128
  207. package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +0 -11
  208. package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +0 -268
  209. package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +0 -11
  210. package/packages/shared-skills/skills/ultraresearch/SKILL.md +0 -10
  211. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/SKILL.md +0 -0
  212. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -0
  213. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -0
  214. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/SKILL.md +0 -0
  215. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/agents/openai.yaml +0 -0
  216. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/SKILL.md +0 -0
  217. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/agents/openai.yaml +0 -0
@@ -1,2 +1,2 @@
1
1
  export { OhMyOpenCodeConfigSchema, } from "./schema";
2
- export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, I18nConfig, McpName, AgentName, HookName, BuiltinCommandName, CodegraphConfig, SisyphusAgentConfig, ExperimentalConfig, DynamicContextPruningConfig, DefaultModeConfig, RalphLoopConfig, TmuxConfig, TmuxLayout, SisyphusConfig, SisyphusTasksConfig, RuntimeFallbackConfig, ModelCapabilitiesConfig, FallbackModels, TeamModeConfig, KeywordDetectorConfig, KeywordType, } from "./schema";
2
+ export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, I18nConfig, McpName, AgentName, HookName, BuiltinCommandName, CodegraphConfig, SisyphusAgentConfig, ExperimentalConfig, DynamicContextPruningConfig, DefaultModeConfig, GoalConfig, TmuxConfig, TmuxLayout, SisyphusConfig, SisyphusTasksConfig, RuntimeFallbackConfig, ModelCapabilitiesConfig, FallbackModels, TeamModeConfig, KeywordDetectorConfig, KeywordType, } from "./schema";
@@ -12,6 +12,7 @@ export declare const BrowserAutomationConfigSchema: z.ZodObject<{
12
12
  "dev-browser": "dev-browser";
13
13
  "playwright-cli": "playwright-cli";
14
14
  }>>;
15
+ playwright_mcp_args: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
16
  }, z.core.$strip>;
16
17
  export type BrowserAutomationProvider = z.infer<typeof BrowserAutomationProviderSchema>;
17
18
  export type BrowserAutomationConfig = z.infer<typeof BrowserAutomationConfigSchema>;
@@ -1,9 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const BuiltinCommandNameSchema: z.ZodEnum<{
3
3
  "remove-ai-slops": "remove-ai-slops";
4
- "ralph-loop": "ralph-loop";
5
- "ulw-loop": "ulw-loop";
6
- "cancel-ralph": "cancel-ralph";
4
+ goal: "goal";
7
5
  refactor: "refactor";
8
6
  "start-work": "start-work";
9
7
  "stop-continuation": "stop-continuation";
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare const DefaultModeConfigSchema: z.ZodObject<{
3
3
  ultrawork: z.ZodDefault<z.ZodBoolean>;
4
- ralph_loop: z.ZodDefault<z.ZodBoolean>;
4
+ goal: z.ZodDefault<z.ZodBoolean>;
5
5
  }, z.core.$strip>;
6
6
  export type DefaultModeConfig = z.infer<typeof DefaultModeConfigSchema>;
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export declare const GoalConfigSchema: z.ZodObject<{
3
+ enabled: z.ZodDefault<z.ZodBoolean>;
4
+ auto_start: z.ZodDefault<z.ZodBoolean>;
5
+ default_max_iterations: z.ZodDefault<z.ZodNumber>;
6
+ }, z.core.$strip>;
7
+ export type GoalConfig = z.infer<typeof GoalConfigSchema>;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const HookNameSchema: z.ZodEnum<{
3
3
  atlas: "atlas";
4
- "ralph-loop": "ralph-loop";
4
+ goal: "goal";
5
5
  "start-work": "start-work";
6
6
  "todo-continuation-enforcer": "todo-continuation-enforcer";
7
7
  "session-notification": "session-notification";
@@ -11,9 +11,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
11
11
  disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
12
  disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13
13
  "remove-ai-slops": "remove-ai-slops";
14
- "ralph-loop": "ralph-loop";
15
- "ulw-loop": "ulw-loop";
16
- "cancel-ralph": "cancel-ralph";
14
+ goal: "goal";
17
15
  refactor: "refactor";
18
16
  "start-work": "start-work";
19
17
  "stop-continuation": "stop-continuation";
@@ -2228,15 +2226,12 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
2228
2226
  "allowed-tools": z.ZodOptional<z.ZodArray<z.ZodString>>;
2229
2227
  disable: z.ZodOptional<z.ZodBoolean>;
2230
2228
  }, z.core.$strip>]>>>]>>;
2231
- ralph_loop: z.ZodOptional<z.ZodObject<{
2229
+ goal: z.ZodOptional<z.ZodObject<{
2232
2230
  enabled: z.ZodDefault<z.ZodBoolean>;
2231
+ auto_start: z.ZodDefault<z.ZodBoolean>;
2233
2232
  default_max_iterations: z.ZodDefault<z.ZodNumber>;
2234
- state_dir: z.ZodOptional<z.ZodString>;
2235
- default_strategy: z.ZodDefault<z.ZodEnum<{
2236
- reset: "reset";
2237
- continue: "continue";
2238
- }>>;
2239
2233
  }, z.core.$strip>>;
2234
+ ralph_loop: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2240
2235
  runtime_fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
2241
2236
  enabled: z.ZodOptional<z.ZodBoolean>;
2242
2237
  retry_on_errors: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
@@ -2370,6 +2365,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
2370
2365
  "dev-browser": "dev-browser";
2371
2366
  "playwright-cli": "playwright-cli";
2372
2367
  }>>;
2368
+ playwright_mcp_args: z.ZodOptional<z.ZodArray<z.ZodString>>;
2373
2369
  }, z.core.$strip>>;
2374
2370
  websearch: z.ZodOptional<z.ZodObject<{
2375
2371
  provider: z.ZodOptional<z.ZodEnum<{
@@ -2412,7 +2408,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
2412
2408
  }, z.core.$strip>>;
2413
2409
  default_mode: z.ZodOptional<z.ZodObject<{
2414
2410
  ultrawork: z.ZodDefault<z.ZodBoolean>;
2415
- ralph_loop: z.ZodDefault<z.ZodBoolean>;
2411
+ goal: z.ZodDefault<z.ZodBoolean>;
2416
2412
  }, z.core.$strip>>;
2417
2413
  _migrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
2418
2414
  }, z.core.$strip>;
@@ -4,8 +4,8 @@ export declare const RalphLoopConfigSchema: z.ZodObject<{
4
4
  default_max_iterations: z.ZodDefault<z.ZodNumber>;
5
5
  state_dir: z.ZodOptional<z.ZodString>;
6
6
  default_strategy: z.ZodDefault<z.ZodEnum<{
7
- reset: "reset";
8
7
  continue: "continue";
8
+ reset: "reset";
9
9
  }>>;
10
10
  }, z.core.$strip>;
11
11
  export type RalphLoopConfig = z.infer<typeof RalphLoopConfigSchema>;
@@ -12,6 +12,7 @@ export * from "./schema/default-mode";
12
12
  export * from "./schema/dynamic-context-pruning";
13
13
  export * from "./schema/experimental";
14
14
  export * from "./schema/fallback-models";
15
+ export * from "./schema/goal";
15
16
  export * from "./schema/git-env-prefix";
16
17
  export * from "./schema/git-master";
17
18
  export * from "./schema/hooks";
@@ -20,7 +21,6 @@ export * from "./schema/keyword-detector";
20
21
  export * from "./schema/model-capabilities";
21
22
  export * from "./schema/notification";
22
23
  export * from "./schema/oh-my-opencode-config";
23
- export * from "./schema/ralph-loop";
24
24
  export * from "./schema/runtime-fallback";
25
25
  export * from "./schema/team-mode";
26
26
  export * from "./schema/skills";
@@ -77,7 +77,7 @@ export declare function createHooks(args: {
77
77
  agentUsageReminder: ReturnType<typeof import("./hooks").createAgentUsageReminderHook> | null;
78
78
  nonInteractiveEnv: ReturnType<typeof import("./hooks").createNonInteractiveEnvHook> | null;
79
79
  interactiveBashSession: ReturnType<typeof import("./hooks").createInteractiveBashSessionHook> | null;
80
- ralphLoop: ReturnType<typeof import("./hooks").createRalphLoopHook> | null;
80
+ goal: ReturnType<typeof import("./hooks").createGoalHook> | null;
81
81
  editErrorRecovery: ReturnType<typeof import("./hooks").createEditErrorRecoveryHook> | null;
82
82
  delegateTaskRetry: ReturnType<typeof import("./hooks").createDelegateTaskRetryHook> | null;
83
83
  startWork: ReturnType<typeof import("./hooks").createStartWorkHook> | null;
@@ -0,0 +1 @@
1
+ export declare const GOAL_TEMPLATE = "You are setting a thread Goal - a persistent objective that the agent will pursue continuously until paused, cleared, or completed.\n\n## How Goal Works\n\n1. The goal stays active for this thread/session\n2. When idle, the system will automatically inject a continuation prompt to keep working toward the goal\n3. The agent can call update_goal({ status: \"complete\" }) when the objective is actually achieved\n4. You can pause, resume, or clear the goal with /goal pause, /goal resume, /goal clear\n\n## Rules\n\n- Focus on completing the objective fully, not partially\n- Do not mark the goal complete until a completion audit confirms it is done\n- Each turn should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Commands\n\n- /goal <objective> - Set or replace the active goal\n- /goal - Show the current goal\n- /goal pause - Pause the active goal (stops idle continuations)\n- /goal resume - Resume a paused goal\n- /goal clear - Clear the current goal\n\n## Your Task\n\nParse the arguments below and set the goal. The format is:\n`<objective>` or one of: pause, resume, clear";
@@ -1 +1 @@
1
- export declare const STOP_CONTINUATION_TEMPLATE = "Stop all continuation mechanisms for the current session.\n\nThis command will:\n1. Stop the todo-continuation-enforcer from automatically continuing incomplete tasks\n2. Cancel any active Ralph Loop\n3. Clear the boulder state for the current project\n\nAfter running this command:\n- The session will not auto-continue when idle\n- You can manually continue work when ready\n- The stop state is per-session and clears when the session ends\n\nUse this when you need to pause automated continuation and take manual control.";
1
+ export declare const STOP_CONTINUATION_TEMPLATE = "Stop all continuation mechanisms for the current session.\n\nThis command will:\n1. Stop the todo-continuation-enforcer from automatically continuing incomplete tasks\n2. Cancel any active Ralph Loop\n3. Clear the active Goal for this session\n4. Clear the boulder state for the current project\n\nAfter running this command:\n- The session will not auto-continue when idle\n- You can manually continue work when ready\n- The stop state is per-session and clears when the session ends\n\nUse this when you need to pause automated continuation and take manual control.";
@@ -1,5 +1,5 @@
1
1
  import type { CommandDefinition } from "../claude-code-command-loader";
2
- export type BuiltinCommandName = "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops" | "hyperplan";
2
+ export type BuiltinCommandName = "goal" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops" | "hyperplan";
3
3
  export interface BuiltinCommandConfig {
4
4
  disabled_commands?: BuiltinCommandName[];
5
5
  }
@@ -1,9 +1,15 @@
1
+ import { replaceEmptyTextPartsAsync, findMessagesWithEmptyTextPartsFromSDK } from "./storage/empty-text";
2
+ import { injectTextPartAsync } from "./storage/text-part-injector";
1
3
  import type { Client } from "./client";
2
4
  export declare function fixEmptyMessagesWithSDK(params: {
3
5
  sessionID: string;
4
6
  client: Client;
5
7
  placeholderText: string;
6
8
  messageIndex?: number;
9
+ }, storage?: {
10
+ replaceEmptyTextPartsAsync: typeof replaceEmptyTextPartsAsync;
11
+ findMessagesWithEmptyTextPartsFromSDK: typeof findMessagesWithEmptyTextPartsFromSDK;
12
+ injectTextPartAsync: typeof injectTextPartAsync;
7
13
  }): Promise<{
8
14
  fixed: boolean;
9
15
  fixedMessageIds: string[];
@@ -6,6 +6,7 @@ export interface ExecutorOptions {
6
6
  enabledPluginsOverride?: Record<string, boolean>;
7
7
  agent?: string;
8
8
  directory?: string;
9
+ sessionID?: string;
9
10
  }
10
11
  export interface ExecuteResult {
11
12
  success: boolean;
@@ -1,4 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { Message, Part } from "@opencode-ai/sdk";
2
3
  import type { AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
3
4
  interface ToolExecuteInput {
4
5
  tool: string;
@@ -11,8 +12,15 @@ interface ToolExecuteOutput {
11
12
  output: string;
12
13
  metadata: unknown;
13
14
  }
15
+ type MessageWithParts = {
16
+ info: Message;
17
+ parts: Part[];
18
+ };
14
19
  export declare function createCategorySkillReminderHook(_ctx: PluginInput, availableSkills?: AvailableSkill[]): {
15
- "tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
20
+ "tool.execute.after": (input: ToolExecuteInput, _output: ToolExecuteOutput) => Promise<void>;
21
+ "experimental.chat.messages.transform": (_input: Record<string, never>, output: {
22
+ messages: MessageWithParts[];
23
+ }) => Promise<void>;
16
24
  event: ({ event }: {
17
25
  event: {
18
26
  type: string;
@@ -1,5 +1,12 @@
1
1
  import type { CommentCheckerConfig } from "../../config/schema";
2
- export declare function createCommentCheckerHooks(config?: CommentCheckerConfig): {
2
+ import { initializeCommentCheckerCli, getCommentCheckerCliPathPromise, isCliPathUsable, processWithCli, processApplyPatchEditsWithCli } from "./cli-runner";
3
+ export declare function createCommentCheckerHooks(config?: CommentCheckerConfig, cliRunner?: {
4
+ initializeCommentCheckerCli: typeof initializeCommentCheckerCli;
5
+ getCommentCheckerCliPathPromise: typeof getCommentCheckerCliPathPromise;
6
+ isCliPathUsable: typeof isCliPathUsable;
7
+ processWithCli: typeof processWithCli;
8
+ processApplyPatchEditsWithCli: typeof processApplyPatchEditsWithCli;
9
+ }): {
3
10
  "tool.execute.before": (input: {
4
11
  tool: string;
5
12
  sessionID: string;
@@ -0,0 +1,13 @@
1
+ import type { GoalStatus } from "./types";
2
+ export type ParsedGoalCommand = {
3
+ readonly kind: "show";
4
+ } | {
5
+ readonly kind: "clear";
6
+ } | {
7
+ readonly kind: "setStatus";
8
+ readonly status: Extract<GoalStatus, "active" | "paused">;
9
+ } | {
10
+ readonly kind: "setObjective";
11
+ readonly objective: string;
12
+ };
13
+ export declare function parseGoalCommand(rawArgs: string): ParsedGoalCommand;
@@ -0,0 +1,26 @@
1
+ import type { Goal, GoalStatus, TokenUsageSnapshot } from "./types";
2
+ export type GoalControllerOptions = {
3
+ readonly projectDir: string;
4
+ };
5
+ export type TuiLoopSnapshot = {
6
+ readonly version: 1;
7
+ readonly activeGoalId: string | undefined;
8
+ readonly goals: readonly {
9
+ readonly id: string;
10
+ readonly title: string;
11
+ readonly status: "in_progress" | "complete";
12
+ readonly successCriteria: readonly [];
13
+ }[];
14
+ };
15
+ export type GoalController = ReturnType<typeof createGoalController>;
16
+ export declare function createGoalController(options: GoalControllerOptions): {
17
+ setGoal(sessionID: string, rawObjective: string): Goal;
18
+ getGoal(sessionID: string): Goal | null;
19
+ pauseGoal(sessionID: string): Goal | null;
20
+ resumeGoal(sessionID: string): Goal | null;
21
+ clearGoal(sessionID: string): boolean;
22
+ markComplete(sessionID: string): Goal | null;
23
+ accountUsage(sessionID: string, usage: TokenUsageSnapshot, elapsedSeconds: number): Goal | null;
24
+ updateTui(sessionID: string): void;
25
+ };
26
+ export declare function goalStatusForTui(status: GoalStatus): "in_progress" | "complete";
@@ -0,0 +1,23 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { Goal } from "./types";
3
+ export type GoalHookOptions = {
4
+ readonly projectDir: string;
5
+ readonly autoStart?: boolean;
6
+ readonly ultrawork?: boolean;
7
+ readonly getSessionExists?: (sessionID: string) => Promise<boolean>;
8
+ };
9
+ export type GoalHook = {
10
+ readonly setGoal: (sessionID: string, objective: string) => Goal;
11
+ readonly getGoal: (sessionID: string) => Goal | null;
12
+ readonly pauseGoal: (sessionID: string) => Goal | null;
13
+ readonly resumeGoal: (sessionID: string) => Goal | null;
14
+ readonly clearGoal: (sessionID: string) => boolean;
15
+ readonly markComplete: (sessionID: string) => Goal | null;
16
+ readonly event: (input: {
17
+ event: {
18
+ type: string;
19
+ properties?: unknown;
20
+ };
21
+ }) => Promise<void>;
22
+ };
23
+ export declare function createGoalHook(ctx: PluginInput, options: GoalHookOptions): GoalHook;
@@ -0,0 +1,3 @@
1
+ import type { Goal } from "./types";
2
+ export declare function buildContinuationPrompt(goal: Goal): string;
3
+ export declare function buildResumePrompt(goal: Goal): string;
@@ -0,0 +1,8 @@
1
+ import { type Goal, type GoalStoreRef, type GoalUpdate } from "./types";
2
+ export declare function goalFilePath(ref: GoalStoreRef): string;
3
+ export declare function ensureGoalStoreDir(baseDir: string): void;
4
+ export declare function readGoal(ref: GoalStoreRef): Goal | null;
5
+ export declare function writeGoal(ref: GoalStoreRef, goal: Goal | null): void;
6
+ export declare function clearGoal(ref: GoalStoreRef): boolean;
7
+ export declare function createGoal(ref: GoalStoreRef, objective: string): Goal;
8
+ export declare function updateGoal(ref: GoalStoreRef, update: GoalUpdate): Goal | null;
@@ -0,0 +1,10 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ import type { GoalController } from "./controller";
3
+ export type GoalToolsDeps = {
4
+ readonly controller: GoalController;
5
+ readonly getSessionID: () => string | undefined;
6
+ };
7
+ export declare function createGoalTool(deps: GoalToolsDeps): ToolDefinition;
8
+ export declare function updateGoalTool(deps: GoalToolsDeps): ToolDefinition;
9
+ export declare function getGoalTool(deps: GoalToolsDeps): ToolDefinition;
10
+ export declare function createGoalTools(deps: GoalToolsDeps): Record<string, ToolDefinition>;
@@ -0,0 +1,93 @@
1
+ import { z } from "zod";
2
+ export declare const GOAL_STATUS_VALUES: readonly ["active", "paused", "complete"];
3
+ export declare const GoalStatusSchema: z.ZodEnum<{
4
+ active: "active";
5
+ paused: "paused";
6
+ complete: "complete";
7
+ }>;
8
+ export type GoalStatus = z.infer<typeof GoalStatusSchema>;
9
+ export declare const GoalSchema: z.ZodObject<{
10
+ id: z.ZodString;
11
+ sessionID: z.ZodString;
12
+ objective: z.ZodString;
13
+ status: z.ZodEnum<{
14
+ active: "active";
15
+ paused: "paused";
16
+ complete: "complete";
17
+ }>;
18
+ tokensUsed: z.ZodNumber;
19
+ timeUsedSeconds: z.ZodNumber;
20
+ createdAt: z.ZodNumber;
21
+ updatedAt: z.ZodNumber;
22
+ lastStartedAt: z.ZodOptional<z.ZodNumber>;
23
+ completedAt: z.ZodOptional<z.ZodNumber>;
24
+ }, z.core.$strip>;
25
+ export type Goal = z.infer<typeof GoalSchema>;
26
+ export declare const GoalFileSchema: z.ZodObject<{
27
+ version: z.ZodLiteral<1>;
28
+ goal: z.ZodNullable<z.ZodObject<{
29
+ id: z.ZodString;
30
+ sessionID: z.ZodString;
31
+ objective: z.ZodString;
32
+ status: z.ZodEnum<{
33
+ active: "active";
34
+ paused: "paused";
35
+ complete: "complete";
36
+ }>;
37
+ tokensUsed: z.ZodNumber;
38
+ timeUsedSeconds: z.ZodNumber;
39
+ createdAt: z.ZodNumber;
40
+ updatedAt: z.ZodNumber;
41
+ lastStartedAt: z.ZodOptional<z.ZodNumber>;
42
+ completedAt: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+ export type GoalFile = z.infer<typeof GoalFileSchema>;
46
+ export type GoalStoreRef = {
47
+ readonly baseDir: string;
48
+ readonly sessionID: string;
49
+ };
50
+ export type TokenUsageSnapshot = {
51
+ readonly input: number;
52
+ readonly output: number;
53
+ readonly cacheRead: number;
54
+ readonly cacheWrite: number;
55
+ readonly totalTokens: number;
56
+ };
57
+ export type GoalUpdate = {
58
+ readonly objective?: string;
59
+ readonly status?: GoalStatus;
60
+ readonly tokensUsed?: number;
61
+ readonly timeUsedSeconds?: number;
62
+ };
63
+ export declare const GoalToolSnapshotSchema: z.ZodObject<{
64
+ sessionID: z.ZodString;
65
+ objective: z.ZodString;
66
+ status: z.ZodEnum<{
67
+ active: "active";
68
+ paused: "paused";
69
+ complete: "complete";
70
+ }>;
71
+ tokensUsed: z.ZodNumber;
72
+ timeUsedSeconds: z.ZodNumber;
73
+ createdAt: z.ZodNumber;
74
+ updatedAt: z.ZodNumber;
75
+ }, z.core.$strip>;
76
+ export type GoalToolSnapshot = z.infer<typeof GoalToolSnapshotSchema>;
77
+ export declare const GoalToolResponseSchema: z.ZodObject<{
78
+ goal: z.ZodNullable<z.ZodObject<{
79
+ sessionID: z.ZodString;
80
+ objective: z.ZodString;
81
+ status: z.ZodEnum<{
82
+ active: "active";
83
+ paused: "paused";
84
+ complete: "complete";
85
+ }>;
86
+ tokensUsed: z.ZodNumber;
87
+ timeUsedSeconds: z.ZodNumber;
88
+ createdAt: z.ZodNumber;
89
+ updatedAt: z.ZodNumber;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>;
92
+ export type GoalToolResponse = z.infer<typeof GoalToolResponseSchema>;
93
+ export type GoalAccountingMode = "active" | "activeOrComplete";
@@ -0,0 +1,4 @@
1
+ export declare class InvalidObjectiveError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ export declare function validateObjective(objective: string): string;
@@ -27,6 +27,7 @@ export { createTeamModeStatusInjector } from "./team-mode-status-injector";
27
27
  export { createToolPairValidatorHook } from "./tool-pair-validator";
28
28
  export { createCategorySkillReminderHook } from "./category-skill-reminder";
29
29
  export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
30
+ export { createGoalHook, type GoalHook } from "./goal";
30
31
  export { createNoSisyphusGptHook } from "./no-sisyphus-gpt";
31
32
  export { createNoHephaestusNonGptHook } from "./no-hephaestus-non-gpt";
32
33
  export { createHephaestusAgentsMdInjectorHook } from "./hephaestus-agents-md-injector";
@@ -2,8 +2,7 @@ import type { PluginInput } from "@opencode-ai/plugin";
2
2
  import type { DefaultModeConfig } from "../../config/schema/default-mode";
3
3
  import type { KeywordDetectorConfig } from "../../config/schema/keyword-detector";
4
4
  import type { ContextCollector } from "../../features/context-injector";
5
- import type { RalphLoopHook } from "../ralph-loop";
6
- export declare function createKeywordDetectorHook(ctx: PluginInput, _collector?: ContextCollector, _ralphLoop?: Pick<RalphLoopHook, "startLoop">, config?: KeywordDetectorConfig, defaultMode?: DefaultModeConfig): {
5
+ export declare function createKeywordDetectorHook(ctx: PluginInput, _collector?: ContextCollector, _ralphLoop?: unknown, config?: KeywordDetectorConfig, defaultMode?: DefaultModeConfig): {
7
6
  "chat.message": (input: {
8
7
  sessionID: string;
9
8
  agent?: string;
@@ -1,4 +1,4 @@
1
- import type { RalphLoopConfig } from "../../config";
1
+ import type { RalphLoopConfig } from "../../config/schema/ralph-loop";
2
2
  export interface RalphLoopState {
3
3
  active: boolean;
4
4
  iteration: number;
@@ -34,6 +34,9 @@ export interface SessionState {
34
34
  lastIncompleteCount?: number;
35
35
  lastInjectedAt?: number;
36
36
  awaitingPostInjectionProgressCheck?: boolean;
37
+ continuationResponseObserved?: boolean;
38
+ continuationBlockReason?: "directive-response" | "user-interruption";
39
+ pendingUserMessageID?: string;
37
40
  inFlight?: boolean;
38
41
  stagnationCount: number;
39
42
  consecutiveFailures: number;