deepspace 0.3.9 → 0.3.11

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 (120) hide show
  1. package/dist/cli.js +96 -18
  2. package/dist/cli.js.map +1 -1
  3. package/dist/index.d.ts +160 -1
  4. package/dist/index.js +283 -126
  5. package/dist/index.js.map +1 -1
  6. package/dist/server.d.ts +172 -2
  7. package/dist/server.js +581 -1
  8. package/dist/server.js.map +1 -1
  9. package/dist/worker.d.ts +252 -2
  10. package/dist/worker.js +588 -1
  11. package/dist/worker.js.map +1 -1
  12. package/features/admin-page/feature.json +29 -0
  13. package/features/admin-page/src/AdminPage.tsx +292 -0
  14. package/features/admin-page/src/admin-schema.ts +20 -0
  15. package/features/ai-chat/feature.json +41 -0
  16. package/features/ai-chat/src/AiChatPage.tsx +692 -0
  17. package/features/ai-chat/src/ChatPanel.tsx +1098 -0
  18. package/features/ai-chat/src/ai-chat-schema.ts +11 -0
  19. package/features/canvas/feature.json +45 -0
  20. package/features/canvas/src/CanvasEditorPage.tsx +87 -0
  21. package/features/canvas/src/CanvasListPage.tsx +202 -0
  22. package/features/canvas/src/canvas-schema.ts +33 -0
  23. package/features/canvas/src/components/CanvasToolbar.tsx +170 -0
  24. package/features/canvas/src/components/CanvasView.tsx +369 -0
  25. package/features/canvas/src/components/ShapeRenderer.tsx +114 -0
  26. package/features/cron/feature.json +33 -0
  27. package/features/cron/src/CronLogPage.tsx +100 -0
  28. package/features/cron/src/cron.ts +25 -0
  29. package/features/docs/feature.json +96 -0
  30. package/features/docs/src/DocsEditorPage.tsx +1012 -0
  31. package/features/docs/src/DocsListPage.tsx +951 -0
  32. package/features/docs/src/DocsOutlinePanel.tsx +68 -0
  33. package/features/docs/src/DocsPresence.tsx +138 -0
  34. package/features/docs/src/InviteDialog.tsx +336 -0
  35. package/features/docs/src/LibrarySidebar.tsx +464 -0
  36. package/features/docs/src/docs-favorites.ts +18 -0
  37. package/features/docs/src/docs-library-types.ts +15 -0
  38. package/features/docs/src/docs-schema.ts +80 -0
  39. package/features/docs/src/docs-ui.css +309 -0
  40. package/features/docs/src/editor/DocEditorSurface.tsx +257 -0
  41. package/features/docs/src/editor/DocsTiptapToolbar.tsx +560 -0
  42. package/features/docs/src/editor/useDocEditor.ts +206 -0
  43. package/features/docs/src/use-yjs-room-with-awareness.ts +285 -0
  44. package/features/file-attachments/feature.json +42 -0
  45. package/features/file-attachments/src/AttachmentsPage.tsx +864 -0
  46. package/features/file-attachments/src/attachments-constants.ts +9 -0
  47. package/features/file-attachments/src/attachments-schema.ts +45 -0
  48. package/features/file-attachments/src/useFilePreview.ts +471 -0
  49. package/features/file-attachments/src/useMimeTypeDetection.ts +138 -0
  50. package/features/file-manager/feature.json +24 -0
  51. package/features/file-manager/src/FileManagerPage.tsx +330 -0
  52. package/features/integration-test/feature.json +18 -0
  53. package/features/integration-test/src/IntegrationTestPage.tsx +423 -0
  54. package/features/integration-test/src/integration.spec.ts +42 -0
  55. package/features/items/feature.json +33 -0
  56. package/features/items/src/ItemsPage.tsx +325 -0
  57. package/features/items/src/items-constants.ts +10 -0
  58. package/features/items/src/items-schema.ts +27 -0
  59. package/features/kanban/feature.json +18 -0
  60. package/features/kanban/src/Kanban.tsx +283 -0
  61. package/features/landing/feature.json +62 -0
  62. package/features/landing/src/LandingPage.tsx +627 -0
  63. package/features/landing/src/primitives.tsx +389 -0
  64. package/features/landing/src/sections/FAQSection.tsx +110 -0
  65. package/features/landing/src/sections/FeaturesGridSection.tsx +311 -0
  66. package/features/landing/src/sections/HowItWorksSection.tsx +62 -0
  67. package/features/landing/src/sections/LogoCloudSection.tsx +58 -0
  68. package/features/landing/src/sections/ShowcaseSection.tsx +63 -0
  69. package/features/landing/src/sections/StatsSection.tsx +31 -0
  70. package/features/landing/src/sections/TeamSection.tsx +86 -0
  71. package/features/landing/src/sections/TestimonialsSection.tsx +68 -0
  72. package/features/landing/src/sections/VideoSection.tsx +71 -0
  73. package/features/leaderboard/feature.json +33 -0
  74. package/features/leaderboard/src/LeaderboardPage.tsx +372 -0
  75. package/features/leaderboard/src/leaderboard-constants.ts +21 -0
  76. package/features/leaderboard/src/leaderboard-schema.ts +36 -0
  77. package/features/messaging/feature.json +111 -0
  78. package/features/messaging/src/ChatMultiPage.tsx +300 -0
  79. package/features/messaging/src/ChatPage.tsx +75 -0
  80. package/features/messaging/src/components/chat/ChatHeader.tsx +76 -0
  81. package/features/messaging/src/components/chat/MessageActionSheet.tsx +168 -0
  82. package/features/messaging/src/components/chat/MessageInput.tsx +65 -0
  83. package/features/messaging/src/components/chat/MessageItem.tsx +352 -0
  84. package/features/messaging/src/components/chat/MessageList.tsx +248 -0
  85. package/features/messaging/src/components/chat/ReactionPicker.tsx +2 -0
  86. package/features/messaging/src/components/chat/ThreadPanel.tsx +107 -0
  87. package/features/messaging/src/components/chat/UserProfilePopover.tsx +158 -0
  88. package/features/messaging/src/components/chat-multi/AddMemberModal.tsx +188 -0
  89. package/features/messaging/src/components/chat-multi/BrowseGroupsModal.tsx +163 -0
  90. package/features/messaging/src/components/chat-multi/ChannelListItem.tsx +147 -0
  91. package/features/messaging/src/components/chat-multi/ChannelSettingsPanel.tsx +344 -0
  92. package/features/messaging/src/components/chat-multi/ChannelSidebar.tsx +460 -0
  93. package/features/messaging/src/components/chat-multi/CreateGroupModal.tsx +190 -0
  94. package/features/messaging/src/components/chat-multi/InvitationList.tsx +149 -0
  95. package/features/messaging/src/components/chat-multi/NewMessageModal.tsx +159 -0
  96. package/features/messaging/src/hooks/useChatChannel.ts +64 -0
  97. package/features/messaging/src/hooks/useLongPress.ts +74 -0
  98. package/features/messaging/src/hooks/useMultiChannel.ts +142 -0
  99. package/features/messaging/src/messaging-schema.ts +25 -0
  100. package/features/presence-test/feature.json +21 -0
  101. package/features/presence-test/src/PresenceTestPage.tsx +120 -0
  102. package/features/sidebar/feature.json +19 -0
  103. package/features/sidebar/src/AppSidebar.tsx +558 -0
  104. package/features/tasks/feature.json +33 -0
  105. package/features/tasks/src/TasksPage.tsx +598 -0
  106. package/features/tasks/src/tasks-constants.ts +43 -0
  107. package/features/tasks/src/tasks-schema.ts +56 -0
  108. package/features/testing/feature.json +49 -0
  109. package/features/testing/src/TestPage.tsx +145 -0
  110. package/features/testing/src/cpu-burn-action.ts +51 -0
  111. package/features/testing/src/subrequest-burn-action.ts +53 -0
  112. package/features/testing/src/test-schema.ts +23 -0
  113. package/features/topbar/feature.json +18 -0
  114. package/features/topbar/src/Topbar.tsx +353 -0
  115. package/features/tree/feature.json +26 -0
  116. package/features/tree/src/TreeSidebar.tsx +607 -0
  117. package/features/tree/src/tree-constants.ts +68 -0
  118. package/features/tree/src/tree-hooks.ts +258 -0
  119. package/package.json +4 -2
  120. package/scripts/add-feature.cjs +654 -0
