@neta-art/cohub 2.10.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/chunks/http.d.ts +132 -24
- package/dist/chunks/http.js +54 -12
- package/dist/chunks/transport.js +44 -7
- package/dist/chunks/voice-input.d.ts +0 -1
- package/dist/chunks/websocket.d.ts +49 -70
- package/dist/chunks/websocket.js +2 -2
- package/dist/debugger.js +3 -2
- package/dist/http.d.ts +3 -3
- package/dist/index.d.ts +27 -15
- package/dist/index.js +8 -5
- package/dist/voice-input.js +2 -1
- package/docs/work-runtime-guide.md +4 -1
- package/package.json +5 -5
package/dist/chunks/transport.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveApiBaseUrl } from "./environment.js";
|
|
2
|
-
//#region ../protocol/
|
|
2
|
+
//#region ../protocol/dist/realtime/types.js
|
|
3
3
|
const WS_COMPACT_STREAM_CAPABILITY = "session.compact_stream.v1";
|
|
4
4
|
const WS_ROOM_SUBSCRIPTION_CAPABILITY = "realtime.rooms.v1";
|
|
5
5
|
const getRealtimeSpaceRoom = (spaceId) => `space:${spaceId}`;
|
|
@@ -53,6 +53,31 @@ function errorCodeFromBody(body) {
|
|
|
53
53
|
if (typeof errorBody.code === "string" && errorBody.code.trim()) return errorBody.code;
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Access tokens must be a single HTTP header token.
|
|
58
|
+
* Newlines / control chars (from corrupted storage or clipboard paste) make
|
|
59
|
+
* `Headers#set` throw TypeError — Safari: "The string did not match the expected pattern."
|
|
60
|
+
*/
|
|
61
|
+
function sanitizeAccessToken(token) {
|
|
62
|
+
if (typeof token !== "string") return null;
|
|
63
|
+
const cleaned = token.replace(/[\r\n\t\0]/g, "").trim();
|
|
64
|
+
return cleaned.length > 0 ? cleaned : null;
|
|
65
|
+
}
|
|
66
|
+
/** Join API base + path without double slashes; prefer URL when base is absolute. */
|
|
67
|
+
function joinApiUrl(baseUrl, path) {
|
|
68
|
+
const base = baseUrl.trim().replace(/\/+$/, "");
|
|
69
|
+
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
70
|
+
if (!base) return normalizedPath;
|
|
71
|
+
if (/^https?:\/\//i.test(base)) try {
|
|
72
|
+
return new URL(normalizedPath, `${base}/`).href;
|
|
73
|
+
} catch {}
|
|
74
|
+
return `${base}${normalizedPath}`;
|
|
75
|
+
}
|
|
76
|
+
function isBrowserRequestConstructionError(error) {
|
|
77
|
+
if (!(error instanceof TypeError)) return false;
|
|
78
|
+
const message = error.message || "";
|
|
79
|
+
return message === "The string did not match the expected pattern." || /invalid header value|Failed to construct|is an invalid header/i.test(message);
|
|
80
|
+
}
|
|
56
81
|
var HttpError = class extends Error {
|
|
57
82
|
status;
|
|
58
83
|
body;
|
|
@@ -78,7 +103,7 @@ var HttpTransport = class {
|
|
|
78
103
|
}
|
|
79
104
|
async withAuthorization(init, tokenOverride) {
|
|
80
105
|
const headers = new Headers(init?.headers);
|
|
81
|
-
const token = tokenOverride
|
|
106
|
+
const token = sanitizeAccessToken(tokenOverride !== void 0 ? tokenOverride : this.getAccessToken ? await this.getAccessToken() : null);
|
|
82
107
|
if (token) headers.set("Authorization", `Bearer ${token}`);
|
|
83
108
|
else headers.delete("Authorization");
|
|
84
109
|
return {
|
|
@@ -88,19 +113,31 @@ var HttpTransport = class {
|
|
|
88
113
|
}
|
|
89
114
|
async send(path, init) {
|
|
90
115
|
const fetcher = init?.fetch ?? this.fetcher;
|
|
91
|
-
const url = this.baseUrl
|
|
92
|
-
|
|
116
|
+
const url = joinApiUrl(this.baseUrl, path);
|
|
117
|
+
let response;
|
|
118
|
+
try {
|
|
119
|
+
response = await fetcher(url, await this.withAuthorization(init));
|
|
120
|
+
} catch (error) {
|
|
121
|
+
if (isBrowserRequestConstructionError(error)) throw new Error("Could not send request. Your session may be invalid — try refreshing or signing in again.", { cause: error });
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
93
124
|
const getAccessToken = this.getAccessToken;
|
|
94
125
|
if (response.status === 401 && getAccessToken) {
|
|
95
126
|
const refreshedToken = await (async () => {
|
|
96
127
|
try {
|
|
97
|
-
return await getAccessToken({ forceRefresh: true });
|
|
128
|
+
return sanitizeAccessToken(await getAccessToken({ forceRefresh: true }));
|
|
98
129
|
} catch {
|
|
99
130
|
return null;
|
|
100
131
|
}
|
|
101
132
|
})();
|
|
102
133
|
if (refreshedToken) {
|
|
103
|
-
|
|
134
|
+
let retryResponse;
|
|
135
|
+
try {
|
|
136
|
+
retryResponse = await fetcher(url, await this.withAuthorization(init, refreshedToken));
|
|
137
|
+
} catch (error) {
|
|
138
|
+
if (isBrowserRequestConstructionError(error)) throw new Error("Could not send request. Your session may be invalid — try refreshing or signing in again.", { cause: error });
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
104
141
|
if (retryResponse.status !== 401) {
|
|
105
142
|
if (!retryResponse.ok) {
|
|
106
143
|
const body = await responseBodyForError(retryResponse);
|
|
@@ -140,4 +177,4 @@ var HttpTransport = class {
|
|
|
140
177
|
}
|
|
141
178
|
};
|
|
142
179
|
//#endregion
|
|
143
|
-
export {
|
|
180
|
+
export { WS_COMPACT_STREAM_CAPABILITY as a, getSessionTurnPatchStreamKey as c, sanitizeAccessToken as i, normalizeRealtimeRooms as l, HttpTransport as n, WS_ROOM_SUBSCRIPTION_CAPABILITY as o, joinApiUrl as r, getRealtimeSpaceRoom as s, HttpError as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as CohubEnvironment } from "./environment.js";
|
|
2
|
-
|
|
3
|
-
//#region ../protocol/src/core/content.d.ts
|
|
2
|
+
//#region ../protocol/dist/core/content.d.ts
|
|
4
3
|
type ContentBlockMeta = Record<string, unknown>;
|
|
5
4
|
type ContentBlock = {
|
|
6
5
|
type: "text";
|
|
@@ -46,7 +45,7 @@ type ContentBlock = {
|
|
|
46
45
|
_meta?: ContentBlockMeta;
|
|
47
46
|
};
|
|
48
47
|
//#endregion
|
|
49
|
-
//#region ../protocol/
|
|
48
|
+
//#region ../protocol/dist/billing.d.ts
|
|
50
49
|
/**
|
|
51
50
|
* Standard billing payload attached under the `billing` key of any response
|
|
52
51
|
* or realtime event that involves a billing gate. Present on 402 error bodies
|
|
@@ -64,7 +63,7 @@ type BillingPayload = {
|
|
|
64
63
|
hardNegativeLimitUsd?: number;
|
|
65
64
|
};
|
|
66
65
|
//#endregion
|
|
67
|
-
//#region ../protocol/
|
|
66
|
+
//#region ../protocol/dist/core/usage.d.ts
|
|
68
67
|
type Usage = {
|
|
69
68
|
input?: number;
|
|
70
69
|
output?: number;
|
|
@@ -80,7 +79,7 @@ type Usage = {
|
|
|
80
79
|
} | null;
|
|
81
80
|
};
|
|
82
81
|
//#endregion
|
|
83
|
-
//#region ../protocol/
|
|
82
|
+
//#region ../protocol/dist/model/turn.d.ts
|
|
84
83
|
type SessionTurnStatus = "queued" | "running" | "abort_requested" | "completed" | "failed" | "interrupted" | "merged" | "cancelled";
|
|
85
84
|
type SessionTurnIntent = "steer" | "followup" | "compact";
|
|
86
85
|
type SessionTurnSummary = {
|
|
@@ -105,6 +104,12 @@ type SessionTurnIntermediateSummary = {
|
|
|
105
104
|
lastMessageText?: string | null;
|
|
106
105
|
hasError?: boolean;
|
|
107
106
|
};
|
|
107
|
+
type SessionTurnAuthorProfile = {
|
|
108
|
+
userUuid: string;
|
|
109
|
+
username?: string | null;
|
|
110
|
+
displayName: string;
|
|
111
|
+
avatarUrl: string | null;
|
|
112
|
+
};
|
|
108
113
|
type SessionTurnIndexItem = {
|
|
109
114
|
id: string;
|
|
110
115
|
sessionId: string;
|
|
@@ -112,6 +117,10 @@ type SessionTurnIndexItem = {
|
|
|
112
117
|
sourceTurnId?: string;
|
|
113
118
|
sequence: number;
|
|
114
119
|
status: SessionTurnStatus;
|
|
120
|
+
/** Present on current turn index payloads; older caches may omit it. */
|
|
121
|
+
intent?: SessionTurnIntent;
|
|
122
|
+
userUuid?: string | null;
|
|
123
|
+
authorProfile?: SessionTurnAuthorProfile | null;
|
|
115
124
|
startedAt: string | null;
|
|
116
125
|
completedAt: string | null;
|
|
117
126
|
durationMs: number | null;
|
|
@@ -125,12 +134,6 @@ type SessionTurnIndexItem = {
|
|
|
125
134
|
totalUsage: Usage | null;
|
|
126
135
|
errorMessage: string | null;
|
|
127
136
|
};
|
|
128
|
-
type SessionTurnAuthorProfile = {
|
|
129
|
-
userUuid: string;
|
|
130
|
-
username?: string | null;
|
|
131
|
-
displayName: string;
|
|
132
|
-
avatarUrl: string | null;
|
|
133
|
-
};
|
|
134
137
|
type SessionTurnRecord = {
|
|
135
138
|
id: string;
|
|
136
139
|
sessionId: string;
|
|
@@ -162,7 +165,7 @@ type SessionTurnRecord = {
|
|
|
162
165
|
updatedAt: string;
|
|
163
166
|
};
|
|
164
167
|
//#endregion
|
|
165
|
-
//#region ../protocol/
|
|
168
|
+
//#region ../protocol/dist/model/session.d.ts
|
|
166
169
|
type SessionForkRecord = {
|
|
167
170
|
id: string;
|
|
168
171
|
spaceId: string;
|
|
@@ -252,10 +255,10 @@ type MessageRecord = {
|
|
|
252
255
|
createdAt: string;
|
|
253
256
|
};
|
|
254
257
|
//#endregion
|
|
255
|
-
//#region ../protocol/
|
|
258
|
+
//#region ../protocol/dist/task/index.d.ts
|
|
256
259
|
type TaskRunStatus = "pending" | "running" | "completed" | "failed";
|
|
257
260
|
//#endregion
|
|
258
|
-
//#region ../protocol/
|
|
261
|
+
//#region ../protocol/dist/fs/index.d.ts
|
|
259
262
|
type SpaceFsChange = {
|
|
260
263
|
path?: string;
|
|
261
264
|
oldPath?: string;
|
|
@@ -271,7 +274,7 @@ type SpaceFsChangedPayload = {
|
|
|
271
274
|
changes: SpaceFsChange[];
|
|
272
275
|
};
|
|
273
276
|
//#endregion
|
|
274
|
-
//#region ../protocol/
|
|
277
|
+
//#region ../protocol/dist/ports/index.d.ts
|
|
275
278
|
declare const SANDBOX_PUBLIC_PORTS: readonly [3000, 5173];
|
|
276
279
|
type SandboxPublicPort = (typeof SANDBOX_PUBLIC_PORTS)[number];
|
|
277
280
|
type SpacePortStatus = "listening" | "closed";
|
|
@@ -294,7 +297,7 @@ type SpacePublicEndpoint = {
|
|
|
294
297
|
};
|
|
295
298
|
type SpacePublicEndpoints = Record<string, SpacePublicEndpoint>;
|
|
296
299
|
//#endregion
|
|
297
|
-
//#region ../protocol/
|
|
300
|
+
//#region ../protocol/dist/realtime/types.d.ts
|
|
298
301
|
type RealtimeRoom = `space:${string}` | `user:${string}`;
|
|
299
302
|
type RealtimeEnvelope = {
|
|
300
303
|
id: string;
|
|
@@ -755,7 +758,7 @@ type LabelAssignmentsUpdatedEvent = {
|
|
|
755
758
|
};
|
|
756
759
|
type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent | CanvasTransactionAppliedEvent | CanvasTransactionAckEvent | CanvasTransactionErrorEvent | TaskCreatedEvent | TaskUpdatedEvent | LabelAssignmentsUpdatedEvent;
|
|
757
760
|
//#endregion
|
|
758
|
-
//#region ../protocol/
|
|
761
|
+
//#region ../protocol/dist/gateway/types.d.ts
|
|
759
762
|
type ChannelModelConfig = {
|
|
760
763
|
provider: string;
|
|
761
764
|
id: string;
|
|
@@ -935,7 +938,7 @@ type GenerateRequest = {
|
|
|
935
938
|
baseUrl?: string;
|
|
936
939
|
};
|
|
937
940
|
//#endregion
|
|
938
|
-
//#region ../protocol/
|
|
941
|
+
//#region ../protocol/dist/generation/policy.d.ts
|
|
939
942
|
type GenerationPolicy = {
|
|
940
943
|
version: 1;
|
|
941
944
|
mode: "auto" | "limited";
|
|
@@ -984,51 +987,6 @@ declare function assertGenerationRequestAllowedByPolicy(input: {
|
|
|
984
987
|
}): void;
|
|
985
988
|
declare function filterGenerationDeclarationsByPolicy<T extends PublicDeclaration>(declarations: T[], policy: GenerationPolicy | null): T[];
|
|
986
989
|
//#endregion
|
|
987
|
-
//#region ../protocol/src/generation/index.d.ts
|
|
988
|
-
declare const GENERATION_TASK_TYPE: "generation";
|
|
989
|
-
type CreateGenerationTaskRequest = {
|
|
990
|
-
spaceId: string;
|
|
991
|
-
sessionId?: string | null;
|
|
992
|
-
turnId?: string | null;
|
|
993
|
-
model: string;
|
|
994
|
-
content: GenerationContentBlock[];
|
|
995
|
-
parameters?: Record<string, unknown>;
|
|
996
|
-
meta?: Record<string, unknown>;
|
|
997
|
-
};
|
|
998
|
-
type CreateGenerationTaskResponse = {
|
|
999
|
-
taskRunId: string;
|
|
1000
|
-
taskType: typeof GENERATION_TASK_TYPE;
|
|
1001
|
-
status: "pending";
|
|
1002
|
-
billing?: BillingPayload | null;
|
|
1003
|
-
};
|
|
1004
|
-
/**
|
|
1005
|
-
* Final generation task payload stored on the task run.
|
|
1006
|
-
*
|
|
1007
|
-
* - `output` is the generated content blocks (SDK `GenerationResult.content`)
|
|
1008
|
-
* - `requestId` maps to the provider response body's top-level `request_id`
|
|
1009
|
-
* - `cost` maps to the official request price in `usage.cost`
|
|
1010
|
-
* - `billing` records post-success credit consumption (when attempted)
|
|
1011
|
-
* - `meta` is the request meta (including Cohub context such as taskRunId/spaceId)
|
|
1012
|
-
*/
|
|
1013
|
-
type GenerationUsageBilling = {
|
|
1014
|
-
amountUsd: number;
|
|
1015
|
-
usageType: string;
|
|
1016
|
-
status: "recorded" | "overage" | "skipped";
|
|
1017
|
-
reason?: string | null;
|
|
1018
|
-
};
|
|
1019
|
-
type GenerationTaskResult = {
|
|
1020
|
-
model: string;
|
|
1021
|
-
output: GenerationContentBlock[];
|
|
1022
|
-
requestId?: string;
|
|
1023
|
-
cost?: number; /** Post-success usage charge metadata. Distinct from gate `billing` on create. */
|
|
1024
|
-
billing?: GenerationUsageBilling | null;
|
|
1025
|
-
meta?: Record<string, unknown>;
|
|
1026
|
-
};
|
|
1027
|
-
type PublicGenerationDeclaration = Omit<GenerationModelDeclaration, "adapter">;
|
|
1028
|
-
type ListGenerationModelsResponse = {
|
|
1029
|
-
models: PublicGenerationDeclaration[];
|
|
1030
|
-
};
|
|
1031
|
-
//#endregion
|
|
1032
990
|
//#region src/types.d.ts
|
|
1033
991
|
type ApiError = {
|
|
1034
992
|
message: string;
|
|
@@ -1499,13 +1457,19 @@ type SpaceFsUploadPlanEntryInput = {
|
|
|
1499
1457
|
size: number;
|
|
1500
1458
|
mimeType?: string | null;
|
|
1501
1459
|
lastModified?: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* Optional durable public URL. When set, client skips PUT and complete pulls from this URL.
|
|
1462
|
+
* Must be an allowed public-asset origin.
|
|
1463
|
+
*/
|
|
1464
|
+
downloadUrl?: string;
|
|
1502
1465
|
};
|
|
1503
1466
|
type SpaceFsUploadDestination = {
|
|
1504
1467
|
kind: "workspace";
|
|
1505
1468
|
targetDir?: string;
|
|
1506
1469
|
} | {
|
|
1507
1470
|
kind: "sandbox_tmp";
|
|
1508
|
-
|
|
1471
|
+
/** Optional association only; materialize path is /tmp/uploads/{uploadId}. */
|
|
1472
|
+
sessionId?: string;
|
|
1509
1473
|
};
|
|
1510
1474
|
type SpaceFsCreateUploadInput = {
|
|
1511
1475
|
destination: SpaceFsUploadDestination;
|
|
@@ -1513,9 +1477,13 @@ type SpaceFsCreateUploadInput = {
|
|
|
1513
1477
|
};
|
|
1514
1478
|
type SpaceFsUploadPlanEntry = {
|
|
1515
1479
|
id: string;
|
|
1516
|
-
|
|
1517
|
-
|
|
1480
|
+
/** Present for client-PUT entries; omitted for remote downloadUrl entries. */
|
|
1481
|
+
objectKey?: string;
|
|
1482
|
+
/** Present for client-PUT entries; omitted for remote downloadUrl entries. */
|
|
1483
|
+
uploadUrl?: string;
|
|
1518
1484
|
headers?: Record<string, string>;
|
|
1485
|
+
/** Echo of remote source when entry uses downloadUrl. */
|
|
1486
|
+
downloadUrl?: string;
|
|
1519
1487
|
};
|
|
1520
1488
|
type SpaceFsCreateUploadResponse = {
|
|
1521
1489
|
uploadId: string;
|
|
@@ -1821,6 +1789,14 @@ type PromptTemplateCatalogEntry = {
|
|
|
1821
1789
|
type PromptTemplateCatalogResponse = {
|
|
1822
1790
|
prompts: PromptTemplateCatalogEntry[];
|
|
1823
1791
|
};
|
|
1792
|
+
type SkillCatalogEntry = {
|
|
1793
|
+
name: string;
|
|
1794
|
+
description: string;
|
|
1795
|
+
scope: "platform" | "mod" | "user" | "project";
|
|
1796
|
+
};
|
|
1797
|
+
type SkillCatalogResponse = {
|
|
1798
|
+
skills: SkillCatalogEntry[];
|
|
1799
|
+
};
|
|
1824
1800
|
type Channel = {
|
|
1825
1801
|
id: string;
|
|
1826
1802
|
userUuid: string;
|
|
@@ -2162,8 +2138,10 @@ type LabelItemsSessionFork = SessionForkRecord & {
|
|
|
2162
2138
|
};
|
|
2163
2139
|
type LabelItemsResponse = {
|
|
2164
2140
|
items: LabelAssignmentListItem[];
|
|
2165
|
-
pageInfo: LabelAssignmentPageInfo;
|
|
2166
|
-
|
|
2141
|
+
pageInfo: LabelAssignmentPageInfo;
|
|
2142
|
+
/** Hydrated sessions for this page (optional for older servers). */
|
|
2143
|
+
sessions?: SessionRecord[];
|
|
2144
|
+
/** Fork edges for page sessions (optional for older servers). */
|
|
2167
2145
|
forks?: LabelItemsSessionFork[];
|
|
2168
2146
|
};
|
|
2169
2147
|
type PatchResourceLabelsInput = {
|
|
@@ -2289,7 +2267,8 @@ type GenerationUsageBlock = {
|
|
|
2289
2267
|
};
|
|
2290
2268
|
type SpaceUsageResponse = {
|
|
2291
2269
|
hourly: SpaceUsageHourlyStat[];
|
|
2292
|
-
summary: SpaceUsageSummary;
|
|
2270
|
+
summary: SpaceUsageSummary;
|
|
2271
|
+
/** Multimodal generation rollups (image / video / music). Optional for older servers. */
|
|
2293
2272
|
generation?: GenerationUsageBlock;
|
|
2294
2273
|
days: number;
|
|
2295
2274
|
};
|
|
@@ -2575,4 +2554,4 @@ declare class WebsocketClient {
|
|
|
2575
2554
|
}
|
|
2576
2555
|
declare const createWebsocketClient: (options?: WebsocketClientOptions) => WebsocketClient;
|
|
2577
2556
|
//#endregion
|
|
2578
|
-
export { CheckpointDiffSummary as $,
|
|
2557
|
+
export { CheckpointDiffSummary as $, SpaceFsPreparingFile as $n, ChannelConfig as $r, ReferenceKind as $t, BillingProductDisplay as A, SpaceCommerceBuyerProfile as An, SpaceUsageSummary as Ar, LabelItemsSessionFork as At, CanvasDocumentRecord as B, SpaceConfigUpdateResponse as Bn, GenerationPolicy as Br, Permission as Bt, BillingCreditStatus as C, SkillCatalogResponse as Cn, SpaceRole as Cr, JsonObject as Ct, BillingPluginStatus as D, SpaceChannelBindingInput as Dn, SpaceSessionsResponse as Dr, LabelAssignmentPageInfo as Dt, BillingPaymentStatus as E, SpaceBootstrapSource as En, SpaceSandboxProvider as Er, LabelAssignmentListItem as Et, BillingSubscriptionHistoryList as F, SpaceCommerceProductBenefitBinding as Fn, UserSessionListItem as Fr, LabelSource as Ft, Channel as G, SpaceFsCompleteUploadResponse as Gn, filterGenerationDeclarationsByPolicy as Gr, PublicUserPageResponse as Gt, CanvasNodeRecord as H, SpaceDefaultResponse as Hn, assertGenerationRequestAllowedByPolicy as Hr, PromptTemplateCatalogEntry as Ht, BillingSubscriptionHistoryStatus as I, SpaceCommerceProductCreditBenefit as In, UserSessionSpaceSummary as Ir, MeResponse as It, CheckpointDiffFileResponse as J, SpaceFsEncoding as Jn, normalizeGenerationPolicy as Jr, PublicUserWorkItem as Jt, CheckpointDiffDelivery as K, SpaceFsCreateUploadInput as Kn, findGenerationModelPolicy as Kr, PublicUserProfile as Kt, BillingSubscriptionSummary as L, SpaceConfig as Ln, UserSessionsResponse as Lr, ModelCatalogEntry as Lt, BillingProductPricing as M, SpaceCommerceFeatureBenefit as Mn, TaskRunRecord as Mr, LabelRecord as Mt, BillingRedemptionResult as N, SpaceCommerceOrder as Nn, UserProfile as Nr, LabelResourceType as Nt, BillingProductBillingInterval as O, SpaceCheckpointDetailResponse as On, SpaceUsageHourlyStat as Or, LabelAssignmentRecord as Ot, BillingResponsePayload as P, SpaceCommerceProduct as Pn, UserRulesResponse as Pr, LabelScopeType as Pt, CheckpointDiffStatus as Q, SpaceFsMoveInput as Qn, GenerationResult as Qr, ReferenceDirection as Qt, CanvasBootstrapResponse as R, SpaceConfigInput as Rn, GenerationModelPolicy as Rr, PatchResourceLabelsInput as Rt, BillingCreditGrantStatus as S, SkillCatalogEntry as Sn, SpaceRecord as Sr, InvitationDetail as St, BillingHistoryPagination as T, SpaceAccessPolicy as Tn, SpaceSandboxConfig as Tr, JsonValue as Tt, CanvasSemanticOp as U, SpaceEnvInput as Un, decodeGenerationPolicy as Ur, PromptTemplateCatalogResponse as Ut, CanvasNodeInput as V, SpaceCreateResponse as Vn, GenerationPolicyError as Vr, PromptAccessMode as Vt, CanvasTransactionInput as W, SpaceFsCompleteUploadInput as Wn, encodeGenerationPolicy as Wr, PublicReferral as Wt, CheckpointDiffPatchLine as X, SpaceFsFileKind as Xn, GenerationContentBlock as Xr, ReferenceAggregateGroupBy as Xt, CheckpointDiffPatchKind as Y, SpaceFsEntry as Yn, parseGenerationPolicyFromEnv as Yr, ReferenceAggregateGroup as Yt, CheckpointDiffStats as Z, SpaceFsFileResponse as Zn, GenerationModelDeclaration as Zr, ReferenceAggregateResponse as Zt, BillingCatalogProduct as _, BillingPayload as _i, SessionTurnResponse as _n, SpacePendingDiffFileResponse as _r, GenerationUsageHourlyStat as _t, WebsocketClientOptions as a, ChannelEnvelope as ai, ReferralListItem as an, SpaceFsUploadEntry as ar, CreateSpaceModInput as at, BillingConversionIntent as b, SessionTurnWindowResponse as bn, SpacePresenceUser as br, GlobalSearchResult as bt, createWebsocketClient as c, RealtimeServerEvent as ci, ResourceLabelsResponse as cn, SpaceFsUploadPlanEntryInput as cr, CreateSpaceSessionInput as ct, BatchUserProfilesResponse as d, MessageRecord as di, SessionBindingRecord as dn, SpaceFsWriteFileInput as dr, CronJobUpdatePatch as dt, ChannelHealth as ei, ReferenceQueryResponse as en, SpaceFsReadFilesError as er, CheckpointRecord as et, BillingBalanceActivity as f, SessionForkRecord as fi, SessionMessageResponse as fn, SpaceInvitation as fr, CursorPageInfo as ft, BillingCatalog as g, Usage as gi, SessionTurnIndexResponse as gn, SpaceModListItem as gr, GenerationUsageBlock as gt, BillingBalanceActivityStatus as h, SessionTurnRecord as hi, SessionRecord as hn, SpaceMeta as hr, ExploreSpacesResponse as ht, WebsocketClientEvents as i, FeishuChannelConfig as ii, ReferralDashboard as in, SpaceFsUploadDestination as ir, CreateSpaceInput as it, BillingProductKind as j, SpaceCommerceCreditsBenefit as jn, TaskRunDetailResponse as jr, LabelListItem as jt, BillingProductCreditBenefit as k, SpaceCommerceBenefit as kn, SpaceUsageResponse as kr, LabelItemsResponse as kt, AcceptInvitationResponse as l, SessionTurnPatchEvent as li, SandboxSpecId as ln, SpaceFsUploadProgress as lr, CronJobPayload as lt, BillingBalanceActivityList as m, SessionTurnIndexItem as mi, SessionMessagesResponse as mn, SpaceMember as mr, ExploreSpaceItem as mt, WebSocketLike as n, ChannelRuntimeState as ni, ReferenceRecord as nn, SpaceFsReadFilesResponse as nr, CreateInvitationInput as nt, WebsocketClientState as o, LabelAssignmentsUpdatedEvent as oi, ReferralReward as on, SpaceFsUploadError as or, CreateSpacePromptInput as ot, BillingBalanceActivityKind as p, SessionTurnSegmentRecord as pi, SessionMessagesPaginatedResponse as pn, SpaceListItem as pr, ExploreSection as pt, CheckpointDiffFile as q, SpaceFsCreateUploadResponse as qn, getAllowedGenerationModelIds as qr, PublicUserSpaceItem as qt, WebsocketClient as r, DiscordChannelConfig as ri, ReferenceResourceType as rn, SpaceFsTreeResponse as rr, CreateInvitationResponse as rt, WebsocketEventPayload as s, RealtimePatchOperation as si, ReferralStatus as sn, SpaceFsUploadPlanEntry as sr, CreateSpacePromptResponse as st, WebSocketConstructor as t, ChannelHealthReasonCode as ti, ReferenceQueryableType as tn, SpaceFsReadFilesInput as tr, ClaimReferralResponse as tt, ApiError as u, SpacePublicEndpoints as ui, SendMessageCronJobPayload as un, SpaceFsUploadResponse as ur, CronJobRecord as ut, BillingCheckoutActionState as v, ContentBlock as vi, SessionTurnSignedUrlsResponse as vn, SpacePendingDiffSummary as vr, GenerationUsageSummary as vt, BillingCreditUnit as w, SpaceAccess as wn, SpaceSandboxAutoDestroyPolicy as wr, JsonPrimitive as wt, BillingCreditExpiryGroup as x, SessionTurnsPaginatedResponse as xn, SpacePublicProfile as xr, GlobalSearchType as xt, BillingCheckoutResult as y, SessionTurnStreamSnapshotResponse as yn, SpacePresenceSnapshot as yr, GlobalSearchResponse as yt, CanvasCreateInput as z, SpaceConfigResponse as zn, GenerationParameterConstraint as zr, PatchResourceLabelsResponse as zt };
|
package/dist/chunks/websocket.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as WS_COMPACT_STREAM_CAPABILITY, c as getSessionTurnPatchStreamKey, l as normalizeRealtimeRooms, o as WS_ROOM_SUBSCRIPTION_CAPABILITY, s as getRealtimeSpaceRoom, t as HttpError } from "./transport.js";
|
|
2
2
|
import { c as resolveWebsocketUrl } from "./environment.js";
|
|
3
3
|
//#region src/http-error.ts
|
|
4
4
|
/** Shared HTTP error code for every plan entitlement gate (402). */
|
|
@@ -662,7 +662,7 @@ var WebsocketClient = class {
|
|
|
662
662
|
if (!buffer) {
|
|
663
663
|
const newBuffer = {
|
|
664
664
|
nextSeq: payload.baseSeq + 1,
|
|
665
|
-
pending: new Map([[payload.seq, envelope]])
|
|
665
|
+
pending: /* @__PURE__ */ new Map([[payload.seq, envelope]])
|
|
666
666
|
};
|
|
667
667
|
this.patchStreamBuffers.set(key, newBuffer);
|
|
668
668
|
this.flushPatchStreamBuffer(newBuffer);
|
package/dist/debugger.js
CHANGED
|
@@ -312,7 +312,8 @@ function installEventSourceCollector(state) {
|
|
|
312
312
|
source.removeEventListener = ((type, listener, options) => {
|
|
313
313
|
if (!listener) return;
|
|
314
314
|
const recordIndex = listenerRecords.findIndex((record) => record.type === type && record.listener === listener);
|
|
315
|
-
|
|
315
|
+
const record = recordIndex >= 0 ? listenerRecords.splice(recordIndex, 1)[0] : void 0;
|
|
316
|
+
return originalRemoveEventListener(type, record?.wrappedListener ?? listener, options);
|
|
316
317
|
});
|
|
317
318
|
return source;
|
|
318
319
|
};
|
|
@@ -1137,7 +1138,7 @@ function shouldRedactHeader(key, options) {
|
|
|
1137
1138
|
* tokens and sensitive JSON keys — from any text before it enters the ring
|
|
1138
1139
|
* buffers, so both `exportCohubDebugLog` and `exportCohubDebugHar` stay safe.
|
|
1139
1140
|
*/
|
|
1140
|
-
const SENSITIVE_KEY_NAMES = new Set([
|
|
1141
|
+
const SENSITIVE_KEY_NAMES = /* @__PURE__ */ new Set([
|
|
1141
1142
|
"token",
|
|
1142
1143
|
"accesstoken",
|
|
1143
1144
|
"access_token",
|
package/dist/http.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as CheckpointDiffSummary, $n as
|
|
2
|
-
import { Dt as
|
|
3
|
-
export { AcceptInvitationResponse, ApiError, BatchUserProfilesResponse, BillingBalanceActivity, BillingBalanceActivityKind, BillingBalanceActivityList, BillingBalanceActivityStatus, BillingCatalog, BillingCatalogProduct, BillingCheckoutActionState, BillingCheckoutResult, BillingConversionIntent, BillingCreditExpiryGroup, BillingCreditGrantStatus, BillingCreditStatus, BillingCreditUnit, BillingHistoryPagination, BillingPaymentStatus, BillingPluginStatus, BillingProductBillingInterval, BillingProductCreditBenefit, BillingProductDisplay, BillingProductKind, BillingProductPricing, BillingRedemptionResult, BillingResponsePayload, BillingSubscriptionHistoryList, BillingSubscriptionHistoryStatus, BillingSubscriptionSummary, CanvasBootstrapResponse, CanvasCreateInput, CanvasDocumentRecord, CanvasNodeInput, CanvasNodeRecord, CanvasSemanticOp, CanvasTransactionInput, Channel, type ChannelConfig, type ChannelHealth, type ChannelHealthReasonCode, type ChannelRuntimeState, CheckpointDiffDelivery, CheckpointDiffFile, CheckpointDiffFileResponse, CheckpointDiffPatchKind, CheckpointDiffPatchLine, CheckpointDiffStats, CheckpointDiffStatus, CheckpointDiffSummary, CheckpointRecord, ClaimReferralResponse, type CohubClientOptions, CohubHttpClient, type CompletionAssistantMessage, type CompletionMessage, type CompletionMessageRole, type CompletionThinkingLevel, type CompletionUsage, type ContentBlock, type CreateGenerationTaskRequest, type CreateGenerationTaskResponse, CreateInvitationInput, CreateInvitationResponse, type CreateSpaceCompletionInput, CreateSpaceInput, CreateSpaceModInput, CreateSpacePromptInput, CreateSpacePromptResponse, CreateSpaceSessionInput, CronJobPayload, CronJobRecord, CronJobUpdatePatch, CursorPageInfo, type DiscordChannelConfig, ExploreSection, ExploreSpaceItem, ExploreSpacesResponse, type FeishuChannelConfig, type Fetch, type GenerationContentBlock, type GenerationPolicy, type GenerationResult, type GenerationTaskResult, type GenerationUsageBilling, GenerationUsageBlock, GenerationUsageHourlyStat, GenerationUsageSummary, GlobalSearchResponse, GlobalSearchResult, GlobalSearchType, HttpError, HttpTransport, InvitationDetail, JsonObject, JsonPrimitive, JsonValue, LabelAssignmentListItem, LabelAssignmentPageInfo, LabelAssignmentRecord, LabelItemsResponse, LabelItemsSessionFork, LabelListItem, LabelRecord, LabelResourceType, LabelScopeType, LabelSource, type ListGenerationModelsResponse, MeResponse, type MessageRecord, ModelCatalogEntry, PatchResourceLabelsInput, PatchResourceLabelsResponse, Permission, PromptAccessMode, PromptTemplateCatalogEntry, PromptTemplateCatalogResponse, type PublicGenerationDeclaration, PublicReferral, PublicUserPageResponse, PublicUserProfile, PublicUserSpaceItem, PublicUserWorkItem, ReferenceAggregateGroup, ReferenceAggregateGroupBy, ReferenceAggregateResponse, ReferenceDirection, ReferenceKind, ReferenceQueryResponse, ReferenceQueryableType, ReferenceRecord, ReferenceResourceType, ReferralDashboard, ReferralListItem, ReferralReward, ReferralStatus, ResourceLabelsResponse, SandboxSpecId, SendMessageCronJobPayload, SessionBindingRecord, type SessionForkRecord, SessionMessageResponse, SessionMessagesPaginatedResponse, SessionMessagesResponse, SessionRecord, type SessionTurnIndexItem, SessionTurnIndexResponse, type SessionTurnRecord, SessionTurnResponse, type SessionTurnSegmentRecord, SessionTurnSignedUrlsResponse, SessionTurnStreamSnapshotResponse, SessionTurnWindowResponse, SessionTurnsPaginatedResponse, SpaceAccess, SpaceAccessPolicy, SpaceBootstrapSource, SpaceChannelBindingInput, SpaceCheckpointDetailResponse, SpaceCommerceBenefit, SpaceCommerceBuyerProfile, SpaceCommerceCreditsBenefit, SpaceCommerceFeatureBenefit, SpaceCommerceOrder, SpaceCommerceProduct, SpaceCommerceProductBenefitBinding, SpaceCommerceProductCreditBenefit, type SpaceCompletionResult, type SpaceCompletionStreamEvent, SpaceConfig, SpaceConfigInput, SpaceConfigResponse, SpaceConfigUpdateResponse, SpaceCreateResponse, SpaceDefaultResponse, SpaceEnvInput, SpaceFsCompleteUploadInput, SpaceFsCompleteUploadResponse, SpaceFsCreateUploadInput, SpaceFsCreateUploadResponse, SpaceFsEncoding, SpaceFsEntry, SpaceFsFileKind, SpaceFsFileResponse, SpaceFsMoveInput, SpaceFsPreparingFile, SpaceFsReadFilesError, SpaceFsReadFilesInput, SpaceFsReadFilesResponse, SpaceFsTreeResponse, SpaceFsUploadDestination, SpaceFsUploadEntry, SpaceFsUploadError, SpaceFsUploadPlanEntry, SpaceFsUploadPlanEntryInput, SpaceFsUploadProgress, SpaceFsUploadResponse, SpaceFsWriteFileInput, SpaceInvitation, SpaceListItem, SpaceMember, SpaceMeta, SpaceModListItem, SpacePendingDiffFileResponse, SpacePendingDiffSummary, SpacePresenceSnapshot, SpacePresenceUser, SpacePublicProfile, SpaceRecord, SpaceRole, SpaceSandboxAutoDestroyPolicy, SpaceSandboxConfig, SpaceSandboxProvider, SpaceSessionsResponse, SpaceUsageHourlyStat, SpaceUsageResponse, SpaceUsageSummary, TaskRunDetailResponse, TaskRunRecord, UserProfile, UserRulesResponse, UserSessionListItem, UserSessionSpaceSummary, UserSessionsResponse, createHttpClient };
|
|
1
|
+
import { $ as CheckpointDiffSummary, $n as SpaceFsPreparingFile, $r as ChannelConfig, $t as ReferenceKind, A as BillingProductDisplay, An as SpaceCommerceBuyerProfile, Ar as SpaceUsageSummary, At as LabelItemsSessionFork, B as CanvasDocumentRecord, Bn as SpaceConfigUpdateResponse, Br as GenerationPolicy, Bt as Permission, C as BillingCreditStatus, Cn as SkillCatalogResponse, Cr as SpaceRole, Ct as JsonObject, D as BillingPluginStatus, Dn as SpaceChannelBindingInput, Dr as SpaceSessionsResponse, Dt as LabelAssignmentPageInfo, E as BillingPaymentStatus, En as SpaceBootstrapSource, Er as SpaceSandboxProvider, Et as LabelAssignmentListItem, F as BillingSubscriptionHistoryList, Fn as SpaceCommerceProductBenefitBinding, Fr as UserSessionListItem, Ft as LabelSource, G as Channel, Gn as SpaceFsCompleteUploadResponse, Gt as PublicUserPageResponse, H as CanvasNodeRecord, Hn as SpaceDefaultResponse, Ht as PromptTemplateCatalogEntry, I as BillingSubscriptionHistoryStatus, In as SpaceCommerceProductCreditBenefit, Ir as UserSessionSpaceSummary, It as MeResponse, J as CheckpointDiffFileResponse, Jn as SpaceFsEncoding, Jt as PublicUserWorkItem, K as CheckpointDiffDelivery, Kn as SpaceFsCreateUploadInput, Kt as PublicUserProfile, L as BillingSubscriptionSummary, Ln as SpaceConfig, Lr as UserSessionsResponse, Lt as ModelCatalogEntry, M as BillingProductPricing, Mn as SpaceCommerceFeatureBenefit, Mr as TaskRunRecord, Mt as LabelRecord, N as BillingRedemptionResult, Nn as SpaceCommerceOrder, Nr as UserProfile, Nt as LabelResourceType, O as BillingProductBillingInterval, On as SpaceCheckpointDetailResponse, Or as SpaceUsageHourlyStat, Ot as LabelAssignmentRecord, P as BillingResponsePayload, Pn as SpaceCommerceProduct, Pr as UserRulesResponse, Pt as LabelScopeType, Q as CheckpointDiffStatus, Qn as SpaceFsMoveInput, Qr as GenerationResult, Qt as ReferenceDirection, R as CanvasBootstrapResponse, Rn as SpaceConfigInput, Rt as PatchResourceLabelsInput, S as BillingCreditGrantStatus, Sn as SkillCatalogEntry, Sr as SpaceRecord, St as InvitationDetail, T as BillingHistoryPagination, Tn as SpaceAccessPolicy, Tr as SpaceSandboxConfig, Tt as JsonValue, U as CanvasSemanticOp, Un as SpaceEnvInput, Ut as PromptTemplateCatalogResponse, V as CanvasNodeInput, Vn as SpaceCreateResponse, Vt as PromptAccessMode, W as CanvasTransactionInput, Wn as SpaceFsCompleteUploadInput, Wt as PublicReferral, X as CheckpointDiffPatchLine, Xn as SpaceFsFileKind, Xr as GenerationContentBlock, Xt as ReferenceAggregateGroupBy, Y as CheckpointDiffPatchKind, Yn as SpaceFsEntry, Yt as ReferenceAggregateGroup, Z as CheckpointDiffStats, Zn as SpaceFsFileResponse, Zt as ReferenceAggregateResponse, _ as BillingCatalogProduct, _n as SessionTurnResponse, _r as SpacePendingDiffFileResponse, _t as GenerationUsageHourlyStat, an as ReferralListItem, ar as SpaceFsUploadEntry, at as CreateSpaceModInput, b as BillingConversionIntent, bn as SessionTurnWindowResponse, br as SpacePresenceUser, bt as GlobalSearchResult, cn as ResourceLabelsResponse, cr as SpaceFsUploadPlanEntryInput, ct as CreateSpaceSessionInput, d as BatchUserProfilesResponse, di as MessageRecord, dn as SessionBindingRecord, dr as SpaceFsWriteFileInput, dt as CronJobUpdatePatch, ei as ChannelHealth, en as ReferenceQueryResponse, er as SpaceFsReadFilesError, et as CheckpointRecord, f as BillingBalanceActivity, fi as SessionForkRecord, fn as SessionMessageResponse, fr as SpaceInvitation, ft as CursorPageInfo, g as BillingCatalog, gn as SessionTurnIndexResponse, gr as SpaceModListItem, gt as GenerationUsageBlock, h as BillingBalanceActivityStatus, hi as SessionTurnRecord, hn as SessionRecord, hr as SpaceMeta, ht as ExploreSpacesResponse, ii as FeishuChannelConfig, in as ReferralDashboard, ir as SpaceFsUploadDestination, it as CreateSpaceInput, j as BillingProductKind, jn as SpaceCommerceCreditsBenefit, jr as TaskRunDetailResponse, jt as LabelListItem, k as BillingProductCreditBenefit, kn as SpaceCommerceBenefit, kr as SpaceUsageResponse, kt as LabelItemsResponse, l as AcceptInvitationResponse, ln as SandboxSpecId, lr as SpaceFsUploadProgress, lt as CronJobPayload, m as BillingBalanceActivityList, mi as SessionTurnIndexItem, mn as SessionMessagesResponse, mr as SpaceMember, mt as ExploreSpaceItem, ni as ChannelRuntimeState, nn as ReferenceRecord, nr as SpaceFsReadFilesResponse, nt as CreateInvitationInput, on as ReferralReward, or as SpaceFsUploadError, ot as CreateSpacePromptInput, p as BillingBalanceActivityKind, pi as SessionTurnSegmentRecord, pn as SessionMessagesPaginatedResponse, pr as SpaceListItem, pt as ExploreSection, q as CheckpointDiffFile, qn as SpaceFsCreateUploadResponse, qt as PublicUserSpaceItem, ri as DiscordChannelConfig, rn as ReferenceResourceType, rr as SpaceFsTreeResponse, rt as CreateInvitationResponse, sn as ReferralStatus, sr as SpaceFsUploadPlanEntry, st as CreateSpacePromptResponse, ti as ChannelHealthReasonCode, tn as ReferenceQueryableType, tr as SpaceFsReadFilesInput, tt as ClaimReferralResponse, u as ApiError, un as SendMessageCronJobPayload, ur as SpaceFsUploadResponse, ut as CronJobRecord, v as BillingCheckoutActionState, vi as ContentBlock, vn as SessionTurnSignedUrlsResponse, vr as SpacePendingDiffSummary, vt as GenerationUsageSummary, w as BillingCreditUnit, wn as SpaceAccess, wr as SpaceSandboxAutoDestroyPolicy, wt as JsonPrimitive, x as BillingCreditExpiryGroup, xn as SessionTurnsPaginatedResponse, xr as SpacePublicProfile, xt as GlobalSearchType, y as BillingCheckoutResult, yn as SessionTurnStreamSnapshotResponse, yr as SpacePresenceSnapshot, yt as GlobalSearchResponse, z as CanvasCreateInput, zn as SpaceConfigResponse, zt as PatchResourceLabelsResponse } from "./chunks/websocket.js";
|
|
2
|
+
import { $t as SpaceCompletionStreamEvent, Dt as Fetch, Et as CohubClientOptions, Jt as CompletionMessageRole, Kt as CompletionAssistantMessage, Ot as HttpError, Qt as SpaceCompletionResult, Xt as CompletionUsage, Yt as CompletionThinkingLevel, Zt as CreateSpaceCompletionInput, an as PublicGenerationDeclaration, en as CreateGenerationTaskRequest, in as ListGenerationModelsResponse, kt as HttpTransport, n as createHttpClient, nn as GenerationTaskResult, qt as CompletionMessage, rn as GenerationUsageBilling, t as CohubHttpClient, tn as CreateGenerationTaskResponse } from "./chunks/http.js";
|
|
3
|
+
export { AcceptInvitationResponse, ApiError, BatchUserProfilesResponse, BillingBalanceActivity, BillingBalanceActivityKind, BillingBalanceActivityList, BillingBalanceActivityStatus, BillingCatalog, BillingCatalogProduct, BillingCheckoutActionState, BillingCheckoutResult, BillingConversionIntent, BillingCreditExpiryGroup, BillingCreditGrantStatus, BillingCreditStatus, BillingCreditUnit, BillingHistoryPagination, BillingPaymentStatus, BillingPluginStatus, BillingProductBillingInterval, BillingProductCreditBenefit, BillingProductDisplay, BillingProductKind, BillingProductPricing, BillingRedemptionResult, BillingResponsePayload, BillingSubscriptionHistoryList, BillingSubscriptionHistoryStatus, BillingSubscriptionSummary, CanvasBootstrapResponse, CanvasCreateInput, CanvasDocumentRecord, CanvasNodeInput, CanvasNodeRecord, CanvasSemanticOp, CanvasTransactionInput, Channel, type ChannelConfig, type ChannelHealth, type ChannelHealthReasonCode, type ChannelRuntimeState, CheckpointDiffDelivery, CheckpointDiffFile, CheckpointDiffFileResponse, CheckpointDiffPatchKind, CheckpointDiffPatchLine, CheckpointDiffStats, CheckpointDiffStatus, CheckpointDiffSummary, CheckpointRecord, ClaimReferralResponse, type CohubClientOptions, CohubHttpClient, type CompletionAssistantMessage, type CompletionMessage, type CompletionMessageRole, type CompletionThinkingLevel, type CompletionUsage, type ContentBlock, type CreateGenerationTaskRequest, type CreateGenerationTaskResponse, CreateInvitationInput, CreateInvitationResponse, type CreateSpaceCompletionInput, CreateSpaceInput, CreateSpaceModInput, CreateSpacePromptInput, CreateSpacePromptResponse, CreateSpaceSessionInput, CronJobPayload, CronJobRecord, CronJobUpdatePatch, CursorPageInfo, type DiscordChannelConfig, ExploreSection, ExploreSpaceItem, ExploreSpacesResponse, type FeishuChannelConfig, type Fetch, type GenerationContentBlock, type GenerationPolicy, type GenerationResult, type GenerationTaskResult, type GenerationUsageBilling, GenerationUsageBlock, GenerationUsageHourlyStat, GenerationUsageSummary, GlobalSearchResponse, GlobalSearchResult, GlobalSearchType, HttpError, HttpTransport, InvitationDetail, JsonObject, JsonPrimitive, JsonValue, LabelAssignmentListItem, LabelAssignmentPageInfo, LabelAssignmentRecord, LabelItemsResponse, LabelItemsSessionFork, LabelListItem, LabelRecord, LabelResourceType, LabelScopeType, LabelSource, type ListGenerationModelsResponse, MeResponse, type MessageRecord, ModelCatalogEntry, PatchResourceLabelsInput, PatchResourceLabelsResponse, Permission, PromptAccessMode, PromptTemplateCatalogEntry, PromptTemplateCatalogResponse, type PublicGenerationDeclaration, PublicReferral, PublicUserPageResponse, PublicUserProfile, PublicUserSpaceItem, PublicUserWorkItem, ReferenceAggregateGroup, ReferenceAggregateGroupBy, ReferenceAggregateResponse, ReferenceDirection, ReferenceKind, ReferenceQueryResponse, ReferenceQueryableType, ReferenceRecord, ReferenceResourceType, ReferralDashboard, ReferralListItem, ReferralReward, ReferralStatus, ResourceLabelsResponse, SandboxSpecId, SendMessageCronJobPayload, SessionBindingRecord, type SessionForkRecord, SessionMessageResponse, SessionMessagesPaginatedResponse, SessionMessagesResponse, SessionRecord, type SessionTurnIndexItem, SessionTurnIndexResponse, type SessionTurnRecord, SessionTurnResponse, type SessionTurnSegmentRecord, SessionTurnSignedUrlsResponse, SessionTurnStreamSnapshotResponse, SessionTurnWindowResponse, SessionTurnsPaginatedResponse, SkillCatalogEntry, SkillCatalogResponse, SpaceAccess, SpaceAccessPolicy, SpaceBootstrapSource, SpaceChannelBindingInput, SpaceCheckpointDetailResponse, SpaceCommerceBenefit, SpaceCommerceBuyerProfile, SpaceCommerceCreditsBenefit, SpaceCommerceFeatureBenefit, SpaceCommerceOrder, SpaceCommerceProduct, SpaceCommerceProductBenefitBinding, SpaceCommerceProductCreditBenefit, type SpaceCompletionResult, type SpaceCompletionStreamEvent, SpaceConfig, SpaceConfigInput, SpaceConfigResponse, SpaceConfigUpdateResponse, SpaceCreateResponse, SpaceDefaultResponse, SpaceEnvInput, SpaceFsCompleteUploadInput, SpaceFsCompleteUploadResponse, SpaceFsCreateUploadInput, SpaceFsCreateUploadResponse, SpaceFsEncoding, SpaceFsEntry, SpaceFsFileKind, SpaceFsFileResponse, SpaceFsMoveInput, SpaceFsPreparingFile, SpaceFsReadFilesError, SpaceFsReadFilesInput, SpaceFsReadFilesResponse, SpaceFsTreeResponse, SpaceFsUploadDestination, SpaceFsUploadEntry, SpaceFsUploadError, SpaceFsUploadPlanEntry, SpaceFsUploadPlanEntryInput, SpaceFsUploadProgress, SpaceFsUploadResponse, SpaceFsWriteFileInput, SpaceInvitation, SpaceListItem, SpaceMember, SpaceMeta, SpaceModListItem, SpacePendingDiffFileResponse, SpacePendingDiffSummary, SpacePresenceSnapshot, SpacePresenceUser, SpacePublicProfile, SpaceRecord, SpaceRole, SpaceSandboxAutoDestroyPolicy, SpaceSandboxConfig, SpaceSandboxProvider, SpaceSessionsResponse, SpaceUsageHourlyStat, SpaceUsageResponse, SpaceUsageSummary, TaskRunDetailResponse, TaskRunRecord, UserProfile, UserRulesResponse, UserSessionListItem, UserSessionSpaceSummary, UserSessionsResponse, createHttpClient };
|