Skip to content

@onlyworlds/sdk 3.1.0

Choose a tag to compare

@tmoosting tmoosting released this 20 Oct 14:23
· 140 commits to main since this release

Added

  • Canonical element colour palette (src/v2/palette.ts, exported from root):
    ELEMENT_FAMILIES (type → family), FAMILY_COLORS (family → {light, dark} hex),
    familyOf(type), elementColor(type, mode), FAMILY_ORDER, type ElementFamily.
    Four semantic families (agents / world / abstract / temporal) ruled 2026-07-22 after
    CVD-validated measurement.
    Colour carries the FAMILY; ELEMENT_ICONS carries the TYPE. Keyed on the v2 slug
    union. First proven live in atlas and council, whose local copies become re-exports.
    ELEMENT_FAMILIES is GENERATED from the family: key in keel's schema YAML
    (keel c69366b, a keel presentation-wrapper key — not part of the council-governed
    OnlyWorlds standard); hexes are hand-authored design constants beside it. Membership
    and hex invariants test-gated (test/palette.test.mjs); light hexes render-proven on
    the ruled OnlyWorlds light mode (ow-house-light) 2026-07-23.
  • Codegen drift guard: python codegen/generate_types.py --check fails if
    types.generated.ts doesn't match the schema YAMLs (release gate; mirrors keel's
    schema CI job). Codegen also hard-fails on missing/invalid family: keys — the
    canary for a canonical-refresh that overwrote keel's wrapper layer.
  • CI: GitHub Action building + running the full suite against the compiled bundle.
  • AGENTS.md shipped in the tarball — usage guide for AI agents reading the package
    locally, including the SDK-vs-MCP division of labor and the wire gotchas.
  • README: worked create→link→read-back round-trip, schema-verified field by field
    (also fixes the old example patching 'character' with a location's id); canonical
    colour section; SDK-vs-MCP guidance.
  • This CHANGELOG.

Fixed

  • FieldType union now includes 'number' — the legacy alias that 70 FIELD_SCHEMA
    entries actually carry (consumers switch on it; data normalization deferred to 4.0).
  • generate_types.py exits with a clear message when the sibling keel checkout is
    absent instead of a bare traceback.