@neta-art/cohub 4.8.0 → 4.9.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/README.md +39 -0
- package/dist/chunks/http.d.ts +1 -1
- package/dist/chunks/http.js +1 -1
- package/dist/chunks/transport.js +7 -2
- package/dist/chunks/websocket.d.ts +166 -4
- package/dist/chunks/websocket.js +56 -4
- package/dist/http.d.ts +1 -1
- package/dist/index.d.ts +134 -2
- package/dist/index.js +843 -223
- package/docs/work-runtime-guide.md +92 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -259,6 +259,45 @@ lets you send a prompt but does NOT let you read the reply — that needs
|
|
|
259
259
|
`session.view` (a work scope). Similarly, `generation.create` lets you create
|
|
260
260
|
a generation task, but polling its result needs `taskrun.view` (a work scope).
|
|
261
261
|
|
|
262
|
+
### Realtime rooms
|
|
263
|
+
|
|
264
|
+
Work runtime rooms are generic, temporary event channels. The SDK does not
|
|
265
|
+
know the Work's business events; define their names and payload types in the
|
|
266
|
+
Work itself.
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
type Events = {
|
|
270
|
+
"shared.state.updated": { value: number };
|
|
271
|
+
"activity.submitted": { itemId: string };
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
const room = await client.work.realtime.createRoom<Events>({
|
|
275
|
+
code: "TEAM-ALPHA", // optional; generated when omitted
|
|
276
|
+
maxParticipants: 64,
|
|
277
|
+
expiresInSeconds: 2 * 60 * 60,
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
const stop = room.subscribe("shared.state.updated", (event) => {
|
|
281
|
+
console.log(event.sequence, event.data.value, event.self);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
await room.publish("shared.state.updated", { value: 42 });
|
|
285
|
+
await room.setPresence({ status: "active" });
|
|
286
|
+
await room.leave();
|
|
287
|
+
stop();
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
`expiresInSeconds` is an absolute lifetime from server-side room creation. It
|
|
291
|
+
never extends on publish, presence, or heartbeat. The maximum lifetime is
|
|
292
|
+
24 hours. Room events are live and ordered while connected, with publish ACKs
|
|
293
|
+
and sequence-gap detection; events missed during a disconnect are not replayed.
|
|
294
|
+
|
|
295
|
+
For high-frequency traffic such as input frames, `room.send(type, data)` skips
|
|
296
|
+
the per-event ACK that would otherwise cap throughput at one round trip per
|
|
297
|
+
event; failures surface through `room.onSendError`. Every connection is its own
|
|
298
|
+
participant by default; create the room with `seatPerUser: true` to give each
|
|
299
|
+
viewer a single seat instead.
|
|
300
|
+
|
|
262
301
|
For the complete API-to-scope mapping, initialization recipe, capability
|
|
263
302
|
recipes, a full working example, and a pitfalls checklist, see the
|
|
264
303
|
**[Work Runtime Guide](./docs/work-runtime-guide.md)**.
|
package/dist/chunks/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CreateSpacePromptInput, $
|
|
1
|
+
import { $ as CreateSpacePromptInput, $n as SpaceFsTreeResponse, Ai as BoardCapabilities, Ar as SpaceUsageResponse, At as ModelCatalogEntry, Br as ChannelHealth, Ci as BoardAwarenessUpdate, Cn as SpaceCommerceBenefit, Di as WorkContentKind, Dn as SpaceCommerceOrder, Er as SpaceTurnAuthorFilter, Et as LabelResourceType, Fn as SpaceCreateResponse, Fr as UserRulesResponse, Gi as BoardPlaybackSnapshot, Gt as ReferenceDirection, Hi as BoardPlaybackCommand, Hn as SpaceFsCreateUploadResponse, Ii as BoardInspectInput, In as SpaceDefaultResponse, It as PromptTemplateCatalogResponse, J as ClaimReferralResponse, Jn as SpaceFsMoveInput, Jt as ReferenceQueryableType, K as CheckpointDiffSummary, Kt as ReferenceKind, Ln as SpaceEnvInput, Lt as PublicReferral, Mi as BoardCreateInput, Mn as SpaceConfigInput, Mr as TaskRunDetailResponse, Mt as PatchResourceLabelsResponse, Nn as SpaceConfigResponse, Nr as TaskRunRecord, Nt as Permission, On as SpaceCommerceProduct, Pn as SpaceConfigUpdateResponse, Pr as UserProfile, Qn as SpaceFsReadFilesResponse, R as Channel, Rn as SpaceFsCompleteUploadInput, Rr as UserSessionsResponse, Rt as PublicUserPageResponse, Sa as RequestSource, Sn as SpaceCheckpointDetailResponse, St as LabelItemsResponse, Tr as SpaceSessionsResponse, Ut as ReferenceAggregateGroupBy, V as CheckpointDiffFileResponse, Vn as SpaceFsCreateUploadInput, Wt as ReferenceAggregateResponse, X as CreateInvitationResponse, Xi as BoardValidationResult, Y as CreateInvitationInput, Yi as BoardTransaction, Yn as SpaceFsPreparingFile, Z as CreateSpaceInput, Zt as ReferralDashboard, _a as BillingPayload, _r as SpacePresenceSnapshot, a as WebsocketClientOptions, aa as SessionTurnRecord, an as SessionMessageResponse, at as CursorPageInfo, br as SpaceRecord, ci as BoardTransactionAppliedEvent$1, cn as SessionRecord, d as BatchUserProfilesResponse, di as RealtimePatchOperation, dn as SessionTurnSignedUrlsResponse, ea as SpacePublicEndpoints, et as CreateSpacePromptResponse, fa as CreateSpaceCompletionInput, fn as SessionTurnStreamSnapshotResponse, fr as SpaceMember, ft as GlobalSearchResponse, ga as Usage, gn as SkillCatalogResponse, gr as SpacePendingDiffSummary, ha as SpaceCompletionStreamEvent, hr as SpacePendingDiffFileResponse, ht as InvitationDetail, ii as GenerationModelDeclaration, it as CronJobUpdatePatch, jt as PatchResourceLabelsInput, ki as BoardBootstrap, kn as SpaceCommerceProductBenefitBinding, kt as MeResponse, l as AcceptInvitationResponse, ln as SessionTurnIndexResponse, lr as SpaceInvitationListResponse, ma as SpaceCompletionResult, mn as SessionTurnsPaginatedResponse, mr as SpaceModListItem, mt as GlobalSearchType, na as SessionForkRecord, oa as SpaceTurnsResponse, oi as BoardAwarenessUpdatedEvent$1, on as SessionMessagesPaginatedResponse, or as SpaceFsUploadResponse, pn as SessionTurnWindowResponse, q as CheckpointRecord, qn as SpaceFsFileResponse, qt as ReferenceQueryResponse, r as WebsocketClient, ri as GenerationContentBlock, rt as CronJobRecord, s as WebsocketEventPayload, si as BoardPlaybackChangedEvent$1, sn as SessionMessagesResponse, sr as SpaceFsWriteFileInput, ta as MessageRecord, tt as CreateSpaceSessionInput, un as SessionTurnResponse, va as ContentBlock, vi as SessionTurnPatchEvent, wi as WorkArtifactDescriptor, wn as SpaceCommerceBuyerProfile, wt as LabelListItem, xr as SpaceRole, xt as LabelAssignmentRecord, yn as SpaceAccessPolicy, yr as SpacePublicProfile, zn as SpaceFsCompleteUploadResponse, zr as ChannelConfig } from "./websocket.js";
|
|
2
2
|
import { n as CohubEnvironment } from "./environment.js";
|
|
3
3
|
import { a as VoiceInputCreateOptions } from "./voice-input.js";
|
|
4
4
|
//#region ../protocol/dist/model/status.d.ts
|
package/dist/chunks/http.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as getRealtimeBoardRoom, n as HttpTransport, t as HttpError, w as getRealtimeSpaceRoom } from "./transport.js";
|
|
2
2
|
import { a as resolveApiBaseUrl } from "./environment.js";
|
|
3
3
|
//#region src/apis/channels.ts
|
|
4
4
|
var ChannelsApi = class {
|
package/dist/chunks/transport.js
CHANGED
|
@@ -3,6 +3,11 @@ import { a as resolveApiBaseUrl } from "./environment.js";
|
|
|
3
3
|
const WS_COMPACT_STREAM_CAPABILITY = "session.compact_stream.v1";
|
|
4
4
|
const WS_ROOM_SUBSCRIPTION_CAPABILITY = "realtime.rooms.v1";
|
|
5
5
|
const WS_BOARD_AWARENESS_CAPABILITY = "board.awareness.v1";
|
|
6
|
+
const WS_REALTIME_ROOM_CAPABILITY = "realtime.room.v1";
|
|
7
|
+
/** Accepted room event names. Shared so a client can reject one before sending. */
|
|
8
|
+
const REALTIME_ROOM_EVENT_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/;
|
|
9
|
+
/** Maximum encoded size of a room event payload. */
|
|
10
|
+
const REALTIME_ROOM_MAX_PAYLOAD_BYTES = 16 * 1024;
|
|
6
11
|
const getRealtimeSpaceRoom = (spaceId) => `space:${spaceId}`;
|
|
7
12
|
const getRealtimeBoardRoom = (boardId) => `board:${boardId}`;
|
|
8
13
|
const parseRealtimeRoom = (room) => {
|
|
@@ -12,7 +17,7 @@ const parseRealtimeRoom = (room) => {
|
|
|
12
17
|
const kind = trimmed.slice(0, separatorIndex);
|
|
13
18
|
const id = trimmed.slice(separatorIndex + 1).trim();
|
|
14
19
|
if (!id) return null;
|
|
15
|
-
if (kind !== "space" && kind !== "user" && kind !== "board") return null;
|
|
20
|
+
if (kind !== "space" && kind !== "user" && kind !== "board" && kind !== "room") return null;
|
|
16
21
|
return {
|
|
17
22
|
kind,
|
|
18
23
|
id
|
|
@@ -304,4 +309,4 @@ var HttpTransport = class {
|
|
|
304
309
|
}
|
|
305
310
|
};
|
|
306
311
|
//#endregion
|
|
307
|
-
export {
|
|
312
|
+
export { getRealtimeBoardRoom as C, normalizeRealtimeRooms as E, WS_ROOM_SUBSCRIPTION_CAPABILITY as S, getSessionTurnPatchStreamKey as T, REALTIME_ROOM_EVENT_NAME_PATTERN as _, COHUB_SOURCE_HEADER as a, WS_COMPACT_STREAM_CAPABILITY as b, hasRequestSourceIdentity as c, mergeRequestSourceIntoMeta as d, normalizeRequestSource as f, resolveRequestSourceChannel as g, requestSourceToHeaders as h, sanitizeAccessToken as i, isRequestSourceEmpty as l, readRequestSourceFromEnv as m, HttpTransport as n, COHUB_SOURCE_HEADER_NAMES as o, parseRequestSourceFromHeaders as p, joinApiUrl as r, REQUEST_SOURCE_VIA_MAX_LENGTH as s, HttpError as t, isRequestSourceUuid as u, REALTIME_ROOM_MAX_PAYLOAD_BYTES as v, getRealtimeSpaceRoom as w, WS_REALTIME_ROOM_CAPABILITY as x, WS_BOARD_AWARENESS_CAPABILITY as y };
|
|
@@ -1277,19 +1277,156 @@ type BoardAwarenessGesture = z.infer<typeof BoardAwarenessGestureSchema>;
|
|
|
1277
1277
|
type BoardAwarenessUpdate = z.infer<typeof BoardAwarenessUpdateSchema>;
|
|
1278
1278
|
//#endregion
|
|
1279
1279
|
//#region ../protocol/dist/realtime/types.d.ts
|
|
1280
|
-
type RealtimeRoom = `space:${string}` | `user:${string}` | `board:${string}`;
|
|
1280
|
+
type RealtimeRoom = `space:${string}` | `user:${string}` | `board:${string}` | `room:${string}`;
|
|
1281
1281
|
type RealtimeEnvelope = {
|
|
1282
1282
|
id: string;
|
|
1283
1283
|
timestamp: number;
|
|
1284
|
-
domain: "system" | "session" | "space" | "label";
|
|
1284
|
+
domain: "system" | "session" | "space" | "label" | "room";
|
|
1285
1285
|
type: string;
|
|
1286
1286
|
requestId?: string | null;
|
|
1287
1287
|
spaceId?: string | null;
|
|
1288
1288
|
sessionId?: string | null;
|
|
1289
|
+
roomId?: string | null;
|
|
1289
1290
|
rooms?: RealtimeRoom[];
|
|
1290
1291
|
payload: Record<string, unknown>;
|
|
1291
1292
|
};
|
|
1292
1293
|
type ChannelEnvelope = RealtimeEnvelope;
|
|
1294
|
+
type RealtimeRoomDescriptor = {
|
|
1295
|
+
id: string;
|
|
1296
|
+
code: string;
|
|
1297
|
+
createdAt: string;
|
|
1298
|
+
expiresAt: string;
|
|
1299
|
+
maxParticipants: number;
|
|
1300
|
+
/**
|
|
1301
|
+
* When true a viewer holds at most one seat: rejoining from another tab, or
|
|
1302
|
+
* after an unclean disconnect, takes over the existing seat instead of
|
|
1303
|
+
* consuming a second one. Default false, which gives every connection its own
|
|
1304
|
+
* seat (two tabs are two participants).
|
|
1305
|
+
*/
|
|
1306
|
+
seatPerUser: boolean;
|
|
1307
|
+
};
|
|
1308
|
+
type RealtimeRoomMember = {
|
|
1309
|
+
participantId: string;
|
|
1310
|
+
joinedAt: string;
|
|
1311
|
+
presence: Record<string, unknown> | null;
|
|
1312
|
+
/**
|
|
1313
|
+
* Opaque, stable per room and viewer. Connections of the same viewer share it,
|
|
1314
|
+
* so an application can group or de-duplicate participants without seeing the
|
|
1315
|
+
* underlying account id.
|
|
1316
|
+
*/
|
|
1317
|
+
userKey?: string;
|
|
1318
|
+
};
|
|
1319
|
+
type RealtimeRoomEvent = {
|
|
1320
|
+
id: string;
|
|
1321
|
+
timestamp: number;
|
|
1322
|
+
domain: "room";
|
|
1323
|
+
type: "realtime.room.event";
|
|
1324
|
+
requestId?: string | null;
|
|
1325
|
+
spaceId?: null;
|
|
1326
|
+
sessionId?: null;
|
|
1327
|
+
rooms: RealtimeRoom[];
|
|
1328
|
+
payload: {
|
|
1329
|
+
roomId: string;
|
|
1330
|
+
sequence: number;
|
|
1331
|
+
event: string;
|
|
1332
|
+
data: unknown;
|
|
1333
|
+
clientEventId: string | null;
|
|
1334
|
+
sender: {
|
|
1335
|
+
participantId: string;
|
|
1336
|
+
};
|
|
1337
|
+
};
|
|
1338
|
+
};
|
|
1339
|
+
type RealtimeRoomJoinedEvent = {
|
|
1340
|
+
id: string;
|
|
1341
|
+
timestamp: number;
|
|
1342
|
+
domain: "room";
|
|
1343
|
+
type: "realtime.room.joined";
|
|
1344
|
+
requestId?: string | null;
|
|
1345
|
+
spaceId?: null;
|
|
1346
|
+
sessionId?: null;
|
|
1347
|
+
rooms: RealtimeRoom[];
|
|
1348
|
+
payload: {
|
|
1349
|
+
room: RealtimeRoomDescriptor;
|
|
1350
|
+
participantId: string;
|
|
1351
|
+
members: RealtimeRoomMember[];
|
|
1352
|
+
sequence: number;
|
|
1353
|
+
};
|
|
1354
|
+
};
|
|
1355
|
+
type RealtimeRoomMemberChangedEvent = {
|
|
1356
|
+
id: string;
|
|
1357
|
+
timestamp: number;
|
|
1358
|
+
domain: "room";
|
|
1359
|
+
type: "realtime.room.member.joined" | "realtime.room.member.left";
|
|
1360
|
+
requestId?: string | null;
|
|
1361
|
+
spaceId?: null;
|
|
1362
|
+
sessionId?: null;
|
|
1363
|
+
rooms: RealtimeRoom[];
|
|
1364
|
+
payload: {
|
|
1365
|
+
roomId: string;
|
|
1366
|
+
sequence: number;
|
|
1367
|
+
member: RealtimeRoomMember;
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
type RealtimeRoomPresenceUpdatedEvent = {
|
|
1371
|
+
id: string;
|
|
1372
|
+
timestamp: number;
|
|
1373
|
+
domain: "room";
|
|
1374
|
+
type: "realtime.room.presence.updated";
|
|
1375
|
+
requestId?: string | null;
|
|
1376
|
+
spaceId?: null;
|
|
1377
|
+
sessionId?: null;
|
|
1378
|
+
rooms: RealtimeRoom[];
|
|
1379
|
+
payload: {
|
|
1380
|
+
roomId: string;
|
|
1381
|
+
sequence: number;
|
|
1382
|
+
member: RealtimeRoomMember;
|
|
1383
|
+
};
|
|
1384
|
+
};
|
|
1385
|
+
type RealtimeRoomRequestEvent = {
|
|
1386
|
+
id: string;
|
|
1387
|
+
timestamp: number;
|
|
1388
|
+
domain: "room";
|
|
1389
|
+
type: "realtime.room.request.ok";
|
|
1390
|
+
requestId?: string | null;
|
|
1391
|
+
spaceId?: null;
|
|
1392
|
+
sessionId?: null;
|
|
1393
|
+
roomId?: string | null;
|
|
1394
|
+
payload: {
|
|
1395
|
+
roomId: string;
|
|
1396
|
+
sequence?: number;
|
|
1397
|
+
eventId?: string | null;
|
|
1398
|
+
clientEventId?: string | null;
|
|
1399
|
+
};
|
|
1400
|
+
};
|
|
1401
|
+
type RealtimeRoomRequestErrorEvent = {
|
|
1402
|
+
id: string;
|
|
1403
|
+
timestamp: number;
|
|
1404
|
+
domain: "room";
|
|
1405
|
+
type: "realtime.room.request.error";
|
|
1406
|
+
requestId?: string | null;
|
|
1407
|
+
spaceId?: null;
|
|
1408
|
+
sessionId?: null;
|
|
1409
|
+
roomId?: string | null;
|
|
1410
|
+
payload: {
|
|
1411
|
+
roomId: string;
|
|
1412
|
+
code: string;
|
|
1413
|
+
message: string;
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
type RealtimeRoomClosedEvent = {
|
|
1417
|
+
id: string;
|
|
1418
|
+
timestamp: number;
|
|
1419
|
+
domain: "room";
|
|
1420
|
+
type: "realtime.room.closed";
|
|
1421
|
+
requestId?: string | null;
|
|
1422
|
+
spaceId?: null;
|
|
1423
|
+
sessionId?: null;
|
|
1424
|
+
rooms: RealtimeRoom[];
|
|
1425
|
+
payload: {
|
|
1426
|
+
roomId: string;
|
|
1427
|
+
reason: "expired" | "left" | "revoked" | "superseded";
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1293
1430
|
type SystemReadyEvent = {
|
|
1294
1431
|
id: string;
|
|
1295
1432
|
timestamp: number;
|
|
@@ -1313,6 +1450,7 @@ type SystemAuthOkEvent = {
|
|
|
1313
1450
|
payload: {
|
|
1314
1451
|
connectionId: string;
|
|
1315
1452
|
user: Record<string, unknown>;
|
|
1453
|
+
capabilities?: string[];
|
|
1316
1454
|
};
|
|
1317
1455
|
};
|
|
1318
1456
|
type SystemRequestErrorEvent = {
|
|
@@ -1791,7 +1929,7 @@ type LabelAssignmentsUpdatedEvent = {
|
|
|
1791
1929
|
affectedLabelIds: string[];
|
|
1792
1930
|
};
|
|
1793
1931
|
};
|
|
1794
|
-
type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent | BoardTransactionAppliedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent | WorkVersionPublishedEvent | TaskCreatedEvent | TaskUpdatedEvent | LabelAssignmentsUpdatedEvent;
|
|
1932
|
+
type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent | BoardTransactionAppliedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent | WorkVersionPublishedEvent | TaskCreatedEvent | TaskUpdatedEvent | LabelAssignmentsUpdatedEvent | RealtimeRoomEvent | RealtimeRoomJoinedEvent | RealtimeRoomMemberChangedEvent | RealtimeRoomPresenceUpdatedEvent | RealtimeRoomRequestEvent | RealtimeRoomRequestErrorEvent | RealtimeRoomClosedEvent;
|
|
1795
1933
|
//#endregion
|
|
1796
1934
|
//#region ../../node_modules/.pnpm/@neta-art+generation@0.1.18/node_modules/@neta-art/generation/dist/builtins-8R5iZQ10.d.ts
|
|
1797
1935
|
//#region src/types.d.ts
|
|
@@ -3474,6 +3612,7 @@ type WebsocketClientEvents = {
|
|
|
3474
3612
|
auth: {
|
|
3475
3613
|
connectionId: string;
|
|
3476
3614
|
user: Record<string, unknown>;
|
|
3615
|
+
capabilities: string[];
|
|
3477
3616
|
};
|
|
3478
3617
|
messageAccepted: {
|
|
3479
3618
|
requestId?: string | null;
|
|
@@ -3537,8 +3676,10 @@ declare class WebsocketClient {
|
|
|
3537
3676
|
private readonly compactStreamContexts;
|
|
3538
3677
|
private readonly patchStreamBuffers;
|
|
3539
3678
|
private readonly roomSubscriptions;
|
|
3679
|
+
private readonly serverCapabilities;
|
|
3540
3680
|
state: WebsocketClientState;
|
|
3541
3681
|
connectionId: string | null;
|
|
3682
|
+
supportsCapability(capability: string): boolean;
|
|
3542
3683
|
private readonly listeners;
|
|
3543
3684
|
constructor(options?: WebsocketClientOptions);
|
|
3544
3685
|
on<K extends keyof WebsocketClientEvents>(type: K, handler: EventHandler<WebsocketClientEvents[K]>): () => void;
|
|
@@ -3559,6 +3700,27 @@ declare class WebsocketClient {
|
|
|
3559
3700
|
update: BoardAwarenessUpdate;
|
|
3560
3701
|
requestId?: string;
|
|
3561
3702
|
}): Promise<void>;
|
|
3703
|
+
joinRealtimeRoom(input: {
|
|
3704
|
+
roomId: string;
|
|
3705
|
+
ticket: string;
|
|
3706
|
+
requestId?: string;
|
|
3707
|
+
}): Promise<void>;
|
|
3708
|
+
publishRealtimeRoom(input: {
|
|
3709
|
+
roomId: string;
|
|
3710
|
+
event: string;
|
|
3711
|
+
data: unknown;
|
|
3712
|
+
clientEventId?: string;
|
|
3713
|
+
requestId?: string;
|
|
3714
|
+
}): Promise<void>;
|
|
3715
|
+
leaveRealtimeRoom(input: {
|
|
3716
|
+
roomId: string;
|
|
3717
|
+
requestId?: string;
|
|
3718
|
+
}): Promise<void>;
|
|
3719
|
+
updateRealtimeRoomPresence(input: {
|
|
3720
|
+
roomId: string;
|
|
3721
|
+
presence: Record<string, unknown> | null;
|
|
3722
|
+
requestId?: string;
|
|
3723
|
+
}): Promise<void>;
|
|
3562
3724
|
sendMessage(input: {
|
|
3563
3725
|
spaceId: string;
|
|
3564
3726
|
sessionId: string;
|
|
@@ -3596,4 +3758,4 @@ declare class WebsocketClient {
|
|
|
3596
3758
|
}
|
|
3597
3759
|
declare const createWebsocketClient: (options?: WebsocketClientOptions) => WebsocketClient;
|
|
3598
3760
|
//#endregion
|
|
3599
|
-
export { CreateSpacePromptInput as $,
|
|
3761
|
+
export { CreateSpacePromptInput as $, BoardRenderCost as $i, SpaceFsTreeResponse as $n, findGenerationModelPolicy as $r, ReferralReward as $t, BillingProductDisplay as A, readRequestSourceFromEnv as Aa, BoardCapabilities as Ai, SpaceCommerceProductCreditBenefit as An, SpaceUsageResponse as Ar, ModelCatalogEntry as At, CheckpointDiffFile as B, BoardNodeRecord as Bi, SpaceFsCreateDirectoryInput as Bn, ChannelHealth as Br, PublicUserSpaceItem as Bt, BillingCreditStatus as C, RequestSourceVia as Ca, BoardAwarenessUpdate as Ci, SpaceCommerceBenefit as Cn, SpaceSandboxConfig as Cr, LabelItemsSessionFork as Ct, BillingPluginStatus as D, mergeRequestSourceIntoMeta as Da, WorkContentKind as Di, SpaceCommerceOrder as Dn, SpaceTurnListItem as Dr, LabelScopeType as Dt, BillingPaymentStatus as E, isRequestSourceUuid as Ea, WorkBoardAsset as Ei, SpaceCommerceFeatureBenefit as En, SpaceTurnAuthorFilter as Er, LabelResourceType as Et, BillingSubscriptionHistoryList as F, BoardEffect as Fi, SpaceCreateResponse as Fn, UserRulesResponse as Fr, PromptTemplateCatalogEntry as Ft, CheckpointDiffStatus as G, BoardPlaybackSnapshot as Gi, SpaceFsEntry as Gn, GenerationModelPolicy as Gr, ReferenceDirection as Gt, CheckpointDiffPatchKind as H, BoardPlaybackCommand as Hi, SpaceFsCreateUploadResponse as Hn, ChannelRuntimeState as Hr, ReferenceAggregateGroup as Ht, BillingSubscriptionHistoryStatus as I, BoardInspectInput as Ii, SpaceDefaultResponse as In, UserSessionListItem as Ir, PromptTemplateCatalogResponse as It, ClaimReferralResponse as J, BoardTarget as Ji, SpaceFsMoveInput as Jn, GenerationPolicyError as Jr, ReferenceQueryableType as Jt, CheckpointDiffSummary as K, BoardRecord as Ki, SpaceFsFileKind as Kn, GenerationParameterConstraint as Kr, ReferenceKind as Kt, BillingSubscriptionSummary as L, BoardKeyframe as Li, SpaceEnvInput as Ln, UserSessionSpaceSummary as Lr, PublicReferral as Lt, BillingProductPricing as M, resolveRequestSourceChannel as Ma, BoardCreateInput as Mi, SpaceConfigInput as Mn, TaskRunDetailResponse as Mr, PatchResourceLabelsResponse as Mt, BillingRedemptionResult as N, BoardDeleteReason as Ni, SpaceConfigResponse as Nn, TaskRunRecord as Nr, Permission as Nt, BillingProductBillingInterval as O, normalizeRequestSource as Oa, BoardAssetRef as Oi, SpaceCommerceProduct as On, SpaceTurnsResponse as Or, LabelSource as Ot, BillingResponsePayload as P, BoardDiagnostic as Pi, SpaceConfigUpdateResponse as Pn, UserProfile as Pr, PromptAccessMode as Pt, CreateSpaceModInput as Q, BoardCapability as Qi, SpaceFsReadFilesResponse as Qn, filterGenerationDeclarationsByPolicy as Qr, ReferralListItem as Qt, Channel as R, BoardManifest as Ri, SpaceFsCompleteUploadInput as Rn, UserSessionsResponse as Rr, PublicUserPageResponse as Rt, BillingCreditGrantStatus as S, RequestSource as Sa, BoardAwarenessStateUpdate as Si, SpaceCheckpointDetailResponse as Sn, SpaceSandboxAutoDestroyPolicy as Sr, LabelItemsResponse as St, BillingHistoryPagination as T, isRequestSourceEmpty as Ta, WorkBoardArtifactManifest as Ti, SpaceCommerceCreditsBenefit as Tn, SpaceSessionsResponse as Tr, LabelRecord as Tt, CheckpointDiffPatchLine as U, BoardPlaybackPolicy as Ui, SpaceFsDeleteNodeInput as Un, DiscordChannelConfig as Ur, ReferenceAggregateGroupBy as Ut, CheckpointDiffFileResponse as V, BoardOperation as Vi, SpaceFsCreateUploadInput as Vn, ChannelHealthReasonCode as Vr, PublicUserWorkItem as Vt, CheckpointDiffStats as W, BoardPlaybackPolicySchema as Wi, SpaceFsEncoding as Wn, FeishuChannelConfig as Wr, ReferenceAggregateResponse as Wt, CreateInvitationResponse as X, BoardValidationResult as Xi, SpaceFsReadFilesError as Xn, decodeGenerationPolicy as Xr, ReferenceResourceType as Xt, CreateInvitationInput as Y, BoardTransaction as Yi, SpaceFsPreparingFile as Yn, assertGenerationRequestAllowedByPolicy as Yr, ReferenceRecord as Yt, CreateSpaceInput as Z, parseBoardPlaybackPolicy as Zi, SpaceFsReadFilesInput as Zn, encodeGenerationPolicy as Zr, ReferralDashboard as Zt, BillingCatalogProduct as _, BillingPayload as _a, RealtimeWorkVersionRecord as _i, SkillCatalogSource as _n, SpacePresenceSnapshot as _r, JsonPrimitive as _t, WebsocketClientOptions as a, SessionTurnRecord as aa, GenerationResult as ai, SessionMessageResponse as an, SpaceFsUploadProgress as ar, CursorPageInfo as at, BillingConversionIntent as b, COHUB_SOURCE_HEADER_NAMES as ba, BoardAwarenessGesture as bi, SpaceBootstrapSource as bn, SpaceRecord as br, LabelAssignmentPageInfo as bt, createWebsocketClient as c, CompletionMessage as ca, BoardTransactionAppliedEvent as ci, SessionRecord as cn, SpaceInvitation as cr, ExploreSpacesResponse as ct, BatchUserProfilesResponse as d, CompletionUsage as da, RealtimePatchOperation as di, SessionTurnSignedUrlsResponse as dn, SpaceListItem as dr, GenerationUsageSummary as dt, SpacePublicEndpoints as ea, getAllowedGenerationModelIds as ei, ReferralStatus as en, SpaceFsUploadDestination as er, CreateSpacePromptResponse as et, BillingBalanceActivity as f, CreateSpaceCompletionInput as fa, RealtimeRoomDescriptor as fi, SessionTurnStreamSnapshotResponse as fn, SpaceMember as fr, GlobalSearchResponse as ft, BillingCatalog as g, Usage as ga, RealtimeWorkRecord as gi, SkillCatalogResponse as gn, SpacePendingDiffSummary as gr, JsonObject as gt, BillingBalanceActivityStatus as h, SpaceCompletionStreamEvent as ha, RealtimeServerEvent as hi, SkillCatalogEntry as hn, SpacePendingDiffFileResponse as hr, InvitationDetail as ht, WebsocketClientEvents as i, SessionTurnIndexItem as ia, GenerationModelDeclaration as ii, SessionBindingRecord as in, SpaceFsUploadPlanEntryInput as ir, CronJobUpdatePatch as it, BillingProductKind as j, requestSourceToHeaders as ja, BoardClip as ji, SpaceConfig as jn, SpaceUsageSummary as jr, PatchResourceLabelsInput as jt, BillingProductCreditBenefit as k, parseRequestSourceFromHeaders as ka, BoardBootstrap as ki, SpaceCommerceProductBenefitBinding as kn, SpaceUsageHourlyStat as kr, MeResponse as kt, AcceptInvitationResponse as l, CompletionMessageRole as la, ChannelEnvelope as li, SessionTurnIndexResponse as ln, SpaceInvitationListResponse as lr, GenerationUsageBlock as lt, BillingBalanceActivityList as m, SpaceCompletionResult as ma, RealtimeRoomMember as mi, SessionTurnsPaginatedResponse as mn, SpaceModListItem as mr, GlobalSearchType as mt, WebSocketLike as n, SessionForkRecord as na, parseGenerationPolicyFromEnv as ni, SandboxSpecId as nn, SpaceFsUploadError as nr, CronJobPayload as nt, WebsocketClientState as o, SpaceTurnsResponse$1 as oa, BoardAwarenessUpdatedEvent as oi, SessionMessagesPaginatedResponse as on, SpaceFsUploadResponse as or, ExploreSection as ot, BillingBalanceActivityKind as p, ModelThinkingLevel as pa, RealtimeRoomEvent as pi, SessionTurnWindowResponse as pn, SpaceMeta as pr, GlobalSearchResult as pt, CheckpointRecord as q, BoardSequence as qi, SpaceFsFileResponse as qn, GenerationPolicy as qr, ReferenceQueryResponse as qt, WebsocketClient as r, SessionTurnSegmentRecord as ra, GenerationContentBlock as ri, SendMessageCronJobPayload as rn, SpaceFsUploadPlanEntry as rr, CronJobRecord as rt, WebsocketEventPayload as s, CompletionAssistantMessage as sa, BoardPlaybackChangedEvent as si, SessionMessagesResponse as sn, SpaceFsWriteFileInput as sr, ExploreSpaceItem as st, WebSocketConstructor as t, MessageRecord as ta, normalizeGenerationPolicy as ti, ResourceLabelsResponse as tn, SpaceFsUploadEntry as tr, CreateSpaceSessionInput as tt, ApiError as u, CompletionThinkingLevel as ua, LabelAssignmentsUpdatedEvent as ui, SessionTurnResponse as un, SpaceInvitationLocation as ur, GenerationUsageHourlyStat as ut, BillingCheckoutActionState as v, ContentBlock as va, SessionTurnPatchEvent as vi, SpaceAccess as vn, SpacePresenceUser as vr, JsonValue as vt, BillingCreditUnit as w, hasRequestSourceIdentity as wa, WorkArtifactDescriptor as wi, SpaceCommerceBuyerProfile as wn, SpaceSandboxProvider as wr, LabelListItem as wt, BillingCreditExpiryGroup as x, REQUEST_SOURCE_VIA_MAX_LENGTH as xa, BoardAwarenessNodePreview as xi, SpaceChannelBindingInput as xn, SpaceRole as xr, LabelAssignmentRecord as xt, BillingCheckoutResult as y, COHUB_SOURCE_HEADER as ya, WorkVersionPublishedEvent as yi, SpaceAccessPolicy as yn, SpacePublicProfile as yr, LabelAssignmentListItem as yt, CheckpointDiffDelivery as z, BoardNodeInput as zi, SpaceFsCompleteUploadResponse as zn, ChannelConfig as zr, PublicUserProfile as zt };
|
package/dist/chunks/websocket.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as normalizeRealtimeRooms, S as WS_ROOM_SUBSCRIPTION_CAPABILITY, T as getSessionTurnPatchStreamKey, b as WS_COMPACT_STREAM_CAPABILITY, t as HttpError, w as getRealtimeSpaceRoom, x as WS_REALTIME_ROOM_CAPABILITY, y as WS_BOARD_AWARENESS_CAPABILITY } from "./transport.js";
|
|
2
2
|
import { c as resolveWebsocketUrl } from "./environment.js";
|
|
3
3
|
//#region src/http-error.ts
|
|
4
4
|
/** Shared HTTP error code for every plan entitlement gate (402). */
|
|
@@ -88,7 +88,7 @@ const isRealtimeEnvelope = (value) => {
|
|
|
88
88
|
if (!isRecord(value)) return false;
|
|
89
89
|
if (typeof value.id !== "string") return false;
|
|
90
90
|
if (typeof value.timestamp !== "number") return false;
|
|
91
|
-
if (value.domain !== "system" && value.domain !== "session" && value.domain !== "space" && value.domain !== "label") return false;
|
|
91
|
+
if (value.domain !== "system" && value.domain !== "session" && value.domain !== "space" && value.domain !== "label" && value.domain !== "room") return false;
|
|
92
92
|
if (typeof value.type !== "string") return false;
|
|
93
93
|
if (!isRecord(value.payload)) return false;
|
|
94
94
|
return true;
|
|
@@ -157,8 +157,12 @@ var WebsocketClient = class {
|
|
|
157
157
|
compactStreamContexts = /* @__PURE__ */ new Map();
|
|
158
158
|
patchStreamBuffers = /* @__PURE__ */ new Map();
|
|
159
159
|
roomSubscriptions = /* @__PURE__ */ new Map();
|
|
160
|
+
serverCapabilities = /* @__PURE__ */ new Set();
|
|
160
161
|
state = "idle";
|
|
161
162
|
connectionId = null;
|
|
163
|
+
supportsCapability(capability) {
|
|
164
|
+
return this.serverCapabilities.has(capability);
|
|
165
|
+
}
|
|
162
166
|
listeners = createEventMap();
|
|
163
167
|
constructor(options = {}) {
|
|
164
168
|
const normalized = normalizeOptions(options);
|
|
@@ -322,6 +326,49 @@ var WebsocketClient = class {
|
|
|
322
326
|
}
|
|
323
327
|
});
|
|
324
328
|
}
|
|
329
|
+
async joinRealtimeRoom(input) {
|
|
330
|
+
await this.ensureOpen();
|
|
331
|
+
this.send({
|
|
332
|
+
type: "realtime.room.join",
|
|
333
|
+
requestId: input.requestId,
|
|
334
|
+
payload: {
|
|
335
|
+
roomId: input.roomId,
|
|
336
|
+
ticket: input.ticket
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
async publishRealtimeRoom(input) {
|
|
341
|
+
await this.ensureOpen();
|
|
342
|
+
this.send({
|
|
343
|
+
type: "realtime.room.publish",
|
|
344
|
+
requestId: input.requestId,
|
|
345
|
+
payload: {
|
|
346
|
+
roomId: input.roomId,
|
|
347
|
+
event: input.event,
|
|
348
|
+
data: input.data,
|
|
349
|
+
clientEventId: input.clientEventId
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
async leaveRealtimeRoom(input) {
|
|
354
|
+
await this.ensureOpen();
|
|
355
|
+
this.send({
|
|
356
|
+
type: "realtime.room.leave",
|
|
357
|
+
requestId: input.requestId,
|
|
358
|
+
payload: { roomId: input.roomId }
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
async updateRealtimeRoomPresence(input) {
|
|
362
|
+
await this.ensureOpen();
|
|
363
|
+
this.send({
|
|
364
|
+
type: "realtime.room.presence.update",
|
|
365
|
+
requestId: input.requestId,
|
|
366
|
+
payload: {
|
|
367
|
+
roomId: input.roomId,
|
|
368
|
+
presence: input.presence
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
325
372
|
async sendMessage(input) {
|
|
326
373
|
await this.ensureOpen();
|
|
327
374
|
this.send({
|
|
@@ -424,7 +471,8 @@ var WebsocketClient = class {
|
|
|
424
471
|
capabilities: [
|
|
425
472
|
WS_COMPACT_STREAM_CAPABILITY,
|
|
426
473
|
WS_ROOM_SUBSCRIPTION_CAPABILITY,
|
|
427
|
-
WS_BOARD_AWARENESS_CAPABILITY
|
|
474
|
+
WS_BOARD_AWARENESS_CAPABILITY,
|
|
475
|
+
WS_REALTIME_ROOM_CAPABILITY
|
|
428
476
|
]
|
|
429
477
|
}
|
|
430
478
|
});
|
|
@@ -515,11 +563,15 @@ var WebsocketClient = class {
|
|
|
515
563
|
case "system.auth.ok": {
|
|
516
564
|
const connectionId = typeof envelope.payload.connectionId === "string" ? envelope.payload.connectionId : this.connectionId;
|
|
517
565
|
const user = envelope.payload.user && typeof envelope.payload.user === "object" ? envelope.payload.user : {};
|
|
566
|
+
const capabilities = Array.isArray(envelope.payload.capabilities) ? envelope.payload.capabilities.filter((value) => typeof value === "string") : [];
|
|
567
|
+
this.serverCapabilities.clear();
|
|
568
|
+
for (const capability of capabilities) this.serverCapabilities.add(capability);
|
|
518
569
|
if (connectionId) {
|
|
519
570
|
this.connectionId = connectionId;
|
|
520
571
|
this.emit("auth", {
|
|
521
572
|
connectionId,
|
|
522
|
-
user
|
|
573
|
+
user,
|
|
574
|
+
capabilities
|
|
523
575
|
});
|
|
524
576
|
}
|
|
525
577
|
this.resolveAuthWaiter();
|
package/dist/http.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as CreateSpacePromptInput, $i as
|
|
1
|
+
import { $ as CreateSpacePromptInput, $i as BoardRenderCost, $n as SpaceFsTreeResponse, $t as ReferralReward, A as BillingProductDisplay, Ai as BoardCapabilities, An as SpaceCommerceProductCreditBenefit, Ar as SpaceUsageResponse, At as ModelCatalogEntry, B as CheckpointDiffFile, Bi as BoardNodeRecord, Bn as SpaceFsCreateDirectoryInput, Br as ChannelHealth, Bt as PublicUserSpaceItem, C as BillingCreditStatus, Cn as SpaceCommerceBenefit, Cr as SpaceSandboxConfig, Ct as LabelItemsSessionFork, D as BillingPluginStatus, Dn as SpaceCommerceOrder, Dr as SpaceTurnListItem, Dt as LabelScopeType, E as BillingPaymentStatus, En as SpaceCommerceFeatureBenefit, Er as SpaceTurnAuthorFilter, Et as LabelResourceType, F as BillingSubscriptionHistoryList, Fi as BoardEffect, Fn as SpaceCreateResponse, Fr as UserRulesResponse, Ft as PromptTemplateCatalogEntry, G as CheckpointDiffStatus, Gi as BoardPlaybackSnapshot, Gn as SpaceFsEntry, Gt as ReferenceDirection, H as CheckpointDiffPatchKind, Hi as BoardPlaybackCommand, Hn as SpaceFsCreateUploadResponse, Hr as ChannelRuntimeState, Ht as ReferenceAggregateGroup, I as BillingSubscriptionHistoryStatus, Ii as BoardInspectInput, In as SpaceDefaultResponse, Ir as UserSessionListItem, It as PromptTemplateCatalogResponse, J as ClaimReferralResponse, Ji as BoardTarget, Jn as SpaceFsMoveInput, Jt as ReferenceQueryableType, K as CheckpointDiffSummary, Ki as BoardRecord, Kn as SpaceFsFileKind, Kt as ReferenceKind, L as BillingSubscriptionSummary, Li as BoardKeyframe, Ln as SpaceEnvInput, Lr as UserSessionSpaceSummary, Lt as PublicReferral, M as BillingProductPricing, Mi as BoardCreateInput, Mn as SpaceConfigInput, Mr as TaskRunDetailResponse, Mt as PatchResourceLabelsResponse, N as BillingRedemptionResult, Ni as BoardDeleteReason, Nn as SpaceConfigResponse, Nr as TaskRunRecord, Nt as Permission, O as BillingProductBillingInterval, Oi as BoardAssetRef, On as SpaceCommerceProduct, Or as SpaceTurnsResponse, Ot as LabelSource, P as BillingResponsePayload, Pi as BoardDiagnostic, Pn as SpaceConfigUpdateResponse, Pr as UserProfile, Pt as PromptAccessMode, Q as CreateSpaceModInput, Qi as BoardCapability, Qn as SpaceFsReadFilesResponse, Qt as ReferralListItem, R as Channel, Ri as BoardManifest, Rn as SpaceFsCompleteUploadInput, Rr as UserSessionsResponse, Rt as PublicUserPageResponse, S as BillingCreditGrantStatus, Sn as SpaceCheckpointDetailResponse, Sr as SpaceSandboxAutoDestroyPolicy, St as LabelItemsResponse, T as BillingHistoryPagination, Tn as SpaceCommerceCreditsBenefit, Tr as SpaceSessionsResponse, Tt as LabelRecord, U as CheckpointDiffPatchLine, Ui as BoardPlaybackPolicy, Un as SpaceFsDeleteNodeInput, Ur as DiscordChannelConfig, Ut as ReferenceAggregateGroupBy, V as CheckpointDiffFileResponse, Vi as BoardOperation, Vn as SpaceFsCreateUploadInput, Vr as ChannelHealthReasonCode, Vt as PublicUserWorkItem, W as CheckpointDiffStats, Wn as SpaceFsEncoding, Wr as FeishuChannelConfig, Wt as ReferenceAggregateResponse, X as CreateInvitationResponse, Xi as BoardValidationResult, Xn as SpaceFsReadFilesError, Xt as ReferenceResourceType, Y as CreateInvitationInput, Yi as BoardTransaction, Yn as SpaceFsPreparingFile, Yt as ReferenceRecord, Z as CreateSpaceInput, Zn as SpaceFsReadFilesInput, Zt as ReferralDashboard, _ as BillingCatalogProduct, _n as SkillCatalogSource, _r as SpacePresenceSnapshot, _t as JsonPrimitive, aa as SessionTurnRecord, ai as GenerationResult, an as SessionMessageResponse, ar as SpaceFsUploadProgress, at as CursorPageInfo, b as BillingConversionIntent, bn as SpaceBootstrapSource, br as SpaceRecord, bt as LabelAssignmentPageInfo, ca as CompletionMessage, cn as SessionRecord, cr as SpaceInvitation, ct as ExploreSpacesResponse, d as BatchUserProfilesResponse, da as CompletionUsage, dn as SessionTurnSignedUrlsResponse, dr as SpaceListItem, dt as GenerationUsageSummary, en as ReferralStatus, er as SpaceFsUploadDestination, et as CreateSpacePromptResponse, f as BillingBalanceActivity, fa as CreateSpaceCompletionInput, fn as SessionTurnStreamSnapshotResponse, fr as SpaceMember, ft as GlobalSearchResponse, g as BillingCatalog, gn as SkillCatalogResponse, gr as SpacePendingDiffSummary, gt as JsonObject, h as BillingBalanceActivityStatus, ha as SpaceCompletionStreamEvent, hn as SkillCatalogEntry, hr as SpacePendingDiffFileResponse, ht as InvitationDetail, ia as SessionTurnIndexItem, in as SessionBindingRecord, ir as SpaceFsUploadPlanEntryInput, it as CronJobUpdatePatch, j as BillingProductKind, ji as BoardClip, jn as SpaceConfig, jr as SpaceUsageSummary, jt as PatchResourceLabelsInput, k as BillingProductCreditBenefit, ki as BoardBootstrap, kn as SpaceCommerceProductBenefitBinding, kr as SpaceUsageHourlyStat, kt as MeResponse, l as AcceptInvitationResponse, la as CompletionMessageRole, ln as SessionTurnIndexResponse, lr as SpaceInvitationListResponse, lt as GenerationUsageBlock, m as BillingBalanceActivityList, ma as SpaceCompletionResult, mn as SessionTurnsPaginatedResponse, mr as SpaceModListItem, mt as GlobalSearchType, na as SessionForkRecord, nn as SandboxSpecId, nr as SpaceFsUploadError, nt as CronJobPayload, on as SessionMessagesPaginatedResponse, or as SpaceFsUploadResponse, ot as ExploreSection, p as BillingBalanceActivityKind, pa as ModelThinkingLevel, pn as SessionTurnWindowResponse, pr as SpaceMeta, pt as GlobalSearchResult, q as CheckpointRecord, qi as BoardSequence, qn as SpaceFsFileResponse, qr as GenerationPolicy, qt as ReferenceQueryResponse, ra as SessionTurnSegmentRecord, ri as GenerationContentBlock, rn as SendMessageCronJobPayload, rr as SpaceFsUploadPlanEntry, rt as CronJobRecord, sa as CompletionAssistantMessage, sn as SessionMessagesResponse, sr as SpaceFsWriteFileInput, st as ExploreSpaceItem, ta as MessageRecord, tn as ResourceLabelsResponse, tr as SpaceFsUploadEntry, tt as CreateSpaceSessionInput, u as ApiError, ua as CompletionThinkingLevel, un as SessionTurnResponse, ur as SpaceInvitationLocation, ut as GenerationUsageHourlyStat, v as BillingCheckoutActionState, va as ContentBlock, vn as SpaceAccess, vr as SpacePresenceUser, vt as JsonValue, w as BillingCreditUnit, wn as SpaceCommerceBuyerProfile, wr as SpaceSandboxProvider, wt as LabelListItem, x as BillingCreditExpiryGroup, xn as SpaceChannelBindingInput, xr as SpaceRole, xt as LabelAssignmentRecord, y as BillingCheckoutResult, yn as SpaceAccessPolicy, yr as SpacePublicProfile, yt as LabelAssignmentListItem, z as CheckpointDiffDelivery, zi as BoardNodeInput, zn as SpaceFsCompleteUploadResponse, zr as ChannelConfig, zt as PublicUserProfile } from "./chunks/websocket.js";
|
|
2
2
|
import { Gt as HttpError, Kt as HttpTransport, Ut as CohubClientOptions, Wt as Fetch, _n as ModelStatusResponse, dn as CreateGenerationTaskResponse, fn as GenerationTaskResult, gn as ModelStatusEntry, hn as PublicGenerationDeclaration, ln as SpaceStartupResponse, mn as ListGenerationModelsResponse, n as createHttpClient, pn as GenerationUsageBilling, t as CohubHttpClient, un as CreateGenerationTaskRequest } from "./chunks/http.js";
|
|
3
3
|
export { AcceptInvitationResponse, ApiError, BatchUserProfilesResponse, BillingBalanceActivity, BillingBalanceActivityKind, BillingBalanceActivityList, BillingBalanceActivityStatus, BillingCatalog, BillingCatalogProduct, BillingCheckoutActionState, BillingCheckoutResult, BillingConversionIntent, BillingCreditExpiryGroup, BillingCreditGrantStatus, BillingCreditStatus, BillingCreditUnit, BillingHistoryPagination, BillingPaymentStatus, BillingPluginStatus, BillingProductBillingInterval, BillingProductCreditBenefit, BillingProductDisplay, BillingProductKind, BillingProductPricing, BillingRedemptionResult, BillingResponsePayload, BillingSubscriptionHistoryList, BillingSubscriptionHistoryStatus, BillingSubscriptionSummary, type BoardAssetRef, type BoardBootstrap, type BoardCapabilities, type BoardCapability, type BoardClip, type BoardCreateInput, type BoardDeleteReason, type BoardDiagnostic, type BoardEffect, type BoardInspectInput, type BoardKeyframe, type BoardManifest, type BoardNodeInput, type BoardNodeRecord, type BoardOperation, type BoardPlaybackCommand, type BoardPlaybackPolicy, type BoardPlaybackSnapshot, type BoardRecord, type BoardRenderCost, type BoardSequence, type BoardTarget, type BoardTransaction, type BoardValidationResult, Channel, type ChannelConfig, type ChannelHealth, type ChannelHealthReasonCode, type ChannelRuntimeState, CheckpointDiffDelivery, CheckpointDiffFile, CheckpointDiffFileResponse, CheckpointDiffPatchKind, CheckpointDiffPatchLine, CheckpointDiffStats, CheckpointDiffStatus, CheckpointDiffSummary, CheckpointRecord, ClaimReferralResponse, type CohubClientOptions, CohubHttpClient, type CompletionAssistantMessage, type CompletionMessage, type CompletionMessageRole, type CompletionThinkingLevel, type CompletionUsage, type ContentBlock, type CreateGenerationTaskRequest, type CreateGenerationTaskResponse, CreateInvitationInput, CreateInvitationResponse, type CreateSpaceCompletionInput, CreateSpaceInput, CreateSpaceModInput, CreateSpacePromptInput, CreateSpacePromptResponse, CreateSpaceSessionInput, CronJobPayload, CronJobRecord, CronJobUpdatePatch, CursorPageInfo, type DiscordChannelConfig, ExploreSection, ExploreSpaceItem, ExploreSpacesResponse, type FeishuChannelConfig, type Fetch, type GenerationContentBlock, type GenerationPolicy, type GenerationResult, type GenerationTaskResult, type GenerationUsageBilling, GenerationUsageBlock, GenerationUsageHourlyStat, GenerationUsageSummary, GlobalSearchResponse, GlobalSearchResult, GlobalSearchType, HttpError, HttpTransport, InvitationDetail, JsonObject, JsonPrimitive, JsonValue, LabelAssignmentListItem, LabelAssignmentPageInfo, LabelAssignmentRecord, LabelItemsResponse, LabelItemsSessionFork, LabelListItem, LabelRecord, LabelResourceType, LabelScopeType, LabelSource, type ListGenerationModelsResponse, MeResponse, type MessageRecord, ModelCatalogEntry, type ModelStatusEntry, type ModelStatusResponse, type ModelThinkingLevel, PatchResourceLabelsInput, PatchResourceLabelsResponse, Permission, PromptAccessMode, PromptTemplateCatalogEntry, PromptTemplateCatalogResponse, type PublicGenerationDeclaration, PublicReferral, PublicUserPageResponse, PublicUserProfile, PublicUserSpaceItem, PublicUserWorkItem, ReferenceAggregateGroup, ReferenceAggregateGroupBy, ReferenceAggregateResponse, ReferenceDirection, ReferenceKind, ReferenceQueryResponse, ReferenceQueryableType, ReferenceRecord, ReferenceResourceType, ReferralDashboard, ReferralListItem, ReferralReward, ReferralStatus, ResourceLabelsResponse, SandboxSpecId, SendMessageCronJobPayload, SessionBindingRecord, type SessionForkRecord, SessionMessageResponse, SessionMessagesPaginatedResponse, SessionMessagesResponse, SessionRecord, type SessionTurnIndexItem, SessionTurnIndexResponse, type SessionTurnRecord, SessionTurnResponse, type SessionTurnSegmentRecord, SessionTurnSignedUrlsResponse, SessionTurnStreamSnapshotResponse, SessionTurnWindowResponse, SessionTurnsPaginatedResponse, SkillCatalogEntry, SkillCatalogResponse, SkillCatalogSource, SpaceAccess, SpaceAccessPolicy, SpaceBootstrapSource, SpaceChannelBindingInput, SpaceCheckpointDetailResponse, SpaceCommerceBenefit, SpaceCommerceBuyerProfile, SpaceCommerceCreditsBenefit, SpaceCommerceFeatureBenefit, SpaceCommerceOrder, SpaceCommerceProduct, SpaceCommerceProductBenefitBinding, SpaceCommerceProductCreditBenefit, type SpaceCompletionResult, type SpaceCompletionStreamEvent, SpaceConfig, SpaceConfigInput, SpaceConfigResponse, SpaceConfigUpdateResponse, SpaceCreateResponse, SpaceDefaultResponse, SpaceEnvInput, SpaceFsCompleteUploadInput, SpaceFsCompleteUploadResponse, SpaceFsCreateDirectoryInput, SpaceFsCreateUploadInput, SpaceFsCreateUploadResponse, SpaceFsDeleteNodeInput, SpaceFsEncoding, SpaceFsEntry, SpaceFsFileKind, SpaceFsFileResponse, SpaceFsMoveInput, SpaceFsPreparingFile, SpaceFsReadFilesError, SpaceFsReadFilesInput, SpaceFsReadFilesResponse, SpaceFsTreeResponse, SpaceFsUploadDestination, SpaceFsUploadEntry, SpaceFsUploadError, SpaceFsUploadPlanEntry, SpaceFsUploadPlanEntryInput, SpaceFsUploadProgress, SpaceFsUploadResponse, SpaceFsWriteFileInput, SpaceInvitation, SpaceInvitationListResponse, SpaceInvitationLocation, SpaceListItem, SpaceMember, SpaceMeta, SpaceModListItem, SpacePendingDiffFileResponse, SpacePendingDiffSummary, SpacePresenceSnapshot, SpacePresenceUser, SpacePublicProfile, SpaceRecord, SpaceRole, SpaceSandboxAutoDestroyPolicy, SpaceSandboxConfig, SpaceSandboxProvider, SpaceSessionsResponse, type SpaceStartupResponse, SpaceTurnAuthorFilter, SpaceTurnListItem, SpaceTurnsResponse, SpaceUsageHourlyStat, SpaceUsageResponse, SpaceUsageSummary, TaskRunDetailResponse, TaskRunRecord, UserProfile, UserRulesResponse, UserSessionListItem, UserSessionSpaceSummary, UserSessionsResponse, createHttpClient };
|