@rizom/brain 0.2.0-alpha.822 → 0.2.0-alpha.823

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.
Files changed (40) hide show
  1. package/dist/brain.js +11 -7
  2. package/dist/chunks/{app-x5ags7n8.js → app-8p354rxy.js} +2 -2
  3. package/dist/chunks/{index-1xm2ws26.js → index-hhe7r0r5.js} +2 -2
  4. package/dist/chunks/{index-3wbg3gv2.js → index-m3fw7nkx.js} +3 -3
  5. package/dist/chunks/{index-3wbg3gv2.js.map → index-m3fw7nkx.js.map} +1 -1
  6. package/dist/chunks/{package-jj91t0jr.js → package-1xq2edaj.js} +3 -3
  7. package/dist/chunks/{package-jj91t0jr.js.map → package-1xq2edaj.js.map} +1 -1
  8. package/dist/model.js +11 -7
  9. package/dist/model.js.map +3 -3
  10. package/dist/testing.js +1 -1
  11. package/dist/ui/{studio-app-ybpja4vs.js → studio-app-806251hx.js} +73 -73
  12. package/dist/ui/{studio-app-ybpja4vs.js.map → studio-app-806251hx.js.map} +9 -9
  13. package/dist/ui/{studio-app-299bc21a487d86a0917e18b15021a67ce1ff646a3f4410acbf468ae724eb7697.css → studio-app-aa4b5c43029f4bcf2634cf22ce709f38c4c3f3e76ce8536c02e34f69cf4070de.css} +30 -10
  14. package/dist/ui/studio-asset-manifest.json +21 -21
  15. package/dist/ui/studio-chunks/account-view-5phxhdkh.js +3 -0
  16. package/dist/ui/studio-chunks/{account-view-f6tx0x5d.js.map → account-view-5phxhdkh.js.map} +5 -5
  17. package/dist/ui/studio-chunks/{main-dc5jm272.js → main-0abemqev.js} +3 -3
  18. package/dist/ui/studio-chunks/{main-dc5jm272.js.map → main-0abemqev.js.map} +3 -3
  19. package/dist/ui/studio-chunks/main-6g5fzsxw.js +50 -0
  20. package/dist/ui/studio-chunks/main-6g5fzsxw.js.map +13 -0
  21. package/dist/ui/studio-chunks/main-93y3c3h0.js +9 -0
  22. package/dist/ui/studio-chunks/{main-8qf4xha3.js.map → main-93y3c3h0.js.map} +4 -4
  23. package/dist/ui/studio-chunks/main-s8zdvm8f.js +4 -0
  24. package/dist/ui/studio-chunks/{main-111gxvm4.js.map → main-s8zdvm8f.js.map} +6 -6
  25. package/dist/ui/studio-chunks/main-vxh48hfv.js +4 -0
  26. package/dist/ui/studio-chunks/{main-rp13zvyt.js.map → main-vxh48hfv.js.map} +3 -3
  27. package/dist/ui/studio-chunks/{studio-ask-panel-hx4f3mhj.js → studio-ask-panel-rabq6xrz.js} +1 -1
  28. package/dist/ui/studio-chunks/studio-chat-workspace-pra29908.js +3 -0
  29. package/dist/ui/studio-chunks/{studio-chat-workspace-5vyfd9dn.js.map → studio-chat-workspace-pra29908.js.map} +3 -3
  30. package/package.json +1 -1
  31. package/dist/ui/studio-chunks/account-view-f6tx0x5d.js +0 -3
  32. package/dist/ui/studio-chunks/main-111gxvm4.js +0 -4
  33. package/dist/ui/studio-chunks/main-8qf4xha3.js +0 -9
  34. package/dist/ui/studio-chunks/main-hmvrv50n.js +0 -50
  35. package/dist/ui/studio-chunks/main-hmvrv50n.js.map +0 -13
  36. package/dist/ui/studio-chunks/main-rp13zvyt.js +0 -4
  37. package/dist/ui/studio-chunks/studio-chat-workspace-5vyfd9dn.js +0 -3
  38. /package/dist/chunks/{app-x5ags7n8.js.map → app-8p354rxy.js.map} +0 -0
  39. /package/dist/chunks/{index-1xm2ws26.js.map → index-hhe7r0r5.js.map} +0 -0
  40. /package/dist/ui/studio-chunks/{studio-ask-panel-hx4f3mhj.js.map → studio-ask-panel-rabq6xrz.js.map} +0 -0
@@ -2,19 +2,19 @@
2
2
  "version": 3,
3
3
  "sources": ["../../ui-react/src/account/account-view.tsx", "../../ui-react/src/account/account-api.ts", "../../ui-react/src/account/account-format.ts", "../../ui-react/src/account/account-primitives.tsx", "../../ui-react/src/account/account-settings.ts", "../../ui-react/src/account/account-tabs.tsx", "../../ui-react/src/account/account-ai-tools.tsx", "../../ui-react/src/account/ai-tool-clients.ts", "../../ui-react/src/account/account-drive.tsx", "../../ui-react/src/account/drive-clients.ts", "../../ui-react/src/account/use-account-actions.ts"],
