feat(sawala): akuna connection list + isolate (move to per-org D1)#93
Merged
Merged
Conversation
sawala akuna connection list — list the org's membership connections
sawala akuna connection isolate <id> — move a connection's member data plane
onto a dedicated per-org D1
Backed by the CLI/MCP-only /cli/akuna/* gateway surface (org-scoped via the
CLI token; a foreign connection id → 404). The isolate action provisions the
dedicated D1 if needed, is idempotent, and is guarded by a confirmation prompt
since it is effectively one-way (no isolated→shared migration).
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.
What
Adds a
sawala akuna connectioncommand group — the CLI trigger for Akuna's isolated-storage seam:sawala akuna connection list— list the org's membership connections (id, mode, domain, storage mode, status), so an operator can find the connection id.sawala akuna connection isolate <connectionId>— move that connection's member data plane onto a dedicated per-org D1 (sawala-akuna-org-<orgId>,storage_mode = isolated). Provisions the DB if needed, idempotent, confirmation-gated (--yes/TTY), with--dry-run.Why CLI (not a dashboard button)
Moving a tenant to a dedicated database is an operator action on a prototype path and is effectively one-way (no isolated→shared migration). It belongs on the CLI/MCP-only surface until a real data-residency customer needs self-serve — matching the
/cli/*recipe in the core repo's AGENTS.md.Backed by
The gateway
/cli/akuna/*passthrough +POST /connections/:id/provision-isolated(taggedInternal) land in sawala-cloud-core PR #425. This CLI command calls that endpoint viaapiFetch. Org scope is injected by the gateway from the CLI token — a connection id from another org → 404.Validation
@sawala/clitypecheck clean; esbuild build succeeds.sawala akuna --helpand... connection isolate --help— commands register and document correctly.@sawala/climinor) — required or the release ships nothing.Order of merge
Merge core #425 first (endpoint must exist), then this. The command is inert-but-harmless until the endpoint is live.