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.
- package/dist/cli.js +96 -18
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +160 -1
- package/dist/index.js +283 -126
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +172 -2
- package/dist/server.js +581 -1
- package/dist/server.js.map +1 -1
- package/dist/worker.d.ts +252 -2
- package/dist/worker.js +588 -1
- package/dist/worker.js.map +1 -1
- package/features/admin-page/feature.json +29 -0
- package/features/admin-page/src/AdminPage.tsx +292 -0
- package/features/admin-page/src/admin-schema.ts +20 -0
- package/features/ai-chat/feature.json +41 -0
- package/features/ai-chat/src/AiChatPage.tsx +692 -0
- package/features/ai-chat/src/ChatPanel.tsx +1098 -0
- package/features/ai-chat/src/ai-chat-schema.ts +11 -0
- package/features/canvas/feature.json +45 -0
- package/features/canvas/src/CanvasEditorPage.tsx +87 -0
- package/features/canvas/src/CanvasListPage.tsx +202 -0
- package/features/canvas/src/canvas-schema.ts +33 -0
- package/features/canvas/src/components/CanvasToolbar.tsx +170 -0
- package/features/canvas/src/components/CanvasView.tsx +369 -0
- package/features/canvas/src/components/ShapeRenderer.tsx +114 -0
- package/features/cron/feature.json +33 -0
- package/features/cron/src/CronLogPage.tsx +100 -0
- package/features/cron/src/cron.ts +25 -0
- package/features/docs/feature.json +96 -0
- package/features/docs/src/DocsEditorPage.tsx +1012 -0
- package/features/docs/src/DocsListPage.tsx +951 -0
- package/features/docs/src/DocsOutlinePanel.tsx +68 -0
- package/features/docs/src/DocsPresence.tsx +138 -0
- package/features/docs/src/InviteDialog.tsx +336 -0
- package/features/docs/src/LibrarySidebar.tsx +464 -0
- package/features/docs/src/docs-favorites.ts +18 -0
- package/features/docs/src/docs-library-types.ts +15 -0
- package/features/docs/src/docs-schema.ts +80 -0
- package/features/docs/src/docs-ui.css +309 -0
- package/features/docs/src/editor/DocEditorSurface.tsx +257 -0
- package/features/docs/src/editor/DocsTiptapToolbar.tsx +560 -0
- package/features/docs/src/editor/useDocEditor.ts +206 -0
- package/features/docs/src/use-yjs-room-with-awareness.ts +285 -0
- package/features/file-attachments/feature.json +42 -0
- package/features/file-attachments/src/AttachmentsPage.tsx +864 -0
- package/features/file-attachments/src/attachments-constants.ts +9 -0
- package/features/file-attachments/src/attachments-schema.ts +45 -0
- package/features/file-attachments/src/useFilePreview.ts +471 -0
- package/features/file-attachments/src/useMimeTypeDetection.ts +138 -0
- package/features/file-manager/feature.json +24 -0
- package/features/file-manager/src/FileManagerPage.tsx +330 -0
- package/features/integration-test/feature.json +18 -0
- package/features/integration-test/src/IntegrationTestPage.tsx +423 -0
- package/features/integration-test/src/integration.spec.ts +42 -0
- package/features/items/feature.json +33 -0
- package/features/items/src/ItemsPage.tsx +325 -0
- package/features/items/src/items-constants.ts +10 -0
- package/features/items/src/items-schema.ts +27 -0
- package/features/kanban/feature.json +18 -0
- package/features/kanban/src/Kanban.tsx +283 -0
- package/features/landing/feature.json +62 -0
- package/features/landing/src/LandingPage.tsx +627 -0
- package/features/landing/src/primitives.tsx +389 -0
- package/features/landing/src/sections/FAQSection.tsx +110 -0
- package/features/landing/src/sections/FeaturesGridSection.tsx +311 -0
- package/features/landing/src/sections/HowItWorksSection.tsx +62 -0
- package/features/landing/src/sections/LogoCloudSection.tsx +58 -0
- package/features/landing/src/sections/ShowcaseSection.tsx +63 -0
- package/features/landing/src/sections/StatsSection.tsx +31 -0
- package/features/landing/src/sections/TeamSection.tsx +86 -0
- package/features/landing/src/sections/TestimonialsSection.tsx +68 -0
- package/features/landing/src/sections/VideoSection.tsx +71 -0
- package/features/leaderboard/feature.json +33 -0
- package/features/leaderboard/src/LeaderboardPage.tsx +372 -0
- package/features/leaderboard/src/leaderboard-constants.ts +21 -0
- package/features/leaderboard/src/leaderboard-schema.ts +36 -0
- package/features/messaging/feature.json +111 -0
- package/features/messaging/src/ChatMultiPage.tsx +300 -0
- package/features/messaging/src/ChatPage.tsx +75 -0
- package/features/messaging/src/components/chat/ChatHeader.tsx +76 -0
- package/features/messaging/src/components/chat/MessageActionSheet.tsx +168 -0
- package/features/messaging/src/components/chat/MessageInput.tsx +65 -0
- package/features/messaging/src/components/chat/MessageItem.tsx +352 -0
- package/features/messaging/src/components/chat/MessageList.tsx +248 -0
- package/features/messaging/src/components/chat/ReactionPicker.tsx +2 -0
- package/features/messaging/src/components/chat/ThreadPanel.tsx +107 -0
- package/features/messaging/src/components/chat/UserProfilePopover.tsx +158 -0
- package/features/messaging/src/components/chat-multi/AddMemberModal.tsx +188 -0
- package/features/messaging/src/components/chat-multi/BrowseGroupsModal.tsx +163 -0
- package/features/messaging/src/components/chat-multi/ChannelListItem.tsx +147 -0
- package/features/messaging/src/components/chat-multi/ChannelSettingsPanel.tsx +344 -0
- package/features/messaging/src/components/chat-multi/ChannelSidebar.tsx +460 -0
- package/features/messaging/src/components/chat-multi/CreateGroupModal.tsx +190 -0
- package/features/messaging/src/components/chat-multi/InvitationList.tsx +149 -0
- package/features/messaging/src/components/chat-multi/NewMessageModal.tsx +159 -0
- package/features/messaging/src/hooks/useChatChannel.ts +64 -0
- package/features/messaging/src/hooks/useLongPress.ts +74 -0
- package/features/messaging/src/hooks/useMultiChannel.ts +142 -0
- package/features/messaging/src/messaging-schema.ts +25 -0
- package/features/presence-test/feature.json +21 -0
- package/features/presence-test/src/PresenceTestPage.tsx +120 -0
- package/features/sidebar/feature.json +19 -0
- package/features/sidebar/src/AppSidebar.tsx +558 -0
- package/features/tasks/feature.json +33 -0
- package/features/tasks/src/TasksPage.tsx +598 -0
- package/features/tasks/src/tasks-constants.ts +43 -0
- package/features/tasks/src/tasks-schema.ts +56 -0
- package/features/testing/feature.json +49 -0
- package/features/testing/src/TestPage.tsx +145 -0
- package/features/testing/src/cpu-burn-action.ts +51 -0
- package/features/testing/src/subrequest-burn-action.ts +53 -0
- package/features/testing/src/test-schema.ts +23 -0
- package/features/topbar/feature.json +18 -0
- package/features/topbar/src/Topbar.tsx +353 -0
- package/features/tree/feature.json +26 -0
- package/features/tree/src/TreeSidebar.tsx +607 -0
- package/features/tree/src/tree-constants.ts +68 -0
- package/features/tree/src/tree-hooks.ts +258 -0
- package/package.json +4 -2
- package/scripts/add-feature.cjs +654 -0
package/dist/worker.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ declare const MSG: {
|
|
|
65
65
|
readonly CRON_PAUSE: "cron.pause";
|
|
66
66
|
readonly CRON_RESUME: "cron.resume";
|
|
67
67
|
readonly CRON_STATUS: "cron.status";
|
|
68
|
+
readonly JOB_ENQUEUE: "job.enqueue";
|
|
69
|
+
readonly JOB_CANCEL: "job.cancel";
|
|
70
|
+
readonly JOB_RETRY: "job.retry";
|
|
71
|
+
readonly JOB_UPDATE: "job.update";
|
|
68
72
|
readonly PRESENCE_SYNC: "presence.sync";
|
|
69
73
|
readonly PRESENCE_JOIN: "presence.join";
|
|
70
74
|
readonly PRESENCE_LEAVE: "presence.leave";
|
|
@@ -231,6 +235,15 @@ type ClientMessage = BaseMessage<typeof MSG.SUBSCRIBE, {
|
|
|
231
235
|
taskName: string;
|
|
232
236
|
}> | BaseMessage<typeof MSG.CRON_RESUME, {
|
|
233
237
|
taskName: string;
|
|
238
|
+
}> | BaseMessage<typeof MSG.JOB_ENQUEUE, {
|
|
239
|
+
requestId: string;
|
|
240
|
+
type: string;
|
|
241
|
+
payload?: unknown;
|
|
242
|
+
maxAttempts?: number;
|
|
243
|
+
}> | BaseMessage<typeof MSG.JOB_CANCEL, {
|
|
244
|
+
jobId: string;
|
|
245
|
+
}> | BaseMessage<typeof MSG.JOB_RETRY, {
|
|
246
|
+
jobId: string;
|
|
234
247
|
}> | BaseMessage<typeof MSG.PRESENCE_UPDATE, Record<string, unknown>> | BaseMessage<typeof MSG.GW_SCOPE_CONNECT, {
|
|
235
248
|
scopeType: string;
|
|
236
249
|
scopeId: string;
|
|
@@ -326,6 +339,12 @@ type ServerMessage = BaseMessage<typeof MSG.QUERY_RESULT, {
|
|
|
326
339
|
}> | BaseMessage<typeof MSG.CRON_STATUS, {
|
|
327
340
|
tasks: unknown;
|
|
328
341
|
recentHistory: unknown;
|
|
342
|
+
}> | BaseMessage<typeof MSG.JOB_UPDATE, {
|
|
343
|
+
kind: 'snapshot' | 'enqueued' | 'progress' | 'succeeded' | 'failed' | 'canceled' | 'retried';
|
|
344
|
+
job?: unknown;
|
|
345
|
+
jobs?: unknown[];
|
|
346
|
+
/** Echoes the enqueue requestId when the update is the enqueue ack. */
|
|
347
|
+
requestId?: string;
|
|
329
348
|
}> | BaseMessage<typeof MSG.PRESENCE_SYNC, {
|
|
330
349
|
peers: unknown[];
|
|
331
350
|
}> | BaseMessage<typeof MSG.PRESENCE_JOIN, {
|
|
@@ -497,6 +516,27 @@ declare const clientBuild: {
|
|
|
497
516
|
readonly taskName: string;
|
|
498
517
|
};
|
|
499
518
|
};
|
|
519
|
+
jobEnqueue: (requestId: string, type: string, payload?: unknown, maxAttempts?: number) => {
|
|
520
|
+
readonly type: "job.enqueue";
|
|
521
|
+
readonly payload: {
|
|
522
|
+
readonly requestId: string;
|
|
523
|
+
readonly type: string;
|
|
524
|
+
readonly payload: unknown;
|
|
525
|
+
readonly maxAttempts: number | undefined;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
jobCancel: (jobId: string) => {
|
|
529
|
+
readonly type: "job.cancel";
|
|
530
|
+
readonly payload: {
|
|
531
|
+
readonly jobId: string;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
jobRetry: (jobId: string) => {
|
|
535
|
+
readonly type: "job.retry";
|
|
536
|
+
readonly payload: {
|
|
537
|
+
readonly jobId: string;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
500
540
|
presenceUpdate: (state: Record<string, unknown>) => {
|
|
501
541
|
readonly type: "presence.update";
|
|
502
542
|
readonly payload: Record<string, unknown>;
|
|
@@ -719,6 +759,56 @@ declare const serverBuild: {
|
|
|
719
759
|
readonly recentHistory: unknown;
|
|
720
760
|
};
|
|
721
761
|
};
|
|
762
|
+
jobSnapshot: (jobs: unknown[]) => {
|
|
763
|
+
readonly type: "job.update";
|
|
764
|
+
readonly payload: {
|
|
765
|
+
readonly kind: "snapshot";
|
|
766
|
+
readonly jobs: unknown[];
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
jobEnqueued: (job: unknown, requestId?: string) => {
|
|
770
|
+
readonly type: "job.update";
|
|
771
|
+
readonly payload: {
|
|
772
|
+
readonly kind: "enqueued";
|
|
773
|
+
readonly job: unknown;
|
|
774
|
+
readonly requestId: string | undefined;
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
jobProgress: (job: unknown) => {
|
|
778
|
+
readonly type: "job.update";
|
|
779
|
+
readonly payload: {
|
|
780
|
+
readonly kind: "progress";
|
|
781
|
+
readonly job: unknown;
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
jobSucceeded: (job: unknown) => {
|
|
785
|
+
readonly type: "job.update";
|
|
786
|
+
readonly payload: {
|
|
787
|
+
readonly kind: "succeeded";
|
|
788
|
+
readonly job: unknown;
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
jobFailed: (job: unknown) => {
|
|
792
|
+
readonly type: "job.update";
|
|
793
|
+
readonly payload: {
|
|
794
|
+
readonly kind: "failed";
|
|
795
|
+
readonly job: unknown;
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
jobCanceled: (job: unknown) => {
|
|
799
|
+
readonly type: "job.update";
|
|
800
|
+
readonly payload: {
|
|
801
|
+
readonly kind: "canceled";
|
|
802
|
+
readonly job: unknown;
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
jobRetried: (job: unknown) => {
|
|
806
|
+
readonly type: "job.update";
|
|
807
|
+
readonly payload: {
|
|
808
|
+
readonly kind: "retried";
|
|
809
|
+
readonly job: unknown;
|
|
810
|
+
};
|
|
811
|
+
};
|
|
722
812
|
presenceSync: (peers: unknown[]) => {
|
|
723
813
|
readonly type: "presence.sync";
|
|
724
814
|
readonly payload: {
|
|
@@ -1646,6 +1736,166 @@ declare abstract class CronRoom<E = Record<string, unknown>> extends BaseRoom<E>
|
|
|
1646
1736
|
protected abstract onTask(taskName: string): void | Promise<void>;
|
|
1647
1737
|
}
|
|
1648
1738
|
|
|
1739
|
+
/**
|
|
1740
|
+
* JobRoom — Per-app durable background-job execution Durable Object.
|
|
1741
|
+
*
|
|
1742
|
+
* Solves the "long job dies when the response goes out" problem on
|
|
1743
|
+
* Cloudflare Workers. `ctx.waitUntil` only gets 30s after a response;
|
|
1744
|
+
* jobs that need minutes-to-hours live here instead: rows in SQLite,
|
|
1745
|
+
* picked up by DO alarms (15-min wall budget per tick), resumable
|
|
1746
|
+
* across ticks via `ctx.continue` for the rare longer cases.
|
|
1747
|
+
*
|
|
1748
|
+
* Lifecycle: queued → running → succeeded | failed | canceled
|
|
1749
|
+
*
|
|
1750
|
+
* Crash recovery: if an isolate is recycled mid-run, the row stays at
|
|
1751
|
+
* `running`. On next init, rows older than ~16 min are either retried
|
|
1752
|
+
* (if attempts left) or marked failed.
|
|
1753
|
+
*
|
|
1754
|
+
* See the abstract `onJob` method below for the subclass contract.
|
|
1755
|
+
* Message types: job.*
|
|
1756
|
+
*/
|
|
1757
|
+
|
|
1758
|
+
type JobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled';
|
|
1759
|
+
/**
|
|
1760
|
+
* Job record exposed to `onJob` handlers and clients. Payloads are typed
|
|
1761
|
+
* as `unknown` at the SDK layer; subclasses narrow via a generic param.
|
|
1762
|
+
*/
|
|
1763
|
+
interface Job<P = unknown> {
|
|
1764
|
+
id: string;
|
|
1765
|
+
type: string;
|
|
1766
|
+
status: JobStatus;
|
|
1767
|
+
payload: P;
|
|
1768
|
+
result?: unknown;
|
|
1769
|
+
error?: string;
|
|
1770
|
+
progress?: number;
|
|
1771
|
+
progressMessage?: string;
|
|
1772
|
+
attempts: number;
|
|
1773
|
+
maxAttempts: number;
|
|
1774
|
+
enqueuedAt: string;
|
|
1775
|
+
startedAt?: string | null;
|
|
1776
|
+
completedAt?: string | null;
|
|
1777
|
+
enqueuedBy?: string | null;
|
|
1778
|
+
/** Set when a previous run called `ctx.continue(state)`. */
|
|
1779
|
+
resumeFrom?: unknown;
|
|
1780
|
+
}
|
|
1781
|
+
interface JobContext {
|
|
1782
|
+
/** Set progress (0..1) with an optional message. Broadcasts. */
|
|
1783
|
+
progress(value: number, message?: string): void;
|
|
1784
|
+
/**
|
|
1785
|
+
* Save a resumable checkpoint and re-run `onJob` on the next alarm
|
|
1786
|
+
* with `job.resumeFrom = state`. The return value of `onJob` is
|
|
1787
|
+
* ignored once `continue` has been called.
|
|
1788
|
+
*/
|
|
1789
|
+
continue(state: unknown, options?: {
|
|
1790
|
+
afterMs?: number;
|
|
1791
|
+
}): void;
|
|
1792
|
+
/**
|
|
1793
|
+
* Fires when a JOB_CANCEL arrives while this job is running in this
|
|
1794
|
+
* isolate. Cross-isolate cancels still mark the row `canceled` but
|
|
1795
|
+
* can't fire this signal.
|
|
1796
|
+
*/
|
|
1797
|
+
signal: AbortSignal;
|
|
1798
|
+
}
|
|
1799
|
+
interface JobRoomConfig {
|
|
1800
|
+
/** Default for jobs enqueued without explicit `maxAttempts`. Default 1 (no auto-retry). */
|
|
1801
|
+
defaultMaxAttempts?: number;
|
|
1802
|
+
/** TTL for terminal rows (succeeded/failed/canceled) in ms. Default 24h. */
|
|
1803
|
+
retentionMs?: number;
|
|
1804
|
+
/** Job count in the initial snapshot to a new subscriber. Default 100. */
|
|
1805
|
+
snapshotLimit?: number;
|
|
1806
|
+
/** Delay before a failed attempt is retried, in ms. Default 1000. */
|
|
1807
|
+
retryBackoffMs?: number;
|
|
1808
|
+
}
|
|
1809
|
+
declare abstract class JobRoom<E = Record<string, unknown>, P = unknown, R = unknown> extends BaseRoom<E> {
|
|
1810
|
+
private initialized;
|
|
1811
|
+
private readonly defaultMaxAttempts;
|
|
1812
|
+
private readonly retentionMs;
|
|
1813
|
+
private readonly snapshotLimit;
|
|
1814
|
+
private readonly retryBackoffMs;
|
|
1815
|
+
/** In-flight jobs in this isolate; lets same-isolate JOB_CANCEL fire the signal. */
|
|
1816
|
+
private readonly inFlight;
|
|
1817
|
+
/** Set by `ctx.continue` inside `executeJob`; reset before every run. */
|
|
1818
|
+
private continueState;
|
|
1819
|
+
constructor(state: DurableObjectState, env: unknown, config?: JobRoomConfig);
|
|
1820
|
+
private ensureInitialized;
|
|
1821
|
+
fetch(request: Request): Promise<Response>;
|
|
1822
|
+
protected onConnect(ws: WebSocket, user: UserAttachment): UserAttachment;
|
|
1823
|
+
protected onMessage(ws: WebSocket, user: UserAttachment, message: {
|
|
1824
|
+
type: string;
|
|
1825
|
+
[key: string]: unknown;
|
|
1826
|
+
}): Promise<void>;
|
|
1827
|
+
protected onAlarm(): Promise<void>;
|
|
1828
|
+
/**
|
|
1829
|
+
* One internal endpoint, `POST /enqueue`, used by the `enqueueJob`
|
|
1830
|
+
* helper at the bottom of this file. The room is not meant to be
|
|
1831
|
+
* reachable from the public internet; callers route through the app
|
|
1832
|
+
* worker (or call `this.enqueue(...)` directly from a subclass).
|
|
1833
|
+
*
|
|
1834
|
+
* Subclasses overriding `onRequest` should call `super.onRequest(req)`
|
|
1835
|
+
* for paths they don't handle.
|
|
1836
|
+
*/
|
|
1837
|
+
protected onRequest(request: Request): Promise<Response>;
|
|
1838
|
+
/**
|
|
1839
|
+
* Synchronously persist a new job and arm the alarm. Returns the new
|
|
1840
|
+
* job. This is the in-isolate path — useful for a subclass `onJob`
|
|
1841
|
+
* that wants to chain follow-up work without paying a fetch hop:
|
|
1842
|
+
*
|
|
1843
|
+
* protected async onJob(job: Job, ctx: JobContext) {
|
|
1844
|
+
* // ... do work ...
|
|
1845
|
+
* if (needsFollowup) this.enqueue('followup', { parent: job.id })
|
|
1846
|
+
* }
|
|
1847
|
+
*
|
|
1848
|
+
* Workers code that lives outside the DO isolate (HTTP routes, cron
|
|
1849
|
+
* tasks, server actions) cannot call this directly — they must go
|
|
1850
|
+
* through the `enqueueJob` helper at the bottom of this file, which
|
|
1851
|
+
* routes via the DO's `/enqueue` HTTP endpoint.
|
|
1852
|
+
*/
|
|
1853
|
+
enqueue(type: string, payload?: unknown, options?: {
|
|
1854
|
+
maxAttempts?: number;
|
|
1855
|
+
enqueuedBy?: string;
|
|
1856
|
+
}): Job;
|
|
1857
|
+
private insertJob;
|
|
1858
|
+
private cancelJob;
|
|
1859
|
+
private retryJob;
|
|
1860
|
+
/**
|
|
1861
|
+
* Drain due jobs in FIFO order. All due jobs share the alarm's
|
|
1862
|
+
* 15-min wall budget (a CF property, not a per-job allocation).
|
|
1863
|
+
*/
|
|
1864
|
+
private drainDueJobs;
|
|
1865
|
+
private executeJob;
|
|
1866
|
+
private makeContext;
|
|
1867
|
+
private readStatus;
|
|
1868
|
+
private scheduleNextAlarm;
|
|
1869
|
+
private recoverStuckRunning;
|
|
1870
|
+
private pruneExpired;
|
|
1871
|
+
private getRecentJobs;
|
|
1872
|
+
private getJobById;
|
|
1873
|
+
/**
|
|
1874
|
+
* Run a single job. Return a value for success; throw for failure
|
|
1875
|
+
* (retried until attempts >= maxAttempts). Use `ctx.progress` for
|
|
1876
|
+
* progress, `ctx.continue(state)` to span multiple alarms, and
|
|
1877
|
+
* `ctx.signal` to honor client cancellations.
|
|
1878
|
+
*/
|
|
1879
|
+
protected abstract onJob(job: Job<P>, ctx: JobContext): Promise<R | void> | R | void;
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* Enqueue a job from worker code that has the DO namespace. Routed by
|
|
1883
|
+
* `roomId` (typically `app:<APP_NAME>`; pass different ids for sharded
|
|
1884
|
+
* queues). Returns the new jobId; throws on failure.
|
|
1885
|
+
*
|
|
1886
|
+
* const jobId = await enqueueJob(
|
|
1887
|
+
* env.JOB_ROOMS,
|
|
1888
|
+
* `app:${env.APP_NAME}`,
|
|
1889
|
+
* 'ai-summarize',
|
|
1890
|
+
* { text },
|
|
1891
|
+
* { maxAttempts: 3 },
|
|
1892
|
+
* )
|
|
1893
|
+
*/
|
|
1894
|
+
declare function enqueueJob(namespace: DurableObjectNamespace, roomId: string, type: string, payload?: unknown, options?: {
|
|
1895
|
+
maxAttempts?: number;
|
|
1896
|
+
enqueuedBy?: string;
|
|
1897
|
+
}): Promise<string>;
|
|
1898
|
+
|
|
1649
1899
|
/**
|
|
1650
1900
|
* DO Manifest — Dynamic Durable Object binding declarations.
|
|
1651
1901
|
*
|
|
@@ -3083,7 +3333,7 @@ declare function runMigrations(db: D1Database, migrations: readonly string[]): P
|
|
|
3083
3333
|
interface JwtVerifierConfig {
|
|
3084
3334
|
/** PEM-encoded public key (ES256) for JWT verification */
|
|
3085
3335
|
publicKey: string;
|
|
3086
|
-
/** Expected issuer (e.g. "https://auth.deep.space") */
|
|
3336
|
+
/** Expected issuer (e.g. "https://auth.deep.space/api/auth") */
|
|
3087
3337
|
issuer: string;
|
|
3088
3338
|
/** Expected audience (usually the configured platform API URL) */
|
|
3089
3339
|
audience?: string | string[];
|
|
@@ -4026,4 +4276,4 @@ type DeepSpaceAuth = ReturnType<typeof createDeepSpaceAuth>;
|
|
|
4026
4276
|
/** Collections that bypass schema checks (permissive access) */
|
|
4027
4277
|
declare const SYSTEM_COLLECTIONS: Set<string>;
|
|
4028
4278
|
|
|
4029
|
-
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, Awareness, type AwarenessState, type AwarenessStates, BASE_USERS_SCHEMA, BUILT_IN_TOOLS, type BaseMessage, BaseRoom, CHANNELS_SCHEMA, CHANNEL_INVITATIONS_SCHEMA, CHANNEL_MEMBERS_SCHEMA, CONVERSATION_SCHEMAS, COST_RATES, CanvasRoom, type CanvasShape, type ChatContextConfig, type ChatMessageRow, type ChatRow, type ChatTurn, type ClientMessage, type CollectionPermissionSummary, type CollectionSchema, type ColumnDefinition, type ColumnInterpretation, 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_MAX_SKEW_MS, 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 InternalSignature, type JwtClaims, type JwtVerifierConfig, 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, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_DEFAULT, RecordRoom, type RecordRoomConfig, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, SYSTEM_COLLECTIONS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotOptions, type ScreenshotResult, type ServerMessage, type SharedConnection, type SignInternalPayloadInput, type StoredRecord, type Summarizer, type SyncResult, type TokenDebugInfo, type ToolResult, type ToolSchema, USERS_COLUMNS, type User, type UserAttachment, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyInternalSignatureInput, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, YjsRoom, analyzePermissions, apiWorkerFetch, appendMessage, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, buildCronContext, buildInternalPayload, buildTableSelect, buildUiParts, canCreate, canDelete, canRead, canUpdate, capToolResultSize, captureScreenshot, checkFieldPermissions, clientBuild, coerceValue, collectionTableName, columnId, computeDoMigration, computeHmacHex, createChat, createDecoder, createDeepSpaceAI, createDeepSpaceAuth, createEncoder, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deleteChatCascade, dispatch, encode, encodeAwarenessMessage, encodeSyncStep1, encodeSyncStep2, encodeUpdate, getChat, getGlobalDOSchemas, getGlobalDOType, getMessageType, getRolePermissions, handleAwarenessMessage, handleSyncMessage, hasContent, isAutoProvision, isOwner, lintSchema, loadMessages, makeDefaultSummarizer, meterAi, meterUsage, meterVectorize, noopPermissionContext, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, readVarUint, readVarUint8Array, resolveAppName, resolveColumn, rowToData, runMigrations, serverBuild, signInternalPayload, timingSafeEqualHex, toUint8Array, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppName, validateBindingManifest, validateDoManifest, verifyInternalSignature, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema, writeVarUint, writeVarUint8Array };
|
|
4279
|
+
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, Awareness, type AwarenessState, type AwarenessStates, BASE_USERS_SCHEMA, BUILT_IN_TOOLS, type BaseMessage, BaseRoom, CHANNELS_SCHEMA, CHANNEL_INVITATIONS_SCHEMA, CHANNEL_MEMBERS_SCHEMA, CONVERSATION_SCHEMAS, COST_RATES, CanvasRoom, type CanvasShape, type ChatContextConfig, type ChatMessageRow, type ChatRow, type ChatTurn, type ClientMessage, type CollectionPermissionSummary, type CollectionSchema, type ColumnDefinition, type ColumnInterpretation, 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_MAX_SKEW_MS, 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 InternalSignature, type Job, type JobContext, JobRoom, type JobRoomConfig, type JobStatus, type JwtClaims, type JwtVerifierConfig, 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, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_NAMES, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_DEFAULT, RecordRoom, type RecordRoomConfig, type ResolvedColumn, type ResolvedPermission, type RolePermissions, type RunMigrationsResult, SYSTEM_COLLECTIONS, SYSTEM_MANAGED_COLUMNS, SchemaRegistry, type ScopeContext, type ScopedR2Auth, type ScopedR2Config, type ScopedR2Handler, type ScreenshotEnv, type ScreenshotOptions, type ScreenshotResult, type ServerMessage, type SharedConnection, type SignInternalPayloadInput, type StoredRecord, type Summarizer, type SyncResult, type TokenDebugInfo, type ToolResult, type ToolSchema, USERS_COLUMNS, type User, type UserAttachment, VOTING_SCHEMAS, type ValidationError, type VerifiedAuth, type VerifyInternalSignatureInput, type VerifyOutcome, type VerifyResult, type Viewport, WORKSPACE_SCHEMAS, YjsRoom, analyzePermissions, apiWorkerFetch, appendMessage, applySlidingWindow, authWorkerFetch, bindingManifestFromOutputConfig, buildCronContext, buildInternalPayload, buildTableSelect, buildUiParts, canCreate, canDelete, canRead, canUpdate, capToolResultSize, captureScreenshot, checkFieldPermissions, clientBuild, coerceValue, collectionTableName, columnId, computeDoMigration, computeHmacHex, createChat, createDecoder, createDeepSpaceAI, createDeepSpaceAuth, createEncoder, createScopedR2Handler, dataToColumnValues, decodeJwtPayload, deleteChatCascade, dispatch, encode, encodeAwarenessMessage, encodeSyncStep1, encodeSyncStep2, encodeUpdate, enqueueJob, getChat, getGlobalDOSchemas, getGlobalDOType, getMessageType, getRolePermissions, handleAwarenessMessage, handleSyncMessage, hasContent, isAutoProvision, isOwner, lintSchema, loadMessages, makeDefaultSummarizer, meterAi, meterUsage, meterVectorize, noopPermissionContext, platformWorkerFetch, prepareMessagesWithCompaction, priceBindingUsageEvent, readVarUint, readVarUint8Array, resolveAppName, resolveColumn, rowToData, runMigrations, serverBuild, signInternalPayload, timingSafeEqualHex, toUint8Array, totalChars, truncateOldToolResults, turnsToCoreMessages, unwrapToolOutput, updateChat, validateAppName, validateBindingManifest, validateDoManifest, verifyInternalSignature, verifyJwt, workspaceAccountsSchema, workspaceContentSharesSchema, workspaceEmailHandlesSchema, workspaceFormResponsesSchema, workspacePeopleSchema, workspaceProjectsSchema, workspaceTagsSchema, workspaceTasksSchema, workspaceTeamMembersSchema, workspaceTeamsSchema, workspaceTransactionsSchema, writeVarUint, writeVarUint8Array };
|