openclaw/docs/plugins/reference/opencode.md
Vincent Koc 633b84f222
docs(plugins): mark generated reference pages and fix their shared template (#140254)
* docs(plugins): mark generated reference pages and fix their shared template

Two generator files change; the other 153 files are their regenerated
output from `pnpm plugins:inventory:gen`.

- Emit a "generated, do not edit" banner naming the regeneration command
  and the manual-block markers. None of the 151 reference pages said they
  were generated, so a contributor edit was silently overwritten.
- Give generated reference titles a `reference` suffix. Eight of them
  collided with a hand-written guide title (beam, geolocation,
  google-meet, logbook, teams-meetings, webhooks, workboard,
  zoom-meetings). Duplicate frontmatter titles across docs/ now total 0.
- Render the surface list as a list instead of a semicolon-joined
  sentence, and use plain conjunctions for install routes. Strict STE
  hard violations across docs/plugins/reference/ drop from 178 to 20.
- Drop the body H1, which duplicated the frontmatter title Mintlify
  already renders.
- Fix a generator bug found while testing: the marker-less fallback in
  `extractManualReferenceSections` matched only the first line under
  `## Surface`, so a second `--write` run captured later bullets into a
  fabricated manual block. `--write` is now idempotent and `--check`
  passes across repeated runs.

All 12 hand-written manual blocks are preserved.

* test(scripts): follow resolvePluginSurface to its list contract

resolvePluginSurface now returns one string per surface item instead of
a semicolon-joined sentence, so the generator can render a list. The
four assertions move from toBe(<joined string>) to toEqual(<array>) and
pick up the capitalised labels.

The "generic fallback" case changes meaning rather than disappearing.
The empty manifest now yields [], and renderSurface() prints "This
plugin declares no channels, providers, commands, or contracts." for an
empty list, which tells a reader more than the old "plugin". The test
is renamed to say what it now checks, with a comment pointing at the
new home of the fallback.

No generated page has an empty Surface section, so no page changes
because of this.
2026-09-07 03:14:31 +08:00

1.8 KiB

summary read_when title
Adds OpenCode model provider support to OpenClaw.
You are installing, configuring, or auditing the opencode plugin
OpenCode plugin reference

Adds OpenCode model provider support to OpenClaw.

Distribution

  • Package: @openclaw/opencode-provider
  • Install route: npm or ClawHub: clawhub:@openclaw/opencode-provider

Surface

  • Providers: opencode
  • Contracts: mediaUnderstandingProviders

Native sessions

OpenClaw auto-detects the opencode CLI on the Gateway and paired nodes. Stored sessions then appear in the OpenCode sessions-sidebar group, with transcript browsing through the official opencode --pure db ... --format json and opencode --pure export commands. Local rows also offer Continue, which creates an OpenClaw session whose first turn resumes the native OpenCode session through ACP. OpenCode retains the full server-side model context, and the catalog viewer continues to show that history. OpenClaw also imports the recent native history into the adopted session transcript. Very long transcripts import only their most recent 200 items using a 512 KiB serialized-item budget. Paired-node rows remain view-only.

The restricted environment and --pure mode prevent catalog browsing from loading project plugins or inheriting unrelated Gateway credentials.

Turn OpenCode Session Catalog off under Config > Plugins > OpenCode to disable discovery. It is enabled by default.