@neokapi/contract-types
v0.1.0
Published
Shared TypeScript contract types for the neokapi engine: flow/tool IO-contract atoms, schema-language types, and content-model types, generated from the Go sources of truth (core/schema, core/format/schema, core/model, neokapi.content.v1). Drift-gated aga
Readme
@neokapi/contract-types
Shared TypeScript contract types for the neokapi
engine — the single source of truth for the flow/tool IO contract, the schema
language, and the content-model payload shapes consumed by every neokapi
frontend package (including @neokapi/engine).
Three layers, re-exported from the package root:
./contract.gen— IO-contract atoms generated from the Go sources of truth (core/schema,core/format/schema,core/model): tool/format metadata, categories, IO ports, overlay and annotation vocabularies../content.gen— content-model types generated from the canonicalneokapi.content.v1proto descriptors (wire shapes, as encoded by protojson) and the Go projection structs (model.RunJSON, theContentTreefamily)../manual— hand-authored superset envelope types the UI extends beyond Go (ComponentSchema,PropertySchema,ConditionExpr,ToolDoc, …).
Generated package — do not edit
The *.gen.ts sources are generated from the Go definitions in the neokapi
repository and must not be edited by hand. Regenerate with:
make generate-contract-typesCI enforces a drift gate (make check-contract-types): the committed types are
regenerated and compared against Go on every change, so the published package
cannot drift from the engine.
Usage
import type { ToolMeta, ContentTree, Run } from "@neokapi/contract-types";In-repo consumers resolve the TypeScript source directly; the published package
ships transpiled ESM plus declarations from dist/ (see the exports vs
publishConfig split in package.json).
License
Apache-2.0
