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.
- package/README.ja-JP.md +30 -1
- package/README.ko-KR.md +30 -1
- package/README.md +36 -1
- package/README.zh-CN.md +30 -1
- package/dist/agents/orchestrator.d.ts +0 -2
- package/dist/cli/index.js +22 -34
- package/dist/config/agent-mcps.d.ts +0 -4
- package/dist/config/constants.d.ts +1 -7
- package/dist/config/council-schema.d.ts +0 -15
- package/dist/config/runtime-preset.d.ts +0 -1
- package/dist/config/schema.d.ts +2 -68
- package/dist/hooks/auto-update-checker/skill-sync.d.ts +9 -0
- package/dist/hooks/filter-available-skills/index.d.ts +1 -13
- package/dist/hooks/foreground-fallback/index.d.ts +1 -1
- package/dist/hooks/image-hook.d.ts +1 -13
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/phase-reminder/index.d.ts +10 -16
- package/dist/hooks/reflect/index.d.ts +13 -0
- package/dist/hooks/task-session-manager/index.d.ts +2 -16
- package/dist/hooks/types.d.ts +23 -0
- package/dist/index.js +391 -289
- package/dist/tui.js +16 -25
- package/dist/utils/agent-variant.d.ts +0 -40
- package/dist/utils/compat.d.ts +0 -1
- package/dist/utils/guards.d.ts +4 -0
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/task.d.ts +0 -2
- package/oh-my-opencode-slim.schema.json +2 -249
- package/package.json +1 -1
- package/src/skills/codemap.md +4 -1
- package/src/skills/reflect/SKILL.md +193 -0
- package/src/skills/worktrees/SKILL.md +164 -0
- package/dist/config/fallback-chains.d.ts +0 -1
- package/dist/hooks/apply-patch/patch.d.ts +0 -2
- package/dist/hooks/delegate-task-retry/guidance.d.ts +0 -2
- package/dist/hooks/delegate-task-retry/index.d.ts +0 -4
- package/dist/hooks/json-error-recovery/index.d.ts +0 -1
- package/dist/utils/env.d.ts +0 -1
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
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 {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
+
};
|