@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,109 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A single menu entry. Agentic by design: clicking dispatches an
4
+ * AgentSignal back through the FourtySession (no `href`, no router-push).
5
+ *
6
+ * `bottomLink` reuses the same shape because it's just another nav target.
7
+ */
8
+ export declare const ShellMenuItemSchema: z.ZodObject<{
9
+ label: z.ZodString;
10
+ action: z.ZodObject<{
11
+ id: z.ZodOptional<z.ZodString>;
12
+ label: z.ZodOptional<z.ZodString>;
13
+ type: z.ZodString;
14
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15
+ icon: z.ZodOptional<z.ZodString>;
16
+ expectedTool: z.ZodOptional<z.ZodObject<{
17
+ name: z.ZodString;
18
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ name: string;
21
+ args: Record<string, unknown>;
22
+ }, {
23
+ name: string;
24
+ args: Record<string, unknown>;
25
+ }>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ type: string;
28
+ payload?: Record<string, unknown> | undefined;
29
+ id?: string | undefined;
30
+ label?: string | undefined;
31
+ icon?: string | undefined;
32
+ expectedTool?: {
33
+ name: string;
34
+ args: Record<string, unknown>;
35
+ } | undefined;
36
+ }, {
37
+ type: string;
38
+ payload?: Record<string, unknown> | undefined;
39
+ id?: string | undefined;
40
+ label?: string | undefined;
41
+ icon?: string | undefined;
42
+ expectedTool?: {
43
+ name: string;
44
+ args: Record<string, unknown>;
45
+ } | undefined;
46
+ }>;
47
+ /** Optional secondary label shown beside the main label (e.g. "→"). */
48
+ hint: z.ZodOptional<z.ZodString>;
49
+ /** Optional icon hint for renderers that show menu icons. */
50
+ icon: z.ZodOptional<z.ZodString>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ label: string;
53
+ action: {
54
+ type: string;
55
+ payload?: Record<string, unknown> | undefined;
56
+ id?: string | undefined;
57
+ label?: string | undefined;
58
+ icon?: string | undefined;
59
+ expectedTool?: {
60
+ name: string;
61
+ args: Record<string, unknown>;
62
+ } | undefined;
63
+ };
64
+ icon?: string | undefined;
65
+ hint?: string | undefined;
66
+ }, {
67
+ label: string;
68
+ action: {
69
+ type: string;
70
+ payload?: Record<string, unknown> | undefined;
71
+ id?: string | undefined;
72
+ label?: string | undefined;
73
+ icon?: string | undefined;
74
+ expectedTool?: {
75
+ name: string;
76
+ args: Record<string, unknown>;
77
+ } | undefined;
78
+ };
79
+ icon?: string | undefined;
80
+ hint?: string | undefined;
81
+ }>;
82
+ export type ShellMenuItem = z.infer<typeof ShellMenuItemSchema>;
83
+ /**
84
+ * Brand chrome surrounding the agent canvas. The contract is intentionally
85
+ * **open** — the SDK transports an arbitrary JSON object from space config
86
+ * to the brand shell. Each brand defines its own typed shape (with its own
87
+ * zod schema) on top and validates at the read site.
88
+ *
89
+ * Owned by the **space** (seeded from `space.config.shell`), persisted on
90
+ * the session as a peer of `layout`, and only mutated by the agent through
91
+ * an explicit `shell_patch` event. Default agent turns never touch it.
92
+ *
93
+ * Why not a fixed schema: each brand's chrome differs (drawer-style menus
94
+ * vs. horizontal nav-rail with mega-menus, announcement bars, footers,
95
+ * composer placeholders, brand-specific surfaces). Pinning fields in
96
+ * contracts forces every brand into the same mold. Brands declare their
97
+ * own `SpaceShellConfigSchema` and pass it to `parseSpaceShell()` at the
98
+ * boundary.
99
+ */
100
+ export declare const ShellConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
101
+ export type ShellConfig = z.infer<typeof ShellConfigSchema>;
102
+ /**
103
+ * Pre-init placeholder shell — used by stores that need a non-null shell
104
+ * at construction time (Thread, FourtyProvider seed effect) before
105
+ * the session GET resolves with the real `space.config.shell`. Lives here
106
+ * so callers don't keep re-defining their own version with subtly
107
+ * different field shapes.
108
+ */
109
+ export declare const EMPTY_SHELL: ShellConfig;
@@ -0,0 +1,539 @@
1
+ /**
2
+ * Agent signals — the generic typed-event channel the agent emits
3
+ * client-side (chips, composer state, cart, navigation, …), plus the
4
+ * signal manifest and the legacy suggestion-action surface.
5
+ */
6
+ import { z } from 'zod';
7
+ /**
8
+ * Generic typed signal the agent emits client-side. The host runtime looks
9
+ * up `type` in its handler registry and invokes the handler with `payload`.
10
+ *
11
+ * Signals are the universal channel for every agent-driven side effect that
12
+ * isn't a layout patch — text streaming, chip rendering, composer state,
13
+ * theme changes, audio, navigation, cart mutations, custom brand verbs.
14
+ *
15
+ * Built-in handlers cover `message` (→ sendMessage) and `navigate`
16
+ * (→ window.location). Apps register the rest (`text.delta`, `chip.show`,
17
+ * `cart.add`, `composer.placeholder.set`, …) on `FourtyProvider.handlers`.
18
+ *
19
+ * `SuggestionAction` is the legacy alias kept for source compat — same shape,
20
+ * same dispatch channel. New code should use `AgentSignal`.
21
+ */
22
+ /**
23
+ * Generic tool-call descriptor — `{name, args}` pair the agent uses to
24
+ * speak about a tool call without depending on any platform vocabulary.
25
+ *
26
+ * Used in two places today:
27
+ * - `AgentSignal.expectedTool` — chip-gen attaches its prediction of
28
+ * "what tool would fire if the visitor taps this chip" so the warmer
29
+ * can pre-execute it and the cache key matches at chip-tap time.
30
+ * - Intent-extraction hint — when a chip-tap message round-trips to
31
+ * `/interact`, the SDK forwards the same descriptor so Phase 1 can
32
+ * skip the LLM extraction and use the predicted call directly.
33
+ */
34
+ export interface ToolCallHint {
35
+ name: string;
36
+ args: Record<string, unknown>;
37
+ }
38
+ export declare const ToolCallHintSchema: z.ZodObject<{
39
+ name: z.ZodString;
40
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ name: string;
43
+ args: Record<string, unknown>;
44
+ }, {
45
+ name: string;
46
+ args: Record<string, unknown>;
47
+ }>;
48
+ export interface AgentSignal {
49
+ /** Stable id for reconciliation when the same signal re-emits. Optional for
50
+ * one-shot signals; required for chip-style surfaces where the handler
51
+ * needs to dedupe or update an existing render. */
52
+ id?: string;
53
+ /** Optional human-readable label — present on chip-style signals
54
+ * (`chip.show`, `cart.add`) and component-embedded CTAs. */
55
+ label?: string;
56
+ /** Signal type — looked up in the host's handler registry. */
57
+ type: string;
58
+ /** Handler-specific payload. Schema validated against the signal manifest. */
59
+ payload: Record<string, unknown>;
60
+ /** Optional icon hint for renderers that show the signal in UI. */
61
+ icon?: string;
62
+ /** Chip-gen's prediction of which tool call this signal would trigger if
63
+ * the visitor taps it. Used by the chip warmer to pre-execute the tool
64
+ * and warm the per-session cache, so the chip-tap turn is instant.
65
+ * Set on `message`-type chips that carry a search-shaped payload;
66
+ * omitted on deterministic chips (`navigate`, `wishlist.toggle`)
67
+ * whose handler runs client-side without a tool call.
68
+ *
69
+ * Round-trips: the SDK forwards `expectedTool` back to `/interact`
70
+ * on chip click so Phase 1 can skip intent extraction and the cache
71
+ * key matches the warmer's write. */
72
+ expectedTool?: ToolCallHint;
73
+ }
74
+ /**
75
+ * Legacy alias — `SuggestionAction` is the original chip-only shape. Today
76
+ * all signals share this shape, so keeping the alias avoids a breaking
77
+ * rename across the codebase. New code should reference `AgentSignal`.
78
+ */
79
+ export type SuggestionAction = AgentSignal & {
80
+ id: string;
81
+ label: string;
82
+ };
83
+ /**
84
+ * Zod schema mirror of `AgentSignal` / `SuggestionAction`. Used in two places:
85
+ * 1. The runtime dispatcher validates inbound signals against this shape.
86
+ * 2. Components whose props embed an action (CTA buttons in HeroBanner,
87
+ * BrandBanner, AnnouncementBar, …) reuse this schema so the catalog
88
+ * prompt documents the exact same shape the dispatcher expects.
89
+ *
90
+ * `id`/`label`/`payload` are optional here — chip-style usages always set
91
+ * them, but generic signals (`composer.placeholder.set`, `theme.set`) often
92
+ * have no human-readable label, and component-embedded CTAs let the runtime
93
+ * synthesize `id` from a hash of `label+type` and default `payload` to
94
+ * `{text: label}` for `message` signals.
95
+ */
96
+ export declare const AgentSignalSchema: z.ZodObject<{
97
+ id: z.ZodOptional<z.ZodString>;
98
+ label: z.ZodOptional<z.ZodString>;
99
+ type: z.ZodString;
100
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
+ icon: z.ZodOptional<z.ZodString>;
102
+ expectedTool: z.ZodOptional<z.ZodObject<{
103
+ name: z.ZodString;
104
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ name: string;
107
+ args: Record<string, unknown>;
108
+ }, {
109
+ name: string;
110
+ args: Record<string, unknown>;
111
+ }>>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ type: string;
114
+ payload?: Record<string, unknown> | undefined;
115
+ id?: string | undefined;
116
+ label?: string | undefined;
117
+ icon?: string | undefined;
118
+ expectedTool?: {
119
+ name: string;
120
+ args: Record<string, unknown>;
121
+ } | undefined;
122
+ }, {
123
+ type: string;
124
+ payload?: Record<string, unknown> | undefined;
125
+ id?: string | undefined;
126
+ label?: string | undefined;
127
+ icon?: string | undefined;
128
+ expectedTool?: {
129
+ name: string;
130
+ args: Record<string, unknown>;
131
+ } | undefined;
132
+ }>;
133
+ /**
134
+ * Longest prose a VISITOR may send in one signal.
135
+ *
136
+ * Single source of truth for the cap. It was previously inlined as
137
+ * `z.string().min(1).max(2000)` at two REST sites and absent entirely on the
138
+ * WebSocket — which is the PRIMARY path — so the documented limit was
139
+ * unenforced where it mattered: every prompt becomes an LLM call whose input
140
+ * cost scales with this number.
141
+ */
142
+ export declare const MAX_VISITOR_PROMPT_CHARS = 2000;
143
+ /**
144
+ * An inbound `InteractionSignal` off the wire.
145
+ *
146
+ * The session WebSocket used to accept `JSON.parse(raw) as InteractionSignal`
147
+ * after checking only that `type` was a string — an `as` cast standing in for
148
+ * validation (banned by CLAUDE.md) on the one surface a visitor can write to
149
+ * directly. Anything the parse produced went straight into the actor mailbox,
150
+ * so `payload.text` had no length bound on the path that actually carries
151
+ * prompts.
152
+ *
153
+ * `type` stays an open string (`SignalType` is deliberately open so a brand can
154
+ * introduce its own verbs) but is length-bounded so it cannot be used to smuggle
155
+ * a payload. `payload.text` is capped when present, and unknown payload keys are
156
+ * preserved — per-verb payload shapes are validated by their handlers, not here.
157
+ */
158
+ export declare const InteractionSignalSchema: z.ZodObject<{
159
+ type: z.ZodString;
160
+ timestamp: z.ZodOptional<z.ZodNumber>;
161
+ payload: z.ZodOptional<z.ZodObject<{
162
+ text: z.ZodOptional<z.ZodString>;
163
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
164
+ text: z.ZodOptional<z.ZodString>;
165
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
166
+ text: z.ZodOptional<z.ZodString>;
167
+ }, z.ZodUnknown, "strip">>>;
168
+ causedBy: z.ZodOptional<z.ZodString>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ type: string;
171
+ payload?: z.objectOutputType<{
172
+ text: z.ZodOptional<z.ZodString>;
173
+ }, z.ZodUnknown, "strip"> | undefined;
174
+ timestamp?: number | undefined;
175
+ causedBy?: string | undefined;
176
+ }, {
177
+ type: string;
178
+ payload?: z.objectInputType<{
179
+ text: z.ZodOptional<z.ZodString>;
180
+ }, z.ZodUnknown, "strip"> | undefined;
181
+ timestamp?: number | undefined;
182
+ causedBy?: string | undefined;
183
+ }>;
184
+ export type InteractionSignalInput = z.infer<typeof InteractionSignalSchema>;
185
+ /** Legacy alias for `AgentSignalSchema` — same shape, same channel. */
186
+ export declare const SuggestionActionSchema: z.ZodObject<{
187
+ id: z.ZodOptional<z.ZodString>;
188
+ label: z.ZodOptional<z.ZodString>;
189
+ type: z.ZodString;
190
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
191
+ icon: z.ZodOptional<z.ZodString>;
192
+ expectedTool: z.ZodOptional<z.ZodObject<{
193
+ name: z.ZodString;
194
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ name: string;
197
+ args: Record<string, unknown>;
198
+ }, {
199
+ name: string;
200
+ args: Record<string, unknown>;
201
+ }>>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ type: string;
204
+ payload?: Record<string, unknown> | undefined;
205
+ id?: string | undefined;
206
+ label?: string | undefined;
207
+ icon?: string | undefined;
208
+ expectedTool?: {
209
+ name: string;
210
+ args: Record<string, unknown>;
211
+ } | undefined;
212
+ }, {
213
+ type: string;
214
+ payload?: Record<string, unknown> | undefined;
215
+ id?: string | undefined;
216
+ label?: string | undefined;
217
+ icon?: string | undefined;
218
+ expectedTool?: {
219
+ name: string;
220
+ args: Record<string, unknown>;
221
+ } | undefined;
222
+ }>;
223
+ export type AgentSignalInput = z.infer<typeof AgentSignalSchema>;
224
+ /** Legacy alias. */
225
+ export type SuggestionActionInput = AgentSignalInput;
226
+ /**
227
+ * The contract for ONE action a space wires — published by the brand/host (or
228
+ * a recipe). Same role as a tool manifest, but for client-side actions: tells
229
+ * the LLM what actions exist, when to use each, and what payload each handler
230
+ * expects.
231
+ *
232
+ * The dispatcher validates inbound signals against this manifest; unknown or
233
+ * malformed ones are rejected with a warning. This is what gives brands
234
+ * sovereign control over what the agent can affect — only actions listed in
235
+ * the manifest are reachable, and only with payloads that match their schema.
236
+ */
237
+ export interface ActionDefinition {
238
+ /** Action verb. Hierarchical dotted names recommended (`text.delta`,
239
+ * `cart.add`, `save.add`). The capability token is `action:<type>`. */
240
+ type: string;
241
+ /** When the agent should emit this action. Used by the LLM prompt. */
242
+ description: string;
243
+ /** Optional Zod schema for `payload`. When present, the dispatcher
244
+ * validates payloads at boundary; rejected payloads emit a diagnostic. */
245
+ payloadSchema?: z.ZodTypeAny;
246
+ /** Marks actions that stream (rapid repeats with accumulation semantics,
247
+ * e.g. `text.delta`). Tells the SDK to debounce/batch and tells the LLM
248
+ * the cadence is allowed. */
249
+ streaming?: boolean;
250
+ /**
251
+ * How this action's real-world effect is CONFIRMED. An action tool only
252
+ * dispatches a client signal — the effect (a cart write, a wishlist
253
+ * toggle) happens client-side and is observable solely through the
254
+ * client's `<namespace>.snapshot` live-state reports. When declared, the
255
+ * action tool waits (bounded) for a fresh post-dispatch snapshot and
256
+ * returns real evidence instead of an evidence-free `{dispatched}` ack —
257
+ * closing the "narrated an add that never landed" honesty gap. Absent →
258
+ * fire-and-forget (suits pure-UI verbs with no observable state).
259
+ */
260
+ confirm?: ActionConfirmation;
261
+ /**
262
+ * PRECONDITION on the client's CURRENT state — return a refusal reason to
263
+ * stop the dispatch, or `undefined` to allow it.
264
+ *
265
+ * The mirror of `confirm`: that judges evidence produced AFTER the write,
266
+ * this judges what is already true BEFORE it. Same ownership rule — the
267
+ * verb's owner supplies the pure function, core never learns what "cart"
268
+ * means (§VIII).
269
+ *
270
+ * It exists because some preconditions cannot be enforced by asking nicely.
271
+ * `cart.add`'s description already carried a paragraph telling the agent not
272
+ * to re-add a product the visitor's live cart already holds ("that silently
273
+ * doubles their quantity"); the eval harness caught it doing exactly that,
274
+ * twice, in one run. A rule the model can decline to follow is not a rule.
275
+ */
276
+ guard?: (payload: Record<string, unknown>, snapshot: Record<string, unknown>, entities: ActionGuardEntities) => string | undefined;
277
+ }
278
+ /**
279
+ * The ENTITY facts a precondition may consult, beside the client's live state.
280
+ *
281
+ * A guard judges what is already true — and some of that is true of the entities
282
+ * the payload names, not of the cart. `cart.add` cannot tell that a stated
283
+ * "size 9" is meaningless for a handbag, nor that a one-size frame was never a
284
+ * candidate for it, without reading those products' own reported option axes.
285
+ *
286
+ * Same ownership rule as the rest of the verb contract (§VIII): this hands over
287
+ * the OPEN facet bag (`EntityRegistryEntry.meta`) and the verb's owner
288
+ * interprets its own vertical's facets — core never learns what an option axis
289
+ * is. Facts are best-effort by construction (a session sees what its tools
290
+ * returned), so a guard treats an absent bag as no evidence and allows.
291
+ */
292
+ export interface ActionGuardEntities {
293
+ /** Per-entity facets for an id the session has seen; undefined when the id is
294
+ * unknown or carried none. */
295
+ facets: (id: string) => Record<string, unknown> | undefined;
296
+ }
297
+ /**
298
+ * Declares which live-state namespace proves an action's effect, and how to
299
+ * read a fresh snapshot of it. Plain data + one pure function — the action
300
+ * tool stays generic; the verb's owner (platform provider / brand package)
301
+ * owns the interpretation, so core never learns what "cart" means (§VIII).
302
+ */
303
+ export interface ActionConfirmation {
304
+ /** Live-state namespace whose fresh snapshots confirm/refute this action
305
+ * (the client reports it as `<namespace>.snapshot`). */
306
+ namespace: string;
307
+ /**
308
+ * Judge one FRESH (post-dispatch) snapshot against the dispatched payload:
309
+ * - `true` — the effect is visible; the action really happened.
310
+ * - `false` — the client reported this action FAILED.
311
+ * - `undefined` — not visible yet; keep waiting for the next snapshot.
312
+ *
313
+ * `baseline` is the namespace's LAST snapshot from BEFORE the dispatch
314
+ * (absent when none was ever reported). Delta-shaped effects need it:
315
+ * adding a product that is ALREADY in the cart changes only its
316
+ * quantity, so bare presence in a fresh snapshot proves nothing — the
317
+ * resolver must compare against what was there before.
318
+ */
319
+ resolve: (payload: Record<string, unknown>, snapshot: Record<string, unknown>, baseline: Record<string, unknown> | undefined) => boolean | undefined;
320
+ /**
321
+ * Optional: extract the human-readable WHY from a snapshot that refuted
322
+ * the action (`resolve` returned `false`) — e.g. the client's recorded
323
+ * failure reason. Owned by the verb's declarer for the same reason
324
+ * `resolve` is: the snapshot's shape is the namespace owner's contract,
325
+ * and core never learns it (§VIII). Absent → the action tool reports a
326
+ * generic "the client reported this action failed".
327
+ */
328
+ failureReason?: (payload: Record<string, unknown>, snapshot: Record<string, unknown>) => string | undefined;
329
+ }
330
+ /** The set of actions a space wires — the agent's emittable vocabulary. */
331
+ export type ActionManifest = ActionDefinition[];
332
+ interface SuggestionCardsData {
333
+ type: 'suggestion_cards';
334
+ actions: SuggestionAction[];
335
+ heading?: string;
336
+ }
337
+ /** Discriminated union — future suggestion types added here */
338
+ export type SuggestionActions = SuggestionCardsData;
339
+ /** Boundary validator for inbound suggestion envelopes (REST GET + WS
340
+ * `suggestions_snapshot`). Mirrors the `SuggestionCardsData` shape so the
341
+ * type and the schema stay in lockstep. */
342
+ export declare const SuggestionActionsSchema: z.ZodObject<{
343
+ type: z.ZodLiteral<"suggestion_cards">;
344
+ actions: z.ZodArray<z.ZodObject<{
345
+ id: z.ZodString;
346
+ label: z.ZodString;
347
+ type: z.ZodString;
348
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
349
+ icon: z.ZodOptional<z.ZodString>;
350
+ expectedTool: z.ZodOptional<z.ZodObject<{
351
+ name: z.ZodString;
352
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ name: string;
355
+ args: Record<string, unknown>;
356
+ }, {
357
+ name: string;
358
+ args: Record<string, unknown>;
359
+ }>>;
360
+ }, "strip", z.ZodTypeAny, {
361
+ type: string;
362
+ payload: Record<string, unknown>;
363
+ id: string;
364
+ label: string;
365
+ icon?: string | undefined;
366
+ expectedTool?: {
367
+ name: string;
368
+ args: Record<string, unknown>;
369
+ } | undefined;
370
+ }, {
371
+ type: string;
372
+ payload: Record<string, unknown>;
373
+ id: string;
374
+ label: string;
375
+ icon?: string | undefined;
376
+ expectedTool?: {
377
+ name: string;
378
+ args: Record<string, unknown>;
379
+ } | undefined;
380
+ }>, "many">;
381
+ heading: z.ZodOptional<z.ZodString>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ type: "suggestion_cards";
384
+ actions: {
385
+ type: string;
386
+ payload: Record<string, unknown>;
387
+ id: string;
388
+ label: string;
389
+ icon?: string | undefined;
390
+ expectedTool?: {
391
+ name: string;
392
+ args: Record<string, unknown>;
393
+ } | undefined;
394
+ }[];
395
+ heading?: string | undefined;
396
+ }, {
397
+ type: "suggestion_cards";
398
+ actions: {
399
+ type: string;
400
+ payload: Record<string, unknown>;
401
+ id: string;
402
+ label: string;
403
+ icon?: string | undefined;
404
+ expectedTool?: {
405
+ name: string;
406
+ args: Record<string, unknown>;
407
+ } | undefined;
408
+ }[];
409
+ heading?: string | undefined;
410
+ }>;
411
+ /**
412
+ * The patch-path prefix that makes a fence line a SIGNAL instead of a canvas
413
+ * element: `/signals/<signal.type>`, with the patch value as the payload.
414
+ *
415
+ * The model has exactly two output channels — prose outside the fence, patch
416
+ * lines inside it. There is no third "emit a signal" grammar, and adding one
417
+ * would be a second grammar to maintain (the last hand-rolled one was deleted
418
+ * in #488). So a signal rides the patch stream and the agent lifts it off at
419
+ * the classification boundary (`routeSignalPatch`), emitting it on the same
420
+ * `signal` frame the runtime already uses.
421
+ *
422
+ * Nothing here knows what any particular signal MEANS. `chip.show` is not
423
+ * special: it is one `signal.type` among the many the runtime already sends,
424
+ * and the only thing that changed is that the model can now originate one.
425
+ */
426
+ export declare const SIGNAL_PATCH_PREFIX = "/signals/";
427
+ /** Props for suggestion renderer components. */
428
+ export interface SuggestionRendererProps {
429
+ suggestions: SuggestionActions;
430
+ onAction: (action: SuggestionAction) => void;
431
+ }
432
+ /**
433
+ * `navigate` is the ONE action that moves the visitor across the canvas.
434
+ * It replaces the former `show.product` / `show.collection` / `show.layout`
435
+ * / `show.search` / `show.article` / `show.page` family — every one of
436
+ * those was a navigation to a typed destination, so they collapse into a
437
+ * single verb whose payload carries a `Page`.
438
+ *
439
+ * The `PageRouter` is the single `Page → View` resolver: the `navigate`
440
+ * handler does nothing but `canvas.goTo(payload.page)`. `home` is just
441
+ * one destination among many — `navigate({ page: { kind: 'home' } })`
442
+ * returns the visitor to the seed view.
443
+ *
444
+ * `navigate` is an in-canvas verb. It never punches the visitor out to a
445
+ * new browser tab — the agent owns the canvas.
446
+ */
447
+ export declare const NAVIGATE_SIGNAL = "navigate";
448
+ /** The single generic channel every flow's artifact rides — `payload` carries
449
+ * `{ flowId, data }`. The client keys its flow store by `flowId`. */
450
+ export declare const FLOW_OUTPUT_SIGNAL = "flow.output";
451
+ /** The one PLATFORM-reserved flow id — the agent's standing presence read (the
452
+ * notch's lead). Brand flows are namespaced (`acme.lookbook`); presence is the
453
+ * single infra-owned flow, so it carries no brand namespace. The presence
454
+ * faculty emits the held read on `flow.output{ flowId: PRESENCE_FLOW }`; the
455
+ * notch binds it via `useAgentFlow(PRESENCE_FLOW)`. Presence is not special —
456
+ * it is one flow among many on the generic bus. */
457
+ export declare const PRESENCE_FLOW = "presence.read";
458
+ /** CLIENT-owned flow id for the notch's optimistic fact overlay — a bridging
459
+ * {label,value} the visitor's OWN deliberate pick writes instantly, before
460
+ * the agent's reflective read (an LLM round-trip on `PRESENCE_FLOW`)
461
+ * confirms it. The agent never emits on this id; it exists purely so two
462
+ * independent SDK modules (the picker that writes, the notch that reads)
463
+ * share one key instead of each hardcoding the string. See
464
+ * `useOptimisticFactOverlay` / `useReconcileOptimisticFacts` in
465
+ * `@fourty/react`. */
466
+ export declare const PRESENCE_OPTIMISTIC_FACTS_FLOW = "presence.optimistic-facts";
467
+ /** The platform-reserved flow id for the VIEW-CONTINUATION's LOADING STATUS — a
468
+ * bare `{ active: boolean }` the foot of the view binds to show a calm loading
469
+ * indication WHILE the agent composes the next batch onto the canvas. The agent's
470
+ * live READ rides `PRESENCE_FLOW` (the notch keeps updating with what the agent is
471
+ * doing); THIS flow is only the section's loading flag, not a read. The
472
+ * continuation emits `flow.output{ EXTEND_FLOW, { active }}` on start + settle; the
473
+ * canvas tail binds it via `useAgentFlow(EXTEND_FLOW)`. Vertical-neutral. */
474
+ export declare const EXTEND_FLOW = "extend.status";
475
+ /** Direction's per-turn carryable-facts flow — the standing outcome +
476
+ * constraints, reshaped as `{facts:[{label,value}]}` so it rides the SAME
477
+ * generic shape the presence dossier does. Distinct from the `direction.set`
478
+ * SIGNAL (trace observability, unchanged) — this is the `flow.output`
479
+ * artifact the client-side ephemeral-facts mirror reads. */
480
+ export declare const DIRECTION_FLOW = "direction.standing";
481
+ /** Flows whose `{facts:[{label,value}]}` output is worth carrying across a
482
+ * visit boundary — the single declared list
483
+ * `mirrorEphemeralFactsToVisitorMemory` reads. A future faculty joins by
484
+ * emitting facts on its own flow id and adding it here — no other change
485
+ * needed. */
486
+ export declare const EPHEMERAL_FACT_FLOWS: readonly string[];
487
+ /**
488
+ * `FlowSpec` — a brand-declared reasoning FLOW. A brand SHIPS this as
489
+ * DATA on its source (beside `actions`/`asks`); the platform folds it into the
490
+ * ONE flow pass per space (no extra agent call) and emits the produced
491
+ * artifact on `flow.output{id}` for a brand widget to render. Pure data + a Zod
492
+ * schema — NO behavior — so the (UI, separate-repo) brand package never depends
493
+ * on `@fourty/agent`. The artifact's shape, the guidance prompt, and the widget
494
+ * that renders it are ALL the brand's; infra only carries the spec + the channel.
495
+ */
496
+ export interface FlowSpec {
497
+ /** Stable id — the `flow.output` channel a widget binds to + the key the
498
+ * faculty's output carries this slice under. Brand-namespaced
499
+ * (`acme.lookbook`) so two brands can't collide. */
500
+ id: string;
501
+ /** The artifact's Zod schema — folded into the faculty's structured output
502
+ * under `id`. The brand defines the shape; infra treats it opaquely. */
503
+ schema: z.ZodTypeAny;
504
+ /** Key of the prompt the brand ships for this flow (e.g. `lookbook/curate.md`),
505
+ * resolved against the brand's OWN prompt root and appended to the faculty
506
+ * prompt when the flow applies. Omit to rely on the schema's descriptions. */
507
+ guidancePrompt?: string;
508
+ /** Gate: include the flow only when the saved set is at least this big — the
509
+ * faculty checks it against the entities it carries. Omit = always applies. */
510
+ appliesWhen?: {
511
+ minEntities?: number;
512
+ };
513
+ }
514
+ /** @deprecated brand-facing alias — use FlowSpec. */
515
+ export type FacultyFlowSpec = FlowSpec;
516
+ /**
517
+ * The contract for ONE prompt the agent can put to the visitor — published by
518
+ * the brand/host alongside the widget that renders it. The prompt counterpart of
519
+ * `ActionDefinition`: it tells the presence faculty a raisable prompt EXISTS, the
520
+ * exact SIGNAL it emits to raise it, and WHEN to raise it. The faculty injects
521
+ * these into its prompt and only ever emits a signal the manifest declared.
522
+ *
523
+ * There is nothing special about "asks": each is just a named SIGNAL the agent
524
+ * emits, which the widget that consumes that signal type renders. §VIII: the
525
+ * brand owns its signal names + their meaning; infra never hardcodes them.
526
+ */
527
+ export interface AskDefinition {
528
+ /** The exact signal TYPE the faculty emits to raise this prompt — the widget
529
+ * that consumes this type renders it (e.g. `acme.shortlist.offer`).
530
+ * Brand-namespaced to avoid collisions, mirroring action verbs. */
531
+ signal: string;
532
+ /** When the faculty should raise it. Injected into the faculty prompt verbatim
533
+ * — write it as guidance to the agent ("offer this when …"). */
534
+ manifest: string;
535
+ }
536
+ /** The set of raisable prompts a space's widgets publish — the agent's
537
+ * raisable-signal vocabulary. */
538
+ export type AskManifest = AskDefinition[];
539
+ export {};