oh-my-opencode-slim 0.8.3 → 0.8.5
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 +35 -7
- package/dist/agents/council-master.d.ts +2 -0
- package/dist/agents/council.d.ts +28 -0
- package/dist/agents/councillor.d.ts +2 -0
- package/dist/agents/orchestrator.d.ts +6 -0
- package/dist/background/background-manager.d.ts +6 -1
- package/dist/background/index.d.ts +1 -0
- package/dist/background/subagent-depth.d.ts +35 -0
- package/dist/cli/config-io.d.ts +1 -1
- package/dist/cli/custom-skills.d.ts +2 -2
- package/dist/cli/index.js +173 -56
- package/dist/cli/paths.d.ts +22 -0
- package/dist/cli/providers.d.ts +4 -4
- package/dist/cli/types.d.ts +2 -0
- package/dist/config/constants.d.ts +7 -2
- package/dist/config/council-schema.d.ts +134 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/loader.d.ts +2 -1
- package/dist/config/schema.d.ts +27 -0
- package/dist/council/council-manager.d.ts +40 -0
- package/dist/council/index.d.ts +1 -0
- package/dist/hooks/foreground-fallback/index.d.ts +72 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
- package/dist/hooks/phase-reminder/index.d.ts +1 -1
- package/dist/hooks/post-file-tool-nudge/index.d.ts +18 -0
- package/dist/index.js +2273 -879
- package/dist/tools/council.d.ts +9 -0
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/lsp/config-store.d.ts +29 -0
- package/dist/tools/lsp/constants.d.ts +18 -2
- package/dist/tools/lsp/index.d.ts +1 -0
- package/dist/tools/lsp/types.d.ts +7 -0
- package/dist/tools/lsp/utils.d.ts +14 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/session.d.ts +59 -0
- package/oh-my-opencode-slim.schema.json +78 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
bunx oh-my-opencode-slim@latest install
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The installer generates an OpenAI configuration by default (using `gpt-5.4` and `gpt-5-
|
|
18
|
+
The installer generates an OpenAI configuration by default (using `gpt-5.4` and `gpt-5.4-mini`). No provider questions asked.
|
|
19
19
|
|
|
20
20
|
For non-interactive mode:
|
|
21
21
|
|
|
@@ -23,6 +23,11 @@ For non-interactive mode:
|
|
|
23
23
|
bunx oh-my-opencode-slim@latest install --no-tui --tmux=no --skills=yes
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
To force overwrite of an existing configuration:
|
|
27
|
+
```bash
|
|
28
|
+
bunx oh-my-opencode-slim@latest install --reset
|
|
29
|
+
```
|
|
30
|
+
|
|
26
31
|
### For Alternative Providers
|
|
27
32
|
|
|
28
33
|
The default configuration uses OpenAI. To use Kimi, GitHub Copilot, or ZAI Coding Plan, see **[Provider Configurations](docs/provider-configurations.md)** for step-by-step instructions and config examples.
|
|
@@ -54,6 +59,28 @@ https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/mas
|
|
|
54
59
|
**Additional guides:**
|
|
55
60
|
- **[Provider Configurations](docs/provider-configurations.md)** - Config examples for all supported providers
|
|
56
61
|
- **[Tmux Integration](docs/tmux-integration.md)** - Real-time agent monitoring with tmux
|
|
62
|
+
**[Quick Reference](docs/quick-reference.md)** - Config, fallback behavior, skills, MCPs
|
|
63
|
+
|
|
64
|
+
### ✅ Verify Your Setup
|
|
65
|
+
|
|
66
|
+
After installation and authentication, verify all agents are configured and responding:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
opencode
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then run:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
ping all agents
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
<div align="center">
|
|
79
|
+
<img src="img/ping.png" alt="Ping all agents" width="600">
|
|
80
|
+
<p><i>Confirmation that all six agents are online and ready.</i></p>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
If any agent fails to respond, check your provider authentication and config file.
|
|
57
84
|
|
|
58
85
|
---
|
|
59
86
|
|
|
@@ -119,12 +146,12 @@ https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/mas
|
|
|
119
146
|
</tr>
|
|
120
147
|
<tr>
|
|
121
148
|
<td colspan="2">
|
|
122
|
-
<b>Default Model:</b> <code>openai/gpt-5-
|
|
149
|
+
<b>Default Model:</b> <code>openai/gpt-5.4-mini</code>
|
|
123
150
|
</td>
|
|
124
151
|
</tr>
|
|
125
152
|
<tr>
|
|
126
153
|
<td colspan="2">
|
|
127
|
-
<b>Recommended Models:</b> <code>cerebras/zai-glm-4.7</code> <code>google/gemini-3.1-pro-preview</code> <code>openai/gpt-5-
|
|
154
|
+
<b>Recommended Models:</b> <code>cerebras/zai-glm-4.7</code> <code>google/gemini-3.1-pro-preview</code> <code>openai/gpt-5.4-mini</code>
|
|
128
155
|
</td>
|
|
129
156
|
</tr>
|
|
130
157
|
</table>
|
|
@@ -191,12 +218,12 @@ https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/mas
|
|
|
191
218
|
</tr>
|
|
192
219
|
<tr>
|
|
193
220
|
<td colspan="2">
|
|
194
|
-
<b>Default Model:</b> <code>openai/gpt-5-
|
|
221
|
+
<b>Default Model:</b> <code>openai/gpt-5.4-mini</code>
|
|
195
222
|
</td>
|
|
196
223
|
</tr>
|
|
197
224
|
<tr>
|
|
198
225
|
<td colspan="2">
|
|
199
|
-
<b>Recommended Models:</b> <code>google/gemini-3.1-pro-preview</code> <code>openai/gpt-5-
|
|
226
|
+
<b>Recommended Models:</b> <code>google/gemini-3.1-pro-preview</code> <code>openai/gpt-5.4-mini</code>
|
|
200
227
|
</td>
|
|
201
228
|
</tr>
|
|
202
229
|
</table>
|
|
@@ -263,12 +290,12 @@ https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/mas
|
|
|
263
290
|
</tr>
|
|
264
291
|
<tr>
|
|
265
292
|
<td colspan="2">
|
|
266
|
-
<b>Default Model:</b> <code>openai/gpt-5-
|
|
293
|
+
<b>Default Model:</b> <code>openai/gpt-5.4-mini</code>
|
|
267
294
|
</td>
|
|
268
295
|
</tr>
|
|
269
296
|
<tr>
|
|
270
297
|
<td colspan="2">
|
|
271
|
-
<b>Recommended Models:</b> <code>cerebras/zai-glm-4.7</code> <code>google/gemini-3.1-pro-preview</code> <code>openai/gpt-5-
|
|
298
|
+
<b>Recommended Models:</b> <code>cerebras/zai-glm-4.7</code> <code>google/gemini-3.1-pro-preview</code> <code>openai/gpt-5.4-mini</code>
|
|
272
299
|
</td>
|
|
273
300
|
</tr>
|
|
274
301
|
</table>
|
|
@@ -282,6 +309,7 @@ https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/mas
|
|
|
282
309
|
- **[Installation Guide](docs/installation.md)** - Detailed installation and troubleshooting
|
|
283
310
|
- **[Cartography Skill](docs/cartography.md)** - Custom skill for repository mapping + codemap generation
|
|
284
311
|
- **[Tmux Integration](docs/tmux-integration.md)** - Real-time agent monitoring with tmux
|
|
312
|
+
**[Quick Reference](docs/quick-reference.md)** - Config, fallback behavior, skills, MCPs
|
|
285
313
|
|
|
286
314
|
---
|
|
287
315
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type AgentDefinition } from './orchestrator';
|
|
2
|
+
export declare function createCouncilAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
|
|
3
|
+
/**
|
|
4
|
+
* Build the prompt for a specific councillor session.
|
|
5
|
+
*
|
|
6
|
+
* Returns the raw user prompt — the agent factory (councillor.ts) provides
|
|
7
|
+
* the system prompt with tool-aware instructions. No duplication.
|
|
8
|
+
*
|
|
9
|
+
* If a per-councillor prompt override is provided, it is prepended as
|
|
10
|
+
* role/guidance context before the user's question.
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatCouncillorPrompt(userPrompt: string, councillorPrompt?: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Build the synthesis prompt for the council master.
|
|
15
|
+
*
|
|
16
|
+
* Formats councillor results as structured data — the agent factory
|
|
17
|
+
* (council-master.ts) provides the system prompt with synthesis instructions.
|
|
18
|
+
* Returns a special prompt when all councillors failed to produce output.
|
|
19
|
+
*
|
|
20
|
+
* @param masterPrompt - Optional per-master guidance appended to the synthesis.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatMasterSynthesisPrompt(originalPrompt: string, councillorResults: Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
model: string;
|
|
25
|
+
status: string;
|
|
26
|
+
result?: string;
|
|
27
|
+
error?: string;
|
|
28
|
+
}>, masterPrompt?: string): string;
|
|
@@ -9,6 +9,12 @@ export interface AgentDefinition {
|
|
|
9
9
|
variant?: string;
|
|
10
10
|
}>;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve agent prompt from base/custom/append inputs.
|
|
14
|
+
* If customPrompt is provided, it replaces the base entirely.
|
|
15
|
+
* Otherwise, customAppendPrompt is appended to the base.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolvePrompt(base: string, customPrompt?: string, customAppendPrompt?: string): string;
|
|
12
18
|
export declare function createOrchestratorAgent(model?: string | Array<string | {
|
|
13
19
|
id: string;
|
|
14
20
|
variant?: string;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import type { PluginInput } from '@opencode-ai/plugin';
|
|
16
16
|
import type { BackgroundTaskConfig, PluginConfig } from '../config';
|
|
17
17
|
import type { TmuxConfig } from '../config/schema';
|
|
18
|
+
import { SubagentDepthTracker } from './subagent-depth';
|
|
18
19
|
/**
|
|
19
20
|
* Represents a background task running in an isolated session.
|
|
20
21
|
* Tasks are tracked from creation through completion or failure.
|
|
@@ -46,6 +47,7 @@ export declare class BackgroundTaskManager {
|
|
|
46
47
|
private tasks;
|
|
47
48
|
private tasksBySessionId;
|
|
48
49
|
private agentBySessionId;
|
|
50
|
+
private depthTracker;
|
|
49
51
|
private client;
|
|
50
52
|
private directory;
|
|
51
53
|
private tmuxEnabled;
|
|
@@ -94,7 +96,6 @@ export declare class BackgroundTaskManager {
|
|
|
94
96
|
*/
|
|
95
97
|
private processQueue;
|
|
96
98
|
private resolveFallbackChain;
|
|
97
|
-
private promptWithTimeout;
|
|
98
99
|
/**
|
|
99
100
|
* Calculate tool permissions for a spawned agent based on its own delegation rules.
|
|
100
101
|
* Agents that cannot delegate (leaf nodes) get delegation tools disabled entirely,
|
|
@@ -172,4 +173,8 @@ export declare class BackgroundTaskManager {
|
|
|
172
173
|
* Clean up all tasks.
|
|
173
174
|
*/
|
|
174
175
|
cleanup(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Get the depth tracker instance for use by other managers.
|
|
178
|
+
*/
|
|
179
|
+
getDepthTracker(): SubagentDepthTracker;
|
|
175
180
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks subagent spawn depth to prevent excessive nesting.
|
|
3
|
+
*
|
|
4
|
+
* Depth 0 = root session (user's main conversation)
|
|
5
|
+
* Depth 1 = agent spawned by root (e.g., explorer, council)
|
|
6
|
+
* Depth 2 = agent spawned by depth-1 agent (e.g., councillor spawned by council)
|
|
7
|
+
* Depth 3 = agent spawned by depth-2 agent (max depth by default)
|
|
8
|
+
*
|
|
9
|
+
* When max depth is exceeded, the spawn is blocked.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SubagentDepthTracker {
|
|
12
|
+
private depthBySession;
|
|
13
|
+
private readonly _maxDepth;
|
|
14
|
+
constructor(maxDepth?: number);
|
|
15
|
+
/** Maximum allowed depth. */
|
|
16
|
+
get maxDepth(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Get the current depth of a session.
|
|
19
|
+
* Root sessions (not tracked) have depth 0.
|
|
20
|
+
*/
|
|
21
|
+
getDepth(sessionId: string): number;
|
|
22
|
+
/**
|
|
23
|
+
* Register a child session and check if the spawn is allowed.
|
|
24
|
+
* @returns true if allowed, false if max depth exceeded
|
|
25
|
+
*/
|
|
26
|
+
registerChild(parentSessionId: string, childSessionId: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Clean up session tracking when a session is deleted.
|
|
29
|
+
*/
|
|
30
|
+
cleanup(sessionId: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Clean up all tracking data.
|
|
33
|
+
*/
|
|
34
|
+
cleanupAll(): void;
|
|
35
|
+
}
|
package/dist/cli/config-io.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare function parseConfig(path: string): {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function writeConfig(configPath: string, config: OpenCodeConfig): void;
|
|
18
18
|
export declare function addPluginToOpenCodeConfig(): Promise<ConfigMergeResult>;
|
|
19
|
-
export declare function writeLiteConfig(installConfig: InstallConfig): ConfigMergeResult;
|
|
19
|
+
export declare function writeLiteConfig(installConfig: InstallConfig, targetPath?: string): ConfigMergeResult;
|
|
20
20
|
export declare function disableDefaultAgents(): ConfigMergeResult;
|
|
21
21
|
export declare function canModifyOpenCodeConfig(): boolean;
|
|
22
22
|
export declare function detectCurrentConfig(): DetectedConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A custom skill bundled in this repository.
|
|
3
|
-
* Unlike npx-installed skills, these are copied from src/skills/ to
|
|
3
|
+
* Unlike npx-installed skills, these are copied from src/skills/ to the OpenCode skills directory
|
|
4
4
|
*/
|
|
5
5
|
export interface CustomSkill {
|
|
6
6
|
/** Skill name (folder name) */
|
|
@@ -21,7 +21,7 @@ export declare const CUSTOM_SKILLS: CustomSkill[];
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function getCustomSkillsDir(): string;
|
|
23
23
|
/**
|
|
24
|
-
* Install a custom skill by copying from src/skills/ to
|
|
24
|
+
* Install a custom skill by copying from src/skills/ to the OpenCode skills directory
|
|
25
25
|
* @param skill - The custom skill to install
|
|
26
26
|
* @param projectRoot - Root directory of oh-my-opencode-slim project
|
|
27
27
|
* @returns True if installation succeeded, false otherwise
|