oh-my-opencode-slim 2.0.0-beta.9 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.ja-JP.md +121 -47
  2. package/README.ko-KR.md +708 -0
  3. package/README.md +149 -58
  4. package/README.zh-CN.md +142 -64
  5. package/dist/cli/background-subagents.d.ts +13 -0
  6. package/dist/cli/companion.d.ts +4 -0
  7. package/dist/cli/index.d.ts +2 -1
  8. package/dist/cli/index.js +651 -82
  9. package/dist/cli/install.d.ts +6 -1
  10. package/dist/cli/providers.d.ts +2 -1
  11. package/dist/cli/types.d.ts +8 -0
  12. package/dist/companion/manager.d.ts +38 -0
  13. package/dist/config/constants.d.ts +4 -1
  14. package/dist/config/fallback-chains.d.ts +1 -0
  15. package/dist/config/schema.d.ts +46 -40
  16. package/dist/hooks/auto-update-checker/checker.d.ts +7 -1
  17. package/dist/hooks/auto-update-checker/constants.d.ts +1 -0
  18. package/dist/hooks/auto-update-checker/types.d.ts +10 -0
  19. package/dist/hooks/index.d.ts +0 -2
  20. package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
  21. package/dist/hooks/phase-reminder/index.d.ts +1 -1
  22. package/dist/index.js +1861 -2149
  23. package/dist/mcp/grep-app.d.ts +1 -1
  24. package/dist/multiplexer/zellij/index.d.ts +17 -3
  25. package/dist/tools/cancel-task.d.ts +6 -0
  26. package/dist/tools/preset-manager.d.ts +6 -7
  27. package/dist/tui.js +56 -31
  28. package/dist/utils/background-job-board.d.ts +39 -1
  29. package/dist/utils/index.d.ts +0 -1
  30. package/dist/utils/task.d.ts +2 -0
  31. package/oh-my-opencode-slim.schema.json +34 -91
  32. package/package.json +4 -3
  33. package/src/skills/codemap.md +3 -1
  34. package/src/skills/deepwork/SKILL.md +25 -3
  35. package/src/skills/oh-my-opencode-slim/SKILL.md +326 -0
  36. package/dist/divoom/council.gif +0 -0
  37. package/dist/divoom/designer.gif +0 -0
  38. package/dist/divoom/explorer.gif +0 -0
  39. package/dist/divoom/fixer.gif +0 -0
  40. package/dist/divoom/input.gif +0 -0
  41. package/dist/divoom/intro.gif +0 -0
  42. package/dist/divoom/librarian.gif +0 -0
  43. package/dist/divoom/manager.d.ts +0 -57
  44. package/dist/divoom/oracle.gif +0 -0
  45. package/dist/divoom/orchestrator.gif +0 -0
  46. package/dist/hooks/goal/index.d.ts +0 -38
  47. package/dist/hooks/todo-continuation/index.d.ts +0 -55
  48. package/dist/hooks/todo-continuation/todo-hygiene.d.ts +0 -35
  49. package/dist/utils/session-manager.d.ts +0 -55
@@ -1,2 +1,7 @@
1
- import type { InstallArgs } from './types';
1
+ import type { InstallArgs, InstallConfig } from './types';
2
+ export declare function configureBackgroundSubagents(config: InstallConfig): Promise<{
3
+ enabledNow: boolean;
4
+ configuredTarget?: string;
5
+ }>;
6
+ export declare function shouldInstallCompanion(config: InstallConfig): Promise<boolean>;
2
7
  export declare function install(args: InstallArgs): Promise<number>;
