oh-my-opencode 4.2.3 → 4.3.1

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 (176) hide show
  1. package/README.ja.md +1 -0
  2. package/README.ko.md +1 -0
  3. package/README.md +3 -2
  4. package/README.zh-cn.md +1 -0
  5. package/dist/agents/atlas/default-prompt-sections.d.ts +1 -1
  6. package/dist/agents/builtin-agents/available-skills.d.ts +1 -1
  7. package/dist/agents/builtin-agents/model-resolution.d.ts +1 -1
  8. package/dist/agents/prometheus/plan-generation.d.ts +1 -1
  9. package/dist/agents/prometheus/plan-template.d.ts +1 -1
  10. package/dist/agents/prometheus/spec-driven-mode.d.ts +7 -0
  11. package/dist/cli/doctor/checks/system-binary.d.ts +1 -1
  12. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +14 -0
  13. package/dist/cli/doctor/constants.d.ts +1 -0
  14. package/dist/cli/index.js +3203 -2368
  15. package/dist/cli/provider-model-id-transform.d.ts +1 -1
  16. package/dist/config/index.d.ts +1 -1
  17. package/dist/config/schema/agent-overrides.d.ts +147 -1
  18. package/dist/config/schema/background-task.d.ts +1 -0
  19. package/dist/config/schema/default-mode.d.ts +6 -0
  20. package/dist/config/schema/hooks.d.ts +2 -0
  21. package/dist/config/schema/i18n.d.ts +5 -0
  22. package/dist/config/schema/keyword-detector.d.ts +8 -0
  23. package/dist/config/schema/oh-my-opencode-config.d.ts +163 -1
  24. package/dist/config/schema.d.ts +2 -0
  25. package/dist/create-hooks.d.ts +2 -0
  26. package/dist/features/background-agent/fallback-retry-handler.d.ts +3 -0
  27. package/dist/features/background-agent/manager.d.ts +0 -1
  28. package/dist/features/background-agent/parent-wake-notifier.d.ts +5 -0
  29. package/dist/features/background-agent/session-activity.d.ts +12 -0
  30. package/dist/features/background-agent/session-existence.d.ts +2 -0
  31. package/dist/features/background-agent/session-stream-activity.d.ts +18 -0
  32. package/dist/features/background-agent/task-activity-refresh.d.ts +11 -0
  33. package/dist/features/background-agent/task-poller.d.ts +2 -0
  34. package/dist/features/boulder-state/constants.d.ts +1 -10
  35. package/dist/features/boulder-state/format-duration.d.ts +1 -1
  36. package/dist/features/boulder-state/storage.d.ts +1 -83
  37. package/dist/features/boulder-state/top-level-task.d.ts +1 -2
  38. package/dist/features/boulder-state/types.d.ts +1 -100
  39. package/dist/features/task-toast-manager/manager.d.ts +1 -1
  40. package/dist/features/team-mode/team-state-store/locks.d.ts +7 -4
  41. package/dist/features/tmux-subagent/manager.d.ts +2 -0
  42. package/dist/hooks/atlas/system-reminder-templates.d.ts +1 -1
  43. package/dist/hooks/claude-code-hooks/config-loader.d.ts +7 -0
  44. package/dist/hooks/claude-code-hooks/config.d.ts +4 -1
  45. package/dist/hooks/claude-code-hooks/types.d.ts +17 -1
  46. package/dist/hooks/comment-checker/cli.d.ts +2 -22
  47. package/dist/hooks/comment-checker/types.d.ts +1 -31
  48. package/dist/hooks/directory-agents-injector/finder.d.ts +2 -7
  49. package/dist/hooks/directory-agents-injector/injector.d.ts +1 -18
  50. package/dist/hooks/index.d.ts +2 -0
  51. package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
  52. package/dist/hooks/keyword-detector/constants.d.ts +10 -5
  53. package/dist/hooks/keyword-detector/detector.d.ts +2 -2
  54. package/dist/hooks/keyword-detector/hook.d.ts +2 -1
  55. package/dist/hooks/keyword-detector/hyperplan/default.d.ts +5 -0
  56. package/dist/hooks/notepad-write-guard/index.d.ts +2 -0
  57. package/dist/hooks/plan-format-validator/hook.d.ts +21 -0
  58. package/dist/hooks/plan-format-validator/index.d.ts +1 -0
  59. package/dist/hooks/prometheus-md-only/constants.d.ts +8 -0
  60. package/dist/hooks/rules-injector/constants.d.ts +1 -7
  61. package/dist/hooks/rules-injector/matcher.d.ts +2 -2
  62. package/dist/hooks/rules-injector/parser.d.ts +2 -2
  63. package/dist/hooks/rules-injector/project-root-finder.d.ts +1 -1
  64. package/dist/hooks/rules-injector/rule-distance.d.ts +1 -1
  65. package/dist/hooks/rules-injector/rule-file-finder.d.ts +2 -2
  66. package/dist/hooks/rules-injector/rule-file-scanner.d.ts +1 -1
  67. package/dist/hooks/rules-injector/rule-scan-cache.d.ts +2 -2
  68. package/dist/hooks/rules-injector/types.d.ts +1 -1
  69. package/dist/hooks/session-todo-status.d.ts +1 -0
  70. package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
  71. package/dist/hooks/start-work/context-info-builder.d.ts +1 -0
  72. package/dist/hooks/start-work/session-plan-affinity.d.ts +7 -0
  73. package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
  74. package/dist/index.js +18290 -16069
  75. package/dist/locales/en.d.ts +18 -0
  76. package/dist/locales/index.d.ts +6 -0
  77. package/dist/locales/zh.d.ts +17 -0
  78. package/dist/mcp/ast-grep.d.ts +2 -0
  79. package/dist/mcp/cli-suffix.d.ts +1 -0
  80. package/dist/mcp/index.d.ts +2 -0
  81. package/dist/mcp/lsp.d.ts +2 -0
  82. package/dist/mcp/runtime-executable.d.ts +11 -0
  83. package/dist/oh-my-opencode.schema.json +449 -1
  84. package/dist/plugin/hooks/create-core-hooks.d.ts +2 -0
  85. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
  86. package/dist/plugin/system-transform.d.ts +2 -1
  87. package/dist/plugin/tool-definition.d.ts +9 -0
  88. package/dist/plugin-handlers/agent-key-remapper.d.ts +5 -1
  89. package/dist/plugin-handlers/hook-config-handler.d.ts +7 -0
  90. package/dist/plugin-handlers/index.d.ts +1 -0
  91. package/dist/plugin-handlers/plugin-components-loader.d.ts +2 -3
  92. package/dist/shared/agent-display-names.d.ts +10 -2
  93. package/dist/shared/bun-spawn-shim.d.ts +3 -0
  94. package/dist/shared/command-executor/execute-hook-command.d.ts +2 -0
  95. package/dist/shared/contains-path.d.ts +1 -2
  96. package/dist/shared/context-limit-resolver.d.ts +2 -5
  97. package/dist/shared/deep-merge.d.ts +1 -13
  98. package/dist/shared/disabled-providers.d.ts +14 -0
  99. package/dist/shared/extract-semver.d.ts +1 -1
  100. package/dist/shared/fallback-chain-from-models.d.ts +1 -12
  101. package/dist/shared/file-utils.d.ts +1 -7
  102. package/dist/shared/frontmatter.d.ts +1 -7
  103. package/dist/shared/i18n.d.ts +9 -0
  104. package/dist/shared/index.d.ts +0 -1
  105. package/dist/shared/jsonc-parser.d.ts +1 -23
  106. package/dist/shared/model-availability.d.ts +18 -5
  107. package/dist/shared/model-capabilities/index.d.ts +6 -3
  108. package/dist/shared/model-capabilities-cache.d.ts +4 -8
  109. package/dist/shared/model-error-classifier.d.ts +4 -33
  110. package/dist/shared/model-format-normalizer.d.ts +1 -7
  111. package/dist/shared/model-normalization.d.ts +1 -2
  112. package/dist/shared/model-requirements.d.ts +2 -22
  113. package/dist/shared/model-resolution-pipeline.d.ts +5 -30
  114. package/dist/shared/model-resolution-types.d.ts +1 -36
  115. package/dist/shared/model-resolver.d.ts +8 -35
  116. package/dist/shared/model-sanitizer.d.ts +1 -3
  117. package/dist/shared/model-settings-compatibility.d.ts +2 -40
  118. package/dist/shared/model-string-parser.d.ts +1 -9
  119. package/dist/shared/model-suggestion-retry.d.ts +3 -7
  120. package/dist/shared/opencode-config-dir.d.ts +1 -0
  121. package/dist/shared/port-utils.d.ts +1 -9
  122. package/dist/shared/process-stream-reader.d.ts +3 -0
  123. package/dist/shared/prompt-async-gate/pending-tool-turn.d.ts +9 -0
  124. package/dist/shared/prompt-async-gate/queue.d.ts +8 -0
  125. package/dist/shared/prompt-async-gate/reservations.d.ts +9 -0
  126. package/dist/shared/prompt-async-gate/session-idle-dispatch.d.ts +15 -0
  127. package/dist/shared/prompt-async-gate/timing.d.ts +8 -0
  128. package/dist/shared/prompt-async-gate/types.d.ts +120 -0
  129. package/dist/shared/prompt-async-gate.d.ts +3 -90
  130. package/dist/shared/provider-model-id-transform.d.ts +1 -1
  131. package/dist/shared/record-type-guard.d.ts +1 -1
  132. package/dist/shared/replace-tool-args.d.ts +1 -13
  133. package/dist/shared/session-idle-settle.d.ts +2 -1
  134. package/dist/shared/shell-env.d.ts +7 -5
  135. package/dist/shared/snake-case.d.ts +1 -5
  136. package/dist/shared/tool-name.d.ts +1 -1
  137. package/dist/testing/create-plugin-module.d.ts +2 -0
  138. package/dist/tools/delegate-task/constants.d.ts +19 -0
  139. package/dist/tools/delegate-task/skill-resolver.d.ts +9 -2
  140. package/dist/tools/delegate-task/types.d.ts +32 -0
  141. package/dist/tools/glob/cli.d.ts +3 -1
  142. package/dist/tools/glob/constants.d.ts +1 -1
  143. package/dist/tools/grep/cli.d.ts +4 -2
  144. package/dist/tools/grep/constants.d.ts +1 -1
  145. package/dist/tools/hashline-edit/autocorrect-replacement-lines.d.ts +1 -6
  146. package/dist/tools/hashline-edit/constants.d.ts +1 -4
  147. package/dist/tools/hashline-edit/diff-utils.d.ts +1 -6
  148. package/dist/tools/hashline-edit/edit-deduplication.d.ts +1 -5
  149. package/dist/tools/hashline-edit/edit-operation-primitives.d.ts +1 -10
  150. package/dist/tools/hashline-edit/edit-operations.d.ts +2 -8
  151. package/dist/tools/hashline-edit/edit-ordering.d.ts +1 -4
  152. package/dist/tools/hashline-edit/edit-text-normalization.d.ts +1 -7
  153. package/dist/tools/hashline-edit/file-text-canonicalization.d.ts +2 -7
  154. package/dist/tools/hashline-edit/hash-computation.d.ts +2 -11
  155. package/dist/tools/hashline-edit/hashline-chunk-formatter.d.ts +2 -10
  156. package/dist/tools/hashline-edit/hashline-edit-diff.d.ts +1 -1
  157. package/dist/tools/hashline-edit/normalize-edits.d.ts +2 -10
  158. package/dist/tools/hashline-edit/types.d.ts +1 -17
  159. package/dist/tools/hashline-edit/validation.d.ts +2 -20
  160. package/dist/tools/look-at/assistant-message-extractor.d.ts +7 -0
  161. package/dist/tools/look-at/session-poller.d.ts +9 -1
  162. package/dist/tools/shared/search-process-output.d.ts +7 -0
  163. package/dist/tools/skill/tools.d.ts +1 -1
  164. package/dist/tools/skill/types.d.ts +2 -0
  165. package/package.json +31 -16
  166. package/packages/ast-grep-mcp/dist/cli.js +272 -248
  167. package/dist/hooks/comment-checker/apply-patch-edits.d.ts +0 -2
  168. package/dist/shared/known-variants.d.ts +0 -6
  169. package/dist/shared/model-capabilities/bundled-snapshot.d.ts +0 -2
  170. package/dist/shared/model-capabilities/get-model-capabilities.d.ts +0 -2
  171. package/dist/shared/model-capabilities/runtime-model-readers.d.ts +0 -11
  172. package/dist/shared/model-capabilities/supplemental-entries.d.ts +0 -2
  173. package/dist/shared/model-capabilities/types.d.ts +0 -94
  174. package/dist/shared/model-capability-aliases.d.ts +0 -21
  175. package/dist/shared/model-capability-guardrails.d.ts +0 -38
  176. package/dist/shared/model-capability-heuristics.d.ts +0 -11
