oh-my-opencode-medium 0.8.2

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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +284 -0
  3. package/dist/agents/designer.d.ts +2 -0
  4. package/dist/agents/explorer.d.ts +2 -0
  5. package/dist/agents/fixer.d.ts +2 -0
  6. package/dist/agents/index.d.ts +22 -0
  7. package/dist/agents/librarian.d.ts +2 -0
  8. package/dist/agents/oracle.d.ts +2 -0
  9. package/dist/agents/orchestrator.d.ts +15 -0
  10. package/dist/background/background-manager.d.ts +175 -0
  11. package/dist/background/index.d.ts +2 -0
  12. package/dist/background/tmux-session-manager.d.ts +63 -0
  13. package/dist/cli/chutes-selection.d.ts +3 -0
  14. package/dist/cli/config-io.d.ts +26 -0
  15. package/dist/cli/config-manager.d.ts +12 -0
  16. package/dist/cli/custom-skills.d.ts +29 -0
  17. package/dist/cli/dynamic-model-selection.d.ts +14 -0
  18. package/dist/cli/external-rankings.d.ts +8 -0
  19. package/dist/cli/index.d.ts +2 -0
  20. package/dist/cli/index.js +17077 -0
  21. package/dist/cli/install.d.ts +2 -0
  22. package/dist/cli/model-key-normalization.d.ts +1 -0
  23. package/dist/cli/model-selection.d.ts +30 -0
  24. package/dist/cli/opencode-models.d.ts +18 -0
  25. package/dist/cli/opencode-selection.d.ts +3 -0
  26. package/dist/cli/paths.d.ts +9 -0
  27. package/dist/cli/precedence-resolver.d.ts +16 -0
  28. package/dist/cli/providers.d.ts +204 -0
  29. package/dist/cli/scoring-v2/engine.d.ts +4 -0
  30. package/dist/cli/scoring-v2/features.d.ts +3 -0
  31. package/dist/cli/scoring-v2/index.d.ts +4 -0
  32. package/dist/cli/scoring-v2/types.d.ts +17 -0
  33. package/dist/cli/scoring-v2/weights.d.ts +2 -0
  34. package/dist/cli/skills.d.ts +52 -0
  35. package/dist/cli/system.d.ts +6 -0
  36. package/dist/cli/types.d.ts +138 -0
  37. package/dist/config/agent-mcps.d.ts +15 -0
  38. package/dist/config/constants.d.ts +14 -0
  39. package/dist/config/index.d.ts +4 -0
  40. package/dist/config/loader.d.ts +30 -0
  41. package/dist/config/schema.d.ts +217 -0
  42. package/dist/config/utils.d.ts +10 -0
  43. package/dist/hooks/auto-update-checker/cache.d.ts +6 -0
  44. package/dist/hooks/auto-update-checker/checker.d.ts +28 -0
  45. package/dist/hooks/auto-update-checker/constants.d.ts +11 -0
  46. package/dist/hooks/auto-update-checker/index.d.ts +17 -0
  47. package/dist/hooks/auto-update-checker/types.d.ts +23 -0
  48. package/dist/hooks/chat-headers.d.ts +16 -0
  49. package/dist/hooks/delegate-task-retry/guidance.d.ts +2 -0
  50. package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
  51. package/dist/hooks/delegate-task-retry/index.d.ts +4 -0
  52. package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
  53. package/dist/hooks/index.d.ts +7 -0
  54. package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
  55. package/dist/hooks/json-error-recovery/index.d.ts +1 -0
  56. package/dist/hooks/phase-reminder/index.d.ts +26 -0
  57. package/dist/hooks/post-read-nudge/index.d.ts +18 -0
  58. package/dist/index.d.ts +5 -0
  59. package/dist/index.js +33970 -0
  60. package/dist/mcp/context7.d.ts +6 -0
  61. package/dist/mcp/grep-app.d.ts +6 -0
  62. package/dist/mcp/index.d.ts +6 -0
  63. package/dist/mcp/types.d.ts +12 -0
  64. package/dist/mcp/websearch.d.ts +6 -0
  65. package/dist/skills/loader.d.ts +13 -0
  66. package/dist/skills/register.d.ts +2 -0
  67. package/dist/tools/ast-grep/cli.d.ts +15 -0
  68. package/dist/tools/ast-grep/constants.d.ts +25 -0
  69. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  70. package/dist/tools/ast-grep/index.d.ts +10 -0
  71. package/dist/tools/ast-grep/tools.d.ts +3 -0
  72. package/dist/tools/ast-grep/types.d.ts +30 -0
  73. package/dist/tools/ast-grep/utils.d.ts +4 -0
  74. package/dist/tools/background.d.ts +13 -0
  75. package/dist/tools/grep/cli.d.ts +3 -0
  76. package/dist/tools/grep/constants.d.ts +18 -0
  77. package/dist/tools/grep/downloader.d.ts +3 -0
  78. package/dist/tools/grep/index.d.ts +5 -0
  79. package/dist/tools/grep/tools.d.ts +2 -0
  80. package/dist/tools/grep/types.d.ts +35 -0
  81. package/dist/tools/grep/utils.d.ts +2 -0
  82. package/dist/tools/index.d.ts +4 -0
  83. package/dist/tools/lsp/client.d.ts +42 -0
  84. package/dist/tools/lsp/config.d.ts +4 -0
  85. package/dist/tools/lsp/constants.d.ts +8 -0
  86. package/dist/tools/lsp/index.d.ts +3 -0
  87. package/dist/tools/lsp/tools.d.ts +5 -0
  88. package/dist/tools/lsp/types.d.ts +28 -0
  89. package/dist/tools/lsp/utils.d.ts +21 -0
  90. package/dist/utils/agent-variant.d.ts +47 -0
  91. package/dist/utils/env.d.ts +1 -0
  92. package/dist/utils/frontmatter.d.ts +15 -0
  93. package/dist/utils/index.d.ts +8 -0
  94. package/dist/utils/internal-initiator.d.ts +6 -0
  95. package/dist/utils/logger.d.ts +1 -0
  96. package/dist/utils/polling.d.ts +21 -0
  97. package/dist/utils/tmux.d.ts +32 -0
  98. package/dist/utils/zip-extractor.d.ts +1 -0
  99. package/package.json +68 -0
  100. package/src/skills/cartography/README.md +57 -0
  101. package/src/skills/cartography/SKILL.md +137 -0
  102. package/src/skills/cartography/scripts/cartographer.py +456 -0
  103. package/src/skills/cartography/scripts/test_cartographer.py +87 -0
  104. package/src/skills/loader.test.ts +452 -0
  105. package/src/skills/loader.ts +300 -0
  106. package/src/skills/register.test.ts +55 -0
  107. package/src/skills/register.ts +15 -0
