@neta-art/cohub 6.0.0 → 8.0.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.
Files changed (57) hide show
  1. package/README.md +6 -5
  2. package/dist/board/animation.d.ts +2 -1
  3. package/dist/board/animation.js +0 -1
  4. package/dist/board/core/connections.js +4 -4
  5. package/dist/board/core/export-plan.js +1 -1
  6. package/dist/board/core/shape-types.js +0 -1
  7. package/dist/board/index.d.ts +6 -5
  8. package/dist/board/index.js +7 -7
  9. package/dist/board/mutation.d.ts +2 -11
  10. package/dist/board/mutation.js +2 -56
  11. package/dist/board/render/renderers/text-card-renderer.js +1 -1
  12. package/dist/board/semantic-document.d.ts +30 -0
  13. package/dist/board/semantic-document.js +271 -0
  14. package/dist/board/semantic-mutation.d.ts +10 -0
  15. package/dist/board/semantic-mutation.js +203 -0
  16. package/dist/chunks/http.d.ts +340 -317
  17. package/dist/chunks/http.js +477 -1784
  18. package/dist/chunks/transport.js +1 -1
  19. package/dist/chunks/websocket.d.ts +3677 -3151
  20. package/dist/chunks/websocket.js +1 -1
  21. package/dist/http.d.ts +3 -3
  22. package/dist/index.d.ts +165 -119
  23. package/dist/index.js +1419 -446
  24. package/dist/protocol/dist/board-authoring.d.ts +1305 -1
  25. package/dist/protocol/dist/board-authoring.js +80 -6
  26. package/dist/protocol/dist/board-codec.d.ts +2 -2
  27. package/dist/protocol/dist/board-codec.js +19 -4
  28. package/dist/protocol/dist/board-composition.d.ts +126 -1
  29. package/dist/protocol/dist/board-composition.js +1 -9
  30. package/dist/protocol/dist/board-connection.d.ts +16 -16
  31. package/dist/protocol/dist/board-connection.js +16 -16
  32. package/dist/protocol/dist/board-document.d.ts +34 -3
  33. package/dist/protocol/dist/board-document.js +3 -1
  34. package/dist/protocol/dist/board-effect.d.ts +94 -0
  35. package/dist/protocol/dist/board-effect.js +53 -0
  36. package/dist/protocol/dist/board-json.js +16 -0
  37. package/dist/protocol/dist/board.d.ts +34 -164
  38. package/dist/protocol/dist/board.js +44 -45
  39. package/dist/protocol/dist/index.d.ts +8 -8
  40. package/dist/protocol/dist/realtime/types.d.ts +1 -1
  41. package/dist/types.d.ts +3 -1
  42. package/package.json +1 -2
  43. package/dist/board/codec.d.ts +0 -27
  44. package/dist/board/codec.js +0 -277
  45. package/dist/protocol/dist/board-content.js +0 -26
  46. package/dist/protocol/dist/board-upgrade.js +0 -2
  47. package/dist/protocol/dist/identifiers.js +0 -10
  48. package/dist/protocol/dist/index.js +0 -19
  49. package/dist/protocol/dist/provenance.js +0 -15
  50. package/dist/protocol/dist/public-identifiers.js +0 -38
  51. package/dist/protocol/dist/realtime/board-awareness.js +0 -119
  52. package/dist/protocol/dist/ui-command.js +0 -2
  53. package/dist/protocol/dist/work-promotion-stats.js +0 -11
  54. package/dist/protocol/dist/work-surface.js +0 -2
  55. package/dist/protocol/dist/work-view-stats.js +0 -3
  56. package/dist/protocol/dist/work.d.ts +0 -1
  57. /package/dist/protocol/dist/{board-upgrade.d.ts → app.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { $ as CreateInvitationInput, $i as UiCommand, $n as SpaceFsPreparingFile, Ao as BillingPayload, Ar as SpaceTurnAuthorFilter, At as MeResponse, Bn as SpaceDefaultResponse, Ca as BoardInspectInput, Ci as BoardTransactionAppliedEvent$1, Cr as SpacePublicProfile, Ct as LabelItemsResponse, Dn as SpaceCommerceBenefit, Do as SpaceCompletionResult, Dt as LabelResourceType, Ei as RealtimePatchOperation, En as SpaceCheckpointDetailResponse, Fa as BoardTransaction, Fo as RequestSource, G as CheckpointDiffFileResponse, Gi as WorkContentKind, Gn as SpaceFsCreateUploadInput, Gt as ReferenceAggregateResponse, H as Channel, Hn as SpaceFsCompleteUploadInput, Hr as UserProfile, Ia as BoardValidationResult, In as SpaceConfigInput, Ir as TaskRunDetailResponse, Jr as ChannelHealth, Jt as ReferenceQueryResponse, Kn as SpaceFsCreateUploadResponse, Kr as UserSessionsResponse, Kt as ReferenceDirection, Ln as SpaceConfigResponse, Lr as TaskRunRecord, Lt as PromptTemplateCatalogResponse, Ma as BoardPlaybackSnapshot, Mn as SpaceCommerceProduct, Mt as PatchResourceLabelsInput, Ni as SessionTurnPatchEvent, Nn as SpaceCommerceProductBenefitBinding, Nt as PatchResourceLabelsResponse, Oa as BoardOperation, On as SpaceCommerceBuyerProfile, Oo as SpaceCompletionStreamEvent, Pa as BoardSummary, Pr as SpaceUsageResponse, Pt as Permission, Q as ClaimReferralResponse, Qn as SpaceFsMoveInput, Qt as ReferralDashboard, Ri as BoardAwarenessUpdate, Rn as SpaceConfigUpdateResponse, Rr as UserActivityQuery, Rt as PublicReferral, Si as BoardPlaybackChangedEvent$1, St as LabelAssignmentRecord, Ta as BoardMutationReceipt, To as CreateSpaceCompletionInput, Tr as SpaceRole, Tt as LabelListItem, Un as SpaceFsCompleteUploadResponse, Ur as UserRulesResponse, Vn as SpaceEnvInput, Vr as UserActivityResponse, Wt as ReferenceAggregateGroupBy, X as CheckpointDiffSummary, Yt as ReferenceQueryableType, Z as CheckpointRecord, Zn as SpaceFsFileResponse, _a as BoardCapabilities, _n as SkillCatalogResponse, a as WebsocketClientOptions, at as CreateSpaceSessionInput, bi as BoardSemanticMutation, bn as SpaceAccessPolicy, br as SpacePendingDiffSummary, cn as SessionMessagesResponse, co as BoardConnectionDirection, ct as CronJobUpdatePatch, d as BatchUserProfilesResponse, di as GenerationContentBlock, dn as SessionTurnResponse, dr as SpaceFsWriteFileInput, et as CreateInvitationResponse, fi as GenerationModelDeclaration, fn as SessionTurnSignedUrlsResponse, gi as BoardAuthoringSnapshot, gr as SpaceMember, gt as InvitationDetail, hn as SessionTurnsPaginatedResponse, ho as SessionForkRecord, ht as GlobalSearchType, it as CreateSpacePromptResponse, jn as SpaceCommerceOrder, jo as ContentBlock, jt as ModelCatalogEntry, ka as BoardPlaybackCommand, ko as Usage, kr as SpaceSessionsResponse, l as AcceptInvitationResponse, ln as SessionRecord, lo as BoardConnectionRecord, lt as CursorPageInfo, mn as SessionTurnWindowResponse, mo as MessageRecord, na as UiCommandRecord, nr as SpaceFsReadFilesResponse, on as SessionMessageResponse, pa as BoardBootstrap, pn as SessionTurnStreamSnapshotResponse, po as SpacePublicEndpoints, pr as SpaceInvitationListResponse, pt as GlobalSearchResponse, qr as ChannelConfig, qt as ReferenceKind, r as WebsocketClient, ra as UiCommandStatus, rr as SpaceFsTreeResponse, rt as CreateSpacePromptInput, s as WebsocketEventPayload, sn as SessionMessagesPaginatedResponse, so as BoardConnection, st as CronJobRecord, ta as UiCommandError, tt as CreateSpaceInput, un as SessionTurnIndexResponse, ur as SpaceFsUploadResponse, va as BoardCreateInput, vo as SessionTurnRecord, vr as SpaceModListItem, wr as SpaceRecord, xi as BoardAwarenessUpdatedEvent$1, xr as SpacePresenceSnapshot, yo as SpaceTurnsResponse, yr as SpacePendingDiffFileResponse, zi as WorkArtifactDescriptor, zn as SpaceCreateResponse, zt as PublicUserPageResponse } from "./websocket.js";
1
+ import { $ as CreateInvitationInput, $i as DesktopCommand, $n as SpaceFsMoveInput, $t as ReferralDashboard, Ar as SpaceSessionsResponse, At as MeResponse, Bn as SpaceCreateResponse, Bt as PublicUserPageResponse, Ca as BoardSummary, Ct as LabelItemsResponse, Di as RealtimePatchOperation, Dn as SpaceCheckpointDetailResponse, Dt as LabelResourceType, Er as SpaceRole, Fr as SpaceUsageResponse, G as CheckpointDiffFileResponse, Gt as ReferenceAggregateGroupBy, H as Channel, Hn as SpaceEnvInput, Hr as UserActivityResponse, Ii as BoardAwarenessUpdate, Jr as ChannelConfig, Jt as ReferenceKind, Kn as SpaceFsCreateUploadInput, Kt as ReferenceAggregateResponse, Li as AppArtifactDescriptor, Ln as SpaceConfigInput, Lr as TaskRunDetailResponse, Lt as PromptTemplateCatalogResponse, Mi as SessionTurnPatchEvent, Mn as SpaceCommerceOrder, Mt as PatchResourceLabelsInput, Na as BoardSemanticMutation, Nn as SpaceCommerceProduct, Nt as PatchResourceLabelsResponse, Oa as BoardAuthoringReadInput, On as SpaceCommerceBenefit, Pn as SpaceCommerceProductBenefitBinding, Pt as Permission, Q as ClaimReferralResponse, Qn as SpaceFsFileResponse, Rn as SpaceConfigResponse, Rr as TaskRunRecord, Rt as PublicReferral, Si as BoardPlaybackChangedEvent$1, Sr as SpacePresenceSnapshot, St as LabelAssignmentRecord, Tr as SpaceRecord, Tt as LabelListItem, Ui as AppContentKind, Un as SpaceFsCompleteUploadInput, Ur as UserProfile, Vn as SpaceDefaultResponse, Wn as SpaceFsCompleteUploadResponse, Wr as UserRulesResponse, X as CheckpointDiffSummary, Xt as ReferenceQueryableType, Yr as ChannelHealth, Yt as ReferenceQueryResponse, Z as CheckpointRecord, _a as BoardMutationReceipt, _o as SpaceCompletionStreamEvent, _r as SpaceMember, a as WebsocketClientOptions, at as CreateSpaceSessionInput, bi as BoardAwarenessUpdatedEvent$1, bo as ContentBlock, br as SpacePendingDiffFileResponse, cn as SessionMessagesPaginatedResponse, co as SpaceTurnsResponse, ct as CronJobUpdatePatch, d as BatchUserProfilesResponse, dn as SessionTurnIndexResponse, dr as SpaceFsUploadResponse, er as SpaceFsPreparingFile, et as CreateInvitationResponse, fi as GenerationContentBlock, fn as SessionTurnResponse, fr as SpaceFsWriteFileInput, gn as SessionTurnsPaginatedResponse, go as SpaceCompletionResult, gt as InvitationDetail, hn as SessionTurnWindowResponse, ht as GlobalSearchType, io as SessionForkRecord, ir as SpaceFsTreeResponse, it as CreateSpacePromptResponse, jr as SpaceTurnAuthorFilter, jt as ModelCatalogEntry, ka as BoardAuthoringSnapshot, kn as SpaceCommerceBuyerProfile, l as AcceptInvitationResponse, ln as SessionMessagesResponse, lt as CursorPageInfo, ma as BoardCreateInput, mn as SessionTurnStreamSnapshotResponse, mo as CreateSpaceCompletionInput, mr as SpaceInvitationListResponse, na as DesktopCommandRecord, no as SpacePublicEndpoints, pa as BoardCapabilities, pi as GenerationModelDeclaration, pn as SessionTurnSignedUrlsResponse, pt as GlobalSearchResponse, qn as SpaceFsCreateUploadResponse, qr as UserSessionsResponse, qt as ReferenceDirection, r as WebsocketClient, ra as DesktopCommandStatus, ro as MessageRecord, rr as SpaceFsReadFilesResponse, rt as CreateSpacePromptInput, s as WebsocketEventPayload, sn as SessionMessageResponse, so as SessionTurnRecord, st as CronJobRecord, ta as DesktopCommandError, tt as CreateSpaceInput, un as SessionRecord, va as BoardPlaybackCommand, vn as SkillCatalogResponse, vo as Usage, wo as RequestSource, wr as SpacePublicProfile, xa as BoardPlaybackSnapshot, xi as BoardChangedEvent$1, xn as SpaceAccessPolicy, xr as SpacePendingDiffSummary, yo as BillingPayload, yr as SpaceModListItem, zn as SpaceConfigUpdateResponse, zr as UserActivityQuery } 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
@@ -104,9 +104,9 @@ type ListGenerationModelsResponse = {
104
104
  };
105
105
  //#endregion
106
106
  //#region ../protocol/dist/space-config.d.ts
107
- type WorkspacePreviewKind = "file" | "board" | "port";
108
- type WorkspacePreviewRef = {
109
- kind: WorkspacePreviewKind;
107
+ type WindowKind = "file" | "board" | "port";
108
+ type WindowRef = {
109
+ kind: WindowKind;
110
110
  key: string;
111
111
  };
112
112
  type WorkspaceLayoutPresentation = "split" | "focus" | "fullscreen";
@@ -114,7 +114,7 @@ type WorkspaceDefaultLayout = {
114
114
  leftSidebar?: "expanded" | "collapsed";
115
115
  filesColumn?: "visible" | "hidden";
116
116
  fileTree?: "expanded" | "collapsed";
117
- preview?: WorkspacePreviewRef;
117
+ window?: WindowRef;
118
118
  presentation?: WorkspaceLayoutPresentation;
119
119
  };
120
120
  type NewChatBackgroundBase = {
@@ -201,21 +201,21 @@ type PublicFileUrlResponse = {
201
201
  url: string;
202
202
  };
203
203
  //#endregion
204
- //#region ../protocol/dist/work-promotion-stats.d.ts
205
- declare const WORK_PROMOTION_EVENT_KEYS: readonly ["landing", "ready", "registration_completed", "paywall_viewed", "checkout_started"];
206
- type WorkPromotionEventKey = typeof WORK_PROMOTION_EVENT_KEYS[number];
204
+ //#region ../protocol/dist/app-promotion-stats.d.ts
205
+ declare const APP_PROMOTION_EVENT_KEYS: readonly ["landing", "ready", "registration_completed", "paywall_viewed", "checkout_started"];
206
+ type AppPromotionEventKey = typeof APP_PROMOTION_EVENT_KEYS[number];
207
207
  //#endregion
208
- //#region src/work-runtime.d.ts
209
- type WorkRuntimeInvocationContext = {
210
- surface: "page" | "preview" | "background" | "broker";
211
- source?: "ui_command" | "user" | "route";
208
+ //#region src/app-runtime.d.ts
209
+ type AppRuntimeInvocationContext = {
210
+ surface: "page" | "app" | "background" | "broker";
211
+ source?: "desktop_command" | "user" | "route";
212
212
  spaceId?: string;
213
213
  sessionId?: string;
214
214
  turnId?: string;
215
215
  toolCallId?: string;
216
216
  };
217
- type WorkRuntimeContext = {
218
- work: {
217
+ type AppRuntimeContext = {
218
+ app: {
219
219
  id: string;
220
220
  slug: string;
221
221
  url?: string | null;
@@ -227,98 +227,104 @@ type WorkRuntimeContext = {
227
227
  viewer?: {
228
228
  userUuid: string;
229
229
  } | null;
230
- invocation?: WorkRuntimeInvocationContext;
230
+ invocation?: AppRuntimeInvocationContext;
231
231
  permissions?: {
232
232
  scopes: Permission[];
233
- workScopes: Permission[];
233
+ appScopes: Permission[];
234
234
  viewerScopes: Permission[];
235
235
  };
236
236
  };
237
- type WorkRuntimeCheckoutStatus = "success" | "failed" | "cancel" | null;
238
- type WorkRuntimeCheckoutState = {
239
- status: WorkRuntimeCheckoutStatus;
237
+ type AppRuntimeCheckoutStatus = "success" | "failed" | "cancel" | null;
238
+ type AppRuntimeCheckoutState = {
239
+ status: AppRuntimeCheckoutStatus;
240
240
  orderId: string | null;
241
241
  };
242
242
  /**
243
- * Options for a single work runtime transport request.
243
+ * Options for a single app runtime transport request.
244
244
  */
245
- type WorkRuntimeRequestOptions = {
245
+ type AppRuntimeRequestOptions = {
246
246
  /** How long to wait for a matching response before resolving with null. */
247
247
  timeoutMs?: number;
248
248
  /** When set, re-posts the request on this interval until a response arrives. */
249
249
  retryIntervalMs?: number;
250
250
  };
251
251
  /**
252
- * Transport layer for {@link WorkRuntimeApi}. Decoupled so the same API can run
252
+ * Transport layer for {@link AppRuntimeApi}. Decoupled so the same API can run
253
253
  * over either the iframe parent bridge (bridge mode) or a popup broker window
254
254
  * (broker mode). The transport is responsible for posting the request and
255
255
  * resolving with the first matching response (or null on timeout).
256
256
  */
257
- interface WorkRuntimeTransport {
258
- request<T>(message: Record<string, unknown>, options?: WorkRuntimeRequestOptions): Promise<T | null>;
257
+ type AppContextChangedListener = (context: AppRuntimeContext) => void;
258
+ interface AppRuntimeTransport {
259
+ request<T>(message: Record<string, unknown>, options?: AppRuntimeRequestOptions): Promise<T | null>;
260
+ subscribeContextChanged?: (listener: AppContextChangedListener) => () => void;
259
261
  }
260
262
  /**
261
263
  * Bridge-mode transport: posts messages to `window.parent` (the Cohub host
262
- * embedding the work in an iframe) and listens for the matching reply.
264
+ * embedding the app in an iframe) and listens for the matching reply.
263
265
  * Behaviorally identical to the previous module-level `request()` helper.
264
266
  */
265
- declare class ParentBridgeTransport implements WorkRuntimeTransport {
267
+ declare class ParentBridgeTransport implements AppRuntimeTransport {
266
268
  private trustedParentOrigin;
267
- request<T>(message: Record<string, unknown>, options?: WorkRuntimeRequestOptions): Promise<T | null>;
269
+ private contextListeners;
270
+ private contextListener;
271
+ subscribeContextChanged(listener: AppContextChangedListener): () => void;
272
+ request<T>(message: Record<string, unknown>, options?: AppRuntimeRequestOptions): Promise<T | null>;
268
273
  }
269
274
  /**
270
- * Broker-mode transport for standalone-deployed works. Opens a popup window to
275
+ * Broker-mode transport for standalone-deployed apps. Opens a popup window to
271
276
  * the Cohub auth broker page, performs a ready-handshake, sends the request via
272
277
  * postMessage, and resolves with the broker's response. The popup is closed
273
278
  * after a single request is fulfilled (one-shot, per §7.2 of the plan).
274
279
  *
275
280
  * Non-interactive messages (`context`, `checkout-state`) are answered locally
276
- * without opening a popup — the work already knows its own workId, and
277
- * checkout state is not available on the work's own origin in broker mode.
281
+ * without opening a popup — the app already knows its own appId, and
282
+ * checkout state is not available on the app's own origin in broker mode.
278
283
  */
279
- declare class PopupBrokerTransport implements WorkRuntimeTransport {
284
+ declare class PopupBrokerTransport implements AppRuntimeTransport {
280
285
  private readonly brokerOrigin;
281
- private readonly workId?;
282
- private readonly getWorkId?;
286
+ private readonly appId?;
287
+ private readonly getAppId?;
283
288
  constructor(config: {
284
289
  brokerOrigin: string;
285
- /** Explicit work id. When absent, {@link getWorkId} is used to resolve it. */
286
- workId?: string;
290
+ /** Explicit app id. When absent, {@link getAppId} is used to resolve it. */
291
+ appId?: string;
287
292
  /**
288
- * Lazily resolves the work id at runtime (e.g. via the public
289
- * `works.getBySlug` reverse lookup). Used in standalone deployments where
290
- * the workId is not known at code-authoring time. The resolver is expected
293
+ * Lazily resolves the app id at runtime (e.g. via the public
294
+ * `apps.getBySlug` reverse lookup). Used in standalone deployments where
295
+ * the appId is not known at code-authoring time. The resolver is expected
291
296
  * to cache its own result.
292
297
  */
293
- getWorkId?: () => Promise<string | null>;
298
+ getAppId?: () => Promise<string | null>;
294
299
  });
295
- private resolveWorkId;
296
- request<T>(message: Record<string, unknown>, options?: WorkRuntimeRequestOptions): Promise<T | null>;
300
+ private resolveAppId;
301
+ request<T>(message: Record<string, unknown>, options?: AppRuntimeRequestOptions): Promise<T | null>;
297
302
  }
298
- declare class WorkRuntimeApi {
303
+ declare class AppRuntimeApi {
299
304
  private token;
300
305
  private readonly transport;
301
306
  private tokenStorageKey;
302
307
  private scopesStorageKey;
303
- private readonly workIdResolver?;
308
+ private readonly appIdResolver?;
304
309
  /** Ensures storage keys are resolved (via slug lookup) at most once. */
305
310
  private storageKeysReady;
306
311
  /** Scopes previously granted via requestAuthorization, retained so token
307
312
  * refreshes can re-authorize (preserving viewerScopes) instead of falling
308
- * back to a base session token that only carries workScopes. */
313
+ * back to a base session token that only carries appScopes. */
309
314
  private authorizedScopes;
310
- constructor(transport?: WorkRuntimeTransport, workId?: string, workIdResolver?: WorkIdResolver);
315
+ constructor(transport?: AppRuntimeTransport, appId?: string, appIdResolver?: AppIdResolver);
311
316
  /**
312
- * Resolves the localStorage keys once the workId is known. When the workId is
317
+ * Resolves the localStorage keys once the appId is known. When the appId is
313
318
  * only available via slug reverse lookup, this performs the lookup on first
314
- * use and then restores any cached token/scopes for that workId.
319
+ * use and then restores any cached token/scopes for that appId.
315
320
  */
316
321
  private ensureStorageKeys;
317
322
  private readStoredToken;
318
323
  private writeStoredToken;
319
324
  private readStoredScopes;
320
325
  private writeStoredScopes;
321
- context(): Promise<WorkRuntimeContext | null>;
326
+ context(): Promise<AppRuntimeContext | null>;
327
+ onContextChanged(listener: AppContextChangedListener): () => void;
322
328
  getAccessToken(options?: {
323
329
  forceRefresh?: boolean;
324
330
  }): Promise<string | null>;
@@ -338,51 +344,53 @@ declare class WorkRuntimeApi {
338
344
  orderId: string;
339
345
  productKey: string;
340
346
  } | null>;
341
- checkoutState(): Promise<WorkRuntimeCheckoutState | null>;
347
+ checkoutState(): Promise<AppRuntimeCheckoutState | null>;
342
348
  }
343
349
  /**
344
- * Configuration for the work runtime mode.
350
+ * Configuration for the app runtime mode.
345
351
  */
346
- type WorkRuntimeModeConfig = {
352
+ type AppRuntimeModeConfig = {
347
353
  /** Explicit mode selection. When omitted, auto-detection is used. */
348
354
  mode?: "bridge" | "broker";
349
355
  /** Cohub origin for the broker page (e.g. "https://cohub.live"). */
350
356
  brokerOrigin?: string;
351
357
  /**
352
- * The work's public id. Required for broker mode unless the slug triple
358
+ * The app's public id. Required for broker mode unless the slug triple
353
359
  * below is supplied, in which case the id is resolved at runtime.
354
360
  */
355
- workId?: string;
356
- /** Space owner's username. Used with {@link spaceSlug} + {@link workSlug} to
357
- * resolve the workId at runtime via the public `works.getBySlug` API. */
361
+ appId?: string;
362
+ /** Space owner's username. Used with {@link spaceSlug} + {@link appSlug} to
363
+ * resolve the appId at runtime via the public `apps.getBySlug` API. */
358
364
  ownerUsername?: string;
359
- /** Space slug. Part of the slug triple used for runtime workId resolution. */
365
+ /** Space slug. Part of the slug triple used for runtime appId resolution. */
360
366
  spaceSlug?: string;
361
- /** Work slug. Part of the slug triple used for runtime workId resolution. */
362
- workSlug?: string;
367
+ /** App slug. Part of the slug triple used for runtime appId resolution. */
368
+ appSlug?: string;
363
369
  };
364
- /** Lazily resolves a work's public id, e.g. via slug reverse lookup. */
365
- type WorkIdResolver = () => Promise<string | null>;
370
+ /** Lazily resolves an app's public id, e.g. via slug reverse lookup. */
371
+ type AppIdResolver = () => Promise<string | null>;
366
372
  /**
367
- * Builds a memoized workId resolver that reverse-looks-up the workId from the
368
- * public slug triple via `GET /api/works/by-slug/:username/:spaceSlug/:workSlug`.
369
- * The endpoint is anonymous (no auth) for public works, so no token is needed.
370
- * The result is cached; a failed lookup is not cached so it can be retried.
373
+ * Builds a memoized appId resolver that reverse-looks-up the appId from the
374
+ * public slug triple via `GET /api/apps/by-slug/:username/:spaceSlug/:appSlug`
375
+ * (the works REST routes are dual-mounted; `/api/works` keeps serving older
376
+ * consumers with identical payloads). The endpoint is
377
+ * anonymous (no auth) for public apps, so no token is needed. The result is
378
+ * cached; a failed lookup is not cached so it can be retried.
371
379
  */
372
- declare function createSlugWorkIdResolver(deps: {
380
+ declare function createSlugAppIdResolver(deps: {
373
381
  apiBaseUrl: string;
374
382
  fetch?: typeof globalThis.fetch;
375
383
  ownerUsername: string;
376
384
  spaceSlug: string;
377
- workSlug: string;
378
- }): WorkIdResolver;
385
+ appSlug: string;
386
+ }): AppIdResolver;
379
387
  /**
380
- * Resolves the appropriate transport based on the work mode configuration.
388
+ * Resolves the appropriate transport based on the app mode configuration.
381
389
  * Auto-detection: inside an iframe → bridge; standalone with broker config →
382
- * broker; otherwise → bridge (returns null for non-work contexts).
390
+ * broker; otherwise → bridge (returns null for non-app contexts).
383
391
  */
384
- declare function resolveWorkTransport(config?: WorkRuntimeModeConfig, workIdResolver?: WorkIdResolver): WorkRuntimeTransport;
385
- declare const createWorkRuntime: (transport?: WorkRuntimeTransport, workId?: string, workIdResolver?: WorkIdResolver) => WorkRuntimeApi;
392
+ declare function resolveAppTransport(config?: AppRuntimeModeConfig, appIdResolver?: AppIdResolver): AppRuntimeTransport;
393
+ declare const createAppRuntime: (transport?: AppRuntimeTransport, appId?: string, appIdResolver?: AppIdResolver) => AppRuntimeApi;
386
394
  //#endregion
387
395
  //#region src/transport.d.ts
388
396
  type Fetch = typeof globalThis.fetch;
@@ -429,8 +437,10 @@ type CohubClientOptions = {
429
437
  fetch?: Fetch;
430
438
  websocket?: WebsocketClientOptions;
431
439
  voice?: VoiceInputCreateOptions;
432
- /** Work runtime mode configuration (bridge vs broker). */
433
- work?: WorkRuntimeModeConfig;
440
+ /** App runtime mode configuration (bridge vs broker). */
441
+ app?: AppRuntimeModeConfig;
442
+ /** @deprecated Use `app`. Kept so existing runtimes keep configuring broker mode. */
443
+ work?: AppRuntimeModeConfig;
434
444
  /** Optional X-Cohub-Source-* headers (static or per-request getter). */
435
445
  requestSource?: RequestSource | null | (() => RequestSource | null | undefined);
436
446
  };
@@ -965,33 +975,15 @@ declare function buildSpacePath(input: BuildSpacePathInput): string;
965
975
  declare function buildSpaceInvitePath(input: BuildSpaceInvitePathInput): string;
966
976
  //#endregion
967
977
  //#region src/apis/spaces.d.ts
968
- /**
969
- * A board transaction rejected by the server. `status`/`code` let callers
970
- * distinguish a recoverable version conflict (409 / "VERSION_CONFLICT") from
971
- * transient failures, so they can rebase and retry instead of surfacing an error.
972
- */
973
- declare class BoardTransactionError extends Error {
974
- readonly status?: number | undefined;
975
- readonly code?: string | undefined;
976
- readonly body?: unknown;
977
- constructor(message: string, status?: number | undefined, code?: string | undefined, body?: unknown, options?: ErrorOptions);
978
- get isVersionConflict(): boolean;
979
- }
980
- type BoardTransactionInput = Omit<BoardTransaction, "boardId">;
981
- type BoardMutationInput = {
982
- include?: BoardInspectInput["include"];
983
- retries?: number;
984
- build: (current: BoardBootstrap) => BoardOperation[] | Promise<BoardOperation[]>;
985
- };
986
- type BoardTransactionAppliedEvent = BoardTransactionAppliedEvent$1;
978
+ type BoardChangedEvent = BoardChangedEvent$1;
987
979
  type BoardAwarenessUpdatedEvent = BoardAwarenessUpdatedEvent$1;
988
980
  type BoardPlaybackChangedEvent = BoardPlaybackChangedEvent$1;
989
- type BoardEventName = "transaction" | "awareness" | "playback";
981
+ type BoardEventName = "changed" | "awareness" | "playback";
990
982
  type BoardSubscriptionHandlers = {
991
- transaction?: (event: BoardTransactionAppliedEvent) => void;
983
+ changed?: (event: BoardChangedEvent) => void;
992
984
  awareness?: (event: BoardAwarenessUpdatedEvent) => void;
993
985
  playback?: (event: BoardPlaybackChangedEvent) => void;
994
- event?: (event: BoardTransactionAppliedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent) => void;
986
+ event?: (event: BoardChangedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent) => void;
995
987
  };
996
988
  type SessionSubscriptionHandlers = {
997
989
  patch?: (event: WebsocketEventPayload) => void;
@@ -1004,7 +996,7 @@ type SessionSubscriptionHandlers = {
1004
996
  event?: (event: WebsocketEventPayload) => void;
1005
997
  };
1006
998
  type SessionEventName = "created" | "updated" | "turn.created" | "turn.patch" | "turn.lifecycle" | "turn.updated" | "turn.finalized" | "turn.error" | "message.persisted";
1007
- type SpaceEventName = SessionEventName | "fs.changed" | "ports.changed" | "presence.updated" | "board.transaction.applied" | "board.playback.changed" | "work.version.published" | "task.created" | "task.updated" | "event";
999
+ type SpaceEventName = SessionEventName | "fs.changed" | "ports.changed" | "presence.updated" | "board.changed" | "board.playback.changed" | "app.version.published" | "task.created" | "task.updated" | "event";
1008
1000
  declare class SpacesApi {
1009
1001
  private readonly transport;
1010
1002
  constructor(transport: HttpTransport);
@@ -1512,7 +1504,7 @@ declare class BoardRealtimeClient {
1512
1504
  private readonly boardId;
1513
1505
  constructor(websocketClient: WebsocketClient | null, spaceId: string, boardId: string);
1514
1506
  subscribe(handlers: BoardSubscriptionHandlers): () => void;
1515
- on(type: "transaction", handler: (event: BoardTransactionAppliedEvent) => void): () => void;
1507
+ on(type: "changed", handler: (event: BoardChangedEvent) => void): () => void;
1516
1508
  on(type: "awareness", handler: (event: BoardAwarenessUpdatedEvent) => void): () => void;
1517
1509
  on(type: "playback", handler: (event: BoardPlaybackChangedEvent) => void): () => void;
1518
1510
  }
@@ -1523,72 +1515,14 @@ declare class BoardClient {
1523
1515
  readonly realtime: BoardRealtimeClient;
1524
1516
  private readonly boards;
1525
1517
  constructor(spaceId: string, id: string, transport: HttpTransport, websocketClient: WebsocketClient | null);
1526
- inspect(input?: BoardInspectInput, customFetch?: Fetch): Promise<BoardBootstrap>;
1527
1518
  capabilities(customFetch?: Fetch): Promise<BoardCapabilities>;
1528
1519
  summary(customFetch?: Fetch): Promise<BoardSummary>;
1529
- authoring(customFetch?: Fetch): Promise<BoardAuthoringSnapshot>;
1530
- mutateSemantic(input: Omit<BoardSemanticMutation, "mutationId"> & {
1520
+ authoring(input?: BoardAuthoringReadInput, customFetch?: Fetch): Promise<BoardAuthoringSnapshot>;
1521
+ mutateSemantic(input: Omit<BoardSemanticMutation, "mutationId" | "dryRun"> & {
1531
1522
  mutationId?: string;
1523
+ dryRun?: boolean;
1532
1524
  }): Promise<BoardMutationReceipt>;
1533
- mutate(input: BoardMutationInput): Promise<BoardMutationReceipt>;
1534
- validate(transaction: BoardTransactionInput): Promise<BoardValidationResult>;
1535
- apply(transaction: BoardTransactionInput): Promise<BoardMutationReceipt>;
1536
1525
  updateAwareness(seq: number, update: BoardAwarenessUpdate): Promise<void>;
1537
- playback(command: BoardPlaybackCommand): Promise<BoardPlaybackSnapshot>;
1538
- /**
1539
- * Read the Board's relations.
1540
- *
1541
- * A dedicated read rather than a filter over `inspect()`: a caller that wants
1542
- * the graph should not have to fetch every node's geometry to get it.
1543
- */
1544
- connections(customFetch?: Fetch): Promise<BoardConnectionRecord[]>;
1545
- /**
1546
- * Connections touching a node, in either direction.
1547
- *
1548
- * Filtered client-side from the Board's relation set, which is a single read and
1549
- * bounded by the Board rather than by the node's degree.
1550
- */
1551
- connectionsForNode(nodeId: string, customFetch?: Fetch): Promise<BoardConnectionRecord[]>;
1552
- /**
1553
- * Connect two nodes.
1554
- *
1555
- * Wraps the transaction so the common case is one call: the caller supplies the
1556
- * two nodes and, optionally, the relation. `baseVersion` still has to be the
1557
- * version the caller last read, because a relation is only meaningful against
1558
- * the node set it was authored on.
1559
- */
1560
- connect(input: {
1561
- baseVersion: number;
1562
- sourceNodeId: string;
1563
- targetNodeId: string;
1564
- id?: string;
1565
- relation?: string;
1566
- direction?: BoardConnectionDirection;
1567
- label?: string;
1568
- sourcePortId?: string;
1569
- targetPortId?: string;
1570
- txId?: string;
1571
- }): Promise<BoardMutationReceipt>;
1572
- /** Remove a connection. The nodes it joined are untouched. */
1573
- disconnect(input: {
1574
- baseVersion: number;
1575
- connectionId: string;
1576
- txId?: string;
1577
- }): Promise<BoardMutationReceipt>;
1578
- /**
1579
- * Delete a node together with every relation that names it.
1580
- *
1581
- * The server refuses to orphan a relation, so the cascade is explicit and lands
1582
- * in one transaction: one undo step restores the node and its edges together.
1583
- * `connections` is the relation set the caller already read, so this stays a
1584
- * single round-trip.
1585
- */
1586
- deleteNodeWithConnections(input: {
1587
- baseVersion: number;
1588
- nodeId: string;
1589
- connections: readonly BoardConnection[];
1590
- txId?: string;
1591
- }): Promise<BoardMutationReceipt>;
1592
1526
  play(command: Omit<Extract<BoardPlaybackCommand, {
1593
1527
  type: "play";
1594
1528
  }>, "shared"> & {
@@ -1604,7 +1538,7 @@ declare class BoardClient {
1604
1538
  type: "stop";
1605
1539
  }>): Promise<BoardPlaybackSnapshot>;
1606
1540
  subscribe(handlers: BoardSubscriptionHandlers): () => void;
1607
- on(type: "transaction", handler: (event: BoardTransactionAppliedEvent) => void): () => void;
1541
+ on(type: "changed", handler: (event: BoardChangedEvent) => void): () => void;
1608
1542
  on(type: "awareness", handler: (event: BoardAwarenessUpdatedEvent) => void): () => void;
1609
1543
  on(type: "playback", handler: (event: BoardPlaybackChangedEvent) => void): () => void;
1610
1544
  }
@@ -1614,15 +1548,12 @@ declare class SpaceBoardsApi {
1614
1548
  private readonly websocketClient;
1615
1549
  constructor(transport: HttpTransport, spaceId: string, websocketClient: WebsocketClient | null);
1616
1550
  byId(boardId: string): BoardClient;
1617
- create(input: BoardCreateInput): Promise<BoardBootstrap>;
1618
- inspect(boardId: string, input?: BoardInspectInput, customFetch?: Fetch): Promise<BoardBootstrap>;
1619
- authoring(boardId: string, customFetch?: Fetch): Promise<BoardAuthoringSnapshot>;
1551
+ create(input: BoardCreateInput): Promise<BoardAuthoringSnapshot>;
1552
+ authoring(boardId: string, input?: BoardAuthoringReadInput, customFetch?: Fetch): Promise<BoardAuthoringSnapshot>;
1620
1553
  mutateSemantic(boardId: string, mutation: BoardSemanticMutation): Promise<BoardMutationReceipt>;
1621
1554
  summary(boardId: string, customFetch?: Fetch): Promise<BoardSummary>;
1622
1555
  capabilities(boardId: string, customFetch?: Fetch): Promise<BoardCapabilities>;
1623
- validate(transaction: BoardTransaction): Promise<BoardValidationResult>;
1624
- apply(transaction: BoardTransaction): Promise<BoardMutationReceipt>;
1625
- playback(boardId: string, command: BoardPlaybackCommand): Promise<BoardPlaybackSnapshot>;
1556
+ private playback;
1626
1557
  play(boardId: string, command: Omit<Extract<BoardPlaybackCommand, {
1627
1558
  type: "play";
1628
1559
  }>, "shared"> & {
@@ -1781,37 +1712,6 @@ declare class TasksApi {
1781
1712
  }>;
1782
1713
  }
1783
1714
  //#endregion
1784
- //#region src/apis/ui-commands.d.ts
1785
- type CreateUiCommandInput = {
1786
- command: UiCommand;
1787
- commandId?: string;
1788
- targetClientId?: string;
1789
- };
1790
- type WaitForUiCommandOptions = {
1791
- timeoutMs?: number;
1792
- pollIntervalMs?: number;
1793
- signal?: AbortSignal;
1794
- };
1795
- declare class UiCommandsApi {
1796
- private readonly transport;
1797
- constructor(transport: HttpTransport);
1798
- create(input: CreateUiCommandInput): Promise<{
1799
- command: UiCommandRecord;
1800
- }>;
1801
- get(commandId: string): Promise<{
1802
- command: UiCommandRecord;
1803
- }>;
1804
- reportResult(commandId: string, input: {
1805
- status: UiCommandStatus;
1806
- result?: unknown;
1807
- error?: UiCommandError | null;
1808
- }): Promise<{
1809
- command: UiCommandRecord;
1810
- }>;
1811
- run(input: CreateUiCommandInput, options?: WaitForUiCommandOptions): Promise<UiCommandRecord>;
1812
- wait(commandId: string, options?: WaitForUiCommandOptions): Promise<UiCommandRecord>;
1813
- }
1814
- //#endregion
1815
1715
  //#region src/apis/user.d.ts
1816
1716
  declare class UserApi {
1817
1717
  private readonly transport;
@@ -1881,15 +1781,15 @@ declare class ReferralsApi {
1881
1781
  }>;
1882
1782
  }
1883
1783
  //#endregion
1884
- //#region src/apis/works.d.ts
1885
- type WorkTargetType = "file" | "directory" | "port";
1886
- type WorkStatus = "published" | "disabled";
1887
- type WorkVisibility = "public" | "space";
1888
- type WorkPresentationMeta = {
1784
+ //#region src/apis/apps.d.ts
1785
+ type AppTargetType = "file" | "directory" | "port";
1786
+ type AppStatus = "published" | "disabled";
1787
+ type AppVisibility = "public" | "space";
1788
+ type AppPresentationMeta = {
1889
1789
  hideCohubBar?: boolean;
1890
1790
  };
1891
1791
  /** Snapshot of fields extracted from the published page head. */
1892
- type WorkExtractedPageMeta = {
1792
+ type AppExtractedPageMeta = {
1893
1793
  title?: string | null;
1894
1794
  description?: string | null;
1895
1795
  icon?: string | null;
@@ -1900,11 +1800,11 @@ type WorkExtractedPageMeta = {
1900
1800
  extractedAt?: string | null;
1901
1801
  };
1902
1802
  /**
1903
- * Work presentation metadata.
1803
+ * App presentation metadata.
1904
1804
  * `title` / `description` / `icon` / `image` / `lang` / `themeColor`
1905
1805
  * power public page head, share cards, and lists.
1906
1806
  */
1907
- type WorkMeta = Record<string, unknown> & {
1807
+ type AppMeta = Record<string, unknown> & {
1908
1808
  title?: string;
1909
1809
  /** @deprecated Prefer `title`. Kept for older clients. */
1910
1810
  name?: string;
@@ -1915,68 +1815,68 @@ type WorkMeta = Record<string, unknown> & {
1915
1815
  lang?: string;
1916
1816
  /** CSS color from meta theme-color. */
1917
1817
  themeColor?: string;
1918
- presentation?: WorkPresentationMeta;
1919
- extracted?: WorkExtractedPageMeta;
1818
+ presentation?: AppPresentationMeta;
1819
+ extracted?: AppExtractedPageMeta;
1920
1820
  source?: RequestSource;
1921
1821
  };
1922
- type WorkRecord = {
1822
+ type AppRecord = {
1923
1823
  id: string;
1924
1824
  spaceId: string;
1925
1825
  userUuid: string;
1926
1826
  slug: string;
1927
- status: WorkStatus;
1928
- visibility: WorkVisibility;
1929
- targetType: WorkTargetType;
1827
+ status: AppStatus;
1828
+ visibility: AppVisibility;
1829
+ targetType: AppTargetType;
1930
1830
  targetRef: string;
1931
1831
  assetKey: string | null;
1932
1832
  currentVersionId: string | null;
1933
1833
  latestVersion: number;
1934
1834
  publishedAt: string | null;
1935
- workScopes: Permission[];
1835
+ appScopes: Permission[];
1936
1836
  allowedViewerScopes: Permission[];
1937
- meta: WorkMeta | null;
1837
+ meta: AppMeta | null;
1938
1838
  createdAt: string | null;
1939
1839
  updatedAt: string | null;
1940
1840
  };
1941
- type WorkCreateInput = {
1841
+ type AppCreateInput = {
1942
1842
  spaceId: string;
1943
1843
  slug: string;
1944
- status?: WorkStatus;
1945
- visibility?: WorkVisibility;
1946
- targetType: WorkTargetType;
1844
+ status?: AppStatus;
1845
+ visibility?: AppVisibility;
1846
+ targetType: AppTargetType;
1947
1847
  targetRef: string;
1948
1848
  assetKey?: string | null;
1949
- workScopes?: Permission[];
1849
+ appScopes?: Permission[];
1950
1850
  allowedViewerScopes?: Permission[];
1951
- meta?: WorkMeta | null;
1851
+ meta?: AppMeta | null;
1952
1852
  };
1953
- type WorkUpdateInput = Partial<{
1853
+ type AppUpdateInput = Partial<{
1954
1854
  slug: string;
1955
- status: WorkStatus;
1956
- visibility: WorkVisibility;
1957
- targetType: WorkTargetType;
1855
+ status: AppStatus;
1856
+ visibility: AppVisibility;
1857
+ targetType: AppTargetType;
1958
1858
  targetRef: string;
1959
- workScopes: Permission[];
1859
+ appScopes: Permission[];
1960
1860
  allowedViewerScopes: Permission[];
1961
- meta: WorkMeta | null;
1861
+ meta: AppMeta | null;
1962
1862
  }>;
1963
- type WorkVersionRecord = {
1863
+ type AppVersionRecord = {
1964
1864
  id: string;
1965
- workId: string;
1865
+ appId: string;
1966
1866
  version: number;
1967
- targetType: WorkTargetType;
1867
+ targetType: AppTargetType;
1968
1868
  targetRef: string;
1969
1869
  assetKey: string | null;
1970
- contentKind: WorkContentKind;
1971
- artifact: WorkArtifactDescriptor | null;
1972
- meta: WorkMeta | null;
1870
+ contentKind: AppContentKind;
1871
+ artifact: AppArtifactDescriptor | null;
1872
+ meta: AppMeta | null;
1973
1873
  createdAt: string | null;
1974
1874
  };
1975
- type WorkContentDownload = {
1875
+ type AppContentDownload = {
1976
1876
  manifestUrl: string;
1977
1877
  manifestSha256: string;
1978
1878
  };
1979
- type WorkContent = {
1879
+ type AppContent = {
1980
1880
  kind: "port";
1981
1881
  url: string;
1982
1882
  targetType: "port";
@@ -1996,7 +1896,7 @@ type WorkContent = {
1996
1896
  sizeBytes: number;
1997
1897
  sha256: string;
1998
1898
  }) & {
1999
- download?: WorkContentDownload;
1899
+ download?: AppContentDownload;
2000
1900
  }) | {
2001
1901
  kind: "board";
2002
1902
  url: string;
@@ -2005,30 +1905,30 @@ type WorkContent = {
2005
1905
  boardId: string;
2006
1906
  boardVersion: number;
2007
1907
  };
2008
- type WorkPublicSpaceRecord = {
1908
+ type AppPublicSpaceRecord = {
2009
1909
  id: string;
2010
1910
  slug: string;
2011
1911
  name: string | null;
2012
1912
  userUuid: string;
2013
1913
  publicProfile?: SpacePublicProfile | null;
2014
1914
  };
2015
- type WorkPublicOwnerRecord = {
1915
+ type AppPublicOwnerRecord = {
2016
1916
  userUuid: string;
2017
1917
  username: string;
2018
1918
  displayName: string;
2019
1919
  avatarUrl?: string | null;
2020
1920
  };
2021
- type WorkDetailResponse = {
2022
- work: WorkRecord;
2023
- space: WorkPublicSpaceRecord;
2024
- owner: WorkPublicOwnerRecord;
1921
+ type AppDetailResponse = {
1922
+ app: AppRecord;
1923
+ space: AppPublicSpaceRecord;
1924
+ owner: AppPublicOwnerRecord;
2025
1925
  publicUrl: string | null;
2026
- content: WorkContent | null;
1926
+ content: AppContent | null;
2027
1927
  };
2028
- type WorkGetResponse = WorkDetailResponse;
2029
- type WorkResolveResponse = WorkDetailResponse;
2030
- type WorkViewSource = "web" | "cli" | "api";
2031
- type WorkViewStatsResponse = {
1928
+ type AppGetResponse = AppDetailResponse;
1929
+ type AppResolveResponse = AppDetailResponse;
1930
+ type AppViewSource = "web" | "cli" | "api";
1931
+ type AppViewStatsResponse = {
2032
1932
  summary: {
2033
1933
  totalViews: number;
2034
1934
  views24h: number;
@@ -2040,31 +1940,31 @@ type WorkViewStatsResponse = {
2040
1940
  views: number;
2041
1941
  }>;
2042
1942
  sources: Array<{
2043
- source: WorkViewSource;
1943
+ source: AppViewSource;
2044
1944
  views: number;
2045
1945
  }>;
2046
1946
  };
2047
- type WorkPromotionProvider = "generic" | "meta";
2048
- type WorkPromotionRecord = {
1947
+ type AppPromotionProvider = "generic" | "meta";
1948
+ type AppPromotionRecord = {
2049
1949
  id: string;
2050
- workId: string;
1950
+ appId: string;
2051
1951
  name: string;
2052
- provider: WorkPromotionProvider | string;
1952
+ provider: AppPromotionProvider | string;
2053
1953
  parameters: Record<string, string>;
2054
1954
  createdBy: string;
2055
1955
  createdAt: string;
2056
1956
  };
2057
- type WorkPromotionProviderStatus = {
2058
- key: WorkPromotionProvider | string;
1957
+ type AppPromotionProviderStatus = {
1958
+ key: AppPromotionProvider | string;
2059
1959
  configured: boolean;
2060
1960
  };
2061
- type WorkPromotionCreateInput = {
1961
+ type AppPromotionCreateInput = {
2062
1962
  name: string;
2063
- provider: WorkPromotionProvider | string;
1963
+ provider: AppPromotionProvider | string;
2064
1964
  parameters: Record<string, string>;
2065
1965
  };
2066
- type WorkPromotionStatsResponse = {
2067
- promotion: WorkPromotionRecord;
1966
+ type AppPromotionStatsResponse = {
1967
+ promotion: AppPromotionRecord;
2068
1968
  summary: {
2069
1969
  landing: number;
2070
1970
  ready: number;
@@ -2082,7 +1982,7 @@ type WorkPromotionStatsResponse = {
2082
1982
  checkoutStarted: number;
2083
1983
  }>;
2084
1984
  };
2085
- type WorkPromotionEventResponse = {
1985
+ type AppPromotionEventResponse = {
2086
1986
  ok: true;
2087
1987
  eventId: string;
2088
1988
  browser: {
@@ -2092,12 +1992,12 @@ type WorkPromotionEventResponse = {
2092
1992
  pixelId: string;
2093
1993
  } | null;
2094
1994
  };
2095
- type WorkSessionResponse = {
1995
+ type AppSessionResponse = {
2096
1996
  token: string;
2097
1997
  expiresIn: number;
2098
- work: WorkRecord;
1998
+ app: AppRecord;
2099
1999
  };
2100
- type WorkAuthorizeResponse = {
2000
+ type AppAuthorizeResponse = {
2101
2001
  token: string;
2102
2002
  expiresIn: number;
2103
2003
  grant: {
@@ -2106,99 +2006,198 @@ type WorkAuthorizeResponse = {
2106
2006
  expiresAt: string;
2107
2007
  };
2108
2008
  };
2109
- declare class WorksApi {
2009
+ declare class AppsApi {
2110
2010
  private readonly transport;
2111
2011
  constructor(transport: HttpTransport);
2112
2012
  listBySpace(spaceId: string): Promise<{
2113
- works: WorkRecord[];
2013
+ apps: AppRecord[];
2114
2014
  }>;
2115
- get(id: string): Promise<WorkDetailResponse>;
2015
+ get(id: string): Promise<AppDetailResponse>;
2116
2016
  /**
2117
- * Loads a published work's metadata + owner info by id (public access model).
2118
- * Used by the standalone work auth broker page.
2017
+ * Loads a published app's metadata + owner info by id (public access model).
2018
+ * Used by the standalone app auth broker page.
2119
2019
  */
2120
- getPublicById(id: string): Promise<WorkDetailResponse>;
2121
- getBySlug(username: string, spaceSlug: string, workSlug: string, options?: {
2020
+ getPublicById(id: string): Promise<AppDetailResponse>;
2021
+ getBySlug(username: string, spaceSlug: string, appSlug: string, options?: {
2122
2022
  signal?: AbortSignal;
2123
- }): Promise<WorkDetailResponse>;
2124
- create(input: WorkCreateInput): Promise<{
2125
- work: WorkRecord;
2023
+ }): Promise<AppDetailResponse>;
2024
+ create(input: AppCreateInput): Promise<{
2025
+ app: AppRecord;
2126
2026
  }>;
2127
- update(id: string, input: WorkUpdateInput): Promise<{
2128
- work: WorkRecord;
2027
+ update(id: string, input: AppUpdateInput): Promise<{
2028
+ app: AppRecord;
2129
2029
  }>;
2130
2030
  delete(id: string): Promise<{
2131
2031
  ok: true;
2132
2032
  }>;
2133
- getStats(workId: string): Promise<WorkViewStatsResponse>;
2134
- listPromotions(workId: string): Promise<{
2135
- promotions: WorkPromotionRecord[];
2136
- providers: WorkPromotionProviderStatus[];
2033
+ getStats(appId: string): Promise<AppViewStatsResponse>;
2034
+ listPromotions(appId: string): Promise<{
2035
+ promotions: AppPromotionRecord[];
2036
+ providers: AppPromotionProviderStatus[];
2137
2037
  }>;
2138
- createPromotion(workId: string, input: WorkPromotionCreateInput): Promise<{
2139
- promotion: WorkPromotionRecord;
2038
+ createPromotion(appId: string, input: AppPromotionCreateInput): Promise<{
2039
+ promotion: AppPromotionRecord;
2140
2040
  }>;
2141
- getPromotionStats(workId: string, promotionId: string): Promise<WorkPromotionStatsResponse>;
2142
- recordPromotionEvent(workId: string, promotionId: string, input: {
2143
- eventKey: WorkPromotionEventKey;
2041
+ getPromotionStats(appId: string, promotionId: string): Promise<AppPromotionStatsResponse>;
2042
+ recordPromotionEvent(appId: string, promotionId: string, input: {
2043
+ eventKey: AppPromotionEventKey;
2144
2044
  eventId?: string;
2145
2045
  sourceUrl?: string;
2146
2046
  fbp?: string;
2147
2047
  fbc?: string;
2148
2048
  productKey?: string;
2149
- }): Promise<WorkPromotionEventResponse>;
2150
- recordPromotionRegistration(workId: string, promotionId: string, input?: {
2049
+ }): Promise<AppPromotionEventResponse>;
2050
+ recordPromotionRegistration(appId: string, promotionId: string, input?: {
2151
2051
  sourceUrl?: string;
2152
2052
  fbp?: string;
2153
2053
  fbc?: string;
2154
2054
  }): Promise<{
2155
2055
  reported: boolean;
2156
2056
  eventId: string | null;
2157
- browser: WorkPromotionEventResponse["browser"];
2057
+ browser: AppPromotionEventResponse["browser"];
2158
2058
  }>;
2159
- listVersions(workId: string): Promise<{
2160
- versions: WorkVersionRecord[];
2059
+ listVersions(appId: string): Promise<{
2060
+ versions: AppVersionRecord[];
2161
2061
  }>;
2162
- publishVersion(workId: string, input?: {
2163
- meta?: WorkMeta | null;
2062
+ publishVersion(appId: string, input?: {
2063
+ meta?: AppMeta | null;
2164
2064
  }): Promise<{
2165
- work: WorkRecord;
2166
- version: WorkVersionRecord;
2065
+ app: AppRecord;
2066
+ version: AppVersionRecord;
2167
2067
  }>;
2168
- createSession(workId: string): Promise<WorkSessionResponse>;
2169
- authorize(workId: string, input: {
2068
+ createSession(appId: string): Promise<AppSessionResponse>;
2069
+ authorize(appId: string, input: {
2170
2070
  scopes: Permission[];
2171
2071
  reason?: string;
2172
- }): Promise<WorkAuthorizeResponse>;
2072
+ }): Promise<AppAuthorizeResponse>;
2073
+ }
2074
+ /** @deprecated Use `AppTargetType`. */
2075
+ type WorkTargetType = AppTargetType;
2076
+ /** @deprecated Use `AppStatus`. */
2077
+ type WorkStatus = AppStatus;
2078
+ /** @deprecated Use `AppVisibility`. */
2079
+ type WorkVisibility = AppVisibility;
2080
+ /** @deprecated Use `AppPresentationMeta`. */
2081
+ type WorkPresentationMeta = AppPresentationMeta;
2082
+ /** @deprecated Use `AppExtractedPageMeta`. */
2083
+ type WorkExtractedPageMeta = AppExtractedPageMeta;
2084
+ /** @deprecated Use `AppMeta`. */
2085
+ type WorkMeta = AppMeta;
2086
+ /** @deprecated Use `AppRecord`. */
2087
+ type WorkRecord = AppRecord;
2088
+ /** @deprecated Use `AppCreateInput`. */
2089
+ type WorkCreateInput = AppCreateInput;
2090
+ /** @deprecated Use `AppUpdateInput`. */
2091
+ type WorkUpdateInput = AppUpdateInput;
2092
+ /** @deprecated Use `AppVersionRecord`. */
2093
+ type WorkVersionRecord = AppVersionRecord;
2094
+ /** @deprecated Use `AppContentDownload`. */
2095
+ type WorkContentDownload = AppContentDownload;
2096
+ /** @deprecated Use `AppContent`. */
2097
+ type WorkContent = AppContent;
2098
+ /** @deprecated Use `AppPublicSpaceRecord`. */
2099
+ type WorkPublicSpaceRecord = AppPublicSpaceRecord;
2100
+ /** @deprecated Use `AppPublicOwnerRecord`. */
2101
+ type WorkPublicOwnerRecord = AppPublicOwnerRecord;
2102
+ /** @deprecated Use `AppDetailResponse`. */
2103
+ type WorkDetailResponse = AppDetailResponse;
2104
+ /** @deprecated Use `AppGetResponse`. */
2105
+ type WorkGetResponse = AppGetResponse;
2106
+ /** @deprecated Use `AppResolveResponse`. */
2107
+ type WorkResolveResponse = AppResolveResponse;
2108
+ /** @deprecated Use `AppViewSource`. */
2109
+ type WorkViewSource = AppViewSource;
2110
+ /** @deprecated Use `AppViewStatsResponse`. */
2111
+ type WorkViewStatsResponse = AppViewStatsResponse;
2112
+ /** @deprecated Use `AppPromotionProvider`. */
2113
+ type WorkPromotionProvider = AppPromotionProvider;
2114
+ /** @deprecated Use `AppPromotionRecord`. */
2115
+ type WorkPromotionRecord = AppPromotionRecord;
2116
+ /** @deprecated Use `AppPromotionProviderStatus`. */
2117
+ type WorkPromotionProviderStatus = AppPromotionProviderStatus;
2118
+ /** @deprecated Use `AppPromotionCreateInput`. */
2119
+ type WorkPromotionCreateInput = AppPromotionCreateInput;
2120
+ /** @deprecated Use `AppPromotionStatsResponse`. */
2121
+ type WorkPromotionStatsResponse = AppPromotionStatsResponse;
2122
+ /** @deprecated Use `AppPromotionEventResponse`. */
2123
+ type WorkPromotionEventResponse = AppPromotionEventResponse;
2124
+ /** @deprecated Use `AppSessionResponse`. */
2125
+ type WorkSessionResponse = AppSessionResponse;
2126
+ /** @deprecated Use `AppAuthorizeResponse`. */
2127
+ type WorkAuthorizeResponse = AppAuthorizeResponse;
2128
+ //#endregion
2129
+ //#region src/apis/desktop-commands.d.ts
2130
+ /** @deprecated Use `DesktopCommand`. */
2131
+ type UiCommand = DesktopCommand;
2132
+ /** @deprecated Use `DesktopCommandError`. */
2133
+ type UiCommandError = DesktopCommandError;
2134
+ /** @deprecated Use `DesktopCommandRecord`. */
2135
+ type UiCommandRecord = DesktopCommandRecord;
2136
+ /** @deprecated Use `DesktopCommandStatus`. */
2137
+ type UiCommandStatus = DesktopCommandStatus;
2138
+ type CreateDesktopCommandInput = {
2139
+ command: DesktopCommand;
2140
+ commandId?: string;
2141
+ targetClientId?: string;
2142
+ };
2143
+ type WaitForDesktopCommandOptions = {
2144
+ timeoutMs?: number;
2145
+ pollIntervalMs?: number;
2146
+ signal?: AbortSignal;
2147
+ };
2148
+ /** @deprecated Use `CreateDesktopCommandInput`. */
2149
+ type CreateUiCommandInput = CreateDesktopCommandInput;
2150
+ /** @deprecated Use `WaitForDesktopCommandOptions`. */
2151
+ type WaitForUiCommandOptions = WaitForDesktopCommandOptions;
2152
+ declare class DesktopCommandsApi {
2153
+ private readonly transport;
2154
+ constructor(transport: HttpTransport);
2155
+ create(input: CreateDesktopCommandInput): Promise<{
2156
+ command: DesktopCommandRecord;
2157
+ }>;
2158
+ get(commandId: string): Promise<{
2159
+ command: DesktopCommandRecord;
2160
+ }>;
2161
+ reportResult(commandId: string, input: {
2162
+ status: DesktopCommandStatus;
2163
+ result?: unknown;
2164
+ error?: DesktopCommandError | null;
2165
+ }): Promise<{
2166
+ command: DesktopCommandRecord;
2167
+ }>;
2168
+ run(input: CreateDesktopCommandInput, options?: WaitForDesktopCommandOptions): Promise<DesktopCommandRecord>;
2169
+ wait(commandId: string, options?: WaitForDesktopCommandOptions): Promise<DesktopCommandRecord>;
2173
2170
  }
2171
+ /** @deprecated Use `DesktopCommandsApi`. */
2172
+ declare class UiCommandsApi extends DesktopCommandsApi {}
2174
2173
  //#endregion
2175
- //#region src/apis/work-commerce.d.ts
2176
- type WorkCommerceEntitlement = {
2174
+ //#region src/apis/app-commerce.d.ts
2175
+ type AppCommerceEntitlement = {
2177
2176
  benefitKey: string;
2178
2177
  enabled: boolean;
2179
2178
  metadata: Record<string, string | number | boolean>;
2180
2179
  };
2181
- type WorkCommerceEntitlementsResponse = {
2182
- entitlements: WorkCommerceEntitlement[];
2180
+ type AppCommerceEntitlementsResponse = {
2181
+ entitlements: AppCommerceEntitlement[];
2183
2182
  credits: {
2184
2183
  available: number;
2185
2184
  net: number;
2186
2185
  };
2187
2186
  businessKey: string;
2188
2187
  };
2189
- type WorkCommerceCheckoutStatus = "success" | "failed" | "cancel" | null;
2190
- type WorkCommerceProductResolveResponse = {
2188
+ type AppCommerceCheckoutStatus = "success" | "failed" | "cancel" | null;
2189
+ type AppCommerceProductResolveResponse = {
2191
2190
  products: SpaceCommerceProduct[];
2192
2191
  };
2193
- type WorkCommerceCreditConsumeStatus = "consumed" | "insufficient" | "disabled";
2194
- type WorkCommerceCreditConsumeResponse = {
2195
- status: WorkCommerceCreditConsumeStatus;
2192
+ type AppCommerceCreditConsumeStatus = "consumed" | "insufficient" | "disabled";
2193
+ type AppCommerceCreditConsumeResponse = {
2194
+ status: AppCommerceCreditConsumeStatus;
2196
2195
  amount: number;
2197
2196
  remaining: number;
2198
2197
  shortfall: number | null;
2199
2198
  businessKey: string;
2200
2199
  };
2201
- type WorkCommercePurchaseResponse = {
2200
+ type AppCommercePurchaseResponse = {
2202
2201
  checkout: {
2203
2202
  providerKey: string | null;
2204
2203
  checkoutUrl: string | null;
@@ -2211,7 +2210,7 @@ type WorkCommercePurchaseResponse = {
2211
2210
  currency: string | null;
2212
2211
  };
2213
2212
  };
2214
- type WorkCommerceOrder = {
2213
+ type AppCommerceOrder = {
2215
2214
  id: string;
2216
2215
  productKeySnapshot: string;
2217
2216
  productNameSnapshot: string;
@@ -2222,25 +2221,43 @@ type WorkCommerceOrder = {
2222
2221
  paidAt: string | null;
2223
2222
  buyerProfile: SpaceCommerceBuyerProfile | null;
2224
2223
  };
2225
- declare class WorkCommerceApi {
2224
+ declare class AppCommerceApi {
2226
2225
  private readonly transport;
2227
2226
  constructor(transport: HttpTransport);
2228
- resolveProducts(workId: string, input: {
2227
+ resolveProducts(appId: string, input: {
2229
2228
  productKeys: string[];
2230
- }): Promise<WorkCommerceProductResolveResponse>;
2231
- getEntitlements(workId: string): Promise<WorkCommerceEntitlementsResponse>;
2232
- consumeCredits(workId: string, input: {
2229
+ }): Promise<AppCommerceProductResolveResponse>;
2230
+ getEntitlements(appId: string): Promise<AppCommerceEntitlementsResponse>;
2231
+ consumeCredits(appId: string, input: {
2233
2232
  amount: number;
2234
2233
  operationId: string;
2235
2234
  reason?: string;
2236
- }): Promise<WorkCommerceCreditConsumeResponse>;
2237
- purchase(workId: string, input: {
2235
+ }): Promise<AppCommerceCreditConsumeResponse>;
2236
+ purchase(appId: string, input: {
2238
2237
  productKey: string;
2239
- }): Promise<WorkCommercePurchaseResponse>;
2240
- getOrder(workId: string, orderId: string): Promise<{
2241
- order: WorkCommerceOrder;
2238
+ }): Promise<AppCommercePurchaseResponse>;
2239
+ getOrder(appId: string, orderId: string): Promise<{
2240
+ order: AppCommerceOrder;
2242
2241
  }>;
2243
2242
  }
2243
+ /** @deprecated Use `AppCommerceEntitlement`. */
2244
+ type WorkCommerceEntitlement = AppCommerceEntitlement;
2245
+ /** @deprecated Use `AppCommerceEntitlementsResponse`. */
2246
+ type WorkCommerceEntitlementsResponse = AppCommerceEntitlementsResponse;
2247
+ /** @deprecated Use `AppCommerceCheckoutStatus`. */
2248
+ type WorkCommerceCheckoutStatus = AppCommerceCheckoutStatus;
2249
+ /** @deprecated Use `AppCommerceProductResolveResponse`. */
2250
+ type WorkCommerceProductResolveResponse = AppCommerceProductResolveResponse;
2251
+ /** @deprecated Use `AppCommerceCreditConsumeStatus`. */
2252
+ type WorkCommerceCreditConsumeStatus = AppCommerceCreditConsumeStatus;
2253
+ /** @deprecated Use `AppCommerceCreditConsumeResponse`. */
2254
+ type WorkCommerceCreditConsumeResponse = AppCommerceCreditConsumeResponse;
2255
+ /** @deprecated Use `AppCommercePurchaseResponse`. */
2256
+ type WorkCommercePurchaseResponse = AppCommercePurchaseResponse;
2257
+ /** @deprecated Use `AppCommerceApi`. */
2258
+ declare class WorkCommerceApi extends AppCommerceApi {}
2259
+ /** @deprecated Use `AppCommerceOrder`. */
2260
+ type WorkCommerceOrder = AppCommerceOrder;
2244
2261
  //#endregion
2245
2262
  //#region src/http.d.ts
2246
2263
  declare class CohubHttpClient {
@@ -2260,13 +2277,19 @@ declare class CohubHttpClient {
2260
2277
  readonly cronJobs: CronJobsApi;
2261
2278
  readonly invite: PublicInviteApi;
2262
2279
  readonly referrals: ReferralsApi;
2263
- readonly works: WorksApi;
2264
- readonly workCommerce: WorkCommerceApi;
2265
- readonly ui: UiCommandsApi;
2280
+ readonly apps: AppsApi;
2281
+ readonly appCommerce: AppCommerceApi;
2282
+ /** @deprecated Use `apps`. */
2283
+ get works(): AppsApi;
2284
+ /** @deprecated Use `appCommerce`. */
2285
+ get workCommerce(): AppCommerceApi;
2286
+ readonly desktop: DesktopCommandsApi;
2287
+ /** @deprecated Use `desktop`. */
2288
+ get ui(): DesktopCommandsApi;
2266
2289
  private readonly transport;
2267
2290
  constructor(options?: CohubClientOptions);
2268
2291
  space(spaceId: string): SpaceClient;
2269
2292
  }
2270
2293
  declare const createHttpClient: (options?: CohubClientOptions) => CohubHttpClient;
2271
2294
  //#endregion
2272
- export { BoardTransactionAppliedEvent as $, ModelsApi as $t, WorkResolveResponse as A, PublicFileListResponse as An, parseAssistantMessageCommit as At, ReferralsApi as B, PublicGenerationDeclaration as Bn, SearchApi as Bt, WorkPromotionProvider as C, WorkRuntimeTransport as Cn, GenerationStreamOutOfSyncEvent as Ct, WorkPublicOwnerRecord as D, PublicFileCreateUploadInput as Dn, GenerationStreamTurnUpdatedEvent as Dt, WorkPromotionStatsResponse as E, resolveWorkTransport as En, GenerationStreamSubscriptionHandlers as Et, WorkVersionRecord as F, CreateGenerationTaskRequest as Fn, SessionPatchStatus as Ft, WaitForUiCommandOptions as G, PublicAssetUploadProgress as Gt, UserApi as H, ModelStatusResponse as Hn, CreatePublicAssetUploadResponse as Ht, WorkViewSource as I, CreateGenerationTaskResponse as In, createSessionPatchReducer as It, BoardClient as J, UploadChatAttachmentInput as Jt, TasksApi as K, PublicAssetUploadProtocol as Kt, WorkViewStatsResponse as L, GenerationTaskResult as Ln, SessionAccessApi as Lt, WorkStatus as M, PublicFileUploadPlanEntry as Mn, SessionPatchApplyResult as Mt, WorkTargetType as N, PublicFileUrlResponse as Nn, SessionPatchReducer as Nt, WorkPublicSpaceRecord as O, PublicFileCreateUploadResponse as On, SessionGenerationStreamClient as Ot, WorkUpdateInput as P, SpaceStartupResponse as Pn, SessionPatchState as Pt, BoardSubscriptionHandlers as Q, PromptsApi as Qt, WorkVisibility as R, GenerationUsageBilling as Rn, ReferenceResourceSelector as Rt, WorkPromotionEventResponse as S, WorkRuntimeRequestOptions as Sn, GenerationStreamLifecycleEvent as St, WorkPromotionRecord as T, createWorkRuntime as Tn, GenerationStreamSubscribeOptions as Tt, CreateUiCommandInput as U, PublicAssetMimeType as Ut, UsersApi as V, ModelStatusEntry as Vn, CreatePublicAssetUploadInput as Vt, UiCommandsApi as W, PublicAssetPurpose as Wt, BoardMutationInput as X, UploadPublicAssetInput as Xt, BoardEventName as Y, UploadChatImageAttachmentInput as Yt, BoardPlaybackChangedEvent as Z, SkillsApi as Zt, WorkExtractedPageMeta as _, WorkRuntimeCheckoutState as _n, GenerationStreamCommitEvent as _t, WorkCommerceCreditConsumeResponse as a, HttpError as an, SpaceClient as at, WorkPresentationMeta as b, WorkRuntimeInvocationContext as bn, GenerationStreamFinalizedEvent as bt, WorkCommerceEntitlementsResponse as c, RawHttpResponse as cn, SpaceTurnListOptions as ct, WorkCommercePurchaseResponse as d, matchesUnauthorizedErrorToken as dn, BuildSpaceInvitePathInput as dt, GenerationsApi as en, BoardTransactionError as et, WorkAuthorizeResponse as f, sanitizeAccessToken as fn, BuildSpacePathInput as ft, WorkDetailResponse as g, WorkRuntimeApi as gn, AssistantMessageCommit as gt, WorkCreateInput as h, WorkIdResolver as hn, buildSpacePath as ht, WorkCommerceCheckoutStatus as i, Fetch as in, SpaceChannelBindingRecord as it, WorkSessionResponse as j, PublicFileUploadEntryInput as jn, SessionPatchApplyInput as jt, WorkRecord as k, PublicFileListEntry as kn, createSessionGenerationStreamClient as kt, WorkCommerceOrder as l, UnauthorizedContext as ln, SpacesApi as lt, WorkContentDownload as m, PopupBrokerTransport as mn, buildSpaceInvitePath as mt, createHttpClient as n, ChannelsApi as nn, SessionEventName as nt, WorkCommerceCreditConsumeStatus as o, HttpTraceContext as on, SpaceEventName as ot, WorkContent as p, ParentBridgeTransport as pn, PublicInviteApi as pt, BoardAwarenessUpdatedEvent as q, PublicAssetsApi as qt, WorkCommerceApi as r, CohubClientOptions as rn, SessionSubscriptionHandlers as rt, WorkCommerceEntitlement as s, HttpTransport as sn, SpacePublicFilesApi as st, CohubHttpClient as t, CronJobsApi as tn, BoardTransactionInput as tt, WorkCommerceProductResolveResponse as u, joinApiUrl as un, WebSocketConnectionState as ut, WorkGetResponse as v, WorkRuntimeCheckoutStatus as vn, GenerationStreamErrorEvent as vt, WorkPromotionProviderStatus as w, createSlugWorkIdResolver as wn, GenerationStreamStateEvent as wt, WorkPromotionCreateInput as x, WorkRuntimeModeConfig as xn, GenerationStreamIntermediateMessage as xt, WorkMeta as y, WorkRuntimeContext as yn, GenerationStreamEvent as yt, WorksApi as z, ListGenerationModelsResponse as zn, ReferencesApi as zt };
2295
+ export { AppUpdateInput as $, AppContextChangedListener as $n, PublicInviteApi as $t, WaitForUiCommandOptions as A, PublicAssetPurpose as An, WorkViewStatsResponse as At, AppPromotionCreateInput as B, GenerationsApi as Bn, BoardPlaybackChangedEvent as Bt, DesktopCommandsApi as C, SessionAccessApi as Cn, CreateGenerationTaskResponse as Cr, WorkResolveResponse as Ct, UiCommandStatus as D, CreatePublicAssetUploadInput as Dn, PublicGenerationDeclaration as Dr, WorkUpdateInput as Dt, UiCommandRecord as E, SearchApi as En, ListGenerationModelsResponse as Er, WorkTargetType as Et, AppDetailResponse as F, UploadChatImageAttachmentInput as Fn, TasksApi as Ft, AppPromotionStatsResponse as G, HttpError as Gn, SpaceClient as Gt, AppPromotionProvider as H, ChannelsApi as Hn, SessionEventName as Ht, AppExtractedPageMeta as I, UploadPublicAssetInput as In, BoardAwarenessUpdatedEvent as It, AppRecord as J, RawHttpResponse as Jn, SpaceTurnListOptions as Jt, AppPublicOwnerRecord as K, HttpTraceContext as Kn, SpaceEventName as Kt, AppGetResponse as L, SkillsApi as Ln, BoardChangedEvent as Lt, AppContent as M, PublicAssetUploadProtocol as Mn, ReferralsApi as Mt, AppContentDownload as N, PublicAssetsApi as Nn, UsersApi as Nt, UiCommandsApi as O, CreatePublicAssetUploadResponse as On, ModelStatusEntry as Or, WorkVersionRecord as Ot, AppCreateInput as P, UploadChatAttachmentInput as Pn, UserApi as Pt, AppTargetType as Q, sanitizeAccessToken as Qn, BuildSpacePathInput as Qt, AppMeta as R, PromptsApi as Rn, BoardClient as Rt, CreateUiCommandInput as S, createSessionPatchReducer as Sn, CreateGenerationTaskRequest as Sr, WorkRecord as St, UiCommandError as T, ReferencesApi as Tn, GenerationUsageBilling as Tr, WorkStatus as Tt, AppPromotionProviderStatus as U, CohubClientOptions as Un, SessionSubscriptionHandlers as Ut, AppPromotionEventResponse as V, CronJobsApi as Vn, BoardSubscriptionHandlers as Vt, AppPromotionRecord as W, Fetch as Wn, SpaceChannelBindingRecord as Wt, AppSessionResponse as X, joinApiUrl as Xn, WebSocketConnectionState as Xt, AppResolveResponse as Y, UnauthorizedContext as Yn, SpacesApi as Yt, AppStatus as Z, matchesUnauthorizedErrorToken as Zn, BuildSpaceInvitePathInput as Zt, WorkCommerceEntitlementsResponse as _, SessionPatchApplyInput as _n, PublicFileListResponse as _r, WorkPromotionProviderStatus as _t, AppCommerceCreditConsumeResponse as a, GenerationStreamEvent as an, AppRuntimeInvocationContext as ar, WorkAuthorizeResponse as at, WorkCommercePurchaseResponse as b, SessionPatchState as bn, PublicFileUrlResponse as br, WorkPublicOwnerRecord as bt, AppCommerceEntitlementsResponse as c, GenerationStreamLifecycleEvent as cn, AppRuntimeTransport as cr, WorkCreateInput as ct, AppCommercePurchaseResponse as d, GenerationStreamSubscribeOptions as dn, createAppRuntime as dr, WorkGetResponse as dt, buildSpaceInvitePath as en, AppIdResolver as er, AppVersionRecord as et, WorkCommerceApi as f, GenerationStreamSubscriptionHandlers as fn, createSlugAppIdResolver as fr, WorkMeta as ft, WorkCommerceEntitlement as g, parseAssistantMessageCommit as gn, PublicFileListEntry as gr, WorkPromotionProvider as gt, WorkCommerceCreditConsumeStatus as h, createSessionGenerationStreamClient as hn, PublicFileCreateUploadResponse as hr, WorkPromotionEventResponse as ht, AppCommerceCheckoutStatus as i, GenerationStreamErrorEvent as in, AppRuntimeContext as ir, AppsApi as it, AppAuthorizeResponse as j, PublicAssetUploadProgress as jn, WorkVisibility as jt, WaitForDesktopCommandOptions as k, PublicAssetMimeType as kn, ModelStatusResponse as kr, WorkViewSource as kt, AppCommerceOrder as l, GenerationStreamOutOfSyncEvent as ln, ParentBridgeTransport as lr, WorkDetailResponse as lt, WorkCommerceCreditConsumeResponse as m, SessionGenerationStreamClient as mn, PublicFileCreateUploadInput as mr, WorkPromotionCreateInput as mt, createHttpClient as n, AssistantMessageCommit as nn, AppRuntimeCheckoutState as nr, AppViewStatsResponse as nt, AppCommerceCreditConsumeStatus as o, GenerationStreamFinalizedEvent as on, AppRuntimeModeConfig as or, WorkContent as ot, WorkCommerceCheckoutStatus as p, GenerationStreamTurnUpdatedEvent as pn, resolveAppTransport as pr, WorkPresentationMeta as pt, AppPublicSpaceRecord as q, HttpTransport as qn, SpacePublicFilesApi as qt, AppCommerceApi as r, GenerationStreamCommitEvent as rn, AppRuntimeCheckoutStatus as rr, AppVisibility as rt, AppCommerceEntitlement as s, GenerationStreamIntermediateMessage as sn, AppRuntimeRequestOptions as sr, WorkContentDownload as st, CohubHttpClient as t, buildSpacePath as tn, AppRuntimeApi as tr, AppViewSource as tt, AppCommerceProductResolveResponse as u, GenerationStreamStateEvent as un, PopupBrokerTransport as ur, WorkExtractedPageMeta as ut, WorkCommerceOrder as v, SessionPatchApplyResult as vn, PublicFileUploadEntryInput as vr, WorkPromotionRecord as vt, UiCommand as w, ReferenceResourceSelector as wn, GenerationTaskResult as wr, WorkSessionResponse as wt, CreateDesktopCommandInput as x, SessionPatchStatus as xn, SpaceStartupResponse as xr, WorkPublicSpaceRecord as xt, WorkCommerceProductResolveResponse as y, SessionPatchReducer as yn, PublicFileUploadPlanEntry as yr, WorkPromotionStatsResponse as yt, AppPresentationMeta as z, ModelsApi as zn, BoardEventName as zt };