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.
- package/.agents/skills/opencode-qa/SKILL.md +194 -0
- package/.agents/skills/opencode-qa/references/cli-commands.md +188 -0
- package/.agents/skills/opencode-qa/references/db-investigation.md +197 -0
- package/.agents/skills/opencode-qa/references/events-hooks.md +110 -0
- package/.agents/skills/opencode-qa/references/sdk.md +96 -0
- package/.agents/skills/opencode-qa/references/server-api.md +200 -0
- package/.agents/skills/opencode-qa/references/testing-harness.md +218 -0
- package/.agents/skills/opencode-qa/references/tui-tmux.md +52 -0
- package/.agents/skills/opencode-qa/scripts/db-session-by-id.sh +53 -0
- package/.agents/skills/opencode-qa/scripts/db-session-by-name.sh +57 -0
- package/.agents/skills/opencode-qa/scripts/db-session-by-text.sh +158 -0
- package/.agents/skills/opencode-qa/scripts/export-roundtrip.sh +57 -0
- package/.agents/skills/opencode-qa/scripts/lib/common.sh +216 -0
- package/.agents/skills/opencode-qa/scripts/server-smoke.sh +64 -0
- package/.agents/skills/opencode-qa/scripts/sse-hook-probe.sh +106 -0
- package/.agents/skills/opencode-qa/scripts/tui-smoke.sh +89 -0
- package/README.ja.md +13 -3
- package/README.ko.md +13 -3
- package/README.md +24 -14
- package/README.ru.md +13 -3
- package/README.zh-cn.md +13 -3
- package/bin/oh-my-opencode.js +4 -3
- package/bin/oh-my-opencode.test.ts +35 -7
- package/bin/platform.d.ts +1 -1
- package/bin/platform.js +4 -4
- package/bin/platform.test.ts +31 -9
- package/bin/version-mismatch.js +47 -0
- package/bin/version-mismatch.test.ts +120 -0
- package/dist/cli/cleanup-command.d.ts +4 -0
- package/dist/cli/cleanup.d.ts +11 -0
- package/dist/cli/cli-program.d.ts +2 -1
- package/dist/cli/codex-ulw-loop.d.ts +12 -0
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +2 -0
- package/dist/cli/index.js +2189 -529
- package/dist/cli/install-codex/codex-cache.d.ts +1 -0
- package/dist/cli/install-codex/codex-cleanup-config.d.ts +6 -0
- package/dist/cli/install-codex/codex-cleanup.d.ts +21 -0
- package/dist/cli/install-codex/codex-config-permissions.d.ts +1 -0
- package/dist/cli/install-codex/codex-config-reasoning.d.ts +2 -0
- package/dist/cli/install-codex/codex-config-toml.d.ts +2 -1
- package/dist/cli/install-codex/codex-installation-detection.d.ts +36 -0
- package/dist/cli/install-codex/codex-model-catalog.d.ts +13 -0
- package/dist/cli/install-codex/codex-package-layout.d.ts +1 -0
- package/dist/cli/install-codex/codex-project-local-cleanup-best-effort.d.ts +7 -0
- package/dist/cli/install-codex/codex-project-local-cleanup.d.ts +35 -0
- package/dist/cli/install-codex/git-bash.d.ts +35 -0
- package/dist/cli/install-codex/index.d.ts +4 -0
- package/dist/cli/install-codex/toml-section-editor.d.ts +2 -0
- package/dist/cli/install-codex/types.d.ts +20 -0
- package/dist/cli/run/event-state.d.ts +1 -0
- package/dist/cli/run/poll-for-completion.d.ts +1 -0
- package/dist/cli/run/prompt-start.d.ts +7 -0
- package/dist/cli/star-request.d.ts +9 -0
- package/dist/config/schema/hooks.d.ts +0 -1
- package/dist/create-hooks.d.ts +0 -1
- package/dist/features/background-agent/concurrency.d.ts +1 -0
- package/dist/features/background-agent/process-cleanup.d.ts +6 -0
- package/dist/features/builtin-skills/skills/debugging.d.ts +2 -0
- package/dist/features/builtin-skills/skills/index.d.ts +1 -0
- package/dist/features/claude-code-session-state/state.d.ts +1 -0
- package/dist/features/opencode-skill-loader/index.d.ts +1 -0
- package/dist/features/opencode-skill-loader/opencode-config-skills-reader.d.ts +5 -0
- package/dist/features/tmux-subagent/attachable-session-status.d.ts +1 -1
- package/dist/features/tmux-subagent/session-status-parser.d.ts +1 -0
- package/dist/hooks/comment-checker/cli.d.ts +1 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/tasks-todowrite-disabler/constants.d.ts +1 -1
- package/dist/index.js +1077 -563
- package/dist/plugin/hooks/create-core-hooks.d.ts +0 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +1 -2
- package/dist/plugin/messages-transform.d.ts +8 -1
- package/dist/plugin/user-abort-interrupted-recovery-guard.d.ts +6 -0
- package/dist/shared/command-executor/execute-hook-command.d.ts +2 -0
- package/dist/shared/prompt-async-gate/recent-dispatches.d.ts +14 -0
- package/dist/shared/prompt-async-gate/semantic-dedupe.d.ts +7 -0
- package/dist/shared/prompt-async-gate/session-idle-dispatch.d.ts +1 -0
- package/dist/shared/prompt-async-gate/timing.d.ts +1 -0
- package/dist/shared/prompt-async-gate/types.d.ts +2 -0
- package/dist/shared/prompt-async-gate.d.ts +1 -1
- package/dist/tools/skill/description-formatter.d.ts +5 -1
- package/dist/tools/skill/types.d.ts +1 -0
- package/package.json +22 -18
- package/packages/ast-grep-mcp/dist/cli.js +53 -9
- package/packages/git-bash-mcp/dist/cli.js +367 -0
- package/packages/lsp-tools-mcp/dist/lsp/process.js +1 -1
- package/packages/omo-codex/plugin/.mcp.json +11 -0
- package/packages/omo-codex/plugin/components/comment-checker/README.md +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +29 -0
- package/packages/omo-codex/plugin/components/git-bash/package.json +23 -0
- package/packages/omo-codex/plugin/components/git-bash/src/cli.ts +33 -0
- package/packages/omo-codex/plugin/components/git-bash/src/codex-hook.ts +180 -0
- package/packages/omo-codex/plugin/components/git-bash/src/index.ts +10 -0
- package/packages/omo-codex/plugin/components/git-bash/test/codex-hook.test.ts +195 -0
- package/packages/omo-codex/plugin/components/git-bash/tsconfig.build.json +13 -0
- package/packages/omo-codex/plugin/components/git-bash/tsconfig.json +25 -0
- package/packages/omo-codex/plugin/components/lsp/README.md +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/cli.ts +5 -5
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +33 -0
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +19 -27
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-cli.test.ts +28 -0
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-errors.test.ts +55 -0
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +7 -5
- package/packages/omo-codex/plugin/components/rules/README.md +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +6 -4
- package/packages/omo-codex/plugin/components/rules/bundled-rules/windows-git-bash.md +10 -0
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +0 -2
- package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +3 -1
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +97 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +6 -5
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +22 -0
- package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/agents/codex-ultrawork-reviewer.toml +4 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +8 -7
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +9 -8
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +32 -6
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +27 -4
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +25 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +28 -205
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +231 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint.test.ts +19 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +102 -5
- package/packages/omo-codex/plugin/hooks/hooks.json +35 -2
- package/packages/omo-codex/plugin/model-catalog.json +49 -0
- package/packages/omo-codex/plugin/package-lock.json +19 -0
- package/packages/omo-codex/plugin/package.json +3 -1
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +159 -0
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +16 -1
- package/packages/omo-codex/plugin/scripts/build-components.mjs +2 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +269 -0
- package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +89 -0
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -6
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +6 -6
- package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +127 -0
- package/packages/omo-codex/plugin/skills/lcx-report-bug/agents/openai.yaml +9 -0
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +6 -6
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +6 -6
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +33 -8
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +25 -5
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +28 -205
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +231 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +17 -17
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +188 -20
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +129 -0
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +58 -11
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +34 -0
- package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +21 -0
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +146 -0
- package/packages/omo-codex/plugin/test/node-install-surface.test.mjs +48 -0
- package/packages/omo-codex/plugin/test/subagent-guidance.test.mjs +76 -0
- package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +67 -0
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +54 -2
- package/packages/omo-codex/scripts/install/cache.mjs +5 -3
- package/packages/omo-codex/scripts/install/cli-args.mjs +112 -0
- package/packages/omo-codex/scripts/install/config.mjs +23 -1
- package/packages/omo-codex/scripts/install/delegated-command.mjs +25 -0
- package/packages/omo-codex/scripts/install/git-bash.mjs +99 -0
- package/packages/omo-codex/scripts/install/git-bash.test.mjs +174 -0
- package/packages/omo-codex/scripts/install/legacy-bins.mjs +1 -0
- package/packages/omo-codex/scripts/install/mcp-runtime-cache.mjs +5 -1
- package/packages/omo-codex/scripts/install/model-catalog.mjs +66 -0
- package/packages/omo-codex/scripts/install/multi-agent-v2-config.mjs +7 -1
- package/packages/omo-codex/scripts/install/permissions.d.mts +1 -0
- package/packages/omo-codex/scripts/install/permissions.mjs +26 -0
- package/packages/omo-codex/scripts/install/project-local-cleanup.mjs +229 -0
- package/packages/omo-codex/scripts/install/reasoning-config.mjs +72 -0
- package/packages/omo-codex/scripts/install/source-package-build.mjs +20 -0
- package/packages/omo-codex/scripts/install/toml-editor.mjs +19 -2
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +23 -0
- package/packages/omo-codex/scripts/install-cli-args.test.mjs +146 -0
- package/packages/omo-codex/scripts/install-config-autonomous.test.mjs +48 -0
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +141 -0
- package/packages/omo-codex/scripts/install-config.test.mjs +205 -0
- package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +157 -0
- package/packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs +145 -0
- package/packages/omo-codex/scripts/install-local.mjs +91 -8
- package/packages/omo-codex/scripts/install-local.test.mjs +15 -0
- package/packages/omo-codex/scripts/install-mcp-runtime.test.mjs +60 -0
- package/packages/omo-codex/scripts/install-packaged-local.test.mjs +67 -0
- package/packages/omo-codex/scripts/install-project-local-cleanup.test.mjs +277 -0
- package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +127 -0
- package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +9 -0
- package/packages/shared-skills/skills/review-work/SKILL.md +33 -8
- package/packages/shared-skills/skills/start-work/SKILL.md +25 -5
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +11 -11
- package/postinstall.mjs +36 -3
- package/dist/hooks/context-window-monitor.d.ts +0 -19
|
@@ -37,7 +37,6 @@ export declare function createCoreHooks(args: {
|
|
|
37
37
|
teamToolGating: ReturnType<typeof import("../../hooks").createTeamToolGating> | null;
|
|
38
38
|
notepadWriteGuard: ReturnType<typeof import("../../hooks").createNotepadWriteGuardHook> | null;
|
|
39
39
|
planFormatValidator: ReturnType<typeof import("../../hooks").createPlanFormatValidatorHook> | null;
|
|
40
|
-
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
41
40
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
|
42
41
|
sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
|
|
43
42
|
sessionNotification: ReturnType<typeof import("../../hooks").createSessionNotification> | null;
|
|
@@ -3,10 +3,9 @@ import type { BackgroundManager } from "../../features/background-agent";
|
|
|
3
3
|
import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
|
|
4
4
|
import type { ModelCacheState } from "../../plugin-state";
|
|
5
5
|
import type { PluginContext } from "../types";
|
|
6
|
-
import {
|
|
6
|
+
import { createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook, createLegacyPluginToastHook } from "../../hooks";
|
|
7
7
|
import { createAnthropicEffortHook } from "../../hooks/anthropic-effort";
|
|
8
8
|
export type SessionHooks = {
|
|
9
|
-
contextWindowMonitor: ReturnType<typeof createContextWindowMonitorHook> | null;
|
|
10
9
|
preemptiveCompaction: ReturnType<typeof createPreemptiveCompactionHook> | null;
|
|
11
10
|
sessionRecovery: ReturnType<typeof createSessionRecoveryHook> | null;
|
|
12
11
|
sessionNotification: ReturnType<typeof createSessionNotification> | null;
|
|
@@ -7,7 +7,14 @@ type MessageWithParts = {
|
|
|
7
7
|
type MessagesTransformOutput = {
|
|
8
8
|
messages: MessageWithParts[];
|
|
9
9
|
};
|
|
10
|
+
type MessagesTransformHooks = {
|
|
11
|
+
contextInjectorMessagesTransform?: CreatedHooks["contextInjectorMessagesTransform"];
|
|
12
|
+
teamModeStatusInjector?: CreatedHooks["teamModeStatusInjector"];
|
|
13
|
+
teamMailboxInjector?: CreatedHooks["teamMailboxInjector"];
|
|
14
|
+
thinkingBlockValidator?: CreatedHooks["thinkingBlockValidator"];
|
|
15
|
+
toolPairValidator?: CreatedHooks["toolPairValidator"];
|
|
16
|
+
};
|
|
10
17
|
export declare function createMessagesTransformHandler(args: {
|
|
11
|
-
hooks:
|
|
18
|
+
hooks: MessagesTransformHooks;
|
|
12
19
|
}): (input: Record<string, never>, output: MessagesTransformOutput) => Promise<void>;
|
|
13
20
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type UserAbortInterruptedRecoveryGuard = {
|
|
2
|
+
readonly noteSessionError: (sessionID: string, errorName: string | undefined) => boolean;
|
|
3
|
+
readonly shouldSkipRecovery: (sessionID: string) => boolean;
|
|
4
|
+
readonly clear: (sessionID: string) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function createUserAbortInterruptedRecoveryGuard(): UserAbortInterruptedRecoveryGuard;
|
|
@@ -8,6 +8,8 @@ export interface ExecuteHookOptions {
|
|
|
8
8
|
zshPath?: string;
|
|
9
9
|
/** Timeout in milliseconds. Process is killed after this. Default: 30000 */
|
|
10
10
|
timeoutMs?: number;
|
|
11
|
+
/** Grace period before force-killing and resolving timed-out commands. Default: 5000 */
|
|
12
|
+
killGraceMs?: number;
|
|
11
13
|
/** When provided, scrub process.env to only include these vars plus HOME/PATH/etc. Used for plugin-sourced hooks. */
|
|
12
14
|
allowedEnvVars?: string[];
|
|
13
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type RecentPromptDispatch = {
|
|
2
|
+
readonly source: string;
|
|
3
|
+
readonly expiresAt: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function getRecentPromptDispatch(sessionID: string, dedupeKey: string): RecentPromptDispatch | undefined;
|
|
6
|
+
export declare function rememberRecentPromptDispatch(args: {
|
|
7
|
+
readonly sessionID: string;
|
|
8
|
+
readonly dedupeKey: string;
|
|
9
|
+
readonly source: string;
|
|
10
|
+
readonly holdMs: number;
|
|
11
|
+
}): void;
|
|
12
|
+
export declare function deleteRecentPromptDispatch(sessionID: string, dedupeKey: string): void;
|
|
13
|
+
export declare function clearRecentPromptDispatchesForTesting(): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InternalPromptDispatchResult } from "./types";
|
|
2
|
+
export declare function createSemanticPromptDedupeKey(input: unknown): string;
|
|
3
|
+
export declare function coalesceRecentSemanticPromptDispatch(args: {
|
|
4
|
+
readonly sessionID: string;
|
|
5
|
+
readonly dedupeKey: string;
|
|
6
|
+
readonly source: string;
|
|
7
|
+
}): InternalPromptDispatchResult | undefined;
|
|
@@ -8,6 +8,7 @@ export declare function dispatchAfterSessionIdle<TInput>(args: {
|
|
|
8
8
|
readonly dedupeKey: string;
|
|
9
9
|
readonly settleMs: number;
|
|
10
10
|
readonly postDispatchHoldMs: number;
|
|
11
|
+
readonly semanticDedupeHoldMs: number;
|
|
11
12
|
readonly dispatchTimeoutMs: number;
|
|
12
13
|
readonly checkStatus: boolean;
|
|
13
14
|
readonly checkToolState: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000;
|
|
2
|
+
export declare const DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000;
|
|
2
3
|
export declare const DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000;
|
|
3
4
|
export declare const DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000;
|
|
4
5
|
export declare const DEFAULT_PROMPT_QUEUE_RETRY_MS = 250;
|
|
@@ -49,6 +49,7 @@ type InternalPromptDispatchCommonArgs<TInput> = {
|
|
|
49
49
|
readonly queueRetryMs?: number;
|
|
50
50
|
readonly settleMs?: number;
|
|
51
51
|
readonly postDispatchHoldMs?: number;
|
|
52
|
+
readonly semanticDedupeHoldMs?: number;
|
|
52
53
|
readonly dispatchTimeoutMs?: number;
|
|
53
54
|
readonly checkStatus?: boolean;
|
|
54
55
|
readonly checkToolState?: boolean;
|
|
@@ -112,6 +113,7 @@ export type QueuedInternalPrompt = {
|
|
|
112
113
|
readonly dedupeKey: string;
|
|
113
114
|
readonly settleMs: number;
|
|
114
115
|
readonly postDispatchHoldMs: number;
|
|
116
|
+
readonly semanticDedupeHoldMs: number;
|
|
115
117
|
readonly dispatchTimeoutMs: number;
|
|
116
118
|
readonly queueRetryMs: number;
|
|
117
119
|
readonly checkStatus: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InternalPromptDispatchArgs, InternalPromptDispatchResult, PromptAsyncInput, PromptAsyncReservationReleaseOptions } from "./prompt-async-gate/types";
|
|
2
|
-
export { DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS, DEFAULT_PROMPT_QUEUE_RETRY_MS, _setPromptGateMessagesFetchTimeoutMsForTesting, } from "./prompt-async-gate/timing";
|
|
2
|
+
export { DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS, DEFAULT_PROMPT_QUEUE_RETRY_MS, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS, _setPromptGateMessagesFetchTimeoutMsForTesting, } from "./prompt-async-gate/timing";
|
|
3
3
|
export type { InternalPromptDispatchArgs, InternalPromptDispatchMode, InternalPromptDispatchResult, InternalPromptQueueBehavior, PromptAsyncGateResult, } from "./prompt-async-gate/types";
|
|
4
4
|
export declare function dispatchInternalPrompt<TInput = PromptAsyncInput>(args: InternalPromptDispatchArgs<TInput>): Promise<InternalPromptDispatchResult>;
|
|
5
5
|
export declare function releaseAllPromptAsyncReservationsForTesting(): void;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { SkillInfo } from "./types";
|
|
2
2
|
import type { CommandInfo } from "../slashcommand/types";
|
|
3
|
-
|
|
3
|
+
interface CombinedDescriptionOptions {
|
|
4
|
+
includeSkills?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function formatCombinedDescription(skills?: SkillInfo[], commands?: CommandInfo[], options?: CombinedDescriptionOptions): string;
|
|
7
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
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",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"packages/rules-engine",
|
|
10
10
|
"packages/ast-grep-core",
|
|
11
11
|
"packages/ast-grep-mcp",
|
|
12
|
+
"packages/git-bash-mcp",
|
|
12
13
|
"packages/utils",
|
|
13
14
|
"packages/model-core",
|
|
14
15
|
"packages/prompts-core",
|
|
@@ -23,7 +24,8 @@
|
|
|
23
24
|
"oh-my-opencode": "bin/oh-my-opencode.js",
|
|
24
25
|
"oh-my-openagent": "bin/oh-my-opencode.js",
|
|
25
26
|
"omo": "bin/oh-my-opencode.js",
|
|
26
|
-
"lazycodex": "bin/oh-my-opencode.js"
|
|
27
|
+
"lazycodex": "bin/oh-my-opencode.js",
|
|
28
|
+
"lazycodex-ai": "bin/oh-my-opencode.js"
|
|
27
29
|
},
|
|
28
30
|
"files": [
|
|
29
31
|
"dist",
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
".agents/skills",
|
|
36
38
|
"packages/lsp-tools-mcp/dist",
|
|
37
39
|
"packages/ast-grep-mcp/dist",
|
|
40
|
+
"packages/git-bash-mcp/dist",
|
|
38
41
|
"packages/shared-skills/package.json",
|
|
39
42
|
"packages/shared-skills/index.mjs",
|
|
40
43
|
"packages/shared-skills/skills",
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
53
56
|
},
|
|
54
57
|
"scripts": {
|
|
55
|
-
"build": "bun run build:ast-grep-mcp && bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
58
|
+
"build": "bun run build:ast-grep-mcp && bun run build:git-bash-mcp && bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
56
59
|
"build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
|
|
57
60
|
"build:node-require-shim": "bun run script/patch-node-require-shim.ts",
|
|
58
61
|
"build:all": "bun run build && bun run build:binaries",
|
|
@@ -65,12 +68,13 @@
|
|
|
65
68
|
"prepublishOnly": "bun run clean && bun run build:lsp-tools-mcp && bun run build",
|
|
66
69
|
"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",
|
|
67
70
|
"typecheck": "tsgo --noEmit && bun run typecheck:packages",
|
|
68
|
-
"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/prompts-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 && tsgo --noEmit -p packages/omo-codex/tsconfig.json",
|
|
71
|
+
"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/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/prompts-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 && tsgo --noEmit -p packages/omo-codex/tsconfig.json",
|
|
69
72
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
70
73
|
"test": "bun test",
|
|
71
|
-
"test:codex": "bun run build:ast-grep-mcp && bun run build:lsp-tools-mcp && npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build && bun test src/cli/cli-installer.platform.test.ts src/cli/install-codex/codex-cache.test.ts src/cli/install-codex/codex-config-agent-cleanup.test.ts src/cli/install-codex/codex-config-toml.test.ts src/cli/install-codex/install-codex.test.ts src/cli/install-codex/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs packages/omo-codex/scripts/sync-telemetry-component.test.mjs",
|
|
74
|
+
"test:codex": "bun run build:ast-grep-mcp && bun run build:lsp-tools-mcp && npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build && bun test src/cli/cli-installer.platform.test.ts src/cli/install-codex/codex-cache.test.ts src/cli/install-codex/codex-cleanup.test.ts src/cli/install-codex/codex-config-agent-cleanup.test.ts src/cli/install-codex/codex-config-reasoning.test.ts src/cli/install-codex/codex-config-toml.test.ts src/cli/install-codex/codex-project-local-cleanup.test.ts src/cli/install-codex/install-codex-project-local-cleanup.test.ts src/cli/install-codex/install-codex.test.ts src/cli/install-codex/install-codex-packaged.test.ts src/cli/install-codex/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install/git-bash.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs packages/omo-codex/scripts/sync-telemetry-component.test.mjs",
|
|
72
75
|
"test:windows-codex": "bun run test:codex",
|
|
73
|
-
"build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build"
|
|
76
|
+
"build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build",
|
|
77
|
+
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
|
|
74
78
|
},
|
|
75
79
|
"keywords": [
|
|
76
80
|
"opencode",
|
|
@@ -102,7 +106,6 @@
|
|
|
102
106
|
"commander": "^14.0.3",
|
|
103
107
|
"detect-libc": "^2.1.2",
|
|
104
108
|
"diff": "^9.0.0",
|
|
105
|
-
"effect": "4.0.0-beta.65",
|
|
106
109
|
"js-yaml": "^4.1.1",
|
|
107
110
|
"jsonc-parser": "^3.3.1",
|
|
108
111
|
"picocolors": "^1.1.1",
|
|
@@ -113,6 +116,7 @@
|
|
|
113
116
|
"devDependencies": {
|
|
114
117
|
"@oh-my-opencode/ast-grep-core": "workspace:*",
|
|
115
118
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
119
|
+
"@oh-my-opencode/git-bash-mcp": "workspace:*",
|
|
116
120
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
117
121
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
118
122
|
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
|
@@ -131,17 +135,17 @@
|
|
|
131
135
|
"zod": "^4.4.3"
|
|
132
136
|
},
|
|
133
137
|
"optionalDependencies": {
|
|
134
|
-
"oh-my-opencode-darwin-arm64": "4.
|
|
135
|
-
"oh-my-opencode-darwin-x64": "4.
|
|
136
|
-
"oh-my-opencode-darwin-x64-baseline": "4.
|
|
137
|
-
"oh-my-opencode-linux-arm64": "4.
|
|
138
|
-
"oh-my-opencode-linux-arm64-musl": "4.
|
|
139
|
-
"oh-my-opencode-linux-x64": "4.
|
|
140
|
-
"oh-my-opencode-linux-x64-baseline": "4.
|
|
141
|
-
"oh-my-opencode-linux-x64-musl": "4.
|
|
142
|
-
"oh-my-opencode-linux-x64-musl-baseline": "4.
|
|
143
|
-
"oh-my-opencode-windows-x64": "4.
|
|
144
|
-
"oh-my-opencode-windows-x64-baseline": "4.
|
|
138
|
+
"oh-my-opencode-darwin-arm64": "4.7.0",
|
|
139
|
+
"oh-my-opencode-darwin-x64": "4.7.0",
|
|
140
|
+
"oh-my-opencode-darwin-x64-baseline": "4.7.0",
|
|
141
|
+
"oh-my-opencode-linux-arm64": "4.7.0",
|
|
142
|
+
"oh-my-opencode-linux-arm64-musl": "4.7.0",
|
|
143
|
+
"oh-my-opencode-linux-x64": "4.7.0",
|
|
144
|
+
"oh-my-opencode-linux-x64-baseline": "4.7.0",
|
|
145
|
+
"oh-my-opencode-linux-x64-musl": "4.7.0",
|
|
146
|
+
"oh-my-opencode-linux-x64-musl-baseline": "4.7.0",
|
|
147
|
+
"oh-my-opencode-windows-x64": "4.7.0",
|
|
148
|
+
"oh-my-opencode-windows-x64-baseline": "4.7.0"
|
|
145
149
|
},
|
|
146
150
|
"overrides": {
|
|
147
151
|
"hono": "^4.12.18",
|
|
@@ -342,13 +342,44 @@ function errorMessage(error) {
|
|
|
342
342
|
import { createRequire } from "module";
|
|
343
343
|
import { dirname, join as join2 } from "path";
|
|
344
344
|
import { existsSync, statSync as statSync2 } from "fs";
|
|
345
|
+
var WINDOWS_EXECUTABLE_EXTENSIONS = [".exe", ".cmd", ".bat"];
|
|
345
346
|
function isValidBinary(filePath) {
|
|
346
347
|
try {
|
|
347
|
-
|
|
348
|
+
const stats = statSync2(filePath);
|
|
349
|
+
if (!stats.isFile()) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
const size = stats.size;
|
|
353
|
+
const lowerPath = filePath.toLowerCase();
|
|
354
|
+
if (lowerPath.endsWith(".cmd") || lowerPath.endsWith(".bat")) {
|
|
355
|
+
return size > 0;
|
|
356
|
+
}
|
|
357
|
+
return size > 1e4;
|
|
348
358
|
} catch {
|
|
349
359
|
return false;
|
|
350
360
|
}
|
|
351
361
|
}
|
|
362
|
+
function executableCandidates(filePath, platform = process.platform) {
|
|
363
|
+
if (platform !== "win32")
|
|
364
|
+
return [filePath];
|
|
365
|
+
const candidates = [filePath];
|
|
366
|
+
const lowerPath = filePath.toLowerCase();
|
|
367
|
+
if (WINDOWS_EXECUTABLE_EXTENSIONS.some((extension) => lowerPath.endsWith(extension))) {
|
|
368
|
+
return candidates;
|
|
369
|
+
}
|
|
370
|
+
for (const extension of WINDOWS_EXECUTABLE_EXTENSIONS) {
|
|
371
|
+
candidates.push(`${filePath}${extension}`);
|
|
372
|
+
}
|
|
373
|
+
return candidates;
|
|
374
|
+
}
|
|
375
|
+
function findValidExecutable(filePath) {
|
|
376
|
+
for (const candidate of executableCandidates(filePath)) {
|
|
377
|
+
if (existsSync(candidate) && isValidBinary(candidate)) {
|
|
378
|
+
return candidate;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return null;
|
|
382
|
+
}
|
|
352
383
|
function getPlatformPackageName() {
|
|
353
384
|
const platform = process.platform;
|
|
354
385
|
const arch = process.arch;
|
|
@@ -363,29 +394,42 @@ function getPlatformPackageName() {
|
|
|
363
394
|
};
|
|
364
395
|
return platformMap[`${platform}-${arch}`] ?? null;
|
|
365
396
|
}
|
|
397
|
+
function isModuleResolutionFailure(error) {
|
|
398
|
+
return error instanceof Error && (error.message.includes("Cannot find module") || error.message.includes("Cannot find package"));
|
|
399
|
+
}
|
|
366
400
|
function findSgCliPathSync() {
|
|
367
|
-
const binaryName =
|
|
401
|
+
const binaryName = "sg";
|
|
368
402
|
try {
|
|
369
403
|
const require2 = createRequire(import.meta.url);
|
|
370
404
|
const cliPackageJsonPath = require2.resolve("@ast-grep/cli/package.json");
|
|
371
405
|
const cliDirectory = dirname(cliPackageJsonPath);
|
|
372
406
|
const sgPath = join2(cliDirectory, binaryName);
|
|
373
|
-
|
|
374
|
-
|
|
407
|
+
const validSgPath = findValidExecutable(sgPath);
|
|
408
|
+
if (validSgPath) {
|
|
409
|
+
return validSgPath;
|
|
410
|
+
}
|
|
411
|
+
} catch (error) {
|
|
412
|
+
if (!isModuleResolutionFailure(error)) {
|
|
413
|
+
throw error;
|
|
375
414
|
}
|
|
376
|
-
}
|
|
415
|
+
}
|
|
377
416
|
const platformPackage = getPlatformPackageName();
|
|
378
417
|
if (platformPackage) {
|
|
379
418
|
try {
|
|
380
419
|
const require2 = createRequire(import.meta.url);
|
|
381
420
|
const packageJsonPath = require2.resolve(`${platformPackage}/package.json`);
|
|
382
421
|
const packageDirectory = dirname(packageJsonPath);
|
|
383
|
-
const astGrepBinaryName =
|
|
422
|
+
const astGrepBinaryName = "ast-grep";
|
|
384
423
|
const binaryPath = join2(packageDirectory, astGrepBinaryName);
|
|
385
|
-
|
|
386
|
-
|
|
424
|
+
const validBinaryPath = findValidExecutable(binaryPath);
|
|
425
|
+
if (validBinaryPath) {
|
|
426
|
+
return validBinaryPath;
|
|
427
|
+
}
|
|
428
|
+
} catch (error) {
|
|
429
|
+
if (!isModuleResolutionFailure(error)) {
|
|
430
|
+
throw error;
|
|
387
431
|
}
|
|
388
|
-
}
|
|
432
|
+
}
|
|
389
433
|
}
|
|
390
434
|
if (process.platform === "darwin") {
|
|
391
435
|
const homebrewPaths = ["/opt/homebrew/bin/sg", "/usr/local/bin/sg"];
|