@opengeni/contracts 2.11.1-canary.0 → 2.13.0-canary.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.
Files changed (38) hide show
  1. package/dist/artifacts.d.ts +134 -11
  2. package/dist/atlassian.js +6 -5
  3. package/dist/{chunk-NPBM4QSK.js → chunk-6TCVR53X.js} +2 -2
  4. package/dist/{chunk-7Q6HPDY2.js → chunk-NPYLOZAP.js} +19 -19
  5. package/dist/chunk-QY773SDD.js +16 -0
  6. package/dist/chunk-QY773SDD.js.map +1 -0
  7. package/dist/{chunk-6HOHS44G.js → chunk-W4CCAN7Y.js} +7365 -6666
  8. package/dist/chunk-W4CCAN7Y.js.map +1 -0
  9. package/dist/connection-authority.js +6 -5
  10. package/dist/connection-authority.js.map +1 -1
  11. package/dist/editable-artifact-codec-registry.js +2 -2
  12. package/dist/editable-artifact-live.js +2 -2
  13. package/dist/editable-artifact-serialized-commit.js +3 -3
  14. package/dist/editable-artifacts.js +33 -33
  15. package/dist/google-drive.js +6 -5
  16. package/dist/google-drive.js.map +1 -1
  17. package/dist/index.d.ts +696 -53
  18. package/dist/index.js +178 -46
  19. package/dist/mcp-oauth.d.ts +71 -0
  20. package/dist/model-context-inspector.d.ts +205 -0
  21. package/dist/personal-github.js +6 -5
  22. package/dist/personal-github.js.map +1 -1
  23. package/dist/session-mcp-projections.d.ts +212 -0
  24. package/dist/site-session-http.d.ts +3 -0
  25. package/dist/site-session-http.js +7 -0
  26. package/dist/site-session-http.js.map +1 -0
  27. package/dist/tool-catalog.d.ts +271 -0
  28. package/package.json +5 -1
  29. package/src/artifacts.ts +144 -18
  30. package/src/index.ts +293 -4
  31. package/src/mcp-oauth.ts +68 -0
  32. package/src/model-context-inspector.ts +104 -0
  33. package/src/session-mcp-projections.ts +270 -0
  34. package/src/site-session-http.ts +23 -0
  35. package/src/tool-catalog.ts +136 -0
  36. package/dist/chunk-6HOHS44G.js.map +0 -1
  37. /package/dist/{chunk-NPBM4QSK.js.map → chunk-6TCVR53X.js.map} +0 -0
  38. /package/dist/{chunk-7Q6HPDY2.js.map → chunk-NPYLOZAP.js.map} +0 -0
@@ -1,5 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const WORKSPACE_ARTIFACT_HTML_MAX_UTF8_BYTES: number;
2
+ export declare const WORKSPACE_ARTIFACT_HTML_MAX_UTF8_BYTES = 5000000000;
3
+ export declare const WORKSPACE_ARTIFACT_SOURCE_MAX_UTF8_BYTES = 5000000000;
4
+ export declare const WORKSPACE_ARTIFACT_SOURCE_MAX_FILES: number;
5
+ export declare const WORKSPACE_ARTIFACT_REQUESTED_TOOLS_MAX = 128;
3
6
  export declare const WORKSPACE_ARTIFACT_TITLE_MAX_CHARS = 120;
4
7
  export declare const WORKSPACE_ARTIFACT_DESCRIPTION_MAX_CHARS = 2000;
5
8
  export declare const WORKSPACE_ARTIFACT_LIST_MAX = 100;
@@ -12,6 +15,27 @@ export declare const WorkspaceArtifactStatus: z.ZodEnum<{
12
15
  archived: "archived";
13
16
  }>;
14
17
  export type WorkspaceArtifactStatus = z.infer<typeof WorkspaceArtifactStatus>;
