Repository navigation
API: moving to OpenBot Cloud (export, import, verify) - #1998
Open
davidmckayv wants to merge 3 commits into
Open
davidmckayv wants to merge 3 commits into
davidmckayv wants to merge 3 commits into
Conversation
Exports on an OpenBot on the person's own computer: what an export would hold and free, a bundle in parts with sizes and SHA-256, resumable downloads with Range. Imports on OpenBot Cloud only: a per-import public key a model key is sealed to, resumable part uploads, apply in the background, and a verification that counts what arrived by kind. Connections to apps travel as app and account names only, listed for reconnecting.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 21, 2026 23:37
…he organization's own store MoveCount carries bytes for files, and the verification compares expectedBytes with foundBytes read from the file store.
This branch has not been deployed
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.
The API for moving from OpenBot Desktop (everything on the person's own computer) to OpenBot Cloud, so nobody loses work. Spec and regenerated client only; the server side follows.
New area
api/openapi/moves.yaml, tag "Moving to OpenBot Cloud", scopesexports:read|writeandimports:read|write.How OpenBot Desktop runs a move:
createImportinto the chosen organization (the person's own by default). The answer carriesrecipientKey, an RSA-OAEP-256 public JWK made for that import alone, and the size limits.getExportEstimate: counts by kind, rough bundle size,storedBytes(what removing the local OpenBot frees), the apps to reconnect, and whether a model key could come along.createExport(includeModelKeysplusrecipientKeywhen the person opts in), thengetExportuntilready: parts of at most 32 MiB with size and SHA-256, total size, counts by kind,reconnect.downloadExportPartper part (Range for resume) and ClouduploadImportPartper part. Part 1 carries the manifest; an arrived part re-sent is a no-op, a damaged one is refused and can be re-sent.applyImport, thengetImportuntilimported: ids remapped, everything owned by the caller, nothing outside that organization. Summary notes say what came in differently (an isolated Bot as an ordinary Bot, a Business-plan feature left out, an existing AI connection kept).getImportVerification: expected, found and leftOut per kind, read from what is stored, and for files expectedBytes and foundBytes read from the file store, andmatches. Desktop removes nothing until it is true.Files land where a file uploaded on Cloud lands: the organization's own place in OpenBot's file store, never a shared location.
What never moves: a connection's sign-in. Each app connection travels as its app id, name, account label, icon and the Bots that used it (
ReconnectApp), on the estimate, the export, the import and the verification, so Desktop can list exactly what to reconnect. A model key moves only when the person chooses, sealed as a JWE to the import's key, so the bundle never holds it readable; on Cloud it becomes the person's own AI connection.Repeating is safe: an import of the same OpenBot into the same organization adds only what isn't there yet. Exports are served only by an OpenBot on the person's own computer, imports only by OpenBot Cloud; elsewhere both answer 404
MOVE_UNAVAILABLE. Limits: 10 imports a day and 120 part uploads a minute per person, 32 MiB a part, a bundle at mostmaxBundleBytes.Checks run:
bun run api:generate(bundle and clients),bun run api:lint,bun test api/.