@kodrunhq/opencode-autopilot 1.15.0 → 1.15.1
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/package.json +1 -1
- package/src/agents/index.ts +22 -10
- package/src/agents/researcher.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodrunhq/opencode-autopilot",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "Curated agents, skills, and commands for the OpenCode AI coding CLI — autonomous orchestrator, multi-agent code review, model fallback, and in-session asset creation tools.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"keywords": [
|
package/src/agents/index.ts
CHANGED
|
@@ -71,6 +71,22 @@ function registerAgents(
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
function suppressBuiltInVariants(
|
|
75
|
+
variants: readonly string[],
|
|
76
|
+
builtInKeys: ReadonlySet<string>,
|
|
77
|
+
config: Config,
|
|
78
|
+
): void {
|
|
79
|
+
if (!config.agent) return;
|
|
80
|
+
for (const variant of variants) {
|
|
81
|
+
if (builtInKeys.has(variant) && config.agent[variant] !== undefined) {
|
|
82
|
+
config.agent[variant] = {
|
|
83
|
+
...config.agent[variant],
|
|
84
|
+
disable: true,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
74
90
|
export async function configHook(config: Config, configPath?: string): Promise<void> {
|
|
75
91
|
if (!config.agent) {
|
|
76
92
|
config.agent = {};
|
|
@@ -90,24 +106,20 @@ export async function configHook(config: Config, configPath?: string): Promise<v
|
|
|
90
106
|
const overrides: Readonly<Record<string, AgentOverride>> = pluginConfig?.overrides ?? {};
|
|
91
107
|
|
|
92
108
|
// Snapshot built-in agent keys BEFORE we register ours — we only suppress
|
|
93
|
-
// built-in Plan variants,
|
|
109
|
+
// built-in Plan/Build variants, never our custom planner/coder agents.
|
|
94
110
|
const builtInKeys = new Set(Object.keys(config.agent));
|
|
95
111
|
|
|
96
112
|
// Register standard agents and pipeline agents (v2 orchestrator subagents)
|
|
97
113
|
registerAgents(agents, config, groups, overrides);
|
|
98
114
|
registerAgents(pipelineAgents, config, groups, overrides);
|
|
99
115
|
|
|
100
|
-
// Suppress built-in Plan
|
|
116
|
+
// Suppress built-in Plan/Build agents — planner/coder replace them.
|
|
101
117
|
// Only disable keys that existed before our registration (built-ins).
|
|
102
118
|
const planVariants = ["Plan", "plan", "Planner", "planner"] as const;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
disable: true,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}
|
|
119
|
+
suppressBuiltInVariants(planVariants, builtInKeys, config);
|
|
120
|
+
|
|
121
|
+
const buildVariants = ["Build", "build", "Builder", "builder"] as const;
|
|
122
|
+
suppressBuiltInVariants(buildVariants, builtInKeys, config);
|
|
111
123
|
}
|
|
112
124
|
|
|
113
125
|
export { autopilotAgent } from "./autopilot";
|
package/src/agents/researcher.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { AgentConfig } from "@opencode-ai/sdk";
|
|
|
2
2
|
|
|
3
3
|
export const researcherAgent: Readonly<AgentConfig> = Object.freeze({
|
|
4
4
|
description: "Searches the web about a topic and produces a comprehensive report with sources",
|
|
5
|
-
mode: "
|
|
5
|
+
mode: "all",
|
|
6
6
|
prompt: `You are a research specialist. Your job is to thoroughly investigate a given topic and produce a clear, well-organized report.
|
|
7
7
|
|
|
8
8
|
## Instructions
|