deepspace 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { LanguageModel, ToolSet, StreamTextResult, streamText, ModelMessage } from 'ai';
2
- import { Hono, Context } from 'hono';
1
+ import { LanguageModel, ToolSet, ModelMessage } from 'ai';
3
2
  import * as Y from 'yjs';
4
3
  import * as zod_v4_core from 'zod/v4/core';
5
4
  import * as zod from 'zod';
6
5
  import * as better_auth_plugins from 'better-auth/plugins';
7
6
  import * as better_auth from 'better-auth';
8
7
  import { betterAuth } from 'better-auth';
8
+ import { Context } from 'hono';
9
9
 
10
10
  /**
11
11
  * Wildcard-aware CORS origin matching for the platform workers.
@@ -704,46 +704,6 @@ interface CronEnv extends ApiWorkerEnv {
704
704
  */
705
705
  declare function buildCronContext(env: CronEnv, ownerUserId: string, roomId?: string): CronContext;
706
706
 
707
- /**
708
- * Canonical DeepSpace model catalog and agent policy.
709
- *
710
- * Provider catalogs are discovery inputs, not a safe runtime allowlist: a
711
- * model is promoted here only after its tool loop, transport, pricing, and
712
- * streaming contract have been verified end to end through the DeepSpace
713
- * proxy. Every client picker and server agent profile consumes this module.
714
- */
715
- type DeepSpaceAIProvider = 'anthropic' | 'openai' | 'cerebras';
716
- type DeepSpaceAgentProfileId = 'application' | 'documentation';
717
- type DeepSpaceAgentSupport = 'multi-step' | 'single-step' | 'none';
718
- interface DeepSpaceAIModel {
719
- id: string;
720
- label: string;
721
- provider: DeepSpaceAIProvider;
722
- providerLabel: string;
723
- family: string;
724
- /** Whether the model is eligible for DeepSpace's server-owned agent loop. */
725
- agentSupport: DeepSpaceAgentSupport;
726
- /** Profiles in which the model has passed the complete runtime contract. */
727
- agentProfiles: readonly DeepSpaceAgentProfileId[];
728
- /** Provider transport currently used by the DeepSpace proxy adapter. */
729
- transport: 'messages' | 'chat-completions';
730
- recommendation: 'frontier' | 'balanced' | 'fast' | 'available' | 'limited';
731
- note?: string;
732
- }
733
- interface DeepSpaceAgentProfile {
734
- id: DeepSpaceAgentProfileId;
735
- defaultModel: string;
736
- maxSteps: number;
737
- maxToolCalls?: number;
738
- allowedTools: 'application-defined' | readonly string[];
739
- }
740
- interface ResolvedDeepSpaceAgentModel {
741
- modelId: string;
742
- provider: DeepSpaceAIProvider;
743
- model: DeepSpaceAIModel;
744
- profile: DeepSpaceAgentProfile;
745
- }
746
-
747
707
  /**
748
708
  * AI provider helpers — create Vercel AI SDK providers that route through
749
709
  * the DeepSpace API worker proxy for per-user billing.
@@ -769,10 +729,9 @@ interface ResolvedDeepSpaceAgentModel {
769
729
  * Usage:
770
730
  *
771
731
  * // Server-side autonomous — no auth config needed
772
- * import { createDeepSpaceAI, DEEPSPACE_AI_DEFAULTS, getDeepSpaceAIModel } from 'deepspace/worker'
773
- * const selected = getDeepSpaceAIModel(DEEPSPACE_AI_DEFAULTS.directGeneration)!
774
- * const provider = createDeepSpaceAI(env, selected.provider)
775
- * const result = await generateText({ model: provider(selected.id), ... })
732
+ * import { createDeepSpaceAI } from 'deepspace/worker'
733
+ * const cerebras = createDeepSpaceAI(env, 'cerebras')
734
+ * const result = await generateText({ model: cerebras('llama-3.3-70b'), ... })
776
735
  *
777
736
  * // User-initiated (inside a request handler)
778
737
  * const jwt = c.req.header('Authorization')!.slice(7)
@@ -785,6 +744,7 @@ interface ResolvedDeepSpaceAgentModel {
785
744
  * paths into the published `dist/index.d.ts`.
786
745
  */
