oh-my-opencode-slim 0.5.3 → 0.5.4

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 (105) hide show
  1. package/README.md +83 -23
  2. package/dist/agents/coder.d.ts +2 -0
  3. package/dist/agents/designer.d.ts +2 -2
  4. package/dist/agents/document-writer.d.ts +4 -0
  5. package/dist/agents/explore.d.ts +2 -0
  6. package/dist/agents/explorer.d.ts +2 -2
  7. package/dist/agents/fixer.d.ts +2 -2
  8. package/dist/agents/frontend.d.ts +2 -0
  9. package/dist/agents/index.d.ts +5 -5
  10. package/dist/agents/index.test.d.ts +1 -0
  11. package/dist/agents/librarian.d.ts +2 -2
  12. package/dist/agents/multimodal.d.ts +2 -0
  13. package/dist/agents/oracle.d.ts +2 -2
  14. package/dist/agents/orchestrator.d.ts +2 -2
  15. package/dist/agents/planner.d.ts +2 -0
  16. package/dist/agents/scribe.d.ts +2 -0
  17. package/dist/agents/simplicity-reviewer.d.ts +4 -0
  18. package/dist/agents/specialist.d.ts +2 -0
  19. package/dist/background/background-manager.d.ts +4 -4
  20. package/dist/background/index.d.ts +2 -2
  21. package/dist/background/tmux-session-manager.d.ts +2 -2
  22. package/dist/cli/config-io.d.ts +1 -1
  23. package/dist/cli/config-manager.d.ts +4 -4
  24. package/dist/cli/config-manager.test.d.ts +1 -0
  25. package/dist/cli/index.js +46 -13
  26. package/dist/cli/install.d.ts +1 -1
  27. package/dist/cli/providers.d.ts +6 -6
  28. package/dist/cli/types.d.ts +1 -1
  29. package/dist/commands/index.d.ts +4 -0
  30. package/dist/commands/plan.d.ts +1 -0
  31. package/dist/config/constants.d.ts +1 -1
  32. package/dist/config/index.d.ts +3 -3
  33. package/dist/config/loader.d.ts +12 -1
  34. package/dist/config/loader.test.d.ts +1 -0
  35. package/dist/config/schema.d.ts +2 -2
  36. package/dist/features/background-manager.d.ts +34 -88
  37. package/dist/features/background-manager.test.d.ts +1 -0
  38. package/dist/features/index.d.ts +6 -2
  39. package/dist/features/tmux-session-manager.d.ts +40 -40
  40. package/dist/hooks/auto-slash-command/index.d.ts +33 -0
  41. package/dist/hooks/auto-update-checker/checker.d.ts +1 -1
  42. package/dist/hooks/auto-update-checker/index.d.ts +3 -3
  43. package/dist/hooks/index.d.ts +4 -4
  44. package/dist/hooks/phase-reminder/index.d.ts +1 -1
  45. package/dist/hooks/plan-mode/index.d.ts +22 -0
  46. package/dist/hooks/planner-reminder/index.d.ts +25 -0
  47. package/dist/hooks/post-read-nudge/index.d.ts +1 -1
  48. package/dist/index.d.ts +3 -3
  49. package/dist/index.js +5212 -5018
  50. package/dist/mcp/context7.d.ts +1 -1
  51. package/dist/mcp/grep-app.d.ts +1 -1
  52. package/dist/mcp/index.d.ts +2 -2
  53. package/dist/mcp/index.test.d.ts +1 -0
  54. package/dist/mcp/types.d.ts +2 -2
  55. package/dist/mcp/websearch.d.ts +1 -1
  56. package/dist/shared/index.d.ts +2 -2
  57. package/dist/shared/zip-extractor.d.ts +4 -1
  58. package/dist/tools/ast-grep/cli.d.ts +1 -1
  59. package/dist/tools/ast-grep/constants.d.ts +1 -1
  60. package/dist/tools/ast-grep/index.d.ts +8 -8
  61. package/dist/tools/ast-grep/napi.d.ts +42 -0
  62. package/dist/tools/ast-grep/tools.d.ts +1 -1
  63. package/dist/tools/ast-grep/types.d.ts +1 -1
  64. package/dist/tools/ast-grep/utils.d.ts +1 -1
  65. package/dist/tools/background.d.ts +4 -4
  66. package/dist/tools/call-omo-agent.d.ts +6 -0
  67. package/dist/tools/grep/cli.d.ts +2 -2
  68. package/dist/tools/grep/constants.d.ts +1 -1
  69. package/dist/tools/grep/index.d.ts +5 -5
  70. package/dist/tools/grep/tools.d.ts +1 -1
  71. package/dist/tools/grep/utils.d.ts +1 -1
  72. package/dist/tools/index.d.ts +6 -6
  73. package/dist/tools/lsp/client.d.ts +1 -1
  74. package/dist/tools/lsp/config.d.ts +1 -1
  75. package/dist/tools/lsp/constants.d.ts +2 -2
  76. package/dist/tools/lsp/index.d.ts +3 -3
  77. package/dist/tools/lsp/tools.d.ts +1 -1
  78. package/dist/tools/lsp/types.d.ts +5 -5
  79. package/dist/tools/lsp/utils.d.ts +4 -4
  80. package/dist/tools/quota/api.d.ts +1 -1
  81. package/dist/tools/skill/builtin.d.ts +2 -2
  82. package/dist/tools/skill/builtin.test.d.ts +1 -0
  83. package/dist/tools/skill/index.d.ts +3 -3
  84. package/dist/tools/skill/mcp-manager.d.ts +2 -2
  85. package/dist/tools/skill/mcp-manager.test.d.ts +1 -0
  86. package/dist/tools/skill/tools.d.ts +3 -3
  87. package/dist/tools/skill/types.d.ts +8 -8
  88. package/dist/utils/agent-variant.d.ts +1 -1
  89. package/dist/utils/agent-variant.test.d.ts +1 -0
  90. package/dist/utils/index.d.ts +5 -5
  91. package/dist/utils/session-utils.d.ts +10 -0
  92. package/dist/utils/session.d.ts +17 -0
  93. package/dist/utils/tmux.d.ts +1 -1
  94. package/package.json +6 -1
  95. package/dist/agents/prompts.d.ts +0 -17
  96. package/dist/agents/types.d.ts +0 -14
  97. package/dist/cli/model-mappings.d.ts +0 -25
  98. package/dist/shared/agent-variant.d.ts +0 -23
  99. package/dist/shared/binary-downloader.d.ts +0 -14
  100. package/dist/shared/formatters.d.ts +0 -7
  101. package/dist/shared/polling.d.ts +0 -23
  102. package/dist/shared/tmux.d.ts +0 -42
  103. package/dist/tools/lsp/protocol-parser.d.ts +0 -14
  104. package/dist/tools/lsp/text-editor.d.ts +0 -13
  105. package/dist/tools/shared/downloader-utils.d.ts +0 -46
