跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    jackmazac

    Fleet Contracts

    v0.1.0可观测与分析
    @mazac-fox/opencode-fleet-contracts

    Canonical 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.

    GitHub 星标

    0

    月装机量

    11

    近 7 天 6

    综合评分SCORE

    22.0

    生态多维模型

    最近提交

    3 个月前

    2026-05-21

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@mazac-fox/opencode-fleet-contracts@0.1.0"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    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