From ce16b7cc12eca796e5072f141a3890d4f0bb6e55 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Mon, 24 Aug 2026 18:28:07 -0400 Subject: [PATCH] docs: simplify plugin guide routes --- packages/core/src/plugin/skill/opencode.md | 6 ++--- packages/www/openapi.json | 24 ++++++++++++++++--- packages/www/public/openapi.json | 24 ++++++++++++++++--- packages/www/src/docs/content/build/index.mdx | 2 +- .../src/docs/content/build/plugins/cli.mdx | 2 +- .../build/plugins/{overview.mdx => index.mdx} | 0 packages/www/src/docs/content/build/sdk.mdx | 2 +- packages/www/src/docs/content/cli/plugins.mdx | 2 +- packages/www/src/docs/content/migrate-v1.mdx | 2 +- packages/www/src/docs/content/plugins.mdx | 2 +- packages/www/src/docs/lib/navigation.ts | 2 +- 11 files changed, 52 insertions(+), 16 deletions(-) rename packages/www/src/docs/content/build/plugins/{overview.mdx => index.mdx} (100%) diff --git a/packages/core/src/plugin/skill/opencode.md b/packages/core/src/plugin/skill/opencode.md index 024258fd2c8..6d23feb5f01 100644 --- a/packages/core/src/plugin/skill/opencode.md +++ b/packages/core/src/plugin/skill/opencode.md @@ -138,14 +138,14 @@ V2 config uses more ergonomic shapes, but conversion is optional. When the user requests conversion, inspect the complete configuration, preserve behavior and unrelated settings, and apply only the relevant migrations from the guide. For plugin migrations, fetch and follow both the migration guide and the full -[plugins guide](https://opencode.ai/v2/docs/build/plugins/overview). If non-API V1 +[plugins guide](https://opencode.ai/v2/docs/build/plugins). If non-API V1 functionality fails in V2, use the `report` skill to file it as a compatibility bug. -## [Plugins](https://opencode.ai/v2/docs/build/plugins/overview) +## [Plugins](https://opencode.ai/v2/docs/build/plugins) For questions about creating, configuring, loading, publishing, or migrating -plugins, fetch the full [plugins guide](https://opencode.ai/v2/docs/build/plugins/overview) +plugins, fetch the full [plugins guide](https://opencode.ai/v2/docs/build/plugins) before answering. Refer to this guide when the user wants to build a plugin. It covers hooks, transforms, tools, plugin context capabilities, and package entrypoints. Plugins can also extend the TUI; for those, fetch the diff --git a/packages/www/openapi.json b/packages/www/openapi.json index 6a2f34241fd..faaeb1a9bca 100644 --- a/packages/www/openapi.json +++ b/packages/www/openapi.json @@ -3753,8 +3753,15 @@ ], "security": [], "responses": { - "204": { - "description": "" + "200": { + "description": "SessionInterruptResponse", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionInterruptResponse" + } + } + } }, "400": { "description": "InvalidRequestError", @@ -3794,7 +3801,7 @@ } } }, - "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.", + "description": "Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.", "summary": "Interrupt session execution" } }, @@ -16432,6 +16439,17 @@ "required": ["data"], "additionalProperties": false }, + "SessionInterruptResponse": { + "type": "object", + "properties": { + "interrupted": { + "type": "boolean", + "description": "Whether an active execution owned by this OpenCode process was interrupted." + } + }, + "required": ["interrupted"], + "additionalProperties": false + }, "SessionLogItemEncoded": { "type": "string", "contentMediaType": "application/json" diff --git a/packages/www/public/openapi.json b/packages/www/public/openapi.json index 6a2f34241fd..faaeb1a9bca 100644 --- a/packages/www/public/openapi.json +++ b/packages/www/public/openapi.json @@ -3753,8 +3753,15 @@ ], "security": [], "responses": { - "204": { - "description": "" + "200": { + "description": "SessionInterruptResponse", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionInterruptResponse" + } + } + } }, "400": { "description": "InvalidRequestError", @@ -3794,7 +3801,7 @@ } } }, - "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.", + "description": "Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.", "summary": "Interrupt session execution" } }, @@ -16432,6 +16439,17 @@ "required": ["data"], "additionalProperties": false }, + "SessionInterruptResponse": { + "type": "object", + "properties": { + "interrupted": { + "type": "boolean", + "description": "Whether an active execution owned by this OpenCode process was interrupted." + } + }, + "required": ["interrupted"], + "additionalProperties": false + }, "SessionLogItemEncoded": { "type": "string", "contentMediaType": "application/json" diff --git a/packages/www/src/docs/content/build/index.mdx b/packages/www/src/docs/content/build/index.mdx index 2df5d6c933c..4dc9b818db7 100644 --- a/packages/www/src/docs/content/build/index.mdx +++ b/packages/www/src/docs/content/build/index.mdx @@ -3,7 +3,7 @@ title: "Intro" --- - + Build plugins that add tools, integrations, commands, agents, and custom behavior while keeping the rest of OpenCode intact. diff --git a/packages/www/src/docs/content/build/plugins/cli.mdx b/packages/www/src/docs/content/build/plugins/cli.mdx index f148e95dde3..58414b978ec 100644 --- a/packages/www/src/docs/content/build/plugins/cli.mdx +++ b/packages/www/src/docs/content/build/plugins/cli.mdx @@ -433,7 +433,7 @@ Expose the CLI plugin through `./tui`; add OpenTUI peers when the plugin renders } ``` -Set `tui: true` on the [main plugin](/build/plugins/overview) for automatic loading. +Set `tui: true` on the [main plugin](/build/plugins) for automatic loading. ```ts title="src/index.ts" import { Plugin } from "@opencode-ai/plugin" diff --git a/packages/www/src/docs/content/build/plugins/overview.mdx b/packages/www/src/docs/content/build/plugins/index.mdx similarity index 100% rename from packages/www/src/docs/content/build/plugins/overview.mdx rename to packages/www/src/docs/content/build/plugins/index.mdx diff --git a/packages/www/src/docs/content/build/sdk.mdx b/packages/www/src/docs/content/build/sdk.mdx index 8c02b6e6d2a..8d4f605057b 100644 --- a/packages/www/src/docs/content/build/sdk.mdx +++ b/packages/www/src/docs/content/build/sdk.mdx @@ -70,7 +70,7 @@ await using opencode = await OpenCode.create({ plugins: [plugin] }) Call `await opencode.plugin(plugin)` to register another plugin after startup. -See the [Plugins guide](/build/plugins/overview) for the plugin context and available +See the [Plugins guide](/build/plugins) for the plugin context and available hooks. ## Workerd diff --git a/packages/www/src/docs/content/cli/plugins.mdx b/packages/www/src/docs/content/cli/plugins.mdx index 2a7f165db21..77268877c1f 100644 --- a/packages/www/src/docs/content/cli/plugins.mdx +++ b/packages/www/src/docs/content/cli/plugins.mdx @@ -3,7 +3,7 @@ title: "Plugins" --- Plugins configured in `opencode.json(c)` that expose a TUI component are loaded automatically by the CLI. To learn how -to build plugins, see [Building plugins](/build/plugins/overview). You do not need to add the same package to `cli.json`. The CLI +to build plugins, see [Building plugins](/build/plugins). You do not need to add the same package to `cli.json`. The CLI gets the active plugin list from the connected OpenCode server, so this also works when the server is remote. Use `cli.json` for CLI-only plugins. These plugins run locally in the terminal and remain active when the CLI connects diff --git a/packages/www/src/docs/content/migrate-v1.mdx b/packages/www/src/docs/content/migrate-v1.mdx index 3ebfe9d7c51..7c98a732774 100644 --- a/packages/www/src/docs/content/migrate-v1.mdx +++ b/packages/www/src/docs/content/migrate-v1.mdx @@ -544,7 +544,7 @@ plugin API is still being finalized during beta, and detailed plugin migration g ready. Once the V2 plugin API is finalized, OpenCode should be able to migrate the majority of V1 plugins while keeping related -local modules and dependencies together. See the current beta [Plugins guide](/build/plugins/overview). +local modules and dependencies together. See the current beta [Plugins guide](/build/plugins). ## Server API and clients diff --git a/packages/www/src/docs/content/plugins.mdx b/packages/www/src/docs/content/plugins.mdx index 76c5d7e8692..f4ebd723cde 100644 --- a/packages/www/src/docs/content/plugins.mdx +++ b/packages/www/src/docs/content/plugins.mdx @@ -102,6 +102,6 @@ CLI-only plugins are configured separately and remain active when connected to a } ``` - + Create plugins that add tools, hooks, integrations, commands, agents, and other behavior. diff --git a/packages/www/src/docs/lib/navigation.ts b/packages/www/src/docs/lib/navigation.ts index 669402b34f6..2c5587c4ee8 100644 --- a/packages/www/src/docs/lib/navigation.ts +++ b/packages/www/src/docs/lib/navigation.ts @@ -93,7 +93,7 @@ export const docsSections: DocsSection[] = [ { title: "Plugins", items: [ - { title: "Overview", slug: "build/plugins/overview" }, + { title: "Overview", slug: "build/plugins" }, { title: "Effect", slug: "build/plugins/effect" }, { title: "CLI", slug: "build/plugins/cli" }, ],