Skip to content

v0.36.34

Choose a tag to compare

@github-actions github-actions released this 22 Oct 14:32
· 3 commits to main since this release
ffb583d
One kai store per project: kai store merge, refuse split projects (#213)

* One kai store per project: refuse a split, keep loops in the store

kaipath used to treat a bare <root>/.kai directory as the store, and the
session-ingest hook created exactly that (.kai/loops) beside .git/kai
stores — ~/Desktop/riddle ended up with two live databases. With the
engine fix (kaipath.Stores, keyed on db.sqlite):

- log ingest writes loops into kaipath.Resolve(root)/loops; doctor reads
  them there.
- Every command except doctor/version/help/completion/log ingest refuses
  to run when both .kai/db.sqlite and .git/kai/db.sqlite exist, naming
  each with snapshot/ref/git-mapping/pushed counts and how to move one
  aside. doctor reports the same.
- kai run's store lookup walks up by database, not directory.
- Hooks v9: pre-push picks KAI_HOOK_DIR by db.sqlite (lockstep with kit).

Needs the kai-engine release carrying kaipath.Stores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kai store / kai store merge; refuse split projects with the way out

With kaipath settling on <project>/.kai:

- kai store shows the project's store; kai store merge folds a leftover
  .git/kai store into .kai (engine storemerge) and retires it as
  .git/kai.merged-<ts>, printing what was copied and any split/ refs.
- The split refusal now points at kai store merge; exemptions are by
  command path so 'kai merge' is not exempted by 'kai store merge'.
- kai run resolves through kaipath so a legacy store migrates first.
- Tests: the workspace-id lookup finds a legacy .git/kai store and leaves
  one store; loop records land in .kai.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(deps): bump kai-engine to v0.6.85 (one kai store)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* store split: report unreadable refs; let tab-completion run on a split project

describeStore dropped the refs query error, so a store it couldn't read
showed as "0 refs, never pushed" while the user picks which store to
keep. It now says unreadable, like the snapshots query.

Cobra's hidden __complete/__completeNoDesc commands weren't exempt, so
tab-completion in a split project printed the refusal and exited 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: kai CI <ci@kaicontext.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>