diff --git a/packages/core/src/plugin/skill/customize-opencode.md b/packages/core/src/plugin/skill/customize-opencode.md index 5b51f8f2ab7..99b112d9a55 100644 --- a/packages/core/src/plugin/skill/customize-opencode.md +++ b/packages/core/src/plugin/skill/customize-opencode.md @@ -303,7 +303,7 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`, "type": "remote", "url": "https://...", "enabled": true, - "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" } + "headers": { "Authorization": "Bearer {env:GITHUB_TOKEN}" } }, "old-server": { "enabled": false } } @@ -311,7 +311,9 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`, ``` `command` is an array of strings. `type` is required. Use `enabled: false` to -disable a server inherited from a parent config. +disable a server inherited from a parent config. String values such as header +tokens support `{env:VAR}` interpolation (and `{file:path}`); the shell-style +`${VAR}` is not substituted. ## Permissions diff --git a/packages/opencode/src/tool/task.ts b/packages/opencode/src/tool/task.ts index 1ac9d4d9ad8..5ca1666add7 100644 --- a/packages/opencode/src/tool/task.ts +++ b/packages/opencode/src/tool/task.ts @@ -30,13 +30,13 @@ const BACKGROUND_DESCRIPTION = [ ].join(" ") const BACKGROUND_STARTED = [ "The task is working in the background. You will be notified automatically when it finishes.", - "Do not poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", + "DO NOT sleep, poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", "Work on non-overlapping tasks, or briefly tell the user what you launched and end your response.", ].join("\n") const BACKGROUND_UPDATED = [ "Additional context sent to the running background task.", "The task is still working in the background. You will be notified automatically when it finishes.", - "Do not poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", + "DO NOT sleep, poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", "Work on non-overlapping tasks, or briefly tell the user what you sent and end your response.", ].join("\n") @@ -56,7 +56,8 @@ const BaseParameters = Schema.Struct(BaseParameterFields) export const Parameters = Schema.Struct({ ...BaseParameterFields, background: Schema.optional(Schema.Boolean).annotate({ - description: "Run the agent in the background. You will be notified when it completes.", + description: + "Run the agent in the background. You will be notified when it completes. DO NOT sleep, poll, or proactively check on its progress", }), }) diff --git a/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap b/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap index 0bf2357eff8..b187b191c1f 100644 --- a/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap +++ b/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap @@ -320,7 +320,7 @@ exports[`tool parameters JSON Schema (wire shape) task 1`] = ` "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "background": { - "description": "Run the agent in the background. You will be notified when it completes.", + "description": "Run the agent in the background. You will be notified when it completes. DO NOT sleep, poll, or proactively check on its progress", "type": "boolean", }, "command": {