deepspace 0.3.10 → 0.4.0
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 +331 -115
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +199 -16
- package/dist/index.js +354 -166
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +242 -73
- package/dist/server.js +985 -374
- package/dist/server.js.map +1 -1
- package/dist/worker.d.ts +322 -73
- package/dist/worker.js +961 -343
- 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/index.d.ts
CHANGED
|
@@ -396,6 +396,7 @@ declare const MSG: {
|
|
|
396
396
|
readonly USER_LIST: "user.list";
|
|
397
397
|
readonly SET_ROLE: "user.set_role";
|
|
398
398
|
readonly USER_UPDATE: "user.update";
|
|
399
|
+
readonly AUTH: "auth";
|
|
399
400
|
readonly YJS_JOIN: "yjs.join";
|
|
400
401
|
readonly YJS_LEAVE: "yjs.leave";
|
|
401
402
|
readonly ACK: "records.ack";
|
|
@@ -424,6 +425,10 @@ declare const MSG: {
|
|
|
424
425
|
readonly CRON_PAUSE: "cron.pause";
|
|
425
426
|
readonly CRON_RESUME: "cron.resume";
|
|
426
427
|
readonly CRON_STATUS: "cron.status";
|
|
428
|
+
readonly JOB_ENQUEUE: "job.enqueue";
|
|
429
|
+
readonly JOB_CANCEL: "job.cancel";
|
|
430
|
+
readonly JOB_RETRY: "job.retry";
|
|
431
|
+
readonly JOB_UPDATE: "job.update";
|
|
427
432
|
readonly PRESENCE_SYNC: "presence.sync";
|
|
428
433
|
readonly PRESENCE_JOIN: "presence.join";
|
|
429
434
|
readonly PRESENCE_LEAVE: "presence.leave";
|
|
@@ -590,6 +595,15 @@ type ClientMessage = BaseMessage<typeof MSG.SUBSCRIBE, {
|
|
|
590
595
|
taskName: string;
|
|
591
596
|
}> | BaseMessage<typeof MSG.CRON_RESUME, {
|
|
592
597
|
taskName: string;
|
|
598
|
+
}> | BaseMessage<typeof MSG.JOB_ENQUEUE, {
|
|
599
|
+
requestId: string;
|
|
600
|
+
type: string;
|
|
601
|
+
payload?: unknown;
|
|
602
|
+
maxAttempts?: number;
|
|
603
|
+
}> | BaseMessage<typeof MSG.JOB_CANCEL, {
|
|
604
|
+
jobId: string;
|
|
605
|
+
}> | BaseMessage<typeof MSG.JOB_RETRY, {
|
|
606
|
+
jobId: string;
|
|
593
607
|
}> | BaseMessage<typeof MSG.PRESENCE_UPDATE, Record<string, unknown>> | BaseMessage<typeof MSG.GW_SCOPE_CONNECT, {
|
|
594
608
|
scopeType: string;
|
|
595
609
|
scopeId: string;
|
|
@@ -626,6 +640,8 @@ type ServerMessage = BaseMessage<typeof MSG.QUERY_RESULT, {
|
|
|
626
640
|
error: string;
|
|
627
641
|
}> | BaseMessage<typeof MSG.RESUBSCRIBE, EmptyPayload> | BaseMessage<typeof MSG.LIST_SCHEMAS, {
|
|
628
642
|
schemas: unknown;
|
|
643
|
+
}> | BaseMessage<typeof MSG.AUTH, {
|
|
644
|
+
canWrite: boolean;
|
|
629
645
|
}> | BaseMessage<typeof MSG.USER_INFO, unknown> | BaseMessage<typeof MSG.USER_LIST, {
|
|
630
646
|
users: unknown[];
|
|
631
647
|
}> | BaseMessage<typeof MSG.YJS_JOIN, {
|
|
@@ -685,6 +701,12 @@ type ServerMessage = BaseMessage<typeof MSG.QUERY_RESULT, {
|
|
|
685
701
|
}> | BaseMessage<typeof MSG.CRON_STATUS, {
|
|
686
702
|
tasks: unknown;
|
|
687
703
|
recentHistory: unknown;
|
|
704
|
+
}> | BaseMessage<typeof MSG.JOB_UPDATE, {
|
|
705
|
+
kind: 'snapshot' | 'enqueued' | 'progress' | 'succeeded' | 'failed' | 'canceled' | 'retried';
|
|
706
|
+
job?: unknown;
|
|
707
|
+
jobs?: unknown[];
|
|
708
|
+
/** Echoes the enqueue requestId when the update is the enqueue ack. */
|
|
709
|
+
requestId?: string;
|
|
688
710
|
}> | BaseMessage<typeof MSG.PRESENCE_SYNC, {
|
|
689
711
|
peers: unknown[];
|
|
690
712
|
}> | BaseMessage<typeof MSG.PRESENCE_JOIN, {
|
|
@@ -856,6 +878,27 @@ declare const clientBuild: {
|
|
|
856
878
|
readonly taskName: string;
|
|
857
879
|
};
|
|
858
880
|
};
|
|
881
|
+
jobEnqueue: (requestId: string, type: string, payload?: unknown, maxAttempts?: number) => {
|
|
882
|
+
readonly type: "job.enqueue";
|
|
883
|
+
readonly payload: {
|
|
884
|
+
readonly requestId: string;
|
|
885
|
+
readonly type: string;
|
|
886
|
+
readonly payload: unknown;
|
|
887
|
+
readonly maxAttempts: number | undefined;
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
jobCancel: (jobId: string) => {
|
|
891
|
+
readonly type: "job.cancel";
|
|
892
|
+
readonly payload: {
|
|
893
|
+
readonly jobId: string;
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
jobRetry: (jobId: string) => {
|
|
897
|
+
readonly type: "job.retry";
|
|
898
|
+
readonly payload: {
|
|
899
|
+
readonly jobId: string;
|
|
900
|
+
};
|
|
901
|
+
};
|
|
859
902
|
presenceUpdate: (state: Record<string, unknown>) => {
|
|
860
903
|
readonly type: "presence.update";
|
|
861
904
|
readonly payload: Record<string, unknown>;
|
|
@@ -1078,6 +1121,56 @@ declare const serverBuild: {
|
|
|
1078
1121
|
readonly recentHistory: unknown;
|
|
1079
1122
|
};
|
|
1080
1123
|
};
|
|
1124
|
+
jobSnapshot: (jobs: unknown[]) => {
|
|
1125
|
+
readonly type: "job.update";
|
|
1126
|
+
readonly payload: {
|
|
1127
|
+
readonly kind: "snapshot";
|
|
1128
|
+
readonly jobs: unknown[];
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
jobEnqueued: (job: unknown, requestId?: string) => {
|
|
1132
|
+
readonly type: "job.update";
|
|
1133
|
+
readonly payload: {
|
|
1134
|
+
readonly kind: "enqueued";
|
|
1135
|
+
readonly job: unknown;
|
|
1136
|
+
readonly requestId: string | undefined;
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
jobProgress: (job: unknown) => {
|
|
1140
|
+
readonly type: "job.update";
|
|
1141
|
+
readonly payload: {
|
|
1142
|
+
readonly kind: "progress";
|
|
1143
|
+
readonly job: unknown;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
jobSucceeded: (job: unknown) => {
|
|
1147
|
+
readonly type: "job.update";
|
|
1148
|
+
readonly payload: {
|
|
1149
|
+
readonly kind: "succeeded";
|
|
1150
|
+
readonly job: unknown;
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
jobFailed: (job: unknown) => {
|
|
1154
|
+
readonly type: "job.update";
|
|
1155
|
+
readonly payload: {
|
|
1156
|
+
readonly kind: "failed";
|
|
1157
|
+
readonly job: unknown;
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
jobCanceled: (job: unknown) => {
|
|
1161
|
+
readonly type: "job.update";
|
|
1162
|
+
readonly payload: {
|
|
1163
|
+
readonly kind: "canceled";
|
|
1164
|
+
readonly job: unknown;
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
jobRetried: (job: unknown) => {
|
|
1168
|
+
readonly type: "job.update";
|
|
1169
|
+
readonly payload: {
|
|
1170
|
+
readonly kind: "retried";
|
|
1171
|
+
readonly job: unknown;
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1081
1174
|
presenceSync: (peers: unknown[]) => {
|
|
1082
1175
|
readonly type: "presence.sync";
|
|
1083
1176
|
readonly payload: {
|
|
@@ -5882,13 +5975,20 @@ interface UseGameRoomResult {
|
|
|
5882
5975
|
running: boolean;
|
|
5883
5976
|
/** Whether WebSocket is connected */
|
|
5884
5977
|
connected: boolean;
|
|
5885
|
-
/**
|
|
5978
|
+
/**
|
|
5979
|
+
* Whether this connection has write access. False for viewers /
|
|
5980
|
+
* unauthenticated spectators — they receive state broadcasts but the
|
|
5981
|
+
* send callbacks below no-op. UIs should disable input controls when
|
|
5982
|
+
* false so spectators see why their actions don't take effect.
|
|
5983
|
+
*/
|
|
5984
|
+
canWrite: boolean;
|
|
5985
|
+
/** Send a game input (no-op for spectators) */
|
|
5886
5986
|
sendInput: (action: string, data?: Record<string, unknown>) => void;
|
|
5887
|
-
/** Mark self as ready */
|
|
5987
|
+
/** Mark self as ready (no-op for spectators) */
|
|
5888
5988
|
setReady: () => void;
|
|
5889
|
-
/** Request game start */
|
|
5989
|
+
/** Request game start (no-op for spectators) */
|
|
5890
5990
|
startGame: () => void;
|
|
5891
|
-
/** Request game end */
|
|
5991
|
+
/** Request game end (no-op for spectators) */
|
|
5892
5992
|
endGame: () => void;
|
|
5893
5993
|
}
|
|
5894
5994
|
declare function useGameRoom(roomId: string): UseGameRoomResult;
|
|
@@ -5929,21 +6029,28 @@ interface UseCanvasResult {
|
|
|
5929
6029
|
viewports: ViewportClient[];
|
|
5930
6030
|
/** Whether WebSocket is connected */
|
|
5931
6031
|
connected: boolean;
|
|
5932
|
-
/**
|
|
6032
|
+
/**
|
|
6033
|
+
* Whether this connection has write access (member/admin role). The
|
|
6034
|
+
* write callbacks below no-op when this is false; UIs should also use
|
|
6035
|
+
* it to disable controls so viewers see why their clicks do nothing.
|
|
6036
|
+
* Viewport reporting stays available regardless — it's presence info.
|
|
6037
|
+
*/
|
|
6038
|
+
canWrite: boolean;
|
|
6039
|
+
/** Add a shape (no-op when canWrite is false) */
|
|
5933
6040
|
addShape: (shape: Partial<CanvasShapeClient>) => void;
|
|
5934
|
-
/** Move a shape */
|
|
6041
|
+
/** Move a shape (no-op when canWrite is false) */
|
|
5935
6042
|
moveShape: (shapeId: string, x: number, y: number) => void;
|
|
5936
|
-
/** Resize a shape */
|
|
6043
|
+
/** Resize a shape (no-op when canWrite is false) */
|
|
5937
6044
|
resizeShape: (shapeId: string, width: number, height: number, x?: number, y?: number) => void;
|
|
5938
|
-
/** Delete a shape */
|
|
6045
|
+
/** Delete a shape (no-op when canWrite is false) */
|
|
5939
6046
|
deleteShape: (shapeId: string) => void;
|
|
5940
|
-
/** Update shape properties */
|
|
6047
|
+
/** Update shape properties (no-op when canWrite is false) */
|
|
5941
6048
|
updateShape: (shapeId: string, props: Record<string, unknown>) => void;
|
|
5942
|
-
/** Report local viewport */
|
|
6049
|
+
/** Report local viewport (allowed for viewers — presence-like) */
|
|
5943
6050
|
setViewport: (viewport: Omit<ViewportClient, 'userId'>) => void;
|
|
5944
|
-
/** Undo last action */
|
|
6051
|
+
/** Undo last action (no-op when canWrite is false) */
|
|
5945
6052
|
undo: () => void;
|
|
5946
|
-
/** Redo last undone action */
|
|
6053
|
+
/** Redo last undone action (no-op when canWrite is false) */
|
|
5947
6054
|
redo: () => void;
|
|
5948
6055
|
}
|
|
5949
6056
|
declare function useCanvas(roomId: string): UseCanvasResult;
|
|
@@ -5980,15 +6087,91 @@ interface UseCronMonitorResult {
|
|
|
5980
6087
|
history: CronHistoryEntry[];
|
|
5981
6088
|
/** Whether WebSocket is connected */
|
|
5982
6089
|
connected: boolean;
|
|
5983
|
-
/**
|
|
6090
|
+
/**
|
|
6091
|
+
* Whether this connection can mutate cron state (trigger / pause /
|
|
6092
|
+
* resume). False for viewers and unauthenticated connections — the
|
|
6093
|
+
* mutation callbacks below no-op and UIs should disable those
|
|
6094
|
+
* controls. Reading tasks/history stays available either way.
|
|
6095
|
+
*/
|
|
6096
|
+
canWrite: boolean;
|
|
6097
|
+
/** Manually trigger a task (no-op when canWrite is false) */
|
|
5984
6098
|
trigger: (taskName: string) => void;
|
|
5985
|
-
/** Pause a task */
|
|
6099
|
+
/** Pause a task (no-op when canWrite is false) */
|
|
5986
6100
|
pause: (taskName: string) => void;
|
|
5987
|
-
/** Resume a paused task */
|
|
6101
|
+
/** Resume a paused task (no-op when canWrite is false) */
|
|
5988
6102
|
resume: (taskName: string) => void;
|
|
5989
6103
|
}
|
|
5990
6104
|
declare function useCronMonitor(roomId: string): UseCronMonitorResult;
|
|
5991
6105
|
|
|
6106
|
+
/**
|
|
6107
|
+
* useJobs — Connect to a JobRoom for enqueueing and tracking background
|
|
6108
|
+
* jobs in real time.
|
|
6109
|
+
*
|
|
6110
|
+
* Opens a WebSocket to /ws/jobs/:roomId. The DO pushes a snapshot on
|
|
6111
|
+
* connect and JOB_UPDATE messages for every state change after that, so
|
|
6112
|
+
* `jobs` stays current without polling. `enqueue` returns a promise that
|
|
6113
|
+
* resolves with the new jobId once the server acks.
|
|
6114
|
+
*
|
|
6115
|
+
* Client-side names (`JobView`, `JobStatusView`) differ from the
|
|
6116
|
+
* server-side equivalents (`Job`, `JobStatus` in `deepspace/worker`) so
|
|
6117
|
+
* apps importing from both ends don't get type collisions.
|
|
6118
|
+
*
|
|
6119
|
+
* @example
|
|
6120
|
+
* const { jobs, enqueue, getJob, cancel } = useJobs(`app:${APP_NAME}`)
|
|
6121
|
+
*
|
|
6122
|
+
* async function onClick() {
|
|
6123
|
+
* const jobId = await enqueue('ai-summarize', { text })
|
|
6124
|
+
* // Now `getJob(jobId)` is reactive until the job reaches a terminal state.
|
|
6125
|
+
* }
|
|
6126
|
+
*/
|
|
6127
|
+
type JobStatusView = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled';
|
|
6128
|
+
interface JobView<P = unknown, R = unknown> {
|
|
6129
|
+
id: string;
|
|
6130
|
+
type: string;
|
|
6131
|
+
status: JobStatusView;
|
|
6132
|
+
payload?: P;
|
|
6133
|
+
result?: R;
|
|
6134
|
+
error?: string;
|
|
6135
|
+
progress?: number;
|
|
6136
|
+
progressMessage?: string;
|
|
6137
|
+
attempts: number;
|
|
6138
|
+
maxAttempts: number;
|
|
6139
|
+
enqueuedAt: string;
|
|
6140
|
+
startedAt?: string | null;
|
|
6141
|
+
completedAt?: string | null;
|
|
6142
|
+
enqueuedBy?: string | null;
|
|
6143
|
+
}
|
|
6144
|
+
interface UseJobsResult<P = unknown, R = unknown> {
|
|
6145
|
+
/** All jobs the room currently knows about, newest-first. */
|
|
6146
|
+
jobs: JobView<P, R>[];
|
|
6147
|
+
/** WebSocket connection state. */
|
|
6148
|
+
connected: boolean;
|
|
6149
|
+
/**
|
|
6150
|
+
* Enqueue a new job. Resolves with the new jobId once the server acks
|
|
6151
|
+
* (typically <100ms). Rejects if:
|
|
6152
|
+
* - the WebSocket isn't connected
|
|
6153
|
+
* - the WebSocket closes before the ack arrives
|
|
6154
|
+
* - no ack arrives within 10s (server dropped the message)
|
|
6155
|
+
*/
|
|
6156
|
+
enqueue(type: string, payload?: P, options?: {
|
|
6157
|
+
maxAttempts?: number;
|
|
6158
|
+
}): Promise<string>;
|
|
6159
|
+
/**
|
|
6160
|
+
* Reactive single-job lookup. Returns undefined while the snapshot is
|
|
6161
|
+
* loading or if the job has been GC'd by the room's TTL sweep.
|
|
6162
|
+
*/
|
|
6163
|
+
getJob(jobId: string): JobView<P, R> | undefined;
|
|
6164
|
+
/** Best-effort cancel. The job is marked canceled even if the handler ignores `ctx.signal`. */
|
|
6165
|
+
cancel(jobId: string): void;
|
|
6166
|
+
/** Manually re-queue a failed/canceled job. No-op for other statuses. */
|
|
6167
|
+
retry(jobId: string): void;
|
|
6168
|
+
}
|
|
6169
|
+
/**
|
|
6170
|
+
* @param roomId DO room id, typically `app:<APP_NAME>`. Apps with sharded
|
|
6171
|
+
* queues pass different ids — each id maps to its own DO instance.
|
|
6172
|
+
*/
|
|
6173
|
+
declare function useJobs<P = unknown, R = unknown>(roomId: string): UseJobsResult<P, R>;
|
|
6174
|
+
|
|
5992
6175
|
/**
|
|
5993
6176
|
* usePresenceRoom — Connect to a PresenceRoom Durable Object.
|
|
5994
6177
|
*
|
|
@@ -7394,4 +7577,4 @@ interface SearchInputProps extends Omit<React$1.ComponentProps<'input'>, 'type'>
|
|
|
7394
7577
|
}
|
|
7395
7578
|
declare const SearchInput: React$1.ForwardRefExoticComponent<Omit<SearchInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
7396
7579
|
|
|
7397
|
-
export { type AdHocChargeOpts, type AiStreamAction, type AiStreamChunk, Alert, AlertDescription, AlertTitle, AuthGate, type AuthGateProps, AuthOverlay, Avatar, AvatarFallback, AvatarImage, Awareness, type AwarenessState, type AwarenessStates, Badge, type BadgeProps, type BaseMessage, Button, type ButtonProps, type CanvasShapeClient, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, type Channel, type ChannelInvitation, type ChannelMember, type ChargeOnceOpts, type ChargeOnceResult, Checkbox, type ClientMessage, type CollectionSchema, ConfirmModal, type ConnectionAttachment, type ConnectionStatus, type ContentSegment, type ConversationObject, type CronHistoryEntry, type CronTaskState, DEEPSPACE_THEME_PROPERTIES, DEFAULT_USER_COLORS, DeepSpaceAuthProvider, type DeepSpaceThemeConfig, DeepSpaceThemeProvider, type DeepSpaceThemeProviderProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENV, EmptyDocuments, EmptyError, EmptyItems, EmptyProjects, EmptySearch, EmptyState, EmptyTeam, type Environment, type FetchUserProfile, type FileAttachment, type GamePlayer, GridCard, type GroupedReaction, GuestBanner, type HandlerContext, type InboxEntry, Input, type IntegrationResponse, Label, type LinkPreviewData, LoadingOverlay, LoadingSpinner, MSG, MSG_AWARENESS, MSG_SYNC, MSG_SYNC_STEP1, MSG_SYNC_STEP2, MSG_SYNC_UPDATE, MSG_YJS_AWARENESS, MSG_YJS_SYNC, type MemberRecord, type Message, type MessageHandlers, type MessageRecord, Modal, type MsgType, type PlanInfo, PlatformContext, type PlatformContextValue, PlatformProvider, type PlatformWSOptions, type PlatformWSResult, type PresencePeerClient, PricingTable, type PricingTablePlan, type PricingTablePrice, type ProductChargeOpts, Progress, type ProtocolMessage, type Purchase, type Query, type R2FileInfo, type R2Scope, type R2UploadResult, ROLES, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_CONFIG, ROLE_DEFAULT, type Reaction, type ReactionRecord, type ReadCursorRecord, type ReadReceipt, type RecordData, RecordProvider, type RecordProviderProps, RecordScope, type RequestOptions, type Role, type RoomUser, type ScopeEntry, ScopeRegistryProvider, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, type ServerMessage, SignedIn, SignedOut, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonList, SkeletonTable, SkeletonText, type SubscribeOpts, type SubscribeResult, type SubscriptionState, type SubscriptionStatus, Switch, type SyncResult, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ToastProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseCanvasResult, type UseCheckoutOpts, type UseCronMonitorResult, type UseGameRoomResult, type UsePresenceRoomResult, type UseR2FilesReturn, type UseYjsFieldResult, type UseYjsRoomResult, type UseYjsTextResult, type User, type UserCredits, type UserInfo, type UserKarma, type UserProfile, type ViewportClient, applyDeepSpaceTheme, applyUIThemeTokens, authClient, badgeVariants, buttonVariants, clearAuthToken, clearDeepSpaceTheme, clientBuild, cn, createDecoder, createEncoder, decodeAiStreamChunk, detectEnvironment, dispatch, encode, encodeAwarenessMessage, encodeSyncStep1, encodeSyncStep2, encodeUpdate, formatFileSize, formatFullTimestamp, formatMessageTime, getApiUrl, getAuthToken, getAuthUrl, getConversationDisplayName, getConversationParticipantIds, getEnvironmentConfig, getMessageType, getPlatformWorkerUrl, getThreadCounts, getUserColor, groupReactionsForMessage, handleAwarenessMessage, handleSyncMessage, hasContent, integration, isDMConversation, isDarkColor, isImageFile, isLocalDev, isProduction, parseMessageMetadata, parseSseLine, readThemeFromDOM, readVarUint, readVarUint8Array, resetEnvironmentCache, serverBuild, shouldGroupMessages, signIn, signOut, toConnectionStatus, toUint8Array, useAuth, useAuthUser, useCanvas, useChannelMembers, useChannels, useCheckout, useCommunities, useConversation, useConversations, useCronMonitor, useDisplayName, useGameRoom, useInbox, useIsDarkTheme, useMessages, useMutations, usePlatform, usePlatformWS, usePosts, usePresence, usePresenceRoom, useQuery, useR2Files, useReactions, useReadReceipts, useRecordContext, useSession, useSubscription, useToast, useUser, useUserLookup, useUsers, useYjsField, useYjsRoom, useYjsText, writeVarUint, writeVarUint8Array };
|
|
7580
|
+
export { type AdHocChargeOpts, type AiStreamAction, type AiStreamChunk, Alert, AlertDescription, AlertTitle, AuthGate, type AuthGateProps, AuthOverlay, Avatar, AvatarFallback, AvatarImage, Awareness, type AwarenessState, type AwarenessStates, Badge, type BadgeProps, type BaseMessage, Button, type ButtonProps, type CanvasShapeClient, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, type Channel, type ChannelInvitation, type ChannelMember, type ChargeOnceOpts, type ChargeOnceResult, Checkbox, type ClientMessage, type CollectionSchema, ConfirmModal, type ConnectionAttachment, type ConnectionStatus, type ContentSegment, type ConversationObject, type CronHistoryEntry, type CronTaskState, DEEPSPACE_THEME_PROPERTIES, DEFAULT_USER_COLORS, DeepSpaceAuthProvider, type DeepSpaceThemeConfig, DeepSpaceThemeProvider, type DeepSpaceThemeProviderProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENV, EmptyDocuments, EmptyError, EmptyItems, EmptyProjects, EmptySearch, EmptyState, EmptyTeam, type Environment, type FetchUserProfile, type FileAttachment, type GamePlayer, GridCard, type GroupedReaction, GuestBanner, type HandlerContext, type InboxEntry, Input, type IntegrationResponse, type JobStatusView, type JobView, Label, type LinkPreviewData, LoadingOverlay, LoadingSpinner, MSG, MSG_AWARENESS, MSG_SYNC, MSG_SYNC_STEP1, MSG_SYNC_STEP2, MSG_SYNC_UPDATE, MSG_YJS_AWARENESS, MSG_YJS_SYNC, type MemberRecord, type Message, type MessageHandlers, type MessageRecord, Modal, type MsgType, type PlanInfo, PlatformContext, type PlatformContextValue, PlatformProvider, type PlatformWSOptions, type PlatformWSResult, type PresencePeerClient, PricingTable, type PricingTablePlan, type PricingTablePrice, type ProductChargeOpts, Progress, type ProtocolMessage, type Purchase, type Query, type R2FileInfo, type R2Scope, type R2UploadResult, ROLES, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_CONFIG, ROLE_DEFAULT, type Reaction, type ReactionRecord, type ReadCursorRecord, type ReadReceipt, type RecordData, RecordProvider, type RecordProviderProps, RecordScope, type RequestOptions, type Role, type RoomUser, type ScopeEntry, ScopeRegistryProvider, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, type ServerMessage, SignedIn, SignedOut, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonList, SkeletonTable, SkeletonText, type SubscribeOpts, type SubscribeResult, type SubscriptionState, type SubscriptionStatus, Switch, type SyncResult, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ToastProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseCanvasResult, type UseCheckoutOpts, type UseCronMonitorResult, type UseGameRoomResult, type UseJobsResult, type UsePresenceRoomResult, type UseR2FilesReturn, type UseYjsFieldResult, type UseYjsRoomResult, type UseYjsTextResult, type User, type UserCredits, type UserInfo, type UserKarma, type UserProfile, type ViewportClient, applyDeepSpaceTheme, applyUIThemeTokens, authClient, badgeVariants, buttonVariants, clearAuthToken, clearDeepSpaceTheme, clientBuild, cn, createDecoder, createEncoder, decodeAiStreamChunk, detectEnvironment, dispatch, encode, encodeAwarenessMessage, encodeSyncStep1, encodeSyncStep2, encodeUpdate, formatFileSize, formatFullTimestamp, formatMessageTime, getApiUrl, getAuthToken, getAuthUrl, getConversationDisplayName, getConversationParticipantIds, getEnvironmentConfig, getMessageType, getPlatformWorkerUrl, getThreadCounts, getUserColor, groupReactionsForMessage, handleAwarenessMessage, handleSyncMessage, hasContent, integration, isDMConversation, isDarkColor, isImageFile, isLocalDev, isProduction, parseMessageMetadata, parseSseLine, readThemeFromDOM, readVarUint, readVarUint8Array, resetEnvironmentCache, serverBuild, shouldGroupMessages, signIn, signOut, toConnectionStatus, toUint8Array, useAuth, useAuthUser, useCanvas, useChannelMembers, useChannels, useCheckout, useCommunities, useConversation, useConversations, useCronMonitor, useDisplayName, useGameRoom, useInbox, useIsDarkTheme, useJobs, useMessages, useMutations, usePlatform, usePlatformWS, usePosts, usePresence, usePresenceRoom, useQuery, useR2Files, useReactions, useReadReceipts, useRecordContext, useSession, useSubscription, useToast, useUser, useUserLookup, useUsers, useYjsField, useYjsRoom, useYjsText, writeVarUint, writeVarUint8Array };
|