@neta-art/cohub 2.15.0 → 3.1.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 +56 -0
- package/dist/board.d.ts +99 -0
- package/dist/board.js +2 -0
- package/dist/chunks/board.d.ts +2589 -0
- package/dist/chunks/board.js +392 -0
- package/dist/chunks/http.d.ts +211 -54
- package/dist/chunks/http.js +202 -67
- package/dist/chunks/transport.js +4 -2
- package/dist/chunks/websocket.d.ts +394 -108
- package/dist/chunks/websocket.js +14 -13
- package/dist/http.d.ts +4 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/package.json +5 -1
package/dist/chunks/http.d.ts
CHANGED
|
@@ -1,40 +1,55 @@
|
|
|
1
|
+
import { a as BoardCreateInput, b as BoardTransaction, g as BoardPlaybackSnapshot, h as BoardPlaybackCommand, l as BoardInspectInput, n as BoardBootstrap, r as BoardCapabilities, x as BoardValidationResult } from "./board.js";
|
|
2
|
+
import { $ as CreateSpacePromptInput, $r as BoardPlaybackChangedEvent$1, Ar as UserSessionsResponse, At as ModelCatalogEntry, Bi as ContentBlock, Bn as SpaceFsCreateUploadResponse, Cn as SpaceCommerceBuyerProfile, Dn as SpaceCommerceProduct, Dr as UserRulesResponse, Ei as SessionForkRecord, En as SpaceCommerceOrder, Er as UserProfile, Et as LabelResourceType, Fi as CreateSpaceCompletionInput, Fn as SpaceDefaultResponse, Gn as SpaceFsMoveInput, Gt as ReferenceDirection, In as SpaceEnvInput, It as PromptTemplateCatalogResponse, J as ClaimReferralResponse, Jt as ReferenceQueryableType, K as CheckpointDiffSummary, Kn as SpaceFsPreparingFile, Kt as ReferenceKind, Li as SpaceCompletionResult, Ln as SpaceFsCompleteUploadInput, Lt as PublicReferral, Mn as SpaceConfigResponse, Mr as ChannelHealth, Mt as PatchResourceLabelsResponse, Nn as SpaceConfigUpdateResponse, Nt as Permission, On as SpaceCommerceProductBenefitBinding, Pn as SpaceCreateResponse, Qr as BoardAwarenessUpdatedEvent$1, R as Channel, Ri as SpaceCompletionStreamEvent, Rn as SpaceFsCompleteUploadResponse, Rt as PublicUserPageResponse, Sn as SpaceCommerceBenefit, Sr as SpaceUsageResponse, St as LabelItemsResponse, Ti as MessageRecord, Tr as TaskRunRecord, Ut as ReferenceAggregateGroupBy, V as CheckpointDiffFileResponse, Vi as BillingPayload, Wn as SpaceFsFileResponse, Wt as ReferenceAggregateResponse, X as CreateInvitationResponse, Xn as SpaceFsTreeResponse, Xr as GenerationModelDeclaration, Y as CreateInvitationInput, Yn as SpaceFsReadFilesResponse, Yr as GenerationContentBlock, Z as CreateSpaceInput, Zt as ReferralDashboard, a as WebsocketClientOptions, ai as SessionTurnPatchEvent, an as SessionMessageResponse, ar as SpaceInvitation, at as CursorPageInfo, bi as SpacePublicEndpoints, br as SpaceSessionsResponse, cn as SessionRecord, d as BatchUserProfilesResponse, dn as SessionTurnSignedUrlsResponse, dr as SpacePendingDiffSummary, ei as BoardTransactionAppliedEvent$1, et as CreateSpacePromptResponse, fn as SessionTurnStreamSnapshotResponse, fr as SpacePresenceSnapshot, ft as GlobalSearchResponse, gn as SkillCatalogResponse, gr as SpaceRole, hr as SpaceRecord, ht as InvitationDetail, ir as SpaceFsWriteFileInput, it as CronJobUpdatePatch, jn as SpaceConfigInput, jr as ChannelConfig, jt as PatchResourceLabelsInput, ki as SessionTurnRecord, kt as MeResponse, l as AcceptInvitationResponse, li as RequestSource, ln as SessionTurnIndexResponse, lr as SpaceModListItem, mn as SessionTurnsPaginatedResponse, mr as SpacePublicProfile, mt as GlobalSearchType, on as SessionMessagesPaginatedResponse, pn as SessionTurnWindowResponse, q as CheckpointRecord, qt as ReferenceQueryResponse, r as WebsocketClient, ri as RealtimePatchOperation, rr as SpaceFsUploadResponse, rt as CronJobRecord, s as WebsocketEventPayload, sn as SessionMessagesResponse, sr as SpaceMember, tt as CreateSpaceSessionInput, un as SessionTurnResponse, ur as SpacePendingDiffFileResponse, vn as SpaceAccessPolicy, wi as BoardAwarenessUpdate, wr as TaskRunDetailResponse, wt as LabelListItem, xn as SpaceCheckpointDetailResponse, xt as LabelAssignmentRecord, zi as Usage, zn as SpaceFsCreateUploadInput } from "./websocket.js";
|
|
1
3
|
import { n as CohubEnvironment } from "./environment.js";
|
|
2
|
-
import { $ as CheckpointDiffSummary, $n as SpaceFsPreparingFile, $t as ReferenceKind, An as SpaceCommerceBuyerProfile, B as CanvasDocumentRecord, Bn as SpaceConfigUpdateResponse, Bt as Permission, Ci as SpaceCompletionResult, Cn as SkillCatalogResponse, Cr as SpaceRole, Di as ContentBlock, Dr as SpaceSessionsResponse, Ei as BillingPayload, Fn as SpaceCommerceProductBenefitBinding, G as Channel, Gn as SpaceFsCompleteUploadResponse, Gt as PublicUserPageResponse, Hn as SpaceDefaultResponse, It as MeResponse, J as CheckpointDiffFileResponse, Kn as SpaceFsCreateUploadInput, Lr as UserSessionsResponse, Lt as ModelCatalogEntry, Mr as TaskRunRecord, Nn as SpaceCommerceOrder, Nr as UserProfile, Nt as LabelResourceType, On as SpaceCheckpointDetailResponse, Ot as LabelAssignmentRecord, Pn as SpaceCommerceProduct, Pr as UserRulesResponse, Qn as SpaceFsMoveInput, Qt as ReferenceDirection, R as CanvasBootstrapResponse, Rn as SpaceConfigInput, Rr as ChannelConfig, Rt as PatchResourceLabelsInput, Sr as SpaceRecord, St as InvitationDetail, Ti as Usage, Tn as SpaceAccessPolicy, Un as SpaceEnvInput, Ut as PromptTemplateCatalogResponse, Vn as SpaceCreateResponse, W as CanvasTransactionInput, Wn as SpaceFsCompleteUploadInput, Wt as PublicReferral, Xt as ReferenceAggregateGroupBy, Zn as SpaceFsFileResponse, Zt as ReferenceAggregateResponse, _n as SessionTurnResponse, _r as SpacePendingDiffFileResponse, a as WebsocketClientOptions, bn as SessionTurnWindowResponse, ct as CreateSpaceSessionInput, d as BatchUserProfilesResponse, di as MessageRecord, dr as SpaceFsWriteFileInput, dt as CronJobUpdatePatch, en as ReferenceQueryResponse, et as CheckpointRecord, fi as SessionForkRecord, fn as SessionMessageResponse, fr as SpaceInvitation, ft as CursorPageInfo, gn as SessionTurnIndexResponse, gr as SpaceModListItem, hi as SessionTurnRecord, hn as SessionRecord, in as ReferralDashboard, it as CreateSpaceInput, jr as TaskRunDetailResponse, jt as LabelListItem, kn as SpaceCommerceBenefit, kr as SpaceUsageResponse, kt as LabelItemsResponse, l as AcceptInvitationResponse, li as SessionTurnPatchEvent, mn as SessionMessagesResponse, mr as SpaceMember, ni as GenerationContentBlock, nr as SpaceFsReadFilesResponse, nt as CreateInvitationInput, ot as CreateSpacePromptInput, pn as SessionMessagesPaginatedResponse, qn as SpaceFsCreateUploadResponse, r as WebsocketClient, ri as GenerationModelDeclaration, rr as SpaceFsTreeResponse, rt as CreateInvitationResponse, s as WebsocketEventPayload, si as RealtimePatchOperation, st as CreateSpacePromptResponse, tn as ReferenceQueryableType, tt as ClaimReferralResponse, ui as SpacePublicEndpoints, ur as SpaceFsUploadResponse, ut as CronJobRecord, vn as SessionTurnSignedUrlsResponse, vr as SpacePendingDiffSummary, wi as SpaceCompletionStreamEvent, xi as CreateSpaceCompletionInput, xn as SessionTurnsPaginatedResponse, xr as SpacePublicProfile, xt as GlobalSearchType, yn as SessionTurnStreamSnapshotResponse, yr as SpacePresenceSnapshot, yt as GlobalSearchResponse, z as CanvasCreateInput, zn as SpaceConfigResponse, zr as ChannelHealth, zt as PatchResourceLabelsResponse } from "./websocket.js";
|
|
3
4
|
import { a as VoiceInputCreateOptions } from "./voice-input.js";
|
|
4
|
-
//#region ../protocol/dist/
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
5
|
+
//#region ../protocol/dist/model/status.d.ts
|
|
6
|
+
/** Per-model availability status, derived from periodic probe results. */
|
|
7
|
+
type ModelAvailabilityStatus = "operational" | "degraded" | "outage";
|
|
8
|
+
/**
|
|
9
|
+
* Aggregated availability for a single model.
|
|
10
|
+
* All rate fields are percentages (0–100); `null` means no samples in that window.
|
|
11
|
+
*/
|
|
12
|
+
type ModelStatusEntry = {
|
|
13
|
+
status: ModelAvailabilityStatus;
|
|
14
|
+
/** 5-minute success rate — drives the selector dot color. Real observed
|
|
15
|
+
* traffic (`online`) when available, else the probe self-test window. */
|
|
16
|
+
successRate5m: number | null;
|
|
17
|
+
successRate2h: number | null;
|
|
18
|
+
successRate24h: number | null;
|
|
19
|
+
/** 1-hour average / P90 response duration in milliseconds. */
|
|
20
|
+
latencyAvgMs: number | null;
|
|
21
|
+
latencyP90Ms: number | null;
|
|
22
|
+
samples1h: number | null;
|
|
23
|
+
checkedAt: string | null;
|
|
24
|
+
probeIntervalSeconds: number | null;
|
|
25
|
+
/** 24-hour history in 15-minute buckets (oldest → newest), or null. */
|
|
26
|
+
history: Array<{
|
|
27
|
+
t: string;
|
|
28
|
+
status: ModelAvailabilityStatus;
|
|
29
|
+
rate: number | null;
|
|
30
|
+
samples: number;
|
|
31
|
+
}> | null;
|
|
32
|
+
/**
|
|
33
|
+
* Bar-chart series (oldest → newest), always 96 buckets. Source is real
|
|
34
|
+
* observed traffic (`online` heartbeats resampled to 5-min buckets) when
|
|
35
|
+
* available, else the probe self-test `history` (15-min buckets) as a
|
|
36
|
+
* fallback for models not yet covered by online. Drives the hover card
|
|
37
|
+
* bar chart; color each bucket via the 6-tier success-rate scale.
|
|
38
|
+
*/
|
|
39
|
+
heartbeats8h: Array<number | null> | null;
|
|
40
|
+
/**
|
|
41
|
+
* Total minutes spanned by `heartbeats8h` (online → 480, history fallback
|
|
42
|
+
* → 1440). The frontend divides by bucket count for the per-bar age and
|
|
43
|
+
* the axis label, so the window reads honestly regardless of source.
|
|
44
|
+
*/
|
|
45
|
+
heartbeatsWindowMinutes: number | null;
|
|
46
|
+
};
|
|
47
|
+
type ModelStatusResponse = {
|
|
48
|
+
generatedAt: string;
|
|
49
|
+
overallStatus: ModelAvailabilityStatus | "unknown";
|
|
50
|
+
/** Keyed by model id. */
|
|
51
|
+
models: Record<string, ModelStatusEntry>;
|
|
52
|
+
};
|
|
38
53
|
//#endregion
|
|
39
54
|
//#region ../protocol/dist/generation/index.d.ts
|
|
40
55
|
declare const GENERATION_TASK_TYPE: "generation";
|
|
@@ -87,6 +102,65 @@ type ListGenerationModelsResponse = {
|
|
|
87
102
|
models: PublicGenerationDeclaration[];
|
|
88
103
|
};
|
|
89
104
|
//#endregion
|
|
105
|
+
//#region ../protocol/dist/space-config.d.ts
|
|
106
|
+
type WorkspacePreviewKind = "file" | "board" | "port";
|
|
107
|
+
type WorkspacePreviewRef = {
|
|
108
|
+
kind: WorkspacePreviewKind;
|
|
109
|
+
key: string;
|
|
110
|
+
};
|
|
111
|
+
type WorkspaceLayoutPresentation = "split" | "focus" | "fullscreen";
|
|
112
|
+
type WorkspaceDefaultLayout = {
|
|
113
|
+
leftSidebar?: "expanded" | "collapsed";
|
|
114
|
+
filesColumn?: "visible" | "hidden";
|
|
115
|
+
fileTree?: "expanded" | "collapsed";
|
|
116
|
+
preview?: WorkspacePreviewRef;
|
|
117
|
+
presentation?: WorkspaceLayoutPresentation;
|
|
118
|
+
};
|
|
119
|
+
type NewChatBackgroundBase = {
|
|
120
|
+
opacity: number;
|
|
121
|
+
fit: "cover" | "contain" | "fill";
|
|
122
|
+
position: string;
|
|
123
|
+
};
|
|
124
|
+
type NewChatBackgroundUrlSource = {
|
|
125
|
+
kind: "url";
|
|
126
|
+
url: string;
|
|
127
|
+
};
|
|
128
|
+
type NewChatBackgroundConfig = NewChatBackgroundBase & ({
|
|
129
|
+
type: "html";
|
|
130
|
+
source: NewChatBackgroundUrlSource | {
|
|
131
|
+
kind: "space";
|
|
132
|
+
path: string;
|
|
133
|
+
};
|
|
134
|
+
} | {
|
|
135
|
+
type: "image" | "video";
|
|
136
|
+
source: NewChatBackgroundUrlSource;
|
|
137
|
+
});
|
|
138
|
+
type SpaceConfig = {
|
|
139
|
+
ui?: {
|
|
140
|
+
newChat?: {
|
|
141
|
+
background?: NewChatBackgroundConfig;
|
|
142
|
+
};
|
|
143
|
+
workspace?: {
|
|
144
|
+
defaultLayout?: WorkspaceDefaultLayout;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
type SpacePreviewSessionCredential = {
|
|
149
|
+
token: string;
|
|
150
|
+
expiresIn: number;
|
|
151
|
+
};
|
|
152
|
+
type SpaceStartupResponse = {
|
|
153
|
+
status: "ready" | "missing" | "invalid" | "preparing";
|
|
154
|
+
config: SpaceConfig | null;
|
|
155
|
+
configRaw: string | null;
|
|
156
|
+
revision: {
|
|
157
|
+
mtimeMs: number;
|
|
158
|
+
size: number;
|
|
159
|
+
} | null;
|
|
160
|
+
previewSession: SpacePreviewSessionCredential | null;
|
|
161
|
+
retryAfterMs?: number;
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
90
164
|
//#region src/work-runtime.d.ts
|
|
91
165
|
type WorkRuntimeContext = {
|
|
92
166
|
work: {
|
|
@@ -403,6 +477,7 @@ declare class ModelsApi {
|
|
|
403
477
|
constructor(transport: HttpTransport);
|
|
404
478
|
list(): Promise<ModelsCatalog>;
|
|
405
479
|
listMultimodal(): Promise<ListGenerationModelsResponse>;
|
|
480
|
+
status(): Promise<ModelStatusResponse>;
|
|
406
481
|
}
|
|
407
482
|
//#endregion
|
|
408
483
|
//#region src/apis/prompts.d.ts
|
|
@@ -775,16 +850,28 @@ declare class PublicInviteApi {
|
|
|
775
850
|
//#endregion
|
|
776
851
|
//#region src/apis/spaces.d.ts
|
|
777
852
|
/**
|
|
778
|
-
* A
|
|
853
|
+
* A board transaction rejected by the server. `status`/`code` let callers
|
|
779
854
|
* distinguish a recoverable version conflict (409 / "VERSION_CONFLICT") from
|
|
780
855
|
* transient failures, so they can rebase and retry instead of surfacing an error.
|
|
781
856
|
*/
|
|
782
|
-
declare class
|
|
857
|
+
declare class BoardTransactionError extends Error {
|
|
783
858
|
readonly status?: number | undefined;
|
|
784
859
|
readonly code?: string | undefined;
|
|
785
|
-
|
|
860
|
+
readonly body?: unknown;
|
|
861
|
+
constructor(message: string, status?: number | undefined, code?: string | undefined, body?: unknown, options?: ErrorOptions);
|
|
786
862
|
get isVersionConflict(): boolean;
|
|
787
863
|
}
|
|
864
|
+
type BoardTransactionInput = Omit<BoardTransaction, "boardId">;
|
|
865
|
+
type BoardTransactionAppliedEvent = BoardTransactionAppliedEvent$1;
|
|
866
|
+
type BoardAwarenessUpdatedEvent = BoardAwarenessUpdatedEvent$1;
|
|
867
|
+
type BoardPlaybackChangedEvent = BoardPlaybackChangedEvent$1;
|
|
868
|
+
type BoardEventName = "transaction" | "awareness" | "playback";
|
|
869
|
+
type BoardSubscriptionHandlers = {
|
|
870
|
+
transaction?: (event: BoardTransactionAppliedEvent) => void;
|
|
871
|
+
awareness?: (event: BoardAwarenessUpdatedEvent) => void;
|
|
872
|
+
playback?: (event: BoardPlaybackChangedEvent) => void;
|
|
873
|
+
event?: (event: BoardTransactionAppliedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent) => void;
|
|
874
|
+
};
|
|
788
875
|
type SessionSubscriptionHandlers = {
|
|
789
876
|
patch?: (event: WebsocketEventPayload) => void;
|
|
790
877
|
/** @deprecated Use `session.subscribeGeneration({ state })`. */
|
|
@@ -796,7 +883,7 @@ type SessionSubscriptionHandlers = {
|
|
|
796
883
|
event?: (event: WebsocketEventPayload) => void;
|
|
797
884
|
};
|
|
798
885
|
type SessionEventName = "created" | "updated" | "turn.created" | "turn.patch" | "turn.lifecycle" | "turn.updated" | "turn.finalized" | "turn.error" | "message.persisted";
|
|
799
|
-
type SpaceEventName = SessionEventName | "fs.changed" | "ports.changed" | "presence.updated" | "
|
|
886
|
+
type SpaceEventName = SessionEventName | "fs.changed" | "ports.changed" | "presence.updated" | "board.transaction.applied" | "board.playback.changed" | "task.created" | "task.updated" | "event";
|
|
800
887
|
declare class SpacesApi {
|
|
801
888
|
private readonly transport;
|
|
802
889
|
constructor(transport: HttpTransport);
|
|
@@ -1255,16 +1342,74 @@ declare class SpaceCommerceApi {
|
|
|
1255
1342
|
businessKey: string;
|
|
1256
1343
|
}>;
|
|
1257
1344
|
}
|
|
1258
|
-
declare class
|
|
1345
|
+
declare class BoardRealtimeClient {
|
|
1346
|
+
private readonly websocketClient;
|
|
1347
|
+
private readonly spaceId;
|
|
1348
|
+
private readonly boardId;
|
|
1349
|
+
constructor(websocketClient: WebsocketClient | null, spaceId: string, boardId: string);
|
|
1350
|
+
subscribe(handlers: BoardSubscriptionHandlers): () => void;
|
|
1351
|
+
on(type: "transaction", handler: (event: BoardTransactionAppliedEvent) => void): () => void;
|
|
1352
|
+
on(type: "awareness", handler: (event: BoardAwarenessUpdatedEvent) => void): () => void;
|
|
1353
|
+
on(type: "playback", handler: (event: BoardPlaybackChangedEvent) => void): () => void;
|
|
1354
|
+
}
|
|
1355
|
+
declare class BoardClient {
|
|
1356
|
+
readonly spaceId: string;
|
|
1357
|
+
readonly id: string;
|
|
1358
|
+
private readonly websocketClient;
|
|
1359
|
+
readonly realtime: BoardRealtimeClient;
|
|
1360
|
+
private readonly boards;
|
|
1361
|
+
constructor(spaceId: string, id: string, transport: HttpTransport, websocketClient: WebsocketClient | null);
|
|
1362
|
+
inspect(input?: BoardInspectInput, customFetch?: Fetch): Promise<BoardBootstrap>;
|
|
1363
|
+
capabilities(customFetch?: Fetch): Promise<BoardCapabilities>;
|
|
1364
|
+
validate(transaction: BoardTransactionInput): Promise<BoardValidationResult>;
|
|
1365
|
+
apply(transaction: BoardTransactionInput): Promise<BoardBootstrap>;
|
|
1366
|
+
updateAwareness(seq: number, update: BoardAwarenessUpdate): Promise<void>;
|
|
1367
|
+
playback(command: BoardPlaybackCommand): Promise<BoardPlaybackSnapshot>;
|
|
1368
|
+
play(command: Omit<Extract<BoardPlaybackCommand, {
|
|
1369
|
+
type: "play";
|
|
1370
|
+
}>, "shared"> & {
|
|
1371
|
+
shared?: true;
|
|
1372
|
+
}): Promise<BoardPlaybackSnapshot>;
|
|
1373
|
+
pause(command: Extract<BoardPlaybackCommand, {
|
|
1374
|
+
type: "pause";
|
|
1375
|
+
}>): Promise<BoardPlaybackSnapshot>;
|
|
1376
|
+
seek(command: Extract<BoardPlaybackCommand, {
|
|
1377
|
+
type: "seek";
|
|
1378
|
+
}>): Promise<BoardPlaybackSnapshot>;
|
|
1379
|
+
stop(command: Extract<BoardPlaybackCommand, {
|
|
1380
|
+
type: "stop";
|
|
1381
|
+
}>): Promise<BoardPlaybackSnapshot>;
|
|
1382
|
+
subscribe(handlers: BoardSubscriptionHandlers): () => void;
|
|
1383
|
+
on(type: "transaction", handler: (event: BoardTransactionAppliedEvent) => void): () => void;
|
|
1384
|
+
on(type: "awareness", handler: (event: BoardAwarenessUpdatedEvent) => void): () => void;
|
|
1385
|
+
on(type: "playback", handler: (event: BoardPlaybackChangedEvent) => void): () => void;
|
|
1386
|
+
}
|
|
1387
|
+
declare class SpaceBoardsApi {
|
|
1259
1388
|
private readonly transport;
|
|
1260
1389
|
private readonly spaceId;
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1390
|
+
private readonly websocketClient;
|
|
1391
|
+
constructor(transport: HttpTransport, spaceId: string, websocketClient: WebsocketClient | null);
|
|
1392
|
+
byId(boardId: string): BoardClient;
|
|
1393
|
+
create(input: BoardCreateInput): Promise<BoardBootstrap>;
|
|
1394
|
+
inspect(boardId: string, input?: BoardInspectInput, customFetch?: Fetch): Promise<BoardBootstrap>;
|
|
1395
|
+
capabilities(boardId: string, customFetch?: Fetch): Promise<BoardCapabilities>;
|
|
1396
|
+
validate(transaction: BoardTransaction): Promise<BoardValidationResult>;
|
|
1397
|
+
apply(transaction: BoardTransaction): Promise<BoardBootstrap>;
|
|
1398
|
+
playback(boardId: string, command: BoardPlaybackCommand): Promise<BoardPlaybackSnapshot>;
|
|
1399
|
+
play(boardId: string, command: Omit<Extract<BoardPlaybackCommand, {
|
|
1400
|
+
type: "play";
|
|
1401
|
+
}>, "shared"> & {
|
|
1402
|
+
shared?: true;
|
|
1403
|
+
}): Promise<BoardPlaybackSnapshot>;
|
|
1404
|
+
pause(boardId: string, command: Extract<BoardPlaybackCommand, {
|
|
1405
|
+
type: "pause";
|
|
1406
|
+
}>): Promise<BoardPlaybackSnapshot>;
|
|
1407
|
+
seek(boardId: string, command: Extract<BoardPlaybackCommand, {
|
|
1408
|
+
type: "seek";
|
|
1409
|
+
}>): Promise<BoardPlaybackSnapshot>;
|
|
1410
|
+
stop(boardId: string, command: Extract<BoardPlaybackCommand, {
|
|
1411
|
+
type: "stop";
|
|
1412
|
+
}>): Promise<BoardPlaybackSnapshot>;
|
|
1268
1413
|
}
|
|
1269
1414
|
declare class SpaceCheckpointFilesApi {
|
|
1270
1415
|
private readonly transport;
|
|
@@ -1335,10 +1480,11 @@ declare class SpaceClient {
|
|
|
1335
1480
|
readonly sandbox: SpaceSandboxApi;
|
|
1336
1481
|
readonly invitations: SpaceInvitationsApi;
|
|
1337
1482
|
readonly labels: SpaceLabelsApi;
|
|
1338
|
-
readonly
|
|
1483
|
+
readonly boards: SpaceBoardsApi;
|
|
1339
1484
|
readonly commerce: SpaceCommerceApi;
|
|
1340
1485
|
constructor(id: string, transport: HttpTransport, websocketClient: WebsocketClient | null);
|
|
1341
1486
|
get(customFetch?: Fetch): Promise<SpaceRecord>;
|
|
1487
|
+
getStartup(customFetch?: Fetch): Promise<SpaceStartupResponse>;
|
|
1342
1488
|
prompt(input: CreateSpacePromptInput): Promise<CreateSpacePromptResponse>;
|
|
1343
1489
|
/**
|
|
1344
1490
|
* Raw LLM completion. Caller fully controls messages and optional system prompt file.
|
|
@@ -1360,11 +1506,6 @@ declare class SpaceClient {
|
|
|
1360
1506
|
rename(name: string): Promise<{
|
|
1361
1507
|
space: SpaceRecord;
|
|
1362
1508
|
}>;
|
|
1363
|
-
sendCanvasTransactionRealtime(documentId: string, input: CanvasTransactionInput): Promise<{
|
|
1364
|
-
document: {
|
|
1365
|
-
version: number;
|
|
1366
|
-
};
|
|
1367
|
-
}>;
|
|
1368
1509
|
profile(body: {
|
|
1369
1510
|
description?: string | null;
|
|
1370
1511
|
avatarUrl?: string | null;
|
|
@@ -1377,6 +1518,7 @@ declare class SpaceClient {
|
|
|
1377
1518
|
getConfig(): Promise<SpaceConfigResponse>;
|
|
1378
1519
|
updateConfig(input: SpaceConfigInput): Promise<SpaceConfigUpdateResponse>;
|
|
1379
1520
|
session(sessionId: string): SessionClient;
|
|
1521
|
+
board(boardId: string): BoardClient;
|
|
1380
1522
|
updatePresence(meta?: Record<string, unknown> | null): Promise<void>;
|
|
1381
1523
|
subscribe(handler: (event: WebsocketEventPayload) => void): () => void;
|
|
1382
1524
|
on(type: SpaceEventName, handler: (event: WebsocketEventPayload) => void): () => void;
|
|
@@ -1410,6 +1552,7 @@ declare class UserApi {
|
|
|
1410
1552
|
private readonly transportBaseUrl;
|
|
1411
1553
|
private readonly setStoredAuthToken?;
|
|
1412
1554
|
private readonly clearStoredAuthToken?;
|
|
1555
|
+
readonly labels: UserLabelsApi;
|
|
1413
1556
|
constructor(transport: HttpTransport, transportBaseUrl: string, setStoredAuthToken?: ((token: string) => void) | undefined, clearStoredAuthToken?: (() => void) | undefined);
|
|
1414
1557
|
getMe(options?: Fetch | {
|
|
1415
1558
|
fetch?: Fetch;
|
|
@@ -1435,6 +1578,20 @@ declare class UserApi {
|
|
|
1435
1578
|
setAuthToken(token: string): Promise<any>;
|
|
1436
1579
|
clearAuthToken(): Promise<null>;
|
|
1437
1580
|
}
|
|
1581
|
+
/** User-scoped labels — same label/assignment model as space labels, but private to the viewer. */
|
|
1582
|
+
declare class UserLabelsApi {
|
|
1583
|
+
private readonly transport;
|
|
1584
|
+
constructor(transport: HttpTransport);
|
|
1585
|
+
getResourceLabels(resourceType: LabelResourceType, resourceRef: string): Promise<{
|
|
1586
|
+
assignments: LabelAssignmentRecord[];
|
|
1587
|
+
}>;
|
|
1588
|
+
patchResourceLabels(resourceType: LabelResourceType, resourceRef: string, input: {
|
|
1589
|
+
addLabelRefs?: string[];
|
|
1590
|
+
removeLabelRefs?: string[];
|
|
1591
|
+
}): Promise<{
|
|
1592
|
+
assignments: LabelAssignmentRecord[];
|
|
1593
|
+
}>;
|
|
1594
|
+
}
|
|
1438
1595
|
//#endregion
|
|
1439
1596
|
//#region src/apis/users.d.ts
|
|
1440
1597
|
declare class UsersApi {
|
|
@@ -1724,4 +1881,4 @@ declare class CohubHttpClient {
|
|
|
1724
1881
|
}
|
|
1725
1882
|
declare const createHttpClient: (options?: CohubClientOptions) => CohubHttpClient;
|
|
1726
1883
|
//#endregion
|
|
1727
|
-
export {
|
|
1884
|
+
export { GenerationStreamEvent as $, createWorkRuntime as $t, ReferralsApi as A, PromptsApi as At, BoardTransactionError as B, joinApiUrl as Bt, WorkSessionResponse as C, PublicAssetMimeType as Ct, WorkVersionRecord as D, UploadChatImageAttachmentInput as Dt, WorkUpdateInput as E, UploadChatAttachmentInput as Et, BoardClient as F, CohubClientOptions as Ft, SpaceClient as G, WorkRuntimeApi as Gt, SessionEventName as H, ParentBridgeTransport as Ht, BoardEventName as I, Fetch as It, WebSocketConnectionState as J, WorkRuntimeContext as Jt, SpaceEventName as K, WorkRuntimeCheckoutState as Kt, BoardPlaybackChangedEvent as L, HttpError as Lt, UserApi as M, GenerationsApi as Mt, TasksApi as N, CronJobsApi as Nt, WorkVisibility as O, UploadPublicAssetInput as Ot, BoardAwarenessUpdatedEvent as P, ChannelsApi as Pt, GenerationStreamErrorEvent as Q, createSlugWorkIdResolver as Qt, BoardSubscriptionHandlers as R, HttpTransport as Rt, WorkResolveResponse as S, CreatePublicAssetUploadResponse as St, WorkTargetType as T, PublicAssetsApi as Tt, SessionSubscriptionHandlers as U, PopupBrokerTransport as Ut, BoardTransactionInput as V, sanitizeAccessToken as Vt, SpaceChannelBindingRecord as W, WorkIdResolver as Wt, AssistantMessageCommit as X, WorkRuntimeRequestOptions as Xt, PublicInviteApi as Y, WorkRuntimeModeConfig as Yt, GenerationStreamCommitEvent as Z, WorkRuntimeTransport as Zt, WorkMeta as _, SessionAccessApi as _t, WorkCommerceCreditConsumeResponse as a, GenerationUsageBilling as an, GenerationStreamSubscribeOptions as at, WorkPublicSpaceRecord as b, SearchApi as bt, WorkCommerceEntitlementsResponse as c, ModelStatusEntry as cn, SessionGenerationStreamClient as ct, WorkCommercePurchaseResponse as d, SessionPatchApplyInput as dt, resolveWorkTransport as en, GenerationStreamFinalizedEvent as et, WorkAuthorizeResponse as f, SessionPatchApplyResult as ft, WorkGetResponse as g, createSessionPatchReducer as gt, WorkExtractedPageMeta as h, SessionPatchStatus as ht, WorkCommerceCheckoutStatus as i, GenerationTaskResult as in, GenerationStreamStateEvent as it, UsersApi as j, ModelsApi as jt, WorksApi as k, SkillsApi as kt, WorkCommerceOrder as l, ModelStatusResponse as ln, createSessionGenerationStreamClient as lt, WorkDetailResponse as m, SessionPatchState as mt, createHttpClient as n, CreateGenerationTaskRequest as nn, GenerationStreamLifecycleEvent as nt, WorkCommerceCreditConsumeStatus as o, ListGenerationModelsResponse as on, GenerationStreamSubscriptionHandlers as ot, WorkCreateInput as p, SessionPatchReducer as pt, SpacesApi as q, WorkRuntimeCheckoutStatus as qt, WorkCommerceApi as r, CreateGenerationTaskResponse as rn, GenerationStreamOutOfSyncEvent as rt, WorkCommerceEntitlement as s, PublicGenerationDeclaration as sn, GenerationStreamTurnUpdatedEvent as st, CohubHttpClient as t, SpaceStartupResponse as tn, GenerationStreamIntermediateMessage as tt, WorkCommerceProductResolveResponse as u, parseAssistantMessageCommit as ut, WorkPresentationMeta as v, ReferenceResourceSelector as vt, WorkStatus as w, PublicAssetPurpose as wt, WorkRecord as x, CreatePublicAssetUploadInput as xt, WorkPublicOwnerRecord as y, ReferencesApi as yt, BoardTransactionAppliedEvent as z, RawHttpResponse as zt };
|