oh-my-opencode-slim 0.8.1 → 0.8.3
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.md +57 -24
- package/dist/agents/orchestrator.d.ts +9 -1
- package/dist/cli/config-io.d.ts +0 -4
- package/dist/cli/config-manager.d.ts +0 -8
- package/dist/cli/index.js +133 -2787
- package/dist/cli/providers.d.ts +23 -123
- package/dist/cli/types.d.ts +0 -102
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/loader.d.ts +4 -1
- package/dist/config/schema.d.ts +21 -4
- package/dist/hooks/chat-headers.d.ts +16 -0
- package/dist/hooks/delegate-task-retry/index.d.ts +2 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/phase-reminder/index.d.ts +1 -0
- package/dist/index.js +205 -39
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/internal-initiator.d.ts +6 -0
- package/oh-my-opencode-slim.schema.json +440 -0
- package/package.json +4 -2
- package/src/skills/cartography/SKILL.md +23 -0
package/dist/cli/providers.d.ts
CHANGED
|
@@ -1,86 +1,61 @@
|
|
|
1
1
|
import type { InstallConfig } from './types';
|
|
2
2
|
export declare const MODEL_MAPPINGS: {
|
|
3
|
-
readonly kimi: {
|
|
4
|
-
readonly orchestrator: {
|
|
5
|
-
readonly model: "kimi-for-coding/k2p5";
|
|
6
|
-
};
|
|
7
|
-
readonly oracle: {
|
|
8
|
-
readonly model: "kimi-for-coding/k2p5";
|
|
9
|
-
readonly variant: "high";
|
|
10
|
-
};
|
|
11
|
-
readonly librarian: {
|
|
12
|
-
readonly model: "kimi-for-coding/k2p5";
|
|
13
|
-
readonly variant: "low";
|
|
14
|
-
};
|
|
15
|
-
readonly explorer: {
|
|
16
|
-
readonly model: "kimi-for-coding/k2p5";
|
|
17
|
-
readonly variant: "low";
|
|
18
|
-
};
|
|
19
|
-
readonly designer: {
|
|
20
|
-
readonly model: "kimi-for-coding/k2p5";
|
|
21
|
-
readonly variant: "medium";
|
|
22
|
-
};
|
|
23
|
-
readonly fixer: {
|
|
24
|
-
readonly model: "kimi-for-coding/k2p5";
|
|
25
|
-
readonly variant: "low";
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
3
|
readonly openai: {
|
|
29
4
|
readonly orchestrator: {
|
|
30
|
-
readonly model: "openai/gpt-5.
|
|
5
|
+
readonly model: "openai/gpt-5.4";
|
|
31
6
|
};
|
|
32
7
|
readonly oracle: {
|
|
33
|
-
readonly model: "openai/gpt-5.
|
|
8
|
+
readonly model: "openai/gpt-5.4";
|
|
34
9
|
readonly variant: "high";
|
|
35
10
|
};
|
|
36
11
|
readonly librarian: {
|
|
37
|
-
readonly model: "openai/gpt-5
|
|
12
|
+
readonly model: "openai/gpt-5-codex";
|
|
38
13
|
readonly variant: "low";
|
|
39
14
|
};
|
|
40
15
|
readonly explorer: {
|
|
41
|
-
readonly model: "openai/gpt-5
|
|
16
|
+
readonly model: "openai/gpt-5-codex";
|
|
42
17
|
readonly variant: "low";
|
|
43
18
|
};
|
|
44
19
|
readonly designer: {
|
|
45
|
-
readonly model: "openai/gpt-5
|
|
20
|
+
readonly model: "openai/gpt-5-codex";
|
|
46
21
|
readonly variant: "medium";
|
|
47
22
|
};
|
|
48
23
|
readonly fixer: {
|
|
49
|
-
readonly model: "openai/gpt-5
|
|
24
|
+
readonly model: "openai/gpt-5-codex";
|
|
50
25
|
readonly variant: "low";
|
|
51
26
|
};
|
|
52
27
|
};
|
|
53
|
-
readonly
|
|
28
|
+
readonly kimi: {
|
|
54
29
|
readonly orchestrator: {
|
|
55
|
-
readonly model: "
|
|
30
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
56
31
|
};
|
|
57
32
|
readonly oracle: {
|
|
58
|
-
readonly model: "
|
|
33
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
59
34
|
readonly variant: "high";
|
|
60
35
|
};
|
|
61
36
|
readonly librarian: {
|
|
62
|
-
readonly model: "
|
|
37
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
63
38
|
readonly variant: "low";
|
|
64
39
|
};
|
|
65
40
|
readonly explorer: {
|
|
66
|
-
readonly model: "
|
|
41
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
67
42
|
readonly variant: "low";
|
|
68
43
|
};
|
|
69
44
|
readonly designer: {
|
|
70
|
-
readonly model: "
|
|
45
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
71
46
|
readonly variant: "medium";
|
|
72
47
|
};
|
|
73
48
|
readonly fixer: {
|
|
74
|
-
readonly model: "
|
|
49
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
75
50
|
readonly variant: "low";
|
|
76
51
|
};
|
|
77
52
|
};
|
|
78
53
|
readonly copilot: {
|
|
79
54
|
readonly orchestrator: {
|
|
80
|
-
readonly model: "github-copilot/
|
|
55
|
+
readonly model: "github-copilot/claude-opus-4.6";
|
|
81
56
|
};
|
|
82
57
|
readonly oracle: {
|
|
83
|
-
readonly model: "github-copilot/
|
|
58
|
+
readonly model: "github-copilot/claude-opus-4.6";
|
|
84
59
|
readonly variant: "high";
|
|
85
60
|
};
|
|
86
61
|
readonly librarian: {
|
|
@@ -92,113 +67,38 @@ export declare const MODEL_MAPPINGS: {
|
|
|
92
67
|
readonly variant: "low";
|
|
93
68
|
};
|
|
94
69
|
readonly designer: {
|
|
95
|
-
readonly model: "github-copilot/
|
|
70
|
+
readonly model: "github-copilot/gemini-3.1-pro-preview";
|
|
96
71
|
readonly variant: "medium";
|
|
97
72
|
};
|
|
98
73
|
readonly fixer: {
|
|
99
|
-
readonly model: "github-copilot/
|
|
74
|
+
readonly model: "github-copilot/claude-sonnet-4.6";
|
|
100
75
|
readonly variant: "low";
|
|
101
76
|
};
|
|
102
77
|
};
|
|
103
78
|
readonly 'zai-plan': {
|
|
104
79
|
readonly orchestrator: {
|
|
105
|
-
readonly model: "zai-coding-plan/glm-
|
|
106
|
-
};
|
|
107
|
-
readonly oracle: {
|
|
108
|
-
readonly model: "zai-coding-plan/glm-4.7";
|
|
109
|
-
readonly variant: "high";
|
|
110
|
-
};
|
|
111
|
-
readonly librarian: {
|
|
112
|
-
readonly model: "zai-coding-plan/glm-4.7";
|
|
113
|
-
readonly variant: "low";
|
|
114
|
-
};
|
|
115
|
-
readonly explorer: {
|
|
116
|
-
readonly model: "zai-coding-plan/glm-4.7";
|
|
117
|
-
readonly variant: "low";
|
|
118
|
-
};
|
|
119
|
-
readonly designer: {
|
|
120
|
-
readonly model: "zai-coding-plan/glm-4.7";
|
|
121
|
-
readonly variant: "medium";
|
|
122
|
-
};
|
|
123
|
-
readonly fixer: {
|
|
124
|
-
readonly model: "zai-coding-plan/glm-4.7";
|
|
125
|
-
readonly variant: "low";
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
readonly antigravity: {
|
|
129
|
-
readonly orchestrator: {
|
|
130
|
-
readonly model: "google/antigravity-gemini-3-flash";
|
|
131
|
-
};
|
|
132
|
-
readonly oracle: {
|
|
133
|
-
readonly model: "google/antigravity-gemini-3.1-pro";
|
|
134
|
-
};
|
|
135
|
-
readonly librarian: {
|
|
136
|
-
readonly model: "google/antigravity-gemini-3-flash";
|
|
137
|
-
readonly variant: "low";
|
|
138
|
-
};
|
|
139
|
-
readonly explorer: {
|
|
140
|
-
readonly model: "google/antigravity-gemini-3-flash";
|
|
141
|
-
readonly variant: "low";
|
|
142
|
-
};
|
|
143
|
-
readonly designer: {
|
|
144
|
-
readonly model: "google/antigravity-gemini-3-flash";
|
|
145
|
-
readonly variant: "medium";
|
|
146
|
-
};
|
|
147
|
-
readonly fixer: {
|
|
148
|
-
readonly model: "google/antigravity-gemini-3-flash";
|
|
149
|
-
readonly variant: "low";
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
readonly chutes: {
|
|
153
|
-
readonly orchestrator: {
|
|
154
|
-
readonly model: "chutes/kimi-k2.5";
|
|
155
|
-
};
|
|
156
|
-
readonly oracle: {
|
|
157
|
-
readonly model: "chutes/kimi-k2.5";
|
|
158
|
-
readonly variant: "high";
|
|
159
|
-
};
|
|
160
|
-
readonly librarian: {
|
|
161
|
-
readonly model: "chutes/minimax-m2.1";
|
|
162
|
-
readonly variant: "low";
|
|
163
|
-
};
|
|
164
|
-
readonly explorer: {
|
|
165
|
-
readonly model: "chutes/minimax-m2.1";
|
|
166
|
-
readonly variant: "low";
|
|
167
|
-
};
|
|
168
|
-
readonly designer: {
|
|
169
|
-
readonly model: "chutes/kimi-k2.5";
|
|
170
|
-
readonly variant: "medium";
|
|
171
|
-
};
|
|
172
|
-
readonly fixer: {
|
|
173
|
-
readonly model: "chutes/minimax-m2.1";
|
|
174
|
-
readonly variant: "low";
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
readonly 'zen-free': {
|
|
178
|
-
readonly orchestrator: {
|
|
179
|
-
readonly model: "opencode/big-pickle";
|
|
80
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
180
81
|
};
|
|
181
82
|
readonly oracle: {
|
|
182
|
-
readonly model: "
|
|
83
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
183
84
|
readonly variant: "high";
|
|
184
85
|
};
|
|
185
86
|
readonly librarian: {
|
|
186
|
-
readonly model: "
|
|
87
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
187
88
|
readonly variant: "low";
|
|
188
89
|
};
|
|
189
90
|
readonly explorer: {
|
|
190
|
-
readonly model: "
|
|
91
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
191
92
|
readonly variant: "low";
|
|
192
93
|
};
|
|
193
94
|
readonly designer: {
|
|
194
|
-
readonly model: "
|
|
95
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
195
96
|
readonly variant: "medium";
|
|
196
97
|
};
|
|
197
98
|
readonly fixer: {
|
|
198
|
-
readonly model: "
|
|
99
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
199
100
|
readonly variant: "low";
|
|
200
101
|
};
|
|
201
102
|
};
|
|
202
103
|
};
|
|
203
|
-
export declare function generateAntigravityMixedPreset(config: InstallConfig, existingPreset?: Record<string, unknown>): Record<string, unknown>;
|
|
204
104
|
export declare function generateLiteConfig(installConfig: InstallConfig): Record<string, unknown>;
|
package/dist/cli/types.d.ts
CHANGED
|
@@ -1,88 +1,10 @@
|
|
|
1
1
|
export type BooleanArg = 'yes' | 'no';
|
|
2
2
|
export interface InstallArgs {
|
|
3
3
|
tui: boolean;
|
|
4
|
-
kimi?: BooleanArg;
|
|
5
|
-
openai?: BooleanArg;
|
|
6
|
-
anthropic?: BooleanArg;
|
|
7
|
-
copilot?: BooleanArg;
|
|
8
|
-
zaiPlan?: BooleanArg;
|
|
9
|
-
antigravity?: BooleanArg;
|
|
10
|
-
chutes?: BooleanArg;
|
|
11
4
|
tmux?: BooleanArg;
|
|
12
5
|
skills?: BooleanArg;
|
|
13
|
-
opencodeFree?: BooleanArg;
|
|
14
|
-
balancedSpend?: BooleanArg;
|
|
15
|
-
opencodeFreeModel?: string;
|
|
16
|
-
aaKey?: string;
|
|
17
|
-
openrouterKey?: string;
|
|
18
6
|
dryRun?: boolean;
|
|
19
|
-
modelsOnly?: boolean;
|
|
20
7
|
}
|
|
21
|
-
export interface OpenCodeFreeModel {
|
|
22
|
-
providerID: string;
|
|
23
|
-
model: string;
|
|
24
|
-
name: string;
|
|
25
|
-
status: 'alpha' | 'beta' | 'deprecated' | 'active';
|
|
26
|
-
contextLimit: number;
|
|
27
|
-
outputLimit: number;
|
|
28
|
-
reasoning: boolean;
|
|
29
|
-
toolcall: boolean;
|
|
30
|
-
attachment: boolean;
|
|
31
|
-
dailyRequestLimit?: number;
|
|
32
|
-
}
|
|
33
|
-
export interface DiscoveredModel {
|
|
34
|
-
providerID: string;
|
|
35
|
-
model: string;
|
|
36
|
-
name: string;
|
|
37
|
-
status: 'alpha' | 'beta' | 'deprecated' | 'active';
|
|
38
|
-
contextLimit: number;
|
|
39
|
-
outputLimit: number;
|
|
40
|
-
reasoning: boolean;
|
|
41
|
-
toolcall: boolean;
|
|
42
|
-
attachment: boolean;
|
|
43
|
-
dailyRequestLimit?: number;
|
|
44
|
-
costInput?: number;
|
|
45
|
-
costOutput?: number;
|
|
46
|
-
}
|
|
47
|
-
export interface DynamicAgentAssignment {
|
|
48
|
-
model: string;
|
|
49
|
-
variant?: string;
|
|
50
|
-
}
|
|
51
|
-
export type ScoringEngineVersion = 'v1' | 'v2-shadow' | 'v2';
|
|
52
|
-
export type ResolutionLayerName = 'opencode-direct-override' | 'manual-user-plan' | 'pinned-model' | 'dynamic-recommendation' | 'provider-fallback-policy' | 'system-default';
|
|
53
|
-
export interface AgentResolutionProvenance {
|
|
54
|
-
winnerLayer: ResolutionLayerName;
|
|
55
|
-
winnerModel: string;
|
|
56
|
-
}
|
|
57
|
-
export interface DynamicPlanScoringMeta {
|
|
58
|
-
engineVersionApplied: 'v1' | 'v2';
|
|
59
|
-
shadowCompared: boolean;
|
|
60
|
-
diffs?: Record<string, {
|
|
61
|
-
v1TopModel?: string;
|
|
62
|
-
v2TopModel?: string;
|
|
63
|
-
}>;
|
|
64
|
-
}
|
|
65
|
-
export interface DynamicModelPlan {
|
|
66
|
-
agents: Record<string, DynamicAgentAssignment>;
|
|
67
|
-
chains: Record<string, string[]>;
|
|
68
|
-
provenance?: Record<string, AgentResolutionProvenance>;
|
|
69
|
-
scoring?: DynamicPlanScoringMeta;
|
|
70
|
-
}
|
|
71
|
-
export interface ExternalModelSignal {
|
|
72
|
-
qualityScore?: number;
|
|
73
|
-
codingScore?: number;
|
|
74
|
-
latencySeconds?: number;
|
|
75
|
-
inputPricePer1M?: number;
|
|
76
|
-
outputPricePer1M?: number;
|
|
77
|
-
source: 'artificial-analysis' | 'openrouter' | 'merged';
|
|
78
|
-
}
|
|
79
|
-
export type ExternalSignalMap = Record<string, ExternalModelSignal>;
|
|
80
|
-
export type ManualAgentConfig = {
|
|
81
|
-
primary: string;
|
|
82
|
-
fallback1: string;
|
|
83
|
-
fallback2: string;
|
|
84
|
-
fallback3: string;
|
|
85
|
-
};
|
|
86
8
|
export interface OpenCodeConfig {
|
|
87
9
|
plugin?: string[];
|
|
88
10
|
provider?: Record<string, unknown>;
|
|
@@ -90,34 +12,10 @@ export interface OpenCodeConfig {
|
|
|
90
12
|
[key: string]: unknown;
|
|
91
13
|
}
|
|
92
14
|
export interface InstallConfig {
|
|
93
|
-
hasKimi: boolean;
|
|
94
|
-
hasOpenAI: boolean;
|
|
95
|
-
hasAnthropic?: boolean;
|
|
96
|
-
hasCopilot?: boolean;
|
|
97
|
-
hasZaiPlan?: boolean;
|
|
98
|
-
hasAntigravity: boolean;
|
|
99
|
-
hasChutes?: boolean;
|
|
100
|
-
hasOpencodeZen: boolean;
|
|
101
|
-
useOpenCodeFreeModels?: boolean;
|
|
102
|
-
preferredOpenCodeModel?: string;
|
|
103
|
-
selectedOpenCodePrimaryModel?: string;
|
|
104
|
-
selectedOpenCodeSecondaryModel?: string;
|
|
105
|
-
availableOpenCodeFreeModels?: OpenCodeFreeModel[];
|
|
106
|
-
selectedChutesPrimaryModel?: string;
|
|
107
|
-
selectedChutesSecondaryModel?: string;
|
|
108
|
-
availableChutesModels?: DiscoveredModel[];
|
|
109
|
-
dynamicModelPlan?: DynamicModelPlan;
|
|
110
|
-
scoringEngineVersion?: ScoringEngineVersion;
|
|
111
|
-
artificialAnalysisApiKey?: string;
|
|
112
|
-
openRouterApiKey?: string;
|
|
113
|
-
balanceProviderUsage?: boolean;
|
|
114
15
|
hasTmux: boolean;
|
|
115
16
|
installSkills: boolean;
|
|
116
17
|
installCustomSkills: boolean;
|
|
117
|
-
setupMode: 'quick' | 'manual';
|
|
118
|
-
manualAgentConfigs?: Record<string, ManualAgentConfig>;
|
|
119
18
|
dryRun?: boolean;
|
|
120
|
-
modelsOnly?: boolean;
|
|
121
19
|
}
|
|
122
20
|
export interface ConfigMergeResult {
|
|
123
21
|
success: boolean;
|
|
@@ -4,7 +4,7 @@ export declare const ORCHESTRATOR_NAME: "orchestrator";
|
|
|
4
4
|
export declare const ALL_AGENT_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "fixer"];
|
|
5
5
|
export type AgentName = (typeof ALL_AGENT_NAMES)[number];
|
|
6
6
|
export declare const SUBAGENT_DELEGATION_RULES: Record<AgentName, readonly string[]>;
|
|
7
|
-
export declare const DEFAULT_MODELS: Record<AgentName, string>;
|
|
7
|
+
export declare const DEFAULT_MODELS: Record<AgentName, string | undefined>;
|
|
8
8
|
export declare const POLL_INTERVAL_MS = 500;
|
|
9
9
|
export declare const POLL_INTERVAL_SLOW_MS = 1000;
|
|
10
10
|
export declare const POLL_INTERVAL_BACKGROUND_MS = 2000;
|
package/dist/config/loader.d.ts
CHANGED
|
@@ -17,11 +17,14 @@ export declare function loadPluginConfig(directory: string): PluginConfig;
|
|
|
17
17
|
/**
|
|
18
18
|
* Load custom prompt for an agent from the prompts directory.
|
|
19
19
|
* Checks for {agent}.md (replaces default) and {agent}_append.md (appends to default).
|
|
20
|
+
* If preset is provided and safe for paths, it first checks {preset}/ subdirectory,
|
|
21
|
+
* then falls back to the root prompts directory.
|
|
20
22
|
*
|
|
21
23
|
* @param agentName - Name of the agent (e.g., "orchestrator", "explorer")
|
|
24
|
+
* @param preset - Optional preset name for preset-scoped prompt lookup
|
|
22
25
|
* @returns Object with prompt and/or appendPrompt if files exist
|
|
23
26
|
*/
|
|
24
|
-
export declare function loadAgentPrompt(agentName: string): {
|
|
27
|
+
export declare function loadAgentPrompt(agentName: string, preset?: string): {
|
|
25
28
|
prompt?: string;
|
|
26
29
|
appendPrompt?: string;
|
|
27
30
|
};
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -50,7 +50,10 @@ export type ManualAgentPlan = z.infer<typeof ManualAgentPlanSchema>;
|
|
|
50
50
|
export type ManualPlan = z.infer<typeof ManualPlanSchema>;
|
|
51
51
|
export type FallbackAgentName = (typeof FALLBACK_AGENT_NAMES)[number];
|
|
52
52
|
export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
53
|
-
model: z.ZodOptional<z.ZodString
|
|
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>]>>]>>;
|
|
54
57
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
55
58
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
56
59
|
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -77,8 +80,16 @@ export declare const TmuxConfigSchema: z.ZodObject<{
|
|
|
77
80
|
}, z.core.$strip>;
|
|
78
81
|
export type TmuxConfig = z.infer<typeof TmuxConfigSchema>;
|
|
79
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
|
+
};
|
|
80
88
|
export declare const PresetSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
81
|
-
model: z.ZodOptional<z.ZodString
|
|
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>]>>]>>;
|
|
82
93
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
83
94
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
84
95
|
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -155,14 +166,20 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
155
166
|
}, z.core.$strip>;
|
|
156
167
|
}, z.core.$strict>>;
|
|
157
168
|
presets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
158
|
-
model: z.ZodOptional<z.ZodString
|
|
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>]>>]>>;
|
|
159
173
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
160
174
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
161
175
|
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
162
176
|
mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
177
|
}, z.core.$strip>>>>;
|
|
164
178
|
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
165
|
-
model: z.ZodOptional<z.ZodString
|
|
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>]>>]>>;
|
|
166
183
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
167
184
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
168
185
|
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -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 {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { DelegateTaskErrorPattern, DetectedError } from './patterns';
|
|
2
|
-
export { DELEGATE_TASK_ERROR_PATTERNS, detectDelegateTaskError } from './patterns';
|
|
3
1
|
export { buildRetryGuidance } from './guidance';
|
|
4
2
|
export { createDelegateTaskRetryHook } from './hook';
|
|
3
|
+
export type { DelegateTaskErrorPattern, DetectedError } from './patterns';
|
|
4
|
+
export { DELEGATE_TASK_ERROR_PATTERNS, detectDelegateTaskError, } from './patterns';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { AutoUpdateCheckerOptions } from './auto-update-checker';
|
|
2
2
|
export { createAutoUpdateCheckerHook } from './auto-update-checker';
|
|
3
|
+
export { createChatHeadersHook } from './chat-headers';
|
|
3
4
|
export { createDelegateTaskRetryHook } from './delegate-task-retry';
|
|
4
5
|
export { createJsonErrorRecoveryHook } from './json-error-recovery';
|
|
5
6
|
export { createPhaseReminderHook } from './phase-reminder';
|
|
@@ -1,3 +1,4 @@
|
|
|
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>";
|
|
1
2
|
interface MessageInfo {
|
|
2
3
|
role: string;
|
|
3
4
|
agent?: string;
|