Skip to content

jackmazac/opencode-fleet

Repository files navigation

OpenCode Fleet

Distribution and diagnostics for a local OpenCode plugin fleet: manifest, install / update, generate-opencode-json, doctor, test, hygiene, telemetry/policy helpers, and persisted run reports. No plugin product logic.

What it does

  • Reads fleet.jsonc (schema_version: 1); see schemas/fleet.schema.json.
  • Regenerates config plugin arrays while preserving user sections of opencode.json.
  • Tracks drift in .opencode-fleet.lock.json.
  • Validates runtime tool/hook contracts via host-adapter runPluginContractTests.

Every command gets a fleet_run_id (ULID) and best-effort report under ~/.local/share/opencode/fleet/reports/.

Commands (overview)

opencode-fleet install | update | generate-opencode-json | doctor | status | test | hygiene | telemetry | policy

Use --json for machine-readable output. Details and flag matrix: AGENTS.md.

Quick start

bun install
bun run check
bun run smoke

Example manifests:

  • Maintainers (local checkouts): examples/fleet.local.jsoncsource.kind: "file" and ~/Developer/... (portable tilde paths).
  • Consumers (npm registry): examples/fleet.npm.jsoncsource.kind: "package" and semver version; plugin_ref targets file://~/.config/opencode/node_modules/... (must match opencode_config.root).

Registry workflow:

bun run ./src/cli.ts install --manifest ./examples/fleet.npm.jsonc
bun run ./src/cli.ts generate-opencode-json --manifest ./examples/fleet.npm.jsonc --force
bun run ./src/cli.ts test --manifest ./examples/fleet.npm.jsonc --json

Maintainers can instead keep file: sources, or use fleet.npm.jsonc plus overrides / file: in the config root package.json to point @mazac-fox/* at local checkouts without editing the manifest.

Publishing fleet packages

From this repo:

bun run publish:fleet

Uses scripts/publish-fleet.ts (ordered publish, npm view skip, npm publish --auth-type=web by default for browser/device 2FA, NPM_PUBLISH_AUTH_TYPE / --auth-type, NPM_TAG / NPM_PUBLISH_DRY_RUN / NPM_REGISTRY). CI: see .github/workflows/fleet-publish.yml (trusted publishing notes in the workflow).

Offline bundles

With sibling checkouts (opencode-fleet-contracts, opencode-host-adapter, opencode-conductor, engram, codemem, concord next to this repo), bun run pack:artifacts writes .tgz files under artifacts/ (gitignored). Install order for npm/bun from tarballs: fleet-contracts → host-adapter → fleet/conductor/engram/concord/codemem as needed.

npm: Scoped public packages (npm publish --access public). User scopes use npm init --scope=@my-username — fleet @mazac-fox/* matches npm user mazac-fox. Use npmrc <profile-name> when switching accounts. bun run publish:fleet defaults to --auth-type=web (browser / device login; stdin/stdout inherited per package so prompts work). Override: NPM_PUBLISH_AUTH_TYPE=legacy and NPM_OTP for TOTP-only flows; NPM_PUBLISH_NO_INHERIT=1 for piped logs. NPM_PUBLISH_DRY_RUN=1: dry-run all steps. After @mazac-fox/opencode-fleet-contracts is on the registry, ^0.1.0 deps resolve everywhere; until then, use bun link at opencode-fleet-contracts or the file: overrides on private workspace roots (codemem, concord). Order: fleet-contracts → host-adapter → fleet → engram → conductor → codemem → concord.

Until @mazac-fox/opencode-fleet-contracts is on the registry, bun install in singleton repos may 404; use npm link or publish contracts once, then reinstall.

Ownership

Owns Does not own
Manifest, install, generated config workflow, fleet health reports Plans (Conductor), memory (Engram), locks (Concord), code-graph (Codemem)

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors