@neta-art/cohub 12.5.0 → 12.6.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 +17 -10
- package/dist/board/model/media-playback.d.ts +1 -0
- package/dist/board/replica/index.d.ts +3 -2
- package/dist/board/replica/index.js +15 -4
- package/dist/board/replica/indexeddb.js +14 -85
- package/dist/board/stage/assets.d.ts +3 -2
- package/dist/board/stage/assets.js +53 -21
- package/dist/board/stage/scene.js +11 -4
- package/dist/board/stage/stage.js +1 -1
- package/dist/chunks/app-realtime.js +1 -1
- package/dist/chunks/environment.d.ts +9 -7
- package/dist/chunks/environment.js +4 -3
- package/dist/chunks/http-error.js +28 -5
- package/dist/chunks/http.d.ts +76 -15
- package/dist/chunks/http.js +674 -37
- package/dist/chunks/websocket.d.ts +9 -1
- package/dist/http.d.ts +2 -2
- package/dist/http.js +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +6 -4
- package/dist/indexeddb.js +79 -0
- package/dist/protocol/dist/board.d.ts +19 -1
- package/dist/protocol/dist/index.d.ts +2 -2
- package/dist/voice-input.js +1 -1
- package/dist/websocket.js +37 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as decodeJwtPayload, s as resolveApiBaseUrl } from "./environment.js";
|
|
2
2
|
//#region ../protocol/dist/identifiers.js
|
|
3
3
|
const UUID_SHAPE_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
4
4
|
const UUID_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}";
|
|
@@ -330,6 +330,7 @@ var HttpTransport = class {
|
|
|
330
330
|
getAuthSessionVersion;
|
|
331
331
|
onUnauthorized;
|
|
332
332
|
requestSource;
|
|
333
|
+
scopedToken = null;
|
|
333
334
|
refreshInFlight = null;
|
|
334
335
|
constructor(options = {}) {
|
|
335
336
|
this.baseUrl = resolveApiBaseUrl(options);
|
|
@@ -339,6 +340,26 @@ var HttpTransport = class {
|
|
|
339
340
|
this.onUnauthorized = options.onUnauthorized;
|
|
340
341
|
this.requestSource = options.requestSource;
|
|
341
342
|
}
|
|
343
|
+
async credential() {
|
|
344
|
+
return sanitizeAccessToken(this.getAccessToken ? await this.getAccessToken() : null);
|
|
345
|
+
}
|
|
346
|
+
async cacheScope() {
|
|
347
|
+
let token;
|
|
348
|
+
try {
|
|
349
|
+
token = await this.credential();
|
|
350
|
+
} catch {
|
|
351
|
+
return null;
|
|
352
|
+
}
|
|
353
|
+
if (!token) return "anonymous";
|
|
354
|
+
if (this.scopedToken?.token !== token) {
|
|
355
|
+
const uuid = decodeJwtPayload(token)?.talesofai_uuid;
|
|
356
|
+
this.scopedToken = {
|
|
357
|
+
token,
|
|
358
|
+
scope: typeof uuid === "string" && uuid ? `user:${uuid}` : null
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
return this.scopedToken.scope;
|
|
362
|
+
}
|
|
342
363
|
resolveRequestSource() {
|
|
343
364
|
if (!this.requestSource) return null;
|
|
344
365
|
if (typeof this.requestSource === "function") return this.requestSource() ?? null;
|
|
@@ -356,10 +377,11 @@ var HttpTransport = class {
|
|
|
356
377
|
}
|
|
357
378
|
}
|
|
358
379
|
async withAuthorization(init, tokenOverride) {
|
|
359
|
-
const { fetch: _fetch, skipUnauthorizedHandler: _skip, ...requestInit } = init ?? {};
|
|
380
|
+
const { fetch: _fetch, skipUnauthorizedHandler: _skip, accessToken, ...requestInit } = init ?? {};
|
|
360
381
|
const headers = new Headers(requestInit.headers);
|
|
361
382
|
let authSessionVersion = this.readAuthSessionVersion();
|
|
362
|
-
const
|
|
383
|
+
const pinned = tokenOverride !== void 0 ? tokenOverride : accessToken;
|
|
384
|
+
const token = sanitizeAccessToken(pinned !== void 0 ? pinned : this.getAccessToken ? await this.getAccessToken() : null);
|
|
363
385
|
if (token) {
|
|
364
386
|
const resolvedVersion = this.readAuthSessionVersion();
|
|
365
387
|
if (resolvedVersion !== void 0) authSessionVersion = resolvedVersion;
|
|
@@ -413,7 +435,8 @@ var HttpTransport = class {
|
|
|
413
435
|
async send(path, init) {
|
|
414
436
|
const fetcher = init?.fetch ?? this.fetcher;
|
|
415
437
|
const url = joinApiUrl(this.baseUrl, path);
|
|
416
|
-
const
|
|
438
|
+
const pinned = init?.accessToken !== void 0;
|
|
439
|
+
const skipUnauthorizedHandler = Boolean(init?.skipUnauthorizedHandler) || pinned;
|
|
417
440
|
let response;
|
|
418
441
|
let rejectedToken = null;
|
|
419
442
|
let rejectedAuthSessionVersion;
|
|
@@ -426,7 +449,7 @@ var HttpTransport = class {
|
|
|
426
449
|
if (isBrowserRequestConstructionError(error)) throw new Error("Could not send request. Your session may be invalid — try refreshing or signing in again.", { cause: error });
|
|
427
450
|
throw error;
|
|
428
451
|
}
|
|
429
|
-
if (response.status === 401 && this.getAccessToken) {
|
|
452
|
+
if (response.status === 401 && this.getAccessToken && !pinned) {
|
|
430
453
|
const refreshedToken = await this.refreshAccessToken(rejectedToken);
|
|
431
454
|
if (refreshedToken) {
|
|
432
455
|
let retryResponse;
|
package/dist/chunks/http.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { $a as SpacePublicEndpoints, $i as RealtimePatchOperation, $n as SpaceCommerceProduct, $t as PromptTemplateCatalogResponse,
|
|
1
|
+
import { $a as SpacePublicEndpoints, $c as DisplayCaptureParams, $i as RealtimePatchOperation, $n as SpaceCommerceProduct, $t as PromptTemplateCatalogResponse, An as SessionTurnSignedUrlsResponse, Ba as DesktopCommandRecord, Bo as RuntimeSessionRecoveryStatus, Br as SpaceListOptions, Co as MessageToolCallsFile, Dn as SessionRecord, Do as StoredIntermediateMessage, En as SessionMessagesResponse, Eo as SpaceTurnsResponse, Er as SpaceFsTreeResponse, Et as GlobalSearchType, Fn as SkillCatalogResponse, Ft as LabelItemsResponse, Gr as SpacePendingDiffFileResponse, Gs as RuntimeArchivePage, Gt as PaletteOverviewResponse, Hi as GenerationContentBlock, Ho as RuntimeStopConfirmation, Hr as SpaceMember, Ht as MeResponse, Ir as SpaceInvitationListResponse, Ji as BoardPlaybackChangedEvent$1, Jn as SpaceCommerceBenefit, Jt as PatchResourceLabelsInput, Kc as AppAuthorizationRequest$1, Ki as BoardAwarenessUpdatedEvent$1, Kr as SpacePendingDiffSummary, La as DesktopCommand, Lc as BoardPatch, Lt as LabelListItem, Mn as SessionTurnWindowResponse, Nn as SessionTurnsPaginatedResponse, Nr as SpaceFsUploadResponse, O as BillingCheckoutResult, Ol as RequestSource, On as SessionTurnIndexResponse, Ot as InvitationDetail, Pr as SpaceFsWriteFileInput, Pt as LabelAssignmentRecord, Q as Channel, Qa as NavigationLaunch, Qc as DisplayCapture, Qn as SpaceCommerceOrder, Rn as SpaceAccessPolicy, T as BillingCatalogProduct, Ta as AppVersionSource, Ti as ChannelHealth, Tn as SessionMessagesPaginatedResponse, To as SessionTurnRecord, Tr as SpaceFsTreePage, Ui as GenerationModelDeclaration, Us as HarnessArchiveIndex, Ut as ModelCatalogEntry, Va as DesktopCommandStatus, Vn as SpaceActivityResponse, Vo as RuntimeStatus, Vr as SpaceListPage, Wc as BillingPayload, Wr as SpaceModListItem, Xr as SpaceRecord, Xt as Permission, Yn as SpaceCommerceBuyerProfile, Yr as SpacePublicProfile, Yt as PatchResourceLabelsResponse, Za as NavigationCall, Zr as SpaceRole, _ as AcceptInvitationResponse, _i as UserRulesResponse, _o as SessionForkRecord, _t as CronJobRecord, aa as RealtimeRoomMember, ac as SpaceCompletionResult, ao as SpaceFsCopyResult, ar as SpaceConfigUpdateResponse, bc as BoardReadInput, br as SpaceFsMoveInput, cc as ContentBlock, ci as TaskRunDetailResponse, cn as ReferenceAggregateResponse, cr as SpaceEnvInput, ct as ClaimReferralResponse, dc as BoardApplyInput, dl as AppRtcDelivery, dn as ReferenceQueryResponse, dt as CreateSpaceInput, en as PublicReferral, eo as SpaceFsChangedPayload, er as SpaceCommerceProductBenefitBinding, fc as BoardApplyResult, fi as UserActivityQuery, fl as AppRtcMediaKind, fn as ReferenceQueryableType, fo as BoardAwarenessUpdate, fr as SpaceFsCreateUploadInput, gc as BoardHistoryPage, gi as UserProfile, gl as RtcIceServers, go as SessionFilesResponse, hc as BoardHistoryInput, hi as UserActivityResponse, hn as ReferralDashboard, ht as CreateSpaceSessionInput, ia as RealtimeRoomHistoryEvent, il as DisplaySession, io as SpaceFsCopyResponse, ir as SpaceConfigResponse, jc as BoardDelta, jn as SessionTurnStreamSnapshotResponse, kn as SessionTurnResponse, ko as TurnIntermediateMessagesFile, la as SessionTurnPatchEvent, li as TaskRunRecord, ll as DisplayVirtualStart, ln as ReferenceDirection, lr as SpaceFsCompleteUploadInput, lt as CreateInvitationInput, ma as AppDomainRecord, mc as BoardCreateInput, ml as AppRtcQuality, mt as CreateSpacePromptResponse, ni as SpaceTurnAuthorFilter, nl as DisplayInputEvent, nn as PublicUserPageResponse, no as SpaceFsCopyInput, oc as SpaceCompletionStreamEvent, oi as SpaceUsageResponse, or as SpaceCreateResponse, ot as CheckpointDiffSummary, pa as AppDomainListResponse, po as MessageRecord, pr as SpaceFsCreateUploadResponse, pt as CreateSpacePromptInput, qc as AppAuthorizationResult, qi as BoardChangedEvent$1, qn as SpaceCheckpointDetailResponse, qr as SpacePresenceSnapshot, qs as RuntimeArchiveUpload, r as CohubEnvironment, rc as CreateSpaceCompletionInput, rl as DisplayList, rn as PublicUserProfile, rr as SpaceConfigInput, sc as Usage, sl as DisplayTreeParams, sn as ReferenceAggregateGroupBy, so as SpaceFsCopyStats, sr as SpaceDefaultResponse, st as CheckpointRecord, ta as RealtimeRoomDescriptor, ti as SpaceSessionsResponse, tl as DisplayInfo, tt as CheckpointDiffFileResponse, un as ReferenceKind, ur as SpaceFsCompleteUploadResponse, ut as CreateInvitationResponse, va as AppArtifactDescriptor, vr as SpaceFsFileResponse, vt as CronJobUpdatePatch, wa as AppContentKind, wi as ChannelConfig, wn as SessionMessageResponse, wr as SpaceFsReadFilesResponse, wt as GlobalSearchResponse, xc as BoardReadResult, xi as UserSessionsResponse, xl as SandboxSetupInfo, xo as SessionStats, xr as SpaceFsPreparingFile, y as BatchUserProfilesResponse, yc as BoardPlaybackSnapshot, yi as UserSessionSourceKey, yr as SpaceFsListOptions, yt as CursorPageInfo, za as DesktopCommandError, zt as LabelResourceType } from "./environment.js";
|
|
2
2
|
import { a as WebsocketClientOptions, r as WebsocketClient, s as WebsocketEventPayload } from "./websocket.js";
|
|
3
3
|
import { a as VoiceInputCreateOptions } from "./voice-input.js";
|
|
4
|
+
import { z } from "zod";
|
|
4
5
|
//#region ../protocol/dist/space-wallet.d.ts
|
|
5
6
|
type SpaceWalletSummary = {
|
|
6
7
|
spaceId: string;
|
|
@@ -873,6 +874,8 @@ type RequestInitWithFetch = RequestInit & {
|
|
|
873
874
|
fetch?: Fetch;
|
|
874
875
|
/** When true, 401 responses throw without invoking onUnauthorized (e.g. session bootstrap). */
|
|
875
876
|
skipUnauthorizedHandler?: boolean;
|
|
877
|
+
/** Fixed credential; 401 skips session refresh and unauthorized callbacks. */
|
|
878
|
+
accessToken?: string | null;
|
|
876
879
|
};
|
|
877
880
|
type RawHttpResponse = {
|
|
878
881
|
response: Response;
|
|
@@ -956,8 +959,11 @@ declare class HttpTransport {
|
|
|
956
959
|
private readonly getAuthSessionVersion?;
|
|
957
960
|
private readonly onUnauthorized?;
|
|
958
961
|
private readonly requestSource?;
|
|
962
|
+
private scopedToken;
|
|
959
963
|
private refreshInFlight;
|
|
960
964
|
constructor(options?: CohubClientOptions);
|
|
965
|
+
credential(): Promise<string | null>;
|
|
966
|
+
cacheScope(): Promise<string | null>;
|
|
961
967
|
private resolveRequestSource;
|
|
962
968
|
private applyRequestSourceHeaders;
|
|
963
969
|
private readAuthSessionVersion;
|
|
@@ -1229,6 +1235,16 @@ type FileListOptions = SpaceFsListOptions & {
|
|
|
1229
1235
|
signal?: AbortSignal;
|
|
1230
1236
|
};
|
|
1231
1237
|
//#endregion
|
|
1238
|
+
//#region src/board/model/media-playback.d.ts
|
|
1239
|
+
type BoardAssetUrlOptions = {
|
|
1240
|
+
fresh?: boolean;
|
|
1241
|
+
};
|
|
1242
|
+
type BoardAssetSource = {
|
|
1243
|
+
resolveFileUrl: (path: string, options?: BoardAssetUrlOptions) => Promise<string | null>;
|
|
1244
|
+
resolvePlaybackUrl?: (path: string, options?: BoardAssetUrlOptions) => Promise<string | null>;
|
|
1245
|
+
subscribe?: (listener: (path: string) => void) => () => void;
|
|
1246
|
+
};
|
|
1247
|
+
//#endregion
|
|
1232
1248
|
//#region src/board/replica/index.d.ts
|
|
1233
1249
|
type BoardChangedPayload = {
|
|
1234
1250
|
mutationId: string;
|
|
@@ -1237,7 +1253,8 @@ type BoardChangedPayload = {
|
|
|
1237
1253
|
after?: BoardDelta;
|
|
1238
1254
|
};
|
|
1239
1255
|
type BoardRemote = {
|
|
1240
|
-
|
|
1256
|
+
/** `only: []` reads metadata only; remotes may return the full Board. */
|
|
1257
|
+
get(read?: Pick<BoardReadInput, "only">): Promise<BoardReadResult>;
|
|
1241
1258
|
apply(patch: BoardPatch, options: {
|
|
1242
1259
|
mutationId: string;
|
|
1243
1260
|
clientId?: string;
|
|
@@ -1318,16 +1335,22 @@ declare class BoardClient implements BoardRemote {
|
|
|
1318
1335
|
on(type: "awareness", handler: (event: BoardAwarenessUpdatedEvent) => void): () => void;
|
|
1319
1336
|
on(type: "playback", handler: (event: BoardPlaybackChangedEvent) => void): () => void;
|
|
1320
1337
|
}
|
|
1321
|
-
type
|
|
1338
|
+
type BoardFiles = {
|
|
1322
1339
|
read(path: string, customFetch?: Fetch): Promise<SpaceFsFileResponse | SpaceFsPreparingFile>;
|
|
1340
|
+
resolveUrl(path: string, options?: {
|
|
1341
|
+
purpose?: "preview" | "playback";
|
|
1342
|
+
fresh?: boolean;
|
|
1343
|
+
}): Promise<string | null>;
|
|
1344
|
+
onUrlChange(listener: (path: string) => void): () => void;
|
|
1323
1345
|
};
|
|
1324
1346
|
declare class SpaceBoardsApi {
|
|
1325
1347
|
private readonly http;
|
|
1326
1348
|
private readonly spaceId;
|
|
1327
1349
|
private readonly websocket;
|
|
1328
1350
|
private readonly files;
|
|
1329
|
-
constructor(http: HttpTransport, spaceId: string, websocket: WebsocketClient | null, files:
|
|
1351
|
+
constructor(http: HttpTransport, spaceId: string, websocket: WebsocketClient | null, files: BoardFiles);
|
|
1330
1352
|
byId(boardId: string): BoardClient;
|
|
1353
|
+
assetSource(): BoardAssetSource;
|
|
1331
1354
|
open(target: string, customFetch?: Fetch): Promise<BoardClient>;
|
|
1332
1355
|
resolveId(path: string, customFetch?: Fetch): Promise<string>;
|
|
1333
1356
|
/** Create a `.board` file and its Board, optionally with an initial document. */
|
|
@@ -1724,6 +1747,46 @@ type BuildSpaceInvitePathInput = BuildSpacePathInput & {
|
|
|
1724
1747
|
declare function buildSpacePath(input: BuildSpacePathInput): string;
|
|
1725
1748
|
declare function buildSpaceInvitePath(input: BuildSpaceInvitePathInput): string;
|
|
1726
1749
|
//#endregion
|
|
1750
|
+
//#region src/apis/space-file-reads.d.ts
|
|
1751
|
+
type SpaceFileRead = SpaceFsFileResponse | SpaceFsPreparingFile;
|
|
1752
|
+
declare function createSpaceFileReads(transport: HttpTransport): {
|
|
1753
|
+
read(spaceId: string, path: string, options?: {
|
|
1754
|
+
background?: boolean;
|
|
1755
|
+
signal?: AbortSignal;
|
|
1756
|
+
token?: string | null;
|
|
1757
|
+
}): Promise<SpaceFileRead>;
|
|
1758
|
+
invalidate(spaceId: string, paths: Iterable<string>): void;
|
|
1759
|
+
};
|
|
1760
|
+
type SpaceFileReads = ReturnType<typeof createSpaceFileReads>;
|
|
1761
|
+
//#endregion
|
|
1762
|
+
//#region src/apis/space-file-urls.d.ts
|
|
1763
|
+
type SpaceFileUrlPurpose = "preview" | "playback";
|
|
1764
|
+
type SpaceFileUrlRequest = {
|
|
1765
|
+
/** Playback only accepts a streamable URL; previews may fall back to a data URL. */
|
|
1766
|
+
purpose?: SpaceFileUrlPurpose;
|
|
1767
|
+
fresh?: boolean;
|
|
1768
|
+
/** Maximum time to wait while CDN delivery is being prepared. */
|
|
1769
|
+
timeoutMs?: number;
|
|
1770
|
+
signal?: AbortSignal;
|
|
1771
|
+
};
|
|
1772
|
+
declare function createSpaceFileUrls(options: {
|
|
1773
|
+
reads: SpaceFileReads;
|
|
1774
|
+
credential: () => Promise<string | null>;
|
|
1775
|
+
scope: () => Promise<string | null>;
|
|
1776
|
+
watched: (spaceId: string) => boolean;
|
|
1777
|
+
cache: boolean;
|
|
1778
|
+
now?: () => number;
|
|
1779
|
+
}): {
|
|
1780
|
+
resolve(spaceId: string, path: string, request?: SpaceFileUrlRequest): Promise<string | null>;
|
|
1781
|
+
applyFsChange(spaceId: string, payload: Pick<SpaceFsChangedPayload, "changes" | "resync">): void;
|
|
1782
|
+
subscribe(listener: (spaceId: string, path: string) => void): () => void;
|
|
1783
|
+
};
|
|
1784
|
+
type SpaceFileUrls = ReturnType<typeof createSpaceFileUrls>;
|
|
1785
|
+
type SpaceFileServices = {
|
|
1786
|
+
reads: SpaceFileReads;
|
|
1787
|
+
urls: SpaceFileUrls;
|
|
1788
|
+
};
|
|
1789
|
+
//#endregion
|
|
1727
1790
|
//#region src/apis/spaces.d.ts
|
|
1728
1791
|
type SessionSubscriptionHandlers = {
|
|
1729
1792
|
patch?: (event: WebsocketEventPayload) => void;
|
|
@@ -1737,7 +1800,7 @@ type SessionSubscriptionHandlers = {
|
|
|
1737
1800
|
event?: (event: WebsocketEventPayload) => void;
|
|
1738
1801
|
};
|
|
1739
1802
|
type SessionEventName = "created" | "updated" | "turn.created" | "turn.patch" | "turn.lifecycle" | "turn.updated" | "turn.finalized" | "turn.error" | "message.persisted";
|
|
1740
|
-
type SpaceEventName = SessionEventName | "fs.changed" | "ports.changed" | "presence.updated" | "
|
|
1803
|
+
type SpaceEventName = SessionEventName | "fs.changed" | "ports.changed" | "presence.updated" | "app.version.published" | "app.domain.updated" | "app.domain.removed" | "task.created" | "task.updated" | "event";
|
|
1741
1804
|
declare class SpacesApi {
|
|
1742
1805
|
private readonly transport;
|
|
1743
1806
|
constructor(transport: HttpTransport);
|
|
@@ -1752,13 +1815,7 @@ declare class SpacesApi {
|
|
|
1752
1815
|
ensureHome(customFetch?: Fetch): Promise<SpaceRecord>;
|
|
1753
1816
|
create(input: CreateSpaceInput, headers?: Record<string, string>): Promise<SpaceCreateResponse>;
|
|
1754
1817
|
}
|
|
1755
|
-
type
|
|
1756
|
-
type ResolveSpaceFileUrlOptions = {
|
|
1757
|
-
/** Playback only accepts a streamable URL; previews may fall back to a data URL. */
|
|
1758
|
-
purpose?: SpaceFileUrlPurpose;
|
|
1759
|
-
/** Maximum time to wait while CDN delivery is being prepared. */
|
|
1760
|
-
timeoutMs?: number;
|
|
1761
|
-
signal?: AbortSignal;
|
|
1818
|
+
type ResolveSpaceFileUrlOptions = SpaceFileUrlRequest & {
|
|
1762
1819
|
fetch?: Fetch;
|
|
1763
1820
|
};
|
|
1764
1821
|
type OpenSpaceFileOptions = {
|
|
@@ -1794,12 +1851,15 @@ declare class SpacePublicFilesApi {
|
|
|
1794
1851
|
declare class SpaceFilesApi {
|
|
1795
1852
|
private readonly transport;
|
|
1796
1853
|
private readonly spaceId;
|
|
1797
|
-
|
|
1854
|
+
private readonly services;
|
|
1855
|
+
constructor(transport: HttpTransport, spaceId: string, services: SpaceFileServices);
|
|
1798
1856
|
list(path?: string, customFetch?: Fetch): Promise<SpaceFsTreeResponse>;
|
|
1799
1857
|
list(path: string, options: FileListOptions): Promise<SpaceFsTreePage>;
|
|
1800
1858
|
read(path: string, customFetch?: Fetch, signal?: AbortSignal): Promise<SpaceFsFileResponse | SpaceFsPreparingFile>;
|
|
1801
1859
|
/** Resolve a browser-ready file URL, waiting for CDN delivery when necessary. */
|
|
1802
1860
|
resolveUrl(path: string, options?: ResolveSpaceFileUrlOptions): Promise<string | null>;
|
|
1861
|
+
onUrlChange(listener: (path: string) => void): () => void;
|
|
1862
|
+
private resolveUrlThrough;
|
|
1803
1863
|
/** Pending workspace changes vs the space head checkpoint. */
|
|
1804
1864
|
diff(customFetch?: Fetch): Promise<SpacePendingDiffSummary>;
|
|
1805
1865
|
/** Per-file pending workspace diff vs the space head checkpoint. */
|
|
@@ -2397,7 +2457,7 @@ declare class SpaceClient {
|
|
|
2397
2457
|
readonly boards: SpaceBoardsApi;
|
|
2398
2458
|
readonly wallet: SpaceWalletApi;
|
|
2399
2459
|
readonly commerce: SpaceCommerceApi;
|
|
2400
|
-
constructor(id: string, transport: HttpTransport, websocketClient: WebsocketClient | null);
|
|
2460
|
+
constructor(id: string, transport: HttpTransport, websocketClient: WebsocketClient | null, fileServices: SpaceFileServices);
|
|
2401
2461
|
get(customFetch?: Fetch): Promise<SpaceRecord>;
|
|
2402
2462
|
prepareRuntimeArchive(index: HarnessArchiveIndex, options?: {
|
|
2403
2463
|
signal?: AbortSignal;
|
|
@@ -3604,9 +3664,10 @@ declare class CohubHttpClient {
|
|
|
3604
3664
|
/** @deprecated Use `desktop`. */
|
|
3605
3665
|
get ui(): DesktopCommandsApi;
|
|
3606
3666
|
private readonly transport;
|
|
3667
|
+
private readonly fileServices;
|
|
3607
3668
|
constructor(options?: CohubClientOptions);
|
|
3608
3669
|
space(spaceId: string): SpaceClient;
|
|
3609
3670
|
}
|
|
3610
3671
|
declare const createHttpClient: (options?: CohubClientOptions) => CohubHttpClient;
|
|
3611
3672
|
//#endregion
|
|
3612
|
-
export { WorkCommerceEntitlement as $,
|
|
3673
|
+
export { WorkCommerceEntitlement as $, SpaceWebhookListItem as $i, GenerationStreamSubscriptionHandlers as $n, joinApiUrl as $r, WorkPresentationMeta as $t, AppRtcChannel as A, AppNavigationCall as Ai, SpaceFileStream as An, PublicAssetMimeType as Ar, AppPublicOwnerRecord as At, AppCommerceApi as B, AppRuntimeAnchor as Bi, PublicInviteApi as Bn, SkillsApi as Br, AppViewStatsResponse as Bt, WorkRoomCreateInput as C, createAppRuntime as Ci, OpenSpaceFileOptions as Cn, BoardSubscriptionHandlers as Cr, AppPresentationMeta as Ct, WorkRoomState as D, APP_DEVICES as Di, SpaceChannelBindingRecord as Dn, SearchApi as Dr, AppPromotionProviderStatus as Dt, WorkRoomPublishResult as E, resolveAppTransport as Ei, SessionSubscriptionHandlers as En, ReferencesApi as Er, AppPromotionProvider as Et, AppRtcMessage as F, APP_APPEARANCE_TOKENS as Fi, SpacesApi as Fn, UploadAppSourceInput as Fr, AppStatus as Ft, AppCommerceEntitlementsResponse as G, appAppearanceVar as Gi, GenerationStreamErrorEvent as Gn, ChannelsApi as Gr, WorkAuthorizeResponse as Gt, AppCommerceCreditConsumeResponse as H, AppRuntimeRect as Hi, buildSpacePath as Hn, ModelsApi as Hr, AppVisibility as Ht, AppRtcPeerEvent as I, AppAppearance as Ii, WaitForSpaceFsCopyOptions as In, UploadChatAttachmentInput as Ir, AppTargetType as It, AppCommercePurchaseResponse as J, PublicFileListEntry as Ji, GenerationStreamIntermediateMessage as Jn, HttpError as Jr, WorkCreateInput as Jt, AppCommerceOrder as K, PublicFileCreateUploadInput as Ki, GenerationStreamEvent as Kn, CohubClientOptions as Kr, WorkContent as Kt, AppRtcRemoteTrack as L, AppAppearanceToken as Li, WebSocketConnectionState as Ln, UploadChatImageAttachmentInput as Lr, AppUpdateInput as Lt, AppRtcError as M, AppNavigationOpenMessage as Mi, SpaceSandboxRecord as Mn, PublicAssetUploadProgress as Mr, AppRecord as Mt, AppRtcErrorCode as N, AppNavigationOpenResponse as Ni, SpaceTurnListOptions as Nn, PublicAssetUploadProtocol as Nr, AppResolveResponse as Nt, AppRoomRtc as O, AppDevice as Oi, SpaceClient as On, CreatePublicAssetUploadInput as Or, AppPromotionRecord as Ot, AppRtcLocalTrack as P, AppNavigationTarget as Pi, SpaceWebhooksApi as Pn, PublicAssetsApi as Pr, AppSessionResponse as Pt, WorkCommerceCreditConsumeStatus as Q, PublicFileUrlResponse as Qi, GenerationStreamSubscribeOptions as Qn, UnauthorizedContext as Qr, WorkMeta as Qt, AppRtcState as R, AppDropResource as Ri, BuildSpaceInvitePathInput as Rn, UploadGenerationInputInput as Rr, AppVersionRecord as Rt, WorkRoomAdmissionResponse as S, PopupBrokerTransport as Si, TasksApi as Sn, BoardPlaybackChangedEvent as Sr, AppMeta as St, WorkRoomEventMap as T, createSlugAppIdResolver as Ti, SessionEventName as Tn, ReferenceResourceSelector as Tr, AppPromotionEventResponse as Tt, AppCommerceCreditConsumeStatus as U, AppWindowState as Ui, AssistantMessageCommit as Un, GenerationsApi as Ur, AppsApi as Ut, AppCommerceCheckoutStatus as V, AppRuntimeConfigureRequest as Vi, buildSpaceInvitePath as Vn, PromptsApi as Vr, AppViewerGrantRecord as Vt, AppCommerceEntitlement as W, AppWindowStatus as Wi, GenerationStreamCommitEvent as Wn, CronJobsApi as Wr, PublicAppVersionSummary as Wt, WorkCommerceCheckoutStatus as X, PublicFileUploadEntryInput as Xi, GenerationStreamOutOfSyncEvent as Xn, HttpTransport as Xr, WorkExtractedPageMeta as Xt, WorkCommerceApi as Y, PublicFileListResponse as Yi, GenerationStreamLifecycleEvent as Yn, HttpTraceContext as Yr, WorkDetailResponse as Yt, WorkCommerceCreditConsumeResponse as Z, PublicFileUploadPlanEntry as Zi, GenerationStreamStateEvent as Zn, RawHttpResponse as Zr, WorkGetResponse as Zt, AppRoomInvite as _, SpaceWalletActivityPage as _a, AppRuntimeResolvedApp as _i, WorkVisibility as _n, BoardAwarenessUpdatedEvent as _r, AppContentDownload as _t, RoomEvents as a, GenerationUsageBilling as aa, AppDiagnosticListener as ai, WorkPromotionStatsResponse as an, SessionPatchApplyResult as ar, CreateUiCommandInput as at, WorkRealtimeApi as b, OriginBrokerTransport as bi, UserApi as bn, BoardClientOptions as br, AppExtractedPageMeta as bt, RoomView as c, ModelStatusEntry as ca, AppRuntimeAppResolver as ci, WorkRecord as cn, SessionPatchStatus as cr, UiCommandError as ct, AppRoom as d, DecisionAnswer as da, AppRuntimeCheckoutStatus as di, WorkStatus as dn, ConnectDisplayOptions as dr, UiCommandsApi as dt, SpaceWebhookTriggerResponse as ea, matchesUnauthorizedErrorToken as ei, WorkPromotionCreateInput as en, GenerationStreamTurnUpdatedEvent as er, WorkCommerceEntitlementsResponse as et, AppRoomAdmissionResponse as f, DecisionQuestion as fa, AppRuntimeContext as fi, WorkTargetType as fn, DisplayConnection as fr, WaitForDesktopCommandOptions as ft, AppRoomHistory as g, SpaceWalletActivity as ga, AppRuntimeRequestOptions as gi, WorkViewStatsResponse as gn, RtcTransportStats as gr, AppContent as gt, AppRoomEventMap as h, SpaceDecisionResult as ha, AppRuntimeModeConfig as hi, WorkViewSource as hn, DisplayConnectionStats as hr, AppAuthorizeResponse as ht, RoomEvent as i, GenerationTaskResult as ia, AppDiagnostic as ii, WorkPromotionRecord as in, SessionPatchApplyInput as ir, CreateDesktopCommandInput as it, AppRtcChannelOptions as j, AppNavigationLaunch as ji, SpacePublicFilesApi as jn, PublicAssetPurpose as jr, AppPublicSpaceRecord as jt, AppRtcCandidate as k, AppDevicesStatus as ki, SpaceEventName as kn, CreatePublicAssetUploadResponse as kr, AppPromotionStatsResponse as kt, RoomsApi as l, ModelStatusResponse as la, AppRuntimeAuthorizationResult as li, WorkResolveResponse as ln, createSessionPatchReducer as lr, UiCommandRecord as lt, AppRoomEvent as m, DecisionStateImage as ma, AppRuntimeInvocationContext as mi, WorkVersionRecord as mn, connectDisplay as mr, AppActionRunResponse as mt, createHttpClient as n, CreateGenerationTaskRequest as na, AppAuthorizationRequest as ni, WorkPromotionProvider as nn, createSessionGenerationStreamClient as nr, WorkCommerceProductResolveResponse as nt, RoomEventsQuery as o, ListGenerationModelsResponse as oa, AppIdResolver as oi, WorkPublicOwnerRecord as on, SessionPatchReducer as or, DesktopCommandsApi as ot, AppRoomCreateInput as p, DecisionState as pa, AppRuntimeError as pi, WorkUpdateInput as pn, DisplayConnectionState as pr, WaitForUiCommandOptions as pt, AppCommerceProductResolveResponse as q, PublicFileCreateUploadResponse as qi, GenerationStreamFinalizedEvent as qn, Fetch as qr, WorkContentDownload as qt, RoomCreated as r, CreateGenerationTaskResponse as ra, AppContextChangedListener as ri, WorkPromotionProviderStatus as rn, parseAssistantMessageCommit as rr, WorkCommercePurchaseResponse as rt, RoomInvite as s, PublicGenerationDeclaration as sa, AppRuntimeApi as si, WorkPublicSpaceRecord as sn, SessionPatchState as sr, UiCommand as st, CohubHttpClient as t, SpaceStartupResponse as ta, sanitizeAccessToken as ti, WorkPromotionEventResponse as tn, SessionGenerationStreamClient as tr, WorkCommerceOrder as tt, AppRealtimeApi as u, CreateSpaceDecisionInput as ua, AppRuntimeCheckoutState as ui, WorkSessionResponse as un, SpaceDisplaysApi as ur, UiCommandStatus as ut, AppRoomPublishResult as v, SpaceWalletSummary as va, AppRuntimeShellContext as vi, ReferralsApi as vn, BoardChangedEvent as vr, AppCreateInput as vt, WorkRoomEvent as w, createOriginAppResolver as wi, ResolveSpaceFileUrlOptions as wn, SessionAccessApi as wr, AppPromotionCreateInput as wt, WorkRoom as x, ParentBridgeTransport as xi, TaskWaitOptions as xn, BoardEventName as xr, AppGetResponse as xt, AppRoomState as y, AppRuntimeTransport as yi, UsersApi as yn, BoardClient as yr, AppDetailResponse as yt, AppRtcTrackInput as z, AppDropResourceType as zi, BuildSpacePathInput as zn, UploadPublicAssetInput as zr, AppViewSource as zt };
|