oh-my-opencode-slim 2.0.1 → 2.0.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 (39) hide show
  1. package/README.ja-JP.md +30 -1
  2. package/README.ko-KR.md +30 -1
  3. package/README.md +36 -1
  4. package/README.zh-CN.md +30 -1
  5. package/dist/agents/orchestrator.d.ts +0 -2
  6. package/dist/cli/index.js +22 -34
  7. package/dist/config/agent-mcps.d.ts +0 -4
  8. package/dist/config/constants.d.ts +1 -7
  9. package/dist/config/council-schema.d.ts +0 -15
  10. package/dist/config/runtime-preset.d.ts +0 -1
  11. package/dist/config/schema.d.ts +2 -68
  12. package/dist/hooks/auto-update-checker/skill-sync.d.ts +9 -0
  13. package/dist/hooks/filter-available-skills/index.d.ts +1 -13
  14. package/dist/hooks/foreground-fallback/index.d.ts +1 -1
  15. package/dist/hooks/image-hook.d.ts +1 -13
  16. package/dist/hooks/index.d.ts +3 -2
  17. package/dist/hooks/phase-reminder/index.d.ts +10 -16
  18. package/dist/hooks/reflect/index.d.ts +13 -0
  19. package/dist/hooks/task-session-manager/index.d.ts +2 -16
  20. package/dist/hooks/types.d.ts +23 -0
  21. package/dist/index.js +391 -289
  22. package/dist/tui.js +16 -25
  23. package/dist/utils/agent-variant.d.ts +0 -40
  24. package/dist/utils/compat.d.ts +0 -1
  25. package/dist/utils/guards.d.ts +4 -0
  26. package/dist/utils/index.d.ts +1 -2
  27. package/dist/utils/logger.d.ts +1 -1
  28. package/dist/utils/task.d.ts +0 -2
  29. package/oh-my-opencode-slim.schema.json +2 -249
  30. package/package.json +1 -1
  31. package/src/skills/codemap.md +4 -1
  32. package/src/skills/reflect/SKILL.md +193 -0
  33. package/src/skills/worktrees/SKILL.md +164 -0
  34. package/dist/config/fallback-chains.d.ts +0 -1
  35. package/dist/hooks/apply-patch/patch.d.ts +0 -2
  36. package/dist/hooks/delegate-task-retry/guidance.d.ts +0 -2
  37. package/dist/hooks/delegate-task-retry/index.d.ts +0 -4
  38. package/dist/hooks/json-error-recovery/index.d.ts +0 -1
  39. package/dist/utils/env.d.ts +0 -1
@@ -1,19 +1,7 @@
1
- interface MessageWithParts {
2
- info: {
3
- role: string;
4
- agent?: string;
5
- sessionID?: string;
6
- };
7
- parts: Array<{
8
- type: string;
9
- text?: string;
10
- [key: string]: unknown;
11
- }>;
12
- }
1
+ import type { MessageWithParts } from './types';
13
2
  export declare function processImageAttachments(args: {
14
3
  messages: MessageWithParts[];
15
4
  workDir: string;
16
5
  disabledAgents: Set<string>;
17
6
  log: (msg: string) => void;
18
7
  }): void;
19
- export {};
@@ -3,11 +3,12 @@ export type { AutoUpdateCheckerOptions } from './auto-update-checker';
3
3
  export { createAutoUpdateCheckerHook } from './auto-update-checker';
4
4
  export { createChatHeadersHook } from './chat-headers';
5
5
  export { createDeepworkCommandHook } from './deepwork';
6
- export { createDelegateTaskRetryHook } from './delegate-task-retry';
6
+ export { createDelegateTaskRetryHook } from './delegate-task-retry/hook';
7
7
  export { createFilterAvailableSkillsHook } from './filter-available-skills';
8
8
  export { ForegroundFallbackManager, isRateLimitError, } from './foreground-fallback';
9
9
  export { processImageAttachments } from './image-hook';
