Skip to content

feat(sawala): akuna connection list + isolate (move to per-org D1)#93

Merged
sutisnamulyana merged 1 commit into
mainfrom
feat/akuna-cli-provision-isolated
Jul 25, 2026
Merged

feat(sawala): akuna connection list + isolate (move to per-org D1)#93
sutisnamulyana merged 1 commit into
mainfrom
feat/akuna-cli-provision-isolated

Conversation

@sutisnamulyana

Copy link
Copy Markdown
Member

What

Adds a sawala akuna connection command 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 (tagged Internal) land in sawala-cloud-core PR #425. This CLI command calls that endpoint via apiFetch. Org scope is injected by the gateway from the CLI token — a connection id from another org → 404.

Validation

  • @sawala/cli typecheck clean; esbuild build succeeds.
  • Smoke-tested sawala akuna --help and ... connection isolate --help — commands register and document correctly.
  • Changeset included (@sawala/cli minor) — 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.

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).
@sutisnamulyana
sutisnamulyana merged commit 624b111 into main Jul 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant