fix(runtime): bundle engine daemon for packed consumers - #218
Conversation
The runtime bundle inlines kibi-cli operation code whose daemon lookup expects engine-daemon.js beside the bundle or under a nested kibi-cli install. Published-shaped installs have neither, so first-party MCP hosts failed with "The Kibi engine is not built" on first engine use. Bundle packages/cli/src/engine-daemon.ts into runtime dist so the existing lookup resolves without adding dependencies.
Give the bundled engine daemon fix the full Kibi chain: - REQ-runtime-packed-engine-daemon with two advisor-grounded predicate facts (kibi.runtime logical_requirement_rule lane) - SCEN + TEST-runtime-packed-engine-daemon with a consumer-perspective verification contract registered in the proof registry - Packed E2E test installing published tarballs into a clean prefix and starting EngineClient from the installed kibi-runtime, proving daemon resolution and typed query service without a nested kibi-cli - Config-granularity production symbol (implements + covered_by) and behavioral test symbol (executable_for) with fresh coordinates Also repair REQ-kibi-verification-evidence-contract ingestion: the advisor now segments its second sentence as one proposition (CLAIM-6C829C8424C2387C), so merge the two stale grounding facts into FACT-REQ-PROOF-VERIFICATION-NON-PROOF-OUTCOMES and refresh the inventory contract; this unblocks sync for every branch. Local run: proof contract passed and REQ-runtime-packed-engine-daemon reports proofStatus=proven with all nine stages green.
|
CI triage: the red Kibi strict requirement proof job is inherited from Also pushed b18aa02, which gives the fix full Kibi traceability and proof:
|
…itted advisor The previous commit repaired this requirement against a local CLI build carrying uncommitted semantic-advisor changes that segment the second sentence as one proposition. The committed advisor still produces three propositions (CLAIM-B82AFD45D25355EB, CLAIM-1A610F01C3FDD6FD, CLAIM-B605A89256E0CEF1), so CI sync failed on the repaired file. Restore the original inventory and grounding facts; drop FACT-REQ-PROOF-VERIFICATION-NON-PROOF-OUTCOMES. The re-segmentation repair belongs with the advisor change that introduces it.
…-engine-daemon # Conflicts: # .kb/symbol-coordinates.yaml # .kb/symbols.yaml # .kb/tests/TEST-runtime-packed-engine-daemon.md # documentation/tests/e2e/packed/runtime-engine-daemon.test.ts # proof/verification-registry.json
|
Consolidation update (
Remaining CI reds on this branch are inherited from develop tip (run 32489557724): the same |
Problem
First-party MCP hosts that install the published-shaped packages under pnpm isolated mode (or any layout without a nested
kibi-cli) fail on first engine use:Root cause: the runtime bundle inlines
kibi-cli/operationscode, includingEngineClientand itsdaemonEntry()lookup. That lookup checks:<runtime>/dist/engine-daemon.js— never shipped<runtime>/dist/../dist/engine-daemon.js— same path<runtime>/node_modules/kibi-cli/dist/engine-daemon.js— only resolves in the kibi monorepo workspacePublished consumers have none of these, so
EngineClient.start()always throws.Fix
The
kibi-runtimebuild now also bundlespackages/cli/src/engine-daemon.tsintodist/engine-daemon.js(--packages bundle --external kibi-core, same strategy as the existing index bundle). Candidate 1 then resolves in every consumer shape with no new dependencies and no lookup changes.Verification
kb_storage_status/1query returns success.kibi-runtime+kibi-coretarballs, installed them into a clean npm prefix, and ranEngineClientfrom the installed tree: daemon auto-starts and serves queries.Notes
kibi-runtime.