@ai-agent-forge/plugin-sdk
v0.88.5
Published
Shared plugin development contracts (artifact, operation, diff, render, context budget DTOs) for Agent Forge plugins
Downloads
9,742
Maintainers
Readme
@agent-forge/plugin-sdk
Shared, transport-neutral contracts used by first-party and third-party Agent Forge plugins. Third-party plugin developers install this package as a development dependency; the host re-exports the same modules as PluginContractsV1.
Modules
artifact:ArtifactRefV1opaque artifact handles and validation.operation:PluginOperationV1,PluginResultV1,EvidenceRefV1,VerificationV1,PluginErrorV1.diff:DiffRequestV1/DiffResultV1comparisons.render:RenderRequestV1/RenderResultV1surface rendering.context-budget:projectPluginContextV1model-visible egress budget enforcement.common: JSON helpers (JsonValue,stableStringifyV1,detachedFreeze, assertion utilities).
All validators freeze their output and reject unknown fields, so validated values are stable and deterministic across repeated runs.
import { buildArtifactRefV1, type ArtifactRefV1 } from "@agent-forge/plugin-sdk";
const ref: ArtifactRefV1 = buildArtifactRefV1({
version: 1,
artifactRef: "artifact:example",
kind: "screenshot",
mimeType: "image/png",
});SDK versions align with the host apiVersion milestones (插件独立分发与启动装配设计.md §4.7).
