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/worker.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as Y from 'yjs';
2
- import { LanguageModel, ToolSet, StreamTextResult, streamText, ModelMessage } from 'ai';
3
- import { Hono } from 'hono';
2
+ import { LanguageModel, ToolSet, ModelMessage } from 'ai';
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 { Hono } from 'hono';
9
9
 
10
10
  /**
11
11
  * Wire protocol constants.
@@ -1267,9 +1267,6 @@ interface HandlerContext {
1267
1267
  sendBinary(ws: WebSocket, data: Uint8Array): void;
1268
1268
  }
1269
1269
 
1270
- /** Standard system-managed user columns shared by browser and Worker schemas. */
1271
- declare const USERS_COLUMNS: readonly ColumnDefinition[];
1272
-
1273
1270
  /**
1274
1271
  * Collection Schema Definitions & Validation
1275
1272
  *
@@ -1345,6 +1342,8 @@ declare function canDelete(schema: CollectionSchema, role: string, record: {
1345
1342
  declare function checkFieldPermissions(schema: CollectionSchema, role: string, newData: Record<string, unknown>, existingData?: Record<string, unknown>): string | null;
1346
1343
  /** Names of columns managed by the system (registerUser), not client mutations. */
1347
1344
  declare const SYSTEM_MANAGED_COLUMNS: Set<string>;
1345
+ /** Standard user columns. Apps spread these into their users schema. */
1346
+ declare const USERS_COLUMNS: ColumnDefinition[];
1348
1347
  declare const BASE_USERS_SCHEMA: CollectionSchema;
1349
1348
  /**
1350
1349
  * Lint a CollectionSchema for declarations that look like they should
@@ -2553,184 +2552,6 @@ type AppMigrationIdsValidation = {
2553
2552
  /** Validate the small, provider-neutral migration manifest shipped with an app bundle. */
2554
2553
  declare function validateAppMigrationIds(value: unknown): AppMigrationIdsValidation;
2555
2554
 