package/dist/server.d.ts CHANGED
@@ -1062,6 +1062,10 @@ declare const MSG: {
1062
1062
  readonly CRON_PAUSE: "cron.pause";
1063
1063
  readonly CRON_RESUME: "cron.resume";
1064
1064
  readonly CRON_STATUS: "cron.status";
1065
+ readonly JOB_ENQUEUE: "job.enqueue";
1066
+ readonly JOB_CANCEL: "job.cancel";
1067
+ readonly JOB_RETRY: "job.retry";
1068
+ readonly JOB_UPDATE: "job.update";
1065
1069
  readonly PRESENCE_SYNC: "presence.sync";
1066
1070
  readonly PRESENCE_JOIN: "presence.join";
1067
1071
  readonly PRESENCE_LEAVE: "presence.leave";
@@ -1243,6 +1247,12 @@ type ServerMessage = BaseMessage<typeof MSG.QUERY_RESULT, {
1243
1247
  }> | BaseMessage<typeof MSG.CRON_STATUS, {
1244
1248
  tasks: unknown;
1245
1249
  recentHistory: unknown;
1250
+ }> | BaseMessage<typeof MSG.JOB_UPDATE, {
1251
+ kind: 'snapshot' | 'enqueued' | 'progress' | 'succeeded' | 'failed' | 'canceled' | 'retried';
1252
+ job?: unknown;
1253
+ jobs?: unknown[];
1254
+ /** Echoes the enqueue requestId when the update is the enqueue ack. */
1255
+ requestId?: string;
1246
1256
  }> | BaseMessage<typeof MSG.PRESENCE_SYNC, {
1247
1257
  peers: unknown[];
1248
1258
  }> | BaseMessage<typeof MSG.PRESENCE_JOIN, {
@@ -1989,6 +1999,166 @@ declare abstract class CronRoom<E = Record<string, unknown>> extends BaseRoom<E>
1989
1999
  protected abstract onTask(taskName: string): void | Promise<void>;
1990
2000
  }
1991
2001
 
2002
+ /**
2003
+ * JobRoom — Per-app durable background-job execution Durable Object.
2004
+ *
2005
+ * Solves the "long job dies when the response goes out" problem on
2006
+ * Cloudflare Workers. `ctx.waitUntil` only gets 30s after a response;
2007
+ * jobs that need minutes-to-hours live here instead: rows in SQLite,
2008
+ * picked up by DO alarms (15-min wall budget per tick), resumable
2009
+ * across ticks via `ctx.continue` for the rare longer cases.
2010
+ *
2011
+ * Lifecycle: queued → running → succeeded | failed | canceled
2012
+ *
2013
+ * Crash recovery: if an isolate is recycled mid-run, the row stays at
2014
+ * `running`. On next init, rows older than ~16 min are either retried
2015
+ * (if attempts left) or marked failed.
2016
+ *
2017
+ * See the abstract `onJob` method below for the subclass contract.
2018
+ * Message types: job.*
2019
+ */
2020
+
2021
+ type JobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled';
2022
+ /**
2023
+ * Job record exposed to `onJob` handlers and clients. Payloads are typed
2024
+ * as `unknown` at the SDK layer; subclasses narrow via a generic param.
2025
+ */
2026
+ interface Job<P = unknown> {
2027
+ id: string;
2028
+ type: string;
2029
+ status: JobStatus;
2030
+ payload: P;
2031
+ result?: unknown;
2032
+ error?: string;
2033
+ progress?: number;
2034
+ progressMessage?: string;
2035
+ attempts: number;
2036
+ maxAttempts: number;
2037
+ enqueuedAt: string;
2038
+ startedAt?: string | null;
2039
+ completedAt?: string | null;
2040
+ enqueuedBy?: string | null;
2041
+ /** Set when a previous run called `ctx.continue(state)`. */
2042
+ resumeFrom?: unknown;
2043
+ }
2044
+ interface JobContext {
2045
+ /** Set progress (0..1) with an optional message. Broadcasts. */
2046
+ progress(value: number, message?: string): void;
2047
+ /**
2048
+ * Save a resumable checkpoint and re-run `onJob` on the next alarm
2049
+ * with `job.resumeFrom = state`. The return value of `onJob` is
2050
+ * ignored once `continue` has been called.
2051
+ */
2052
+ continue(state: unknown, options?: {
2053
+ afterMs?: number;
2054
+ }): void;
2055
+ /**
2056
+ * Fires when a JOB_CANCEL arrives while this job is running in this
2057
+ * isolate. Cross-isolate cancels still mark the row `canceled` but
2058
+ * can't fire this signal.
2059
+ */
2060
+ signal: AbortSignal;
2061
+ }
2062
+ interface JobRoomConfig {
2063
+ /** Default for jobs enqueued without explicit `maxAttempts`. Default 1 (no auto-retry). */
2064
+ defaultMaxAttempts?: number;
2065
+ /** TTL for terminal rows (succeeded/failed/canceled) in ms. Default 24h. */
2066
+ retentionMs?: number;
2067
+ /** Job count in the initial snapshot to a new subscriber. Default 100. */
2068
+ snapshotLimit?: number;
2069
+ /** Delay before a failed attempt is retried, in ms. Default 1000. */
2070
+ retryBackoffMs?: number;
2071
+ }
2072
+ declare abstract class JobRoom<E = Record<string, unknown>, P = unknown, R = unknown> extends BaseRoom<E> {
2073
+ private initialized;
2074
+ private readonly defaultMaxAttempts;
2075
+ private readonly retentionMs;
2076
+ private readonly snapshotLimit;
2077
+ private readonly retryBackoffMs;
2078
+ /** In-flight jobs in this isolate; lets same-isolate JOB_CANCEL fire the signal. */
2079
+ private readonly inFlight;
2080
+ /** Set by `ctx.continue` inside `executeJob`; reset before every run. */
2081
+ private continueState;
2082
+ constructor(state: DurableObjectState, env: unknown, config?: JobRoomConfig);
2083
+ private ensureInitialized;
2084
+ fetch(request: Request): Promise<Response>;
2085
+ protected onConnect(ws: WebSocket, user: UserAttachment): UserAttachment;
2086
+ protected onMessage(ws: WebSocket, user: UserAttachment, message: {
2087
+ type: string;
2088
+ [key: string]: unknown;
2089
+ }): Promise<void>;
2090
+ protected onAlarm(): Promise<void>;
2091
+ /**
2092
+ * One internal endpoint, `POST /enqueue`, used by the `enqueueJob`
2093
+ * helper at the bottom of this file. The room is not meant to be
2094
+ * reachable from the public internet; callers route through the app
2095
+ * worker (or call `this.enqueue(...)` directly from a subclass).
2096
+ *
2097
+ * Subclasses overriding `onRequest` should call `super.onRequest(req)`
2098
+ * for paths they don't handle.
2099
+ */
2100
+ protected onRequest(request: Request): Promise<Response>;
2101
+ /**
2102
+ * Synchronously persist a new job and arm the alarm. Returns the new
2103
+ * job. This is the in-isolate path — useful for a subclass `onJob`
2104
+ * that wants to chain follow-up work without paying a fetch hop:
2105
+ *
2106
+ * protected async onJob(job: Job, ctx: JobContext) {
2107
+ * // ... do work ...
2108
+ * if (needsFollowup) this.enqueue('followup', { parent: job.id })
2109
+ * }
2110
+ *
2111
+ * Workers code that lives outside the DO isolate (HTTP routes, cron
2112
+ * tasks, server actions) cannot call this directly — they must go
2113
+ * through the `enqueueJob` helper at the bottom of this file, which
2114
+ * routes via the DO's `/enqueue` HTTP endpoint.
2115
+ */
2116
+ enqueue(type: string, payload?: unknown, options?: {
2117
+ maxAttempts?: number;
2118
+ enqueuedBy?: string;
2119
+ }): Job;
2120
+ private insertJob;
2121
+ private cancelJob;
2122
+ private retryJob;
2123
+ /**
2124
+ * Drain due jobs in FIFO order. All due jobs share the alarm's
2125
+ * 15-min wall budget (a CF property, not a per-job allocation).
2126
+ */
2127
+ private drainDueJobs;
2128
+ private executeJob;
2129
+ private makeContext;
2130
+ private readStatus;
2131
+ private scheduleNextAlarm;
2132
+ private recoverStuckRunning;
2133
+ private pruneExpired;
2134
+ private getRecentJobs;
2135
+ private getJobById;
2136
+ /**
2137
+ * Run a single job. Return a value for success; throw for failure
2138
+ * (retried until attempts >= maxAttempts). Use `ctx.progress` for
2139
+ * progress, `ctx.continue(state)` to span multiple alarms, and
2140
+ * `ctx.signal` to honor client cancellations.
2141
+ */
2142
+ protected abstract onJob(job: Job<P>, ctx: JobContext): Promise<R | void> | R | void;
2143
+ }
2144
+ /**
2145
+ * Enqueue a job from worker code that has the DO namespace. Routed by
2146
+ * `roomId` (typically `app:<APP_NAME>`; pass different ids for sharded
2147
+ * queues). Returns the new jobId; throws on failure.
2148
+ *
2149
+ * const jobId = await enqueueJob(
2150
+ * env.JOB_ROOMS,
2151
+ * `app:${env.APP_NAME}`,
2152
+ * 'ai-summarize',
2153
+ * { text },
2154
+ * { maxAttempts: 3 },
2155
+ * )
2156
+ */
2157
+ declare function enqueueJob(namespace: DurableObjectNamespace, roomId: string, type: string, payload?: unknown, options?: {
2158
+ maxAttempts?: number;
2159
+ enqueuedBy?: string;
2160
+ }): Promise<string>;
2161
+
1992
2162
  /**
1993
2163
  * DO Manifest — Dynamic Durable Object binding declarations.
1994
2164
  *
@@ -2713,7 +2883,7 @@ declare function handleToolsRequest(ctx: ToolsApiContext, request: Request, path
2713
2883
  interface JwtVerifierConfig {
2714
2884
  /** PEM-encoded public key (ES256) for JWT verification */
2715
2885
  publicKey: string;
2716
- /** Expected issuer (e.g. "https://auth.deep.space") */
2886
+ /** Expected issuer (e.g. "https://auth.deep.space/api/auth") */
2717
2887
  issuer: string;
2718
2888
  /** Expected audience (usually the configured platform API URL) */
2719
2889
  audience?: string | string[];
@@ -3802,4 +3972,4 @@ declare class RefundError extends Error {
3802
3972
  constructor(message: string, status: number);
3803
3973
  }
3804
3974
 
3805
- export { AI_CHATS_SCHEMA, AI_MESSAGES_SCHEMA, ALLOWED_BINDING_TYPES, APP_NAME_RULES, AUTO_PROVISIONABLE_TYPES, AUTO_PROVISION_SENTINEL, type ActionContext, type ActionHandler, type ActionResult, type ActionTools, type ApiWorkerEnv, type AppNameResolution, type AppNameValidation, type AuthWorkerEnv, BASE_USERS_SCHEMA, BUILT_IN_TOOLS, BaseRoom, CHANNELS_SCHEMA, CHANNEL_INVITATIONS_SCHEMA, CHANNEL_MEMBERS_SCHEMA, CONVERSATION_SCHEMAS, COST_RATES, CancelSubscriptionError, type CancelSubscriptionOpts, type CancelSubscriptionResult, CanvasRoom, type CanvasShape, type ChatContextConfig, type ChatMessageRow, type ChatRow, type ChatTurn, type CollectionPermissionSummary, type CollectionSchema, type ColumnDefinition, type ColumnInterpretation, type ConvMemberData, type ConvMessageData, type ConvReactionData, type ConvReadCursorData, type ConvVoteData, type ConversationStateData, type CronContext, type CronExecution, CronRoom, type CronRoomConfig, type CronTask, type CustomBinding, type CustomBindingManifest, DEFAULT_CONTEXT_CONFIG, DEFAULT_DO_MANIFEST, DEFAULT_MAX_SKEW_MS, DIRECTORY_SCHEMAS, type DOBindings, type DOManifest, type DOManifestEntry, type DebugApiContext, type DeepSpaceAIEnv, type DeepSpaceAIOptions, type DeepSpaceAuth, type DeepSpaceAuthConfig, type DirectoryCommunityData, type DirectoryConversationData, type DirectoryMembershipData, type DirectoryPostData, type DoMigrationDirective, type DoMigrationPlan, type ExistingDOBinding, GLOBAL_DO_TYPES, GLOBAL_DO_TYPE_NAMES, type GameInput, GameRoom, type GameRoomConfig, type GetActionData, type GlobalDOType, type InternalSignature, type JwtClaims, type JwtVerifierConfig, MESSAGES_SCHEMA, type MutateActionData, type PermissionAnalysis, type PermissionContext, type PermissionLevel, type PermissionSource, type PlanInfo, type PlatformWorkerEnv, type Player, type PrefixResult, type PresencePeer, PresenceRoom, type QueryActionData, REACTIONS_SCHEMA, READ_RECEIPTS_SCHEMA, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, type RecordContext, RecordRoom, type RecordRoomConfig, RefundError, type RefundOpts, type RefundResult, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, SYSTEM_COLLECTION_SCHEMAS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotOptions, type ScreenshotResult, type SharedConnection, type SignInternalPayloadInput, type StoredRecord, SubscriptionAuthError, type SubscriptionContext, type SubscriptionRead, SubscriptionRequiredError, type SubscriptionStatus, type Summarizer, type TokenDebugInfo, type ToolResult, type ToolSchema, type ToolsApiContext, USERS_COLUMNS, type User, type UserAttachment, type UserContext, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyInternalSignatureInput, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, type YjsContext, YjsRoom, analyzePermissions, apiWorkerFetch, appendMessage, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, broadcastChange, broadcastYjsUpdate, buildCronContext, buildInternalPayload, buildTableSelect, buildUiParts, canCreate, canDelete, canRead, canUpdate, cancelSubscription, capToolResultSize, captureScreenshot, checkFieldPermissions, coerceValue, collectionTableName, columnId, computeDoMigration, computeHmacHex, createChat, createDeepSpaceAI, createDeepSpaceAuth, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deleteChatCascade, deleteRecord, executeQuery, getAllUsers, getChat, getGlobalDOSchemas, getGlobalDOType, getOrCreateYjsDoc, getRecord, getRolePermissions, getSubscription, getUser, getYjsDocKey, handleApiRequest, handleDelete, handlePut, handleSetRole, handleSubscribe, handleToolsRequest, handleUnsubscribe, handleUserList, handleUserUpdate, handleYjsBinaryMessage, handleYjsJoin, handleYjsLeave, isAutoProvision, isOwner, lintSchema, loadMessages, makeDefaultSummarizer, meterAi, meterUsage, meterVectorize, noopPermissionContext, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, putRecord, readRecord, recordMatchesSubscription, refundInvoice, registerUser, requireSubscription, resolveAppName, resolveColumn, rowToData, runMigrations, saveYjsDoc, signInternalPayload, timingSafeEqualHex, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppName, validateBindingManifest, validateDoManifest, verifyInternalSignature, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema };
3975
+ export { AI_CHATS_SCHEMA, AI_MESSAGES_SCHEMA, ALLOWED_BINDING_TYPES, APP_NAME_RULES, AUTO_PROVISIONABLE_TYPES, AUTO_PROVISION_SENTINEL, type ActionContext, type ActionHandler, type ActionResult, type ActionTools, type ApiWorkerEnv, type AppNameResolution, type AppNameValidation, type AuthWorkerEnv, BASE_USERS_SCHEMA, BUILT_IN_TOOLS, BaseRoom, CHANNELS_SCHEMA, CHANNEL_INVITATIONS_SCHEMA, CHANNEL_MEMBERS_SCHEMA, CONVERSATION_SCHEMAS, COST_RATES, CancelSubscriptionError, type CancelSubscriptionOpts, type CancelSubscriptionResult, CanvasRoom, type CanvasShape, type ChatContextConfig, type ChatMessageRow, type ChatRow, type ChatTurn, type CollectionPermissionSummary, type CollectionSchema, type ColumnDefinition, type ColumnInterpretation, type ConvMemberData, type ConvMessageData, type ConvReactionData, type ConvReadCursorData, type ConvVoteData, type ConversationStateData, type CronContext, type CronExecution, CronRoom, type CronRoomConfig, type CronTask, type CustomBinding, type CustomBindingManifest, DEFAULT_CONTEXT_CONFIG, DEFAULT_DO_MANIFEST, DEFAULT_MAX_SKEW_MS, DIRECTORY_SCHEMAS, type DOBindings, type DOManifest, type DOManifestEntry, type DebugApiContext, type DeepSpaceAIEnv, type DeepSpaceAIOptions, type DeepSpaceAuth, type DeepSpaceAuthConfig, type DirectoryCommunityData, type DirectoryConversationData, type DirectoryMembershipData, type DirectoryPostData, type DoMigrationDirective, type DoMigrationPlan, type ExistingDOBinding, GLOBAL_DO_TYPES, GLOBAL_DO_TYPE_NAMES, type GameInput, GameRoom, type GameRoomConfig, type GetActionData, type GlobalDOType, type InternalSignature, type Job, type JobContext, JobRoom, type JobRoomConfig, type JobStatus, type JwtClaims, type JwtVerifierConfig, MESSAGES_SCHEMA, type MutateActionData, type PermissionAnalysis, type PermissionContext, type PermissionLevel, type PermissionSource, type PlanInfo, type PlatformWorkerEnv, type Player, type PrefixResult, type PresencePeer, PresenceRoom, type QueryActionData, REACTIONS_SCHEMA, READ_RECEIPTS_SCHEMA, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, type RecordContext, RecordRoom, type RecordRoomConfig, RefundError, type RefundOpts, type RefundResult, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, SYSTEM_COLLECTION_SCHEMAS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotOptions, type ScreenshotResult, type SharedConnection, type SignInternalPayloadInput, type StoredRecord, SubscriptionAuthError, type SubscriptionContext, type SubscriptionRead, SubscriptionRequiredError, type SubscriptionStatus, type Summarizer, type TokenDebugInfo, type ToolResult, type ToolSchema, type ToolsApiContext, USERS_COLUMNS, type User, type UserAttachment, type UserContext, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyInternalSignatureInput, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, type YjsContext, YjsRoom, analyzePermissions, apiWorkerFetch, appendMessage, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, broadcastChange, broadcastYjsUpdate, buildCronContext, buildInternalPayload, buildTableSelect, buildUiParts, canCreate, canDelete, canRead, canUpdate, cancelSubscription, capToolResultSize, captureScreenshot, checkFieldPermissions, coerceValue, collectionTableName, columnId, computeDoMigration, computeHmacHex, createChat, createDeepSpaceAI, createDeepSpaceAuth, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deleteChatCascade, deleteRecord, enqueueJob, executeQuery, getAllUsers, getChat, getGlobalDOSchemas, getGlobalDOType, getOrCreateYjsDoc, getRecord, getRolePermissions, getSubscription, getUser, getYjsDocKey, handleApiRequest, handleDelete, handlePut, handleSetRole, handleSubscribe, handleToolsRequest, handleUnsubscribe, handleUserList, handleUserUpdate, handleYjsBinaryMessage, handleYjsJoin, handleYjsLeave, isAutoProvision, isOwner, lintSchema, loadMessages, makeDefaultSummarizer, meterAi, meterUsage, meterVectorize, noopPermissionContext, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, putRecord, readRecord, recordMatchesSubscription, refundInvoice, registerUser, requireSubscription, resolveAppName, resolveColumn, rowToData, runMigrations, saveYjsDoc, signInternalPayload, timingSafeEqualHex, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppName, validateBindingManifest, validateDoManifest, verifyInternalSignature, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema };