Skip to content

Adapters

Weave uses an adapter layer to translate normalized .weave configuration into harness-specific plugins, tools, and configuration. The engine owns config loading, prompt composition, and normalized descriptors. Adapters own everything harness-specific: model discovery, tool-name mapping, hook registration, and feature-gap emulation.

Available Adapters

PackageHarnessStatus
@weaveio/weave-adapter-opencodeOpenCodeFirst-slice materialization, available now
@weaveio/weave-adapter-claude-codeClaude CodeMaterialization and file adapter, in progress
@weaveio/weave-adapter-piPiPlanned, not yet released

OpenCode Adapter

@weaveio/weave-adapter-opencode is a real first-slice materialization path for OpenCode. It is an OpenCode plugin: install it by adding the package to the plugin array in opencode.json.

jsonc
// opencode.json
{
  "plugin": ["@weaveio/weave-adapter-opencode/plugin"]
}

Use the @weaveio/weave-adapter-opencode/plugin subpath export, not the bare package name. The bare entry exports non-function values that cause OpenCode's plugin loader to throw a TypeError.

After adding the plugin entry, restart OpenCode. The plugin loads .weave/config.weave, translates all declared agents, and returns hooks immediately without blocking on SDK calls.

What is implemented (first slice)

CapabilityStatus
Agent materialisation via list → reconcile → create/update flowAvailable
Model resolution with fail-fastAvailable
Harness-injected skill forwardingAvailable
Collision protection for same-named foreign agentsAvailable
config hook for opencode debug config visibilityAvailable
event hook for deferred SDK reconciliationAvailable
BunFilesystemPlanStateProvider for plan-oriented completionAvailable

Current limitations (first slice)

The following are out of scope for the first slice and will be addressed in future releases:

  • Prune/delete reconciliation: Weave-managed agents that are removed from config are not automatically deleted. Removal requires explicit action.
  • Full workflow lifecycle integration: run-workflow is a thin helper. Full in-harness workflow lifecycle (pause, resume, status display) is a separate workstream.
  • Harness-owned skill file loading: The adapter forwards the harness-provided skill list but does not load skill file content. Content loading is harness-owned.

Claude Code Adapter

@weaveio/weave-adapter-claude-code provides materialization and file-based adapter support for Claude Code. This adapter is in active development. Specific capabilities and limitations will be documented here as they stabilise.

Pi Adapter

@weaveio/weave-adapter-pi is planned for a future release. No production support exists yet.

Adapter Boundary

The engine and adapters have a clear boundary:

Engine owns:

  • .weave config loading and parsing
  • Normalized agent, category, and workflow descriptors
  • Prompt composition (Mustache rendering)
  • Skill matching and filtering
  • Model intent helpers

Adapters own:

  • Harness resource discovery
  • Available-model and selected-model lookup
  • Skill file discovery and loading
  • Concrete hook registration
  • Concrete tool names and permission models
  • Feature-gap emulation

See the vNext adapter boundary documentation for the full rules.

Not Supported in Any Adapter (as of this release)

The following capabilities are not available in any released adapter:

  • Pi / Hermes production support
  • Full legacy command lifecycle parity
  • Skill MCP mounting
  • Full health, metrics, and token reporting
  • Fleet API support

Released under the MIT License.