Skip to content

ochakai 0.10.0

Choose a tag to compare

@na0fu3y na0fu3y released this 19 Jul 14:49
Immutable release. Only release title and notes can be modified.
154795c

A restructuring release: the knowledge hierarchy is freed from the type-first layout, the type vocabulary aligns with the OKF knowledge-catalog reference bundles, and semantic models become ordinary knowledge entries. Breaking changes are listed at the end; database migrations run automatically on upgrade.

The path is the address (design doc 0017)

An entry's id is now its full bundle path — the sole primary key — and the type is metadata, not a location. Place together what should be read together: domain-first (sales/orders), type-first (metrics/revenue), and foreign-bundle-shaped (ga4/tables/orders) layouts are all first-class, and the server forces none of them (#87).

  • MCP address-taking tools (get_knowledge, get_attachment, get_knowledge_usage, delete_knowledge) take a single id argument. report_outcome's target is an id. The resource template is ochakai://{+id}.
  • REST routes are {id...} throughout; the legacy /knowledge/{type}/{id}/usage alias is gone.
  • Bundle import takes the frontmatter type as the only type source — files without one are skipped and reported, never guessed from the path. Archive unwrapping (and --keep-root) is gone: tar czf ga4.tgz ga4/ imports under ga4/, so a wrapper directory is how a bundle keeps its namespace.
  • The web UI's Browse tab walks the id hierarchy from the top-level segments; ochakai browse is its CLI counterpart.
  • Existing ids migrate to <type>/<id> — the spelling every serialized reference (export paths, URIs, link targets) already used, so stored references keep resolving without rewrites.

ID segments now follow OKF's actual contract — a concept ID is a file path, nothing more — so only path safety constrains them: no leading ., no control characters, 128 bytes per segment (design doc 0019). Leading underscores (BigQuery hidden datasets), non-ASCII (用語/売上), and spaces are all valid. Types remain slugs: they are vocabulary, not paths.

Type vocabulary aligns with the knowledge-catalog bundles (design doc 0016)

Recommended type slugs are now plural — metrics, queries, insights, terms, tables — joined by datasets (a container grouping tables) and references (mirrors of external material), matching the OKF knowledge-catalog reference bundles directory-for-directory. Those bundles now import onto the recommended types as-is (#85).

  • resource (the canonical URI of the underlying asset) is promoted from attrs to an envelope field, exported right after type as the reference bundles do.
  • ochakai is BigQuery-only: the compile dialect option is gone from REST, MCP, CLI, and the web UI — output is always BigQuery SQL. Ossie input expressions still resolve BIGQUERY first with ANSI_SQL fallback, so portably-written models keep working.

Semantic models are knowledge entries (design doc 0018)

import-ossie (CLI command, POST /api/v1/import/ossie, the derivation logic) is gone. A semantic model is now a models entry carrying the Ossie model object verbatim in attrs.spec — with everything that entails: revisions, provenance, draft→verified verification, search, and OKF export/import. The model no longer falls out of the bundle round-trip (#88).

  • Broken models are rejected at write time, not when someone asks for SQL. Compilation stays deterministic and LLM-free.
  • compile_sql resolves the model from the models entries themselves: pass model (the entry's id), or omit it and the entry whose spec defines the first metric is used — if several do, the compile fails asking for model (design doc 0019). The result names the models entry and its status, so trust is judged from provenance; there is no status gate.
  • Registering a model and its per-metric entries is the client agent's job now — examples/semantic-model.md registers with a plain ochakai create -f, and asking a connected agent to "register this spec and its metrics" is enough.

Release-review hardening (design doc 0019, #89)

  • ochakai import treats a server 400 (e.g. a models entry whose spec fails validation) as that one document's skip — reported, with its attachments — instead of aborting the bundle halfway.
  • The web UI caught up with the plural type vocabulary (type filters work again, all eight types have icons), the New-entry default is insights, and the compile form seeds the metric name from the id's last segment.
  • Shell completions no longer offer removed flags, and the sync test now pins removed surface by name.

Also in this release

  • The site-wide Compile tab moved into the metric detail view, where the model context lives (#82).
  • Web UI: whole-card click navigation, New entry folded into Explore, attachment thumbnails on result cards (#86).

Breaking changes

  • MCP: address-taking tool schemas went from type + id to id; agent configs (CLAUDE.md, prompts) need updating. compile_sql's model argument is a models entry id; dialect is gone (unknown keys are ignored).
  • REST: routes are /api/v1/{knowledge,usage,revisions,backlinks}/{id...}; the legacy usage alias is removed; type is required in create and update bodies; POST /api/v1/import/ossie is a 404.
  • CLI: import-ossie and import --keep-root are gone; refs are ids (ochakai get metrics/revenue).
  • Export: no id: frontmatter line, all-alphabetical index ordering — a one-time diff against old exports.
  • DB: migrations 0010–0012 rewrite type slugs and ids, move resource to a column, convert semantic_model rows to models/<name> draft entries, and drop the table. They run automatically and abort safely on id collisions (resolve, then re-apply).

Container image

docker pull ghcr.io/na0fu3y/ochakai:0.10.0
gh attestation verify oci://ghcr.io/na0fu3y/ochakai:0.10.0 -R na0fu3y/ochakai