@neta-art/cohub 5.8.0 → 5.8.2
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/dist/chunks/http.d.ts +83 -1
- package/dist/chunks/http.js +180 -10
- package/dist/chunks/transport.js +16 -3
- package/dist/chunks/websocket.d.ts +22 -2
- package/dist/chunks/websocket.js +1 -1
- package/dist/http.d.ts +1 -1
- package/dist/index.d.ts +30 -2
- package/dist/index.js +23 -139
- package/dist/protocol/dist/board-connection.d.ts +7 -0
- package/dist/protocol/dist/board-connection.js +4 -0
- package/dist/protocol/dist/board-content.d.ts +1 -0
- package/dist/protocol/dist/board-content.js +26 -0
- package/dist/protocol/dist/board-document.d.ts +2 -0
- package/dist/protocol/dist/identifiers.js +10 -0
- package/dist/protocol/dist/index.d.ts +1 -0
- package/dist/protocol/dist/index.js +6 -1
- package/dist/protocol/dist/provenance.js +1 -0
- package/dist/protocol/dist/ui-command.js +2 -0
- package/dist/protocol/dist/work-promotion-stats.js +11 -0
- package/dist/protocol/dist/work-surface.js +2 -0
- package/dist/protocol/dist/work-view-stats.js +1 -0
- package/package.json +1 -1
package/dist/chunks/http.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ type GenerationUsageBilling = {
|
|
|
90
90
|
};
|
|
91
91
|
type GenerationTaskResult = {
|
|
92
92
|
model: string;
|
|
93
|
+
provider?: string | null;
|
|
93
94
|
output: GenerationContentBlock[];
|
|
94
95
|
requestId?: string;
|
|
95
96
|
cost?: number;
|
|
@@ -200,6 +201,10 @@ type PublicFileUrlResponse = {
|
|
|
200
201
|
url: string;
|
|
201
202
|
};
|
|
202
203
|
//#endregion
|
|
204
|
+
//#region ../protocol/dist/work-promotion-stats.d.ts
|
|
205
|
+
declare const WORK_PROMOTION_EVENT_KEYS: readonly ["landing", "ready", "registration_completed", "paywall_viewed", "checkout_started"];
|
|
206
|
+
type WorkPromotionEventKey = typeof WORK_PROMOTION_EVENT_KEYS[number];
|
|
207
|
+
//#endregion
|
|
203
208
|
//#region src/work-runtime.d.ts
|
|
204
209
|
type WorkRuntimeContext = {
|
|
205
210
|
work: {
|
|
@@ -1540,6 +1545,8 @@ declare class BoardClient {
|
|
|
1540
1545
|
relation?: string;
|
|
1541
1546
|
direction?: BoardConnectionDirection;
|
|
1542
1547
|
label?: string;
|
|
1548
|
+
sourcePortId?: string;
|
|
1549
|
+
targetPortId?: string;
|
|
1543
1550
|
txId?: string;
|
|
1544
1551
|
}): Promise<BoardBootstrap>;
|
|
1545
1552
|
/** Remove a connection. The nodes it joined are untouched. */
|
|
@@ -2014,6 +2021,54 @@ type WorkViewStatsResponse = {
|
|
|
2014
2021
|
views: number;
|
|
2015
2022
|
}>;
|
|
2016
2023
|
};
|
|
2024
|
+
type WorkPromotionProvider = "generic" | "meta";
|
|
2025
|
+
type WorkPromotionRecord = {
|
|
2026
|
+
id: string;
|
|
2027
|
+
workId: string;
|
|
2028
|
+
name: string;
|
|
2029
|
+
provider: WorkPromotionProvider | string;
|
|
2030
|
+
parameters: Record<string, string>;
|
|
2031
|
+
createdBy: string;
|
|
2032
|
+
createdAt: string;
|
|
2033
|
+
};
|
|
2034
|
+
type WorkPromotionProviderStatus = {
|
|
2035
|
+
key: WorkPromotionProvider | string;
|
|
2036
|
+
configured: boolean;
|
|
2037
|
+
};
|
|
2038
|
+
type WorkPromotionCreateInput = {
|
|
2039
|
+
name: string;
|
|
2040
|
+
provider: WorkPromotionProvider | string;
|
|
2041
|
+
parameters: Record<string, string>;
|
|
2042
|
+
};
|
|
2043
|
+
type WorkPromotionStatsResponse = {
|
|
2044
|
+
promotion: WorkPromotionRecord;
|
|
2045
|
+
summary: {
|
|
2046
|
+
landing: number;
|
|
2047
|
+
ready: number;
|
|
2048
|
+
registrationCompleted: number;
|
|
2049
|
+
paywallViewed: number;
|
|
2050
|
+
checkoutStarted: number;
|
|
2051
|
+
readyRate: number;
|
|
2052
|
+
};
|
|
2053
|
+
daily: Array<{
|
|
2054
|
+
date: string;
|
|
2055
|
+
landing: number;
|
|
2056
|
+
ready: number;
|
|
2057
|
+
registrationCompleted: number;
|
|
2058
|
+
paywallViewed: number;
|
|
2059
|
+
checkoutStarted: number;
|
|
2060
|
+
}>;
|
|
2061
|
+
};
|
|
2062
|
+
type WorkPromotionEventResponse = {
|
|
2063
|
+
ok: true;
|
|
2064
|
+
eventId: string;
|
|
2065
|
+
browser: {
|
|
2066
|
+
provider: "generic";
|
|
2067
|
+
} | {
|
|
2068
|
+
provider: "meta";
|
|
2069
|
+
pixelId: string;
|
|
2070
|
+
} | null;
|
|
2071
|
+
};
|
|
2017
2072
|
type WorkSessionResponse = {
|
|
2018
2073
|
token: string;
|
|
2019
2074
|
expiresIn: number;
|
|
@@ -2053,6 +2108,31 @@ declare class WorksApi {
|
|
|
2053
2108
|
ok: true;
|
|
2054
2109
|
}>;
|
|
2055
2110
|
getStats(workId: string): Promise<WorkViewStatsResponse>;
|
|
2111
|
+
listPromotions(workId: string): Promise<{
|
|
2112
|
+
promotions: WorkPromotionRecord[];
|
|
2113
|
+
providers: WorkPromotionProviderStatus[];
|
|
2114
|
+
}>;
|
|
2115
|
+
createPromotion(workId: string, input: WorkPromotionCreateInput): Promise<{
|
|
2116
|
+
promotion: WorkPromotionRecord;
|
|
2117
|
+
}>;
|
|
2118
|
+
getPromotionStats(workId: string, promotionId: string): Promise<WorkPromotionStatsResponse>;
|
|
2119
|
+
recordPromotionEvent(workId: string, promotionId: string, input: {
|
|
2120
|
+
eventKey: WorkPromotionEventKey;
|
|
2121
|
+
eventId?: string;
|
|
2122
|
+
sourceUrl?: string;
|
|
2123
|
+
fbp?: string;
|
|
2124
|
+
fbc?: string;
|
|
2125
|
+
productKey?: string;
|
|
2126
|
+
}): Promise<WorkPromotionEventResponse>;
|
|
2127
|
+
recordPromotionRegistration(workId: string, promotionId: string, input?: {
|
|
2128
|
+
sourceUrl?: string;
|
|
2129
|
+
fbp?: string;
|
|
2130
|
+
fbc?: string;
|
|
2131
|
+
}): Promise<{
|
|
2132
|
+
reported: boolean;
|
|
2133
|
+
eventId: string | null;
|
|
2134
|
+
browser: WorkPromotionEventResponse["browser"];
|
|
2135
|
+
}>;
|
|
2056
2136
|
listVersions(workId: string): Promise<{
|
|
2057
2137
|
versions: WorkVersionRecord[];
|
|
2058
2138
|
}>;
|
|
@@ -2104,6 +2184,8 @@ type WorkCommercePurchaseResponse = {
|
|
|
2104
2184
|
message: string | null;
|
|
2105
2185
|
orderId: string;
|
|
2106
2186
|
productKey: string;
|
|
2187
|
+
value: number | null;
|
|
2188
|
+
currency: string | null;
|
|
2107
2189
|
};
|
|
2108
2190
|
};
|
|
2109
2191
|
type WorkCommerceOrder = {
|
|
@@ -2164,4 +2246,4 @@ declare class CohubHttpClient {
|
|
|
2164
2246
|
}
|
|
2165
2247
|
declare const createHttpClient: (options?: CohubClientOptions) => CohubHttpClient;
|
|
2166
2248
|
//#endregion
|
|
2167
|
-
export {
|
|
2249
|
+
export { BoardTransactionError as $, GenerationsApi as $t, WorkResolveResponse as A, PublicFileUploadPlanEntry as An, SessionPatchApplyInput as At, ReferralsApi as B, ModelStatusResponse as Bn, CreatePublicAssetUploadInput as Bt, WorkPromotionProvider as C, createWorkRuntime as Cn, GenerationStreamStateEvent as Ct, WorkPublicOwnerRecord as D, PublicFileListEntry as Dn, SessionGenerationStreamClient as Dt, WorkPromotionStatsResponse as E, PublicFileCreateUploadResponse as En, GenerationStreamTurnUpdatedEvent as Et, WorkVersionRecord as F, GenerationTaskResult as Fn, createSessionPatchReducer as Ft, WaitForUiCommandOptions as G, PublicAssetUploadProtocol as Gt, UserApi as H, PublicAssetMimeType as Ht, WorkViewSource as I, GenerationUsageBilling as In, SessionAccessApi as It, BoardClient as J, UploadChatImageAttachmentInput as Jt, TasksApi as K, PublicAssetsApi as Kt, WorkViewStatsResponse as L, ListGenerationModelsResponse as Ln, ReferenceResourceSelector as Lt, WorkStatus as M, SpaceStartupResponse as Mn, SessionPatchReducer as Mt, WorkTargetType as N, CreateGenerationTaskRequest as Nn, SessionPatchState as Nt, WorkPublicSpaceRecord as O, PublicFileListResponse as On, createSessionGenerationStreamClient as Ot, WorkUpdateInput as P, CreateGenerationTaskResponse as Pn, SessionPatchStatus as Pt, BoardTransactionAppliedEvent as Q, ModelsApi as Qt, WorkVisibility as R, PublicGenerationDeclaration as Rn, ReferencesApi as Rt, WorkPromotionEventResponse as S, createSlugWorkIdResolver as Sn, GenerationStreamOutOfSyncEvent as St, WorkPromotionRecord as T, PublicFileCreateUploadInput as Tn, GenerationStreamSubscriptionHandlers as Tt, CreateUiCommandInput as U, PublicAssetPurpose as Ut, UsersApi as V, CreatePublicAssetUploadResponse as Vt, UiCommandsApi as W, PublicAssetUploadProgress as Wt, BoardPlaybackChangedEvent as X, SkillsApi as Xt, BoardEventName as Y, UploadPublicAssetInput as Yt, BoardSubscriptionHandlers as Z, PromptsApi as Zt, WorkExtractedPageMeta as _, WorkRuntimeCheckoutStatus as _n, GenerationStreamErrorEvent as _t, WorkCommerceCreditConsumeResponse as a, HttpTraceContext as an, SpaceEventName as at, WorkPresentationMeta as b, WorkRuntimeRequestOptions as bn, GenerationStreamIntermediateMessage as bt, WorkCommerceEntitlementsResponse as c, UnauthorizedContext as cn, SpacesApi as ct, WorkCommercePurchaseResponse as d, sanitizeAccessToken as dn, BuildSpacePathInput as dt, CronJobsApi as en, BoardTransactionInput as et, WorkAuthorizeResponse as f, ParentBridgeTransport as fn, PublicInviteApi as ft, WorkDetailResponse as g, WorkRuntimeCheckoutState as gn, GenerationStreamCommitEvent as gt, WorkCreateInput as h, WorkRuntimeApi as hn, AssistantMessageCommit as ht, WorkCommerceCheckoutStatus as i, HttpError as in, SpaceClient as it, WorkSessionResponse as j, PublicFileUrlResponse as jn, SessionPatchApplyResult as jt, WorkRecord as k, PublicFileUploadEntryInput as kn, parseAssistantMessageCommit as kt, WorkCommerceOrder as l, joinApiUrl as ln, WebSocketConnectionState as lt, WorkContentDownload as m, WorkIdResolver as mn, buildSpacePath as mt, createHttpClient as n, CohubClientOptions as nn, SessionSubscriptionHandlers as nt, WorkCommerceCreditConsumeStatus as o, HttpTransport as on, SpacePublicFilesApi as ot, WorkContent as p, PopupBrokerTransport as pn, buildSpaceInvitePath as pt, BoardAwarenessUpdatedEvent as q, UploadChatAttachmentInput as qt, WorkCommerceApi as r, Fetch as rn, SpaceChannelBindingRecord as rt, WorkCommerceEntitlement as s, RawHttpResponse as sn, SpaceTurnListOptions as st, CohubHttpClient as t, ChannelsApi as tn, SessionEventName as tt, WorkCommerceProductResolveResponse as u, matchesUnauthorizedErrorToken as un, BuildSpaceInvitePathInput as ut, WorkGetResponse as v, WorkRuntimeContext as vn, GenerationStreamEvent as vt, WorkPromotionProviderStatus as w, resolveWorkTransport as wn, GenerationStreamSubscribeOptions as wt, WorkPromotionCreateInput as x, WorkRuntimeTransport as xn, GenerationStreamLifecycleEvent as xt, WorkMeta as y, WorkRuntimeModeConfig as yn, GenerationStreamFinalizedEvent as yt, WorksApi as z, ModelStatusEntry as zn, SearchApi as zt };
|
package/dist/chunks/http.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as
|
|
1
|
+
import { D as getRealtimeBoardRoom, O as getRealtimeSpaceRoom, n as HttpTransport, t as HttpError, y as isUuid } from "./transport.js";
|
|
2
2
|
import { a as resolveApiBaseUrl } from "./environment.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import "perfect-freehand";
|
|
@@ -520,6 +520,8 @@ const BoardConnectionAnchorSchema = z.union([
|
|
|
520
520
|
const AUTO_BOARD_CONNECTION_ANCHOR = { kind: "auto" };
|
|
521
521
|
const BoardConnectionEndpointSchema = z.object({
|
|
522
522
|
nodeId: z.string().min(1).max(160),
|
|
523
|
+
/** Optional semantic port. Older connections omit it and remain valid. */
|
|
524
|
+
portId: z.string().min(1).max(120).optional(),
|
|
523
525
|
anchor: BoardConnectionAnchorSchema.default(AUTO_BOARD_CONNECTION_ANCHOR)
|
|
524
526
|
});
|
|
525
527
|
/**
|
|
@@ -616,10 +618,12 @@ function createBoardConnection(input) {
|
|
|
616
618
|
id: input.id,
|
|
617
619
|
source: {
|
|
618
620
|
nodeId: input.sourceNodeId,
|
|
621
|
+
...input.sourcePortId ? { portId: input.sourcePortId } : {},
|
|
619
622
|
anchor: input.sourceAnchor ?? AUTO_BOARD_CONNECTION_ANCHOR
|
|
620
623
|
},
|
|
621
624
|
target: {
|
|
622
625
|
nodeId: input.targetNodeId,
|
|
626
|
+
...input.targetPortId ? { portId: input.targetPortId } : {},
|
|
623
627
|
anchor: input.targetAnchor ?? AUTO_BOARD_CONNECTION_ANCHOR
|
|
624
628
|
},
|
|
625
629
|
relation: input.relation ?? "related",
|
|
@@ -836,6 +840,27 @@ z.discriminatedUnion("type", [
|
|
|
836
840
|
playbackId: z.string().uuid()
|
|
837
841
|
})
|
|
838
842
|
]);
|
|
843
|
+
const BoardContentKindSchema = z.enum([
|
|
844
|
+
"text",
|
|
845
|
+
"image",
|
|
846
|
+
"video",
|
|
847
|
+
"audio",
|
|
848
|
+
"file",
|
|
849
|
+
"json",
|
|
850
|
+
"collection"
|
|
851
|
+
]);
|
|
852
|
+
const BoardPortSchema = z.object({
|
|
853
|
+
id: z.string().min(1).max(120),
|
|
854
|
+
kind: BoardContentKindSchema,
|
|
855
|
+
role: z.string().min(1).max(80).optional(),
|
|
856
|
+
required: z.boolean().optional(),
|
|
857
|
+
multiple: z.boolean().optional(),
|
|
858
|
+
maxItems: z.number().int().positive().optional()
|
|
859
|
+
}).strict();
|
|
860
|
+
z.object({
|
|
861
|
+
inputs: z.array(BoardPortSchema),
|
|
862
|
+
outputs: z.array(BoardPortSchema)
|
|
863
|
+
}).strict();
|
|
839
864
|
//#endregion
|
|
840
865
|
//#region ../protocol/dist/board-url.js
|
|
841
866
|
const BOARD_REMOTE_URL_MAX_LENGTH = 4096;
|
|
@@ -1742,21 +1767,20 @@ const UI_COMMAND_TERMINAL_STATUSES = [
|
|
|
1742
1767
|
const isTerminalUiCommandStatus = (status) => UI_COMMAND_TERMINAL_STATUSES.includes(status);
|
|
1743
1768
|
const METHOD_RE = /^[A-Za-z][A-Za-z0-9_.:-]{0,63}$/;
|
|
1744
1769
|
const isUiSurfaceMethod = (value) => typeof value === "string" && METHOD_RE.test(value);
|
|
1745
|
-
const WORK_ID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
1746
1770
|
const UI_COMMAND_ID_RE = /^[A-Za-z0-9_-]{1,64}$/;
|
|
1747
1771
|
const parseUiCommandId = (value) => {
|
|
1748
1772
|
if (typeof value !== "string") return null;
|
|
1749
1773
|
const trimmed = value.trim();
|
|
1750
1774
|
return UI_COMMAND_ID_RE.test(trimmed) ? trimmed : null;
|
|
1751
1775
|
};
|
|
1752
|
-
const isRecord$
|
|
1776
|
+
const isRecord$2 = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
1753
1777
|
const asTrimmed = (value) => {
|
|
1754
1778
|
if (typeof value !== "string") return null;
|
|
1755
1779
|
const trimmed = value.trim();
|
|
1756
1780
|
return trimmed ? trimmed : null;
|
|
1757
1781
|
};
|
|
1758
1782
|
const parseLaunch = (value) => {
|
|
1759
|
-
if (!isRecord$
|
|
1783
|
+
if (!isRecord$2(value)) return void 0;
|
|
1760
1784
|
const search = asTrimmed(value.search);
|
|
1761
1785
|
const hash = asTrimmed(value.hash);
|
|
1762
1786
|
if (!search && !hash) return void 0;
|
|
@@ -1774,7 +1798,7 @@ const measureUiCommandPayload = (value) => {
|
|
|
1774
1798
|
}
|
|
1775
1799
|
};
|
|
1776
1800
|
const parseUiCommand = (input) => {
|
|
1777
|
-
if (!isRecord$
|
|
1801
|
+
if (!isRecord$2(input)) return {
|
|
1778
1802
|
command: null,
|
|
1779
1803
|
error: "command must be an object"
|
|
1780
1804
|
};
|
|
@@ -1783,7 +1807,7 @@ const parseUiCommand = (input) => {
|
|
|
1783
1807
|
error: "command.type must be one of: preview.show"
|
|
1784
1808
|
};
|
|
1785
1809
|
const preview = input.preview;
|
|
1786
|
-
if (!isRecord$
|
|
1810
|
+
if (!isRecord$2(preview)) return {
|
|
1787
1811
|
command: null,
|
|
1788
1812
|
error: "command.preview is required"
|
|
1789
1813
|
};
|
|
@@ -1796,7 +1820,7 @@ const parseUiCommand = (input) => {
|
|
|
1796
1820
|
command: null,
|
|
1797
1821
|
error: "command.preview.workId is required"
|
|
1798
1822
|
};
|
|
1799
|
-
if (!
|
|
1823
|
+
if (!isUuid(workId)) return {
|
|
1800
1824
|
command: null,
|
|
1801
1825
|
error: "command.preview.workId must be a Work id"
|
|
1802
1826
|
};
|
|
@@ -1814,7 +1838,7 @@ const parseUiCommand = (input) => {
|
|
|
1814
1838
|
}
|
|
1815
1839
|
let request;
|
|
1816
1840
|
if (input.request !== void 0 && input.request !== null) {
|
|
1817
|
-
if (!isRecord$
|
|
1841
|
+
if (!isRecord$2(input.request)) return {
|
|
1818
1842
|
command: null,
|
|
1819
1843
|
error: "command.request must be an object"
|
|
1820
1844
|
};
|
|
@@ -1866,6 +1890,123 @@ const parseUiCommand = (input) => {
|
|
|
1866
1890
|
};
|
|
1867
1891
|
};
|
|
1868
1892
|
//#endregion
|
|
1893
|
+
//#region ../protocol/dist/work-surface.js
|
|
1894
|
+
const WORK_SURFACE_PROTOCOL = "cohub.surface";
|
|
1895
|
+
const WORK_SURFACE_READY_TIMEOUT_MS = 1e4;
|
|
1896
|
+
const WORK_SURFACE_REQUEST_TIMEOUT_MS = 15e3;
|
|
1897
|
+
const WORK_COMPOSER_CHIP_KEY_MAX_LENGTH = 80;
|
|
1898
|
+
const WORK_COMPOSER_CHIP_LABEL_MAX_LENGTH = 120;
|
|
1899
|
+
const WORK_COMPOSER_CHIP_CONTENT_MAX_BYTES = 32 * 1024;
|
|
1900
|
+
const isRecord$1 = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
1901
|
+
const isSurfaceEnvelope = (value) => isRecord$1(value) && value.protocol === "cohub.surface" && value.version === 1;
|
|
1902
|
+
const parseWorkSurfaceReady = (value) => {
|
|
1903
|
+
if (!isSurfaceEnvelope(value) || value.type !== "ready") return null;
|
|
1904
|
+
const methods = Array.isArray(value.methods) ? value.methods.filter((method) => typeof method === "string" && Boolean(method)) : [];
|
|
1905
|
+
return {
|
|
1906
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1907
|
+
version: 1,
|
|
1908
|
+
type: "ready",
|
|
1909
|
+
methods
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
const parseWorkSurfaceResponse = (value) => {
|
|
1913
|
+
if (!isSurfaceEnvelope(value) || value.type !== "response") return null;
|
|
1914
|
+
if (typeof value.requestId !== "string" || !value.requestId) return null;
|
|
1915
|
+
const error = isRecord$1(value.error) ? {
|
|
1916
|
+
code: typeof value.error.code === "string" && value.error.code ? value.error.code : "surface_error",
|
|
1917
|
+
message: typeof value.error.message === "string" ? value.error.message : "Work surface call failed"
|
|
1918
|
+
} : void 0;
|
|
1919
|
+
return {
|
|
1920
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1921
|
+
version: 1,
|
|
1922
|
+
type: "response",
|
|
1923
|
+
requestId: value.requestId,
|
|
1924
|
+
ok: value.ok === true,
|
|
1925
|
+
...error ? { error } : {}
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
const parseComposerChipKey = (value) => {
|
|
1929
|
+
if (typeof value !== "string") return null;
|
|
1930
|
+
const key = value.trim();
|
|
1931
|
+
if (!key || key.length > 80) return null;
|
|
1932
|
+
return key;
|
|
1933
|
+
};
|
|
1934
|
+
const parseWorkComposerChipSet = (value) => {
|
|
1935
|
+
if (!isSurfaceEnvelope(value) || value.type !== "composer.chip.set" || !isRecord$1(value.chip)) return null;
|
|
1936
|
+
const key = parseComposerChipKey(value.chip.key);
|
|
1937
|
+
if (!key || typeof value.chip.label !== "string" || typeof value.chip.content !== "string") return null;
|
|
1938
|
+
const label = value.chip.label.trim();
|
|
1939
|
+
if (!label || label.length > 120) return null;
|
|
1940
|
+
if (!value.chip.content.trim()) return null;
|
|
1941
|
+
if (new TextEncoder().encode(value.chip.content).length > 32768) return null;
|
|
1942
|
+
return {
|
|
1943
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1944
|
+
version: 1,
|
|
1945
|
+
type: "composer.chip.set",
|
|
1946
|
+
chip: {
|
|
1947
|
+
key,
|
|
1948
|
+
label,
|
|
1949
|
+
content: value.chip.content
|
|
1950
|
+
}
|
|
1951
|
+
};
|
|
1952
|
+
};
|
|
1953
|
+
const parseWorkComposerChipClear = (value) => {
|
|
1954
|
+
if (!isSurfaceEnvelope(value) || value.type !== "composer.chip.clear") return null;
|
|
1955
|
+
const key = parseComposerChipKey(value.key);
|
|
1956
|
+
return key ? {
|
|
1957
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1958
|
+
version: 1,
|
|
1959
|
+
type: "composer.chip.clear",
|
|
1960
|
+
key
|
|
1961
|
+
} : null;
|
|
1962
|
+
};
|
|
1963
|
+
const parseWorkSurfaceRequest = (value) => {
|
|
1964
|
+
if (!isSurfaceEnvelope(value) || value.type !== "request") return null;
|
|
1965
|
+
if (typeof value.requestId !== "string" || !value.requestId) return null;
|
|
1966
|
+
if (typeof value.method !== "string" || !value.method) return null;
|
|
1967
|
+
const commandId = parseUiCommandId(value.commandId);
|
|
1968
|
+
if (!commandId) return null;
|
|
1969
|
+
return {
|
|
1970
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1971
|
+
version: 1,
|
|
1972
|
+
type: "request",
|
|
1973
|
+
requestId: value.requestId,
|
|
1974
|
+
method: value.method,
|
|
1975
|
+
...value.input === void 0 ? {} : { input: value.input },
|
|
1976
|
+
commandId
|
|
1977
|
+
};
|
|
1978
|
+
};
|
|
1979
|
+
const buildWorkSurfaceReady = (methods) => ({
|
|
1980
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1981
|
+
version: 1,
|
|
1982
|
+
type: "ready",
|
|
1983
|
+
methods: [...methods]
|
|
1984
|
+
});
|
|
1985
|
+
const buildWorkSurfaceRequest = (input) => ({
|
|
1986
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1987
|
+
version: 1,
|
|
1988
|
+
type: "request",
|
|
1989
|
+
...input
|
|
1990
|
+
});
|
|
1991
|
+
const buildWorkSurfaceResponse = (input) => ({
|
|
1992
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1993
|
+
version: 1,
|
|
1994
|
+
type: "response",
|
|
1995
|
+
...input
|
|
1996
|
+
});
|
|
1997
|
+
const buildWorkComposerChipSet = (chip) => ({
|
|
1998
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
1999
|
+
version: 1,
|
|
2000
|
+
type: "composer.chip.set",
|
|
2001
|
+
chip
|
|
2002
|
+
});
|
|
2003
|
+
const buildWorkComposerChipClear = (key) => ({
|
|
2004
|
+
protocol: WORK_SURFACE_PROTOCOL,
|
|
2005
|
+
version: 1,
|
|
2006
|
+
type: "composer.chip.clear",
|
|
2007
|
+
key
|
|
2008
|
+
});
|
|
2009
|
+
//#endregion
|
|
1869
2010
|
//#region src/board/core/draw-geometry.ts
|
|
1870
2011
|
/** Radius of a sample in world units given the stroke size and pressure. */
|
|
1871
2012
|
function sampleRadius(size, pressure) {
|
|
@@ -4155,7 +4296,9 @@ var BoardClient = class {
|
|
|
4155
4296
|
targetNodeId: input.targetNodeId,
|
|
4156
4297
|
...input.relation === void 0 ? {} : { relation: input.relation },
|
|
4157
4298
|
...input.direction === void 0 ? {} : { direction: input.direction },
|
|
4158
|
-
...input.label === void 0 ? {} : { label: input.label }
|
|
4299
|
+
...input.label === void 0 ? {} : { label: input.label },
|
|
4300
|
+
...input.sourcePortId === void 0 ? {} : { sourcePortId: input.sourcePortId },
|
|
4301
|
+
...input.targetPortId === void 0 ? {} : { targetPortId: input.targetPortId }
|
|
4159
4302
|
});
|
|
4160
4303
|
return this.apply({
|
|
4161
4304
|
txId: input.txId ?? randomBoardId(),
|
|
@@ -4917,6 +5060,33 @@ var WorksApi = class {
|
|
|
4917
5060
|
getStats(workId) {
|
|
4918
5061
|
return this.transport.request(`/api/works/${workId}/stats`);
|
|
4919
5062
|
}
|
|
5063
|
+
listPromotions(workId) {
|
|
5064
|
+
return this.transport.request(`/api/works/${workId}/promotions`);
|
|
5065
|
+
}
|
|
5066
|
+
createPromotion(workId, input) {
|
|
5067
|
+
return this.transport.request(`/api/works/${workId}/promotions`, {
|
|
5068
|
+
method: "POST",
|
|
5069
|
+
headers: { "Content-Type": "application/json" },
|
|
5070
|
+
body: JSON.stringify(input)
|
|
5071
|
+
});
|
|
5072
|
+
}
|
|
5073
|
+
getPromotionStats(workId, promotionId) {
|
|
5074
|
+
return this.transport.request(`/api/works/${workId}/promotions/${promotionId}/stats`);
|
|
5075
|
+
}
|
|
5076
|
+
recordPromotionEvent(workId, promotionId, input) {
|
|
5077
|
+
return this.transport.request(`/api/works/${workId}/promotions/${promotionId}/events`, {
|
|
5078
|
+
method: "POST",
|
|
5079
|
+
headers: { "Content-Type": "application/json" },
|
|
5080
|
+
body: JSON.stringify(input)
|
|
5081
|
+
});
|
|
5082
|
+
}
|
|
5083
|
+
recordPromotionRegistration(workId, promotionId, input) {
|
|
5084
|
+
return this.transport.request(`/api/works/${workId}/promotions/${promotionId}/registration`, {
|
|
5085
|
+
method: "POST",
|
|
5086
|
+
headers: input ? { "Content-Type": "application/json" } : void 0,
|
|
5087
|
+
body: input ? JSON.stringify(input) : void 0
|
|
5088
|
+
});
|
|
5089
|
+
}
|
|
4920
5090
|
listVersions(workId) {
|
|
4921
5091
|
return this.transport.request(`/api/works/${workId}/versions`);
|
|
4922
5092
|
}
|
|
@@ -5025,4 +5195,4 @@ var CohubHttpClient = class {
|
|
|
5025
5195
|
};
|
|
5026
5196
|
const createHttpClient = (options) => new CohubHttpClient(options);
|
|
5027
5197
|
//#endregion
|
|
5028
|
-
export {
|
|
5198
|
+
export { parseUsername as $, WORK_SURFACE_READY_TIMEOUT_MS as A, parseWorkSurfaceRequest as B, BoardInputError as C, WORK_COMPOSER_CHIP_CONTENT_MAX_BYTES as D, validateBoardNodes as E, buildWorkSurfaceRequest as F, UI_COMMAND_PENDING_TTL_SECONDS as G, UI_COMMAND_DEFAULT_TIMEOUT_MS as H, buildWorkSurfaceResponse as I, UI_COMMAND_VERSION as J, UI_COMMAND_SETTLEMENT_GRACE_SECONDS as K, parseWorkComposerChipClear as L, buildWorkComposerChipClear as M, buildWorkComposerChipSet as N, WORK_COMPOSER_CHIP_KEY_MAX_LENGTH as O, buildWorkSurfaceReady as P, parseSpaceSlug as Q, parseWorkComposerChipSet as R, createSessionPatchReducer as S, createBoardNode as T, UI_COMMAND_MAX_TIMEOUT_MS as U, parseWorkSurfaceResponse as V, UI_COMMAND_PAYLOAD_MAX_BYTES as W, isUiSurfaceMethod as X, isTerminalUiCommandStatus as Y, parseUiCommand as Z, buildSpacePath as _, ModelsApi as _t, ReferralsApi as a, validateBoardNodeInput as at, parseAssistantMessageCommit as b, ChannelsApi as bt, UiCommandsApi as c, ensureRealtimeConnected as ct, BoardTransactionError as d, SessionAccessApi as dt, BoardAwarenessClientPayloadSchema as et, SpaceClient as f, ReferencesApi as ft, buildSpaceInvitePath as g, PromptsApi as gt, PublicInviteApi as h, SkillsApi as ht, WorksApi as i, BOARD_NODE_CONTRACT as it, WORK_SURFACE_REQUEST_TIMEOUT_MS as j, WORK_COMPOSER_CHIP_LABEL_MAX_LENGTH as k, TasksApi as l, BOARD_BUILTIN_CAPABILITIES as lt, SpacesApi as m, PublicAssetsApi as mt, createHttpClient as n, BOARD_GEO_KINDS as nt, UsersApi as o, BoardPlaybackPolicySchema as ot, SpacePublicFilesApi as p, SearchApi as pt, UI_COMMAND_TERMINAL_TTL_SECONDS as q, WorkCommerceApi as r, BOARD_NATIVE_NODE_TYPES as rt, UserApi as s, parseBoardPlaybackPolicy as st, CohubHttpClient as t, BOARD_COLOR_IDS as tt, BoardClient as u, DEFAULT_BOARD_RENDER_LIMITS as ut, SessionGenerationStreamClient as v, GenerationsApi as vt, assertBoardNodes as w, SessionPatchReducer as x, createSessionGenerationStreamClient as y, CronJobsApi as yt, parseWorkSurfaceReady as z };
|
package/dist/chunks/transport.js
CHANGED
|
@@ -51,6 +51,20 @@ const getSessionTurnPatchStreamKey = (input, options = {}) => {
|
|
|
51
51
|
return options.includeSessionFallback ? getNonEmptyString(input.sessionId) : null;
|
|
52
52
|
};
|
|
53
53
|
//#endregion
|
|
54
|
+
//#region ../protocol/dist/identifiers.js
|
|
55
|
+
const UUID_SHAPE_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
56
|
+
const UUID_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}";
|
|
57
|
+
const UUID_OR_SHORT_UUID_PATTERN = `^(?:${UUID_PATTERN}|[0-9a-fA-F]{32})$`;
|
|
58
|
+
const UUID_SHAPE_REGEX = new RegExp(`^${UUID_SHAPE_PATTERN}$`);
|
|
59
|
+
const UUID_REGEX = new RegExp(`^${UUID_PATTERN}$`);
|
|
60
|
+
new RegExp(UUID_OR_SHORT_UUID_PATTERN);
|
|
61
|
+
function isUuidLike(value) {
|
|
62
|
+
return typeof value === "string" && UUID_SHAPE_REGEX.test(value);
|
|
63
|
+
}
|
|
64
|
+
function isUuid(value) {
|
|
65
|
+
return typeof value === "string" && UUID_REGEX.test(value);
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
54
68
|
//#region ../protocol/dist/provenance.js
|
|
55
69
|
/** Request provenance via X-Cohub-Source-* headers. Never used for authorization. */
|
|
56
70
|
const COHUB_SOURCE_HEADER = {
|
|
@@ -62,8 +76,7 @@ const COHUB_SOURCE_HEADER = {
|
|
|
62
76
|
sandboxVersion: "X-Cohub-Source-Sandbox",
|
|
63
77
|
via: "X-Cohub-Source-Via"
|
|
64
78
|
};
|
|
65
|
-
const
|
|
66
|
-
const isRequestSourceUuid = (value) => typeof value === "string" && UUID_RE.test(value);
|
|
79
|
+
const isRequestSourceUuid = (value) => isUuidLike(value);
|
|
67
80
|
const REQUEST_SOURCE_VIA_MAX_LENGTH = 64;
|
|
68
81
|
/** Opaque, url-safe client instance id. */
|
|
69
82
|
const CLIENT_ID_RE = /^[A-Za-z0-9_-]{8,64}$/;
|
|
@@ -439,4 +452,4 @@ var HttpTransport = class {
|
|
|
439
452
|
}
|
|
440
453
|
};
|
|
441
454
|
//#endregion
|
|
442
|
-
export {
|
|
455
|
+
export { isRealtimeDomain as A, WS_BOARD_AWARENESS_CAPABILITY as C, getRealtimeBoardRoom as D, WS_ROOM_SUBSCRIPTION_CAPABILITY as E, getRealtimeSpaceRoom as O, REALTIME_ROOM_MAX_PAYLOAD_BYTES as S, WS_REALTIME_ROOM_CAPABILITY as T, requestSourceToHeaders as _, sanitizeAccessToken as a, REALTIME_DOMAINS as b, REQUEST_SOURCE_VIA_MAX_LENGTH as c, isRequestSourceEmpty as d, isRequestSourceUuid as f, readRequestSourceFromEnv as g, parseRequestSourceFromHeaders as h, matchesUnauthorizedErrorToken as i, normalizeRealtimeRooms as j, getSessionTurnPatchStreamKey as k, hasRequestSourceIdentity as l, normalizeRequestSource as m, HttpTransport as n, COHUB_SOURCE_HEADER as o, mergeRequestSourceIntoMeta as p, joinApiUrl as r, COHUB_SOURCE_HEADER_NAMES as s, HttpError as t, isRequestSourceClientId as u, resolveRequestSourceChannel as v, WS_COMPACT_STREAM_CAPABILITY as w, REALTIME_ROOM_EVENT_NAME_PATTERN as x, isUuid as y };
|
|
@@ -226,6 +226,7 @@ type SpaceCompletionStreamEvent = {
|
|
|
226
226
|
//#region ../protocol/dist/model/turn.d.ts
|
|
227
227
|
type SessionTurnStatus = "queued" | "running" | "abort_requested" | "completed" | "failed" | "interrupted" | "merged" | "cancelled";
|
|
228
228
|
type SessionTurnIntent = "steer" | "followup" | "compact";
|
|
229
|
+
type SessionTurnExecutionKind = "agent" | "direct_generation";
|
|
229
230
|
type SessionTurnSummary = {
|
|
230
231
|
text?: string | null;
|
|
231
232
|
finishReason?: "completed" | "failed" | "interrupted" | "merged" | "cancelled";
|
|
@@ -283,6 +284,7 @@ type SessionTurnIndexItem = {
|
|
|
283
284
|
sourceTurnId?: string;
|
|
284
285
|
sequence: number;
|
|
285
286
|
status: SessionTurnStatus;
|
|
287
|
+
executionKind?: SessionTurnExecutionKind;
|
|
286
288
|
/** Present on current turn index payloads; older caches may omit it. */
|
|
287
289
|
intent?: SessionTurnIntent;
|
|
288
290
|
userUuid?: string | null;
|
|
@@ -324,6 +326,7 @@ type SessionTurnRecord = {
|
|
|
324
326
|
sourceTurnId?: string;
|
|
325
327
|
userUuid: string | null;
|
|
326
328
|
sequence: number;
|
|
329
|
+
executionKind?: SessionTurnExecutionKind;
|
|
327
330
|
status: SessionTurnStatus;
|
|
328
331
|
intent: SessionTurnIntent;
|
|
329
332
|
userContent: ContentBlock[];
|
|
@@ -521,6 +524,7 @@ declare const BoardConnectionSchema: z.ZodObject<{
|
|
|
521
524
|
id: z.ZodString;
|
|
522
525
|
source: z.ZodObject<{
|
|
523
526
|
nodeId: z.ZodString;
|
|
527
|
+
portId: z.ZodOptional<z.ZodString>;
|
|
524
528
|
anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
525
529
|
kind: z.ZodLiteral<"auto">;
|
|
526
530
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -540,6 +544,7 @@ declare const BoardConnectionSchema: z.ZodObject<{
|
|
|
540
544
|
}, z.core.$strip>;
|
|
541
545
|
target: z.ZodObject<{
|
|
542
546
|
nodeId: z.ZodString;
|
|
547
|
+
portId: z.ZodOptional<z.ZodString>;
|
|
543
548
|
anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
544
549
|
kind: z.ZodLiteral<"auto">;
|
|
545
550
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -606,6 +611,7 @@ type BoardConnectionInput = BoardConnection;
|
|
|
606
611
|
declare const BoardConnectionPatchSchema: z.ZodObject<{
|
|
607
612
|
source: z.ZodOptional<z.ZodObject<{
|
|
608
613
|
nodeId: z.ZodString;
|
|
614
|
+
portId: z.ZodOptional<z.ZodString>;
|
|
609
615
|
anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
610
616
|
kind: z.ZodLiteral<"auto">;
|
|
611
617
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -625,6 +631,7 @@ declare const BoardConnectionPatchSchema: z.ZodObject<{
|
|
|
625
631
|
}, z.core.$strip>>;
|
|
626
632
|
target: z.ZodOptional<z.ZodObject<{
|
|
627
633
|
nodeId: z.ZodString;
|
|
634
|
+
portId: z.ZodOptional<z.ZodString>;
|
|
628
635
|
anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
629
636
|
kind: z.ZodLiteral<"auto">;
|
|
630
637
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1021,6 +1028,7 @@ declare const BoardCreateInputSchema: z.ZodObject<{
|
|
|
1021
1028
|
id: z.ZodString;
|
|
1022
1029
|
source: z.ZodObject<{
|
|
1023
1030
|
nodeId: z.ZodString;
|
|
1031
|
+
portId: z.ZodOptional<z.ZodString>;
|
|
1024
1032
|
anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
1025
1033
|
kind: z.ZodLiteral<"auto">;
|
|
1026
1034
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1040,6 +1048,7 @@ declare const BoardCreateInputSchema: z.ZodObject<{
|
|
|
1040
1048
|
}, z.core.$strip>;
|
|
1041
1049
|
target: z.ZodObject<{
|
|
1042
1050
|
nodeId: z.ZodString;
|
|
1051
|
+
portId: z.ZodOptional<z.ZodString>;
|
|
1043
1052
|
anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
1044
1053
|
kind: z.ZodLiteral<"auto">;
|
|
1045
1054
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2056,7 +2065,7 @@ type SessionTurnLifecycleEvent = {
|
|
|
2056
2065
|
at: string;
|
|
2057
2066
|
};
|
|
2058
2067
|
};
|
|
2059
|
-
type RealtimeTurnRecord = Partial<Pick<SessionTurnRecord, "id" | "sessionId" | "sequence" | "status" | "intent" | "userUuid" | "authorProfile" | "userContent" | "userText" | "assistantContent" | "assistantText" | "provider" | "model" | "stopReason" | "errorMessage" | "finalUsage" | "totalUsage" | "summary" | "intermediateIndex" | "intermediateSummary" | "meta" | "thinkingLevel" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | "updatedAt">>;
|
|
2068
|
+
type RealtimeTurnRecord = Partial<Pick<SessionTurnRecord, "id" | "sessionId" | "sequence" | "executionKind" | "status" | "intent" | "userUuid" | "authorProfile" | "userContent" | "userText" | "assistantContent" | "assistantText" | "provider" | "model" | "stopReason" | "errorMessage" | "finalUsage" | "totalUsage" | "summary" | "intermediateIndex" | "intermediateSummary" | "meta" | "thinkingLevel" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | "updatedAt">>;
|
|
2060
2069
|
type RealtimeMessageRecord = Pick<MessageRecord, "id" | "sessionId" | "role" | "content" | "text" | "sequence" | "provider" | "model" | "stopReason" | "errorMessage" | "usage" | "meta" | "startedAt" | "completedAt" | "durationMs" | "createdAt">;
|
|
2061
2070
|
type SessionTurnCreatedEvent = {
|
|
2062
2071
|
id: string;
|
|
@@ -3527,11 +3536,18 @@ type UserSessionsResponse = {
|
|
|
3527
3536
|
};
|
|
3528
3537
|
type PromptAccessMode = "read_only" | "full_access";
|
|
3529
3538
|
type CreateSpacePromptInput = {
|
|
3539
|
+
mode?: "agent" | "create";
|
|
3540
|
+
generation?: {
|
|
3541
|
+
model: string;
|
|
3542
|
+
content: GenerationContentBlock[];
|
|
3543
|
+
parameters?: Record<string, unknown>;
|
|
3544
|
+
meta?: Record<string, unknown>;
|
|
3545
|
+
} | null;
|
|
3530
3546
|
sessionId?: string | null;
|
|
3531
3547
|
title?: string | null;
|
|
3532
3548
|
/** Optional channel; falls back to X-Cohub-Source-Via. */
|
|
3533
3549
|
source?: string | null;
|
|
3534
|
-
content
|
|
3550
|
+
content?: ContentBlock[];
|
|
3535
3551
|
model?: string | null;
|
|
3536
3552
|
provider?: string | null;
|
|
3537
3553
|
/** Optional thinking level override for this turn. Omit to inherit session default. */
|
|
@@ -3558,6 +3574,10 @@ type CreateSpacePromptInput = {
|
|
|
3558
3574
|
};
|
|
3559
3575
|
type CreateSpacePromptResponse = (SessionTurnResponse & {
|
|
3560
3576
|
mode: "immediate";
|
|
3577
|
+
execution?: {
|
|
3578
|
+
kind: "direct_generation";
|
|
3579
|
+
taskRunId: string;
|
|
3580
|
+
};
|
|
3561
3581
|
}) | {
|
|
3562
3582
|
mode: "delay" | "at";
|
|
3563
3583
|
taskRunId: string;
|
package/dist/chunks/websocket.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as isRealtimeDomain, C as WS_BOARD_AWARENESS_CAPABILITY, E as WS_ROOM_SUBSCRIPTION_CAPABILITY, O as getRealtimeSpaceRoom, T as WS_REALTIME_ROOM_CAPABILITY, j as normalizeRealtimeRooms, k as getSessionTurnPatchStreamKey, t as HttpError, w as WS_COMPACT_STREAM_CAPABILITY } 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). */
|
package/dist/http.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $ as CreateInvitationInput, $a as CompletionThinkingLevel, $n as SpaceFsPreparingFile, $t as ReferralListItem, A as BillingPluginStatus, An as SpaceCommerceFeatureBenefit, Ar as SpaceTurnAuthorFilter, At as MeResponse, B as BillingSubscriptionHistoryStatus, Bn as SpaceDefaultResponse, Br as UserActivityRankings, Bt as PublicUserProfile, C as BillingCreditStatus, Ca as BoardSequence, Cn as SpaceBootstrapStage, Cr as SpacePublicProfile, Ct as LabelItemsResponse, D as BillingDiscountPricing, Dn as SpaceCommerceBenefit, Dr as SpaceSandboxConfig, Dt as LabelResourceType, E as BillingDiscountOfferRef, Ea as BoardValidationResult, En as SpaceCheckpointDetailResponse, Er as SpaceSandboxAutoDestroyPolicy, Et as LabelRecord, F as BillingProductPricing, Fn as SpaceConfig, Fr as SpaceUsageSummary, Ft as PromptAccessMode, G as CheckpointDiffFileResponse, Ga as SessionForkRecord, Gn as SpaceFsCreateUploadInput, Gr as UserSessionSpaceSummary, Gt as ReferenceAggregateResponse, H as Channel, Ha as BoardRenderCost, Hn as SpaceFsCompleteUploadInput, Hr as UserProfile, Ht as PublicUserWorkItem, I as BillingPromotionCodePreview, In as SpaceConfigInput, Ir as TaskRunDetailResponse, It as PromptTemplateCatalogEntry, J as CheckpointDiffStats, Ja as SessionTurnRecord, Jn as SpaceFsEncoding, Jr as ChannelHealth, Jt as ReferenceQueryResponse, K as CheckpointDiffPatchKind, Ka as SessionTurnSegmentRecord, Kn as SpaceFsCreateUploadResponse, Kr as UserSessionsResponse, Kt as ReferenceDirection, L as BillingRedemptionResult, Ln as SpaceConfigResponse, Lr as TaskRunRecord, Lt as PromptTemplateCatalogResponse, M as BillingProductCreditBenefit, Mn as SpaceCommerceProduct, Mr as SpaceTurnsResponse, Mt as PatchResourceLabelsInput, N as BillingProductDisplay, Nn as SpaceCommerceProductBenefitBinding, Nr as SpaceUsageHourlyStat, Nt as PatchResourceLabelsResponse, O as BillingHistoryPagination, On as SpaceCommerceBuyerProfile, Or as SpaceSandboxProvider, Ot as LabelScopeType, P as BillingProductKind, Pn as SpaceCommerceProductCreditBenefit, Pr as SpaceUsageResponse, Pt as Permission, Q as ClaimReferralResponse, Qa as CompletionMessageRole, Qn as SpaceFsMoveInput, Qr as FeishuChannelConfig, Qt as ReferralDashboard, R as BillingResponsePayload, Rn as SpaceConfigUpdateResponse, Rr as UserActivityQuery, Rt as PublicReferral, S as BillingCreditGrantStatus, Sa as BoardRecord, Sn as SpaceBootstrapSource, Sr as SpacePresenceUser, St as LabelAssignmentRecord, T as BillingDiscountOffer, Ta as BoardTransaction, Tn as SpaceChannelBindingInput, Tr as SpaceRole, Tt as LabelListItem, U as CheckpointDiffDelivery, Un as SpaceFsCompleteUploadResponse, Ur as UserRulesResponse, Ut as ReferenceAggregateGroup, V as BillingSubscriptionSummary, Va as BoardCapability, Vn as SpaceEnvInput, Vr as UserActivityResponse, Vt as PublicUserSpaceItem, W as CheckpointDiffFile, Wa as MessageRecord, Wn as SpaceFsCreateDirectoryInput, Wr as UserSessionListItem, Wt as ReferenceAggregateGroupBy, X as CheckpointDiffSummary, Xa as CompletionAssistantMessage, Xn as SpaceFsFileKind, Xr as ChannelRuntimeState, Xt as ReferenceRecord, Y as CheckpointDiffStatus, Yn as SpaceFsEntry, Yr as ChannelHealthReasonCode, Yt as ReferenceQueryableType, Z as CheckpointRecord, Za as CompletionMessage, Zn as SpaceFsFileResponse, Zr as DiscordChannelConfig, Zt as ReferenceResourceType, _ as BillingCatalogProduct, _a as BoardOperation, _n as SkillCatalogResponse, _r as SpaceMeta, _t as JsonObject, aa as BoardBootstrap, an as SessionBindingRecord, ar as SpaceFsUploadEntry, at as CreateSpaceSessionInput, b as BillingConversionIntent, bn as SpaceAccessPolicy, br as SpacePendingDiffSummary, bt as LabelAssignmentListItem, ca as BoardCreateInput, cn as SessionMessagesResponse, cr as SpaceFsUploadPlanEntryInput, ct as CronJobUpdatePatch, d as BatchUserProfilesResponse, da as BoardEffect, di as GenerationContentBlock, dn as SessionTurnResponse, dr as SpaceFsWriteFileInput, dt as GenerationUsageHourlyStat, en as ReferralReward, eo as CompletionUsage, er as SpaceFsReadFilesError, et as CreateInvitationResponse, f as BillingBalanceActivity, fa as BoardInspectInput, fn as SessionTurnSignedUrlsResponse, fr as SpaceInvitation, ft as GenerationUsageSummary, g as BillingCatalog, ga as BoardNodeRecord, gn as SkillCatalogEntry, gr as SpaceMember, gt as InvitationDetail, h as BillingBalanceActivityStatus, ha as BoardNodeInput, hn as SessionTurnsPaginatedResponse, hr as SpaceListItem, ht as GlobalSearchType, ia as BoardAssetRef, in as SendMessageCronJobPayload, io as SpaceCompletionStreamEvent, ir as SpaceFsUploadDestination, it as CreateSpacePromptResponse, j as BillingProductBillingInterval, jn as SpaceCommerceOrder, jr as SpaceTurnListItem, jt as ModelCatalogEntry, k as BillingPaymentStatus, kn as SpaceCommerceCreditsBenefit, kr as SpaceSessionsResponse, kt as LabelSource, l as AcceptInvitationResponse, la as BoardDeleteReason, ln as SessionRecord, lr as SpaceFsUploadProgress, lt as CursorPageInfo, m as BillingBalanceActivityList, ma as BoardManifest, mn as SessionTurnWindowResponse, mr as SpaceInvitationLocation, mt as GlobalSearchResult, nn as ResourceLabelsResponse, no as ModelThinkingLevel, nr as SpaceFsReadFilesResponse, nt as CreateSpaceModInput, oa as BoardCapabilities, on as SessionMessageResponse, or as SpaceFsUploadError, ot as CronJobPayload, p as BillingBalanceActivityKind, pa as BoardKeyframe, pi as GenerationResult, pn as SessionTurnStreamSnapshotResponse, pr as SpaceInvitationListResponse, pt as GlobalSearchResponse, q as CheckpointDiffPatchLine, qa as SessionTurnIndexItem, qn as SpaceFsDeleteNodeInput, qr as ChannelConfig, qt as ReferenceKind, rn as SandboxSpecId, ro as SpaceCompletionResult, rr as SpaceFsTreeResponse, rt as CreateSpacePromptInput, sa as BoardClip, sn as SessionMessagesPaginatedResponse, so as ContentBlock, sr as SpaceFsUploadPlanEntry, st as CronJobRecord, ti as GenerationPolicy, tn as ReferralStatus, to as CreateSpaceCompletionInput, tr as SpaceFsReadFilesInput, tt as CreateSpaceInput, u as ApiError, ua as BoardDiagnostic, un as SessionTurnIndexResponse, ur as SpaceFsUploadResponse, ut as GenerationUsageBlock, v as BillingCheckoutActionState, va as BoardPlaybackCommand, vn as SkillCatalogSource, vr as SpaceModListItem, vt as JsonPrimitive, w as BillingCreditUnit, wa as BoardTarget, wn as SpaceBootstrapStatus, wr as SpaceRecord, wt as LabelItemsSessionFork, x as BillingCreditExpiryGroup, xa as BoardPlaybackSnapshot, xn as SpaceBootstrapMeta, xr as SpacePresenceSnapshot, xt as LabelAssignmentPageInfo, y as BillingCheckoutResult, ya as BoardPlaybackPolicy, yn as SpaceAccess, yr as SpacePendingDiffFileResponse, yt as JsonValue, z as BillingSubscriptionHistoryList, zn as SpaceCreateResponse, zr as UserActivityRange, zt as PublicUserPageResponse } from "./chunks/websocket.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Bn as ModelStatusResponse, Fn as GenerationTaskResult, In as GenerationUsageBilling, Ln as ListGenerationModelsResponse, Mn as SpaceStartupResponse, Nn as CreateGenerationTaskRequest, Pn as CreateGenerationTaskResponse, Rn as PublicGenerationDeclaration, in as HttpError, n as createHttpClient, nn as CohubClientOptions, on as HttpTransport, rn as Fetch, t as CohubHttpClient, zn as ModelStatusEntry } from "./chunks/http.js";
|
|
3
3
|
export { AcceptInvitationResponse, ApiError, BatchUserProfilesResponse, BillingBalanceActivity, BillingBalanceActivityKind, BillingBalanceActivityList, BillingBalanceActivityStatus, BillingCatalog, BillingCatalogProduct, BillingCheckoutActionState, BillingCheckoutResult, BillingConversionIntent, BillingCreditExpiryGroup, BillingCreditGrantStatus, BillingCreditStatus, BillingCreditUnit, BillingDiscountOffer, BillingDiscountOfferRef, BillingDiscountPricing, BillingHistoryPagination, BillingPaymentStatus, BillingPluginStatus, BillingProductBillingInterval, BillingProductCreditBenefit, BillingProductDisplay, BillingProductKind, BillingProductPricing, BillingPromotionCodePreview, BillingRedemptionResult, BillingResponsePayload, BillingSubscriptionHistoryList, BillingSubscriptionHistoryStatus, BillingSubscriptionSummary, type BoardAssetRef, type BoardBootstrap, type BoardCapabilities, type BoardCapability, type BoardClip, type BoardCreateInput, type BoardDeleteReason, type BoardDiagnostic, type BoardEffect, type BoardInspectInput, type BoardKeyframe, type BoardManifest, type BoardNodeInput, type BoardNodeRecord, type BoardOperation, type BoardPlaybackCommand, type BoardPlaybackPolicy, type BoardPlaybackSnapshot, type BoardRecord, type BoardRenderCost, type BoardSequence, type BoardTarget, type BoardTransaction, type BoardValidationResult, 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, 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, type ModelStatusEntry, type ModelStatusResponse, type ModelThinkingLevel, 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, SkillCatalogSource, SpaceAccess, SpaceAccessPolicy, 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, 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, SpaceListItem, SpaceMember, SpaceMeta, SpaceModListItem, SpacePendingDiffFileResponse, SpacePendingDiffSummary, SpacePresenceSnapshot, SpacePresenceUser, SpacePublicProfile, SpaceRecord, SpaceRole, SpaceSandboxAutoDestroyPolicy, SpaceSandboxConfig, SpaceSandboxProvider, SpaceSessionsResponse, type SpaceStartupResponse, SpaceTurnAuthorFilter, SpaceTurnListItem, SpaceTurnsResponse, SpaceUsageHourlyStat, SpaceUsageResponse, SpaceUsageSummary, TaskRunDetailResponse, TaskRunRecord, UserActivityQuery, UserActivityRange, UserActivityRankings, UserActivityResponse, UserProfile, UserRulesResponse, UserSessionListItem, UserSessionSpaceSummary, UserSessionsResponse, createHttpClient };
|