@40rty/ams-sdk 0.1.0

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 (317) hide show
  1. package/dist/index.js +11918 -0
  2. package/dist/types/ecommerce/src/attribute-buckets.d.ts +79 -0
  3. package/dist/types/ecommerce/src/base-attributes.d.ts +42 -0
  4. package/dist/types/ecommerce/src/bucket-labels.d.ts +37 -0
  5. package/dist/types/ecommerce/src/cart-line-selections.d.ts +24 -0
  6. package/dist/types/ecommerce/src/commerce-schemas.d.ts +1813 -0
  7. package/dist/types/ecommerce/src/format-variant-value.d.ts +1 -0
  8. package/dist/types/ecommerce/src/index.d.ts +13 -0
  9. package/dist/types/ecommerce/src/locale.d.ts +31 -0
  10. package/dist/types/ecommerce/src/optimistic-cart-line.d.ts +38 -0
  11. package/dist/types/ecommerce/src/pdp-companions.d.ts +21 -0
  12. package/dist/types/ecommerce/src/pick-product-card-action.d.ts +38 -0
  13. package/dist/types/ecommerce/src/product-lookup.d.ts +34 -0
  14. package/dist/types/ecommerce/src/projection-spec.d.ts +38 -0
  15. package/dist/types/ecommerce/src/review-schemas.d.ts +425 -0
  16. package/dist/types/sdk/src/analytics/consent.d.ts +52 -0
  17. package/dist/types/sdk/src/analytics/drops.d.ts +98 -0
  18. package/dist/types/sdk/src/analytics/emitting-scope.d.ts +2 -0
  19. package/dist/types/sdk/src/analytics/index.d.ts +12 -0
  20. package/dist/types/sdk/src/analytics/inert-scope.d.ts +2 -0
  21. package/dist/types/sdk/src/analytics/notify.d.ts +41 -0
  22. package/dist/types/sdk/src/analytics/outbox.d.ts +118 -0
  23. package/dist/types/sdk/src/analytics/scope-context.d.ts +24 -0
  24. package/dist/types/sdk/src/analytics/scope.d.ts +149 -0
  25. package/dist/types/sdk/src/analytics/surface.d.ts +77 -0
  26. package/dist/types/sdk/src/analytics/transport.d.ts +91 -0
  27. package/dist/types/sdk/src/animation/index.d.ts +2 -0
  28. package/dist/types/sdk/src/animation/useListTransition.d.ts +16 -0
  29. package/dist/types/sdk/src/animation/useUpdateTransition.d.ts +16 -0
  30. package/dist/types/sdk/src/canvas/ElementIdContext.d.ts +13 -0
  31. package/dist/types/sdk/src/canvas/GenerationStyleContext.d.ts +13 -0
  32. package/dist/types/sdk/src/canvas/ShimmerSweep.d.ts +18 -0
  33. package/dist/types/sdk/src/canvas/TransitionContext.d.ts +52 -0
  34. package/dist/types/sdk/src/canvas/canvas-arrangement.d.ts +20 -0
  35. package/dist/types/sdk/src/canvas/canvas-motion-style.d.ts +18 -0
  36. package/dist/types/sdk/src/canvas/canvas-outlet.d.ts +14 -0
  37. package/dist/types/sdk/src/canvas/canvas-tail.d.ts +31 -0
  38. package/dist/types/sdk/src/canvas/dom-targets.d.ts +140 -0
  39. package/dist/types/sdk/src/canvas/generation-entrance.d.ts +26 -0
  40. package/dist/types/sdk/src/canvas/generation-style.d.ts +62 -0
  41. package/dist/types/sdk/src/canvas/index.d.ts +21 -0
  42. package/dist/types/sdk/src/canvas/item-motion/ItemTransitionGroup.d.ts +72 -0
  43. package/dist/types/sdk/src/canvas/item-motion/classify-items.d.ts +24 -0
  44. package/dist/types/sdk/src/canvas/item-motion/index.d.ts +5 -0
  45. package/dist/types/sdk/src/canvas/item-motion/plugins/wipe.d.ts +11 -0
  46. package/dist/types/sdk/src/canvas/item-motion/profile.d.ts +77 -0
  47. package/dist/types/sdk/src/canvas/item-motion/wipe.d.ts +57 -0
  48. package/dist/types/sdk/src/canvas/nav-direction.d.ts +22 -0
  49. package/dist/types/sdk/src/canvas/runtime-context.d.ts +15 -0
  50. package/dist/types/sdk/src/canvas/runtime-hooks.d.ts +106 -0
  51. package/dist/types/sdk/src/canvas/runtime-types.d.ts +183 -0
  52. package/dist/types/sdk/src/canvas/scroll-event-target.d.ts +21 -0
  53. package/dist/types/sdk/src/canvas/turn-change-anchor.d.ts +34 -0
  54. package/dist/types/sdk/src/canvas/turn-edit.d.ts +8 -0
  55. package/dist/types/sdk/src/canvas/use-canvas-actions.d.ts +41 -0
  56. package/dist/types/sdk/src/canvas/use-fourty-layout.d.ts +19 -0
  57. package/dist/types/sdk/src/catalog/CatalogContext.d.ts +7 -0
  58. package/dist/types/sdk/src/catalog/DebugContext.d.ts +5 -0
  59. package/dist/types/sdk/src/catalog/HydrationStateContext.d.ts +45 -0
  60. package/dist/types/sdk/src/catalog/HydratorContext.d.ts +7 -0
  61. package/dist/types/sdk/src/catalog/component-library.d.ts +32 -0
  62. package/dist/types/sdk/src/catalog/define.d.ts +149 -0
  63. package/dist/types/sdk/src/catalog/hydrator-registry.d.ts +91 -0
  64. package/dist/types/sdk/src/catalog/index.d.ts +14 -0
  65. package/dist/types/sdk/src/catalog/interaction-contract.d.ts +78 -0
  66. package/dist/types/sdk/src/catalog/normalize-components.d.ts +17 -0
  67. package/dist/types/sdk/src/catalog/prose-value.d.ts +22 -0
  68. package/dist/types/sdk/src/catalog/registration/index.d.ts +4 -0
  69. package/dist/types/sdk/src/catalog/registration/register-component.d.ts +35 -0
  70. package/dist/types/sdk/src/catalog/registration/registry.d.ts +27 -0
  71. package/dist/types/sdk/src/catalog/registration/types.d.ts +83 -0
  72. package/dist/types/sdk/src/catalog/registry.d.ts +22 -0
  73. package/dist/types/sdk/src/catalog/render-inline.d.ts +39 -0
  74. package/dist/types/sdk/src/catalog/resolve-hydrators.d.ts +27 -0
  75. package/dist/types/sdk/src/chat/chat-context.d.ts +40 -0
  76. package/dist/types/sdk/src/chat/index.d.ts +1 -0
  77. package/dist/types/sdk/src/client-state/index.d.ts +2 -0
  78. package/dist/types/sdk/src/client-state/server-store.d.ts +38 -0
  79. package/dist/types/sdk/src/client-state/store.d.ts +20 -0
  80. package/dist/types/sdk/src/commerce/commerce-context.d.ts +62 -0
  81. package/dist/types/sdk/src/commerce/commerce-shapes.d.ts +170 -0
  82. package/dist/types/sdk/src/commerce/ecommerce/agentic-overlay.d.ts +27 -0
  83. package/dist/types/sdk/src/commerce/ecommerce/buy-now-exit.d.ts +36 -0
  84. package/dist/types/sdk/src/commerce/ecommerce/cart-action-failures.d.ts +54 -0
  85. package/dist/types/sdk/src/commerce/ecommerce/cart-drawer-store.d.ts +18 -0
  86. package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-reasons.d.ts +54 -0
  87. package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-shape.d.ts +73 -0
  88. package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-store.d.ts +39 -0
  89. package/dist/types/sdk/src/commerce/ecommerce/comparison-rows.d.ts +30 -0
  90. package/dist/types/sdk/src/commerce/ecommerce/index.d.ts +21 -0
  91. package/dist/types/sdk/src/commerce/ecommerce/normalize-collection.d.ts +17 -0
  92. package/dist/types/sdk/src/commerce/ecommerce/preselect-from-facts.d.ts +25 -0
  93. package/dist/types/sdk/src/commerce/ecommerce/product-filters.d.ts +40 -0
  94. package/dist/types/sdk/src/commerce/ecommerce/use-buy-now.d.ts +33 -0
  95. package/dist/types/sdk/src/commerce/ecommerce/use-cart-drawer.d.ts +35 -0
  96. package/dist/types/sdk/src/commerce/ecommerce/use-cart-line-row.d.ts +30 -0
  97. package/dist/types/sdk/src/commerce/ecommerce/use-comparison-table.d.ts +22 -0
  98. package/dist/types/sdk/src/commerce/ecommerce/use-look-card.d.ts +80 -0
  99. package/dist/types/sdk/src/commerce/ecommerce/use-product-card.d.ts +62 -0
  100. package/dist/types/sdk/src/commerce/ecommerce/use-product-carousel-scroll.d.ts +13 -0
  101. package/dist/types/sdk/src/commerce/ecommerce/use-product-detail.d.ts +48 -0
  102. package/dist/types/sdk/src/commerce/ecommerce/use-product-grid-filter.d.ts +17 -0
  103. package/dist/types/sdk/src/commerce/ecommerce/use-selected-variants-state.d.ts +8 -0
  104. package/dist/types/sdk/src/commerce/ecommerce/use-wishlist-drawer.d.ts +34 -0
  105. package/dist/types/sdk/src/commerce/ecommerce/variant-option-axes.d.ts +56 -0
  106. package/dist/types/sdk/src/commerce/ecommerce/variant-resolution.d.ts +83 -0
  107. package/dist/types/sdk/src/commerce/ecommerce/variant-selection.d.ts +22 -0
  108. package/dist/types/sdk/src/commerce/external-navigation.d.ts +41 -0
  109. package/dist/types/sdk/src/commerce/index.d.ts +9 -0
  110. package/dist/types/sdk/src/commerce/option-selection-store.d.ts +8 -0
  111. package/dist/types/sdk/src/commerce/pending-variant-choice-store.d.ts +20 -0
  112. package/dist/types/sdk/src/commerce/variant-selection-store.d.ts +7 -0
  113. package/dist/types/sdk/src/content/index.d.ts +2 -0
  114. package/dist/types/sdk/src/content/use-faq-accordion.d.ts +11 -0
  115. package/dist/types/sdk/src/content/use-newsletter-form.d.ts +16 -0
  116. package/dist/types/sdk/src/host/Spacefront.d.ts +11 -0
  117. package/dist/types/sdk/src/host/engine-loader.d.ts +14 -0
  118. package/dist/types/sdk/src/host/host-modules.d.ts +5833 -0
  119. package/dist/types/sdk/src/host/index.d.ts +4 -0
  120. package/dist/types/sdk/src/host/types.d.ts +52 -0
  121. package/dist/types/sdk/src/index.d.ts +21 -0
  122. package/dist/types/sdk/src/interaction/haptics.d.ts +8 -0
  123. package/dist/types/sdk/src/interaction/index.d.ts +3 -0
  124. package/dist/types/sdk/src/interaction/normalize-signals.d.ts +8 -0
  125. package/dist/types/sdk/src/interaction/withInteractionTracking.d.ts +48 -0
  126. package/dist/types/sdk/src/npm.d.ts +3 -0
  127. package/dist/types/sdk/src/projection/ProjectionSignalBridge.d.ts +5 -0
  128. package/dist/types/sdk/src/projection/index.d.ts +1 -0
  129. package/dist/types/sdk/src/projection/preferences.d.ts +12 -0
  130. package/dist/types/sdk/src/projection/transform.d.ts +7 -0
  131. package/dist/types/sdk/src/provider/AgentAsk.d.ts +16 -0
  132. package/dist/types/sdk/src/provider/index.d.ts +4 -0
  133. package/dist/types/sdk/src/provider/providers/handler-registry.d.ts +11 -0
  134. package/dist/types/sdk/src/provider/use-clamp-toggle.d.ts +22 -0
  135. package/dist/types/sdk/src/provider/use-timed-flag.d.ts +16 -0
  136. package/dist/types/sdk/src/rendering/index.d.ts +1 -0
  137. package/dist/types/sdk/src/rendering/post-hydration.d.ts +37 -0
  138. package/dist/types/sdk/src/session/FourtySessionContext.d.ts +228 -0
  139. package/dist/types/sdk/src/session/clear-registry.d.ts +6 -0
  140. package/dist/types/sdk/src/session/index.d.ts +4 -0
  141. package/dist/types/sdk/src/session/use-action.d.ts +25 -0
  142. package/dist/types/sdk/src/session/visitor-locale.d.ts +2 -0
  143. package/dist/types/sdk/src/shared/index.d.ts +2 -0
  144. package/dist/types/sdk/src/shared/use-expandable.d.ts +9 -0
  145. package/dist/types/sdk/src/shared/use-image-hover.d.ts +13 -0
  146. package/dist/types/sdk/src/shell/ScrollContainerContext.d.ts +25 -0
  147. package/dist/types/sdk/src/shell/ShellRegistry.d.ts +25 -0
  148. package/dist/types/sdk/src/shell/ShellRootContext.d.ts +15 -0
  149. package/dist/types/sdk/src/shell/dock-persistence.d.ts +49 -0
  150. package/dist/types/sdk/src/shell/exclusive-overlay.d.ts +16 -0
  151. package/dist/types/sdk/src/shell/index.d.ts +12 -0
  152. package/dist/types/sdk/src/shell/thread-scroll/ThreadHeadroom.d.ts +11 -0
  153. package/dist/types/sdk/src/shell/thread-scroll/headroom.d.ts +4 -0
  154. package/dist/types/sdk/src/shell/thread-scroll/index.d.ts +6 -0
  155. package/dist/types/sdk/src/shell/thread-scroll/pin-turn-head.d.ts +12 -0
  156. package/dist/types/sdk/src/shell/thread-scroll/settle-thread-row.d.ts +23 -0
  157. package/dist/types/sdk/src/shell/thread-scroll/thread-geometry.d.ts +27 -0
  158. package/dist/types/sdk/src/shell/thread-scroll/thread-row-attr.d.ts +4 -0
  159. package/dist/types/sdk/src/shell/thread-scroll/use-pin-turn-to-top.d.ts +22 -0
  160. package/dist/types/sdk/src/shell/thread-scroll/use-scroll-has-more-below.d.ts +19 -0
  161. package/dist/types/sdk/src/shell/thread-scroll/use-thread-jump-marks.d.ts +28 -0
  162. package/dist/types/sdk/src/shell/thread-scroll/use-thread-landing.d.ts +1 -0
  163. package/dist/types/sdk/src/shell/use-composer-chip-select.d.ts +21 -0
  164. package/dist/types/sdk/src/shell/use-go-home.d.ts +11 -0
  165. package/dist/types/sdk/src/shell/use-hydrated.d.ts +19 -0
  166. package/dist/types/sdk/src/shell/use-menu-item-select.d.ts +13 -0
  167. package/dist/types/sdk/src/shell/use-overridable-toggle.d.ts +24 -0
  168. package/dist/types/sdk/src/shell/use-thread-rows.d.ts +41 -0
  169. package/dist/types/sdk/src/social/index.d.ts +2 -0
  170. package/dist/types/sdk/src/social/use-review-helpful.d.ts +10 -0
  171. package/dist/types/sdk/src/social/use-testimonials-carousel.d.ts +15 -0
  172. package/dist/types/sdk/src/utils/core-utils/format-distance.d.ts +6 -0
  173. package/dist/types/sdk/src/utils/core-utils/format-price.d.ts +7 -0
  174. package/dist/types/sdk/src/utils/core-utils/index.d.ts +10 -0
  175. package/dist/types/sdk/src/utils/core-utils/inject-google-fonts.d.ts +17 -0
  176. package/dist/types/sdk/src/utils/core-utils/is-on-sale.d.ts +6 -0
  177. package/dist/types/sdk/src/utils/core-utils/is-video-url.d.ts +6 -0
  178. package/dist/types/sdk/src/utils/core-utils/maps-directions-url.d.ts +5 -0
  179. package/dist/types/sdk/src/utils/core-utils/mint-id.d.ts +10 -0
  180. package/dist/types/sdk/src/utils/core-utils/resolve-swatch-color.d.ts +2 -0
  181. package/dist/types/sdk/src/utils/core-utils/validate-all.d.ts +13 -0
  182. package/dist/types/sdk/src/utils/index.d.ts +10 -0
  183. package/dist/types/sdk/src/utils/storage.d.ts +9 -0
  184. package/dist/types/sdk/src/utils/use-document-visible.d.ts +9 -0
  185. package/dist/types/sdk/src/utils/use-form-factor.d.ts +24 -0
  186. package/dist/types/sdk/src/utils/use-inline-completion.d.ts +48 -0
  187. package/dist/types/sdk/src/utils/use-interval.d.ts +7 -0
  188. package/dist/types/sdk/src/utils/use-success-flash.d.ts +35 -0
  189. package/dist/types/sdk/src/utils/use-wake-lock.d.ts +15 -0
  190. package/dist/types/sdk/src/utils/viewport-window.d.ts +39 -0
  191. package/dist/types/sdk/src/voice/index.d.ts +2 -0
  192. package/dist/types/sdk/src/voice/use-dictation.d.ts +80 -0
  193. package/dist/types/sdk/src/voice/use-voice-capture.d.ts +65 -0
  194. package/dist/types/sdk/src/widgets/presence/core-presence/fact-form-registry.d.ts +43 -0
  195. package/dist/types/sdk/src/widgets/presence/core-presence/fact-shape.d.ts +70 -0
  196. package/dist/types/sdk/src/widgets/presence/core-presence/form-registry.d.ts +28 -0
  197. package/dist/types/sdk/src/widgets/presence/core-presence/knowledge.d.ts +18 -0
  198. package/dist/types/sdk/src/widgets/presence/core-presence/presence-restore.d.ts +13 -0
  199. package/dist/types/sdk/src/widgets/presence/core-presence/presence-stream.d.ts +64 -0
  200. package/dist/types/sdk/src/widgets/presence/core-presence/source-form-registry.d.ts +129 -0
  201. package/dist/types/sdk/src/widgets/presence/core-presence/standing-signal-store.d.ts +19 -0
  202. package/dist/types/sdk/src/widgets/presence/flows/flow-store.d.ts +22 -0
  203. package/dist/types/sdk/src/widgets/presence/index.d.ts +17 -0
  204. package/dist/types/sdk/src/widgets/presence/runtime-context.d.ts +109 -0
  205. package/dist/types/sdk/src/widgets/presence/use-layout-entity-ids.d.ts +12 -0
  206. package/dist/types/sdk/src/widgets/presence/use-optimistic-facts.d.ts +43 -0
  207. package/dist/types/sdk/src/widgets/presence/use-optimistic-flow-set.d.ts +24 -0
  208. package/dist/types/sdk/src/widgets/presence/use-presence-notch.d.ts +75 -0
  209. package/dist/types/sdk/src/widgets/presence/use-presence.d.ts +45 -0
  210. package/dist/types/sdk/src/widgets/presence/use-standing-signal.d.ts +12 -0
  211. package/dist/types/spacestation/src/analytics/catalog.d.ts +89 -0
  212. package/dist/types/spacestation/src/analytics/ecommerce/events.d.ts +183 -0
  213. package/dist/types/spacestation/src/analytics/ecommerce/funnel.d.ts +22 -0
  214. package/dist/types/spacestation/src/analytics/ecommerce/index.d.ts +14 -0
  215. package/dist/types/spacestation/src/analytics/ecommerce/surfacing.d.ts +42 -0
  216. package/dist/types/spacestation/src/analytics/envelope.d.ts +222 -0
  217. package/dist/types/spacestation/src/analytics/index.d.ts +28 -0
  218. package/dist/types/spacestation/src/analytics/kind.d.ts +155 -0
  219. package/dist/types/spacestation/src/analytics/session.d.ts +35 -0
  220. package/dist/types/spacestation/src/attachment/attachment.d.ts +83 -0
  221. package/dist/types/spacestation/src/catalog/attribute-registry.d.ts +148 -0
  222. package/dist/types/spacestation/src/catalog/attribute-scope.d.ts +41 -0
  223. package/dist/types/spacestation/src/catalog/canvas-arrangement.d.ts +43 -0
  224. package/dist/types/spacestation/src/catalog/catalog-schemas.d.ts +264 -0
  225. package/dist/types/spacestation/src/catalog/config.d.ts +13 -0
  226. package/dist/types/spacestation/src/catalog/derive-props-doc.d.ts +11 -0
  227. package/dist/types/spacestation/src/catalog/element-filled.d.ts +77 -0
  228. package/dist/types/spacestation/src/catalog/entity-refs.d.ts +14 -0
  229. package/dist/types/spacestation/src/catalog/function-props.d.ts +23 -0
  230. package/dist/types/spacestation/src/catalog/hydration-paths.d.ts +19 -0
  231. package/dist/types/spacestation/src/catalog/prose.d.ts +60 -0
  232. package/dist/types/spacestation/src/catalog/ref-sites.d.ts +45 -0
  233. package/dist/types/spacestation/src/catalog/required-props.d.ts +31 -0
  234. package/dist/types/spacestation/src/catalog/resolved.d.ts +145 -0
  235. package/dist/types/spacestation/src/catalog/structural-baseline.d.ts +7 -0
  236. package/dist/types/spacestation/src/catalog/wire/catalog-wire.d.ts +191 -0
  237. package/dist/types/spacestation/src/catalog/wire/index.d.ts +5 -0
  238. package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +351 -0
  239. package/dist/types/spacestation/src/catalog/wire/schema-from-wire.d.ts +7 -0
  240. package/dist/types/spacestation/src/catalog/wire/schema-to-wire.d.ts +8 -0
  241. package/dist/types/spacestation/src/catalog/wire/wire-schema.d.ts +78 -0
  242. package/dist/types/spacestation/src/commerce/cart-add-signal.d.ts +125 -0
  243. package/dist/types/spacestation/src/commerce/cart-state.d.ts +87 -0
  244. package/dist/types/spacestation/src/commerce/cart-verb-signals.d.ts +80 -0
  245. package/dist/types/spacestation/src/commerce/page-kinds.d.ts +40 -0
  246. package/dist/types/spacestation/src/commerce/selection-signal.d.ts +25 -0
  247. package/dist/types/spacestation/src/contracts/entry-context.d.ts +35 -0
  248. package/dist/types/spacestation/src/contracts/knowledge/index.d.ts +12 -0
  249. package/dist/types/spacestation/src/contracts/knowledge/types.d.ts +238 -0
  250. package/dist/types/spacestation/src/contracts/retrieval/core/knowledge-source.d.ts +36 -0
  251. package/dist/types/spacestation/src/contracts/retrieval/core/platform-connector.d.ts +49 -0
  252. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/source.d.ts +3 -0
  253. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/types.d.ts +29 -0
  254. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/client.d.ts +238 -0
  255. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/source.d.ts +3 -0
  256. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/types.d.ts +23 -0
  257. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/connector.d.ts +11 -0
  258. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/domains.d.ts +27 -0
  259. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/source.d.ts +3 -0
  260. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/types.d.ts +21 -0
  261. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/option-values.d.ts +71 -0
  262. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/source.d.ts +3 -0
  263. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/types.d.ts +18 -0
  264. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/source.d.ts +5 -0
  265. package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/types.d.ts +47 -0
  266. package/dist/types/spacestation/src/contracts/retrieval/index.d.ts +25 -0
  267. package/dist/types/spacestation/src/contracts/session-arrival-params.d.ts +32 -0
  268. package/dist/types/spacestation/src/contracts/session-arrival.d.ts +215 -0
  269. package/dist/types/spacestation/src/contracts/tools/definitions.d.ts +139 -0
  270. package/dist/types/spacestation/src/contracts/tools/execution-context.d.ts +135 -0
  271. package/dist/types/spacestation/src/contracts/tools/index.d.ts +9 -0
  272. package/dist/types/spacestation/src/contracts/tools/types.d.ts +163 -0
  273. package/dist/types/spacestation/src/focus/focus.d.ts +12 -0
  274. package/dist/types/spacestation/src/hydration/hydration.d.ts +46 -0
  275. package/dist/types/spacestation/src/index.d.ts +71 -0
  276. package/dist/types/spacestation/src/layout/apply-patch.d.ts +17 -0
  277. package/dist/types/spacestation/src/layout/conversation.d.ts +136 -0
  278. package/dist/types/spacestation/src/layout/layout-diff.d.ts +17 -0
  279. package/dist/types/spacestation/src/layout/layout.d.ts +275 -0
  280. package/dist/types/spacestation/src/layout/page.d.ts +244 -0
  281. package/dist/types/spacestation/src/layout/patch.d.ts +92 -0
  282. package/dist/types/spacestation/src/layout/reduce-patch.d.ts +19 -0
  283. package/dist/types/spacestation/src/layout/reserved-ids.d.ts +13 -0
  284. package/dist/types/spacestation/src/projection/projection.d.ts +249 -0
  285. package/dist/types/spacestation/src/shell/shell.d.ts +109 -0
  286. package/dist/types/spacestation/src/signal/agent-signals.d.ts +539 -0
  287. package/dist/types/spacestation/src/space/connector.d.ts +61 -0
  288. package/dist/types/spacestation/src/space/generation-job.d.ts +4 -0
  289. package/dist/types/spacestation/src/space/hosting.d.ts +36 -0
  290. package/dist/types/spacestation/src/space/manifest.d.ts +8 -0
  291. package/dist/types/spacestation/src/space/package-version.d.ts +18 -0
  292. package/dist/types/spacestation/src/space/package.d.ts +35 -0
  293. package/dist/types/spacestation/src/space/prompt-config.d.ts +17 -0
  294. package/dist/types/spacestation/src/space/session-activity.d.ts +71 -0
  295. package/dist/types/spacestation/src/space/session-queue.d.ts +2147 -0
  296. package/dist/types/spacestation/src/space/space-config.d.ts +96 -0
  297. package/dist/types/spacestation/src/space/space-otp.d.ts +18 -0
  298. package/dist/types/spacestation/src/space/space.d.ts +104 -0
  299. package/dist/types/spacestation/src/space/tool-manifest.d.ts +8 -0
  300. package/dist/types/spacestation/src/space/trace.d.ts +555 -0
  301. package/dist/types/spacestation/src/space/workspace-catalog.d.ts +112 -0
  302. package/dist/types/spacestation/src/tool-compression/compress.d.ts +88 -0
  303. package/dist/types/spacestation/src/tool-compression/index.d.ts +11 -0
  304. package/dist/types/spacestation/src/tool-compression/scoring.d.ts +38 -0
  305. package/dist/types/spacestation/src/tool-compression/tokenize.d.ts +29 -0
  306. package/dist/types/spacestation/src/trace/trace-data.d.ts +126 -0
  307. package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +224 -0
  308. package/dist/types/spacestation/src/trace/trace-envelopes.d.ts +144 -0
  309. package/dist/types/spacestation/src/trace/trace-events.d.ts +450 -0
  310. package/dist/types/spacestation/src/types.d.ts +253 -0
  311. package/dist/types/spacestation/src/view/continuation.d.ts +45 -0
  312. package/dist/types/spacestation/src/widgets/presence/element.d.ts +241 -0
  313. package/dist/types/spacestation/src/widgets/presence/frame.d.ts +56 -0
  314. package/dist/types/spacestation/src/widgets/presence/index.d.ts +4 -0
  315. package/dist/types/spacestation/src/widgets/presence/profile.d.ts +75 -0
  316. package/dist/types/spacestation/src/widgets/presence/scan.d.ts +45 -0
  317. package/package.json +43 -0
