@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,48 @@
1
+ /**
2
+ * Inline prompt completion — the "ghost text" a composer shows ahead of
3
+ * the caret (shell / editor / browser-omnibox style), accepted with Tab
4
+ * or a click.
5
+ *
6
+ * Pure + deterministic: given the current input value and a ranked
7
+ * `candidates` corpus, it returns the first candidate that
8
+ * case-insensitively CONTINUES what the visitor has typed, and the tail
9
+ * to render as ghost text. No network, no LLM, no DOM — so it's free to
10
+ * run on every keystroke and is SSR-safe.
11
+ *
12
+ * Prefix (not fuzzy) matching is deliberate: a ghost suffix must be a
13
+ * literal continuation of the typed prefix, exactly like a shell's
14
+ * autosuggestion. Fuzzy matching belongs in a dropdown, not inline.
15
+ *
16
+ * The corpus is the caller's concern (the composer assembles it from the
17
+ * visitor's own past prompts, brand starter prompts, and the agent's
18
+ * turn-fresh placeholder examples). The hook stays form-agnostic — it
19
+ * never knows where the strings came from.
20
+ */
21
+ export interface UseInlineCompletionOptions {
22
+ /** Current (controlled) input value. */
23
+ value: string;
24
+ /** Completion corpus, highest priority first. The hook returns the
25
+ * first candidate that case-insensitively continues `value`. */
26
+ candidates: ReadonlyArray<string>;
27
+ /** Don't offer a completion until at least this many chars are typed.
28
+ * Default 2. */
29
+ minChars?: number;
30
+ /** Master switch. When false the result is inactive — used to gate on
31
+ * caret-at-end / focus from the caller. Default true. */
32
+ enabled?: boolean;
33
+ }
34
+ export interface UseInlineCompletionApi {
35
+ /** The full candidate being completed to (typed prefix + ghost), or
36
+ * '' when there is no active completion. */
37
+ completion: string;
38
+ /** The tail to render as ghost text after the caret (the completion
39
+ * with the typed prefix removed), or '' when none. */
40
+ ghost: string;
41
+ /** True iff `ghost` is non-empty and should be shown. */
42
+ active: boolean;
43
+ /** Suppress completion for the CURRENT value until the visitor edits
44
+ * the input again (e.g. on Escape). Any subsequent value change
45
+ * re-enables matching automatically. */
46
+ dismiss: () => void;
47
+ }
48
+ export declare function useInlineCompletion(opts: UseInlineCompletionOptions): UseInlineCompletionApi;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Fire `callback` every `ms` milliseconds while `active` is true.
3
+ * Cleans up automatically on unmount or when `active` flips false.
4
+ * Generic timer primitive — placeholder rotators, polling, ambient
5
+ * animations.
6
+ */
7
+ export declare function useInterval(callback: () => void, ms: number, active?: boolean): void;
@@ -0,0 +1,35 @@
1
+ import { type LegacyAnimationControls } from 'framer-motion';
2
+ type AnimationControls = LegacyAnimationControls;
3
+ export interface UseSuccessFlashOptions {
4
+ /** ms to keep `flashing` true after `trigger()`. Default 900. */
5
+ duration?: number;
6
+ /** Scale keyframes for the imperative pop. Default `[1, 1.06, 0.98, 1]`. */
7
+ scale?: number[];
8
+ /** Animation duration in seconds for the pop itself. Default 0.5. */
9
+ popDuration?: number;
10
+ }
11
+ export interface UseSuccessFlashApi {
12
+ /** True for `duration` ms after the last `trigger()` call. Toggle button
13
+ * label/color from this. Stable boolean — flips false→true→false. */
14
+ flashing: boolean;
15
+ /** Call after the underlying action dispatches. Starts an imperative
16
+ * one-shot scale animation via `controls`, sets `flashing=true`, and
17
+ * schedules the reset. Rapid calls debounce — each call clears the
18
+ * prior reset timer so the badge never glitches mid-cycle. */
19
+ trigger: () => void;
20
+ /** Pass to `<motion.button animate={controls}>`. Imperative — does NOT
21
+ * re-fire on parent re-renders, which is the whole point: optimistic
22
+ * cart updates that re-render the page won't replay the success pop. */
23
+ controls: AnimationControls;
24
+ }
25
+ /**
26
+ * Shared "operation succeeded" feedback for any motion button.
27
+ *
28
+ * The classic trap: setting `animate={isAdded ? [1, 1.06, ...] : 1}` on a
29
+ * motion.button re-fires every render because the array is a new
30
+ * reference. Optimistic state updates upstream → button visually
31
+ * "flashes" repeatedly. This hook drives the animation imperatively via
32
+ * `useAnimationControls`, so renders never re-trigger it.
33
+ */
34
+ export declare function useSuccessFlash(options?: UseSuccessFlashOptions): UseSuccessFlashApi;
35
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `useWakeLock` — hold a Screen Wake Lock while `active` is true so the device
3
+ * display never dims or sleeps.
4
+ *
5
+ * The motivating case is voice: the visitor is speaking (or waiting for the
6
+ * answer) without touching the screen, so mobile OSes fire their inactivity
7
+ * dim → lock timer mid-sentence and the canvas goes dark. A screen wake lock
8
+ * suppresses that for exactly as long as we need it.
9
+ *
10
+ * Browsers auto-release the lock whenever the page loses visibility (tab hide,
11
+ * app switch), so we re-acquire on `visibilitychange` while still active. On an
12
+ * unsupported browser (no `navigator.wakeLock`) this is a silent no-op — the
13
+ * feature degrades to the OS default, nothing throws.
14
+ */
15
+ export declare function useWakeLock(active: boolean): void;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * WHICH WINDOW A MEDIA QUERY IS ASKED OF.
3
+ *
4
+ * Every responsive decision in the library ultimately asks a `matchMedia`
5
+ * question, and `matchMedia` belongs to a WINDOW. In the ordinary case — a
6
+ * spacefront rendered on its own page — the only window there is is the right
7
+ * one, and nothing needs to say so.
8
+ *
9
+ * The case that needs to say so is a spacefront rendered INSIDE another
10
+ * application's page: the session replay in the console. There the React tree
11
+ * is portaled into an iframe so that CSS media queries resolve against the
12
+ * replayed viewport (a 390px phone), but the JavaScript still executes in the
13
+ * PARENT realm — so a bare `window.matchMedia('(max-width: 720px)')` answers
14
+ * for the reviewer's 1600px monitor, not for the phone on screen. The shell
15
+ * then draws its desktop dock over a phone-width canvas: the exact "desktop UI
16
+ * at mobile proportions" this context exists to end.
17
+ *
18
+ * `null` — the default — means "the global window", which is what every real
19
+ * spacefront wants and what every existing caller already got. Nothing changes
20
+ * for them: no provider, same behaviour, same shared listeners.
21
+ */
22
+ export declare const ViewportWindowContext: import("react").Context<Window | null>;
23
+ /**
24
+ * The window responsive hooks should question, or `null` when there is none
25
+ * that can answer — server rendering, and jsdom, which ships no `matchMedia`.
26
+ * Callers already have a documented answer for `null` (desktop, no touch,
27
+ * `false`), which is the same first-paint default they have always used.
28
+ *
29
+ * A provided window that cannot answer resolves to `null` rather than to the
30
+ * global one. Falling back would silently report the HOST's viewport for a
31
+ * subtree that explicitly said it is not the host's — a wrong answer dressed
32
+ * as a right one, which on this path means a phone replay drawn as a desktop.
33
+ */
34
+ export declare function useViewportWindow(): Window | null;
35
+ export declare function ViewportWindowProvider({ value, children, }: {
36
+ /** The window whose viewport the subtree should measure itself against. */
37
+ value: Window | null;
38
+ children: React.ReactNode;
39
+ }): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { useDictation, type UseDictationOptions, type UseDictationApi, } from './use-dictation';
2
+ export { useVoiceCapture, type UseVoiceCaptureApi, type UseVoiceCaptureOptions, type VoiceCaptureState, } from './use-voice-capture';
@@ -0,0 +1,80 @@
1
+ interface SpeechRecognitionAlternativeLike {
2
+ readonly transcript: string;
3
+ }
4
+ interface SpeechRecognitionResultLike {
5
+ readonly isFinal: boolean;
6
+ readonly length: number;
7
+ readonly [index: number]: SpeechRecognitionAlternativeLike;
8
+ }
9
+ interface SpeechRecognitionResultListLike {
10
+ readonly length: number;
11
+ readonly [index: number]: SpeechRecognitionResultLike;
12
+ }
13
+ interface SpeechRecognitionEventLike {
14
+ readonly resultIndex: number;
15
+ readonly results: SpeechRecognitionResultListLike;
16
+ }
17
+ interface SpeechRecognitionErrorEventLike {
18
+ readonly error: string;
19
+ readonly message: string;
20
+ }
21
+ interface SpeechRecognitionInstance {
22
+ continuous: boolean;
23
+ interimResults: boolean;
24
+ lang: string;
25
+ onresult: ((event: SpeechRecognitionEventLike) => void) | null;
26
+ onerror: ((event: SpeechRecognitionErrorEventLike) => void) | null;
27
+ onend: (() => void) | null;
28
+ start: () => void;
29
+ stop: () => void;
30
+ abort: () => void;
31
+ }
32
+ type SpeechRecognitionConstructor = {
33
+ new (): SpeechRecognitionInstance;
34
+ };
35
+ declare global {
36
+ var SpeechRecognition: SpeechRecognitionConstructor | undefined;
37
+ var webkitSpeechRecognition: SpeechRecognitionConstructor | undefined;
38
+ }
39
+ export interface UseDictationOptions {
40
+ /** BCP-47 language tag (e.g. `'en-US'`). When omitted, the browser's
41
+ * default recognition language is used. */
42
+ lang?: string;
43
+ /** Fired as speech is recognized. `transcript` is the FULL session
44
+ * transcript so far (committed finals + the current interim hypothesis),
45
+ * already trimmed — the consumer REPLACES the dictated span, it never
46
+ * appends cumulatively. `isFinal` is true once the latest segment has
47
+ * stabilized (no interim tail). */
48
+ onResult: (transcript: string, isFinal: boolean) => void;
49
+ }
50
+ export interface UseDictationApi {
51
+ /** True once the browser is known to support the Web Speech API. Starts
52
+ * `false` (SSR + first client render) and flips `true` after mount, so a
53
+ * trigger can mount in without a hydration mismatch. */
54
+ supported: boolean;
55
+ /** True while a recognition session is active. */
56
+ listening: boolean;
57
+ /** True once the current/most recent session ended because the visitor
58
+ * denied microphone access. Cleared at the start of the next `start()`. */
59
+ permissionDenied: boolean;
60
+ /** Begin a session. No-op when unsupported or already listening. */
61
+ start: () => void;
62
+ /** End the session. The accumulated transcript stays in the input. */
63
+ stop: () => void;
64
+ /** Start/stop flip for a single toggle button. */
65
+ toggle: () => void;
66
+ }
67
+ /**
68
+ * `useDictation` — browser-native speech-to-text over the Web Speech API.
69
+ *
70
+ * Zero-cost, no server, no API key: the engine ships with Chrome/Edge/Safari.
71
+ * Firefox has no support, so `supported` stays `false` there and the UI hides
72
+ * its trigger. The whole thing runs BEFORE the prompt is sent, so it never
73
+ * touches the agent's latency budget.
74
+ *
75
+ * Mobile quirk: iOS/Android auto-stop the recognizer after a short silence.
76
+ * `onend` restarts while the user still intends to listen, so a mid-sentence
77
+ * pause doesn't silently end the session.
78
+ */
79
+ export declare function useDictation(options: UseDictationOptions): UseDictationApi;
80
+ export {};
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Capture lifecycle. `'listening'` covers the whole active session — from the
3
+ * first `start()` through every interim/final result — until a commit or cancel
4
+ * returns it to `'idle'`. There is no separate "committing" state: the moment a
5
+ * capture commits, the agent run begins and the surrounding presence indicator
6
+ * (`useAgentPresence`) takes over the "working" affordance.
7
+ */
8
+ export type VoiceCaptureState = 'idle' | 'listening';
9
+ export interface UseVoiceCaptureOptions {
10
+ /** Called with the FINAL transcript when a capture commits — on speech
11
+ * silence (auto) or an explicit `stop()`. Never called with empty or
12
+ * whitespace-only text. The widget wires this to
13
+ * `useFourtySession().sendMessage`; the hook stays session-agnostic so the
14
+ * silence/commit logic is testable in isolation. */
15
+ onCommit: (transcript: string) => void;
16
+ /** Fired on every recognized result (interim or final) with the FULL session
17
+ * transcript so far — the same live feed `useDictation` exposes. Optional:
18
+ * the mobile voice island only needs the final `onCommit`, but a surface
19
+ * that mirrors the transcript into a visible draft (the desktop composer)
20
+ * wires this to stay in sync as the visitor speaks. */
21
+ onResult?: (transcript: string) => void;
22
+ /** Auto-commit after this many ms without a new speech result. The Web Speech
23
+ * recognizer auto-restarts on its own internal silence (see `useDictation`),
24
+ * so this timer — reset on every result — is what actually detects
25
+ * end-of-speech for a voice-first flow. Default 1500ms. */
26
+ silenceMs?: number;
27
+ /** BCP-47 language override; omit to use the visitor's browser default. */
28
+ lang?: string;
29
+ }
30
+ export interface UseVoiceCaptureApi {
31
+ /** Whether the browser exposes the Web Speech API (false on Firefox / SSR). */
32
+ supported: boolean;
33
+ /** Current capture lifecycle state. */
34
+ state: VoiceCaptureState;
35
+ /** True once the most recent session ended because the visitor denied
36
+ * microphone access. Cleared on the next `start()`. Surface this — a
37
+ * denial that resets `state` to `'idle'` with no signal reads as "I tapped
38
+ * the mic and nothing happened." */
39
+ permissionDenied: boolean;
40
+ /** Full transcript so far this session (committed finals + live interim),
41
+ * trimmed. Empty between sessions. Surface this as the island's live caption. */
42
+ transcript: string;
43
+ /** Begin a capture session. No-op when unsupported or already listening. */
44
+ start: () => void;
45
+ /** Commit what's been captured so far (fires `onCommit` when non-empty),
46
+ * then return to idle. Same path the silence timer takes. */
47
+ stop: () => void;
48
+ /** End the session WITHOUT committing — discards the transcript. */
49
+ cancel: () => void;
50
+ /** Tap handler for a single control: `start()` when idle, `stop()` (commit)
51
+ * while listening. */
52
+ toggle: () => void;
53
+ }
54
+ /**
55
+ * `useVoiceCapture` — voice-first capture built on `useDictation`.
56
+ *
57
+ * Where the composer's mic is push-to-dictate-into-a-textbox, this is the
58
+ * mobile island's voice-first loop: tap to listen, speak, and after a short
59
+ * silence the captured prompt **auto-commits** (sent through `onCommit`) with no
60
+ * extra tap. The engine is the same zero-cost browser STT — no server, no API
61
+ * key, entirely before the prompt is sent, so it never touches the agent
62
+ * latency budget. The engine is intentionally wrapped (not inlined) so a future
63
+ * realtime/TTS engine can swap in behind the same API.
64
+ */
65
+ export declare function useVoiceCapture(options: UseVoiceCaptureOptions): UseVoiceCaptureApi;
@@ -0,0 +1,43 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { PresenceFact } from '../../../../../spacestation/src/widgets/presence/index';
3
+ import type { PresenceFactArtifact } from '../../../../../spacestation/src/widgets/presence/index';
4
+ /**
5
+ * A fact as the presence surfaces render it — the frame artifact plus the
6
+ * element stream's `provenance` when the fact came from one.
7
+ *
8
+ * Defined here, beside the form contract, so the renderers and the registry
9
+ * cannot drift apart: `@fourty/ui`'s `Fact` is an alias of this.
10
+ */
11
+ export type PresenceFactRender = PresenceFact & {
12
+ provenance?: PresenceFactArtifact['provenance'];
13
+ };
14
+ export interface PresenceFactFormProps {
15
+ fact: PresenceFactRender;
16
+ /** The kind that resolved this form — a declared `scope` or a derived shape.
17
+ * Present so one registered form can serve several kinds and branch on the
18
+ * exact one it was resolved for. */
19
+ kind: string;
20
+ }
21
+ export interface PresenceFactFormDef {
22
+ /**
23
+ * Draws the fact's VALUE. That is the whole contract.
24
+ *
25
+ * A form owns the value's presentation and nothing else — not the label, not
26
+ * the dismiss control, not the entry's box. Same reason a source form owns a
27
+ * card's marks but never its footprint: the brief lays its entries out on a
28
+ * grid, and a form that could redraw the whole entry could break the panel's
29
+ * rhythm for every other entry on it. The label names the slot in one voice
30
+ * throughout; the value is where a colour, a measurement and a phrase have
31
+ * genuinely different things to show.
32
+ */
33
+ Component: ComponentType<PresenceFactFormProps>;
34
+ }
35
+ /** Register a value form for a fact kind (a declared `scope` or a derived
36
+ * shape). Last registration wins, so a brand may override a baseline kind.
37
+ * Call at startup / module load. */
38
+ export declare function registerPresenceFactForm(kind: string, def: PresenceFactFormDef): void;
39
+ /** The value form for a kind, or undefined when none is registered — the host
40
+ * decides what an unclaimed fact falls back to. */
41
+ export declare function resolvePresenceFactForm(kind: string): PresenceFactFormDef | undefined;
42
+ /** Every registered fact kind — for a debug/inspector surface. */
43
+ export declare function registeredPresenceFactForms(): string[];
@@ -0,0 +1,70 @@
1
+ import type { PresenceFactRender } from './fact-form-registry';
2
+ /** Every kind this module can derive. Not a closed set for the REGISTRY — a
3
+ * brand registers whatever kinds it likes — only what the fallback derivation
4
+ * is willing to claim. */
5
+ export declare const FACT_SHAPE: {
6
+ /** The whole value names a colour ("Navy", "Burgundy"). */
7
+ readonly color: "color";
8
+ /** The value is a bare figure ("8", "8.5", "42") — the number IS the fact. */
9
+ readonly figure: "figure";
10
+ /** A figure inside qualifying words ("under 2 inches", "$150", "size 8 wide").
11
+ * The numeral carries the meaning; the words qualify it. */
12
+ readonly measure: "measure";
13
+ /** Words. The default, and most facts are this. */
14
+ readonly plain: "plain";
15
+ };
16
+ /**
17
+ * The hex a value NAMES, or null when it does not name one.
18
+ *
19
+ * Matches the WHOLE value, never a word inside a phrase — "denim details" is not
20
+ * a colour, and sprouting a swatch on it would be the surface claiming a
21
+ * precision it does not have.
22
+ */
23
+ export declare function colorHexOf(value: string): string | null;
24
+ /**
25
+ * A numeric value split at its numeral: the qualifying words before it, the
26
+ * figure itself, and the words after.
27
+ *
28
+ * Parts rather than a formatted string, so the FORM decides the emphasis —
29
+ * "under **2** inches" is a rendering decision, and a brand is entitled to make
30
+ * it differently.
31
+ */
32
+ export interface FactFigureParts {
33
+ before: string;
34
+ figure: string;
35
+ after: string;
36
+ }
37
+ /**
38
+ * A fact's numeric parts, or `null` when its value holds no numeral — the caller
39
+ * asked the wrong question and must not be handed an empty figure to draw.
40
+ *
41
+ * ONE normalisation, and it is typography rather than judgement: A SYMBOL STAYS
42
+ * WITH THE NUMBER. "under $300" split at the numeral leaves "under $" as the
43
+ * qualifier, and a qualifier renders as a quiet word ABOUT the figure — so money
44
+ * came out as "UNDER $" beside a large "300", which is not how an amount is
45
+ * written in any language. "under" is a word and stays a word.
46
+ *
47
+ * WHAT THIS DELIBERATELY DOES NOT DO is decide what the words MEAN. "Shoe size:
48
+ * size 7" restates its own label, and whether that redundant word should be
49
+ * dropped — and whether what is left deserves a size stamp — is a BRAND's reading
50
+ * of its own vocabulary, not something shared infra gets to assert about every
51
+ * space that mounts a notch. It belongs in the registered form (see
52
+ * `@fourty/stevemadden`'s figure form), which has the whole fact and its own
53
+ * opinion about shoes.
54
+ */
55
+ export declare function factFigureParts(fact: PresenceFactRender): FactFigureParts | null;
56
+ /**
57
+ * The shape of a fact's value.
58
+ *
59
+ * Order matters and encodes precedence: a colour term is a colour; a NUMERAL
60
+ * standing alone is a figure (the number IS the fact — a size, a count); a
61
+ * numeral carrying words or a symbol is a measure; everything else is plain.
62
+ *
63
+ * A symbol keeps it a MEASURE even with nothing else around it. "$300" is a
64
+ * quantity of something, not an identifier — and the distinction is not academic:
65
+ * a brand's figure treatment is the shoebox stamp (a size, printed on a box), and
66
+ * a price in that box reads as a shoebox with money in it. `factFigureParts`
67
+ * keeps the mark attached to the number either way, so the measure form still
68
+ * renders "$300" as one thing.
69
+ */
70
+ export declare function presenceFactShape(fact: PresenceFactRender): string;
@@ -0,0 +1,28 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { AgentPresenceFrame } from '../../../../../spacestation/src/widgets/presence/index';
3
+ export interface PresenceFormProps {
4
+ /** The held frame to render. `form`/`data` are opaque to core — the
5
+ * registered (brand) component interprets them. */
6
+ frame: AgentPresenceFrame;
7
+ /** Whether the band is expanded (full) or resting (folded). The form decides
8
+ * how to honor it; a form with no folded variant ignores it. */
9
+ expanded: boolean;
10
+ }
11
+ export interface PresenceFormDef {
12
+ /** Renders the form. */
13
+ Component: ComponentType<PresenceFormProps>;
14
+ /** Optional content heights (px) the notch animates between on expand/fold.
15
+ * Omit to let the form size itself. */
16
+ expandedHeight?: number;
17
+ foldedHeight?: number;
18
+ /** Whether this form folds to a one-liner at rest (settled). Default false =
19
+ * always shown full. */
20
+ foldable?: boolean;
21
+ }
22
+ /** Register a renderer for an agent presence `form`. Last registration wins
23
+ * (a brand may override a default). Call at startup / module load. */
24
+ export declare function registerPresenceForm(form: string, def: PresenceFormDef): void;
25
+ /** The renderer for a form, or undefined when none is registered (the notch
26
+ * falls back). */
27
+ export declare function resolvePresenceForm(form: string): PresenceFormDef | undefined;
28
+ export declare function registeredPresenceForms(): string[];
@@ -0,0 +1,18 @@
1
+ import type { AgentPresenceFrame } from '../../../../../spacestation/src/widgets/presence/index';
2
+ /** Set the agent's current presence frame. The dossier is AGENT-OWNED: only the
3
+ * agent's emitted frame writes it — the client renders, never edits. Replaces the
4
+ * standing frame wholesale. A presence frame IS the `presence.read` flow's
5
+ * artifact; this routes it through the generic flow store. */
6
+ export declare function setAgentPresenceFrame(next: AgentPresenceFrame): void;
7
+ /** Clear the standing presence read. The flow store's own session-scoped clear
8
+ * wipes every flow on reset; this is the explicit per-read door. */
9
+ export declare function clearAgentPresence(): void;
10
+ /** React hook — the agent's latest presence frame for a flow (null when none
11
+ * yet). Reads the flow artifact and type-guards it to a frame. Defaults to the
12
+ * notch's `PRESENCE_FLOW`; pass another flow id (e.g. `EXTEND_FLOW`) to read a
13
+ * separate presence lane — presence is one flow among many, not a singleton. */
14
+ export declare function useAgentPresenceFrame(flowId?: string): AgentPresenceFrame | null;
15
+ /** React hook — whether the held frame was set this load (vs restored stale).
16
+ * The notch shows a held read only when it's fresh, so a persisted frame from a
17
+ * prior load is treated as stale context, not the agent's current mind. */
18
+ export declare function useAgentPresenceFresh(flowId?: string): boolean;
@@ -0,0 +1,13 @@
1
+ import type { PresenceElement } from '../../../../../spacestation/src/widgets/presence/index';
2
+ /**
3
+ * THE DURABLE HALF OF A PERSISTED ARTIFACT — what it is still allowed to claim
4
+ * after the page that produced it is gone.
5
+ *
6
+ * The rule is stated ONCE, against the lifecycle table rather than a hand-written
7
+ * kind list: an element may outlive its page exactly when it already outlives its
8
+ * turn (`retireOn: 'never'` — facts, today). A restored source card or voice line
9
+ * would be a claim about a search that is over, which is why neither is restored
10
+ * and neither can become restorable by accident — adding a kind to the `never`
11
+ * bucket is the only way in, and that is the correct place to make that decision.
12
+ */
13
+ export declare function durablePresenceElements(artifact: unknown): PresenceElement[];
@@ -0,0 +1,64 @@
1
+ import type { PresenceElement } from '../../../../../spacestation/src/widgets/presence/index';
2
+ export interface PresenceStreamState {
3
+ /** The live turn. `undefined` before any turn has started this session. */
4
+ turnId: string | undefined;
5
+ /** Every element currently held, in arrival order. */
6
+ elements: PresenceElement[];
7
+ /** Entity ids the canvas has placed during the live turn. */
8
+ materialized: ReadonlySet<string>;
9
+ }
10
+ export type PresenceStreamEvent = {
11
+ type: 'turn-start';
12
+ turnId: string;
13
+ }
14
+ /** The agent's cumulative element set for its turn. */
15
+ | {
16
+ type: 'elements';
17
+ elements: PresenceElement[];
18
+ }
19
+ /** A layout_patch_op placed these entities — they became real. */
20
+ | {
21
+ type: 'entity-materialized';
22
+ entityIds: string[];
23
+ }
24
+ /**
25
+ * A lookup came back with nothing this surface can honestly describe — it
26
+ * failed, or it returned output no record array could be read from. The card
27
+ * that was showing it as RUNNING leaves.
28
+ *
29
+ * Distinct from a `found: false` element, which is the honest miss ("I looked
30
+ * and the shelf was empty") and stays on screen. Silence is the only truthful
31
+ * output when the lookup itself produced no fact.
32
+ */
33
+ | {
34
+ type: 'source-retired';
35
+ id: string;
36
+ }
37
+ /**
38
+ * Seed the stream with the DURABLE elements a previous mount already learned
39
+ * (see `durablePresenceElements`). Dispatched once when a stream binds, and
40
+ * it is what makes the brief survive a remount or a reload.
41
+ *
42
+ * Deliberately NOT gated on `turnId`: a restored fact belongs to no live turn
43
+ * — it belongs to the SESSION, which is exactly what `retireOn: 'never'`
44
+ * means. Anything already in the stream is live and wins over its restored
45
+ * copy, so a restore can never overwrite what the agent is saying now.
46
+ */
47
+ | {
48
+ type: 'restore';
49
+ elements: PresenceElement[];
50
+ } | {
51
+ type: 'canvas-complete';
52
+ } | {
53
+ type: 'turn-settle';
54
+ } | {
55
+ type: 'fact-dismissed';
56
+ label: string;
57
+ } | {
58
+ type: 'ask-answered';
59
+ id: string;
60
+ } | {
61
+ type: 'session-reset';
62
+ };
63
+ export declare const EMPTY_PRESENCE_STREAM: PresenceStreamState;
64
+ export declare function presenceReducer(state: PresenceStreamState, event: PresenceStreamEvent): PresenceStreamState;