@mazac-fox/opencode-fleet-contractsCanonical ID, telemetry, artifact, and health contracts shared across the OpenCode plugin fleet. Consumed directly by CLIs/daemons; re-exported from @mazac-fox/opencode-host-adapter for plugin authors.
0
11
6 in 7 days
22.0
Multi-signal model
3 months ago
2026-05-21
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@mazac-fox/opencode-fleet-contracts@0.1.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@mazac-fox/opencode-fleet-contracts@0.1.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @mazac-fox/opencode-fleet-contractsopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Canonical contracts for the OpenCode plugin fleet: branded IDs, FleetContext, telemetry envelopes, artifact references, and HealthReport. Hand-written validators; runtime dep ulid only.
Modules
| Export | Purpose |
|---|---|
ids |
Branded ID types, new* / parse* (and legacy parsers where applicable) |
context |
FleetContext, decodeFleetContext, merge helpers |
telemetry |
FleetTelemetryEnvelope, validateTelemetryEnvelope, makeEnvelope |
artifacts |
ArtifactKind, ArtifactRef, parsers |
health |
HealthReport, validate/normalize helpers |
Plugins often consume this via @mazac-fox/opencode-host-adapter to avoid duplicate package instances.
Quick start
bun add @mazac-fox/opencode-fleet-contracts
import { newCorrelationId, validateHealthReport } from "@mazac-fox/opencode-fleet-contracts";
Rules: no as on unknown, use parsers; additive schema changes only unless schema_version migration is approved. AGENTS.md.
Development
bun install
bun run check
Fleet stack (context)
| Piece | Role |
|---|---|
| This package | Shared IDs and envelopes |
| opencode-host-adapter | wrapPlugin, telemetry emit, contract tests |
| opencode-fleet | Install, doctor, test, generate config |
| Plugins | Conductor, Engram, Concord, Codemem |
License
MIT