oh-my-opencode 4.5.12 → 4.7.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 (189) hide show
  1. package/.agents/skills/opencode-qa/SKILL.md +194 -0
  2. package/.agents/skills/opencode-qa/references/cli-commands.md +188 -0
  3. package/.agents/skills/opencode-qa/references/db-investigation.md +197 -0
  4. package/.agents/skills/opencode-qa/references/events-hooks.md +110 -0
  5. package/.agents/skills/opencode-qa/references/sdk.md +96 -0
  6. package/.agents/skills/opencode-qa/references/server-api.md +200 -0
  7. package/.agents/skills/opencode-qa/references/testing-harness.md +218 -0
  8. package/.agents/skills/opencode-qa/references/tui-tmux.md +52 -0
  9. package/.agents/skills/opencode-qa/scripts/db-session-by-id.sh +53 -0
  10. package/.agents/skills/opencode-qa/scripts/db-session-by-name.sh +57 -0
  11. package/.agents/skills/opencode-qa/scripts/db-session-by-text.sh +158 -0
  12. package/.agents/skills/opencode-qa/scripts/export-roundtrip.sh +57 -0
  13. package/.agents/skills/opencode-qa/scripts/lib/common.sh +216 -0
  14. package/.agents/skills/opencode-qa/scripts/server-smoke.sh +64 -0
  15. package/.agents/skills/opencode-qa/scripts/sse-hook-probe.sh +106 -0
  16. package/.agents/skills/opencode-qa/scripts/tui-smoke.sh +89 -0
  17. package/README.ja.md +13 -3
  18. package/README.ko.md +13 -3
  19. package/README.md +24 -14
  20. package/README.ru.md +13 -3
  21. package/README.zh-cn.md +13 -3
  22. package/bin/oh-my-opencode.js +4 -3
  23. package/bin/oh-my-opencode.test.ts +35 -7
  24. package/bin/platform.d.ts +1 -1
  25. package/bin/platform.js +4 -4
  26. package/bin/platform.test.ts +31 -9
  27. package/bin/version-mismatch.js +47 -0
  28. package/bin/version-mismatch.test.ts +120 -0
  29. package/dist/cli/cleanup-command.d.ts +4 -0
  30. package/dist/cli/cleanup.d.ts +11 -0
  31. package/dist/cli/cli-program.d.ts +2 -1
  32. package/dist/cli/codex-ulw-loop.d.ts +12 -0
  33. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +2 -0
  34. package/dist/cli/index.js +2189 -529
  35. package/dist/cli/install-codex/codex-cache.d.ts +1 -0
  36. package/dist/cli/install-codex/codex-cleanup-config.d.ts +6 -0
  37. package/dist/cli/install-codex/codex-cleanup.d.ts +21 -0
  38. package/dist/cli/install-codex/codex-config-permissions.d.ts +1 -0
  39. package/dist/cli/install-codex/codex-config-reasoning.d.ts +2 -0
  40. package/dist/cli/install-codex/codex-config-toml.d.ts +2 -1
  41. package/dist/cli/install-codex/codex-installation-detection.d.ts +36 -0
  42. package/dist/cli/install-codex/codex-model-catalog.d.ts +13 -0
  43. package/dist/cli/install-codex/codex-package-layout.d.ts +1 -0
  44. package/dist/cli/install-codex/codex-project-local-cleanup-best-effort.d.ts +7 -0
  45. package/dist/cli/install-codex/codex-project-local-cleanup.d.ts +35 -0
  46. package/dist/cli/install-codex/git-bash.d.ts +35 -0
  47. package/dist/cli/install-codex/index.d.ts +4 -0
  48. package/dist/cli/install-codex/toml-section-editor.d.ts +2 -0
  49. package/dist/cli/install-codex/types.d.ts +20 -0
  50. package/dist/cli/run/event-state.d.ts +1 -0
  51. package/dist/cli/run/poll-for-completion.d.ts +1 -0
  52. package/dist/cli/run/prompt-start.d.ts +7 -0
  53. package/dist/cli/star-request.d.ts +9 -0
  54. package/dist/config/schema/hooks.d.ts +0 -1
  55. package/dist/create-hooks.d.ts +0 -1
  56. package/dist/features/background-agent/concurrency.d.ts +1 -0
  57. package/dist/features/background-agent/process-cleanup.d.ts +6 -0
  58. package/dist/features/builtin-skills/skills/debugging.d.ts +2 -0
  59. package/dist/features/builtin-skills/skills/index.d.ts +1 -0
  60. package/dist/features/claude-code-session-state/state.d.ts +1 -0
  61. package/dist/features/opencode-skill-loader/index.d.ts +1 -0
  62. package/dist/features/opencode-skill-loader/opencode-config-skills-reader.d.ts +5 -0
  63. package/dist/features/tmux-subagent/attachable-session-status.d.ts +1 -1
  64. package/dist/features/tmux-subagent/session-status-parser.d.ts +1 -0
  65. package/dist/hooks/comment-checker/cli.d.ts +1 -0
  66. package/dist/hooks/index.d.ts +0 -1
  67. package/dist/hooks/tasks-todowrite-disabler/constants.d.ts +1 -1
  68. package/dist/index.js +1077 -563
  69. package/dist/plugin/hooks/create-core-hooks.d.ts +0 -1
  70. package/dist/plugin/hooks/create-session-hooks.d.ts +1 -2
  71. package/dist/plugin/messages-transform.d.ts +8 -1
  72. package/dist/plugin/user-abort-interrupted-recovery-guard.d.ts +6 -0
  73. package/dist/shared/command-executor/execute-hook-command.d.ts +2 -0
  74. package/dist/shared/prompt-async-gate/recent-dispatches.d.ts +14 -0
  75. package/dist/shared/prompt-async-gate/semantic-dedupe.d.ts +7 -0
  76. package/dist/shared/prompt-async-gate/session-idle-dispatch.d.ts +1 -0
  77. package/dist/shared/prompt-async-gate/timing.d.ts +1 -0
  78. package/dist/shared/prompt-async-gate/types.d.ts +2 -0
  79. package/dist/shared/prompt-async-gate.d.ts +1 -1
  80. package/dist/tools/skill/description-formatter.d.ts +5 -1
  81. package/dist/tools/skill/types.d.ts +1 -0
  82. package/package.json +22 -18
  83. package/packages/ast-grep-mcp/dist/cli.js +53 -9
  84. package/packages/git-bash-mcp/dist/cli.js +367 -0
  85. package/packages/lsp-tools-mcp/dist/lsp/process.js +1 -1
  86. package/packages/omo-codex/plugin/.mcp.json +11 -0
  87. package/packages/omo-codex/plugin/components/comment-checker/README.md +1 -1
  88. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +29 -0
  89. package/packages/omo-codex/plugin/components/git-bash/package.json +23 -0
  90. package/packages/omo-codex/plugin/components/git-bash/src/cli.ts +33 -0
  91. package/packages/omo-codex/plugin/components/git-bash/src/codex-hook.ts +180 -0
  92. package/packages/omo-codex/plugin/components/git-bash/src/index.ts +10 -0
  93. package/packages/omo-codex/plugin/components/git-bash/test/codex-hook.test.ts +195 -0
  94. package/packages/omo-codex/plugin/components/git-bash/tsconfig.build.json +13 -0
  95. package/packages/omo-codex/plugin/components/git-bash/tsconfig.json +25 -0
  96. package/packages/omo-codex/plugin/components/lsp/README.md +1 -1
  97. package/packages/omo-codex/plugin/components/lsp/src/cli.ts +5 -5
  98. package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +33 -0
  99. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +19 -27
  100. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-cli.test.ts +28 -0
  101. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-errors.test.ts +55 -0
  102. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +7 -5
  103. package/packages/omo-codex/plugin/components/rules/README.md +1 -1
  104. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +6 -4
  105. package/packages/omo-codex/plugin/components/rules/bundled-rules/windows-git-bash.md +10 -0
  106. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +0 -2
  107. package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +3 -1
  108. package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +97 -0
  109. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +6 -5
  110. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +22 -0
  111. package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +1 -1
  112. package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
  113. package/packages/omo-codex/plugin/components/ultrawork/agents/codex-ultrawork-reviewer.toml +4 -1
  114. package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +8 -7
  115. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +9 -8
  116. package/packages/omo-codex/plugin/components/ultrawork/directive.md +32 -6
  117. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +27 -4
  118. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +25 -0
  119. package/packages/omo-codex/plugin/components/ulw-loop/README.md +1 -1
  120. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +28 -205
  121. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +231 -0
  122. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +12 -1
  123. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint.test.ts +19 -1
  124. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +102 -5
  125. package/packages/omo-codex/plugin/hooks/hooks.json +35 -2
  126. package/packages/omo-codex/plugin/model-catalog.json +49 -0
  127. package/packages/omo-codex/plugin/package-lock.json +19 -0
  128. package/packages/omo-codex/plugin/package.json +3 -1
  129. package/packages/omo-codex/plugin/scripts/auto-update.mjs +159 -0
  130. package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +16 -1
  131. package/packages/omo-codex/plugin/scripts/build-components.mjs +2 -1
  132. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +269 -0
  133. package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +89 -0
  134. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -6
  135. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +6 -6
  136. package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +127 -0
  137. package/packages/omo-codex/plugin/skills/lcx-report-bug/agents/openai.yaml +9 -0
  138. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +6 -6
  139. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +6 -6
  140. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +33 -8
  141. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +25 -5
  142. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +28 -205
  143. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +231 -0
  144. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +17 -17
  145. package/packages/omo-codex/plugin/test/aggregate.test.mjs +188 -20
  146. package/packages/omo-codex/plugin/test/auto-update.test.mjs +129 -0
  147. package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +58 -11
  148. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +34 -0
  149. package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +21 -0
  150. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +146 -0
  151. package/packages/omo-codex/plugin/test/node-install-surface.test.mjs +48 -0
  152. package/packages/omo-codex/plugin/test/subagent-guidance.test.mjs +76 -0
  153. package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +67 -0
  154. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +54 -2
  155. package/packages/omo-codex/scripts/install/cache.mjs +5 -3
  156. package/packages/omo-codex/scripts/install/cli-args.mjs +112 -0
  157. package/packages/omo-codex/scripts/install/config.mjs +23 -1
  158. package/packages/omo-codex/scripts/install/delegated-command.mjs +25 -0
  159. package/packages/omo-codex/scripts/install/git-bash.mjs +99 -0
  160. package/packages/omo-codex/scripts/install/git-bash.test.mjs +174 -0
  161. package/packages/omo-codex/scripts/install/legacy-bins.mjs +1 -0
  162. package/packages/omo-codex/scripts/install/mcp-runtime-cache.mjs +5 -1
  163. package/packages/omo-codex/scripts/install/model-catalog.mjs +66 -0
  164. package/packages/omo-codex/scripts/install/multi-agent-v2-config.mjs +7 -1
  165. package/packages/omo-codex/scripts/install/permissions.d.mts +1 -0
  166. package/packages/omo-codex/scripts/install/permissions.mjs +26 -0
  167. package/packages/omo-codex/scripts/install/project-local-cleanup.mjs +229 -0
  168. package/packages/omo-codex/scripts/install/reasoning-config.mjs +72 -0
  169. package/packages/omo-codex/scripts/install/source-package-build.mjs +20 -0
  170. package/packages/omo-codex/scripts/install/toml-editor.mjs +19 -2
  171. package/packages/omo-codex/scripts/install-bin-links.test.mjs +23 -0
  172. package/packages/omo-codex/scripts/install-cli-args.test.mjs +146 -0
  173. package/packages/omo-codex/scripts/install-config-autonomous.test.mjs +48 -0
  174. package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +141 -0
  175. package/packages/omo-codex/scripts/install-config.test.mjs +205 -0
  176. package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +157 -0
  177. package/packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs +145 -0
  178. package/packages/omo-codex/scripts/install-local.mjs +91 -8
  179. package/packages/omo-codex/scripts/install-local.test.mjs +15 -0
  180. package/packages/omo-codex/scripts/install-mcp-runtime.test.mjs +60 -0
  181. package/packages/omo-codex/scripts/install-packaged-local.test.mjs +67 -0
  182. package/packages/omo-codex/scripts/install-project-local-cleanup.test.mjs +277 -0
  183. package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +127 -0
  184. package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +9 -0
  185. package/packages/shared-skills/skills/review-work/SKILL.md +33 -8
  186. package/packages/shared-skills/skills/start-work/SKILL.md +25 -5
  187. package/packages/shared-skills/skills/ulw-plan/SKILL.md +11 -11
  188. package/postinstall.mjs +36 -3
  189. package/dist/hooks/context-window-monitor.d.ts +0 -19