18
+ export declare const WorkspaceArtifactSourcePath: z.ZodString;
19
+ export type WorkspaceArtifactSourcePath = z.infer<typeof WorkspaceArtifactSourcePath>;
20
+ export declare const WorkspaceArtifactSourceFile: z.ZodObject<{
21
+ path: z.ZodString;
22
+ content: z.ZodString;
23
+ }, z.core.$strict>;
24
+ export type WorkspaceArtifactSourceFile = z.infer<typeof WorkspaceArtifactSourceFile>;
25
+ /** Retained editable source; the published runtime remains one exact HTML document. */
26
+ export declare const WorkspaceArtifactSourceBundle: z.ZodObject<{
27
+ entrypoint: z.ZodString;
28
+ files: z.ZodArray<z.ZodObject<{
29
+ path: z.ZodString;
30
+ content: z.ZodString;
31
+ }, z.core.$strict>>;
32
+ }, z.core.$strict>;
33
+ export type WorkspaceArtifactSourceBundle = z.infer<typeof WorkspaceArtifactSourceBundle>;
34
+ export declare const WorkspaceArtifactRequestedTools: z.ZodArray<z.ZodObject<{
35
+ serverId: z.ZodString;
36
+ toolName: z.ZodString;
37
+ }, z.core.$strict>>;
38
+ export type WorkspaceArtifactRequestedTools = z.infer<typeof WorkspaceArtifactRequestedTools>;
15
39
  export declare const WorkspaceArtifactVersion: z.ZodObject<{
16
40
  id: z.ZodString;
17
41
  accountId: z.ZodString;
@@ -19,8 +43,14 @@ export declare const WorkspaceArtifactVersion: z.ZodObject<{
19
43
  artifactId: z.ZodString;
20
44
  revision: z.ZodNumber;
21
45
  contentType: z.ZodLiteral<"text/html">;
22
- contentSha256: z.ZodString;
46
+ contentSha256: z.ZodNullable<z.ZodString>;
23
47
  sizeBytes: z.ZodNumber;
48
+ sourceSha256: z.ZodNullable<z.ZodString>;
49
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
50
+ requestedTools: z.ZodArray<z.ZodObject<{
51
+ serverId: z.ZodString;
52
+ toolName: z.ZodString;
53
+ }, z.core.$strict>>;
24
54
  sourceSessionId: z.ZodNullable<z.ZodString>;
25
55
  sourceTurnId: z.ZodNullable<z.ZodString>;
26
56
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -47,8 +77,14 @@ export declare const WorkspaceArtifact: z.ZodObject<{
47
77
  artifactId: z.ZodString;
48
78
  revision: z.ZodNumber;
49
79
  contentType: z.ZodLiteral<"text/html">;
50
- contentSha256: z.ZodString;
80
+ contentSha256: z.ZodNullable<z.ZodString>;
51
81
  sizeBytes: z.ZodNumber;
82
+ sourceSha256: z.ZodNullable<z.ZodString>;
83
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
84
+ requestedTools: z.ZodArray<z.ZodObject<{
85
+ serverId: z.ZodString;
86
+ toolName: z.ZodString;
87
+ }, z.core.$strict>>;
52
88
  sourceSessionId: z.ZodNullable<z.ZodString>;
53
89
  sourceTurnId: z.ZodNullable<z.ZodString>;
54
90
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -62,7 +98,9 @@ export declare const WorkspaceArtifact: z.ZodObject<{
62
98
  }, z.core.$strip>;
63
99
  export type WorkspaceArtifact = z.infer<typeof WorkspaceArtifact>;
64
100
  export declare const WorkspaceArtifactEventType: z.ZodEnum<{
101
+ archived: "archived";
65
102
  published: "published";
103
+ restored: "restored";
66
104
  rolled_back: "rolled_back";
67
105
  }>;
68
106
  export type WorkspaceArtifactEventType = z.infer<typeof WorkspaceArtifactEventType>;
@@ -72,7 +110,9 @@ export declare const WorkspaceArtifactEvent: z.ZodObject<{
72
110
  workspaceId: z.ZodString;
73
111
  artifactId: z.ZodString;
74
112
  type: z.ZodEnum<{
113
+ archived: "archived";
75
114
  published: "published";
115
+ restored: "restored";
76
116
  rolled_back: "rolled_back";
77
117
  }>;
78
118
  fromVersionId: z.ZodNullable<z.ZodString>;
@@ -89,6 +129,10 @@ export type WorkspaceArtifactEvent = z.infer<typeof WorkspaceArtifactEvent>;
89
129
  export declare const WorkspaceArtifactListQuery: z.ZodObject<{
90
130
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
91
131
  cursor: z.ZodOptional<z.ZodString>;
132
+ status: z.ZodOptional<z.ZodEnum<{
133
+ active: "active";
134
+ archived: "archived";
135
+ }>>;
92
136
  }, z.core.$strip>;
93
137
  export type WorkspaceArtifactListQuery = z.infer<typeof WorkspaceArtifactListQuery>;
94
138
  export declare const WorkspaceArtifactListResponse: z.ZodObject<{
@@ -110,8 +154,14 @@ export declare const WorkspaceArtifactListResponse: z.ZodObject<{
110
154
  artifactId: z.ZodString;
111
155
  revision: z.ZodNumber;
112
156
  contentType: z.ZodLiteral<"text/html">;
113
- contentSha256: z.ZodString;
157
+ contentSha256: z.ZodNullable<z.ZodString>;
114
158
  sizeBytes: z.ZodNumber;
159
+ sourceSha256: z.ZodNullable<z.ZodString>;
160
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
161
+ requestedTools: z.ZodArray<z.ZodObject<{
162
+ serverId: z.ZodString;
163
+ toolName: z.ZodString;
164
+ }, z.core.$strict>>;
115
165
  sourceSessionId: z.ZodNullable<z.ZodString>;
116
166
  sourceTurnId: z.ZodNullable<z.ZodString>;
117
167
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -146,8 +196,14 @@ export declare const WorkspaceArtifactDetailResponse: z.ZodObject<{
146
196
  artifactId: z.ZodString;
147
197
  revision: z.ZodNumber;
148
198
  contentType: z.ZodLiteral<"text/html">;
149
- contentSha256: z.ZodString;
199
+ contentSha256: z.ZodNullable<z.ZodString>;
150
200
  sizeBytes: z.ZodNumber;
201
+ sourceSha256: z.ZodNullable<z.ZodString>;
202
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
203
+ requestedTools: z.ZodArray<z.ZodObject<{
204
+ serverId: z.ZodString;
205
+ toolName: z.ZodString;
206
+ }, z.core.$strict>>;
151
207
  sourceSessionId: z.ZodNullable<z.ZodString>;
152
208
  sourceTurnId: z.ZodNullable<z.ZodString>;
153
209
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -166,8 +222,14 @@ export declare const WorkspaceArtifactDetailResponse: z.ZodObject<{
166
222
  artifactId: z.ZodString;
167
223
  revision: z.ZodNumber;
168
224
  contentType: z.ZodLiteral<"text/html">;
169
- contentSha256: z.ZodString;
225
+ contentSha256: z.ZodNullable<z.ZodString>;
170
226
  sizeBytes: z.ZodNumber;
227
+ sourceSha256: z.ZodNullable<z.ZodString>;
228
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
229
+ requestedTools: z.ZodArray<z.ZodObject<{
230
+ serverId: z.ZodString;
231
+ toolName: z.ZodString;
232
+ }, z.core.$strict>>;
171
233
  sourceSessionId: z.ZodNullable<z.ZodString>;
172
234
  sourceTurnId: z.ZodNullable<z.ZodString>;
173
235
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -181,7 +243,9 @@ export declare const WorkspaceArtifactDetailResponse: z.ZodObject<{
181
243
  workspaceId: z.ZodString;
182
244
  artifactId: z.ZodString;
183
245
  type: z.ZodEnum<{
246
+ archived: "archived";
184
247
  published: "published";
248
+ restored: "restored";
185
249
  rolled_back: "rolled_back";
186
250
  }>;
187
251
  fromVersionId: z.ZodNullable<z.ZodString>;
@@ -203,14 +267,38 @@ export declare const CreateWorkspaceArtifactRequest: z.ZodObject<{
203
267
  slug: z.ZodOptional<z.ZodString>;
204
268
  title: z.ZodString;
205
269
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
- html: z.ZodString;
270
+ html: z.ZodOptional<z.ZodString>;
271
+ uploadId: z.ZodOptional<z.ZodString>;
272
+ source: z.ZodOptional<z.ZodObject<{
273
+ entrypoint: z.ZodString;
274
+ files: z.ZodArray<z.ZodObject<{
275
+ path: z.ZodString;
276
+ content: z.ZodString;
277
+ }, z.core.$strict>>;
278
+ }, z.core.$strict>>;
279
+ requestedTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
280
+ serverId: z.ZodString;
281
+ toolName: z.ZodString;
282
+ }, z.core.$strict>>>;
207
283
  idempotencyKey: z.ZodString;
208
284
  }, z.core.$strip>;
209
285
  export type CreateWorkspaceArtifactRequest = z.infer<typeof CreateWorkspaceArtifactRequest>;
210
286
  export declare const PublishWorkspaceArtifactVersionRequest: z.ZodObject<{
211
287
  title: z.ZodOptional<z.ZodString>;
212
288
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
- html: z.ZodString;
289
+ html: z.ZodOptional<z.ZodString>;
290
+ uploadId: z.ZodOptional<z.ZodString>;
291
+ source: z.ZodOptional<z.ZodObject<{
292
+ entrypoint: z.ZodString;
293
+ files: z.ZodArray<z.ZodObject<{
294
+ path: z.ZodString;
295
+ content: z.ZodString;
296
+ }, z.core.$strict>>;
297
+ }, z.core.$strict>>;
298
+ requestedTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
299
+ serverId: z.ZodString;
300
+ toolName: z.ZodString;
301
+ }, z.core.$strict>>>;
214
302
  expectedCurrentVersionId: z.ZodString;
215
303
  idempotencyKey: z.ZodString;
216
304
  }, z.core.$strip>;
@@ -222,6 +310,16 @@ export declare const RollbackWorkspaceArtifactRequest: z.ZodObject<{
222
310
  idempotencyKey: z.ZodString;
223
311
  }, z.core.$strip>;
224
312
  export type RollbackWorkspaceArtifactRequest = z.infer<typeof RollbackWorkspaceArtifactRequest>;
313
+ export declare const SetWorkspaceArtifactStatusRequest: z.ZodObject<{
314
+ status: z.ZodEnum<{
315
+ active: "active";
316
+ archived: "archived";
317
+ }>;
318
+ expectedCurrentVersionId: z.ZodString;
319
+ reason: z.ZodString;
320
+ idempotencyKey: z.ZodString;
321
+ }, z.core.$strip>;
322
+ export type SetWorkspaceArtifactStatusRequest = z.infer<typeof SetWorkspaceArtifactStatusRequest>;
225
323
  export declare const WorkspaceArtifactMutationResponse: z.ZodObject<{
226
324
  artifact: z.ZodObject<{
227
325
  id: z.ZodString;
@@ -241,8 +339,14 @@ export declare const WorkspaceArtifactMutationResponse: z.ZodObject<{
241
339
  artifactId: z.ZodString;
242
340
  revision: z.ZodNumber;
243
341
  contentType: z.ZodLiteral<"text/html">;
244
- contentSha256: z.ZodString;
342
+ contentSha256: z.ZodNullable<z.ZodString>;
245
343
  sizeBytes: z.ZodNumber;
344
+ sourceSha256: z.ZodNullable<z.ZodString>;
345
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
346
+ requestedTools: z.ZodArray<z.ZodObject<{
347
+ serverId: z.ZodString;
348
+ toolName: z.ZodString;
349
+ }, z.core.$strict>>;
246
350
  sourceSessionId: z.ZodNullable<z.ZodString>;
247
351
  sourceTurnId: z.ZodNullable<z.ZodString>;
248
352
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -261,8 +365,14 @@ export declare const WorkspaceArtifactMutationResponse: z.ZodObject<{
261
365
  artifactId: z.ZodString;
262
366
  revision: z.ZodNumber;
263
367
  contentType: z.ZodLiteral<"text/html">;
264
- contentSha256: z.ZodString;
368
+ contentSha256: z.ZodNullable<z.ZodString>;
265
369
  sizeBytes: z.ZodNumber;
370
+ sourceSha256: z.ZodNullable<z.ZodString>;
371
+ sourceSizeBytes: z.ZodNullable<z.ZodNumber>;
372
+ requestedTools: z.ZodArray<z.ZodObject<{
373
+ serverId: z.ZodString;
374
+ toolName: z.ZodString;
375
+ }, z.core.$strict>>;
266
376
  sourceSessionId: z.ZodNullable<z.ZodString>;
267
377
  sourceTurnId: z.ZodNullable<z.ZodString>;
268
378
  sourceAttemptId: z.ZodNullable<z.ZodString>;
@@ -276,7 +386,9 @@ export declare const WorkspaceArtifactMutationResponse: z.ZodObject<{
276
386
  workspaceId: z.ZodString;
277
387
  artifactId: z.ZodString;
278
388
  type: z.ZodEnum<{
389
+ archived: "archived";
279
390
  published: "published";
391
+ restored: "restored";
280
392
  rolled_back: "rolled_back";
281
393
  }>;
282
394
  fromVersionId: z.ZodNullable<z.ZodString>;
@@ -296,8 +408,19 @@ export declare const WorkspaceArtifactContentResponse: z.ZodObject<{
296
408
  artifactId: z.ZodString;
297
409
  versionId: z.ZodString;
298
410
  contentType: z.ZodLiteral<"text/html">;
299
- contentSha256: z.ZodString;
411
+ contentSha256: z.ZodNullable<z.ZodString>;
300
412
  html: z.ZodString;
413
+ source: z.ZodObject<{
414
+ entrypoint: z.ZodString;
415
+ files: z.ZodArray<z.ZodObject<{
416
+ path: z.ZodString;
417
+ content: z.ZodString;
418
+ }, z.core.$strict>>;
419
+ }, z.core.$strict>;
420
+ requestedTools: z.ZodArray<z.ZodObject<{
421
+ serverId: z.ZodString;
422
+ toolName: z.ZodString;
423
+ }, z.core.$strict>>;
301
424
  }, z.core.$strip>;
302
425
  export type WorkspaceArtifactContentResponse = z.infer<typeof WorkspaceArtifactContentResponse>;
303
426
  export declare function normalizeWorkspaceArtifactSlug(value: string): string;
package/dist/atlassian.js CHANGED
@@ -17,26 +17,27 @@ import {
17
17
  AtlassianSyncCadence,
18
18
  SaveAtlassianSourcesRequest,
19
19
  atlassianScopesAllowRead
20
- } from "./chunk-6HOHS44G.js";
20
+ } from "./chunk-W4CCAN7Y.js";
21
21
  import "./chunk-YBW5JSA3.js";
22
- import "./chunk-NPBM4QSK.js";
22
+ import "./chunk-6TCVR53X.js";
23
23
  import "./chunk-CM6BMECR.js";
24
24
  import "./chunk-MRWYRAS5.js";
25
25
  import "./chunk-3SIZGL3O.js";
26
+ import "./chunk-JUFK3T4Q.js";
26
27
  import "./chunk-M5ZGRVIQ.js";
27
28
  import "./chunk-BCS7WHCK.js";
29
+ import "./chunk-QY773SDD.js";
28
30
  import "./chunk-WYBDERIY.js";
29
31
  import "./chunk-7ABONTXE.js";
30
32
  import "./chunk-NVJMJWLL.js";
31
33
  import "./chunk-YRKRZ6OF.js";
32
- import "./chunk-7Q6HPDY2.js";
34
+ import "./chunk-NPYLOZAP.js";
35
+ import "./chunk-D2HKF2EF.js";
33
36
  import "./chunk-Y3KNXVTD.js";
34
37
  import "./chunk-TXTQIYCV.js";
35
38
  import "./chunk-RIY7GYQS.js";
36
- import "./chunk-D2HKF2EF.js";
37
39
  import "./chunk-MYBZRDTY.js";
38
40
  import "./chunk-PX3VCKAU.js";
39
- import "./chunk-JUFK3T4Q.js";
40
41
  export {
41
42
  ATLASSIAN_CREDENTIAL_LABEL,
42
43
  ATLASSIAN_CREDENTIAL_ROLE,
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-NVJMJWLL.js";
7
7
  import {
8
8
  editableArtifactCodecFor
9
- } from "./chunk-7Q6HPDY2.js";
9
+ } from "./chunk-NPYLOZAP.js";
10
10
  import {
11
11
  DOCUMENT_ARTIFACT_COMMAND_MAX_COMMANDS,
12
12
  DOCUMENT_ARTIFACT_MAX_STRUCTURAL_COUNTER
@@ -380,4 +380,4 @@ export {
380
380
  decodeEditableArtifactSerializedCommit,
381
381
  assertCanonicalEditableArtifactSerializedCommit
382
382
  };
383
- //# sourceMappingURL=chunk-NPBM4QSK.js.map
383
+ //# sourceMappingURL=chunk-6TCVR53X.js.map
@@ -1,3 +1,21 @@
1
+ import {
2
+ PRESENTATION_ARTIFACT_COMMAND_MAX_BYTES,
3
+ PRESENTATION_ARTIFACT_COMMAND_MAX_COMMANDS,
4
+ PRESENTATION_ARTIFACT_COMMAND_VERSION,
5
+ PRESENTATION_ARTIFACT_QUERY_MAX_BYTES,
6
+ PRESENTATION_ARTIFACT_QUERY_RESPONSE_MAX_BYTES,
7
+ PRESENTATION_ARTIFACT_QUERY_RESPONSE_VERSION,
8
+ PRESENTATION_ARTIFACT_QUERY_VERSION,
9
+ assertCanonicalPresentationArtifactCommandBytes,
10
+ assertCanonicalPresentationArtifactQueryBytes,
11
+ assertCanonicalPresentationArtifactQueryResponseBytes,
12
+ decodePresentationArtifactCommandBatch,
13
+ decodePresentationArtifactQuery,
14
+ decodePresentationArtifactQueryResponse,
15
+ encodePresentationArtifactCommandBatch,
16
+ encodePresentationArtifactQuery,
17
+ encodePresentationArtifactQueryResponse
18
+ } from "./chunk-D2HKF2EF.js";
1
19
  import {
2
20
  SPREADSHEET_ARTIFACT_PROJECTION_MAX_BYTES,
3
21
  SPREADSHEET_ARTIFACT_QUERY_MAX_BYTES,
@@ -34,24 +52,6 @@ import {
34
52
  encodeDocumentArtifactQuery,
35
53
  encodeDocumentArtifactQueryResponse
36
54
  } from "./chunk-RIY7GYQS.js";
37
- import {
38
- PRESENTATION_ARTIFACT_COMMAND_MAX_BYTES,
39
- PRESENTATION_ARTIFACT_COMMAND_MAX_COMMANDS,
40
- PRESENTATION_ARTIFACT_COMMAND_VERSION,
41
- PRESENTATION_ARTIFACT_QUERY_MAX_BYTES,
42
- PRESENTATION_ARTIFACT_QUERY_RESPONSE_MAX_BYTES,
43
- PRESENTATION_ARTIFACT_QUERY_RESPONSE_VERSION,
44
- PRESENTATION_ARTIFACT_QUERY_VERSION,
45
- assertCanonicalPresentationArtifactCommandBytes,
46
- assertCanonicalPresentationArtifactQueryBytes,
47
- assertCanonicalPresentationArtifactQueryResponseBytes,
48
- decodePresentationArtifactCommandBatch,
49
- decodePresentationArtifactQuery,
50
- decodePresentationArtifactQueryResponse,
51
- encodePresentationArtifactCommandBatch,
52
- encodePresentationArtifactQuery,
53
- encodePresentationArtifactQueryResponse
54
- } from "./chunk-D2HKF2EF.js";
55
55
  import {
56
56
  COMMITTED_TRANSACTION_PROTOCOL_VERSION,
57
57
  DOCUMENT_ARTIFACT_MODEL_SCHEMA_VERSION,
@@ -214,4 +214,4 @@ export {
214
214
  currentEditableArtifactCompatibility,
215
215
  editableArtifactCodecFor
216
216
  };
217
- //# sourceMappingURL=chunk-7Q6HPDY2.js.map
217
+ //# sourceMappingURL=chunk-NPYLOZAP.js.map
@@ -0,0 +1,16 @@
1
+ // src/site-session-http.ts
2
+ function siteSessionPath(path, workspaceId, method = "GET") {
3
+ const session = /^\/v1\/workspaces\/site-host\/(?:sessions(?:[/?]|$)|new-session-draft(?:[?]|$))/u.test(path);
4
+ const context = method === "GET" && (path === "/v1/config/client" || /^\/v1\/workspaces\/site-host(?:[?].*|$|\/(?:model-catalog|live-events\/stream|control-events(?:\/stream)?|interaction-events\/stream)(?:[?].*|$))/u.test(
5
+ path
6
+ ));
7
+ if (!session && !context || /[%\\#]/u.test(path.split("?")[0]) || path.split("?")[0].split("/").some((p) => p === "." || p === "..")) {
8
+ throw new Error("Unsupported Site session API path");
9
+ }
10
+ return path.replace("/workspaces/site-host", `/workspaces/${encodeURIComponent(workspaceId)}`);
11
+ }
12
+
13
+ export {
14
+ siteSessionPath
15
+ };
16
+ //# sourceMappingURL=chunk-QY773SDD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/site-session-http.ts"],"sourcesContent":["/** The shared browser/preview session SDK surface. Tenant routing stays with\n * the host; normal API handlers remain the authorization boundary. */\nexport function siteSessionPath(path: string, workspaceId: string, method = \"GET\"): string {\n const session =\n /^\\/v1\\/workspaces\\/site-host\\/(?:sessions(?:[/?]|$)|new-session-draft(?:[?]|$))/u.test(path);\n const context =\n method === \"GET\" &&\n (path === \"/v1/config/client\" ||\n /^\\/v1\\/workspaces\\/site-host(?:[?].*|$|\\/(?:model-catalog|live-events\\/stream|control-events(?:\\/stream)?|interaction-events\\/stream)(?:[?].*|$))/u.test(\n path,\n ));\n if (\n (!session && !context) ||\n /[%\\\\#]/u.test(path.split(\"?\")[0]!) ||\n path\n .split(\"?\")[0]!\n .split(\"/\")\n .some((p) => p === \".\" || p === \"..\")\n ) {\n throw new Error(\"Unsupported Site session API path\");\n }\n return path.replace(\"/workspaces/site-host\", `/workspaces/${encodeURIComponent(workspaceId)}`);\n}\n"],"mappings":";AAEO,SAAS,gBAAgB,MAAc,aAAqB,SAAS,OAAe;AACzF,QAAM,UACJ,mFAAmF,KAAK,IAAI;AAC9F,QAAM,UACJ,WAAW,UACV,SAAS,uBACR,qJAAqJ;AAAA,IACnJ;AAAA,EACF;AACJ,MACG,CAAC,WAAW,CAAC,WACd,UAAU,KAAK,KAAK,MAAM,GAAG,EAAE,CAAC,CAAE,KAClC,KACG,MAAM,GAAG,EAAE,CAAC,EACZ,MAAM,GAAG,EACT,KAAK,CAAC,MAAM,MAAM,OAAO,MAAM,IAAI,GACtC;AACA,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACrD;AACA,SAAO,KAAK,QAAQ,yBAAyB,eAAe,mBAAmB,WAAW,CAAC,EAAE;AAC/F;","names":[]}