@neta-art/cohub 9.0.0 → 10.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 (178) hide show
  1. package/README.md +100 -103
  2. package/dist/board/editor/align.d.ts +11 -0
  3. package/dist/board/editor/align.js +72 -0
  4. package/dist/board/editor/animation.d.ts +14 -0
  5. package/dist/board/editor/animation.js +172 -0
  6. package/dist/board/editor/camera.d.ts +32 -0
  7. package/dist/board/editor/camera.js +137 -0
  8. package/dist/board/editor/clipboard.d.ts +41 -0
  9. package/dist/board/editor/clipboard.js +122 -0
  10. package/dist/board/editor/connection-ports.d.ts +19 -0
  11. package/dist/board/editor/connection-ports.js +85 -0
  12. package/dist/board/editor/context.d.ts +111 -0
  13. package/dist/board/editor/context.js +30 -0
  14. package/dist/board/editor/copy.d.ts +17 -0
  15. package/dist/board/editor/copy.js +116 -0
  16. package/dist/board/editor/creation.d.ts +47 -0
  17. package/dist/board/editor/creation.js +224 -0
  18. package/dist/board/editor/deletion.d.ts +9 -0
  19. package/dist/board/editor/deletion.js +90 -0
  20. package/dist/board/editor/document-edits.d.ts +22 -0
  21. package/dist/board/editor/document-edits.js +193 -0
  22. package/dist/board/editor/document.d.ts +35 -0
  23. package/dist/board/editor/document.js +255 -0
  24. package/dist/board/editor/editor.d.ts +210 -0
  25. package/dist/board/editor/editor.js +429 -0
  26. package/dist/board/editor/index.d.ts +18 -0
  27. package/dist/board/editor/index.js +12 -0
  28. package/dist/board/editor/interaction.d.ts +115 -0
  29. package/dist/board/editor/interaction.js +584 -0
  30. package/dist/board/editor/query.d.ts +27 -0
  31. package/dist/board/editor/query.js +201 -0
  32. package/dist/board/editor/remote.d.ts +11 -0
  33. package/dist/board/editor/remote.js +55 -0
  34. package/dist/board/editor/selection-transform.d.ts +24 -0
  35. package/dist/board/editor/selection-transform.js +81 -0
  36. package/dist/board/editor/selection.d.ts +33 -0
  37. package/dist/board/editor/selection.js +196 -0
  38. package/dist/board/editor/snapping.d.ts +33 -0
  39. package/dist/board/editor/snapping.js +75 -0
  40. package/dist/board/editor/snapshots.d.ts +27 -0
  41. package/dist/board/editor/snapshots.js +132 -0
  42. package/dist/board/editor/spatial.d.ts +41 -0
  43. package/dist/board/editor/spatial.js +191 -0
  44. package/dist/board/editor/state.d.ts +12 -0
  45. package/dist/board/editor/state.js +49 -0
  46. package/dist/board/editor/tool.d.ts +10 -0
  47. package/dist/board/editor/tool.js +19 -0
  48. package/dist/board/editor/wheel.d.ts +5 -0
  49. package/dist/board/editor/wheel.js +17 -0
  50. package/dist/board/export/index.d.ts +5 -4
  51. package/dist/board/export/index.js +4 -3
  52. package/dist/board/export/node/index.d.ts +55 -0
  53. package/dist/board/{headless → export/node}/index.js +12 -12
  54. package/dist/board/export/node/sketch.d.ts +19 -0
  55. package/dist/board/{headless → export/node}/sketch.js +6 -6
  56. package/dist/board/export/scene.d.ts +6 -4
  57. package/dist/board/export/scene.js +4 -3
  58. package/dist/board/{animation.d.ts → model/animation.d.ts} +4 -4
  59. package/dist/board/{animation.js → model/animation.js} +3 -3
  60. package/dist/board/{core → model}/arrow-geometry.d.ts +2 -2
  61. package/dist/board/{core → model}/arrow-geometry.js +2 -2
  62. package/dist/board/{core → model}/draw-geometry.d.ts +2 -2
  63. package/dist/board/{core → model}/draw-geometry.js +1 -1
  64. package/dist/board/model/draw-input.d.ts +14 -0
  65. package/dist/board/model/draw-input.js +28 -0
  66. package/dist/board/{core → model}/export-assets.d.ts +1 -1
  67. package/dist/board/{core → model}/export-assets.js +1 -1
  68. package/dist/board/{core → model}/export-plan.d.ts +2 -2
  69. package/dist/board/{core → model}/export-plan.js +2 -2
  70. package/dist/board/{core → model}/file-preview.d.ts +1 -1
  71. package/dist/board/{core → model}/file-preview.js +1 -1
  72. package/dist/board/{core → model}/file-snapshot.d.ts +1 -1
  73. package/dist/board/{core → model}/file-snapshot.js +1 -1
  74. package/dist/board/{geometry.d.ts → model/geometry.d.ts} +3 -3
  75. package/dist/board/{geometry.js → model/geometry.js} +1 -1
  76. package/dist/board/{image-key.d.ts → model/image-key.d.ts} +2 -2
  77. package/dist/board/{image-key.js → model/image-key.js} +1 -1
  78. package/dist/board/model/index.d.ts +35 -0
  79. package/dist/board/{index.js → model/index.js} +26 -22
  80. package/dist/board/model/items/builtin.d.ts +5 -0
  81. package/dist/board/model/items/builtin.js +119 -0
  82. package/dist/board/model/items/create.d.ts +59 -0
  83. package/dist/board/model/items/create.js +271 -0
  84. package/dist/board/model/items/definition.d.ts +35 -0
  85. package/dist/board/model/items/definition.js +18 -0
  86. package/dist/board/model/items/id.d.ts +5 -0
  87. package/dist/board/model/items/id.js +11 -0
  88. package/dist/board/model/items/index.d.ts +6 -0
  89. package/dist/board/model/items/index.js +6 -0
  90. package/dist/board/model/items/registry.d.ts +35 -0
  91. package/dist/board/model/items/registry.js +84 -0
  92. package/dist/board/{media-playback.d.ts → model/media-playback.d.ts} +2 -2
  93. package/dist/board/{media-playback.js → model/media-playback.js} +1 -1
  94. package/dist/board/{media.d.ts → model/media.d.ts} +1 -1
  95. package/dist/board/{media.js → model/media.js} +1 -1
  96. package/dist/board/{core → model}/palette.d.ts +1 -1
  97. package/dist/board/{core → model}/palette.js +1 -1
  98. package/dist/board/{presets.d.ts → model/presets.d.ts} +3 -3
  99. package/dist/board/{presets.js → model/presets.js} +1 -1
  100. package/dist/board/{replay.d.ts → model/replay.d.ts} +5 -5
  101. package/dist/board/{replay.js → model/replay.js} +2 -2
  102. package/dist/board/{core → model}/scene.d.ts +1 -1
  103. package/dist/board/{core → model}/scene.js +1 -1
  104. package/dist/board/model/shape-types.d.ts +8 -0
  105. package/dist/board/model/shape-types.js +8 -0
  106. package/dist/board/{task.d.ts → model/task.d.ts} +4 -4
  107. package/dist/board/{task.js → model/task.js} +3 -3
  108. package/dist/board/{core → model}/text-metrics.d.ts +1 -1
  109. package/dist/board/{core → model}/text-metrics.js +1 -1
  110. package/dist/board/{core → model}/tool-styles.d.ts +1 -1
  111. package/dist/board/{core → model}/tool-styles.js +1 -1
  112. package/dist/board/{runtime/board-player.d.ts → player/index.d.ts} +2 -2
  113. package/dist/board/{runtime/board-player.js → player/index.js} +5 -4
  114. package/dist/board/render/board-background.d.ts +1 -1
  115. package/dist/board/render/clip.d.ts +1 -1
  116. package/dist/board/render/index.d.ts +2 -2
  117. package/dist/board/render/index.js +2 -2
  118. package/dist/board/render/media-interaction.d.ts +2 -2
  119. package/dist/board/render/media-interaction.js +1 -1
  120. package/dist/board/render/palette.d.ts +1 -1
  121. package/dist/board/render/palette.js +1 -1
  122. package/dist/board/render/renderers/arrow-card-renderer.js +1 -1
  123. package/dist/board/render/renderers/board-renderer-registry.d.ts +11 -6
  124. package/dist/board/render/renderers/board-renderer-registry.js +15 -15
  125. package/dist/board/render/renderers/draw-card-renderer.js +1 -1
  126. package/dist/board/render/renderers/far-plate.js +1 -1
  127. package/dist/board/render/renderers/file-card-renderer.d.ts +1 -1
  128. package/dist/board/render/renderers/file-card-renderer.js +2 -2
  129. package/dist/board/render/renderers/image-card-renderer.d.ts +1 -1
  130. package/dist/board/render/renderers/shape-card-renderer.js +1 -1
  131. package/dist/board/render/renderers/task-card-renderer.js +1 -1
  132. package/dist/board/render/renderers/text-card-renderer.js +1 -1
  133. package/dist/board/render/renderers/video-card-renderer.d.ts +1 -1
  134. package/dist/board/render/stroke.d.ts +1 -1
  135. package/dist/board/render/stroke.js +1 -1
  136. package/dist/board/render/text-measurement.js +1 -1
  137. package/dist/board/replica/index.d.ts +70 -0
  138. package/dist/board/replica/index.js +276 -0
  139. package/dist/board/stage/assets.d.ts +41 -0
  140. package/dist/board/stage/assets.js +350 -0
  141. package/dist/board/stage/index.d.ts +8 -0
  142. package/dist/board/stage/index.js +8 -0
  143. package/dist/board/stage/lru.d.ts +32 -0
  144. package/dist/board/stage/lru.js +29 -0
  145. package/dist/board/stage/pointer.d.ts +8 -0
  146. package/dist/board/stage/pointer.js +33 -0
  147. package/dist/board/stage/scene.d.ts +85 -0
  148. package/dist/board/stage/scene.js +512 -0
  149. package/dist/board/stage/stage.d.ts +66 -0
  150. package/dist/board/stage/stage.js +568 -0
  151. package/dist/board/stage/texture-pool.d.ts +24 -0
  152. package/dist/board/stage/texture-pool.js +154 -0
  153. package/dist/board/stage/views.d.ts +38 -0
  154. package/dist/board/stage/views.js +93 -0
  155. package/dist/chunks/environment.d.ts +25 -1
  156. package/dist/chunks/http.d.ts +99 -66
  157. package/dist/chunks/http.js +214 -207
  158. package/dist/chunks/websocket.d.ts +1 -1
  159. package/dist/http.d.ts +2 -2
  160. package/dist/index.d.ts +3 -3
  161. package/dist/index.js +20 -4
  162. package/dist/media.d.ts +1 -10
  163. package/dist/media.js +16 -27
  164. package/dist/protocol/dist/board-patch.js +1 -1
  165. package/dist/protocol/dist/board.d.ts +28 -2
  166. package/dist/protocol/dist/board.js +3 -1
  167. package/dist/protocol/dist/core/media.d.ts +5 -0
  168. package/dist/protocol/dist/core/media.js +39 -0
  169. package/dist/protocol/dist/index.d.ts +5 -5
  170. package/dist/types.d.ts +1 -1
  171. package/package.json +26 -14
  172. package/dist/board/core/shape-definition.d.ts +0 -23
  173. package/dist/board/core/shape-definition.js +0 -45
  174. package/dist/board/core/shape-types.d.ts +0 -38
  175. package/dist/board/core/shape-types.js +0 -22
  176. package/dist/board/headless/index.d.ts +0 -55
  177. package/dist/board/headless/sketch.d.ts +0 -19
  178. package/dist/board/index.d.ts +0 -30
