Wire conversations CLI to cloud API (self_hosted storage)#13
Merged
Conversation
Wire the CLI (`send`, `show`, `reply`, `delete`) through a new cloud-store resolver that uses the @hasna/contracts HTTP storage client when mode=self_hosted and HASNA_CONVERSATIONS_API_URL + HASNA_CONVERSATIONS_API_KEY are set. Routed reads/writes go to https://conversations.hasna.xyz/v1 with the bearer key; no DSN on the client. Unset the vars (or mode=local) to revert to the local SQLite store — off by default, fully reversible (conversations is a coordination store; this changes no fleet default). Bumps @hasna/contracts to ^0.5.0.
andrei-hasna
added a commit
that referenced
this pull request
Jul 7, 2026
…ildable) HEAD bumped @hasna/contracts to ^0.5.0 (for the client cloud-store path added in #13) but never regenerated bun.lock, which still pins 0.4.1 — so `bun install --frozen-lockfile` (the ECS Docker build) cannot resolve and the image is unbuildable. The serve process imports only @hasna/contracts/auth (present in 0.4.1) and the vendored storage-kit (self-contained, KIT_VERSION 0.4.1); it never imports the client-only cloud-store.ts. The deployed prod image already runs 0.4.1 auth, so existing API keys stay valid. Pinning to ^0.4.1 restores a coherent, buildable state for the server deploy. The client cloud-store.ts (which needs contracts 0.5.x `client/storage`) is part of the separate client-flip workstream: it will move to 0.5.x once contracts 0.5.x is published and the lockfile regenerated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Routes message CRUD to
https://conversations.hasna.xyz/v1(bearer key) whenmode=self_hostedandHASNA_CONVERSATIONS_API_URL+HASNA_CONVERSATIONS_API_KEYare set; falls back to local SQLite otherwise (unset vars or mode=local reverts). No DSN on the client.Conversations is a coordination store: this wiring is OFF by default and fully reversible; it changes no fleet default.
src/lib/cloud-store.tsresolver over the @hasna/contracts HTTP storage client (auto-implies self_hosted when URL+key present so the fleet flip's 2-var output activates cloud).send/show/reply/deleterouted (POST/GET/DELETE /v1/messages, unwrapping the{message}envelope; delete passes the requiredfrom).