ochakai 0.10.0
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 singleidargument.report_outcome's target is an id. The resource template isochakai://{+id}. - REST routes are
{id...}throughout; the legacy/knowledge/{type}/{id}/usagealias is gone. - Bundle import takes the frontmatter
typeas 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 underga4/, 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 browseis 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 aftertypeas the reference bundles do.- ochakai is BigQuery-only: the compile
dialectoption is gone from REST, MCP, CLI, and the web UI — output is always BigQuery SQL. Ossie input expressions still resolveBIGQUERYfirst withANSI_SQLfallback, 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_sqlresolves the model from the models entries themselves: passmodel(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 formodel(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.mdregisters with a plainochakai create -f, and asking a connected agent to "register this spec and its metrics" is enough.
Release-review hardening (design doc 0019, #89)
ochakai importtreats 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+idtoid; agent configs (CLAUDE.md, prompts) need updating.compile_sql'smodelargument is a models entry id;dialectis gone (unknown keys are ignored). - REST: routes are
/api/v1/{knowledge,usage,revisions,backlinks}/{id...}; the legacy usage alias is removed;typeis required in create and update bodies;POST /api/v1/import/ossieis a 404. - CLI:
import-ossieandimport --keep-rootare 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
resourceto a column, convertsemantic_modelrows tomodels/<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