@@ -1,6 +1,7 @@
1
1
  import type { InstalledPlugin, RunCommand } from "./types";
2
2
  type LinkPlatform = NodeJS.Platform;
3
3
  export declare function installCachedPlugin(input: {
4
+ readonly buildSource?: boolean;
4
5
  readonly codexHome: string;
5
6
  readonly marketplaceName: string;
6
7
  readonly name: string;
@@ -0,0 +1,6 @@
1
+ export declare const MANAGED_CODEX_AGENT_NAMES: readonly ["codex-ultrawork-reviewer", "explorer", "librarian", "metis", "momus", "plan"];
2
+ export declare function cleanupCodexLightConfigText(config: string): string;
3
+ export declare function cleanupCodexConfig(configPath: string, now: (() => Date) | undefined): Promise<{
4
+ readonly changed: boolean;
5
+ readonly backupPath?: string;
6
+ }>;
@@ -0,0 +1,21 @@
1
+ import type { ProjectLocalCodexCleanupResult } from "./codex-project-local-cleanup";
2
+ export interface CodexCleanupOptions {
3
+ readonly codexHome?: string;
4
+ readonly projectDirectory?: string;
5
+ readonly env?: {
6
+ readonly [key: string]: string | undefined;
7
+ };
8
+ readonly now?: () => Date;
9
+ }
10
+ export interface CodexCleanupResult {
11
+ readonly codexHome: string;
12
+ readonly configPath: string;
13
+ readonly configChanged: boolean;
14
+ readonly configBackupPath?: string;
15
+ readonly removedPaths: readonly string[];
16
+ readonly removedAgentLinks: readonly string[];
17
+ readonly skippedAgentLinks: readonly string[];
18
+ readonly projectCleanup: ProjectLocalCodexCleanupResult;
19
+ }
20
+ export declare function cleanupCodexLight(input?: CodexCleanupOptions): Promise<CodexCleanupResult>;
21
+ export { cleanupCodexLightConfigText } from "./codex-cleanup-config";
@@ -0,0 +1 @@
1
+ export { ensureAutonomousPermissions } from "../../../packages/omo-codex/scripts/install/permissions.mjs";
@@ -0,0 +1,2 @@
1
+ import type { CodexModelCatalog } from "./codex-model-catalog";
2
+ export declare function ensureCodexReasoningConfig(config: string, catalog: CodexModelCatalog): string;
@@ -1,10 +1,11 @@
1
- import type { CodexAgentConfig, CodexMarketplaceSource, TrustedHookState } from "./types";
1
+ import type { CodexAgentConfig, CodexInstallPlatform, CodexMarketplaceSource, TrustedHookState } from "./types";
2
2
  export declare function updateCodexConfig(input: {
3
3
  readonly configPath: string;
4
4
  readonly repoRoot: string;
5
5
  readonly marketplaceName: string;
6
6
  readonly marketplaceSource: CodexMarketplaceSource;
7
7
  readonly pluginNames: readonly string[];
8
+ readonly platform?: CodexInstallPlatform;
8
9
  readonly trustedHookStates?: readonly TrustedHookState[];
9
10
  readonly agentConfigs?: readonly CodexAgentConfig[];
10
11
  readonly autonomousPermissions?: boolean;
@@ -0,0 +1,36 @@
1
+ import type { CodexInstallPlatform } from "./types";
2
+ export type CodexInstallationSource = "cli" | "mac-app" | "windows-standard-cli" | "windows-start-app";
3
+ type CodexInstallationPathSource = Exclude<CodexInstallationSource, "windows-start-app">;
4
+ export type CodexInstallationDetection = {
5
+ readonly found: true;
6
+ readonly source: CodexInstallationPathSource;
7
+ readonly path: string;
8
+ } | {
9
+ readonly found: true;
10
+ readonly source: "windows-start-app";
11
+ readonly appId: string;
12
+ } | {
13
+ readonly found: false;
14
+ readonly checkedPaths: readonly string[];
15
+ readonly hint: string;
16
+ readonly downloadedInstallerPath?: string;
17
+ };
18
+ export interface CodexInstallationCommandResult {
19
+ readonly success: boolean;
20
+ readonly stdout: string;
21
+ }
22
+ export interface CodexInstallationDetectorInput {
23
+ readonly platform?: CodexInstallPlatform;
24
+ readonly env?: {
25
+ readonly [key: string]: string | undefined;
26
+ };
27
+ readonly homeDir?: string;
28
+ readonly exists?: (path: string) => boolean;
29
+ readonly which?: (command: "codex") => string | null | undefined;
30
+ readonly runCommand?: (command: string, args: readonly string[]) => Promise<CodexInstallationCommandResult>;
31
+ }
32
+ export declare function detectCodexInstallation(input?: CodexInstallationDetectorInput): Promise<CodexInstallationDetection>;
33
+ export declare function formatCodexInstallationWarning(detection: Extract<CodexInstallationDetection, {
34
+ readonly found: false;
35
+ }>): string;
36
+ export {};
@@ -0,0 +1,13 @@
1
+ export type CodexReasoningProfile = {
2
+ readonly model: string;
3
+ readonly modelContextWindow: number;
4
+ readonly modelReasoningEffort: string;
5
+ readonly planModeReasoningEffort: string;
6
+ };
7
+ export type CodexReasoningProfileMatch = Partial<CodexReasoningProfile>;
8
+ export type CodexModelCatalog = {
9
+ readonly current: CodexReasoningProfile;
10
+ readonly managedProfiles: readonly CodexReasoningProfileMatch[];
11
+ };
12
+ export declare function readCodexModelCatalog(codexPackageRoot: string): Promise<CodexModelCatalog>;
13
+ export declare function readCodexReasoningProfile(codexPackageRoot: string): Promise<CodexReasoningProfile>;
@@ -0,0 +1 @@
1
+ export declare function shouldBuildSourcePackages(repoRoot: string): Promise<boolean>;
@@ -0,0 +1,7 @@
1
+ import type { ProjectLocalCodexCleanupResult } from "./codex-project-local-cleanup";
2
+ export declare function repairProjectLocalCodexArtifactsBestEffort(input: {
3
+ readonly startDirectory: string;
4
+ readonly codexHome: string;
5
+ readonly now?: () => Date;
6
+ readonly log: (message: string) => void;
7
+ }): Promise<ProjectLocalCodexCleanupResult>;
@@ -0,0 +1,35 @@
1
+ declare const LEGACY_AGENT_CONFLICT_KEYS: readonly ["max_threads"];
2
+ type LegacyAgentConflictKey = (typeof LEGACY_AGENT_CONFLICT_KEYS)[number];
3
+ export interface ProjectLocalCodexConfigCleanup {
4
+ readonly projectRoot: string;
5
+ readonly configPath: string;
6
+ readonly changed: boolean;
7
+ readonly removedKeys: readonly LegacyAgentConflictKey[];
8
+ readonly backupPath?: string;
9
+ }
10
+ export interface ProjectLocalCodexArtifact {
11
+ readonly relativePath: string;
12
+ readonly path: string;
13
+ readonly kind: "directory" | "file" | "other";
14
+ }
15
+ export interface ProjectLocalCodexCleanupResult {
16
+ readonly projectRoot: string | null;
17
+ readonly configPath: string | null;
18
+ readonly changed: boolean;
19
+ readonly removedKeys: readonly LegacyAgentConflictKey[];
20
+ readonly backupPath?: string;
21
+ readonly configs: readonly ProjectLocalCodexConfigCleanup[];
22
+ readonly artifacts: readonly ProjectLocalCodexArtifact[];
23
+ }
24
+ export declare function repairNearestProjectLocalCodexArtifacts(input: {
25
+ readonly startDirectory: string;
26
+ readonly codexHome?: string;
27
+ readonly now?: () => Date;
28
+ }): Promise<ProjectLocalCodexCleanupResult>;
29
+ export declare function emptyProjectLocalCodexCleanupResult(): ProjectLocalCodexCleanupResult;
30
+ export declare function repairProjectLocalCodexConfigText(config: string): {
31
+ readonly config: string;
32
+ readonly changed: boolean;
33
+ readonly removedKeys: readonly LegacyAgentConflictKey[];
34
+ };
35
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { RunCommand } from "./types";
2
+ export type GitBashSource = "not-required" | "env" | "program-files" | "program-files-x86" | "path";
3
+ export type GitBashResolution = {
4
+ readonly found: true;
5
+ readonly path: string | null;
6
+ readonly source: GitBashSource;
7
+ } | {
8
+ readonly found: false;
9
+ readonly checkedPaths: readonly string[];
10
+ readonly installHint: string;
11
+ };
12
+ export interface GitBashResolverInput {
13
+ readonly platform: string;
14
+ readonly env: {
15
+ readonly [key: string]: string | undefined;
16
+ };
17
+ readonly exists: (path: string) => boolean;
18
+ readonly where: (command: "bash") => readonly string[];
19
+ }
20
+ export declare function resolveGitBash(input: GitBashResolverInput): GitBashResolution;
21
+ export declare function resolveGitBashForCurrentProcess(input?: {
22
+ readonly platform?: string;
23
+ readonly env?: {
24
+ readonly [key: string]: string | undefined;
25
+ };
26
+ }): GitBashResolution;
27
+ export declare function prepareGitBashForInstall(input: {
28
+ readonly platform: string;
29
+ readonly env: {
30
+ readonly [key: string]: string | undefined;
31
+ };
32
+ readonly cwd: string;
33
+ readonly runCommand: RunCommand;
34
+ readonly resolveGitBash?: () => GitBashResolution;
35
+ }): Promise<GitBashResolution>;
@@ -1,5 +1,9 @@
1
1
  export type { CodexInstallOptions, CodexInstallResult, InstalledPlugin, MarketplaceManifest, PluginManifest, TrustedHookState, } from "./types";
2
+ export type { CodexCleanupResult } from "./codex-cleanup";
3
+ export type { CodexInstallationDetection, CodexInstallationDetectorInput } from "./codex-installation-detection";
2
4
  export { runCodexInstaller } from "./install-codex";
5
+ export { detectCodexInstallation, formatCodexInstallationWarning } from "./codex-installation-detection";
6
+ export { cleanupCodexLight, cleanupCodexLightConfigText } from "./codex-cleanup";
3
7
  export { readMarketplace, readPluginManifest, resolvePluginSource, validatePathSegment } from "./codex-marketplace";
4
8
  export { installCachedPlugin, linkCachedPluginBins, pruneMarketplaceCache, rewriteCachedMcpManifest } from "./codex-cache";
5
9
  export { updateCodexConfig } from "./codex-config-toml";
@@ -6,4 +6,6 @@ export interface TomlSection {
6
6
  export declare function findTomlSection(config: string, header: string): TomlSection | null;
7
7
  export declare function replaceOrInsertSetting(config: string, section: TomlSection, key: string, value: string): string;
8
8
  export declare function removeSetting(config: string, section: TomlSection, key: string): string;
9
+ export declare function replaceOrInsertRootSetting(config: string, key: string, value: string): string;
9
10
  export declare function appendBlock(config: string, block: string): string;
11
+ export declare function escapeRegExp(value: string): string;
@@ -1,3 +1,4 @@
1
+ import type { ProjectLocalCodexCleanupResult } from "./codex-project-local-cleanup";
1
2
  export interface MarketplacePluginSourceLocal {
2
3
  readonly source: "local";
3
4
  readonly path: string;
@@ -40,10 +41,27 @@ export interface CommandRunOptions {
40
41
  readonly cwd: string;
41
42
  }
42
43
  export type RunCommand = (command: string, args: readonly string[], options: CommandRunOptions) => Promise<void>;
44
+ export type CodexInstallPlatform = "aix" | "android" | "darwin" | "freebsd" | "haiku" | "linux" | "openbsd" | "sunos" | "win32" | "cygwin" | "netbsd";
45
+ export type GitBashResolution = {
46
+ readonly found: true;
47
+ readonly path: string | null;
48
+ readonly source: "not-required" | "env" | "program-files" | "program-files-x86" | "path";
49
+ } | {
50
+ readonly found: false;
51
+ readonly checkedPaths: readonly string[];
52
+ readonly installHint: string;
53
+ };
54
+ export type GitBashResolver = () => GitBashResolution;
43
55
  export interface CodexInstallOptions {
44
56
  readonly codexHome?: string;
45
57
  readonly binDir?: string;
46
58
  readonly repoRoot?: string;
59
+ readonly projectDirectory?: string;
60
+ readonly platform?: CodexInstallPlatform;
61
+ readonly env?: {
62
+ readonly [key: string]: string | undefined;
63
+ };
64
+ readonly gitBashResolver?: GitBashResolver;
47
65
  readonly autonomousPermissions?: boolean;
48
66
  readonly runCommand?: RunCommand;
49
67
  readonly log?: (message: string) => void;
@@ -53,4 +71,6 @@ export interface CodexInstallResult {
53
71
  readonly installed: readonly InstalledPlugin[];
54
72
  readonly configPath: string;
55
73
  readonly codexHome: string;
74
+ readonly gitBashPath: string | null;
75
+ readonly projectCleanup: ProjectLocalCodexCleanupResult;
56
76
  }
@@ -1,5 +1,6 @@
1
1
  export interface EventState {
2
2
  mainSessionIdle: boolean;
3
+ mainSessionStarted: boolean;
3
4
  mainSessionError: boolean;
4
5
  lastError: string | null;
5
6
  lastOutput: string;
@@ -6,5 +6,6 @@ export interface PollOptions {
6
6
  minStabilizationMs?: number;
7
7
  eventWatchdogMs?: number;
8
8
  secondaryMeaningfulWorkTimeoutMs?: number;
9
+ requireMeaningfulWork?: boolean;
9
10
  }
10
11
  export declare function pollForCompletion(ctx: RunContext, eventState: EventState, abortController: AbortController, options?: PollOptions): Promise<number>;
@@ -0,0 +1,7 @@
1
+ import type { EventState } from "./events";
2
+ import type { RunContext } from "./types";
3
+ export interface PromptStartOptions {
4
+ timeoutMs?: number;
5
+ pollIntervalMs?: number;
6
+ }
7
+ export declare function waitForPromptStart(ctx: RunContext, eventState: EventState, abortController: AbortController, options?: PromptStartOptions): Promise<void>;
@@ -1,2 +1,11 @@
1
+ import type { InstallPlatform } from "./types";
1
2
  export declare const STAR_REPOSITORIES: readonly ["code-yeongyu/oh-my-openagent", "code-yeongyu/lazycodex"];
3
+ export interface GitHubStarResult {
4
+ readonly repository: string;
5
+ readonly ok: boolean;
6
+ readonly error?: string;
7
+ }
8
+ export type GitHubStarCommandRunner = (repository: string) => Promise<void>;
2
9
  export declare function formatGitHubStarCommand(repository: string): string;
10
+ export declare function runGitHubStarCommand(repository: string): Promise<void>;
11
+ export declare function starGitHubRepositories(platform?: InstallPlatform, runCommand?: GitHubStarCommandRunner): Promise<readonly GitHubStarResult[]>;
@@ -4,7 +4,6 @@ export declare const HookNameSchema: z.ZodEnum<{
4
4
  "ralph-loop": "ralph-loop";
5
5
  "start-work": "start-work";
6
6
  "todo-continuation-enforcer": "todo-continuation-enforcer";
7
- "context-window-monitor": "context-window-monitor";
8
7
  "session-recovery": "session-recovery";
9
8
  "session-notification": "session-notification";
10
9
  "comment-checker": "comment-checker";
@@ -64,7 +64,6 @@ export declare function createHooks(args: {
64
64
  teamToolGating: ReturnType<typeof import("./hooks").createTeamToolGating> | null;
65
65
  notepadWriteGuard: ReturnType<typeof import("./hooks").createNotepadWriteGuardHook> | null;
66
66
  planFormatValidator: ReturnType<typeof import("./hooks").createPlanFormatValidatorHook> | null;
67
- contextWindowMonitor: ReturnType<typeof import("./hooks").createContextWindowMonitorHook> | null;
68
67
  preemptiveCompaction: ReturnType<typeof import("./hooks").createPreemptiveCompactionHook> | null;
69
68
  sessionRecovery: ReturnType<typeof import("./hooks").createSessionRecoveryHook> | null;
70
69
  sessionNotification: ReturnType<typeof import("./hooks").createSessionNotification> | null;
@@ -5,6 +5,7 @@ export declare class ConcurrencyManager {
5
5
  private queues;
6
6
  constructor(config?: BackgroundTaskConfig);
7
7
  getConcurrencyLimit(model: string): number;
8
+ getConcurrencyKey(model: string): string;
8
9
  acquire(model: string): Promise<void>;
9
10
  release(model: string): void;
10
11
  /**
@@ -2,8 +2,14 @@
2
2
  export declare function __disableScheduledForcedExitForTesting(): void;
3
3
  /** @internal test-only */
4
4
  export declare function __enableScheduledForcedExitForTesting(): void;
5
+ /** @internal test-only seam */
6
+ export declare function __isShutdownInProgressForTesting(): boolean;
7
+ /** @internal test-only seam */
8
+ export declare function __setShutdownInProgressForTesting(value: boolean): void;
5
9
  /** @internal test-only seam: exposes the error normalizer used by registerErrorEvent. */
6
10
  export declare function describeProcessCleanupError(error: unknown): Record<string, unknown>;
11
+ /** @internal test-only seam: exposes the harmless-error filter used by registerErrorEvent. */
12
+ export declare function isHarmlessShutdownError(error: unknown): boolean;
7
13
  interface CleanupTarget {
8
14
  shutdown(): void | Promise<void>;
9
15
  }
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const debuggingSkill: BuiltinSkill;
@@ -6,6 +6,7 @@ export { devBrowserSkill } from "./dev-browser";
6
6
  export { reviewWorkSkill } from "./review-work";
7
7
  export { removeAiSlopsSkill } from "./remove-ai-slops";
8
8
  export { initDeepSkill } from "./init-deep";
9
+ export { debuggingSkill } from "./debugging";
9
10
  export { securityResearchSkill } from "./security-research";
10
11
  export { securityReviewSkill } from "./security-review";
11
12
  export * from "./team-mode";
@@ -3,6 +3,7 @@ export declare const syncSubagentSessions: Set<string>;
3
3
  export declare function setMainSession(id: string | undefined): void;
4
4
  export declare function getMainSessionID(): string | undefined;
5
5
  export declare function registerAgentName(name: string): void;
6
+ export declare function clearRegisteredAgentNames(): void;
6
7
  export declare function isAgentRegistered(name: string): boolean;
7
8
  export declare function resolveRegisteredAgentName(name: string | undefined): string | undefined;
8
9
  /** @internal For testing only */
@@ -13,3 +13,4 @@ export * from "./skill-resolution-options";
13
13
  export * from "./loaded-skill-template-extractor";
14
14
  export * from "./skill-template-resolver";
15
15
  export * from "./config-source-discovery";
16
+ export * from "./opencode-config-skills-reader";
@@ -0,0 +1,5 @@
1
+ export interface HostSkillConfigShape {
2
+ paths?: string[];
3
+ urls?: string[];
4
+ }
5
+ export declare function readOpencodeConfigSkills(directory: string): HostSkillConfigShape | undefined;
@@ -1,4 +1,4 @@
1
- declare const ATTACHABLE_SESSION_STATUSES: readonly ["idle", "running", "busy"];
1
+ declare const ATTACHABLE_SESSION_STATUSES: readonly ["idle", "running", "busy", "retry"];
2
2
  export type AttachableSessionStatus = (typeof ATTACHABLE_SESSION_STATUSES)[number];
3
3
  export declare function isAttachableSessionStatus(status: string | undefined): status is AttachableSessionStatus;
4
4
  export {};
@@ -1,5 +1,6 @@
1
1
  type SessionStatus = {
2
2
  type: string;
3
3
  };
4
+ export declare function parseSessionStatusResponse(response: unknown): Record<string, SessionStatus>;
4
5
  export declare function parseSessionStatusMap(data: unknown): Record<string, SessionStatus>;
5
6
  export {};
@@ -1,4 +1,5 @@
1
1
  import { type CheckResult, type HookInput } from "@oh-my-opencode/comment-checker-core";
2
+ export declare function resolveCommentCheckerPathFromPath(binaryName: string, which?: (binary: string) => string | null): string | null;
2
3
  /**
3
4
  * Asynchronously get comment-checker binary path.
4
5
  * Will trigger lazy download if binary not found.
@@ -1,5 +1,4 @@
1
1
  export { createTodoContinuationEnforcer, type TodoContinuationEnforcer } from "./todo-continuation-enforcer";
2
- export { createContextWindowMonitorHook } from "./context-window-monitor";
3
2
  export { createSessionNotification } from "./session-notification";
4
3
  export { sendSessionNotification, playSessionNotificationSound, detectPlatform, getDefaultSoundPath } from "./session-notification-sender";
5
4
  export { buildWindowsToastScript, escapeAppleScriptText, escapePowerShellSingleQuotedText } from "./session-notification-formatting";
@@ -1,3 +1,3 @@
1
1
  export declare const HOOK_NAME = "tasks-todowrite-disabler";
2
2
  export declare const BLOCKED_TOOLS: string[];
3
- export declare const REPLACEMENT_MESSAGE = "TodoRead/TodoWrite are DISABLED because experimental.task_system is enabled.\n\n**ACTION REQUIRED**: RE-REGISTER what you were about to write as Todo using Task tools NOW. Then ASSIGN yourself and START WORKING immediately.\n\n**Use these tools instead:**\n- TaskCreate: Create new task with auto-generated ID\n- TaskUpdate: Update status, assign owner, add dependencies\n- TaskList: List active tasks with dependency info\n- TaskGet: Get full task details\n\n**Workflow:**\n1. TaskCreate({ subject: \"your task description\" })\n2. TaskUpdate({ id: \"T-xxx\", status: \"in_progress\", owner: \"your-thread-id\" })\n3. DO THE WORK\n4. TaskUpdate({ id: \"T-xxx\", status: \"completed\" })\n\nCRITICAL: 1 task = 1 task. Fire independent tasks concurrently.\n\n**STOP! DO NOT START WORKING DIRECTLY - NO MATTER HOW SMALL THE TASK!**\nEven if the task seems trivial (1 line fix, simple edit, quick change), you MUST:\n1. FIRST register it with TaskCreate\n2. THEN mark it in_progress\n3. ONLY THEN do the actual work\n4. FINALLY mark it completed\n\n**WHY?** Task tracking = visibility = accountability. Skipping registration = invisible work = chaos.\n\nDO NOT retry TodoWrite. Convert to TaskCreate NOW.";
3
+ export declare const REPLACEMENT_MESSAGE = "TodoRead is DISABLED because experimental.task_system is enabled.\n\n**ACTION REQUIRED**: Use Task tools to inspect work state. TodoWrite is still allowed so the live todo panel keeps updating, but reads belong to the task system.\n\n**Use these tools instead of TodoRead:**\n- TaskList: List active tasks with dependency info\n- TaskGet: Get full task details\n- TaskCreate: Create new task with auto-generated ID\n- TaskUpdate: Update status, assign owner, add dependencies\n\n**Workflow:**\n1. TaskCreate({ subject: \"your task description\" })\n2. TaskUpdate({ id: \"T-xxx\", status: \"in_progress\", owner: \"your-thread-id\" })\n3. DO THE WORK\n4. TaskUpdate({ id: \"T-xxx\", status: \"completed\" })\n\nCRITICAL: 1 task = 1 task. Fire independent tasks concurrently.\n\n**STOP! DO NOT START WORKING DIRECTLY - NO MATTER HOW SMALL THE TASK!**\nEven if the task seems trivial (1 line fix, simple edit, quick change), you MUST:\n1. FIRST register it with TaskCreate\n2. THEN mark it in_progress\n3. ONLY THEN do the actual work\n4. FINALLY mark it completed\n\n**WHY?** Task tracking = visibility = accountability. Skipping registration = invisible work = chaos.\n\nDO NOT retry TodoRead. Use TaskList or TaskGet NOW.";