@aperture-browser/control-api 0.0.0-init.0 → 0.0.0-nightly.148.08402157055a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -1
- package/dist/api-EoqsY4JE.js +1083 -0
- package/dist/api-EoqsY4JE.js.map +1 -0
- package/dist/api-mf9iSwea.d.ts +2227 -0
- package/dist/client.d.ts +859 -0
- package/dist/client.js +18 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +166 -0
- package/dist/errors.js +90 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/package.json +45 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-EoqsY4JE.js","names":["manifest.version"],"sources":["../package.json","../src/schemas.ts","../src/api.ts"],"sourcesContent":["","import * as Schema from \"effect/Schema\";\n\n/** What a node's executor says its sessions may have, in the words of the glossary. */\nexport const Offers = Schema.Struct({\n version: Schema.String,\n features: Schema.Array(Schema.String),\n network: Schema.Struct({ tcp: Schema.String, udp: Schema.String }),\n /** The limits of a session that has none of its own; one that is left out is not held. */\n limits: Schema.Struct({\n memoryBytes: Schema.optional(Schema.Number),\n swapBytes: Schema.optional(Schema.Number),\n cpus: Schema.optional(Schema.Number),\n tasks: Schema.optional(Schema.Number),\n suspendIdleAfterSeconds: Schema.optional(Schema.Number),\n }),\n holdsResources: Schema.Boolean,\n /** Whether its snapshots are kept where other nodes find them. */\n sharesSnapshots: Schema.Boolean,\n});\nexport type Offers = typeof Offers.Type;\n\n/** What whoever owns the session asked it to be. */\nexport const DesiredState = Schema.Literals([\"running\", \"suspended\"]);\nexport type DesiredState = typeof DesiredState.Type;\n\n/**\n * What the session's node last said it is. `gone` is a session its node has no more\n * though nobody asked the control plane to delete it.\n */\nexport const ObservedState = Schema.Literals([\n \"suspended\",\n \"starting\",\n \"running\",\n \"suspending\",\n \"failed\",\n \"gone\",\n]);\nexport type ObservedState = typeof ObservedState.Type;\n\n/** The areas of a session a ticket gives access to, each read, written or both. */\nexport const Access = Schema.Record(\n Schema.Literals([\n \"input\",\n \"tabs\",\n \"lease\",\n \"sound\",\n \"clipboard\",\n \"uploads\",\n \"downloads\",\n \"recordings\",\n \"proxy\",\n \"mcp\",\n \"cdp\",\n \"tunnel\",\n ]),\n Schema.optional(Schema.Literals([\"r\", \"w\", \"rw\"])),\n);\nexport type Access = typeof Access.Type;\n\n/**\n * What a share link lets a guest do in its session: watch it, or control it as well, which\n * is giving input, opening and closing tabs, taking a tab, the clipboard and the sound.\n */\nexport const ShareRole = Schema.Literals([\"watch\", \"control\"]);\nexport type ShareRole = typeof ShareRole.Type;\n\n/**\n * How a session's browser connections are routed. The first rule that matches a\n * connection decides; one no rule matches is made from the session's node.\n */\nexport const ProxyConfig = Schema.Struct({\n /** The upstreams rules can route through, by name. */\n upstreams: Schema.optional(\n Schema.Record(\n Schema.NonEmptyString,\n Schema.Struct({\n /** A proxy, with its credentials in the URL: `socks5://`, `http://`, `https://`. */\n url: Schema.NonEmptyString,\n /** The secret a tunnel is dialed with. */\n auth: Schema.optional(Schema.String),\n }),\n ),\n ),\n rules: Schema.Array(\n Schema.Struct({\n /**\n * `host` or `host:port`; the host is a name, `*.suffix`, `*` for any, an address or\n * a network (`10.0.0.0/8`). What is IPv6 takes a port in brackets: `[::1]:443`.\n */\n match: Schema.NonEmptyString,\n /** `direct`, `refuse`, `local`, an upstream's name, or a proxy's URL. */\n via: Schema.NonEmptyString,\n to: Schema.optional(Schema.String),\n tls: Schema.optional(Schema.Boolean),\n }),\n ),\n});\nexport type ProxyConfig = typeof ProxyConfig.Type;\n\n/**\n * What an API token is held to: it does what its scopes name and nothing else. Writing\n * something includes reading it. `sessions:read` sees sessions and watches them, and\n * `sessions:write` does everything else in one; `workspaces:read` tells which workspaces\n * its account is in and who else is; `events:read` reads the events of its account and of\n * the workspaces that is in, and `admin` is what an admin's token keeps an admin's with.\n */\nexport const Scope = Schema.Literals([\n \"sessions:read\",\n \"sessions:write\",\n \"snapshots:read\",\n \"snapshots:write\",\n \"workspaces:read\",\n \"workspaces:write\",\n \"tokens:write\",\n \"events:read\",\n \"admin\",\n]);\nexport type Scope = typeof Scope.Type;\n\n/** Whether scopes cover one that is asked for; no scopes at all cover everything. */\nexport const covers = (held: ReadonlyArray<Scope> | null, asked: Scope) =>\n held === null ||\n held.includes(asked) ||\n (asked.endsWith(\":read\") && held.includes(asked.replace(\":read\", \":write\") as Scope));\n\n/**\n * What an API token is held to besides its scopes: with resources it reaches only the\n * sessions and snapshots that are named, and those of the workspaces that are named.\n */\nexport const TokenResources = Schema.Struct({\n workspaces: Schema.Array(Schema.String),\n sessions: Schema.Array(Schema.String),\n snapshots: Schema.Array(Schema.String),\n});\nexport type TokenResources = typeof TokenResources.Type;\n\n/**\n * What an event says was done. The set is closed: what reads events knows every kind\n * there is, and a new one is added here.\n */\nexport const EventKind = Schema.Literals([\n \"sign_in.succeeded\",\n \"sign_in.failed\",\n \"account.created\",\n \"account.changed\",\n \"account.disabled\",\n \"account.enabled\",\n \"account.removed\",\n \"account.setup_link_made\",\n \"account.second_factor_reset\",\n \"account.passkeys_removed\",\n \"token.created\",\n \"token.revoked\",\n \"grant.given\",\n \"grant.revoked\",\n \"registration_token.created\",\n \"registration_token.revoked\",\n \"workspace.created\",\n \"workspace.renamed\",\n \"workspace.deleted\",\n \"workspace.member_admitted\",\n \"workspace.member_dismissed\",\n \"session.created\",\n \"session.suspended\",\n \"session.resumed\",\n \"session.deleted\",\n \"snapshot.taken\",\n \"snapshot.replaced\",\n \"snapshot.deleted\",\n \"share.created\",\n \"share.revoked\",\n \"share.joined\",\n \"node.registered\",\n \"node.refused\",\n \"node.released\",\n \"node.silent\",\n \"provider.added\",\n \"provider.changed\",\n \"provider.enabled\",\n \"provider.disabled\",\n \"provider.removed\",\n]);\nexport type EventKind = typeof EventKind.Type;\n\n/**\n * Who did what an event says: an account, the guest of a share link, the holder of the\n * bootstrap token, someone who is not known, as whoever failed to sign in, or the control\n * plane by itself.\n */\nexport const EventActor = Schema.Struct({\n kind: Schema.Literals([\"account\", \"guest\", \"bootstrap\", \"anonymous\", \"system\"]),\n /** An account's id, or `share:<id>` for a guest; none for the others. */\n id: Schema.NullOr(Schema.String),\n /** What they were called then. */\n name: Schema.NullOr(Schema.String),\n});\nexport type EventActor = typeof EventActor.Type;\n\n/** What an event is about, as it was called then: it may be gone, or called otherwise, since. */\nexport const EventResource = Schema.Struct({\n kind: Schema.Literals([\n \"account\",\n \"token\",\n \"grant\",\n \"registration_token\",\n \"workspace\",\n \"session\",\n \"snapshot\",\n \"share\",\n \"node\",\n \"provider\",\n ]),\n id: Schema.String,\n label: Schema.NullOr(Schema.String),\n});\nexport type EventResource = typeof EventResource.Type;\n\n/** What else an event of its kind says, in a few plain values. Never a secret. */\nexport const EventDetail = Schema.Record(\n Schema.String,\n Schema.Union([\n Schema.String,\n Schema.Number,\n Schema.Boolean,\n Schema.Null,\n Schema.Array(Schema.String),\n ]),\n);\nexport type EventDetail = typeof EventDetail.Type;\n","import * as Context from \"effect/Context\";\nimport * as HttpApi from \"effect/http-api/HttpApi\";\nimport * as HttpApiEndpoint from \"effect/http-api/HttpApiEndpoint\";\nimport * as HttpApiGroup from \"effect/http-api/HttpApiGroup\";\nimport * as HttpApiMiddleware from \"effect/http-api/HttpApiMiddleware\";\nimport * as HttpApiSchema from \"effect/http-api/HttpApiSchema\";\nimport * as HttpApiSecurity from \"effect/http-api/HttpApiSecurity\";\nimport * as OpenApi from \"effect/http-api/OpenApi\";\nimport * as Schema from \"effect/Schema\";\nimport manifest from \"../package.json\" with { type: \"json\" };\nimport type { Caller } from \"./caller.ts\";\nimport {\n AccountInUse,\n AccountInvalid,\n AccountNotFound,\n ApiTokenNotFound,\n EmailTaken,\n FileLinkInvalid,\n PersonNotFound,\n Forbidden,\n ProviderConfigured,\n ProviderInvalid,\n ProviderNotFound,\n ProviderTaken,\n GrantNotFound,\n NodeNotFound,\n NodeRefused,\n NodeUnreachable,\n NoNode,\n OAuthClientNotFound,\n RedirectRefused,\n RegistrationTokenNotFound,\n SessionHasNoNode,\n SessionNotFound,\n ShareNotFound,\n SnapshotNotFound,\n Unauthorized,\n WorkspaceInUse,\n WorkspaceNotFound,\n} from \"./errors.ts\";\nimport {\n Access,\n DesiredState,\n EventActor,\n EventDetail,\n EventKind,\n EventResource,\n ObservedState,\n Offers,\n ProxyConfig,\n Scope,\n ShareRole,\n TokenResources,\n} from \"./schemas.ts\";\n\n/** Where the control plane's API is, apart from the routes of sessions and of nodes. */\nexport const PREFIX = \"/api/control\";\n\nconst WorkspaceRole = Schema.Literals([\"member\", \"admin\"]);\n\nexport const Account = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n admin: Schema.Boolean,\n /** A person, who signs in, or a service, which comes with API tokens alone. */\n kind: Schema.Literals([\"person\", \"service\"]),\n /** The address a person signs in with; none for a service. */\n email: Schema.NullOr(Schema.String),\n createdAt: Schema.DateTimeUtcFromString,\n /** Since when it is disabled: nothing of it signs in or is taken as a caller. */\n disabledAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n});\n\n/**\n * The account a caller is, with what the caller itself may do as it: what the token it came\n * with is held to. Whoever signed in with cookies is held to nothing.\n */\nexport const CurrentAccount = Schema.Struct({\n ...Account.fields,\n /** What the caller is held to; none for one that does whatever its account does. */\n scopes: Schema.NullOr(Schema.Array(Scope)),\n /** The resources the caller is held to; none for one that reaches all its account does. */\n resources: Schema.NullOr(TokenResources),\n});\n\n/** What a person signs in with. */\nexport const SignInMethods = Schema.Struct({\n /** Whether they have a password: one they set, since nobody is given one. */\n password: Schema.Boolean,\n secondFactor: Schema.Boolean,\n /** How many passkeys they added. */\n passkeys: Schema.Number,\n /** The providers they came through, by what each is called. */\n providers: Schema.Array(Schema.String),\n});\n\n/** An account as an admin is told of it: with what its person signs in with, for a person's. */\nexport const ListedAccount = Schema.Struct({\n ...Account.fields,\n signIn: Schema.NullOr(SignInMethods),\n});\n\n/** A workspace as its caller has it: `role` is none for an admin who is no member. */\nexport const Workspace = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n createdAt: Schema.DateTimeUtcFromString,\n role: Schema.NullOr(WorkspaceRole),\n});\n\n/** A workspace an account is in, with what the account does there. */\nexport const AccountWorkspace = Schema.Struct({\n ...Workspace.fields,\n role: WorkspaceRole,\n});\n\nexport const WorkspaceMember = Schema.Struct({\n accountId: Schema.String,\n name: Schema.String,\n kind: Account.fields.kind,\n /** The address a person signs in with; none for a service. */\n email: Account.fields.email,\n role: WorkspaceRole,\n});\n\n/** A person's account as whoever asked for it by its address is told of it. */\nexport const AccountLookup = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n email: Schema.String,\n});\n\n/** An API token as its account sees it: never the token. */\nexport const ApiToken = Schema.Struct({\n id: Schema.String,\n accountId: Schema.String,\n name: Schema.String,\n createdAt: Schema.DateTimeUtcFromString,\n expiresAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n revokedAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n /** What it is held to. */\n scopes: Schema.Array(Scope),\n /** The resources it is held to; none for a token that reaches all its account does. */\n resources: Schema.NullOr(TokenResources),\n});\n\n/** A token as it is told once, when it is made. */\nexport const ApiTokenCreated = Schema.Struct({ ...ApiToken.fields, token: Schema.String });\n\nconst NewApiToken = Schema.Struct({\n name: Schema.NonEmptyString,\n /** How many days it is good for; for as long as it is not taken back, without. */\n /** What it does: a token is made for something, and does nothing else. */\n scopes: Schema.NonEmptyArray(Scope),\n /** The resources it is held to; all that its account reaches, without. */\n resources: Schema.optional(TokenResources),\n expiresInDays: Schema.optional(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 3650 }))),\n});\n\nexport const RegistrationToken = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n createdAt: Schema.DateTimeUtcFromString,\n /** Since when it registers no new node; the nodes that registered with it stay. */\n revokedAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n});\n\nexport const RegistrationTokenCreated = Schema.Struct({\n ...RegistrationToken.fields,\n token: Schema.String,\n});\n\n/** A node as its admin sees it: without the operator token. */\nexport const Node = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n internalUrl: Schema.String,\n balancerUrl: Schema.NullOr(Schema.String),\n publicUrl: Schema.NullOr(Schema.String),\n offers: Schema.NullOr(Offers),\n registeredAt: Schema.DateTimeUtcFromString,\n lastSeenAt: Schema.DateTimeUtcFromString,\n /** Whether its last keepalive is recent enough for it to be used. */\n alive: Schema.Boolean,\n});\n\nexport const Session = Schema.Struct({\n id: Schema.String,\n /**\n * The account that made it. A session of no workspace is that account's own; one of a\n * workspace is the workspace's, and names none where nobody is known to have made it\n * or the account was removed since.\n */\n accountId: Schema.NullOr(Schema.String),\n workspaceId: Schema.NullOr(Schema.String),\n nodeId: Schema.NullOr(Schema.String),\n /** What the node it is on is called; none for a session on no node. */\n nodeName: Schema.NullOr(Schema.String),\n desiredState: DesiredState,\n observedState: ObservedState,\n failure: Schema.NullOr(Schema.String),\n unreachableSince: Schema.NullOr(Schema.DateTimeUtcFromString),\n snapshotId: Schema.NullOr(Schema.String),\n label: Schema.NullOr(Schema.String),\n tags: Schema.Record(Schema.String, Schema.String),\n createdAt: Schema.DateTimeUtcFromString,\n observedAt: Schema.DateTimeUtcFromString,\n /**\n * Where the session is reached through a proxy before the nodes, below the proxy's own\n * address; none for a session on no node. It changes when the session moves.\n */\n path: Schema.NullOr(Schema.String),\n});\n\nexport const Snapshot = Schema.Struct({\n id: Schema.String,\n /** The account that made it, as a session's is. */\n accountId: Schema.NullOr(Schema.String),\n workspaceId: Schema.NullOr(Schema.String),\n name: Schema.NullOr(Schema.String),\n description: Schema.NullOr(Schema.String),\n tags: Schema.Record(Schema.String, Schema.String),\n sessionId: Schema.NullOr(Schema.String),\n nodeId: Schema.NullOr(Schema.String),\n shared: Schema.Boolean,\n createdAt: Schema.DateTimeUtcFromString,\n});\n\n/** What a person gave an app that asked to act as their account. */\nexport const Grant = Schema.Struct({\n id: Schema.String,\n accountId: Schema.String,\n clientId: Schema.String,\n clientName: Schema.String,\n scopes: Schema.Array(Scope),\n /** The resources it is held to; none for a grant that reaches all its account does. */\n resources: Schema.NullOr(TokenResources),\n createdAt: Schema.DateTimeUtcFromString,\n});\n\n/** A provider people sign in through, as the page that signs them in names it. */\nexport const Provider = Schema.Struct({\n /** What it is known by in addresses. */\n id: Schema.String,\n name: Schema.String,\n /** Which provider's mark it is shown with, as whoever added it said; none said, without. */\n icon: Schema.NullOr(Schema.String),\n});\n\n/** What a provider is known by: a part of the address it sends people back to. */\nexport const ProviderId = Schema.String.check(\n // `credential` is what a password is kept as, among what people sign in with.\n Schema.isPattern(/^(?!credential$)[a-z0-9][a-z0-9-]{0,39}$/u),\n);\n\n/**\n * Which provider's mark one is shown with, by what that provider is known as among those\n * the console draws: `github`, `google`. One it does not draw is shown with no mark of\n * any provider's; it is for whoever shows providers, and nothing is done by it.\n */\nconst ProviderIcon = Schema.String.check(Schema.isPattern(/^[a-z0-9][a-z0-9-]{0,39}$/u));\n\n/** What is asked of a provider for the people it signs in, each a word of its own. */\nconst ProviderScopes = Schema.Array(\n Schema.String.check(Schema.isPattern(/^[\\x21\\x23-\\x5b\\x5d-\\x7e]+$/u)),\n);\n/** The domains of email addresses, as `example.com`. */\nconst ProviderDomains = Schema.Array(\n Schema.String.check(\n Schema.isPattern(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/iu),\n ),\n);\n\n/**\n * What a provider speaks: OpenID Connect, whose signed token says who someone is, or OAuth\n * 2.0 alone, where that is asked of the provider with the token it gave.\n */\nexport const ProviderKind = Schema.Literals([\"oidc\", \"oauth2\"]);\n\n/**\n * Where a provider that speaks OAuth 2.0 alone is asked: where people are sent, where what\n * they come back with is exchanged for a token, and where the token tells who they are,\n * which is a document with their `id` or `sub`, and their `email` with `email_verified`.\n * Where it lists their addresses apart as GitHub does, each with `primary` and `verified`,\n * the one that is theirs first is taken from there. Nobody signs in on an address the\n * provider does not say it verified.\n */\nconst ProviderEndpoints = Schema.Struct({\n authorization: Schema.String,\n token: Schema.String,\n userInfo: Schema.String,\n emails: Schema.NullOr(Schema.String),\n});\nconst GivenProviderEndpoints = Schema.Struct({\n authorization: Schema.NonEmptyString,\n token: Schema.NonEmptyString,\n userInfo: Schema.NonEmptyString,\n /** None, where it is left out or empty. */\n emails: Schema.optional(Schema.NullOr(Schema.String)),\n});\n\n/**\n * A provider as an admin is told of it: all that was said of it but its client secret,\n * of which only whether there is one is told.\n */\nexport const SignInProvider = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n /** Which provider's mark it is shown with; none said, for one the settings name. */\n icon: Schema.NullOr(Schema.String),\n kind: ProviderKind,\n /**\n * Its issuer, or its discovery document where that was given in place of it; nothing\n * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.\n */\n issuer: Schema.String,\n endpoints: Schema.NullOr(ProviderEndpoints),\n clientId: Schema.String,\n secretSet: Schema.Boolean,\n scopes: Schema.Array(Schema.String),\n /** Whether someone it vouches for, whom no admin made a person, is made one. */\n provision: Schema.Boolean,\n /** The domains of the addresses people are made for so; any address where none is named. */\n domains: Schema.Array(Schema.String),\n /** Whether people sign in through it now. */\n enabled: Schema.Boolean,\n /** Kept here, where an admin changes it, or named by the settings, which alone change it. */\n source: Schema.Literals([\"stored\", \"configuration\"]),\n /** When it was added and last changed here; never, for one the settings name. */\n createdAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n updatedAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n});\n\nexport const SignInProviders = Schema.Struct({\n /** What a provider is told to send people back to, once its id is put after it. */\n callbackBase: Schema.String,\n providers: Schema.Array(SignInProvider),\n});\n\nconst NewSignInProvider = Schema.Struct({\n id: ProviderId,\n name: Schema.NonEmptyString,\n icon: Schema.optional(Schema.NullOr(ProviderIcon)),\n /** OpenID Connect, without. It stays what it is said to be here. */\n kind: Schema.optional(ProviderKind),\n /** Of one that speaks OpenID Connect, which has to have one. */\n issuer: Schema.optional(Schema.NonEmptyString),\n /** Of one that speaks OAuth 2.0 alone, which has to have them. */\n endpoints: Schema.optional(GivenProviderEndpoints),\n clientId: Schema.NonEmptyString,\n /** Told here and never again. */\n clientSecret: Schema.NonEmptyString,\n /** `openid email profile` without, and none for one that speaks OAuth 2.0 alone. */\n scopes: Schema.optional(ProviderScopes),\n provision: Schema.optional(Schema.Boolean),\n domains: Schema.optional(ProviderDomains),\n /** One that is not enabled is kept whether or not it is reached. */\n enabled: Schema.optional(Schema.Boolean),\n});\n\n/** What is said anew of a provider; what is left out stays as it was. */\nconst ChangedSignInProvider = Schema.Struct({\n name: Schema.optional(Schema.NonEmptyString),\n /** Given as none, it is shown with no provider's mark from then on. */\n icon: Schema.optional(Schema.NullOr(ProviderIcon)),\n issuer: Schema.optional(Schema.NonEmptyString),\n endpoints: Schema.optional(GivenProviderEndpoints),\n clientId: Schema.optional(Schema.NonEmptyString),\n /** The secret it has stays where none is given, or an empty one. */\n clientSecret: Schema.optional(Schema.String),\n scopes: Schema.optional(ProviderScopes),\n provision: Schema.optional(Schema.Boolean),\n domains: Schema.optional(ProviderDomains),\n enabled: Schema.optional(Schema.Boolean),\n});\n\n/** What came of asking a provider how it is reached: nothing wrong, or why not. */\nexport const ProviderChecked = Schema.Struct({\n ok: Schema.Boolean,\n /** What is wrong, each a sentence; nothing where it is reached as it should be. */\n problems: Schema.Array(Schema.String),\n /** The scopes it says it gives, where it is reached and says any. */\n scopes: Schema.Array(Schema.String),\n});\n\n/** A ticket into a session, as it is told to whoever asked for it. */\nexport const Admission = Schema.Struct({\n /** What a request to the session carries: as a bearer token, or as `token` in its query. */\n ticket: Schema.String,\n expiresAt: Schema.DateTimeUtcFromString,\n /**\n * The session's workbench, for a person to open in a browser: on its node where that\n * has an address of its own, and through the proxy before the nodes otherwise. What\n * comes before its `?` is where the session's other routes are.\n */\n url: Schema.String,\n});\n\n/** What a file of a session is found by, below its files: `recordings/1a2b.mkv`. */\nexport const SessionFilePath = Schema.String.check(\n Schema.isPattern(/^(uploads|downloads|recordings|screenshots)(\\/(?!\\.)[^/\\\\?#]+)+$/u),\n);\n\n/** An address one file of a session is read at, or put to, by whoever is given it. */\nexport const FileLink = Schema.Struct({\n url: Schema.String,\n /** What a request to it is made with: `GET` reads the file, `PUT` puts its bytes there. */\n method: Schema.Literals([\"GET\", \"PUT\"]),\n expiresAt: Schema.DateTimeUtcFromString,\n});\n\n/** The longest a file link is good for, in seconds. */\nexport const FILE_LINK_MOST = 3600;\n\n/** A share link as whoever has its session sees it: never its secret. */\nexport const Share = Schema.Struct({\n id: Schema.String,\n sessionId: Schema.String,\n /** The account that made it. */\n accountId: Schema.String,\n name: Schema.String,\n role: ShareRole,\n createdAt: Schema.DateTimeUtcFromString,\n expiresAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n lastUsedAt: Schema.NullOr(Schema.DateTimeUtcFromString),\n});\n\n/** A link as it is told once, when it is made: `url` is what a guest opens. */\nexport const ShareCreated = Schema.Struct({ ...Share.fields, url: Schema.String });\n\n/** Something that was done, by whom and to what: written once, and never changed. */\nexport const Event = Schema.Struct({\n id: Schema.String,\n at: Schema.DateTimeUtcFromString,\n kind: EventKind,\n actor: EventActor,\n /** What it was about; nothing where that is not known, as with whoever nobody knows. */\n resource: Schema.NullOr(EventResource),\n /** The workspace what it was about is of, where it is of one. */\n workspaceId: Schema.NullOr(Schema.String),\n /** Where the request that did it came from, where one did and that is known. */\n address: Schema.NullOr(Schema.String),\n detail: EventDetail,\n});\n\n/** Events, the newest first, and what the ones after them are asked for with. */\nexport const EventPage = Schema.Struct({\n events: Schema.Array(Event),\n /** The cursor of the events before these; none where these are the oldest. */\n next: Schema.NullOr(Schema.String),\n});\n\n/** Who the request comes from, for what handles it. */\nexport class CurrentCaller extends Context.Service<CurrentCaller, Caller>()(\n \"@aperture-browser/control/CurrentCaller\",\n) {}\n\n/** Lets in whoever comes with an account's API token, or with the bootstrap token. */\nexport class Authorization extends HttpApiMiddleware.Service<\n Authorization,\n { provides: CurrentCaller }\n>()(\"@aperture-browser/control/Authorization\", {\n security: { bearer: HttpApiSecurity.bearer },\n error: Unauthorized,\n}) {}\n\n/**\n * What an account, a workspace, an API token, a grant or a share link is found by. A path\n * that names one by anything else names nothing, and is refused before it is looked for.\n */\nconst Id = Schema.String.check(Schema.isUUID());\nconst session = { id: Schema.String };\n/** What a session or a snapshot is found by: names, each with what it is set to. */\nconst Tags = Schema.Record(Schema.NonEmptyString, Schema.String);\n/** A session's routing as it was last set through the control plane; none goes direct. */\nconst SessionProxy = Schema.Struct({ proxy: Schema.NullOr(ProxyConfig) });\n/** A tag something is listed by: `name=value`, or `name` alone for whatever it is set to. */\nconst TagFilter = Schema.NonEmptyString;\n/** `none` for what is of no workspace: its account's own. */\nconst WorkspaceFilter = Schema.NonEmptyString;\nconst ofNode = [\n Forbidden,\n SessionNotFound,\n SessionHasNoNode,\n NodeUnreachable,\n NodeNotFound,\n NodeRefused,\n] as const;\n\nexport class AccountsGroup extends HttpApiGroup.make(\"accounts\")\n .add(\n HttpApiEndpoint.get(\"current\", \"/account\", { success: CurrentAccount, error: Forbidden }),\n HttpApiEndpoint.get(\"tokens\", \"/account/tokens\", {\n success: Schema.Array(ApiToken),\n error: Forbidden,\n }),\n HttpApiEndpoint.post(\"createOwnToken\", \"/account/tokens\", {\n payload: NewApiToken,\n success: ApiTokenCreated.pipe(HttpApiSchema.status(201)),\n error: Forbidden,\n }),\n HttpApiEndpoint.delete(\"revokeToken\", \"/account/tokens/:id\", {\n params: { id: Id },\n error: [Forbidden, ApiTokenNotFound],\n }),\n HttpApiEndpoint.get(\"list\", \"/accounts\", {\n success: Schema.Array(ListedAccount),\n error: Forbidden,\n }),\n HttpApiEndpoint.get(\"lookup\", \"/accounts/lookup\", {\n /** The whole address: a part of one finds nobody. */\n query: { email: Schema.NonEmptyString },\n success: AccountLookup,\n error: [Forbidden, PersonNotFound],\n }),\n HttpApiEndpoint.post(\"create\", \"/accounts\", {\n payload: Schema.Struct({\n name: Schema.NonEmptyString,\n admin: Schema.optional(Schema.Boolean),\n kind: Schema.optional(Schema.Literals([\"person\", \"service\"])),\n /** For a person: the address they sign in with, once they set a password. */\n email: Schema.optional(Schema.NonEmptyString),\n }),\n success: Account.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, EmailTaken, AccountInvalid],\n }),\n HttpApiEndpoint.get(\"get\", \"/accounts/:id\", {\n params: { id: Id },\n success: ListedAccount,\n error: [Forbidden, AccountNotFound],\n }),\n HttpApiEndpoint.patch(\"change\", \"/accounts/:id\", {\n params: { id: Id },\n /** What is said anew of the account; what is left out stays as it was. */\n payload: Schema.Struct({\n name: Schema.optional(Schema.NonEmptyString),\n admin: Schema.optional(Schema.Boolean),\n }),\n success: Account,\n error: [Forbidden, AccountNotFound, AccountInUse],\n }),\n HttpApiEndpoint.post(\"resetSecondFactor\", \"/accounts/:id/second-factor/reset\", {\n params: { id: Id },\n error: [Forbidden, AccountNotFound, PersonNotFound],\n }),\n HttpApiEndpoint.post(\"disable\", \"/accounts/:id/disable\", {\n params: { id: Id },\n success: Account,\n error: [Forbidden, AccountNotFound, AccountInUse],\n }),\n HttpApiEndpoint.post(\"enable\", \"/accounts/:id/enable\", {\n params: { id: Id },\n success: Account,\n error: [Forbidden, AccountNotFound],\n }),\n HttpApiEndpoint.delete(\"remove\", \"/accounts/:id\", {\n params: { id: Id },\n error: [Forbidden, AccountNotFound, AccountInUse],\n }),\n HttpApiEndpoint.post(\"removePasskeys\", \"/accounts/:id/passkeys/remove\", {\n params: { id: Id },\n error: [Forbidden, AccountNotFound, PersonNotFound],\n }),\n HttpApiEndpoint.post(\"createSetupToken\", \"/accounts/:id/setup-token\", {\n params: { id: Id },\n success: Schema.Struct({ token: Schema.String }).pipe(HttpApiSchema.status(201)),\n error: [Forbidden, AccountNotFound, PersonNotFound],\n }),\n HttpApiEndpoint.post(\"createToken\", \"/accounts/:id/tokens\", {\n params: { id: Id },\n payload: NewApiToken,\n success: ApiTokenCreated.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, AccountNotFound],\n }),\n HttpApiEndpoint.get(\"tokensOf\", \"/accounts/:id/tokens\", {\n params: { id: Id },\n success: Schema.Array(ApiToken),\n error: [Forbidden, AccountNotFound],\n }),\n HttpApiEndpoint.delete(\"revokeTokenOf\", \"/accounts/:id/tokens/:tokenId\", {\n params: { id: Id, tokenId: Id },\n error: [Forbidden, AccountNotFound, ApiTokenNotFound],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Accounts\",\n description:\n \"Accounts and their API tokens. Only an admin makes them, changes what they are called and whether they are admins, disables them and removes them, and sees and takes back the tokens of an account that is not their own. Whoever says who is in a workspace finds a person's account by the whole of their email address.\",\n }),\n ) {}\n\nexport class NodesGroup extends HttpApiGroup.make(\"nodes\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/nodes\", { success: Schema.Array(Node), error: Forbidden }),\n HttpApiEndpoint.post(\"release\", \"/nodes/:id/release\", {\n params: { id: Id },\n error: [Forbidden, NodeNotFound],\n }),\n HttpApiEndpoint.get(\"registrationTokens\", \"/registration-tokens\", {\n success: Schema.Array(RegistrationToken),\n error: Forbidden,\n }),\n HttpApiEndpoint.post(\"createRegistrationToken\", \"/registration-tokens\", {\n payload: Schema.Struct({ name: Schema.NonEmptyString }),\n success: RegistrationTokenCreated.pipe(HttpApiSchema.status(201)),\n error: Forbidden,\n }),\n HttpApiEndpoint.delete(\"revokeRegistrationToken\", \"/registration-tokens/:id\", {\n params: { id: Id },\n error: [Forbidden, RegistrationTokenNotFound],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Nodes\",\n description:\n \"The nodes that registered, and the tokens that let nodes register. A token that is revoked registers no new node, and the nodes that registered with it stay. A node keeps its name with the operator token it registered with: nothing else registers under the name, whatever registration token it has. Releasing a node lets its name go to the next that registers under it, for a node that was installed again.\",\n }),\n ) {}\n\nexport class SessionsGroup extends HttpApiGroup.make(\"sessions\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/sessions\", {\n /** Each narrows the list; together, a session has to be all of them. */\n query: {\n workspaceId: Schema.optional(WorkspaceFilter),\n state: Schema.optional(ObservedState),\n label: Schema.optional(Schema.NonEmptyString),\n tag: Schema.optional(TagFilter),\n },\n success: Schema.Array(Session),\n error: Forbidden,\n }),\n HttpApiEndpoint.post(\"create\", \"/sessions\", {\n payload: Schema.Struct({\n suspended: Schema.optional(Schema.Boolean),\n snapshotId: Schema.optional(Schema.NonEmptyString),\n label: Schema.optional(Schema.NonEmptyString),\n /** The workspace the session is of; the caller's own account's without. */\n workspaceId: Schema.optional(Schema.NonEmptyString),\n tags: Schema.optional(Tags),\n proxy: Schema.optional(ProxyConfig),\n }),\n success: Session.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, WorkspaceNotFound, SnapshotNotFound, NoNode, NodeRefused],\n }),\n HttpApiEndpoint.get(\"get\", \"/sessions/:id\", {\n params: session,\n success: Session,\n error: [Forbidden, SessionNotFound],\n }),\n HttpApiEndpoint.patch(\"describe\", \"/sessions/:id\", {\n params: session,\n payload: Schema.Struct({\n label: Schema.optional(Schema.NullOr(Schema.NonEmptyString)),\n tags: Schema.optional(Tags),\n }),\n success: Session,\n error: [Forbidden, SessionNotFound],\n }),\n HttpApiEndpoint.get(\"proxy\", \"/sessions/:id/proxy\", {\n params: session,\n success: SessionProxy,\n error: [Forbidden, SessionNotFound],\n }),\n HttpApiEndpoint.put(\"setProxy\", \"/sessions/:id/proxy\", {\n params: session,\n payload: SessionProxy,\n success: SessionProxy,\n error: ofNode,\n }),\n HttpApiEndpoint.post(\"suspend\", \"/sessions/:id/suspend\", {\n params: session,\n success: Session,\n error: ofNode,\n }),\n HttpApiEndpoint.post(\"resume\", \"/sessions/:id/resume\", {\n params: session,\n success: Session,\n error: ofNode,\n }),\n HttpApiEndpoint.delete(\"delete\", \"/sessions/:id\", { params: session, error: ofNode }),\n HttpApiEndpoint.post(\"createTicket\", \"/sessions/:id/tickets\", {\n params: session,\n payload: Schema.Struct({\n name: Schema.optional(Schema.NonEmptyString),\n access: Schema.optional(Access),\n }),\n success: Admission.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, SessionNotFound, SessionHasNoNode],\n }),\n HttpApiEndpoint.post(\"createFileLink\", \"/sessions/:id/file-links\", {\n params: session,\n payload: Schema.Struct({\n path: SessionFilePath,\n /** A link a file is put at, in `uploads` alone; one it is read at, without. */\n write: Schema.optional(Schema.Boolean),\n /** Five minutes, without. */\n expiresInSeconds: Schema.optional(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: FILE_LINK_MOST })),\n ),\n }),\n success: FileLink.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, SessionNotFound, SessionHasNoNode, FileLinkInvalid],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Sessions\",\n description:\n \"An account's sessions, wherever they run, the tickets into them, and links to their files. A ticket with no access watches, which a token that reads sessions asks for; a ticket that does more, and a link to a file, is for a token that writes them.\",\n }),\n ) {}\n\nexport class SharesGroup extends HttpApiGroup.make(\"shares\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/sessions/:id/shares\", {\n params: session,\n success: Schema.Array(Share),\n error: [Forbidden, SessionNotFound],\n }),\n HttpApiEndpoint.post(\"create\", \"/sessions/:id/shares\", {\n params: session,\n payload: Schema.Struct({\n /** What whoever makes it knows it by; guests are not told. */\n name: Schema.NonEmptyString.check(Schema.isMaxLength(100)),\n role: ShareRole,\n /** How many hours it is good for; for as long as it is not taken back, without. */\n expiresInHours: Schema.optional(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 87_600 })),\n ),\n }),\n success: ShareCreated.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, SessionNotFound],\n }),\n HttpApiEndpoint.delete(\"revoke\", \"/sessions/:id/shares/:shareId\", {\n params: { ...session, shareId: Id },\n error: [Forbidden, SessionNotFound, ShareNotFound],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Share links\",\n description:\n \"Links that let someone with no account into one session, to watch it or to control it.\",\n }),\n ) {}\n\nexport class SnapshotsGroup extends HttpApiGroup.make(\"snapshots\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/snapshots\", {\n /** Each narrows the list; together, a snapshot has to be all of them. */\n query: {\n workspaceId: Schema.optional(WorkspaceFilter),\n name: Schema.optional(Schema.NonEmptyString),\n tag: Schema.optional(TagFilter),\n },\n success: Schema.Array(Snapshot),\n error: Forbidden,\n }),\n HttpApiEndpoint.post(\"take\", \"/sessions/:id/snapshots\", {\n params: session,\n payload: Schema.Struct({\n name: Schema.optional(Schema.NonEmptyString),\n description: Schema.optional(Schema.NonEmptyString),\n tags: Schema.optional(Tags),\n /**\n * A snapshot this one takes the place of: it is deleted once this is taken, and\n * what it was called, said to be and tagged with stays where nothing else is given.\n */\n replaces: Schema.optional(Schema.NonEmptyString),\n }),\n success: Snapshot.pipe(HttpApiSchema.status(201)),\n error: [...ofNode, SnapshotNotFound],\n }),\n HttpApiEndpoint.get(\"get\", \"/snapshots/:id\", {\n params: { id: Schema.String },\n success: Snapshot,\n error: [Forbidden, SnapshotNotFound],\n }),\n HttpApiEndpoint.patch(\"describe\", \"/snapshots/:id\", {\n params: { id: Schema.String },\n payload: Schema.Struct({\n name: Schema.optional(Schema.NullOr(Schema.NonEmptyString)),\n description: Schema.optional(Schema.NullOr(Schema.NonEmptyString)),\n tags: Schema.optional(Tags),\n }),\n success: Snapshot,\n error: [Forbidden, SnapshotNotFound],\n }),\n HttpApiEndpoint.delete(\"delete\", \"/snapshots/:id\", {\n params: { id: Schema.String },\n error: [Forbidden, SnapshotNotFound, NodeUnreachable, NodeRefused],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Snapshots\",\n description: \"Snapshots of an account's sessions, and what sessions are created from.\",\n }),\n ) {}\n\nconst workspace = { id: Id };\n\nexport class WorkspacesGroup extends HttpApiGroup.make(\"workspaces\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/workspaces\", { success: Schema.Array(Workspace) }),\n HttpApiEndpoint.post(\"create\", \"/workspaces\", {\n payload: Schema.Struct({ name: Schema.NonEmptyString }),\n success: Workspace.pipe(HttpApiSchema.status(201)),\n error: Forbidden,\n }),\n HttpApiEndpoint.patch(\"rename\", \"/workspaces/:id\", {\n params: workspace,\n payload: Schema.Struct({ name: Schema.NonEmptyString }),\n success: Workspace,\n error: [WorkspaceNotFound, Forbidden],\n }),\n HttpApiEndpoint.delete(\"delete\", \"/workspaces/:id\", {\n params: workspace,\n error: [WorkspaceNotFound, Forbidden, WorkspaceInUse],\n }),\n HttpApiEndpoint.get(\"members\", \"/workspaces/:id/members\", {\n params: workspace,\n success: Schema.Array(WorkspaceMember),\n error: [WorkspaceNotFound, Forbidden],\n }),\n HttpApiEndpoint.put(\"admit\", \"/workspaces/:id/members/:accountId\", {\n params: { ...workspace, accountId: Id },\n payload: Schema.Struct({ role: WorkspaceRole }),\n error: [WorkspaceNotFound, Forbidden, AccountNotFound],\n }),\n HttpApiEndpoint.delete(\"dismiss\", \"/workspaces/:id/members/:accountId\", {\n params: { ...workspace, accountId: Id },\n error: [WorkspaceNotFound, Forbidden],\n }),\n HttpApiEndpoint.get(\"ofAccount\", \"/accounts/:accountId/workspaces\", {\n params: { accountId: Id },\n success: Schema.Array(AccountWorkspace),\n error: [Forbidden, AccountNotFound],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Workspaces\",\n description:\n \"Where accounts keep sessions and snapshots together: what is a workspace's is all its members'. Any token is told the workspaces its account is in, of those it is held to where it is held to resources; who else is in one is for a token that reads workspaces. An admin of a workspace says who is in it, naming an account by its id; an admin is told which workspaces any account is in.\",\n }),\n ) {}\n\nexport const EVENTS_MOST = 200;\n\nexport class EventsGroup extends HttpApiGroup.make(\"events\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/events\", {\n query: {\n kind: Schema.optional(EventKind),\n /** An account's id, or a part of what the actor was called. */\n actor: Schema.optional(Schema.NonEmptyString),\n resourceKind: Schema.optional(EventResource.fields.kind),\n resourceId: Schema.optional(Schema.NonEmptyString),\n workspaceId: Schema.optional(Schema.NonEmptyString),\n /** Events from this moment on. */\n since: Schema.optional(Schema.DateTimeUtcFromString),\n /** Events before this moment. */\n until: Schema.optional(Schema.DateTimeUtcFromString),\n /** What a page before said the next is asked for with. */\n cursor: Schema.optional(Schema.String.check(Schema.isPattern(/^\\d{1,16}_[0-9a-f-]{36}$/u))),\n limit: Schema.optional(\n Schema.FiniteFromString.check(\n Schema.isInt(),\n Schema.isBetween({ minimum: 1, maximum: EVENTS_MOST }),\n ),\n ),\n },\n success: EventPage,\n error: Forbidden,\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Events\",\n description:\n \"What was done by whom, the newest first. An admin reads all of it; anyone else what their own account did or had done to it, and what was done in the workspaces they are in.\",\n }),\n ) {}\n\n/** What an app asks a person for, as its authorization request says it. */\nconst asked = { clientId: Schema.NonEmptyString, redirectUri: Schema.NonEmptyString };\n\nexport class GrantsGroup extends HttpApiGroup.make(\"grants\")\n .add(\n HttpApiEndpoint.get(\"asking\", \"/oauth/request\", {\n query: asked,\n success: Schema.Struct({ clientId: Schema.String, clientName: Schema.String }),\n error: [OAuthClientNotFound, RedirectRefused],\n }),\n HttpApiEndpoint.get(\"list\", \"/oauth/grants\", {\n success: Schema.Array(Grant),\n error: Forbidden,\n }),\n HttpApiEndpoint.post(\"approve\", \"/oauth/grants\", {\n payload: Schema.Struct({\n ...asked,\n /** What the app sent to know its own request by; it is sent back as it came. */\n state: Schema.optional(Schema.String),\n codeChallenge: Schema.NonEmptyString,\n /** What the app does: a grant is given for something, and does nothing else. */\n scopes: Schema.NonEmptyArray(Scope),\n /** The resources it is held to; all that the account reaches, without. */\n resources: Schema.optional(TokenResources),\n }),\n /** Where the person's browser goes with the answer: back to the app. */\n success: Schema.Struct({ redirectTo: Schema.String }).pipe(HttpApiSchema.status(201)),\n error: [Forbidden, OAuthClientNotFound, RedirectRefused],\n }),\n HttpApiEndpoint.delete(\"revoke\", \"/oauth/grants/:id\", {\n params: { id: Id },\n error: [Forbidden, GrantNotFound],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Grants\",\n description:\n \"What people give apps that ask to act as their account over OAuth, as MCP clients do.\",\n }),\n ) {}\n\nexport class ProvidersGroup extends HttpApiGroup.make(\"providers\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/sign-in-providers\", {\n success: SignInProviders,\n error: Forbidden,\n }),\n HttpApiEndpoint.post(\"create\", \"/sign-in-providers\", {\n payload: NewSignInProvider,\n success: SignInProvider.pipe(HttpApiSchema.status(201)),\n error: [Forbidden, ProviderTaken, ProviderInvalid],\n }),\n HttpApiEndpoint.post(\"check\", \"/sign-in-providers/check\", {\n // An issuer, or where a provider without one is asked.\n payload: Schema.Struct({\n issuer: Schema.optional(Schema.String),\n endpoints: Schema.optional(GivenProviderEndpoints),\n }),\n success: ProviderChecked,\n error: Forbidden,\n }),\n HttpApiEndpoint.patch(\"change\", \"/sign-in-providers/:id\", {\n params: { id: Schema.String },\n payload: ChangedSignInProvider,\n success: SignInProvider,\n error: [Forbidden, ProviderNotFound, ProviderConfigured, ProviderInvalid],\n }),\n HttpApiEndpoint.delete(\"remove\", \"/sign-in-providers/:id\", {\n params: { id: Schema.String },\n error: [Forbidden, ProviderNotFound, ProviderConfigured],\n }),\n )\n .annotateMerge(\n OpenApi.annotations({\n title: \"Sign-in providers\",\n description:\n \"The providers people sign in through, which an admin adds, changes, disables and removes while the control plane runs. One speaks OpenID Connect and says at its issuer how it is reached, or OAuth 2.0 alone, as GitHub does, and is asked where it is said to be. Those the settings name are told beside them and changed there alone. A client secret is given and never told. Removing or disabling a provider removes nobody: whoever came through it alone does not sign in until it is back.\",\n }),\n ) {}\n\nexport class SignInGroup extends HttpApiGroup.make(\"signIn\")\n .add(HttpApiEndpoint.get(\"providers\", \"/sign-in/providers\", { success: Schema.Array(Provider) }))\n .annotateMerge(\n OpenApi.annotations({\n title: \"Signing in\",\n description:\n \"What whoever is not signed in yet is told: the providers people sign in through.\",\n }),\n ) {}\n\n/** Whether this program serves: nothing of what it knows, and for anyone who asks. */\nexport const Health = Schema.Struct({ status: Schema.Literal(\"ok\") });\n\nexport class HealthGroup extends HttpApiGroup.make(\"health\")\n .add(HttpApiEndpoint.get(\"check\", \"/health\", { success: Health }))\n .annotateMerge(\n OpenApi.annotations({\n title: \"Health\",\n description:\n \"Whether the control plane serves, for what stands before it and what starts it: answered once its database is there, to anyone, and telling nothing.\",\n }),\n ) {}\n\nexport class Api extends HttpApi.make(\"control\")\n .add(\n AccountsGroup,\n EventsGroup,\n GrantsGroup,\n NodesGroup,\n ProvidersGroup,\n SessionsGroup,\n SharesGroup,\n SnapshotsGroup,\n WorkspacesGroup,\n )\n .middleware(Authorization)\n // After the middleware, so that it has none: it is asked before anyone is signed in.\n .add(SignInGroup, HealthGroup)\n .prefix(PREFIX)\n .annotateMerge(\n OpenApi.annotations({\n title: \"Aperture control plane\",\n version: manifest.version,\n description:\n \"Accounts, nodes, where sessions run, and tickets into them. A request carries an account's API token, or the access token an app was given over OAuth, as `Authorization: Bearer`.\",\n }),\n ) {}\n"],"mappings":";;;;;;;;;;;;;;;ACGA,MAAa,SAAS,OAAO,OAAO;CAClC,SAAS,OAAO;CAChB,UAAU,OAAO,MAAM,OAAO,MAAM;CACpC,SAAS,OAAO,OAAO;EAAE,KAAK,OAAO;EAAQ,KAAK,OAAO;CAAO,CAAC;;CAEjE,QAAQ,OAAO,OAAO;EACpB,aAAa,OAAO,SAAS,OAAO,MAAM;EAC1C,WAAW,OAAO,SAAS,OAAO,MAAM;EACxC,MAAM,OAAO,SAAS,OAAO,MAAM;EACnC,OAAO,OAAO,SAAS,OAAO,MAAM;EACpC,yBAAyB,OAAO,SAAS,OAAO,MAAM;CACxD,CAAC;CACD,gBAAgB,OAAO;;CAEvB,iBAAiB,OAAO;AAC1B,CAAC;;AAID,MAAa,eAAe,OAAO,S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