Skip to content

Commit 161b388

Browse files
docs(plugins): align package.json peers with @opencode/plugin
Fixes anomalyco#58807 The publish example's peer ranges were below what @opencode/plugin requires, so following the docs could fail npm resolution. Use the ranges the package declares. The optional @opencode/theme peer is left out: an exact pin would break the example again on the next release, and only plugins that import the package need it. Also note that the TUI entry can be tui.ts or tui.tsx, and that a configured directory without a root index or server module is skipped without a warning.
1 parent f20760b commit 161b388

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎services/www/src/docs/content/build/plugins/cli.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default Plugin.define({
1616
```
1717

1818
Import `@opencode/plugin/tui` directly. OpenCode resolves this import at runtime, so local CLI plugins do not need an
19-
absolute path to an OpenCode checkout.
19+
absolute path to an OpenCode checkout. The TUI entry can be named `tui.ts` or `tui.tsx`.
2020

2121
## Context
2222

@@ -643,8 +643,8 @@ Expose the CLI plugin through `./tui`; add OpenTUI peers when the plugin renders
643643
"@opencode/plugin": "latest"
644644
},
645645
"peerDependencies": {
646-
"@opentui/core": ">=0.6.6",
647-
"@opentui/solid": ">=0.6.6",
646+
"@opentui/core": ">=0.6.8",
647+
"@opentui/solid": ">=0.6.8",
648648
"solid-js": ">=1.9.0"
649649
}
650650
}

‎services/www/src/docs/content/plugins.mdx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Add published packages, versioned packages, scoped packages, or local plugin dir
3131
Relative paths resolve from the config file containing the entry.
3232

3333
Configured local paths must be directories. OpenCode loads the directory's `server` or `index` module, such as
34-
`index.ts`. A path to a single file is skipped.
34+
`index.ts`. A path to a single file is skipped. A directory without a root `index` or `server` module is skipped
35+
without a warning.
3536

3637
Plugin arrays from applicable config files are applied from lowest to highest precedence instead of replacing one another.
3738

0 commit comments

Comments
 (0)