@@ -0,0 +1,2 @@
1
+ import type { Hooks } from "@opencode-ai/plugin";
2
+ export declare function createNotepadWriteGuardHook(): Hooks;
@@ -0,0 +1,21 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ /**
3
+ * Programmatic plan format validator.
4
+ *
5
+ * After any agent writes to a `.omo/plans/*.md` file, compares the
6
+ * raw top-level checkbox count against `getPlanProgress()` to detect
7
+ * malformed task labels. Warns the agent when some or all tasks
8
+ * will be skipped by the progress counter.
9
+ */
10
+ export declare function createPlanFormatValidatorHook(_ctx: PluginInput): {
11
+ "tool.execute.after": (input: {
12
+ tool: string;
13
+ sessionID: string;
14
+ callID: string;
15
+ args?: Record<string, unknown>;
16
+ }, output: {
17
+ title: string;
18
+ output: string;
19
+ metadata: unknown;
20
+ }) => Promise<void>;
21
+ };
@@ -0,0 +1 @@
1
+ export { createPlanFormatValidatorHook } from "./hook";
@@ -3,5 +3,13 @@ export declare const PROMETHEUS_AGENT = "prometheus";
3
3
  export declare const ALLOWED_EXTENSIONS: string[];
4
4
  export declare const ALLOWED_PATH_PREFIX = ".omo";
