@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,450 @@
1
+ import type { Spec, JsonPatchOp } from '../layout/layout';
2
+ import type { InteractionSignal, TimingInfo, UsageInfo, ToolCall } from '../types';
3
+ import type { TraceDiagnostic } from './trace-diagnostics';
4
+ import type { AgentSignal } from '../signal/agent-signals';
5
+ /** Step names are free-form strings — the agent emits its own steps. */
6
+ export type StepName = string;
7
+ /** Step configuration metadata — model settings, limits, etc. */
8
+ export interface StepConfig {
9
+ model?: string;
10
+ temperature?: number;
11
+ maxTokens?: number;
12
+ /** Resolved thinking tier THIS call actually ran with (`off`…`high`) —
13
+ * the request/recipe baseline for `phase_a`, the (possibly
14
+ * `composeThinking`-overridden) tier for `phase_b`. Distinct calls in
15
+ * the same run can carry different values; this is what makes that
16
+ * visible instead of inferring one shared tier from the parent span. */
17
+ thinking?: string;
18
+ [key: string]: unknown;
19
+ }
20
+ /** Model configuration emitted at agent-run start */
21
+ export interface TraceStartInfo {
22
+ model: string;
23
+ temperature: number;
24
+ maxTokens: number;
25
+ }
26
+ /**
27
+ * A persistent, cross-visit visitor identity — the "known visitor" seed the
28
+ * agent carries into a turn. Vertical-agnostic by design: every space type
29
+ * populates the same open shape with whatever durable facts it knows (an
30
+ * e-commerce space via the Customer Account API, a SaaS space via its
31
+ * billing record, an editorial space via a CMS membership). Every field
32
+ * optional — the prompt block degrades to whatever is present.
33
+ *
34
+ * It lives here (the wire) because it now crosses two boundaries: the agent
35
+ * threads it onto `AgentContext.identity`, and it rides the trace
36
+ * `SystemPromptSnapshot` so the admin inspector can show what the agent knew
37
+ * about the visitor. Single source of truth — `@fourty/agent` re-exports this
38
+ * type; it is not redefined there.
39
+ */
40
+ export interface VisitorIdentity {
41
+ /** A name to greet by, if the space knows one. */
42
+ displayName?: string;
43
+ /** Known to the space across visits (has an account / prior history). */
44
+ returning?: boolean;
45
+ /**
46
+ * Durable, space-defined facts the visitor carries across visits, as
47
+ * label → value(s). The platform stays vertical-neutral about the keys: an
48
+ * e-commerce space might set `{ "Shoe size": "8", "Buys most": ["boots",
49
+ * "heels"] }`; a SaaS space `{ "Plan": "Enterprise", "Seats": "40" }`. The
50
+ * agent treats them as tailoring hints; the visitor can always override.
51
+ */
52
+ attributes?: Record<string, string | string[]>;
53
+ /** Free-form durable notes the space has recorded about this visitor. */
54
+ notes?: string[];
55
+ /**
56
+ * Ephemeral, UNCONFIRMED facts carried over from a prior visit's local
57
+ * cache (the presence dossier, the standing direction) — a hint the
58
+ * agent should warm-start from and verify/refine, never present as
59
+ * settled truth. Distinct from `attributes` (confirmed durable slots):
60
+ * values are always plain strings, never arrays. See
61
+ * docs/superpowers/specs/2026-07-08-ephemeral-visitor-facts-design.md.
62
+ */
63
+ inferred?: Record<string, string>;
64
+ }
65
+ /**
66
+ * Resolved, structured snapshot of the system prompt the foreground agent
67
+ * runs on for one turn. Emitted by the agent after prompt assembly so
68
+ * the inspector can show what the model actually saw — not a guess.
69
+ *
70
+ * Split mirrors the prompt-caching layout: `persona` + `catalog` are the
71
+ * stable cached prefix; `dynamic` is recomputed every turn.
72
+ */
73
+ export interface SystemPromptSnapshot {
74
+ turnId?: string;
75
+ /** Persona / soul prompt — recipe technical rules + space versioned
76
+ * prompts + output-format instructions. The cached prefix's first half. */
77
+ persona: string;
78
+ /** Generated UI component catalog prompt. The cached prefix's second half. */
79
+ catalog: string;
80
+ /** Component types included in the catalog prompt, when the catalog
81
+ * builder exposes them. Omitted otherwise — never inferred from text. */
82
+ componentsUsed?: string[];
83
+ /** Tools attached to this turn — name + resolved description. */
84
+ tools: Array<{
85
+ name: string;
86
+ description: string;
87
+ }>;
88
+ /**
89
+ * Cross-visit visitor identity the agent carried into this turn — the
90
+ * locally-persisted "known visitor" seed (name, returning flag, durable
91
+ * attributes, notes) sent up as `visitorMemory` on session create and
92
+ * threaded onto `AgentContext.identity`. Omitted for a first-time /
93
+ * anonymous visitor (no seed). Surfaced so the inspector can show what the
94
+ * agent knew about the visitor before the turn began.
95
+ */
96
+ identity?: VisitorIdentity;
97
+ /** Per-turn dynamic context — recomputed every turn, never cached. */
98
+ dynamic: {
99
+ layoutBlock: string;
100
+ memories: Array<{
101
+ fact: string;
102
+ label: string;
103
+ timestamp: number;
104
+ }>;
105
+ signals: string[];
106
+ contextSections: string[];
107
+ };
108
+ /** Char count of the cached static prefix (persona + catalog). */
109
+ staticChars: number;
110
+ }
111
+ /**
112
+ * Discriminated union of preview payloads a `phase_progress` event can carry.
113
+ *
114
+ * New preview kinds plug in by adding a new variant here — never by
115
+ * overloading an existing one with a stringly-typed `meta` bag. Brand
116
+ * shells switch on `kind` and render whatever chrome they own.
117
+ */
118
+ export type PhaseProgressPreview = {
119
+ kind: 'image';
120
+ url: string;
121
+ alt?: string;
122
+ } | {
123
+ kind: 'text';
124
+ text: string;
125
+ } | {
126
+ kind: 'product_ref';
127
+ id: string;
128
+ } | {
129
+ kind: 'collection_ref';
130
+ id: string;
131
+ };
132
+ /**
133
+ * Visitor-facing progress signal emitted from inside an agent step.
134
+ * Distinct from `step_start` / `step_done`, which are coarse lifecycle
135
+ * markers used by the tracker. `phase_progress` is meant for the chat
136
+ * surface: what's happening right now, optional sub-step counts,
137
+ * optional preview thumbnails as data arrives.
138
+ *
139
+ * - `phase` matches `step_start.step` so consumers can correlate.
140
+ * - `label` overrides the SDK-resolved default label.
141
+ * - `previews` is additive — each emit can replace the full list, or
142
+ * the consumer can choose to accumulate (SDK default: replace).
143
+ *
144
+ * Agent may emit zero, one, or many `phase_progress` events per step.
145
+ */
146
+ export interface PhaseProgress {
147
+ type: 'phase_progress';
148
+ turnId?: string;
149
+ phase: StepName;
150
+ label?: string;
151
+ description?: string;
152
+ /** 0..1 normalized progress when knowable. */
153
+ percent?: number;
154
+ /** Discrete sub-step counter, e.g. "12 / 24 products fetched". */
155
+ count?: {
156
+ done: number;
157
+ total?: number;
158
+ };
159
+ previews?: PhaseProgressPreview[];
160
+ timestamp: number;
161
+ }
162
+ export type TraceEvent = {
163
+ /**
164
+ * Synchronous server-side ack fired the moment a prompt-signal lands
165
+ * in the AgentSession mailbox — BEFORE any LLM call, tool dispatch,
166
+ * or agent phase. Carries the turnId that subsequent events for
167
+ * the same turn stamp, so the client can correlate ack → first
168
+ * paint. Drives the typing indicator's instant-on UX (TTFT → ~RTT).
169
+ */
170
+ type: 'agent_ack';
171
+ turnId: string;
172
+ sessionId: string;
173
+ /** The client-minted `messageId` of the prompt this ack answers.
174
+ * The client pairs ack→submit by THIS exact identity — never by
175
+ * FIFO counting, which a ghost submit (its ack lost across a
176
+ * server restart / reconnect) poisons: the next real turn's ack
177
+ * gets consumed on the ghost's behalf and the real turn's prose
178
+ * is dropped as stale while its layout still paints. Absent on
179
+ * prompts that carried no messageId (legacy / synthetic). */
180
+ messageId?: string;
181
+ ts: number;
182
+ } | {
183
+ /**
184
+ * A server restart orphaned an in-flight turn (the process holding the
185
+ * live LLM stream died before the turn committed). On the client's
186
+ * reconnect the rebuilt actor claims the persisted pending-turn slot,
187
+ * emits this frame, and RE-RUNS the original prompt as a fresh turn.
188
+ * `turnId` is the DEAD turn's id — the client discards that turn's
189
+ * partial stream output (prose/reasoning buffers) so the re-run's full
190
+ * answer doesn't append after a half-finished one. The re-run's own
191
+ * `agent_ack` (echoing the same client `messageId`) follows immediately.
192
+ */
193
+ type: 'turn_restarted';
194
+ turnId: string;
195
+ /** Client-minted messageId of the prompt being re-run. */
196
+ messageId?: string;
197
+ } | {
198
+ type: 'trace_start';
199
+ turnId?: string;
200
+ timestamp: number;
201
+ info: TraceStartInfo;
202
+ userPrompt?: string;
203
+ triggers?: InteractionSignal[];
204
+ kind?: 'interact' | 'prefetch' | 'extend';
205
+ } | {
206
+ type: 'system_prompt';
207
+ turnId?: string;
208
+ snapshot: SystemPromptSnapshot;
209
+ } | {
210
+ type: 'step_start';
211
+ step: StepName;
212
+ timestamp: number;
213
+ config?: StepConfig;
214
+ input?: string;
215
+ } | {
216
+ type: 'step_done';
217
+ step: StepName;
218
+ duration_ms: number;
219
+ summary?: string;
220
+ output?: string;
221
+ meta?: {
222
+ model?: string;
223
+ input_tokens?: number;
224
+ output_tokens?: number;
225
+ /** Actual, post-provider-clamp temperature this call ran with (e.g.
226
+ * Anthropic clamps the recipe's [0,2]-range value to ≤1) — can
227
+ * legitimately differ between `phase_a`/`phase_b` when they run on
228
+ * different-provider models. See `maxTokens` below for why this lives
229
+ * on `step_done` rather than only the parent's `step_start.config`. */
230
+ temperature?: number;
231
+ /** Actual max-output-tokens this call ran with. `phase_a_step_N` /
232
+ * `phase_b_step_N` sub-spans have no `step_start` of their own (they
233
+ * report via `onStepFinish` only), so the parent `stream_response`
234
+ * span's `config.maxTokens` can't tell you what EACH call actually
235
+ * used — this does. */
236
+ maxTokens?: number;
237
+ /** Resolved thinking tier this specific call ran with — see
238
+ * `StepConfig.thinking`. Carried here too since `phase_a_step_N` /
239
+ * `phase_b_step_N` sub-spans have no `step_start` of their own
240
+ * (they report via `onStepFinish` only) and so no `config` field. */
241
+ thinking?: string;
242
+ /** Provider finish reason for this specific model call ('stop',
243
+ * 'tool-calls', …). The compose call must end 'stop' — a final step
244
+ * ending 'tool-calls' is the blank-canvas underproduction regression
245
+ * (architecture-invariants §I.1). Structured here so trace consumers
246
+ * (eval controls check, inspectors) never parse the `summary` string. */
247
+ finishReason?: string;
248
+ /** Number of tool calls this specific step fired. The compose call is
249
+ * tool-free by construction, so its step MUST carry 0 — same
250
+ * consumers, same no-summary-parsing rationale as `finishReason`. */
251
+ toolCallCount?: number;
252
+ /** The turn's full trusted entity pool, carried on the
253
+ * `entity_ref_validation` step_done. The session accumulates tool
254
+ * results across prefetch/cache/turns, so the pool is a superset of
255
+ * anything wire events expose (measured 167 trusted vs 17
256
+ * wire-visible on a live extend, 2026-07-24) — without this, an
257
+ * auditor cannot distinguish legitimate reuse of session-held
258
+ * results from an invented reference. `title` rides along when the
259
+ * session entity registry knows it, so identity claims about
260
+ * pool-sourced members stay verifiable too. Tracker-only. */
261
+ entityPool?: Array<{
262
+ id: string;
263
+ title?: string;
264
+ }>;
265
+ /** Marks this span's `input_tokens` / `output_tokens` / `promptCache`
266
+ * as the AUTHORITATIVE total for ONE generation — a `streamText` call
267
+ * and every step inside it — and therefore the token accumulators'
268
+ * only source. Set it on a span that owns a whole model call
269
+ * (`stream_response`, `chip_gen`); leave it off a leaf `*_step_N`
270
+ * span, whose usage is per-step detail for the inspector.
271
+ *
272
+ * Without the gate the accumulators summed BOTH the leaf steps and
273
+ * the roll-up, and the AI SDK's `result.usage` is documented as "the
274
+ * token usage of the LAST step" — so the terminal call was counted
275
+ * twice here and a third time off the `done` event. Measured on
276
+ * babysense prod 2026-09-03: a 95,887-token turn (48,169 + 47,718)
277
+ * persisted as 221,689, and `cache_read_tokens` — read only off the
278
+ * roll-up — showed 18% cache coverage where the real figure was 86%.
279
+ * Roll-up spans must therefore report `result.totalUsage`, not
280
+ * `result.usage`. */
281
+ usage_total?: boolean;
282
+ promptCache?: {
283
+ enabled: boolean;
284
+ status: 'hit' | 'write' | 'miss' | 'disabled';
285
+ reason?: string;
286
+ cacheReadTokens?: number;
287
+ cacheWriteTokens?: number;
288
+ staticPromptChars?: number;
289
+ };
290
+ };
291
+ } | {
292
+ type: 'tool_call';
293
+ /** Owning turn. Presence builds live "what the agent is reading"
294
+ * surfaces from these events, so a WS-replayed historical call
295
+ * (resubscribe replays the buffer) must be distinguishable from a
296
+ * live one — without it the client shows a phantom "still
297
+ * searching" deck for a turn that finished long ago. */
298
+ turnId?: string;
299
+ tool: string;
300
+ status: 'running' | 'done' | 'error';
301
+ /** SDK-assigned call id. Required for matching `running` → `done`
302
+ * pairs across parallel calls of the same tool (e.g. two
303
+ * `search_catalog` queries fired in one phase). Without it, the
304
+ * tracker keys by tool name and silently merges concurrent calls
305
+ * into one span. */
306
+ toolCallId?: string;
307
+ duration_ms?: number;
308
+ /** Tool params as the LLM (or pre-decoder) chose them — the QUERY. */
309
+ input?: Record<string, unknown>;
310
+ /** Truncated stringified output for compact display (≤8KB). */
311
+ output_summary?: string;
312
+ /** Full tool result, untruncated — for the inspector's debug view. */
313
+ output?: unknown;
314
+ /** The exact upstream endpoint the tool hit (e.g. Shopify MCP URL).
315
+ * Omitted for tools whose execute path doesn't make a remote call. */
316
+ endpoint?: string;
317
+ /** Error message for `status: 'error'` (kept off `output_summary`). */
318
+ error?: string;
319
+ /**
320
+ * The entity kind this tool returns, copied verbatim from its declared
321
+ * `resultShape.entityKind` (§III.1) — `'product'`, `'collection'`,
322
+ * `'article'`, `'policy'`, or any kind a vertical ships.
323
+ *
324
+ * Exists so presence can show WHAT the agent is reading without the
325
+ * client holding a tool-name allowlist. That allowlist
326
+ * (`SCANNING_TOOL = 'search_catalog'`) is exactly why every lookup other
327
+ * than product search was invisible. Purely descriptive and
328
+ * open-vocabulary: infra never branches on its value, it only forwards
329
+ * it to a renderer registered for that kind.
330
+ *
331
+ * Absent for tools that declare no `resultShape` — they return no
332
+ * entities and contribute nothing to the sift.
333
+ */
334
+ resultKind?: string;
335
+ } | {
336
+ type: 'response_text';
337
+ turnId?: string;
338
+ text: string;
339
+ } | {
340
+ type: 'response_text_delta';
341
+ turnId?: string;
342
+ text: string;
343
+ }
344
+ /**
345
+ * Visitor-facing reasoning beat. Despite living in the TraceEvent
346
+ * union (the SDK's universal wire transport), this is NOT for the
347
+ * admin inspector — the client routes it directly to the per-turn
348
+ * Conversation state and surfaces it via `useReasoning()`. The
349
+ * inspector ignores it.
350
+ *
351
+ * Live "what I'm thinking about right now" surface — short text the
352
+ * visitor reads while the canvas hasn't yet painted the answer.
353
+ *
354
+ * `id` is unique per beat — clients dedupe/replace by it (e.g. an
355
+ * agent that updates a beat mid-stream reuses the same id).
356
+ *
357
+ * `text` is the visitor-facing string — required, always shown.
358
+ *
359
+ * `data` is a FREE-FORM payload. Brand UI inspects what it
360
+ * understands. SDK ships no opinion on the shape; new use cases
361
+ * (refs/previews, context chips, anything) drop in without a
362
+ * schema change. Common conventions (NOT contract, can evolve):
363
+ * - `data.refs: Array<{kind, id, hint?}>` — entities being
364
+ * considered (renders as inline thumbnails when present).
365
+ * - `data.context: {…}` — structured signals the agent inferred
366
+ * or extracted (season, occasion, budget, etc.).
367
+ * - `data.tone: string` — brand can color/style by it.
368
+ */
369
+ | {
370
+ type: 'reasoning_update';
371
+ turnId?: string;
372
+ id: string;
373
+ text: string;
374
+ data?: Record<string, unknown>;
375
+ } | {
376
+ type: 'reasoning_delta';
377
+ turnId?: string;
378
+ text: string;
379
+ step?: StepName;
380
+ } | {
381
+ type: 'reasoning_text';
382
+ turnId?: string;
383
+ text: string;
384
+ step?: StepName;
385
+ } | {
386
+ type: 'layout_patch';
387
+ turnId?: string;
388
+ epoch?: number;
389
+ rev?: number;
390
+ authoritative?: boolean;
391
+ patches: JsonPatchOp[];
392
+ layout: Spec;
393
+ } | {
394
+ type: 'layout_committed';
395
+ turnId?: string;
396
+ epoch?: number;
397
+ rev?: number;
398
+ authoritative?: boolean;
399
+ opCount?: number;
400
+ layout: Spec;
401
+ } | {
402
+ type: 'layout_patch_op';
403
+ turnId?: string;
404
+ epoch?: number;
405
+ rev?: number;
406
+ patch: JsonPatchOp;
407
+ index: number;
408
+ focus?: boolean;
409
+ } | {
410
+ type: 'layout_patch_partial';
411
+ patch: Partial<JsonPatchOp>;
412
+ index: number;
413
+ } | {
414
+ type: 'layout_partial';
415
+ layout: Partial<Spec>;
416
+ } | PhaseProgress | {
417
+ type: 'signal';
418
+ signal: AgentSignal;
419
+ direction?: 'in' | 'out';
420
+ causedBy?: string;
421
+ } | {
422
+ type: 'main_done';
423
+ turnId?: string;
424
+ timing: TimingInfo;
425
+ usage: UsageInfo;
426
+ toolCalls: ToolCall[];
427
+ model: string;
428
+ diagnostics: TraceDiagnostic[];
429
+ } | {
430
+ type: 'done';
431
+ turnId?: string;
432
+ timing: TimingInfo;
433
+ usage: UsageInfo;
434
+ toolCalls: ToolCall[];
435
+ model: string;
436
+ diagnostics: TraceDiagnostic[];
437
+ } | {
438
+ type: 'error';
439
+ turnId?: string;
440
+ message: string;
441
+ step?: string;
442
+ } | {
443
+ type: 'diagnostic';
444
+ diagnostic: TraceDiagnostic;
445
+ } | {
446
+ type: 'trace_saved';
447
+ turnId?: string;
448
+ runId: string;
449
+ };
450
+ export type EmitFn = (event: TraceEvent) => void;