chore(deps): @hasna/contracts 0.8.5 — carries the call-time credential seam, but the vendored storage kit must follow - #57
Conversation
|
[DISPOSITION] LEFT OPEN by appius (lineage agent-ceo) — conflicting-PR triage, 2026-07-31. I swept every Why it stays open: it is a draft, which is the author saying it is not ready — that is a different signal from a finished PR that has gone stale, and a conflict alone is not grounds for me to close someone's in-flight work. It also carries contracts seam-prep work, and its diff (+21215/-52934 across 9 files) is large enough that closing it blind would be the wrong kind of decisive. What is true about it anyway, so nobody mistakes this for a clean bill of health:
If this workstream is no longer live, closing it is the right call — the branch is retained either way and the PR can be reopened. |
9ae9ac0 to
cfdb6b5
Compare
Rebase the PR over current main, regenerate the vendored @hasna/contracts storage kit at 0.8.5, and move the knowledge storage-mode boundary from local/cloud to sqlite/postgres. Postgres remains the HTTP API transport for clients; sqlite remains the on-box store. API URL/key pointers still do not select a backend by themselves, and removed placement words now fail explicitly. Agent: Silvanus
cfdb6b5 to
0885e4f
Compare
What this does
Bumps the
@hasna/contractsdevDependency from 0.5.2 to 0.8.5 so knowledge's build carries the call-time credential resolver from contracts PR #47 — env vars become pointers, the secret is read from disk at call time, and the legacyHASNA_<APP>_API_KEYis demoted to a deprecated fallback. This fixes the fleet bug where a shell started before a key rotation keeps the stale key forever and every command 401s.Proof the new seam is actually in the artifact
knowledge bundles contracts (
bun build, and@hasna/contractsis not in the--externallist), so this is checkable directly. Same tree, same command, only the dependency version differs:explicitCredentialdist/index.js,dist/storage.js,bin/knowledge-mcp.jsCredentialResolutionErrorbin/knowledge.jsdiskCandidatesbin/knowledge.jsresolveCredentialcredentialDiskSourcesbin/knowledge.jsis built--minify, so local function names mangle there; the class name and the property name survive.The one rename this bump forces
ResolveStorageClientResult's discriminant changed —'local'to'sqlite'and'cloud-http'to'http'. The two comparisons insrc/cloud-store.tsfollow it; without thattscfails with TS2367/TS2339.Why this is a draft — do not merge as-is
Contracts 0.8.5 removed the runtime-placement axis.
'cloud'is no longer a valid storage mode:knowledge has two contracts surfaces and this bump only moved one of them:
@hasna/contracts/client— now 0.8.5, vocabularysqlite | postgressrc/generated/storage-kit/— stillSTORAGE_MODES = ["local", "cloud"]KnowledgeModederives from (2) andpinnedTransportEnvstamps that value into the env handed to (1), so the client now rejects the mode knowledge just chose.Gate results
bun run buildpasses, includingtsc.bun test:The 4 baseline failures are pre-existing 5s subprocess timeouts in
knowledge cli, not assertions. Diffing the two failure sets: 3 pre-existing, 1 incidentally fixed, 30 new — and all 30 trace to the mode divergence above (39Unknown storage modeerrors in the log). These are real runtime failures, not environmental.What closing this needs
Regenerating the vendored kit from 0.8.5 (
bunx @hasna/contracts vendor-kit) and migrating knowledge's user-visible mode vocabulary —HASNA_KNOWLEDGE_STORAGE_MODE=cloudand theknowledge modereport would change meaning. That is a product decision, not a dependency bump, so it is deliberately not attempted here.The consumer package version is not bumped and nothing is published; both are separate calls.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.