5
5
  export declare const BLOCKED_TOOLS: string[];
6
+ /**
7
+ * XML-tag wrapper used to mark the planning-context boundary in prompts
8
+ * forwarded to external LLMs via task(). This format intentionally avoids
9
+ * the `[SYSTEM DIRECTIVE: ...]` bracket syntax that Azure OpenAI Prompt Shield
10
+ * flags as indirect prompt injection in user-role content (#4036).
11
+ */
12
+ export declare const PLANNING_CONTEXT_OPEN = "<planning-context source=\"prometheus-read-only\">";
13
+ export declare const PLANNING_CONTEXT_CLOSE = "</planning-context>";
6
14
  export declare const PLANNING_CONSULT_WARNING: string;
7
15
  export declare const PROMETHEUS_WORKFLOW_REMINDER: string;
@@ -1,8 +1,2 @@
1
1
  export declare const RULES_INJECTOR_STORAGE: string;
2
- export declare const PROJECT_MARKERS: string[];
3
- export declare const PROJECT_RULE_SUBDIRS: [string, string][];
4
- export declare const PROJECT_RULE_FILES: string[];
5
- export declare const GITHUB_INSTRUCTIONS_PATTERN: RegExp;
6
- export declare const USER_RULE_DIR = ".claude/rules";
7
- export declare const OPENCODE_USER_RULE_DIRS: string[];
8
- export declare const RULE_EXTENSIONS: string[];
2
+ export { GITHUB_INSTRUCTIONS_PATTERN, OPENCODE_USER_RULE_DIRS, PROJECT_MARKERS, PROJECT_RULE_FILES, PROJECT_RULE_SUBDIRS, RULE_EXTENSIONS, USER_RULE_DIR, } from "@oh-my-opencode/rules-engine";
@@ -1,5 +1,5 @@
1
- export { createContentHash, getMatcherCacheStats, isDuplicateByContentHash, isDuplicateByRealPath, resetMatcherCache, shouldApplyRule, } from "@oh-my-opencode/rules-core";
2
- export type { MatchResult } from "@oh-my-opencode/rules-core";
1
+ export { createContentHash, getMatcherCacheStats, isDuplicateByContentHash, isDuplicateByRealPath, resetMatcherCache, shouldApplyRule, } from "@oh-my-opencode/rules-engine";
2
+ export type { MatchResult } from "@oh-my-opencode/rules-engine";
3
3
  export interface MatcherCacheStats {
4
4
  readonly entries: number;
5
5
  }
