Files

1 line
72 KiB
JSON

{"repo": "bgrgicak/roomy", "files": {"packages/server/shared/src/constants.ts": {"4c76b9c7b748a10504adf26dbd3008acd64e943e": {"t": 1785745606.2779891, "n": 6461, "h": "2d479e081de42796", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\nexport type MessageRole = (typeof MESSAGE_ROLES)[number];\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to pi. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not pi-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Roomy can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than pi's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const LOCAL_FILESYSTEM_CONNECTION_KIND = \"local-filesystem\" as const;\nexport const LOCAL_FILESYSTEM_PROVIDER_ID = \"local_filesystem\" as const;\nexport const LOCAL_FILESYSTEM_MOUNT_MARKER = \".roomy-local-filesystem-mount.json\" as const;\nexport const LOCAL_FILESYSTEM_CAPABILITIES = [\n \"local_filesystem.read\",\n \"local_filesystem.write\",\n] as const;\n\nexport type LocalFilesystemAccess = \"read_only\" | \"read_write\";\n\nexport interface LocalFilesystemDirectoryConfig {\n id: string;\n hostPath: string;\n homeName: string;\n access: LocalFilesystemAccess;\n description?: string;\n}\n\nexport interface LocalFilesystemConnectionMetadata {\n localFilesystem: {\n directories: LocalFilesystemDirectoryConfig[];\n };\n}\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "e9940ead5cc5bacebdb30cd46e8f700e02d2a1e2": {"t": 1785754718.765856, "n": 6461, "h": "2d479e081de42796", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\nexport type MessageRole = (typeof MESSAGE_ROLES)[number];\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to pi. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not pi-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Roomy can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than pi's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const LOCAL_FILESYSTEM_CONNECTION_KIND = \"local-filesystem\" as const;\nexport const LOCAL_FILESYSTEM_PROVIDER_ID = \"local_filesystem\" as const;\nexport const LOCAL_FILESYSTEM_MOUNT_MARKER = \".roomy-local-filesystem-mount.json\" as const;\nexport const LOCAL_FILESYSTEM_CAPABILITIES = [\n \"local_filesystem.read\",\n \"local_filesystem.write\",\n] as const;\n\nexport type LocalFilesystemAccess = \"read_only\" | \"read_write\";\n\nexport interface LocalFilesystemDirectoryConfig {\n id: string;\n hostPath: string;\n homeName: string;\n access: LocalFilesystemAccess;\n description?: string;\n}\n\nexport interface LocalFilesystemConnectionMetadata {\n localFilesystem: {\n directories: LocalFilesystemDirectoryConfig[];\n };\n}\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "b5ab497c03a479c29b97f8117de19b4a5711fbfb": {"t": 1785754720.074883, "n": 6459, "h": "ebdabae78e2f3e56", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\nexport type MessageRole = (typeof MESSAGE_ROLES)[number];\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to pi. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not pi-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than pi's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const LOCAL_FILESYSTEM_CONNECTION_KIND = \"local-filesystem\" as const;\nexport const LOCAL_FILESYSTEM_PROVIDER_ID = \"local_filesystem\" as const;\nexport const LOCAL_FILESYSTEM_MOUNT_MARKER = \".desk-local-filesystem-mount.json\" as const;\nexport const LOCAL_FILESYSTEM_CAPABILITIES = [\n \"local_filesystem.read\",\n \"local_filesystem.write\",\n] as const;\n\nexport type LocalFilesystemAccess = \"read_only\" | \"read_write\";\n\nexport interface LocalFilesystemDirectoryConfig {\n id: string;\n hostPath: string;\n homeName: string;\n access: LocalFilesystemAccess;\n description?: string;\n}\n\nexport interface LocalFilesystemConnectionMetadata {\n localFilesystem: {\n directories: LocalFilesystemDirectoryConfig[];\n };\n}\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "e8fdef8bcbc9fd9da9a42460a7aa779590a6a113": {"t": 1785754721.60959, "n": 6499, "h": "fb404f0271a427c3", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\nexport type MessageRole = (typeof MESSAGE_ROLES)[number];\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"OPENCODE_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than opencode's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const LOCAL_FILESYSTEM_CONNECTION_KIND = \"local-filesystem\" as const;\nexport const LOCAL_FILESYSTEM_PROVIDER_ID = \"local_filesystem\" as const;\nexport const LOCAL_FILESYSTEM_MOUNT_MARKER = \".desk-local-filesystem-mount.json\" as const;\nexport const LOCAL_FILESYSTEM_CAPABILITIES = [\n \"local_filesystem.read\",\n \"local_filesystem.write\",\n] as const;\n\nexport type LocalFilesystemAccess = \"read_only\" | \"read_write\";\n\nexport interface LocalFilesystemDirectoryConfig {\n id: string;\n hostPath: string;\n homeName: string;\n access: LocalFilesystemAccess;\n description?: string;\n}\n\nexport interface LocalFilesystemConnectionMetadata {\n localFilesystem: {\n directories: LocalFilesystemDirectoryConfig[];\n };\n}\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "5574e281922af84bef471b9931031f16432317aa": {"t": 1785754724.824382, "n": 6441, "h": "7005f65f370deb51", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"OPENCODE_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than opencode's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const LOCAL_FILESYSTEM_CONNECTION_KIND = \"local-filesystem\" as const;\nexport const LOCAL_FILESYSTEM_PROVIDER_ID = \"local_filesystem\" as const;\nexport const LOCAL_FILESYSTEM_MOUNT_MARKER = \".desk-local-filesystem-mount.json\" as const;\nexport const LOCAL_FILESYSTEM_CAPABILITIES = [\n \"local_filesystem.read\",\n \"local_filesystem.write\",\n] as const;\n\nexport type LocalFilesystemAccess = \"read_only\" | \"read_write\";\n\nexport interface LocalFilesystemDirectoryConfig {\n id: string;\n hostPath: string;\n homeName: string;\n access: LocalFilesystemAccess;\n description?: string;\n}\n\nexport interface LocalFilesystemConnectionMetadata {\n localFilesystem: {\n directories: LocalFilesystemDirectoryConfig[];\n };\n}\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "7c487014669a8f47eeee91b05d11bd6ee0a635a8": {"t": 1785754726.987401, "n": 5723, "h": "6dd0e4da6bbe474f", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"OPENCODE_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than opencode's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "32c87541640cac5a45ebc6def988d3cda8cc7b6b": {"t": 1785754728.2031124, "n": 5701, "h": "9844203c22d039ae", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n connectorConnection: \"con_\",\n workspaceConnectorGrant: \"wcg_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than opencode's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "ef70e1901b4b079e1ac4ef6554c7d0b3fdc5ecdd": {"t": 1785754729.8421557, "n": 5635, "h": "8c8dbd8202602e6b", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n pin: \"pin_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than opencode's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "e3da3fcfad6128fbd222727b7743a07b28f1e604": {"t": 1785754731.0099456, "n": 5620, "h": "f366e977ff1e781b", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for model provider keys the user can manage via\n * /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n\n/**\n * Non-model service credentials that Desk can forward into sandboxes.\n * These live in the same encrypted vault-backed Settings → Connections flow\n * as provider keys, but are used by command-line tools rather than opencode's\n * model provider auto-detection.\n */\nexport const SANDBOX_CONNECTION_ENV_VARS = [\n \"GITHUB_TOKEN\",\n] as const;\n\nexport type SandboxConnectionEnvName = (typeof SANDBOX_CONNECTION_ENV_VARS)[number];\n\n/** All encrypted connection env vars accepted by /me/providers. */\nexport const CONNECTION_ENV_VARS = [\n ...PROVIDER_KEY_VARS,\n ...SANDBOX_CONNECTION_ENV_VARS,\n] as const;\n\nexport type ConnectionEnvName = (typeof CONNECTION_ENV_VARS)[number];\n\nexport type ConnectionAuthKind = \"api-key\";\nexport type SandboxAuthSetup = \"github-askpass\";\nexport type ConnectionManualGuide = \"github-pat\";\n\nexport interface ManagedConnectionDefinition {\n kind: string;\n name: string;\n description: string;\n icon: string;\n envKey: ConnectionEnvName;\n authKinds: readonly ConnectionAuthKind[];\n secretLabel: string;\n secretPlaceholder: string;\n manualGuide?: ConnectionManualGuide;\n envAliases?: readonly string[];\n sandboxSetup?: SandboxAuthSetup;\n}\n\nexport const MANAGED_CONNECTIONS = {\n claude: {\n kind: \"claude\",\n name: \"Claude\",\n description: \"Claude models via the Anthropic API\",\n icon: \"🅰️\",\n envKey: \"ANTHROPIC_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-ant-…\",\n },\n chatgpt: {\n kind: \"chatgpt\",\n name: \"ChatGPT\",\n description: \"OpenAI models via the OpenAI API\",\n icon: \"🅶\",\n envKey: \"OPENAI_API_KEY\",\n authKinds: [\"api-key\"],\n secretLabel: \"API key\",\n secretPlaceholder: \"sk-…\",\n },\n github: {\n kind: \"github\",\n name: \"GitHub\",\n description: \"Repositories and issues\",\n icon: \"🐙\",\n envKey: \"GITHUB_TOKEN\",\n authKinds: [\"api-key\"],\n secretLabel: \"Classic personal access token\",\n secretPlaceholder: \"ghp_…\",\n manualGuide: \"github-pat\",\n envAliases: [\"GH_TOKEN\"],\n sandboxSetup: \"github-askpass\",\n },\n} as const satisfies Record<string, ManagedConnectionDefinition>;\n\nexport const MANAGED_CONNECTION_DEFINITIONS = Object.values(MANAGED_CONNECTIONS) as ManagedConnectionDefinition[];\n\nexport const MANAGED_CONNECTION_ENV_ALIASES = MANAGED_CONNECTION_DEFINITIONS\n .flatMap((definition) => definition.envAliases ?? []);\n\nexport const MANAGED_CONNECTION_ENV_KEYS = MANAGED_CONNECTION_DEFINITIONS\n .map((definition) => definition.envKey);\n\nexport const MANAGED_CONNECTION_BY_ENV_KEY = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.envKey, definition]),\n) as Partial<Record<ConnectionEnvName, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition]),\n) as Partial<Record<string, ManagedConnectionDefinition>>;\n\nexport const MANAGED_CONNECTION_ENV_KEY_BY_KIND = Object.fromEntries(\n MANAGED_CONNECTION_DEFINITIONS.map((definition) => [definition.kind, definition.envKey]),\n) as Partial<Record<string, ConnectionEnvName>>;\n\nexport function connectionDefinitionForEnvKey(envKey: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_ENV_KEY[envKey as ConnectionEnvName]\n ?? MANAGED_CONNECTION_DEFINITIONS.find((definition) => definition.envKey === envKey);\n}\n\nexport function connectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return MANAGED_CONNECTION_BY_KIND[kind];\n}\n\nexport function managedConnectionDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS;\n}\n\nexport function managedConnectionAuthSetupDefinitions(): ManagedConnectionDefinition[] {\n return MANAGED_CONNECTION_DEFINITIONS.filter(definition => Boolean(definition.sandboxSetup));\n}\n\nexport function managedConnectionDefinitionForKind(kind: string): ManagedConnectionDefinition | undefined {\n return (MANAGED_CONNECTIONS as Record<string, ManagedConnectionDefinition>)[kind];\n}\n\nexport function managedConnectionEnvKeyForKind(kind: string): ConnectionEnvName | undefined {\n return managedConnectionDefinitionForKind(kind)?.envKey;\n}\n"}, "ff5d9fc67700152d80f77d4a48378472e50c9ab4": {"t": 1785754732.8860013, "n": 1385, "h": "c7400fe68d98b60a", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for keys the user can manage via /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n"}, "679a13fe68559139b97264d9d07c36a27f495ca6": {"t": 1785754734.255397, "n": 1379, "h": "e64c9acffbe08a0e", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n appSession: \"aps_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for keys the user can manage via /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n"}, "8974926342814754738c445649f89ed8a11bfdd4": {"t": 1785754736.4525547, "n": 1357, "h": "d632685a9ea053b0", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for keys the user can manage via /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n"}, "3582625bc4ad1adbd79c5fd1c4210de360cb2472": {"t": 1785754737.8161485, "n": 1365, "h": "6b1851c0aebd1818", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\n\n/** Kinds emitted by message.log_appended WS events. */\nexport const MESSAGE_LOG_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for keys the user can manage via /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n"}, "bd07d398b31060da2820eb3138a6a7e2059264a8": {"t": 1785754739.9452262, "n": 1657, "h": "41a4c04066daa1b4", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n file: \"fil_\",\n run: \"run_\",\n scheduledJob: \"job_\",\n note: \"note_\",\n runEvent: \"rev_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const RUN_STATES = [\"pending\", \"running\", \"succeeded\", \"failed\", \"cancelled\"] as const;\nexport const RUN_KINDS = [\"immediate\", \"scheduled\", \"recurring\", \"ai_note\"] as const;\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\nexport const SCHEDULED_JOB_KINDS = [\"once\", \"recurring\", \"ai_note\"] as const;\nexport const RUN_EVENT_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for keys the user can manage via /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n"}, "a10a2b8cc312c779bbc745e83d949f72b657cacc": {"t": 1785754741.3901248, "n": 1741, "h": "5941b945899c4c85", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n file: \"fil_\",\n run: \"run_\",\n scheduledJob: \"job_\",\n note: \"note_\",\n runEvent: \"rev_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const RUN_STATES = [\"pending\", \"running\", \"succeeded\", \"failed\", \"cancelled\"] as const;\nexport const RUN_KINDS = [\"immediate\", \"scheduled\", \"recurring\", \"ai_note\"] as const;\nexport const FILE_CLASSES = [\"artifact\", \"workspace\", \"cache\", \"library\"] as const;\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\nexport const SCHEDULED_JOB_KINDS = [\"once\", \"recurring\", \"ai_note\"] as const;\nexport const RUN_EVENT_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n\n/**\n * AI-provider credentials known to opencode. Used both for forwarding host\n * env into sandboxes and for keys the user can manage via /me/providers.\n */\nexport const PROVIDER_KEY_VARS = [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"GEMINI_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n \"MISTRAL_API_KEY\",\n \"GROQ_API_KEY\",\n \"DEEPSEEK_API_KEY\",\n \"XAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"COHERE_API_KEY\",\n \"PERPLEXITY_API_KEY\",\n \"TOGETHER_API_KEY\",\n \"FIREWORKS_API_KEY\",\n \"CEREBRAS_API_KEY\",\n \"AZURE_API_KEY\",\n \"AWS_ACCESS_KEY_ID\",\n \"AWS_SECRET_ACCESS_KEY\",\n // Bedrock needs these alongside the AWS pair above to actually reach a\n // regional endpoint — not opencode-recognized auth keys on their own.\n \"AWS_SESSION_TOKEN\",\n \"AWS_REGION\",\n \"AWS_DEFAULT_REGION\",\n] as const;\n\nexport type ProviderKeyName = (typeof PROVIDER_KEY_VARS)[number];\n"}, "eaca99509940431041a229ad453db653b62e9fb4": {"t": 1785754742.8703117, "n": 879, "h": "1f2836db689c06f4", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n file: \"fil_\",\n run: \"run_\",\n scheduledJob: \"job_\",\n note: \"note_\",\n runEvent: \"rev_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const RUN_STATES = [\"pending\", \"running\", \"succeeded\", \"failed\", \"cancelled\"] as const;\nexport const RUN_KINDS = [\"immediate\", \"scheduled\", \"recurring\", \"ai_note\"] as const;\nexport const FILE_CLASSES = [\"artifact\", \"workspace\", \"cache\", \"library\"] as const;\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\nexport const SCHEDULED_JOB_KINDS = [\"once\", \"recurring\", \"ai_note\"] as const;\nexport const RUN_EVENT_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n"}, "0e6cb61e918cb5d4f127496d97cdca274e18079e": {"t": 1785754744.4295256, "n": 887, "h": "a3d700be548fd99c", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n file: \"fil_\",\n run: \"run_\",\n scheduledJob: \"job_\",\n note: \"note_\",\n runEvent: \"rev_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const RUN_STATES = [\"pending\", \"running\", \"succeeded\", \"failed\", \"cancelled\"] as const;\nexport const RUN_KINDS = [\"immediate\", \"scheduled\", \"recurring\", \"ai_note\"] as const;\nexport const FILE_CLASSES = [\"artifact\", \"workspace\", \"note\", \"cache\", \"library\"] as const;\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\nexport const SCHEDULED_JOB_KINDS = [\"once\", \"recurring\", \"ai_note\"] as const;\nexport const RUN_EVENT_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n"}, "89554259cf032936df42d81ade55c3d72170d7dd": {"t": 1785754745.7915735, "n": 801, "h": "510bb64fd6bdb208", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n file: \"fil_\",\n run: \"run_\",\n scheduledJob: \"job_\",\n note: \"note_\",\n runEvent: \"rev_\",\n sandboxSession: \"sbs_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const RUN_STATES = [\"pending\", \"running\", \"succeeded\", \"failed\", \"cancelled\"] as const;\nexport const FILE_CLASSES = [\"artifact\", \"workspace\", \"note\", \"cache\", \"library\"] as const;\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\nexport const SCHEDULED_JOB_KINDS = [\"once\", \"recurring\", \"ai_note\"] as const;\nexport const RUN_EVENT_KINDS = [\"stdout\", \"stderr\", \"event\"] as const;\n"}, "077b012a1ec3e0e3560a47ea9812f1e14ce47df2": {"t": 1785754747.1855187, "n": 673, "h": "a62a9a67e5aa1c7b", "c": "export const ID_PREFIXES = {\n user: \"usr_\",\n agent: \"agt_\",\n workspace: \"wks_\",\n chat: \"cht_\",\n message: \"msg_\",\n file: \"fil_\",\n run: \"run_\",\n scheduledJob: \"job_\",\n note: \"note_\",\n} as const;\n\nexport const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;\nexport const MAX_MESSAGE_BYTES = 128 * 1024;\nexport const DEFAULT_LIBRARY_PAGE_SIZE = 50;\n\nexport const RUN_STATES = [\"pending\", \"running\", \"succeeded\", \"failed\", \"cancelled\"] as const;\nexport const FILE_CLASSES = [\"artifact\", \"workspace\", \"note\", \"cache\"] as const;\nexport const MESSAGE_ROLES = [\"user\", \"agent\", \"system\", \"tool\"] as const;\nexport const SCHEDULED_JOB_KINDS = [\"once\", \"recurring\", \"ai_note\"] as const;\n"}}}}