@@ -0,0 +1,238 @@
1
+ /**
2
+ * EcommerceClient — platform-agnostic data interface above the connector
3
+ * layer. Tool packages consume THIS, not platform-specific clients.
4
+ *
5
+ * Layering:
6
+ *
7
+ * ┌──────────────────────────────────────────────────┐
8
+ * │ tool-packages/ecommerce/index.ts │ LLM-callable tools
9
+ * │ createEcommerceToolPackage(client) │ (search_catalog,
10
+ * │ │ search_policies, …)
11
+ * ├──────────────────────────────────────────────────┤
12
+ * │ EcommerceClient (this contract) │ capability surface
13
+ * ├──────────────────────────────────────────────────┤
14
+ * │ Per-platform implementations: │
15
+ * │ @fourty/shopify/server client-impl.ts │ protocol bridge
16
+ * │ woo/client-impl.ts (future) │
17
+ * ├──────────────────────────────────────────────────┤
18
+ * │ KnowledgeSource<T> per (platform × domain) │ retrieval/index data
19
+ * └──────────────────────────────────────────────────┘
20
+ *
21
+ * Adding a platform = implement `EcommerceClient` once. Every tool
22
+ * package, retrieval pipeline, and signal handler keeps working — they
23
+ * all consume the interface, not the underlying client.
24
+ *
25
+ * Lives in `@fourty/spacestation` (the neutral contract layer) so a connector
26
+ * package like `@fourty/shopify` can implement it WITHOUT depending on
27
+ * `@fourty/agent`. Both the agent and connector packages import these
28
+ * types directly from `@fourty/spacestation`.
29
+ */
30
+ /**
31
+ * Available variant axis on a product — e.g. `{ name: "Size", values:
32
+ * ["XS","S","M","L","XL"], soldOut: ["XS","S","M","XL"] }`. Surfaces the
33
+ * LLM-readable color / size / material axes so the agent can answer "is
34
+ * it available in <X>?" from data instead of guessing.
35
+ *
36
+ * `values` is EXISTENCE — every value the product is offered in.
37
+ * `soldOut` is PURCHASABILITY — the subset of `values` that cannot be
38
+ * bought right now. The two are separate questions and conflating them
39
+ * is a shipped bug: a size present in `values` says nothing about
40
+ * stock, and answering "yes, in stock" from mere presence is how the
41
+ * agent told a visitor size M was available when only L was (SM, Lara
42
+ * Mini Dress Deco Rose, 2026-08-01).
43
+ *
44
+ * `soldOut` ABSENT ⇒ availability unknown for this connector — the
45
+ * agent must not claim either way.
46
+ * `soldOut` EMPTY ⇒ every value is purchasable.
47
+ * `soldOut` ⊆ values, always.
48
+ *
49
+ * Encoded as a subset array rather than per-value objects deliberately:
50
+ * `{value,available}` pairs cost ~4x the tokens on every product row of
51
+ * every search, which the latency budget (architecture-invariants §VI)
52
+ * does not have room for.
53
+ *
54
+ * The two directions are NOT equally strong, and consumers must phrase
55
+ * them differently:
56
+ * - A value IN `soldOut` cannot be bought in ANY combination. Exact,
57
+ * whatever the axis count — safe to state as a flat denial.
58
+ * - A value ABSENT from `soldOut` is purchasable in SOME combination,
59
+ * which on a multi-axis product need not be the combination on
60
+ * screen. Never promote that to "available in the color you're
61
+ * looking at" without checking the variant itself.
62
+ *
63
+ * Filtered to LLM-actionable axes ONLY (Color, Size, Material, Pattern).
64
+ * Generic marketing attributes ("Top Features", "Cosmetic Finish") are
65
+ * dropped — they inflate token cost without changing the refinement
66
+ * surface.
67
+ */
68
+ export interface ProductOptionAxis {
69
+ name: string;
70
+ values: string[];
71
+ /** Subset of `values` that is not purchasable. Absent ⇒ unknown. */
72
+ soldOut?: string[];
73
+ }
74
+ export interface ProductRating {
75
+ value: number;
76
+ count: number;
77
+ }
78
+ export interface CatalogProductSummary {
79
+ id: string;
80
+ title: string;
81
+ price: string;
82
+ currency: string;
83
+ imageUrl: string;
84
+ /** Alt text of the primary image, when the source provides one.
85
+ *
86
+ * Carried because it is frequently the ONLY category-bearing string a
87
+ * connector returns. Measured 2026-07-26 on the Global MCP path: offers
88
+ * expose no `productType`, no category and no tags — their full key set is
89
+ * id/title/description/media/priceRange/variants/attributes/rating/
90
+ * uniqueSellingPoint/topFeatures/techSpecs/lookupUrl — while the media alt
91
+ * text reads "…Square-Toe Stiletto Pump Lace-Up Women's Heel". With alt
92
+ * dropped the agent had to GUESS categories, which is exactly the
93
+ * ungrounded-claim failure class ("Holly Black or Possession … platform or
94
+ * sneaker", unsupported). `ContentArticle` and `CollectionSummary` already
95
+ * carry `imageAlt`; products were the odd one out.
96
+ *
97
+ * Optional: connectors without alt text leave it undefined, and consumers
98
+ * must treat absent as "unknown", never as a category claim. */
99
+ imageAlt?: string;
100
+ productType?: string;
101
+ /** Available variant axes (Color / Size / Material / Pattern). The
102
+ * agent reads this to verify variant availability before claiming a
103
+ * product isn't available in a requested color/size/material. */
104
+ optionAxes?: ProductOptionAxis[];
105
+ /** Aggregate review rating when the backend exposes it. */
106
+ rating?: ProductRating;
107
+ /** Minimum price across variants, in MAJOR currency units (dollars). */
108
+ priceMin?: number;
109
+ /** Maximum price across variants (== priceMin when single-tier). */
110
+ priceMax?: number;
111
+ /** Editorial one-liner — the angle to cite in rationale prose. Capped
112
+ * ~150 chars by the connector. Maps to Global MCP `uniqueSellingPoint`. */
113
+ pitch?: string;
114
+ /** Top feature bullets, ≤4 capped by the connector. Each bullet kept
115
+ * raw — agent reads what's there. */
116
+ features?: string[];
117
+ /** Structured spec lines ("Material: …", "Closure: …"), ≤6 capped. */
118
+ specs?: string[];
119
+ /** Distinct color names available across variants, ≤6 capped. Lets
120
+ * the agent quickly know "available in 6 colors" without traversing
121
+ * the full variant array. */
122
+ colors?: string[];
123
+ /** True when ANY variant is available; false only when every variant
124
+ * is out of stock. Connectors that can't determine variant-level
125
+ * availability omit this. */
126
+ availableForSale?: boolean;
127
+ /** Open bag for platform-specific per-row facets. Compressed per turn
128
+ * against the visitor query before the row reaches the LLM. */
129
+ meta?: Record<string, unknown>;
130
+ }
131
+ export interface PolicyContent {
132
+ /** Raw policy / FAQ text — markdown / plain. */
133
+ content: string;
134
+ }
135
+ /** Platform-agnostic article shape returned by `searchContent`. */
136
+ export interface ContentArticle {
137
+ id: string;
138
+ title: string;
139
+ handle: string;
140
+ publishedAt: string;
141
+ excerpt: string;
142
+ content: string;
143
+ blogTitle: string;
144
+ blogHandle: string;
145
+ imageUrl: string;
146
+ imageAlt: string;
147
+ author: string;
148
+ tags: string[];
149
+ }
150
+ /** Platform-agnostic collection shape returned by `searchCollections`. */
151
+ export interface CollectionSummary {
152
+ id: string;
153
+ title: string;
154
+ handle: string;
155
+ description: string;
156
+ updatedAt: string;
157
+ imageUrl: string;
158
+ imageAlt: string;
159
+ sampleProductIds: string[];
160
+ sampleProductTitles: string[];
161
+ }
162
+ /**
163
+ * A brand editorial / campaign asset — real photography the agent places into
164
+ * editorial surfaces (hero, editorialSplit, editorialFigure) via `imageSrc`.
165
+ * Sourced from the brand's asset library: Shopify Admin Files / metaobjects in
166
+ * production, a pre-staged mock today. NOT an entity ref — the agent reads
167
+ * `url` and emits it directly; there is no hydration step.
168
+ */
169
+ export interface EditorialAsset {
170
+ /** Stable, opaque handle. The agent emits THIS as a component's `imageSrc`
171
+ * (a `resolved('asset')` ref); the client hydrates it back to the full asset.
172
+ * Never the URL — parsed/constructed only inside packages/shopify (IV.4). */
173
+ id: string;
174
+ /** Direct image URL — resolved into the component client-side (with `srcSet`);
175
+ * the agent never sees or emits it. */
176
+ url: string;
177
+ /** What the image shows — also the alt text. */
178
+ alt: string;
179
+ /** Theme / category tags the agent matches against the surface it's
180
+ * composing: "campaign", "hero", "summer", "footwear", "bags", "womens",
181
+ * "mood", "editorial", … */
182
+ tags: string[];
183
+ }
184
+ /**
185
+ * Native filters the catalog backend can apply server-side. Connector
186
+ * implementations translate these to whatever their backend exposes
187
+ * (Shopify MCP → `filters.categories` + `filters.price`). Filters NOT
188
+ * in this shape (size, color, vendor) ride in the free-text `query`
189
+ * upstream — they're ranking hints, not hard filters.
190
+ */
191
+ export interface SearchCatalogFilters {
192
+ /** Category taxonomy IDs (OR logic). Format is connector-specific. */
193
+ categories?: string[];
194
+ /** Price band in MAJOR currency units (dollars). Connectors convert
195
+ * to minor units (cents) if their backend requires it. */
196
+ priceMin?: number;
197
+ priceMax?: number;
198
+ }
199
+ export interface SearchCatalogOptions {
200
+ /** Free-form additional context the LLM passes to the search backend. */
201
+ context?: string;
202
+ /** Hard filters applied server-side. Undefined = no filter. */
203
+ filters?: SearchCatalogFilters;
204
+ }
205
+ export interface EcommerceClient {
206
+ /** Catalog search — products matching `query`. The LLM-tool wrapper
207
+ * layers price filtering on top, so implementations don't need to
208
+ * understand price ranges. */
209
+ searchCatalog(query: string, opts?: SearchCatalogOptions): Promise<CatalogProductSummary[]>;
210
+ /** Policy / FAQ corpus — returns the merchant's operational answers as ONE
211
+ * blob of text. Deliberately takes NO query: the `search_policies` verb
212
+ * sentence-ranks the blob against the visitor's question in its audited
213
+ * `compressResult`, so an implementation that also ranked would rank twice.
214
+ * Query-free reads are also cacheable per shop instead of per question. */
215
+ searchPolicies(): Promise<PolicyContent>;
216
+ /** Editorial / blog content search. */
217
+ searchContent(query: string): Promise<ContentArticle[]>;
218
+ /** Collection search (fulltext). */
219
+ searchCollections(query: string): Promise<CollectionSummary[]>;
220
+ /** EXACT collection lookup by handle — the precise lane the manifest names.
221
+ * Unlike `searchCollections`, which is fulltext-only and mis-ranks a handle
222
+ * against unrelated collections' descriptions, this resolves the ONE
223
+ * collection whose handle matches exactly (or null if none). OPTIONAL: a
224
+ * binding that can't do exact-handle resolution omits it and the tool falls
225
+ * back to fulltext search. */
226
+ getCollectionByHandle?(handle: string): Promise<CollectionSummary | null>;
227
+ /** Brand editorial / campaign assets for the agent to place into editorial
228
+ * surfaces. OPTIONAL capability (bindings opt in, like server-side cart).
229
+ * `query` narrows by theme/category ("summer", "footwear", "hero"); omit
230
+ * for the full library. Production backs this with Shopify Admin
231
+ * Files/metaobjects; a pre-staged mock backs it today. */
232
+ getAssets?(query?: string): Promise<EditorialAsset[]>;
233
+ /** Open + reserve any persistent transport (HTTP keep-alive, gRPC
234
+ * channel, etc.) so the first real call doesn't pay the handshake
235
+ * cost. Best-effort: a failed warmup must not throw — log and
236
+ * return. Implementations without persistent transport can omit. */
237
+ warmup?(): Promise<void>;
238
+ }
@@ -0,0 +1,3 @@
1
+ import type { KnowledgeSource } from '../../core/knowledge-source';
2
+ import type { CatalogCollection } from './types';
3
+ export type CatalogCollectionSource = KnowledgeSource<CatalogCollection>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Vertical-agnostic, platform-agnostic collection record.
3
+ *
4
+ * A "collection" is a curated grouping of products — Shopify
5
+ * collections, Woo product categories, BigCommerce categories.
6
+ * `sampleProductIds` + `sampleProductTitles` provide signal for
7
+ * member-title-driven queries ("show me snowboards" should hit the
8
+ * Snowboards collection via the titles of its sample products).
9
+ */
10
+ export interface CatalogCollection {
11
+ id: string;
12
+ platform: string;
13
+ title: string;
14
+ handle: string;
15
+ description: string;
16
+ imageUrl: string;
17
+ imageAlt: string;
18
+ /** First few product ids in the collection. */
19
+ sampleProductIds: string[];
20
+ /** First few product titles in the collection — indexed for
21
+ * member-driven matches. */
22
+ sampleProductTitles: string[];
23
+ }
@@ -0,0 +1,11 @@
1
+ import type { PlatformConnector } from '../core/platform-connector';
2
+ import type { EcommerceDomains } from './domains';
3
+ /**
4
+ * Type alias — every ecommerce platform connector satisfies this.
5
+ *
6
+ * `createShopifyConnector(opts): EcommerceConnector` is the only thing
7
+ * the rest of the system sees; the structural type guarantees a docs
8
+ * connector can never be dropped where an ecommerce one is expected,
9
+ * and vice versa, even though both share the `PlatformConnector` base.
10
+ */
11
+ export type EcommerceConnector = PlatformConnector<EcommerceDomains>;
@@ -0,0 +1,27 @@
1
+ import type { KnowledgeSource } from '../core/knowledge-source';
2
+ import type { CatalogProduct } from './products/types';
3
+ import type { CatalogArticle } from './articles/types';
4
+ import type { CatalogCollection } from './collections/types';
5
+ import type { CatalogPolicy } from './policies/types';
6
+ import type { CatalogFaq } from './faq/types';
7
+ /**
8
+ * Domain manifest for the ecommerce vertical.
9
+ *
10
+ * Declares which `KnowledgeSource`s a connector MAY ship for an
11
+ * ecommerce space. Each is optional in the connector's `sources`
12
+ * record (typed `Partial<EcommerceDomains>`) — a platform that lacks
13
+ * a domain simply omits the key.
14
+ *
15
+ * This shape is what makes `EcommerceConnector ≠ DocsConnector` at the
16
+ * type level. Tier 1b carries products + articles + collections +
17
+ * policies; Tier 2 adds pages; Tier 3 adds reviews / faq / promos.
18
+ */
19
+ export interface EcommerceDomains {
20
+ products: KnowledgeSource<CatalogProduct>;
21
+ articles: KnowledgeSource<CatalogArticle>;
22
+ collections: KnowledgeSource<CatalogCollection>;
23
+ policies: KnowledgeSource<CatalogPolicy>;
24
+ /** Tier 3 — curated Q&A (Shopify: `shopify--qa-pair` metaobjects). Optional
25
+ * in the connector's `Partial<EcommerceDomains>` sources record. */
26
+ faq: KnowledgeSource<CatalogFaq>;
27
+ }
@@ -0,0 +1,3 @@
1
+ import type { KnowledgeSource } from '../../core/knowledge-source';
2
+ import type { CatalogFaq } from './types';
3
+ export type CatalogFaqSource = KnowledgeSource<CatalogFaq>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Vertical-agnostic, platform-agnostic FAQ record — one curated
3
+ * question→answer pair.
4
+ *
5
+ * A FAQ is generic brand knowledge: a question the merchant has already
6
+ * answered in their own words. The SOURCE is platform-specific (Shopify
7
+ * surfaces these as `shopify--qa-pair` metaobjects; another platform may
8
+ * carry them as a CMS collection), but the SHAPE is universal — which is
9
+ * why this record, like `CatalogPolicy` and `CatalogArticle`, carries no
10
+ * Shopify-shaped fields.
11
+ *
12
+ * `id` is the source entity id (a metaobject gid on Shopify). It is kept
13
+ * for provenance / dedupe only — FAQs render as prose in a `RELEVANT FAQ`
14
+ * prompt block, never as a bound entity, so the id is not a trusted gid.
15
+ */
16
+ export interface CatalogFaq {
17
+ id: string;
18
+ platform: string;
19
+ question: string;
20
+ answer: string;
21
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Option VALUES — how a stated `{axis: value}` is compared against the option
3
+ * axes a catalog actually reports, and what verdict that comparison supports.
4
+ *
5
+ * Vertical-scoped (`docs/architecture-invariants.md` §VIII.1): it names
6
+ * ecommerce's option-axis vocabulary and sits beside the `ProductOptionAxis`
7
+ * contract it reads. Every layer that judges a stated selection shares this one
8
+ * home — the SDK's client-side variant resolution (full variant matrix) and a
9
+ * platform verb's server-side precondition (the compressed `optionAxes` a tool
10
+ * result carried). Two implementations of "does this product come in a 9?" is
11
+ * how a boundary starts refusing adds the client would have accepted.
12
+ */
13
+ import type { ProductOptionAxis } from './client';
14
+ /**
15
+ * Canonicalize an option value for comparison: trim + case-fold, nothing else.
16
+ *
17
+ * Case-folding is REQUIRED, not a convenience. The agent and the client read
18
+ * option values from two different sources — the agent from the catalog
19
+ * connector's `optionAxes` (Title Case: `Tortoise`), the client from the
20
+ * storefront's own variant data (which several catalogs, Steve Madden included,
21
+ * store UPPERCASE as a display convention: `TORTOISE`). Comparing those with
22
+ * `===` finds nothing, and a resolver that REFUSES on no-match then reports a
23
+ * stocked item as unavailable — a false negative that is worse than the silent
24
+ * swap it replaced, because it blocks a sale AND tells the visitor something
25
+ * untrue. Observed live: `cart.add {Color:"Tortoise"}` refused against a variant
26
+ * carrying `TORTOISE`.
27
+ *
28
+ * Deliberately NOT more than this. No unit stripping, no synonym mapping, no
29
+ * `ONESZ`→`One Size` guessing — those are heuristics that silently match values
30
+ * the visitor did not ask for, which is the exact failure mode this whole module
31
+ * exists to prevent. Case and whitespace are formatting; anything else is meaning.
32
+ */
33
+ export declare function canonicalOptionValue(value: string): string;
34
+ /**
35
+ * What a product's REPORTED axes say about one stated `{axis: value}` pair:
36
+ *
37
+ * - `carries` — the axis is reported and the value is one of its values. (This
38
+ * is about EXISTENCE, not stock: `soldOut` answers the other question, and
39
+ * conflating the two is how a sold-out size gets confirmed as available.)
40
+ * - `lacks` — the axis is reported and the value is NOT among its values.
41
+ * The one positive denial these compressed axes support.
42
+ * - `unknown` — no evidence either way: nothing reported, or nothing reported
43
+ * for THIS axis.
44
+ */
45
+ export type StatedValueVerdict = 'carries' | 'lacks' | 'unknown';
46
+ /**
47
+ * Judge one stated `{axis: value}` against reported axes.
48
+ *
49
+ * An axis the payload names but the row never reported is `unknown`, NOT
50
+ * `lacks` — deliberately. `ProductOptionAxis[]` carries no "these are all the
51
+ * axes" guarantee: a connector may surface only the axes it can normalize (the
52
+ * Shopify binding filters to Color / Size / Material / Pattern), so absence is a
53
+ * gap in what we were told, never proof about the product. Refusing on it would
54
+ * block real adds on any backend that reports less — the false-negative failure
55
+ * `canonicalOptionValue` documents, one layer up.
56
+ */
57
+ export declare function statedValueVerdict(axes: ReadonlyArray<ProductOptionAxis> | undefined, axisName: string, value: string): StatedValueVerdict;
58
+ /** The values reported for one axis, in the order the backend returned them.
59
+ * Undefined when this axis was not reported at all (see `statedValueVerdict`
60
+ * for why that is not a denial) — callers naming what a product DOES come in
61
+ * use it to quote the store's own spellings rather than the agent's. */
62
+ export declare function reportedAxisValues(axes: ReadonlyArray<ProductOptionAxis> | undefined, axisName: string): string[] | undefined;
63
+ /**
64
+ * Narrow an entity's open facet bag onto its reported option axes.
65
+ *
66
+ * The bag crossed a boundary as `Record<string, unknown>` (the universal wire
67
+ * keeps per-entity vertical facets opaque, §VIII.1), so its contents are
68
+ * validated here rather than trusted. Malformed axes are dropped, not repaired:
69
+ * a half-read axis would answer `lacks` about values it simply failed to parse.
70
+ */
71
+ export declare function readOptionAxes(facets: Record<string, unknown> | undefined): ProductOptionAxis[] | undefined;
@@ -0,0 +1,3 @@
1
+ import type { KnowledgeSource } from '../../core/knowledge-source';
2
+ import type { CatalogPolicy } from './types';
3
+ export type CatalogPolicySource = KnowledgeSource<CatalogPolicy>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Vertical-agnostic, platform-agnostic policy record.
3
+ *
4
+ * Standard ecommerce policy slots: privacy, shipping, refund, terms,
5
+ * subscription, warranty. `kind` is open — platforms with custom
6
+ * policies (e.g. age-restriction, ethical-sourcing) can extend with
7
+ * their own values.
8
+ */
9
+ export type PolicyKind = 'privacy' | 'shipping' | 'refund' | 'terms' | 'subscription' | 'warranty' | 'custom';
10
+ export interface CatalogPolicy {
11
+ id: string;
12
+ platform: string;
13
+ kind: PolicyKind | string;
14
+ title: string;
15
+ /** Policy body. Plaintext or HTML — chunker treats `\n\n+` as
16
+ * paragraph boundaries regardless. */
17
+ body: string;
18
+ }
@@ -0,0 +1,5 @@
1
+ import type { KnowledgeSource } from '../../core/knowledge-source';
2
+ import type { CatalogProduct } from './types';
3
+ /** Per-platform product source. Implementations live under
4
+ * `connectors/ecommerce/<platform>/sources/products.ts`. */
5
+ export type CatalogProductSource = KnowledgeSource<CatalogProduct>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Vertical-agnostic, platform-agnostic product record.
3
+ *
4
+ * Lingua franca for the ecommerce vertical. Every platform connector
5
+ * (Shopify, Woo, BigCommerce, Stripe-catalog, custom) normalizes its
6
+ * raw shape into this. Indexes (`ProductsIndex`) operate on this; they
7
+ * never see the raw upstream payload.
8
+ *
9
+ * `id` is opaque — Shopify gid, Woo post id, custom UUID, doesn't
10
+ * matter. Indexes treat it as a string. Cross-source joins (e.g.
11
+ * reviews → product) use `id` + `platform` as the composite key.
12
+ */
13
+ export interface CatalogProduct {
14
+ id: string;
15
+ /** Source platform — `shopify` | `woo` | `bigcommerce` | `custom` | … */
16
+ platform: string;
17
+ title: string;
18
+ /** URL slug. */
19
+ handle: string;
20
+ vendor: string;
21
+ productType: string;
22
+ tags: string[];
23
+ description: string;
24
+ imageUrl: string;
25
+ imageAlt: string;
26
+ /** Pre-formatted display string ("$199.99"). */
27
+ price: string;
28
+ /** Amount in minor units (cents). For numeric range filters. */
29
+ priceMinor: number;
30
+ currencyCode: string;
31
+ /** True when at least one variant has stock or is back-orderable. */
32
+ available: boolean;
33
+ /** Optional variant axes, expanded by per-platform sources when relevant. */
34
+ variants?: CatalogVariant[];
35
+ /** Per-platform extension bag — opaque to indexes. */
36
+ metafields?: Record<string, unknown>;
37
+ }
38
+ export interface CatalogVariant {
39
+ id: string;
40
+ title: string;
41
+ /** Opaque axis map — e.g. { size: 'L', color: 'red', binding: 'BOA' }. */
42
+ axes: Record<string, string>;
43
+ priceMinor: number;
44
+ available: boolean;
45
+ sku?: string;
46
+ barcode?: string;
47
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Retrieval / connector contracts — the type surface a platform
3
+ * connector (Shopify, Woo, …) must satisfy, and the catalog records the
4
+ * retrieval engine operates on.
5
+ *
6
+ * These live in `@fourty/spacestation` (the neutral contract layer) so a
7
+ * connector package like `@fourty/shopify` can implement them WITHOUT
8
+ * depending on `@fourty/agent`. The agent's `retrieval/` files are now
9
+ * thin re-export shims pointing back here, so agent-internal imports are
10
+ * unchanged.
11
+ */
12
+ export type { PlatformConnector } from './core/platform-connector';
13
+ export type { FetchOptions, FetchResult, KnowledgeSource } from './core/knowledge-source';
14
+ export type { EcommerceConnector } from './ecommerce/connector';
15
+ export type { EcommerceDomains } from './ecommerce/domains';
16
+ export type { CatalogProductSource } from './ecommerce/products/source';
17
+ export type { CatalogProduct, CatalogVariant } from './ecommerce/products/types';
18
+ export type { CatalogArticleSource } from './ecommerce/articles/source';
19
+ export type { CatalogArticle } from './ecommerce/articles/types';
20
+ export type { CatalogCollectionSource } from './ecommerce/collections/source';
21
+ export type { CatalogCollection } from './ecommerce/collections/types';
22
+ export type { CatalogPolicySource } from './ecommerce/policies/source';
23
+ export type { PolicyKind, CatalogPolicy } from './ecommerce/policies/types';
24
+ export type { CatalogFaqSource } from './ecommerce/faq/source';
25
+ export type { CatalogFaq } from './ecommerce/faq/types';
@@ -0,0 +1,32 @@
1
+ import { type SessionArrival, type Surface, type VisitorIdDurability } from './session-arrival';
2
+ /** The referring host. Not a landing-URL param — the browser knows it from
3
+ * `document.referrer` — so it only ever appears on a socket URL. */
4
+ export declare const REFERRER_HOST_PARAM = "referrer_host";
5
+ /** Every LANDING-URL param that is arrival evidence — exported so the host's
6
+ * strip pass and the boot dial's forwarder cannot disagree with this reader. */
7
+ export declare const ARRIVAL_PARAMS: readonly string[];
8
+ export interface ArrivalEvidence {
9
+ /** The landing URL's query (or a socket query using the same names). */
10
+ readonly params: URLSearchParams;
11
+ /** The referring HOST, already reduced from `document.referrer` with
12
+ * same-host navigation dropped. Undefined for none. */
13
+ readonly referrerHost: string | undefined;
14
+ /** Where the assistant is running. Required — see `readSessionArrival`. */
15
+ readonly surface: Surface;
16
+ /** Undefined when the producer cannot know it (the inline boot dial); the
17
+ * server then proves it from whether a visitor id was sent. */
18
+ readonly visitorIdDurability: VisitorIdDurability | undefined;
19
+ }
20
+ /**
21
+ * Build the typed arrival from its URL evidence.
22
+ *
23
+ * Total: it always returns a valid arrival. A single malformed value is dropped
24
+ * on its own — an over-long campaign name must not cost the visitor their whole
25
+ * attribution — by retrying with only the fields a host supplied.
26
+ */
27
+ export declare function arrivalFromParams(evidence: ArrivalEvidence): SessionArrival;
28
+ /**
29
+ * The inverse of `arrivalFromParams`: a parsed arrival back onto a query, under
30
+ * the same names, so a socket URL built from it reads back identically.
31
+ */
32
+ export declare function arrivalToParams(arrival: SessionArrival, into: URLSearchParams): void;