oh-my-opencode 5.0.0-beta.12 → 5.0.0-beta.13

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 (98) hide show
  1. package/.agents/skills/senpi-qa/SKILL.md +80 -0
  2. package/.agents/skills/senpi-qa/scripts/resolve-evidence-dir.mjs +65 -0
  3. package/.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs +171 -0
  4. package/dist/cli/index.js +6774 -4320
  5. package/dist/cli-node/index.js +6774 -4320
  6. package/dist/create-hooks.d.ts +1 -0
  7. package/dist/features/btw-side/btw-command-draft.d.ts +7 -0
  8. package/dist/features/btw-side/context-injector.d.ts +15 -0
  9. package/dist/features/btw-side/index.d.ts +8 -0
  10. package/dist/features/btw-side/metadata.d.ts +15 -0
  11. package/dist/features/btw-side/parent-context-budget.d.ts +9 -0
  12. package/dist/features/btw-side/server-session-registry.d.ts +8 -0
  13. package/dist/features/btw-side/tui-adoption-cache.d.ts +13 -0
  14. package/dist/features/btw-side/tui-adoption-guard.d.ts +5 -0
  15. package/dist/features/btw-side/tui-controller-types.d.ts +63 -0
  16. package/dist/features/btw-side/tui-controller.d.ts +14 -0
  17. package/dist/features/btw-side/tui-keymap.d.ts +10 -0
  18. package/dist/features/btw-side/tui-parent-validator.d.ts +6 -0
  19. package/dist/features/btw-side/tui-prompt-queue.d.ts +8 -0
  20. package/dist/features/btw-side/tui-session-bridge.d.ts +11 -0
  21. package/dist/features/btw-side/tui-side-removal.d.ts +11 -0
  22. package/dist/features/btw-side/tui-side-start.d.ts +9 -0
  23. package/dist/features/btw-side/tui-wiring.d.ts +8 -0
  24. package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +2 -0
  25. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +1 -0
  26. package/dist/hooks/runtime-fallback/runtime-model-settings.d.ts +6 -0
  27. package/dist/hooks/runtime-fallback/session-status-handler.d.ts +1 -1
  28. package/dist/hooks/runtime-fallback/types.d.ts +3 -1
  29. package/dist/index.js +6502 -3850
  30. package/dist/plugin/event-session-lifecycle.d.ts +1 -0
  31. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  32. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
  33. package/dist/plugin/messages-transform.d.ts +1 -0
  34. package/dist/shared/index.d.ts +1 -0
  35. package/dist/shared/runtime-fallback-retry-marker.d.ts +16 -0
  36. package/dist/tui.js +8092 -6792
  37. package/package.json +24 -23
  38. package/packages/git-bash-mcp/dist/cli.js +5 -1
  39. package/packages/lsp-daemon/dist/cli.js +5 -1
  40. package/packages/lsp-daemon/dist/client.js +5 -1
  41. package/packages/lsp-daemon/dist/index.js +5 -1
  42. package/packages/lsp-tools-mcp/dist/cli.js +5 -1
  43. package/packages/lsp-tools-mcp/dist/mcp.js +5 -1
  44. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  45. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  46. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  47. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +5 -1
  48. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +5 -1
  49. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  50. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  51. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  52. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  53. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  54. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  55. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  56. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  57. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  58. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  59. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  60. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  61. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  62. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  63. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  64. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  65. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +2242 -381
  66. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +2247 -386
  67. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  68. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  69. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  70. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  71. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  72. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  93. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  94. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  95. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  96. package/packages/omo-codex/plugin/package-lock.json +13 -13
  97. package/packages/omo-codex/plugin/package.json +1 -1
  98. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2307 -401
