Skip to content

API Reference

The API reference is generated from TSDoc comments in the source.

Public Entrypoints

Use explicit import paths by stability tier:

  • trueform: stable core IR/DSL/compile/build contracts.
  • trueform/backend: backend implementations (for runtime wiring).
  • trueform/backend-spi: backend interfaces/adapters for backend authors.
  • trueform/export: export tooling helpers (STEP/GLB/3MF/SVG/DXF).
  • trueform/api: runtime API contracts (typed endpoint constants, job envelopes, and OpenAPI object).
  • trueform/experimental: unstable/experimental APIs (for example assembly solver and native transport helpers).

Runtime guidance:

  • Treat /v1/capabilities as the source of truth for optional surface support (optionalFeatures), not route existence assumptions.
  • Treat /v1/capabilities.featureStages as the source of truth for staging/in-development feature maturity; every advertised featureKinds entry has an explicit stage.
  • Check /v1/capabilities.optionalFeatures.measure.endpoint before using /v1/measure.
  • Use /v1/health for runtime/dependency readiness and /v1/metrics for cache/store counters.
  • Use build/compile ValidationOptions.stagedFeatures (or runtime options.stagedFeatures) to allow, warn, or block staged features.
  • For machine-readable feature payload validation, use IR_SCHEMA (src/ir_schema.ts) and its per-feature $defs entries.
  • For external selection persistence and round-tripping, use the runtime selection integration workflow instead of inferring semantics from mesh or metadata payloads.

Additional runtime docs:

Generate

bash
npm run docs:api

This writes static HTML into docs/public/api (not committed).

View

When running the docs site, open:

  • /api/

Open the API Reference

If you need to regenerate after changes, re-run npm run docs:api.