@@ -1051,6 +1051,213 @@ function ensureRealtimeConnected(websocketClient) {
1051
1051
  });
1052
1052
  }
1053
1053
  //#endregion
1054
+ //#region src/board/model/items/id.ts
1055
+ function createBoardEntityId() {
1056
+ const cryptoRef = globalThis.crypto;
1057
+ if (cryptoRef && typeof cryptoRef.randomUUID === "function") return cryptoRef.randomUUID();
1058
+ return `c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
1059
+ }
1060
+ //#endregion
1061
+ //#region src/board/client/index.ts
1062
+ var BoardRealtimeClient = class {
1063
+ websocketClient;
1064
+ spaceId;
1065
+ boardId;
1066
+ constructor(websocketClient, spaceId, boardId) {
1067
+ this.websocketClient = websocketClient;
1068
+ this.spaceId = spaceId;
1069
+ this.boardId = boardId;
1070
+ }
1071
+ subscribe(handlers) {
1072
+ if (!this.websocketClient) throw new Error("realtime transport is not configured for this client");
1073
+ ensureRealtimeConnected(this.websocketClient);
1074
+ const releaseRoom = this.websocketClient.retainRooms([getRealtimeSpaceRoom(this.spaceId), getRealtimeBoardRoom(this.boardId)]);
1075
+ const unsubscribe = this.websocketClient.on("event", (event) => {
1076
+ if (event.spaceId !== this.spaceId) return;
1077
+ if (event.type === "board.changed" && event.payload.boardId === this.boardId) {
1078
+ const changedEvent = event;
1079
+ handlers.event?.(changedEvent);
1080
+ handlers.changed?.(changedEvent);
1081
+ }
1082
+ if (event.type === "board.awareness.updated" && event.payload.boardId === this.boardId) {
1083
+ const awarenessEvent = event;
1084
+ if (awarenessEvent.payload.connectionId !== this.websocketClient?.connectionId) {
1085
+ handlers.event?.(awarenessEvent);
1086
+ handlers.awareness?.(awarenessEvent);
1087
+ }
1088
+ }
1089
+ if (event.type === "board.playback.changed" && event.payload.boardId === this.boardId) {
1090
+ const playbackEvent = event;
1091
+ handlers.event?.(playbackEvent);
1092
+ handlers.playback?.(playbackEvent);
1093
+ }
1094
+ });
1095
+ return () => {
1096
+ unsubscribe();
1097
+ releaseRoom();
1098
+ };
1099
+ }
1100
+ on(type, handler) {
1101
+ if (type === "changed") return this.subscribe({ changed: handler });
1102
+ if (type === "awareness") return this.subscribe({ awareness: handler });
1103
+ return this.subscribe({ playback: handler });
1104
+ }
1105
+ };
1106
+ var BoardClient = class {
1107
+ spaceId;
1108
+ id;
1109
+ realtime;
1110
+ http;
1111
+ websocket;
1112
+ constructor(options) {
1113
+ this.spaceId = options.spaceId;
1114
+ this.id = options.boardId;
1115
+ this.http = options.http;
1116
+ this.websocket = options.websocket;
1117
+ this.realtime = new BoardRealtimeClient(options.websocket, options.spaceId, options.boardId);
1118
+ }
1119
+ get path() {
1120
+ return `/api/spaces/${this.spaceId}/boards/${this.id}`;
1121
+ }
1122
+ /** Read the Board, or part of it. Every value is complete, defaults included. */
1123
+ get(input = {}, customFetch) {
1124
+ const params = new URLSearchParams();
1125
+ if (input.only?.length) params.set("only", input.only.join(","));
1126
+ if (input.rect) params.set("rect", [
1127
+ input.rect.x,
1128
+ input.rect.y,
1129
+ input.rect.width,
1130
+ input.rect.height
1131
+ ].join(","));
1132
+ if (input.within) params.set("within", input.within);
1133
+ if (input.items?.length) params.set("items", input.items.join(","));
1134
+ if (input.animations?.length) params.set("animations", input.animations.join(","));
1135
+ if (input.limit !== void 0) params.set("limit", String(input.limit));
1136
+ if (input.cursor) params.set("cursor", input.cursor);
1137
+ const query = params.toString();
1138
+ return this.http.request(`${this.path}${query ? `?${query}` : ""}`, { fetch: customFetch });
1139
+ }
1140
+ /** Merge a patch into the Board: fields merge, `null` deletes. */
1141
+ apply(patch, options = {}) {
1142
+ return this.http.request(`${this.path}/apply`, {
1143
+ method: "POST",
1144
+ headers: { "Content-Type": "application/json" },
1145
+ body: JSON.stringify({
1146
+ ...options,
1147
+ patch,
1148
+ mutationId: options.mutationId ?? createBoardEntityId()
1149
+ })
1150
+ });
1151
+ }
1152
+ /** Transactions newest first, each with the before/after state of what it changed. */
1153
+ history(input = {}, customFetch) {
1154
+ const params = new URLSearchParams();
1155
+ if (input.before !== void 0) params.set("before", String(input.before));
1156
+ if (input.limit !== void 0) params.set("limit", String(input.limit));
1157
+ const query = params.toString();
1158
+ return this.http.request(`${this.path}/history${query ? `?${query}` : ""}`, { fetch: customFetch });
1159
+ }
1160
+ /** Return the Board to an earlier version as a new write. */
1161
+ restore(version) {
1162
+ return this.http.request(`${this.path}/restore`, {
1163
+ method: "POST",
1164
+ headers: { "Content-Type": "application/json" },
1165
+ body: JSON.stringify({ version })
1166
+ });
1167
+ }
1168
+ playback(command) {
1169
+ return this.http.request(`${this.path}/playback`, {
1170
+ method: "POST",
1171
+ headers: { "Content-Type": "application/json" },
1172
+ body: JSON.stringify(command)
1173
+ }).then((response) => response.playback);
1174
+ }
1175
+ /** Shared playback: every viewer follows the same clock. */
1176
+ play(animationId, options = {}) {
1177
+ return this.playback({
1178
+ commandId: createBoardEntityId(),
1179
+ type: "play",
1180
+ animationId,
1181
+ ...options
1182
+ });
1183
+ }
1184
+ pause() {
1185
+ return this.playback({
1186
+ commandId: createBoardEntityId(),
1187
+ type: "pause"
1188
+ });
1189
+ }
1190
+ resume() {
1191
+ return this.playback({
1192
+ commandId: createBoardEntityId(),
1193
+ type: "resume"
1194
+ });
1195
+ }
1196
+ seek(position) {
1197
+ return this.playback({
1198
+ commandId: createBoardEntityId(),
1199
+ type: "seek",
1200
+ position
1201
+ });
1202
+ }
1203
+ /** Continue past the marker a presentation is holding at. */
1204
+ next() {
1205
+ return this.playback({
1206
+ commandId: createBoardEntityId(),
1207
+ type: "next"
1208
+ });
1209
+ }
1210
+ stop() {
1211
+ return this.playback({
1212
+ commandId: createBoardEntityId(),
1213
+ type: "stop"
1214
+ });
1215
+ }
1216
+ updateAwareness(seq, update) {
1217
+ if (!this.websocket) return Promise.resolve();
1218
+ return this.websocket.updateBoardAwareness({
1219
+ spaceId: this.spaceId,
1220
+ boardId: this.id,
1221
+ seq,
1222
+ update
1223
+ });
1224
+ }
1225
+ subscribe(handlers) {
1226
+ return this.realtime.subscribe(handlers);
1227
+ }
1228
+ on(type, handler) {
1229
+ if (type === "changed") return this.realtime.on("changed", handler);
1230
+ if (type === "awareness") return this.realtime.on("awareness", handler);
1231
+ return this.realtime.on("playback", handler);
1232
+ }
1233
+ };
1234
+ var SpaceBoardsApi = class {
1235
+ http;
1236
+ spaceId;
1237
+ websocket;
1238
+ constructor(http, spaceId, websocket) {
1239
+ this.http = http;
1240
+ this.spaceId = spaceId;
1241
+ this.websocket = websocket;
1242
+ }
1243
+ byId(boardId) {
1244
+ return new BoardClient({
1245
+ http: this.http,
1246
+ websocket: this.websocket,
1247
+ spaceId: this.spaceId,
1248
+ boardId
1249
+ });
1250
+ }
1251
+ /** Create a `.board` file and its Board, optionally with an initial document. */
1252
+ create(input) {
1253
+ return this.http.request(`/api/spaces/${this.spaceId}/boards`, {
1254
+ method: "POST",
1255
+ headers: { "Content-Type": "application/json" },
1256
+ body: JSON.stringify(input)
1257
+ });
1258
+ }
1259
+ };
1260
+ //#endregion
1054
1261
  //#region src/display-stats.ts
1055
1262
  const num = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
1056
1263
  function perFrame(seconds, previousSeconds, frames, previousFrames) {
@@ -2475,18 +2682,6 @@ const getFilenameFromContentDisposition = (value) => {
2475
2682
  }
2476
2683
  return value.match(/filename="?([^";]+)"?/i)?.[1] ?? null;
2477
2684
  };
2478
- /**
2479
- * Identifier for a client-authored Board entity (connection id, transaction id).
2480
- *
2481
- * `crypto.randomUUID` is used where available and falls back to a random string
2482
- * otherwise, so the SDK works in a plain browser, a worker and Node without
2483
- * pulling in a polyfill.
2484
- */
2485
- function randomBoardId() {
2486
- const cryptoRef = globalThis.crypto;
2487
- if (cryptoRef && typeof cryptoRef.randomUUID === "function") return cryptoRef.randomUUID();
2488
- return `c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
2489
- }
2490
2685
  const toSessionEventName = (type) => {
2491
2686
  switch (type) {
2492
2687
  case "session.created": return "created";
@@ -3607,199 +3802,6 @@ var SpaceCommerceApi = class {
3607
3802
  return this.transport.request(`/api/spaces/${this.spaceId}/commerce/orders${params.toString() ? `?${params.toString()}` : ""}`);
3608
3803
  }
3609
3804
  };
3610
- var BoardRealtimeClient = class {
3611
- websocketClient;
3612
- spaceId;
3613
- boardId;
3614
- constructor(websocketClient, spaceId, boardId) {
3615
- this.websocketClient = websocketClient;
3616
- this.spaceId = spaceId;
3617
- this.boardId = boardId;
3618
- }
3619
- subscribe(handlers) {
3620
- if (!this.websocketClient) throw new Error("realtime transport is not configured for this client");
3621
- ensureRealtimeConnected(this.websocketClient);
3622
- const releaseRoom = this.websocketClient.retainRooms([getRealtimeSpaceRoom(this.spaceId), getRealtimeBoardRoom(this.boardId)]);
3623
- const unsubscribe = this.websocketClient.on("event", (event) => {
3624
- if (event.spaceId !== this.spaceId) return;
3625
- if (event.type === "board.changed" && event.payload.boardId === this.boardId) {
3626
- const changedEvent = event;
3627
- handlers.event?.(changedEvent);
3628
- handlers.changed?.(changedEvent);
3629
- }
3630
- if (event.type === "board.awareness.updated" && event.payload.boardId === this.boardId) {
3631
- const awarenessEvent = event;
3632
- if (awarenessEvent.payload.connectionId !== this.websocketClient?.connectionId) {
3633
- handlers.event?.(awarenessEvent);
3634
- handlers.awareness?.(awarenessEvent);
3635
- }
3636
- }
3637
- if (event.type === "board.playback.changed" && event.payload.boardId === this.boardId) {
3638
- const playbackEvent = event;
3639
- handlers.event?.(playbackEvent);
3640
- handlers.playback?.(playbackEvent);
3641
- }
3642
- });
3643
- return () => {
3644
- unsubscribe();
3645
- releaseRoom();
3646
- };
3647
- }
3648
- on(type, handler) {
3649
- if (type === "changed") return this.subscribe({ changed: handler });
3650
- if (type === "awareness") return this.subscribe({ awareness: handler });
3651
- return this.subscribe({ playback: handler });
3652
- }
3653
- };
3654
- var BoardClient = class {
3655
- spaceId;
3656
- id;
3657
- transport;
3658
- websocketClient;
3659
- realtime;
3660
- constructor(spaceId, id, transport, websocketClient) {
3661
- this.spaceId = spaceId;
3662
- this.id = id;
3663
- this.transport = transport;
3664
- this.websocketClient = websocketClient;
3665
- this.realtime = new BoardRealtimeClient(websocketClient, spaceId, id);
3666
- }
3667
- get path() {
3668
- return `/api/spaces/${this.spaceId}/boards/${this.id}`;
3669
- }
3670
- /** Read the Board, or part of it. Every value is complete, defaults included. */
3671
- get(input = {}, customFetch) {
3672
- const params = new URLSearchParams();
3673
- if (input.only?.length) params.set("only", input.only.join(","));
3674
- if (input.rect) params.set("rect", [
3675
- input.rect.x,
3676
- input.rect.y,
3677
- input.rect.width,
3678
- input.rect.height
3679
- ].join(","));
3680
- if (input.within) params.set("within", input.within);
3681
- if (input.items?.length) params.set("items", input.items.join(","));
3682
- if (input.animations?.length) params.set("animations", input.animations.join(","));
3683
- if (input.limit !== void 0) params.set("limit", String(input.limit));
3684
- if (input.cursor) params.set("cursor", input.cursor);
3685
- const query = params.toString();
3686
- return this.transport.request(`${this.path}${query ? `?${query}` : ""}`, { fetch: customFetch });
3687
- }
3688
- /** Merge a patch into the Board: fields merge, `null` deletes. */
3689
- apply(patch, options = {}) {
3690
- return this.transport.request(`${this.path}/apply`, {
3691
- method: "POST",
3692
- headers: { "Content-Type": "application/json" },
3693
- body: JSON.stringify({
3694
- ...options,
3695
- patch,
3696
- mutationId: options.mutationId ?? randomBoardId()
3697
- })
3698
- });
3699
- }
3700
- /** Transactions newest first, each with the before/after state of what it changed. */
3701
- history(input = {}, customFetch) {
3702
- const params = new URLSearchParams();
3703
- if (input.before !== void 0) params.set("before", String(input.before));
3704
- if (input.limit !== void 0) params.set("limit", String(input.limit));
3705
- const query = params.toString();
3706
- return this.transport.request(`${this.path}/history${query ? `?${query}` : ""}`, { fetch: customFetch });
3707
- }
3708
- /** Return the Board to an earlier version as a new write. */
3709
- restore(version) {
3710
- return this.transport.request(`${this.path}/restore`, {
3711
- method: "POST",
3712
- headers: { "Content-Type": "application/json" },
3713
- body: JSON.stringify({ version })
3714
- });
3715
- }
3716
- playback(command) {
3717
- return this.transport.request(`${this.path}/playback`, {
3718
- method: "POST",
3719
- headers: { "Content-Type": "application/json" },
3720
- body: JSON.stringify(command)
3721
- }).then((response) => response.playback);
3722
- }
3723
- /** Shared playback: every viewer follows the same clock. */
3724
- play(animationId, options = {}) {
3725
- return this.playback({
3726
- commandId: randomBoardId(),
3727
- type: "play",
3728
- animationId,
3729
- ...options
3730
- });
3731
- }
3732
- pause() {
3733
- return this.playback({
3734
- commandId: randomBoardId(),
3735
- type: "pause"
3736
- });
3737
- }
3738
- resume() {
3739
- return this.playback({
3740
- commandId: randomBoardId(),
3741
- type: "resume"
3742
- });
3743
- }
3744
- seek(position) {
3745
- return this.playback({
3746
- commandId: randomBoardId(),
3747
- type: "seek",
3748
- position
3749
- });
3750
- }
3751
- /** Continue past the marker a presentation is holding at. */
3752
- next() {
3753
- return this.playback({
3754
- commandId: randomBoardId(),
3755
- type: "next"
3756
- });
3757
- }
3758
- stop() {
3759
- return this.playback({
3760
- commandId: randomBoardId(),
3761
- type: "stop"
3762
- });
3763
- }
3764
- updateAwareness(seq, update) {
3765
- if (!this.websocketClient) return Promise.resolve();
3766
- return this.websocketClient.updateBoardAwareness({
3767
- spaceId: this.spaceId,
3768
- boardId: this.id,
3769
- seq,
3770
- update
3771
- });
3772
- }
3773
- subscribe(handlers) {
3774
- return this.realtime.subscribe(handlers);
3775
- }
3776
- on(type, handler) {
3777
- if (type === "changed") return this.realtime.on("changed", handler);
3778
- if (type === "awareness") return this.realtime.on("awareness", handler);
3779
- return this.realtime.on("playback", handler);
3780
- }
3781
- };
3782
- var SpaceBoardsApi = class {
3783
- transport;
3784
- spaceId;
3785
- websocketClient;
3786
- constructor(transport, spaceId, websocketClient) {
3787
- this.transport = transport;
3788
- this.spaceId = spaceId;
3789
- this.websocketClient = websocketClient;
3790
- }
3791
- byId(boardId) {
3792
- return new BoardClient(this.spaceId, boardId, this.transport, this.websocketClient);
3793
- }
3794
- /** Create a `.board` file and its Board, optionally with an initial document. */
3795
- create(input) {
3796
- return this.transport.request(`/api/spaces/${this.spaceId}/boards`, {
3797
- method: "POST",
3798
- headers: { "Content-Type": "application/json" },
3799
- body: JSON.stringify(input)
3800
- });
3801
- }
3802
- };
3803
3805
  var SpaceCheckpointFilesApi = class {
3804
3806
  transport;
3805
3807
  spaceId;
@@ -4173,7 +4175,12 @@ var SpaceClient = class {
4173
4175
  return new SessionClient(this.id, sessionId, this.transport, this.websocketClient);
4174
4176
  }
4175
4177
  board(boardId) {
4176
- return new BoardClient(this.id, boardId, this.transport, this.websocketClient);
4178
+ return new BoardClient({
4179
+ http: this.transport,
4180
+ websocket: this.websocketClient,
4181
+ spaceId: this.id,
4182
+ boardId
4183
+ });
4177
4184
  }
4178
4185
  updatePresence(meta) {
4179
4186
  if (!this.websocketClient) return Promise.resolve();
@@ -4807,4 +4814,4 @@ var CohubHttpClient = class {
4807
4814
  };
4808
4815
  const createHttpClient = (options) => new CohubHttpClient(options);
4809
4816
  //#endregion
4810
- export { resolveOpenSurface as $, ReferencesApi as A, DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS as B, SessionPatchReducer as C, connectDisplay as D, DisplayConnection as E, ModelsApi as F, DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS as G, DESKTOP_COMMAND_OPEN_TIMEOUT_MS as H, GenerationsApi as I, defaultDesktopCommandTimeoutMs as J, DESKTOP_COMMAND_TERMINAL_TTL_SECONDS as K, CronJobsApi as L, PublicAssetsApi as M, SkillsApi as N, ensureRealtimeConnected as O, PromptsApi as P, parseDesktopCommandId as Q, ChannelsApi as R, parseAssistantMessageCommit as S, SpaceDisplaysApi as T, DESKTOP_COMMAND_PAYLOAD_MAX_BYTES as U, DESKTOP_COMMAND_MAX_TIMEOUT_MS as V, DESKTOP_COMMAND_PENDING_TTL_SECONDS as W, isTerminalDesktopCommandStatus as X, isDesktopCallMethod as Y, parseDesktopCommand as Z, PublicInviteApi as _, DesktopCommandsApi as a, normalizeDisplayPoint as at, SessionGenerationStreamClient as b, ReferralsApi as c, TasksApi as d, NAVIGATION_ERROR_MESSAGE_MAX_LENGTH as et, BoardClient as f, SpacesApi as g, SpaceWebhooksApi as h, WorkCommerceApi as i, DISPLAY_SYSTEM_ACTIONS as it, SearchApi as j, SessionAccessApi as k, UsersApi as l, SpacePublicFilesApi as m, createHttpClient as n, DISPLAY_INPUT_MAX_SCHEDULE_MS as nt, UiCommandsApi as o, splitDisplayText as ot, SpaceClient as p, DESKTOP_COMMAND_VERSION as q, AppCommerceApi as r, DISPLAY_INPUT_MAX_TEXT as rt, AppsApi as s, CohubHttpClient as t, DISPLAY_ELEMENT_REF_PATTERN as tt, UserApi as u, buildSpaceInvitePath as v, createSessionPatchReducer as w, createSessionGenerationStreamClient as x, buildSpacePath as y, DESKTOP_COMMAND_ACCEPT_TIMEOUT_MS as z };
4817
+ export { resolveOpenSurface as $, ReferencesApi as A, DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS as B, createSessionPatchReducer as C, BoardClient as D, connectDisplay as E, ModelsApi as F, DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS as G, DESKTOP_COMMAND_OPEN_TIMEOUT_MS as H, GenerationsApi as I, defaultDesktopCommandTimeoutMs as J, DESKTOP_COMMAND_TERMINAL_TTL_SECONDS as K, CronJobsApi as L, PublicAssetsApi as M, SkillsApi as N, ensureRealtimeConnected as O, PromptsApi as P, parseDesktopCommandId as Q, ChannelsApi as R, SessionPatchReducer as S, DisplayConnection as T, DESKTOP_COMMAND_PAYLOAD_MAX_BYTES as U, DESKTOP_COMMAND_MAX_TIMEOUT_MS as V, DESKTOP_COMMAND_PENDING_TTL_SECONDS as W, isTerminalDesktopCommandStatus as X, isDesktopCallMethod as Y, parseDesktopCommand as Z, buildSpaceInvitePath as _, DesktopCommandsApi as a, normalizeDisplayPoint as at, createSessionGenerationStreamClient as b, ReferralsApi as c, TasksApi as d, NAVIGATION_ERROR_MESSAGE_MAX_LENGTH as et, SpaceClient as f, PublicInviteApi as g, SpacesApi as h, WorkCommerceApi as i, DISPLAY_SYSTEM_ACTIONS as it, SearchApi as j, SessionAccessApi as k, UsersApi as l, SpaceWebhooksApi as m, createHttpClient as n, DISPLAY_INPUT_MAX_SCHEDULE_MS as nt, UiCommandsApi as o, splitDisplayText as ot, SpacePublicFilesApi as p, DESKTOP_COMMAND_VERSION as q, AppCommerceApi as r, DISPLAY_INPUT_MAX_TEXT as rt, AppsApi as s, CohubHttpClient as t, DISPLAY_ELEMENT_REF_PATTERN as tt, UserApi as u, buildSpacePath as v, SpaceDisplaysApi as w, parseAssistantMessageCommit as x, SessionGenerationStreamClient as y, DESKTOP_COMMAND_ACCEPT_TIMEOUT_MS as z };
@@ -1,4 +1,4 @@
1
- import { Dc as ModelThinkingLevel, J as BillingResponsePayload, ao as RealtimeRoom, eo as ChannelEnvelope, is as BoardAwarenessUpdate, jc as ContentBlock, r as CohubEnvironment } from "./environment.js";
1
+ import { J as BillingResponsePayload, Nc as ContentBlock, ao as RealtimeRoom, eo as ChannelEnvelope, kc as ModelThinkingLevel, os as BoardAwarenessUpdate, r as CohubEnvironment } from "./environment.js";
2
2
  import { z } from "zod";
3
3
  //#region src/websocket.d.ts
4
4
  type WebsocketEventPayload = ChannelEnvelope;
package/dist/http.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as CheckpointDiffDelivery, $n as SpaceCommerceProduct, $o as SpaceFsCopyStats, $r as SpaceSessionsResponse, $t as PromptTemplateCatalogResponse, A as BillingCreditExpiryGroup, Ai as SessionFileRecord, An as SessionTurnSignedUrlsResponse, Ar as SpaceFsUploadProgress, As as BoardKeyframe, At as JsonPrimitive, B as BillingProductBillingInterval, Bi as SessionTurnRecord, Bn as SpaceActivityContributor, Br as SpaceMember, Bt as LabelScopeType, C as BillingBalanceActivityStatus, Cc as CompletionMessageRole, Ci as ChannelHealth, Cn as SessionListFork, Cr as SpaceFsReadFilesResponse, Cs as BoardAnimationHeader, Ct as GlobalSearchChatHit, D as BillingCheckoutConfirmation, Dc as ModelThinkingLevel, Di as FeishuChannelConfig, Dn as SessionRecord, Dr as SpaceFsUploadError, Ds as BoardDiagnostic, Dt as GlobalSearchViewerRelation, E as BillingCheckoutActionState, Ec as CreateSpaceCompletionInput, Ei as DiscordChannelConfig, En as SessionMessagesResponse, Er as SpaceFsUploadEntry, Es as BoardDelta, Et as GlobalSearchType, F as BillingDiscountOfferRef, Fi as RequestMetric, Fn as SkillCatalogResponse, Fr as SpaceInvitationLocation, Fs as BoardStyle, Ft as LabelItemsResponse, G as BillingProductPromotion, Gn as SpaceBootstrapStatus, Gr as SpacePresenceSnapshot, Gt as PaletteOverviewResponse, H as BillingProductDisplay, Hi as StoredIntermediateMessage, Hn as SpaceBootstrapMeta, Hr as SpaceModListItem, Ht as MeResponse, I as BillingDiscountPricing, Ia as GenerationPolicy, Ii as SessionStats, In as SkillCatalogSource, Ir as SpaceListFilter, Is as BoardTrack, It as LabelItemsSessionFork, J as BillingResponsePayload, Ja as GenerationResult, Jn as SpaceCommerceBenefit, Jo as SpaceFsCopyInput, Jr as SpaceRecord, Jt as PatchResourceLabelsInput, K as BillingPromotionCodePreview, Ka as GenerationContentBlock, Kn as SpaceChannelBindingInput, Kr as SpacePresenceUser, Kt as PaletteOverviewSpace, L as BillingHistoryPagination, Li as TurnMetrics, Ln as SpaceAccess, Lr as SpaceListItem, Lt as LabelListItem, M as BillingCreditStatus, Mi as SessionForkRecord, Mn as SessionTurnWindowResponse, Mr as SpaceFsWriteFileInput, Ms as BoardPatch, Mt as LabelAssignmentListItem, N as BillingCreditUnit, Ni as SessionTurnSegmentRecord, Nn as SessionTurnsPaginatedResponse, Nr as SpaceInvitation, Nt as LabelAssignmentPageInfo, O as BillingCheckoutResult, Oc as SpaceCompletionResult, Oi as MessageRecord, On as SessionTurnIndexResponse, Or as SpaceFsUploadPlanEntry, Os as BoardDocument, Ot as InvitationDetail, P as BillingDiscountOffer, Pi as ExecutionStats, Pn as SkillCatalogEntry, Pr as SpaceInvitationListResponse, Ps as BoardSettings, Pt as LabelAssignmentRecord, Q as Channel, Qn as SpaceCommerceOrder, Qo as SpaceFsCopySource, Qr as SpaceSandboxProvider, Qt as PromptTemplateCatalogEntry, R as BillingPaymentStatus, Ri as MessageToolCallsFile, Rn as SpaceAccessPolicy, Rr as SpaceListOptions, Rt as LabelRecord, S as BillingBalanceActivityList, Sc as CompletionMessageInput, Si as ChannelConfig, Sn as SessionBindingRecord, Sr as SpaceFsReadFilesInput, Ss as BoardAnimation, St as GenerationUsageSummary, T as BillingCatalogProduct, Tc as CompletionUsage, Ti as ChannelRuntimeState, Tn as SessionMessagesPaginatedResponse, Tr as SpaceFsUploadDestination, Ts as BoardColor, Tt as GlobalSearchResult, U as BillingProductKind, Ui as StoredToolCall, Un as SpaceBootstrapSource, Ur as SpacePendingDiffFileResponse, Ut as ModelCatalogEntry, V as BillingProductCreditBenefit, Vn as SpaceActivityResponse, Vr as SpaceMeta, Vt as LabelSource, W as BillingProductPricing, Wi as TurnIntermediateMessagesFile, Wn as SpaceBootstrapStage, Wr as SpacePendingDiffSummary, Wt as PERMISSIONS, X as BillingSubscriptionHistoryStatus, Xn as SpaceCommerceCreditsBenefit, Xo as SpaceFsCopyResponse, Xr as SpaceSandboxAutoDestroyPolicy, Xt as Permission, Y as BillingSubscriptionHistoryList, Ya as SearchTextRange, Yn as SpaceCommerceBuyerProfile, Yo as SpaceFsCopyOptions, Yr as SpaceRole, Yt as PatchResourceLabelsResponse, Z as BillingSubscriptionSummary, Zn as SpaceCommerceFeatureBenefit, Zo as SpaceFsCopyResult, Zr as SpaceSandboxConfig, Zt as PromptAccessMode, _ as AcceptInvitationResponse, _i as UserSessionSourceKey, _n as ReferralReward, _r as SpaceFsFileKind, _s as BoardRecord, _t as CronJobRecord, ai as SpaceUsageSummary, an as PublicUserWorkItem, ar as SpaceConfigUpdateResponse, at as CheckpointDiffStatus, b as BillingBalanceActivity, bc as CompletionImageInput, bi as isUserLevelPermission, bn as SandboxSpecId, br as SpaceFsPreparingFile, bt as GenerationUsageBlock, ci as USER_LEVEL_PERMISSIONS, cn as ReferenceAggregateResponse, cr as SpaceEnvInput, cs as BoardChangeSummary, ct as ClaimReferralResponse, di as UserActivityRange, dn as ReferenceQueryResponse, dr as SpaceFsCreateDirectoryInput, ds as BoardHistoryPage, dt as CreateSpaceInput, ei as SpaceTurnAuthorFilter, en as PublicReferral, er as SpaceCommerceProductBenefitBinding, es as SpaceFsCopyStatus, et as CheckpointDiffFile, fi as UserActivityRankings, fn as ReferenceQueryableType, fr as SpaceFsCreateUploadInput, fs as BoardManifest, ft as CreateSpaceModInput, gi as UserSessionListItem, gn as ReferralListItem, gr as SpaceFsEntry, gs as BoardReadResult, gt as CronJobPayload, hi as UserRulesResponse, hn as ReferralDashboard, hr as SpaceFsEncoding, hs as BoardReadInput, ht as CreateSpaceSessionInput, ii as SpaceUsageResponse, in as PublicUserSpaceItem, ir as SpaceConfigResponse, it as CheckpointDiffStats, j as BillingCreditGrantStatus, jc as ContentBlock, ji as SessionFilesResponse, jn as SessionTurnStreamSnapshotResponse, jr as SpaceFsUploadResponse, js as BoardMarker, jt as JsonValue, k as BillingConversionIntent, kc as SpaceCompletionStreamEvent, ki as SessionFileChangeKind, kn as SessionTurnResponse, kr as SpaceFsUploadPlanEntryInput, ks as BoardItem, kt as JsonObject, li as UsageTotals, ln as ReferenceDirection, lr as SpaceFsCompleteUploadInput, ls as BoardCreateInput, lt as CreateInvitationInput, mi as UserProfile, mn as ReferenceResourceType, mr as SpaceFsDeleteNodeInput, ms as BoardPlaybackSnapshot, mt as CreateSpacePromptResponse, ni as SpaceTurnsResponse, nn as PublicUserPageResponse, nr as SpaceConfig, nt as CheckpointDiffPatchKind, oi as TaskRunDetailResponse, on as ReferenceAggregateGroup, or as SpaceCreateResponse, os as BoardApplyInput, ot as CheckpointDiffSummary, pi as UserActivityResponse, pn as ReferenceRecord, pr as SpaceFsCreateUploadResponse, ps as BoardPlaybackCommand, pt as CreateSpacePromptInput, q as BillingRedemptionResult, qn as SpaceCheckpointDetailResponse, qo as SpaceFsCopyError, qr as SpacePublicProfile, qt as PaletteOverviewSpaceRelation, ri as SpaceUsageHourlyStat, rn as PublicUserProfile, rr as SpaceConfigInput, rt as CheckpointDiffPatchLine, si as TaskRunRecord, sn as ReferenceAggregateGroupBy, sr as SpaceDefaultResponse, ss as BoardApplyResult, st as CheckpointRecord, ti as SpaceTurnListItem, tn as PublicUserAppItem, tr as SpaceCommerceProductCreditBenefit, tt as CheckpointDiffFileResponse, ui as UserActivityQuery, un as ReferenceKind, ur as SpaceFsCompleteUploadResponse, us as BoardHistoryInput, ut as CreateInvitationResponse, v as ApiError, vi as UserSessionSpaceSummary, vn as ReferralStatus, vr as SpaceFsFileResponse, vs as BoardSnapshot, vt as CronJobUpdatePatch, w as BillingCatalog, wc as CompletionThinkingLevel, wi as ChannelHealthReasonCode, wn as SessionMessageResponse, wr as SpaceFsTreeResponse, wt as GlobalSearchResponse, x as BillingBalanceActivityKind, xc as CompletionMessage, xi as scopeListHasPermission, xn as SendMessageCronJobPayload, xr as SpaceFsReadFilesError, xt as GenerationUsageHourlyStat, y as BatchUserProfilesResponse, yc as CompletionAssistantMessage, yi as UserSessionsResponse, yn as ResourceLabelsResponse, yr as SpaceFsMoveInput, ys as BoardTransactionRecord, yt as CursorPageInfo, z as BillingPluginStatus, zi as SessionTurnIndexItem, zn as SpaceActivityAppRanking, zr as SpaceListPage, zt as LabelResourceType } from "./chunks/environment.js";
2
- import { _i as PublicGenerationDeclaration, ar as CohubClientOptions, di as SpaceStartupResponse, fi as CreateGenerationTaskRequest, gi as ListGenerationModelsResponse, hi as GenerationUsageBilling, lr as HttpTransport, mi as GenerationTaskResult, n as createHttpClient, or as Fetch, pi as CreateGenerationTaskResponse, sr as HttpError, t as CohubHttpClient, vi as ModelStatusEntry, yi as ModelStatusResponse } from "./chunks/http.js";
1
+ import { $ as CheckpointDiffDelivery, $n as SpaceCommerceProduct, $o as SpaceFsCopyResult, $r as SpaceSessionsResponse, $t as PromptTemplateCatalogResponse, A as BillingCreditExpiryGroup, Ac as SpaceCompletionResult, Ai as SessionFileRecord, An as SessionTurnSignedUrlsResponse, Ar as SpaceFsUploadProgress, As as BoardDocument, At as JsonPrimitive, B as BillingProductBillingInterval, Bi as SessionTurnRecord, Bn as SpaceActivityContributor, Br as SpaceMember, Bt as LabelScopeType, C as BillingBalanceActivityStatus, Cc as CompletionMessage, Ci as ChannelHealth, Cn as SessionListFork, Cr as SpaceFsReadFilesResponse, Ct as GlobalSearchChatHit, D as BillingCheckoutConfirmation, Dc as CompletionUsage, Di as FeishuChannelConfig, Dn as SessionRecord, Dr as SpaceFsUploadError, Ds as BoardColor, Dt as GlobalSearchViewerRelation, E as BillingCheckoutActionState, Ec as CompletionThinkingLevel, Ei as DiscordChannelConfig, En as SessionMessagesResponse, Er as SpaceFsUploadEntry, Et as GlobalSearchType, F as BillingDiscountOfferRef, Fi as RequestMetric, Fn as SkillCatalogResponse, Fr as SpaceInvitationLocation, Ft as LabelItemsResponse, G as BillingProductPromotion, Gn as SpaceBootstrapStatus, Gr as SpacePresenceSnapshot, Gt as PaletteOverviewResponse, H as BillingProductDisplay, Hi as StoredIntermediateMessage, Hn as SpaceBootstrapMeta, Hr as SpaceModListItem, Ht as MeResponse, I as BillingDiscountPricing, Ia as GenerationPolicy, Ii as SessionStats, In as SkillCatalogSource, Ir as SpaceListFilter, Is as BoardSettings, It as LabelItemsSessionFork, J as BillingResponsePayload, Ja as GenerationResult, Jn as SpaceCommerceBenefit, Jr as SpaceRecord, Jt as PatchResourceLabelsInput, K as BillingPromotionCodePreview, Ka as GenerationContentBlock, Kn as SpaceChannelBindingInput, Kr as SpacePresenceUser, Kt as PaletteOverviewSpace, L as BillingHistoryPagination, Li as TurnMetrics, Ln as SpaceAccess, Lr as SpaceListItem, Ls as BoardStyle, Lt as LabelListItem, M as BillingCreditStatus, Mi as SessionForkRecord, Mn as SessionTurnWindowResponse, Mr as SpaceFsWriteFileInput, Ms as BoardKeyframe, Mt as LabelAssignmentListItem, N as BillingCreditUnit, Nc as ContentBlock, Ni as SessionTurnSegmentRecord, Nn as SessionTurnsPaginatedResponse, Nr as SpaceInvitation, Ns as BoardMarker, Nt as LabelAssignmentPageInfo, O as BillingCheckoutResult, Oc as CreateSpaceCompletionInput, Oi as MessageRecord, On as SessionTurnIndexResponse, Or as SpaceFsUploadPlanEntry, Os as BoardDelta, Ot as InvitationDetail, P as BillingDiscountOffer, Pi as ExecutionStats, Pn as SkillCatalogEntry, Pr as SpaceInvitationListResponse, Ps as BoardPatch, Pt as LabelAssignmentRecord, Q as Channel, Qn as SpaceCommerceOrder, Qo as SpaceFsCopyResponse, Qr as SpaceSandboxProvider, Qt as PromptTemplateCatalogEntry, R as BillingPaymentStatus, Ri as MessageToolCallsFile, Rn as SpaceAccessPolicy, Rr as SpaceListOptions, Rs as BoardTrack, Rt as LabelRecord, S as BillingBalanceActivityList, Sc as CompletionImageInput, Si as ChannelConfig, Sn as SessionBindingRecord, Sr as SpaceFsReadFilesInput, St as GenerationUsageSummary, T as BillingCatalogProduct, Tc as CompletionMessageRole, Ti as ChannelRuntimeState, Tn as SessionMessagesPaginatedResponse, Tr as SpaceFsUploadDestination, Ts as BoardAnimationHeader, Tt as GlobalSearchResult, U as BillingProductKind, Ui as StoredToolCall, Un as SpaceBootstrapSource, Ur as SpacePendingDiffFileResponse, Ut as ModelCatalogEntry, V as BillingProductCreditBenefit, Vn as SpaceActivityResponse, Vr as SpaceMeta, Vt as LabelSource, W as BillingProductPricing, Wi as TurnIntermediateMessagesFile, Wn as SpaceBootstrapStage, Wr as SpacePendingDiffSummary, Wt as PERMISSIONS, X as BillingSubscriptionHistoryStatus, Xn as SpaceCommerceCreditsBenefit, Xo as SpaceFsCopyInput, Xr as SpaceSandboxAutoDestroyPolicy, Xt as Permission, Y as BillingSubscriptionHistoryList, Ya as SearchTextRange, Yn as SpaceCommerceBuyerProfile, Yo as SpaceFsCopyError, Yr as SpaceRole, Yt as PatchResourceLabelsResponse, Z as BillingSubscriptionSummary, Zn as SpaceCommerceFeatureBenefit, Zo as SpaceFsCopyOptions, Zr as SpaceSandboxConfig, Zt as PromptAccessMode, _ as AcceptInvitationResponse, _i as UserSessionSourceKey, _n as ReferralReward, _r as SpaceFsFileKind, _s as BoardReadInput, _t as CronJobRecord, ai as SpaceUsageSummary, an as PublicUserWorkItem, ar as SpaceConfigUpdateResponse, at as CheckpointDiffStatus, b as BillingBalanceActivity, bi as isUserLevelPermission, bn as SandboxSpecId, br as SpaceFsPreparingFile, bs as BoardSnapshot, bt as GenerationUsageBlock, ci as USER_LEVEL_PERMISSIONS, cn as ReferenceAggregateResponse, cr as SpaceEnvInput, cs as BoardApplyInput, ct as ClaimReferralResponse, di as UserActivityRange, dn as ReferenceQueryResponse, dr as SpaceFsCreateDirectoryInput, ds as BoardCreateInput, dt as CreateSpaceInput, ei as SpaceTurnAuthorFilter, en as PublicReferral, er as SpaceCommerceProductBenefitBinding, es as SpaceFsCopySource, et as CheckpointDiffFile, fi as UserActivityRankings, fn as ReferenceQueryableType, fr as SpaceFsCreateUploadInput, fs as BoardHistoryInput, ft as CreateSpaceModInput, gi as UserSessionListItem, gn as ReferralListItem, gr as SpaceFsEntry, gs as BoardPlaybackSnapshot, gt as CronJobPayload, hi as UserRulesResponse, hn as ReferralDashboard, hr as SpaceFsEncoding, hs as BoardPlaybackCommand, ht as CreateSpaceSessionInput, ii as SpaceUsageResponse, in as PublicUserSpaceItem, ir as SpaceConfigResponse, it as CheckpointDiffStats, j as BillingCreditGrantStatus, jc as SpaceCompletionStreamEvent, ji as SessionFilesResponse, jn as SessionTurnStreamSnapshotResponse, jr as SpaceFsUploadResponse, js as BoardItem, jt as JsonValue, k as BillingConversionIntent, kc as ModelThinkingLevel, ki as SessionFileChangeKind, kn as SessionTurnResponse, kr as SpaceFsUploadPlanEntryInput, ks as BoardDiagnostic, kt as JsonObject, li as UsageTotals, ln as ReferenceDirection, lr as SpaceFsCompleteUploadInput, ls as BoardApplyResult, lt as CreateInvitationInput, mi as UserProfile, mn as ReferenceResourceType, mr as SpaceFsDeleteNodeInput, ms as BoardManifest, mt as CreateSpacePromptResponse, ni as SpaceTurnsResponse, nn as PublicUserPageResponse, nr as SpaceConfig, ns as SpaceFsCopyStatus, nt as CheckpointDiffPatchKind, oi as TaskRunDetailResponse, on as ReferenceAggregateGroup, or as SpaceCreateResponse, ot as CheckpointDiffSummary, pi as UserActivityResponse, pn as ReferenceRecord, pr as SpaceFsCreateUploadResponse, ps as BoardHistoryPage, pt as CreateSpacePromptInput, q as BillingRedemptionResult, qn as SpaceCheckpointDetailResponse, qr as SpacePublicProfile, qt as PaletteOverviewSpaceRelation, ri as SpaceUsageHourlyStat, rn as PublicUserProfile, rr as SpaceConfigInput, rt as CheckpointDiffPatchLine, si as TaskRunRecord, sn as ReferenceAggregateGroupBy, sr as SpaceDefaultResponse, st as CheckpointRecord, ti as SpaceTurnListItem, tn as PublicUserAppItem, tr as SpaceCommerceProductCreditBenefit, ts as SpaceFsCopyStats, tt as CheckpointDiffFileResponse, ui as UserActivityQuery, un as ReferenceKind, ur as SpaceFsCompleteUploadResponse, us as BoardChangeSummary, ut as CreateInvitationResponse, v as ApiError, vi as UserSessionSpaceSummary, vn as ReferralStatus, vr as SpaceFsFileResponse, vs as BoardReadResult, vt as CronJobUpdatePatch, w as BillingCatalog, wc as CompletionMessageInput, wi as ChannelHealthReasonCode, wn as SessionMessageResponse, wr as SpaceFsTreeResponse, ws as BoardAnimation, wt as GlobalSearchResponse, x as BillingBalanceActivityKind, xc as CompletionAssistantMessage, xi as scopeListHasPermission, xn as SendMessageCronJobPayload, xr as SpaceFsReadFilesError, xs as BoardTransactionRecord, xt as GenerationUsageHourlyStat, y as BatchUserProfilesResponse, yi as UserSessionsResponse, yn as ResourceLabelsResponse, yr as SpaceFsMoveInput, ys as BoardRecord, yt as CursorPageInfo, z as BillingPluginStatus, zi as SessionTurnIndexItem, zn as SpaceActivityAppRanking, zr as SpaceListPage, zt as LabelResourceType } from "./chunks/environment.js";
2
+ import { _i as ListGenerationModelsResponse, bi as ModelStatusResponse, cr as HttpError, fi as SpaceStartupResponse, gi as GenerationUsageBilling, hi as GenerationTaskResult, mi as CreateGenerationTaskResponse, n as createHttpClient, or as CohubClientOptions, pi as CreateGenerationTaskRequest, sr as Fetch, t as CohubHttpClient, ur as HttpTransport, vi as PublicGenerationDeclaration, yi as ModelStatusEntry } from "./chunks/http.js";
3
3
  export { AcceptInvitationResponse, ApiError, BatchUserProfilesResponse, BillingBalanceActivity, BillingBalanceActivityKind, BillingBalanceActivityList, BillingBalanceActivityStatus, BillingCatalog, BillingCatalogProduct, BillingCheckoutActionState, BillingCheckoutConfirmation, BillingCheckoutResult, BillingConversionIntent, BillingCreditExpiryGroup, BillingCreditGrantStatus, BillingCreditStatus, BillingCreditUnit, BillingDiscountOffer, BillingDiscountOfferRef, BillingDiscountPricing, BillingHistoryPagination, BillingPaymentStatus, BillingPluginStatus, BillingProductBillingInterval, BillingProductCreditBenefit, BillingProductDisplay, BillingProductKind, BillingProductPricing, BillingProductPromotion, BillingPromotionCodePreview, BillingRedemptionResult, BillingResponsePayload, BillingSubscriptionHistoryList, BillingSubscriptionHistoryStatus, BillingSubscriptionSummary, type BoardAnimation, type BoardAnimationHeader, type BoardApplyInput, type BoardApplyResult, type BoardChangeSummary, type BoardColor, type BoardCreateInput, type BoardDelta, type BoardDiagnostic, type BoardDocument, type BoardHistoryInput, type BoardHistoryPage, type BoardItem, type BoardKeyframe, type BoardManifest, type BoardMarker, type BoardPatch, type BoardPlaybackCommand, type BoardPlaybackSnapshot, type BoardReadInput, type BoardReadResult, type BoardRecord, type BoardSettings, type BoardSnapshot, type BoardStyle, type BoardTrack, type BoardTransactionRecord, Channel, type ChannelConfig, type ChannelHealth, type ChannelHealthReasonCode, type ChannelRuntimeState, CheckpointDiffDelivery, CheckpointDiffFile, CheckpointDiffFileResponse, CheckpointDiffPatchKind, CheckpointDiffPatchLine, CheckpointDiffStats, CheckpointDiffStatus, CheckpointDiffSummary, CheckpointRecord, ClaimReferralResponse, type CohubClientOptions, CohubHttpClient, type CompletionAssistantMessage, type CompletionImageInput, type CompletionMessage, type CompletionMessageInput, type CompletionMessageRole, type CompletionThinkingLevel, type CompletionUsage, type ContentBlock, type CreateGenerationTaskRequest, type CreateGenerationTaskResponse, CreateInvitationInput, CreateInvitationResponse, type CreateSpaceCompletionInput, CreateSpaceInput, CreateSpaceModInput, CreateSpacePromptInput, CreateSpacePromptResponse, CreateSpaceSessionInput, CronJobPayload, CronJobRecord, CronJobUpdatePatch, CursorPageInfo, type DiscordChannelConfig, type ExecutionStats, type FeishuChannelConfig, type Fetch, type GenerationContentBlock, type GenerationPolicy, type GenerationResult, type GenerationTaskResult, type GenerationUsageBilling, GenerationUsageBlock, GenerationUsageHourlyStat, GenerationUsageSummary, GlobalSearchChatHit, GlobalSearchResponse, GlobalSearchResult, GlobalSearchType, GlobalSearchViewerRelation, HttpError, HttpTransport, InvitationDetail, JsonObject, JsonPrimitive, JsonValue, LabelAssignmentListItem, LabelAssignmentPageInfo, LabelAssignmentRecord, LabelItemsResponse, LabelItemsSessionFork, LabelListItem, LabelRecord, LabelResourceType, LabelScopeType, LabelSource, type ListGenerationModelsResponse, MeResponse, type MessageRecord, type MessageToolCallsFile, ModelCatalogEntry, type ModelStatusEntry, type ModelStatusResponse, type ModelThinkingLevel, PERMISSIONS, PaletteOverviewResponse, PaletteOverviewSpace, PaletteOverviewSpaceRelation, PatchResourceLabelsInput, PatchResourceLabelsResponse, Permission, PromptAccessMode, PromptTemplateCatalogEntry, PromptTemplateCatalogResponse, type PublicGenerationDeclaration, PublicReferral, PublicUserAppItem, PublicUserPageResponse, PublicUserProfile, PublicUserSpaceItem, PublicUserWorkItem, ReferenceAggregateGroup, ReferenceAggregateGroupBy, ReferenceAggregateResponse, ReferenceDirection, ReferenceKind, ReferenceQueryResponse, ReferenceQueryableType, ReferenceRecord, ReferenceResourceType, ReferralDashboard, ReferralListItem, ReferralReward, ReferralStatus, type RequestMetric, ResourceLabelsResponse, SandboxSpecId, type SearchTextRange, SendMessageCronJobPayload, SessionBindingRecord, type SessionFileChangeKind, type SessionFileRecord, type SessionFilesResponse, type SessionForkRecord, SessionListFork, SessionMessageResponse, SessionMessagesPaginatedResponse, SessionMessagesResponse, SessionRecord, type SessionStats, type SessionTurnIndexItem, SessionTurnIndexResponse, type SessionTurnRecord, SessionTurnResponse, type SessionTurnSegmentRecord, SessionTurnSignedUrlsResponse, SessionTurnStreamSnapshotResponse, SessionTurnWindowResponse, SessionTurnsPaginatedResponse, SkillCatalogEntry, SkillCatalogResponse, SkillCatalogSource, SpaceAccess, SpaceAccessPolicy, SpaceActivityAppRanking, SpaceActivityContributor, SpaceActivityResponse, SpaceBootstrapMeta, SpaceBootstrapSource, SpaceBootstrapStage, SpaceBootstrapStatus, SpaceChannelBindingInput, SpaceCheckpointDetailResponse, SpaceCommerceBenefit, SpaceCommerceBuyerProfile, SpaceCommerceCreditsBenefit, SpaceCommerceFeatureBenefit, SpaceCommerceOrder, SpaceCommerceProduct, SpaceCommerceProductBenefitBinding, SpaceCommerceProductCreditBenefit, type SpaceCompletionResult, type SpaceCompletionStreamEvent, SpaceConfig, SpaceConfigInput, SpaceConfigResponse, SpaceConfigUpdateResponse, SpaceCreateResponse, SpaceDefaultResponse, SpaceEnvInput, SpaceFsCompleteUploadInput, SpaceFsCompleteUploadResponse, type SpaceFsCopyError, type SpaceFsCopyInput, type SpaceFsCopyOptions, type SpaceFsCopyResponse, type SpaceFsCopyResult, type SpaceFsCopySource, type SpaceFsCopyStats, type SpaceFsCopyStatus, SpaceFsCreateDirectoryInput, SpaceFsCreateUploadInput, SpaceFsCreateUploadResponse, SpaceFsDeleteNodeInput, SpaceFsEncoding, SpaceFsEntry, SpaceFsFileKind, SpaceFsFileResponse, SpaceFsMoveInput, SpaceFsPreparingFile, SpaceFsReadFilesError, SpaceFsReadFilesInput, SpaceFsReadFilesResponse, SpaceFsTreeResponse, SpaceFsUploadDestination, SpaceFsUploadEntry, SpaceFsUploadError, SpaceFsUploadPlanEntry, SpaceFsUploadPlanEntryInput, SpaceFsUploadProgress, SpaceFsUploadResponse, SpaceFsWriteFileInput, SpaceInvitation, SpaceInvitationListResponse, SpaceInvitationLocation, SpaceListFilter, SpaceListItem, SpaceListOptions, SpaceListPage, SpaceMember, SpaceMeta, SpaceModListItem, SpacePendingDiffFileResponse, SpacePendingDiffSummary, SpacePresenceSnapshot, SpacePresenceUser, SpacePublicProfile, SpaceRecord, SpaceRole, SpaceSandboxAutoDestroyPolicy, SpaceSandboxConfig, SpaceSandboxProvider, SpaceSessionsResponse, type SpaceStartupResponse, SpaceTurnAuthorFilter, SpaceTurnListItem, SpaceTurnsResponse, SpaceUsageHourlyStat, SpaceUsageResponse, SpaceUsageSummary, type StoredIntermediateMessage, type StoredToolCall, TaskRunDetailResponse, TaskRunRecord, type TurnIntermediateMessagesFile, type TurnMetrics, USER_LEVEL_PERMISSIONS, UsageTotals, UserActivityQuery, UserActivityRange, UserActivityRankings, UserActivityResponse, UserProfile, UserRulesResponse, UserSessionListItem, UserSessionSourceKey, UserSessionSpaceSummary, UserSessionsResponse, createHttpClient, isUserLevelPermission, scopeListHasPermission };