@@ -75,6 +75,7 @@ export declare function createHooks(args: {
75
75
  planFormatValidator: ReturnType<typeof import("./hooks").createPlanFormatValidatorHook> | null;
76
76
  claudeCodeHooks: ReturnType<typeof import("./hooks").createClaudeCodeHooksHook> | null;
77
77
  keywordDetector: ReturnType<typeof import("./hooks").createKeywordDetectorHook> | null;
78
+ btwSideContextInjector: ReturnType<typeof import("./features/btw-side").createBtwSideContextInjectorHook>;
78
79
  contextInjectorMessagesTransform: ReturnType<typeof import("./features/context-injector").createContextInjectorMessagesTransformHook>;
79
80
  teamModeStatusInjector: ReturnType<typeof import("./hooks").createTeamModeStatusInjector> | null;
80
81
  teamMailboxInjector: ReturnType<typeof import("./hooks").createTeamMailboxInjector> | null;
@@ -0,0 +1,7 @@
1
+ import type { BtwSessionMessage } from "./tui-controller-types";
2
+ export declare function isBtwCommandDraft(input: string): boolean;
3
+ export declare function parseBtwQuestion(input: string): {
4
+ consumeDraft: boolean;
5
+ question: string;
6
+ };
7
+ export declare function findBtwBoundaryMessageID(messages: BtwSessionMessage[]): string | undefined;
@@ -0,0 +1,15 @@
1
+ import type { Message, Part } from "@opencode-ai/sdk";
2
+ import type { PluginContext } from "../../plugin/types";
3
+ export declare const BTW_BOUNDARY_SENTINEL = "<omo-btw-boundary>";
4
+ export { BTW_PARENT_CONTEXT_MAX_BYTES, BTW_PARENT_CONTEXT_MAX_MESSAGES, } from "./parent-context-budget";
5
+ type MessageWithParts = {
6
+ info: Message;
7
+ parts: Part[];
8
+ };
9
+ export declare function createBtwSideContextInjectorHook(args: {
10
+ client: PluginContext["client"];
11
+ }): {
12
+ "experimental.chat.messages.transform": (_input: Record<string, never>, output: {
13
+ messages: MessageWithParts[];
14
+ }) => Promise<void>;
15
+ };
@@ -0,0 +1,8 @@
1
+ export { BTW_BOUNDARY_SENTINEL, createBtwSideContextInjectorHook, } from "./context-injector";
2
+ export { BTW_SIDE_METADATA_KEY, BTW_SIDE_METADATA_VERSION, createBtwSideMetadata, getBtwSideMetadata, parseBtwSideMetadata, } from "./metadata";
3
+ export type { BtwSideMetadata } from "./metadata";
4
+ export { createBtwSideController } from "./tui-controller";
5
+ export { isBtwCommandDraft } from "./btw-command-draft";
6
+ export type { BtwCreateSessionInput, BtwPromptRef, BtwSession, BtwSessionMessage, BtwSideControllerDependencies, BtwSideState, } from "./tui-controller-types";
7
+ export { forgetBtwSideSession, isTrackedBtwSideSession, markBtwSideSession, resetBtwSideSessionRegistryForTesting, trackBtwSideSession, } from "./server-session-registry";
8
+ export { registerBtwSideTui } from "./tui-wiring";
@@ -0,0 +1,15 @@
1
+ export declare const BTW_SIDE_METADATA_KEY = "omo_btw_side";
2
+ export declare const BTW_SIDE_METADATA_VERSION = 1;
3
+ export type BtwSideMetadata = {
4
+ version: typeof BTW_SIDE_METADATA_VERSION;
5
+ parent_session_id: string;
6
+ boundary_message_id: string;
7
+ };
8
+ export declare function createBtwSideMetadata(args: {
9
+ parentSessionID: string;
10
+ boundaryMessageID: string;
11
+ }): BtwSideMetadata;
12
+ export declare function parseBtwSideMetadata(value: unknown): BtwSideMetadata | undefined;
13
+ export declare function getBtwSideMetadata(session: {
14
+ metadata?: Record<string, unknown>;
15
+ } | undefined): BtwSideMetadata | undefined;
@@ -0,0 +1,9 @@
1
+ import type { Message, Part } from "@opencode-ai/sdk";
2
+ export declare const BTW_PARENT_CONTEXT_MAX_BYTES: number;
3
+ export declare const BTW_PARENT_CONTEXT_MAX_MESSAGES = 64;
4
+ type MessageWithParts = {
5
+ info: Message;
6
+ parts: Part[];
7
+ };
8
+ export declare function boundBtwParentContext(messages: MessageWithParts[]): MessageWithParts[];
9
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare function trackBtwSideSession(session: {
2
+ id: string;
3
+ metadata?: Record<string, unknown>;
4
+ }): boolean;
5
+ export declare function markBtwSideSession(sessionID: string): void;
6
+ export declare function forgetBtwSideSession(sessionID: string): boolean;
7
+ export declare function isTrackedBtwSideSession(sessionID: string): boolean;
8
+ export declare function resetBtwSideSessionRegistryForTesting(): void;
@@ -0,0 +1,13 @@
1
+ import type { BtwSideMetadata } from "./metadata";
2
+ type CachedAdoption = {
3
+ hydrated: false;
4
+ } | {
5
+ hydrated: true;
6
+ metadata?: BtwSideMetadata;
7
+ };
8
+ export declare function createBtwAdoptionCache(): {
9
+ read: (sessionID: string) => CachedAdoption;
10
+ write: (sessionID: string, metadata: BtwSideMetadata | undefined) => void;
11
+ removeForDeletion: (sessionID: string) => void;
12
+ };
13
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare function createBtwAdoptionGuard(currentSessionID: () => string | undefined): {
2
+ canApply: (sessionID: string, parentSessionID?: string) => boolean;
3
+ markDeleted: (sessionID: string) => void;
4
+ dispose: () => void;
5
+ };
@@ -0,0 +1,63 @@
1
+ export type BtwPromptRef = {
2
+ readonly hasAttachments: boolean;
3
+ readonly input: string;
4
+ set: (input: string) => void;
5
+ submit: () => void;
6
+ };
7
+ export type BtwSession = {
8
+ id: string;
9
+ title: string;
10
+ agent?: string;
11
+ model?: {
12
+ providerID: string;
13
+ id: string;
14
+ };
15
+ };
16
+ export type BtwSessionMessage = {
17
+ info: {
18
+ id: string;
19
+ role: "user" | "assistant";
20
+ time?: {
21
+ completed?: number;
22
+ };
23
+ };
24
+ };
25
+ export type BtwCreateSessionInput = {
26
+ title: string;
27
+ agent?: string;
28
+ model?: {
29
+ providerID: string;
30
+ id: string;
31
+ };
32
+ metadata: Record<string, unknown>;
33
+ };
34
+ export type BtwSideControllerDependencies = {
35
+ getCurrentSessionID: () => string | undefined;
36
+ getSession: (sessionID: string) => BtwSession | undefined;
37
+ getMessages: (sessionID: string) => BtwSessionMessage[];
38
+ createSession: (input: BtwCreateSessionInput) => Promise<{
39
+ id: string;
40
+ title: string;
41
+ }>;
42
+ navigateSession: (sessionID: string) => void;
43
+ abortSession: (sessionID: string) => Promise<void>;
44
+ deleteSession: (sessionID: string) => Promise<void>;
45
+ showToast: (message: string) => void;
46
+ requestRender: () => void;
47
+ };
48
+ export type BtwSideState = {
49
+ phase: "closed";
50
+ } | {
51
+ phase: "creating";
52
+ parentSessionID: string;
53
+ } | {
54
+ phase: "open";
55
+ parentSessionID: string;
56
+ sideSessionID: string;
57
+ owned: boolean;
58
+ } | {
59
+ phase: "closing";
60
+ parentSessionID: string;
61
+ sideSessionID: string;
62
+ owned: boolean;
63
+ };
@@ -0,0 +1,14 @@
1
+ import type { BtwPromptRef, BtwSideControllerDependencies, BtwSideState } from "./tui-controller-types";
2
+ export declare function createBtwSideController(dependencies: BtwSideControllerDependencies): {
3
+ state: () => BtwSideState;
4
+ startFromPrompt: (promptRef: BtwPromptRef) => Promise<void>;
5
+ attachPromptRef: (sessionID: string, promptRef: BtwPromptRef | undefined) => void;
6
+ toggle: () => void;
7
+ close: () => Promise<void>;
8
+ handleNavigation: (sessionID: string) => Promise<void>;
9
+ handleSessionDeleted: (sessionID: string) => void;
10
+ canCloseCurrentSide: () => boolean;
11
+ adopt: (parentSessionID: string, sideSessionID: string) => void;
12
+ waitUntilClosed: () => Promise<void>;
13
+ dispose: () => Promise<void>;
14
+ };
@@ -0,0 +1,10 @@
1
+ import type { TuiPluginApi, TuiPromptRef } from "@opencode-ai/plugin/tui";
2
+ import type { createBtwSideController } from "./tui-controller";
3
+ type BtwSideController = ReturnType<typeof createBtwSideController>;
4
+ export declare function registerBtwSideKeymap(args: {
5
+ api: TuiPluginApi;
6
+ controller: BtwSideController;
7
+ activePromptRef: () => TuiPromptRef | undefined;
8
+ openBtw: () => Promise<void>;
9
+ }): Array<() => void>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare function createBtwParentValidator(dependencies: {
2
+ fetchStatus: (sessionID: string) => Promise<"exists" | "missing" | "retry">;
3
+ }): {
4
+ exists: (sessionID: string) => Promise<boolean>;
5
+ markDeleted: (sessionID: string) => void;
6
+ };
@@ -0,0 +1,8 @@
1
+ import type { BtwPromptRef } from "./tui-controller-types";
2
+ export declare function createBtwPromptQueue(): {
3
+ attach(sessionID: string, promptRef: BtwPromptRef | undefined): void;
4
+ queue(sessionID: string, question: string): void;
5
+ input(sessionID: string): string;
6
+ hasAttachments(sessionID: string): boolean;
7
+ clear(sessionID: string): void;
8
+ };
@@ -0,0 +1,11 @@
1
+ import type { TuiPluginApi, TuiPromptRef } from "@opencode-ai/plugin/tui";
2
+ import type { BtwPromptRef, BtwSideControllerDependencies } from "./tui-controller-types";
3
+ export declare function unwrapTuiData<T>(response: {
4
+ data?: T;
5
+ error?: unknown;
6
+ }, message: string): T;
7
+ export declare function currentTuiSessionID(api: TuiPluginApi): string | undefined;
8
+ export declare function isCurrentTuiSession(api: TuiPluginApi, sessionID: string | undefined): boolean;
9
+ export declare function adaptTuiPromptRef(promptRef: TuiPromptRef): BtwPromptRef;
10
+ export declare function parentTuiStatusLabel(api: TuiPluginApi, parentSessionID: string): string;
11
+ export declare function createBtwControllerDependencies(api: TuiPluginApi): BtwSideControllerDependencies;
@@ -0,0 +1,11 @@
1
+ export declare function abortBtwSide(args: {
2
+ sessionID: string;
3
+ abortSession: (sessionID: string) => Promise<void>;
4
+ showToast: (message: string) => void;
5
+ }): Promise<void>;
6
+ export declare function deleteBtwSide(args: {
7
+ sessionID: string;
8
+ deleteSession: (sessionID: string) => Promise<void>;
9
+ showToast: (message: string) => void;
10
+ failureMessage: string;
11
+ }): Promise<boolean>;
@@ -0,0 +1,9 @@
1
+ import type { BtwCreateSessionInput, BtwPromptRef, BtwSideControllerDependencies } from "./tui-controller-types";
2
+ export type PreparedBtwSideStart = {
3
+ parentSessionID: string;
4
+ originalDraft: string;
5
+ consumeDraft: boolean;
6
+ question: string;
7
+ createInput: BtwCreateSessionInput;
8
+ };
9
+ export declare function prepareBtwSideStart(dependencies: BtwSideControllerDependencies, promptRef: BtwPromptRef): PreparedBtwSideStart | undefined;
@@ -0,0 +1,8 @@
1
+ import type { TuiPluginApi } from "@opencode-ai/plugin/tui";
2
+ type SolidRuntime<Node> = {
3
+ readonly createElement: (tag: string) => Node;
4
+ readonly insert: (parent: Node, child: unknown, marker?: unknown, initial?: unknown) => unknown;
5
+ readonly setProp: (node: Node, name: string, value: unknown, previous?: unknown) => unknown;
6
+ };
7
+ export declare function registerBtwSideTui<Node>(api: TuiPluginApi, solid: SolidRuntime<Node>): Promise<void>;
8
+ export {};
@@ -6,12 +6,14 @@ export declare function createChatMessageHandler(deps: HookDeps): (input: {
6
6
  providerID: string;
7
7
  modelID: string;
8
8
  };
9
+ variant?: string;
9
10
  }, output: {
10
11
  message: {
11
12
  model?: {
12
13
  providerID: string;
13
14
  modelID: string;
14
15
  };
16
+ variant?: string;
15
17
  };
16
18
  parts?: Array<{
17
19
  type: string;
@@ -1,4 +1,5 @@
1
1
  export declare function buildRetryModelPayload(model: string, agentSettings?: {
2
+ reasoning?: string;
2
3
  variant?: string;
3
4
  reasoningEffort?: string;
4
5
  }): {
@@ -0,0 +1,6 @@
1
+ import type { OhMyOpenCodeConfig } from "../../config";
2
+ export type RuntimeModelSettings = {
3
+ reasoning?: string;
4
+ reasoningEffort?: string;
5
+ };
6
+ export declare function resolveRuntimeModelSettings(sessionID: string, agent: string | undefined, pluginConfig: OhMyOpenCodeConfig | undefined): RuntimeModelSettings;
@@ -1,3 +1,3 @@
1
1
  import type { HookDeps } from "./types";
2
2
  import type { AutoRetryHelpers } from "./auto-retry";
3
- export declare function createSessionStatusHandler(deps: HookDeps, helpers: AutoRetryHelpers, sessionStatusRetryKeys: Map<string, string>): (props: Record<string, unknown> | undefined) => Promise<void>;
3
+ export declare function createSessionStatusHandler(deps: HookDeps, helpers: AutoRetryHelpers, sessionStatusRetryKeys: Map<string, Set<string>>): (props: Record<string, unknown> | undefined) => Promise<void>;
@@ -96,12 +96,14 @@ export interface RuntimeFallbackHook {
96
96
  providerID: string;
97
97
  modelID: string;
98
98
  };
99
+ variant?: string;
99
100
  }, output: {
100
101
  message: {
101
102
  model?: {
102
103
  providerID: string;
103
104
  modelID: string;
104
105
  };
106
+ variant?: string;
105
107
  };
106
108
  parts?: Array<{
107
109
  type: string;
@@ -120,7 +122,7 @@ export interface HookDeps {
120
122
  sessionRetryInFlight: Set<string>;
121
123
  sessionAwaitingFallbackResult: Set<string>;
122
124
  sessionFallbackTimeouts: Map<string, RuntimeFallbackTimeout>;
123
- sessionStatusRetryKeys: Map<string, string>;
125
+ sessionStatusRetryKeys: Map<string, Set<string>>;
124
126
  /**
125
127
  * Sessions whose in-flight request was aborted by us (to swap in a fallback
126
128
  * model), as opposed to a user-initiated stop. Consumed by