@40rty/ams-sdk 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/index.js +1068 -813
  2. package/dist/types/ecommerce/src/code-discounts.d.ts +47 -0
  3. package/dist/types/ecommerce/src/commerce-schemas.d.ts +16 -6
  4. package/dist/types/ecommerce/src/index.d.ts +2 -0
  5. package/dist/types/ecommerce/src/store-theme.d.ts +45 -0
  6. package/dist/types/sdk/src/canvas/hydration-notice.d.ts +23 -0
  7. package/dist/types/sdk/src/canvas/index.d.ts +1 -0
  8. package/dist/types/sdk/src/host/host-modules.d.ts +55 -14
  9. package/dist/types/sdk/src/session/index.d.ts +2 -1
  10. package/dist/types/sdk/src/session/space-locale-context.d.ts +10 -0
  11. package/dist/types/sdk/src/session/visitor-locale.d.ts +15 -0
  12. package/dist/types/sdk/src/shell/composer-attachments/use-composer-attachments.d.ts +4 -3
  13. package/dist/types/sdk/src/verticals/commerce/comparison/comparison-rows.d.ts +11 -2
  14. package/dist/types/sdk/src/verticals/commerce/index.d.ts +1 -1
  15. package/dist/types/sdk/src/verticals/commerce/price/format-price.d.ts +3 -2
  16. package/dist/types/spacestation/src/attachment/attachment-failure.d.ts +32 -0
  17. package/dist/types/spacestation/src/catalog/wire/host-imports.d.ts +15 -0
  18. package/dist/types/spacestation/src/catalog/wire/index.d.ts +2 -1
  19. package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +19 -0
  20. package/dist/types/spacestation/src/contracts/tools/execution-context.d.ts +11 -0
  21. package/dist/types/spacestation/src/index.d.ts +5 -2
  22. package/dist/types/spacestation/src/signal/agent-signals.d.ts +31 -0
  23. package/dist/types/spacestation/src/space/session-queue.d.ts +8 -8
  24. package/dist/types/spacestation/src/space/space-config.d.ts +4 -0
  25. package/dist/types/spacestation/src/space/space-locale.d.ts +46 -0
  26. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ __export(src_exports3, {
34
34
  AssetSchema: () => AssetSchema,
35
35
  AttachmentRefSchema: () => AttachmentRefSchema,
36
36
  AttachmentRefsSchema: () => AttachmentRefsSchema,
37
+ AttachmentUploadError: () => AttachmentUploadError,
37
38
  AttributeDefSchema: () => AttributeDefSchema,
38
39
  AttributeScopeBucketSchema: () => AttributeScopeBucketSchema,
39
40
  AttributeScopeConfigSchema: () => AttributeScopeConfigSchema,
@@ -101,6 +102,7 @@ __export(src_exports3, {
101
102
  DEFAULT_HOSTING: () => DEFAULT_HOSTING,
102
103
  DEFAULT_PRESENCE_PROFILE: () => DEFAULT_PRESENCE_PROFILE,
103
104
  DEFAULT_SPACE_CONFIG: () => DEFAULT_SPACE_CONFIG,
105
+ DEFAULT_SPACE_LOCALE: () => DEFAULT_SPACE_LOCALE,
104
106
  DEFAULT_VISITOR_ACCESS: () => DEFAULT_VISITOR_ACCESS,
105
107
  DIRECTION_FLOW: () => DIRECTION_FLOW,
106
108
  DROP_REASONS: () => DROP_REASONS,
@@ -140,7 +142,10 @@ __export(src_exports3, {
140
142
  HOST_CLEARED: () => HOST_CLEARED,
141
143
  HandlerRegistryContext: () => HandlerRegistryContext,
142
144
  HostClearedSchema: () => HostClearedSchema,
145
+ HostExportsSchema: () => HostExportsSchema,
146
+ HostImportsSchema: () => HostImportsSchema,
143
147
  HostPayloadSchema: () => HostPayloadSchema,
148
+ HydrationNoticeProvider: () => HydrationNoticeProvider,
144
149
  HydrationStateContext: () => HydrationStateContext,
145
150
  HydratorProvider: () => HydratorProvider,
146
151
  INITIAL_NAV_PRESENTATION: () => INITIAL_NAV_PRESENTATION,
@@ -157,6 +162,7 @@ __export(src_exports3, {
157
162
  LlmUsageDailySchema: () => LlmUsageDailySchema,
158
163
  MAX_ACTIVE_AGENT_DIRECTIVES: () => MAX_ACTIVE_AGENT_DIRECTIVES,
159
164
  MAX_ATTACHMENT_BYTES: () => MAX_ATTACHMENT_BYTES,
165
+ MAX_ATTACHMENT_MB: () => MAX_ATTACHMENT_MB,
160
166
  MAX_VISITOR_PROMPT_CHARS: () => MAX_VISITOR_PROMPT_CHARS,
161
167
  MIN_WIRE_PROTOCOL_VERSION: () => MIN_WIRE_PROTOCOL_VERSION,
162
168
  MOBILE_VIEWPORT_MAX: () => MOBILE_VIEWPORT_MAX,
@@ -195,11 +201,13 @@ __export(src_exports3, {
195
201
  ProjectionSignalBridge: () => ProjectionSignalBridge,
196
202
  REFERRER_HOST_PARAM: () => REFERRER_HOST_PARAM,
197
203
  REGISTRY_CLICKED: () => REGISTRY_CLICKED,
204
+ RELEASE_MESSAGE_MAX: () => RELEASE_MESSAGE_MAX,
198
205
  RESERVED_IDS: () => RESERVED_IDS,
199
206
  RESERVED_ID_SET: () => RESERVED_ID_SET,
200
207
  RecordVerdictInputSchema: () => RecordVerdictInputSchema,
201
208
  RecordableVerdictSchema: () => RecordableVerdictSchema,
202
209
  RegistryProvider: () => RegistryProvider,
210
+ ReleaseMessageSchema: () => ReleaseMessageSchema,
203
211
  ReorderAgentDirectivesInputSchema: () => ReorderAgentDirectivesInputSchema,
204
212
  ReviewAggregateSchema: () => ReviewAggregateSchema,
205
213
  ReviewSchema: () => ReviewSchema,
@@ -211,6 +219,7 @@ __export(src_exports3, {
211
219
  SOCKET_TICKET_PARAM: () => SOCKET_TICKET_PARAM,
212
220
  STRUCTURAL_BASELINE_CATALOG: () => STRUCTURAL_BASELINE_CATALOG,
213
221
  STRUCTURAL_BASELINE_TYPES: () => STRUCTURAL_BASELINE_TYPES,
222
+ SUPPORTED_SPACE_LOCALES: () => SUPPORTED_SPACE_LOCALES,
214
223
  SURFACES: () => SURFACES,
215
224
  SURFACE_DISPOSITION: () => SURFACE_DISPOSITION,
216
225
  ScrollContainerProvider: () => ScrollContainerProvider,
@@ -243,10 +252,13 @@ __export(src_exports3, {
243
252
  SpaceAgentDirectiveSchema: () => SpaceAgentDirectiveSchema,
244
253
  SpaceBrandMarkSchema: () => SpaceBrandMarkSchema,
245
254
  SpaceBugSchema: () => SpaceBugSchema,
255
+ SpaceLocaleProvider: () => SpaceLocaleProvider,
256
+ SpaceLocaleSchema: () => SpaceLocaleSchema,
246
257
  SpacefrontCanvas: () => SpacefrontCanvas,
247
258
  SpacefrontPreviewProvider: () => SpacefrontPreviewProvider,
248
259
  SpecSchema: () => SpecSchema,
249
260
  StateSnapshotFrameSchema: () => StateSnapshotFrameSchema,
261
+ StoreThemeAccessError: () => StoreThemeAccessError,
250
262
  SuggestionActionSchema: () => SuggestionActionSchema,
251
263
  SuggestionActionsSchema: () => SuggestionActionsSchema,
252
264
  SurfaceSchema: () => SurfaceSchema,
@@ -300,6 +312,7 @@ __export(src_exports3, {
300
312
  arraysEqual: () => arraysEqual,
301
313
  arrivalFromParams: () => arrivalFromParams,
302
314
  arrivalToParams: () => arrivalToParams,
315
+ attachmentFailureOfStatus: () => attachmentFailureOfStatus,
303
316
  bareComponentType: () => bareComponentType,
304
317
  buildBaseAttributesConfig: () => buildBaseAttributesConfig,
305
318
  buildBucketLabelsConfig: () => buildBucketLabelsConfig,
@@ -324,7 +337,9 @@ __export(src_exports3, {
324
337
  classifyItemChange: () => classifyItemChange,
325
338
  clearAgentPresence: () => clearAgentPresence,
326
339
  clearCartActionFailures: () => clearCartActionFailures,
340
+ clearCodeDiscountSources: () => clearCodeDiscountSources,
327
341
  clearProductNameLookups: () => clearProductNameLookups,
342
+ clearStoreThemeSources: () => clearStoreThemeSources,
328
343
  clearVariantChoice: () => clearVariantChoice,
329
344
  clientStateEntries: () => clientStateEntries,
330
345
  clientStateVector: () => clientStateVector,
@@ -333,6 +348,7 @@ __export(src_exports3, {
333
348
  collectLayoutGids: () => collectLayoutGids,
334
349
  collectPlacedEntityRefs: () => collectPlacedEntityRefs,
335
350
  colorHexOf: () => colorHexOf,
351
+ commerceLocaleOf: () => commerceLocaleOf,
336
352
  compareSdkVersions: () => compareSdkVersions,
337
353
  compressArray: () => compressArray,
338
354
  compressString: () => compressString,
@@ -347,6 +363,7 @@ __export(src_exports3, {
347
363
  createSessionStorageAdapter: () => createSessionStorageAdapter,
348
364
  createTokenOverlapScorer: () => createTokenOverlapScorer,
349
365
  createUnavailableProduct: () => createUnavailableProduct,
366
+ declaredSpaceLocaleOf: () => declaredSpaceLocaleOf,
350
367
  defineEventKind: () => defineEventKind,
351
368
  derivePropsDoc: () => derivePropsDoc,
352
369
  deriveSourceElement: () => deriveSourceElement,
@@ -384,6 +401,8 @@ __export(src_exports3, {
384
401
  hapticCue: () => hapticCue,
385
402
  hasProse: () => hasProse,
386
403
  hostFillsPage: () => hostFillsPage,
404
+ hostImportProblems: () => hostImportProblems,
405
+ hostImportsRefusal: () => hostImportsRefusal,
387
406
  hostPlace: () => hostPlace,
388
407
  hostingAllows: () => hostingAllows,
389
408
  injectGoogleFonts: () => injectGoogleFonts,
@@ -405,6 +424,8 @@ __export(src_exports3, {
405
424
  isPresenceStreamArtifact: () => isPresenceStreamArtifact,
406
425
  isReservedId: () => isReservedId,
407
426
  isVideoUrl: () => isVideoUrl,
427
+ languageNameOf: () => languageNameOf,
428
+ languageOf: () => languageOf,
408
429
  layoutTopWithin: () => layoutTopWithin,
409
430
  listRegisteredPlatforms: () => listRegisteredPlatforms,
410
431
  listRegisteredServices: () => listRegisteredServices,
@@ -457,6 +478,7 @@ __export(src_exports3, {
457
478
  reducePatch: () => reducePatch,
458
479
  refuseCheckoutHandoff: () => refuseCheckoutHandoff,
459
480
  registerChipRelevanceRule: () => registerChipRelevanceRule,
481
+ registerCodeDiscountSource: () => registerCodeDiscountSource,
460
482
  registerComponent: () => registerComponent,
461
483
  registerEntityPageKind: () => registerEntityPageKind,
462
484
  registerExclusiveOverlay: () => registerExclusiveOverlay,
@@ -470,6 +492,7 @@ __export(src_exports3, {
470
492
  registerProductNameLookup: () => registerProductNameLookup,
471
493
  registerServiceHydrators: () => registerServiceHydrators,
472
494
  registerSessionScopedClear: () => registerSessionScopedClear,
495
+ registerStoreThemeSource: () => registerStoreThemeSource,
473
496
  registeredPageKinds: () => registeredPageKinds,
474
497
  registeredPresenceFactForms: () => registeredPresenceFactForms,
475
498
  registeredPresenceForms: () => registeredPresenceForms,
@@ -481,6 +504,7 @@ __export(src_exports3, {
481
504
  requestVariantChoice: () => requestVariantChoice,
482
505
  requiredTopLevelProps: () => requiredTopLevelProps,
483
506
  resetServerState: () => resetServerState,
507
+ resolveCodeDiscountSource: () => resolveCodeDiscountSource,
484
508
  resolveHydrators: () => resolveHydrators,
485
509
  resolvePresenceFactForm: () => resolvePresenceFactForm,
486
510
  resolvePresenceForm: () => resolvePresenceForm,
@@ -491,6 +515,7 @@ __export(src_exports3, {
491
515
  resolveServiceHydrators: () => resolveServiceHydrators,
492
516
  resolveStanding: () => resolveStanding,
493
517
  resolveStorage: () => resolveStorage,
518
+ resolveStoreThemeSource: () => resolveStoreThemeSource,
494
519
  resolveSwatchColor: () => resolveSwatchColor,
495
520
  resolveType: () => resolveType,
496
521
  resolved: () => resolved,
@@ -516,6 +541,7 @@ __export(src_exports3, {
516
541
  settleArmedCheckoutHandoff: () => settleArmedCheckoutHandoff,
517
542
  settledBlocks: () => settledBlocks,
518
543
  settledCart: () => settledCart,
544
+ spaceLocaleOf: () => spaceLocaleOf,
519
545
  splitAnswer: () => splitAnswer,
520
546
  splitSentences: () => splitSentences,
521
547
  stateSnapshotSignal: () => stateSnapshotSignal,
@@ -526,6 +552,7 @@ __export(src_exports3, {
526
552
  surfaceEmits: () => surfaceEmits,
527
553
  surfaceSuppressionReason: () => surfaceSuppressionReason,
528
554
  text: () => text,
555
+ textDirectionOf: () => textDirectionOf,
529
556
  threadRowAttrs: () => threadRowAttrs,
530
557
  toggleCartDrawer: () => toggleCartDrawer,
531
558
  token: () => token,
@@ -606,6 +633,7 @@ __export(src_exports3, {
606
633
  useHasLeftSeedHome: () => useHasLeftSeedHome,
607
634
  useHistoryNav: () => useHistoryNav,
608
635
  useHydrated: () => useHydrated,
636
+ useHydrationNotice: () => useHydrationNotice,
609
637
  useHydrationState: () => useHydrationState,
610
638
  useHydrators: () => useHydrators,
611
639
  useInlineCompletion: () => useInlineCompletion,
@@ -660,10 +688,12 @@ __export(src_exports3, {
660
688
  useSessionState: () => useSessionState,
661
689
  useShellRegistry: () => useShellRegistry,
662
690
  useShellRoot: () => useShellRoot,
691
+ useSpaceLocale: () => useSpaceLocale,
663
692
  useStandingOfType: () => useStandingOfType,
664
693
  useStream: () => useStream,
665
694
  useSuccessFlash: () => useSuccessFlash,
666
695
  useSuggestionsWithDefaults: () => useSuggestionsWithDefaults,
696
+ useTextDirection: () => useTextDirection,
667
697
  useThreadJumpMarks: () => useThreadJumpMarks,
668
698
  useThreadLanding: () => useThreadLanding,
669
699
  useThreadRows: () => useThreadRows,
@@ -1438,6 +1468,8 @@ function useOptionalAnalyticsSink() {
1438
1468
  var session_exports = {};
1439
1469
  __export(session_exports, {
1440
1470
  FourtySessionContext: () => FourtySessionContext,
1471
+ SpaceLocaleProvider: () => SpaceLocaleProvider,
1472
+ commerceLocaleOf: () => commerceLocaleOf,
1441
1473
  getVisitorLocale: () => getVisitorLocale,
1442
1474
  registerSessionScopedClear: () => registerSessionScopedClear,
1443
1475
  runSessionScopedClearHandlers: () => runSessionScopedClearHandlers,
@@ -1445,6 +1477,8 @@ __export(session_exports, {
1445
1477
  useComposerDraft: () => useComposerDraft,
1446
1478
  useFourtySession: () => useFourtySession,
1447
1479
  useOptionalFourtySession: () => useOptionalFourtySession,
1480
+ useSpaceLocale: () => useSpaceLocale,
1481
+ useTextDirection: () => useTextDirection,
1448
1482
  withSignalTurn: () => withSignalTurn
1449
1483
  });
1450
1484
 
@@ -1470,6 +1504,7 @@ __export(src_exports, {
1470
1504
  AgentSignalSchema: () => AgentSignalSchema,
1471
1505
  AttachmentRefSchema: () => AttachmentRefSchema,
1472
1506
  AttachmentRefsSchema: () => AttachmentRefsSchema,
1507
+ AttachmentUploadError: () => AttachmentUploadError,
1473
1508
  AttributeDefSchema: () => AttributeDefSchema,
1474
1509
  AttributeScopeBucketSchema: () => AttributeScopeBucketSchema,
1475
1510
  AttributeScopeConfigSchema: () => AttributeScopeConfigSchema,
@@ -1504,6 +1539,7 @@ __export(src_exports, {
1504
1539
  CreateTraceInputSchema: () => CreateTraceInputSchema,
1505
1540
  DEFAULT_HOSTING: () => DEFAULT_HOSTING,
1506
1541
  DEFAULT_SPACE_CONFIG: () => DEFAULT_SPACE_CONFIG,
1542
+ DEFAULT_SPACE_LOCALE: () => DEFAULT_SPACE_LOCALE,
1507
1543
  DEFAULT_VISITOR_ACCESS: () => DEFAULT_VISITOR_ACCESS,
1508
1544
  DIRECTION_FLOW: () => DIRECTION_FLOW,
1509
1545
  DirectiveValueSchema: () => DirectiveValueSchema,
@@ -1525,6 +1561,8 @@ __export(src_exports, {
1525
1561
  FocusElementPayloadSchema: () => FocusElementPayloadSchema,
1526
1562
  HOST_CLEARED: () => HOST_CLEARED,
1527
1563
  HostClearedSchema: () => HostClearedSchema,
1564
+ HostExportsSchema: () => HostExportsSchema,
1565
+ HostImportsSchema: () => HostImportsSchema,
1528
1566
  HostPayloadSchema: () => HostPayloadSchema,
1529
1567
  InteractionSignalSchema: () => InteractionSignalSchema,
1530
1568
  JSON_PATCH_OPS: () => JSON_PATCH_OPS,
@@ -1535,6 +1573,7 @@ __export(src_exports, {
1535
1573
  LlmUsageDailySchema: () => LlmUsageDailySchema,
1536
1574
  MAX_ACTIVE_AGENT_DIRECTIVES: () => MAX_ACTIVE_AGENT_DIRECTIVES,
1537
1575
  MAX_ATTACHMENT_BYTES: () => MAX_ATTACHMENT_BYTES,
1576
+ MAX_ATTACHMENT_MB: () => MAX_ATTACHMENT_MB,
1538
1577
  MAX_VISITOR_PROMPT_CHARS: () => MAX_VISITOR_PROMPT_CHARS,
1539
1578
  MIN_WIRE_PROTOCOL_VERSION: () => MIN_WIRE_PROTOCOL_VERSION,
1540
1579
  MOBILE_VIEWPORT_MAX: () => MOBILE_VIEWPORT_MAX,
@@ -1556,10 +1595,12 @@ __export(src_exports, {
1556
1595
  ProjectionPreferencesSchema: () => ProjectionPreferencesSchema,
1557
1596
  ProjectionSetPayloadSchema: () => ProjectionSetPayloadSchema,
1558
1597
  REFERRER_HOST_PARAM: () => REFERRER_HOST_PARAM,
1598
+ RELEASE_MESSAGE_MAX: () => RELEASE_MESSAGE_MAX,
1559
1599
  RESERVED_IDS: () => RESERVED_IDS,
1560
1600
  RESERVED_ID_SET: () => RESERVED_ID_SET,
1561
1601
  RecordVerdictInputSchema: () => RecordVerdictInputSchema,
1562
1602
  RecordableVerdictSchema: () => RecordableVerdictSchema,
1603
+ ReleaseMessageSchema: () => ReleaseMessageSchema,
1563
1604
  ReorderAgentDirectivesInputSchema: () => ReorderAgentDirectivesInputSchema,
1564
1605
  SDK_SHIMS: () => SDK_SHIMS,
1565
1606
  SDK_VERSION_PATTERN: () => SDK_VERSION_PATTERN,
@@ -1568,6 +1609,7 @@ __export(src_exports, {
1568
1609
  SOCKET_TICKET_PARAM: () => SOCKET_TICKET_PARAM,
1569
1610
  STRUCTURAL_BASELINE_CATALOG: () => STRUCTURAL_BASELINE_CATALOG,
1570
1611
  STRUCTURAL_BASELINE_TYPES: () => STRUCTURAL_BASELINE_TYPES,
1612
+ SUPPORTED_SPACE_LOCALES: () => SUPPORTED_SPACE_LOCALES,
1571
1613
  SURFACES: () => SURFACES,
1572
1614
  SdkVersionSchema: () => SdkVersionSchema,
1573
1615
  SessionActivityEventSchema: () => SessionActivityEventSchema,
@@ -1593,6 +1635,7 @@ __export(src_exports, {
1593
1635
  SpaceAgentDirectiveSchema: () => SpaceAgentDirectiveSchema,
1594
1636
  SpaceBrandMarkSchema: () => SpaceBrandMarkSchema,
1595
1637
  SpaceBugSchema: () => SpaceBugSchema,
1638
+ SpaceLocaleSchema: () => SpaceLocaleSchema,
1596
1639
  SpecSchema: () => SpecSchema,
1597
1640
  StateSnapshotFrameSchema: () => StateSnapshotFrameSchema,
1598
1641
  SuggestionActionSchema: () => SuggestionActionSchema,
@@ -1634,6 +1677,7 @@ __export(src_exports, {
1634
1677
  applySinglePatch: () => applySinglePatch,
1635
1678
  arrivalFromParams: () => arrivalFromParams,
1636
1679
  arrivalToParams: () => arrivalToParams,
1680
+ attachmentFailureOfStatus: () => attachmentFailureOfStatus,
1637
1681
  bareComponentType: () => bareComponentType,
1638
1682
  canonicalOptionValue: () => canonicalOptionValue,
1639
1683
  carriesShapeToken: () => carriesShapeToken,
@@ -1645,6 +1689,7 @@ __export(src_exports, {
1645
1689
  compressArray: () => compressArray,
1646
1690
  compressString: () => compressString,
1647
1691
  createTokenOverlapScorer: () => createTokenOverlapScorer,
1692
+ declaredSpaceLocaleOf: () => declaredSpaceLocaleOf,
1648
1693
  derivePropsDoc: () => derivePropsDoc,
1649
1694
  derivedSourceFilled: () => derivedSourceFilled,
1650
1695
  diffLayouts: () => diffLayouts,
@@ -1656,6 +1701,8 @@ __export(src_exports, {
1656
1701
  getProsePaths: () => getProsePaths,
1657
1702
  getResolvedPaths: () => getResolvedPaths,
1658
1703
  hostFillsPage: () => hostFillsPage,
1704
+ hostImportProblems: () => hostImportProblems,
1705
+ hostImportsRefusal: () => hostImportsRefusal,
1659
1706
  hostPlace: () => hostPlace,
1660
1707
  hostingAllows: () => hostingAllows,
1661
1708
  isActiveDirective: () => isActiveDirective,
@@ -1668,6 +1715,8 @@ __export(src_exports, {
1668
1715
  isLateBound: () => isLateBound,
1669
1716
  isOptionalTopLevelProp: () => isOptionalTopLevelProp,
1670
1717
  isReservedId: () => isReservedId,
1718
+ languageNameOf: () => languageNameOf,
1719
+ languageOf: () => languageOf,
1671
1720
  namespaceFromSnapshotSignal: () => namespaceFromSnapshotSignal,
1672
1721
  normalizeAttributeField: () => normalizeAttributeField,
1673
1722
  normalizeRefs: () => normalizeRefs,
@@ -1699,9 +1748,11 @@ __export(src_exports, {
1699
1748
  sdkShimsFor: () => sdkShimsFor,
1700
1749
  sdkWindowProblem: () => sdkWindowProblem,
1701
1750
  settledBlocks: () => settledBlocks,
1751
+ spaceLocaleOf: () => spaceLocaleOf,
1702
1752
  splitSentences: () => splitSentences,
1703
1753
  stateSnapshotSignal: () => stateSnapshotSignal,
1704
1754
  statedValueVerdict: () => statedValueVerdict,
1755
+ textDirectionOf: () => textDirectionOf,
1705
1756
  tokenize: () => tokenize,
1706
1757
  turnAskAnswers: () => turnAskAnswers,
1707
1758
  turnAskFromSignal: () => turnAskFromSignal,
@@ -3434,7 +3485,7 @@ function catalogFromWire(wire) {
3434
3485
  }
3435
3486
 
3436
3487
  // ../spacestation/src/catalog/wire/package-release.ts
3437
- import { z as z27 } from "zod";
3488
+ import { z as z28 } from "zod";
3438
3489
 
3439
3490
  // ../spacestation/src/catalog/wire/brand-mark.ts
3440
3491
  import { z as z25 } from "zod";
@@ -3503,17 +3554,42 @@ function sdkWindowProblem(builtWithSdk, platformSdk) {
3503
3554
  return null;
3504
3555
  }
3505
3556
 
3557
+ // ../spacestation/src/catalog/wire/host-imports.ts
3558
+ import { z as z27 } from "zod";
3559
+ var SpecifierSchema = z27.string().min(1).max(200);
3560
+ var HostImportsSchema = z27.record(SpecifierSchema, z27.array(z27.string().min(1).max(200)).max(5e3));
3561
+ var HostExportsSchema = z27.record(SpecifierSchema, z27.array(z27.string()));
3562
+ function hostImportProblems(imports, provided) {
3563
+ const problems = [];
3564
+ for (const [specifier, names] of Object.entries(imports)) {
3565
+ const exported = Object.hasOwn(provided, specifier) ? provided[specifier] : void 0;
3566
+ if (exported === void 0) {
3567
+ problems.push(`${specifier} (not provided)`);
3568
+ continue;
3569
+ }
3570
+ const have = new Set(exported);
3571
+ for (const name of names) if (!have.has(name)) problems.push(`${specifier} \u2192 ${name}`);
3572
+ }
3573
+ return problems;
3574
+ }
3575
+ function hostImportsRefusal(commit) {
3576
+ const where = commit === null ? "this deployment" : `this deployment (commit ${commit.slice(0, 12)})`;
3577
+ return `The bundle imports what ${where} does not provide \u2014 build against the @40rty/ams-* versions it serves, or wait for the platform to ship them`;
3578
+ }
3579
+
3506
3580
  // ../spacestation/src/catalog/wire/package-release.ts
3507
3581
  var RESERVED_SCOPES = ["@fourty/", "@40rty/"];
3508
3582
  var BUNDLE_ASSET_PATH = /^assets\/[A-Za-z0-9_-]+\.(woff2?|ttf|otf|png|jpe?g|svg|gif|webp)$/;
3509
- var PackageReleaseSchema = z27.object({
3583
+ var RELEASE_MESSAGE_MAX = 140;
3584
+ var ReleaseMessageSchema = z28.string().trim().min(1, "say what this release changes").max(RELEASE_MESSAGE_MAX, `keep the message to one line of ${RELEASE_MESSAGE_MAX} characters or fewer`);
3585
+ var PackageReleaseSchema = z28.object({
3510
3586
  /** The id spaces name in `componentSources` — an npm-style package name. */
3511
- 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`),
3512
- label: z27.string().min(1).max(120),
3587
+ sourceId: z28.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`),
3588
+ label: z28.string().min(1).max(120),
3513
3589
  /** The package's own version, as its repository states it — shown in the console. */
3514
- version: z27.string().min(1).max(40),
3590
+ version: z28.string().min(1).max(40),
3515
3591
  /** What this release changed, in the publisher's words (`forty publish --message`) — shown in the console's version list. */
3516
- description: z27.string().min(1).max(500).optional(),
3592
+ description: z28.string().min(1).max(500).optional(),
3517
3593
  /**
3518
3594
  * The `@40rty/ams-sdk` version the brand project resolved when `forty
3519
3595
  * publish` built this release. A bundle takes the sdk from the page at
@@ -3522,9 +3598,18 @@ var PackageReleaseSchema = z27.object({
3522
3598
  * published before the stamp existed — those are legacy.
3523
3599
  */
3524
3600
  builtWithSdk: SdkVersionSchema.optional(),
3601
+ /**
3602
+ * Every name the bundle reads from each module it takes from the page
3603
+ * (`host-imports.ts`) — what lets the platform refuse a bundle it cannot
3604
+ * run. Sent by `forty publish` / `forty dev` with every bundle; absent on
3605
+ * releases built before it existed, which are admitted (and logged). Kept
3606
+ * beside the release, not in the bundle, so a rollback can check it without
3607
+ * fetching the components.
3608
+ */
3609
+ hostImports: HostImportsSchema.optional(),
3525
3610
  catalog: WireCatalogSchema,
3526
3611
  /** Component manifests by path under `catalogs/`, e.g. `catalogs/product/productGrid.md`. */
3527
- manifests: z27.record(z27.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z27.string()),
3612
+ manifests: z28.record(z28.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z28.string()),
3528
3613
  /**
3529
3614
  * The brand's components, built — present when the PLATFORM hosts this
3530
3615
  * brand's spacefront, absent when the brand hosts it in its own app. One
@@ -3533,17 +3618,17 @@ var PackageReleaseSchema = z27.object({
3533
3618
  * images — base64, keyed by the path the stylesheet's `url()` names, beside
3534
3619
  * it). It is served to browsers; the platform's servers never run it.
3535
3620
  */
3536
- bundle: z27.object({
3537
- js: z27.string().min(1),
3538
- css: z27.string(),
3539
- assets: z27.record(z27.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z27.string().base64()).optional()
3621
+ bundle: z28.object({
3622
+ js: z28.string().min(1),
3623
+ css: z28.string(),
3624
+ assets: z28.record(z28.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z28.string().base64()).optional()
3540
3625
  }).strict().optional(),
3541
3626
  /**
3542
3627
  * The class the spacefront root carries while this package is the space's.
3543
3628
  * The package's own stylesheet styles under it. Absent = the platform's
3544
3629
  * default theme class.
3545
3630
  */
3546
- theme: z27.object({ themeClass: z27.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
3631
+ theme: z28.object({ themeClass: z28.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
3547
3632
  /**
3548
3633
  * The brand's mark (`brand-mark.ts`). Sent as the files themselves; the
3549
3634
  * platform stores them content-addressed at ingest and keeps only their
@@ -3556,7 +3641,7 @@ var PackageReleaseSchema = z27.object({
3556
3641
  * The package's own composition guidance for its own components — prompt
3557
3642
  * markdown the agent reads, gated on the capabilities it names (`requires`).
3558
3643
  */
3559
- 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(),
3644
+ promptSections: z28.array(z28.object({ id: z28.string().regex(/^[a-z0-9-]+$/), order: z28.number().int(), content: z28.string().min(1).max(2e4), requires: z28.array(z28.string()) }).strict()).max(10).optional(),
3560
3645
  /**
3561
3646
  * The brand's SPACE prompt — its `prompts/space.md`, verbatim: sections split
3562
3647
  * by `<!-- section:<id> -->` markers, the same format as the platform's
@@ -3564,17 +3649,17 @@ var PackageReleaseSchema = z27.object({
3564
3649
  * package. How the brand speaks, what it sells and what it never claims ship
3565
3650
  * with the brand, and a release changes them with no platform deploy.
3566
3651
  */
3567
- spacePrompt: z27.string().min(1).max(2e5).optional(),
3652
+ spacePrompt: z28.string().min(1).max(2e5).optional(),
3568
3653
  /**
3569
3654
  * Opaque per-vertical extension data (`BrandDefinition.config`): the
3570
3655
  * platform stays vertical-agnostic and the vertical's own code reads its keys.
3571
3656
  */
3572
- config: z27.record(z27.string(), z27.unknown()).optional(),
3657
+ config: z28.record(z28.string(), z28.unknown()).optional(),
3573
3658
  /**
3574
3659
  * Set by the platform, never by a publisher: this release is a DRAFT of the
3575
3660
  * package `of`, previewed on the space `space`. See `draftSourceId`.
3576
3661
  */
3577
- draft: z27.object({ of: z27.string().min(1), space: z27.string().min(1) }).strict().optional()
3662
+ draft: z28.object({ of: z28.string().min(1), space: z28.string().min(1) }).strict().optional()
3578
3663
  }).strict();
3579
3664
  var DRAFT_SEPARATOR = "--";
3580
3665
  function draftSourceId(sourceId, spaceSlug, developer) {
@@ -3593,49 +3678,49 @@ function parseReleasePreview(id) {
3593
3678
  }
3594
3679
 
3595
3680
  // ../spacestation/src/catalog/wire/package-bundle-ref.ts
3596
- import { z as z28 } from "zod";
3597
- var PackageBundleRefSchema = z28.object({
3598
- sourceId: z28.string(),
3599
- js: z28.string(),
3600
- css: z28.string(),
3681
+ import { z as z29 } from "zod";
3682
+ var PackageBundleRefSchema = z29.object({
3683
+ sourceId: z29.string(),
3684
+ js: z29.string(),
3685
+ css: z29.string(),
3601
3686
  /** The brand's name for itself, and its package's version. */
3602
- label: z28.string(),
3603
- version: z28.string(),
3687
+ label: z29.string(),
3688
+ version: z29.string(),
3604
3689
  /** The sdk the bundle was built against (`PackageRelease.builtWithSdk`) — absent for a legacy release. Picks its compat shims. */
3605
3690
  builtWithSdk: SdkVersionSchema.optional()
3606
3691
  });
3607
3692
 
3608
3693
  // ../spacestation/src/projection/projection.ts
3609
- import { z as z29 } from "zod";
3610
- var LateBoundValueSchema = z29.object({ fact: z29.literal(true) });
3611
- var DirectiveValueSchema = z29.union([
3612
- z29.string(),
3613
- z29.number(),
3614
- z29.boolean(),
3694
+ import { z as z30 } from "zod";
3695
+ var LateBoundValueSchema = z30.object({ fact: z30.literal(true) });
3696
+ var DirectiveValueSchema = z30.union([
3697
+ z30.string(),
3698
+ z30.number(),
3699
+ z30.boolean(),
3615
3700
  LateBoundValueSchema
3616
3701
  ]);
3617
3702
  function isLateBound(v) {
3618
3703
  return typeof v === "object" && v !== null && "fact" in v;
3619
3704
  }
3620
- var ProjectionDirectiveSchema = z29.object({
3705
+ var ProjectionDirectiveSchema = z30.object({
3621
3706
  /** Keep only items whose axis values all match. Keyed by axis name
3622
3707
  * (e.g. `Size`); value is a literal or the `{fact:true}` marker. */
3623
- isolateTo: z29.record(DirectiveValueSchema).optional(),
3708
+ isolateTo: z30.record(DirectiveValueSchema).optional(),
3624
3709
  /** Isolate to EVERY axis the visitor has a stored fact for. The agent
3625
3710
  * emits this (it is vertical-agnostic — it cannot name axes); the
3626
3711
  * entity binding expands it against the entity's own axes + facts. */
3627
- isolateToFacts: z29.boolean().optional(),
3712
+ isolateToFacts: z30.boolean().optional(),
3628
3713
  /** Keep only items the entity binding reports as available. */
3629
- availableOnly: z29.boolean().optional(),
3714
+ availableOnly: z30.boolean().optional(),
3630
3715
  /** Cap the rendered count after filtering. */
3631
- limit: z29.number().int().positive().optional()
3716
+ limit: z30.number().int().positive().optional()
3632
3717
  });
3633
- var ProjectionPreferencesSchema = z29.record(
3634
- z29.union([ProjectionDirectiveSchema, z29.null()])
3718
+ var ProjectionPreferencesSchema = z30.record(
3719
+ z30.union([ProjectionDirectiveSchema, z30.null()])
3635
3720
  );
3636
3721
  var PROJECTION_SET_SIGNAL = "projection.set";
3637
- var ProjectionSetPayloadSchema = z29.object({
3638
- setAll: z29.union([ProjectionDirectiveSchema, z29.null()]).optional(),
3722
+ var ProjectionSetPayloadSchema = z30.object({
3723
+ setAll: z30.union([ProjectionDirectiveSchema, z30.null()]).optional(),
3639
3724
  set: ProjectionPreferencesSchema.optional()
3640
3725
  });
3641
3726
  function norm(v) {
@@ -3669,14 +3754,14 @@ function isActiveDirective(directive) {
3669
3754
  }
3670
3755
 
3671
3756
  // ../spacestation/src/host/host-page.ts
3672
- import { z as z30 } from "zod";
3757
+ import { z as z31 } from "zod";
3673
3758
  var VIEW_HOST_SIGNAL = "view.host";
3674
- var HostPayloadSchema = z30.object({
3759
+ var HostPayloadSchema = z31.object({
3675
3760
  page: PageSchema.nullable(),
3676
- maxSections: z30.number().int().positive().nullable(),
3677
- surface: z30.enum(["page", "slot"])
3761
+ maxSections: z31.number().int().positive().nullable(),
3762
+ surface: z31.enum(["page", "slot"])
3678
3763
  });
3679
- var HostClearedSchema = z30.object({ cleared: z30.literal(true) });
3764
+ var HostClearedSchema = z31.object({ cleared: z31.literal(true) });
3680
3765
  var HOST_CLEARED = { cleared: true };
3681
3766
  function hostFillsPage(host) {
3682
3767
  return host.surface === "page";
@@ -3690,23 +3775,23 @@ function pagePlace(page) {
3690
3775
  }
3691
3776
 
3692
3777
  // ../spacestation/src/focus/focus.ts
3693
- import { z as z31 } from "zod";
3778
+ import { z as z32 } from "zod";
3694
3779
  var VIEW_FOCUS_ELEMENT_SIGNAL = "view.focus.element";
3695
- var FocusElementPayloadSchema = z31.object({
3696
- elementId: z31.string().min(1)
3780
+ var FocusElementPayloadSchema = z32.object({
3781
+ elementId: z32.string().min(1)
3697
3782
  });
3698
3783
 
3699
3784
  // ../spacestation/src/view/continuation.ts
3700
- import { z as z32 } from "zod";
3785
+ import { z as z33 } from "zod";
3701
3786
  var VIEW_EXTEND_SIGNAL = "view.extend";
3702
- var ViewExtendPayloadSchema = z32.object({
3703
- reason: z32.enum(["scroll_near_bottom"])
3787
+ var ViewExtendPayloadSchema = z33.object({
3788
+ reason: z33.enum(["scroll_near_bottom"])
3704
3789
  });
3705
3790
  var VIEW_EXHAUSTED_SIGNAL = "view.exhausted";
3706
3791
  var CONTINUATION_ENABLED = false;
3707
3792
 
3708
3793
  // ../spacestation/src/attachment/attachment.ts
3709
- import { z as z33 } from "zod";
3794
+ import { z as z34 } from "zod";
3710
3795
  var ALLOWED_ATTACHMENT_TYPES = [
3711
3796
  "image/jpeg",
3712
3797
  "image/png",
@@ -3721,36 +3806,52 @@ function isAllowedAttachmentType(mime) {
3721
3806
  function isImageAttachment(mime) {
3722
3807
  return mime.startsWith("image/");
3723
3808
  }
3724
- var AttachmentRefSchema = z33.object({
3809
+ var AttachmentRefSchema = z34.object({
3725
3810
  // A UUID, as `storeAttachment` mints it: the id becomes a storage path segment,
3726
3811
  // so nothing else — no `/`, no `..` — may reach that lookup.
3727
- id: z33.string().uuid(),
3728
- mimeType: z33.string().refine(isAllowedAttachmentType, {
3812
+ id: z34.string().uuid(),
3813
+ mimeType: z34.string().refine(isAllowedAttachmentType, {
3729
3814
  message: "mimeType not on the attachment allow-list"
3730
3815
  }),
3731
- name: z33.string().min(1),
3732
- size: z33.number().int().positive().max(MAX_ATTACHMENT_BYTES),
3733
- url: z33.string().min(1)
3816
+ name: z34.string().min(1),
3817
+ size: z34.number().int().positive().max(MAX_ATTACHMENT_BYTES),
3818
+ url: z34.string().min(1)
3734
3819
  });
3735
- var AttachmentRefsSchema = z33.array(AttachmentRefSchema);
3820
+ var AttachmentRefsSchema = z34.array(AttachmentRefSchema);
3821
+
3822
+ // ../spacestation/src/attachment/attachment-failure.ts
3823
+ var MAX_ATTACHMENT_MB = Math.round(MAX_ATTACHMENT_BYTES / (1024 * 1024));
3824
+ var AttachmentUploadError = class extends Error {
3825
+ constructor(failure, detail) {
3826
+ super(detail);
3827
+ this.failure = failure;
3828
+ this.name = "AttachmentUploadError";
3829
+ }
3830
+ };
3831
+ function attachmentFailureOfStatus(status, mimeType) {
3832
+ if (status === 400) return { kind: "empty" };
3833
+ if (status === 413) return { kind: "too_large", maxMb: MAX_ATTACHMENT_MB };
3834
+ if (status === 415) return { kind: "unsupported_type", mimeType };
3835
+ return { kind: "upload_failed" };
3836
+ }
3736
3837
 
3737
3838
  // ../spacestation/src/contracts/entry-context.ts
3738
- import { z as z34 } from "zod";
3839
+ import { z as z35 } from "zod";
3739
3840
  var ENTRY_CONTEXT_MAX_VALUE_CHARS = 200;
3740
3841
  var ENTRY_CONTEXT_MAX_KEYS = 12;
3741
3842
  var ENTRY_CONTEXT_MAX_NAMESPACES = 8;
3742
3843
  var ENTRY_CONTEXT_MAX_NAME_CHARS = 64;
3743
- var EntryContextValueSchema = z34.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
3744
- var EntryContextNameSchema = z34.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
3745
- var EntryContextNamespaceSchema = z34.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries3) => Object.keys(entries3).length <= ENTRY_CONTEXT_MAX_KEYS, {
3844
+ var EntryContextValueSchema = z35.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
3845
+ var EntryContextNameSchema = z35.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
3846
+ var EntryContextNamespaceSchema = z35.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries3) => Object.keys(entries3).length <= ENTRY_CONTEXT_MAX_KEYS, {
3746
3847
  message: `at most ${ENTRY_CONTEXT_MAX_KEYS} entries per namespace`
3747
3848
  });
3748
- var EntryContextSchema = z34.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
3849
+ var EntryContextSchema = z35.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
3749
3850
  message: `at most ${ENTRY_CONTEXT_MAX_NAMESPACES} entry-context namespaces`
3750
3851
  });
3751
3852
 
3752
3853
  // ../spacestation/src/contracts/session-arrival.ts
3753
- import { z as z35 } from "zod";
3854
+ import { z as z36 } from "zod";
3754
3855
  var SURFACES = [
3755
3856
  "spacefront",
3756
3857
  "embed",
@@ -3760,11 +3861,11 @@ var SURFACES = [
3760
3861
  "playground",
3761
3862
  "automation"
3762
3863
  ];
3763
- var SurfaceSchema = z35.enum(SURFACES);
3864
+ var SurfaceSchema = z36.enum(SURFACES);
3764
3865
  var CLICK_ID_KINDS = ["gclid", "fbclid", "msclkid", "wbraid", "gbraid"];
3765
- var ClickIdKindSchema = z35.enum(CLICK_ID_KINDS);
3866
+ var ClickIdKindSchema = z36.enum(CLICK_ID_KINDS);
3766
3867
  var VISITOR_ID_DURABILITIES = ["persisted", "ephemeral", "host_supplied"];
3767
- var VisitorIdDurabilitySchema = z35.enum(VISITOR_ID_DURABILITIES);
3868
+ var VisitorIdDurabilitySchema = z36.enum(VISITOR_ID_DURABILITIES);
3768
3869
  var TRAFFIC_BUCKETS = [
3769
3870
  "paid_google",
3770
3871
  "paid_meta",
@@ -3776,10 +3877,10 @@ var TRAFFIC_BUCKETS = [
3776
3877
  "direct",
3777
3878
  "unknown"
3778
3879
  ];
3779
- var TrafficBucketSchema = z35.enum(TRAFFIC_BUCKETS);
3880
+ var TrafficBucketSchema = z36.enum(TRAFFIC_BUCKETS);
3780
3881
  var ARRIVAL_MAX_VALUE_CHARS = 200;
3781
- var ArrivalValueSchema = z35.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
3782
- var SessionArrivalSchema = z35.object({
3882
+ var ArrivalValueSchema = z36.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
3883
+ var SessionArrivalSchema = z36.object({
3783
3884
  utmSource: ArrivalValueSchema.optional(),
3784
3885
  utmMedium: ArrivalValueSchema.optional(),
3785
3886
  utmCampaign: ArrivalValueSchema.optional(),
@@ -3875,36 +3976,36 @@ var WIRE_PROTOCOL_PARAM = "protocol";
3875
3976
  var WIRE_PROTOCOL_UNSUPPORTED_CLOSE = 4426;
3876
3977
 
3877
3978
  // ../spacestation/src/catalog/attribute-registry.ts
3878
- import { z as z36 } from "zod";
3879
- var AttributeScopeBucketSchema = z36.object({
3880
- scope: z36.string(),
3881
- needles: z36.array(z36.string()).readonly(),
3882
- label: z36.string().optional()
3979
+ import { z as z37 } from "zod";
3980
+ var AttributeScopeBucketSchema = z37.object({
3981
+ scope: z37.string(),
3982
+ needles: z37.array(z37.string()).readonly(),
3983
+ label: z37.string().optional()
3883
3984
  });
3884
- var AttributeScopeConfigSchema = z36.object({
3885
- facet: z36.string(),
3886
- buckets: z36.array(AttributeScopeBucketSchema).readonly(),
3887
- emptyScope: z36.string(),
3888
- noMatchScope: z36.string(),
3889
- ignoreValues: z36.array(z36.string()).readonly(),
3890
- emptyScopeLabel: z36.string().optional(),
3891
- noMatchScopeLabel: z36.string().optional()
3985
+ var AttributeScopeConfigSchema = z37.object({
3986
+ facet: z37.string(),
3987
+ buckets: z37.array(AttributeScopeBucketSchema).readonly(),
3988
+ emptyScope: z37.string(),
3989
+ noMatchScope: z37.string(),
3990
+ ignoreValues: z37.array(z37.string()).readonly(),
3991
+ emptyScopeLabel: z37.string().optional(),
3992
+ noMatchScopeLabel: z37.string().optional()
3892
3993
  });
3893
- var AttributeDefBaseSchema = z36.object({
3894
- description: z36.string().optional(),
3895
- durable: z36.boolean().optional(),
3896
- label: z36.string().optional()
3994
+ var AttributeDefBaseSchema = z37.object({
3995
+ description: z37.string().optional(),
3996
+ durable: z37.boolean().optional(),
3997
+ label: z37.string().optional()
3897
3998
  });
3898
- var AttributeDefSchema = z36.discriminatedUnion("kind", [
3899
- AttributeDefBaseSchema.extend({ kind: z36.literal("enum"), values: z36.array(z36.string()) }),
3900
- AttributeDefBaseSchema.extend({ kind: z36.literal("free_text") }),
3901
- AttributeDefBaseSchema.extend({ kind: z36.literal("date_or_season") }),
3902
- AttributeDefBaseSchema.extend({ kind: z36.literal("money_or_band") }),
3999
+ var AttributeDefSchema = z37.discriminatedUnion("kind", [
4000
+ AttributeDefBaseSchema.extend({ kind: z37.literal("enum"), values: z37.array(z37.string()) }),
4001
+ AttributeDefBaseSchema.extend({ kind: z37.literal("free_text") }),
4002
+ AttributeDefBaseSchema.extend({ kind: z37.literal("date_or_season") }),
4003
+ AttributeDefBaseSchema.extend({ kind: z37.literal("money_or_band") }),
3903
4004
  AttributeDefBaseSchema.extend({
3904
- kind: z36.literal("number"),
3905
- min: z36.number().optional(),
3906
- max: z36.number().optional(),
3907
- unit: z36.string().optional()
4005
+ kind: z37.literal("number"),
4006
+ min: z37.number().optional(),
4007
+ max: z37.number().optional(),
4008
+ unit: z37.string().optional()
3908
4009
  })
3909
4010
  ]);
3910
4011
  var EXTRAS_PREFIX = "extras.";
@@ -3943,49 +4044,88 @@ function scopeOfAttributeKey(config, key) {
3943
4044
  }
3944
4045
 
3945
4046
  // ../spacestation/src/space/agent-directive.ts
3946
- import { z as z37 } from "zod";
4047
+ import { z as z38 } from "zod";
3947
4048
  var MAX_ACTIVE_AGENT_DIRECTIVES = 12;
3948
4049
  var AGENT_DIRECTIVE_KINDS = ["preference", "pairing", "order of things", "promise", "threshold"];
3949
4050
  var AGENT_DIRECTIVE_SEVERITIES = ["a missed opportunity", "a problem", "unacceptable"];
3950
4051
  var AGENT_DIRECTIVE_SOURCES = ["owner", "operator", "session-lesson"];
3951
4052
  var AGENT_DIRECTIVE_STATUSES = ["proposed", "active", "rejected", "retired"];
3952
- var AgentDirectiveSchema = z37.object({
3953
- name: z37.string().trim().min(1).max(80),
3954
- kind: z37.enum(AGENT_DIRECTIVE_KINDS),
3955
- severity: z37.enum(AGENT_DIRECTIVE_SEVERITIES),
4053
+ var AgentDirectiveSchema = z38.object({
4054
+ name: z38.string().trim().min(1).max(80),
4055
+ kind: z38.enum(AGENT_DIRECTIVE_KINDS),
4056
+ severity: z38.enum(AGENT_DIRECTIVE_SEVERITIES),
3956
4057
  /** No bare URL: a URL is a hallucination surface, and a handle is not a
3957
4058
  * product name. */
3958
- text: z37.string().trim().min(1).max(1e3).refine((t) => !/https?:\/\//.test(t), "a directive names things by name, never by URL")
4059
+ text: z38.string().trim().min(1).max(1e3).refine((t) => !/https?:\/\//.test(t), "a directive names things by name, never by URL")
3959
4060
  }).strict();
3960
- var SpaceAgentDirectiveSchema = z37.object({
3961
- id: z37.string(),
3962
- position: z37.number().int(),
3963
- name: z37.string(),
3964
- kind: z37.enum(AGENT_DIRECTIVE_KINDS),
3965
- severity: z37.enum(AGENT_DIRECTIVE_SEVERITIES),
3966
- text: z37.string(),
3967
- source: z37.enum(AGENT_DIRECTIVE_SOURCES),
3968
- status: z37.enum(AGENT_DIRECTIVE_STATUSES),
4061
+ var SpaceAgentDirectiveSchema = z38.object({
4062
+ id: z38.string(),
4063
+ position: z38.number().int(),
4064
+ name: z38.string(),
4065
+ kind: z38.enum(AGENT_DIRECTIVE_KINDS),
4066
+ severity: z38.enum(AGENT_DIRECTIVE_SEVERITIES),
4067
+ text: z38.string(),
4068
+ source: z38.enum(AGENT_DIRECTIVE_SOURCES),
4069
+ status: z38.enum(AGENT_DIRECTIVE_STATUSES),
3969
4070
  /** Who wrote it; null for a lesson the system proposed. */
3970
- createdBy: z37.string().nullable(),
4071
+ createdBy: z38.string().nullable(),
3971
4072
  /** Why a mined lesson was proposed; null for a directive a person wrote. */
3972
- evidence: z37.record(z37.unknown()).nullable(),
3973
- decidedBy: z37.string().nullable(),
3974
- decidedAt: z37.string().nullable(),
3975
- createdAt: z37.string()
4073
+ evidence: z38.record(z38.unknown()).nullable(),
4074
+ decidedBy: z38.string().nullable(),
4075
+ decidedAt: z38.string().nullable(),
4076
+ createdAt: z38.string()
3976
4077
  });
3977
- var OutcomeTallySchema = z37.object({ turns: z37.number().int(), acted: z37.number().int() });
4078
+ var OutcomeTallySchema = z38.object({ turns: z38.number().int(), acted: z38.number().int() });
3978
4079
  var SpaceAgentDirectiveListItemSchema = SpaceAgentDirectiveSchema.extend({
3979
- impact: z37.object({ before: OutcomeTallySchema, after: OutcomeTallySchema }).nullable()
4080
+ impact: z38.object({ before: OutcomeTallySchema, after: OutcomeTallySchema }).nullable()
3980
4081
  });
3981
- var UpdateAgentDirectiveInputSchema = z37.object({
4082
+ var UpdateAgentDirectiveInputSchema = z38.object({
3982
4083
  name: AgentDirectiveSchema.shape.name.optional(),
3983
4084
  kind: AgentDirectiveSchema.shape.kind.optional(),
3984
4085
  severity: AgentDirectiveSchema.shape.severity.optional(),
3985
4086
  text: AgentDirectiveSchema.shape.text.optional(),
3986
- status: z37.enum(AGENT_DIRECTIVE_STATUSES).optional()
4087
+ status: z38.enum(AGENT_DIRECTIVE_STATUSES).optional()
3987
4088
  }).strict();
3988
- var ReorderAgentDirectivesInputSchema = z37.object({ ids: z37.array(z37.string()).min(1) }).strict();
4089
+ var ReorderAgentDirectivesInputSchema = z38.object({ ids: z38.array(z38.string()).min(1) }).strict();
4090
+
4091
+ // ../spacestation/src/space/space-locale.ts
4092
+ import { z as z39 } from "zod";
4093
+ var DEFAULT_SPACE_LOCALE = "en-US";
4094
+ function isBcp47(tag) {
4095
+ try {
4096
+ return new Intl.Locale(tag).language.length > 0;
4097
+ } catch (err) {
4098
+ if (err instanceof RangeError) return false;
4099
+ throw err;
4100
+ }
4101
+ }
4102
+ var SpaceLocaleSchema = z39.string().refine(isBcp47, { message: "locale must be a BCP 47 language tag, e.g. he-IL" });
4103
+ var RTL_SCRIPTS = /* @__PURE__ */ new Set(["Arab", "Hebr", "Thaa", "Syrc", "Nkoo", "Adlm", "Rohg", "Mand", "Samr"]);
4104
+ var RTL_LANGUAGES = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur", "ps", "sd", "ug", "yi", "dv", "ckb", "syr"]);
4105
+ function textDirectionOf(locale) {
4106
+ const parsed = new Intl.Locale(locale);
4107
+ if (parsed.script !== void 0) return RTL_SCRIPTS.has(parsed.script) ? "rtl" : "ltr";
4108
+ return RTL_LANGUAGES.has(parsed.language) ? "rtl" : "ltr";
4109
+ }
4110
+ function languageOf(locale) {
4111
+ return new Intl.Locale(locale).language;
4112
+ }
4113
+ function languageNameOf(locale) {
4114
+ const name = new Intl.DisplayNames(["en"], { type: "language" }).of(languageOf(locale));
4115
+ if (name === void 0) throw new Error(`no display name for locale ${locale}`);
4116
+ return name;
4117
+ }
4118
+ var SUPPORTED_SPACE_LOCALES = ["en-US", "he-IL"];
4119
+ function declaredSpaceLocaleOf(config) {
4120
+ if (config === null || config === void 0) return void 0;
4121
+ const raw = config.locale;
4122
+ if (raw === void 0) return void 0;
4123
+ return SpaceLocaleSchema.parse(raw);
4124
+ }
4125
+ function spaceLocaleOf(config) {
4126
+ const declared = declaredSpaceLocaleOf(config);
4127
+ return declared === void 0 ? DEFAULT_SPACE_LOCALE : declared;
4128
+ }
3989
4129
 
3990
4130
  // ../spacestation/src/space/workspace-catalog.ts
3991
4131
  var COMPONENT_SOURCE = {
@@ -4049,30 +4189,30 @@ function hostingAllows(hosting, surface) {
4049
4189
  }
4050
4190
 
4051
4191
  // ../spacestation/src/space/trace.ts
4052
- import { z as z38 } from "zod";
4053
- var RunTokenUsageSchema = z38.object({
4054
- input_tokens: z38.number().optional(),
4055
- output_tokens: z38.number().optional(),
4056
- cache_read_tokens: z38.number().optional()
4192
+ import { z as z40 } from "zod";
4193
+ var RunTokenUsageSchema = z40.object({
4194
+ input_tokens: z40.number().optional(),
4195
+ output_tokens: z40.number().optional(),
4196
+ cache_read_tokens: z40.number().optional()
4057
4197
  });
4058
- var TraceRecordSchema = z38.object({
4059
- id: z38.string().uuid(),
4060
- spaceId: z38.string().uuid().nullable(),
4061
- sessionId: z38.string(),
4198
+ var TraceRecordSchema = z40.object({
4199
+ id: z40.string().uuid(),
4200
+ spaceId: z40.string().uuid().nullable(),
4201
+ sessionId: z40.string(),
4062
4202
  /** OTP-verified visitor email the session was unlocked with, or `null`
4063
4203
  * for an unlocked space / anonymous unlock. */
4064
- visitorEmail: z38.string().nullable(),
4065
- userPrompt: z38.string(),
4066
- branch: z38.string().nullable(),
4067
- responseText: z38.string().nullable(),
4068
- layout: z38.unknown().nullable(),
4069
- phaseTimings: z38.record(z38.number()).nullable(),
4070
- tokensByModel: z38.record(RunTokenUsageSchema).nullable(),
4071
- toolCalls: z38.array(z38.unknown()).nullable(),
4072
- diagnostics: z38.array(z38.unknown()).nullable(),
4073
- latencyFirstText: z38.number().int().nullable(),
4074
- latencyFirstPatch: z38.number().int().nullable(),
4075
- latencyTotal: z38.number().int().nullable(),
4204
+ visitorEmail: z40.string().nullable(),
4205
+ userPrompt: z40.string(),
4206
+ branch: z40.string().nullable(),
4207
+ responseText: z40.string().nullable(),
4208
+ layout: z40.unknown().nullable(),
4209
+ phaseTimings: z40.record(z40.number()).nullable(),
4210
+ tokensByModel: z40.record(RunTokenUsageSchema).nullable(),
4211
+ toolCalls: z40.array(z40.unknown()).nullable(),
4212
+ diagnostics: z40.array(z40.unknown()).nullable(),
4213
+ latencyFirstText: z40.number().int().nullable(),
4214
+ latencyFirstPatch: z40.number().int().nullable(),
4215
+ latencyTotal: z40.number().int().nullable(),
4076
4216
  /**
4077
4217
  * The CLIENT's turn id for this run, or `null`.
4078
4218
  *
@@ -4088,29 +4228,29 @@ var TraceRecordSchema = z38.object({
4088
4228
  * a turn whose ack the client never saw — none of which is evidence that a
4089
4229
  * visitor asked something and got nothing.
4090
4230
  */
4091
- turnId: z38.string().nullable(),
4231
+ turnId: z40.string().nullable(),
4092
4232
  /** Serialized `TraceTracker.exportState()` payload (parsed object) —
4093
4233
  * lets the inspector rehydrate this run verbatim after a reload. */
4094
- trackerState: z38.unknown().nullable(),
4095
- createdAt: z38.string()
4234
+ trackerState: z40.unknown().nullable(),
4235
+ createdAt: z40.string()
4096
4236
  });
4097
- var MillisecondsSchema = z38.number().nullable().transform((v) => v === null ? null : Math.round(v));
4098
- var CreateTraceInputSchema = z38.object({
4099
- spaceId: z38.string().uuid().nullable(),
4100
- sessionId: z38.string(),
4101
- visitorEmail: z38.string().nullable(),
4102
- userPrompt: z38.string(),
4103
- branch: z38.string().nullable(),
4104
- responseText: z38.string().nullable(),
4105
- layout: z38.unknown().nullable(),
4106
- phaseTimings: z38.record(z38.number()).nullable(),
4107
- tokensByModel: z38.record(RunTokenUsageSchema).nullable(),
4108
- toolCalls: z38.array(z38.unknown()).nullable(),
4109
- diagnostics: z38.array(z38.unknown()).nullable(),
4237
+ var MillisecondsSchema = z40.number().nullable().transform((v) => v === null ? null : Math.round(v));
4238
+ var CreateTraceInputSchema = z40.object({
4239
+ spaceId: z40.string().uuid().nullable(),
4240
+ sessionId: z40.string(),
4241
+ visitorEmail: z40.string().nullable(),
4242
+ userPrompt: z40.string(),
4243
+ branch: z40.string().nullable(),
4244
+ responseText: z40.string().nullable(),
4245
+ layout: z40.unknown().nullable(),
4246
+ phaseTimings: z40.record(z40.number()).nullable(),
4247
+ tokensByModel: z40.record(RunTokenUsageSchema).nullable(),
4248
+ toolCalls: z40.array(z40.unknown()).nullable(),
4249
+ diagnostics: z40.array(z40.unknown()).nullable(),
4110
4250
  latencyFirstText: MillisecondsSchema,
4111
4251
  latencyFirstPatch: MillisecondsSchema,
4112
4252
  latencyTotal: MillisecondsSchema,
4113
- trackerState: z38.unknown().nullable(),
4253
+ trackerState: z40.unknown().nullable(),
4114
4254
  /**
4115
4255
  * The CLIENT's turn id for this run, or `null`.
4116
4256
  *
@@ -4126,37 +4266,37 @@ var CreateTraceInputSchema = z38.object({
4126
4266
  * a turn whose ack the client never saw — none of which is evidence that a
4127
4267
  * visitor asked something and got nothing.
4128
4268
  */
4129
- turnId: z38.string().nullable()
4269
+ turnId: z40.string().nullable()
4130
4270
  });
4131
- var AgentSessionSummarySchema = z38.object({
4132
- sessionId: z38.string(),
4271
+ var AgentSessionSummarySchema = z40.object({
4272
+ sessionId: z40.string(),
4133
4273
  /** Turn rows only; background/secondary runs are excluded by the aggregate. */
4134
- turnCount: z38.number().int(),
4274
+ turnCount: z40.number().int(),
4135
4275
  /** The session's opening prompt — titles the row in the UI. */
4136
- firstPrompt: z38.string(),
4137
- startedAt: z38.string(),
4138
- lastRunAt: z38.string(),
4276
+ firstPrompt: z40.string(),
4277
+ startedAt: z40.string(),
4278
+ lastRunAt: z40.string(),
4139
4279
  /** Summed `latency_total` across the session's turns. */
4140
- totalLatencyMs: z38.number().int()
4280
+ totalLatencyMs: z40.number().int()
4141
4281
  });
4142
- var SessionTurnSchema = z38.object({
4143
- id: z38.string().uuid(),
4144
- userPrompt: z38.string(),
4145
- responseText: z38.string().nullable(),
4282
+ var SessionTurnSchema = z40.object({
4283
+ id: z40.string().uuid(),
4284
+ userPrompt: z40.string(),
4285
+ responseText: z40.string().nullable(),
4146
4286
  /** Full cumulative Spec committed by this turn — never a patch delta. */
4147
- layout: z38.unknown().nullable(),
4148
- createdAt: z38.string(),
4149
- latencyTotal: z38.number().int().nullable(),
4150
- phaseTimings: z38.record(z38.number()).nullable(),
4151
- tokensByModel: z38.record(z38.object({
4152
- input_tokens: z38.number().optional(),
4153
- output_tokens: z38.number().optional()
4287
+ layout: z40.unknown().nullable(),
4288
+ createdAt: z40.string(),
4289
+ latencyTotal: z40.number().int().nullable(),
4290
+ phaseTimings: z40.record(z40.number()).nullable(),
4291
+ tokensByModel: z40.record(z40.object({
4292
+ input_tokens: z40.number().optional(),
4293
+ output_tokens: z40.number().optional()
4154
4294
  })).nullable(),
4155
- toolCalls: z38.array(z38.unknown()).nullable(),
4156
- diagnostics: z38.array(z38.unknown()).nullable()
4295
+ toolCalls: z40.array(z40.unknown()).nullable(),
4296
+ diagnostics: z40.array(z40.unknown()).nullable()
4157
4297
  });
4158
- var SessionReplaySchema = z38.object({
4159
- turns: z38.array(SessionTurnSchema),
4298
+ var SessionReplaySchema = z40.object({
4299
+ turns: z40.array(SessionTurnSchema),
4160
4300
  /**
4161
4301
  * The session's own last-committed layout, read straight off the durable
4162
4302
  * session record (`sessions.blob.layout`) rather than derived from `turns`.
@@ -4167,20 +4307,20 @@ var SessionReplaySchema = z38.object({
4167
4307
  * a perfectly real layout; only this field can show it. Null exclusively
4168
4308
  * when the durable session row itself could not be read.
4169
4309
  */
4170
- sessionLayout: z38.record(z38.string(), z38.unknown()).nullable()
4310
+ sessionLayout: z40.record(z40.string(), z40.unknown()).nullable()
4171
4311
  });
4172
- var SessionTraceSchema = z38.object({
4173
- trackerState: z38.string().nullable()
4312
+ var SessionTraceSchema = z40.object({
4313
+ trackerState: z40.string().nullable()
4174
4314
  });
4175
- var LlmUsageDailySchema = z38.object({
4176
- day: z38.string(),
4315
+ var LlmUsageDailySchema = z40.object({
4316
+ day: z40.string(),
4177
4317
  /** Deployment that made the call — 'production', 'staging', 'pr-123', 'development'. */
4178
- environment: z38.string(),
4179
- feature: z38.string(),
4180
- model: z38.string(),
4181
- provider: z38.string(),
4318
+ environment: z40.string(),
4319
+ feature: z40.string(),
4320
+ model: z40.string(),
4321
+ provider: z40.string(),
4182
4322
  /** Masked tail of the key actually billed, or null when unknown/non-Google. */
4183
- keyFingerprint: z38.string().nullable(),
4323
+ keyFingerprint: z40.string().nullable(),
4184
4324
  /**
4185
4325
  * The space the call served, or null when it served none.
4186
4326
  *
@@ -4189,91 +4329,91 @@ var LlmUsageDailySchema = z38.object({
4189
4329
  * report that share rather than dropping it, or a per-space total reads as
4190
4330
  * the platform total.
4191
4331
  */
4192
- spaceId: z38.string().nullable(),
4332
+ spaceId: z40.string().nullable(),
4193
4333
  /**
4194
4334
  * The surface of the session the call served (`sessions.surface`), or null
4195
4335
  * when it served no session or the session predates surface recording.
4196
4336
  * `automation` is the eval harness — the signal that files an ordinary
4197
4337
  * `agent-turn` as testing spend rather than as a visitor's.
4198
4338
  */
4199
- surface: z38.string().nullable(),
4200
- inputTokens: z38.number(),
4201
- outputTokens: z38.number(),
4339
+ surface: z40.string().nullable(),
4340
+ inputTokens: z40.number(),
4341
+ outputTokens: z40.number(),
4202
4342
  /** Subset of inputTokens, never additional to it. */
4203
- cachedInputTokens: z38.number(),
4204
- reasoningTokens: z38.number(),
4205
- callCount: z38.number(),
4206
- errorCount: z38.number(),
4207
- estimatedCostUsd: z38.number().nullable()
4343
+ cachedInputTokens: z40.number(),
4344
+ reasoningTokens: z40.number(),
4345
+ callCount: z40.number(),
4346
+ errorCount: z40.number(),
4347
+ estimatedCostUsd: z40.number().nullable()
4208
4348
  });
4209
- var LlmUsageBySessionSchema = z38.object({
4210
- sessionId: z38.string(),
4211
- environment: z38.string(),
4212
- model: z38.string(),
4349
+ var LlmUsageBySessionSchema = z40.object({
4350
+ sessionId: z40.string(),
4351
+ environment: z40.string(),
4352
+ model: z40.string(),
4213
4353
  /** The space this session belongs to, or null for a session with no space. */
4214
- spaceId: z38.string().nullable(),
4354
+ spaceId: z40.string().nullable(),
4215
4355
  /** The session's surface — see `LlmUsageDailySchema.surface`. */
4216
- surface: z38.string().nullable(),
4356
+ surface: z40.string().nullable(),
4217
4357
  /** Label only — the first feature seen in the session. */
4218
- firstFeature: z38.string(),
4219
- startedAt: z38.string(),
4220
- endedAt: z38.string(),
4221
- inputTokens: z38.number(),
4222
- outputTokens: z38.number(),
4223
- cachedInputTokens: z38.number(),
4224
- reasoningTokens: z38.number(),
4225
- callCount: z38.number(),
4226
- errorCount: z38.number(),
4358
+ firstFeature: z40.string(),
4359
+ startedAt: z40.string(),
4360
+ endedAt: z40.string(),
4361
+ inputTokens: z40.number(),
4362
+ outputTokens: z40.number(),
4363
+ cachedInputTokens: z40.number(),
4364
+ reasoningTokens: z40.number(),
4365
+ callCount: z40.number(),
4366
+ errorCount: z40.number(),
4227
4367
  /** Priced server-side, like the daily rollup — the browser never carries a
4228
4368
  * rate table, so there is exactly one place a price can be wrong. Null when
4229
4369
  * the model is unpriced; never 0, which would read as free. */
4230
- estimatedCostUsd: z38.number().nullable()
4370
+ estimatedCostUsd: z40.number().nullable()
4231
4371
  });
4232
- var LlmSessionsDailySchema = z38.object({
4233
- day: z38.string(),
4234
- environment: z38.string(),
4235
- sessionCount: z38.number()
4372
+ var LlmSessionsDailySchema = z40.object({
4373
+ day: z40.string(),
4374
+ environment: z40.string(),
4375
+ sessionCount: z40.number()
4236
4376
  });
4237
4377
 
4238
4378
  // ../spacestation/src/space/session-queue.ts
4239
- import { z as z40 } from "zod";
4379
+ import { z as z42 } from "zod";
4240
4380
 
4241
4381
  // ../spacestation/src/space/session-activity.ts
4242
- import { z as z39 } from "zod";
4243
- var SessionActivityEventSchema = z39.object({
4244
- id: z39.string(),
4245
- kind: z39.string(),
4246
- occurredAt: z39.string(),
4247
- source: z39.string(),
4248
- surface: z39.string(),
4249
- payload: z39.record(z39.unknown())
4382
+ import { z as z41 } from "zod";
4383
+ var SessionActivityEventSchema = z41.object({
4384
+ id: z41.string(),
4385
+ kind: z41.string(),
4386
+ occurredAt: z41.string(),
4387
+ source: z41.string(),
4388
+ surface: z41.string(),
4389
+ payload: z41.record(z41.unknown())
4250
4390
  });
4251
- var SessionActivitySchema = z39.object({
4252
- events: z39.array(SessionActivityEventSchema),
4253
- hasMore: z39.boolean()
4391
+ var SessionActivitySchema = z41.object({
4392
+ events: z41.array(SessionActivityEventSchema),
4393
+ hasMore: z41.boolean()
4254
4394
  });
4255
4395
 
4256
4396
  // ../spacestation/src/space/session-queue.ts
4257
- var SessionVerdictSchema = z40.enum(["unreviewed", "viewed", "bug"]);
4258
- var RecordableVerdictSchema = z40.enum(["viewed", "bug"]);
4259
- var SessionReviewEventSchema = z40.object({
4260
- id: z40.string().uuid(),
4397
+ var SessionVerdictSchema = z42.enum(["unreviewed", "viewed", "bug"]);
4398
+ var RecordableVerdictSchema = z42.enum(["viewed", "bug"]);
4399
+ var SessionReviewEventSchema = z42.object({
4400
+ id: z42.string().uuid(),
4261
4401
  verdict: RecordableVerdictSchema,
4262
4402
  /** Account email of the operator who judged it. Attribution is the reason the
4263
4403
  * log is append-only rather than a mutable current-state row. */
4264
- reviewer: z40.string(),
4265
- note: z40.string().nullable(),
4266
- createdAt: z40.string()
4404
+ reviewer: z42.string(),
4405
+ note: z42.string().nullable(),
4406
+ createdAt: z42.string()
4267
4407
  });
4268
- var BugSeveritySchema = z40.enum(["high", "medium", "low"]);
4269
- var BugLocationSchema = z40.object({
4270
- elementId: z40.string().nullable(),
4408
+ var BugSeveritySchema = z42.enum(["high", "medium", "low"]);
4409
+ var BugLocationSchema = z42.object({
4410
+ elementId: z42.string().nullable(),
4271
4411
  /** Display only — the catalog component type, e.g. "productGrid". Null
4272
4412
  * alongside a null `elementId`. */
4273
- elementType: z40.string().nullable(),
4413
+ elementType: z42.string().nullable(),
4274
4414
  /** Fraction of the ELEMENT's own box. Null for a page anchor. */
4275
- offsetXPct: z40.number().min(0).max(100).nullable(),
4276
- offsetYPct: z40.number().min(0).max(100).nullable(),
4415
+ offsetXPct: z42.number().min(0).max(100).nullable(),
4416
+ offsetYPct: z42.number().min(0).max(100).nullable(),
4277
4417
  /**
4278
4418
  * ABSOLUTE document pixels, for a pin with no element under it. Null for an
4279
4419
  * element anchor.
@@ -4284,8 +4424,8 @@ var BugLocationSchema = z40.object({
4284
4424
  * on the page with it. Measured before this was fixed: growing the page 9%
4285
4425
  * slid a pin 32px, so a pin ran away from the cursor reaching for it.
4286
4426
  */
4287
- pageX: z40.number().nullable(),
4288
- pageY: z40.number().nullable()
4427
+ pageX: z42.number().nullable(),
4428
+ pageY: z42.number().nullable()
4289
4429
  }).refine(
4290
4430
  (loc) => {
4291
4431
  const hasOffsets = loc.offsetXPct !== null && loc.offsetYPct !== null;
@@ -4299,24 +4439,24 @@ var BugLocationSchema = z40.object({
4299
4439
  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)"
4300
4440
  }
4301
4441
  );
4302
- var SessionBugSchema = z40.object({
4303
- id: z40.string().uuid(),
4442
+ var SessionBugSchema = z42.object({
4443
+ id: z42.string().uuid(),
4304
4444
  /** 1-based turn the fault was observed on; null when the fault is session-wide. */
4305
- turnIndex: z40.number().int().nullable(),
4445
+ turnIndex: z42.number().int().nullable(),
4306
4446
  /** Where on that turn's canvas the pin was dropped; null for a bug filed
4307
4447
  * without pinning a spot. */
4308
4448
  location: BugLocationSchema.nullable(),
4309
- provider: z40.string(),
4310
- issueKey: z40.string().nullable(),
4311
- issueUrl: z40.string().nullable(),
4449
+ provider: z42.string(),
4450
+ issueKey: z42.string().nullable(),
4451
+ issueUrl: z42.string().nullable(),
4312
4452
  /** The tracker's own state word ('Todo', 'Done', …) — their vocabulary, so
4313
4453
  * open text. Null until first synced. */
4314
- issueState: z40.string().nullable(),
4315
- title: z40.string(),
4316
- body: z40.string(),
4454
+ issueState: z42.string().nullable(),
4455
+ title: z42.string(),
4456
+ body: z42.string(),
4317
4457
  severity: BugSeveritySchema,
4318
- createdBy: z40.string(),
4319
- createdAt: z40.string(),
4458
+ createdBy: z42.string(),
4459
+ createdAt: z42.string(),
4320
4460
  /**
4321
4461
  * When this bug was resolved from the console; null means still OPEN.
4322
4462
  *
@@ -4325,60 +4465,60 @@ var SessionBugSchema = z40.object({
4325
4465
  * whether a particular fault is still live. The timestamp IS the state, so
4326
4466
  * no boolean can contradict it.
4327
4467
  */
4328
- resolvedAt: z40.string().nullable(),
4329
- resolvedBy: z40.string().nullable()
4468
+ resolvedAt: z42.string().nullable(),
4469
+ resolvedBy: z42.string().nullable()
4330
4470
  });
4331
- var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z40.string() });
4332
- var SessionCommentSchema = z40.object({
4333
- id: z40.string().uuid(),
4471
+ var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z42.string() });
4472
+ var SessionCommentSchema = z42.object({
4473
+ id: z42.string().uuid(),
4334
4474
  /** Set = a reply in that bug's thread. Null = a standalone comment pin. */
4335
- bugId: z40.string().uuid().nullable(),
4475
+ bugId: z42.string().uuid().nullable(),
4336
4476
  /** 1-based turn the comment was left on; null for a reply (it reads its
4337
4477
  * parent bug's turn). */
4338
- turnIndex: z40.number().int().nullable(),
4478
+ turnIndex: z42.number().int().nullable(),
4339
4479
  /** The canvas anchor for a STANDALONE comment's own pin; null for a reply. */
4340
4480
  location: BugLocationSchema.nullable(),
4341
- body: z40.string(),
4342
- createdBy: z40.string(),
4343
- createdAt: z40.string()
4481
+ body: z42.string(),
4482
+ createdBy: z42.string(),
4483
+ createdAt: z42.string()
4344
4484
  });
4345
- var CreateCommentInputSchema = z40.object({
4346
- bugId: z40.string().uuid().nullable(),
4347
- turnIndex: z40.number().int().positive().nullable(),
4485
+ var CreateCommentInputSchema = z42.object({
4486
+ bugId: z42.string().uuid().nullable(),
4487
+ turnIndex: z42.number().int().positive().nullable(),
4348
4488
  location: BugLocationSchema.nullable(),
4349
4489
  // Trimmed, so whitespace is not content: `.min(1)` alone accepted a comment
4350
4490
  // of three spaces, which renders as an empty bubble nobody can interpret.
4351
- body: z40.string().trim().min(1)
4491
+ body: z42.string().trim().min(1)
4352
4492
  }).refine((input) => input.bugId === null !== (input.location === null), {
4353
4493
  message: "a comment is either a reply (bugId, no location) or a standalone pin (location, no bugId)"
4354
4494
  });
4355
- var UpdateCommentInputSchema = z40.object({
4356
- body: z40.string().trim().min(1).optional(),
4357
- bugId: z40.string().uuid().nullable().optional(),
4495
+ var UpdateCommentInputSchema = z42.object({
4496
+ body: z42.string().trim().min(1).optional(),
4497
+ bugId: z42.string().uuid().nullable().optional(),
4358
4498
  location: BugLocationSchema.nullable().optional()
4359
4499
  });
4360
4500
  var MOBILE_VIEWPORT_MAX = 720;
4361
- var SessionFormFactorSchema = z40.enum(["mobile", "desktop"]).nullable();
4501
+ var SessionFormFactorSchema = z42.enum(["mobile", "desktop"]).nullable();
4362
4502
  function formFactorFromViewport(width) {
4363
4503
  if (width === null) return null;
4364
4504
  return width <= MOBILE_VIEWPORT_MAX ? "mobile" : "desktop";
4365
4505
  }
4366
- var SessionSummarySchema = z40.object({
4367
- sessionId: z40.string(),
4506
+ var SessionSummarySchema = z42.object({
4507
+ sessionId: z42.string(),
4368
4508
  /** Stable per-browser id — the join key across a visitor's sessions. Null when
4369
4509
  * the session row is gone (pruned) or predates the `sessions` table. */
4370
- visitorId: z40.string().nullable(),
4510
+ visitorId: z42.string().nullable(),
4371
4511
  /** Provider-qualified identity anchor, present only once the visitor
4372
4512
  * identified themselves. Both null together means "not identified yet". */
4373
- identityProvider: z40.string().nullable(),
4374
- identityKey: z40.string().nullable(),
4513
+ identityProvider: z42.string().nullable(),
4514
+ identityKey: z42.string().nullable(),
4375
4515
  /** Team/test traffic. The queue hides these by default. */
4376
- isInternal: z40.boolean(),
4516
+ isInternal: z42.boolean(),
4377
4517
  /** Build that served the session. Null = not captured; a version filter must
4378
4518
  * therefore EXCLUDE it rather than let it match an arbitrary bucket. */
4379
- clientVersion: z40.string().nullable(),
4519
+ clientVersion: z42.string().nullable(),
4380
4520
  /** Commit-shaped interaction signals, counted, keyed by open `SignalType`. */
4381
- signalCounts: z40.record(z40.number()),
4521
+ signalCounts: z42.record(z42.number()),
4382
4522
  /**
4383
4523
  * Did this conversation ACQUIRE anything, and how many times?
4384
4524
  *
@@ -4395,7 +4535,7 @@ var SessionSummarySchema = z40.object({
4395
4535
  * predates the column — and renders as no mark at all. It never means zero:
4396
4536
  * zero is a real, recorded answer and the rail reports it as one.
4397
4537
  */
4398
- conversionAttempts: z40.number().int().nullable(),
4538
+ conversionAttempts: z42.number().int().nullable(),
4399
4539
  /**
4400
4540
  * The same attempts split by EVENT KIND, keyed by the kind's own name
4401
4541
  * (`commerce.cart_line_added`, `commerce.registry_clicked`), counted distinct
@@ -4411,7 +4551,7 @@ var SessionSummarySchema = z40.object({
4411
4551
  * kinds together, and one attempt id appearing under both would be counted
4412
4552
  * once there and twice here.
4413
4553
  */
4414
- conversionKinds: z40.record(z40.number()),
4554
+ conversionKinds: z42.record(z42.number()),
4415
4555
  /**
4416
4556
  * Every analytics funnel step this session reached, in funnel order — the
4417
4557
  * dashboard's own step ids, read by the same per-step predicates, so a queue
@@ -4419,20 +4559,20 @@ var SessionSummarySchema = z40.object({
4419
4559
  * set of strings for the reason `conversionKinds` is: the contract does not
4420
4560
  * learn what a step means. Empty only when read from a pre-column database.
4421
4561
  */
4422
- funnelSteps: z40.array(z40.string()),
4562
+ funnelSteps: z42.array(z42.string()),
4423
4563
  /**
4424
4564
  * The connector's opaque handle for what this session produced in its back
4425
4565
  * office — present only once a checkout actually reached the platform. The
4426
4566
  * console hands it to the back-office link registry; nothing else reads it.
4427
4567
  */
4428
- backOfficeRef: z40.string().nullable(),
4568
+ backOfficeRef: z42.string().nullable(),
4429
4569
  /**
4430
4570
  * The order this session produced, when the connector's back office reported
4431
4571
  * it (`session_orders`): its opaque id and the back office's own name for it.
4432
4572
  * Both null when no order is known — the cart handle above is then the door.
4433
4573
  */
4434
- orderRef: z40.string().nullable(),
4435
- orderLabel: z40.string().nullable(),
4574
+ orderRef: z42.string().nullable(),
4575
+ orderLabel: z42.string().nullable(),
4436
4576
  /**
4437
4577
  * Which shell this session rendered — the one thing about the CAPTURE a list
4438
4578
  * needs.
@@ -4445,12 +4585,12 @@ var SessionSummarySchema = z40.object({
4445
4585
  * on a desktop are not the same session.
4446
4586
  */
4447
4587
  formFactor: SessionFormFactorSchema,
4448
- turnCount: z40.number().int(),
4588
+ turnCount: z42.number().int(),
4449
4589
  /** The visitor's opening message — the single most informative field for
4450
4590
  * deciding whether a session is worth opening, hence the widest column. */
4451
- firstPrompt: z40.string(),
4452
- startedAt: z40.string(),
4453
- lastRunAt: z40.string(),
4591
+ firstPrompt: z42.string(),
4592
+ startedAt: z42.string(),
4593
+ lastRunAt: z42.string(),
4454
4594
  /**
4455
4595
  * The VISITOR's own IANA zone (`America/New_York`), read from their browser
4456
4596
  * at session create — what the two timestamps above should be read in.
@@ -4478,7 +4618,7 @@ var SessionSummarySchema = z40.object({
4478
4618
  * Client-asserted and never validated against a zone table, so every consumer
4479
4619
  * must tolerate an unknown name: `Intl` throws a RangeError on one.
4480
4620
  */
4481
- visitorTimeZone: z40.string().nullable(),
4621
+ visitorTimeZone: z42.string().nullable(),
4482
4622
  /**
4483
4623
  * Mean TIME TO FIRST PATCH, over the turns that recorded one — the first
4484
4624
  * layout op reaching the visitor, and THE latency the project is managed on.
@@ -4486,31 +4626,31 @@ var SessionSummarySchema = z40.object({
4486
4626
  * `totalLatencyMs` carries the chip-gen tail that runs after the visitor is
4487
4627
  * already reading. Null when no turn in the session recorded a patch.
4488
4628
  */
4489
- avgTtftMs: z40.number().int().nullable(),
4629
+ avgTtftMs: z42.number().int().nullable(),
4490
4630
  /** Mean `main_done_ms` — layout + prose complete. Context for the TTFT, not
4491
4631
  * a budget: null on sessions older than the mark's recording. */
4492
- avgMainDoneMs: z40.number().int().nullable(),
4632
+ avgMainDoneMs: z42.number().int().nullable(),
4493
4633
  /** Mean `chip_gen_ms` — the pass that runs AFTER mainDone and is out of the
4494
4634
  * budget. On the row only to explain the gap to `totalLatencyMs`. */
4495
- avgChipGenMs: z40.number().int().nullable(),
4496
- totalLatencyMs: z40.number().int(),
4497
- durationMs: z40.number().int(),
4635
+ avgChipGenMs: z42.number().int().nullable(),
4636
+ totalLatencyMs: z42.number().int(),
4637
+ durationMs: z42.number().int(),
4498
4638
  /** Inferred from recent activity — nothing writes a session-end marker. A
4499
4639
  * live session streams and cannot be given a verdict until it ends. */
4500
- isLive: z40.boolean(),
4640
+ isLive: z42.boolean(),
4501
4641
  verdict: SessionVerdictSchema,
4502
- reviewedBy: z40.string().nullable(),
4503
- reviewedAt: z40.string().nullable(),
4642
+ reviewedBy: z42.string().nullable(),
4643
+ reviewedAt: z42.string().nullable(),
4504
4644
  /** Latest filed bug, flattened onto the row so the queue can show its live
4505
4645
  * state without a second request. */
4506
- bugIssueKey: z40.string().nullable(),
4507
- bugIssueUrl: z40.string().nullable(),
4508
- bugIssueState: z40.string().nullable()
4646
+ bugIssueKey: z42.string().nullable(),
4647
+ bugIssueUrl: z42.string().nullable(),
4648
+ bugIssueState: z42.string().nullable()
4509
4649
  });
4510
- var SessionQueuePageSchema = z40.object({
4511
- sessions: z40.array(SessionSummarySchema),
4512
- totalCount: z40.number().int(),
4513
- hiddenInternalCount: z40.number().int(),
4650
+ var SessionQueuePageSchema = z42.object({
4651
+ sessions: z42.array(SessionSummarySchema),
4652
+ totalCount: z42.number().int(),
4653
+ hiddenInternalCount: z42.number().int(),
4514
4654
  /**
4515
4655
  * Bounced sessions the queue left out — no turn and no add, the default.
4516
4656
  *
@@ -4520,61 +4660,61 @@ var SessionQueuePageSchema = z40.object({
4520
4660
  * `totalCount + hiddenBouncedCount` is that population, and this count is the
4521
4661
  * analytics dashboard's bounce over the same window.
4522
4662
  */
4523
- hiddenBouncedCount: z40.number().int()
4663
+ hiddenBouncedCount: z42.number().int()
4524
4664
  });
4525
- var SessionQueueFacetsSchema = z40.object({
4526
- review: z40.record(z40.number()),
4527
- version: z40.record(z40.number()),
4528
- turns: z40.record(z40.number()),
4529
- durationS: z40.record(z40.number()),
4665
+ var SessionQueueFacetsSchema = z42.object({
4666
+ review: z42.record(z42.number()),
4667
+ version: z42.record(z42.number()),
4668
+ turns: z42.record(z42.number()),
4669
+ durationS: z42.record(z42.number()),
4530
4670
  /** Sessions per funnel step reached — a session counts under every step it reached. */
4531
- funnel: z40.record(z40.number())
4671
+ funnel: z42.record(z42.number())
4532
4672
  });
4533
- var SessionCaptureSchema = z40.object({
4534
- viewportWidth: z40.number().int().nullable(),
4535
- viewportHeight: z40.number().int().nullable(),
4536
- userAgent: z40.string().nullable(),
4537
- locale: z40.string().nullable(),
4673
+ var SessionCaptureSchema = z42.object({
4674
+ viewportWidth: z42.number().int().nullable(),
4675
+ viewportHeight: z42.number().int().nullable(),
4676
+ userAgent: z42.string().nullable(),
4677
+ locale: z42.string().nullable(),
4538
4678
  /** Referrer at session create — separates agentic traffic from organic. */
4539
- referrer: z40.string().nullable()
4679
+ referrer: z42.string().nullable()
4540
4680
  });
4541
- var SessionCaptureInputSchema = z40.object({
4542
- viewportWidth: z40.number().int().positive().max(2e4).optional(),
4543
- viewportHeight: z40.number().int().positive().max(2e4).optional(),
4544
- userAgent: z40.string().max(1e3).optional(),
4545
- locale: z40.string().max(35).optional(),
4681
+ var SessionCaptureInputSchema = z42.object({
4682
+ viewportWidth: z42.number().int().positive().max(2e4).optional(),
4683
+ viewportHeight: z42.number().int().positive().max(2e4).optional(),
4684
+ userAgent: z42.string().max(1e3).optional(),
4685
+ locale: z42.string().max(35).optional(),
4546
4686
  /** IANA zone name from the visitor's browser. Bounded rather than validated:
4547
4687
  * the zone database grows, and refusing a name this build has not heard of
4548
4688
  * would drop a real session's capture over a table that is out of date. */
4549
- timeZone: z40.string().max(64).optional(),
4550
- referrer: z40.string().max(2048).optional(),
4551
- clientVersion: z40.string().max(100).optional(),
4552
- isInternal: z40.boolean().optional()
4689
+ timeZone: z42.string().max(64).optional(),
4690
+ referrer: z42.string().max(2048).optional(),
4691
+ clientVersion: z42.string().max(100).optional(),
4692
+ isInternal: z42.boolean().optional()
4553
4693
  });
4554
- var SessionDetailSchema = z40.object({
4694
+ var SessionDetailSchema = z42.object({
4555
4695
  session: SessionSummarySchema,
4556
4696
  capture: SessionCaptureSchema,
4557
4697
  /** Full verdict history, newest first. Verdicts are revisable, and a session
4558
4698
  * re-judged after a fix is the evidence the fix worked. */
4559
- reviews: z40.array(SessionReviewEventSchema),
4560
- bugs: z40.array(SessionBugSchema),
4561
- comments: z40.array(SessionCommentSchema),
4699
+ reviews: z42.array(SessionReviewEventSchema),
4700
+ bugs: z42.array(SessionBugSchema),
4701
+ comments: z42.array(SessionCommentSchema),
4562
4702
  /** Optional during API/console rolling deployment. Absent is unavailable,
4563
4703
  * not evidence of zero visitor activity. */
4564
4704
  activity: SessionActivitySchema.optional()
4565
4705
  });
4566
- var RecordVerdictInputSchema = z40.object({
4706
+ var RecordVerdictInputSchema = z42.object({
4567
4707
  verdict: RecordableVerdictSchema,
4568
- note: z40.string().max(2e3).optional()
4708
+ note: z42.string().max(2e3).optional()
4569
4709
  });
4570
- var FileBugInputSchema = z40.object({
4571
- turnIndex: z40.number().int().positive().nullable(),
4710
+ var FileBugInputSchema = z42.object({
4711
+ turnIndex: z42.number().int().positive().nullable(),
4572
4712
  /** Optional — a bug filed without dropping a pin has no location. */
4573
4713
  location: BugLocationSchema.nullable().optional(),
4574
- title: z40.string().min(1).max(300),
4575
- body: z40.string().min(1),
4714
+ title: z42.string().min(1).max(300),
4715
+ body: z42.string().min(1),
4576
4716
  severity: BugSeveritySchema,
4577
- payload: z40.record(z40.unknown())
4717
+ payload: z42.record(z42.unknown())
4578
4718
  });
4579
4719
 
4580
4720
  // ../spacestation/src/contracts/retrieval/ecommerce/option-values.ts
@@ -4861,6 +5001,7 @@ __export(src_exports2, {
4861
5001
  ReviewSchema: () => ReviewSchema,
4862
5002
  SelectedOptionSchema: () => SelectedOptionSchema,
4863
5003
  SiblingProductSchema: () => SiblingProductSchema,
5004
+ StoreThemeAccessError: () => StoreThemeAccessError,
4864
5005
  VideoSourceSchema: () => VideoSourceSchema,
4865
5006
  buildBaseAttributesConfig: () => buildBaseAttributesConfig,
4866
5007
  buildBucketLabelsConfig: () => buildBucketLabelsConfig,
@@ -4868,7 +5009,9 @@ __export(src_exports2, {
4868
5009
  buildPdpCompanionsConfig: () => buildPdpCompanionsConfig,
4869
5010
  cartLineMatchesSelections: () => cartLineMatchesSelections,
4870
5011
  cartLinesForProduct: () => cartLinesForProduct,
5012
+ clearCodeDiscountSources: () => clearCodeDiscountSources,
4871
5013
  clearProductNameLookups: () => clearProductNameLookups,
5014
+ clearStoreThemeSources: () => clearStoreThemeSources,
4872
5015
  createUnavailableProduct: () => createUnavailableProduct,
4873
5016
  entityProjections: () => entityProjections,
4874
5017
  formatVariantValue: () => formatVariantValue,
@@ -4885,68 +5028,72 @@ __export(src_exports2, {
4885
5028
  readBaseAttributesConfig: () => readBaseAttributesConfig,
4886
5029
  readBucketLabelsConfig: () => readBucketLabelsConfig,
4887
5030
  readPdpCompanions: () => readPdpCompanions,
5031
+ registerCodeDiscountSource: () => registerCodeDiscountSource,
4888
5032
  registerProductNameLookup: () => registerProductNameLookup,
5033
+ registerStoreThemeSource: () => registerStoreThemeSource,
5034
+ resolveCodeDiscountSource: () => resolveCodeDiscountSource,
4889
5035
  resolveProductNameLookup: () => resolveProductNameLookup,
5036
+ resolveStoreThemeSource: () => resolveStoreThemeSource,
4890
5037
  scopedAttributeKey: () => scopedAttributeKey,
4891
5038
  selectedOptionsToRecord: () => selectedOptionsToRecord,
4892
5039
  settledCart: () => settledCart
4893
5040
  });
4894
5041
 
4895
5042
  // ../ecommerce/src/commerce-schemas.ts
4896
- import { z as z41 } from "zod";
4897
- var MoneySchema = z41.object({
4898
- amount: z41.number(),
4899
- currencyCode: z41.string()
5043
+ import { z as z43 } from "zod";
5044
+ var MoneySchema = z43.object({
5045
+ amount: z43.number(),
5046
+ currencyCode: z43.string()
4900
5047
  });
4901
- var ImageSchema = z41.object({
4902
- url: z41.string(),
4903
- altText: z41.string(),
4904
- width: z41.number().optional(),
4905
- height: z41.number().optional(),
5048
+ var ImageSchema = z43.object({
5049
+ url: z43.string(),
5050
+ altText: z43.string(),
5051
+ width: z43.number().optional(),
5052
+ height: z43.number().optional(),
4906
5053
  /** Responsive candidate set, resolved at the commerce-adapter boundary —
4907
5054
  * never computed in a component. Renderers use it as `<img srcSet>` paired
4908
5055
  * with a layout `sizes`. Absent for non-CDN / unsizable images. */
4909
- srcSet: z41.string().optional()
5056
+ srcSet: z43.string().optional()
4910
5057
  });
4911
- var AssetSchema = z41.object({
5058
+ var AssetSchema = z43.object({
4912
5059
  /** Opaque asset id — the `resolved()` ref the agent emitted. */
4913
- id: z41.string(),
4914
- url: z41.string(),
4915
- altText: z41.string(),
4916
- srcSet: z41.string().optional()
5060
+ id: z43.string(),
5061
+ url: z43.string(),
5062
+ altText: z43.string(),
5063
+ srcSet: z43.string().optional()
4917
5064
  });
4918
- var SelectedOptionSchema = z41.object({
4919
- name: z41.string(),
4920
- value: z41.string()
5065
+ var SelectedOptionSchema = z43.object({
5066
+ name: z43.string(),
5067
+ value: z43.string()
4921
5068
  });
4922
- var VideoSourceSchema = z41.object({
4923
- url: z41.string(),
4924
- mimeType: z41.string(),
4925
- width: z41.number().optional(),
4926
- height: z41.number().optional()
5069
+ var VideoSourceSchema = z43.object({
5070
+ url: z43.string(),
5071
+ mimeType: z43.string(),
5072
+ width: z43.number().optional(),
5073
+ height: z43.number().optional()
4927
5074
  });
4928
- var ProductVideoSchema = z41.object({
4929
- kind: z41.enum(["hosted", "external"]),
5075
+ var ProductVideoSchema = z43.object({
5076
+ kind: z43.enum(["hosted", "external"]),
4930
5077
  previewImage: ImageSchema.optional(),
4931
- altText: z41.string().default(""),
5078
+ altText: z43.string().default(""),
4932
5079
  /** `kind: 'hosted'` only — empty for external embeds. */
4933
- sources: z41.array(VideoSourceSchema).default([]),
5080
+ sources: z43.array(VideoSourceSchema).default([]),
4934
5081
  /** `kind: 'external'` only — iframe embed URL. */
4935
- embedUrl: z41.string().optional(),
5082
+ embedUrl: z43.string().optional(),
4936
5083
  /** `kind: 'external'` only — e.g. `YOUTUBE` | `VIMEO`. */
4937
- host: z41.string().optional()
5084
+ host: z43.string().optional()
4938
5085
  });
4939
- var AvailabilityStatusSchema = z41.enum([
5086
+ var AvailabilityStatusSchema = z43.enum([
4940
5087
  "in_stock",
4941
5088
  "backorder",
4942
5089
  "preorder",
4943
5090
  "out_of_stock",
4944
5091
  "discontinued"
4945
5092
  ]);
4946
- var ProductVariantSchema = z41.object({
4947
- id: z41.string(),
4948
- title: z41.string(),
4949
- available: z41.boolean(),
5093
+ var ProductVariantSchema = z43.object({
5094
+ id: z43.string(),
5095
+ title: z43.string(),
5096
+ available: z43.boolean(),
4950
5097
  /**
4951
5098
  * Qualifies `available` with the fulfillment state behind it. Absent means
4952
5099
  * the backend did not say — which is NOT the same as in stock, and must not
@@ -4961,8 +5108,10 @@ var ProductVariantSchema = z41.object({
4961
5108
  availabilityStatus: AvailabilityStatusSchema.optional(),
4962
5109
  price: MoneySchema,
4963
5110
  compareAtPrice: MoneySchema.optional(),
4964
- selectedOptions: z41.array(SelectedOptionSchema).optional(),
4965
- image: ImageSchema.optional()
5111
+ selectedOptions: z43.array(SelectedOptionSchema).optional(),
5112
+ image: ImageSchema.optional(),
5113
+ /** The merchant's stock-keeping code. Absent when the backend has none. */
5114
+ sku: z43.string().optional()
4966
5115
  });
4967
5116
  var MP4_MIME = "video/mp4";
4968
5117
  var HLS_MIME = "application/x-mpegURL";
@@ -4972,34 +5121,34 @@ function orderedVideoSources(video) {
4972
5121
  const hls = video.sources.filter((s) => s.mimeType === HLS_MIME);
4973
5122
  return [...mp4, ...hls];
4974
5123
  }
4975
- var SiblingProductSchema = z41.object({
4976
- id: z41.string(),
4977
- handle: z41.string(),
4978
- title: z41.string(),
5124
+ var SiblingProductSchema = z43.object({
5125
+ id: z43.string(),
5126
+ handle: z43.string(),
5127
+ title: z43.string(),
4979
5128
  /** The differentiating value across siblings — typically the color
4980
5129
  * label ("OLIVE", "STONE"). Rendered next to the swatch row. */
4981
- color: z41.string(),
5130
+ color: z43.string(),
4982
5131
  /** Swatch artwork. Hydrators populate from the sibling product's
4983
5132
  * first image; renderers crop / fit to the swatch tile. */
4984
5133
  swatchImage: ImageSchema.optional(),
4985
- available: z41.boolean().default(true),
5134
+ available: z43.boolean().default(true),
4986
5135
  /** Marks the sibling that IS the currently-rendered product. The
4987
5136
  * picker uses this to highlight the active swatch without an
4988
5137
  * external id comparison. */
4989
- current: z41.boolean().default(false)
5138
+ current: z43.boolean().default(false)
4990
5139
  });
4991
- var ProductSchema = z41.object({
4992
- id: z41.string(),
4993
- handle: z41.string().default(""),
4994
- title: z41.string(),
4995
- description: z41.string().default(""),
4996
- descriptionHtml: z41.string().optional(),
4997
- vendor: z41.string().default(""),
4998
- productType: z41.string().optional(),
4999
- tags: z41.array(z41.string()).default([]),
5140
+ var ProductSchema = z43.object({
5141
+ id: z43.string(),
5142
+ handle: z43.string().default(""),
5143
+ title: z43.string(),
5144
+ description: z43.string().default(""),
5145
+ descriptionHtml: z43.string().optional(),
5146
+ vendor: z43.string().default(""),
5147
+ productType: z43.string().optional(),
5148
+ tags: z43.array(z43.string()).default([]),
5000
5149
  price: MoneySchema.default({ amount: 0, currencyCode: "USD" }),
5001
5150
  compareAtPrice: MoneySchema.optional(),
5002
- images: z41.array(ImageSchema).default([]),
5151
+ images: z43.array(ImageSchema).default([]),
5003
5152
  /**
5004
5153
  * Product videos (`Video` + `ExternalVideo` media). Shopify's MCP
5005
5154
  * catalog drops video media — it only surfaces through the Storefront
@@ -5007,21 +5156,21 @@ var ProductSchema = z41.object({
5007
5156
  * boundary. Default `[]` so renderers gate on `length > 0` without a
5008
5157
  * presence guard.
5009
5158
  */
5010
- videos: z41.array(ProductVideoSchema).default([]),
5011
- variants: z41.array(ProductVariantSchema).default([]),
5012
- availableForSale: z41.boolean().default(true),
5013
- options: z41.array(z41.object({
5014
- name: z41.string(),
5015
- values: z41.array(z41.string())
5159
+ videos: z43.array(ProductVideoSchema).default([]),
5160
+ variants: z43.array(ProductVariantSchema).default([]),
5161
+ availableForSale: z43.boolean().default(true),
5162
+ options: z43.array(z43.object({
5163
+ name: z43.string(),
5164
+ values: z43.array(z43.string())
5016
5165
  })).optional(),
5017
- collections: z41.array(z41.string()).optional(),
5166
+ collections: z43.array(z43.string()).optional(),
5018
5167
  /** See `SiblingProductSchema`. Default `[]` so renderers can check
5019
5168
  * `length > 1` to decide whether to draw the swatch row without a
5020
5169
  * presence guard. */
5021
- colorVariants: z41.array(SiblingProductSchema).default([]),
5022
- rating: z41.object({
5023
- value: z41.number(),
5024
- count: z41.number()
5170
+ colorVariants: z43.array(SiblingProductSchema).default([]),
5171
+ rating: z43.object({
5172
+ value: z43.number(),
5173
+ count: z43.number()
5025
5174
  }).optional(),
5026
5175
  /**
5027
5176
  * Product reviews surfaced from the brand's review store. SDK
@@ -5030,12 +5179,12 @@ var ProductSchema = z41.object({
5030
5179
  * review bodies. Renderers (`Reviews` component, `ProductDetail`,
5031
5180
  * etc.) consume directly.
5032
5181
  */
5033
- reviews: z41.array(z41.object({
5034
- author: z41.string(),
5035
- rating: z41.number(),
5036
- content: z41.string(),
5037
- date: z41.string(),
5038
- verified: z41.boolean().optional()
5182
+ reviews: z43.array(z43.object({
5183
+ author: z43.string(),
5184
+ rating: z43.number(),
5185
+ content: z43.string(),
5186
+ date: z43.string(),
5187
+ verified: z43.boolean().optional()
5039
5188
  })).optional(),
5040
5189
  /**
5041
5190
  * Ghost-entity flag — `true` when the Storefront API could not hydrate
@@ -5047,7 +5196,7 @@ var ProductSchema = z41.object({
5047
5196
  * Set exclusively by `createUnavailableProduct()` — never by the
5048
5197
  * Storefront mapper.
5049
5198
  */
5050
- unavailable: z41.boolean().default(false)
5199
+ unavailable: z43.boolean().default(false)
5051
5200
  });
5052
5201
  function createUnavailableProduct(gid) {
5053
5202
  return {
@@ -5069,68 +5218,68 @@ function createUnavailableProduct(gid) {
5069
5218
  function isGhostEntity(value) {
5070
5219
  return typeof value === "object" && value !== null && "unavailable" in value && value.unavailable === true;
5071
5220
  }
5072
- var ReviewSchema = z41.object({
5073
- id: z41.string(),
5074
- productId: z41.string(),
5075
- author: z41.string(),
5076
- rating: z41.number(),
5077
- text: z41.string(),
5078
- date: z41.string(),
5079
- verified: z41.boolean()
5221
+ var ReviewSchema = z43.object({
5222
+ id: z43.string(),
5223
+ productId: z43.string(),
5224
+ author: z43.string(),
5225
+ rating: z43.number(),
5226
+ text: z43.string(),
5227
+ date: z43.string(),
5228
+ verified: z43.boolean()
5080
5229
  });
5081
- var ArticleSchema = z41.object({
5082
- id: z41.string(),
5083
- handle: z41.string().default(""),
5084
- title: z41.string(),
5085
- excerpt: z41.string().default(""),
5086
- content: z41.string().default(""),
5087
- contentHtml: z41.string().optional(),
5088
- author: z41.string().default(""),
5089
- publishedAt: z41.string().default(""),
5230
+ var ArticleSchema = z43.object({
5231
+ id: z43.string(),
5232
+ handle: z43.string().default(""),
5233
+ title: z43.string(),
5234
+ excerpt: z43.string().default(""),
5235
+ content: z43.string().default(""),
5236
+ contentHtml: z43.string().optional(),
5237
+ author: z43.string().default(""),
5238
+ publishedAt: z43.string().default(""),
5090
5239
  image: ImageSchema.optional(),
5091
- blogHandle: z41.string().default(""),
5092
- tags: z41.array(z41.string()).default([])
5240
+ blogHandle: z43.string().default(""),
5241
+ tags: z43.array(z43.string()).default([])
5093
5242
  });
5094
- var CmsPageSchema = z41.object({
5095
- id: z41.string(),
5096
- handle: z41.string().default(""),
5097
- title: z41.string(),
5098
- body: z41.string().default(""),
5099
- bodyHtml: z41.string().optional(),
5100
- bodySummary: z41.string().default(""),
5101
- updatedAt: z41.string().default(""),
5102
- seoTitle: z41.string().optional(),
5103
- seoDescription: z41.string().optional()
5243
+ var CmsPageSchema = z43.object({
5244
+ id: z43.string(),
5245
+ handle: z43.string().default(""),
5246
+ title: z43.string(),
5247
+ body: z43.string().default(""),
5248
+ bodyHtml: z43.string().optional(),
5249
+ bodySummary: z43.string().default(""),
5250
+ updatedAt: z43.string().default(""),
5251
+ seoTitle: z43.string().optional(),
5252
+ seoDescription: z43.string().optional()
5104
5253
  });
5105
- var CmsPolicySchema = z41.object({
5106
- id: z41.string(),
5254
+ var CmsPolicySchema = z43.object({
5255
+ id: z43.string(),
5107
5256
  /** Stable policy slot identifier: 'refund' | 'privacy' | 'terms' |
5108
5257
  * 'shipping' | 'subscription' | 'warranty' | custom string. Open so
5109
5258
  * platforms with custom policy types can extend. */
5110
- kind: z41.string(),
5259
+ kind: z43.string(),
5111
5260
  /** Slug-shaped handle the platform exposes for storefront URLs
5112
5261
  * (e.g. `refund-policy`). Empty string when the backend doesn't
5113
5262
  * surface one. */
5114
- handle: z41.string().default(""),
5115
- title: z41.string(),
5116
- body: z41.string().default(""),
5117
- bodyHtml: z41.string().optional(),
5118
- url: z41.string().default("")
5263
+ handle: z43.string().default(""),
5264
+ title: z43.string(),
5265
+ body: z43.string().default(""),
5266
+ bodyHtml: z43.string().optional(),
5267
+ url: z43.string().default("")
5119
5268
  });
5120
- var CollectionSchema = z41.object({
5121
- id: z41.string(),
5122
- handle: z41.string().default(""),
5123
- title: z41.string(),
5124
- description: z41.string().default(""),
5269
+ var CollectionSchema = z43.object({
5270
+ id: z43.string(),
5271
+ handle: z43.string().default(""),
5272
+ title: z43.string(),
5273
+ description: z43.string().default(""),
5125
5274
  image: ImageSchema.optional(),
5126
- productCount: z41.number().int().nonnegative().optional()
5275
+ productCount: z43.number().int().nonnegative().optional()
5127
5276
  });
5128
- var CartLineSchema = z41.object({
5129
- id: z41.string(),
5130
- merchandiseId: z41.string(),
5131
- productId: z41.string(),
5132
- title: z41.string(),
5133
- variantTitle: z41.string().optional(),
5277
+ var CartLineSchema = z43.object({
5278
+ id: z43.string(),
5279
+ merchandiseId: z43.string(),
5280
+ productId: z43.string(),
5281
+ title: z43.string(),
5282
+ variantTitle: z43.string().optional(),
5134
5283
  /**
5135
5284
  * The variant's option axes as structured pairs (e.g.
5136
5285
  * `[{name:'Size', value:'7'}]`). The machine-readable counterpart of
@@ -5139,10 +5288,10 @@ var CartLineSchema = z41.object({
5139
5288
  * single-variant products (the degenerate `Title: Default Title` axis
5140
5289
  * is normalized away at the adapter boundary).
5141
5290
  */
5142
- selectedOptions: z41.array(SelectedOptionSchema).optional(),
5143
- vendor: z41.string().optional(),
5144
- sku: z41.string().optional(),
5145
- quantity: z41.number().int().positive(),
5291
+ selectedOptions: z43.array(SelectedOptionSchema).optional(),
5292
+ vendor: z43.string().optional(),
5293
+ sku: z43.string().optional(),
5294
+ quantity: z43.number().int().positive(),
5146
5295
  unitPrice: MoneySchema,
5147
5296
  totalPrice: MoneySchema,
5148
5297
  image: ImageSchema.optional(),
@@ -5162,26 +5311,26 @@ var CartLineSchema = z41.object({
5162
5311
  * client-minted id the backend rejects, line-tap navigation is
5163
5312
  * suppressed, and the money never folds into a settled-looking total.
5164
5313
  */
5165
- pending: z41.boolean().optional()
5314
+ pending: z43.boolean().optional()
5166
5315
  });
5167
5316
  function isPendingCartLine(line) {
5168
5317
  return line.pending === true;
5169
5318
  }
5170
- var CartDiscountCodeSchema = z41.object({
5171
- code: z41.string(),
5172
- applicable: z41.boolean()
5319
+ var CartDiscountCodeSchema = z43.object({
5320
+ code: z43.string(),
5321
+ applicable: z43.boolean()
5173
5322
  });
5174
- var CartMessageSchema = z41.object({
5175
- kind: z41.enum(["error", "warning", "info"]),
5323
+ var CartMessageSchema = z43.object({
5324
+ kind: z43.enum(["error", "warning", "info"]),
5176
5325
  /** Machine code for branching; opaque and backend-defined. */
5177
- code: z41.string(),
5326
+ code: z43.string(),
5178
5327
  /** Human-readable text, meant to be shown as-is. */
5179
- content: z41.string()
5328
+ content: z43.string()
5180
5329
  });
5181
- var CartSchema = z41.object({
5182
- id: z41.string(),
5183
- lines: z41.array(CartLineSchema),
5184
- totalQuantity: z41.number().int().nonnegative(),
5330
+ var CartSchema = z43.object({
5331
+ id: z43.string(),
5332
+ lines: z43.array(CartLineSchema),
5333
+ totalQuantity: z43.number().int().nonnegative(),
5185
5334
  subtotal: MoneySchema,
5186
5335
  /**
5187
5336
  * Cart total after discounts (pre-shipping/tax). Absent when the
@@ -5191,11 +5340,11 @@ var CartSchema = z41.object({
5191
5340
  */
5192
5341
  total: MoneySchema.optional(),
5193
5342
  /** Discount codes currently attached to the cart. */
5194
- discountCodes: z41.array(CartDiscountCodeSchema).default([]),
5343
+ discountCodes: z43.array(CartDiscountCodeSchema).default([]),
5195
5344
  /** Notices the backend attached to this cart — see `CartMessageSchema`.
5196
5345
  * Empty when the backend said nothing or does not report them. */
5197
- messages: z41.array(CartMessageSchema).default([]),
5198
- checkoutUrl: z41.string().optional(),
5346
+ messages: z43.array(CartMessageSchema).default([]),
5347
+ checkoutUrl: z43.string().optional(),
5199
5348
  /**
5200
5349
  * Opaque handle this cart is known by in the connector's BACK OFFICE — the
5201
5350
  * value a space owner searches there to find the order this cart became.
@@ -5208,14 +5357,14 @@ var CartSchema = z41.object({
5208
5357
  * Absent when the platform has no such handle, or while the cart is still the
5209
5358
  * client's optimistic paint and its id is client-minted.
5210
5359
  */
5211
- backOfficeRef: z41.string().optional(),
5360
+ backOfficeRef: z43.string().optional(),
5212
5361
  /**
5213
5362
  * URL that recreates this cart on the merchant's own store website
5214
5363
  * (replace semantics — overwrites any cart the visitor already has
5215
5364
  * there). Populated by platform adapters that support it; absent when
5216
5365
  * the cart is empty or the URL cannot be built.
5217
5366
  */
5218
- storeCartUrl: z41.string().optional(),
5367
+ storeCartUrl: z43.string().optional(),
5219
5368
  /**
5220
5369
  * True while this cart exists only in the client's optimistic paint —
5221
5370
  * no backend cart has been created yet, so its `id` is client-minted and
@@ -5223,7 +5372,7 @@ var CartSchema = z41.object({
5223
5372
  * `CartLineSchema.pending`: the adapter never sets it, and callers that
5224
5373
  * need a real cart id read THIS rather than sniffing the id's shape.
5225
5374
  */
5226
- pending: z41.boolean().optional()
5375
+ pending: z43.boolean().optional()
5227
5376
  });
5228
5377
  function settledCart(cart) {
5229
5378
  if (cart === null || cart === void 0) return null;
@@ -5231,27 +5380,27 @@ function settledCart(cart) {
5231
5380
  }
5232
5381
 
5233
5382
  // ../ecommerce/src/review-schemas.ts
5234
- import { z as z42 } from "zod";
5383
+ import { z as z44 } from "zod";
5235
5384
  var PRODUCT_REVIEWS_RESOLVER_KEY = "productReviews";
5236
- var ProductReviewItemSchema = z42.object({
5237
- author: z42.string(),
5238
- rating: z42.number(),
5385
+ var ProductReviewItemSchema = z44.object({
5386
+ author: z44.string(),
5387
+ rating: z44.number(),
5239
5388
  /** The reviewer's own headline ("love"), when they wrote one — the site shows it above `content`. */
5240
- title: z42.string().optional(),
5241
- content: z42.string(),
5242
- date: z42.string(),
5243
- verified: z42.boolean().optional(),
5389
+ title: z44.string().optional(),
5390
+ content: z44.string(),
5391
+ date: z44.string(),
5392
+ verified: z44.boolean().optional(),
5244
5393
  /**
5245
5394
  * Non-empty when the review was written for a grouped SIBLING product rather
5246
5395
  * than this one (brands pool reviews across a product line). A surface can
5247
5396
  * attribute it; empty / absent ⇒ the product's own review.
5248
5397
  */
5249
- writtenFor: z42.string().optional()
5398
+ writtenFor: z44.string().optional()
5250
5399
  });
5251
5400
  var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
5252
5401
  /** The sentence(s) the ranking fired on. Descriptive — it is what the matcher
5253
5402
  * scored, NOT necessarily text that occurs in `content`. */
5254
- highlight: z42.string().optional(),
5403
+ highlight: z44.string().optional(),
5255
5404
  /**
5256
5405
  * `highlight` resolved back into `content` as a VERBATIM substring, so a
5257
5406
  * surface can mark it with a plain `indexOf` and no matcher of its own.
@@ -5266,29 +5415,29 @@ var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
5266
5415
  * Absent when the passage genuinely has no home in the body (one cut from the
5267
5416
  * title). A surface then marks NOTHING rather than guessing at a span.
5268
5417
  */
5269
- mark: z42.string().optional()
5418
+ mark: z44.string().optional()
5270
5419
  });
5271
- var ReviewAggregateSchema = z42.object({
5272
- value: z42.number(),
5273
- count: z42.number()
5420
+ var ReviewAggregateSchema = z44.object({
5421
+ value: z44.number(),
5422
+ count: z44.number()
5274
5423
  });
5275
- var ProductReviewDataSchema = z42.object({
5276
- id: z42.string(),
5424
+ var ProductReviewDataSchema = z44.object({
5425
+ id: z44.string(),
5277
5426
  /** The product's FULL retrieved set — what a filterable list renders. */
5278
- reviews: z42.array(ProductReviewItemSchema).default([]),
5427
+ reviews: z44.array(ProductReviewItemSchema).default([]),
5279
5428
  aggregate: ReviewAggregateSchema.default({ value: 0, count: 0 }),
5280
5429
  /** 5★→1★ star COUNTS over the full set (index 0 = 5-star). */
5281
- distribution: z42.array(z42.number()).default([]),
5430
+ distribution: z44.array(z44.number()).default([]),
5282
5431
  /**
5283
5432
  * The reviews that ANSWER the surface's intent, best first. Empty when no
5284
5433
  * intent was asked for — never a silent copy of `reviews`.
5285
5434
  */
5286
- highlights: z42.array(ProductReviewHighlightSchema).default([]),
5435
+ highlights: z44.array(ProductReviewHighlightSchema).default([]),
5287
5436
  /**
5288
5437
  * True when the review provider could not be read and nothing is indexed —
5289
5438
  * the empty lists mean "not loaded", NOT "this product has no reviews".
5290
5439
  */
5291
- unavailable: z42.boolean().optional()
5440
+ unavailable: z44.boolean().optional()
5292
5441
  });
5293
5442
  var ProductReviewPayloadSchema = ProductReviewDataSchema.omit({ id: true });
5294
5443
 
@@ -5582,9 +5731,9 @@ function readPdpCompanions(config) {
5582
5731
  }
5583
5732
 
5584
5733
  // ../ecommerce/src/base-attributes.ts
5585
- import { z as z43 } from "zod";
5734
+ import { z as z45 } from "zod";
5586
5735
  var BASE_ATTRIBUTES_CONFIG_KEY = "baseAttributes";
5587
- var BaseAttributesRecordSchema = z43.record(z43.string(), AttributeDefSchema);
5736
+ var BaseAttributesRecordSchema = z45.record(z45.string(), AttributeDefSchema);
5588
5737
  function buildBaseAttributesConfig(attributes) {
5589
5738
  return { [BASE_ATTRIBUTES_CONFIG_KEY]: attributes };
5590
5739
  }
@@ -5595,9 +5744,9 @@ function readBaseAttributesConfig(config) {
5595
5744
  }
5596
5745
 
5597
5746
  // ../ecommerce/src/bucket-labels.ts
5598
- import { z as z44 } from "zod";
5747
+ import { z as z46 } from "zod";
5599
5748
  var BUCKET_LABELS_CONFIG_KEY = "bucketLabels";
5600
- var BucketLabelsRecordSchema = z44.record(z44.string(), z44.string());
5749
+ var BucketLabelsRecordSchema = z46.record(z46.string(), z46.string());
5601
5750
  function buildBucketLabelsConfig(labels) {
5602
5751
  return { [BUCKET_LABELS_CONFIG_KEY]: labels };
5603
5752
  }
@@ -5623,6 +5772,44 @@ function clearProductNameLookups() {
5623
5772
  factories.length = 0;
5624
5773
  }
5625
5774
 
5775
+ // ../ecommerce/src/code-discounts.ts
5776
+ var factories2 = [];
5777
+ function registerCodeDiscountSource(factory) {
5778
+ factories2.push(factory);
5779
+ }
5780
+ function resolveCodeDiscountSource(options) {
5781
+ for (const factory of factories2) {
5782
+ const source = factory(options);
5783
+ if (source !== void 0) return source;
5784
+ }
5785
+ return void 0;
5786
+ }
5787
+ function clearCodeDiscountSources() {
5788
+ factories2.length = 0;
5789
+ }
5790
+
5791
+ // ../ecommerce/src/store-theme.ts
5792
+ var StoreThemeAccessError = class extends Error {
5793
+ constructor(message) {
5794
+ super(message);
5795
+ this.name = "StoreThemeAccessError";
5796
+ }
5797
+ };
5798
+ var factories3 = [];
5799
+ function registerStoreThemeSource(factory) {
5800
+ factories3.push(factory);
5801
+ }
5802
+ function resolveStoreThemeSource(options) {
5803
+ for (const factory of factories3) {
5804
+ const source = factory(options);
5805
+ if (source !== void 0) return source;
5806
+ }
5807
+ return void 0;
5808
+ }
5809
+ function clearStoreThemeSources() {
5810
+ factories3.length = 0;
5811
+ }
5812
+
5626
5813
  // src/session/visitor-locale.ts
5627
5814
  var cached = null;
5628
5815
  function getVisitorLocale() {
@@ -5631,6 +5818,30 @@ function getVisitorLocale() {
5631
5818
  cached = parseBcp47Locale(navigator.language);
5632
5819
  return cached;
5633
5820
  }
5821
+ function commerceLocaleOf(spaceLocale) {
5822
+ const visitor = getVisitorLocale();
5823
+ if (spaceLocale === void 0) return visitor;
5824
+ const space = parseBcp47Locale(spaceLocale);
5825
+ const out = {};
5826
+ if (space.language !== void 0) out.language = space.language;
5827
+ const country = space.country !== void 0 ? space.country : visitor.country;
5828
+ if (country !== void 0) out.country = country;
5829
+ return out;
5830
+ }
5831
+
5832
+ // src/session/space-locale-context.tsx
5833
+ import * as React from "react";
5834
+ import { jsx } from "react/jsx-runtime";
5835
+ var SpaceLocaleContext = React.createContext(DEFAULT_SPACE_LOCALE);
5836
+ function SpaceLocaleProvider({ locale, children }) {
5837
+ return /* @__PURE__ */ jsx(SpaceLocaleContext.Provider, { value: locale, children });
5838
+ }
5839
+ function useSpaceLocale() {
5840
+ return React.useContext(SpaceLocaleContext);
5841
+ }
5842
+ function useTextDirection() {
5843
+ return textDirectionOf(useSpaceLocale());
5844
+ }
5634
5845
 
5635
5846
  // src/session/clear-registry.ts
5636
5847
  var sessionScopedClearHandlers = /* @__PURE__ */ new Set();
@@ -5690,17 +5901,17 @@ __export(shell_exports, {
5690
5901
  });
5691
5902
 
5692
5903
  // src/shell/ScrollContainerContext.tsx
5693
- import React from "react";
5694
- import { jsx } from "react/jsx-runtime";
5695
- var ScrollContainerContext = React.createContext(null);
5904
+ import React2 from "react";
5905
+ import { jsx as jsx2 } from "react/jsx-runtime";
5906
+ var ScrollContainerContext = React2.createContext(null);
5696
5907
  function ScrollContainerProvider({
5697
5908
  value,
5698
5909
  children
5699
5910
  }) {
5700
- return /* @__PURE__ */ jsx(ScrollContainerContext.Provider, { value, children });
5911
+ return /* @__PURE__ */ jsx2(ScrollContainerContext.Provider, { value, children });
5701
5912
  }
5702
5913
  function useScrollContainerRef() {
5703
- const ref = React.useContext(ScrollContainerContext);
5914
+ const ref = React2.useContext(ScrollContainerContext);
5704
5915
  if (!ref) {
5705
5916
  throw new Error(
5706
5917
  "useScrollContainerRef must be used inside <ScrollContainerProvider> (mounted by FourtyProvider)."
@@ -5710,31 +5921,31 @@ function useScrollContainerRef() {
5710
5921
  }
5711
5922
 
5712
5923
  // src/shell/ShellRegistry.tsx
5713
- import { createContext as createContext3, useContext as useContext3 } from "react";
5714
- import { jsx as jsx2 } from "react/jsx-runtime";
5715
- var ShellRegistryContext = createContext3({});
5924
+ import { createContext as createContext4, useContext as useContext4 } from "react";
5925
+ import { jsx as jsx3 } from "react/jsx-runtime";
5926
+ var ShellRegistryContext = createContext4({});
5716
5927
  function ShellRegistryProvider({
5717
5928
  registry: registry2,
5718
5929
  children
5719
5930
  }) {
5720
- return /* @__PURE__ */ jsx2(ShellRegistryContext.Provider, { value: registry2, children });
5931
+ return /* @__PURE__ */ jsx3(ShellRegistryContext.Provider, { value: registry2, children });
5721
5932
  }
5722
5933
  function useShellRegistry() {
5723
- return useContext3(ShellRegistryContext);
5934
+ return useContext4(ShellRegistryContext);
5724
5935
  }
5725
5936
 
5726
5937
  // src/shell/ShellRootContext.tsx
5727
- import { createContext as createContext4, useContext as useContext4 } from "react";
5728
- var ShellRootContext = createContext4(null);
5938
+ import { createContext as createContext5, useContext as useContext5 } from "react";
5939
+ var ShellRootContext = createContext5(null);
5729
5940
  function useShellRoot() {
5730
- const ref = useContext4(ShellRootContext);
5941
+ const ref = useContext5(ShellRootContext);
5731
5942
  return ref ? ref.current : null;
5732
5943
  }
5733
5944
 
5734
5945
  // src/shell/dock-persistence.tsx
5735
- import React3 from "react";
5736
- import { jsx as jsx3 } from "react/jsx-runtime";
5737
- var DockPersistenceContext = React3.createContext({
5946
+ import React4 from "react";
5947
+ import { jsx as jsx4 } from "react/jsx-runtime";
5948
+ var DockPersistenceContext = React4.createContext({
5738
5949
  initialOpen: null,
5739
5950
  onOpenChange: () => {
5740
5951
  }
@@ -5743,28 +5954,28 @@ function DockPersistenceProvider({
5743
5954
  value,
5744
5955
  children
5745
5956
  }) {
5746
- return /* @__PURE__ */ jsx3(DockPersistenceContext.Provider, { value, children });
5957
+ return /* @__PURE__ */ jsx4(DockPersistenceContext.Provider, { value, children });
5747
5958
  }
5748
5959
  function useDockPersistence() {
5749
- return React3.useContext(DockPersistenceContext);
5960
+ return React4.useContext(DockPersistenceContext);
5750
5961
  }
5751
5962
 
5752
5963
  // src/shell/use-dock-state.ts
5753
- import React6 from "react";
5964
+ import React7 from "react";
5754
5965
 
5755
5966
  // src/canvas/runtime-context.tsx
5756
- import { createContext as createContext5, useContext as useContext5 } from "react";
5757
- var FourtyRuntimeContext = createContext5(null);
5967
+ import { createContext as createContext6, useContext as useContext6 } from "react";
5968
+ var FourtyRuntimeContext = createContext6(null);
5758
5969
  var FourtyRuntimeProvider = FourtyRuntimeContext.Provider;
5759
5970
  function useFourtyRuntime() {
5760
- const runtime = useContext5(FourtyRuntimeContext);
5971
+ const runtime = useContext6(FourtyRuntimeContext);
5761
5972
  if (!runtime) {
5762
5973
  throw new Error("useFourtyRuntime must be used within a <FourtyProvider>");
5763
5974
  }
5764
5975
  return runtime;
5765
5976
  }
5766
5977
  function useOptionalFourtyRuntime() {
5767
- return useContext5(FourtyRuntimeContext);
5978
+ return useContext6(FourtyRuntimeContext);
5768
5979
  }
5769
5980
 
5770
5981
  // src/canvas/runtime-hooks.ts
@@ -5863,21 +6074,21 @@ function useHasLeftSeedHome() {
5863
6074
  }
5864
6075
 
5865
6076
  // src/shell/use-hydrated.ts
5866
- import React4 from "react";
6077
+ import React5 from "react";
5867
6078
  function useHydrated() {
5868
- const [hydrated, setHydrated] = React4.useState(false);
5869
- React4.useEffect(() => {
6079
+ const [hydrated, setHydrated] = React5.useState(false);
6080
+ React5.useEffect(() => {
5870
6081
  setHydrated(true);
5871
6082
  }, []);
5872
6083
  return hydrated;
5873
6084
  }
5874
6085
 
5875
6086
  // src/shell/use-overridable-toggle.ts
5876
- import React5 from "react";
6087
+ import React6 from "react";
5877
6088
  function useOverridableToggle(defaultValue) {
5878
- const [override, setOverride] = React5.useState(null);
6089
+ const [override, setOverride] = React6.useState(null);
5879
6090
  const value = override === null ? defaultValue : override;
5880
- const set = React5.useCallback((next) => {
6091
+ const set = React6.useCallback((next) => {
5881
6092
  setOverride(next);
5882
6093
  }, []);
5883
6094
  const toggle = () => {
@@ -5894,9 +6105,9 @@ function useDockState(reopenOnMessage, autoOpen) {
5894
6105
  const hasLeftHome = useHasLeftSeedHome();
5895
6106
  const agentDriven = useAgentDriven();
5896
6107
  const settled = sessionId !== null;
5897
- const settledRef = React6.useRef(false);
5898
- const engagedWhenSettledRef = React6.useRef(false);
5899
- const hasEngagedRef = React6.useRef(initialOpen === true);
6108
+ const settledRef = React7.useRef(false);
6109
+ const engagedWhenSettledRef = React7.useRef(false);
6110
+ const hasEngagedRef = React7.useRef(initialOpen === true);
5900
6111
  const historyIsAccountedFor = initialOpen !== null;
5901
6112
  const engagementIsNew = historyIsAccountedFor ? settledRef.current && !engagedWhenSettledRef.current : true;
5902
6113
  if (hasLeftHome && engagementIsNew && !agentDriven) hasEngagedRef.current = true;
@@ -5904,8 +6115,8 @@ function useDockState(reopenOnMessage, autoOpen) {
5904
6115
  const openDefault = agentDriven || !autoOpen ? false : hydrated ? hasEngagedRef.current : initialOpen === true;
5905
6116
  const toggle = useOverridableToggle(openDefault);
5906
6117
  const userTurns = messages.reduce((n, m) => m.role === "user" ? n + 1 : n, 0);
5907
- const prevUserTurns = React6.useRef(userTurns);
5908
- React6.useEffect(() => {
6118
+ const prevUserTurns = React7.useRef(userTurns);
6119
+ React7.useEffect(() => {
5909
6120
  if (!settledRef.current) {
5910
6121
  if (!settled) return;
5911
6122
  settledRef.current = true;
@@ -5916,7 +6127,7 @@ function useDockState(reopenOnMessage, autoOpen) {
5916
6127
  if (reopenOnMessage && autoOpen && !agentDriven && userTurns > prevUserTurns.current) toggle.set(true);
5917
6128
  prevUserTurns.current = userTurns;
5918
6129
  }, [userTurns, settled, hasLeftHome, reopenOnMessage, autoOpen, agentDriven, toggle.set]);
5919
- React6.useEffect(() => {
6130
+ React7.useEffect(() => {
5920
6131
  onOpenChange(toggle.value);
5921
6132
  }, [toggle.value, onOpenChange]);
5922
6133
  return { open: toggle.value, toggle: toggle.toggle };
@@ -5948,7 +6159,7 @@ function useExclusiveOverlay(id, open, close) {
5948
6159
  }
5949
6160
 
5950
6161
  // src/shell/composer-attachments/use-composer-attachments.ts
5951
- import * as React7 from "react";
6162
+ import * as React8 from "react";
5952
6163
 
5953
6164
  // src/utils/core-utils/mint-id.ts
5954
6165
  function mintId(prefix) {
@@ -5977,27 +6188,29 @@ async function heicToJpeg(file) {
5977
6188
 
5978
6189
  // src/shell/composer-attachments/use-composer-attachments.ts
5979
6190
  var ATTACHMENT_ACCEPT = ALLOWED_ATTACHMENT_TYPES.join(",");
5980
- var MAX_MB = Math.round(MAX_ATTACHMENT_BYTES / (1024 * 1024));
5981
6191
  function validate(file) {
5982
- if (file.size === 0) return "File is empty.";
5983
- if (!isAllowedAttachmentType(file.type)) {
5984
- return file.type.length > 0 ? `${file.type} isn't supported.` : "This file type isn't supported.";
5985
- }
5986
- if (file.size > MAX_ATTACHMENT_BYTES) return `File is larger than ${MAX_MB}MB.`;
6192
+ if (file.size === 0) return { kind: "empty" };
6193
+ if (!isAllowedAttachmentType(file.type)) return { kind: "unsupported_type", mimeType: file.type };
6194
+ if (file.size > MAX_ATTACHMENT_BYTES) return { kind: "too_large", maxMb: MAX_ATTACHMENT_MB };
5987
6195
  return null;
5988
6196
  }
6197
+ function failureOf(err) {
6198
+ if (err instanceof AttachmentUploadError) return err.failure;
6199
+ console.warn("[attachments] upload rejected without a reason:", err);
6200
+ return { kind: "upload_failed" };
6201
+ }
5989
6202
  function useComposerAttachments() {
5990
6203
  const session = useFourtySession();
5991
- const [attachments, setAttachments] = React7.useState([]);
5992
- const createdUrls = React7.useRef(/* @__PURE__ */ new Set());
5993
- const update2 = React7.useCallback((localId, patch) => {
6204
+ const [attachments, setAttachments] = React8.useState([]);
6205
+ const createdUrls = React8.useRef(/* @__PURE__ */ new Set());
6206
+ const update2 = React8.useCallback((localId, patch) => {
5994
6207
  setAttachments((prev) => prev.map((a) => a.localId === localId ? { ...a, ...patch } : a));
5995
6208
  }, []);
5996
- const startUpload = React7.useCallback(
6209
+ const startUpload = React8.useCallback(
5997
6210
  (localId, file) => {
5998
- const error = validate(file);
5999
- if (error !== null) {
6000
- update2(localId, { status: "error", error, name: file.name, mimeType: file.type, size: file.size });
6211
+ const failure = validate(file);
6212
+ if (failure !== null) {
6213
+ update2(localId, { status: "error", failure, name: file.name, mimeType: file.type, size: file.size });
6001
6214
  return;
6002
6215
  }
6003
6216
  const previewUrl = isImageAttachment(file.type) ? URL.createObjectURL(file) : null;
@@ -6008,19 +6221,16 @@ function useComposerAttachments() {
6008
6221
  mimeType: file.type,
6009
6222
  size: file.size,
6010
6223
  previewUrl,
6011
- error: null
6224
+ failure: null
6012
6225
  });
6013
6226
  session.uploadAttachment(file).then(
6014
6227
  (ref) => update2(localId, { status: "ready", ref }),
6015
- (err) => update2(localId, {
6016
- status: "error",
6017
- error: err instanceof Error ? err.message : "Upload failed."
6018
- })
6228
+ (err) => update2(localId, { status: "error", failure: failureOf(err) })
6019
6229
  );
6020
6230
  },
6021
6231
  [session, update2]
6022
6232
  );
6023
- const addFiles = React7.useCallback(
6233
+ const addFiles = React8.useCallback(
6024
6234
  (files) => {
6025
6235
  const list2 = Array.from(files);
6026
6236
  for (const file of list2) {
@@ -6035,7 +6245,7 @@ function useComposerAttachments() {
6035
6245
  previewUrl: null,
6036
6246
  status: "uploading",
6037
6247
  ref: null,
6038
- error: null
6248
+ failure: null
6039
6249
  }
6040
6250
  ]);
6041
6251
  if (isHeic(file)) {
@@ -6053,13 +6263,13 @@ function useComposerAttachments() {
6053
6263
  },
6054
6264
  [startUpload]
6055
6265
  );
6056
- const revoke = React7.useCallback((url) => {
6266
+ const revoke = React8.useCallback((url) => {
6057
6267
  if (url !== null && createdUrls.current.has(url)) {
6058
6268
  URL.revokeObjectURL(url);
6059
6269
  createdUrls.current.delete(url);
6060
6270
  }
6061
6271
  }, []);
6062
- const remove2 = React7.useCallback(
6272
+ const remove2 = React8.useCallback(
6063
6273
  (localId) => {
6064
6274
  setAttachments((prev) => {
6065
6275
  const target = prev.find((a) => a.localId === localId);
@@ -6069,12 +6279,12 @@ function useComposerAttachments() {
6069
6279
  },
6070
6280
  [revoke]
6071
6281
  );
6072
- const clear = React7.useCallback(() => {
6282
+ const clear = React8.useCallback(() => {
6073
6283
  for (const url of createdUrls.current) URL.revokeObjectURL(url);
6074
6284
  createdUrls.current.clear();
6075
6285
  setAttachments([]);
6076
6286
  }, []);
6077
- React7.useEffect(
6287
+ React8.useEffect(
6078
6288
  () => () => {
6079
6289
  for (const url of createdUrls.current) URL.revokeObjectURL(url);
6080
6290
  createdUrls.current.clear();
@@ -6082,7 +6292,7 @@ function useComposerAttachments() {
6082
6292
  []
6083
6293
  );
6084
6294
  const hasPending = attachments.some((a) => a.status === "uploading");
6085
- const readyRefs = React7.useMemo(
6295
+ const readyRefs = React8.useMemo(
6086
6296
  () => attachments.filter((a) => a.ref !== null).map((a) => a.ref),
6087
6297
  [attachments]
6088
6298
  );
@@ -6090,7 +6300,7 @@ function useComposerAttachments() {
6090
6300
  }
6091
6301
 
6092
6302
  // src/shell/use-prompt-composer.ts
6093
- import * as React8 from "react";
6303
+ import * as React9 from "react";
6094
6304
 
6095
6305
  // src/voice/use-voice-capture.ts
6096
6306
  import { useCallback as useCallback4, useEffect as useEffect4, useRef as useRef4, useState as useState3 } from "react";
@@ -6362,26 +6572,26 @@ function usePromptComposer(options = {}) {
6362
6572
  const internalAttach = useComposerAttachments();
6363
6573
  const attach = attachmentsController !== void 0 ? attachmentsController : internalAttach;
6364
6574
  const [value, setValue] = useComposerDraft();
6365
- const dictationBaseRef = React8.useRef("");
6366
- const handleDictationResult = React8.useCallback((transcript) => {
6575
+ const dictationBaseRef = React9.useRef("");
6576
+ const handleDictationResult = React9.useCallback((transcript) => {
6367
6577
  const base = dictationBaseRef.current;
6368
6578
  setValue(base.length > 0 ? `${base} ${transcript}` : transcript);
6369
6579
  }, [setValue]);
6370
- const submitRef = React8.useRef(() => {
6580
+ const submitRef = React9.useRef(() => {
6371
6581
  });
6372
6582
  const voiceCapture = useVoiceCapture({
6373
6583
  onResult: handleDictationResult,
6374
6584
  onCommit: () => submitRef.current()
6375
6585
  });
6376
- const valueRef = React8.useRef(value);
6586
+ const valueRef = React9.useRef(value);
6377
6587
  valueRef.current = value;
6378
- const toggleDictation = React8.useCallback(() => {
6588
+ const toggleDictation = React9.useCallback(() => {
6379
6589
  if (voiceCapture.state !== "listening") {
6380
6590
  dictationBaseRef.current = valueRef.current;
6381
6591
  }
6382
6592
  voiceCapture.toggle();
6383
6593
  }, [voiceCapture]);
6384
- const onPaste = React8.useCallback(
6594
+ const onPaste = React9.useCallback(
6385
6595
  (e) => {
6386
6596
  const files = e.clipboardData.files;
6387
6597
  if (files.length > 0) {
@@ -6392,7 +6602,7 @@ function usePromptComposer(options = {}) {
6392
6602
  [attach]
6393
6603
  );
6394
6604
  const canSend = (value.trim().length > 0 || attach.readyRefs.length > 0) && !attach.hasPending;
6395
- const submit = React8.useCallback(() => {
6605
+ const submit = React9.useCallback(() => {
6396
6606
  if (!((value.trim().length > 0 || attach.readyRefs.length > 0) && !attach.hasPending)) return;
6397
6607
  voiceCapture.cancel();
6398
6608
  session.sendMessage(
@@ -6419,10 +6629,10 @@ function usePromptComposer(options = {}) {
6419
6629
  }
6420
6630
 
6421
6631
  // src/shell/use-composer-chip-select.ts
6422
- import * as React9 from "react";
6632
+ import * as React10 from "react";
6423
6633
  function useComposerChipSelect() {
6424
6634
  const session = useFourtySession();
6425
- return React9.useCallback(
6635
+ return React10.useCallback(
6426
6636
  (action) => {
6427
6637
  session.dispatchSuggestionAction({
6428
6638
  id: action.id,
@@ -6436,10 +6646,10 @@ function useComposerChipSelect() {
6436
6646
  }
6437
6647
 
6438
6648
  // src/shell/use-turn-ask-reply.ts
6439
- import * as React10 from "react";
6649
+ import * as React11 from "react";
6440
6650
  function useTurnAskReply() {
6441
6651
  const session = useFourtySession();
6442
- return React10.useCallback(
6652
+ return React11.useCallback(
6443
6653
  (answer) => {
6444
6654
  session.dispatchSuggestionAction({ id: `ask-${answer}`, label: answer, type: "message", payload: { text: answer, followUp: true } });
6445
6655
  },
@@ -6448,14 +6658,14 @@ function useTurnAskReply() {
6448
6658
  }
6449
6659
 
6450
6660
  // src/shell/turn-ask-placement.tsx
6451
- import * as React11 from "react";
6452
- import { jsx as jsx4 } from "react/jsx-runtime";
6453
- var TurnAskPlacementContext = React11.createContext("prose");
6661
+ import * as React12 from "react";
6662
+ import { jsx as jsx5 } from "react/jsx-runtime";
6663
+ var TurnAskPlacementContext = React12.createContext("prose");
6454
6664
  function TurnAskPlacementProvider({ placement, children }) {
6455
- return /* @__PURE__ */ jsx4(TurnAskPlacementContext.Provider, { value: placement, children });
6665
+ return /* @__PURE__ */ jsx5(TurnAskPlacementContext.Provider, { value: placement, children });
6456
6666
  }
6457
6667
  function useTurnAskPlacement() {
6458
- return React11.useContext(TurnAskPlacementContext);
6668
+ return React12.useContext(TurnAskPlacementContext);
6459
6669
  }
6460
6670
 
6461
6671
  // src/shell/use-go-home.ts
@@ -6472,10 +6682,10 @@ function useGoHome() {
6472
6682
  }
6473
6683
 
6474
6684
  // src/shell/use-menu-item-select.ts
6475
- import * as React12 from "react";
6685
+ import * as React13 from "react";
6476
6686
  function useMenuItemSelect() {
6477
6687
  const session = useFourtySession();
6478
- return React12.useCallback(
6688
+ return React13.useCallback(
6479
6689
  (item) => {
6480
6690
  const payload = item.action.payload === void 0 ? {} : item.action.payload;
6481
6691
  session.dispatchSuggestionAction({
@@ -6528,15 +6738,15 @@ function useThreadRows() {
6528
6738
  }
6529
6739
 
6530
6740
  // src/shell/conversation/use-conversation-page.ts
6531
- import * as React16 from "react";
6741
+ import * as React17 from "react";
6532
6742
 
6533
6743
  // src/canvas/use-is-seed-home.ts
6534
- import * as React13 from "react";
6744
+ import * as React14 from "react";
6535
6745
  function useIsSeedHome() {
6536
6746
  const layout = useDisplayedLayout();
6537
6747
  const turn = useTurn();
6538
6748
  const sessionState = useSessionState();
6539
- return React13.useMemo(() => {
6749
+ return React14.useMemo(() => {
6540
6750
  if (sessionState.seedLayout === null) return false;
6541
6751
  if (turn.index !== 0) return false;
6542
6752
  if (turn.userMessage !== "") return false;
@@ -6772,8 +6982,8 @@ var PRESENCE_LIFECYCLE = {
6772
6982
  };
6773
6983
 
6774
6984
  // ../spacestation/src/widgets/presence/profile.ts
6775
- import { z as z45 } from "zod";
6776
- var PresenceProfileSchema = z45.object({
6985
+ import { z as z47 } from "zod";
6986
+ var PresenceProfileSchema = z47.object({
6777
6987
  /**
6778
6988
  * How much the agent SPEAKS in presence.
6779
6989
  * - 'off' the faculty generates no prose at all. Zero tokens, and
@@ -6783,14 +6993,14 @@ var PresenceProfileSchema = z45.object({
6783
6993
  * - 'terse' one lead line per turn. The default — see below.
6784
6994
  * - 'full' a lead line plus asides beside individual elements.
6785
6995
  */
6786
- voice: z45.enum(["off", "terse", "full"]),
6996
+ voice: z47.enum(["off", "terse", "full"]),
6787
6997
  /**
6788
6998
  * Which source kinds this space surfaces. 'all' = every tool that declares a
6789
6999
  * `sourceKind`. An explicit list lets a space stay quiet about lookups its
6790
7000
  * visitors would find uninteresting (policy checks on a fashion space)
6791
7001
  * without the tool having to lie about what it is.
6792
7002
  */
6793
- sources: z45.union([z45.array(z45.string()), z45.literal("all")]),
7003
+ sources: z47.union([z47.array(z47.string()), z47.literal("all")]),
6794
7004
  /**
6795
7005
  * Which facts render.
6796
7006
  * - 'inferred-only' hides `provenance: 'stated'` facts. The default and the
@@ -6799,7 +7009,7 @@ var PresenceProfileSchema = z45.object({
6799
7009
  * - 'all' shows stated facts too — for spaces where confirming the brief
6800
7010
  * back is itself the product (intake, configuration).
6801
7011
  */
6802
- facts: z45.enum(["inferred-only", "all"])
7012
+ facts: z47.enum(["inferred-only", "all"])
6803
7013
  });
6804
7014
  var DEFAULT_PRESENCE_PROFILE = {
6805
7015
  voice: "terse",
@@ -6808,18 +7018,18 @@ var DEFAULT_PRESENCE_PROFILE = {
6808
7018
  };
6809
7019
 
6810
7020
  // src/widgets/presence/runtime-context.tsx
6811
- import { createContext as createContext7, useContext as useContext7 } from "react";
6812
- var PresenceRuntimeContext = createContext7(null);
7021
+ import { createContext as createContext8, useContext as useContext8 } from "react";
7022
+ var PresenceRuntimeContext = createContext8(null);
6813
7023
  var PresenceRuntimeProvider = PresenceRuntimeContext.Provider;
6814
7024
  function usePresenceRuntime() {
6815
- const runtime = useContext7(PresenceRuntimeContext);
7025
+ const runtime = useContext8(PresenceRuntimeContext);
6816
7026
  if (!runtime) {
6817
7027
  throw new Error("usePresenceRuntime must be used within a <FourtyProvider>");
6818
7028
  }
6819
7029
  return runtime;
6820
7030
  }
6821
7031
  function useOptionalPresenceRuntime() {
6822
- return useContext7(PresenceRuntimeContext);
7032
+ return useContext8(PresenceRuntimeContext);
6823
7033
  }
6824
7034
  function useScanning() {
6825
7035
  return usePresenceRuntime().useScanning();
@@ -6995,17 +7205,17 @@ function useAgentPresenceFresh(flowId = PRESENCE_FLOW) {
6995
7205
  import { useMemo as useMemo5 } from "react";
6996
7206
 
6997
7207
  // src/catalog/CatalogContext.tsx
6998
- import { createContext as createContext8, useContext as useContext8 } from "react";
6999
- import { jsx as jsx5 } from "react/jsx-runtime";
7000
- var CatalogContext = createContext8({});
7208
+ import { createContext as createContext9, useContext as useContext9 } from "react";
7209
+ import { jsx as jsx6 } from "react/jsx-runtime";
7210
+ var CatalogContext = createContext9({});
7001
7211
  function CatalogProvider({
7002
7212
  catalog,
7003
7213
  children
7004
7214
  }) {
7005
- return /* @__PURE__ */ jsx5(CatalogContext.Provider, { value: catalog, children });
7215
+ return /* @__PURE__ */ jsx6(CatalogContext.Provider, { value: catalog, children });
7006
7216
  }
7007
7217
  function useComponentCatalog() {
7008
- return useContext8(CatalogContext);
7218
+ return useContext9(CatalogContext);
7009
7219
  }
7010
7220
 
7011
7221
  // src/canvas/layout-entity-refs.ts
@@ -7065,10 +7275,10 @@ function useAgentPresence(flowId = PRESENCE_FLOW) {
7065
7275
  }
7066
7276
 
7067
7277
  // src/widgets/presence/use-forget-fact.ts
7068
- import * as React15 from "react";
7278
+ import * as React16 from "react";
7069
7279
 
7070
7280
  // src/widgets/presence/use-optimistic-flow-set.ts
7071
- import * as React14 from "react";
7281
+ import * as React15 from "react";
7072
7282
  function readKeys(data) {
7073
7283
  if (typeof data !== "object" || data === null || !("keys" in data)) return [];
7074
7284
  const raw = data.keys;
@@ -7077,8 +7287,8 @@ function readKeys(data) {
7077
7287
  function useOptimisticFlowSet(flowId) {
7078
7288
  const keys = readKeys(useAgentFlow(flowId));
7079
7289
  const joined = keys.join("\0");
7080
- const set = React14.useMemo(() => new Set(keys), [joined]);
7081
- return React14.useMemo(
7290
+ const set = React15.useMemo(() => new Set(keys), [joined]);
7291
+ return React15.useMemo(
7082
7292
  () => ({
7083
7293
  has: (key) => set.has(key),
7084
7294
  add: (key) => {
@@ -7094,7 +7304,7 @@ function useOptimisticFlowSet(flowId) {
7094
7304
  function useReconcileFlowSet(flowId, presentKeys) {
7095
7305
  const data = useAgentFlow(flowId);
7096
7306
  const presentJoined = presentKeys === null ? null : [...presentKeys].join("\0");
7097
- React14.useEffect(() => {
7307
+ React15.useEffect(() => {
7098
7308
  if (presentKeys === null) return;
7099
7309
  const keys = readKeys(data);
7100
7310
  if (keys.length === 0) return;
@@ -7116,7 +7326,7 @@ var useUndismissedFacts = useVisibleFactList;
7116
7326
  function useForgetFact() {
7117
7327
  const { sendImmediateSignal } = useFourtySession();
7118
7328
  const dismissed = useOptimisticFlowSet(DISMISSED_FLOW);
7119
- const forget = React15.useCallback(
7329
+ const forget = React16.useCallback(
7120
7330
  (f) => {
7121
7331
  dismissed.add(f.label);
7122
7332
  sendImmediateSignal({ type: PRESENCE_FACT_DISMISS_SIGNAL, payload: { label: f.label, value: f.value } });
@@ -7167,7 +7377,7 @@ function useConversationPage() {
7167
7377
  const presence = useConversationPresence();
7168
7378
  const suggestions = useSuggestionsWithDefaults();
7169
7379
  const followUp = useComposerChipSelect();
7170
- const onWelcomePage = React16.useMemo(
7380
+ const onWelcomePage = React17.useMemo(
7171
7381
  () => seedLayout !== null && JSON.stringify(layout) === JSON.stringify(seedLayout),
7172
7382
  [layout, seedLayout]
7173
7383
  );
@@ -7235,14 +7445,14 @@ function findThreadHeadroom(scroller) {
7235
7445
  }
7236
7446
 
7237
7447
  // src/shell/thread-scroll/ThreadHeadroom.tsx
7238
- import { jsx as jsx6 } from "react/jsx-runtime";
7448
+ import { jsx as jsx7 } from "react/jsx-runtime";
7239
7449
  var HEADROOM_STYLE = { height: 0, flexShrink: 0 };
7240
7450
  function ThreadHeadroom() {
7241
- return /* @__PURE__ */ jsx6("div", { ...{ [THREAD_HEADROOM_ATTR]: "" }, "aria-hidden": true, style: HEADROOM_STYLE });
7451
+ return /* @__PURE__ */ jsx7("div", { ...{ [THREAD_HEADROOM_ATTR]: "" }, "aria-hidden": true, style: HEADROOM_STYLE });
7242
7452
  }
7243
7453
 
7244
7454
  // src/shell/thread-scroll/use-pin-turn-to-top.ts
7245
- import * as React17 from "react";
7455
+ import * as React18 from "react";
7246
7456
 
7247
7457
  // src/canvas/dom-targets.ts
7248
7458
  var ACTIVE_PANEL_ATTR = "data-fourty-panel-active";
@@ -7419,7 +7629,7 @@ function pinTurnHead(scroller, row, options) {
7419
7629
 
7420
7630
  // src/shell/thread-scroll/use-pin-turn-to-top.ts
7421
7631
  function usePinTurnToTop({ scrollerRef, turnRef, turnId }) {
7422
- React17.useEffect(() => {
7632
+ React18.useEffect(() => {
7423
7633
  if (turnId === null) return;
7424
7634
  const scroller = scrollerRef.current;
7425
7635
  const row = turnRef.current;
@@ -7440,10 +7650,10 @@ function usePinTurnToTop({ scrollerRef, turnRef, turnId }) {
7440
7650
  }
7441
7651
 
7442
7652
  // src/shell/thread-scroll/use-scroll-has-more-below.ts
7443
- import * as React18 from "react";
7653
+ import * as React19 from "react";
7444
7654
  function useScrollHasMoreBelow(scroller, thresholdPx = 16) {
7445
- const [hasMore, setHasMore] = React18.useState(false);
7446
- React18.useEffect(() => {
7655
+ const [hasMore, setHasMore] = React19.useState(false);
7656
+ React19.useEffect(() => {
7447
7657
  if (scroller === null) return;
7448
7658
  const view = scroller.ownerDocument.defaultView;
7449
7659
  if (view === null) return;
@@ -7483,9 +7693,9 @@ function threadRowAttrs(key) {
7483
7693
  }
7484
7694
 
7485
7695
  // src/shell/thread-scroll/use-thread-jump-marks.ts
7486
- import * as React19 from "react";
7696
+ import * as React20 from "react";
7487
7697
  function useThreadJumpMarks(rows) {
7488
- return React19.useMemo(
7698
+ return React20.useMemo(
7489
7699
  () => rows.filter((row) => row.visitorText.length > 0).map((row) => ({
7490
7700
  key: row.key,
7491
7701
  label: row.visitorText,
@@ -7499,7 +7709,7 @@ function useThreadJumpMarks(rows) {
7499
7709
  }
7500
7710
 
7501
7711
  // src/shell/thread-scroll/use-thread-landing.ts
7502
- import * as React20 from "react";
7712
+ import * as React21 from "react";
7503
7713
 
7504
7714
  // src/shell/thread-scroll/settle-thread-row.ts
7505
7715
  var SETTLE_MS = 1200;
@@ -7563,11 +7773,11 @@ function settleThreadRow(scroller, rowKey, behavior = "smooth") {
7563
7773
  }
7564
7774
 
7565
7775
  // src/shell/thread-scroll/use-thread-landing.ts
7566
- var useIsomorphicLayoutEffect = typeof window === "undefined" ? React20.useEffect : React20.useLayoutEffect;
7776
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? React21.useEffect : React21.useLayoutEffect;
7567
7777
  function useThreadLanding(scroller, relandKey = 0) {
7568
7778
  const { turnId, seq } = useExplicitTurnSelection();
7569
- const openedWith = React20.useRef({ turnId, seq });
7570
- const landedRef = React20.useRef(null);
7779
+ const openedWith = React21.useRef({ turnId, seq });
7780
+ const landedRef = React21.useRef(null);
7571
7781
  useIsomorphicLayoutEffect(() => {
7572
7782
  if (scroller === null) return;
7573
7783
  if (turnId !== null) {
@@ -7608,10 +7818,10 @@ function settleToHead(scroller) {
7608
7818
  }
7609
7819
 
7610
7820
  // src/provider/providers/handler-registry.ts
7611
- import { createContext as createContext9, useContext as useContext9, useEffect as useEffect9 } from "react";
7612
- var HandlerRegistryContext = createContext9(null);
7821
+ import { createContext as createContext10, useContext as useContext10, useEffect as useEffect9 } from "react";
7822
+ var HandlerRegistryContext = createContext10(null);
7613
7823
  function useRegisterSignalHandlers(handlers) {
7614
- const registry2 = useContext9(HandlerRegistryContext);
7824
+ const registry2 = useContext10(HandlerRegistryContext);
7615
7825
  useEffect9(() => {
7616
7826
  if (!registry2) return;
7617
7827
  return registry2.register(handlers);
@@ -7622,7 +7832,7 @@ function useRegisterSignalHandlers(handlers) {
7622
7832
  var AGENT_ASK_SIGNAL = "agent_ask";
7623
7833
 
7624
7834
  // src/provider/use-clamp-toggle.ts
7625
- import React21 from "react";
7835
+ import React22 from "react";
7626
7836
 
7627
7837
  // src/shared/use-expandable.ts
7628
7838
  import { useCallback as useCallback10, useState as useState5 } from "react";
@@ -7635,9 +7845,9 @@ function useExpandable(initial = false) {
7635
7845
  // src/provider/use-clamp-toggle.ts
7636
7846
  function useClampToggle(contentKey) {
7637
7847
  const { expanded, toggle } = useExpandable(false);
7638
- const [overflowing, setOverflowing] = React21.useState(false);
7639
- const ref = React21.useRef(null);
7640
- React21.useEffect(() => {
7848
+ const [overflowing, setOverflowing] = React22.useState(false);
7849
+ const ref = React22.useRef(null);
7850
+ React22.useEffect(() => {
7641
7851
  const el = ref.current;
7642
7852
  if (el === null) return;
7643
7853
  if (expanded) return;
@@ -7653,16 +7863,16 @@ function useClampToggle(contentKey) {
7653
7863
  }
7654
7864
 
7655
7865
  // src/provider/use-timed-flag.ts
7656
- import React22 from "react";
7866
+ import React23 from "react";
7657
7867
  function useTimedFlag(durationMs) {
7658
- const [flag, setFlag] = React22.useState(false);
7659
- const timerRef = React22.useRef(null);
7660
- React22.useEffect(() => {
7868
+ const [flag, setFlag] = React23.useState(false);
7869
+ const timerRef = React23.useRef(null);
7870
+ React23.useEffect(() => {
7661
7871
  return () => {
7662
7872
  if (timerRef.current !== null) window.clearTimeout(timerRef.current);
7663
7873
  };
7664
7874
  }, []);
7665
- const trigger = React22.useCallback(() => {
7875
+ const trigger = React23.useCallback(() => {
7666
7876
  if (timerRef.current !== null) window.clearTimeout(timerRef.current);
7667
7877
  setFlag(true);
7668
7878
  timerRef.current = window.setTimeout(() => {
@@ -7691,6 +7901,7 @@ __export(canvas_exports, {
7691
7901
  GENERATION_EASE: () => GENERATION_EASE,
7692
7902
  GenerationStyleContext: () => GenerationStyleContext,
7693
7903
  GenerationStyleProvider: () => GenerationStyleProvider,
7904
+ HydrationNoticeProvider: () => HydrationNoticeProvider,
7694
7905
  INITIAL_NAV_PRESENTATION: () => INITIAL_NAV_PRESENTATION,
7695
7906
  ITEM_IDENTITY_ATTR: () => ITEM_IDENTITY_ATTR,
7696
7907
  ItemTransitionGroup: () => ItemTransitionGroup,
@@ -7750,6 +7961,7 @@ __export(canvas_exports, {
7750
7961
  useGenerationStyle: () => useGenerationStyle,
7751
7962
  useHasLeftSeedHome: () => useHasLeftSeedHome,
7752
7963
  useHistoryNav: () => useHistoryNav,
7964
+ useHydrationNotice: () => useHydrationNotice,
7753
7965
  useInteraction: () => useInteraction,
7754
7966
  useIsSeedHome: () => useIsSeedHome,
7755
7967
  useLayout: () => useLayout,
@@ -7773,28 +7985,39 @@ __export(canvas_exports, {
7773
7985
  });
7774
7986
 
7775
7987
  // src/canvas/canvas-tail.tsx
7776
- import * as React23 from "react";
7777
- import { jsx as jsx7 } from "react/jsx-runtime";
7778
- var CanvasTailContext = React23.createContext(null);
7988
+ import * as React24 from "react";
7989
+ import { jsx as jsx8 } from "react/jsx-runtime";
7990
+ var CanvasTailContext = React24.createContext(null);
7779
7991
  function CanvasTailProvider({
7780
7992
  tail,
7781
7993
  children
7782
7994
  }) {
7783
- return /* @__PURE__ */ jsx7(CanvasTailContext.Provider, { value: tail, children });
7995
+ return /* @__PURE__ */ jsx8(CanvasTailContext.Provider, { value: tail, children });
7784
7996
  }
7785
7997
  function useCanvasTail() {
7786
- return React23.useContext(CanvasTailContext);
7998
+ return React24.useContext(CanvasTailContext);
7787
7999
  }
7788
8000
  function CanvasTailMount({
7789
8001
  isActive
7790
8002
  }) {
7791
8003
  const Tail = useCanvasTail();
7792
8004
  if (!isActive || Tail === null) return null;
7793
- return /* @__PURE__ */ jsx7(Tail, {});
8005
+ return /* @__PURE__ */ jsx8(Tail, {});
8006
+ }
8007
+
8008
+ // src/canvas/hydration-notice.tsx
8009
+ import * as React25 from "react";
8010
+ import { jsx as jsx9 } from "react/jsx-runtime";
8011
+ var HydrationNoticeContext = React25.createContext(null);
8012
+ function HydrationNoticeProvider({ notice, children }) {
8013
+ return /* @__PURE__ */ jsx9(HydrationNoticeContext.Provider, { value: notice, children });
8014
+ }
8015
+ function useHydrationNotice() {
8016
+ return React25.useContext(HydrationNoticeContext);
7794
8017
  }
7795
8018
 
7796
8019
  // src/canvas/GenerationStyleContext.tsx
7797
- import { createContext as createContext11, useContext as useContext11 } from "react";
8020
+ import { createContext as createContext13, useContext as useContext13 } from "react";
7798
8021
 
7799
8022
  // src/canvas/generation-style.ts
7800
8023
  var DEFAULT_GENERATION_TIMINGS = {
@@ -7820,19 +8043,19 @@ var DEFAULT_GENERATION_STYLE = {
7820
8043
  var GENERATION_EASE = [0.76, 0, 0.24, 1];
7821
8044
 
7822
8045
  // src/canvas/GenerationStyleContext.tsx
7823
- var GenerationStyleContext = createContext11(DEFAULT_GENERATION_STYLE);
8046
+ var GenerationStyleContext = createContext13(DEFAULT_GENERATION_STYLE);
7824
8047
  var GenerationStyleProvider = GenerationStyleContext.Provider;
7825
8048
  function useGenerationStyle() {
7826
- return useContext11(GenerationStyleContext);
8049
+ return useContext13(GenerationStyleContext);
7827
8050
  }
7828
8051
 
7829
8052
  // src/canvas/ShimmerSweep.tsx
7830
8053
  import { motion, useReducedMotion } from "framer-motion";
7831
- import { jsx as jsx8 } from "react/jsx-runtime";
8054
+ import { jsx as jsx10 } from "react/jsx-runtime";
7832
8055
  function ShimmerSweep({ durationS }) {
7833
8056
  const reduce = useReducedMotion();
7834
8057
  if (reduce === true) return null;
7835
- return /* @__PURE__ */ jsx8(
8058
+ return /* @__PURE__ */ jsx10(
7836
8059
  motion.div,
7837
8060
  {
7838
8061
  "aria-hidden": true,
@@ -7850,14 +8073,14 @@ function ShimmerSweep({ durationS }) {
7850
8073
  }
7851
8074
 
7852
8075
  // src/canvas/TransitionContext.tsx
7853
- import React24, { createContext as createContext12, useContext as useContext12 } from "react";
8076
+ import React26, { createContext as createContext14, useContext as useContext14 } from "react";
7854
8077
  import { AnimatePresence, motion as motion2 } from "framer-motion";
7855
- import { jsx as jsx9 } from "react/jsx-runtime";
8078
+ import { jsx as jsx11 } from "react/jsx-runtime";
7856
8079
  function FadeGroup({ children }) {
7857
- return /* @__PURE__ */ jsx9(AnimatePresence, { mode: "popLayout", initial: false, children });
8080
+ return /* @__PURE__ */ jsx11(AnimatePresence, { mode: "popLayout", initial: false, children });
7858
8081
  }
7859
- var FadeItem = React24.forwardRef(function FadeItem2({ id, children, style, className }, ref) {
7860
- return /* @__PURE__ */ jsx9(
8082
+ var FadeItem = React26.forwardRef(function FadeItem2({ id, children, style, className }, ref) {
8083
+ return /* @__PURE__ */ jsx11(
7861
8084
  motion2.div,
7862
8085
  {
7863
8086
  ref,
@@ -7872,49 +8095,49 @@ var FadeTransition = {
7872
8095
  Group: FadeGroup,
7873
8096
  Item: FadeItem
7874
8097
  };
7875
- var TransitionContext = createContext12(FadeTransition);
8098
+ var TransitionContext = createContext14(FadeTransition);
7876
8099
  function TransitionProvider({
7877
8100
  transition,
7878
8101
  children
7879
8102
  }) {
7880
- return /* @__PURE__ */ jsx9(TransitionContext.Provider, { value: transition, children });
8103
+ return /* @__PURE__ */ jsx11(TransitionContext.Provider, { value: transition, children });
7881
8104
  }
7882
8105
  function useLayoutTransition() {
7883
- return useContext12(TransitionContext);
8106
+ return useContext14(TransitionContext);
7884
8107
  }
7885
8108
 
7886
8109
  // src/canvas/canvas-arrangement.tsx
7887
- import React25, { createContext as createContext13, useContext as useContext13 } from "react";
7888
- import { jsx as jsx10 } from "react/jsx-runtime";
7889
- var CanvasArrangementContext = createContext13({ arrangement: "stack", turnPages: false });
8110
+ import React27, { createContext as createContext15, useContext as useContext15 } from "react";
8111
+ import { jsx as jsx12 } from "react/jsx-runtime";
8112
+ var CanvasArrangementContext = createContext15({ arrangement: "stack", turnPages: false });
7890
8113
  function CanvasArrangementProvider({
7891
8114
  arrangement,
7892
8115
  turnPages = false,
7893
8116
  children
7894
8117
  }) {
7895
- const value = React25.useMemo(() => ({ arrangement, turnPages }), [arrangement, turnPages]);
7896
- return /* @__PURE__ */ jsx10(CanvasArrangementContext.Provider, { value, children });
8118
+ const value = React27.useMemo(() => ({ arrangement, turnPages }), [arrangement, turnPages]);
8119
+ return /* @__PURE__ */ jsx12(CanvasArrangementContext.Provider, { value, children });
7897
8120
  }
7898
8121
  function useCanvasArrangement() {
7899
- return useContext13(CanvasArrangementContext);
8122
+ return useContext15(CanvasArrangementContext);
7900
8123
  }
7901
8124
 
7902
8125
  // src/canvas/canvas-motion-style.tsx
7903
- import { createContext as createContext14, useContext as useContext14 } from "react";
7904
- import { jsx as jsx11 } from "react/jsx-runtime";
7905
- var CanvasMotionStyleContext = createContext14(null);
8126
+ import { createContext as createContext16, useContext as useContext16 } from "react";
8127
+ import { jsx as jsx13 } from "react/jsx-runtime";
8128
+ var CanvasMotionStyleContext = createContext16(null);
7906
8129
  function CanvasMotionStyleProvider({ style, children }) {
7907
- return /* @__PURE__ */ jsx11(CanvasMotionStyleContext.Provider, { value: style, children });
8130
+ return /* @__PURE__ */ jsx13(CanvasMotionStyleContext.Provider, { value: style, children });
7908
8131
  }
7909
8132
  function useCanvasMotionStyle() {
7910
- return useContext14(CanvasMotionStyleContext);
8133
+ return useContext16(CanvasMotionStyleContext);
7911
8134
  }
7912
8135
 
7913
8136
  // src/canvas/ElementIdContext.ts
7914
- import { createContext as createContext15, useContext as useContext15 } from "react";
7915
- var ElementIdContext = createContext15(null);
8137
+ import { createContext as createContext17, useContext as useContext17 } from "react";
8138
+ var ElementIdContext = createContext17(null);
7916
8139
  function useElementId() {
7917
- return useContext15(ElementIdContext);
8140
+ return useContext17(ElementIdContext);
7918
8141
  }
7919
8142
 
7920
8143
  // src/canvas/generation-entrance.ts
@@ -8174,22 +8397,22 @@ function deriveTurnChangeAnchor(prev, next) {
8174
8397
  }
8175
8398
 
8176
8399
  // src/canvas/canvas-outlet.tsx
8177
- import { createContext as createContext16, useContext as useContext16 } from "react";
8178
- import { jsx as jsx12 } from "react/jsx-runtime";
8179
- var CanvasOutletContext = createContext16(null);
8400
+ import { createContext as createContext18, useContext as useContext18 } from "react";
8401
+ import { jsx as jsx14 } from "react/jsx-runtime";
8402
+ var CanvasOutletContext = createContext18(null);
8180
8403
  function CanvasOutletProvider({ canvas, children }) {
8181
- return /* @__PURE__ */ jsx12(CanvasOutletContext.Provider, { value: canvas, children });
8404
+ return /* @__PURE__ */ jsx14(CanvasOutletContext.Provider, { value: canvas, children });
8182
8405
  }
8183
8406
  function SpacefrontCanvas() {
8184
- const Canvas = useContext16(CanvasOutletContext);
8407
+ const Canvas = useContext18(CanvasOutletContext);
8185
8408
  if (Canvas === null) {
8186
8409
  throw new Error("<SpacefrontCanvas> must be rendered inside <Spacefront> \u2014 no engine has provided a canvas.");
8187
8410
  }
8188
- return /* @__PURE__ */ jsx12(Canvas, {});
8411
+ return /* @__PURE__ */ jsx14(Canvas, {});
8189
8412
  }
8190
8413
 
8191
8414
  // src/canvas/item-motion/ItemTransitionGroup.tsx
8192
- import React27 from "react";
8415
+ import React29 from "react";
8193
8416
  import { AnimatePresence as AnimatePresence2, motion as motion3, useReducedMotion as useReducedMotion2 } from "framer-motion";
8194
8417
 
8195
8418
  // src/canvas/item-motion/classify-items.ts
@@ -8408,7 +8631,7 @@ function getActiveProfile() {
8408
8631
  }
8409
8632
 
8410
8633
  // src/canvas/item-motion/ItemTransitionGroup.tsx
8411
- import { jsx as jsx13 } from "react/jsx-runtime";
8634
+ import { jsx as jsx15 } from "react/jsx-runtime";
8412
8635
  var ITEM_IDENTITY_ATTR = "data-flip-id";
8413
8636
  function ItemTransitionGroup({
8414
8637
  items,
@@ -8423,14 +8646,14 @@ function ItemTransitionGroup({
8423
8646
  const profile = getActiveProfile();
8424
8647
  const animated = reduce !== true;
8425
8648
  const ids = items.map(getId);
8426
- const prevIdsRef = React27.useRef(null);
8427
- const lastChangeRef = React27.useRef(null);
8649
+ const prevIdsRef = React29.useRef(null);
8650
+ const lastChangeRef = React29.useRef(null);
8428
8651
  const prevIds = prevIdsRef.current;
8429
8652
  const freshChange = prevIds === null ? null : classifyItemChange(prevIds, ids);
8430
8653
  if (freshChange !== null) {
8431
8654
  lastChangeRef.current = freshChange;
8432
8655
  }
8433
- React27.useEffect(() => {
8656
+ React29.useEffect(() => {
8434
8657
  prevIdsRef.current = ids;
8435
8658
  });
8436
8659
  const activeChange = lastChangeRef.current;
@@ -8443,7 +8666,7 @@ function ItemTransitionGroup({
8443
8666
  const isGrid = itemClassName === void 0;
8444
8667
  const outerClassName = isGrid ? "h-full" : itemClassName;
8445
8668
  const innerClassName = isGrid ? "h-full" : void 0;
8446
- return /* @__PURE__ */ jsx13("div", { className, style, children: /* @__PURE__ */ jsx13(AnimatePresence2, { mode: "popLayout", initial: false, children: items.map((item) => {
8669
+ return /* @__PURE__ */ jsx15("div", { className, style, children: /* @__PURE__ */ jsx15(AnimatePresence2, { mode: "popLayout", initial: false, children: items.map((item) => {
8447
8670
  const id = getId(item);
8448
8671
  const identityAttr = { [ITEM_IDENTITY_ATTR]: id };
8449
8672
  const isEntering = activeChange !== null && activeChange.entered.includes(id);
@@ -8453,7 +8676,7 @@ function ItemTransitionGroup({
8453
8676
  // `itemClassName`/`itemStyle` size the wrapper for flex/snap
8454
8677
  // layouts (carousel); grid layouts leave them unset and get
8455
8678
  // `h-full` so the cell height reaches the card.
8456
- /* @__PURE__ */ jsx13(
8679
+ /* @__PURE__ */ jsx15(
8457
8680
  motion3.div,
8458
8681
  {
8459
8682
  ...identityAttr,
@@ -8462,7 +8685,7 @@ function ItemTransitionGroup({
8462
8685
  layout: animated ? "position" : void 0,
8463
8686
  layoutDependency,
8464
8687
  transition: animated ? layoutTransition : void 0,
8465
- children: /* @__PURE__ */ jsx13(
8688
+ children: /* @__PURE__ */ jsx15(
8466
8689
  motion3.div,
8467
8690
  {
8468
8691
  className: innerClassName,
@@ -8542,21 +8765,21 @@ __export(catalog_exports, {
8542
8765
  });
8543
8766
 
8544
8767
  // src/catalog/DebugContext.tsx
8545
- import { createContext as createContext17, useContext as useContext17 } from "react";
8546
- import { jsx as jsx14 } from "react/jsx-runtime";
8547
- var DebugContext = createContext17(false);
8768
+ import { createContext as createContext19, useContext as useContext19 } from "react";
8769
+ import { jsx as jsx16 } from "react/jsx-runtime";
8770
+ var DebugContext = createContext19(false);
8548
8771
  function DebugProvider({
8549
8772
  debug,
8550
8773
  children
8551
8774
  }) {
8552
- return /* @__PURE__ */ jsx14(DebugContext.Provider, { value: debug, children });
8775
+ return /* @__PURE__ */ jsx16(DebugContext.Provider, { value: debug, children });
8553
8776
  }
8554
8777
  function useDebug() {
8555
- return useContext17(DebugContext);
8778
+ return useContext19(DebugContext);
8556
8779
  }
8557
8780
 
8558
8781
  // src/catalog/HydrationStateContext.tsx
8559
- import { createContext as createContext18, useContext as useContext18 } from "react";
8782
+ import { createContext as createContext20, useContext as useContext20 } from "react";
8560
8783
  var DEFAULT_STATE = {
8561
8784
  hasResolvedFields: false,
8562
8785
  hydrating: false,
@@ -8566,47 +8789,47 @@ var DEFAULT_STATE = {
8566
8789
  pendingCount: 0,
8567
8790
  errors: []
8568
8791
  };
8569
- var HydrationStateContext = createContext18(DEFAULT_STATE);
8792
+ var HydrationStateContext = createContext20(DEFAULT_STATE);
8570
8793
  function useHydrationState() {
8571
- return useContext18(HydrationStateContext);
8794
+ return useContext20(HydrationStateContext);
8572
8795
  }
8573
8796
 
8574
8797
  // src/catalog/HydratorContext.tsx
8575
- import { createContext as createContext19, useContext as useContext19 } from "react";
8576
- import { jsx as jsx15 } from "react/jsx-runtime";
8577
- var HydratorContext = createContext19({});
8798
+ import { createContext as createContext21, useContext as useContext21 } from "react";
8799
+ import { jsx as jsx17 } from "react/jsx-runtime";
8800
+ var HydratorContext = createContext21({});
8578
8801
  function HydratorProvider({
8579
8802
  hydrators,
8580
8803
  children
8581
8804
  }) {
8582
- return /* @__PURE__ */ jsx15(HydratorContext.Provider, { value: hydrators, children });
8805
+ return /* @__PURE__ */ jsx17(HydratorContext.Provider, { value: hydrators, children });
8583
8806
  }
8584
8807
  function useHydrators() {
8585
- return useContext19(HydratorContext);
8808
+ return useContext21(HydratorContext);
8586
8809
  }
8587
8810
 
8588
8811
  // src/catalog/registry.tsx
8589
- import { createContext as createContext20, useContext as useContext20 } from "react";
8590
- import { jsx as jsx16 } from "react/jsx-runtime";
8591
- var RegistryContext = createContext20({});
8812
+ import { createContext as createContext22, useContext as useContext22 } from "react";
8813
+ import { jsx as jsx18 } from "react/jsx-runtime";
8814
+ var RegistryContext = createContext22({});
8592
8815
  function RegistryProvider({
8593
8816
  registry: registry2,
8594
8817
  children
8595
8818
  }) {
8596
- return /* @__PURE__ */ jsx16(RegistryContext.Provider, { value: registry2, children });
8819
+ return /* @__PURE__ */ jsx18(RegistryContext.Provider, { value: registry2, children });
8597
8820
  }
8598
8821
  function useRegistry() {
8599
- return useContext20(RegistryContext);
8822
+ return useContext22(RegistryContext);
8600
8823
  }
8601
- var PackageLookupContext = createContext20(null);
8824
+ var PackageLookupContext = createContext22(null);
8602
8825
  function PackageLookupProvider({
8603
8826
  lookup,
8604
8827
  children
8605
8828
  }) {
8606
- return /* @__PURE__ */ jsx16(PackageLookupContext.Provider, { value: lookup, children });
8829
+ return /* @__PURE__ */ jsx18(PackageLookupContext.Provider, { value: lookup, children });
8607
8830
  }
8608
8831
  function usePackageLookup() {
8609
- return useContext20(PackageLookupContext);
8832
+ return useContext22(PackageLookupContext);
8610
8833
  }
8611
8834
  function createAliasedRegistry(baseRegistry, aliases, getPackageComponent) {
8612
8835
  return new Proxy(baseRegistry, {
@@ -8637,9 +8860,9 @@ function createAliasedRegistry(baseRegistry, aliases, getPackageComponent) {
8637
8860
  }
8638
8861
 
8639
8862
  // src/catalog/render-inline.tsx
8640
- import React30 from "react";
8641
- import { jsx as jsx17 } from "react/jsx-runtime";
8642
- var linkRenderer = (href, key) => /* @__PURE__ */ jsx17(
8863
+ import React32 from "react";
8864
+ import { jsx as jsx19 } from "react/jsx-runtime";
8865
+ var linkRenderer = (href, key) => /* @__PURE__ */ jsx19(
8643
8866
  "a",
8644
8867
  {
8645
8868
  className: "fourty-inline-link",
@@ -8659,14 +8882,14 @@ function linkifyText(text2, keyPrefix) {
8659
8882
  URL_RE.lastIndex = 0;
8660
8883
  while ((match = URL_RE.exec(text2)) !== null) {
8661
8884
  if (match.index > last) {
8662
- out.push(/* @__PURE__ */ jsx17(React30.Fragment, { children: text2.slice(last, match.index) }, `${keyPrefix}-lt-${i++}`));
8885
+ out.push(/* @__PURE__ */ jsx19(React32.Fragment, { children: text2.slice(last, match.index) }, `${keyPrefix}-lt-${i++}`));
8663
8886
  }
8664
8887
  const href = match[0];
8665
8888
  out.push(linkRenderer(href, `${keyPrefix}-lk-${i++}`));
8666
8889
  last = match.index + href.length;
8667
8890
  }
8668
8891
  if (last < text2.length) {
8669
- out.push(/* @__PURE__ */ jsx17(React30.Fragment, { children: text2.slice(last) }, `${keyPrefix}-lt-${i++}`));
8892
+ out.push(/* @__PURE__ */ jsx19(React32.Fragment, { children: text2.slice(last) }, `${keyPrefix}-lt-${i++}`));
8670
8893
  }
8671
8894
  return out;
8672
8895
  }
@@ -8679,8 +8902,8 @@ function renderInline(text2, keyPrefix) {
8679
8902
  while ((match = re.exec(text2)) !== null) {
8680
8903
  if (match.index > last) out.push(...linkifyText(text2.slice(last, match.index), `${keyPrefix}-t-${i++}`));
8681
8904
  const bold = match[1];
8682
- if (bold !== void 0) out.push(/* @__PURE__ */ jsx17("strong", { children: bold }, `${keyPrefix}-b-${i++}`));
8683
- else out.push(/* @__PURE__ */ jsx17("em", { children: match[2] }, `${keyPrefix}-i-${i++}`));
8905
+ if (bold !== void 0) out.push(/* @__PURE__ */ jsx19("strong", { children: bold }, `${keyPrefix}-b-${i++}`));
8906
+ else out.push(/* @__PURE__ */ jsx19("em", { children: match[2] }, `${keyPrefix}-i-${i++}`));
8684
8907
  last = match.index + match[0].length;
8685
8908
  }
8686
8909
  if (last < text2.length) out.push(...linkifyText(text2.slice(last), `${keyPrefix}-t-${i++}`));
@@ -8688,7 +8911,7 @@ function renderInline(text2, keyPrefix) {
8688
8911
  }
8689
8912
 
8690
8913
  // src/catalog/component-library.ts
8691
- import * as React31 from "react";
8914
+ import * as React33 from "react";
8692
8915
  function displayNameOf(Inner) {
8693
8916
  if (typeof Inner === "string") return Inner;
8694
8917
  if (typeof Inner.displayName === "string" && Inner.displayName.length > 0) return Inner.displayName;
@@ -8697,7 +8920,7 @@ function displayNameOf(Inner) {
8697
8920
  }
8698
8921
  function adaptComponent(Inner) {
8699
8922
  function Adapted(props) {
8700
- return React31.createElement(Inner, props);
8923
+ return React33.createElement(Inner, props);
8701
8924
  }
8702
8925
  Adapted.displayName = displayNameOf(Inner);
8703
8926
  return Adapted;
@@ -8738,23 +8961,23 @@ function buildComponentLibrary(catalog, componentMap) {
8738
8961
  }
8739
8962
 
8740
8963
  // src/catalog/define.ts
8741
- import { z as z46 } from "zod";
8742
- var HYDRATED_ENTITY = z46.object({}).passthrough();
8964
+ import { z as z48 } from "zod";
8965
+ var HYDRATED_ENTITY = z48.object({}).passthrough();
8743
8966
  function entity(resolverKey, opts) {
8744
8967
  return resolved(HYDRATED_ENTITY, resolverKey, opts);
8745
8968
  }
8746
- var text = prose(z46.string());
8969
+ var text = prose(z48.string());
8747
8970
  function plain() {
8748
- return z46.string();
8971
+ return z48.string();
8749
8972
  }
8750
8973
  function token(values) {
8751
- return z46.enum(values);
8974
+ return z48.enum(values);
8752
8975
  }
8753
8976
  function catalogComponent(meta, render) {
8754
8977
  const { props, requires, ...rest } = meta;
8755
8978
  return {
8756
8979
  ...rest,
8757
- propsSchema: z46.object(props),
8980
+ propsSchema: z48.object(props),
8758
8981
  ...requires !== void 0 ? { requires } : {},
8759
8982
  component: adaptComponent(render)
8760
8983
  };
@@ -9094,7 +9317,7 @@ function useConsumeStandingSignal(type) {
9094
9317
  }
9095
9318
 
9096
9319
  // src/widgets/presence/use-presence-notch.ts
9097
- import * as React32 from "react";
9320
+ import * as React34 from "react";
9098
9321
  var SETTLE_DWELL_MS = 4e3;
9099
9322
  var HOVER_CLOSE_MS = 240;
9100
9323
  var HOVER_BOUNCE_WINDOW_MS = 800;
@@ -9102,21 +9325,21 @@ var BOUNCE_PX = 2;
9102
9325
  function usePresenceNotch(widgets) {
9103
9326
  const askStanding = useStandingOfType(AGENT_ASK_SIGNAL) !== null;
9104
9327
  const { isRunning } = useAgentPresence();
9105
- const [hovered, setHovered] = React32.useState(false);
9106
- const [openDrawerId, setOpenDrawerId] = React32.useState(null);
9107
- const rootRef = React32.useRef(null);
9108
- const toggleDrawer = React32.useCallback((id) => {
9328
+ const [hovered, setHovered] = React34.useState(false);
9329
+ const [openDrawerId, setOpenDrawerId] = React34.useState(null);
9330
+ const rootRef = React34.useRef(null);
9331
+ const toggleDrawer = React34.useCallback((id) => {
9109
9332
  setOpenDrawerId((current2) => current2 === id ? null : id);
9110
9333
  }, []);
9111
- const closeTimer = React32.useRef(null);
9112
- const cancelClose = React32.useCallback(() => {
9334
+ const closeTimer = React34.useRef(null);
9335
+ const cancelClose = React34.useCallback(() => {
9113
9336
  if (closeTimer.current !== null) {
9114
9337
  clearTimeout(closeTimer.current);
9115
9338
  closeTimer.current = null;
9116
9339
  }
9117
9340
  }, []);
9118
- const lastLeaveRef = React32.useRef(null);
9119
- const openHover = React32.useCallback((e) => {
9341
+ const lastLeaveRef = React34.useRef(null);
9342
+ const openHover = React34.useCallback((e) => {
9120
9343
  const last = lastLeaveRef.current;
9121
9344
  if (last !== null && Date.now() - last.t < HOVER_BOUNCE_WINDOW_MS && Math.abs(e.clientX - last.x) <= BOUNCE_PX && Math.abs(e.clientY - last.y) <= BOUNCE_PX) {
9122
9345
  return;
@@ -9124,7 +9347,7 @@ function usePresenceNotch(widgets) {
9124
9347
  cancelClose();
9125
9348
  setHovered(true);
9126
9349
  }, [cancelClose]);
9127
- const scheduleClose = React32.useCallback((e) => {
9350
+ const scheduleClose = React34.useCallback((e) => {
9128
9351
  lastLeaveRef.current = { x: e.clientX, y: e.clientY, t: Date.now() };
9129
9352
  cancelClose();
9130
9353
  closeTimer.current = setTimeout(() => {
@@ -9132,8 +9355,8 @@ function usePresenceNotch(widgets) {
9132
9355
  setHovered(false);
9133
9356
  }, HOVER_CLOSE_MS);
9134
9357
  }, [cancelClose]);
9135
- React32.useEffect(() => cancelClose, [cancelClose]);
9136
- React32.useEffect(() => {
9358
+ React34.useEffect(() => cancelClose, [cancelClose]);
9359
+ React34.useEffect(() => {
9137
9360
  if (openDrawerId === null) return;
9138
9361
  const onKey = (e) => {
9139
9362
  if (e.key === "Escape") setOpenDrawerId(null);
@@ -9141,7 +9364,7 @@ function usePresenceNotch(widgets) {
9141
9364
  window.addEventListener("keydown", onKey);
9142
9365
  return () => window.removeEventListener("keydown", onKey);
9143
9366
  }, [openDrawerId]);
9144
- React32.useEffect(() => {
9367
+ React34.useEffect(() => {
9145
9368
  if (openDrawerId === null) return;
9146
9369
  const onDown = (e) => {
9147
9370
  const root = rootRef.current;
@@ -9153,8 +9376,8 @@ function usePresenceNotch(widgets) {
9153
9376
  document.addEventListener("pointerdown", onDown);
9154
9377
  return () => document.removeEventListener("pointerdown", onDown);
9155
9378
  }, [openDrawerId]);
9156
- const [active, setActive] = React32.useState(false);
9157
- React32.useEffect(() => {
9379
+ const [active, setActive] = React34.useState(false);
9380
+ React34.useEffect(() => {
9158
9381
  if (isRunning) {
9159
9382
  setActive(true);
9160
9383
  return;
@@ -9314,7 +9537,7 @@ function presenceFactShape(fact) {
9314
9537
  }
9315
9538
 
9316
9539
  // src/widgets/presence/use-optimistic-facts.ts
9317
- import * as React33 from "react";
9540
+ import * as React35 from "react";
9318
9541
  function readEntries(data) {
9319
9542
  if (typeof data !== "object" || data === null || !("entries" in data)) return [];
9320
9543
  const raw = data.entries;
@@ -9333,7 +9556,7 @@ function writeOptimisticFact(entries3, fact) {
9333
9556
  }
9334
9557
  function useOptimisticFactOverlay(flowId) {
9335
9558
  const entries3 = readEntries(useAgentFlow(flowId));
9336
- return React33.useMemo(
9559
+ return React35.useMemo(
9337
9560
  () => ({
9338
9561
  entries: entries3,
9339
9562
  add: (fact) => setFlowOutput(flowId, { entries: writeOptimisticFact(entries3, fact) })
@@ -9342,8 +9565,8 @@ function useOptimisticFactOverlay(flowId) {
9342
9565
  );
9343
9566
  }
9344
9567
  function useReconcileOptimisticFacts(flowId, readIdentity) {
9345
- const seenRef = React33.useRef(null);
9346
- React33.useEffect(() => {
9568
+ const seenRef = React35.useRef(null);
9569
+ React35.useEffect(() => {
9347
9570
  if (readIdentity === null) return;
9348
9571
  if (seenRef.current === null) {
9349
9572
  seenRef.current = readIdentity;
@@ -9515,10 +9738,10 @@ __export(chat_exports, {
9515
9738
  });
9516
9739
 
9517
9740
  // src/chat/chat-context.ts
9518
- import { createContext as createContext21, useContext as useContext21 } from "react";
9519
- var FourtyChatContext = createContext21(null);
9741
+ import { createContext as createContext23, useContext as useContext23 } from "react";
9742
+ var FourtyChatContext = createContext23(null);
9520
9743
  function useFourtyChat() {
9521
- const ctx = useContext21(FourtyChatContext);
9744
+ const ctx = useContext23(FourtyChatContext);
9522
9745
  if (!ctx) throw new Error("useFourtyChat must be used inside <FourtyChatProvider>");
9523
9746
  return ctx;
9524
9747
  }
@@ -9755,34 +9978,34 @@ __export(interaction_exports, {
9755
9978
  });
9756
9979
 
9757
9980
  // src/interaction/withInteractionTracking.tsx
9758
- import React34, { createContext as createContext22, useContext as useContext22 } from "react";
9759
- import { jsx as jsx18, jsxs } from "react/jsx-runtime";
9760
- var InteractionContext = createContext22(null);
9981
+ import React36, { createContext as createContext24, useContext as useContext24 } from "react";
9982
+ import { jsx as jsx20, jsxs } from "react/jsx-runtime";
9983
+ var InteractionContext = createContext24(null);
9761
9984
  function InteractionProvider({
9762
9985
  onInteraction,
9763
9986
  children
9764
9987
  }) {
9765
- return /* @__PURE__ */ jsx18(InteractionContext.Provider, { value: onInteraction, children });
9988
+ return /* @__PURE__ */ jsx20(InteractionContext.Provider, { value: onInteraction, children });
9766
9989
  }
9767
9990
  function useInteraction2() {
9768
- return useContext22(InteractionContext);
9991
+ return useContext24(InteractionContext);
9769
9992
  }
9770
9993
  function withInteractionTracking(WrappedComponent, meta) {
9771
9994
  function TrackedComponent(props) {
9772
- return /* @__PURE__ */ jsx18(
9995
+ return /* @__PURE__ */ jsx20(
9773
9996
  "div",
9774
9997
  {
9775
9998
  "data-tracked-component": meta.componentId,
9776
9999
  "data-tracked-component-type": meta.componentType,
9777
10000
  style: { display: "contents" },
9778
- children: /* @__PURE__ */ jsx18(ComponentErrorBoundary, { componentId: meta.componentId, children: /* @__PURE__ */ jsx18(WrappedComponent, { ...props }) })
10001
+ children: /* @__PURE__ */ jsx20(ComponentErrorBoundary, { componentId: meta.componentId, children: /* @__PURE__ */ jsx20(WrappedComponent, { ...props }) })
9779
10002
  }
9780
10003
  );
9781
10004
  }
9782
10005
  TrackedComponent.displayName = `Tracked(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
9783
10006
  return TrackedComponent;
9784
10007
  }
9785
- var ComponentErrorBoundary = class extends React34.Component {
10008
+ var ComponentErrorBoundary = class extends React36.Component {
9786
10009
  constructor() {
9787
10010
  super(...arguments);
9788
10011
  __publicField(this, "state", { error: null });
@@ -9796,7 +10019,7 @@ var ComponentErrorBoundary = class extends React34.Component {
9796
10019
  render() {
9797
10020
  if (this.state.error) {
9798
10021
  return /* @__PURE__ */ jsxs("div", { className: "fourty-component-error", role: "alert", "data-component-id": this.props.componentId, children: [
9799
- /* @__PURE__ */ jsx18("strong", { children: this.props.componentId }),
10022
+ /* @__PURE__ */ jsx20("strong", { children: this.props.componentId }),
9800
10023
  ": ",
9801
10024
  this.state.error.message
9802
10025
  ] });
@@ -9856,14 +10079,14 @@ __export(utils_exports, {
9856
10079
  import { useSyncExternalStore as useSyncExternalStore5 } from "react";
9857
10080
 
9858
10081
  // src/utils/viewport-window.tsx
9859
- import { createContext as createContext23, useContext as useContext23 } from "react";
9860
- import { jsx as jsx19 } from "react/jsx-runtime";
9861
- var ViewportWindowContext = createContext23(null);
10082
+ import { createContext as createContext25, useContext as useContext25 } from "react";
10083
+ import { jsx as jsx21 } from "react/jsx-runtime";
10084
+ var ViewportWindowContext = createContext25(null);
9862
10085
  function canAnswer(win) {
9863
10086
  return win !== null && typeof win.matchMedia === "function";
9864
10087
  }
9865
10088
  function useViewportWindow() {
9866
- const provided = useContext23(ViewportWindowContext);
10089
+ const provided = useContext25(ViewportWindowContext);
9867
10090
  if (provided !== null) return canAnswer(provided) ? provided : null;
9868
10091
  const global = globalThis;
9869
10092
  return canAnswer(global) ? global : null;
@@ -9872,7 +10095,7 @@ function ViewportWindowProvider({
9872
10095
  value,
9873
10096
  children
9874
10097
  }) {
9875
- return /* @__PURE__ */ jsx19(ViewportWindowContext.Provider, { value, children });
10098
+ return /* @__PURE__ */ jsx21(ViewportWindowContext.Provider, { value, children });
9876
10099
  }
9877
10100
 
9878
10101
  // src/utils/use-form-factor.ts
@@ -9963,7 +10186,7 @@ function useInlineCompletion(opts) {
9963
10186
  }
9964
10187
 
9965
10188
  // src/utils/use-document-visible.ts
9966
- import React35 from "react";
10189
+ import React37 from "react";
9967
10190
  function subscribe3(onChange) {
9968
10191
  document.addEventListener("visibilitychange", onChange);
9969
10192
  return () => document.removeEventListener("visibilitychange", onChange);
@@ -9975,15 +10198,15 @@ function getServerSnapshot() {
9975
10198
  return true;
9976
10199
  }
9977
10200
  function useDocumentVisible() {
9978
- return React35.useSyncExternalStore(subscribe3, getSnapshot, getServerSnapshot);
10201
+ return React37.useSyncExternalStore(subscribe3, getSnapshot, getServerSnapshot);
9979
10202
  }
9980
10203
 
9981
10204
  // src/utils/use-interval.ts
9982
- import React36 from "react";
10205
+ import React38 from "react";
9983
10206
  function useInterval(callback, ms, active = true) {
9984
- const cbRef = React36.useRef(callback);
10207
+ const cbRef = React38.useRef(callback);
9985
10208
  cbRef.current = callback;
9986
- React36.useEffect(() => {
10209
+ React38.useEffect(() => {
9987
10210
  if (!active) return;
9988
10211
  const id = window.setInterval(() => cbRef.current(), ms);
9989
10212
  return () => window.clearInterval(id);
@@ -10195,15 +10418,15 @@ function primedEntitiesFor(resolverKey) {
10195
10418
  }
10196
10419
 
10197
10420
  // src/preview/SpacefrontPreviewProvider.tsx
10198
- import * as React37 from "react";
10199
- import { jsx as jsx20 } from "react/jsx-runtime";
10421
+ import * as React39 from "react";
10422
+ import { jsx as jsx22 } from "react/jsx-runtime";
10200
10423
  var NOOP = () => {
10201
10424
  };
10202
10425
  var ASYNC_NOOP = () => Promise.resolve();
10203
10426
  var VIEW = { page: { kind: "home" }, layout: EMPTY_SPEC, shell: EMPTY_SHELL };
10204
- var PreviewContext = React37.createContext(null);
10427
+ var PreviewContext = React39.createContext(null);
10205
10428
  function usePreview() {
10206
- const value = React37.useContext(PreviewContext);
10429
+ const value = React39.useContext(PreviewContext);
10207
10430
  if (value === null) throw new Error("preview runtime used outside <SpacefrontPreviewProvider>");
10208
10431
  return value;
10209
10432
  }
@@ -10357,11 +10580,11 @@ var PRESENCE = {
10357
10580
  usePresenceLiveTurn: () => usePreview().pending?.messageId
10358
10581
  };
10359
10582
  function SpacefrontPreviewProvider({ scene, onSend, children }) {
10360
- const [sessionId] = React37.useState(() => `preview-${Math.random().toString(36).slice(2)}`);
10361
- const derived = React37.useMemo(() => derive(scene, sessionId), [scene, sessionId]);
10362
- const onSendRef = React37.useRef(onSend);
10583
+ const [sessionId] = React39.useState(() => `preview-${Math.random().toString(36).slice(2)}`);
10584
+ const derived = React39.useMemo(() => derive(scene, sessionId), [scene, sessionId]);
10585
+ const onSendRef = React39.useRef(onSend);
10363
10586
  onSendRef.current = onSend;
10364
- const draft = React37.useMemo(() => {
10587
+ const draft = React39.useMemo(() => {
10365
10588
  let text2 = "";
10366
10589
  const listeners12 = /* @__PURE__ */ new Set();
10367
10590
  return {
@@ -10377,7 +10600,7 @@ function SpacefrontPreviewProvider({ scene, onSend, children }) {
10377
10600
  }
10378
10601
  };
10379
10602
  }, []);
10380
- const session = React37.useMemo(() => {
10603
+ const session = React39.useMemo(() => {
10381
10604
  const send = (text2) => {
10382
10605
  draft.set("");
10383
10606
  onSendRef.current?.(text2);
@@ -10429,15 +10652,15 @@ function SpacefrontPreviewProvider({ scene, onSend, children }) {
10429
10652
  const qId = question === null ? null : question.id;
10430
10653
  const qText = question === null ? "" : question.text;
10431
10654
  const qReplies = question === null ? "" : list(question.replies).join("\0");
10432
- const raised = React37.useRef(0);
10433
- React37.useEffect(() => {
10655
+ const raised = React39.useRef(0);
10656
+ React39.useEffect(() => {
10434
10657
  if (qId === null) return;
10435
10658
  raised.current += 1;
10436
10659
  const id = `${qId}-${raised.current}`;
10437
10660
  raiseStanding(AGENT_ASK_SIGNAL, id, { ask: qText, suggestions: qReplies === "" ? [] : qReplies.split("\0") }, sessionId);
10438
10661
  return () => resolveStanding(id, sessionId);
10439
10662
  }, [qId, qText, qReplies, sessionId]);
10440
- return /* @__PURE__ */ jsx20(PreviewContext.Provider, { value: derived, children: /* @__PURE__ */ jsx20(FourtySessionContext.Provider, { value: session, children: /* @__PURE__ */ jsx20(FourtyRuntimeProvider, { value: RUNTIME, children: /* @__PURE__ */ jsx20(PresenceRuntimeProvider, { value: PRESENCE, children }) }) }) });
10663
+ return /* @__PURE__ */ jsx22(PreviewContext.Provider, { value: derived, children: /* @__PURE__ */ jsx22(FourtySessionContext.Provider, { value: session, children: /* @__PURE__ */ jsx22(FourtyRuntimeProvider, { value: RUNTIME, children: /* @__PURE__ */ jsx22(PresenceRuntimeProvider, { value: PRESENCE, children }) }) }) });
10441
10664
  }
10442
10665
 
10443
10666
  // src/verticals/commerce/index.ts
@@ -10573,7 +10796,7 @@ registerEntityPageKind("search", {
10573
10796
  });
10574
10797
 
10575
10798
  // src/verticals/commerce/commerce-context.tsx
10576
- import { createContext as createContext25, useContext as useContext25 } from "react";
10799
+ import { createContext as createContext27, useContext as useContext27 } from "react";
10577
10800
  var INERT_COMMERCE_RUNTIME = {
10578
10801
  useCart: () => {
10579
10802
  throw new Error("useCart must be used within a <CommerceProvider>");
@@ -10612,12 +10835,12 @@ var INERT_COMMERCE_RUNTIME = {
10612
10835
  }, signOut: async () => {
10613
10836
  }, available: false })
10614
10837
  };
10615
- var FourtyCommerceRuntimeContext = createContext25(
10838
+ var FourtyCommerceRuntimeContext = createContext27(
10616
10839
  INERT_COMMERCE_RUNTIME
10617
10840
  );
10618
10841
  var FourtyCommerceRuntimeProvider = FourtyCommerceRuntimeContext.Provider;
10619
10842
  function useCommerceRuntime() {
10620
- return useContext25(FourtyCommerceRuntimeContext);
10843
+ return useContext27(FourtyCommerceRuntimeContext);
10621
10844
  }
10622
10845
  function useCart() {
10623
10846
  return useCommerceRuntime().useCart();
@@ -10797,18 +11020,18 @@ __export(ecommerce_exports, {
10797
11020
  });
10798
11021
 
10799
11022
  // ../spacestation/src/analytics/ecommerce/surfacing.ts
10800
- import { z as z47 } from "zod";
11023
+ import { z as z49 } from "zod";
10801
11024
  var PRODUCTS_SURFACED = defineEventKind(
10802
11025
  "commerce.products_surfaced",
10803
11026
  "client",
10804
- z47.object({
11027
+ z49.object({
10805
11028
  /** The turn whose commit this describes. Minted where the prompt signal
10806
11029
  * is built and shared with `agent_runs`, so the read layer can line a
10807
11030
  * surfacing up against the prompt that asked for it. */
10808
- turnId: z47.string().min(1).max(128),
11031
+ turnId: z49.string().min(1).max(128),
10809
11032
  /** Distinct entity refs this turn placed that were not on the canvas
10810
11033
  * before it. ZERO IS A REAL VALUE — see the header. */
10811
- productCount: z47.number().int().nonnegative()
11034
+ productCount: z49.number().int().nonnegative()
10812
11035
  }).strict()
10813
11036
  );
10814
11037
 
@@ -11388,10 +11611,10 @@ function useCartDrawer() {
11388
11611
  }
11389
11612
 
11390
11613
  // src/verticals/commerce/cart/use-cart-view.ts
11391
- import React38 from "react";
11614
+ import React40 from "react";
11392
11615
  function useCartView(cart, onCheckout) {
11393
11616
  const analytics = useOptionalAnalyticsSink();
11394
- const [exitPending, setExitPending] = React38.useState(null);
11617
+ const [exitPending, setExitPending] = React40.useState(null);
11395
11618
  const lines = cart === null ? [] : cart.lines;
11396
11619
  const count = lines.reduce((sum, l) => sum + l.quantity, 0);
11397
11620
  const totalsPending = lines.some((l) => isPendingCartLine(l));
@@ -11401,7 +11624,7 @@ function useCartView(cart, onCheckout) {
11401
11624
  const backendTotal = cart !== null && cart.total !== void 0 ? cart.total.amount : void 0;
11402
11625
  const discountAmount = backendTotal !== void 0 && backendTotal < subtotal ? subtotal - backendTotal : 0;
11403
11626
  const effectiveTotal = backendTotal !== void 0 ? backendTotal : subtotal;
11404
- const navigateToExit = React38.useCallback((url, kind) => {
11627
+ const navigateToExit = React40.useCallback((url, kind) => {
11405
11628
  const result = navigateToExternalCommerceUrl(url);
11406
11629
  if (kind === "checkout") recordVisitorCheckoutExit(analytics, result);
11407
11630
  if (result === "new-tab") {
@@ -11418,7 +11641,7 @@ function useCartView(cart, onCheckout) {
11418
11641
  setExitPending(null);
11419
11642
  }
11420
11643
  }, [analytics]);
11421
- const handleCheckout = React38.useCallback(() => {
11644
+ const handleCheckout = React40.useCallback(() => {
11422
11645
  if (lines.length === 0 || exitPending !== null) return;
11423
11646
  setExitPending("checkout");
11424
11647
  if (onCheckout) {
@@ -11438,7 +11661,7 @@ function useCartView(cart, onCheckout) {
11438
11661
  }
11439
11662
  navigateToExit(cart?.checkoutUrl, "checkout");
11440
11663
  }, [lines.length, exitPending, onCheckout, cart, navigateToExit]);
11441
- const handleGoToStore = React38.useCallback(() => {
11664
+ const handleGoToStore = React40.useCallback(() => {
11442
11665
  if (lines.length === 0 || exitPending !== null) return;
11443
11666
  setExitPending("store");
11444
11667
  navigateToExit(cart?.storeCartUrl, "store");
@@ -11526,7 +11749,7 @@ registerSessionScopedClear(() => {
11526
11749
  });
11527
11750
 
11528
11751
  // src/verticals/commerce/cart/use-cart-line-row.ts
11529
- import * as React39 from "react";
11752
+ import * as React41 from "react";
11530
11753
 
11531
11754
  // src/verticals/commerce/use-commerce-actions.ts
11532
11755
  import { useCallback as useCallback22 } from "react";
@@ -11572,19 +11795,19 @@ var SPOTLIGHT_MAX_AGE_MS = 3e4;
11572
11795
  function useCartLineRow(line, opts) {
11573
11796
  const actions = useCommerceActions();
11574
11797
  const drawerFocus = useCartDrawerFocus();
11575
- const rowRef = React39.useRef(null);
11798
+ const rowRef = React41.useRef(null);
11576
11799
  const pending2 = isPendingCartLine(line);
11577
11800
  const navigable = actions !== null && !pending2 && line.productId.length > 0;
11578
11801
  const onNavigated = opts === void 0 ? void 0 : opts.onNavigated;
11579
- const navigatedRef = React39.useRef(onNavigated);
11802
+ const navigatedRef = React41.useRef(onNavigated);
11580
11803
  navigatedRef.current = onNavigated;
11581
- const navigate = React39.useCallback(() => {
11804
+ const navigate = React41.useCallback(() => {
11582
11805
  if (actions === null) return;
11583
11806
  actions.navigateToProduct(line.productId, line.title);
11584
11807
  const done = navigatedRef.current;
11585
11808
  if (done !== void 0) done();
11586
11809
  }, [actions, line.productId, line.title]);
11587
- const interaction = React39.useMemo(() => {
11810
+ const interaction = React41.useMemo(() => {
11588
11811
  if (!navigable) return void 0;
11589
11812
  return {
11590
11813
  onClick: navigate,
@@ -11599,7 +11822,7 @@ function useCartLineRow(line, opts) {
11599
11822
  };
11600
11823
  }, [navigable, navigate]);
11601
11824
  const spotlightKey = drawerFocus !== null && !pending2 && line.productId.length > 0 && drawerFocus.productId === line.productId && Date.now() - drawerFocus.at < SPOTLIGHT_MAX_AGE_MS ? drawerFocus.at : null;
11602
- React39.useEffect(() => {
11825
+ React41.useEffect(() => {
11603
11826
  if (spotlightKey === null) return;
11604
11827
  const node = rowRef.current;
11605
11828
  if (node === null) return;
@@ -11674,7 +11897,7 @@ function useImageHover() {
11674
11897
  }
11675
11898
 
11676
11899
  // src/verticals/commerce/price/format-price.ts
11677
- function formatPrice(amount, currencyCode = "USD", locale = "en-US") {
11900
+ function formatPrice(amount, currencyCode, locale) {
11678
11901
  const hasCents = Math.round(amount * 100) % 100 !== 0;
11679
11902
  const formatter = new Intl.NumberFormat(locale, {
11680
11903
  style: "currency",
@@ -11689,6 +11912,7 @@ function formatPrice(amount, currencyCode = "USD", locale = "en-US") {
11689
11912
  function useProductCard(product) {
11690
11913
  const session = useFourtySession();
11691
11914
  const { hover, hoverProps } = useImageHover();
11915
+ const locale = useSpaceLocale();
11692
11916
  const productImages = Array.isArray(product.images) ? product.images : [];
11693
11917
  const primaryImage2 = productImages[0];
11694
11918
  const hoverImage = productImages[1];
@@ -11696,8 +11920,8 @@ function useProductCard(product) {
11696
11920
  const onSale = isOnSale(product.price.amount, product.compareAtPrice?.amount);
11697
11921
  const badge = pickBadge(product);
11698
11922
  const colorCount = pickColorCount(product);
11699
- const priceLabel = formatPrice(product.price.amount, product.price.currencyCode);
11700
- const compareAtPriceLabel = onSale && product.compareAtPrice !== void 0 ? formatPrice(product.compareAtPrice.amount, product.compareAtPrice.currencyCode) : void 0;
11923
+ const priceLabel = formatPrice(product.price.amount, product.price.currencyCode, locale);
11924
+ const compareAtPriceLabel = onSale && product.compareAtPrice !== void 0 ? formatPrice(product.compareAtPrice.amount, product.compareAtPrice.currencyCode, locale) : void 0;
11701
11925
  const onCardClick = () => {
11702
11926
  session.dispatchSuggestionAction(pickProductCardAction(product));
11703
11927
  };
@@ -11743,7 +11967,7 @@ function pickColorCount(product) {
11743
11967
  }
11744
11968
 
11745
11969
  // src/verticals/commerce/product/use-look-card.ts
11746
- import * as React40 from "react";
11970
+ import * as React42 from "react";
11747
11971
 
11748
11972
  // src/verticals/commerce/variant/variant-option-axes.ts
11749
11973
  function carriesValue(variant, name, value) {
@@ -11952,8 +12176,9 @@ function useLookCard({
11952
12176
  }) {
11953
12177
  const session = useFourtySession();
11954
12178
  const addFlash = useSuccessFlash({ duration: 1200 });
11955
- const [pending2, setPending] = React40.useState(null);
11956
- const clean = React40.useMemo(
12179
+ const locale = useSpaceLocale();
12180
+ const [pending2, setPending] = React42.useState(null);
12181
+ const clean = React42.useMemo(
11957
12182
  () => (Array.isArray(products) ? products : []).filter(
11958
12183
  (p) => p !== null && p !== void 0 && typeof p === "object"
11959
12184
  ),
@@ -11961,7 +12186,7 @@ function useLookCard({
11961
12186
  );
11962
12187
  if (clean.length === 0) return null;
11963
12188
  const visibleProducts = clean.slice(0, maxTiles);
11964
- const total = sumTotal(visibleProducts);
12189
+ const total = sumTotal(visibleProducts, locale);
11965
12190
  const totalEyebrow = typeof totalLabel === "string" && totalLabel.length > 0 && totalLabel.length < 24 ? totalLabel : "Total";
11966
12191
  const visible = visibleProducts.map((product) => ({
11967
12192
  product,
@@ -12051,7 +12276,7 @@ function useLookCard({
12051
12276
  addFlash
12052
12277
  };
12053
12278
  }
12054
- function sumTotal(products) {
12279
+ function sumTotal(products, locale) {
12055
12280
  if (products.length === 0) return null;
12056
12281
  const currency = products[0].price.currencyCode;
12057
12282
  let total = 0;
@@ -12059,7 +12284,7 @@ function sumTotal(products) {
12059
12284
  if (p.price.currencyCode !== currency) return null;
12060
12285
  total += p.price.amount;
12061
12286
  }
12062
- return formatPrice(total, currency);
12287
+ return formatPrice(total, currency, locale);
12063
12288
  }
12064
12289
  function pickPrimaryImage(product) {
12065
12290
  const productImages = Array.isArray(product.images) ? product.images : [];
@@ -12189,24 +12414,24 @@ function discountPct(p) {
12189
12414
  const saved = (p.compareAtPrice.amount - p.price.amount) / p.compareAtPrice.amount;
12190
12415
  return Math.round(saved * 100);
12191
12416
  }
12192
- function buildComparisonRows(products) {
12417
+ function buildComparisonRows(products, locale, words) {
12193
12418
  const rows = [
12194
- { id: "price", label: "Price", values: byProduct(products, (p) => formatProductPrice(p)) }
12419
+ { id: "price", label: words.price, values: byProduct(products, (p) => formatProductPrice(p, locale)) }
12195
12420
  ];
12196
12421
  if (products.some((p) => discountPct(p) !== void 0)) {
12197
12422
  rows.push({
12198
12423
  id: "sale",
12199
- label: "Sale",
12424
+ label: words.sale,
12200
12425
  values: byProduct(products, (p) => {
12201
12426
  const pct = discountPct(p);
12202
- return pct === void 0 ? "\u2014" : `${pct}% off`;
12427
+ return pct === void 0 ? "\u2014" : words.percentOff(pct);
12203
12428
  })
12204
12429
  });
12205
12430
  }
12206
12431
  if (products.some((p) => ratingOf(p) !== void 0)) {
12207
12432
  rows.push({
12208
12433
  id: "rating",
12209
- label: "Rating",
12434
+ label: words.rating,
12210
12435
  values: byProduct(products, (p) => {
12211
12436
  const r = ratingOf(p);
12212
12437
  return r === void 0 ? "\u2014" : `${r.value.toFixed(1)} (${r.count})`;
@@ -12215,12 +12440,12 @@ function buildComparisonRows(products) {
12215
12440
  }
12216
12441
  return rows;
12217
12442
  }
12218
- function formatProductPrice(p) {
12443
+ function formatProductPrice(p, locale) {
12219
12444
  if (p.price === void 0 || p.price === null) return "\u2014";
12220
12445
  if (typeof p.price.amount !== "string" && typeof p.price.amount !== "number") {
12221
12446
  return "\u2014";
12222
12447
  }
12223
- return formatPrice(p.price.amount, p.price.currencyCode);
12448
+ return formatPrice(p.price.amount, p.price.currencyCode, locale);
12224
12449
  }
12225
12450
 
12226
12451
  // src/verticals/commerce/variant/resolve-swatch-color.ts
@@ -12308,7 +12533,7 @@ function useContentActions() {
12308
12533
  import { useEffect as useEffect19, useState as useState18 } from "react";
12309
12534
 
12310
12535
  // package.json
12311
- var version = "0.5.6";
12536
+ var version = "0.5.8";
12312
12537
 
12313
12538
  // src/host/host-modules.ts
12314
12539
  import * as react from "react";
@@ -12369,7 +12594,7 @@ function loadEngine(apiUrl) {
12369
12594
  }
12370
12595
 
12371
12596
  // src/host/Spacefront.tsx
12372
- import { jsx as jsx21 } from "react/jsx-runtime";
12597
+ import { jsx as jsx23 } from "react/jsx-runtime";
12373
12598
  function Spacefront(props) {
12374
12599
  const [engine, setEngine] = useState18(null);
12375
12600
  const [failure, setFailure] = useState18(null);
@@ -12391,11 +12616,11 @@ function Spacefront(props) {
12391
12616
  if (failure !== null) throw failure;
12392
12617
  if (engine === null) return null;
12393
12618
  const EngineRoot = engine.EngineRoot;
12394
- return /* @__PURE__ */ jsx21(EngineRoot, { ...props });
12619
+ return /* @__PURE__ */ jsx23(EngineRoot, { ...props });
12395
12620
  }
12396
12621
 
12397
12622
  // src/npm.ts
12398
- import { z as z49 } from "zod";
12623
+ import { z as z51 } from "zod";
12399
12624
  export {
12400
12625
  ACQUISITION_KIND_LABELS,
12401
12626
  ACTIVE_PANEL_ATTR,
@@ -12421,6 +12646,7 @@ export {
12421
12646
  AssetSchema,
12422
12647
  AttachmentRefSchema,
12423
12648
  AttachmentRefsSchema,
12649
+ AttachmentUploadError,
12424
12650
  AttributeDefSchema,
12425
12651
  AttributeScopeBucketSchema,
12426
12652
  AttributeScopeConfigSchema,
@@ -12488,6 +12714,7 @@ export {
12488
12714
  DEFAULT_HOSTING,
12489
12715
  DEFAULT_PRESENCE_PROFILE,
12490
12716
  DEFAULT_SPACE_CONFIG,
12717
+ DEFAULT_SPACE_LOCALE,
12491
12718
  DEFAULT_VISITOR_ACCESS,
12492
12719
  DIRECTION_FLOW,
12493
12720
  DROP_REASONS,
@@ -12529,7 +12756,10 @@ export {
12529
12756
  HOST_MODULE_SPECIFIERS,
12530
12757
  HandlerRegistryContext,
12531
12758
  HostClearedSchema,
12759
+ HostExportsSchema,
12760
+ HostImportsSchema,
12532
12761
  HostPayloadSchema,
12762
+ HydrationNoticeProvider,
12533
12763
  HydrationStateContext,
12534
12764
  HydratorProvider,
12535
12765
  INITIAL_NAV_PRESENTATION,
@@ -12546,6 +12776,7 @@ export {
12546
12776
  LlmUsageDailySchema,
12547
12777
  MAX_ACTIVE_AGENT_DIRECTIVES,
12548
12778
  MAX_ATTACHMENT_BYTES,
12779
+ MAX_ATTACHMENT_MB,
12549
12780
  MAX_VISITOR_PROMPT_CHARS,
12550
12781
  MIN_WIRE_PROTOCOL_VERSION,
12551
12782
  MOBILE_VIEWPORT_MAX,
@@ -12584,11 +12815,13 @@ export {
12584
12815
  ProjectionSignalBridge,
12585
12816
  REFERRER_HOST_PARAM,
12586
12817
  REGISTRY_CLICKED,
12818
+ RELEASE_MESSAGE_MAX,
12587
12819
  RESERVED_IDS,
12588
12820
  RESERVED_ID_SET,
12589
12821
  RecordVerdictInputSchema,
12590
12822
  RecordableVerdictSchema,
12591
12823
  RegistryProvider,
12824
+ ReleaseMessageSchema,
12592
12825
  ReorderAgentDirectivesInputSchema,
12593
12826
  ReviewAggregateSchema,
12594
12827
  ReviewSchema,
@@ -12600,6 +12833,7 @@ export {
12600
12833
  SOCKET_TICKET_PARAM,
12601
12834
  STRUCTURAL_BASELINE_CATALOG,
12602
12835
  STRUCTURAL_BASELINE_TYPES,
12836
+ SUPPORTED_SPACE_LOCALES,
12603
12837
  SURFACES,
12604
12838
  SURFACE_DISPOSITION,
12605
12839
  ScrollContainerProvider,
@@ -12632,11 +12866,14 @@ export {
12632
12866
  SpaceAgentDirectiveSchema,
12633
12867
  SpaceBrandMarkSchema,
12634
12868
  SpaceBugSchema,
12869
+ SpaceLocaleProvider,
12870
+ SpaceLocaleSchema,
12635
12871
  Spacefront,
12636
12872
  SpacefrontCanvas,
12637
12873
  SpacefrontPreviewProvider,
12638
12874
  SpecSchema,
12639
12875
  StateSnapshotFrameSchema,
12876
+ StoreThemeAccessError,
12640
12877
  SuggestionActionSchema,
12641
12878
  SuggestionActionsSchema,
12642
12879
  SurfaceSchema,
@@ -12690,6 +12927,7 @@ export {
12690
12927
  arraysEqual,
12691
12928
  arrivalFromParams,
12692
12929
  arrivalToParams,
12930
+ attachmentFailureOfStatus,
12693
12931
  bareComponentType,
12694
12932
  buildBaseAttributesConfig,
12695
12933
  buildBucketLabelsConfig,
@@ -12714,7 +12952,9 @@ export {
12714
12952
  classifyItemChange,
12715
12953
  clearAgentPresence,
12716
12954
  clearCartActionFailures,
12955
+ clearCodeDiscountSources,
12717
12956
  clearProductNameLookups,
12957
+ clearStoreThemeSources,
12718
12958
  clearVariantChoice,
12719
12959
  clientStateEntries,
12720
12960
  clientStateVector,
@@ -12723,6 +12963,7 @@ export {
12723
12963
  collectLayoutGids,
12724
12964
  collectPlacedEntityRefs,
12725
12965
  colorHexOf,
12966
+ commerceLocaleOf,
12726
12967
  compareSdkVersions,
12727
12968
  compressArray,
12728
12969
  compressString,
@@ -12737,6 +12978,7 @@ export {
12737
12978
  createSessionStorageAdapter,
12738
12979
  createTokenOverlapScorer,
12739
12980
  createUnavailableProduct,
12981
+ declaredSpaceLocaleOf,
12740
12982
  defineEventKind,
12741
12983
  derivePropsDoc,
12742
12984
  deriveSourceElement,
@@ -12774,6 +13016,8 @@ export {
12774
13016
  hapticCue,
12775
13017
  hasProse,
12776
13018
  hostFillsPage,
13019
+ hostImportProblems,
13020
+ hostImportsRefusal,
12777
13021
  hostPlace,
12778
13022
  hostingAllows,
12779
13023
  injectGoogleFonts,
@@ -12795,6 +13039,8 @@ export {
12795
13039
  isPresenceStreamArtifact,
12796
13040
  isReservedId,
12797
13041
  isVideoUrl,
13042
+ languageNameOf,
13043
+ languageOf,
12798
13044
  layoutTopWithin,
12799
13045
  listRegisteredPlatforms,
12800
13046
  listRegisteredServices,
@@ -12848,6 +13094,7 @@ export {
12848
13094
  reducePatch,
12849
13095
  refuseCheckoutHandoff,
12850
13096
  registerChipRelevanceRule,
13097
+ registerCodeDiscountSource,
12851
13098
  registerComponent,
12852
13099
  registerEntityPageKind,
12853
13100
  registerExclusiveOverlay,
@@ -12861,6 +13108,7 @@ export {
12861
13108
  registerProductNameLookup,
12862
13109
  registerServiceHydrators,
12863
13110
  registerSessionScopedClear,
13111
+ registerStoreThemeSource,
12864
13112
  registeredPageKinds,
12865
13113
  registeredPresenceFactForms,
12866
13114
  registeredPresenceForms,
@@ -12872,6 +13120,7 @@ export {
12872
13120
  requestVariantChoice,
12873
13121
  requiredTopLevelProps,
12874
13122
  resetServerState,
13123
+ resolveCodeDiscountSource,
12875
13124
  resolveHydrators,
12876
13125
  resolvePresenceFactForm,
12877
13126
  resolvePresenceForm,
@@ -12882,6 +13131,7 @@ export {
12882
13131
  resolveServiceHydrators,
12883
13132
  resolveStanding,
12884
13133
  resolveStorage,
13134
+ resolveStoreThemeSource,
12885
13135
  resolveSwatchColor,
12886
13136
  resolveType,
12887
13137
  resolved,
@@ -12907,6 +13157,7 @@ export {
12907
13157
  settleArmedCheckoutHandoff,
12908
13158
  settledBlocks,
12909
13159
  settledCart,
13160
+ spaceLocaleOf,
12910
13161
  splitAnswer,
12911
13162
  splitSentences,
12912
13163
  stateSnapshotSignal,
@@ -12917,6 +13168,7 @@ export {
12917
13168
  surfaceEmits,
12918
13169
  surfaceSuppressionReason,
12919
13170
  text,
13171
+ textDirectionOf,
12920
13172
  threadRowAttrs,
12921
13173
  toggleCartDrawer,
12922
13174
  token,
@@ -12997,6 +13249,7 @@ export {
12997
13249
  useHasLeftSeedHome,
12998
13250
  useHistoryNav,
12999
13251
  useHydrated,
13252
+ useHydrationNotice,
13000
13253
  useHydrationState,
13001
13254
  useHydrators,
13002
13255
  useInlineCompletion,
@@ -13051,10 +13304,12 @@ export {
13051
13304
  useSessionState,
13052
13305
  useShellRegistry,
13053
13306
  useShellRoot,
13307
+ useSpaceLocale,
13054
13308
  useStandingOfType,
13055
13309
  useStream,
13056
13310
  useSuccessFlash,
13057
13311
  useSuggestionsWithDefaults,
13312
+ useTextDirection,
13058
13313
  useThreadJumpMarks,
13059
13314
  useThreadLanding,
13060
13315
  useThreadRows,
@@ -13083,5 +13338,5 @@ export {
13083
13338
  withCartActorOrigin,
13084
13339
  withInteractionTracking,
13085
13340
  withSignalTurn,
13086
- z49 as z
13341
+ z51 as z
13087
13342
  };