import type { AccessTokensNamespace, ConnectedAccountsNamespace, CreateOptions, InferenceNamespace, ListOptions, Run, SealantFeatures, SshKeysNamespace, Workspace, WorkspaceCreateState, WorkspaceImageInspection, WorkspaceSshNamespace, SealantConfig, UsersNamespace } from "./types.js"; export declare class Sealant { #private; constructor(config: SealantConfig); /** The configured control-plane base URL. */ get baseUrl(): string; /** * What the control plane can do that an older one cannot (see {@link SealantFeatures}), read * once per client and kept five minutes. Rejects when the control plane could not be asked. */ features(): Promise; /** Workspace lifecycle: create, fetch, and list live environments. */ readonly workspaces: { create: (options: CreateOptions) => Promise; get: (id: string) => Promise; /** * A key to keep the per-person capability of `create(options)`'s image under, computed here * from the spec alone, with no call. It is the same for creates whose image-shaping parts * (harness, tooling, customization, lifecycle, access, target) are the same, whatever their * repository, credentials or homes. It keys the capability, not the image itself. Keep what a * launch's `launch.image` told you under it, and call `inspectImage` only for a key you have not * seen. */ imageKey: (options: CreateOptions) => string; /** * What `create(options)` would build, read before the create: the spec is planned exactly as * the build plans it, and the latest image published for that plan answers with its * per-person capability (Mend ADR 0016 chooses a layout with it). Nothing is created, built or * reserved. A spec whose dotfiles or source the control plane resolves at create may plan * differently; then nothing is found and the capability is `unknown`. */ inspectImage: (options: CreateOptions) => Promise; /** * The owner's workspace a `create({ idempotencyKey })` made, or `null`: what a caller that * lost a create's answer uses to find the executor it started. */ findByIdempotencyKey: (idempotencyKey: string) => Promise; /** * What became of the create with this idempotency key: `pending` (started, not committed), * `found` (committed: `workspaceId`, `runId`, `launchId`), `cancelled`, or `none` (nothing has * reached the control plane — as of now only; use `cancelCreate` for an answer that stays * true). */ createState: (idempotencyKey: string) => Promise; /** * Make sure the create with this idempotency key never launches: a pending or unknown key is * cancelled for good (a delayed original request with it is refused, `create-cancelled`). A * create that already committed answers `found` — stop that workspace instead. */ cancelCreate: (idempotencyKey: string) => Promise; list: (options?: ListOptions | undefined) => Promise; }; /** * Inference on connected accounts — server-side via the official agent SDKs, never raw model-API * calls. Tool calls park server-side; execute them here and `respond()` with the results. */ readonly inference: InferenceNamespace; /** * Scoped bearer tokens for the session surface — `session:read` / `session:input` / * `workspace:exec`. The returned secret is shown once; hand it to a client as its `apiKey` and * the session endpoints enforce exactly those scopes (a read-stream token can stream but is * rejected for input and exec). */ /** Identity rows for products that own their own login (one client per user afterwards). */ readonly users: UsersNamespace; /** This client's owner's Claude / Codex / GitHub accounts. Secrets go in; none come out. */ readonly connectedAccounts: ConnectedAccountsNamespace; /** * Where workspace SSH connects for this deployment — how an editor (VS Code Remote-SSH) or * plain `ssh` reaches a workspace. Destination: `-@:`; * the gateway authorizes each connection from the offered key's owning account. */ readonly workspaceSsh: WorkspaceSshNamespace; /** * The owner's SSH public keys — what the workspace SSH gateway resolves a connection to. * `ensure` is idempotent: re-offering the same key returns the existing row. */ readonly sshKeys: SshKeysNamespace; readonly accessTokens: AccessTokensNamespace; /** Runs by id — so a record can be replayed long after its workspace is gone. */ readonly runs: { get: (runId: string) => Promise; }; /** Release resources held by the client (the Effect runtime scope: DB pool, daemon connections). */ close(): Promise; [Symbol.asyncDispose](): Promise; }