787
746
  type DeepSpaceModelFactory = (modelId: string) => LanguageModel;
747
+ type Provider = 'anthropic' | 'openai' | 'cerebras';
788
748
  interface DeepSpaceAIEnv extends ApiWorkerEnv {
789
749
  /**
790
750
  * Long-lived owner-scoped JWT minted at deploy time (or by `deepspace dev start`).
@@ -812,43 +772,7 @@ interface DeepSpaceAIOptions {
812
772
  * (explicit or `env.APP_OWNER_JWT`) automatically. Throws a clear error if
813
773
  * either is unconfigured.
814
774
  */
815
- declare function createDeepSpaceAI(env: DeepSpaceAIEnv, provider: DeepSpaceAIProvider, options?: DeepSpaceAIOptions): DeepSpaceModelFactory;
816
-
817
- type StreamTextOptions<TOOLS extends ToolSet> = Parameters<typeof streamText<TOOLS>>[0];
818
- type DeepSpaceAgentStreamOptions<TOOLS extends ToolSet> = Omit<StreamTextOptions<TOOLS>, 'model' | 'providerOptions' | 'stopWhen'> & {
819
- profile: DeepSpaceAgentProfileId;
820
- modelId?: unknown;
821
- authToken?: string;
822
- };
823
- interface DeepSpaceAgentStream<TOOLS extends ToolSet> {
824
- selection: ResolvedDeepSpaceAgentModel;
825
- result: StreamTextResult<TOOLS, never>;
826
- }
827
- declare class DeepSpaceAgentModelError extends Error {
828
- readonly modelId: unknown;
829
- readonly profile: DeepSpaceAgentProfileId;
830
- readonly code = "unsupported_agent_model";
831
- constructor(modelId: unknown, profile: DeepSpaceAgentProfileId);
832
- }
833
- declare class DeepSpaceAgentProfileError extends Error {
834
- readonly profile: DeepSpaceAgentProfileId;
835
- readonly toolName: string;
836
- readonly code = "agent_profile_violation";
837
- constructor(profile: DeepSpaceAgentProfileId, toolName: string);
838
- }
839
- /**
840
- * Run every DeepSpace text agent through one provider, model, and tool-loop
841
- * implementation. Agent surfaces supply only their profile-specific prompt,
842
- * messages, tools, persistence callbacks, and access token.
843
- */
844
- declare function streamDeepSpaceAgent<TOOLS extends ToolSet>(env: DeepSpaceAIEnv, options: DeepSpaceAgentStreamOptions<TOOLS>): DeepSpaceAgentStream<TOOLS>;
845
- interface DeepSpaceAgentDiagnosticContext {
846
- profile?: DeepSpaceAgentProfileId;
847
- provider?: string;
848
- modelId?: string;
849
- }
850
- /** Preserve safe structured provider diagnostics in bounded Worker logs. */
851
- declare function deepSpaceAgentErrorSummary(error: unknown, context?: DeepSpaceAgentDiagnosticContext): string;
775
+ declare function createDeepSpaceAI(env: DeepSpaceAIEnv, provider: Provider, options?: DeepSpaceAIOptions): DeepSpaceModelFactory;
852
776
 
853
777
  /**
854
778
  * Composio tools for the Vercel AI SDK.
@@ -865,12 +789,11 @@ declare function deepSpaceAgentErrorSummary(error: unknown, context?: DeepSpaceA
865
789
  *
866
790
  * Usage (inside a request handler, e.g. /api/ai/chat):
867
791
  *
868
- * import { composioTools, streamDeepSpaceAgent } from 'deepspace/worker'
792
+ * import { composioTools, createDeepSpaceAI } from 'deepspace/worker'
869
793
  * const jwt = c.req.header('Authorization')!.slice(7)
870
794
  * const tools = await composioTools(c.env, { toolkit: 'gmail', authToken: jwt })
871
- * const { result } = streamDeepSpaceAgent(c.env, {
872
- * profile: 'application', authToken: jwt, prompt, tools,
873
- * })
795
+ * const ai = createDeepSpaceAI(c.env, 'anthropic', { authToken: jwt })
796
+ * const result = streamText({ model: ai('claude-sonnet-5'), prompt, tools })
874
797
  *
875
798
  * Merge with your own tools: `tools: { ...buildTools(executor), ...composio }`.
876
799
  */
@@ -1112,155 +1035,6 @@ declare function appendMessage(stub: DurableObjectStub, msg: {
1112
1035
  parts?: unknown[];
1113
1036
  }): Promise<void>;
1114
1037
 
1115
- interface DocsCorpusChunk {
1116
- id: string;
1117
- route: string;
1118
- title: string;
1119
- heading?: string;
1120
- text: string;
1121
- }
1122
- interface DocsSearchResult {
1123
- route: string;
1124
- title: string;
1125
- heading?: string;
1126
- excerpt: string;
1127
- score: number;
1128
- }
1129
- /** Validate the generated assistant index before any content reaches a model. */
1130
- declare function parseDocsCorpus(value: unknown): DocsCorpusChunk[];
1131
- /** Deterministic local lexical retrieval used by the docs agent tools. */
1132
- declare function searchDocsCorpus(corpus: DocsCorpusChunk[], query: string, limit?: number): DocsSearchResult[];
1133
- declare function readDocsRoute(corpus: DocsCorpusChunk[], route: string): Array<Pick<DocsCorpusChunk, 'route' | 'title' | 'heading' | 'text'>>;
1134
- declare function buildDocsAssistantTools(corpus: DocsCorpusChunk[]): ToolSet;
1135
- declare function buildDocsAssistantPrompt(appName: string, currentRoute: string | undefined): string;
1136
- declare function normalizeDocsRoute(value: string): string;
1137
-
1138
- /**
1139
- * Durable, per-app abuse boundary for the public documentation assistant.
1140
- * Bind one SQLite Durable Object instance per immutable app id.
1141
- */
1142
- declare class DocsAssistantLimiter {
1143
- private readonly sql;
1144
- constructor(state: DurableObjectState);
1145
- fetch(request: Request): Promise<Response>;
1146
- private acquire;
1147
- private release;
1148
- private consumeWindow;
1149
- }
1150
-
1151
- interface DocsAssistantRouteEnv extends DeepSpaceAIEnv {
1152
- ASSETS: Fetcher;
1153
- APP_NAME: string;
1154
- DEEPSPACE_APP_ID: string;
1155
- DOCS_ASSISTANT_LIMITER: DurableObjectNamespace;
1156
- }
1157
- /** Register the standard, read-only documentation assistant endpoint. */
1158
- declare function registerDocsAssistantRoutes<Env extends DocsAssistantRouteEnv>(app: Hono<{
1159
- Bindings: Env;
1160
- }>, resolveAuth: (request: Request, env: Env) => Promise<unknown | null>): void;
1161
- /** Preserve useful provider diagnostics in Workers-for-Platforms string logs. */
1162
- declare const docsAssistantErrorSummary: typeof deepSpaceAgentErrorSummary;
1163
- interface DocsAssistantHistoryMessage {
1164
- role: 'user' | 'assistant';
1165
- content: string;
1166
- }
1167
- /**
1168
- * Accept only the completed, alternating UI turns that precede the current
1169
- * question. The browser remains stateless; the shared agent runner receives a
1170
- * bounded ephemeral transcript on each request.
1171
- */
1172
- declare function normalizeDocsAssistantHistory(value: unknown): DocsAssistantHistoryMessage[];
1173
- /**
1174
- * Own the reserved docs namespace before an existing app's SPA wildcard.
1175
- * The dispatcher rewrites public docs requests into this namespace.
1176
- */
1177
- declare function registerDocsStaticRoutes<Env extends Pick<DocsAssistantRouteEnv, 'ASSETS'>>(app: Hono<{
1178
- Bindings: Env;
1179
- }>): void;
1180
-
1181
- interface DocsMcpRouteEnv {
1182
- ASSETS: Fetcher;
1183
- DEEPSPACE_APP_ID: string;
1184
- DOCS_ASSISTANT_LIMITER: DurableObjectNamespace;
1185
- }
1186
- /** Register the public, stateless MCP endpoint for a documentation surface. */
1187
- declare function registerDocsMcpRoutes<Env extends DocsMcpRouteEnv>(app: Hono<{
1188
- Bindings: Env;
1189
- }>): void;
1190
-
1191
- interface DeepSpaceDocsRouteEnv extends DocsAssistantRouteEnv, DocsMcpRouteEnv {
1192
- }
1193
- interface DeepSpaceDocsRouteOptions<Env extends DeepSpaceDocsRouteEnv> {
1194
- resolveAuth: (request: Request, env: Env) => Promise<unknown | null>;
1195
- }
1196
- /** Register the complete native docs protocol surface in its required order. */
1197
- declare function registerDeepSpaceDocs<Env extends DeepSpaceDocsRouteEnv>(app: Hono<{
1198
- Bindings: Env;
1199
- }>, options: DeepSpaceDocsRouteOptions<Env>): void;
1200
- /** Canonical manifest entry for the public docs assistant/MCP concurrency limiter. */
1201
- declare function docsAssistantLimiterManifestEntry<ClassName extends string>(className: ClassName): {
1202
- readonly binding: "DOCS_ASSISTANT_LIMITER";
1203
- readonly className: ClassName;
1204
- readonly sqlite: true;
1205
- };
1206
-
1207
- interface DocsPublishedManifest {
1208
- sourceHash: string;
1209
- name: string;
1210
- assistant: {
1211
- access: 'disabled' | 'public' | 'authenticated';
1212
- model?: string;
1213
- };
1214
- mcp: {
1215
- access: 'disabled' | 'public';
1216
- };
1217
- }
1218
- interface DocsPublishedEnv {
1219
- ASSETS: Fetcher;
1220
- }
1221
- interface DocsPublishedPage {
1222
- route: string;
1223
- title: string;
1224
- markdown: string;
1225
- }
1226
- type DocsPublishedCorpusResult = {
1227
- ok: true;
1228
- chunks: DocsCorpusChunk[];
1229
- } | {
1230
- ok: false;
1231
- error: unknown;
1232
- };
1233
- /** Read the small, generated policy manifest shared by docs runtime features. */
1234
- declare function loadDocsPublishedManifest(env: DocsPublishedEnv, requestUrl?: string): Promise<DocsPublishedManifest | null>;
1235
- /** Load and validate the generated corpus once per docs source hash. */
1236
- declare function loadDocsPublishedCorpus(env: DocsPublishedEnv, sourceHash: string, requestUrl?: string): Promise<DocsCorpusChunk[]>;
1237
- /** Convert asset and validation failures into one explicit route-level result. */
1238
- declare function resolveDocsPublishedCorpus(env: DocsPublishedEnv, sourceHash: string, requestUrl?: string): Promise<DocsPublishedCorpusResult>;
1239
- /** Read the complete generated Markdown only for a route in the public corpus. */
1240
- declare function readDocsPublishedPage(env: DocsPublishedEnv, corpus: DocsCorpusChunk[], requestedRoute: string, requestUrl?: string): Promise<DocsPublishedPage | null>;
1241
-
1242
- interface DocsPublicLimiterEnv {
1243
- DEEPSPACE_APP_ID: string;
1244
- DOCS_ASSISTANT_LIMITER: DurableObjectNamespace;
1245
- }
1246
- interface DocsPublicLease {
1247
- leaseId: string;
1248
- stub: DurableObjectStub;
1249
- }
1250
- type DocsPublicLeaseResult = {
1251
- ok: true;
1252
- lease: DocsPublicLease;
1253
- } | {
1254
- ok: false;
1255
- status: 429 | 503;
1256
- };
1257
- /** Hash the edge client address before it reaches durable limiter storage. */
1258
- declare function docsPublicClientKey(value: string): Promise<string>;
1259
- /** Acquire one bounded public docs operation from the per-app limiter. */
1260
- declare function acquireDocsPublicLease(env: DocsPublicLimiterEnv, clientKey: string, logPrefix: string): Promise<DocsPublicLeaseResult>;
1261
- /** Release a concurrency lease; window usage remains consumed. */
1262
- declare function releaseDocsPublicLease(lease: DocsPublicLease | undefined, logPrefix: string): Promise<void>;
1263
-
1264
1038
  /**
1265
1039
  * Per-binding usage metering — record Vectorize / Workers AI / etc. costs
1266
1040
  * to the auto-attached `USAGE_EVENTS` Analytics Engine dataset.
@@ -1903,9 +1677,6 @@ interface ConnectionAttachment extends UserAttachment {
1903
1677
  awarenessClientId?: number;
1904
1678
  }
1905
1679
 
1906
- /** Standard system-managed user columns shared by browser and Worker schemas. */
1907
- declare const USERS_COLUMNS: readonly ColumnDefinition[];
1908
-
1909
1680
  /**
1910
1681
  * Collection Schema Definitions & Validation
1911
1682
  *
@@ -1981,6 +1752,8 @@ declare function canDelete(schema: CollectionSchema, role: string, record: {
1981
1752
  declare function checkFieldPermissions(schema: CollectionSchema, role: string, newData: Record<string, unknown>, existingData?: Record<string, unknown>): string | null;
1982
1753
  /** Names of columns managed by the system (registerUser), not client mutations. */
1983
1754
  declare const SYSTEM_MANAGED_COLUMNS: Set<string>;
1755
+ /** Standard user columns. Apps spread these into their users schema. */
1756
+ declare const USERS_COLUMNS: ColumnDefinition[];
1984
1757
  declare const BASE_USERS_SCHEMA: CollectionSchema;
1985
1758
  /**
1986
1759
  * Lint a CollectionSchema for declarations that look like they should
@@ -4663,4 +4436,4 @@ declare class RefundError extends Error {
4663
4436
  constructor(message: string, status: number);
4664
4437
  }
4665
4438
 
4666
- export { AI_CHATS_SCHEMA, AI_MESSAGES_SCHEMA, ALLOWED_BINDING_TYPES, APP_ID_RE, 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 ComposioToolsOptions, 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_QUERY_LIMIT, DEPLOYED_APPS_DEFAULTS, DIRECTORY_SCHEMAS, type DOBindings, type DOManifest, type DOManifestEntry, type DebugApiContext, type DeepSpaceAIEnv, type DeepSpaceAIOptions, type DeepSpaceAgentDiagnosticContext, DeepSpaceAgentModelError, DeepSpaceAgentProfileError, type DeepSpaceAgentStream, type DeepSpaceAgentStreamOptions, type DeepSpaceAuth, type DeepSpaceAuthConfig, type DeepSpaceDocsRouteEnv, type DeepSpaceDocsRouteOptions, type DirectoryCommunityData, type DirectoryConversationData, type DirectoryMembershipData, type DirectoryPostData, type DoMigrationDirective, type DoMigrationPlan, type DocsAssistantHistoryMessage, DocsAssistantLimiter, type DocsAssistantRouteEnv, type DocsCorpusChunk, type DocsMcpRouteEnv, type DocsPublicLease, type DocsPublicLeaseResult, type DocsPublicLimiterEnv, type DocsPublishedCorpusResult, type DocsPublishedEnv, type DocsPublishedManifest, type DocsPublishedPage, type DocsSearchResult, type ExistingDOBinding, GLOBAL_DO_TYPES, GLOBAL_DO_TYPE_NAMES, type GameInput, GameRoom, type GameRoomConfig, type GetActionData, type GlobalDOType, 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, REGISTRY_INSTANCE, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, RESOURCE_ID_RE, type RecordContext, RecordRoom, type RecordRoomConfig, RefundError, type RefundOpts, type RefundResult, RegistryClientError, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, STRICT_APP_ID_RE, SYSTEM_COLLECTION_SCHEMAS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotResult, type SharedConnection, type StoredRecord, SubscriptionAuthError, type SubscriptionContext, type SubscriptionRead, SubscriptionRequiredError, type SubscriptionStatus, type Summarizer, TEST_ACCOUNT_EMAIL_SUFFIX, type TokenDebugInfo, type ToolResult, type ToolSchema, type ToolsApiContext, USERS_COLUMNS, type User, type UserAttachment, type UserContext, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, type YjsContext, YjsRoom, acquireDocsPublicLease, analyzePermissions, apiWorkerFetch, appendMessage, applyAiToolDefaults, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, broadcastChange, broadcastYjsUpdate, buildCronContext, buildDocsAssistantPrompt, buildDocsAssistantTools, buildTableSelect, buildUiParts, callRegistry, canCreate, canDelete, canRead, canUpdate, cancelSubscription, capToolResultSize, captureScreenshot, checkFieldPermissions, coerceValue, collectionTableName, columnId, composioTools, computeDoMigration, computeHmacHex, createChat, createDeepSpaceAI, createDeepSpaceAuth, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deepSpaceAgentErrorSummary, deleteChatCascade, deleteRecord, docsAssistantErrorSummary, docsAssistantLimiterManifestEntry, docsPublicClientKey, 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, isTestAccountClaims, isTestAccountEmail, isTestAccountTier, lintSchema, loadDocsPublishedCorpus, loadDocsPublishedManifest, loadMessages, makeDefaultSummarizer, matchOrigin, meterAi, meterUsage, meterVectorize, noopPermissionContext, normalizeDocsAssistantHistory, normalizeDocsRoute, parseDocsCorpus, parseQuotaLimit, platformCorsPatterns, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, putRecord, readDocsPublishedPage, readDocsRoute, readRecord, recordMatchesSubscription, refundInvoice, registerDeepSpaceDocs, registerDocsAssistantRoutes, registerDocsMcpRoutes, registerDocsStaticRoutes, registerUser, registryErrorJson, registryStub, releaseDocsPublicLease, requireSubscription, resolveAppName, resolveColumn, resolveDocsPublishedCorpus, rowToData, runMigrations, saveYjsDoc, searchDocsCorpus, streamDeepSpaceAgent, timingSafeEqualHex, timingSafeEqualStrings, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppName, validateBindingManifest, validateDoManifest, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema };
4439
+ export { AI_CHATS_SCHEMA, AI_MESSAGES_SCHEMA, ALLOWED_BINDING_TYPES, APP_ID_RE, 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 ComposioToolsOptions, 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_QUERY_LIMIT, DEPLOYED_APPS_DEFAULTS, 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 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, REGISTRY_INSTANCE, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, RESOURCE_ID_RE, type RecordContext, RecordRoom, type RecordRoomConfig, RefundError, type RefundOpts, type RefundResult, RegistryClientError, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, STRICT_APP_ID_RE, SYSTEM_COLLECTION_SCHEMAS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotResult, type SharedConnection, type StoredRecord, SubscriptionAuthError, type SubscriptionContext, type SubscriptionRead, SubscriptionRequiredError, type SubscriptionStatus, type Summarizer, TEST_ACCOUNT_EMAIL_SUFFIX, type TokenDebugInfo, type ToolResult, type ToolSchema, type ToolsApiContext, USERS_COLUMNS, type User, type UserAttachment, type UserContext, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, type YjsContext, YjsRoom, analyzePermissions, apiWorkerFetch, appendMessage, applyAiToolDefaults, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, broadcastChange, broadcastYjsUpdate, buildCronContext, buildTableSelect, buildUiParts, callRegistry, canCreate, canDelete, canRead, canUpdate, cancelSubscription, capToolResultSize, captureScreenshot, checkFieldPermissions, coerceValue, collectionTableName, columnId, composioTools, 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, isTestAccountClaims, isTestAccountEmail, isTestAccountTier, lintSchema, loadMessages, makeDefaultSummarizer, matchOrigin, meterAi, meterUsage, meterVectorize, noopPermissionContext, parseQuotaLimit, platformCorsPatterns, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, putRecord, readRecord, recordMatchesSubscription, refundInvoice, registerUser, registryErrorJson, registryStub, requireSubscription, resolveAppName, resolveColumn, rowToData, runMigrations, saveYjsDoc, timingSafeEqualHex, timingSafeEqualStrings, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppName, validateBindingManifest, validateDoManifest, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema };