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
@@ -1 +1 @@
1
- export declare function generateHashlineDiff(oldContent: string, newContent: string, filePath: string): string;
1
+ export { generateHashlineDiff } from "@oh-my-opencode/hashline-core";
@@ -1,10 +1,2 @@
1
- import type { HashlineEdit } from "./types";
2
- type HashlineToolOp = "replace" | "append" | "prepend";
3
- export interface RawHashlineEdit {
4
- op?: HashlineToolOp;
5
- pos?: string;
6
- end?: string;
7
- lines?: string | string[] | null;
8
- }
9
- export declare function normalizeHashlineEdits(rawEdits: RawHashlineEdit[]): HashlineEdit[];
10
- export {};
1
+ export { normalizeHashlineEdits } from "@oh-my-opencode/hashline-core";
2
+ export type { RawHashlineEdit } from "@oh-my-opencode/hashline-core";
@@ -1,17 +1 @@
1
- export interface ReplaceEdit {
2
- op: "replace";
3
- pos: string;
4
- end?: string;
5
- lines: string | string[];
6
- }
7
- export interface AppendEdit {
8
- op: "append";
9
- pos?: string;
10
- lines: string | string[];
11
- }
12
- export interface PrependEdit {
13
- op: "prepend";
14
- pos?: string;
15
- lines: string | string[];
16
- }
17
- export type HashlineEdit = ReplaceEdit | AppendEdit | PrependEdit;
1
+ export type { ReplaceEdit, AppendEdit, PrependEdit, HashlineEdit } from "@oh-my-opencode/hashline-core";
@@ -1,20 +1,2 @@
1
- export interface LineRef {
2
- line: number;
3
- hash: string;
4
- }
5
- interface HashMismatch {
6
- line: number;
7
- expected: string;
8
- }
9
- export declare function normalizeLineRef(ref: string): string;
10
- export declare function parseLineRef(ref: string): LineRef;
11
- export declare function validateLineRef(lines: string[], ref: string): void;
12
- export declare class HashlineMismatchError extends Error {
13
- private readonly mismatches;
14
- private readonly fileLines;
15
- readonly remaps: ReadonlyMap<string, string>;
16
- constructor(mismatches: HashMismatch[], fileLines: string[]);
17
- static formatMessage(mismatches: HashMismatch[], fileLines: string[]): string;
18
- }
19
- export declare function validateLineRefs(lines: string[], refs: string[]): void;
20
- export {};
1
+ export { parseLineRef, validateLineRef, validateLineRefs, HashlineMismatchError, normalizeLineRef, } from "@oh-my-opencode/hashline-core";
2
+ export type { LineRef } from "@oh-my-opencode/hashline-core";
@@ -1 +1,8 @@
1
1
  export declare function extractLatestAssistantText(messages: unknown): string | null;
2
+ export interface AssistantOutcome {
3
+ text: string | null;
4
+ errorName: string | null;
5
+ hasAssistant: boolean;
6
+ completed: boolean;
7
+ }
8
+ export declare function extractLatestAssistantOutcome(messages: unknown): AssistantOutcome;
@@ -1,8 +1,16 @@
1
1
  import type { createOpencodeClient } from "@opencode-ai/sdk";
2
+ import { type AssistantOutcome } from "./assistant-message-extractor";
2
3
  type Client = ReturnType<typeof createOpencodeClient>;
3
4
  export interface PollOptions {
4
5
  pollIntervalMs?: number;
5
6
  timeoutMs?: number;
7
+ abortSignal?: AbortSignal;
8
+ allowStableIdleWithoutActivity?: boolean;
9
+ allowEmptyStableIdleWithoutActivity?: boolean;
6
10
  }
7
- export declare function pollSessionUntilIdle(client: Client, sessionID: string, options?: PollOptions): Promise<void>;
11
+ export declare function waitForLookAtSessionResult(client: Client, sessionID: string, options?: PollOptions): Promise<{
12
+ messages: unknown[];
13
+ outcome: AssistantOutcome;
14
+ statusType: string | null;
15
+ }>;
8
16
  export {};
@@ -0,0 +1,7 @@
1
+ import type { SpawnedProcess } from "../../shared/bun-spawn-shim";
2
+ export interface SearchProcessOutput {
3
+ readonly stdout: string;
4
+ readonly stderr: string;
5
+ readonly exitCode: number;
6
+ }
7
+ export declare function collectSearchProcessOutput(proc: SpawnedProcess, timeoutMs: number, timeoutMessage: string): Promise<SearchProcessOutput>;
@@ -1,4 +1,4 @@
1
1
  import { type ToolDefinition } from "@opencode-ai/plugin";
2
2
  import type { SkillLoadOptions } from "./types";
3
- export declare function createSkillTool(options?: SkillLoadOptions): ToolDefinition;
3
+ export declare function createSkillTool(options: SkillLoadOptions): ToolDefinition;
4
4
  export declare const skill: ToolDefinition;