2556
- /**
2557
- * Canonical DeepSpace model catalog and agent policy.
2558
- *
2559
- * Provider catalogs are discovery inputs, not a safe runtime allowlist: a
2560
- * model is promoted here only after its tool loop, transport, pricing, and
2561
- * streaming contract have been verified end to end through the DeepSpace
2562
- * proxy. Every client picker and server agent profile consumes this module.
2563
- */
2564
- type DeepSpaceAIProvider = 'anthropic' | 'openai' | 'cerebras';
2565
- type DeepSpaceAgentProfileId = 'application' | 'documentation';
2566
- type DeepSpaceAgentSupport = 'multi-step' | 'single-step' | 'none';
2567
- interface DeepSpaceAIModel {
2568
- id: string;
2569
- label: string;
2570
- provider: DeepSpaceAIProvider;
2571
- providerLabel: string;
2572
- family: string;
2573
- /** Whether the model is eligible for DeepSpace's server-owned agent loop. */
2574
- agentSupport: DeepSpaceAgentSupport;
2575
- /** Profiles in which the model has passed the complete runtime contract. */
2576
- agentProfiles: readonly DeepSpaceAgentProfileId[];
2577
- /** Provider transport currently used by the DeepSpace proxy adapter. */
2578
- transport: 'messages' | 'chat-completions';
2579
- recommendation: 'frontier' | 'balanced' | 'fast' | 'available' | 'limited';
2580
- note?: string;
2581
- }
2582
- interface DeepSpaceAgentProfile {
2583
- id: DeepSpaceAgentProfileId;
2584
- defaultModel: string;
2585
- maxSteps: number;
2586
- maxToolCalls?: number;
2587
- allowedTools: 'application-defined' | readonly string[];
2588
- }
2589
- /**
2590
- * Versioned provenance for the provider catalogs used during the latest
2591
- * promotion review. Keeping this in the shipped artifact makes selection
2592
- * policy auditable without allowing a mutable upstream list to change a
2593
- * deployed app underneath a commit.
2594
- */
2595
- declare const DEEPSPACE_MODEL_CATALOG_PROVENANCE: {
2596
- readonly version: "2026-08-03";
2597
- readonly verifiedAt: "2026-08-03";
2598
- readonly sources: {
2599
- readonly anthropic: "https://platform.claude.com/docs/en/api/beta/models/list";
2600
- readonly openai: "https://developers.openai.com/api/docs/models/all";
2601
- readonly cerebras: "https://inference-docs.cerebras.ai/models/overview";
2602
- };
2603
- };
2604
- declare const DEEPSPACE_AI_MODELS: readonly [{
2605
- readonly id: "claude-fable-5";
2606
- readonly label: "Claude Fable 5";
2607
- readonly family: "Claude 5";
2608
- readonly recommendation: "frontier";
2609
- } & {
2610
- readonly provider: "anthropic";
2611
- readonly providerLabel: "Anthropic";
2612
- readonly transport: "messages";
2613
- } & {
2614
- agentSupport: "multi-step";
2615
- agentProfiles: readonly ["application", "documentation"];
2616
- }, {
2617
- readonly id: "claude-opus-5";
2618
- readonly label: "Claude Opus 5";
2619
- readonly family: "Claude 5";
2620
- readonly recommendation: "frontier";
2621
- } & {
2622
- readonly provider: "anthropic";
2623
- readonly providerLabel: "Anthropic";
2624
- readonly transport: "messages";
2625
- } & {
2626
- agentSupport: "multi-step";
2627
- agentProfiles: readonly ["application", "documentation"];
2628
- }, {
2629
- readonly id: "claude-sonnet-5";
2630
- readonly label: "Claude Sonnet 5";
2631
- readonly family: "Claude 5";
2632
- readonly recommendation: "balanced";
2633
- } & {
2634
- readonly provider: "anthropic";
2635
- readonly providerLabel: "Anthropic";
2636
- readonly transport: "messages";
2637
- } & {
2638
- agentSupport: "multi-step";
2639
- agentProfiles: readonly ["application", "documentation"];
2640
- }, {
2641
- readonly id: "claude-haiku-4-5";
2642
- readonly label: "Claude Haiku 4.5";
2643
- readonly family: "Claude 4.5";
2644
- readonly recommendation: "fast";
2645
- } & {
2646
- readonly provider: "anthropic";
2647
- readonly providerLabel: "Anthropic";
2648
- readonly transport: "messages";
2649
- } & {
2650
- agentSupport: "multi-step";
2651
- agentProfiles: readonly ["application", "documentation"];
2652
- }, {
2653
- readonly id: "gpt-5.6-sol";
2654
- readonly label: "GPT-5.6 Sol";
2655
- readonly family: "GPT-5.6";
2656
- readonly recommendation: "frontier";
2657
- } & {
2658
- readonly provider: "openai";
2659
- readonly providerLabel: "OpenAI";
2660
- readonly transport: "chat-completions";
2661
- } & {
2662
- agentSupport: "multi-step";
2663
- agentProfiles: readonly ["application", "documentation"];
2664
- }, {
2665
- readonly id: "gpt-5.6-terra";
2666
- readonly label: "GPT-5.6 Terra";
2667
- readonly family: "GPT-5.6";
2668
- readonly recommendation: "balanced";
2669
- } & {
2670
- readonly provider: "openai";
2671
- readonly providerLabel: "OpenAI";
2672
- readonly transport: "chat-completions";
2673
- } & {
2674
- agentSupport: "multi-step";
2675
- agentProfiles: readonly ["application", "documentation"];
2676
- }, {
2677
- readonly id: "gpt-5.6-luna";
2678
- readonly label: "GPT-5.6 Luna";
2679
- readonly family: "GPT-5.6";
2680
- readonly recommendation: "fast";
2681
- } & {
2682
- readonly provider: "openai";
2683
- readonly providerLabel: "OpenAI";
2684
- readonly transport: "chat-completions";
2685
- } & {
2686
- agentSupport: "multi-step";
2687
- agentProfiles: readonly ["application", "documentation"];
2688
- }, {
2689
- readonly id: "gpt-oss-120b";
2690
- readonly label: "GPT-OSS 120B";
2691
- readonly provider: "cerebras";
2692
- readonly providerLabel: "Cerebras";
2693
- readonly family: "GPT-OSS";
2694
- readonly agentSupport: "single-step";
2695
- readonly agentProfiles: readonly [];
2696
- readonly transport: "chat-completions";
2697
- readonly recommendation: "limited";
2698
- readonly note: "Available for direct generation; the current proxy adapter has not passed multi-step tool-result continuation.";
2699
- }];
2700
- declare const DEEPSPACE_AI_DEFAULTS: {
2701
- readonly agent: "claude-sonnet-5";
2702
- readonly directGeneration: "claude-sonnet-5";
2703
- readonly summarization: "claude-haiku-4-5";
2704
- };
2705
- declare const DEEPSPACE_AGENT_PROFILES: {
2706
- readonly application: {
2707
- readonly id: "application";
2708
- readonly defaultModel: "claude-sonnet-5";
2709
- readonly maxSteps: 5;
2710
- readonly allowedTools: "application-defined";
2711
- };
2712
- readonly documentation: {
2713
- readonly id: "documentation";
2714
- readonly defaultModel: "claude-sonnet-5";
2715
- readonly maxSteps: 21;
2716
- readonly maxToolCalls: 20;
2717
- readonly allowedTools: readonly ["docs_search", "docs_read"];
2718
- };
2719
- };
2720
- type DeepSpaceAIModelId = (typeof DEEPSPACE_AI_MODELS)[number]['id'];
2721
- declare function getDeepSpaceAIModel(modelId: unknown): DeepSpaceAIModel | null;
2722
- declare function listDeepSpaceAgentModels(profileId?: DeepSpaceAgentProfileId): readonly DeepSpaceAIModel[];
2723
- interface ResolvedDeepSpaceAgentModel {
2724
- modelId: string;
2725
- provider: DeepSpaceAIProvider;
2726
- model: DeepSpaceAIModel;
2727
- profile: DeepSpaceAgentProfile;
2728
- }
2729
- declare function resolveDeepSpaceAgentModel(modelId: unknown, profileId?: DeepSpaceAgentProfileId): ResolvedDeepSpaceAgentModel | null;
2730
-
2731
- /** Distinguish generated docs resources from authored page routes, including dotted slugs. */
2732
- declare function isDocsResourcePath(pathname: string): boolean;
2733
-
2734
2555
  /**
2735
2556
  * Wildcard-aware CORS origin matching for the platform workers.
2736
2557
  *
@@ -3222,10 +3043,9 @@ declare function buildCronContext(env: CronEnv, ownerUserId: string, roomId?: st
3222
3043
  * Usage:
3223
3044
  *
3224
3045
  * // Server-side autonomous — no auth config needed
3225
- * import { createDeepSpaceAI, DEEPSPACE_AI_DEFAULTS, getDeepSpaceAIModel } from 'deepspace/worker'
3226
- * const selected = getDeepSpaceAIModel(DEEPSPACE_AI_DEFAULTS.directGeneration)!
3227
- * const provider = createDeepSpaceAI(env, selected.provider)
3228
- * const result = await generateText({ model: provider(selected.id), ... })
3046
+ * import { createDeepSpaceAI } from 'deepspace/worker'
3047
+ * const cerebras = createDeepSpaceAI(env, 'cerebras')
3048
+ * const result = await generateText({ model: cerebras('llama-3.3-70b'), ... })
3229
3049
  *
3230
3050
  * // User-initiated (inside a request handler)
3231
3051
  * const jwt = c.req.header('Authorization')!.slice(7)
@@ -3238,6 +3058,7 @@ declare function buildCronContext(env: CronEnv, ownerUserId: string, roomId?: st
3238
3058
  * paths into the published `dist/index.d.ts`.
3239
3059
  */