@@ -0,0 +1,217 @@
1
+ import { z } from 'zod';
2
+ declare const FALLBACK_AGENT_NAMES: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "fixer"];
3
+ declare const MANUAL_AGENT_NAMES: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "fixer"];
4
+ export declare const ManualAgentPlanSchema: z.ZodObject<{
5
+ primary: z.ZodString;
6
+ fallback1: z.ZodString;
7
+ fallback2: z.ZodString;
8
+ fallback3: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const ManualPlanSchema: z.ZodObject<{
11
+ orchestrator: z.ZodObject<{
12
+ primary: z.ZodString;
13
+ fallback1: z.ZodString;
14
+ fallback2: z.ZodString;
15
+ fallback3: z.ZodString;
16
+ }, z.core.$strip>;
17
+ oracle: z.ZodObject<{
18
+ primary: z.ZodString;
19
+ fallback1: z.ZodString;
20
+ fallback2: z.ZodString;
21
+ fallback3: z.ZodString;
22
+ }, z.core.$strip>;
23
+ designer: z.ZodObject<{
24
+ primary: z.ZodString;
25
+ fallback1: z.ZodString;
26
+ fallback2: z.ZodString;
27
+ fallback3: z.ZodString;
28
+ }, z.core.$strip>;
29
+ explorer: z.ZodObject<{
30
+ primary: z.ZodString;
31
+ fallback1: z.ZodString;
32
+ fallback2: z.ZodString;
33
+ fallback3: z.ZodString;
34
+ }, z.core.$strip>;
35
+ librarian: z.ZodObject<{
36
+ primary: z.ZodString;
37
+ fallback1: z.ZodString;
38
+ fallback2: z.ZodString;
39
+ fallback3: z.ZodString;
40
+ }, z.core.$strip>;
41
+ fixer: z.ZodObject<{
42
+ primary: z.ZodString;
43
+ fallback1: z.ZodString;
44
+ fallback2: z.ZodString;
45
+ fallback3: z.ZodString;
46
+ }, z.core.$strip>;
47
+ }, z.core.$strict>;
48
+ export type ManualAgentName = (typeof MANUAL_AGENT_NAMES)[number];
49
+ export type ManualAgentPlan = z.infer<typeof ManualAgentPlanSchema>;
50
+ export type ManualPlan = z.infer<typeof ManualPlanSchema>;
51
+ export type FallbackAgentName = (typeof FALLBACK_AGENT_NAMES)[number];
52
+ export declare const AgentOverrideConfigSchema: z.ZodObject<{
53
+ model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
54
+ id: z.ZodString;
55
+ variant: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strip>]>>]>>;
57
+ temperature: z.ZodOptional<z.ZodNumber>;
58
+ variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
59
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
+ mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
+ }, z.core.$strip>;
62
+ export declare const TmuxLayoutSchema: z.ZodEnum<{
63
+ "main-horizontal": "main-horizontal";
64
+ "main-vertical": "main-vertical";
65
+ tiled: "tiled";
66
+ "even-horizontal": "even-horizontal";
67
+ "even-vertical": "even-vertical";
68
+ }>;
69
+ export type TmuxLayout = z.infer<typeof TmuxLayoutSchema>;
70
+ export declare const TmuxConfigSchema: z.ZodObject<{
71
+ enabled: z.ZodDefault<z.ZodBoolean>;
72
+ layout: z.ZodDefault<z.ZodEnum<{
73
+ "main-horizontal": "main-horizontal";
74
+ "main-vertical": "main-vertical";
75
+ tiled: "tiled";
76
+ "even-horizontal": "even-horizontal";
77
+ "even-vertical": "even-vertical";
78
+ }>>;
79
+ main_pane_size: z.ZodDefault<z.ZodNumber>;
80
+ }, z.core.$strip>;
81
+ export type TmuxConfig = z.infer<typeof TmuxConfigSchema>;
82
+ export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
83
+ /** Normalized model entry with optional per-model variant. */
84
+ export type ModelEntry = {
85
+ id: string;
86
+ variant?: string;
87
+ };
88
+ export declare const PresetSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
89
+ model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
90
+ id: z.ZodString;
91
+ variant: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>]>>]>>;
93
+ temperature: z.ZodOptional<z.ZodNumber>;
94
+ variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
95
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
+ mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
97
+ }, z.core.$strip>>;
98
+ export type Preset = z.infer<typeof PresetSchema>;
99
+ export declare const McpNameSchema: z.ZodEnum<{
100
+ websearch: "websearch";
101
+ context7: "context7";
102
+ grep_app: "grep_app";
103
+ }>;
104
+ export type McpName = z.infer<typeof McpNameSchema>;
105
+ export declare const BackgroundTaskConfigSchema: z.ZodObject<{
106
+ maxConcurrentStarts: z.ZodDefault<z.ZodNumber>;
107
+ }, z.core.$strip>;
108
+ export type BackgroundTaskConfig = z.infer<typeof BackgroundTaskConfigSchema>;
109
+ export declare const FailoverConfigSchema: z.ZodObject<{
110
+ enabled: z.ZodDefault<z.ZodBoolean>;
111
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
112
+ chains: z.ZodDefault<z.ZodObject<{
113
+ orchestrator: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ oracle: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ designer: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
+ explorer: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ librarian: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
+ fixer: z.ZodOptional<z.ZodArray<z.ZodString>>;
119
+ }, z.core.$catchall<z.ZodArray<z.ZodString>>>>;
120
+ }, z.core.$strip>;
121
+ export type FailoverConfig = z.infer<typeof FailoverConfigSchema>;
122
+ export declare const PluginConfigSchema: z.ZodObject<{
123
+ preset: z.ZodOptional<z.ZodString>;
124
+ scoringEngineVersion: z.ZodOptional<z.ZodEnum<{
125
+ v1: "v1";
126
+ "v2-shadow": "v2-shadow";
127
+ v2: "v2";
128
+ }>>;
129
+ balanceProviderUsage: z.ZodOptional<z.ZodBoolean>;
130
+ manualPlan: z.ZodOptional<z.ZodObject<{
131
+ orchestrator: z.ZodObject<{
132
+ primary: z.ZodString;
133
+ fallback1: z.ZodString;
134
+ fallback2: z.ZodString;
135
+ fallback3: z.ZodString;
136
+ }, z.core.$strip>;
137
+ oracle: z.ZodObject<{
138
+ primary: z.ZodString;
139
+ fallback1: z.ZodString;
140
+ fallback2: z.ZodString;
141
+ fallback3: z.ZodString;
142
+ }, z.core.$strip>;
143
+ designer: z.ZodObject<{
144
+ primary: z.ZodString;
145
+ fallback1: z.ZodString;
146
+ fallback2: z.ZodString;
147
+ fallback3: z.ZodString;
148
+ }, z.core.$strip>;
149
+ explorer: z.ZodObject<{
150
+ primary: z.ZodString;
151
+ fallback1: z.ZodString;
152
+ fallback2: z.ZodString;
153
+ fallback3: z.ZodString;
154
+ }, z.core.$strip>;
155
+ librarian: z.ZodObject<{
156
+ primary: z.ZodString;
157
+ fallback1: z.ZodString;
158
+ fallback2: z.ZodString;
159
+ fallback3: z.ZodString;
160
+ }, z.core.$strip>;
161
+ fixer: z.ZodObject<{
162
+ primary: z.ZodString;
163
+ fallback1: z.ZodString;
164
+ fallback2: z.ZodString;
165
+ fallback3: z.ZodString;
166
+ }, z.core.$strip>;
167
+ }, z.core.$strict>>;
168
+ presets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
169
+ model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
170
+ id: z.ZodString;
171
+ variant: z.ZodOptional<z.ZodString>;
172
+ }, z.core.$strip>]>>]>>;
173
+ temperature: z.ZodOptional<z.ZodNumber>;
174
+ variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
175
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
176
+ mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
177
+ }, z.core.$strip>>>>;
178
+ agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
179
+ model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
180
+ id: z.ZodString;
181
+ variant: z.ZodOptional<z.ZodString>;
182
+ }, z.core.$strip>]>>]>>;
183
+ temperature: z.ZodOptional<z.ZodNumber>;
184
+ variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
185
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
+ mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
+ }, z.core.$strip>>>;
188
+ disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
189
+ tmux: z.ZodOptional<z.ZodObject<{
190
+ enabled: z.ZodDefault<z.ZodBoolean>;
191
+ layout: z.ZodDefault<z.ZodEnum<{
192
+ "main-horizontal": "main-horizontal";
193
+ "main-vertical": "main-vertical";
194
+ tiled: "tiled";
195
+ "even-horizontal": "even-horizontal";
196
+ "even-vertical": "even-vertical";
197
+ }>>;
198
+ main_pane_size: z.ZodDefault<z.ZodNumber>;
199
+ }, z.core.$strip>>;
200
+ background: z.ZodOptional<z.ZodObject<{
201
+ maxConcurrentStarts: z.ZodDefault<z.ZodNumber>;
202
+ }, z.core.$strip>>;
203
+ fallback: z.ZodOptional<z.ZodObject<{
204
+ enabled: z.ZodDefault<z.ZodBoolean>;
205
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
206
+ chains: z.ZodDefault<z.ZodObject<{
207
+ orchestrator: z.ZodOptional<z.ZodArray<z.ZodString>>;
208
+ oracle: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
+ designer: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
+ explorer: z.ZodOptional<z.ZodArray<z.ZodString>>;
211
+ librarian: z.ZodOptional<z.ZodArray<z.ZodString>>;
212
+ fixer: z.ZodOptional<z.ZodArray<z.ZodString>>;
213
+ }, z.core.$catchall<z.ZodArray<z.ZodString>>>>;
214
+ }, z.core.$strip>>;
215
+ }, z.core.$strip>;
216
+ export type PluginConfig = z.infer<typeof PluginConfigSchema>;
217
+ export type { AgentName } from './constants';
@@ -0,0 +1,10 @@
1
+ import type { AgentOverrideConfig, PluginConfig } from './schema';
2
+ /**
3
+ * Get agent override config by name, supporting backward-compatible aliases.
4
+ * Checks both the current name and any legacy alias names.
5
+ *
6
+ * @param config - The plugin configuration
7
+ * @param name - The current agent name
8
+ * @returns The agent-specific override configuration if found
9
+ */
10
+ export declare function getAgentOverride(config: PluginConfig | undefined, name: string): AgentOverrideConfig | undefined;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Invalidates the current package by removing its directory and dependency entries.
3
+ * This forces a clean state before running a fresh install.
4
+ * @param packageName The name of the package to invalidate.
5
+ */
6
+ export declare function invalidatePackage(packageName?: string): boolean;
@@ -0,0 +1,28 @@
1
+ import type { PluginEntryInfo } from './types';
2
+ /**
3
+ * Extracts the update channel (latest, alpha, beta, etc.) from a version string.
4
+ * @param version The version or tag to analyze.
5
+ * @returns The channel name.
6
+ */
7
+ export declare function extractChannel(version: string | null): string;
8
+ /**
9
+ * Resolves the version of the plugin when running in local development mode.
10
+ */
11
+ export declare function getLocalDevVersion(directory: string): string | null;
12
+ /**
13
+ * Searches across all config locations to find the current installation entry for this plugin.
14
+ */
15
+ export declare function findPluginEntry(directory: string): PluginEntryInfo | null;
16
+ /**
17
+ * Resolves the installed version from node_modules, with memoization.
18
+ */
19
+ export declare function getCachedVersion(): string | null;
20
+ /**
21
+ * Safely updates a pinned version in the configuration file.
22
+ * It attempts to replace the exact plugin string to preserve comments and formatting.
23
+ */
24
+ export declare function updatePinnedVersion(configPath: string, oldEntry: string, newVersion: string): boolean;
25
+ /**
26
+ * Fetches the latest version for a specific channel from the NPM registry.
27
+ */
28
+ export declare function getLatestVersion(channel?: string): Promise<string | null>;
@@ -0,0 +1,11 @@
1
+ export declare const PACKAGE_NAME = "oh-my-opencode-medium";
2
+ export declare const NPM_REGISTRY_URL: string;
3
+ export declare const NPM_FETCH_TIMEOUT = 5000;
4
+ /** The directory used by OpenCode to cache node_modules for plugins. */
5
+ export declare const CACHE_DIR: string;
6
+ /** Path to this plugin's package.json within the OpenCode cache. */
7
+ export declare const INSTALLED_PACKAGE_JSON: string;
8
+ /** Primary OpenCode configuration file path (standard JSON). */
9
+ export declare const USER_OPENCODE_CONFIG: string;
10
+ /** Alternative OpenCode configuration file path (JSON with Comments). */
11
+ export declare const USER_OPENCODE_CONFIG_JSONC: string;
@@ -0,0 +1,17 @@
1
+ import type { PluginInput } from '@opencode-ai/plugin';
2
+ import type { AutoUpdateCheckerOptions } from './types';
3
+ /**
4
+ * Creates an OpenCode hook that checks for plugin updates when a new session is created.
5
+ * @param ctx The plugin input context.
6
+ * @param options Configuration options for the update checker.
7
+ * @returns A hook object for the session.created event.
8
+ */
9
+ export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions): {
10
+ event: ({ event }: {
11
+ event: {
12
+ type: string;
13
+ properties?: unknown;
14
+ };
15
+ }) => void;
16
+ };
17
+ export type { AutoUpdateCheckerOptions } from './types';
@@ -0,0 +1,23 @@
1
+ export interface NpmDistTags {
2
+ latest: string;
3
+ [key: string]: string;
4
+ }
5
+ export interface OpencodeConfig {
6
+ plugin?: string[];
7
+ [key: string]: unknown;
8
+ }
9
+ export interface PackageJson {
10
+ version: string;
11
+ name?: string;
12
+ [key: string]: unknown;
13
+ }
14
+ export interface AutoUpdateCheckerOptions {
15
+ showStartupToast?: boolean;
16
+ autoUpdate?: boolean;
17
+ }
18
+ export interface PluginEntryInfo {
19
+ entry: string;
20
+ isPinned: boolean;
21
+ pinnedVersion: string | null;
22
+ configPath: string;
23
+ }
@@ -0,0 +1,16 @@
1
+ import type { PluginInput, ProviderContext } from '@opencode-ai/plugin';
2
+ import type { Model, UserMessage } from '@opencode-ai/sdk';
3
+ interface ChatHeadersInput {
4
+ sessionID: string;
5
+ model: Model;
6
+ provider: ProviderContext;
7
+ message: UserMessage;
8
+ }
9
+ interface ChatHeadersOutput {
10
+ headers: Record<string, string>;
11
+ }
12
+ export declare function __resetInternalMarkerCacheForTesting(): void;
13
+ export declare function createChatHeadersHook(ctx: PluginInput): {
14
+ 'chat.headers': (input: ChatHeadersInput, output: ChatHeadersOutput) => Promise<void>;
15
+ };
16
+ export {};
@@ -0,0 +1,2 @@
1
+ import { type DetectedError } from './patterns';
2
+ export declare function buildRetryGuidance(errorInfo: DetectedError): string;
@@ -0,0 +1,8 @@
1
+ import type { PluginInput } from '@opencode-ai/plugin';
2
+ export declare function createDelegateTaskRetryHook(_ctx: PluginInput): {
3
+ 'tool.execute.after': (input: {
4
+ tool: string;
5
+ }, output: {
6
+ output: unknown;
7
+ }) => Promise<void>;
8
+ };
@@ -0,0 +1,4 @@
1
+ export { buildRetryGuidance } from './guidance';
2
+ export { createDelegateTaskRetryHook } from './hook';
3
+ export type { DelegateTaskErrorPattern, DetectedError } from './patterns';
4
+ export { DELEGATE_TASK_ERROR_PATTERNS, detectDelegateTaskError, } from './patterns';
@@ -0,0 +1,11 @@
1
+ export interface DelegateTaskErrorPattern {
2
+ pattern: string;
3
+ errorType: string;
4
+ fixHint: string;
5
+ }
6
+ export declare const DELEGATE_TASK_ERROR_PATTERNS: DelegateTaskErrorPattern[];
7
+ export interface DetectedError {
8
+ errorType: string;
9
+ originalOutput: string;
10
+ }
11
+ export declare function detectDelegateTaskError(output: string): DetectedError | null;
@@ -0,0 +1,7 @@
1
+ export type { AutoUpdateCheckerOptions } from './auto-update-checker';
2
+ export { createAutoUpdateCheckerHook } from './auto-update-checker';
3
+ export { createChatHeadersHook } from './chat-headers';
4
+ export { createDelegateTaskRetryHook } from './delegate-task-retry';
5
+ export { createJsonErrorRecoveryHook } from './json-error-recovery';
6
+ export { createPhaseReminderHook } from './phase-reminder';
7
+ export { createPostReadNudgeHook } from './post-read-nudge';
@@ -0,0 +1,18 @@
1
+ import type { PluginInput } from '@opencode-ai/plugin';
2
+ export declare const JSON_ERROR_TOOL_EXCLUDE_LIST: readonly ["bash", "read", "glob", "grep", "webfetch", "grep_app_searchgithub", "websearch_web_search_exa"];
3
+ export declare const JSON_ERROR_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
4
+ export declare const JSON_ERROR_REMINDER = "\n[JSON PARSE ERROR - IMMEDIATE ACTION REQUIRED]\n\nYou sent invalid JSON arguments. The system could not parse your tool call.\nSTOP and do this NOW:\n\n1. LOOK at the error message above to see what was expected vs what you sent.\n2. CORRECT your JSON syntax (missing braces, unescaped quotes, trailing commas, etc).\n3. RETRY the tool call with valid JSON.\n\nDO NOT repeat the exact same invalid call.\n";
5
+ interface ToolExecuteAfterInput {
6
+ tool: string;
7
+ sessionID: string;
8
+ callID: string;
9
+ }
10
+ interface ToolExecuteAfterOutput {
11
+ title: string;
12
+ output: unknown;
13
+ metadata: unknown;
14
+ }
15
+ export declare function createJsonErrorRecoveryHook(_ctx: PluginInput): {
16
+ 'tool.execute.after': (input: ToolExecuteAfterInput, output: ToolExecuteAfterOutput) => Promise<void>;
17
+ };
18
+ export {};
@@ -0,0 +1 @@
1
+ export { createJsonErrorRecoveryHook, JSON_ERROR_PATTERNS, JSON_ERROR_REMINDER, JSON_ERROR_TOOL_EXCLUDE_LIST, } from './hook';
@@ -0,0 +1,26 @@
1
+ export declare const PHASE_REMINDER = "<reminder>Recall Workflow Rules:\nUnderstand \u2192 find the best path (delegate based on rules and parallelize independent work) \u2192 execute \u2192 verify.\nIf delegating, launch the specialist in the same turn you mention it.</reminder>";
2
+ interface MessageInfo {
3
+ role: string;
4
+ agent?: string;
5
+ sessionID?: string;
6
+ }
7
+ interface MessagePart {
8
+ type: string;
9
+ text?: string;
10
+ [key: string]: unknown;
11
+ }
12
+ interface MessageWithParts {
13
+ info: MessageInfo;
14
+ parts: MessagePart[];
15
+ }
16
+ /**
17
+ * Creates the experimental.chat.messages.transform hook for phase reminder injection.
18
+ * This hook runs right before sending to API, so it doesn't affect UI display.
19
+ * Only injects for the orchestrator agent.
20
+ */
21
+ export declare function createPhaseReminderHook(): {
22
+ 'experimental.chat.messages.transform': (_input: Record<string, never>, output: {
23
+ messages: MessageWithParts[];
24
+ }) => Promise<void>;
25
+ };
26
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Post-Read nudge - appends a delegation reminder after file reads.
3
+ * Catches the "read files → implement myself" anti-pattern.
4
+ */
5
+ interface ToolExecuteAfterInput {
6
+ tool: string;
7
+ sessionID?: string;
8
+ callID?: string;
9
+ }
10
+ interface ToolExecuteAfterOutput {
11
+ title: string;
12
+ output: string;
13
+ metadata: Record<string, unknown>;
14
+ }
15
+ export declare function createPostReadNudgeHook(): {
16
+ 'tool.execute.after': (input: ToolExecuteAfterInput, output: ToolExecuteAfterOutput) => Promise<void>;
17
+ };
18
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Plugin } from '@opencode-ai/plugin';
2
+ declare const OhMyOpenCodeLite: Plugin;
3
+ export default OhMyOpenCodeLite;
4
+ export type { AgentName, AgentOverrideConfig, McpName, PluginConfig, TmuxConfig, TmuxLayout, } from './config';
5
+ export type { RemoteMcpConfig } from './mcp';