@@ -30,6 +30,8 @@ export interface SkillLoadOptions {
30
30
  /** Git master configuration for watermark/co-author settings */
31
31
  gitMasterConfig?: GitMasterConfig;
32
32
  disabledSkills?: Set<string>;
33
+ /** Project directory for skill discovery and base directory resolution. Must be ctx.directory from PluginContext — process.cwd() is unsafe in OpenCode. */
34
+ directory: string;
33
35
  /** Browser automation provider for provider-gated skill filtering */
34
36
  browserProvider?: BrowserAutomationProvider;
35
37
  /** Whether team mode built-in docs should be exposed */
package/package.json CHANGED
@@ -1,13 +1,20 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "4.2.3",
3
+ "version": "4.3.1",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "type": "module",
8
8
  "workspaces": [
9
- "packages/rules-core",
10
- "packages/ast-grep-mcp"
9
+ "packages/rules-engine",
10
+ "packages/ast-grep-core",
11
+ "packages/ast-grep-mcp",
12
+ "packages/utils",
13
+ "packages/model-core",
14
+ "packages/comment-checker-core",
15
+ "packages/hashline-core",
16
+ "packages/boulder-state",
17
+ "packages/agents-md-core"
11
18
  ],
12
19
  "bin": {
13
20
  "oh-my-opencode": "bin/oh-my-opencode.js",
@@ -25,6 +32,7 @@
25
32
  "types": "./dist/index.d.ts",
26
33
  "import": "./dist/index.js"
27
34
  },
35
+ "./server": "./dist/index.js",
28
36
  "./schema.json": "./dist/oh-my-opencode.schema.json"
29
37
  },
30
38
  "scripts": {
@@ -41,7 +49,7 @@
41
49
  "prepublishOnly": "bun run clean && bun run build:lsp-tools-mcp && bun run build",
42
50
  "test:model-capabilities": "bun test src/shared/model-capability-aliases.test.ts src/shared/model-capability-guardrails.test.ts src/shared/model-capabilities.test.ts src/cli/doctor/checks/model-resolution.test.ts --bail",
43
51
  "typecheck": "tsgo --noEmit && bun run typecheck:packages",
44
- "typecheck:packages": "tsgo --noEmit -p packages/rules-core/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json",
52
+ "typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/ast-grep-core/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json",
45
53
  "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
46
54
  "test": "bun test",
47
55
  "build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build"
@@ -85,8 +93,15 @@
85
93
  "vscode-jsonrpc": "^8.2.1"
86
94
  },
87
95
  "devDependencies": {
96
+ "@oh-my-opencode/ast-grep-core": "workspace:*",
88
97
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
89
- "@oh-my-opencode/rules-core": "workspace:*",
98
+ "@oh-my-opencode/agents-md-core": "workspace:*",
99
+ "@oh-my-opencode/boulder-state": "workspace:*",
100
+ "@oh-my-opencode/comment-checker-core": "workspace:*",
101
+ "@oh-my-opencode/hashline-core": "workspace:*",
102
+ "@oh-my-opencode/model-core": "workspace:*",
103
+ "@oh-my-opencode/rules-engine": "workspace:*",
104
+ "@oh-my-opencode/utils": "workspace:*",
90
105
  "@typescript/native-preview": "7.0.0-dev.20260518.1",
91
106
  "@types/js-yaml": "^4.0.9",
92
107
  "@types/picomatch": "^4.0.3",
@@ -95,17 +110,17 @@
95
110
  "zod": "^4.4.3"
96
111
  },
97
112
  "optionalDependencies": {
98
- "oh-my-opencode-darwin-arm64": "4.2.3",
99
- "oh-my-opencode-darwin-x64": "4.2.3",
100
- "oh-my-opencode-darwin-x64-baseline": "4.2.3",
101
- "oh-my-opencode-linux-arm64": "4.2.3",
102
- "oh-my-opencode-linux-arm64-musl": "4.2.3",
103
- "oh-my-opencode-linux-x64": "4.2.3",
104
- "oh-my-opencode-linux-x64-baseline": "4.2.3",
105
- "oh-my-opencode-linux-x64-musl": "4.2.3",
106
- "oh-my-opencode-linux-x64-musl-baseline": "4.2.3",
107
- "oh-my-opencode-windows-x64": "4.2.3",
108
- "oh-my-opencode-windows-x64-baseline": "4.2.3"
113
+ "oh-my-opencode-darwin-arm64": "4.3.1",
114
+ "oh-my-opencode-darwin-x64": "4.3.1",
115
+ "oh-my-opencode-darwin-x64-baseline": "4.3.1",
116
+ "oh-my-opencode-linux-arm64": "4.3.1",
117
+ "oh-my-opencode-linux-arm64-musl": "4.3.1",
118
+ "oh-my-opencode-linux-x64": "4.3.1",
119
+ "oh-my-opencode-linux-x64-baseline": "4.3.1",
120
+ "oh-my-opencode-linux-x64-musl": "4.3.1",
121
+ "oh-my-opencode-linux-x64-musl-baseline": "4.3.1",
122
+ "oh-my-opencode-windows-x64": "4.3.1",
123
+ "oh-my-opencode-windows-x64-baseline": "4.3.1"
109
124
  },
110
125
  "overrides": {
111
126
  "hono": "^4.12.18",