@@ -1,2 +1,2 @@
1
- export { parseRuleFrontmatter } from "@oh-my-opencode/rules-core";
2
- export type { RuleFrontmatterResult } from "@oh-my-opencode/rules-core";
1
+ export { parseRuleFrontmatter } from "@oh-my-opencode/rules-engine";
2
+ export type { RuleFrontmatterResult } from "@oh-my-opencode/rules-engine";
@@ -1 +1 @@
1
- export { clearProjectRootCache, findProjectRoot } from "@oh-my-opencode/rules-core";
1
+ export { clearProjectRootCache, findProjectRoot } from "@oh-my-opencode/rules-engine";
@@ -1 +1 @@
1
- export { calculateDistance } from "@oh-my-opencode/rules-core";
1
+ export { calculateDistance } from "@oh-my-opencode/rules-engine";
@@ -1,2 +1,2 @@
1
- export { findRuleFiles } from "@oh-my-opencode/rules-core";
2
- export type { FindRuleFilesOptions } from "@oh-my-opencode/rules-core";
1
+ export { findRuleFiles } from "@oh-my-opencode/rules-engine";
2
+ export type { FindRuleFilesOptions } from "@oh-my-opencode/rules-engine";
@@ -1,3 +1,3 @@
1
- import { safeRealpathSync } from "@oh-my-opencode/rules-core";
1
+ import { safeRealpathSync } from "@oh-my-opencode/rules-engine";
2
2
  export { safeRealpathSync };
