oh-my-opencode-serverlocal 0.1.0
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/LICENSE +21 -0
- package/README.ja-JP.md +775 -0
- package/README.ko-KR.md +796 -0
- package/README.md +792 -0
- package/README.zh-CN.md +765 -0
- package/dist/agents/council.d.ts +27 -0
- package/dist/agents/councillor.d.ts +2 -0
- package/dist/agents/designer.d.ts +2 -0
- package/dist/agents/explorer.d.ts +2 -0
- package/dist/agents/fixer.d.ts +2 -0
- package/dist/agents/index.d.ts +31 -0
- package/dist/agents/librarian.d.ts +2 -0
- package/dist/agents/observer.d.ts +2 -0
- package/dist/agents/oracle.d.ts +2 -0
- package/dist/agents/orchestrator.d.ts +28 -0
- package/dist/agents/permissions.d.ts +10 -0
- package/dist/cli/background-subagents.d.ts +13 -0
- package/dist/cli/companion.d.ts +4 -0
- package/dist/cli/config-io.d.ts +25 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/custom-skills-registry.d.ts +18 -0
- package/dist/cli/custom-skills.d.ts +13 -0
- package/dist/cli/doctor.d.ts +38 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +3565 -0
- package/dist/cli/install.d.ts +7 -0
- package/dist/cli/model-key-normalization.d.ts +1 -0
- package/dist/cli/paths.d.ts +35 -0
- package/dist/cli/providers.d.ts +145 -0
- package/dist/cli/skills.d.ts +24 -0
- package/dist/cli/system.d.ts +6 -0
- package/dist/cli/types.d.ts +47 -0
- package/dist/companion/manager.d.ts +50 -0
- package/dist/companion/updater.d.ts +36 -0
- package/dist/config/agent-mcps.d.ts +11 -0
- package/dist/config/constants.d.ts +38 -0
- package/dist/config/council-schema.d.ts +137 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/loader.d.ts +88 -0
- package/dist/config/runtime-preset.d.ts +11 -0
- package/dist/config/schema.d.ts +1107 -0
- package/dist/config/strip-orchestrator-model.d.ts +9 -0
- package/dist/config/utils.d.ts +18 -0
- package/dist/council/council-manager.d.ts +53 -0
- package/dist/council/index.d.ts +1 -0
- package/dist/hooks/apply-patch/codec.d.ts +7 -0
- package/dist/hooks/apply-patch/errors.d.ts +25 -0
- package/dist/hooks/apply-patch/execution-context.d.ts +27 -0
- package/dist/hooks/apply-patch/index.d.ts +15 -0
- package/dist/hooks/apply-patch/matching.d.ts +26 -0
- package/dist/hooks/apply-patch/operations.d.ts +3 -0
- package/dist/hooks/apply-patch/prepared-changes.d.ts +17 -0
- package/dist/hooks/apply-patch/resolution.d.ts +19 -0
- package/dist/hooks/apply-patch/rewrite.d.ts +7 -0
- package/dist/hooks/apply-patch/test-helpers.d.ts +6 -0
- package/dist/hooks/apply-patch/types.d.ts +80 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +11 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +38 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +12 -0
- package/dist/hooks/auto-update-checker/index.d.ts +18 -0
- package/dist/hooks/auto-update-checker/skill-sync.d.ts +67 -0
- package/dist/hooks/auto-update-checker/types.d.ts +34 -0
- package/dist/hooks/chat-headers.d.ts +16 -0
- package/dist/hooks/command-hook-utils.d.ts +5 -0
- package/dist/hooks/deepwork/index.d.ts +13 -0
- package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
- package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
- package/dist/hooks/filter-available-skills/index.d.ts +19 -0
- package/dist/hooks/foreground-fallback/index.d.ts +122 -0
- package/dist/hooks/image-hook.d.ts +8 -0
- package/dist/hooks/index.d.ts +16 -0
- package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
- package/dist/hooks/loop-command/index.d.ts +13 -0
- package/dist/hooks/phase-reminder/index.d.ts +25 -0
- package/dist/hooks/post-file-tool-nudge/index.d.ts +23 -0
- package/dist/hooks/reflect/index.d.ts +13 -0
- package/dist/hooks/session-lifecycle.d.ts +10 -0
- package/dist/hooks/task-session-manager/index.d.ts +58 -0
- package/dist/hooks/task-session-manager/pending-call-tracker.d.ts +13 -0
- package/dist/hooks/task-session-manager/task-context-tracker.d.ts +14 -0
- package/dist/hooks/types.d.ts +26 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +39519 -0
- package/dist/interview/dashboard-manager.d.ts +21 -0
- package/dist/interview/dashboard.d.ts +67 -0
- package/dist/interview/document.d.ts +29 -0
- package/dist/interview/helpers.d.ts +10 -0
- package/dist/interview/index.d.ts +1 -0
- package/dist/interview/manager.d.ts +21 -0
- package/dist/interview/parser.d.ts +11 -0
- package/dist/interview/prompts.d.ts +7 -0
- package/dist/interview/server.d.ts +15 -0
- package/dist/interview/service.d.ts +45 -0
- package/dist/interview/session-server.d.ts +21 -0
- package/dist/interview/types.d.ts +111 -0
- package/dist/interview/ui.d.ts +11 -0
- package/dist/loop/loop-session.d.ts +64 -0
- package/dist/mcp/context7.d.ts +6 -0
- package/dist/mcp/grep-app.d.ts +6 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/types.d.ts +12 -0
- package/dist/mcp/websearch.d.ts +9 -0
- package/dist/multiplexer/cmux/close-policy.d.ts +20 -0
- package/dist/multiplexer/cmux/index.d.ts +102 -0
- package/dist/multiplexer/cmux/session-lifecycle.d.ts +92 -0
- package/dist/multiplexer/cmux/session-state.d.ts +45 -0
- package/dist/multiplexer/factory.d.ts +17 -0
- package/dist/multiplexer/herdr/index.d.ts +35 -0
- package/dist/multiplexer/index.d.ts +12 -0
- package/dist/multiplexer/session-manager.d.ts +69 -0
- package/dist/multiplexer/shared.d.ts +31 -0
- package/dist/multiplexer/tmux/index.d.ts +26 -0
- package/dist/multiplexer/types.d.ts +57 -0
- package/dist/multiplexer/zellij/index.d.ts +47 -0
- package/dist/tools/acp-run.d.ts +3 -0
- package/dist/tools/ast-grep/cli.d.ts +15 -0
- package/dist/tools/ast-grep/constants.d.ts +25 -0
- package/dist/tools/ast-grep/downloader.d.ts +5 -0
- package/dist/tools/ast-grep/index.d.ts +10 -0
- package/dist/tools/ast-grep/tools.d.ts +3 -0
- package/dist/tools/ast-grep/types.d.ts +30 -0
- package/dist/tools/ast-grep/utils.d.ts +4 -0
- package/dist/tools/cancel-task.d.ts +16 -0
- package/dist/tools/council.d.ts +10 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/preset-manager.d.ts +26 -0
- package/dist/tools/smartfetch/binary.d.ts +3 -0
- package/dist/tools/smartfetch/cache.d.ts +6 -0
- package/dist/tools/smartfetch/constants.d.ts +12 -0
- package/dist/tools/smartfetch/index.d.ts +3 -0
- package/dist/tools/smartfetch/network.d.ts +38 -0
- package/dist/tools/smartfetch/secondary-model.d.ts +35 -0
- package/dist/tools/smartfetch/tool.d.ts +3 -0
- package/dist/tools/smartfetch/types.d.ts +122 -0
- package/dist/tools/smartfetch/utils.d.ts +20 -0
- package/dist/tui-state.d.ts +18 -0
- package/dist/tui.d.ts +13 -0
- package/dist/tui.js +1112 -0
- package/dist/utils/agent-variant.d.ts +23 -0
- package/dist/utils/background-job-board.d.ts +113 -0
- package/dist/utils/background-job-coordinator.d.ts +72 -0
- package/dist/utils/background-job-store.d.ts +46 -0
- package/dist/utils/compat.d.ts +29 -0
- package/dist/utils/councillor-models.d.ts +20 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/escape-html.d.ts +1 -0
- package/dist/utils/frontmatter.d.ts +6 -0
- package/dist/utils/guards.d.ts +4 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/internal-initiator.d.ts +11 -0
- package/dist/utils/logger.d.ts +6 -0
- package/dist/utils/polling.d.ts +21 -0
- package/dist/utils/session.d.ts +75 -0
- package/dist/utils/subagent-depth.d.ts +35 -0
- package/dist/utils/system-collapse.d.ts +6 -0
- package/dist/utils/task.d.ts +20 -0
- package/dist/utils/zip-extractor.d.ts +1 -0
- package/package.json +108 -0
- package/src/companion/companion-manifest.json +12 -0
- package/src/skills/clonedeps/README.md +23 -0
- package/src/skills/clonedeps/SKILL.md +240 -0
- package/src/skills/clonedeps/codemap.md +32 -0
- package/src/skills/codemap/README.md +59 -0
- package/src/skills/codemap/SKILL.md +163 -0
- package/src/skills/codemap/codemap.md +36 -0
- package/src/skills/codemap/scripts/codemap.mjs +483 -0
- package/src/skills/codemap/scripts/codemap.test.ts +129 -0
- package/src/skills/codemap.md +78 -0
- package/src/skills/deepwork/SKILL.md +122 -0
- package/src/skills/loop-engineering/SKILL.md +30 -0
- package/src/skills/oh-my-opencode-slim/SKILL.md +326 -0
- package/src/skills/reflect/SKILL.md +326 -0
- package/src/skills/simplify/README.md +19 -0
- package/src/skills/simplify/SKILL.md +138 -0
- package/src/skills/simplify/codemap.md +36 -0
- package/src/skills/verification-planning/SKILL.md +102 -0
- package/src/skills/worktrees/SKILL.md +171 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InstallArgs, InstallConfig } from './types';
|
|
2
|
+
export declare function configureBackgroundSubagents(config: InstallConfig): Promise<{
|
|
3
|
+
enabledNow: boolean;
|
|
4
|
+
configuredTarget?: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function shouldInstallCompanion(config: InstallConfig): Promise<boolean>;
|
|
7
|
+
export declare function install(args: InstallArgs): Promise<number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildModelKeyAliases(input: string): string[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the OpenCode plugin config directory.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. OPENCODE_CONFIG_DIR (custom OpenCode directory)
|
|
6
|
+
* 2. XDG_CONFIG_HOME/opencode
|
|
7
|
+
* 3. ~/.config/opencode
|
|
8
|
+
*/
|
|
9
|
+
export declare function getConfigDir(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Get OpenCode config directories in read/search order.
|
|
12
|
+
*
|
|
13
|
+
* Resolution order:
|
|
14
|
+
* 1. OPENCODE_CONFIG_DIR (if set)
|
|
15
|
+
* 2. XDG_CONFIG_HOME/opencode or ~/.config/opencode
|
|
16
|
+
*
|
|
17
|
+
* Duplicate entries are removed.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getConfigSearchDirs(): string[];
|
|
20
|
+
export declare function getOpenCodeConfigPaths(): string[];
|
|
21
|
+
export declare function getConfigJson(): string;
|
|
22
|
+
export declare function getConfigJsonc(): string;
|
|
23
|
+
export declare function getLiteConfig(): string;
|
|
24
|
+
export declare function getLiteConfigJsonc(): string;
|
|
25
|
+
export declare function getTuiConfig(): string;
|
|
26
|
+
export declare function getTuiConfigJsonc(): string;
|
|
27
|
+
export declare function getExistingLiteConfigPath(): string;
|
|
28
|
+
export declare function getExistingTuiConfigPath(): string;
|
|
29
|
+
export declare function getExistingConfigPath(): string;
|
|
30
|
+
export declare function ensureConfigDir(): void;
|
|
31
|
+
export declare function ensureTuiConfigDir(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Ensure the directory for OpenCode's main config file exists.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensureOpenCodeConfigDir(): void;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { InstallConfig } from './types';
|
|
2
|
+
export declare const GENERATED_PRESETS: readonly ["openai", "opencode-go"];
|
|
3
|
+
export declare const MODEL_MAPPINGS: {
|
|
4
|
+
readonly openai: {
|
|
5
|
+
readonly orchestrator: {
|
|
6
|
+
readonly model: "openai/gpt-5.6-terra";
|
|
7
|
+
readonly variant: "medium";
|
|
8
|
+
};
|
|
9
|
+
readonly oracle: {
|
|
10
|
+
readonly model: "openai/gpt-5.6-sol";
|
|
11
|
+
readonly variant: "high";
|
|
12
|
+
};
|
|
13
|
+
readonly librarian: {
|
|
14
|
+
readonly model: "openai/gpt-5.6-luna";
|
|
15
|
+
readonly variant: "low";
|
|
16
|
+
};
|
|
17
|
+
readonly explorer: {
|
|
18
|
+
readonly model: "openai/gpt-5.6-luna";
|
|
19
|
+
readonly variant: "low";
|
|
20
|
+
};
|
|
21
|
+
readonly designer: {
|
|
22
|
+
readonly model: "openai/gpt-5.6-luna";
|
|
23
|
+
readonly variant: "medium";
|
|
24
|
+
};
|
|
25
|
+
readonly fixer: {
|
|
26
|
+
readonly model: "openai/gpt-5.6-luna";
|
|
27
|
+
readonly variant: "medium";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly kimi: {
|
|
31
|
+
readonly orchestrator: {
|
|
32
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
33
|
+
readonly variant: "max";
|
|
34
|
+
};
|
|
35
|
+
readonly oracle: {
|
|
36
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
37
|
+
readonly variant: "high";
|
|
38
|
+
};
|
|
39
|
+
readonly librarian: {
|
|
40
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
41
|
+
readonly variant: "low";
|
|
42
|
+
};
|
|
43
|
+
readonly explorer: {
|
|
44
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
45
|
+
readonly variant: "low";
|
|
46
|
+
};
|
|
47
|
+
readonly designer: {
|
|
48
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
49
|
+
readonly variant: "medium";
|
|
50
|
+
};
|
|
51
|
+
readonly fixer: {
|
|
52
|
+
readonly model: "kimi-for-coding/k2p5";
|
|
53
|
+
readonly variant: "low";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly copilot: {
|
|
57
|
+
readonly orchestrator: {
|
|
58
|
+
readonly model: "github-copilot/claude-opus-4.6";
|
|
59
|
+
readonly variant: "max";
|
|
60
|
+
};
|
|
61
|
+
readonly oracle: {
|
|
62
|
+
readonly model: "github-copilot/claude-opus-4.6";
|
|
63
|
+
readonly variant: "high";
|
|
64
|
+
};
|
|
65
|
+
readonly librarian: {
|
|
66
|
+
readonly model: "github-copilot/grok-code-fast-1";
|
|
67
|
+
readonly variant: "low";
|
|
68
|
+
};
|
|
69
|
+
readonly explorer: {
|
|
70
|
+
readonly model: "github-copilot/grok-code-fast-1";
|
|
71
|
+
readonly variant: "low";
|
|
72
|
+
};
|
|
73
|
+
readonly designer: {
|
|
74
|
+
readonly model: "github-copilot/gemini-3.1-pro-preview";
|
|
75
|
+
readonly variant: "medium";
|
|
76
|
+
};
|
|
77
|
+
readonly fixer: {
|
|
78
|
+
readonly model: "github-copilot/claude-sonnet-4.6";
|
|
79
|
+
readonly variant: "low";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly 'zai-plan': {
|
|
83
|
+
readonly orchestrator: {
|
|
84
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
85
|
+
readonly variant: "max";
|
|
86
|
+
};
|
|
87
|
+
readonly oracle: {
|
|
88
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
89
|
+
readonly variant: "high";
|
|
90
|
+
};
|
|
91
|
+
readonly librarian: {
|
|
92
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
93
|
+
readonly variant: "low";
|
|
94
|
+
};
|
|
95
|
+
readonly explorer: {
|
|
96
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
97
|
+
readonly variant: "low";
|
|
98
|
+
};
|
|
99
|
+
readonly designer: {
|
|
100
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
101
|
+
readonly variant: "medium";
|
|
102
|
+
};
|
|
103
|
+
readonly fixer: {
|
|
104
|
+
readonly model: "zai-coding-plan/glm-5";
|
|
105
|
+
readonly variant: "low";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly 'opencode-go': {
|
|
109
|
+
readonly orchestrator: {
|
|
110
|
+
readonly model: "opencode-go/minimax-m3";
|
|
111
|
+
readonly variant: "max";
|
|
112
|
+
};
|
|
113
|
+
readonly oracle: {
|
|
114
|
+
readonly model: "opencode-go/qwen3.7-max";
|
|
115
|
+
readonly variant: "max";
|
|
116
|
+
};
|
|
117
|
+
readonly explorer: {
|
|
118
|
+
readonly model: "opencode-go/deepseek-v4-flash";
|
|
119
|
+
readonly variant: "max";
|
|
120
|
+
};
|
|
121
|
+
readonly librarian: {
|
|
122
|
+
readonly model: "opencode-go/deepseek-v4-flash";
|
|
123
|
+
readonly variant: "high";
|
|
124
|
+
};
|
|
125
|
+
readonly designer: {
|
|
126
|
+
readonly model: "opencode-go/kimi-k2.7-code";
|
|
127
|
+
readonly variant: "medium";
|
|
128
|
+
};
|
|
129
|
+
readonly fixer: {
|
|
130
|
+
readonly model: "opencode-go/deepseek-v4-flash";
|
|
131
|
+
readonly variant: "high";
|
|
132
|
+
};
|
|
133
|
+
readonly observer: {
|
|
134
|
+
readonly model: "opencode-go/mimo-v2.5";
|
|
135
|
+
readonly variant: "max";
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export type PresetName = keyof typeof MODEL_MAPPINGS;
|
|
140
|
+
export type GeneratedPresetName = (typeof GENERATED_PRESETS)[number];
|
|
141
|
+
export declare function isPresetName(value: string): value is PresetName;
|
|
142
|
+
export declare function getPresetNames(): PresetName[];
|
|
143
|
+
export declare function isGeneratedPresetName(value: string): value is GeneratedPresetName;
|
|
144
|
+
export declare function getGeneratedPresetNames(): GeneratedPresetName[];
|
|
145
|
+
export declare function generateLiteConfig(installConfig: InstallConfig): Record<string, unknown>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A skill that is managed externally (e.g. user-installed) and needs
|
|
3
|
+
* permission grants but is NOT installed by this plugin's CLI.
|
|
4
|
+
*/
|
|
5
|
+
export interface PermissionOnlySkill {
|
|
6
|
+
/** Skill name - must match the name OpenCode uses for permission checks */
|
|
7
|
+
name: string;
|
|
8
|
+
/** List of agents that should auto-allow this skill */
|
|
9
|
+
allowedAgents: string[];
|
|
10
|
+
/** Human-readable description (for documentation only) */
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Skills managed externally (not installed by this plugin's CLI).
|
|
15
|
+
* Entries here only affect agent permission grants - nothing is installed.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PERMISSION_ONLY_SKILLS: PermissionOnlySkill[];
|
|
18
|
+
/**
|
|
19
|
+
* Get permission presets for a specific agent based on bundled skills.
|
|
20
|
+
* @param agentName - The name of the agent
|
|
21
|
+
* @param skillList - Optional explicit list of skills to allow (overrides defaults)
|
|
22
|
+
* @returns Permission rules for the skill permission type
|
|
23
|
+
*/
|
|
24
|
+
export declare function getSkillPermissionsForAgent(agentName: string, skillList?: string[], disabledSkillNames?: string[]): Record<string, 'allow' | 'ask' | 'deny'>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function resolveOpenCodePath(): string;
|
|
2
|
+
export declare function isOpenCodeInstalled(): Promise<boolean>;
|
|
3
|
+
export declare function isTmuxInstalled(): Promise<boolean>;
|
|
4
|
+
export declare function getOpenCodeVersion(): Promise<string | null>;
|
|
5
|
+
export declare function getOpenCodePath(): string | null;
|
|
6
|
+
export declare function fetchLatestVersion(packageName: string): Promise<string | null>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type BooleanArg = 'yes' | 'no';
|
|
2
|
+
export type BackgroundSubagentsArg = 'ask' | 'yes' | 'no';
|
|
3
|
+
export type CompanionArg = 'ask' | BooleanArg;
|
|
4
|
+
export interface InstallArgs {
|
|
5
|
+
tui: boolean;
|
|
6
|
+
skills?: BooleanArg;
|
|
7
|
+
preset?: string;
|
|
8
|
+
dryRun?: boolean;
|
|
9
|
+
reset?: boolean;
|
|
10
|
+
backgroundSubagents?: BackgroundSubagentsArg;
|
|
11
|
+
backgroundSubagentsTarget?: string;
|
|
12
|
+
companion?: CompanionArg;
|
|
13
|
+
}
|
|
14
|
+
export interface OpenCodeConfig {
|
|
15
|
+
plugin?: unknown[];
|
|
16
|
+
provider?: Record<string, unknown>;
|
|
17
|
+
agent?: Record<string, unknown>;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface InstallConfig {
|
|
21
|
+
hasTmux: boolean;
|
|
22
|
+
installCustomSkills: boolean;
|
|
23
|
+
preset?: string;
|
|
24
|
+
promptForStar?: boolean;
|
|
25
|
+
dryRun?: boolean;
|
|
26
|
+
reset: boolean;
|
|
27
|
+
backgroundSubagents: BackgroundSubagentsArg;
|
|
28
|
+
backgroundSubagentsTarget?: string;
|
|
29
|
+
companion?: CompanionArg;
|
|
30
|
+
}
|
|
31
|
+
export interface ConfigMergeResult {
|
|
32
|
+
success: boolean;
|
|
33
|
+
configPath: string;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface DetectedConfig {
|
|
37
|
+
isInstalled: boolean;
|
|
38
|
+
hasKimi: boolean;
|
|
39
|
+
hasOpenAI: boolean;
|
|
40
|
+
hasAnthropic?: boolean;
|
|
41
|
+
hasCopilot?: boolean;
|
|
42
|
+
hasZaiPlan?: boolean;
|
|
43
|
+
hasAntigravity: boolean;
|
|
44
|
+
hasChutes?: boolean;
|
|
45
|
+
hasOpencodeZen: boolean;
|
|
46
|
+
hasTmux: boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { CompanionConfig } from '../config/schema';
|
|
2
|
+
export declare function stateFilePath(): string;
|
|
3
|
+
export declare function resolveCompanionBinaryPath(config?: CompanionConfig): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Tracks live agent activity per session and mirrors it to the companion
|
|
6
|
+
* state file. Source of truth is OpenCode's session.status events: every
|
|
7
|
+
* spawned specialist (foreground or background) runs in its own session,
|
|
8
|
+
* which reports busy/idle independently. Tool-call lifecycles are NOT used
|
|
9
|
+
* because background Task launches return immediately while the agent keeps
|
|
10
|
+
* running in its child session.
|
|
11
|
+
*/
|
|
12
|
+
export declare class CompanionManager {
|
|
13
|
+
private readonly id;
|
|
14
|
+
private readonly cwd;
|
|
15
|
+
private status;
|
|
16
|
+
/** sessionId → agent name, for sessions currently busy. */
|
|
17
|
+
private readonly busyAgentSessions;
|
|
18
|
+
private readonly config?;
|
|
19
|
+
private companionProcess;
|
|
20
|
+
private wasSpawner;
|
|
21
|
+
private spawnedCompanionPid;
|
|
22
|
+
constructor(sessionId: string, cwd: string, config?: CompanionConfig);
|
|
23
|
+
onLoad(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Register this manager behind a single process `exit` listener. Re-inits for
|
|
26
|
+
* the same OpenCode session dispose the superseded manager immediately so its
|
|
27
|
+
* detached child does not survive until process exit.
|
|
28
|
+
*/
|
|
29
|
+
private registerActiveManager;
|
|
30
|
+
private static disposeActiveManagers;
|
|
31
|
+
/**
|
|
32
|
+
* Feed every session.status event here, with the agent name resolved
|
|
33
|
+
* from sessionAgentMap. Orchestrator sessions drive overall status;
|
|
34
|
+
* specialist sessions drive the per-agent GIF grid.
|
|
35
|
+
*/
|
|
36
|
+
onSessionStatus(input: {
|
|
37
|
+
sessionId?: string;
|
|
38
|
+
agent?: string;
|
|
39
|
+
status?: string;
|
|
40
|
+
}): void;
|
|
41
|
+
onSessionDeleted(sessionId: string | undefined): void;
|
|
42
|
+
onWaitingInput(): void;
|
|
43
|
+
onInputResolved(): void;
|
|
44
|
+
onExit(): void;
|
|
45
|
+
private removeOwnedPidFileIfNoSessionsRemain;
|
|
46
|
+
/** One entry per running agent instance (two fixers → two cells). */
|
|
47
|
+
private activeAgents;
|
|
48
|
+
private flush;
|
|
49
|
+
private spawnIfAvailable;
|
|
50
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CompanionConfig } from '../config/schema';
|
|
2
|
+
export interface CompanionManifest {
|
|
3
|
+
version: string;
|
|
4
|
+
tag: string;
|
|
5
|
+
repo: string;
|
|
6
|
+
checksums?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export type CompanionUpdateResult = {
|
|
9
|
+
status: 'installed';
|
|
10
|
+
binaryPath: string;
|
|
11
|
+
version: string;
|
|
12
|
+
} | {
|
|
13
|
+
status: 'current';
|
|
14
|
+
binaryPath: string;
|
|
15
|
+
version: string;
|
|
16
|
+
} | {
|
|
17
|
+
status: 'skipped';
|
|
18
|
+
reason: string;
|
|
19
|
+
binaryPath?: string;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'failed';
|
|
22
|
+
error: string;
|
|
23
|
+
binaryPath: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const COMPANION_MANIFEST: CompanionManifest;
|
|
26
|
+
export declare function getCompanionTarget(): string | null;
|
|
27
|
+
export declare function getCompanionBinaryPath(): string;
|
|
28
|
+
export declare function loadCompanionManifestFromPackageRoot(packageRoot: string): CompanionManifest | null;
|
|
29
|
+
export declare function ensureCompanionVersion(options: {
|
|
30
|
+
config?: CompanionConfig;
|
|
31
|
+
manifest?: CompanionManifest;
|
|
32
|
+
dryRun?: boolean;
|
|
33
|
+
downloadTimeoutMs?: number;
|
|
34
|
+
lockTimeoutMs?: number;
|
|
35
|
+
lockStaleMs?: number;
|
|
36
|
+
}): Promise<CompanionUpdateResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AgentName, type PluginConfig } from '.';
|
|
2
|
+
/** Default MCPs per agent - "*" means all MCPs, "!item" excludes specific MCPs */
|
|
3
|
+
export declare const DEFAULT_AGENT_MCPS: Record<AgentName, string[]>;
|
|
4
|
+
/**
|
|
5
|
+
* Parse a list with wildcard and exclusion syntax.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseList(items: string[], allAvailable: string[]): string[];
|
|
8
|
+
/**
|
|
9
|
+
* Get the MCP list for an agent (from config or defaults).
|
|
10
|
+
*/
|
|
11
|
+
export declare function getAgentMcpList(agentName: string, config?: PluginConfig): string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const AGENT_ALIASES: Record<string, string>;
|
|
2
|
+
export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "fixer", "observer", "council", "councillor"];
|
|
3
|
+
export declare const ALL_AGENT_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "fixer", "observer", "council", "councillor"];
|
|
4
|
+
export type AgentName = (typeof ALL_AGENT_NAMES)[number];
|
|
5
|
+
/** Agents that cannot be disabled even if listed in disabled_agents config. */
|
|
6
|
+
export declare const PROTECTED_AGENTS: Set<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Default models for each agent.
|
|
9
|
+
* All set to undefined so agents follow the global/session model.
|
|
10
|
+
* Users can override per-agent via oh-my-opencode-slim.json agents.<name>.model.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_MODELS: Record<AgentName, string | undefined>;
|
|
13
|
+
export declare const POLL_INTERVAL_MS = 500;
|
|
14
|
+
export declare const POLL_INTERVAL_BACKGROUND_MS = 2000;
|
|
15
|
+
export declare const MAX_POLL_TIME_MS: number;
|
|
16
|
+
export declare const DEFAULT_MAX_SUBAGENT_DEPTH = 3;
|
|
17
|
+
export declare const PHASE_REMINDER_TEXT = "!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: 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!";
|
|
18
|
+
export declare function formatSystemReminder(text: string): string;
|
|
19
|
+
export declare const PHASE_REMINDER: string;
|
|
20
|
+
export declare const WRITABLE_FILE_OPERATIONS_RULES = "**File Operations Rules**:\n- Prefer dedicated file tools for normal code work: glob/grep/ast_grep_search for discovery, read for file contents, and edit/write/apply_patch for targeted source changes.\n- Use bash for execution and automation: git, package managers, tests, builds, scripts, diagnostics, and shell-native filesystem operations.\n- Shell is acceptable for bulk or mechanical filesystem changes when it is clearer or safer than many individual edits (for example: truncate generated logs, remove build artifacts, batch rename/move files), especially when the user explicitly asks for that shell operation.\n- Before destructive or broad shell operations, verify the target set and quote paths. Prefer a dry-run/listing first when practical.\n- Do not use cat/head/tail/sed/awk only to read code into context; use read/grep unless a shell pipeline is genuinely the better diagnostic.";
|
|
21
|
+
export declare const READONLY_FILE_OPERATIONS_RULES = "**File Operations Rules**:\n- READ-ONLY: inspect and report; do not modify files.\n- Prefer dedicated file tools for codebase inspection: glob/grep/ast_grep_search for discovery and read for file contents.\n- Bash is allowed for non-mutating diagnostics and shell-native inspection when it is the clearest tool, but not for modifying files.\n- Do not use cat/head/tail/sed/awk only to read code into context; use read/grep unless a shell pipeline is genuinely the better diagnostic.";
|
|
22
|
+
export declare const NO_SHELL_READONLY_FILE_OPERATIONS_RULES = "**File Operations Rules**:\n- READ-ONLY: inspect and report; do not modify files.\n- Use glob/grep/ast_grep_search for discovery and read for file contents.\n- Do not use bash or shell commands.";
|
|
23
|
+
export declare const TMUX_SPAWN_DELAY_MS = 500;
|
|
24
|
+
export declare const COUNCILLOR_STAGGER_MS = 250;
|
|
25
|
+
export declare const STABLE_POLLS_THRESHOLD = 3;
|
|
26
|
+
/** Agents that are disabled by default. Users must explicitly enable them
|
|
27
|
+
* by removing from disabled_agents and configuring an appropriate model. */
|
|
28
|
+
export declare const DEFAULT_DISABLED_AGENTS: string[];
|
|
29
|
+
export declare const DEFAULT_MAX_SESSIONS_PER_AGENT = 2;
|
|
30
|
+
export declare const DEFAULT_READ_CONTEXT_MIN_LINES = 10;
|
|
31
|
+
export declare const DEFAULT_READ_CONTEXT_MAX_FILES = 8;
|
|
32
|
+
export type ImageRouting = 'auto' | 'direct';
|
|
33
|
+
/**
|
|
34
|
+
* Used when image_routing is omitted, preserving legacy conditional Observer
|
|
35
|
+
* routing. Explicit "auto" is validated separately after config layers merge.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DEFAULT_IMAGE_ROUTING: ImageRouting;
|
|
38
|
+
export declare function resolveImageRouting(imageRouting: ImageRouting | undefined): ImageRouting;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type CouncillorModelEntry } from '../utils/councillor-models';
|
|
3
|
+
export type { CouncillorModelEntry };
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for a single councillor within a preset.
|
|
6
|
+
* Each councillor is an independent LLM that processes the same prompt.
|
|
7
|
+
*
|
|
8
|
+
* Councillors run as agent sessions with read-only codebase access
|
|
9
|
+
* (read, glob, grep, lsp, list). They can examine the codebase but
|
|
10
|
+
* cannot modify files or spawn subagents.
|
|
11
|
+
*
|
|
12
|
+
* `model` accepts a single ID or an ordered fallback chain. The parsed config
|
|
13
|
+
* exposes `models` (the normalized chain) plus `model` (the primary, for
|
|
14
|
+
* backward compatibility).
|
|
15
|
+
*/
|
|
16
|
+
export declare const CouncillorConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
17
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>]>>]>;
|
|
21
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
22
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
24
|
+
model: string;
|
|
25
|
+
variant: string | undefined;
|
|
26
|
+
prompt: string | undefined;
|
|
27
|
+
models: CouncillorModelEntry[];
|
|
28
|
+
}, {
|
|
29
|
+
model: string | (string | {
|
|
30
|
+
id: string;
|
|
31
|
+
variant?: string | undefined;
|
|
32
|
+
})[];
|
|
33
|
+
variant?: string | undefined;
|
|
34
|
+
prompt?: string | undefined;
|
|
35
|
+
}>>;
|
|
36
|
+
export type CouncillorConfig = z.infer<typeof CouncillorConfigSchema>;
|
|
37
|
+
/**
|
|
38
|
+
* A named preset grouping several councillors.
|
|
39
|
+
*
|
|
40
|
+
* All keys are treated as councillor names mapping to councillor configs.
|
|
41
|
+
* The reserved key `"master"` is silently ignored (legacy from when
|
|
42
|
+
* council-master was a separate agent).
|
|
43
|
+
*/
|
|
44
|
+
export declare const CouncilPresetSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodTransform<Record<string, {
|
|
45
|
+
model: string;
|
|
46
|
+
variant: string | undefined;
|
|
47
|
+
prompt: string | undefined;
|
|
48
|
+
models: CouncillorModelEntry[];
|
|
49
|
+
}>, Record<string, Record<string, unknown>>>>;
|
|
50
|
+
export type CouncilPreset = z.infer<typeof CouncilPresetSchema>;
|
|
51
|
+
/**
|
|
52
|
+
* Execution mode for councillors.
|
|
53
|
+
* - parallel: Run all councillors concurrently (default, fastest for multi-model systems)
|
|
54
|
+
* - serial: Run councillors one at a time (required for single-model systems to avoid conflicts)
|
|
55
|
+
*/
|
|
56
|
+
export declare const CouncillorExecutionModeSchema: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
parallel: "parallel";
|
|
58
|
+
serial: "serial";
|
|
59
|
+
}>>;
|
|
60
|
+
/**
|
|
61
|
+
* Top-level council configuration.
|
|
62
|
+
*
|
|
63
|
+
* Example JSONC:
|
|
64
|
+
* ```jsonc
|
|
65
|
+
* {
|
|
66
|
+
* "council": {
|
|
67
|
+
* "presets": {
|
|
68
|
+
* "default": {
|
|
69
|
+
* "alpha": { "model": "openai/gpt-5.6-luna" },
|
|
70
|
+
* "beta": { "model": "openai/gpt-5.3-codex" },
|
|
71
|
+
* "gamma": { "model": "google/gemini-3-pro" }
|
|
72
|
+
* }
|
|
73
|
+
* },
|
|
74
|
+
* "timeout": 180000,
|
|
75
|
+
* "councillor_execution_mode": "serial"
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare const CouncilConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
81
|
+
presets: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodTransform<Record<string, {
|
|
82
|
+
model: string;
|
|
83
|
+
variant: string | undefined;
|
|
84
|
+
prompt: string | undefined;
|
|
85
|
+
models: CouncillorModelEntry[];
|
|
86
|
+
}>, Record<string, Record<string, unknown>>>>>;
|
|
87
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
88
|
+
default_preset: z.ZodDefault<z.ZodString>;
|
|
89
|
+
councillor_execution_mode: z.ZodDefault<z.ZodEnum<{
|
|
90
|
+
parallel: "parallel";
|
|
91
|
+
serial: "serial";
|
|
92
|
+
}>>;
|
|
93
|
+
councillor_retries: z.ZodDefault<z.ZodNumber>;
|
|
94
|
+
master: z.ZodOptional<z.ZodUnknown>;
|
|
95
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
96
|
+
presets: Record<string, Record<string, {
|
|
97
|
+
model: string;
|
|
98
|
+
variant: string | undefined;
|
|
99
|
+
prompt: string | undefined;
|
|
100
|
+
models: CouncillorModelEntry[];
|
|
101
|
+
}>>;
|
|
102
|
+
timeout: number;
|
|
103
|
+
default_preset: string;
|
|
104
|
+
councillor_execution_mode: "parallel" | "serial";
|
|
105
|
+
councillor_retries: number;
|
|
106
|
+
_deprecated: string[] | undefined;
|
|
107
|
+
_legacyMasterModel: string | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
presets: Record<string, Record<string, {
|
|
110
|
+
model: string;
|
|
111
|
+
variant: string | undefined;
|
|
112
|
+
prompt: string | undefined;
|
|
113
|
+
models: CouncillorModelEntry[];
|
|
114
|
+
}>>;
|
|
115
|
+
timeout: number;
|
|
116
|
+
default_preset: string;
|
|
117
|
+
councillor_execution_mode: "parallel" | "serial";
|
|
118
|
+
councillor_retries: number;
|
|
119
|
+
master?: unknown;
|
|
120
|
+
}>>;
|
|
121
|
+
export type CouncilConfig = z.infer<typeof CouncilConfigSchema>;
|
|
122
|
+
export type CouncillorExecutionMode = z.infer<typeof CouncillorExecutionModeSchema>;
|
|
123
|
+
/**
|
|
124
|
+
* Result of a council session.
|
|
125
|
+
*/
|
|
126
|
+
export interface CouncilResult {
|
|
127
|
+
success: boolean;
|
|
128
|
+
result?: string;
|
|
129
|
+
error?: string;
|
|
130
|
+
councillorResults: Array<{
|
|
131
|
+
name: string;
|
|
132
|
+
model: string;
|
|
133
|
+
status: 'completed' | 'failed' | 'timed_out';
|
|
134
|
+
result?: string;
|
|
135
|
+
error?: string;
|
|
136
|
+
}>;
|
|
137
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type PluginConfig } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* Warning kinds produced during config loading.
|
|
4
|
+
*/
|
|
5
|
+
export type ConfigLoadWarningKind = 'invalid-json' | 'invalid-schema' | 'read-error' | 'missing-preset';
|
|
6
|
+
/**
|
|
7
|
+
* A warning emitted while loading plugin configuration.
|
|
8
|
+
*/
|
|
9
|
+
export interface ConfigLoadWarning {
|
|
10
|
+
path: string;
|
|
11
|
+
kind: ConfigLoadWarningKind;
|
|
12
|
+
message: string;
|
|
13
|
+
formatted?: unknown;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Options for loadPluginConfig.
|
|
17
|
+
*/
|
|
18
|
+
export interface LoadPluginConfigOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Called with a warning whenever config loading produces a non-fatal issue.
|
|
21
|
+
* The loader still falls back to defaults and continues normally.
|
|
22
|
+
*/
|
|
23
|
+
onWarning?: (warning: ConfigLoadWarning) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Suppress console warnings while still invoking onWarning.
|
|
26
|
+
*/
|
|
27
|
+
silent?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Find plugin config paths (user and project) for a given directory.
|
|
31
|
+
* User config uses getConfigSearchDirs() for lookup.
|
|
32
|
+
* Project config uses <directory>/.opencode/oh-my-opencode-slim.
|
|
33
|
+
*
|
|
34
|
+
* @param directory - Project directory to search for .opencode config
|
|
35
|
+
* @returns Object with userConfigPath and projectConfigPath (null if not found)
|
|
36
|
+
*/
|
|
37
|
+
export declare function findPluginConfigPaths(directory: string): {
|
|
38
|
+
userConfigPath: string | null;
|
|
39
|
+
projectConfigPath: string | null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Merge two plugin configs using the loader's merge rules.
|
|
43
|
+
* Project/override takes precedence over base.
|
|
44
|
+
*/
|
|
45
|
+
export declare function mergePluginConfigs(base: PluginConfig, override: PluginConfig): PluginConfig;
|
|
46
|
+
/**
|
|
47
|
+
* Recursively merge two objects, with override values taking precedence.
|
|
48
|
+
* For nested objects, merges recursively. For arrays and primitives, override replaces base.
|
|
49
|
+
*
|
|
50
|
+
* @param base - Base object to merge into
|
|
51
|
+
* @param override - Override object whose values take precedence
|
|
52
|
+
* @returns Merged object, or undefined if both inputs are undefined
|
|
53
|
+
*/
|
|
54
|
+
export declare function deepMerge<T extends Record<string, unknown>>(base?: T, override?: T): T | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Load plugin configuration from user and project config files, merging them appropriately.
|
|
57
|
+
*
|
|
58
|
+
* Configuration is loaded from two locations:
|
|
59
|
+
* 1. User config: $OPENCODE_CONFIG_DIR/oh-my-opencode-slim.jsonc or .json,
|
|
60
|
+
* or ~/.config/opencode/oh-my-opencode-slim.jsonc or .json (or $XDG_CONFIG_HOME)
|
|
61
|
+
* 2. Project config: <directory>/.opencode/oh-my-opencode-slim.jsonc or .json
|
|
62
|
+
*
|
|
63
|
+
* JSONC format is preferred over JSON (allows comments and trailing commas).
|
|
64
|
+
* Project config takes precedence over user config. Nested objects (agents, tmux) are
|
|
65
|
+
* deep-merged, while top-level arrays are replaced entirely by project config.
|
|
66
|
+
*
|
|
67
|
+
* @param directory - Project directory to search for .opencode config
|
|
68
|
+
* @param options - Optional load options including onWarning callback
|
|
69
|
+
* @returns Merged plugin configuration (empty object if no configs found)
|
|
70
|
+
*/
|
|
71
|
+
export declare function loadPluginConfig(directory: string, options?: LoadPluginConfigOptions): PluginConfig;
|
|
72
|
+
/**
|
|
73
|
+
* Load custom prompt for an agent from the prompts directory.
|
|
74
|
+
* Checks for {agent}.md (replaces default) and {agent}_append.md (appends to default).
|
|
75
|
+
* If preset is provided and safe for paths, it first checks {preset}/ subdirectory,
|
|
76
|
+
* then falls back to the root prompts directory.
|
|
77
|
+
*
|
|
78
|
+
* @param agentName - Name of the agent (e.g., "orchestrator", "explorer")
|
|
79
|
+
* @param optionsOrPreset - Optional preset name or options configuration
|
|
80
|
+
* @returns Object with prompt and/or appendPrompt if files exist
|
|
81
|
+
*/
|
|
82
|
+
export declare function loadAgentPrompt(agentName: string, optionsOrPreset?: string | {
|
|
83
|
+
preset?: string;
|
|
84
|
+
projectDirectory?: string;
|
|
85
|
+
}): {
|
|
86
|
+
prompt?: string;
|
|
87
|
+
appendPrompt?: string;
|
|
88
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module-level runtime preset state.
|
|
3
|
+
*
|
|
4
|
+
* Survives plugin re-inits triggered by client.config.update() →
|
|
5
|
+
* Instance.dispose(). The plugin function re-runs but this module-level
|
|
6
|
+
* variable persists within the same Node.js process.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setActiveRuntimePreset(name: string | null): void;
|
|
9
|
+
export declare function getActiveRuntimePreset(): string | null;
|
|
10
|
+
export declare function getPreviousRuntimePreset(): string | null;
|
|
11
|
+
export declare function setActiveRuntimePresetWithPrevious(name: string | null): void;
|