The open source coding agent.
TypeScript
core: reorganize agent configuration to separate primary agents (build, plan) from subagents
Dax Raadb0f77da56c02
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 3120a02f352..4e35af4e28e 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -102,7 +102,7 @@ jobs:target: aarch64-apple-darwin- host: blacksmith-4vcpu-windows-2025target: x86_64-pc-windows-msvc- - host: blacksmith-4vcpu-ubuntu-2404+ - host: blacksmith-4vcpu-ubuntu-2204target: x86_64-unknown-linux-gnuruns-on: ${{ matrix.settings.host }}steps:diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.tsindex ef007df136a..a2ff825d914 100644--- a/packages/opencode/src/agent/agent.ts+++ b/packages/opencode/src/agent/agent.ts@@ -107,6 +107,24 @@ export namespace Agent {)const result: Record<string, Info> = {+ build: {+ name: "build",+ tools: { ...defaultTools },+ options: {},+ permission: agentPermission,+ mode: "primary",+ native: true,+ },+ plan: {+ name: "plan",+ options: {},+ permission: planPermission,+ tools: {+ ...defaultTools,+ },+ mode: "primary",+ native: true,+ },general: {name: "general",description: `General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.`,@@ -149,14 +167,6 @@ export namespace Agent {options: {},permission: agentPermission,},- build: {- name: "build",- tools: { ...defaultTools },- options: {},- permission: agentPermission,- mode: "primary",- native: true,- },title: {name: "title",mode: "primary",@@ -177,16 +187,6 @@ export namespace Agent {prompt: PROMPT_SUMMARY,tools: {},},- plan: {- name: "plan",- options: {},- permission: planPermission,- tools: {- ...defaultTools,- },- mode: "primary",- native: true,- },}for (const [key, value] of Object.entries(cfg.agent ?? {})) {if (value.disable) {diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.tsindex 333e1984846..d0fb12c58af 100644--- a/packages/opencode/src/config/config.ts+++ b/packages/opencode/src/config/config.ts@@ -668,10 +668,16 @@ export namespace Config {.describe("@deprecated Use `agent` field instead."),agent: z.object({+ // primaryplan: Agent.optional(),build: Agent.optional(),+ // subagentgeneral: Agent.optional(),explore: Agent.optional(),+ // specialized+ title: Agent.optional(),+ summary: Agent.optional(),+ compaction: Agent.optional(),}).catchall(Agent).optional()