@@ -4,6 +4,7 @@ export declare const MODEL_MAPPINGS: {
4
4
  readonly openai: {
5
5
  readonly orchestrator: {
6
6
  readonly model: "openai/gpt-5.5";
7
+ readonly variant: "medium";
7
8
  };
8
9
  readonly oracle: {
9
10
  readonly model: "openai/gpt-5.5";
@@ -22,7 +23,7 @@ export declare const MODEL_MAPPINGS: {
22
23
  readonly variant: "medium";
23
24
  };
24
25
  readonly fixer: {
25
- readonly model: "openai/gpt-5.4-mini";
26
+ readonly model: "openai/gpt-5.5";
26
27
  readonly variant: "low";
27
28
  };
28
29
  };
@@ -1,10 +1,15 @@
1
1
  export type BooleanArg = 'yes' | 'no';
2
+ export type BackgroundSubagentsArg = 'ask' | 'yes' | 'no';
3
+ export type CompanionArg = 'ask' | BooleanArg;
2
4
  export interface InstallArgs {
3
5
  tui: boolean;
4
6
  skills?: BooleanArg;
5
7
  preset?: string;
6
8
  dryRun?: boolean;
7
9
  reset?: boolean;
10
+ backgroundSubagents?: BackgroundSubagentsArg;
11
+ backgroundSubagentsTarget?: string;
12
+ companion?: CompanionArg;
8
13
  }
9
14
  export interface OpenCodeConfig {
10
15
  plugin?: unknown[];
@@ -19,6 +24,9 @@ export interface InstallConfig {
19
24
  promptForStar?: boolean;
20
25
  dryRun?: boolean;
21
26
  reset: boolean;
27
+ backgroundSubagents: BackgroundSubagentsArg;
28
+ backgroundSubagentsTarget?: string;
29
+ companion?: CompanionArg;
22
30
  }
23
31
  export interface ConfigMergeResult {
24
32
  success: boolean;
@@ -0,0 +1,38 @@
1
+ import type { CompanionConfig } from '../config/schema';
2
+ export declare function stateFilePath(): string;
3
+ /**
4
+ * Tracks live agent activity per session and mirrors it to the companion
5
+ * state file. Source of truth is OpenCode's session.status events: every
6
+ * spawned specialist (foreground or background) runs in its own session,
7
+ * which reports busy/idle independently. Tool-call lifecycles are NOT used
8
+ * because background Task launches return immediately while the agent keeps
9
+ * running in its child session.
10
+ */
11
+ export declare class CompanionManager {
12
+ private readonly id;
13
+ private readonly cwd;
14
+ private status;
15
+ /** sessionId → agent name, for sessions currently busy. */
16
+ private readonly busyAgentSessions;
17
+ private readonly config?;
18
+ constructor(sessionId: string, cwd: string, config?: CompanionConfig);
19
+ onLoad(): void;
20
+ /**
21
+ * Feed every session.status event here, with the agent name resolved
22
+ * from sessionAgentMap. Orchestrator sessions drive overall status;
23
+ * specialist sessions drive the per-agent GIF grid.
24
+ */
25
+ onSessionStatus(input: {
26
+ sessionId?: string;
27
+ agent?: string;
28
+ status?: string;
29
+ }): void;
30
+ onSessionDeleted(sessionId: string | undefined): void;
31
+ onWaitingInput(): void;
32
+ onInputResolved(): void;
33
+ onExit(): void;
34
+ /** One entry per running agent instance (two fixers → two cells). */
35
+ private activeAgents;
36
+ private flush;
37
+ private spawnIfAvailable;
38
+ }
@@ -20,7 +20,10 @@ export declare const DEFAULT_TIMEOUT_MS: number;
20
20
  export declare const MAX_POLL_TIME_MS: number;
21
21
  export declare const FALLBACK_FAILOVER_TIMEOUT_MS = 15000;
22
22
  export declare const DEFAULT_MAX_SUBAGENT_DEPTH = 3;
23
- export declare const PHASE_REMINDER_TEXT = "!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 wait for hook-driven completion or use task_status only when needed \u2192 reconcile terminal results \u2192 verify. Do not consume running-job output or advance dependent work. !END!";
23
+ export declare const PHASE_REMINDER_TEXT = "!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 wait for hook-driven completion \u2192 reconcile terminal results \u2192 verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!";
24
+ export declare const WRITABLE_FILE_OPERATIONS_RULES = "**File Operations Rules**:\n- Prefer dedicated file tools for normal code work: glob/grep/ast_grep_search for discovery, read for file contents, and edit/write/apply_patch for targeted source changes.\n- Use bash for execution and automation: git, package managers, tests, builds, scripts, diagnostics, and shell-native filesystem operations.\n- Shell is acceptable for bulk or mechanical filesystem changes when it is clearer or safer than many individual edits (for example: truncate generated logs, remove build artifacts, batch rename/move files), especially when the user explicitly asks for that shell operation.\n- Before destructive or broad shell operations, verify the target set and quote paths. Prefer a dry-run/listing first when practical.\n- Do not use cat/head/tail/sed/awk only to read code into context; use read/grep unless a shell pipeline is genuinely the better diagnostic.";
25
+ export declare const READONLY_FILE_OPERATIONS_RULES = "**File Operations Rules**:\n- READ-ONLY: inspect and report; do not modify files.\n- Prefer dedicated file tools for codebase inspection: glob/grep/ast_grep_search for discovery and read for file contents.\n- Bash is allowed for non-mutating diagnostics and shell-native inspection when it is the clearest tool, but not for modifying files.\n- Do not use cat/head/tail/sed/awk only to read code into context; use read/grep unless a shell pipeline is genuinely the better diagnostic.";
26
+ export declare const NO_SHELL_READONLY_FILE_OPERATIONS_RULES = "**File Operations Rules**:\n- READ-ONLY: inspect and report; do not modify files.\n- Use glob/grep/ast_grep_search for discovery and read for file contents.\n- Do not use bash or shell commands.";
24
27
  export declare const TMUX_SPAWN_DELAY_MS = 500;
25
28
  export declare const COUNCILLOR_STAGGER_MS = 250;
26
29
  export declare const STABLE_POLLS_THRESHOLD = 3;
@@ -0,0 +1 @@
1
+ export declare function normalizeFallbackChainsForPreset(chains: Record<string, string[] | undefined>, presetName: string | null | undefined): Record<string, string[]>;
@@ -79,6 +79,11 @@ export declare const MultiplexerLayoutSchema: z.ZodEnum<{
79
79
  "even-vertical": "even-vertical";
80
80
  }>;
81
81
  export type MultiplexerLayout = z.infer<typeof MultiplexerLayoutSchema>;
82
+ export declare const ZellijPaneModeSchema: z.ZodEnum<{
83
+ "agent-tab": "agent-tab";
84
+ "current-tab": "current-tab";
85
+ }>;
86
+ export type ZellijPaneMode = z.infer<typeof ZellijPaneModeSchema>;
82
87
  export declare const TmuxLayoutSchema: z.ZodEnum<{
83
88
  "main-horizontal": "main-horizontal";
84
89
  "main-vertical": "main-vertical";
@@ -102,6 +107,10 @@ export declare const MultiplexerConfigSchema: z.ZodObject<{
102
107
  "even-vertical": "even-vertical";
103
108
  }>>;
104
109
  main_pane_size: z.ZodDefault<z.ZodNumber>;
110
+ zellij_pane_mode: z.ZodDefault<z.ZodEnum<{
111
+ "agent-tab": "agent-tab";
112
+ "current-tab": "current-tab";
113
+ }>>;
105
114
  }, z.core.$strip>;
106
115
  export type MultiplexerConfig = z.infer<typeof MultiplexerConfigSchema>;
107
116
  export declare const TmuxConfigSchema: z.ZodObject<{
@@ -147,7 +156,7 @@ export type WebsearchConfig = z.infer<typeof WebsearchConfigSchema>;
147
156
  export declare const McpNameSchema: z.ZodEnum<{
148
157
  websearch: "websearch";
149
158
  context7: "context7";
150
- grep_app: "grep_app";
159
+ gh_grep: "gh_grep";
151
160
  }>;
152
161
  export type McpName = z.infer<typeof McpNameSchema>;
153
162
  export declare const InterviewConfigSchema: z.ZodObject<{
@@ -158,31 +167,12 @@ export declare const InterviewConfigSchema: z.ZodObject<{
158
167
  dashboard: z.ZodDefault<z.ZodBoolean>;
159
168
  }, z.core.$strip>;
160
169
  export type InterviewConfig = z.infer<typeof InterviewConfigSchema>;
161
- export declare const SessionManagerConfigSchema: z.ZodObject<{
170
+ export declare const BackgroundJobsConfigSchema: z.ZodObject<{
162
171
  maxSessionsPerAgent: z.ZodDefault<z.ZodNumber>;
163
172
  readContextMinLines: z.ZodDefault<z.ZodNumber>;
164
173
  readContextMaxFiles: z.ZodDefault<z.ZodNumber>;
165
174
  }, z.core.$strip>;
166
- export type SessionManagerConfig = z.infer<typeof SessionManagerConfigSchema>;
167
- export declare const DivoomConfigSchema: z.ZodObject<{
168
- enabled: z.ZodDefault<z.ZodBoolean>;
169
- python: z.ZodDefault<z.ZodString>;
170
- script: z.ZodDefault<z.ZodString>;
171
- size: z.ZodDefault<z.ZodNumber>;
172
- fps: z.ZodDefault<z.ZodNumber>;
173
- speed: z.ZodDefault<z.ZodNumber>;
174
- maxFrames: z.ZodDefault<z.ZodNumber>;
175
- posterizeBits: z.ZodDefault<z.ZodNumber>;
176
- gifs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
177
- }, z.core.$strip>;
178
- export type DivoomConfig = z.infer<typeof DivoomConfigSchema>;
179
- export declare const TodoContinuationConfigSchema: z.ZodObject<{
180
- maxContinuations: z.ZodDefault<z.ZodNumber>;
181
- cooldownMs: z.ZodDefault<z.ZodNumber>;
182
- autoEnable: z.ZodDefault<z.ZodBoolean>;
183
- autoEnableThreshold: z.ZodDefault<z.ZodNumber>;
184
- }, z.core.$strip>;
185
- export type TodoContinuationConfig = z.infer<typeof TodoContinuationConfigSchema>;
175
+ export type BackgroundJobsConfig = z.infer<typeof BackgroundJobsConfigSchema>;
186
176
  export declare const FailoverConfigSchema: z.ZodObject<{
187
177
  enabled: z.ZodDefault<z.ZodBoolean>;
188
178
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -198,6 +188,21 @@ export declare const FailoverConfigSchema: z.ZodObject<{
198
188
  retry_on_empty: z.ZodDefault<z.ZodBoolean>;
199
189
  }, z.core.$strip>;
200
190
  export type FailoverConfig = z.infer<typeof FailoverConfigSchema>;
191
+ export declare const CompanionConfigSchema: z.ZodObject<{
192
+ enabled: z.ZodOptional<z.ZodBoolean>;
193
+ position: z.ZodOptional<z.ZodEnum<{
194
+ "bottom-right": "bottom-right";
195
+ "bottom-left": "bottom-left";
196
+ "top-right": "top-right";
197
+ "top-left": "top-left";
198
+ }>>;
199
+ size: z.ZodOptional<z.ZodEnum<{
200
+ small: "small";
201
+ medium: "medium";
202
+ large: "large";
203
+ }>>;
204
+ }, z.core.$strip>;
205
+ export type CompanionConfig = z.infer<typeof CompanionConfigSchema>;
201
206
  export declare const PluginConfigSchema: z.ZodObject<{
202
207
  preset: z.ZodOptional<z.ZodString>;
203
208
  setDefaultAgent: z.ZodOptional<z.ZodBoolean>;
@@ -291,6 +296,10 @@ export declare const PluginConfigSchema: z.ZodObject<{
291
296
  "even-vertical": "even-vertical";
292
297
  }>>;
293
298
  main_pane_size: z.ZodDefault<z.ZodNumber>;
299
+ zellij_pane_mode: z.ZodDefault<z.ZodEnum<{
300
+ "agent-tab": "agent-tab";
301
+ "current-tab": "current-tab";
302
+ }>>;
294
303
  }, z.core.$strip>>;
295
304
  tmux: z.ZodOptional<z.ZodObject<{
296
305
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -316,28 +325,11 @@ export declare const PluginConfigSchema: z.ZodObject<{
316
325
  port: z.ZodDefault<z.ZodNumber>;
317
326
  dashboard: z.ZodDefault<z.ZodBoolean>;
318
327
  }, z.core.$strip>>;
319
- sessionManager: z.ZodOptional<z.ZodObject<{
328
+ backgroundJobs: z.ZodOptional<z.ZodObject<{
320
329
  maxSessionsPerAgent: z.ZodDefault<z.ZodNumber>;
321
330
  readContextMinLines: z.ZodDefault<z.ZodNumber>;
322
331
  readContextMaxFiles: z.ZodDefault<z.ZodNumber>;
323
332
  }, z.core.$strip>>;
324
- divoom: z.ZodOptional<z.ZodObject<{
325
- enabled: z.ZodDefault<z.ZodBoolean>;
326
- python: z.ZodDefault<z.ZodString>;
327
- script: z.ZodDefault<z.ZodString>;
328
- size: z.ZodDefault<z.ZodNumber>;
329
- fps: z.ZodDefault<z.ZodNumber>;
330
- speed: z.ZodDefault<z.ZodNumber>;
331
- maxFrames: z.ZodDefault<z.ZodNumber>;
332
- posterizeBits: z.ZodDefault<z.ZodNumber>;
333
- gifs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
334
- }, z.core.$strip>>;
335
- todoContinuation: z.ZodOptional<z.ZodObject<{
336
- maxContinuations: z.ZodDefault<z.ZodNumber>;
337
- cooldownMs: z.ZodDefault<z.ZodNumber>;
338
- autoEnable: z.ZodDefault<z.ZodBoolean>;
339
- autoEnableThreshold: z.ZodDefault<z.ZodNumber>;
340
- }, z.core.$strip>>;
341
333
  fallback: z.ZodOptional<z.ZodObject<{
342
334
  enabled: z.ZodDefault<z.ZodBoolean>;
343
335
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -394,6 +386,20 @@ export declare const PluginConfigSchema: z.ZodObject<{
394
386
  master_timeout?: unknown;
395
387
  master_fallback?: unknown;
396
388
  }>>>;
389
+ companion: z.ZodOptional<z.ZodObject<{
390
+ enabled: z.ZodOptional<z.ZodBoolean>;
391
+ position: z.ZodOptional<z.ZodEnum<{
392
+ "bottom-right": "bottom-right";
393
+ "bottom-left": "bottom-left";
394
+ "top-right": "top-right";
395
+ "top-left": "top-left";
396
+ }>>;
397
+ size: z.ZodOptional<z.ZodEnum<{
398
+ small: "small";
399
+ medium: "medium";
400
+ large: "large";
401
+ }>>;
402
+ }, z.core.$strip>>;
397
403
  }, z.core.$strip>;
398
404
  export type PluginConfig = z.infer<typeof PluginConfigSchema>;
399
405
  export type { AgentName } from './constants';
@@ -1,4 +1,4 @@
1
- import type { PluginEntryInfo } from './types';
1
+ import type { CompatibleVersionResult, PluginEntryInfo } from './types';
2
2
  /**
3
3
  * Extracts the update channel (latest, alpha, beta, etc.) from a version string.
4
4
  * @param version The version or tag to analyze.
@@ -30,3 +30,9 @@ export declare function updatePinnedVersion(configPath: string, oldEntry: string
30
30
  * Fetches the latest version for a specific channel from the NPM registry.
31
31
  */
32
32
  export declare function getLatestVersion(channel?: string): Promise<string | null>;
33
+ /**
34
+ * Resolves the newest version that is safe for the current install to use.
35
+ * Auto-update never crosses major versions; newer majors are surfaced as a
36
+ * manual migration notification instead.
37
+ */
38
+ export declare function getLatestCompatibleVersion(currentVersion: string, channel?: string): Promise<CompatibleVersionResult>;
@@ -1,5 +1,6 @@
1
1
  export declare const PACKAGE_NAME = "oh-my-opencode-slim";
2
2
  export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-opencode-slim/dist-tags";
3
+ export declare const NPM_PACKAGE_URL = "https://registry.npmjs.org/oh-my-opencode-slim";
3
4
  export declare const NPM_FETCH_TIMEOUT = 5000;
4
5
  /** The directory used by OpenCode to cache node_modules for plugins. */
5
6
  export declare const CACHE_DIR: string;
@@ -2,6 +2,16 @@ export interface NpmDistTags {
2
2
  latest: string;
3
3
  [key: string]: string;
4
4
  }
5
+ export interface NpmPackageMetadata {
6
+ 'dist-tags'?: NpmDistTags;
7
+ versions?: Record<string, unknown>;
8
+ }
9
+ export interface CompatibleVersionResult {
10
+ latestVersion: string | null;
11
+ latestMajorVersion: string | null;
12
+ blockedByMajor: boolean;
13
+ unsafeReason?: 'unparseable-current-version';
14
+ }
5
15
  export interface OpencodeConfig {
6
16
  plugin?: unknown[];
7
17
  [key: string]: unknown;
@@ -6,10 +6,8 @@ export { createDeepworkCommandHook } from './deepwork';
6
6
  export { createDelegateTaskRetryHook } from './delegate-task-retry';
7
7
  export { createFilterAvailableSkillsHook } from './filter-available-skills';
8
8
  export { ForegroundFallbackManager, isRateLimitError, } from './foreground-fallback';
9
- export { createGoalHook } from './goal';
10
9
  export { processImageAttachments } from './image-hook';
11
10
  export { createJsonErrorRecoveryHook } from './json-error-recovery';
12
11
  export { createPhaseReminderHook } from './phase-reminder';
13
12
  export { createPostFileToolNudgeHook } from './post-file-tool-nudge';
14
13
  export { createTaskSessionManagerHook } from './task-session-manager';
15
- export { createTodoContinuationHook } from './todo-continuation';
@@ -1,5 +1,5 @@
1
1
  import type { PluginInput } from '@opencode-ai/plugin';
2
- export declare const JSON_ERROR_TOOL_EXCLUDE_LIST: readonly ["bash", "read", "glob", "webfetch", "grep_app_searchgithub", "websearch_web_search_exa"];
2
+ export declare const JSON_ERROR_TOOL_EXCLUDE_LIST: readonly ["bash", "read", "glob", "webfetch", "gh_grep_searchgithub", "websearch_web_search_exa"];
3
3
  export declare const JSON_ERROR_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
4
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
5
  interface ToolExecuteAfterInput {
@@ -1,4 +1,4 @@
1
- export declare const PHASE_REMINDER = "<internal_reminder>!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 wait for hook-driven completion or use task_status only when needed \u2192 reconcile terminal results \u2192 verify. Do not consume running-job output or advance dependent work. !END!</internal_reminder>";
1
+ export declare const PHASE_REMINDER = "<internal_reminder>!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 wait for hook-driven completion \u2192 reconcile terminal results \u2192 verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!</internal_reminder>";
2
2
  interface MessageInfo {
3
3
  role: string;
4
4
  agent?: string;