@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/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Viscept Limited
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/dist/chunks/http.d.ts
CHANGED
|
@@ -1,27 +1,81 @@
|
|
|
1
1
|
import { n as CohubEnvironment } from "./environment.js";
|
|
2
|
-
import { $ as CheckpointDiffSummary, $
|
|
2
|
+
import { $ as CheckpointDiffSummary, $n as SpaceFsPreparingFile, $r as ChannelConfig, $t as ReferenceKind, An as SpaceCommerceBuyerProfile, B as CanvasDocumentRecord, Bn as SpaceConfigUpdateResponse, Bt as Permission, Cn as SkillCatalogResponse, Cr as SpaceRole, Dr as SpaceSessionsResponse, Fn as SpaceCommerceProductBenefitBinding, G as Channel, Gn as SpaceFsCompleteUploadResponse, Gt as PublicUserPageResponse, Hn as SpaceDefaultResponse, It as MeResponse, J as CheckpointDiffFileResponse, Kn as SpaceFsCreateUploadInput, Lr as UserSessionsResponse, Lt as ModelCatalogEntry, Mr as TaskRunRecord, Nn as SpaceCommerceOrder, Nr as UserProfile, Nt as LabelResourceType, On as SpaceCheckpointDetailResponse, Ot as LabelAssignmentRecord, Pn as SpaceCommerceProduct, Pr as UserRulesResponse, Qn as SpaceFsMoveInput, Qt as ReferenceDirection, R as CanvasBootstrapResponse, Rn as SpaceConfigInput, Rt as PatchResourceLabelsInput, Sr as SpaceRecord, St as InvitationDetail, Tn as SpaceAccessPolicy, Un as SpaceEnvInput, Ut as PromptTemplateCatalogResponse, Vn as SpaceCreateResponse, W as CanvasTransactionInput, Wn as SpaceFsCompleteUploadInput, Wt as PublicReferral, Xr as GenerationContentBlock, Xt as ReferenceAggregateGroupBy, Zn as SpaceFsFileResponse, Zr as GenerationModelDeclaration, Zt as ReferenceAggregateResponse, _i as BillingPayload, _n as SessionTurnResponse, _r as SpacePendingDiffFileResponse, a as WebsocketClientOptions, bn as SessionTurnWindowResponse, ct as CreateSpaceSessionInput, d as BatchUserProfilesResponse, di as MessageRecord, dr as SpaceFsWriteFileInput, dt as CronJobUpdatePatch, ei as ChannelHealth, en as ReferenceQueryResponse, et as CheckpointRecord, fi as SessionForkRecord, fn as SessionMessageResponse, fr as SpaceInvitation, ft as CursorPageInfo, gi as Usage, gn as SessionTurnIndexResponse, gr as SpaceModListItem, hi as SessionTurnRecord, hn as SessionRecord, in as ReferralDashboard, it as CreateSpaceInput, jr as TaskRunDetailResponse, jt as LabelListItem, kn as SpaceCommerceBenefit, kr as SpaceUsageResponse, kt as LabelItemsResponse, l as AcceptInvitationResponse, li as SessionTurnPatchEvent, mn as SessionMessagesResponse, mr as SpaceMember, nr as SpaceFsReadFilesResponse, nt as CreateInvitationInput, ot as CreateSpacePromptInput, pn as SessionMessagesPaginatedResponse, qn as SpaceFsCreateUploadResponse, r as WebsocketClient, rr as SpaceFsTreeResponse, rt as CreateInvitationResponse, s as WebsocketEventPayload, si as RealtimePatchOperation, st as CreateSpacePromptResponse, tn as ReferenceQueryableType, tt as ClaimReferralResponse, ui as SpacePublicEndpoints, ur as SpaceFsUploadResponse, ut as CronJobRecord, vi as ContentBlock, vn as SessionTurnSignedUrlsResponse, vr as SpacePendingDiffSummary, xn as SessionTurnsPaginatedResponse, xr as SpacePublicProfile, xt as GlobalSearchType, yn as SessionTurnStreamSnapshotResponse, yr as SpacePresenceSnapshot, yt as GlobalSearchResponse, z as CanvasCreateInput, zn as SpaceConfigResponse, zt as PatchResourceLabelsResponse } from "./websocket.js";
|
|
3
3
|
import { a as VoiceInputCreateOptions } from "./voice-input.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
//#region ../protocol/dist/generation/index.d.ts
|
|
5
|
+
declare const GENERATION_TASK_TYPE: "generation";
|
|
6
|
+
type CreateGenerationTaskRequest = {
|
|
7
|
+
spaceId: string;
|
|
8
|
+
sessionId?: string | null;
|
|
9
|
+
turnId?: string | null;
|
|
10
|
+
model: string;
|
|
11
|
+
content: GenerationContentBlock[];
|
|
12
|
+
parameters?: Record<string, unknown>;
|
|
13
|
+
meta?: Record<string, unknown>;
|
|
14
|
+
};
|
|
15
|
+
type CreateGenerationTaskResponse = {
|
|
16
|
+
taskRunId: string;
|
|
17
|
+
taskType: typeof GENERATION_TASK_TYPE;
|
|
18
|
+
status: "pending";
|
|
19
|
+
billing?: BillingPayload | null;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Final generation task payload stored on the task run.
|
|
23
|
+
*
|
|
24
|
+
* - `output` is the generated content blocks (SDK `GenerationResult.content`)
|
|
25
|
+
* - `requestId` maps to the provider response body's top-level `request_id`
|
|
26
|
+
* - `cost` maps to the official request price in `usage.cost`
|
|
27
|
+
* - `billing` records post-success credit consumption (when attempted)
|
|
28
|
+
* - `meta` is the request meta (including Cohub context such as taskRunId/spaceId)
|
|
29
|
+
*/
|
|
30
|
+
type GenerationUsageBilling = {
|
|
31
|
+
/** Official provider cost before plan discount. */
|
|
32
|
+
officialCostUsd?: number;
|
|
33
|
+
/** Effective charge amount after plan discount; inspect status to confirm recording. */
|
|
34
|
+
amountUsd: number;
|
|
35
|
+
/** Server-resolved multiplier applied to officialCostUsd. */
|
|
36
|
+
discountMultiplier?: number;
|
|
37
|
+
usageType: string;
|
|
38
|
+
status: "recorded" | "overage" | "skipped";
|
|
39
|
+
reason?: string | null;
|
|
40
|
+
};
|
|
41
|
+
type GenerationTaskResult = {
|
|
42
|
+
model: string;
|
|
43
|
+
output: GenerationContentBlock[];
|
|
44
|
+
requestId?: string;
|
|
45
|
+
cost?: number;
|
|
46
|
+
/** Post-success usage charge metadata. Distinct from gate `billing` on create. */
|
|
47
|
+
billing?: GenerationUsageBilling | null;
|
|
48
|
+
meta?: Record<string, unknown>;
|
|
49
|
+
};
|
|
50
|
+
type PublicGenerationDeclaration = Omit<GenerationModelDeclaration, "adapter">;
|
|
51
|
+
type ListGenerationModelsResponse = {
|
|
52
|
+
models: PublicGenerationDeclaration[];
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region ../protocol/dist/model/completion.d.ts
|
|
6
56
|
type CompletionMessageRole = "user" | "assistant" | "system";
|
|
7
57
|
/** Raw completion message. Reuses session ContentBlock content shape. */
|
|
8
58
|
type CompletionMessage = {
|
|
9
59
|
role: CompletionMessageRole;
|
|
10
60
|
content: ContentBlock[];
|
|
11
61
|
};
|
|
12
|
-
type CompletionThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
62
|
+
type CompletionThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
13
63
|
type CreateSpaceCompletionInput = {
|
|
14
|
-
/** Optional provider. Defaults to the first available model provider. */
|
|
64
|
+
/** Optional provider. Defaults to the first available model provider. */
|
|
65
|
+
provider?: string | null;
|
|
66
|
+
/** Optional model id. Defaults to the first available model. */
|
|
15
67
|
model?: string | null;
|
|
16
68
|
/**
|
|
17
69
|
* Optional space-relative markdown/text path used as system prompt.
|
|
18
70
|
* Omitted/null/empty → empty system prompt.
|
|
19
71
|
*/
|
|
20
|
-
systemPromptPath?: string | null;
|
|
72
|
+
systemPromptPath?: string | null;
|
|
73
|
+
/** Full conversation history controlled by the caller. */
|
|
21
74
|
messages: CompletionMessage[];
|
|
22
75
|
temperature?: number | null;
|
|
23
76
|
maxTokens?: number | null;
|
|
24
|
-
thinkingLevel?: CompletionThinkingLevel | null;
|
|
77
|
+
thinkingLevel?: CompletionThinkingLevel | null;
|
|
78
|
+
/** When true, respond with SSE. Default false (JSON). */
|
|
25
79
|
stream?: boolean | null;
|
|
26
80
|
};
|
|
27
81
|
type CompletionUsage = Usage;
|
|
@@ -95,7 +149,9 @@ type WorkRuntimeCheckoutState = {
|
|
|
95
149
|
* Options for a single work runtime transport request.
|
|
96
150
|
*/
|
|
97
151
|
type WorkRuntimeRequestOptions = {
|
|
98
|
-
/** How long to wait for a matching response before resolving with null. */
|
|
152
|
+
/** How long to wait for a matching response before resolving with null. */
|
|
153
|
+
timeoutMs?: number;
|
|
154
|
+
/** When set, re-posts the request on this interval until a response arrives. */
|
|
99
155
|
retryIntervalMs?: number;
|
|
100
156
|
};
|
|
101
157
|
/**
|
|
@@ -131,7 +187,8 @@ declare class PopupBrokerTransport implements WorkRuntimeTransport {
|
|
|
131
187
|
private readonly workId?;
|
|
132
188
|
private readonly getWorkId?;
|
|
133
189
|
constructor(config: {
|
|
134
|
-
brokerOrigin: string;
|
|
190
|
+
brokerOrigin: string;
|
|
191
|
+
/** Explicit work id. When absent, {@link getWorkId} is used to resolve it. */
|
|
135
192
|
workId?: string;
|
|
136
193
|
/**
|
|
137
194
|
* Lazily resolves the work id at runtime (e.g. via the public
|
|
@@ -192,7 +249,9 @@ declare class WorkRuntimeApi {
|
|
|
192
249
|
* Configuration for the work runtime mode.
|
|
193
250
|
*/
|
|
194
251
|
type WorkRuntimeModeConfig = {
|
|
195
|
-
/** Explicit mode selection. When omitted, auto-detection is used. */
|
|
252
|
+
/** Explicit mode selection. When omitted, auto-detection is used. */
|
|
253
|
+
mode?: "bridge" | "broker";
|
|
254
|
+
/** Cohub origin for the broker page (e.g. "https://cohub.run"). */
|
|
196
255
|
brokerOrigin?: string;
|
|
197
256
|
/**
|
|
198
257
|
* The work's public id. Required for broker mode unless the slug triple
|
|
@@ -201,8 +260,10 @@ type WorkRuntimeModeConfig = {
|
|
|
201
260
|
workId?: string;
|
|
202
261
|
/** Space owner's username. Used with {@link spaceSlug} + {@link workSlug} to
|
|
203
262
|
* resolve the workId at runtime via the public `works.getBySlug` API. */
|
|
204
|
-
ownerUsername?: string;
|
|
205
|
-
|
|
263
|
+
ownerUsername?: string;
|
|
264
|
+
/** Space slug. Part of the slug triple used for runtime workId resolution. */
|
|
265
|
+
spaceSlug?: string;
|
|
266
|
+
/** Work slug. Part of the slug triple used for runtime workId resolution. */
|
|
206
267
|
workSlug?: string;
|
|
207
268
|
};
|
|
208
269
|
/** Lazily resolves a work's public id, e.g. via slug reverse lookup. */
|
|
@@ -251,9 +312,18 @@ type CohubClientOptions = {
|
|
|
251
312
|
clearStoredAuthToken?: () => void;
|
|
252
313
|
fetch?: Fetch;
|
|
253
314
|
websocket?: WebsocketClientOptions;
|
|
254
|
-
voice?: VoiceInputCreateOptions;
|
|
315
|
+
voice?: VoiceInputCreateOptions;
|
|
316
|
+
/** Work runtime mode configuration (bridge vs broker). */
|
|
255
317
|
work?: WorkRuntimeModeConfig;
|
|
256
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* Access tokens must be a single HTTP header token.
|
|
321
|
+
* Newlines / control chars (from corrupted storage or clipboard paste) make
|
|
322
|
+
* `Headers#set` throw TypeError — Safari: "The string did not match the expected pattern."
|
|
323
|
+
*/
|
|
324
|
+
declare function sanitizeAccessToken(token: string | null | undefined): string | null;
|
|
325
|
+
/** Join API base + path without double slashes; prefer URL when base is absolute. */
|
|
326
|
+
declare function joinApiUrl(baseUrl: string, path: string): string;
|
|
257
327
|
declare class HttpError extends Error {
|
|
258
328
|
readonly status: number;
|
|
259
329
|
readonly body: unknown;
|
|
@@ -370,8 +440,18 @@ declare class PromptsApi {
|
|
|
370
440
|
}, customFetch?: Fetch): Promise<PromptTemplateCatalogResponse>;
|
|
371
441
|
}
|
|
372
442
|
//#endregion
|
|
443
|
+
//#region src/apis/skills.d.ts
|
|
444
|
+
declare class SkillsApi {
|
|
445
|
+
private readonly transport;
|
|
446
|
+
constructor(transport: HttpTransport);
|
|
447
|
+
list(options?: {
|
|
448
|
+
spaceId?: string;
|
|
449
|
+
}, customFetch?: Fetch): Promise<SkillCatalogResponse>;
|
|
450
|
+
}
|
|
451
|
+
//#endregion
|
|
373
452
|
//#region src/apis/public-assets.d.ts
|
|
374
453
|
type PublicAssetPurpose = "user_avatar" | "space_avatar" | "chat_attachment";
|
|
454
|
+
/** Avatar + preprocessed chat images. General chat files may use any mime string. */
|
|
375
455
|
type PublicAssetMimeType = "image/webp" | "image/jpeg";
|
|
376
456
|
type CreatePublicAssetUploadInput = {
|
|
377
457
|
purpose: PublicAssetPurpose;
|
|
@@ -379,7 +459,8 @@ type CreatePublicAssetUploadInput = {
|
|
|
379
459
|
sessionId?: string;
|
|
380
460
|
file: {
|
|
381
461
|
size: number;
|
|
382
|
-
mimeType:
|
|
462
|
+
mimeType: string;
|
|
463
|
+
filename?: string;
|
|
383
464
|
};
|
|
384
465
|
};
|
|
385
466
|
type CreatePublicAssetUploadResponse = {
|
|
@@ -398,16 +479,22 @@ type UploadPublicAssetInput = {
|
|
|
398
479
|
spaceId?: string;
|
|
399
480
|
sessionId?: string;
|
|
400
481
|
file: Blob;
|
|
401
|
-
mimeType:
|
|
482
|
+
mimeType: string;
|
|
402
483
|
filename?: string;
|
|
403
484
|
};
|
|
404
|
-
type
|
|
405
|
-
|
|
406
|
-
|
|
485
|
+
type UploadChatAttachmentInput = {
|
|
486
|
+
/** Optional association only; upload is user-scoped. */
|
|
487
|
+
spaceId?: string;
|
|
488
|
+
/** Optional association only; upload is user-scoped. */
|
|
489
|
+
sessionId?: string;
|
|
407
490
|
file: Blob;
|
|
408
|
-
mimeType:
|
|
491
|
+
mimeType: string;
|
|
409
492
|
filename?: string;
|
|
410
493
|
};
|
|
494
|
+
/** @deprecated Prefer UploadChatAttachmentInput — images are a special case of chat attachments. */
|
|
495
|
+
type UploadChatImageAttachmentInput = UploadChatAttachmentInput & {
|
|
496
|
+
mimeType: PublicAssetMimeType;
|
|
497
|
+
};
|
|
411
498
|
declare class PublicAssetsApi {
|
|
412
499
|
private readonly transport;
|
|
413
500
|
constructor(transport: HttpTransport);
|
|
@@ -420,6 +507,16 @@ declare class PublicAssetsApi {
|
|
|
420
507
|
uploadUrl: string;
|
|
421
508
|
uploadFields: Record<string, string>;
|
|
422
509
|
}>;
|
|
510
|
+
/** Durable public upload for any chat attachment (image or file). No space required. */
|
|
511
|
+
uploadChatAttachment(input: UploadChatAttachmentInput): Promise<{
|
|
512
|
+
purpose: PublicAssetPurpose;
|
|
513
|
+
objectKey: string;
|
|
514
|
+
publicUrl: string;
|
|
515
|
+
uploadMethod: "POST";
|
|
516
|
+
uploadUrl: string;
|
|
517
|
+
uploadFields: Record<string, string>;
|
|
518
|
+
}>;
|
|
519
|
+
/** Preprocessed chat image (webp/jpeg). Same durable path as uploadChatAttachment. */
|
|
423
520
|
uploadChatImageAttachment(input: UploadChatImageAttachmentInput): Promise<{
|
|
424
521
|
purpose: PublicAssetPurpose;
|
|
425
522
|
objectKey: string;
|
|
@@ -640,8 +737,11 @@ type GenerationStreamSubscriptionHandlers = {
|
|
|
640
737
|
outOfSync?: (event: GenerationStreamOutOfSyncEvent) => void;
|
|
641
738
|
};
|
|
642
739
|
type GenerationStreamSubscribeOptions = {
|
|
643
|
-
/** Seed the stream reducer from the server-side active stream snapshot. */
|
|
644
|
-
|
|
740
|
+
/** Seed the stream reducer from the server-side active stream snapshot. */
|
|
741
|
+
recover?: boolean;
|
|
742
|
+
/** Optional host-provided snapshot to avoid an extra HTTP request. */
|
|
743
|
+
initialSnapshot?: SessionTurnStreamSnapshotResponse["snapshot"] | null;
|
|
744
|
+
/** Emit a state event after snapshot seed. Defaults to true. */
|
|
645
745
|
emitSnapshotState?: boolean;
|
|
646
746
|
};
|
|
647
747
|
declare function parseAssistantMessageCommit(message: MessageRecord): AssistantMessageCommit;
|
|
@@ -700,7 +800,8 @@ declare class PublicInviteApi {
|
|
|
700
800
|
//#endregion
|
|
701
801
|
//#region src/apis/spaces.d.ts
|
|
702
802
|
type SessionSubscriptionHandlers = {
|
|
703
|
-
patch?: (event: WebsocketEventPayload) => void;
|
|
803
|
+
patch?: (event: WebsocketEventPayload) => void;
|
|
804
|
+
/** @deprecated Use `session.subscribeGeneration({ state })`. */
|
|
704
805
|
patchState?: (result: SessionPatchApplyResult) => void;
|
|
705
806
|
turnUpdated?: (event: WebsocketEventPayload) => void;
|
|
706
807
|
turnFinalized?: (event: WebsocketEventPayload) => void;
|
|
@@ -1403,6 +1504,8 @@ type WorkCreateInput = {
|
|
|
1403
1504
|
workScopes?: Permission[];
|
|
1404
1505
|
allowedViewerScopes?: Permission[];
|
|
1405
1506
|
meta?: WorkMeta | null;
|
|
1507
|
+
/** Optional provenance/notes stored on the initial published version. */
|
|
1508
|
+
versionMeta?: WorkMeta | null;
|
|
1406
1509
|
};
|
|
1407
1510
|
type WorkUpdateInput = Partial<{
|
|
1408
1511
|
slug: string;
|
|
@@ -1421,6 +1524,8 @@ type WorkVersionRecord = {
|
|
|
1421
1524
|
targetType: WorkTargetType;
|
|
1422
1525
|
targetRef: string;
|
|
1423
1526
|
assetKey: string | null;
|
|
1527
|
+
/** Optional provenance/notes for this version (e.g. source session/turn). */
|
|
1528
|
+
meta: WorkMeta | null;
|
|
1424
1529
|
createdAt: string | null;
|
|
1425
1530
|
};
|
|
1426
1531
|
type WorkContent = {
|
|
@@ -1493,7 +1598,9 @@ declare class WorksApi {
|
|
|
1493
1598
|
listVersions(workId: string): Promise<{
|
|
1494
1599
|
versions: WorkVersionRecord[];
|
|
1495
1600
|
}>;
|
|
1496
|
-
publishVersion(workId: string
|
|
1601
|
+
publishVersion(workId: string, input?: {
|
|
1602
|
+
meta?: WorkMeta | null;
|
|
1603
|
+
}): Promise<{
|
|
1497
1604
|
work: WorkRecord;
|
|
1498
1605
|
version: WorkVersionRecord;
|
|
1499
1606
|
}>;
|
|
@@ -1581,6 +1688,7 @@ declare class CohubHttpClient {
|
|
|
1581
1688
|
readonly generations: GenerationsApi;
|
|
1582
1689
|
readonly models: ModelsApi;
|
|
1583
1690
|
readonly prompts: PromptsApi;
|
|
1691
|
+
readonly skills: SkillsApi;
|
|
1584
1692
|
readonly publicAssets: PublicAssetsApi;
|
|
1585
1693
|
readonly sessionAccess: SessionAccessApi;
|
|
1586
1694
|
readonly search: SearchApi;
|
|
@@ -1597,4 +1705,4 @@ declare class CohubHttpClient {
|
|
|
1597
1705
|
}
|
|
1598
1706
|
declare const createHttpClient: (options?: CohubClientOptions) => CohubHttpClient;
|
|
1599
1707
|
//#endregion
|
|
1600
|
-
export { SessionGenerationStreamClient as $, UsersApi as A,
|
|
1708
|
+
export { SessionGenerationStreamClient as $, SpaceCompletionStreamEvent as $t, UsersApi as A, RawHttpResponse as At, PublicInviteApi as B, WorkRuntimeModeConfig as Bt, WorkStatus as C, GenerationsApi as Ct, WorkVisibility as D, Fetch as Dt, WorkVersionRecord as E, CohubClientOptions as Et, SpaceChannelBindingRecord as F, WorkIdResolver as Ft, GenerationStreamFinalizedEvent as G, resolveWorkTransport as Gt, GenerationStreamCommitEvent as H, WorkRuntimeTransport as Ht, SpaceClient as I, WorkRuntimeApi as It, GenerationStreamOutOfSyncEvent as J, CompletionMessageRole as Jt, GenerationStreamIntermediateMessage as K, CompletionAssistantMessage as Kt, SpaceEventName as L, WorkRuntimeCheckoutState as Lt, TasksApi as M, sanitizeAccessToken as Mt, SessionEventName as N, ParentBridgeTransport as Nt, WorksApi as O, HttpError as Ot, SessionSubscriptionHandlers as P, PopupBrokerTransport as Pt, GenerationStreamTurnUpdatedEvent as Q, SpaceCompletionResult as Qt, SpacesApi as R, WorkRuntimeCheckoutStatus as Rt, WorkSessionResponse as S, ModelsApi as St, WorkUpdateInput as T, ChannelsApi as Tt, GenerationStreamErrorEvent as U, createSlugWorkIdResolver as Ut, AssistantMessageCommit as V, WorkRuntimeRequestOptions as Vt, GenerationStreamEvent as W, createWorkRuntime as Wt, GenerationStreamSubscribeOptions as X, CompletionUsage as Xt, GenerationStreamStateEvent as Y, CompletionThinkingLevel as Yt, GenerationStreamSubscriptionHandlers as Z, CreateSpaceCompletionInput as Zt, WorkPresentationMeta as _, UploadChatAttachmentInput as _t, WorkCommerceCreditConsumeResponse as a, PublicGenerationDeclaration as an, SessionPatchState as at, WorkRecord as b, SkillsApi as bt, WorkCommerceEntitlementsResponse as c, SessionAccessApi as ct, WorkCommercePurchaseResponse as d, SearchApi as dt, CreateGenerationTaskRequest as en, createSessionGenerationStreamClient as et, WorkAuthorizeResponse as f, CreatePublicAssetUploadInput as ft, WorkMeta as g, PublicAssetsApi as gt, WorkGetResponse as h, PublicAssetPurpose as ht, WorkCommerceCheckoutStatus as i, ListGenerationModelsResponse as in, SessionPatchReducer as it, UserApi as j, joinApiUrl as jt, ReferralsApi as k, HttpTransport as kt, WorkCommerceOrder as l, ReferenceResourceSelector as lt, WorkDetailResponse as m, PublicAssetMimeType as mt, createHttpClient as n, GenerationTaskResult as nn, SessionPatchApplyInput as nt, WorkCommerceCreditConsumeStatus as o, SessionPatchStatus as ot, WorkCreateInput as p, CreatePublicAssetUploadResponse as pt, GenerationStreamLifecycleEvent as q, CompletionMessage as qt, WorkCommerceApi as r, GenerationUsageBilling as rn, SessionPatchApplyResult as rt, WorkCommerceEntitlement as s, createSessionPatchReducer as st, CohubHttpClient as t, CreateGenerationTaskResponse as tn, parseAssistantMessageCommit as tt, WorkCommerceProductResolveResponse as u, ReferencesApi as ut, WorkPublicOwnerRecord as v, UploadChatImageAttachmentInput as vt, WorkTargetType as w, CronJobsApi as wt, WorkResolveResponse as x, PromptsApi as xt, WorkPublicSpaceRecord as y, UploadPublicAssetInput as yt, WebSocketConnectionState as z, WorkRuntimeContext as zt };
|
package/dist/chunks/http.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as HttpTransport, s as getRealtimeSpaceRoom, t as HttpError } from "./transport.js";
|
|
2
2
|
import { a as resolveApiBaseUrl } from "./environment.js";
|
|
3
3
|
//#region src/apis/channels.ts
|
|
4
4
|
var ChannelsApi = class {
|
|
@@ -107,7 +107,9 @@ function isGenerationTaskResult(value) {
|
|
|
107
107
|
if (record.billing !== void 0 && record.billing !== null) {
|
|
108
108
|
if (!record.billing || typeof record.billing !== "object" || Array.isArray(record.billing)) return false;
|
|
109
109
|
const billing = record.billing;
|
|
110
|
+
if (billing.officialCostUsd !== void 0 && (typeof billing.officialCostUsd !== "number" || !Number.isFinite(billing.officialCostUsd))) return false;
|
|
110
111
|
if (typeof billing.amountUsd !== "number" || !Number.isFinite(billing.amountUsd)) return false;
|
|
112
|
+
if (billing.discountMultiplier !== void 0 && (typeof billing.discountMultiplier !== "number" || !Number.isFinite(billing.discountMultiplier) || billing.discountMultiplier < 0 || billing.discountMultiplier > 1)) return false;
|
|
111
113
|
if (typeof billing.usageType !== "string") return false;
|
|
112
114
|
if (billing.status !== "recorded" && billing.status !== "overage" && billing.status !== "skipped") return false;
|
|
113
115
|
if (billing.reason !== void 0 && billing.reason !== null && typeof billing.reason !== "string") return false;
|
|
@@ -184,7 +186,28 @@ var PromptsApi = class {
|
|
|
184
186
|
}
|
|
185
187
|
};
|
|
186
188
|
//#endregion
|
|
189
|
+
//#region src/apis/skills.ts
|
|
190
|
+
var SkillsApi = class {
|
|
191
|
+
transport;
|
|
192
|
+
constructor(transport) {
|
|
193
|
+
this.transport = transport;
|
|
194
|
+
}
|
|
195
|
+
async list(options, customFetch) {
|
|
196
|
+
const params = new URLSearchParams();
|
|
197
|
+
if (options?.spaceId) params.set("spaceId", options.spaceId);
|
|
198
|
+
const query = params.toString();
|
|
199
|
+
const path = query ? `/api/skills?${query}` : "/api/skills";
|
|
200
|
+
return this.transport.request(path, { fetch: customFetch });
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
//#endregion
|
|
187
204
|
//#region src/apis/public-assets.ts
|
|
205
|
+
/** Strip characters Safari rejects in FormData file names. */
|
|
206
|
+
function sanitizeFormDataFilename(filename) {
|
|
207
|
+
if (typeof filename !== "string") return void 0;
|
|
208
|
+
const base = filename.split(/[/\\]/).pop()?.replace(/[\r\n\0]/g, "").trim() ?? "";
|
|
209
|
+
return base.length > 0 ? base : void 0;
|
|
210
|
+
}
|
|
188
211
|
var PublicAssetsApi = class {
|
|
189
212
|
transport;
|
|
190
213
|
constructor(transport) {
|
|
@@ -204,24 +227,33 @@ var PublicAssetsApi = class {
|
|
|
204
227
|
sessionId: input.sessionId,
|
|
205
228
|
file: {
|
|
206
229
|
size: input.file.size,
|
|
207
|
-
mimeType: input.mimeType
|
|
230
|
+
mimeType: input.mimeType,
|
|
231
|
+
filename: input.filename
|
|
208
232
|
}
|
|
209
233
|
});
|
|
210
234
|
const formData = new FormData();
|
|
211
235
|
for (const [key, value] of Object.entries(plan.asset.uploadFields)) formData.append(key, value);
|
|
212
|
-
|
|
236
|
+
const safeFilename = sanitizeFormDataFilename(input.filename);
|
|
237
|
+
if (safeFilename) formData.append("file", input.file, safeFilename);
|
|
213
238
|
else formData.append("file", input.file);
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
239
|
+
let response;
|
|
240
|
+
try {
|
|
241
|
+
response = await fetch(plan.asset.uploadUrl, {
|
|
242
|
+
method: plan.asset.uploadMethod,
|
|
243
|
+
body: formData
|
|
244
|
+
});
|
|
245
|
+
} catch (error) {
|
|
246
|
+
if (error instanceof TypeError && (error.message === "The string did not match the expected pattern." || /Failed to construct|invalid/i.test(error.message))) throw new Error(`Public asset upload failed: invalid upload request${safeFilename ? ` (${safeFilename})` : ""}`, { cause: error });
|
|
247
|
+
throw error;
|
|
248
|
+
}
|
|
218
249
|
if (!response.ok) {
|
|
219
250
|
const detail = await response.text().catch(() => "");
|
|
220
251
|
throw new Error(`Public asset upload failed: HTTP ${response.status}${detail ? ` — ${detail}` : ""}`);
|
|
221
252
|
}
|
|
222
253
|
return plan.asset;
|
|
223
254
|
}
|
|
224
|
-
|
|
255
|
+
/** Durable public upload for any chat attachment (image or file). No space required. */
|
|
256
|
+
uploadChatAttachment(input) {
|
|
225
257
|
return this.upload({
|
|
226
258
|
purpose: "chat_attachment",
|
|
227
259
|
spaceId: input.spaceId,
|
|
@@ -231,6 +263,10 @@ var PublicAssetsApi = class {
|
|
|
231
263
|
filename: input.filename
|
|
232
264
|
});
|
|
233
265
|
}
|
|
266
|
+
/** Preprocessed chat image (webp/jpeg). Same durable path as uploadChatAttachment. */
|
|
267
|
+
uploadChatImageAttachment(input) {
|
|
268
|
+
return this.uploadChatAttachment(input);
|
|
269
|
+
}
|
|
234
270
|
};
|
|
235
271
|
//#endregion
|
|
236
272
|
//#region src/apis/search.ts
|
|
@@ -312,7 +348,7 @@ function ensureRealtimeConnected(websocketClient) {
|
|
|
312
348
|
const blockSubPathPattern = /^\/message\/content\/blocks\/(\d+)\/(.+)$/;
|
|
313
349
|
const blockPathPattern = /^\/message\/content\/blocks\/(\d+)$/;
|
|
314
350
|
const blockMetaPathPattern = /^\/message\/content\/blocks\/(\d+)\/_meta$/;
|
|
315
|
-
const TERMINAL_PATCH_STATUSES = new Set([
|
|
351
|
+
const TERMINAL_PATCH_STATUSES = /* @__PURE__ */ new Set([
|
|
316
352
|
"completed",
|
|
317
353
|
"failed",
|
|
318
354
|
"interrupted"
|
|
@@ -2658,8 +2694,12 @@ var WorksApi = class {
|
|
|
2658
2694
|
listVersions(workId) {
|
|
2659
2695
|
return this.transport.request(`/api/works/${workId}/versions`);
|
|
2660
2696
|
}
|
|
2661
|
-
publishVersion(workId) {
|
|
2662
|
-
return this.transport.request(`/api/works/${workId}/versions`, {
|
|
2697
|
+
publishVersion(workId, input) {
|
|
2698
|
+
return this.transport.request(`/api/works/${workId}/versions`, {
|
|
2699
|
+
method: "POST",
|
|
2700
|
+
headers: input ? { "Content-Type": "application/json" } : void 0,
|
|
2701
|
+
body: input ? JSON.stringify(input) : void 0
|
|
2702
|
+
});
|
|
2663
2703
|
}
|
|
2664
2704
|
createSession(workId) {
|
|
2665
2705
|
return this.transport.request(`/api/works/${workId}/session`, { method: "POST" });
|
|
@@ -2717,6 +2757,7 @@ var CohubHttpClient = class {
|
|
|
2717
2757
|
generations;
|
|
2718
2758
|
models;
|
|
2719
2759
|
prompts;
|
|
2760
|
+
skills;
|
|
2720
2761
|
publicAssets;
|
|
2721
2762
|
sessionAccess;
|
|
2722
2763
|
search;
|
|
@@ -2738,6 +2779,7 @@ var CohubHttpClient = class {
|
|
|
2738
2779
|
this.generations = new GenerationsApi(this.transport);
|
|
2739
2780
|
this.models = new ModelsApi(this.transport);
|
|
2740
2781
|
this.prompts = new PromptsApi(this.transport);
|
|
2782
|
+
this.skills = new SkillsApi(this.transport);
|
|
2741
2783
|
this.publicAssets = new PublicAssetsApi(this.transport);
|
|
2742
2784
|
this.sessionAccess = new SessionAccessApi(this.transport);
|
|
2743
2785
|
this.search = new SearchApi(this.transport);
|
|
@@ -2755,4 +2797,4 @@ var CohubHttpClient = class {
|
|
|
2755
2797
|
};
|
|
2756
2798
|
const createHttpClient = (options) => new CohubHttpClient(options);
|
|
2757
2799
|
//#endregion
|
|
2758
|
-
export {
|
|
2800
|
+
export { PromptsApi as C, ChannelsApi as D, CronJobsApi as E, SkillsApi as S, GenerationsApi as T, ensureRealtimeConnected as _, ReferralsApi as a, SearchApi as b, TasksApi as c, PublicInviteApi as d, SessionGenerationStreamClient as f, createSessionPatchReducer as g, SessionPatchReducer as h, WorksApi as i, SpaceClient as l, parseAssistantMessageCommit as m, createHttpClient as n, UsersApi as o, createSessionGenerationStreamClient as p, WorkCommerceApi as r, UserApi as s, CohubHttpClient as t, SpacesApi as u, SessionAccessApi as v, ModelsApi as w, PublicAssetsApi as x, ReferencesApi as y };
|