@40rty/ams-sdk 0.4.4 → 0.5.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/dist/index.js +689 -497
- package/dist/types/ecommerce/src/review-schemas.d.ts +24 -10
- package/dist/types/sdk/src/host/host-modules.d.ts +342 -10
- package/dist/types/spacestation/src/attachment/attachment.d.ts +8 -5
- package/dist/types/spacestation/src/catalog/wire/brand-mark.d.ts +230 -0
- package/dist/types/spacestation/src/catalog/wire/index.d.ts +3 -0
- package/dist/types/spacestation/src/catalog/wire/package-bundle-ref.d.ts +30 -0
- package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +147 -0
- package/dist/types/spacestation/src/catalog/wire/sdk-compat.d.ts +43 -0
- package/dist/types/spacestation/src/contracts/socket-ticket-param.d.ts +9 -0
- package/dist/types/spacestation/src/contracts/wire-protocol.d.ts +25 -0
- package/dist/types/spacestation/src/index.d.ts +3 -1
- package/dist/types/spacestation/src/space/workspace-catalog.d.ts +9 -0
- package/dist/types/spacestation/src/trace/trace-events.d.ts +1 -0
- package/dist/types/spacestation/src/widgets/presence/index.d.ts +1 -1
- package/dist/types/spacestation/src/widgets/presence/scan.d.ts +21 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,6 +33,11 @@ __export(src_exports3, {
|
|
|
33
33
|
AttributeScopeBucketSchema: () => AttributeScopeBucketSchema,
|
|
34
34
|
AttributeScopeConfigSchema: () => AttributeScopeConfigSchema,
|
|
35
35
|
AvailabilityStatusSchema: () => AvailabilityStatusSchema,
|
|
36
|
+
BRAND_MARK_MAX_BYTES: () => BRAND_MARK_MAX_BYTES,
|
|
37
|
+
BRAND_MARK_SLOTS: () => BRAND_MARK_SLOTS,
|
|
38
|
+
BRAND_MARK_TYPES: () => BRAND_MARK_TYPES,
|
|
39
|
+
BrandMarkImageSchema: () => BrandMarkImageSchema,
|
|
40
|
+
BrandMarkSchema: () => BrandMarkSchema,
|
|
36
41
|
BugLocationSchema: () => BugLocationSchema,
|
|
37
42
|
BugSeveritySchema: () => BugSeveritySchema,
|
|
38
43
|
CANVAS_ARRANGEMENTS: () => CANVAS_ARRANGEMENTS,
|
|
@@ -144,11 +149,13 @@ __export(src_exports3, {
|
|
|
144
149
|
LlmUsageDailySchema: () => LlmUsageDailySchema,
|
|
145
150
|
MAX_ATTACHMENT_BYTES: () => MAX_ATTACHMENT_BYTES,
|
|
146
151
|
MAX_VISITOR_PROMPT_CHARS: () => MAX_VISITOR_PROMPT_CHARS,
|
|
152
|
+
MIN_WIRE_PROTOCOL_VERSION: () => MIN_WIRE_PROTOCOL_VERSION,
|
|
147
153
|
MOBILE_VIEWPORT_MAX: () => MOBILE_VIEWPORT_MAX,
|
|
148
154
|
MoneySchema: () => MoneySchema,
|
|
149
155
|
NAVIGATE_SIGNAL: () => NAVIGATE_SIGNAL,
|
|
150
156
|
NavigatePayloadSchema: () => NavigatePayloadSchema,
|
|
151
157
|
NullComponent: () => NullComponent,
|
|
158
|
+
OLDEST_SUPPORTED_SDK: () => OLDEST_SUPPORTED_SDK,
|
|
152
159
|
PRESENCE_CANVAS_REFRESH_SIGNAL: () => PRESENCE_CANVAS_REFRESH_SIGNAL,
|
|
153
160
|
PRESENCE_FACT_DISMISS_SIGNAL: () => PRESENCE_FACT_DISMISS_SIGNAL,
|
|
154
161
|
PRESENCE_FLOW: () => PRESENCE_FLOW,
|
|
@@ -159,6 +166,7 @@ __export(src_exports3, {
|
|
|
159
166
|
PRODUCT_SELECT_OPTION_SIGNAL: () => PRODUCT_SELECT_OPTION_SIGNAL,
|
|
160
167
|
PRODUCT_VARIANTS_SCOPE: () => PRODUCT_VARIANTS_SCOPE,
|
|
161
168
|
PROJECTION_SET_SIGNAL: () => PROJECTION_SET_SIGNAL,
|
|
169
|
+
PackageBundleRefSchema: () => PackageBundleRefSchema,
|
|
162
170
|
PackageLookupProvider: () => PackageLookupProvider,
|
|
163
171
|
PackageReleaseSchema: () => PackageReleaseSchema,
|
|
164
172
|
PageSchema: () => PageSchema,
|
|
@@ -185,13 +193,17 @@ __export(src_exports3, {
|
|
|
185
193
|
ReviewAggregateSchema: () => ReviewAggregateSchema,
|
|
186
194
|
ReviewSchema: () => ReviewSchema,
|
|
187
195
|
SCANNING_FORM: () => SCANNING_FORM,
|
|
196
|
+
SDK_SHIMS: () => SDK_SHIMS,
|
|
197
|
+
SDK_VERSION_PATTERN: () => SDK_VERSION_PATTERN,
|
|
188
198
|
SELECTION_ORIGIN_VISITOR: () => SELECTION_ORIGIN_VISITOR,
|
|
189
199
|
SIGNAL_PATCH_PREFIX: () => SIGNAL_PATCH_PREFIX,
|
|
200
|
+
SOCKET_TICKET_PARAM: () => SOCKET_TICKET_PARAM,
|
|
190
201
|
STRUCTURAL_BASELINE_CATALOG: () => STRUCTURAL_BASELINE_CATALOG,
|
|
191
202
|
STRUCTURAL_BASELINE_TYPES: () => STRUCTURAL_BASELINE_TYPES,
|
|
192
203
|
SURFACES: () => SURFACES,
|
|
193
204
|
SURFACE_DISPOSITION: () => SURFACE_DISPOSITION,
|
|
194
205
|
ScrollContainerProvider: () => ScrollContainerProvider,
|
|
206
|
+
SdkVersionSchema: () => SdkVersionSchema,
|
|
195
207
|
SelectedOptionSchema: () => SelectedOptionSchema,
|
|
196
208
|
SessionActivityEventSchema: () => SessionActivityEventSchema,
|
|
197
209
|
SessionActivitySchema: () => SessionActivitySchema,
|
|
@@ -216,6 +228,7 @@ __export(src_exports3, {
|
|
|
216
228
|
ShellRootContext: () => ShellRootContext,
|
|
217
229
|
ShimmerSweep: () => ShimmerSweep,
|
|
218
230
|
SiblingProductSchema: () => SiblingProductSchema,
|
|
231
|
+
SpaceBrandMarkSchema: () => SpaceBrandMarkSchema,
|
|
219
232
|
SpaceBugSchema: () => SpaceBugSchema,
|
|
220
233
|
SpacefrontCanvas: () => SpacefrontCanvas,
|
|
221
234
|
SpacefrontPreviewProvider: () => SpacefrontPreviewProvider,
|
|
@@ -254,6 +267,9 @@ __export(src_exports3, {
|
|
|
254
267
|
ViewportWindowContext: () => ViewportWindowContext,
|
|
255
268
|
ViewportWindowProvider: () => ViewportWindowProvider,
|
|
256
269
|
VisitorIdDurabilitySchema: () => VisitorIdDurabilitySchema,
|
|
270
|
+
WIRE_PROTOCOL_PARAM: () => WIRE_PROTOCOL_PARAM,
|
|
271
|
+
WIRE_PROTOCOL_UNSUPPORTED_CLOSE: () => WIRE_PROTOCOL_UNSUPPORTED_CLOSE,
|
|
272
|
+
WIRE_PROTOCOL_VERSION: () => WIRE_PROTOCOL_VERSION,
|
|
257
273
|
WORKSPACE_THEME_PACKAGES: () => WORKSPACE_THEME_PACKAGES,
|
|
258
274
|
WireCatalogEntrySchema: () => WireCatalogEntrySchema,
|
|
259
275
|
WireCatalogSchema: () => WireCatalogSchema,
|
|
@@ -301,6 +317,7 @@ __export(src_exports3, {
|
|
|
301
317
|
collectLayoutGids: () => collectLayoutGids,
|
|
302
318
|
collectPlacedEntityRefs: () => collectPlacedEntityRefs,
|
|
303
319
|
colorHexOf: () => colorHexOf,
|
|
320
|
+
compareSdkVersions: () => compareSdkVersions,
|
|
304
321
|
compressArray: () => compressArray,
|
|
305
322
|
compressString: () => compressString,
|
|
306
323
|
computeActiveChips: () => computeActiveChips,
|
|
@@ -465,6 +482,8 @@ __export(src_exports3, {
|
|
|
465
482
|
scopedAttributeKey: () => scopedAttributeKey,
|
|
466
483
|
scrollEventTarget: () => scrollEventTarget,
|
|
467
484
|
scrollPaddingTopOf: () => scrollPaddingTopOf,
|
|
485
|
+
sdkShimsFor: () => sdkShimsFor,
|
|
486
|
+
sdkWindowProblem: () => sdkWindowProblem,
|
|
468
487
|
selectItemVariants: () => selectItemVariants,
|
|
469
488
|
selectedOptionsToRecord: () => selectedOptionsToRecord,
|
|
470
489
|
serverState: () => serverState,
|
|
@@ -1400,6 +1419,11 @@ __export(src_exports, {
|
|
|
1400
1419
|
AttributeDefSchema: () => AttributeDefSchema,
|
|
1401
1420
|
AttributeScopeBucketSchema: () => AttributeScopeBucketSchema,
|
|
1402
1421
|
AttributeScopeConfigSchema: () => AttributeScopeConfigSchema,
|
|
1422
|
+
BRAND_MARK_MAX_BYTES: () => BRAND_MARK_MAX_BYTES,
|
|
1423
|
+
BRAND_MARK_SLOTS: () => BRAND_MARK_SLOTS,
|
|
1424
|
+
BRAND_MARK_TYPES: () => BRAND_MARK_TYPES,
|
|
1425
|
+
BrandMarkImageSchema: () => BrandMarkImageSchema,
|
|
1426
|
+
BrandMarkSchema: () => BrandMarkSchema,
|
|
1403
1427
|
BugLocationSchema: () => BugLocationSchema,
|
|
1404
1428
|
BugSeveritySchema: () => BugSeveritySchema,
|
|
1405
1429
|
CANVAS_ARRANGEMENTS: () => CANVAS_ARRANGEMENTS,
|
|
@@ -1454,15 +1478,18 @@ __export(src_exports, {
|
|
|
1454
1478
|
LlmUsageDailySchema: () => LlmUsageDailySchema,
|
|
1455
1479
|
MAX_ATTACHMENT_BYTES: () => MAX_ATTACHMENT_BYTES,
|
|
1456
1480
|
MAX_VISITOR_PROMPT_CHARS: () => MAX_VISITOR_PROMPT_CHARS,
|
|
1481
|
+
MIN_WIRE_PROTOCOL_VERSION: () => MIN_WIRE_PROTOCOL_VERSION,
|
|
1457
1482
|
MOBILE_VIEWPORT_MAX: () => MOBILE_VIEWPORT_MAX,
|
|
1458
1483
|
NAVIGATE_SIGNAL: () => NAVIGATE_SIGNAL,
|
|
1459
1484
|
NavigatePayloadSchema: () => NavigatePayloadSchema,
|
|
1485
|
+
OLDEST_SUPPORTED_SDK: () => OLDEST_SUPPORTED_SDK,
|
|
1460
1486
|
PRESENCE_CANVAS_REFRESH_SIGNAL: () => PRESENCE_CANVAS_REFRESH_SIGNAL,
|
|
1461
1487
|
PRESENCE_FACT_DISMISS_SIGNAL: () => PRESENCE_FACT_DISMISS_SIGNAL,
|
|
1462
1488
|
PRESENCE_FLOW: () => PRESENCE_FLOW,
|
|
1463
1489
|
PRESENCE_OPTIMISTIC_FACTS_FLOW: () => PRESENCE_OPTIMISTIC_FACTS_FLOW,
|
|
1464
1490
|
PRODUCT_SELECT_OPTION_SIGNAL: () => PRODUCT_SELECT_OPTION_SIGNAL,
|
|
1465
1491
|
PROJECTION_SET_SIGNAL: () => PROJECTION_SET_SIGNAL,
|
|
1492
|
+
PackageBundleRefSchema: () => PackageBundleRefSchema,
|
|
1466
1493
|
PackageReleaseSchema: () => PackageReleaseSchema,
|
|
1467
1494
|
PageSchema: () => PageSchema,
|
|
1468
1495
|
PatchSchema: () => PatchSchema,
|
|
@@ -1474,11 +1501,15 @@ __export(src_exports, {
|
|
|
1474
1501
|
RESERVED_ID_SET: () => RESERVED_ID_SET,
|
|
1475
1502
|
RecordVerdictInputSchema: () => RecordVerdictInputSchema,
|
|
1476
1503
|
RecordableVerdictSchema: () => RecordableVerdictSchema,
|
|
1504
|
+
SDK_SHIMS: () => SDK_SHIMS,
|
|
1505
|
+
SDK_VERSION_PATTERN: () => SDK_VERSION_PATTERN,
|
|
1477
1506
|
SELECTION_ORIGIN_VISITOR: () => SELECTION_ORIGIN_VISITOR,
|
|
1478
1507
|
SIGNAL_PATCH_PREFIX: () => SIGNAL_PATCH_PREFIX,
|
|
1508
|
+
SOCKET_TICKET_PARAM: () => SOCKET_TICKET_PARAM,
|
|
1479
1509
|
STRUCTURAL_BASELINE_CATALOG: () => STRUCTURAL_BASELINE_CATALOG,
|
|
1480
1510
|
STRUCTURAL_BASELINE_TYPES: () => STRUCTURAL_BASELINE_TYPES,
|
|
1481
1511
|
SURFACES: () => SURFACES,
|
|
1512
|
+
SdkVersionSchema: () => SdkVersionSchema,
|
|
1482
1513
|
SessionActivityEventSchema: () => SessionActivityEventSchema,
|
|
1483
1514
|
SessionActivitySchema: () => SessionActivitySchema,
|
|
1484
1515
|
SessionArrivalSchema: () => SessionArrivalSchema,
|
|
@@ -1498,6 +1529,7 @@ __export(src_exports, {
|
|
|
1498
1529
|
SessionVerdictSchema: () => SessionVerdictSchema,
|
|
1499
1530
|
ShellConfigSchema: () => ShellConfigSchema,
|
|
1500
1531
|
ShellMenuItemSchema: () => ShellMenuItemSchema,
|
|
1532
|
+
SpaceBrandMarkSchema: () => SpaceBrandMarkSchema,
|
|
1501
1533
|
SpaceBugSchema: () => SpaceBugSchema,
|
|
1502
1534
|
SpecSchema: () => SpecSchema,
|
|
1503
1535
|
StateSnapshotFrameSchema: () => StateSnapshotFrameSchema,
|
|
@@ -1527,6 +1559,9 @@ __export(src_exports, {
|
|
|
1527
1559
|
ViewSchema: () => ViewSchema,
|
|
1528
1560
|
ViewportFocusSchema: () => ViewportFocusSchema,
|
|
1529
1561
|
VisitorIdDurabilitySchema: () => VisitorIdDurabilitySchema,
|
|
1562
|
+
WIRE_PROTOCOL_PARAM: () => WIRE_PROTOCOL_PARAM,
|
|
1563
|
+
WIRE_PROTOCOL_UNSUPPORTED_CLOSE: () => WIRE_PROTOCOL_UNSUPPORTED_CLOSE,
|
|
1564
|
+
WIRE_PROTOCOL_VERSION: () => WIRE_PROTOCOL_VERSION,
|
|
1530
1565
|
WORKSPACE_THEME_PACKAGES: () => WORKSPACE_THEME_PACKAGES,
|
|
1531
1566
|
WireCatalogEntrySchema: () => WireCatalogEntrySchema,
|
|
1532
1567
|
WireCatalogSchema: () => WireCatalogSchema,
|
|
@@ -1542,6 +1577,7 @@ __export(src_exports, {
|
|
|
1542
1577
|
catalogToWire: () => catalogToWire,
|
|
1543
1578
|
collectElementEntityRefs: () => collectElementEntityRefs,
|
|
1544
1579
|
collectPlacedEntityRefs: () => collectPlacedEntityRefs,
|
|
1580
|
+
compareSdkVersions: () => compareSdkVersions,
|
|
1545
1581
|
compressArray: () => compressArray,
|
|
1546
1582
|
compressString: () => compressString,
|
|
1547
1583
|
createTokenOverlapScorer: () => createTokenOverlapScorer,
|
|
@@ -1592,6 +1628,8 @@ __export(src_exports, {
|
|
|
1592
1628
|
schemaToWire: () => schemaToWire,
|
|
1593
1629
|
scopeOfAttributeKey: () => scopeOfAttributeKey,
|
|
1594
1630
|
scopedAttributeKey: () => scopedAttributeKey,
|
|
1631
|
+
sdkShimsFor: () => sdkShimsFor,
|
|
1632
|
+
sdkWindowProblem: () => sdkWindowProblem,
|
|
1595
1633
|
settledBlocks: () => settledBlocks,
|
|
1596
1634
|
splitSentences: () => splitSentences,
|
|
1597
1635
|
stateSnapshotSignal: () => stateSnapshotSignal,
|
|
@@ -2150,8 +2188,8 @@ var MIN_CHOICE_ANSWERS = 2;
|
|
|
2150
2188
|
var MAX_CHOICE_ANSWERS = 4;
|
|
2151
2189
|
var AnswerPartSchema = z14.object({ answer: z14.string().trim().min(1) });
|
|
2152
2190
|
var PartSchema = z14.union([z14.string(), AnswerPartSchema]);
|
|
2153
|
-
function partsText(
|
|
2154
|
-
return
|
|
2191
|
+
function partsText(parts2) {
|
|
2192
|
+
return parts2.map((p) => typeof p === "string" ? p : p.answer).join("");
|
|
2155
2193
|
}
|
|
2156
2194
|
var ModelTurnAskSchema = z14.object({
|
|
2157
2195
|
kind: z14.enum(["choice", "open"]),
|
|
@@ -3300,20 +3338,97 @@ function catalogFromWire(wire) {
|
|
|
3300
3338
|
}
|
|
3301
3339
|
|
|
3302
3340
|
// ../spacestation/src/catalog/wire/package-release.ts
|
|
3341
|
+
import { z as z27 } from "zod";
|
|
3342
|
+
|
|
3343
|
+
// ../spacestation/src/catalog/wire/brand-mark.ts
|
|
3303
3344
|
import { z as z25 } from "zod";
|
|
3345
|
+
var BRAND_MARK_TYPES = ["svg", "png"];
|
|
3346
|
+
var BRAND_MARK_MAX_BYTES = 256 * 1024;
|
|
3347
|
+
var MAX_BASE64_LENGTH = Math.ceil(BRAND_MARK_MAX_BYTES / 3) * 4;
|
|
3348
|
+
var BrandMarkUploadSchema = z25.object({
|
|
3349
|
+
type: z25.enum(BRAND_MARK_TYPES),
|
|
3350
|
+
data: z25.string().base64().min(1).max(MAX_BASE64_LENGTH, `a mark file is at most ${BRAND_MARK_MAX_BYTES / 1024} KB`)
|
|
3351
|
+
}).strict();
|
|
3352
|
+
var BrandMarkStoredSchema = z25.object({
|
|
3353
|
+
type: z25.enum(BRAND_MARK_TYPES),
|
|
3354
|
+
sha256: z25.string().regex(/^[0-9a-f]{64}$/, "a stored mark is named by its sha256")
|
|
3355
|
+
}).strict();
|
|
3356
|
+
var BrandMarkFileSchema = z25.union([BrandMarkUploadSchema, BrandMarkStoredSchema]);
|
|
3357
|
+
var BRAND_MARK_SLOTS = ["square", "wordmark"];
|
|
3358
|
+
var BrandMarkSchema = z25.object({ square: BrandMarkFileSchema.optional(), wordmark: BrandMarkFileSchema.optional() }).strict().refine((mark) => mark.square !== void 0 || mark.wordmark !== void 0, "a mark names a square, a wordmark, or both");
|
|
3359
|
+
var BrandMarkImageSchema = z25.object({ src: z25.string().min(1), type: z25.enum(BRAND_MARK_TYPES) }).strict();
|
|
3360
|
+
var SpaceBrandMarkSchema = z25.object({ square: BrandMarkImageSchema.nullable(), wordmark: BrandMarkImageSchema.nullable() }).strict();
|
|
3361
|
+
|
|
3362
|
+
// ../spacestation/src/catalog/wire/sdk-compat.ts
|
|
3363
|
+
import { z as z26 } from "zod";
|
|
3364
|
+
var SDK_VERSION_PATTERN = /^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.]{1,32})?$/;
|
|
3365
|
+
var SdkVersionSchema = z26.string().regex(SDK_VERSION_PATTERN, "an sdk version is major.minor.patch");
|
|
3366
|
+
var OLDEST_SUPPORTED_SDK = "0.3.0";
|
|
3367
|
+
var SDK_SHIMS = {
|
|
3368
|
+
/** sdk ≤ 0.3 called the vertical verbs on `useCanvasActions()` — `legacy-canvas-actions.ts`. */
|
|
3369
|
+
legacyCanvasActions: { below: "0.4.0" }
|
|
3370
|
+
};
|
|
3371
|
+
function parts(version2) {
|
|
3372
|
+
const dash = version2.indexOf("-");
|
|
3373
|
+
const core = (dash === -1 ? version2 : version2.slice(0, dash)).split(".").map(Number);
|
|
3374
|
+
return { core, pre: dash === -1 ? null : version2.slice(dash + 1) };
|
|
3375
|
+
}
|
|
3376
|
+
function compareSdkVersions(a, b) {
|
|
3377
|
+
const pa = parts(a);
|
|
3378
|
+
const pb = parts(b);
|
|
3379
|
+
for (let i = 0; i < 3; i++) {
|
|
3380
|
+
const diff = pa.core[i] - pb.core[i];
|
|
3381
|
+
if (diff !== 0) return diff;
|
|
3382
|
+
}
|
|
3383
|
+
if (pa.pre === pb.pre) return 0;
|
|
3384
|
+
if (pa.pre === null) return 1;
|
|
3385
|
+
if (pb.pre === null) return -1;
|
|
3386
|
+
return pa.pre.localeCompare(pb.pre, "en", { numeric: true });
|
|
3387
|
+
}
|
|
3388
|
+
function sdkShimsFor(builtWithSdk) {
|
|
3389
|
+
const out = [];
|
|
3390
|
+
for (const shim of Object.keys(SDK_SHIMS)) {
|
|
3391
|
+
if (!isSdkShim(shim)) continue;
|
|
3392
|
+
if (builtWithSdk === void 0 || compareSdkVersions(builtWithSdk, SDK_SHIMS[shim].below) < 0) out.push(shim);
|
|
3393
|
+
}
|
|
3394
|
+
return out;
|
|
3395
|
+
}
|
|
3396
|
+
function isSdkShim(key) {
|
|
3397
|
+
return key in SDK_SHIMS;
|
|
3398
|
+
}
|
|
3399
|
+
function sdkWindowProblem(builtWithSdk, platformSdk) {
|
|
3400
|
+
if (builtWithSdk === void 0) return null;
|
|
3401
|
+
if (compareSdkVersions(builtWithSdk, OLDEST_SUPPORTED_SDK) < 0) {
|
|
3402
|
+
return `built with @40rty/ams-sdk ${builtWithSdk}; this platform hosts ${OLDEST_SUPPORTED_SDK} to ${platformSdk} \u2014 upgrade @40rty/ams-sdk and publish again`;
|
|
3403
|
+
}
|
|
3404
|
+
if (compareSdkVersions(builtWithSdk, platformSdk) > 0) {
|
|
3405
|
+
return `built with @40rty/ams-sdk ${builtWithSdk}, newer than the ${platformSdk} this platform serves \u2014 build against ${platformSdk} or older`;
|
|
3406
|
+
}
|
|
3407
|
+
return null;
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
// ../spacestation/src/catalog/wire/package-release.ts
|
|
3304
3411
|
var RESERVED_SCOPES = ["@fourty/", "@40rty/"];
|
|
3305
3412
|
var BUNDLE_ASSET_PATH = /^assets\/[A-Za-z0-9_-]+\.(woff2?|ttf|otf|png|jpe?g|svg|gif|webp)$/;
|
|
3306
|
-
var PackageReleaseSchema =
|
|
3413
|
+
var PackageReleaseSchema = z27.object({
|
|
3307
3414
|
/** The id spaces name in `componentSources` — an npm-style package name. */
|
|
3308
|
-
sourceId:
|
|
3309
|
-
label:
|
|
3415
|
+
sourceId: z27.string().regex(/^(@[a-z0-9][a-z0-9-]*\/)?[a-z0-9][a-z0-9-]*$/, "sourceId must be an npm-style package name").refine((id) => !RESERVED_SCOPES.some((scope2) => id.startsWith(scope2)), `the ${RESERVED_SCOPES.join(" and ")} scopes are reserved`),
|
|
3416
|
+
label: z27.string().min(1).max(120),
|
|
3310
3417
|
/** The package's own version, as its repository states it — shown in the console. */
|
|
3311
|
-
version:
|
|
3418
|
+
version: z27.string().min(1).max(40),
|
|
3312
3419
|
/** What this release changed, in the publisher's words (`forty publish --message`) — shown in the console's version list. */
|
|
3313
|
-
description:
|
|
3420
|
+
description: z27.string().min(1).max(500).optional(),
|
|
3421
|
+
/**
|
|
3422
|
+
* The `@40rty/ams-sdk` version the brand project resolved when `forty
|
|
3423
|
+
* publish` built this release. A bundle takes the sdk from the page at
|
|
3424
|
+
* runtime, so this is what tells the platform which compat shims it needs
|
|
3425
|
+
* and whether it can host it at all (`sdk-compat.ts`). Absent on releases
|
|
3426
|
+
* published before the stamp existed — those are legacy.
|
|
3427
|
+
*/
|
|
3428
|
+
builtWithSdk: SdkVersionSchema.optional(),
|
|
3314
3429
|
catalog: WireCatalogSchema,
|
|
3315
3430
|
/** Component manifests by path under `catalogs/`, e.g. `catalogs/product/productGrid.md`. */
|
|
3316
|
-
manifests:
|
|
3431
|
+
manifests: z27.record(z27.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z27.string()),
|
|
3317
3432
|
/**
|
|
3318
3433
|
* The brand's components, built — present when the PLATFORM hosts this
|
|
3319
3434
|
* brand's spacefront, absent when the brand hosts it in its own app. One
|
|
@@ -3322,34 +3437,40 @@ var PackageReleaseSchema = z25.object({
|
|
|
3322
3437
|
* images — base64, keyed by the path the stylesheet's `url()` names, beside
|
|
3323
3438
|
* it). It is served to browsers; the platform's servers never run it.
|
|
3324
3439
|
*/
|
|
3325
|
-
bundle:
|
|
3326
|
-
js:
|
|
3327
|
-
css:
|
|
3328
|
-
assets:
|
|
3440
|
+
bundle: z27.object({
|
|
3441
|
+
js: z27.string().min(1),
|
|
3442
|
+
css: z27.string(),
|
|
3443
|
+
assets: z27.record(z27.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z27.string().base64()).optional()
|
|
3329
3444
|
}).strict().optional(),
|
|
3330
3445
|
/**
|
|
3331
3446
|
* The class the spacefront root carries while this package is the space's.
|
|
3332
3447
|
* The package's own stylesheet styles under it. Absent = the platform's
|
|
3333
3448
|
* default theme class.
|
|
3334
3449
|
*/
|
|
3335
|
-
theme:
|
|
3450
|
+
theme: z27.object({ themeClass: z27.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
|
|
3451
|
+
/**
|
|
3452
|
+
* The brand's mark (`brand-mark.ts`). Sent as the files themselves; the
|
|
3453
|
+
* platform stores them content-addressed at ingest and keeps only their
|
|
3454
|
+
* addresses here.
|
|
3455
|
+
*/
|
|
3456
|
+
mark: BrandMarkSchema.optional(),
|
|
3336
3457
|
/** The canvas a fresh session opens on, before the visitor has asked anything. */
|
|
3337
3458
|
seedLayout: SpecSchema.optional(),
|
|
3338
3459
|
/**
|
|
3339
3460
|
* The package's own composition guidance for its own components — prompt
|
|
3340
3461
|
* markdown the agent reads, gated on the capabilities it names (`requires`).
|
|
3341
3462
|
*/
|
|
3342
|
-
promptSections:
|
|
3463
|
+
promptSections: z27.array(z27.object({ id: z27.string().regex(/^[a-z0-9-]+$/), order: z27.number().int(), content: z27.string().min(1).max(2e4), requires: z27.array(z27.string()) }).strict()).max(10).optional(),
|
|
3343
3464
|
/**
|
|
3344
3465
|
* Opaque per-vertical extension data (`BrandDefinition.config`): the
|
|
3345
3466
|
* platform stays vertical-agnostic and the vertical's own code reads its keys.
|
|
3346
3467
|
*/
|
|
3347
|
-
config:
|
|
3468
|
+
config: z27.record(z27.string(), z27.unknown()).optional(),
|
|
3348
3469
|
/**
|
|
3349
3470
|
* Set by the platform, never by a publisher: this release is a DRAFT of the
|
|
3350
3471
|
* package `of`, previewed on the space `space`. See `draftSourceId`.
|
|
3351
3472
|
*/
|
|
3352
|
-
draft:
|
|
3473
|
+
draft: z27.object({ of: z27.string().min(1), space: z27.string().min(1) }).strict().optional()
|
|
3353
3474
|
}).strict();
|
|
3354
3475
|
var DRAFT_SEPARATOR = "--";
|
|
3355
3476
|
function draftSourceId(sourceId, spaceSlug, developer) {
|
|
@@ -3367,37 +3488,50 @@ function parseReleasePreview(id) {
|
|
|
3367
3488
|
return { sourceId: match[1], release: Number(match[2]) };
|
|
3368
3489
|
}
|
|
3369
3490
|
|
|
3491
|
+
// ../spacestation/src/catalog/wire/package-bundle-ref.ts
|
|
3492
|
+
import { z as z28 } from "zod";
|
|
3493
|
+
var PackageBundleRefSchema = z28.object({
|
|
3494
|
+
sourceId: z28.string(),
|
|
3495
|
+
js: z28.string(),
|
|
3496
|
+
css: z28.string(),
|
|
3497
|
+
/** The brand's name for itself, and its package's version. */
|
|
3498
|
+
label: z28.string(),
|
|
3499
|
+
version: z28.string(),
|
|
3500
|
+
/** The sdk the bundle was built against (`PackageRelease.builtWithSdk`) — absent for a legacy release. Picks its compat shims. */
|
|
3501
|
+
builtWithSdk: SdkVersionSchema.optional()
|
|
3502
|
+
});
|
|
3503
|
+
|
|
3370
3504
|
// ../spacestation/src/projection/projection.ts
|
|
3371
|
-
import { z as
|
|
3372
|
-
var LateBoundValueSchema =
|
|
3373
|
-
var DirectiveValueSchema =
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3505
|
+
import { z as z29 } from "zod";
|
|
3506
|
+
var LateBoundValueSchema = z29.object({ fact: z29.literal(true) });
|
|
3507
|
+
var DirectiveValueSchema = z29.union([
|
|
3508
|
+
z29.string(),
|
|
3509
|
+
z29.number(),
|
|
3510
|
+
z29.boolean(),
|
|
3377
3511
|
LateBoundValueSchema
|
|
3378
3512
|
]);
|
|
3379
3513
|
function isLateBound(v) {
|
|
3380
3514
|
return typeof v === "object" && v !== null && "fact" in v;
|
|
3381
3515
|
}
|
|
3382
|
-
var ProjectionDirectiveSchema =
|
|
3516
|
+
var ProjectionDirectiveSchema = z29.object({
|
|
3383
3517
|
/** Keep only items whose axis values all match. Keyed by axis name
|
|
3384
3518
|
* (e.g. `Size`); value is a literal or the `{fact:true}` marker. */
|
|
3385
|
-
isolateTo:
|
|
3519
|
+
isolateTo: z29.record(DirectiveValueSchema).optional(),
|
|
3386
3520
|
/** Isolate to EVERY axis the visitor has a stored fact for. The agent
|
|
3387
3521
|
* emits this (it is vertical-agnostic — it cannot name axes); the
|
|
3388
3522
|
* entity binding expands it against the entity's own axes + facts. */
|
|
3389
|
-
isolateToFacts:
|
|
3523
|
+
isolateToFacts: z29.boolean().optional(),
|
|
3390
3524
|
/** Keep only items the entity binding reports as available. */
|
|
3391
|
-
availableOnly:
|
|
3525
|
+
availableOnly: z29.boolean().optional(),
|
|
3392
3526
|
/** Cap the rendered count after filtering. */
|
|
3393
|
-
limit:
|
|
3527
|
+
limit: z29.number().int().positive().optional()
|
|
3394
3528
|
});
|
|
3395
|
-
var ProjectionPreferencesSchema =
|
|
3396
|
-
|
|
3529
|
+
var ProjectionPreferencesSchema = z29.record(
|
|
3530
|
+
z29.union([ProjectionDirectiveSchema, z29.null()])
|
|
3397
3531
|
);
|
|
3398
3532
|
var PROJECTION_SET_SIGNAL = "projection.set";
|
|
3399
|
-
var ProjectionSetPayloadSchema =
|
|
3400
|
-
setAll:
|
|
3533
|
+
var ProjectionSetPayloadSchema = z29.object({
|
|
3534
|
+
setAll: z29.union([ProjectionDirectiveSchema, z29.null()]).optional(),
|
|
3401
3535
|
set: ProjectionPreferencesSchema.optional()
|
|
3402
3536
|
});
|
|
3403
3537
|
function norm(v) {
|
|
@@ -3431,23 +3565,23 @@ function isActiveDirective(directive) {
|
|
|
3431
3565
|
}
|
|
3432
3566
|
|
|
3433
3567
|
// ../spacestation/src/focus/focus.ts
|
|
3434
|
-
import { z as
|
|
3568
|
+
import { z as z30 } from "zod";
|
|
3435
3569
|
var VIEW_FOCUS_ELEMENT_SIGNAL = "view.focus.element";
|
|
3436
|
-
var FocusElementPayloadSchema =
|
|
3437
|
-
elementId:
|
|
3570
|
+
var FocusElementPayloadSchema = z30.object({
|
|
3571
|
+
elementId: z30.string().min(1)
|
|
3438
3572
|
});
|
|
3439
3573
|
|
|
3440
3574
|
// ../spacestation/src/view/continuation.ts
|
|
3441
|
-
import { z as
|
|
3575
|
+
import { z as z31 } from "zod";
|
|
3442
3576
|
var VIEW_EXTEND_SIGNAL = "view.extend";
|
|
3443
|
-
var ViewExtendPayloadSchema =
|
|
3444
|
-
reason:
|
|
3577
|
+
var ViewExtendPayloadSchema = z31.object({
|
|
3578
|
+
reason: z31.enum(["scroll_near_bottom"])
|
|
3445
3579
|
});
|
|
3446
3580
|
var VIEW_EXHAUSTED_SIGNAL = "view.exhausted";
|
|
3447
3581
|
var CONTINUATION_ENABLED = false;
|
|
3448
3582
|
|
|
3449
3583
|
// ../spacestation/src/attachment/attachment.ts
|
|
3450
|
-
import { z as
|
|
3584
|
+
import { z as z32 } from "zod";
|
|
3451
3585
|
var ALLOWED_ATTACHMENT_TYPES = [
|
|
3452
3586
|
"image/jpeg",
|
|
3453
3587
|
"image/png",
|
|
@@ -3462,34 +3596,36 @@ function isAllowedAttachmentType(mime) {
|
|
|
3462
3596
|
function isImageAttachment(mime) {
|
|
3463
3597
|
return mime.startsWith("image/");
|
|
3464
3598
|
}
|
|
3465
|
-
var AttachmentRefSchema =
|
|
3466
|
-
|
|
3467
|
-
|
|
3599
|
+
var AttachmentRefSchema = z32.object({
|
|
3600
|
+
// A UUID, as `storeAttachment` mints it: the id becomes a storage path segment,
|
|
3601
|
+
// so nothing else — no `/`, no `..` — may reach that lookup.
|
|
3602
|
+
id: z32.string().uuid(),
|
|
3603
|
+
mimeType: z32.string().refine(isAllowedAttachmentType, {
|
|
3468
3604
|
message: "mimeType not on the attachment allow-list"
|
|
3469
3605
|
}),
|
|
3470
|
-
name:
|
|
3471
|
-
size:
|
|
3472
|
-
url:
|
|
3606
|
+
name: z32.string().min(1),
|
|
3607
|
+
size: z32.number().int().positive().max(MAX_ATTACHMENT_BYTES),
|
|
3608
|
+
url: z32.string().min(1)
|
|
3473
3609
|
});
|
|
3474
|
-
var AttachmentRefsSchema =
|
|
3610
|
+
var AttachmentRefsSchema = z32.array(AttachmentRefSchema);
|
|
3475
3611
|
|
|
3476
3612
|
// ../spacestation/src/contracts/entry-context.ts
|
|
3477
|
-
import { z as
|
|
3613
|
+
import { z as z33 } from "zod";
|
|
3478
3614
|
var ENTRY_CONTEXT_MAX_VALUE_CHARS = 200;
|
|
3479
3615
|
var ENTRY_CONTEXT_MAX_KEYS = 12;
|
|
3480
3616
|
var ENTRY_CONTEXT_MAX_NAMESPACES = 8;
|
|
3481
3617
|
var ENTRY_CONTEXT_MAX_NAME_CHARS = 64;
|
|
3482
|
-
var EntryContextValueSchema =
|
|
3483
|
-
var EntryContextNameSchema =
|
|
3484
|
-
var EntryContextNamespaceSchema =
|
|
3618
|
+
var EntryContextValueSchema = z33.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
|
|
3619
|
+
var EntryContextNameSchema = z33.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
|
|
3620
|
+
var EntryContextNamespaceSchema = z33.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries3) => Object.keys(entries3).length <= ENTRY_CONTEXT_MAX_KEYS, {
|
|
3485
3621
|
message: `at most ${ENTRY_CONTEXT_MAX_KEYS} entries per namespace`
|
|
3486
3622
|
});
|
|
3487
|
-
var EntryContextSchema =
|
|
3623
|
+
var EntryContextSchema = z33.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
|
|
3488
3624
|
message: `at most ${ENTRY_CONTEXT_MAX_NAMESPACES} entry-context namespaces`
|
|
3489
3625
|
});
|
|
3490
3626
|
|
|
3491
3627
|
// ../spacestation/src/contracts/session-arrival.ts
|
|
3492
|
-
import { z as
|
|
3628
|
+
import { z as z34 } from "zod";
|
|
3493
3629
|
var SURFACES = [
|
|
3494
3630
|
"spacefront",
|
|
3495
3631
|
"embed",
|
|
@@ -3499,11 +3635,11 @@ var SURFACES = [
|
|
|
3499
3635
|
"playground",
|
|
3500
3636
|
"automation"
|
|
3501
3637
|
];
|
|
3502
|
-
var SurfaceSchema =
|
|
3638
|
+
var SurfaceSchema = z34.enum(SURFACES);
|
|
3503
3639
|
var CLICK_ID_KINDS = ["gclid", "fbclid", "msclkid", "wbraid", "gbraid"];
|
|
3504
|
-
var ClickIdKindSchema =
|
|
3640
|
+
var ClickIdKindSchema = z34.enum(CLICK_ID_KINDS);
|
|
3505
3641
|
var VISITOR_ID_DURABILITIES = ["persisted", "ephemeral", "host_supplied"];
|
|
3506
|
-
var VisitorIdDurabilitySchema =
|
|
3642
|
+
var VisitorIdDurabilitySchema = z34.enum(VISITOR_ID_DURABILITIES);
|
|
3507
3643
|
var TRAFFIC_BUCKETS = [
|
|
3508
3644
|
"paid_google",
|
|
3509
3645
|
"paid_meta",
|
|
@@ -3515,10 +3651,10 @@ var TRAFFIC_BUCKETS = [
|
|
|
3515
3651
|
"direct",
|
|
3516
3652
|
"unknown"
|
|
3517
3653
|
];
|
|
3518
|
-
var TrafficBucketSchema =
|
|
3654
|
+
var TrafficBucketSchema = z34.enum(TRAFFIC_BUCKETS);
|
|
3519
3655
|
var ARRIVAL_MAX_VALUE_CHARS = 200;
|
|
3520
|
-
var ArrivalValueSchema =
|
|
3521
|
-
var SessionArrivalSchema =
|
|
3656
|
+
var ArrivalValueSchema = z34.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
|
|
3657
|
+
var SessionArrivalSchema = z34.object({
|
|
3522
3658
|
utmSource: ArrivalValueSchema.optional(),
|
|
3523
3659
|
utmMedium: ArrivalValueSchema.optional(),
|
|
3524
3660
|
utmCampaign: ArrivalValueSchema.optional(),
|
|
@@ -3604,37 +3740,46 @@ function arrivalToParams(arrival, into) {
|
|
|
3604
3740
|
if (arrival.visitorIdDurability !== void 0) into.set("visitorIdDurability", arrival.visitorIdDurability);
|
|
3605
3741
|
}
|
|
3606
3742
|
|
|
3743
|
+
// ../spacestation/src/contracts/socket-ticket-param.ts
|
|
3744
|
+
var SOCKET_TICKET_PARAM = "ticket";
|
|
3745
|
+
|
|
3746
|
+
// ../spacestation/src/contracts/wire-protocol.ts
|
|
3747
|
+
var WIRE_PROTOCOL_VERSION = 1;
|
|
3748
|
+
var MIN_WIRE_PROTOCOL_VERSION = 1;
|
|
3749
|
+
var WIRE_PROTOCOL_PARAM = "protocol";
|
|
3750
|
+
var WIRE_PROTOCOL_UNSUPPORTED_CLOSE = 4426;
|
|
3751
|
+
|
|
3607
3752
|
// ../spacestation/src/catalog/attribute-registry.ts
|
|
3608
|
-
import { z as
|
|
3609
|
-
var AttributeScopeBucketSchema =
|
|
3610
|
-
scope:
|
|
3611
|
-
needles:
|
|
3612
|
-
label:
|
|
3753
|
+
import { z as z35 } from "zod";
|
|
3754
|
+
var AttributeScopeBucketSchema = z35.object({
|
|
3755
|
+
scope: z35.string(),
|
|
3756
|
+
needles: z35.array(z35.string()).readonly(),
|
|
3757
|
+
label: z35.string().optional()
|
|
3613
3758
|
});
|
|
3614
|
-
var AttributeScopeConfigSchema =
|
|
3615
|
-
facet:
|
|
3616
|
-
buckets:
|
|
3617
|
-
emptyScope:
|
|
3618
|
-
noMatchScope:
|
|
3619
|
-
ignoreValues:
|
|
3620
|
-
emptyScopeLabel:
|
|
3621
|
-
noMatchScopeLabel:
|
|
3759
|
+
var AttributeScopeConfigSchema = z35.object({
|
|
3760
|
+
facet: z35.string(),
|
|
3761
|
+
buckets: z35.array(AttributeScopeBucketSchema).readonly(),
|
|
3762
|
+
emptyScope: z35.string(),
|
|
3763
|
+
noMatchScope: z35.string(),
|
|
3764
|
+
ignoreValues: z35.array(z35.string()).readonly(),
|
|
3765
|
+
emptyScopeLabel: z35.string().optional(),
|
|
3766
|
+
noMatchScopeLabel: z35.string().optional()
|
|
3622
3767
|
});
|
|
3623
|
-
var AttributeDefBaseSchema =
|
|
3624
|
-
description:
|
|
3625
|
-
durable:
|
|
3626
|
-
label:
|
|
3768
|
+
var AttributeDefBaseSchema = z35.object({
|
|
3769
|
+
description: z35.string().optional(),
|
|
3770
|
+
durable: z35.boolean().optional(),
|
|
3771
|
+
label: z35.string().optional()
|
|
3627
3772
|
});
|
|
3628
|
-
var AttributeDefSchema =
|
|
3629
|
-
AttributeDefBaseSchema.extend({ kind:
|
|
3630
|
-
AttributeDefBaseSchema.extend({ kind:
|
|
3631
|
-
AttributeDefBaseSchema.extend({ kind:
|
|
3632
|
-
AttributeDefBaseSchema.extend({ kind:
|
|
3773
|
+
var AttributeDefSchema = z35.discriminatedUnion("kind", [
|
|
3774
|
+
AttributeDefBaseSchema.extend({ kind: z35.literal("enum"), values: z35.array(z35.string()) }),
|
|
3775
|
+
AttributeDefBaseSchema.extend({ kind: z35.literal("free_text") }),
|
|
3776
|
+
AttributeDefBaseSchema.extend({ kind: z35.literal("date_or_season") }),
|
|
3777
|
+
AttributeDefBaseSchema.extend({ kind: z35.literal("money_or_band") }),
|
|
3633
3778
|
AttributeDefBaseSchema.extend({
|
|
3634
|
-
kind:
|
|
3635
|
-
min:
|
|
3636
|
-
max:
|
|
3637
|
-
unit:
|
|
3779
|
+
kind: z35.literal("number"),
|
|
3780
|
+
min: z35.number().optional(),
|
|
3781
|
+
max: z35.number().optional(),
|
|
3782
|
+
unit: z35.string().optional()
|
|
3638
3783
|
})
|
|
3639
3784
|
]);
|
|
3640
3785
|
var EXTRAS_PREFIX = "extras.";
|
|
@@ -3734,30 +3879,30 @@ function hostingAllows(hosting, surface) {
|
|
|
3734
3879
|
}
|
|
3735
3880
|
|
|
3736
3881
|
// ../spacestation/src/space/trace.ts
|
|
3737
|
-
import { z as
|
|
3738
|
-
var RunTokenUsageSchema =
|
|
3739
|
-
input_tokens:
|
|
3740
|
-
output_tokens:
|
|
3741
|
-
cache_read_tokens:
|
|
3882
|
+
import { z as z36 } from "zod";
|
|
3883
|
+
var RunTokenUsageSchema = z36.object({
|
|
3884
|
+
input_tokens: z36.number().optional(),
|
|
3885
|
+
output_tokens: z36.number().optional(),
|
|
3886
|
+
cache_read_tokens: z36.number().optional()
|
|
3742
3887
|
});
|
|
3743
|
-
var TraceRecordSchema =
|
|
3744
|
-
id:
|
|
3745
|
-
spaceId:
|
|
3746
|
-
sessionId:
|
|
3888
|
+
var TraceRecordSchema = z36.object({
|
|
3889
|
+
id: z36.string().uuid(),
|
|
3890
|
+
spaceId: z36.string().uuid().nullable(),
|
|
3891
|
+
sessionId: z36.string(),
|
|
3747
3892
|
/** OTP-verified visitor email the session was unlocked with, or `null`
|
|
3748
3893
|
* for an unlocked space / anonymous unlock. */
|
|
3749
|
-
visitorEmail:
|
|
3750
|
-
userPrompt:
|
|
3751
|
-
branch:
|
|
3752
|
-
responseText:
|
|
3753
|
-
layout:
|
|
3754
|
-
phaseTimings:
|
|
3755
|
-
tokensByModel:
|
|
3756
|
-
toolCalls:
|
|
3757
|
-
diagnostics:
|
|
3758
|
-
latencyFirstText:
|
|
3759
|
-
latencyFirstPatch:
|
|
3760
|
-
latencyTotal:
|
|
3894
|
+
visitorEmail: z36.string().nullable(),
|
|
3895
|
+
userPrompt: z36.string(),
|
|
3896
|
+
branch: z36.string().nullable(),
|
|
3897
|
+
responseText: z36.string().nullable(),
|
|
3898
|
+
layout: z36.unknown().nullable(),
|
|
3899
|
+
phaseTimings: z36.record(z36.number()).nullable(),
|
|
3900
|
+
tokensByModel: z36.record(RunTokenUsageSchema).nullable(),
|
|
3901
|
+
toolCalls: z36.array(z36.unknown()).nullable(),
|
|
3902
|
+
diagnostics: z36.array(z36.unknown()).nullable(),
|
|
3903
|
+
latencyFirstText: z36.number().int().nullable(),
|
|
3904
|
+
latencyFirstPatch: z36.number().int().nullable(),
|
|
3905
|
+
latencyTotal: z36.number().int().nullable(),
|
|
3761
3906
|
/**
|
|
3762
3907
|
* The CLIENT's turn id for this run, or `null`.
|
|
3763
3908
|
*
|
|
@@ -3773,29 +3918,29 @@ var TraceRecordSchema = z33.object({
|
|
|
3773
3918
|
* a turn whose ack the client never saw — none of which is evidence that a
|
|
3774
3919
|
* visitor asked something and got nothing.
|
|
3775
3920
|
*/
|
|
3776
|
-
turnId:
|
|
3921
|
+
turnId: z36.string().nullable(),
|
|
3777
3922
|
/** Serialized `TraceTracker.exportState()` payload (parsed object) —
|
|
3778
3923
|
* lets the inspector rehydrate this run verbatim after a reload. */
|
|
3779
|
-
trackerState:
|
|
3780
|
-
createdAt:
|
|
3924
|
+
trackerState: z36.unknown().nullable(),
|
|
3925
|
+
createdAt: z36.string()
|
|
3781
3926
|
});
|
|
3782
|
-
var MillisecondsSchema =
|
|
3783
|
-
var CreateTraceInputSchema =
|
|
3784
|
-
spaceId:
|
|
3785
|
-
sessionId:
|
|
3786
|
-
visitorEmail:
|
|
3787
|
-
userPrompt:
|
|
3788
|
-
branch:
|
|
3789
|
-
responseText:
|
|
3790
|
-
layout:
|
|
3791
|
-
phaseTimings:
|
|
3792
|
-
tokensByModel:
|
|
3793
|
-
toolCalls:
|
|
3794
|
-
diagnostics:
|
|
3927
|
+
var MillisecondsSchema = z36.number().nullable().transform((v) => v === null ? null : Math.round(v));
|
|
3928
|
+
var CreateTraceInputSchema = z36.object({
|
|
3929
|
+
spaceId: z36.string().uuid().nullable(),
|
|
3930
|
+
sessionId: z36.string(),
|
|
3931
|
+
visitorEmail: z36.string().nullable(),
|
|
3932
|
+
userPrompt: z36.string(),
|
|
3933
|
+
branch: z36.string().nullable(),
|
|
3934
|
+
responseText: z36.string().nullable(),
|
|
3935
|
+
layout: z36.unknown().nullable(),
|
|
3936
|
+
phaseTimings: z36.record(z36.number()).nullable(),
|
|
3937
|
+
tokensByModel: z36.record(RunTokenUsageSchema).nullable(),
|
|
3938
|
+
toolCalls: z36.array(z36.unknown()).nullable(),
|
|
3939
|
+
diagnostics: z36.array(z36.unknown()).nullable(),
|
|
3795
3940
|
latencyFirstText: MillisecondsSchema,
|
|
3796
3941
|
latencyFirstPatch: MillisecondsSchema,
|
|
3797
3942
|
latencyTotal: MillisecondsSchema,
|
|
3798
|
-
trackerState:
|
|
3943
|
+
trackerState: z36.unknown().nullable(),
|
|
3799
3944
|
/**
|
|
3800
3945
|
* The CLIENT's turn id for this run, or `null`.
|
|
3801
3946
|
*
|
|
@@ -3811,37 +3956,37 @@ var CreateTraceInputSchema = z33.object({
|
|
|
3811
3956
|
* a turn whose ack the client never saw — none of which is evidence that a
|
|
3812
3957
|
* visitor asked something and got nothing.
|
|
3813
3958
|
*/
|
|
3814
|
-
turnId:
|
|
3959
|
+
turnId: z36.string().nullable()
|
|
3815
3960
|
});
|
|
3816
|
-
var AgentSessionSummarySchema =
|
|
3817
|
-
sessionId:
|
|
3961
|
+
var AgentSessionSummarySchema = z36.object({
|
|
3962
|
+
sessionId: z36.string(),
|
|
3818
3963
|
/** Turn rows only; background/secondary runs are excluded by the aggregate. */
|
|
3819
|
-
turnCount:
|
|
3964
|
+
turnCount: z36.number().int(),
|
|
3820
3965
|
/** The session's opening prompt — titles the row in the UI. */
|
|
3821
|
-
firstPrompt:
|
|
3822
|
-
startedAt:
|
|
3823
|
-
lastRunAt:
|
|
3966
|
+
firstPrompt: z36.string(),
|
|
3967
|
+
startedAt: z36.string(),
|
|
3968
|
+
lastRunAt: z36.string(),
|
|
3824
3969
|
/** Summed `latency_total` across the session's turns. */
|
|
3825
|
-
totalLatencyMs:
|
|
3970
|
+
totalLatencyMs: z36.number().int()
|
|
3826
3971
|
});
|
|
3827
|
-
var SessionTurnSchema =
|
|
3828
|
-
id:
|
|
3829
|
-
userPrompt:
|
|
3830
|
-
responseText:
|
|
3972
|
+
var SessionTurnSchema = z36.object({
|
|
3973
|
+
id: z36.string().uuid(),
|
|
3974
|
+
userPrompt: z36.string(),
|
|
3975
|
+
responseText: z36.string().nullable(),
|
|
3831
3976
|
/** Full cumulative Spec committed by this turn — never a patch delta. */
|
|
3832
|
-
layout:
|
|
3833
|
-
createdAt:
|
|
3834
|
-
latencyTotal:
|
|
3835
|
-
phaseTimings:
|
|
3836
|
-
tokensByModel:
|
|
3837
|
-
input_tokens:
|
|
3838
|
-
output_tokens:
|
|
3977
|
+
layout: z36.unknown().nullable(),
|
|
3978
|
+
createdAt: z36.string(),
|
|
3979
|
+
latencyTotal: z36.number().int().nullable(),
|
|
3980
|
+
phaseTimings: z36.record(z36.number()).nullable(),
|
|
3981
|
+
tokensByModel: z36.record(z36.object({
|
|
3982
|
+
input_tokens: z36.number().optional(),
|
|
3983
|
+
output_tokens: z36.number().optional()
|
|
3839
3984
|
})).nullable(),
|
|
3840
|
-
toolCalls:
|
|
3841
|
-
diagnostics:
|
|
3985
|
+
toolCalls: z36.array(z36.unknown()).nullable(),
|
|
3986
|
+
diagnostics: z36.array(z36.unknown()).nullable()
|
|
3842
3987
|
});
|
|
3843
|
-
var SessionReplaySchema =
|
|
3844
|
-
turns:
|
|
3988
|
+
var SessionReplaySchema = z36.object({
|
|
3989
|
+
turns: z36.array(SessionTurnSchema),
|
|
3845
3990
|
/**
|
|
3846
3991
|
* The session's own last-committed layout, read straight off the durable
|
|
3847
3992
|
* session record (`sessions.blob.layout`) rather than derived from `turns`.
|
|
@@ -3852,20 +3997,20 @@ var SessionReplaySchema = z33.object({
|
|
|
3852
3997
|
* a perfectly real layout; only this field can show it. Null exclusively
|
|
3853
3998
|
* when the durable session row itself could not be read.
|
|
3854
3999
|
*/
|
|
3855
|
-
sessionLayout:
|
|
4000
|
+
sessionLayout: z36.record(z36.string(), z36.unknown()).nullable()
|
|
3856
4001
|
});
|
|
3857
|
-
var SessionTraceSchema =
|
|
3858
|
-
trackerState:
|
|
4002
|
+
var SessionTraceSchema = z36.object({
|
|
4003
|
+
trackerState: z36.string().nullable()
|
|
3859
4004
|
});
|
|
3860
|
-
var LlmUsageDailySchema =
|
|
3861
|
-
day:
|
|
4005
|
+
var LlmUsageDailySchema = z36.object({
|
|
4006
|
+
day: z36.string(),
|
|
3862
4007
|
/** Deployment that made the call — 'production', 'staging', 'pr-123', 'development'. */
|
|
3863
|
-
environment:
|
|
3864
|
-
feature:
|
|
3865
|
-
model:
|
|
3866
|
-
provider:
|
|
4008
|
+
environment: z36.string(),
|
|
4009
|
+
feature: z36.string(),
|
|
4010
|
+
model: z36.string(),
|
|
4011
|
+
provider: z36.string(),
|
|
3867
4012
|
/** Masked tail of the key actually billed, or null when unknown/non-Google. */
|
|
3868
|
-
keyFingerprint:
|
|
4013
|
+
keyFingerprint: z36.string().nullable(),
|
|
3869
4014
|
/**
|
|
3870
4015
|
* The space the call served, or null when it served none.
|
|
3871
4016
|
*
|
|
@@ -3874,91 +4019,91 @@ var LlmUsageDailySchema = z33.object({
|
|
|
3874
4019
|
* report that share rather than dropping it, or a per-space total reads as
|
|
3875
4020
|
* the platform total.
|
|
3876
4021
|
*/
|
|
3877
|
-
spaceId:
|
|
4022
|
+
spaceId: z36.string().nullable(),
|
|
3878
4023
|
/**
|
|
3879
4024
|
* The surface of the session the call served (`sessions.surface`), or null
|
|
3880
4025
|
* when it served no session or the session predates surface recording.
|
|
3881
4026
|
* `automation` is the eval harness — the signal that files an ordinary
|
|
3882
4027
|
* `agent-turn` as testing spend rather than as a visitor's.
|
|
3883
4028
|
*/
|
|
3884
|
-
surface:
|
|
3885
|
-
inputTokens:
|
|
3886
|
-
outputTokens:
|
|
4029
|
+
surface: z36.string().nullable(),
|
|
4030
|
+
inputTokens: z36.number(),
|
|
4031
|
+
outputTokens: z36.number(),
|
|
3887
4032
|
/** Subset of inputTokens, never additional to it. */
|
|
3888
|
-
cachedInputTokens:
|
|
3889
|
-
reasoningTokens:
|
|
3890
|
-
callCount:
|
|
3891
|
-
errorCount:
|
|
3892
|
-
estimatedCostUsd:
|
|
4033
|
+
cachedInputTokens: z36.number(),
|
|
4034
|
+
reasoningTokens: z36.number(),
|
|
4035
|
+
callCount: z36.number(),
|
|
4036
|
+
errorCount: z36.number(),
|
|
4037
|
+
estimatedCostUsd: z36.number().nullable()
|
|
3893
4038
|
});
|
|
3894
|
-
var LlmUsageBySessionSchema =
|
|
3895
|
-
sessionId:
|
|
3896
|
-
environment:
|
|
3897
|
-
model:
|
|
4039
|
+
var LlmUsageBySessionSchema = z36.object({
|
|
4040
|
+
sessionId: z36.string(),
|
|
4041
|
+
environment: z36.string(),
|
|
4042
|
+
model: z36.string(),
|
|
3898
4043
|
/** The space this session belongs to, or null for a session with no space. */
|
|
3899
|
-
spaceId:
|
|
4044
|
+
spaceId: z36.string().nullable(),
|
|
3900
4045
|
/** The session's surface — see `LlmUsageDailySchema.surface`. */
|
|
3901
|
-
surface:
|
|
4046
|
+
surface: z36.string().nullable(),
|
|
3902
4047
|
/** Label only — the first feature seen in the session. */
|
|
3903
|
-
firstFeature:
|
|
3904
|
-
startedAt:
|
|
3905
|
-
endedAt:
|
|
3906
|
-
inputTokens:
|
|
3907
|
-
outputTokens:
|
|
3908
|
-
cachedInputTokens:
|
|
3909
|
-
reasoningTokens:
|
|
3910
|
-
callCount:
|
|
3911
|
-
errorCount:
|
|
4048
|
+
firstFeature: z36.string(),
|
|
4049
|
+
startedAt: z36.string(),
|
|
4050
|
+
endedAt: z36.string(),
|
|
4051
|
+
inputTokens: z36.number(),
|
|
4052
|
+
outputTokens: z36.number(),
|
|
4053
|
+
cachedInputTokens: z36.number(),
|
|
4054
|
+
reasoningTokens: z36.number(),
|
|
4055
|
+
callCount: z36.number(),
|
|
4056
|
+
errorCount: z36.number(),
|
|
3912
4057
|
/** Priced server-side, like the daily rollup — the browser never carries a
|
|
3913
4058
|
* rate table, so there is exactly one place a price can be wrong. Null when
|
|
3914
4059
|
* the model is unpriced; never 0, which would read as free. */
|
|
3915
|
-
estimatedCostUsd:
|
|
4060
|
+
estimatedCostUsd: z36.number().nullable()
|
|
3916
4061
|
});
|
|
3917
|
-
var LlmSessionsDailySchema =
|
|
3918
|
-
day:
|
|
3919
|
-
environment:
|
|
3920
|
-
sessionCount:
|
|
4062
|
+
var LlmSessionsDailySchema = z36.object({
|
|
4063
|
+
day: z36.string(),
|
|
4064
|
+
environment: z36.string(),
|
|
4065
|
+
sessionCount: z36.number()
|
|
3921
4066
|
});
|
|
3922
4067
|
|
|
3923
4068
|
// ../spacestation/src/space/session-queue.ts
|
|
3924
|
-
import { z as
|
|
4069
|
+
import { z as z38 } from "zod";
|
|
3925
4070
|
|
|
3926
4071
|
// ../spacestation/src/space/session-activity.ts
|
|
3927
|
-
import { z as
|
|
3928
|
-
var SessionActivityEventSchema =
|
|
3929
|
-
id:
|
|
3930
|
-
kind:
|
|
3931
|
-
occurredAt:
|
|
3932
|
-
source:
|
|
3933
|
-
surface:
|
|
3934
|
-
payload:
|
|
4072
|
+
import { z as z37 } from "zod";
|
|
4073
|
+
var SessionActivityEventSchema = z37.object({
|
|
4074
|
+
id: z37.string(),
|
|
4075
|
+
kind: z37.string(),
|
|
4076
|
+
occurredAt: z37.string(),
|
|
4077
|
+
source: z37.string(),
|
|
4078
|
+
surface: z37.string(),
|
|
4079
|
+
payload: z37.record(z37.unknown())
|
|
3935
4080
|
});
|
|
3936
|
-
var SessionActivitySchema =
|
|
3937
|
-
events:
|
|
3938
|
-
hasMore:
|
|
4081
|
+
var SessionActivitySchema = z37.object({
|
|
4082
|
+
events: z37.array(SessionActivityEventSchema),
|
|
4083
|
+
hasMore: z37.boolean()
|
|
3939
4084
|
});
|
|
3940
4085
|
|
|
3941
4086
|
// ../spacestation/src/space/session-queue.ts
|
|
3942
|
-
var SessionVerdictSchema =
|
|
3943
|
-
var RecordableVerdictSchema =
|
|
3944
|
-
var SessionReviewEventSchema =
|
|
3945
|
-
id:
|
|
4087
|
+
var SessionVerdictSchema = z38.enum(["unreviewed", "viewed", "bug"]);
|
|
4088
|
+
var RecordableVerdictSchema = z38.enum(["viewed", "bug"]);
|
|
4089
|
+
var SessionReviewEventSchema = z38.object({
|
|
4090
|
+
id: z38.string().uuid(),
|
|
3946
4091
|
verdict: RecordableVerdictSchema,
|
|
3947
4092
|
/** Account email of the operator who judged it. Attribution is the reason the
|
|
3948
4093
|
* log is append-only rather than a mutable current-state row. */
|
|
3949
|
-
reviewer:
|
|
3950
|
-
note:
|
|
3951
|
-
createdAt:
|
|
4094
|
+
reviewer: z38.string(),
|
|
4095
|
+
note: z38.string().nullable(),
|
|
4096
|
+
createdAt: z38.string()
|
|
3952
4097
|
});
|
|
3953
|
-
var BugSeveritySchema =
|
|
3954
|
-
var BugLocationSchema =
|
|
3955
|
-
elementId:
|
|
4098
|
+
var BugSeveritySchema = z38.enum(["high", "medium", "low"]);
|
|
4099
|
+
var BugLocationSchema = z38.object({
|
|
4100
|
+
elementId: z38.string().nullable(),
|
|
3956
4101
|
/** Display only — the catalog component type, e.g. "productGrid". Null
|
|
3957
4102
|
* alongside a null `elementId`. */
|
|
3958
|
-
elementType:
|
|
4103
|
+
elementType: z38.string().nullable(),
|
|
3959
4104
|
/** Fraction of the ELEMENT's own box. Null for a page anchor. */
|
|
3960
|
-
offsetXPct:
|
|
3961
|
-
offsetYPct:
|
|
4105
|
+
offsetXPct: z38.number().min(0).max(100).nullable(),
|
|
4106
|
+
offsetYPct: z38.number().min(0).max(100).nullable(),
|
|
3962
4107
|
/**
|
|
3963
4108
|
* ABSOLUTE document pixels, for a pin with no element under it. Null for an
|
|
3964
4109
|
* element anchor.
|
|
@@ -3969,8 +4114,8 @@ var BugLocationSchema = z35.object({
|
|
|
3969
4114
|
* on the page with it. Measured before this was fixed: growing the page 9%
|
|
3970
4115
|
* slid a pin 32px, so a pin ran away from the cursor reaching for it.
|
|
3971
4116
|
*/
|
|
3972
|
-
pageX:
|
|
3973
|
-
pageY:
|
|
4117
|
+
pageX: z38.number().nullable(),
|
|
4118
|
+
pageY: z38.number().nullable()
|
|
3974
4119
|
}).refine(
|
|
3975
4120
|
(loc) => {
|
|
3976
4121
|
const hasOffsets = loc.offsetXPct !== null && loc.offsetYPct !== null;
|
|
@@ -3984,24 +4129,24 @@ var BugLocationSchema = z35.object({
|
|
|
3984
4129
|
message: "location must be one complete anchor: an element (elementId + elementType + both offsets), a page position (pageX + pageY), or a legacy page fraction (both offsets)"
|
|
3985
4130
|
}
|
|
3986
4131
|
);
|
|
3987
|
-
var SessionBugSchema =
|
|
3988
|
-
id:
|
|
4132
|
+
var SessionBugSchema = z38.object({
|
|
4133
|
+
id: z38.string().uuid(),
|
|
3989
4134
|
/** 1-based turn the fault was observed on; null when the fault is session-wide. */
|
|
3990
|
-
turnIndex:
|
|
4135
|
+
turnIndex: z38.number().int().nullable(),
|
|
3991
4136
|
/** Where on that turn's canvas the pin was dropped; null for a bug filed
|
|
3992
4137
|
* without pinning a spot. */
|
|
3993
4138
|
location: BugLocationSchema.nullable(),
|
|
3994
|
-
provider:
|
|
3995
|
-
issueKey:
|
|
3996
|
-
issueUrl:
|
|
4139
|
+
provider: z38.string(),
|
|
4140
|
+
issueKey: z38.string().nullable(),
|
|
4141
|
+
issueUrl: z38.string().nullable(),
|
|
3997
4142
|
/** The tracker's own state word ('Todo', 'Done', …) — their vocabulary, so
|
|
3998
4143
|
* open text. Null until first synced. */
|
|
3999
|
-
issueState:
|
|
4000
|
-
title:
|
|
4001
|
-
body:
|
|
4144
|
+
issueState: z38.string().nullable(),
|
|
4145
|
+
title: z38.string(),
|
|
4146
|
+
body: z38.string(),
|
|
4002
4147
|
severity: BugSeveritySchema,
|
|
4003
|
-
createdBy:
|
|
4004
|
-
createdAt:
|
|
4148
|
+
createdBy: z38.string(),
|
|
4149
|
+
createdAt: z38.string(),
|
|
4005
4150
|
/**
|
|
4006
4151
|
* When this bug was resolved from the console; null means still OPEN.
|
|
4007
4152
|
*
|
|
@@ -4010,60 +4155,60 @@ var SessionBugSchema = z35.object({
|
|
|
4010
4155
|
* whether a particular fault is still live. The timestamp IS the state, so
|
|
4011
4156
|
* no boolean can contradict it.
|
|
4012
4157
|
*/
|
|
4013
|
-
resolvedAt:
|
|
4014
|
-
resolvedBy:
|
|
4158
|
+
resolvedAt: z38.string().nullable(),
|
|
4159
|
+
resolvedBy: z38.string().nullable()
|
|
4015
4160
|
});
|
|
4016
|
-
var SpaceBugSchema = SessionBugSchema.extend({ sessionId:
|
|
4017
|
-
var SessionCommentSchema =
|
|
4018
|
-
id:
|
|
4161
|
+
var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z38.string() });
|
|
4162
|
+
var SessionCommentSchema = z38.object({
|
|
4163
|
+
id: z38.string().uuid(),
|
|
4019
4164
|
/** Set = a reply in that bug's thread. Null = a standalone comment pin. */
|
|
4020
|
-
bugId:
|
|
4165
|
+
bugId: z38.string().uuid().nullable(),
|
|
4021
4166
|
/** 1-based turn the comment was left on; null for a reply (it reads its
|
|
4022
4167
|
* parent bug's turn). */
|
|
4023
|
-
turnIndex:
|
|
4168
|
+
turnIndex: z38.number().int().nullable(),
|
|
4024
4169
|
/** The canvas anchor for a STANDALONE comment's own pin; null for a reply. */
|
|
4025
4170
|
location: BugLocationSchema.nullable(),
|
|
4026
|
-
body:
|
|
4027
|
-
createdBy:
|
|
4028
|
-
createdAt:
|
|
4171
|
+
body: z38.string(),
|
|
4172
|
+
createdBy: z38.string(),
|
|
4173
|
+
createdAt: z38.string()
|
|
4029
4174
|
});
|
|
4030
|
-
var CreateCommentInputSchema =
|
|
4031
|
-
bugId:
|
|
4032
|
-
turnIndex:
|
|
4175
|
+
var CreateCommentInputSchema = z38.object({
|
|
4176
|
+
bugId: z38.string().uuid().nullable(),
|
|
4177
|
+
turnIndex: z38.number().int().positive().nullable(),
|
|
4033
4178
|
location: BugLocationSchema.nullable(),
|
|
4034
4179
|
// Trimmed, so whitespace is not content: `.min(1)` alone accepted a comment
|
|
4035
4180
|
// of three spaces, which renders as an empty bubble nobody can interpret.
|
|
4036
|
-
body:
|
|
4181
|
+
body: z38.string().trim().min(1)
|
|
4037
4182
|
}).refine((input) => input.bugId === null !== (input.location === null), {
|
|
4038
4183
|
message: "a comment is either a reply (bugId, no location) or a standalone pin (location, no bugId)"
|
|
4039
4184
|
});
|
|
4040
|
-
var UpdateCommentInputSchema =
|
|
4041
|
-
body:
|
|
4042
|
-
bugId:
|
|
4185
|
+
var UpdateCommentInputSchema = z38.object({
|
|
4186
|
+
body: z38.string().trim().min(1).optional(),
|
|
4187
|
+
bugId: z38.string().uuid().nullable().optional(),
|
|
4043
4188
|
location: BugLocationSchema.nullable().optional()
|
|
4044
4189
|
});
|
|
4045
4190
|
var MOBILE_VIEWPORT_MAX = 720;
|
|
4046
|
-
var SessionFormFactorSchema =
|
|
4191
|
+
var SessionFormFactorSchema = z38.enum(["mobile", "desktop"]).nullable();
|
|
4047
4192
|
function formFactorFromViewport(width) {
|
|
4048
4193
|
if (width === null) return null;
|
|
4049
4194
|
return width <= MOBILE_VIEWPORT_MAX ? "mobile" : "desktop";
|
|
4050
4195
|
}
|
|
4051
|
-
var SessionSummarySchema =
|
|
4052
|
-
sessionId:
|
|
4196
|
+
var SessionSummarySchema = z38.object({
|
|
4197
|
+
sessionId: z38.string(),
|
|
4053
4198
|
/** Stable per-browser id — the join key across a visitor's sessions. Null when
|
|
4054
4199
|
* the session row is gone (pruned) or predates the `sessions` table. */
|
|
4055
|
-
visitorId:
|
|
4200
|
+
visitorId: z38.string().nullable(),
|
|
4056
4201
|
/** Provider-qualified identity anchor, present only once the visitor
|
|
4057
4202
|
* identified themselves. Both null together means "not identified yet". */
|
|
4058
|
-
identityProvider:
|
|
4059
|
-
identityKey:
|
|
4203
|
+
identityProvider: z38.string().nullable(),
|
|
4204
|
+
identityKey: z38.string().nullable(),
|
|
4060
4205
|
/** Team/test traffic. The queue hides these by default. */
|
|
4061
|
-
isInternal:
|
|
4206
|
+
isInternal: z38.boolean(),
|
|
4062
4207
|
/** Build that served the session. Null = not captured; a version filter must
|
|
4063
4208
|
* therefore EXCLUDE it rather than let it match an arbitrary bucket. */
|
|
4064
|
-
clientVersion:
|
|
4209
|
+
clientVersion: z38.string().nullable(),
|
|
4065
4210
|
/** Commit-shaped interaction signals, counted, keyed by open `SignalType`. */
|
|
4066
|
-
signalCounts:
|
|
4211
|
+
signalCounts: z38.record(z38.number()),
|
|
4067
4212
|
/**
|
|
4068
4213
|
* Did this conversation ACQUIRE anything, and how many times?
|
|
4069
4214
|
*
|
|
@@ -4080,7 +4225,7 @@ var SessionSummarySchema = z35.object({
|
|
|
4080
4225
|
* predates the column — and renders as no mark at all. It never means zero:
|
|
4081
4226
|
* zero is a real, recorded answer and the rail reports it as one.
|
|
4082
4227
|
*/
|
|
4083
|
-
conversionAttempts:
|
|
4228
|
+
conversionAttempts: z38.number().int().nullable(),
|
|
4084
4229
|
/**
|
|
4085
4230
|
* The same attempts split by EVENT KIND, keyed by the kind's own name
|
|
4086
4231
|
* (`commerce.cart_line_added`, `commerce.registry_clicked`), counted distinct
|
|
@@ -4096,7 +4241,7 @@ var SessionSummarySchema = z35.object({
|
|
|
4096
4241
|
* kinds together, and one attempt id appearing under both would be counted
|
|
4097
4242
|
* once there and twice here.
|
|
4098
4243
|
*/
|
|
4099
|
-
conversionKinds:
|
|
4244
|
+
conversionKinds: z38.record(z38.number()),
|
|
4100
4245
|
/**
|
|
4101
4246
|
* Every analytics funnel step this session reached, in funnel order — the
|
|
4102
4247
|
* dashboard's own step ids, read by the same per-step predicates, so a queue
|
|
@@ -4104,20 +4249,20 @@ var SessionSummarySchema = z35.object({
|
|
|
4104
4249
|
* set of strings for the reason `conversionKinds` is: the contract does not
|
|
4105
4250
|
* learn what a step means. Empty only when read from a pre-column database.
|
|
4106
4251
|
*/
|
|
4107
|
-
funnelSteps:
|
|
4252
|
+
funnelSteps: z38.array(z38.string()),
|
|
4108
4253
|
/**
|
|
4109
4254
|
* The connector's opaque handle for what this session produced in its back
|
|
4110
4255
|
* office — present only once a checkout actually reached the platform. The
|
|
4111
4256
|
* console hands it to the back-office link registry; nothing else reads it.
|
|
4112
4257
|
*/
|
|
4113
|
-
backOfficeRef:
|
|
4258
|
+
backOfficeRef: z38.string().nullable(),
|
|
4114
4259
|
/**
|
|
4115
4260
|
* The order this session produced, when the connector's back office reported
|
|
4116
4261
|
* it (`session_orders`): its opaque id and the back office's own name for it.
|
|
4117
4262
|
* Both null when no order is known — the cart handle above is then the door.
|
|
4118
4263
|
*/
|
|
4119
|
-
orderRef:
|
|
4120
|
-
orderLabel:
|
|
4264
|
+
orderRef: z38.string().nullable(),
|
|
4265
|
+
orderLabel: z38.string().nullable(),
|
|
4121
4266
|
/**
|
|
4122
4267
|
* Which shell this session rendered — the one thing about the CAPTURE a list
|
|
4123
4268
|
* needs.
|
|
@@ -4130,12 +4275,12 @@ var SessionSummarySchema = z35.object({
|
|
|
4130
4275
|
* on a desktop are not the same session.
|
|
4131
4276
|
*/
|
|
4132
4277
|
formFactor: SessionFormFactorSchema,
|
|
4133
|
-
turnCount:
|
|
4278
|
+
turnCount: z38.number().int(),
|
|
4134
4279
|
/** The visitor's opening message — the single most informative field for
|
|
4135
4280
|
* deciding whether a session is worth opening, hence the widest column. */
|
|
4136
|
-
firstPrompt:
|
|
4137
|
-
startedAt:
|
|
4138
|
-
lastRunAt:
|
|
4281
|
+
firstPrompt: z38.string(),
|
|
4282
|
+
startedAt: z38.string(),
|
|
4283
|
+
lastRunAt: z38.string(),
|
|
4139
4284
|
/**
|
|
4140
4285
|
* The VISITOR's own IANA zone (`America/New_York`), read from their browser
|
|
4141
4286
|
* at session create — what the two timestamps above should be read in.
|
|
@@ -4163,7 +4308,7 @@ var SessionSummarySchema = z35.object({
|
|
|
4163
4308
|
* Client-asserted and never validated against a zone table, so every consumer
|
|
4164
4309
|
* must tolerate an unknown name: `Intl` throws a RangeError on one.
|
|
4165
4310
|
*/
|
|
4166
|
-
visitorTimeZone:
|
|
4311
|
+
visitorTimeZone: z38.string().nullable(),
|
|
4167
4312
|
/**
|
|
4168
4313
|
* Mean TIME TO FIRST PATCH, over the turns that recorded one — the first
|
|
4169
4314
|
* layout op reaching the visitor, and THE latency the project is managed on.
|
|
@@ -4171,31 +4316,31 @@ var SessionSummarySchema = z35.object({
|
|
|
4171
4316
|
* `totalLatencyMs` carries the chip-gen tail that runs after the visitor is
|
|
4172
4317
|
* already reading. Null when no turn in the session recorded a patch.
|
|
4173
4318
|
*/
|
|
4174
|
-
avgTtftMs:
|
|
4319
|
+
avgTtftMs: z38.number().int().nullable(),
|
|
4175
4320
|
/** Mean `main_done_ms` — layout + prose complete. Context for the TTFT, not
|
|
4176
4321
|
* a budget: null on sessions older than the mark's recording. */
|
|
4177
|
-
avgMainDoneMs:
|
|
4322
|
+
avgMainDoneMs: z38.number().int().nullable(),
|
|
4178
4323
|
/** Mean `chip_gen_ms` — the pass that runs AFTER mainDone and is out of the
|
|
4179
4324
|
* budget. On the row only to explain the gap to `totalLatencyMs`. */
|
|
4180
|
-
avgChipGenMs:
|
|
4181
|
-
totalLatencyMs:
|
|
4182
|
-
durationMs:
|
|
4325
|
+
avgChipGenMs: z38.number().int().nullable(),
|
|
4326
|
+
totalLatencyMs: z38.number().int(),
|
|
4327
|
+
durationMs: z38.number().int(),
|
|
4183
4328
|
/** Inferred from recent activity — nothing writes a session-end marker. A
|
|
4184
4329
|
* live session streams and cannot be given a verdict until it ends. */
|
|
4185
|
-
isLive:
|
|
4330
|
+
isLive: z38.boolean(),
|
|
4186
4331
|
verdict: SessionVerdictSchema,
|
|
4187
|
-
reviewedBy:
|
|
4188
|
-
reviewedAt:
|
|
4332
|
+
reviewedBy: z38.string().nullable(),
|
|
4333
|
+
reviewedAt: z38.string().nullable(),
|
|
4189
4334
|
/** Latest filed bug, flattened onto the row so the queue can show its live
|
|
4190
4335
|
* state without a second request. */
|
|
4191
|
-
bugIssueKey:
|
|
4192
|
-
bugIssueUrl:
|
|
4193
|
-
bugIssueState:
|
|
4336
|
+
bugIssueKey: z38.string().nullable(),
|
|
4337
|
+
bugIssueUrl: z38.string().nullable(),
|
|
4338
|
+
bugIssueState: z38.string().nullable()
|
|
4194
4339
|
});
|
|
4195
|
-
var SessionQueuePageSchema =
|
|
4196
|
-
sessions:
|
|
4197
|
-
totalCount:
|
|
4198
|
-
hiddenInternalCount:
|
|
4340
|
+
var SessionQueuePageSchema = z38.object({
|
|
4341
|
+
sessions: z38.array(SessionSummarySchema),
|
|
4342
|
+
totalCount: z38.number().int(),
|
|
4343
|
+
hiddenInternalCount: z38.number().int(),
|
|
4199
4344
|
/**
|
|
4200
4345
|
* Bounced sessions the queue left out — no turn and no add, the default.
|
|
4201
4346
|
*
|
|
@@ -4205,61 +4350,61 @@ var SessionQueuePageSchema = z35.object({
|
|
|
4205
4350
|
* `totalCount + hiddenBouncedCount` is that population, and this count is the
|
|
4206
4351
|
* analytics dashboard's bounce over the same window.
|
|
4207
4352
|
*/
|
|
4208
|
-
hiddenBouncedCount:
|
|
4353
|
+
hiddenBouncedCount: z38.number().int()
|
|
4209
4354
|
});
|
|
4210
|
-
var SessionQueueFacetsSchema =
|
|
4211
|
-
review:
|
|
4212
|
-
version:
|
|
4213
|
-
turns:
|
|
4214
|
-
durationS:
|
|
4355
|
+
var SessionQueueFacetsSchema = z38.object({
|
|
4356
|
+
review: z38.record(z38.number()),
|
|
4357
|
+
version: z38.record(z38.number()),
|
|
4358
|
+
turns: z38.record(z38.number()),
|
|
4359
|
+
durationS: z38.record(z38.number()),
|
|
4215
4360
|
/** Sessions per funnel step reached — a session counts under every step it reached. */
|
|
4216
|
-
funnel:
|
|
4361
|
+
funnel: z38.record(z38.number())
|
|
4217
4362
|
});
|
|
4218
|
-
var SessionCaptureSchema =
|
|
4219
|
-
viewportWidth:
|
|
4220
|
-
viewportHeight:
|
|
4221
|
-
userAgent:
|
|
4222
|
-
locale:
|
|
4363
|
+
var SessionCaptureSchema = z38.object({
|
|
4364
|
+
viewportWidth: z38.number().int().nullable(),
|
|
4365
|
+
viewportHeight: z38.number().int().nullable(),
|
|
4366
|
+
userAgent: z38.string().nullable(),
|
|
4367
|
+
locale: z38.string().nullable(),
|
|
4223
4368
|
/** Referrer at session create — separates agentic traffic from organic. */
|
|
4224
|
-
referrer:
|
|
4369
|
+
referrer: z38.string().nullable()
|
|
4225
4370
|
});
|
|
4226
|
-
var SessionCaptureInputSchema =
|
|
4227
|
-
viewportWidth:
|
|
4228
|
-
viewportHeight:
|
|
4229
|
-
userAgent:
|
|
4230
|
-
locale:
|
|
4371
|
+
var SessionCaptureInputSchema = z38.object({
|
|
4372
|
+
viewportWidth: z38.number().int().positive().max(2e4).optional(),
|
|
4373
|
+
viewportHeight: z38.number().int().positive().max(2e4).optional(),
|
|
4374
|
+
userAgent: z38.string().max(1e3).optional(),
|
|
4375
|
+
locale: z38.string().max(35).optional(),
|
|
4231
4376
|
/** IANA zone name from the visitor's browser. Bounded rather than validated:
|
|
4232
4377
|
* the zone database grows, and refusing a name this build has not heard of
|
|
4233
4378
|
* would drop a real session's capture over a table that is out of date. */
|
|
4234
|
-
timeZone:
|
|
4235
|
-
referrer:
|
|
4236
|
-
clientVersion:
|
|
4237
|
-
isInternal:
|
|
4379
|
+
timeZone: z38.string().max(64).optional(),
|
|
4380
|
+
referrer: z38.string().max(2048).optional(),
|
|
4381
|
+
clientVersion: z38.string().max(100).optional(),
|
|
4382
|
+
isInternal: z38.boolean().optional()
|
|
4238
4383
|
});
|
|
4239
|
-
var SessionDetailSchema =
|
|
4384
|
+
var SessionDetailSchema = z38.object({
|
|
4240
4385
|
session: SessionSummarySchema,
|
|
4241
4386
|
capture: SessionCaptureSchema,
|
|
4242
4387
|
/** Full verdict history, newest first. Verdicts are revisable, and a session
|
|
4243
4388
|
* re-judged after a fix is the evidence the fix worked. */
|
|
4244
|
-
reviews:
|
|
4245
|
-
bugs:
|
|
4246
|
-
comments:
|
|
4389
|
+
reviews: z38.array(SessionReviewEventSchema),
|
|
4390
|
+
bugs: z38.array(SessionBugSchema),
|
|
4391
|
+
comments: z38.array(SessionCommentSchema),
|
|
4247
4392
|
/** Optional during API/console rolling deployment. Absent is unavailable,
|
|
4248
4393
|
* not evidence of zero visitor activity. */
|
|
4249
4394
|
activity: SessionActivitySchema.optional()
|
|
4250
4395
|
});
|
|
4251
|
-
var RecordVerdictInputSchema =
|
|
4396
|
+
var RecordVerdictInputSchema = z38.object({
|
|
4252
4397
|
verdict: RecordableVerdictSchema,
|
|
4253
|
-
note:
|
|
4398
|
+
note: z38.string().max(2e3).optional()
|
|
4254
4399
|
});
|
|
4255
|
-
var FileBugInputSchema =
|
|
4256
|
-
turnIndex:
|
|
4400
|
+
var FileBugInputSchema = z38.object({
|
|
4401
|
+
turnIndex: z38.number().int().positive().nullable(),
|
|
4257
4402
|
/** Optional — a bug filed without dropping a pin has no location. */
|
|
4258
4403
|
location: BugLocationSchema.nullable().optional(),
|
|
4259
|
-
title:
|
|
4260
|
-
body:
|
|
4404
|
+
title: z38.string().min(1).max(300),
|
|
4405
|
+
body: z38.string().min(1),
|
|
4261
4406
|
severity: BugSeveritySchema,
|
|
4262
|
-
payload:
|
|
4407
|
+
payload: z38.record(z38.unknown())
|
|
4263
4408
|
});
|
|
4264
4409
|
|
|
4265
4410
|
// ../spacestation/src/contracts/retrieval/ecommerce/option-values.ts
|
|
@@ -4539,60 +4684,60 @@ __export(src_exports2, {
|
|
|
4539
4684
|
});
|
|
4540
4685
|
|
|
4541
4686
|
// ../ecommerce/src/commerce-schemas.ts
|
|
4542
|
-
import { z as
|
|
4543
|
-
var MoneySchema =
|
|
4544
|
-
amount:
|
|
4545
|
-
currencyCode:
|
|
4687
|
+
import { z as z39 } from "zod";
|
|
4688
|
+
var MoneySchema = z39.object({
|
|
4689
|
+
amount: z39.number(),
|
|
4690
|
+
currencyCode: z39.string()
|
|
4546
4691
|
});
|
|
4547
|
-
var ImageSchema =
|
|
4548
|
-
url:
|
|
4549
|
-
altText:
|
|
4550
|
-
width:
|
|
4551
|
-
height:
|
|
4692
|
+
var ImageSchema = z39.object({
|
|
4693
|
+
url: z39.string(),
|
|
4694
|
+
altText: z39.string(),
|
|
4695
|
+
width: z39.number().optional(),
|
|
4696
|
+
height: z39.number().optional(),
|
|
4552
4697
|
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
4553
4698
|
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
4554
4699
|
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
4555
|
-
srcSet:
|
|
4700
|
+
srcSet: z39.string().optional()
|
|
4556
4701
|
});
|
|
4557
|
-
var AssetSchema =
|
|
4702
|
+
var AssetSchema = z39.object({
|
|
4558
4703
|
/** Opaque asset id — the `resolved()` ref the agent emitted. */
|
|
4559
|
-
id:
|
|
4560
|
-
url:
|
|
4561
|
-
altText:
|
|
4562
|
-
srcSet:
|
|
4704
|
+
id: z39.string(),
|
|
4705
|
+
url: z39.string(),
|
|
4706
|
+
altText: z39.string(),
|
|
4707
|
+
srcSet: z39.string().optional()
|
|
4563
4708
|
});
|
|
4564
|
-
var SelectedOptionSchema =
|
|
4565
|
-
name:
|
|
4566
|
-
value:
|
|
4709
|
+
var SelectedOptionSchema = z39.object({
|
|
4710
|
+
name: z39.string(),
|
|
4711
|
+
value: z39.string()
|
|
4567
4712
|
});
|
|
4568
|
-
var VideoSourceSchema =
|
|
4569
|
-
url:
|
|
4570
|
-
mimeType:
|
|
4571
|
-
width:
|
|
4572
|
-
height:
|
|
4713
|
+
var VideoSourceSchema = z39.object({
|
|
4714
|
+
url: z39.string(),
|
|
4715
|
+
mimeType: z39.string(),
|
|
4716
|
+
width: z39.number().optional(),
|
|
4717
|
+
height: z39.number().optional()
|
|
4573
4718
|
});
|
|
4574
|
-
var ProductVideoSchema =
|
|
4575
|
-
kind:
|
|
4719
|
+
var ProductVideoSchema = z39.object({
|
|
4720
|
+
kind: z39.enum(["hosted", "external"]),
|
|
4576
4721
|
previewImage: ImageSchema.optional(),
|
|
4577
|
-
altText:
|
|
4722
|
+
altText: z39.string().default(""),
|
|
4578
4723
|
/** `kind: 'hosted'` only — empty for external embeds. */
|
|
4579
|
-
sources:
|
|
4724
|
+
sources: z39.array(VideoSourceSchema).default([]),
|
|
4580
4725
|
/** `kind: 'external'` only — iframe embed URL. */
|
|
4581
|
-
embedUrl:
|
|
4726
|
+
embedUrl: z39.string().optional(),
|
|
4582
4727
|
/** `kind: 'external'` only — e.g. `YOUTUBE` | `VIMEO`. */
|
|
4583
|
-
host:
|
|
4728
|
+
host: z39.string().optional()
|
|
4584
4729
|
});
|
|
4585
|
-
var AvailabilityStatusSchema =
|
|
4730
|
+
var AvailabilityStatusSchema = z39.enum([
|
|
4586
4731
|
"in_stock",
|
|
4587
4732
|
"backorder",
|
|
4588
4733
|
"preorder",
|
|
4589
4734
|
"out_of_stock",
|
|
4590
4735
|
"discontinued"
|
|
4591
4736
|
]);
|
|
4592
|
-
var ProductVariantSchema =
|
|
4593
|
-
id:
|
|
4594
|
-
title:
|
|
4595
|
-
available:
|
|
4737
|
+
var ProductVariantSchema = z39.object({
|
|
4738
|
+
id: z39.string(),
|
|
4739
|
+
title: z39.string(),
|
|
4740
|
+
available: z39.boolean(),
|
|
4596
4741
|
/**
|
|
4597
4742
|
* Qualifies `available` with the fulfillment state behind it. Absent means
|
|
4598
4743
|
* the backend did not say — which is NOT the same as in stock, and must not
|
|
@@ -4607,7 +4752,7 @@ var ProductVariantSchema = z36.object({
|
|
|
4607
4752
|
availabilityStatus: AvailabilityStatusSchema.optional(),
|
|
4608
4753
|
price: MoneySchema,
|
|
4609
4754
|
compareAtPrice: MoneySchema.optional(),
|
|
4610
|
-
selectedOptions:
|
|
4755
|
+
selectedOptions: z39.array(SelectedOptionSchema).optional(),
|
|
4611
4756
|
image: ImageSchema.optional()
|
|
4612
4757
|
});
|
|
4613
4758
|
var MP4_MIME = "video/mp4";
|
|
@@ -4618,34 +4763,34 @@ function orderedVideoSources(video) {
|
|
|
4618
4763
|
const hls = video.sources.filter((s) => s.mimeType === HLS_MIME);
|
|
4619
4764
|
return [...mp4, ...hls];
|
|
4620
4765
|
}
|
|
4621
|
-
var SiblingProductSchema =
|
|
4622
|
-
id:
|
|
4623
|
-
handle:
|
|
4624
|
-
title:
|
|
4766
|
+
var SiblingProductSchema = z39.object({
|
|
4767
|
+
id: z39.string(),
|
|
4768
|
+
handle: z39.string(),
|
|
4769
|
+
title: z39.string(),
|
|
4625
4770
|
/** The differentiating value across siblings — typically the color
|
|
4626
4771
|
* label ("OLIVE", "STONE"). Rendered next to the swatch row. */
|
|
4627
|
-
color:
|
|
4772
|
+
color: z39.string(),
|
|
4628
4773
|
/** Swatch artwork. Hydrators populate from the sibling product's
|
|
4629
4774
|
* first image; renderers crop / fit to the swatch tile. */
|
|
4630
4775
|
swatchImage: ImageSchema.optional(),
|
|
4631
|
-
available:
|
|
4776
|
+
available: z39.boolean().default(true),
|
|
4632
4777
|
/** Marks the sibling that IS the currently-rendered product. The
|
|
4633
4778
|
* picker uses this to highlight the active swatch without an
|
|
4634
4779
|
* external id comparison. */
|
|
4635
|
-
current:
|
|
4780
|
+
current: z39.boolean().default(false)
|
|
4636
4781
|
});
|
|
4637
|
-
var ProductSchema =
|
|
4638
|
-
id:
|
|
4639
|
-
handle:
|
|
4640
|
-
title:
|
|
4641
|
-
description:
|
|
4642
|
-
descriptionHtml:
|
|
4643
|
-
vendor:
|
|
4644
|
-
productType:
|
|
4645
|
-
tags:
|
|
4782
|
+
var ProductSchema = z39.object({
|
|
4783
|
+
id: z39.string(),
|
|
4784
|
+
handle: z39.string().default(""),
|
|
4785
|
+
title: z39.string(),
|
|
4786
|
+
description: z39.string().default(""),
|
|
4787
|
+
descriptionHtml: z39.string().optional(),
|
|
4788
|
+
vendor: z39.string().default(""),
|
|
4789
|
+
productType: z39.string().optional(),
|
|
4790
|
+
tags: z39.array(z39.string()).default([]),
|
|
4646
4791
|
price: MoneySchema.default({ amount: 0, currencyCode: "USD" }),
|
|
4647
4792
|
compareAtPrice: MoneySchema.optional(),
|
|
4648
|
-
images:
|
|
4793
|
+
images: z39.array(ImageSchema).default([]),
|
|
4649
4794
|
/**
|
|
4650
4795
|
* Product videos (`Video` + `ExternalVideo` media). Shopify's MCP
|
|
4651
4796
|
* catalog drops video media — it only surfaces through the Storefront
|
|
@@ -4653,21 +4798,21 @@ var ProductSchema = z36.object({
|
|
|
4653
4798
|
* boundary. Default `[]` so renderers gate on `length > 0` without a
|
|
4654
4799
|
* presence guard.
|
|
4655
4800
|
*/
|
|
4656
|
-
videos:
|
|
4657
|
-
variants:
|
|
4658
|
-
availableForSale:
|
|
4659
|
-
options:
|
|
4660
|
-
name:
|
|
4661
|
-
values:
|
|
4801
|
+
videos: z39.array(ProductVideoSchema).default([]),
|
|
4802
|
+
variants: z39.array(ProductVariantSchema).default([]),
|
|
4803
|
+
availableForSale: z39.boolean().default(true),
|
|
4804
|
+
options: z39.array(z39.object({
|
|
4805
|
+
name: z39.string(),
|
|
4806
|
+
values: z39.array(z39.string())
|
|
4662
4807
|
})).optional(),
|
|
4663
|
-
collections:
|
|
4808
|
+
collections: z39.array(z39.string()).optional(),
|
|
4664
4809
|
/** See `SiblingProductSchema`. Default `[]` so renderers can check
|
|
4665
4810
|
* `length > 1` to decide whether to draw the swatch row without a
|
|
4666
4811
|
* presence guard. */
|
|
4667
|
-
colorVariants:
|
|
4668
|
-
rating:
|
|
4669
|
-
value:
|
|
4670
|
-
count:
|
|
4812
|
+
colorVariants: z39.array(SiblingProductSchema).default([]),
|
|
4813
|
+
rating: z39.object({
|
|
4814
|
+
value: z39.number(),
|
|
4815
|
+
count: z39.number()
|
|
4671
4816
|
}).optional(),
|
|
4672
4817
|
/**
|
|
4673
4818
|
* Product reviews surfaced from the brand's review store. SDK
|
|
@@ -4676,12 +4821,12 @@ var ProductSchema = z36.object({
|
|
|
4676
4821
|
* review bodies. Renderers (`Reviews` component, `ProductDetail`,
|
|
4677
4822
|
* etc.) consume directly.
|
|
4678
4823
|
*/
|
|
4679
|
-
reviews:
|
|
4680
|
-
author:
|
|
4681
|
-
rating:
|
|
4682
|
-
content:
|
|
4683
|
-
date:
|
|
4684
|
-
verified:
|
|
4824
|
+
reviews: z39.array(z39.object({
|
|
4825
|
+
author: z39.string(),
|
|
4826
|
+
rating: z39.number(),
|
|
4827
|
+
content: z39.string(),
|
|
4828
|
+
date: z39.string(),
|
|
4829
|
+
verified: z39.boolean().optional()
|
|
4685
4830
|
})).optional(),
|
|
4686
4831
|
/**
|
|
4687
4832
|
* Ghost-entity flag — `true` when the Storefront API could not hydrate
|
|
@@ -4693,7 +4838,7 @@ var ProductSchema = z36.object({
|
|
|
4693
4838
|
* Set exclusively by `createUnavailableProduct()` — never by the
|
|
4694
4839
|
* Storefront mapper.
|
|
4695
4840
|
*/
|
|
4696
|
-
unavailable:
|
|
4841
|
+
unavailable: z39.boolean().default(false)
|
|
4697
4842
|
});
|
|
4698
4843
|
function createUnavailableProduct(gid) {
|
|
4699
4844
|
return {
|
|
@@ -4715,68 +4860,68 @@ function createUnavailableProduct(gid) {
|
|
|
4715
4860
|
function isGhostEntity(value) {
|
|
4716
4861
|
return typeof value === "object" && value !== null && "unavailable" in value && value.unavailable === true;
|
|
4717
4862
|
}
|
|
4718
|
-
var ReviewSchema =
|
|
4719
|
-
id:
|
|
4720
|
-
productId:
|
|
4721
|
-
author:
|
|
4722
|
-
rating:
|
|
4723
|
-
text:
|
|
4724
|
-
date:
|
|
4725
|
-
verified:
|
|
4863
|
+
var ReviewSchema = z39.object({
|
|
4864
|
+
id: z39.string(),
|
|
4865
|
+
productId: z39.string(),
|
|
4866
|
+
author: z39.string(),
|
|
4867
|
+
rating: z39.number(),
|
|
4868
|
+
text: z39.string(),
|
|
4869
|
+
date: z39.string(),
|
|
4870
|
+
verified: z39.boolean()
|
|
4726
4871
|
});
|
|
4727
|
-
var ArticleSchema =
|
|
4728
|
-
id:
|
|
4729
|
-
handle:
|
|
4730
|
-
title:
|
|
4731
|
-
excerpt:
|
|
4732
|
-
content:
|
|
4733
|
-
contentHtml:
|
|
4734
|
-
author:
|
|
4735
|
-
publishedAt:
|
|
4872
|
+
var ArticleSchema = z39.object({
|
|
4873
|
+
id: z39.string(),
|
|
4874
|
+
handle: z39.string().default(""),
|
|
4875
|
+
title: z39.string(),
|
|
4876
|
+
excerpt: z39.string().default(""),
|
|
4877
|
+
content: z39.string().default(""),
|
|
4878
|
+
contentHtml: z39.string().optional(),
|
|
4879
|
+
author: z39.string().default(""),
|
|
4880
|
+
publishedAt: z39.string().default(""),
|
|
4736
4881
|
image: ImageSchema.optional(),
|
|
4737
|
-
blogHandle:
|
|
4738
|
-
tags:
|
|
4882
|
+
blogHandle: z39.string().default(""),
|
|
4883
|
+
tags: z39.array(z39.string()).default([])
|
|
4739
4884
|
});
|
|
4740
|
-
var CmsPageSchema =
|
|
4741
|
-
id:
|
|
4742
|
-
handle:
|
|
4743
|
-
title:
|
|
4744
|
-
body:
|
|
4745
|
-
bodyHtml:
|
|
4746
|
-
bodySummary:
|
|
4747
|
-
updatedAt:
|
|
4748
|
-
seoTitle:
|
|
4749
|
-
seoDescription:
|
|
4885
|
+
var CmsPageSchema = z39.object({
|
|
4886
|
+
id: z39.string(),
|
|
4887
|
+
handle: z39.string().default(""),
|
|
4888
|
+
title: z39.string(),
|
|
4889
|
+
body: z39.string().default(""),
|
|
4890
|
+
bodyHtml: z39.string().optional(),
|
|
4891
|
+
bodySummary: z39.string().default(""),
|
|
4892
|
+
updatedAt: z39.string().default(""),
|
|
4893
|
+
seoTitle: z39.string().optional(),
|
|
4894
|
+
seoDescription: z39.string().optional()
|
|
4750
4895
|
});
|
|
4751
|
-
var CmsPolicySchema =
|
|
4752
|
-
id:
|
|
4896
|
+
var CmsPolicySchema = z39.object({
|
|
4897
|
+
id: z39.string(),
|
|
4753
4898
|
/** Stable policy slot identifier: 'refund' | 'privacy' | 'terms' |
|
|
4754
4899
|
* 'shipping' | 'subscription' | 'warranty' | custom string. Open so
|
|
4755
4900
|
* platforms with custom policy types can extend. */
|
|
4756
|
-
kind:
|
|
4901
|
+
kind: z39.string(),
|
|
4757
4902
|
/** Slug-shaped handle the platform exposes for storefront URLs
|
|
4758
4903
|
* (e.g. `refund-policy`). Empty string when the backend doesn't
|
|
4759
4904
|
* surface one. */
|
|
4760
|
-
handle:
|
|
4761
|
-
title:
|
|
4762
|
-
body:
|
|
4763
|
-
bodyHtml:
|
|
4764
|
-
url:
|
|
4905
|
+
handle: z39.string().default(""),
|
|
4906
|
+
title: z39.string(),
|
|
4907
|
+
body: z39.string().default(""),
|
|
4908
|
+
bodyHtml: z39.string().optional(),
|
|
4909
|
+
url: z39.string().default("")
|
|
4765
4910
|
});
|
|
4766
|
-
var CollectionSchema =
|
|
4767
|
-
id:
|
|
4768
|
-
handle:
|
|
4769
|
-
title:
|
|
4770
|
-
description:
|
|
4911
|
+
var CollectionSchema = z39.object({
|
|
4912
|
+
id: z39.string(),
|
|
4913
|
+
handle: z39.string().default(""),
|
|
4914
|
+
title: z39.string(),
|
|
4915
|
+
description: z39.string().default(""),
|
|
4771
4916
|
image: ImageSchema.optional(),
|
|
4772
|
-
productCount:
|
|
4917
|
+
productCount: z39.number().int().nonnegative().optional()
|
|
4773
4918
|
});
|
|
4774
|
-
var CartLineSchema =
|
|
4775
|
-
id:
|
|
4776
|
-
merchandiseId:
|
|
4777
|
-
productId:
|
|
4778
|
-
title:
|
|
4779
|
-
variantTitle:
|
|
4919
|
+
var CartLineSchema = z39.object({
|
|
4920
|
+
id: z39.string(),
|
|
4921
|
+
merchandiseId: z39.string(),
|
|
4922
|
+
productId: z39.string(),
|
|
4923
|
+
title: z39.string(),
|
|
4924
|
+
variantTitle: z39.string().optional(),
|
|
4780
4925
|
/**
|
|
4781
4926
|
* The variant's option axes as structured pairs (e.g.
|
|
4782
4927
|
* `[{name:'Size', value:'7'}]`). The machine-readable counterpart of
|
|
@@ -4785,10 +4930,10 @@ var CartLineSchema = z36.object({
|
|
|
4785
4930
|
* single-variant products (the degenerate `Title: Default Title` axis
|
|
4786
4931
|
* is normalized away at the adapter boundary).
|
|
4787
4932
|
*/
|
|
4788
|
-
selectedOptions:
|
|
4789
|
-
vendor:
|
|
4790
|
-
sku:
|
|
4791
|
-
quantity:
|
|
4933
|
+
selectedOptions: z39.array(SelectedOptionSchema).optional(),
|
|
4934
|
+
vendor: z39.string().optional(),
|
|
4935
|
+
sku: z39.string().optional(),
|
|
4936
|
+
quantity: z39.number().int().positive(),
|
|
4792
4937
|
unitPrice: MoneySchema,
|
|
4793
4938
|
totalPrice: MoneySchema,
|
|
4794
4939
|
image: ImageSchema.optional(),
|
|
@@ -4808,26 +4953,26 @@ var CartLineSchema = z36.object({
|
|
|
4808
4953
|
* client-minted id the backend rejects, line-tap navigation is
|
|
4809
4954
|
* suppressed, and the money never folds into a settled-looking total.
|
|
4810
4955
|
*/
|
|
4811
|
-
pending:
|
|
4956
|
+
pending: z39.boolean().optional()
|
|
4812
4957
|
});
|
|
4813
4958
|
function isPendingCartLine(line) {
|
|
4814
4959
|
return line.pending === true;
|
|
4815
4960
|
}
|
|
4816
|
-
var CartDiscountCodeSchema =
|
|
4817
|
-
code:
|
|
4818
|
-
applicable:
|
|
4961
|
+
var CartDiscountCodeSchema = z39.object({
|
|
4962
|
+
code: z39.string(),
|
|
4963
|
+
applicable: z39.boolean()
|
|
4819
4964
|
});
|
|
4820
|
-
var CartMessageSchema =
|
|
4821
|
-
kind:
|
|
4965
|
+
var CartMessageSchema = z39.object({
|
|
4966
|
+
kind: z39.enum(["error", "warning", "info"]),
|
|
4822
4967
|
/** Machine code for branching; opaque and backend-defined. */
|
|
4823
|
-
code:
|
|
4968
|
+
code: z39.string(),
|
|
4824
4969
|
/** Human-readable text, meant to be shown as-is. */
|
|
4825
|
-
content:
|
|
4970
|
+
content: z39.string()
|
|
4826
4971
|
});
|
|
4827
|
-
var CartSchema =
|
|
4828
|
-
id:
|
|
4829
|
-
lines:
|
|
4830
|
-
totalQuantity:
|
|
4972
|
+
var CartSchema = z39.object({
|
|
4973
|
+
id: z39.string(),
|
|
4974
|
+
lines: z39.array(CartLineSchema),
|
|
4975
|
+
totalQuantity: z39.number().int().nonnegative(),
|
|
4831
4976
|
subtotal: MoneySchema,
|
|
4832
4977
|
/**
|
|
4833
4978
|
* Cart total after discounts (pre-shipping/tax). Absent when the
|
|
@@ -4837,11 +4982,11 @@ var CartSchema = z36.object({
|
|
|
4837
4982
|
*/
|
|
4838
4983
|
total: MoneySchema.optional(),
|
|
4839
4984
|
/** Discount codes currently attached to the cart. */
|
|
4840
|
-
discountCodes:
|
|
4985
|
+
discountCodes: z39.array(CartDiscountCodeSchema).default([]),
|
|
4841
4986
|
/** Notices the backend attached to this cart — see `CartMessageSchema`.
|
|
4842
4987
|
* Empty when the backend said nothing or does not report them. */
|
|
4843
|
-
messages:
|
|
4844
|
-
checkoutUrl:
|
|
4988
|
+
messages: z39.array(CartMessageSchema).default([]),
|
|
4989
|
+
checkoutUrl: z39.string().optional(),
|
|
4845
4990
|
/**
|
|
4846
4991
|
* Opaque handle this cart is known by in the connector's BACK OFFICE — the
|
|
4847
4992
|
* value a space owner searches there to find the order this cart became.
|
|
@@ -4854,14 +4999,14 @@ var CartSchema = z36.object({
|
|
|
4854
4999
|
* Absent when the platform has no such handle, or while the cart is still the
|
|
4855
5000
|
* client's optimistic paint and its id is client-minted.
|
|
4856
5001
|
*/
|
|
4857
|
-
backOfficeRef:
|
|
5002
|
+
backOfficeRef: z39.string().optional(),
|
|
4858
5003
|
/**
|
|
4859
5004
|
* URL that recreates this cart on the merchant's own store website
|
|
4860
5005
|
* (replace semantics — overwrites any cart the visitor already has
|
|
4861
5006
|
* there). Populated by platform adapters that support it; absent when
|
|
4862
5007
|
* the cart is empty or the URL cannot be built.
|
|
4863
5008
|
*/
|
|
4864
|
-
storeCartUrl:
|
|
5009
|
+
storeCartUrl: z39.string().optional(),
|
|
4865
5010
|
/**
|
|
4866
5011
|
* True while this cart exists only in the client's optimistic paint —
|
|
4867
5012
|
* no backend cart has been created yet, so its `id` is client-minted and
|
|
@@ -4869,7 +5014,7 @@ var CartSchema = z36.object({
|
|
|
4869
5014
|
* `CartLineSchema.pending`: the adapter never sets it, and callers that
|
|
4870
5015
|
* need a real cart id read THIS rather than sniffing the id's shape.
|
|
4871
5016
|
*/
|
|
4872
|
-
pending:
|
|
5017
|
+
pending: z39.boolean().optional()
|
|
4873
5018
|
});
|
|
4874
5019
|
function settledCart(cart) {
|
|
4875
5020
|
if (cart === null || cart === void 0) return null;
|
|
@@ -4877,27 +5022,27 @@ function settledCart(cart) {
|
|
|
4877
5022
|
}
|
|
4878
5023
|
|
|
4879
5024
|
// ../ecommerce/src/review-schemas.ts
|
|
4880
|
-
import { z as
|
|
5025
|
+
import { z as z40 } from "zod";
|
|
4881
5026
|
var PRODUCT_REVIEWS_RESOLVER_KEY = "productReviews";
|
|
4882
|
-
var ProductReviewItemSchema =
|
|
4883
|
-
author:
|
|
4884
|
-
rating:
|
|
5027
|
+
var ProductReviewItemSchema = z40.object({
|
|
5028
|
+
author: z40.string(),
|
|
5029
|
+
rating: z40.number(),
|
|
4885
5030
|
/** The reviewer's own headline ("love"), when they wrote one — the site shows it above `content`. */
|
|
4886
|
-
title:
|
|
4887
|
-
content:
|
|
4888
|
-
date:
|
|
4889
|
-
verified:
|
|
5031
|
+
title: z40.string().optional(),
|
|
5032
|
+
content: z40.string(),
|
|
5033
|
+
date: z40.string(),
|
|
5034
|
+
verified: z40.boolean().optional(),
|
|
4890
5035
|
/**
|
|
4891
5036
|
* Non-empty when the review was written for a grouped SIBLING product rather
|
|
4892
5037
|
* than this one (brands pool reviews across a product line). A surface can
|
|
4893
5038
|
* attribute it; empty / absent ⇒ the product's own review.
|
|
4894
5039
|
*/
|
|
4895
|
-
writtenFor:
|
|
5040
|
+
writtenFor: z40.string().optional()
|
|
4896
5041
|
});
|
|
4897
5042
|
var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
|
|
4898
5043
|
/** The sentence(s) the ranking fired on. Descriptive — it is what the matcher
|
|
4899
5044
|
* scored, NOT necessarily text that occurs in `content`. */
|
|
4900
|
-
highlight:
|
|
5045
|
+
highlight: z40.string().optional(),
|
|
4901
5046
|
/**
|
|
4902
5047
|
* `highlight` resolved back into `content` as a VERBATIM substring, so a
|
|
4903
5048
|
* surface can mark it with a plain `indexOf` and no matcher of its own.
|
|
@@ -4912,24 +5057,29 @@ var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
|
|
|
4912
5057
|
* Absent when the passage genuinely has no home in the body (one cut from the
|
|
4913
5058
|
* title). A surface then marks NOTHING rather than guessing at a span.
|
|
4914
5059
|
*/
|
|
4915
|
-
mark:
|
|
5060
|
+
mark: z40.string().optional()
|
|
4916
5061
|
});
|
|
4917
|
-
var ReviewAggregateSchema =
|
|
4918
|
-
value:
|
|
4919
|
-
count:
|
|
5062
|
+
var ReviewAggregateSchema = z40.object({
|
|
5063
|
+
value: z40.number(),
|
|
5064
|
+
count: z40.number()
|
|
4920
5065
|
});
|
|
4921
|
-
var ProductReviewDataSchema =
|
|
4922
|
-
id:
|
|
5066
|
+
var ProductReviewDataSchema = z40.object({
|
|
5067
|
+
id: z40.string(),
|
|
4923
5068
|
/** The product's FULL retrieved set — what a filterable list renders. */
|
|
4924
|
-
reviews:
|
|
5069
|
+
reviews: z40.array(ProductReviewItemSchema).default([]),
|
|
4925
5070
|
aggregate: ReviewAggregateSchema.default({ value: 0, count: 0 }),
|
|
4926
5071
|
/** 5★→1★ star COUNTS over the full set (index 0 = 5-star). */
|
|
4927
|
-
distribution:
|
|
5072
|
+
distribution: z40.array(z40.number()).default([]),
|
|
4928
5073
|
/**
|
|
4929
5074
|
* The reviews that ANSWER the surface's intent, best first. Empty when no
|
|
4930
5075
|
* intent was asked for — never a silent copy of `reviews`.
|
|
4931
5076
|
*/
|
|
4932
|
-
highlights:
|
|
5077
|
+
highlights: z40.array(ProductReviewHighlightSchema).default([]),
|
|
5078
|
+
/**
|
|
5079
|
+
* True when the review provider could not be read and nothing is indexed —
|
|
5080
|
+
* the empty lists mean "not loaded", NOT "this product has no reviews".
|
|
5081
|
+
*/
|
|
5082
|
+
unavailable: z40.boolean().optional()
|
|
4933
5083
|
});
|
|
4934
5084
|
var ProductReviewPayloadSchema = ProductReviewDataSchema.omit({ id: true });
|
|
4935
5085
|
|
|
@@ -5223,9 +5373,9 @@ function readPdpCompanions(config) {
|
|
|
5223
5373
|
}
|
|
5224
5374
|
|
|
5225
5375
|
// ../ecommerce/src/base-attributes.ts
|
|
5226
|
-
import { z as
|
|
5376
|
+
import { z as z41 } from "zod";
|
|
5227
5377
|
var BASE_ATTRIBUTES_CONFIG_KEY = "baseAttributes";
|
|
5228
|
-
var BaseAttributesRecordSchema =
|
|
5378
|
+
var BaseAttributesRecordSchema = z41.record(z41.string(), AttributeDefSchema);
|
|
5229
5379
|
function buildBaseAttributesConfig(attributes) {
|
|
5230
5380
|
return { [BASE_ATTRIBUTES_CONFIG_KEY]: attributes };
|
|
5231
5381
|
}
|
|
@@ -5236,9 +5386,9 @@ function readBaseAttributesConfig(config) {
|
|
|
5236
5386
|
}
|
|
5237
5387
|
|
|
5238
5388
|
// ../ecommerce/src/bucket-labels.ts
|
|
5239
|
-
import { z as
|
|
5389
|
+
import { z as z42 } from "zod";
|
|
5240
5390
|
var BUCKET_LABELS_CONFIG_KEY = "bucketLabels";
|
|
5241
|
-
var BucketLabelsRecordSchema =
|
|
5391
|
+
var BucketLabelsRecordSchema = z42.record(z42.string(), z42.string());
|
|
5242
5392
|
function buildBucketLabelsConfig(labels) {
|
|
5243
5393
|
return { [BUCKET_LABELS_CONFIG_KEY]: labels };
|
|
5244
5394
|
}
|
|
@@ -6251,7 +6401,8 @@ __export(presence_exports, {
|
|
|
6251
6401
|
SCANNING_FORM: () => SCANNING_FORM,
|
|
6252
6402
|
deriveSourceElement: () => deriveSourceElement,
|
|
6253
6403
|
isPresenceStreamArtifact: () => isPresenceStreamArtifact,
|
|
6254
|
-
pendingSourceElement: () => pendingSourceElement
|
|
6404
|
+
pendingSourceElement: () => pendingSourceElement,
|
|
6405
|
+
projectSourceOutput: () => projectSourceOutput
|
|
6255
6406
|
});
|
|
6256
6407
|
|
|
6257
6408
|
// ../spacestation/src/widgets/presence/frame.ts
|
|
@@ -6302,7 +6453,7 @@ function imageOf(record2) {
|
|
|
6302
6453
|
function metaOf(record2) {
|
|
6303
6454
|
const meta = {};
|
|
6304
6455
|
for (const [key, value] of Object.entries(record2)) {
|
|
6305
|
-
if (key === "id" || SCAN_IMAGE_KEYS.includes(key)) continue;
|
|
6456
|
+
if (key === "id" || key.startsWith("__") || SCAN_IMAGE_KEYS.includes(key)) continue;
|
|
6306
6457
|
if (typeof value === "number" || typeof value === "boolean") {
|
|
6307
6458
|
meta[key] = value;
|
|
6308
6459
|
continue;
|
|
@@ -6363,6 +6514,29 @@ function deriveSourceElement(input) {
|
|
|
6363
6514
|
}
|
|
6364
6515
|
return element;
|
|
6365
6516
|
}
|
|
6517
|
+
function projectSourceOutput(output) {
|
|
6518
|
+
const records = recordsOf(output);
|
|
6519
|
+
if (records === void 0) return void 0;
|
|
6520
|
+
const results = [];
|
|
6521
|
+
for (const record2 of records) {
|
|
6522
|
+
if (typeof record2 !== "object" || record2 === null) continue;
|
|
6523
|
+
const projected = {};
|
|
6524
|
+
const id = Reflect.get(record2, "id");
|
|
6525
|
+
if (typeof id === "string") projected.id = id;
|
|
6526
|
+
const imageUrl = imageOf(record2);
|
|
6527
|
+
if (imageUrl !== void 0) projected.imageUrl = imageUrl;
|
|
6528
|
+
const meta = metaOf(record2);
|
|
6529
|
+
if (meta !== void 0) Object.assign(projected, meta);
|
|
6530
|
+
results.push(projected);
|
|
6531
|
+
}
|
|
6532
|
+
const projection = { results };
|
|
6533
|
+
const parsed = parse(output);
|
|
6534
|
+
if (typeof parsed === "object" && parsed !== null) {
|
|
6535
|
+
const total = Reflect.get(parsed, "total");
|
|
6536
|
+
if (typeof total === "number") projection.total = total;
|
|
6537
|
+
}
|
|
6538
|
+
return projection;
|
|
6539
|
+
}
|
|
6366
6540
|
|
|
6367
6541
|
// ../spacestation/src/widgets/presence/element.ts
|
|
6368
6542
|
function isPresenceStreamArtifact(value) {
|
|
@@ -6388,8 +6562,8 @@ var PRESENCE_LIFECYCLE = {
|
|
|
6388
6562
|
};
|
|
6389
6563
|
|
|
6390
6564
|
// ../spacestation/src/widgets/presence/profile.ts
|
|
6391
|
-
import { z as
|
|
6392
|
-
var PresenceProfileSchema =
|
|
6565
|
+
import { z as z43 } from "zod";
|
|
6566
|
+
var PresenceProfileSchema = z43.object({
|
|
6393
6567
|
/**
|
|
6394
6568
|
* How much the agent SPEAKS in presence.
|
|
6395
6569
|
* - 'off' the faculty generates no prose at all. Zero tokens, and
|
|
@@ -6399,14 +6573,14 @@ var PresenceProfileSchema = z40.object({
|
|
|
6399
6573
|
* - 'terse' one lead line per turn. The default — see below.
|
|
6400
6574
|
* - 'full' a lead line plus asides beside individual elements.
|
|
6401
6575
|
*/
|
|
6402
|
-
voice:
|
|
6576
|
+
voice: z43.enum(["off", "terse", "full"]),
|
|
6403
6577
|
/**
|
|
6404
6578
|
* Which source kinds this space surfaces. 'all' = every tool that declares a
|
|
6405
6579
|
* `sourceKind`. An explicit list lets a space stay quiet about lookups its
|
|
6406
6580
|
* visitors would find uninteresting (policy checks on a fashion space)
|
|
6407
6581
|
* without the tool having to lie about what it is.
|
|
6408
6582
|
*/
|
|
6409
|
-
sources:
|
|
6583
|
+
sources: z43.union([z43.array(z43.string()), z43.literal("all")]),
|
|
6410
6584
|
/**
|
|
6411
6585
|
* Which facts render.
|
|
6412
6586
|
* - 'inferred-only' hides `provenance: 'stated'` facts. The default and the
|
|
@@ -6415,7 +6589,7 @@ var PresenceProfileSchema = z40.object({
|
|
|
6415
6589
|
* - 'all' shows stated facts too — for spaces where confirming the brief
|
|
6416
6590
|
* back is itself the product (intake, configuration).
|
|
6417
6591
|
*/
|
|
6418
|
-
facts:
|
|
6592
|
+
facts: z43.enum(["inferred-only", "all"])
|
|
6419
6593
|
});
|
|
6420
6594
|
var DEFAULT_PRESENCE_PROFILE = {
|
|
6421
6595
|
voice: "terse",
|
|
@@ -8345,22 +8519,22 @@ function buildComponentLibrary(catalog, componentMap) {
|
|
|
8345
8519
|
}
|
|
8346
8520
|
|
|
8347
8521
|
// src/catalog/define.ts
|
|
8348
|
-
import { z as
|
|
8522
|
+
import { z as z44 } from "zod";
|
|
8349
8523
|
function entity(resolverKey, opts) {
|
|
8350
|
-
return resolved(
|
|
8524
|
+
return resolved(z44.string(), resolverKey, opts);
|
|
8351
8525
|
}
|
|
8352
|
-
var text = prose(
|
|
8526
|
+
var text = prose(z44.string());
|
|
8353
8527
|
function plain() {
|
|
8354
|
-
return
|
|
8528
|
+
return z44.string();
|
|
8355
8529
|
}
|
|
8356
8530
|
function token(values) {
|
|
8357
|
-
return
|
|
8531
|
+
return z44.enum(values);
|
|
8358
8532
|
}
|
|
8359
8533
|
function catalogComponent(meta, render) {
|
|
8360
8534
|
const { props, requires, ...rest } = meta;
|
|
8361
8535
|
return {
|
|
8362
8536
|
...rest,
|
|
8363
|
-
propsSchema:
|
|
8537
|
+
propsSchema: z44.object(props),
|
|
8364
8538
|
...requires !== void 0 ? { requires } : {},
|
|
8365
8539
|
component: adaptComponent(render)
|
|
8366
8540
|
};
|
|
@@ -8448,10 +8622,9 @@ function resolveHydrators(platform, platformConfig, context) {
|
|
|
8448
8622
|
if (platform === "" || platform === "none") return services;
|
|
8449
8623
|
const factory = getPlatformHydratorFactory(platform);
|
|
8450
8624
|
if (!factory) {
|
|
8451
|
-
|
|
8452
|
-
`[resolveHydrators] no hydrators registered for platform "${platform}"
|
|
8625
|
+
throw new Error(
|
|
8626
|
+
`[resolveHydrators] no hydrators registered for platform "${platform}". Registered: [${listRegisteredPlatforms().join(", ")}]. The runtime must import its connector bindings at its entry point.`
|
|
8453
8627
|
);
|
|
8454
|
-
return services;
|
|
8455
8628
|
}
|
|
8456
8629
|
const platformContext = context === void 0 ? void 0 : { locale: context.locale };
|
|
8457
8630
|
return { ...services, ...factory(platformConfig, platformContext) };
|
|
@@ -8913,10 +9086,10 @@ function presenceFactShape(fact) {
|
|
|
8913
9086
|
const value = fact.value.trim();
|
|
8914
9087
|
if (value.length === 0) return FACT_SHAPE.plain;
|
|
8915
9088
|
if (colorHexOf(value) !== null) return FACT_SHAPE.color;
|
|
8916
|
-
const
|
|
8917
|
-
if (
|
|
8918
|
-
const alone =
|
|
8919
|
-
if (alone && BARE_NUMERAL.test(
|
|
9089
|
+
const parts2 = factFigureParts(fact);
|
|
9090
|
+
if (parts2 === null) return FACT_SHAPE.plain;
|
|
9091
|
+
const alone = parts2.before.length === 0 && parts2.after.length === 0;
|
|
9092
|
+
if (alone && BARE_NUMERAL.test(parts2.figure)) return FACT_SHAPE.figure;
|
|
8920
9093
|
return FACT_SHAPE.measure;
|
|
8921
9094
|
}
|
|
8922
9095
|
|
|
@@ -10397,18 +10570,18 @@ __export(ecommerce_exports, {
|
|
|
10397
10570
|
});
|
|
10398
10571
|
|
|
10399
10572
|
// ../spacestation/src/analytics/ecommerce/surfacing.ts
|
|
10400
|
-
import { z as
|
|
10573
|
+
import { z as z45 } from "zod";
|
|
10401
10574
|
var PRODUCTS_SURFACED = defineEventKind(
|
|
10402
10575
|
"commerce.products_surfaced",
|
|
10403
10576
|
"client",
|
|
10404
|
-
|
|
10577
|
+
z45.object({
|
|
10405
10578
|
/** The turn whose commit this describes. Minted where the prompt signal
|
|
10406
10579
|
* is built and shared with `agent_runs`, so the read layer can line a
|
|
10407
10580
|
* surfacing up against the prompt that asked for it. */
|
|
10408
|
-
turnId:
|
|
10581
|
+
turnId: z45.string().min(1).max(128),
|
|
10409
10582
|
/** Distinct entity refs this turn placed that were not on the canvas
|
|
10410
10583
|
* before it. ZERO IS A REAL VALUE — see the header. */
|
|
10411
|
-
productCount:
|
|
10584
|
+
productCount: z45.number().int().nonnegative()
|
|
10412
10585
|
}).strict()
|
|
10413
10586
|
);
|
|
10414
10587
|
|
|
@@ -11908,7 +12081,7 @@ function useContentActions() {
|
|
|
11908
12081
|
import { useEffect as useEffect19, useState as useState18 } from "react";
|
|
11909
12082
|
|
|
11910
12083
|
// package.json
|
|
11911
|
-
var version = "0.
|
|
12084
|
+
var version = "0.5.1";
|
|
11912
12085
|
|
|
11913
12086
|
// src/host/host-modules.ts
|
|
11914
12087
|
import * as react from "react";
|
|
@@ -11995,7 +12168,7 @@ function Spacefront(props) {
|
|
|
11995
12168
|
}
|
|
11996
12169
|
|
|
11997
12170
|
// src/npm.ts
|
|
11998
|
-
import { z as
|
|
12171
|
+
import { z as z47 } from "zod";
|
|
11999
12172
|
export {
|
|
12000
12173
|
ACQUISITION_KIND_LABELS,
|
|
12001
12174
|
ACTIVE_PANEL_ATTR,
|
|
@@ -12020,6 +12193,11 @@ export {
|
|
|
12020
12193
|
AttributeScopeBucketSchema,
|
|
12021
12194
|
AttributeScopeConfigSchema,
|
|
12022
12195
|
AvailabilityStatusSchema,
|
|
12196
|
+
BRAND_MARK_MAX_BYTES,
|
|
12197
|
+
BRAND_MARK_SLOTS,
|
|
12198
|
+
BRAND_MARK_TYPES,
|
|
12199
|
+
BrandMarkImageSchema,
|
|
12200
|
+
BrandMarkSchema,
|
|
12023
12201
|
BugLocationSchema,
|
|
12024
12202
|
BugSeveritySchema,
|
|
12025
12203
|
CANVAS_ARRANGEMENTS,
|
|
@@ -12133,11 +12311,13 @@ export {
|
|
|
12133
12311
|
LlmUsageDailySchema,
|
|
12134
12312
|
MAX_ATTACHMENT_BYTES,
|
|
12135
12313
|
MAX_VISITOR_PROMPT_CHARS,
|
|
12314
|
+
MIN_WIRE_PROTOCOL_VERSION,
|
|
12136
12315
|
MOBILE_VIEWPORT_MAX,
|
|
12137
12316
|
MoneySchema,
|
|
12138
12317
|
NAVIGATE_SIGNAL,
|
|
12139
12318
|
NavigatePayloadSchema,
|
|
12140
12319
|
NullComponent,
|
|
12320
|
+
OLDEST_SUPPORTED_SDK,
|
|
12141
12321
|
PRESENCE_CANVAS_REFRESH_SIGNAL,
|
|
12142
12322
|
PRESENCE_FACT_DISMISS_SIGNAL,
|
|
12143
12323
|
PRESENCE_FLOW,
|
|
@@ -12148,6 +12328,7 @@ export {
|
|
|
12148
12328
|
PRODUCT_SELECT_OPTION_SIGNAL,
|
|
12149
12329
|
PRODUCT_VARIANTS_SCOPE,
|
|
12150
12330
|
PROJECTION_SET_SIGNAL,
|
|
12331
|
+
PackageBundleRefSchema,
|
|
12151
12332
|
PackageLookupProvider,
|
|
12152
12333
|
PackageReleaseSchema,
|
|
12153
12334
|
PageSchema,
|
|
@@ -12174,13 +12355,17 @@ export {
|
|
|
12174
12355
|
ReviewAggregateSchema,
|
|
12175
12356
|
ReviewSchema,
|
|
12176
12357
|
SCANNING_FORM,
|
|
12358
|
+
SDK_SHIMS,
|
|
12359
|
+
SDK_VERSION_PATTERN,
|
|
12177
12360
|
SELECTION_ORIGIN_VISITOR,
|
|
12178
12361
|
SIGNAL_PATCH_PREFIX,
|
|
12362
|
+
SOCKET_TICKET_PARAM,
|
|
12179
12363
|
STRUCTURAL_BASELINE_CATALOG,
|
|
12180
12364
|
STRUCTURAL_BASELINE_TYPES,
|
|
12181
12365
|
SURFACES,
|
|
12182
12366
|
SURFACE_DISPOSITION,
|
|
12183
12367
|
ScrollContainerProvider,
|
|
12368
|
+
SdkVersionSchema,
|
|
12184
12369
|
SelectedOptionSchema,
|
|
12185
12370
|
SessionActivityEventSchema,
|
|
12186
12371
|
SessionActivitySchema,
|
|
@@ -12205,6 +12390,7 @@ export {
|
|
|
12205
12390
|
ShellRootContext,
|
|
12206
12391
|
ShimmerSweep,
|
|
12207
12392
|
SiblingProductSchema,
|
|
12393
|
+
SpaceBrandMarkSchema,
|
|
12208
12394
|
SpaceBugSchema,
|
|
12209
12395
|
Spacefront,
|
|
12210
12396
|
SpacefrontCanvas,
|
|
@@ -12244,6 +12430,9 @@ export {
|
|
|
12244
12430
|
ViewportWindowContext,
|
|
12245
12431
|
ViewportWindowProvider,
|
|
12246
12432
|
VisitorIdDurabilitySchema,
|
|
12433
|
+
WIRE_PROTOCOL_PARAM,
|
|
12434
|
+
WIRE_PROTOCOL_UNSUPPORTED_CLOSE,
|
|
12435
|
+
WIRE_PROTOCOL_VERSION,
|
|
12247
12436
|
WORKSPACE_THEME_PACKAGES,
|
|
12248
12437
|
WireCatalogEntrySchema,
|
|
12249
12438
|
WireCatalogSchema,
|
|
@@ -12291,6 +12480,7 @@ export {
|
|
|
12291
12480
|
collectLayoutGids,
|
|
12292
12481
|
collectPlacedEntityRefs,
|
|
12293
12482
|
colorHexOf,
|
|
12483
|
+
compareSdkVersions,
|
|
12294
12484
|
compressArray,
|
|
12295
12485
|
compressString,
|
|
12296
12486
|
computeActiveChips,
|
|
@@ -12456,6 +12646,8 @@ export {
|
|
|
12456
12646
|
scopedAttributeKey,
|
|
12457
12647
|
scrollEventTarget,
|
|
12458
12648
|
scrollPaddingTopOf,
|
|
12649
|
+
sdkShimsFor,
|
|
12650
|
+
sdkWindowProblem,
|
|
12459
12651
|
selectItemVariants,
|
|
12460
12652
|
selectedOptionsToRecord,
|
|
12461
12653
|
serverState,
|
|
@@ -12640,5 +12832,5 @@ export {
|
|
|
12640
12832
|
wipeProfile,
|
|
12641
12833
|
withCartActorOrigin,
|
|
12642
12834
|
withInteractionTracking,
|
|
12643
|
-
|
|
12835
|
+
z47 as z
|
|
12644
12836
|
};
|