3
3
  export declare function findRuleFilesRecursive(dir: string, results: string[]): void;
@@ -1,2 +1,2 @@
1
- export { createRuleScanCache } from "@oh-my-opencode/rules-core";
2
- export type { DirectoryScanEntry, RuleScanCache } from "@oh-my-opencode/rules-core";
1
+ export { createRuleScanCache } from "@oh-my-opencode/rules-engine";
2
+ export type { DirectoryScanEntry, RuleScanCache } from "@oh-my-opencode/rules-engine";
@@ -1,4 +1,4 @@
1
- import type { RuleFileCandidate, RuleMetadata } from "@oh-my-opencode/rules-core";
1
+ import type { RuleFileCandidate, RuleMetadata } from "@oh-my-opencode/rules-engine";
2
2
  export type { RuleFileCandidate, RuleMetadata };
3
3
  export interface RuleInfo {
4
4
  path: string;
@@ -1,2 +1,3 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
2
  export declare function hasIncompleteTodos(ctx: PluginInput, sessionID: string): Promise<boolean>;
3
+ export declare function hasPendingSessionWork(ctx: PluginInput, sessionID: string): Promise<boolean>;
@@ -1,2 +1,2 @@
1
1
  export declare const HOOK_NAME = "sisyphus-junior-notepad";
2
- export declare const NOTEPAD_DIRECTIVE = "\n<Work_Context>\n## Notepad Location (for recording learnings)\nNOTEPAD PATH: .omo/notepads/{plan-name}/\n- learnings.md: Record patterns, conventions, successful approaches\n- issues.md: Record problems, blockers, gotchas encountered\n- decisions.md: Record architectural choices and rationales\n- problems.md: Record unresolved issues, technical debt\n\nYou SHOULD append findings to notepad files after completing work.\nIMPORTANT: Always APPEND to notepad files - never overwrite or use Edit tool.\n\n## Plan Location (READ ONLY)\nPLAN PATH: .omo/plans/{plan-name}.md\n\nCRITICAL RULE: NEVER MODIFY THE PLAN FILE\n\nThe plan file (.omo/plans/*.md) is SACRED and READ-ONLY.\n- You may READ the plan to understand tasks\n- You may READ checkbox items to know what to do\n- You MUST NOT edit, modify, or update the plan file\n- You MUST NOT mark checkboxes as complete in the plan\n- Only the Orchestrator manages the plan file\n\nVIOLATION = IMMEDIATE FAILURE. The Orchestrator tracks plan state.\n</Work_Context>\n";
2
+ export declare const NOTEPAD_DIRECTIVE = "\n<Work_Context>\n## Notepad Location (for recording learnings)\nNOTEPAD PATH: .omo/notepads/{plan-name}/\n- learnings.md: Record patterns, conventions, successful approaches\n- issues.md: Record problems, blockers, gotchas encountered\n- decisions.md: Record architectural choices and rationales\n- problems.md: Record unresolved issues, technical debt\n\nYou SHOULD append findings to notepad files after completing work.\nIMPORTANT: Always APPEND to notepad files - never overwrite or use Edit tool.\n\n## Plan Location (subagent: READ ONLY)\nPLAN PATH: .omo/plans/{plan-name}.md\n\nSUBAGENT PLAN RESTRICTION (applies to YOU, the delegated worker \u2014 NOT to the Orchestrator):\n- You may READ the plan to understand your assigned tasks\n- You may READ checkbox items to know what to work on\n- You MUST NOT edit the plan file or mark checkboxes \u2014 that is the Orchestrator's job\n- The Orchestrator (Atlas) updates checkboxes after verifying your completed work\n</Work_Context>\n";
@@ -9,4 +9,5 @@ export declare function buildStartWorkContextInfo(params: {
9
9
  activeAgent: string;
10
10
  worktreePath: string | undefined;
11
11
  worktreeBlock: string;
12
+ preferredPlanPath?: string | null;
12
13
  }): string;
@@ -0,0 +1,7 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function findRecentSessionPlanPath(input: {
3
+ client: PluginInput["client"];
4
+ directory: string;
5
+ sessionID: string;
6
+ availablePlans: string[];
7
+ }): Promise<string | null>;
@@ -37,6 +37,7 @@ export interface SessionState {
37
37
  inFlight?: boolean;
38
38
  stagnationCount: number;
39
39
  consecutiveFailures: number;
40
+ allTodosCompletedAt?: number;
40
41
  recentCompactionAt?: number;
41
42
  recentCompactionEpoch?: number;
42
43
  acknowledgedCompactionEpoch?: number;