4
4
  "sourcesContent": [
5
- "/** @jsxImportSource react */\nimport { headStyles } from \"../studio-page-head.styles\";\nimport {\n ConfirmDialog,\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n} from \"@brains/app-ui-react\";\nimport {\n accountClass,\n accountStyles as accountLayout,\n} from \"../studio-account.styles\";\nimport type { AuthAccountRole, AuthAccountSnapshot } from \"@brains/contracts\";\nimport {\n STUDIO_AI_TOOLS_SECTION,\n STUDIO_DRIVE_SECTION,\n} from \"@brains/contracts\";\nimport { useMemo, useState } from \"react\";\nimport { AccountClient } from \"./account-api\";\nimport {\n AccountIdentitiesTab,\n AccountProfileTab,\n AccountSecurityTab,\n AccountSettingsTab,\n} from \"./account-tabs\";\nimport { AccountAiToolsTab } from \"./account-ai-tools\";\nimport { AccountDriveTab } from \"./account-drive\";\nimport type { DriveConnect } from \"./drive-connect\";\nimport { useAccountActions } from \"./use-account-actions\";\nimport { useStudioApi } from \"../studio-api-context\";\nimport { StudioPageHead, studioAccessRequirement } from \"../studio-page-head\";\n\nexport interface AccountBootstrap {\n displayName: string;\n role: AuthAccountRole;\n routePath: string;\n studioPath: string;\n /** This brain's MCP address, present when the person can connect AI tools. */\n mcpUrl?: string | undefined;\n /** This brain's WebDAV address, present when the person can mount it. */\n davUrl?: string | undefined;\n /** Tab to open first, from the `section` query parameter. */\n initialSection?: string | undefined;\n /** Obsidian asked to connect to this brain: Drive opens with its card. */\n connect?: DriveConnect | undefined;\n}\n\nconst ACCOUNT_SECTIONS = [\n \"profile\",\n \"security\",\n \"identities\",\n \"settings\",\n STUDIO_AI_TOOLS_SECTION,\n STUDIO_DRIVE_SECTION,\n] as const;\n\nfunction openingSection(bootstrap: AccountBootstrap): string {\n const requested = bootstrap.connect\n ? STUDIO_DRIVE_SECTION\n : ACCOUNT_SECTIONS.find((section) => section === bootstrap.initialSection);\n if (\n !requested ||\n (requested === STUDIO_AI_TOOLS_SECTION && !bootstrap.mcpUrl) ||\n (requested === STUDIO_DRIVE_SECTION && !bootstrap.davUrl)\n ) {\n return \"profile\";\n }\n return requested;\n}\n\n/** What Account covers, naming only the sections it shows. */\nfunction accountScope(sections: {\n settings: boolean;\n aiTools: boolean;\n drive: boolean;\n}): string {\n const parts = [\n \"your profile\",\n \"sign-in security\",\n \"linked identities\",\n ...(sections.settings ? [\"personal settings\"] : []),\n ...(sections.aiTools ? [\"AI tools\"] : []),\n ...(sections.drive ? [\"your drive\"] : []),\n ];\n const list = `${parts.slice(0, -1).join(\", \")} and ${parts.at(-1)}`;\n return `Your account on this brain. Manage ${list} here—not shared services or other people’s access.`;\n}\n\nexport interface AccountAppProps {\n bootstrap: AccountBootstrap;\n initialAccount?: AuthAccountSnapshot;\n /** Defaults to a client on the provided Studio transport. */\n client?: AccountClient | undefined;\n}\n\nexport function AccountApp({\n bootstrap,\n initialAccount,\n client: providedClient,\n}: AccountAppProps): React.ReactElement {\n const api = useStudioApi();\n const client = useMemo(\n () => providedClient ?? new AccountClient({ fetch: api.fetch }),\n [providedClient, api],\n );\n const actions = useAccountActions({\n client,\n initialAccount,\n initialDisplayName: bootstrap.displayName,\n routePath: bootstrap.routePath,\n });\n const { account: current, status, error, busy, confirmation } = actions;\n const [section, setSection] = useState(() => openingSection(bootstrap));\n const title = current?.displayName ?? bootstrap.displayName;\n\n return (\n <>\n <div\n className={accountClass(\n \"account-shell\",\n accountLayout.shell,\n headStyles.inset,\n )}\n >\n <StudioPageHead\n model={{\n access: studioAccessRequirement(\"public\"),\n title: \"Your account\",\n totals: [],\n }}\n />\n <p className={accountClass(\"account-scope\", accountLayout.description)}>\n {accountScope({\n settings: (current?.pluginSettings.length ?? 0) > 0,\n aiTools: Boolean(bootstrap.mcpUrl),\n drive: Boolean(bootstrap.davUrl),\n })}\n </p>\n <p\n className={accountClass(\n `account-status${error ? \" is-error\" : \"\"}`,\n accountLayout.feedback,\n error && accountLayout.feedbackError,\n )}\n role=\"status\"\n aria-live=\"polite\"\n >\n {status}\n </p>\n\n {!current ? (\n <p className={accountClass(\"account-loading\", accountLayout.loading)}>\n Reading your account…\n </p>\n ) : (\n <Tabs\n className=\"account-details\"\n value={section}\n onValueChange={setSection}\n >\n <TabsList\n aria-label=\"Account sections\"\n className={accountClass(\"account-tabs\", accountLayout.tabs)}\n >\n <TabsTrigger value=\"profile\" disabled={busy}>\n Profile\n </TabsTrigger>\n <TabsTrigger value=\"security\" disabled={busy}>\n Sign-in &amp; sessions\n </TabsTrigger>\n <TabsTrigger value=\"identities\" disabled={busy}>\n Linked identities\n </TabsTrigger>\n {current.pluginSettings.length > 0 && (\n <TabsTrigger value=\"settings\" disabled={busy}>\n Personal settings\n </TabsTrigger>\n )}\n {bootstrap.mcpUrl && (\n <TabsTrigger value={STUDIO_AI_TOOLS_SECTION} disabled={busy}>\n AI tools\n </TabsTrigger>\n )}\n {bootstrap.davUrl && (\n <TabsTrigger value={STUDIO_DRIVE_SECTION} disabled={busy}>\n Drive\n </TabsTrigger>\n )}\n </TabsList>\n <TabsContent\n value=\"profile\"\n forceMount\n hidden={section !== \"profile\"}\n className={accountClass(\n \"account-detail-sections\",\n accountLayout.tabPanel,\n )}\n >\n <AccountProfileTab\n account={current}\n actions={actions}\n title={title}\n studioPath={bootstrap.studioPath}\n />\n </TabsContent>\n <TabsContent\n value=\"identities\"\n forceMount\n hidden={section !== \"identities\"}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountIdentitiesTab account={current} />\n </TabsContent>\n {current.pluginSettings.length > 0 && (\n <TabsContent\n value=\"settings\"\n forceMount\n hidden={section !== \"settings\"}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountSettingsTab account={current} actions={actions} />\n </TabsContent>\n )}\n <TabsContent\n value=\"security\"\n forceMount\n hidden={section !== \"security\"}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountSecurityTab account={current} actions={actions} />\n </TabsContent>\n {bootstrap.mcpUrl && (\n <TabsContent\n value={STUDIO_AI_TOOLS_SECTION}\n forceMount\n hidden={section !== STUDIO_AI_TOOLS_SECTION}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountAiToolsTab mcpUrl={bootstrap.mcpUrl} />\n </TabsContent>\n )}\n {bootstrap.davUrl && (\n <TabsContent\n value={STUDIO_DRIVE_SECTION}\n forceMount\n hidden={section !== STUDIO_DRIVE_SECTION}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountDriveTab\n davUrl={bootstrap.davUrl}\n account={current}\n actions={actions}\n connect={bootstrap.connect}\n />\n </TabsContent>\n )}\n </Tabs>\n )}\n </div>\n {confirmation && (\n <ConfirmDialog\n mark=\"!\"\n title={confirmation.title}\n titleId=\"account-confirmation-title\"\n cancelLabel=\"Cancel\"\n confirmLabel={confirmation.confirmLabel}\n confirmVariant=\"danger\"\n pending={busy}\n onCancel={actions.cancelConfirmation}\n onConfirm={actions.confirm}\n >\n <p>{confirmation.message}</p>\n </ConfirmDialog>\n )}\n </>\n );\n}\n",
5
+ "/** @jsxImportSource react */\nimport { headStyles } from \"../studio-page-head.styles\";\nimport {\n ConfirmDialog,\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n} from \"@brains/app-ui-react\";\nimport {\n accountClass,\n accountStyles as accountLayout,\n} from \"../studio-account.styles\";\nimport type { AuthAccountRole, AuthAccountSnapshot } from \"@brains/contracts\";\nimport {\n STUDIO_AI_TOOLS_SECTION,\n STUDIO_DRIVE_SECTION,\n} from \"@brains/contracts\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { AccountClient } from \"./account-api\";\nimport {\n AccountIdentitiesTab,\n AccountProfileTab,\n AccountSecurityTab,\n AccountSettingsTab,\n} from \"./account-tabs\";\nimport { AccountAiToolsTab } from \"./account-ai-tools\";\nimport { AccountDriveTab } from \"./account-drive\";\nimport type { DriveConnect } from \"./drive-connect\";\nimport { useAccountActions } from \"./use-account-actions\";\nimport { useStudioApi } from \"../studio-api-context\";\nimport { StudioPageHead, studioAccessRequirement } from \"../studio-page-head\";\n\nexport interface AccountBootstrap {\n displayName: string;\n role: AuthAccountRole;\n routePath: string;\n studioPath: string;\n /** This brain's MCP address, present when the person can connect AI tools. */\n mcpUrl?: string | undefined;\n /** This brain's WebDAV address, present when the person can mount it. */\n davUrl?: string | undefined;\n /** Tab to open first, from the `section` query parameter. */\n initialSection?: string | undefined;\n /** Obsidian asked to connect to this brain: Drive opens with its card. */\n connect?: DriveConnect | undefined;\n}\n\nconst ACCOUNT_SECTIONS = [\n \"profile\",\n \"security\",\n \"identities\",\n \"settings\",\n STUDIO_AI_TOOLS_SECTION,\n STUDIO_DRIVE_SECTION,\n] as const;\n\nfunction openingSection(bootstrap: AccountBootstrap): string {\n const requested = bootstrap.connect\n ? STUDIO_DRIVE_SECTION\n : ACCOUNT_SECTIONS.find((section) => section === bootstrap.initialSection);\n if (\n !requested ||\n (requested === STUDIO_AI_TOOLS_SECTION && !bootstrap.mcpUrl) ||\n (requested === STUDIO_DRIVE_SECTION && !bootstrap.davUrl)\n ) {\n return \"profile\";\n }\n return requested;\n}\n\n/** What Account covers, naming only the sections it shows. */\nfunction accountScope(sections: {\n settings: boolean;\n aiTools: boolean;\n drive: boolean;\n}): string {\n const parts = [\n \"your profile\",\n \"sign-in security\",\n \"linked identities\",\n ...(sections.settings ? [\"personal settings\"] : []),\n ...(sections.aiTools ? [\"AI tools\"] : []),\n ...(sections.drive ? [\"your drive\"] : []),\n ];\n const list = `${parts.slice(0, -1).join(\", \")} and ${parts.at(-1)}`;\n return `Your account on this brain. Manage ${list} here—not shared services or other people’s access.`;\n}\n\nexport interface AccountAppProps {\n bootstrap: AccountBootstrap;\n initialAccount?: AuthAccountSnapshot;\n /** Defaults to a client on the provided Studio transport. */\n client?: AccountClient | undefined;\n}\n\nexport function AccountApp({\n bootstrap,\n initialAccount,\n client: providedClient,\n}: AccountAppProps): React.ReactElement {\n const api = useStudioApi();\n const client = useMemo(\n () => providedClient ?? new AccountClient({ fetch: api.fetch }),\n [providedClient, api],\n );\n const actions = useAccountActions({\n client,\n initialAccount,\n initialDisplayName: bootstrap.displayName,\n routePath: bootstrap.routePath,\n });\n const { account: current, status, error, busy, confirmation } = actions;\n const [section, setSection] = useState(() => openingSection(bootstrap));\n // On a phone the tabs scroll as one row: the open one is kept in view.\n useEffect(() => {\n document\n .querySelector('.account-tabs [role=\"tab\"][aria-selected=\"true\"]')\n ?.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n }, [section]);\n const title = current?.displayName ?? bootstrap.displayName;\n\n return (\n <>\n <div\n className={accountClass(\n \"account-shell\",\n accountLayout.shell,\n headStyles.inset,\n )}\n >\n <StudioPageHead\n model={{\n access: studioAccessRequirement(\"public\"),\n title: \"Your account\",\n totals: [],\n }}\n />\n <p className={accountClass(\"account-scope\", accountLayout.description)}>\n {accountScope({\n settings: (current?.pluginSettings.length ?? 0) > 0,\n aiTools: Boolean(bootstrap.mcpUrl),\n drive: Boolean(bootstrap.davUrl),\n })}\n </p>\n <p\n className={accountClass(\n `account-status${error ? \" is-error\" : \"\"}`,\n accountLayout.feedback,\n error && accountLayout.feedbackError,\n )}\n role=\"status\"\n aria-live=\"polite\"\n >\n {status}\n </p>\n\n {!current ? (\n <p className={accountClass(\"account-loading\", accountLayout.loading)}>\n Reading your account…\n </p>\n ) : (\n <Tabs\n className=\"account-details\"\n value={section}\n onValueChange={setSection}\n >\n <TabsList\n aria-label=\"Account sections\"\n className={accountClass(\"account-tabs\", accountLayout.tabs)}\n >\n <TabsTrigger value=\"profile\" disabled={busy}>\n Profile\n </TabsTrigger>\n <TabsTrigger value=\"security\" disabled={busy}>\n Sign-in &amp; sessions\n </TabsTrigger>\n <TabsTrigger value=\"identities\" disabled={busy}>\n Linked identities\n </TabsTrigger>\n {current.pluginSettings.length > 0 && (\n <TabsTrigger value=\"settings\" disabled={busy}>\n Personal settings\n </TabsTrigger>\n )}\n {bootstrap.mcpUrl && (\n <TabsTrigger value={STUDIO_AI_TOOLS_SECTION} disabled={busy}>\n AI tools\n </TabsTrigger>\n )}\n {bootstrap.davUrl && (\n <TabsTrigger value={STUDIO_DRIVE_SECTION} disabled={busy}>\n Drive\n </TabsTrigger>\n )}\n </TabsList>\n <TabsContent\n value=\"profile\"\n forceMount\n hidden={section !== \"profile\"}\n className={accountClass(\n \"account-detail-sections\",\n accountLayout.tabPanel,\n )}\n >\n <AccountProfileTab\n account={current}\n actions={actions}\n title={title}\n studioPath={bootstrap.studioPath}\n />\n </TabsContent>\n <TabsContent\n value=\"identities\"\n forceMount\n hidden={section !== \"identities\"}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountIdentitiesTab account={current} />\n </TabsContent>\n {current.pluginSettings.length > 0 && (\n <TabsContent\n value=\"settings\"\n forceMount\n hidden={section !== \"settings\"}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountSettingsTab account={current} actions={actions} />\n </TabsContent>\n )}\n <TabsContent\n value=\"security\"\n forceMount\n hidden={section !== \"security\"}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountSecurityTab account={current} actions={actions} />\n </TabsContent>\n {bootstrap.mcpUrl && (\n <TabsContent\n value={STUDIO_AI_TOOLS_SECTION}\n forceMount\n hidden={section !== STUDIO_AI_TOOLS_SECTION}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountAiToolsTab mcpUrl={bootstrap.mcpUrl} />\n </TabsContent>\n )}\n {bootstrap.davUrl && (\n <TabsContent\n value={STUDIO_DRIVE_SECTION}\n forceMount\n hidden={section !== STUDIO_DRIVE_SECTION}\n className={accountClass(\"\", accountLayout.tabPanel)}\n >\n <AccountDriveTab\n davUrl={bootstrap.davUrl}\n account={current}\n actions={actions}\n connect={bootstrap.connect}\n />\n </TabsContent>\n )}\n </Tabs>\n )}\n </div>\n {confirmation && (\n <ConfirmDialog\n mark=\"!\"\n title={confirmation.title}\n titleId=\"account-confirmation-title\"\n cancelLabel=\"Cancel\"\n confirmLabel={confirmation.confirmLabel}\n confirmVariant=\"danger\"\n pending={busy}\n onCancel={actions.cancelConfirmation}\n onConfirm={actions.confirm}\n >\n <p>{confirmation.message}</p>\n </ConfirmDialog>\n )}\n </>\n );\n}\n",
6
6
  "import type {\n AuthAccountAppPasswordSecret,\n AuthAccountMutation,\n AuthAccountPluginSettingsMutation,\n AuthAccountSnapshot,\n} from \"@brains/contracts\";\nimport { z } from \"@brains/utils/zod\";\nimport { isRecord } from \"@brains/utils/is-record\";\nimport type { FetchLike } from \"@brains/utils/fetch-like\";\n\nexport interface AccountMutationResponse {\n account?: AuthAccountSnapshot;\n /** Present once, in the answer to creating an app password. */\n appPassword?: AuthAccountAppPasswordSecret;\n revoked?: { sessions: number; refreshTokens?: number };\n signedOut?: boolean;\n}\n\ninterface RegistrationOptionsJSON {\n challenge: string;\n rp: PublicKeyCredentialRpEntity;\n user: Omit<PublicKeyCredentialUserEntity, \"id\"> & { id: string };\n pubKeyCredParams: PublicKeyCredentialParameters[];\n timeout?: number;\n excludeCredentials?: Array<\n Omit<PublicKeyCredentialDescriptor, \"id\"> & { id: string }\n >;\n authenticatorSelection?: AuthenticatorSelectionCriteria;\n attestation?: AttestationConveyancePreference;\n extensions?: AuthenticationExtensionsClientInputs;\n}\n\nconst rawAccountSnapshotSchema = z.object({\n displayName: z.string(),\n role: z.enum([\"admin\", \"trusted\", \"public\"]),\n profileEntityId: z.string().optional(),\n passkeys: z.array(\n z.object({\n id: z.string(),\n transports: z.array(z.string()).optional(),\n credentialDeviceType: z.string().optional(),\n credentialBackedUp: z.boolean(),\n createdAt: z.number(),\n updatedAt: z.number(),\n }),\n ),\n appPasswords: z.array(\n z.object({\n id: z.string(),\n username: z.string(),\n label: z.string(),\n access: z.enum([\"read\", \"write\"]),\n createdAt: z.number(),\n expiresAt: z.number(),\n lastUsedAt: z.number().optional(),\n }),\n ),\n connectedChannels: z.array(\n z.object({\n type: z.string(),\n label: z.string(),\n verifiedAt: z.number(),\n }),\n ),\n pluginSettings: z.array(\n z.object({\n id: z.string(),\n title: z.string(),\n description: z.string().optional(),\n configured: z.boolean(),\n revision: z.number().nullable(),\n fields: z.array(\n z.object({\n name: z.string(),\n label: z.string(),\n control: z.enum([\"text\", \"url\", \"number\", \"checkbox\"]),\n secret: z.boolean(),\n required: z.boolean(),\n value: z\n .union([z.string(), z.number(), z.boolean(), z.null()])\n .optional(),\n set: z.boolean().optional(),\n }),\n ),\n }),\n ),\n sessions: z.array(\n z.object({\n id: z.string(),\n current: z.boolean(),\n createdAt: z.number(),\n expiresAt: z.number(),\n }),\n ),\n});\n\nfunction isAccountSnapshot(value: unknown): value is AuthAccountSnapshot {\n return rawAccountSnapshotSchema.safeParse(value).success;\n}\n\nconst accountSnapshotSchema = z.custom<AuthAccountSnapshot>(isAccountSnapshot, {\n message: \"Invalid account response\",\n});\nconst accountResponseSchema = z.object({\n account: accountSnapshotSchema,\n});\n\nconst rawAccountMutationResponseSchema = z.object({\n account: accountSnapshotSchema.optional(),\n appPassword: z\n .object({ username: z.string(), password: z.string() })\n .optional(),\n revoked: z\n .object({\n sessions: z.number(),\n refreshTokens: z.number().optional(),\n })\n .optional(),\n signedOut: z.boolean().optional(),\n});\n\nfunction isAccountMutationResponse(\n value: unknown,\n): value is AccountMutationResponse {\n return rawAccountMutationResponseSchema.safeParse(value).success;\n}\n\nconst accountMutationResponseSchema = z.custom<AccountMutationResponse>(\n isAccountMutationResponse,\n { message: \"Invalid account mutation response\" },\n);\n\nconst registrationOptionsSchema = z.custom<RegistrationOptionsJSON>(\n (value) => {\n if (!isRecord(value)) return false;\n return (\n typeof value[\"challenge\"] === \"string\" &&\n isRecord(value[\"rp\"]) &&\n isRecord(value[\"user\"]) &&\n Array.isArray(value[\"pubKeyCredParams\"])\n );\n },\n { message: \"Invalid passkey registration options\" },\n);\n\nexport class AccountApiError extends Error {\n readonly status: number;\n\n constructor(message: string, status: number) {\n super(message);\n this.name = \"AccountApiError\";\n this.status = status;\n }\n}\n\nasync function parseResponse<T>(\n response: Response,\n schema: z.ZodType<T>,\n): Promise<T> {\n let body: unknown;\n try {\n body = await response.json();\n } catch {\n body = {};\n }\n if (!response.ok) {\n const error =\n typeof body === \"object\" &&\n body !== null &&\n \"error\" in body &&\n typeof body.error === \"string\"\n ? body.error\n : \"Account request failed\";\n throw new AccountApiError(error, response.status);\n }\n return schema.parse(body);\n}\n\nfunction decodeBase64Url(value: string): ArrayBuffer {\n const base64 = value\n .replaceAll(\"-\", \"+\")\n .replaceAll(\"_\", \"/\")\n .padEnd(Math.ceil(value.length / 4) * 4, \"=\");\n return Uint8Array.from(atob(base64), (character) => character.charCodeAt(0))\n .buffer;\n}\n\nfunction encodeBase64Url(value: ArrayBuffer): string {\n const bytes = new Uint8Array(value);\n let binary = \"\";\n for (const byte of bytes) binary += String.fromCharCode(byte);\n return btoa(binary)\n .replaceAll(\"+\", \"-\")\n .replaceAll(\"/\", \"_\")\n .replace(/=+$/, \"\");\n}\n\nfunction prepareCreationOptions(\n options: RegistrationOptionsJSON,\n): PublicKeyCredentialCreationOptions {\n return {\n challenge: decodeBase64Url(options.challenge),\n rp: options.rp,\n user: { ...options.user, id: decodeBase64Url(options.user.id) },\n pubKeyCredParams: options.pubKeyCredParams,\n ...(options.timeout !== undefined ? { timeout: options.timeout } : {}),\n ...(options.excludeCredentials\n ? {\n excludeCredentials: options.excludeCredentials.map((credential) => ({\n ...credential,\n id: decodeBase64Url(credential.id),\n })),\n }\n : {}),\n ...(options.authenticatorSelection\n ? { authenticatorSelection: options.authenticatorSelection }\n : {}),\n ...(options.attestation ? { attestation: options.attestation } : {}),\n ...(options.extensions ? { extensions: options.extensions } : {}),\n };\n}\n\n/**\n * The account endpoints, on an injected transport. Production leaves fetch\n * unset and the client uses the global; a test hands in a fake.\n */\nexport interface AccountClientDeps {\n fetch?: FetchLike | undefined;\n}\n\nconst globalFetch: FetchLike = (input, init) => fetch(input, init);\n\nexport class AccountClient {\n private readonly fetchFn: FetchLike;\n\n constructor(deps: AccountClientDeps = {}) {\n this.fetchFn = deps.fetch ?? globalFetch;\n }\n\n async fetchAccount(): Promise<AuthAccountSnapshot> {\n const response = await parseResponse(\n await this.fetchFn(\"/auth/account\", {\n credentials: \"same-origin\",\n cache: \"no-store\",\n }),\n accountResponseSchema,\n );\n return response.account;\n }\n\n async mutatePluginSettings(\n mutation: AuthAccountPluginSettingsMutation,\n ): Promise<AuthAccountSnapshot> {\n const response = await parseResponse(\n await this.fetchFn(\"/auth/account/plugin-settings\", {\n method: \"POST\",\n credentials: \"same-origin\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(mutation),\n }),\n accountResponseSchema,\n );\n return response.account;\n }\n\n async mutateAccount(\n mutation: AuthAccountMutation,\n ): Promise<AccountMutationResponse> {\n return parseResponse(\n await this.fetchFn(\"/auth/account/mutations\", {\n method: \"POST\",\n credentials: \"same-origin\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(mutation),\n }),\n accountMutationResponseSchema,\n );\n }\n\n async registerPasskey(): Promise<AuthAccountSnapshot> {\n const options = await parseResponse(\n await this.fetchFn(\"/auth/account/passkeys/options\", {\n method: \"POST\",\n credentials: \"same-origin\",\n headers: { \"Content-Type\": \"application/json\" },\n body: \"{}\",\n }),\n registrationOptionsSchema,\n );\n const created = await navigator.credentials.create({\n publicKey: prepareCreationOptions(options),\n });\n if (!(created instanceof PublicKeyCredential)) {\n throw new Error(\"Passkey registration was cancelled\");\n }\n if (!(created.response instanceof AuthenticatorAttestationResponse)) {\n throw new Error(\"Authenticator returned an invalid passkey response\");\n }\n const response = created.response;\n const payload = {\n id: created.id,\n rawId: encodeBase64Url(created.rawId),\n type: created.type,\n ...(created.authenticatorAttachment\n ? { authenticatorAttachment: created.authenticatorAttachment }\n : {}),\n clientExtensionResults: created.getClientExtensionResults(),\n response: {\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n attestationObject: encodeBase64Url(response.attestationObject),\n transports:\n typeof response.getTransports === \"function\"\n ? response.getTransports()\n : [],\n },\n };\n const result = await parseResponse(\n await this.fetchFn(\"/auth/account/passkeys/verify\", {\n method: \"POST\",\n credentials: \"same-origin\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n }),\n accountResponseSchema.extend({ verified: z.literal(true) }),\n );\n return result.account;\n }\n}\n",
7
7
  "export function initials(displayName: string): string {\n return displayName\n .split(/\\s+/)\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => part.slice(0, 1).toUpperCase())\n .join(\"\");\n}\n\nexport function studioEntityHref(\n studioPath: string,\n entityReference: string,\n): string | undefined {\n const separator = entityReference.indexOf(\"/\");\n if (separator <= 0 || separator === entityReference.length - 1) {\n return undefined;\n }\n const entityType = entityReference.slice(0, separator);\n const entityId = entityReference.slice(separator + 1);\n const base = studioPath === \"/\" ? \"\" : studioPath.replace(/\\/+$/, \"\");\n return `${base}/entities/${encodeURIComponent(entityType)}/${encodeURIComponent(entityId)}`;\n}\n\n/** An account timestamp as ISO text; session times arrive in seconds. */\nexport function accountTimestamp(value: number, milliseconds = false): string {\n return new Date(milliseconds ? value : value * 1000).toISOString();\n}\n",
8
- "/** @jsxImportSource react */\nimport { Button } from \"@brains/app-ui-react\";\nimport { typographyStyles } from \"../studio-typography.styles\";\nimport { OperatorRecordCopy } from \"@brains/operator-view-react\";\nimport type { ReactElement, ReactNode } from \"react\";\nimport {\n accountClass as cx,\n accountStyles as s,\n} from \"../studio-account.styles\";\n\nexport function AccountButton(props: {\n children: ReactNode;\n onClick?: () => void;\n type?: \"button\" | \"submit\";\n tone?: \"primary\" | \"danger\";\n disabled?: boolean;\n}): ReactElement {\n return (\n <Button\n variant={\n props.tone === \"danger\"\n ? \"danger\"\n : props.tone === \"primary\"\n ? \"primary\"\n : \"outline\"\n }\n type={props.type ?? \"button\"}\n onClick={props.onClick}\n disabled={props.disabled}\n >\n {props.children}\n </Button>\n );\n}\n\nexport function AccountAccessItem(props: {\n kind: string;\n description?: string;\n metadata?: readonly string[];\n action?: ReactNode;\n}): ReactElement {\n return (\n <div className={cx(\"account-access-item\", s.access)}>\n <OperatorRecordCopy\n density=\"comfortable\"\n title={props.kind}\n description={props.description}\n metadata={props.metadata ?? []}\n />\n {props.action}\n </div>\n );\n}\n\nexport function AccountDetailSection(props: {\n title: string;\n description?: string;\n children: ReactNode;\n}): ReactElement {\n return (\n <section className={cx(\"account-detail-section\", s.section)}>\n <div className=\"account-section-label\">\n <h3 className={cx(\"\", s.heading, typographyStyles.section)}>\n {props.title}\n </h3>\n {props.description ? (\n <p className={cx(\"\", s.description)}>{props.description}</p>\n ) : null}\n </div>\n <div className={cx(\"people-stack\", s.stack)}>{props.children}</div>\n </section>\n );\n}\n",
8
+ "/** @jsxImportSource react */\nimport { Button } from \"@brains/app-ui-react\";\nimport { typographyStyles } from \"../studio-typography.styles\";\nimport { OperatorRecordCopy } from \"@brains/operator-view-react\";\nimport type { ReactElement, ReactNode } from \"react\";\nimport {\n accountClass as cx,\n accountStyles as s,\n} from \"../studio-account.styles\";\n\nexport function AccountButton(props: {\n children: ReactNode;\n onClick?: () => void;\n type?: \"button\" | \"submit\";\n tone?: \"primary\" | \"danger\";\n disabled?: boolean;\n}): ReactElement {\n return (\n <Button\n variant={\n props.tone === \"danger\"\n ? \"danger\"\n : props.tone === \"primary\"\n ? \"primary\"\n : \"outline\"\n }\n type={props.type ?? \"button\"}\n onClick={props.onClick}\n disabled={props.disabled}\n >\n {props.children}\n </Button>\n );\n}\n\nexport function AccountAccessItem(props: {\n kind: string;\n description?: string;\n metadata?: readonly string[];\n action?: ReactNode;\n}): ReactElement {\n return (\n <div className={cx(\"account-access-item\", s.access)}>\n <OperatorRecordCopy\n density=\"comfortable\"\n title={props.kind}\n description={props.description}\n metadata={props.metadata ?? []}\n />\n {props.action}\n </div>\n );\n}\n\nexport function AccountDetailSection(props: {\n title: string;\n /** The tab already names it: the heading is read, not shown again. */\n titleHidden?: boolean;\n description?: string;\n children: ReactNode;\n}): ReactElement {\n return (\n <section className={cx(\"account-detail-section\", s.section)}>\n <div className=\"account-section-label\">\n <h3\n className={cx(\n \"\",\n s.heading,\n typographyStyles.section,\n props.titleHidden === true && s.headingHidden,\n )}\n >\n {props.title}\n </h3>\n {props.description ? (\n <p className={cx(\"\", s.description)}>{props.description}</p>\n ) : null}\n </div>\n <div className={cx(\"people-stack\", s.stack)}>{props.children}</div>\n </section>\n );\n}\n",
9
9
  "import type { AuthAccountPluginSettingsField } from \"@brains/contracts\";\n\n/**\n * A settings form's values in the types its fields declare: a checkbox is\n * whether it was ticked, and a filled number field is a number.\n */\nexport function settingsFormValues(\n fields: readonly AuthAccountPluginSettingsField[],\n formData: FormData,\n): Record<string, unknown> {\n const values: Record<string, unknown> = Object.fromEntries(\n formData.entries(),\n );\n for (const field of fields) {\n if (field.control === \"checkbox\") {\n values[field.name] = formData.has(field.name);\n } else if (\n field.control === \"number\" &&\n typeof values[field.name] === \"string\" &&\n values[field.name] !== \"\"\n ) {\n values[field.name] = Number(values[field.name]);\n }\n }\n return values;\n}\n\n/** The input a settings field renders as; a secret never shows its text. */\nexport function settingInputType(\n field: AuthAccountPluginSettingsField,\n): \"password\" | \"url\" | \"number\" | \"text\" {\n if (field.secret) return \"password\";\n if (field.control === \"url\" || field.control === \"number\")\n return field.control;\n return \"text\";\n}\n",
10
- "/** @jsxImportSource react */\nimport { Button, Input, Switch } from \"@brains/app-ui-react\";\nimport type { AuthAccountSnapshot } from \"@brains/contracts\";\nimport { OperatorCard } from \"@brains/operator-view-react\";\nimport type { ReactElement } from \"react\";\nimport { studioWorkspacePath } from \"../../../src/studio-paths\";\nimport {\n accountClass,\n accountStyles as accountLayout,\n} from \"../studio-account.styles\";\nimport { typographyStyles } from \"../studio-typography.styles\";\nimport { capitalize } from \"@brains/utils/string-utils\";\nimport { accountTimestamp, initials, studioEntityHref } from \"./account-format\";\nimport {\n AccountAccessItem,\n AccountButton,\n AccountDetailSection,\n} from \"./account-primitives\";\nimport { settingInputType } from \"./account-settings\";\nimport type { AccountActions } from \"./use-account-actions\";\n\ninterface AccountTabProps {\n account: AuthAccountSnapshot;\n actions: AccountActions;\n}\n\n/** Who you are here: name, role, and where the name is managed. */\nexport function AccountProfileTab(\n props: AccountTabProps & { title: string; studioPath: string },\n): ReactElement {\n const { account, actions, title, studioPath } = props;\n const role = account.role;\n const profileHref = account.profileEntityId\n ? studioEntityHref(studioPath, account.profileEntityId)\n : undefined;\n return (\n <>\n <AccountDetailSection title=\"Profile\">\n <div\n className={accountClass(\"account-identity\", accountLayout.identity)}\n >\n <div\n className={accountClass(\n \"people-detail-person\",\n accountLayout.person,\n )}\n >\n <span\n className={accountClass(\n \"people-avatar people-avatar--large\",\n accountLayout.avatar,\n )}\n >\n {initials(title)}\n </span>\n <span className={accountClass(\"\", accountLayout.personCopy)}>\n <span\n className={accountClass(\n \"people-detail-name\",\n accountLayout.name,\n typographyStyles.secondaryDisplay,\n )}\n >\n {title}\n </span>\n <span\n data-account-role={role}\n className={accountClass(\"account-role\", accountLayout.role)}\n >\n {capitalize(role)}\n </span>\n </span>\n </div>\n </div>\n\n {account.profileEntityId ? (\n <>\n <p\n className={accountClass(\n \"account-profile-note\",\n accountLayout.description,\n )}\n >\n Managed by the Anchor profile — your account name follows the\n published profile.\n </p>\n <AccountAccessItem\n kind=\"Anchor profile\"\n description={title}\n action={\n profileHref ? (\n <Button asChild variant=\"link\">\n <a href={profileHref}>Edit Anchor Profile →</a>\n </Button>\n ) : undefined\n }\n />\n </>\n ) : (\n <form\n className={accountClass(\"name-form\", accountLayout.form)}\n onSubmit={(event) => {\n event.preventDefault();\n actions.saveName();\n }}\n >\n <label\n className={accountClass(\"\", accountLayout.formLabel)}\n htmlFor=\"display-name\"\n >\n Display name\n </label>\n <Input\n id=\"display-name\"\n maxLength={200}\n autoComplete=\"name\"\n required\n value={actions.displayName}\n onChange={(event) => actions.setDisplayName(event.target.value)}\n />\n <AccountButton type=\"submit\" disabled={actions.busy}>\n Save name\n </AccountButton>\n </form>\n )}\n </AccountDetailSection>\n\n <p className={accountClass(\"\", accountLayout.description)}>\n Your role controls access to this brain. An administrator manages access\n in Administration.\n </p>\n {role === \"admin\" && (\n <Button asChild variant=\"outline\">\n <a href={studioWorkspacePath(studioPath, \"admin:administration\")}>\n Manage people in Administration →\n </a>\n </Button>\n )}\n </>\n );\n}\n\n/** The channel identities this brain recognizes as you. */\nexport function AccountIdentitiesTab(\n props: Pick<AccountTabProps, \"account\">,\n): ReactElement {\n const channels = props.account.connectedChannels;\n return (\n <AccountDetailSection\n title=\"Linked identities\"\n description=\"How this brain recognizes messages from you. These are your identities, not services configured for the whole brain.\"\n >\n {channels.length === 0 ? (\n <p className={accountClass(\"people-empty\", accountLayout.empty)}>\n No linked identities.\n </p>\n ) : (\n channels.map((channel) => (\n <AccountAccessItem\n key={`${channel.type}:${channel.label}`}\n kind={channel.type}\n description={channel.label}\n metadata={[\n `Verified: ${accountTimestamp(channel.verifiedAt, true)}`,\n ]}\n />\n ))\n )}\n </AccountDetailSection>\n );\n}\n\n/** Per-account settings forms that plugins declare. */\nexport function AccountSettingsTab(props: AccountTabProps): ReactElement {\n const { account, actions } = props;\n return (\n <>\n <p className={accountClass(\"\", accountLayout.description)}>\n Settings for your account only. These do not configure shared services\n for the brain.\n </p>\n {account.pluginSettings.map((settings) => (\n <OperatorCard\n key={settings.id}\n label={settings.title}\n density=\"comfortable\"\n presentation=\"disclosure\"\n >\n <p\n className={accountClass(\n \"account-settings-description\",\n accountLayout.description,\n )}\n >\n {settings.description ?? \"Private settings for this account.\"}\n </p>\n <form\n key={`${settings.id}:${settings.revision ?? \"unset\"}`}\n className={accountClass(\"name-form\", accountLayout.form)}\n onSubmit={(event) => {\n event.preventDefault();\n actions.saveSettings(settings, new FormData(event.currentTarget));\n }}\n >\n {settings.fields.map((field) => (\n <label\n key={field.name}\n htmlFor={`setting-${settings.id}-${field.name}`}\n className={accountClass(\"\", accountLayout.field)}\n >\n <span className={accountClass(\"\", accountLayout.formLabel)}>\n {field.label}\n </span>\n {field.control === \"checkbox\" ? (\n <Switch\n id={`setting-${settings.id}-${field.name}`}\n name={field.name}\n defaultChecked={field.value === true}\n />\n ) : (\n <Input\n id={`setting-${settings.id}-${field.name}`}\n name={field.name}\n type={settingInputType(field)}\n required={\n field.required &&\n (!settings.configured || field.secret) &&\n !field.set\n }\n defaultValue={\n field.secret\n ? \"\"\n : typeof field.value === \"string\" ||\n typeof field.value === \"number\"\n ? field.value\n : \"\"\n }\n placeholder={\n field.secret && field.set\n ? \"Stored — leave blank to keep\"\n : undefined\n }\n autoComplete=\"off\"\n />\n )}\n </label>\n ))}\n <div\n className={accountClass(\n \"people-inline-actions\",\n accountLayout.inlineActions,\n )}\n >\n <AccountButton\n type=\"submit\"\n tone=\"primary\"\n disabled={actions.busy}\n >\n Save settings\n </AccountButton>\n {settings.configured ? (\n <Button\n variant=\"danger\"\n disabled={actions.busy}\n type=\"button\"\n onClick={() => actions.removeSettings(settings)}\n >\n Remove\n </Button>\n ) : null}\n </div>\n </form>\n </OperatorCard>\n ))}\n </>\n );\n}\n\n/** Passkeys and browser sessions, and ending them. */\nexport function AccountSecurityTab(props: AccountTabProps): ReactElement {\n const { account, actions } = props;\n const { busy } = actions;\n return (\n <div className={accountClass(\"\", accountLayout.column)}>\n <AccountDetailSection\n title=\"Sign-in\"\n description=\"Passkeys used to access this account. Your final passkey is protected from revocation.\"\n >\n {account.passkeys.map((passkey) => (\n <AccountAccessItem\n key={passkey.id}\n kind={\n passkey.credentialBackedUp ? \"Synced passkey\" : \"Device passkey\"\n }\n metadata={[`Added: ${accountTimestamp(passkey.createdAt, true)}`]}\n action={\n account.passkeys.length > 1 ? (\n <Button\n variant=\"danger\"\n disabled={busy}\n type=\"button\"\n onClick={() => actions.revokePasskey(passkey.id)}\n >\n Revoke\n </Button>\n ) : undefined\n }\n />\n ))}\n <div\n className={accountClass(\n \"people-inline-actions\",\n accountLayout.inlineActions,\n )}\n >\n <Button\n variant=\"outline\"\n disabled={busy}\n type=\"button\"\n onClick={actions.addPasskey}\n >\n Add passkey\n </Button>\n </div>\n </AccountDetailSection>\n\n <AccountDetailSection title=\"Signed-in sessions\">\n {account.sessions.map((session) => (\n <AccountAccessItem\n key={session.id}\n kind={session.current ? \"This session\" : \"Browser session\"}\n metadata={[\n `Started: ${accountTimestamp(session.createdAt)}`,\n ...(session.current ? [\"Current browser\"] : []),\n ]}\n action={\n !session.current ? (\n <Button\n variant=\"danger\"\n disabled={busy}\n type=\"button\"\n onClick={() => actions.revokeSession(session.id)}\n >\n End\n </Button>\n ) : undefined\n }\n />\n ))}\n </AccountDetailSection>\n <footer\n className={accountClass(\n \"account-session-actions\",\n accountLayout.footer,\n )}\n >\n <small>Access changes require an Admin.</small>\n <div className={accountClass(\"\", accountLayout.actions)}>\n <AccountButton\n disabled={\n busy || account.sessions.every((session) => session.current)\n }\n onClick={actions.revokeOtherSessions}\n >\n End other sessions\n </AccountButton>\n <AccountButton\n tone=\"danger\"\n disabled={busy}\n onClick={actions.revokeAllSessions}\n >\n Sign out everywhere\n </AccountButton>\n </div>\n </footer>\n </div>\n );\n}\n",
10
+ "/** @jsxImportSource react */\nimport { Button, Input, Switch } from \"@brains/app-ui-react\";\nimport type { AuthAccountSnapshot } from \"@brains/contracts\";\nimport { OperatorCard } from \"@brains/operator-view-react\";\nimport type { ReactElement } from \"react\";\nimport { studioWorkspacePath } from \"../../../src/studio-paths\";\nimport {\n accountClass,\n accountStyles as accountLayout,\n} from \"../studio-account.styles\";\nimport { typographyStyles } from \"../studio-typography.styles\";\nimport { capitalize } from \"@brains/utils/string-utils\";\nimport { accountTimestamp, initials, studioEntityHref } from \"./account-format\";\nimport {\n AccountAccessItem,\n AccountButton,\n AccountDetailSection,\n} from \"./account-primitives\";\nimport { settingInputType } from \"./account-settings\";\nimport type { AccountActions } from \"./use-account-actions\";\n\ninterface AccountTabProps {\n account: AuthAccountSnapshot;\n actions: AccountActions;\n}\n\n/** Who you are here: name, role, and where the name is managed. */\nexport function AccountProfileTab(\n props: AccountTabProps & { title: string; studioPath: string },\n): ReactElement {\n const { account, actions, title, studioPath } = props;\n const role = account.role;\n const profileHref = account.profileEntityId\n ? studioEntityHref(studioPath, account.profileEntityId)\n : undefined;\n return (\n <>\n <AccountDetailSection title=\"Profile\" titleHidden>\n <div\n className={accountClass(\"account-identity\", accountLayout.identity)}\n >\n <div\n className={accountClass(\n \"people-detail-person\",\n accountLayout.person,\n )}\n >\n <span\n className={accountClass(\n \"people-avatar people-avatar--large\",\n accountLayout.avatar,\n )}\n >\n {initials(title)}\n </span>\n <span className={accountClass(\"\", accountLayout.personCopy)}>\n <span\n className={accountClass(\n \"people-detail-name\",\n accountLayout.name,\n typographyStyles.secondaryDisplay,\n )}\n >\n {title}\n </span>\n <span\n data-account-role={role}\n className={accountClass(\"account-role\", accountLayout.role)}\n >\n {capitalize(role)}\n </span>\n </span>\n </div>\n </div>\n\n {account.profileEntityId ? (\n <>\n <p\n className={accountClass(\n \"account-profile-note\",\n accountLayout.description,\n )}\n >\n Managed by the Anchor profile — your account name follows the\n published profile.\n </p>\n <AccountAccessItem\n kind=\"Anchor profile\"\n description={title}\n action={\n profileHref ? (\n <Button asChild variant=\"link\">\n <a href={profileHref}>Edit Anchor Profile →</a>\n </Button>\n ) : undefined\n }\n />\n </>\n ) : (\n <form\n className={accountClass(\"name-form\", accountLayout.form)}\n onSubmit={(event) => {\n event.preventDefault();\n actions.saveName();\n }}\n >\n <label\n className={accountClass(\"\", accountLayout.formLabel)}\n htmlFor=\"display-name\"\n >\n Display name\n </label>\n <Input\n id=\"display-name\"\n maxLength={200}\n autoComplete=\"name\"\n required\n value={actions.displayName}\n onChange={(event) => actions.setDisplayName(event.target.value)}\n />\n <AccountButton type=\"submit\" disabled={actions.busy}>\n Save name\n </AccountButton>\n </form>\n )}\n </AccountDetailSection>\n\n <p className={accountClass(\"\", accountLayout.description)}>\n Your role controls access to this brain. An administrator manages access\n in Administration.\n </p>\n {role === \"admin\" && (\n <Button asChild variant=\"outline\">\n <a href={studioWorkspacePath(studioPath, \"admin:administration\")}>\n Manage people in Administration →\n </a>\n </Button>\n )}\n </>\n );\n}\n\n/** The channel identities this brain recognizes as you. */\nexport function AccountIdentitiesTab(\n props: Pick<AccountTabProps, \"account\">,\n): ReactElement {\n const channels = props.account.connectedChannels;\n return (\n <AccountDetailSection\n title=\"Linked identities\"\n titleHidden\n description=\"How this brain recognizes messages from you. These are your identities, not services configured for the whole brain.\"\n >\n {channels.length === 0 ? (\n <p className={accountClass(\"people-empty\", accountLayout.empty)}>\n No linked identities.\n </p>\n ) : (\n channels.map((channel) => (\n <AccountAccessItem\n key={`${channel.type}:${channel.label}`}\n kind={channel.type}\n description={channel.label}\n metadata={[\n `Verified: ${accountTimestamp(channel.verifiedAt, true)}`,\n ]}\n />\n ))\n )}\n </AccountDetailSection>\n );\n}\n\n/** Per-account settings forms that plugins declare. */\nexport function AccountSettingsTab(props: AccountTabProps): ReactElement {\n const { account, actions } = props;\n return (\n <>\n <p className={accountClass(\"\", accountLayout.description)}>\n Settings for your account only. These do not configure shared services\n for the brain.\n </p>\n {account.pluginSettings.map((settings) => (\n <OperatorCard\n key={settings.id}\n label={settings.title}\n density=\"comfortable\"\n presentation=\"disclosure\"\n >\n <p\n className={accountClass(\n \"account-settings-description\",\n accountLayout.description,\n )}\n >\n {settings.description ?? \"Private settings for this account.\"}\n </p>\n <form\n key={`${settings.id}:${settings.revision ?? \"unset\"}`}\n className={accountClass(\"name-form\", accountLayout.form)}\n onSubmit={(event) => {\n event.preventDefault();\n actions.saveSettings(settings, new FormData(event.currentTarget));\n }}\n >\n {settings.fields.map((field) => (\n <label\n key={field.name}\n htmlFor={`setting-${settings.id}-${field.name}`}\n className={accountClass(\"\", accountLayout.field)}\n >\n <span className={accountClass(\"\", accountLayout.formLabel)}>\n {field.label}\n </span>\n {field.control === \"checkbox\" ? (\n <Switch\n id={`setting-${settings.id}-${field.name}`}\n name={field.name}\n defaultChecked={field.value === true}\n />\n ) : (\n <Input\n id={`setting-${settings.id}-${field.name}`}\n name={field.name}\n type={settingInputType(field)}\n required={\n field.required &&\n (!settings.configured || field.secret) &&\n !field.set\n }\n defaultValue={\n field.secret\n ? \"\"\n : typeof field.value === \"string\" ||\n typeof field.value === \"number\"\n ? field.value\n : \"\"\n }\n placeholder={\n field.secret && field.set\n ? \"Stored — leave blank to keep\"\n : undefined\n }\n autoComplete=\"off\"\n />\n )}\n </label>\n ))}\n <div\n className={accountClass(\n \"people-inline-actions\",\n accountLayout.inlineActions,\n )}\n >\n <AccountButton\n type=\"submit\"\n tone=\"primary\"\n disabled={actions.busy}\n >\n Save settings\n </AccountButton>\n {settings.configured ? (\n <Button\n variant=\"danger\"\n disabled={actions.busy}\n type=\"button\"\n onClick={() => actions.removeSettings(settings)}\n >\n Remove\n </Button>\n ) : null}\n </div>\n </form>\n </OperatorCard>\n ))}\n </>\n );\n}\n\n/** Passkeys and browser sessions, and ending them. */\nexport function AccountSecurityTab(props: AccountTabProps): ReactElement {\n const { account, actions } = props;\n const { busy } = actions;\n return (\n <div className={accountClass(\"\", accountLayout.column)}>\n <AccountDetailSection\n title=\"Sign-in\"\n description=\"Passkeys used to access this account. Your final passkey is protected from revocation.\"\n >\n {account.passkeys.map((passkey) => (\n <AccountAccessItem\n key={passkey.id}\n kind={\n passkey.credentialBackedUp ? \"Synced passkey\" : \"Device passkey\"\n }\n metadata={[`Added: ${accountTimestamp(passkey.createdAt, true)}`]}\n action={\n account.passkeys.length > 1 ? (\n <Button\n variant=\"danger\"\n disabled={busy}\n type=\"button\"\n onClick={() => actions.revokePasskey(passkey.id)}\n >\n Revoke\n </Button>\n ) : undefined\n }\n />\n ))}\n <div\n className={accountClass(\n \"people-inline-actions\",\n accountLayout.inlineActions,\n )}\n >\n <Button\n variant=\"outline\"\n disabled={busy}\n type=\"button\"\n onClick={actions.addPasskey}\n >\n Add passkey\n </Button>\n </div>\n </AccountDetailSection>\n\n <AccountDetailSection title=\"Signed-in sessions\">\n {account.sessions.map((session) => (\n <AccountAccessItem\n key={session.id}\n kind={session.current ? \"This session\" : \"Browser session\"}\n metadata={[\n `Started: ${accountTimestamp(session.createdAt)}`,\n ...(session.current ? [\"Current browser\"] : []),\n ]}\n action={\n !session.current ? (\n <Button\n variant=\"danger\"\n disabled={busy}\n type=\"button\"\n onClick={() => actions.revokeSession(session.id)}\n >\n End\n </Button>\n ) : undefined\n }\n />\n ))}\n </AccountDetailSection>\n <footer\n className={accountClass(\n \"account-session-actions\",\n accountLayout.footer,\n )}\n >\n <small>Access changes require an Admin.</small>\n <div className={accountClass(\"\", accountLayout.actions)}>\n <AccountButton\n disabled={\n busy || account.sessions.every((session) => session.current)\n }\n onClick={actions.revokeOtherSessions}\n >\n End other sessions\n </AccountButton>\n <AccountButton\n tone=\"danger\"\n disabled={busy}\n onClick={actions.revokeAllSessions}\n >\n Sign out everywhere\n </AccountButton>\n </div>\n </footer>\n </div>\n );\n}\n",
11
11
  "/** @jsxImportSource react */\nimport { Button } from \"@brains/app-ui-react\";\nimport { useState, type ReactElement } from \"react\";\nimport { accountClass } from \"../studio-account.styles\";\nimport { AccountDetailSection } from \"./account-primitives\";\nimport { aiToolsStyles as s } from \"../studio-ai-tools.styles\";\nimport {\n aiToolClients,\n type AiToolClient,\n type AiToolText,\n} from \"./ai-tool-clients\";\n\nfunction Text(props: { text: AiToolText }): ReactElement {\n return (\n <>\n {props.text.map((run, index) =>\n typeof run === \"string\" ? (\n run\n ) : (\n <code key={index} className={accountClass(\"\", s.code)}>\n {run.code}\n </code>\n ),\n )}\n </>\n );\n}\n\nexport function Snippet(props: { label: string; code: string }): ReactElement {\n const [copied, setCopied] = useState<\"idle\" | \"copied\" | \"unavailable\">(\n \"idle\",\n );\n const copy = async (): Promise<void> => {\n try {\n await navigator.clipboard.writeText(props.code);\n setCopied(\"copied\");\n } catch {\n // Clipboard may be missing or denied; the snippet stays selectable.\n setCopied(\"unavailable\");\n }\n };\n return (\n <div className={accountClass(\"ai-tools-snippet\", s.snippet)}>\n <pre className={accountClass(\"\", s.snippetCode)} aria-label={props.label}>\n {props.code}\n </pre>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void copy()}\n aria-label={`Copy ${props.label}`}\n >\n {copied === \"copied\"\n ? \"Copied\"\n : copied === \"unavailable\"\n ? \"Select to copy\"\n : \"Copy\"}\n </Button>\n </div>\n );\n}\n\n/** One client's connection steps; the Drive tab's cards read the same way. */\nexport function ClientCard(props: {\n client: Omit<AiToolClient, \"id\" | \"group\">;\n}): ReactElement {\n const { client } = props;\n return (\n <article className={accountClass(\"ai-tools-client\", s.client)}>\n <h4 className={accountClass(\"\", s.clientName)}>{client.name}</h4>\n {client.note ? (\n <p className={accountClass(\"\", s.text)}>\n <Text text={client.note} />\n </p>\n ) : null}\n {client.steps ? (\n <ol className={accountClass(\"\", s.steps)}>\n {client.steps.map((step, index) => (\n <li key={index}>\n <Text text={step} />\n </li>\n ))}\n </ol>\n ) : null}\n {client.fields ? (\n <dl className={accountClass(\"\", s.fields)}>\n {client.fields.map((field) => (\n <div key={field.label} className={accountClass(\"\", s.field)}>\n <dt className={accountClass(\"\", s.fieldLabel)}>{field.label}</dt>\n <dd className={accountClass(\"\", s.fieldValue)}>\n <Text text={field.value} />\n </dd>\n </div>\n ))}\n </dl>\n ) : null}\n {client.lead?.map((paragraph, index) => (\n <p key={`lead-${index}`} className={accountClass(\"\", s.text)}>\n <Text text={paragraph} />\n </p>\n ))}\n {client.snippet ? <Snippet {...client.snippet} /> : null}\n {client.after?.map((paragraph, index) => (\n <p key={`after-${index}`} className={accountClass(\"\", s.text)}>\n <Text text={paragraph} />\n </p>\n ))}\n </article>\n );\n}\n\nfunction listInSentence(names: readonly string[]): string {\n return names.length < 2\n ? (names[0] ?? \"\")\n : `${names.slice(0, -1).join(\", \")} and ${names.at(-1)}`;\n}\n\n/** How to connect the AI tools a person already uses to this brain over MCP. */\nexport function AccountAiToolsTab(props: { mcpUrl: string }): ReactElement {\n const clients = aiToolClients(props.mcpUrl);\n const primary = clients.filter((client) => client.group === \"primary\");\n const developer = clients.filter((client) => client.group === \"developer\");\n return (\n <AccountDetailSection\n title=\"AI tools\"\n description=\"Connect AI tools you already use to this brain. A connected tool talks to the brain as you do in chat — asking, saving and updating within your access — after you sign in with your passkey.\"\n >\n <article className={accountClass(\"ai-tools-address\", s.client)}>\n <h4 className={accountClass(\"\", s.clientName)}>Your brain’s address</h4>\n <Snippet label=\"brain address\" code={props.mcpUrl} />\n </article>\n <div className={accountClass(\"ai-tools-clients\", s.clients)}>\n {primary.map((client) => (\n <ClientCard key={client.id} client={client} />\n ))}\n </div>\n <details className={accountClass(\"ai-tools-developer\", s.developer)}>\n <summary className={accountClass(\"\", s.developerSummary)}>\n Developer tools and other clients\n <span className={accountClass(\"\", s.developerHint)}>\n {listInSentence(\n developer.map((client) => client.inlineName ?? client.name),\n )}\n </span>\n </summary>\n <div\n className={accountClass(\n \"ai-tools-clients\",\n s.clients,\n s.developerClients,\n )}\n >\n {developer.map((client) => (\n <ClientCard key={client.id} client={client} />\n ))}\n </div>\n </details>\n </AccountDetailSection>\n );\n}\n",
12
12
  "/** A run of instruction text; `code` runs are literal values to type or pick. */\nexport type AiToolText = readonly (string | { code: string })[];\n\nexport interface AiToolClient {\n id: \"claude\" | \"chatgpt\" | \"claude-code\" | \"cursor\" | \"vscode\" | \"other\";\n /** Primary clients are always shown; developer clients sit in one collapsed section. */\n group: \"primary\" | \"developer\";\n name: string;\n /** How the client reads inside a sentence listing several; defaults to `name`. */\n inlineName?: string;\n note?: AiToolText;\n steps?: readonly AiToolText[];\n fields?: readonly { label: string; value: AiToolText }[];\n /** Paragraphs shown before the snippet. */\n lead?: readonly AiToolText[];\n /** Copied exactly as shown; JSON is pretty-printed. */\n snippet?: { label: string; code: string };\n /** Paragraphs shown after the snippet. */\n after?: readonly AiToolText[];\n}\n\n/**\n * The name every client stores this brain under, derived from its host so a\n * person connected to several brains keeps one entry per brain.\n */\nexport function mcpServerName(address: string): string {\n return new URL(address).host\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\nfunction json(value: unknown): string {\n return JSON.stringify(value, null, 2);\n}\n\nfunction mergeHint(file: string, key: string, name: string): AiToolText {\n return [\n \"Already have servers there? Add only the \",\n { code: `\"${name}\"` },\n \" entry inside \",\n { code: `\"${key}\"` },\n ` of ${file}.`,\n ];\n}\n\nexport function aiToolClients(address: string): readonly AiToolClient[] {\n const name = mcpServerName(address);\n const passkey = \"Sign in with your passkey when asked.\";\n return [\n {\n id: \"claude\",\n group: \"primary\",\n name: \"Claude\",\n note: [\"Desktop app and claude.ai.\"],\n steps: [\n [\"Open Settings → Connectors → Add custom connector.\"],\n [\"Name it \", { code: name }, \" and paste your brain’s address.\"],\n [passkey],\n ],\n },\n {\n id: \"chatgpt\",\n group: \"primary\",\n name: \"ChatGPT\",\n steps: [\n [\n \"Open Settings → Apps & Connectors → Advanced and turn on Developer mode.\",\n ],\n [\n \"Choose Create, name it \",\n { code: name },\n \", paste your brain’s address and pick OAuth.\",\n ],\n [passkey],\n ],\n },\n {\n id: \"claude-code\",\n group: \"developer\",\n name: \"Claude Code\",\n lead: [[\"Add the server in your terminal:\"]],\n snippet: {\n label: \"Claude Code command\",\n code: `claude mcp add --transport http ${name} ${address}`,\n },\n after: [\n [\n \"Then start Claude Code, run \",\n { code: \"/mcp\" },\n \", choose \",\n { code: name },\n \" and sign in with your passkey.\",\n ],\n ],\n },\n {\n id: \"cursor\",\n group: \"developer\",\n name: \"Cursor\",\n steps: [\n [\"Open Cursor Settings → MCP → Add new global MCP server.\"],\n [\"Name it \", { code: name }, \" and paste your brain’s address.\"],\n [\"Sign in with your passkey when Cursor asks.\"],\n ],\n lead: [[\"Or add it to \", { code: \"~/.cursor/mcp.json\" }, \":\"]],\n snippet: {\n label: \"Cursor configuration\",\n code: json({ mcpServers: { [name]: { url: address } } }),\n },\n after: [mergeHint(\"the file\", \"mcpServers\", name)],\n },\n {\n id: \"vscode\",\n group: \"developer\",\n name: \"VS Code\",\n steps: [\n [\"Open the Command Palette and run \", { code: \"MCP: Add Server\" }, \".\"],\n [\n \"Choose HTTP, paste your brain’s address and name it \",\n { code: name },\n \".\",\n ],\n [\"Choose Global, then sign in with your passkey when asked.\"],\n ],\n lead: [\n [\"Or run \", { code: \"MCP: Open User Configuration\" }, \" and add:\"],\n ],\n snippet: {\n label: \"VS Code configuration\",\n code: json({ servers: { [name]: { type: \"http\", url: address } } }),\n },\n after: [mergeHint(\"your user configuration\", \"servers\", name)],\n },\n {\n id: \"other\",\n group: \"developer\",\n name: \"Any other MCP client\",\n inlineName: \"any other MCP client\",\n note: [\n \"Look for “add MCP server”, “connector” or “integration” in the tool’s settings and fill in:\",\n ],\n fields: [\n { label: \"Name\", value: [{ code: name }] },\n {\n label: \"Type\",\n value: [\"Remote server, Streamable HTTP — not stdio, not SSE\"],\n },\n { label: \"URL\", value: [{ code: address }] },\n {\n label: \"Authentication\",\n value: [\n \"OAuth. Leave API key, token, client ID and secret empty; the tool registers itself.\",\n ],\n },\n ],\n lead: [\n [\n \"When you connect, your browser opens “Authorize <tool>?” on your brain. Approve MCP access with your passkey. The tool then has two tools: \",\n { code: \"chat\" },\n \", to ask your brain anything as you would in chat, and \",\n { code: \"confirm\" },\n \", to approve changes when the brain asks.\",\n ],\n [\n \"Tool only takes local (stdio) servers, or insists on an API key? Bridge it with \",\n { code: \"mcp-remote\" },\n \", which handles the sign-in:\",\n ],\n ],\n snippet: {\n label: \"mcp-remote bridge configuration\",\n code: json({\n mcpServers: {\n [name]: { command: \"npx\", args: [\"-y\", \"mcp-remote\", address] },\n },\n }),\n },\n },\n ];\n}\n",
13
13
  "/** @jsxImportSource react */\nimport { Button, Input, Switch } from \"@brains/app-ui-react\";\nimport type {\n AuthAccountAppPassword,\n AuthAccountSnapshot,\n} from \"@brains/contracts\";\nimport { useEffect, useState, type ReactElement } from \"react\";\nimport {\n accountClass,\n accountStyles as accountLayout,\n} from \"../studio-account.styles\";\nimport { aiToolsStyles as s } from \"../studio-ai-tools.styles\";\nimport { ClientCard, Snippet } from \"./account-ai-tools\";\nimport { accountTimestamp } from \"./account-format\";\nimport { AccountAccessItem, AccountDetailSection } from \"./account-primitives\";\nimport { driveClients } from \"./drive-clients\";\nimport {\n DriveConnectCard,\n connectLabel,\n connectPassword,\n handOver,\n type DriveConnect,\n} from \"./drive-connect\";\nimport type { AccountActions } from \"./use-account-actions\";\n\nconst LABEL_FIELD = \"app-password-label\";\nconst WRITE_FIELD = \"app-password-write\";\n\n/** App password times arrive in seconds; the day is what a person plans by. */\nfunction day(seconds: number): string {\n return accountTimestamp(seconds).slice(0, 10);\n}\n\nfunction appPasswordDates(\n appPassword: AuthAccountAppPassword,\n nowSeconds: number,\n): string[] {\n return [\n `Created: ${day(appPassword.createdAt)}`,\n `${appPassword.expiresAt <= nowSeconds ? \"Expired\" : \"Expires\"}: ${day(appPassword.expiresAt)}`,\n appPassword.lastUsedAt === undefined\n ? \"Never used\"\n : `Last used: ${day(appPassword.lastUsedAt)}`,\n ];\n}\n\n/**\n * The brain as a network drive: its address, the app passwords that sign a\n * mount in, and the steps for each client.\n */\nexport function AccountDriveTab(props: {\n davUrl: string;\n account: AuthAccountSnapshot;\n actions: AccountActions;\n connect?: DriveConnect | undefined;\n}): ReactElement {\n const { account, actions, connect } = props;\n const { busy, createdAppPassword } = actions;\n // A client asked: the app password Connect creates goes to it, and is\n // never shown here. Which password was shown when Connect was chosen,\n // so that one is never taken for it.\n const [connectingFrom, setConnectingFrom] = useState<\n string | null | undefined\n >(undefined);\n const handed =\n connect !== undefined && connectingFrom !== undefined\n ? connectPassword(\n createdAppPassword,\n connectingFrom,\n account.appPasswords,\n connectLabel(connect),\n )\n : null;\n useEffect(() => {\n if (connect && handed) {\n handOver(connect, handed);\n }\n }, [connect, handed]);\n const nowSeconds = Math.floor(Date.now() / 1000);\n const [allowSaving, setAllowSaving] = useState(false);\n const clients = driveClients(props.davUrl);\n const fileManagers = clients.filter(\n (client) => client.group === \"file-manager\",\n );\n const commandLine = clients.filter(\n (client) => client.group === \"command-line\",\n );\n return (\n <div className={accountClass(\"\", accountLayout.column)}>\n <AccountDetailSection\n title=\"Drive\"\n description=\"Mount this brain as a network drive. It shows the notes, posts and files you can see here, as folders and files, to open and edit on your computer.\"\n >\n {connect ? (\n <DriveConnectCard\n connect={connect}\n created={handed}\n busy={busy || (connectingFrom !== undefined && handed === null)}\n onConnect={() => {\n setConnectingFrom(createdAppPassword?.username ?? null);\n actions.createAppPassword(connectLabel(connect), \"write\");\n }}\n />\n ) : null}\n <article className={accountClass(\"drive-address\", s.client)}>\n <h4 className={accountClass(\"\", s.clientName)}>\n Your brain’s drive address\n </h4>\n <Snippet label=\"drive address\" code={props.davUrl} />\n </article>\n </AccountDetailSection>\n\n <AccountDetailSection\n title=\"App passwords\"\n description=\"A mount signs in with an app password instead of your passkey. It works only for the drive, expires after a year and can be revoked here. It can only read unless you allow saving changes.\"\n >\n {createdAppPassword && createdAppPassword !== handed ? (\n <article\n data-app-password-reveal\n className={accountClass(\"drive-reveal\", s.client)}\n >\n <h4 className={accountClass(\"\", s.clientName)}>\n Your new app password\n </h4>\n <p className={accountClass(\"\", s.text)}>\n Copy both now. The password is shown only once.\n </p>\n <Snippet label=\"username\" code={createdAppPassword.username} />\n <Snippet label=\"password\" code={createdAppPassword.password} />\n <div\n className={accountClass(\n \"people-inline-actions\",\n accountLayout.inlineActions,\n )}\n >\n <Button\n variant=\"outline\"\n type=\"button\"\n onClick={actions.dismissCreatedAppPassword}\n >\n Done\n </Button>\n </div>\n </article>\n ) : null}\n {account.appPasswords.length === 0 ? (\n <p className={accountClass(\"\", s.text)}>No app passwords yet.</p>\n ) : (\n account.appPasswords.map((appPassword) => (\n <AccountAccessItem\n key={appPassword.id}\n kind={appPassword.label}\n description={`${appPassword.username} · ${appPassword.access === \"write\" ? \"Read and write\" : \"Read-only\"}`}\n metadata={appPasswordDates(appPassword, nowSeconds)}\n action={\n <Button\n variant=\"danger\"\n disabled={busy}\n type=\"button\"\n onClick={() => actions.revokeAppPassword(appPassword.id)}\n >\n Revoke\n </Button>\n }\n />\n ))\n )}\n <form\n className={accountClass(\"name-form\", accountLayout.form)}\n onSubmit={(event) => {\n event.preventDefault();\n const form = event.currentTarget;\n const label = String(new FormData(form).get(LABEL_FIELD) ?? \"\");\n if (label.trim() === \"\") return;\n actions.createAppPassword(\n label.trim(),\n allowSaving ? \"write\" : \"read\",\n );\n form.reset();\n setAllowSaving(false);\n }}\n >\n <label\n htmlFor={LABEL_FIELD}\n className={accountClass(\"\", accountLayout.field)}\n >\n <span className={accountClass(\"\", accountLayout.formLabel)}>\n Name it after the computer it is for\n </span>\n <Input\n id={LABEL_FIELD}\n name={LABEL_FIELD}\n type=\"text\"\n required\n maxLength={100}\n placeholder=\"Laptop\"\n autoComplete=\"off\"\n />\n </label>\n <label\n htmlFor={WRITE_FIELD}\n className={accountClass(\"\", accountLayout.field)}\n >\n <span className={accountClass(\"\", accountLayout.formLabel)}>\n Allow saving changes\n </span>\n <Switch\n id={WRITE_FIELD}\n aria-label=\"Allow saving changes\"\n checked={allowSaving}\n onCheckedChange={setAllowSaving}\n />\n </label>\n <div\n className={accountClass(\n \"people-inline-actions\",\n accountLayout.inlineActions,\n )}\n >\n <Button variant=\"outline\" disabled={busy} type=\"submit\">\n New app password\n </Button>\n </div>\n </form>\n </AccountDetailSection>\n\n <AccountDetailSection\n title=\"Use it in Obsidian\"\n description=\"Keep an Obsidian vault on your computer in step with your brain. Obsidian stays fast and works offline; notes and images sync in the background.\"\n >\n <article className={accountClass(\"drive-obsidian\", s.client)}>\n <h4 className={accountClass(\"\", s.clientName)}>Rizom Brain</h4>\n <ol className={accountClass(\"\", s.steps)}>\n <li>Install the Rizom Brain plugin in Obsidian and turn it on.</li>\n <li>\n In its settings, enter your brain’s address:{\" \"}\n <code>{new URL(props.davUrl).host}</code>\n </li>\n <li>Choose Connect, and confirm on the page that opens here.</li>\n </ol>\n </article>\n </AccountDetailSection>\n\n <AccountDetailSection\n title=\"Connect your computer\"\n description=\"Use your computer’s own file manager. The brain then appears as a drive beside your other folders.\"\n >\n <div className={accountClass(\"drive-clients\", s.clients)}>\n {fileManagers.map((client) => (\n <ClientCard key={client.id} client={client} />\n ))}\n </div>\n <details className={accountClass(\"drive-command-line\", s.developer)}>\n <summary className={accountClass(\"\", s.developerSummary)}>\n Command line\n <span className={accountClass(\"\", s.developerHint)}>\n {commandLine.map((client) => client.name).join(\", \")}\n </span>\n </summary>\n <div\n className={accountClass(\n \"drive-command-line-clients\",\n s.clients,\n s.developerClients,\n )}\n >\n {commandLine.map((client) => (\n <ClientCard key={client.id} client={client} />\n ))}\n </div>\n </details>\n </AccountDetailSection>\n </div>\n );\n}\n",
14
14
  "import { mcpServerName, type AiToolClient } from \"./ai-tool-clients\";\n\n/** One client's steps for mounting the drive. */\nexport type DriveClient = Omit<AiToolClient, \"id\" | \"group\"> & {\n id: \"macos\" | \"windows\" | \"gnome-files\" | \"rclone\";\n /** File managers are always shown; the command line sits in one closed section. */\n group: \"file-manager\" | \"command-line\";\n};\n\nconst credentials =\n \"Enter the username and password of an app password from this page.\";\n\n/**\n * How each client mounts the brain's drive: the file manager of each\n * desktop first, then the command line for people who prefer it.\n */\nexport function driveClients(address: string): readonly DriveClient[] {\n const url = new URL(address);\n // GNOME names WebDAV over TLS `davs` and plain WebDAV `dav`.\n const gnomeAddress = `${url.protocol === \"https:\" ? \"davs\" : \"dav\"}://${url.host}${url.pathname}`;\n const name = mcpServerName(address);\n return [\n {\n id: \"macos\",\n group: \"file-manager\",\n name: \"macOS\",\n note: [\"Finder, on any Mac.\"],\n steps: [\n [\"In Finder, choose Go → Connect to Server (⌘K).\"],\n [\"Paste the address below and click Connect.\"],\n [\"Choose Registered User. \", credentials],\n ],\n snippet: { label: \"macOS address\", code: address },\n },\n {\n id: \"windows\",\n group: \"file-manager\",\n name: \"Windows\",\n note: [\"File Explorer, on Windows 10 and 11.\"],\n steps: [\n [\"In File Explorer, open This PC and choose Map network drive.\"],\n [\n \"Paste the address below as the folder, tick Connect using different credentials, and click Finish.\",\n ],\n [credentials],\n ],\n snippet: { label: \"Windows address\", code: address },\n },\n {\n id: \"gnome-files\",\n group: \"file-manager\",\n name: \"GNOME Files\",\n note: [\"The file manager on Ubuntu, Fedora and other GNOME desktops.\"],\n steps: [\n [\"Open Files → Other Locations (or Network).\"],\n [\"Under Connect to Server, enter the address below and connect.\"],\n [credentials],\n ],\n snippet: { label: \"GNOME Files address\", code: gnomeAddress },\n },\n {\n id: \"rclone\",\n group: \"command-line\",\n name: \"rclone\",\n note: [\"Linux, macOS and Windows, from a terminal.\"],\n lead: [\n [\n \"Store the drive as a remote, with your app password’s username and password:\",\n ],\n ],\n snippet: {\n label: \"rclone remote command\",\n code: `rclone config create ${name} webdav url=${address} vendor=other user=YOUR_USERNAME pass=YOUR_PASSWORD --obscure`,\n },\n after: [\n [\n \"Then mount it on an empty folder: \",\n { code: `rclone mount ${name}: ~/Brain --vfs-cache-mode writes` },\n \".\",\n ],\n ],\n },\n ];\n}\n",
15
15
  "import { useCallback, useEffect, useState } from \"react\";\nimport {\n AUTH_ACCOUNT_MUTATION_ACTIONS,\n type AuthAccountAppPasswordSecret,\n type AuthAccountMutation,\n type AuthAppPasswordAccess,\n type AuthAccountPluginSettingsForm,\n type AuthAccountSnapshot,\n} from \"@brains/contracts\";\nimport { getErrorMessage } from \"@brains/utils/error\";\nimport type { AccountClient } from \"./account-api\";\nimport { settingsFormValues } from \"./account-settings\";\n\nexport interface AccountConfirmation {\n title: string;\n message: string;\n confirmLabel: string;\n action: () => void;\n}\n\ninterface ConfirmedMutationCopy {\n title: string;\n message: string;\n confirmLabel: string;\n pending: string;\n complete: string;\n}\n\n/** The copy for each account change that asks before it runs. */\nconst CONFIRMED_MUTATIONS = {\n revokePasskey: {\n title: \"Revoke this passkey?\",\n message: \"You will not be able to use this passkey again.\",\n confirmLabel: \"Revoke passkey\",\n pending: \"Revoking passkey…\",\n complete: \"Passkey revoked.\",\n },\n revokeSession: {\n title: \"End this browser session?\",\n message: \"That browser will need a passkey to sign in again.\",\n confirmLabel: \"End session\",\n pending: \"Ending session…\",\n complete: \"Session ended.\",\n },\n revokeAppPassword: {\n title: \"Revoke this app password?\",\n message:\n \"Anything mounted with it stops working at once. Its password cannot be recovered.\",\n confirmLabel: \"Revoke app password\",\n pending: \"Revoking app password…\",\n complete: \"App password revoked.\",\n },\n revokeOtherSessions: {\n title: \"End every other browser session?\",\n message: \"Your current browser will remain signed in.\",\n confirmLabel: \"End other sessions\",\n pending: \"Ending other sessions…\",\n complete: \"Other sessions ended.\",\n },\n} satisfies Record<string, ConfirmedMutationCopy>;\n\nfunction messageOf(error: unknown): string {\n return getErrorMessage(error, \"Account request failed\");\n}\n\nexport interface AccountActionsInput {\n client: AccountClient;\n initialAccount: AuthAccountSnapshot | undefined;\n initialDisplayName: string;\n /** Where to come back to after signing out everywhere. */\n routePath: string;\n}\n\nexport interface AccountActions {\n account: AuthAccountSnapshot | undefined;\n displayName: string;\n setDisplayName: (value: string) => void;\n status: string;\n error: boolean;\n busy: boolean;\n confirmation: AccountConfirmation | null;\n cancelConfirmation: () => void;\n confirm: () => void;\n saveName: () => void;\n addPasskey: () => void;\n revokePasskey: (credentialId: string) => void;\n revokeSession: (sessionId: string) => void;\n revokeOtherSessions: () => void;\n revokeAllSessions: () => void;\n saveSettings: (\n settings: AuthAccountPluginSettingsForm,\n formData: FormData,\n ) => void;\n removeSettings: (settings: AuthAccountPluginSettingsForm) => void;\n /** The app password just created: the only time its password is known. */\n createdAppPassword: AuthAccountAppPasswordSecret | null;\n createAppPassword: (label: string, access: AuthAppPasswordAccess) => void;\n dismissCreatedAppPassword: () => void;\n revokeAppPassword: (appPasswordId: string) => void;\n}\n\n/**\n * The signed-in account and every change the Account page can make to it.\n * Each change reports its progress in one status line; destructive ones ask\n * first through a single pending confirmation.\n */\nexport function useAccountActions(input: AccountActionsInput): AccountActions {\n const { client, initialAccount } = input;\n const [account, setAccount] = useState(initialAccount);\n const [displayName, setDisplayName] = useState(\n initialAccount?.displayName ?? input.initialDisplayName,\n );\n const [status, setStatus] = useState(\"\");\n const [error, setError] = useState(false);\n const [busy, setBusy] = useState(false);\n const [confirmation, setConfirmation] = useState<AccountConfirmation | null>(\n null,\n );\n const [createdAppPassword, setCreatedAppPassword] =\n useState<AuthAccountAppPasswordSecret | null>(null);\n\n useEffect(() => {\n if (initialAccount) return;\n let cancelled = false;\n client\n .fetchAccount()\n .then((next) => {\n if (cancelled) return;\n setAccount(next);\n setDisplayName(next.displayName);\n })\n .catch((nextError: unknown) => {\n if (cancelled) return;\n setError(true);\n setStatus(messageOf(nextError));\n });\n return (): void => {\n cancelled = true;\n };\n }, [client, initialAccount]);\n\n const run = useCallback(\n async (\n pending: string,\n complete: string,\n action: () => Promise<AuthAccountSnapshot | undefined>,\n ): Promise<void> => {\n setBusy(true);\n setError(false);\n setStatus(pending);\n try {\n const next = await action();\n if (next) {\n setAccount(next);\n setDisplayName(next.displayName);\n }\n setStatus(complete);\n } catch (nextError) {\n setError(true);\n setStatus(messageOf(nextError));\n } finally {\n setBusy(false);\n }\n },\n [],\n );\n\n const mutate = async (\n mutation: AuthAccountMutation,\n ): Promise<AuthAccountSnapshot | undefined> =>\n (await client.mutateAccount(mutation)).account;\n\n const confirmMutation = (\n copy: ConfirmedMutationCopy,\n mutation: AuthAccountMutation,\n ): void =>\n setConfirmation({\n title: copy.title,\n message: copy.message,\n confirmLabel: copy.confirmLabel,\n action: () => {\n void run(copy.pending, copy.complete, () => mutate(mutation));\n },\n });\n\n return {\n account,\n displayName,\n setDisplayName,\n status,\n error,\n busy,\n confirmation,\n cancelConfirmation: () => setConfirmation(null),\n confirm: (): void => {\n if (!confirmation) return;\n setConfirmation(null);\n confirmation.action();\n },\n saveName: (): void => {\n void run(\"Saving…\", \"Display name updated.\", () =>\n mutate({\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.updateDisplayName,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.updateDisplayName,\n displayName,\n }),\n );\n },\n addPasskey: (): void => {\n void run(\"Waiting for your authenticator…\", \"Passkey added.\", () =>\n client.registerPasskey(),\n );\n },\n revokePasskey: (credentialId) =>\n confirmMutation(CONFIRMED_MUTATIONS.revokePasskey, {\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.revokePasskey,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.revokePasskey,\n credentialId,\n }),\n revokeSession: (sessionId) =>\n confirmMutation(CONFIRMED_MUTATIONS.revokeSession, {\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeSession,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeSession,\n sessionId,\n }),\n revokeOtherSessions: () =>\n confirmMutation(CONFIRMED_MUTATIONS.revokeOtherSessions, {\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeOtherSessions,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeOtherSessions,\n }),\n // Ending this session too, so the page leaves for the login instead of\n // showing an account it can no longer read.\n revokeAllSessions: () =>\n setConfirmation({\n title: \"Sign out everywhere?\",\n message:\n \"This ends every session, including this one. You will need your passkey to return.\",\n confirmLabel: \"Sign out everywhere\",\n action: () => {\n void run(\"Signing out everywhere…\", \"Signed out.\", async () => {\n await client.mutateAccount({\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeAllSessions,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeAllSessions,\n });\n window.location.assign(\n `/login?return_to=${encodeURIComponent(input.routePath)}`,\n );\n return undefined;\n });\n },\n }),\n saveSettings: (settings, formData): void => {\n const values = settingsFormValues(settings.fields, formData);\n void run(`Saving ${settings.title}…`, `${settings.title} updated.`, () =>\n client.mutatePluginSettings({\n action: \"save\",\n definitionId: settings.id,\n values,\n }),\n );\n },\n createdAppPassword,\n createAppPassword: (label, access): void => {\n void run(\"Creating app password…\", \"App password created.\", async () => {\n const created = await client.mutateAccount({\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.createAppPassword,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.createAppPassword,\n label,\n // Read-only is the default; only the wider access is named.\n ...(access === \"write\" ? { access } : {}),\n });\n setCreatedAppPassword(created.appPassword ?? null);\n return created.account;\n });\n },\n dismissCreatedAppPassword: () => setCreatedAppPassword(null),\n revokeAppPassword: (appPasswordId) =>\n confirmMutation(CONFIRMED_MUTATIONS.revokeAppPassword, {\n action: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeAppPassword,\n confirmation: AUTH_ACCOUNT_MUTATION_ACTIONS.revokeAppPassword,\n appPasswordId,\n }),\n removeSettings: (settings) =>\n setConfirmation({\n title: `Remove ${settings.title}?`,\n message:\n \"The stored settings for this integration will be removed from your account only.\",\n confirmLabel: \"Remove settings\",\n action: () => {\n void run(\n `Removing ${settings.title}…`,\n `${settings.title} removed.`,\n () =>\n client.mutatePluginSettings({\n action: \"delete\",\n definitionId: settings.id,\n }),\n );\n },\n }),\n };\n}\n"
16
16
  ],
17
- "mappings": "0dAkBA,iBCcA,IAAM,GAA2B,EAAE,OAAO,CACxC,YAAa,EAAE,OAAO,EACtB,KAAM,EAAE,KAAK,CAAC,QAAS,UAAW,QAAQ,CAAC,EAC3C,gBAAiB,EAAE,OAAO,EAAE,SAAS,EACrC,SAAU,EAAE,MACV,EAAE,OAAO,CACP,GAAI,EAAE,OAAO,EACb,WAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EACzC,qBAAsB,EAAE,OAAO,EAAE,SAAS,EAC1C,mBAAoB,EAAE,QAAQ,EAC9B,UAAW,EAAE,OAAO,EACpB,UAAW,EAAE,OAAO,CACtB,CAAC,CACH,EACA,aAAc,EAAE,MACd,EAAE,OAAO,CACP,GAAI,EAAE,OAAO,EACb,SAAU,EAAE,OAAO,EACnB,MAAO,EAAE,OAAO,EAChB,OAAQ,EAAE,KAAK,CAAC,OAAQ,OAAO,CAAC,EAChC,UAAW,EA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