package/README.md CHANGED
@@ -52,6 +52,7 @@
52
52
  - [🔌 **MCP Servers**](#mcp-servers)
53
53
  - [⚙️ **Configuration**](#configuration)
54
54
  - [Files You Edit](#files-you-edit)
55
+ - [Prompt Overriding](#prompt-overriding)
55
56
  - [Plugin Config](#plugin-config-oh-my-opencode-slimjson)
56
57
  - [Presets](#presets)
57
58
  - [Option Reference](#option-reference)
@@ -281,38 +282,41 @@ Code implementation, refactoring, testing, verification. *Execute the plan - no
281
282
 
282
283
  ### Tmux Integration
283
284
 
284
- > ⚠️ **Known Issue:** When the server port is enabled, only one OpenCode instance can be opened at a time. We're tracking this in [issue #15](https://github.com/alvinunreal/oh-my-opencode-slim/issues/15), and there's an upstream PR to OpenCode: [opencode#9099](https://github.com/anomalyco/opencode/issues/9099).
285
+ > ⚠️ **Temporary workaround:** Start OpenCode with `--port` to enable tmux integration. The port must match the `OPENCODE_PORT` environment variable (default: 4096). This is required until the upstream issue is resolved. [opencode#9099](https://github.com/anomalyco/opencode/issues/9099).
285
286
 
286
287
  <img src="img/tmux.png" alt="Tmux Integration" width="800">
287
288
 
288
289
  **Watch your agents work in real-time.** When the Orchestrator launches sub-agents or initiates background tasks, new tmux panes automatically spawn showing each agent's live progress. No more waiting in the dark.
289
290
 
290
- #### Why This Matters
291
+ #### Quick Setup
291
292
 
292
- | Without Tmux Integration | With Tmux Integration |
293
- |--------------------------|----------------------|
294
- | Fire off a background task, wait anxiously | See the agent thinking, searching, coding |
295
- | "Is it stuck or just slow?" | Watch tool calls happen in real-time |
296
- | Results appear out of nowhere | Follow the journey from question to answer |
297
- | Debug by guessing | Debug by observation |
293
+ 1. **Enable tmux integration** in `oh-my-opencode-slim.json` (see [Plugin Config](#plugin-config-oh-my-opencode-slimjson)).
298
294
 
299
- #### What You Get
295
+ ```json
296
+ {
297
+ "tmux": {
298
+ "enabled": true,
299
+ "layout": "main-vertical",
300
+ "main_pane_size": 60
301
+ }
302
+ }
303
+ ```
300
304
 
301
- - **Live Visibility**: Each sub-agent gets its own pane showing real-time output
302
- - **Auto-Layout**: Tmux automatically arranges panes using your preferred layout
303
- - **Auto-Cleanup**: Panes close when agents finish, layout rebalances
304
- - **Zero Overhead**: Works with OpenCode's built-in `task` tool AND our `background_task` tool
305
+ 2. **Run OpenCode inside tmux**:
306
+ ```bash
307
+ tmux
308
+ opencode --port 4096
309
+ ```
305
310
 
306
- #### Quick Setup
311
+ Or use a custom port (must match `OPENCODE_PORT` env var):
312
+ ```bash
313
+ tmux
314
+ export OPENCODE_PORT=5000
315
+ opencode --port 5000
316
+ ```
307
317
 
308
- > ⚠️ **Temporary workaround:** Start OpenCode with `--port 4096` to enable tmux integration. This is required until the upstream issue is resolved.
318
+ This allows multiple OpenCode instances on different ports.
309
319
 
310
- 1. **Enable tmux integration** in `oh-my-opencode-slim.json` (see [Plugin Config](#plugin-config-oh-my-opencode-slimjson)).
311
- 2. **Run OpenCode inside tmux with port 4096**:
312
- ```bash
313
- tmux
314
- opencode --port 4096
315
- ```
316
320
 
317
321
  #### Layout Options
318
322
 
@@ -324,8 +328,6 @@ Code implementation, refactoring, testing, verification. *Execute the plan - no
324
328
  | `even-horizontal` | All panes side by side |
325
329
  | `even-vertical` | All panes stacked vertically |
326
330
 
327
- *See the [Option Reference](#option-reference) for detailed configuration.*
328
-
329
331
  ---
330
332
 
331
333
  ### Quota Tool
@@ -363,6 +365,8 @@ Language Server Protocol integration for code intelligence:
363
365
  | `lsp_diagnostics` | Get errors/warnings from the language server |
364
366
  | `lsp_rename` | Rename a symbol across all files |
365
367
 
368
+ > **Built-in LSP Servers:** OpenCode includes pre-configured LSP servers for 30+ languages (TypeScript, Python, Rust, Go, etc.). See the [official documentation](https://opencode.ai/docs/lsp/#built-in) for the full list and requirements.
369
+
366
370
  ---
367
371
 
368
372
  ### Code Search Tools
@@ -377,6 +381,14 @@ Fast code search and refactoring:
377
381
 
378
382
  ---
379
383
 
384
+ ### Formatters
385
+
386
+ OpenCode automatically formats files after they're written or edited using language-specific formatters.
387
+
388
+ > **Built-in Formatters:** Includes support for Prettier, Biome, gofmt, rustfmt, ruff, and 20+ others. See the [official documentation](https://opencode.ai/docs/formatters/#built-in) for the complete list.
389
+
390
+ ---
391
+
380
392
  ## 🧩 Skills
381
393
 
382
394
  Skills are specialized capabilities that agents can use. Each agent has a default set of skills, which you can override in the agent config.
@@ -460,6 +472,37 @@ You can disable specific MCP servers by adding them to the `disabled_mcps` array
460
472
 
461
473
  ---
462
474
 
475
+ ### Prompt Overriding
476
+
477
+ You can customize agent prompts by creating markdown files in `~/.config/opencode/oh-my-opencode-slim/`:
478
+
479
+ | File | Purpose |
480
+ |------|---------|
481
+ | `{agent}.md` | Replaces the default prompt entirely |
482
+ | `{agent}_append.md` | Appends to the default prompt |
483
+
484
+ **Example:**
485
+
486
+ ```
487
+ ~/.config/opencode/oh-my-opencode-slim/
488
+ ├── orchestrator.md # Custom orchestrator prompt
489
+ ├── orchestrator_append.md # Append to default orchestrator prompt
490
+ ├── explorer.md
491
+ ├── explorer_append.md
492
+ └── ...
493
+ ```
494
+
495
+ **Usage:**
496
+
497
+ - Create `{agent}.md` to completely replace an agent's default prompt
498
+ - Create `{agent}_append.md` to add custom instructions to the default prompt
499
+ - Both files can exist simultaneously - the replacement takes precedence
500
+ - If neither file exists, the default prompt is used
501
+
502
+ This allows you to fine-tune agent behavior without modifying the source code.
503
+
504
+ ---
505
+
463
506
  ### Plugin Config (`oh-my-opencode-slim.json`)
464
507
 
465
508
  The installer generates this file based on your providers. You can manually customize it to mix and match models.
@@ -526,6 +569,23 @@ The installer generates presets for different provider combinations. Switch betw
526
569
  | `zen-free` | Free models (GLM-4.7 + Grok Code) |
527
570
  | `antigravity-openai` | Mixed: Antigravity for most agents, OpenAI for Oracle |
528
571
 
572
+ #### Author's Preset
573
+
574
+ The author's personal configuration using Cerebras for the Orchestrator:
575
+
576
+ ```json
577
+ {
578
+ "cerebras": {
579
+ "orchestrator": { "model": "cerebras/zai-glm-4.7", "skills": ["*"] },
580
+ "oracle": { "model": "openai/gpt-5.2-codex", "variant": "high", "skills": [] },
581
+ "librarian": { "model": "google/gemini-3-flash", "variant": "low", "skills": [] },
582
+ "explorer": { "model": "google/gemini-3-flash", "variant": "low", "skills": [] },
583
+ "designer": { "model": "google/gemini-3-flash", "variant": "medium", "skills": ["playwright"] },
584
+ "fixer": { "model": "google/gemini-3-flash", "variant": "low", "skills": [] }
585
+ }
586
+ }
587
+ ```
588
+
529
589
  **Environment Variable Override:**
530
590
 
531
591
  You can override the preset using an environment variable:
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createCoderAgent(model: string): AgentDefinition;
@@ -1,2 +1,2 @@
1
- import type { AgentDefinition } from "./orchestrator";
2
- export declare function createDesignerAgent(model: string): AgentDefinition;
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createDesignerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -0,0 +1,4 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createDocumentWriterAgent(
3
+ model: string,
4
+ ): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createExploreAgent(model: string): AgentDefinition;
@@ -1,2 +1,2 @@
1
- import type { AgentDefinition } from "./orchestrator";
2
- export declare function createExplorerAgent(model: string): AgentDefinition;
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createExplorerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +1,2 @@
1
- import type { AgentDefinition } from "./orchestrator";
2
- export declare function createFixerAgent(model: string): AgentDefinition;
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createFixerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createFrontendAgent(model: string): AgentDefinition;
@@ -1,8 +1,8 @@
1
- import type { AgentConfig as SDKAgentConfig } from "@opencode-ai/sdk";
2
- import { SUBAGENT_NAMES, type PluginConfig } from "../config";
3
- import { type AgentDefinition } from "./orchestrator";
4
- export type { AgentDefinition } from "./orchestrator";
5
- export type SubagentName = typeof SUBAGENT_NAMES[number];
1
+ import type { AgentConfig as SDKAgentConfig } from '@opencode-ai/sdk';
2
+ import { type PluginConfig, SUBAGENT_NAMES } from '../config';
3
+ import { type AgentDefinition } from './orchestrator';
4
+ export type { AgentDefinition } from './orchestrator';
5
+ export type SubagentName = (typeof SUBAGENT_NAMES)[number];
6
6
  export declare function isSubagent(name: string): name is SubagentName;
7
7
  /**
8
8
  * Create all agent definitions with optional configuration overrides.
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
- import type { AgentDefinition } from "./orchestrator";
2
- export declare function createLibrarianAgent(model: string): AgentDefinition;
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createLibrarianAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createMultimodalAgent(model: string): AgentDefinition;
@@ -1,2 +1,2 @@
1
- import type { AgentDefinition } from "./orchestrator";
2
- export declare function createOracleAgent(model: string): AgentDefinition;
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createOracleAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,7 +1,7 @@
1
- import type { AgentConfig } from "@opencode-ai/sdk";
1
+ import type { AgentConfig } from '@opencode-ai/sdk';
2
2
  export interface AgentDefinition {
3
3
  name: string;
4
4
  description?: string;
5
5
  config: AgentConfig;
6
6
  }
7
- export declare function createOrchestratorAgent(model: string): AgentDefinition;
7
+ export declare function createOrchestratorAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createPlannerAgent(model: string): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createScribeAgent(model: string): AgentDefinition;
@@ -0,0 +1,4 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createSimplicityReviewerAgent(
3
+ model: string,
4
+ ): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from './orchestrator';
2
+ export declare function createSpecialistAgent(model: string): AgentDefinition;
@@ -11,9 +11,9 @@
11
11
  * - Integrates with tmux for visual feedback (when enabled)
12
12
  * - Supports task cancellation and result retrieval
13
13
  */
14
- import type { PluginInput } from "@opencode-ai/plugin";
15
- import type { TmuxConfig } from "../config/schema";
16
- import type { PluginConfig } from "../config";
14
+ import type { PluginInput } from '@opencode-ai/plugin';
15
+ import type { PluginConfig } from '../config';
16
+ import type { TmuxConfig } from '../config/schema';
17
17
  /**
18
18
  * Represents a background task running in an isolated session.
19
19
  * Tasks are tracked from creation through completion or failure.
@@ -23,7 +23,7 @@ export interface BackgroundTask {
23
23
  sessionId: string;
24
24
  description: string;
25
25
  agent: string;
26
- status: "pending" | "running" | "completed" | "failed";
26
+ status: 'pending' | 'running' | 'completed' | 'failed';
27
27
  result?: string;
28
28
  error?: string;
29
29
  startedAt: Date;
@@ -1,2 +1,2 @@
1
- export { BackgroundTaskManager, type BackgroundTask, type LaunchOptions } from "./background-manager";
2
- export { TmuxSessionManager } from "./tmux-session-manager";
1
+ export { type BackgroundTask, BackgroundTaskManager, type LaunchOptions, } from './background-manager';
2
+ export { TmuxSessionManager } from './tmux-session-manager';
@@ -1,5 +1,5 @@
1
- import type { PluginInput } from "@opencode-ai/plugin";
2
- import type { TmuxConfig } from "../config/schema";
1
+ import type { PluginInput } from '@opencode-ai/plugin';
2
+ import type { TmuxConfig } from '../config/schema';
3
3
  /**
4
4
  * TmuxSessionManager tracks child sessions (created by OpenCode's Task tool)
5
5
  * and spawns/closes tmux panes for them.
@@ -1,4 +1,4 @@
1
- import type { ConfigMergeResult, DetectedConfig, InstallConfig, OpenCodeConfig } from "./types";
1
+ import type { ConfigMergeResult, DetectedConfig, InstallConfig, OpenCodeConfig } from './types';
2
2
  /**
3
3
  * Strip JSON comments (single-line // and multi-line) and trailing commas for JSONC support.
4
4
  */
@@ -1,4 +1,4 @@
1
- export * from "./paths";
2
- export * from "./providers";
3
- export * from "./system";
4
- export * from "./config-io";
1
+ export * from './config-io';
2
+ export * from './paths';
3
+ export * from './providers';
4
+ export * from './system';
@@ -0,0 +1 @@
1
+ export {};
package/dist/cli/index.js CHANGED
@@ -4,6 +4,16 @@
4
4
  // src/cli/install.ts
5
5
  import * as readline from "readline/promises";
6
6
 
7
+ // src/cli/config-io.ts
8
+ import {
9
+ copyFileSync,
10
+ existsSync as existsSync2,
11
+ readFileSync,
12
+ renameSync,
13
+ statSync,
14
+ writeFileSync
15
+ } from "fs";
16
+
7
17
  // src/cli/paths.ts
8
18
  import { existsSync, mkdirSync } from "fs";
9
19
  import { homedir } from "os";
@@ -36,6 +46,7 @@ function ensureConfigDir() {
36
46
  mkdirSync(configDir, { recursive: true });
37
47
  }
38
48
  }
49
+
39
50
  // src/tools/skill/builtin.ts
40
51
  var DEFAULT_AGENT_SKILLS = {
41
52
  orchestrator: ["*"],
@@ -255,7 +266,9 @@ function generateLiteConfig(installConfig) {
255
266
  ]));
256
267
  config.presets[providerName] = agents2;
257
268
  }
258
- const mixedAgents = { ...MODEL_MAPPINGS.antigravity };
269
+ const mixedAgents = {
270
+ ...MODEL_MAPPINGS.antigravity
271
+ };
259
272
  mixedAgents.oracle = { model: "openai/gpt-5.2-codex", variant: "high" };
260
273
  const agents = Object.fromEntries(Object.entries(mixedAgents).map(([k, v]) => [
261
274
  k,
@@ -278,6 +291,7 @@ function generateLiteConfig(installConfig) {
278
291
  }
279
292
  return config;
280
293
  }
294
+
281
295
  // src/cli/system.ts
282
296
  async function isOpenCodeInstalled() {
283
297
  try {
@@ -315,8 +329,8 @@ async function fetchLatestVersion(packageName) {
315
329
  return null;
316
330
  }
317
331
  }
332
+
318
333
  // src/cli/config-io.ts
319
- import { existsSync as existsSync2, readFileSync, writeFileSync, statSync, renameSync, copyFileSync } from "fs";
320
334
  var PACKAGE_NAME = "oh-my-opencode-slim";
321
335
  function stripJsonComments(json) {
322
336
  const commentPattern = /\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g;
@@ -339,7 +353,7 @@ function parseConfigFile(path) {
339
353
  }
340
354
  }
341
355
  function parseConfig(path) {
342
- let result = parseConfigFile(path);
356
+ const result = parseConfigFile(path);
343
357
  if (result.config || result.error)
344
358
  return result;
345
359
  if (path.endsWith(".json")) {
@@ -354,7 +368,7 @@ function writeConfig(configPath, config) {
354
368
  }
355
369
  const tmpPath = `${configPath}.tmp`;
356
370
  const bakPath = `${configPath}.bak`;
357
- const content = JSON.stringify(config, null, 2) + `
371
+ const content = `${JSON.stringify(config, null, 2)}
358
372
  `;
359
373
  if (existsSync2(configPath)) {
360
374
  copyFileSync(configPath, bakPath);
@@ -376,7 +390,11 @@ async function addPluginToOpenCodeConfig() {
376
390
  try {
377
391
  const { config: parsedConfig, error } = parseConfig(configPath);
378
392
  if (error) {
379
- return { success: false, configPath, error: `Failed to parse config: ${error}` };
393
+ return {
394
+ success: false,
395
+ configPath,
396
+ error: `Failed to parse config: ${error}`
397
+ };
380
398
  }
381
399
  const config = parsedConfig ?? {};
382
400
  const plugins = config.plugin ?? [];
@@ -399,7 +417,11 @@ async function addAuthPlugins(installConfig) {
399
417
  ensureConfigDir();
400
418
  const { config: parsedConfig, error } = parseConfig(configPath);
401
419
  if (error) {
402
- return { success: false, configPath, error: `Failed to parse config: ${error}` };
420
+ return {
421
+ success: false,
422
+ configPath,
423
+ error: `Failed to parse config: ${error}`
424
+ };
403
425
  }
404
426
  const config = parsedConfig ?? {};
405
427
  const plugins = config.plugin ?? [];
@@ -427,7 +449,11 @@ function addProviderConfig(installConfig) {
427
449
  ensureConfigDir();
428
450
  const { config: parsedConfig, error } = parseConfig(configPath);
429
451
  if (error) {
430
- return { success: false, configPath, error: `Failed to parse config: ${error}` };
452
+ return {
453
+ success: false,
454
+ configPath,
455
+ error: `Failed to parse config: ${error}`
456
+ };
431
457
  }
432
458
  const config = parsedConfig ?? {};
433
459
  if (installConfig.hasAntigravity) {
@@ -452,7 +478,7 @@ function writeLiteConfig(installConfig) {
452
478
  const config = generateLiteConfig(installConfig);
453
479
  const tmpPath = `${configPath}.tmp`;
454
480
  const bakPath = `${configPath}.bak`;
455
- const content = JSON.stringify(config, null, 2) + `
481
+ const content = `${JSON.stringify(config, null, 2)}
456
482
  `;
457
483
  if (existsSync2(configPath)) {
458
484
  copyFileSync(configPath, bakPath);
@@ -474,7 +500,11 @@ function disableDefaultAgents() {
474
500
  ensureConfigDir();
475
501
  const { config: parsedConfig, error } = parseConfig(configPath);
476
502
  if (error) {
477
- return { success: false, configPath, error: `Failed to parse config: ${error}` };
503
+ return {
504
+ success: false,
505
+ configPath,
506
+ error: `Failed to parse config: ${error}`
507
+ };
478
508
  }
479
509
  const config = parsedConfig ?? {};
480
510
  const agent = config.agent ?? {};
@@ -587,10 +617,10 @@ function formatConfigSummary(config) {
587
617
  lines.push(`${BOLD}Configuration Summary${RESET}`);
588
618
  lines.push("");
589
619
  lines.push(` ${BOLD}Preset:${RESET} ${BLUE}${preset}${RESET}`);
590
- lines.push(` ${config.hasAntigravity ? SYMBOLS.check : DIM + "\u25CB" + RESET} Antigravity`);
591
- lines.push(` ${config.hasOpenAI ? SYMBOLS.check : DIM + "\u25CB" + RESET} OpenAI`);
620
+ lines.push(` ${config.hasAntigravity ? SYMBOLS.check : `${DIM}\u25CB${RESET}`} Antigravity`);
621
+ lines.push(` ${config.hasOpenAI ? SYMBOLS.check : `${DIM}\u25CB${RESET}`} OpenAI`);
592
622
  lines.push(` ${SYMBOLS.check} Opencode Zen (free models)`);
593
- lines.push(` ${config.hasTmux ? SYMBOLS.check : DIM + "\u25CB" + RESET} Tmux Integration`);
623
+ lines.push(` ${config.hasTmux ? SYMBOLS.check : `${DIM}\u25CB${RESET}`} Tmux Integration`);
594
624
  return lines.join(`
595
625
  `);
596
626
  }
@@ -631,7 +661,10 @@ async function askYesNo(rl, prompt, defaultValue = "no") {
631
661
  return defaultValue;
632
662
  }
633
663
  async function runInteractiveMode(detected) {
634
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
664
+ const rl = readline.createInterface({
665
+ input: process.stdin,
666
+ output: process.stdout
667
+ });
635
668
  const totalQuestions = 2;
636
669
  try {
637
670
  console.log(`${BOLD}Question 1/${totalQuestions}:${RESET}`);
@@ -1,2 +1,2 @@
1
- import type { InstallArgs } from "./types";
1
+ import type { InstallArgs } from './types';
2
2
  export declare function install(args: InstallArgs): Promise<number>;
@@ -1,4 +1,4 @@
1
- import type { InstallConfig } from "./types";
1
+ import type { InstallConfig } from './types';
2
2
  /**
3
3
  * Provider configurations for Google models (via Antigravity auth plugin)
4
4
  */
@@ -6,7 +6,7 @@ export declare const GOOGLE_PROVIDER_CONFIG: {
6
6
  google: {
7
7
  name: string;
8
8
  models: {
9
- "gemini-3-pro-high": {
9
+ 'gemini-3-pro-high': {
10
10
  name: string;
11
11
  thinking: boolean;
12
12
  attachment: boolean;
@@ -19,7 +19,7 @@ export declare const GOOGLE_PROVIDER_CONFIG: {
19
19
  output: string[];
20
20
  };
21
21
  };
22
- "gemini-3-flash": {
22
+ 'gemini-3-flash': {
23
23
  name: string;
24
24
  attachment: boolean;
25
25
  limit: {
@@ -31,7 +31,7 @@ export declare const GOOGLE_PROVIDER_CONFIG: {
31
31
  output: string[];
32
32
  };
33
33
  };
34
- "claude-opus-4-5-thinking": {
34
+ 'claude-opus-4-5-thinking': {
35
35
  name: string;
36
36
  attachment: boolean;
37
37
  limit: {
@@ -43,7 +43,7 @@ export declare const GOOGLE_PROVIDER_CONFIG: {
43
43
  output: string[];
44
44
  };
45
45
  };
46
- "claude-sonnet-4-5-thinking": {
46
+ 'claude-sonnet-4-5-thinking': {
47
47
  name: string;
48
48
  attachment: boolean;
49
49
  limit: {
@@ -109,7 +109,7 @@ export declare const MODEL_MAPPINGS: {
109
109
  readonly variant: "low";
110
110
  };
111
111
  };
112
- readonly "zen-free": {
112
+ readonly 'zen-free': {
113
113
  readonly orchestrator: {
114
114
  readonly model: "opencode/glm-4.7-free";
115
115
  };
@@ -1,4 +1,4 @@
1
- export type BooleanArg = "yes" | "no";
1
+ export type BooleanArg = 'yes' | 'no';
2
2
  export interface InstallArgs {
3
3
  tui: boolean;
4
4
  antigravity?: BooleanArg;
@@ -0,0 +1,4 @@
1
+ export type CommandRenderer = (args: string) => string;
2
+ export declare function getCommandRenderer(
3
+ name: string,
4
+ ): CommandRenderer | undefined;
@@ -0,0 +1 @@
1
+ export declare function renderPlanCommand(args: string): string;
@@ -1,7 +1,7 @@
1
1
  export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "fixer"];
2
2
  export declare const ORCHESTRATOR_NAME: "orchestrator";
3
3
  export declare const ALL_AGENT_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "fixer"];
4
- export type AgentName = typeof ALL_AGENT_NAMES[number];
4
+ export type AgentName = (typeof ALL_AGENT_NAMES)[number];
5
5
  export declare const DEFAULT_MODELS: Record<AgentName, string>;
6
6
  export declare const POLL_INTERVAL_MS = 500;
7
7
  export declare const POLL_INTERVAL_SLOW_MS = 1000;
@@ -1,3 +1,3 @@
1
- export * from "./schema";
2
- export * from "./constants";
3
- export { loadPluginConfig } from "./loader";
1
+ export * from './constants';
2
+ export { loadAgentPrompt, loadPluginConfig } from './loader';
3
+ export * from './schema';
@@ -1,4 +1,4 @@
1
- import { type PluginConfig } from "./schema";
1
+ import { type PluginConfig } from './schema';
2
2
  /**
3
3
  * Load plugin configuration from user and project config files, merging them appropriately.
4
4
  *
@@ -13,3 +13,14 @@ import { type PluginConfig } from "./schema";
13
13
  * @returns Merged plugin configuration (empty object if no configs found)
14
14
  */
15
15
  export declare function loadPluginConfig(directory: string): PluginConfig;
16
+ /**
17
+ * Load custom prompt for an agent from the prompts directory.
18
+ * Checks for {agent}.md (replaces default) and {agent}_append.md (appends to default).
19
+ *
20
+ * @param agentName - Name of the agent (e.g., "orchestrator", "explorer")
21
+ * @returns Object with prompt and/or appendPrompt if files exist
22
+ */
23
+ export declare function loadAgentPrompt(agentName: string): {
24
+ prompt?: string;
25
+ appendPrompt?: string;
26
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  export declare const AgentOverrideConfigSchema: z.ZodObject<{
3
3
  model: z.ZodOptional<z.ZodString>;
4
4
  temperature: z.ZodOptional<z.ZodNumber>;
@@ -67,4 +67,4 @@ export declare const PluginConfigSchema: z.ZodObject<{
67
67
  }, z.core.$strip>>;
68
68
  }, z.core.$strip>;
69
69
  export type PluginConfig = z.infer<typeof PluginConfigSchema>;
70
- export type { AgentName } from "./constants";
70
+ export type { AgentName } from './constants';