10
- export { createJsonErrorRecoveryHook } from './json-error-recovery';
10
+ export { createJsonErrorRecoveryHook } from './json-error-recovery/hook';
11
11
  export { createPhaseReminderHook } from './phase-reminder';
12
12
  export { createPostFileToolNudgeHook } from './post-file-tool-nudge';
13
+ export { createReflectCommandHook } from './reflect';
13
14
  export { createTaskSessionManagerHook } from './task-session-manager';
@@ -1,18 +1,13 @@
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
- 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
- }
1
+ /**
2
+ * Phase reminder to append after each latest user message.
3
+ *
4
+ * Keeping this at the tail preserves immediate workflow guidance without
5
+ * mutating the cached system prompt or prepending request-local content ahead
6
+ * of the user's actual turn.
7
+ */
8
+ import { PHASE_REMINDER } from '../../config/constants';
9
+ import type { MessageWithParts } from '../types';
10
+ export { PHASE_REMINDER };
16
11
  /**
17
12
  * Creates the experimental.chat.messages.transform hook for phase reminder injection.
18
13
  * This hook runs right before sending to API, so it doesn't affect UI display.
@@ -23,4 +18,3 @@ export declare function createPhaseReminderHook(): {
23
18
  messages: MessageWithParts[];
24
19
  }) => Promise<void>;
25
20
  };
26
- export {};
@@ -0,0 +1,13 @@
1
+ export declare function createReflectCommandHook(): {
2
+ registerCommand: (config: Record<string, unknown>) => void;
3
+ handleCommandExecuteBefore: (input: {
4
+ command: string;
5
+ sessionID: string;
6
+ arguments: string;
7
+ }, output: {
8
+ parts: Array<{
9
+ type: string;
10
+ text?: string;
11
+ }>;
12
+ }) => Promise<void>;
13
+ };
@@ -1,19 +1,6 @@
1
1
  import type { PluginInput } from '@opencode-ai/plugin';
2
2
  import { BackgroundJobBoard } from '../../utils';
3
- interface ChatMessagePart {
4
- type: string;
5
- text?: string;
6
- [key: string]: unknown;
7
- }
8
- interface ChatMessage {
9
- info: {
10
- role: string;
11
- agent?: string;
12
- sessionID?: string;
13
- id?: string;
14
- };
15
- parts: ChatMessagePart[];
16
- }
3
+ import type { MessageWithParts } from '../types';
17
4
  export declare function createTaskSessionManagerHook(_ctx: PluginInput, options: {
18
5
  maxSessionsPerAgent: number;
19
6
  readContextMinLines?: number;
@@ -37,7 +24,7 @@ export declare function createTaskSessionManagerHook(_ctx: PluginInput, options:
37
24
  metadata?: unknown;
38
25
  }) => Promise<void>;
39
26
  'experimental.chat.messages.transform': (_input: Record<string, never>, output: {
40
- messages: ChatMessage[];
27
+ messages: MessageWithParts[];
41
28
  }) => Promise<void>;
42
29
  event: (input: {
43
30
  event: {
@@ -58,4 +45,3 @@ export declare function createTaskSessionManagerHook(_ctx: PluginInput, options:
58
45
  };
59
46
  }) => Promise<void>;
60
47
  };
61
- export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Shared message type shapes for the OpenCode plugin API's `messages` array.
3
+ *
4
+ * These types describe the structure of chat messages passed through
5
+ * `experimental.chat.messages.transform` and related hooks. All fields
6
+ * are unioned across the files that previously defined them privately —
7
+ * optional extras are harmless under structural typing.
8
+ */
9
+ export type MessageInfo = {
10
+ role: string;
11
+ agent?: string;
12
+ sessionID?: string;
13
+ id?: string;
14
+ };
15
+ export type MessagePart = {
16
+ type: string;
17
+ text?: string;
18
+ [key: string]: unknown;
19
+ };
20
+ export type MessageWithParts = {
21
+ info: MessageInfo;
22
+ parts: MessagePart[];
23
+ };