3240
3060
  type DeepSpaceModelFactory = (modelId: string) => LanguageModel;
3061
+ type Provider = 'anthropic' | 'openai' | 'cerebras';
3241
3062
  interface DeepSpaceAIEnv extends ApiWorkerEnv {
3242
3063
  /**
3243
3064
  * Long-lived owner-scoped JWT minted at deploy time (or by `deepspace dev start`).
@@ -3265,43 +3086,7 @@ interface DeepSpaceAIOptions {
3265
3086
  * (explicit or `env.APP_OWNER_JWT`) automatically. Throws a clear error if
3266
3087
  * either is unconfigured.
3267
3088
  */
3268
- declare function createDeepSpaceAI(env: DeepSpaceAIEnv, provider: DeepSpaceAIProvider, options?: DeepSpaceAIOptions): DeepSpaceModelFactory;
3269
-
3270
- type StreamTextOptions<TOOLS extends ToolSet> = Parameters<typeof streamText<TOOLS>>[0];
3271
- type DeepSpaceAgentStreamOptions<TOOLS extends ToolSet> = Omit<StreamTextOptions<TOOLS>, 'model' | 'providerOptions' | 'stopWhen'> & {
3272
- profile: DeepSpaceAgentProfileId;
3273
- modelId?: unknown;
3274
- authToken?: string;
3275
- };
3276
- interface DeepSpaceAgentStream<TOOLS extends ToolSet> {
3277
- selection: ResolvedDeepSpaceAgentModel;
3278
- result: StreamTextResult<TOOLS, never>;
3279
- }
3280
- declare class DeepSpaceAgentModelError extends Error {
3281
- readonly modelId: unknown;
3282
- readonly profile: DeepSpaceAgentProfileId;
3283
- readonly code = "unsupported_agent_model";
3284
- constructor(modelId: unknown, profile: DeepSpaceAgentProfileId);
3285
- }
3286
- declare class DeepSpaceAgentProfileError extends Error {
3287
- readonly profile: DeepSpaceAgentProfileId;
3288
- readonly toolName: string;
3289
- readonly code = "agent_profile_violation";
3290
- constructor(profile: DeepSpaceAgentProfileId, toolName: string);
3291
- }
3292
- /**
3293
- * Run every DeepSpace text agent through one provider, model, and tool-loop
3294
- * implementation. Agent surfaces supply only their profile-specific prompt,
3295
- * messages, tools, persistence callbacks, and access token.
3296
- */
3297
- declare function streamDeepSpaceAgent<TOOLS extends ToolSet>(env: DeepSpaceAIEnv, options: DeepSpaceAgentStreamOptions<TOOLS>): DeepSpaceAgentStream<TOOLS>;
3298
- interface DeepSpaceAgentDiagnosticContext {
3299
- profile?: DeepSpaceAgentProfileId;
3300
- provider?: string;
3301
- modelId?: string;
3302
- }
3303
- /** Preserve safe structured provider diagnostics in bounded Worker logs. */
3304
- declare function deepSpaceAgentErrorSummary(error: unknown, context?: DeepSpaceAgentDiagnosticContext): string;
3089
+ declare function createDeepSpaceAI(env: DeepSpaceAIEnv, provider: Provider, options?: DeepSpaceAIOptions): DeepSpaceModelFactory;
3305
3090
 
3306
3091
  /**
3307
3092
  * Composio tools for the Vercel AI SDK.
@@ -3318,12 +3103,11 @@ declare function deepSpaceAgentErrorSummary(error: unknown, context?: DeepSpaceA
3318
3103
  *
3319
3104
  * Usage (inside a request handler, e.g. /api/ai/chat):
3320
3105
  *
3321
- * import { composioTools, streamDeepSpaceAgent } from 'deepspace/worker'
3106
+ * import { composioTools, createDeepSpaceAI } from 'deepspace/worker'
3322
3107
  * const jwt = c.req.header('Authorization')!.slice(7)
3323
3108
  * const tools = await composioTools(c.env, { toolkit: 'gmail', authToken: jwt })
3324
- * const { result } = streamDeepSpaceAgent(c.env, {
3325
- * profile: 'application', authToken: jwt, prompt, tools,
3326
- * })
3109
+ * const ai = createDeepSpaceAI(c.env, 'anthropic', { authToken: jwt })
3110
+ * const result = streamText({ model: ai('claude-sonnet-5'), prompt, tools })
3327
3111
  *
3328
3112
  * Merge with your own tools: `tools: { ...buildTools(executor), ...composio }`.
3329
3113
  */
@@ -3565,155 +3349,6 @@ declare function appendMessage(stub: DurableObjectStub, msg: {
3565
3349
  parts?: unknown[];
3566
3350
  }): Promise<void>;
3567
3351
 
3568
- interface DocsCorpusChunk {
3569
- id: string;
3570
- route: string;
3571
- title: string;
3572
- heading?: string;
3573
- text: string;
3574
- }
3575
- interface DocsSearchResult {
3576
- route: string;
3577
- title: string;
3578
- heading?: string;
3579
- excerpt: string;
3580
- score: number;
3581
- }
3582
- /** Validate the generated assistant index before any content reaches a model. */
3583
- declare function parseDocsCorpus(value: unknown): DocsCorpusChunk[];
3584
- /** Deterministic local lexical retrieval used by the docs agent tools. */
3585
- declare function searchDocsCorpus(corpus: DocsCorpusChunk[], query: string, limit?: number): DocsSearchResult[];
3586
- declare function readDocsRoute(corpus: DocsCorpusChunk[], route: string): Array<Pick<DocsCorpusChunk, 'route' | 'title' | 'heading' | 'text'>>;
3587
- declare function buildDocsAssistantTools(corpus: DocsCorpusChunk[]): ToolSet;
3588
- declare function buildDocsAssistantPrompt(appName: string, currentRoute: string | undefined): string;
3589
- declare function normalizeDocsRoute(value: string): string;
3590
-
3591
- /**
3592
- * Durable, per-app abuse boundary for the public documentation assistant.
3593
- * Bind one SQLite Durable Object instance per immutable app id.
3594
- */
3595
- declare class DocsAssistantLimiter {
3596
- private readonly sql;
3597
- constructor(state: DurableObjectState);
3598
- fetch(request: Request): Promise<Response>;
3599
- private acquire;
3600
- private release;
3601
- private consumeWindow;
3602
- }
3603
-
3604
- interface DocsAssistantRouteEnv extends DeepSpaceAIEnv {
3605
- ASSETS: Fetcher;
3606
- APP_NAME: string;
3607
- DEEPSPACE_APP_ID: string;
3608
- DOCS_ASSISTANT_LIMITER: DurableObjectNamespace;
3609
- }
3610
- /** Register the standard, read-only documentation assistant endpoint. */
3611
- declare function registerDocsAssistantRoutes<Env extends DocsAssistantRouteEnv>(app: Hono<{
3612
- Bindings: Env;
3613
- }>, resolveAuth: (request: Request, env: Env) => Promise<unknown | null>): void;
3614
- /** Preserve useful provider diagnostics in Workers-for-Platforms string logs. */
3615
- declare const docsAssistantErrorSummary: typeof deepSpaceAgentErrorSummary;
3616
- interface DocsAssistantHistoryMessage {
3617
- role: 'user' | 'assistant';
3618
- content: string;
3619
- }
3620
- /**
3621
- * Accept only the completed, alternating UI turns that precede the current
3622
- * question. The browser remains stateless; the shared agent runner receives a
3623
- * bounded ephemeral transcript on each request.
3624
- */
3625
- declare function normalizeDocsAssistantHistory(value: unknown): DocsAssistantHistoryMessage[];
3626
- /**
3627
- * Own the reserved docs namespace before an existing app's SPA wildcard.
3628
- * The dispatcher rewrites public docs requests into this namespace.
3629
- */
3630
- declare function registerDocsStaticRoutes<Env extends Pick<DocsAssistantRouteEnv, 'ASSETS'>>(app: Hono<{
3631
- Bindings: Env;
3632
- }>): void;
3633
-
3634
- interface DocsMcpRouteEnv {
3635
- ASSETS: Fetcher;
3636
- DEEPSPACE_APP_ID: string;
3637
- DOCS_ASSISTANT_LIMITER: DurableObjectNamespace;
3638
- }
3639
- /** Register the public, stateless MCP endpoint for a documentation surface. */
3640
- declare function registerDocsMcpRoutes<Env extends DocsMcpRouteEnv>(app: Hono<{
3641
- Bindings: Env;
3642
- }>): void;
3643
-
3644
- interface DeepSpaceDocsRouteEnv extends DocsAssistantRouteEnv, DocsMcpRouteEnv {
3645
- }
3646
- interface DeepSpaceDocsRouteOptions<Env extends DeepSpaceDocsRouteEnv> {
3647
- resolveAuth: (request: Request, env: Env) => Promise<unknown | null>;
3648
- }
3649
- /** Register the complete native docs protocol surface in its required order. */
3650
- declare function registerDeepSpaceDocs<Env extends DeepSpaceDocsRouteEnv>(app: Hono<{
3651
- Bindings: Env;
3652
- }>, options: DeepSpaceDocsRouteOptions<Env>): void;
3653
- /** Canonical manifest entry for the public docs assistant/MCP concurrency limiter. */
3654
- declare function docsAssistantLimiterManifestEntry<ClassName extends string>(className: ClassName): {
3655
- readonly binding: "DOCS_ASSISTANT_LIMITER";
3656
- readonly className: ClassName;
3657
- readonly sqlite: true;
3658
- };
3659
-
3660
- interface DocsPublishedManifest {
3661
- sourceHash: string;
3662
- name: string;
3663
- assistant: {
3664
- access: 'disabled' | 'public' | 'authenticated';
3665
- model?: string;
3666
- };
3667
- mcp: {
3668
- access: 'disabled' | 'public';
3669
- };
3670
- }
3671
- interface DocsPublishedEnv {
3672
- ASSETS: Fetcher;
3673
- }
3674
- interface DocsPublishedPage {
3675
- route: string;
3676
- title: string;
3677
- markdown: string;
3678
- }
3679
- type DocsPublishedCorpusResult = {
3680
- ok: true;
3681
- chunks: DocsCorpusChunk[];
3682
- } | {
3683
- ok: false;
3684
- error: unknown;
3685
- };
3686
- /** Read the small, generated policy manifest shared by docs runtime features. */
3687
- declare function loadDocsPublishedManifest(env: DocsPublishedEnv, requestUrl?: string): Promise<DocsPublishedManifest | null>;
3688
- /** Load and validate the generated corpus once per docs source hash. */
3689
- declare function loadDocsPublishedCorpus(env: DocsPublishedEnv, sourceHash: string, requestUrl?: string): Promise<DocsCorpusChunk[]>;
3690
- /** Convert asset and validation failures into one explicit route-level result. */
3691
- declare function resolveDocsPublishedCorpus(env: DocsPublishedEnv, sourceHash: string, requestUrl?: string): Promise<DocsPublishedCorpusResult>;
3692
- /** Read the complete generated Markdown only for a route in the public corpus. */
3693
- declare function readDocsPublishedPage(env: DocsPublishedEnv, corpus: DocsCorpusChunk[], requestedRoute: string, requestUrl?: string): Promise<DocsPublishedPage | null>;
3694
-
3695
- interface DocsPublicLimiterEnv {
3696
- DEEPSPACE_APP_ID: string;
3697
- DOCS_ASSISTANT_LIMITER: DurableObjectNamespace;
3698
- }
3699
- interface DocsPublicLease {
3700
- leaseId: string;
3701
- stub: DurableObjectStub;
3702
- }
3703
- type DocsPublicLeaseResult = {
3704
- ok: true;
3705
- lease: DocsPublicLease;
3706
- } | {
3707
- ok: false;
3708
- status: 429 | 503;
3709
- };
3710
- /** Hash the edge client address before it reaches durable limiter storage. */
3711
- declare function docsPublicClientKey(value: string): Promise<string>;
3712
- /** Acquire one bounded public docs operation from the per-app limiter. */
3713
- declare function acquireDocsPublicLease(env: DocsPublicLimiterEnv, clientKey: string, logPrefix: string): Promise<DocsPublicLeaseResult>;
3714
- /** Release a concurrency lease; window usage remains consumed. */
3715
- declare function releaseDocsPublicLease(lease: DocsPublicLease | undefined, logPrefix: string): Promise<void>;
3716
-
3717
3352
  /**
3718
3353
  * Per-binding usage metering — record Vectorize / Workers AI / etc. costs
3719
3354
  * to the auto-attached `USAGE_EVENTS` Analytics Engine dataset.
@@ -5259,4 +4894,4 @@ interface AppLogsResponse {
5259
4894
  declare const APP_LOG_EVENT_KEYS: readonly ["id", "timestamp", "level", "eventType", "message", "source", "outcome", "request", "exception"];
5260
4895
  type AppLogEventKey = (typeof APP_LOG_EVENT_KEYS)[number];
5261
4896
 
5262
- export { AI_CHATS_SCHEMA, AI_MESSAGES_SCHEMA, ALLOWED_BINDING_TYPES, APP_ID_RE, APP_LOG_EVENT_KEYS, APP_NAME_RULES, AUTO_PROVISIONABLE_TYPES, AUTO_PROVISION_SENTINEL, type ActionContext, type ActionHandler, type ActionResult, type ActionTools, type ApiWorkerEnv, type AppLogEvent, type AppLogEventKey, type AppLogsResponse, type AppMigrationIdsValidation, type AppNameResolution, type AppNameValidation, type AuthWorkerEnv, Awareness, type AwarenessState, type AwarenessStates, BASE_USERS_SCHEMA, BUILT_IN_TOOLS, type BaseMessage, BaseRoom, CANONICAL_APP_IDENTITY_MIGRATION_ID, CHANNELS_SCHEMA, CHANNEL_INVITATIONS_SCHEMA, CHANNEL_MEMBERS_SCHEMA, CLIENT_LOG_MARKER, CONVERSATION_SCHEMAS, COST_RATES, CanvasRoom, type CanvasShape, type ChatContextConfig, type ChatMessageRow, type ChatRow, type ChatTurn, type ClientErrorKind, type ClientErrorReport, type ClientMessage, type CollectionPermissionSummary, type CollectionSchema, type ColumnDefinition, type ColumnInterpretation, type ComposioToolsOptions, type ConnectionAttachment, 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, DEEPSPACE_AGENT_PROFILES, DEEPSPACE_AI_DEFAULTS, DEEPSPACE_AI_MODELS, DEEPSPACE_MODEL_CATALOG_PROVENANCE, DEFAULT_CONTEXT_CONFIG, DEFAULT_DO_MANIFEST, DEFAULT_QUERY_LIMIT, DEPLOYED_APPS_DEFAULTS, DIRECTORY_SCHEMAS, type DOBindings, type DOManifest, type DOManifestEntry, type DeepSpaceAIEnv, type DeepSpaceAIModel, type DeepSpaceAIModelId, type DeepSpaceAIOptions, type DeepSpaceAIProvider, type DeepSpaceAgentDiagnosticContext, DeepSpaceAgentModelError, type DeepSpaceAgentProfile, DeepSpaceAgentProfileError, type DeepSpaceAgentProfileId, type DeepSpaceAgentStream, type DeepSpaceAgentStreamOptions, type DeepSpaceAgentSupport, 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 HandlerContext, type Job, type JobContext, JobRoom, type JobRoomConfig, type JobStatus, type JwtClaims, type JwtVerifierConfig, LOG_LEVELS, type LogLevel, MESSAGES_SCHEMA, MSG, MSG_AWARENESS, MSG_SYNC, MSG_SYNC_STEP1, MSG_SYNC_STEP2, MSG_SYNC_UPDATE, MSG_YJS_AWARENESS, MSG_YJS_SYNC, type MessageHandlers, type MsgType, type MutateActionData, type PermissionAnalysis, type PermissionContext, type PermissionLevel, type PermissionSource, type PlatformWorkerEnv, type Player, type PrefixResult, type PresencePeer, PresenceRoom, type ProtocolMessage, type QueryActionData, REACTIONS_SCHEMA, READ_RECEIPTS_SCHEMA, REGISTRY_INSTANCE, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, RESOURCE_ID_RE, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_DEFAULT, RecordRoom, type RecordRoomConfig, RegistryClientError, type ResolvedColumn, type ResolvedDeepSpaceAgentModel, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, STRICT_APP_ID_RE, SYSTEM_COLLECTIONS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotResult, type ServerMessage, type SharedConnection, type StoredRecord, type Summarizer, type SyncResult, TEST_ACCOUNT_EMAIL_SUFFIX, type TokenDebugInfo, type ToolResult, type ToolSchema, USERS_COLUMNS, type User, type UserAttachment, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, YjsRoom, acquireDocsPublicLease, analyzePermissions, apiWorkerFetch, appendMessage, applyAiToolDefaults, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, buildCronContext, buildDocsAssistantPrompt, buildDocsAssistantTools, buildTableSelect, buildUiParts, callRegistry, canCreate, canDelete, canRead, canUpdate, capToolResultSize, captureScreenshot, checkFieldPermissions, clientBuild, coerceValue, collectionTableName, columnId, composioTools, computeDoMigration, computeHmacHex, createChat, createDecoder, createDeepSpaceAI, createDeepSpaceAuth, createEncoder, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deepSpaceAgentErrorSummary, deleteChatCascade, dispatch, docsAssistantErrorSummary, docsAssistantLimiterManifestEntry, docsPublicClientKey, encode, encodeAwarenessMessage, encodeSyncStep1, encodeSyncStep2, encodeUpdate, enqueueJob, getChat, getDeepSpaceAIModel, getGlobalDOSchemas, getGlobalDOType, getMessageType, getRolePermissions, handleAwarenessMessage, handleClientErrorReport, handleSyncMessage, hasContent, isAutoProvision, isDocsResourcePath, isOwner, isTestAccountClaims, isTestAccountEmail, isTestAccountTier, lintSchema, listDeepSpaceAgentModels, loadDocsPublishedCorpus, loadDocsPublishedManifest, loadMessages, makeDefaultSummarizer, matchOrigin, meterAi, meterUsage, meterVectorize, noopPermissionContext, normalizeDocsAssistantHistory, normalizeDocsRoute, parseDocsCorpus, parseQuotaLimit, platformCorsPatterns, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, readDocsPublishedPage, readDocsRoute, readVarUint, readVarUint8Array, registerClientErrorRoute, registerDeepSpaceDocs, registerDocsAssistantRoutes, registerDocsMcpRoutes, registerDocsStaticRoutes, registryErrorJson, registryStub, releaseDocsPublicLease, resolveAppName, resolveColumn, resolveDeepSpaceAgentModel, resolveDocsPublishedCorpus, rowToData, runMigrations, searchDocsCorpus, serverBuild, streamDeepSpaceAgent, timingSafeEqualHex, timingSafeEqualStrings, toUint8Array, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppMigrationIds, validateAppName, validateBindingManifest, validateDoManifest, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema, writeVarUint, writeVarUint8Array };
4897
+ export { AI_CHATS_SCHEMA, AI_MESSAGES_SCHEMA, ALLOWED_BINDING_TYPES, APP_ID_RE, APP_LOG_EVENT_KEYS, APP_NAME_RULES, AUTO_PROVISIONABLE_TYPES, AUTO_PROVISION_SENTINEL, type ActionContext, type ActionHandler, type ActionResult, type ActionTools, type ApiWorkerEnv, type AppLogEvent, type AppLogEventKey, type AppLogsResponse, type AppMigrationIdsValidation, type AppNameResolution, type AppNameValidation, type AuthWorkerEnv, Awareness, type AwarenessState, type AwarenessStates, BASE_USERS_SCHEMA, BUILT_IN_TOOLS, type BaseMessage, BaseRoom, CANONICAL_APP_IDENTITY_MIGRATION_ID, CHANNELS_SCHEMA, CHANNEL_INVITATIONS_SCHEMA, CHANNEL_MEMBERS_SCHEMA, CLIENT_LOG_MARKER, CONVERSATION_SCHEMAS, COST_RATES, CanvasRoom, type CanvasShape, type ChatContextConfig, type ChatMessageRow, type ChatRow, type ChatTurn, type ClientErrorKind, type ClientErrorReport, type ClientMessage, type CollectionPermissionSummary, type CollectionSchema, type ColumnDefinition, type ColumnInterpretation, type ComposioToolsOptions, type ConnectionAttachment, 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 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 HandlerContext, type Job, type JobContext, JobRoom, type JobRoomConfig, type JobStatus, type JwtClaims, type JwtVerifierConfig, LOG_LEVELS, type LogLevel, MESSAGES_SCHEMA, MSG, MSG_AWARENESS, MSG_SYNC, MSG_SYNC_STEP1, MSG_SYNC_STEP2, MSG_SYNC_UPDATE, MSG_YJS_AWARENESS, MSG_YJS_SYNC, type MessageHandlers, type MsgType, type MutateActionData, type PermissionAnalysis, type PermissionContext, type PermissionLevel, type PermissionSource, type PlatformWorkerEnv, type Player, type PrefixResult, type PresencePeer, PresenceRoom, type ProtocolMessage, type QueryActionData, REACTIONS_SCHEMA, READ_RECEIPTS_SCHEMA, REGISTRY_INSTANCE, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, RESOURCE_ID_RE, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_DEFAULT, RecordRoom, type RecordRoomConfig, RegistryClientError, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, STRICT_APP_ID_RE, SYSTEM_COLLECTIONS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotResult, type ServerMessage, type SharedConnection, type StoredRecord, type Summarizer, type SyncResult, TEST_ACCOUNT_EMAIL_SUFFIX, type TokenDebugInfo, type ToolResult, type ToolSchema, USERS_COLUMNS, type User, type UserAttachment, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, YjsRoom, analyzePermissions, apiWorkerFetch, appendMessage, applyAiToolDefaults, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, buildCronContext, buildTableSelect, buildUiParts, callRegistry, canCreate, canDelete, canRead, canUpdate, capToolResultSize, captureScreenshot, checkFieldPermissions, clientBuild, coerceValue, collectionTableName, columnId, composioTools, computeDoMigration, computeHmacHex, createChat, createDecoder, createDeepSpaceAI, createDeepSpaceAuth, createEncoder, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deleteChatCascade, dispatch, encode, encodeAwarenessMessage, encodeSyncStep1, encodeSyncStep2, encodeUpdate, enqueueJob, getChat, getGlobalDOSchemas, getGlobalDOType, getMessageType, getRolePermissions, handleAwarenessMessage, handleClientErrorReport, handleSyncMessage, hasContent, isAutoProvision, isOwner, isTestAccountClaims, isTestAccountEmail, isTestAccountTier, lintSchema, loadMessages, makeDefaultSummarizer, matchOrigin, meterAi, meterUsage, meterVectorize, noopPermissionContext, parseQuotaLimit, platformCorsPatterns, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, readVarUint, readVarUint8Array, registerClientErrorRoute, registryErrorJson, registryStub, resolveAppName, resolveColumn, rowToData, runMigrations, serverBuild, timingSafeEqualHex, timingSafeEqualStrings, toUint8Array, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppMigrationIds, validateAppName, validateBindingManifest, validateDoManifest, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema, writeVarUint, writeVarUint8Array };