@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.
- package/dist/index.js +11918 -0
- package/dist/types/ecommerce/src/attribute-buckets.d.ts +79 -0
- package/dist/types/ecommerce/src/base-attributes.d.ts +42 -0
- package/dist/types/ecommerce/src/bucket-labels.d.ts +37 -0
- package/dist/types/ecommerce/src/cart-line-selections.d.ts +24 -0
- package/dist/types/ecommerce/src/commerce-schemas.d.ts +1813 -0
- package/dist/types/ecommerce/src/format-variant-value.d.ts +1 -0
- package/dist/types/ecommerce/src/index.d.ts +13 -0
- package/dist/types/ecommerce/src/locale.d.ts +31 -0
- package/dist/types/ecommerce/src/optimistic-cart-line.d.ts +38 -0
- package/dist/types/ecommerce/src/pdp-companions.d.ts +21 -0
- package/dist/types/ecommerce/src/pick-product-card-action.d.ts +38 -0
- package/dist/types/ecommerce/src/product-lookup.d.ts +34 -0
- package/dist/types/ecommerce/src/projection-spec.d.ts +38 -0
- package/dist/types/ecommerce/src/review-schemas.d.ts +425 -0
- package/dist/types/sdk/src/analytics/consent.d.ts +52 -0
- package/dist/types/sdk/src/analytics/drops.d.ts +98 -0
- package/dist/types/sdk/src/analytics/emitting-scope.d.ts +2 -0
- package/dist/types/sdk/src/analytics/index.d.ts +12 -0
- package/dist/types/sdk/src/analytics/inert-scope.d.ts +2 -0
- package/dist/types/sdk/src/analytics/notify.d.ts +41 -0
- package/dist/types/sdk/src/analytics/outbox.d.ts +118 -0
- package/dist/types/sdk/src/analytics/scope-context.d.ts +24 -0
- package/dist/types/sdk/src/analytics/scope.d.ts +149 -0
- package/dist/types/sdk/src/analytics/surface.d.ts +77 -0
- package/dist/types/sdk/src/analytics/transport.d.ts +91 -0
- package/dist/types/sdk/src/animation/index.d.ts +2 -0
- package/dist/types/sdk/src/animation/useListTransition.d.ts +16 -0
- package/dist/types/sdk/src/animation/useUpdateTransition.d.ts +16 -0
- package/dist/types/sdk/src/canvas/ElementIdContext.d.ts +13 -0
- package/dist/types/sdk/src/canvas/GenerationStyleContext.d.ts +13 -0
- package/dist/types/sdk/src/canvas/ShimmerSweep.d.ts +18 -0
- package/dist/types/sdk/src/canvas/TransitionContext.d.ts +52 -0
- package/dist/types/sdk/src/canvas/canvas-arrangement.d.ts +20 -0
- package/dist/types/sdk/src/canvas/canvas-motion-style.d.ts +18 -0
- package/dist/types/sdk/src/canvas/canvas-outlet.d.ts +14 -0
- package/dist/types/sdk/src/canvas/canvas-tail.d.ts +31 -0
- package/dist/types/sdk/src/canvas/dom-targets.d.ts +140 -0
- package/dist/types/sdk/src/canvas/generation-entrance.d.ts +26 -0
- package/dist/types/sdk/src/canvas/generation-style.d.ts +62 -0
- package/dist/types/sdk/src/canvas/index.d.ts +21 -0
- package/dist/types/sdk/src/canvas/item-motion/ItemTransitionGroup.d.ts +72 -0
- package/dist/types/sdk/src/canvas/item-motion/classify-items.d.ts +24 -0
- package/dist/types/sdk/src/canvas/item-motion/index.d.ts +5 -0
- package/dist/types/sdk/src/canvas/item-motion/plugins/wipe.d.ts +11 -0
- package/dist/types/sdk/src/canvas/item-motion/profile.d.ts +77 -0
- package/dist/types/sdk/src/canvas/item-motion/wipe.d.ts +57 -0
- package/dist/types/sdk/src/canvas/nav-direction.d.ts +22 -0
- package/dist/types/sdk/src/canvas/runtime-context.d.ts +15 -0
- package/dist/types/sdk/src/canvas/runtime-hooks.d.ts +106 -0
- package/dist/types/sdk/src/canvas/runtime-types.d.ts +183 -0
- package/dist/types/sdk/src/canvas/scroll-event-target.d.ts +21 -0
- package/dist/types/sdk/src/canvas/turn-change-anchor.d.ts +34 -0
- package/dist/types/sdk/src/canvas/turn-edit.d.ts +8 -0
- package/dist/types/sdk/src/canvas/use-canvas-actions.d.ts +41 -0
- package/dist/types/sdk/src/canvas/use-fourty-layout.d.ts +19 -0
- package/dist/types/sdk/src/catalog/CatalogContext.d.ts +7 -0
- package/dist/types/sdk/src/catalog/DebugContext.d.ts +5 -0
- package/dist/types/sdk/src/catalog/HydrationStateContext.d.ts +45 -0
- package/dist/types/sdk/src/catalog/HydratorContext.d.ts +7 -0
- package/dist/types/sdk/src/catalog/component-library.d.ts +32 -0
- package/dist/types/sdk/src/catalog/define.d.ts +149 -0
- package/dist/types/sdk/src/catalog/hydrator-registry.d.ts +91 -0
- package/dist/types/sdk/src/catalog/index.d.ts +14 -0
- package/dist/types/sdk/src/catalog/interaction-contract.d.ts +78 -0
- package/dist/types/sdk/src/catalog/normalize-components.d.ts +17 -0
- package/dist/types/sdk/src/catalog/prose-value.d.ts +22 -0
- package/dist/types/sdk/src/catalog/registration/index.d.ts +4 -0
- package/dist/types/sdk/src/catalog/registration/register-component.d.ts +35 -0
- package/dist/types/sdk/src/catalog/registration/registry.d.ts +27 -0
- package/dist/types/sdk/src/catalog/registration/types.d.ts +83 -0
- package/dist/types/sdk/src/catalog/registry.d.ts +22 -0
- package/dist/types/sdk/src/catalog/render-inline.d.ts +39 -0
- package/dist/types/sdk/src/catalog/resolve-hydrators.d.ts +27 -0
- package/dist/types/sdk/src/chat/chat-context.d.ts +40 -0
- package/dist/types/sdk/src/chat/index.d.ts +1 -0
- package/dist/types/sdk/src/client-state/index.d.ts +2 -0
- package/dist/types/sdk/src/client-state/server-store.d.ts +38 -0
- package/dist/types/sdk/src/client-state/store.d.ts +20 -0
- package/dist/types/sdk/src/commerce/commerce-context.d.ts +62 -0
- package/dist/types/sdk/src/commerce/commerce-shapes.d.ts +170 -0
- package/dist/types/sdk/src/commerce/ecommerce/agentic-overlay.d.ts +27 -0
- package/dist/types/sdk/src/commerce/ecommerce/buy-now-exit.d.ts +36 -0
- package/dist/types/sdk/src/commerce/ecommerce/cart-action-failures.d.ts +54 -0
- package/dist/types/sdk/src/commerce/ecommerce/cart-drawer-store.d.ts +18 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-reasons.d.ts +54 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-shape.d.ts +73 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-store.d.ts +39 -0
- package/dist/types/sdk/src/commerce/ecommerce/comparison-rows.d.ts +30 -0
- package/dist/types/sdk/src/commerce/ecommerce/index.d.ts +21 -0
- package/dist/types/sdk/src/commerce/ecommerce/normalize-collection.d.ts +17 -0
- package/dist/types/sdk/src/commerce/ecommerce/preselect-from-facts.d.ts +25 -0
- package/dist/types/sdk/src/commerce/ecommerce/product-filters.d.ts +40 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-buy-now.d.ts +33 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-cart-drawer.d.ts +35 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-cart-line-row.d.ts +30 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-comparison-table.d.ts +22 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-look-card.d.ts +80 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-card.d.ts +62 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-carousel-scroll.d.ts +13 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-detail.d.ts +48 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-grid-filter.d.ts +17 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-selected-variants-state.d.ts +8 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-wishlist-drawer.d.ts +34 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-option-axes.d.ts +56 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-resolution.d.ts +83 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-selection.d.ts +22 -0
- package/dist/types/sdk/src/commerce/external-navigation.d.ts +41 -0
- package/dist/types/sdk/src/commerce/index.d.ts +9 -0
- package/dist/types/sdk/src/commerce/option-selection-store.d.ts +8 -0
- package/dist/types/sdk/src/commerce/pending-variant-choice-store.d.ts +20 -0
- package/dist/types/sdk/src/commerce/variant-selection-store.d.ts +7 -0
- package/dist/types/sdk/src/content/index.d.ts +2 -0
- package/dist/types/sdk/src/content/use-faq-accordion.d.ts +11 -0
- package/dist/types/sdk/src/content/use-newsletter-form.d.ts +16 -0
- package/dist/types/sdk/src/host/Spacefront.d.ts +11 -0
- package/dist/types/sdk/src/host/engine-loader.d.ts +14 -0
- package/dist/types/sdk/src/host/host-modules.d.ts +5833 -0
- package/dist/types/sdk/src/host/index.d.ts +4 -0
- package/dist/types/sdk/src/host/types.d.ts +52 -0
- package/dist/types/sdk/src/index.d.ts +21 -0
- package/dist/types/sdk/src/interaction/haptics.d.ts +8 -0
- package/dist/types/sdk/src/interaction/index.d.ts +3 -0
- package/dist/types/sdk/src/interaction/normalize-signals.d.ts +8 -0
- package/dist/types/sdk/src/interaction/withInteractionTracking.d.ts +48 -0
- package/dist/types/sdk/src/npm.d.ts +3 -0
- package/dist/types/sdk/src/projection/ProjectionSignalBridge.d.ts +5 -0
- package/dist/types/sdk/src/projection/index.d.ts +1 -0
- package/dist/types/sdk/src/projection/preferences.d.ts +12 -0
- package/dist/types/sdk/src/projection/transform.d.ts +7 -0
- package/dist/types/sdk/src/provider/AgentAsk.d.ts +16 -0
- package/dist/types/sdk/src/provider/index.d.ts +4 -0
- package/dist/types/sdk/src/provider/providers/handler-registry.d.ts +11 -0
- package/dist/types/sdk/src/provider/use-clamp-toggle.d.ts +22 -0
- package/dist/types/sdk/src/provider/use-timed-flag.d.ts +16 -0
- package/dist/types/sdk/src/rendering/index.d.ts +1 -0
- package/dist/types/sdk/src/rendering/post-hydration.d.ts +37 -0
- package/dist/types/sdk/src/session/FourtySessionContext.d.ts +228 -0
- package/dist/types/sdk/src/session/clear-registry.d.ts +6 -0
- package/dist/types/sdk/src/session/index.d.ts +4 -0
- package/dist/types/sdk/src/session/use-action.d.ts +25 -0
- package/dist/types/sdk/src/session/visitor-locale.d.ts +2 -0
- package/dist/types/sdk/src/shared/index.d.ts +2 -0
- package/dist/types/sdk/src/shared/use-expandable.d.ts +9 -0
- package/dist/types/sdk/src/shared/use-image-hover.d.ts +13 -0
- package/dist/types/sdk/src/shell/ScrollContainerContext.d.ts +25 -0
- package/dist/types/sdk/src/shell/ShellRegistry.d.ts +25 -0
- package/dist/types/sdk/src/shell/ShellRootContext.d.ts +15 -0
- package/dist/types/sdk/src/shell/dock-persistence.d.ts +49 -0
- package/dist/types/sdk/src/shell/exclusive-overlay.d.ts +16 -0
- package/dist/types/sdk/src/shell/index.d.ts +12 -0
- package/dist/types/sdk/src/shell/thread-scroll/ThreadHeadroom.d.ts +11 -0
- package/dist/types/sdk/src/shell/thread-scroll/headroom.d.ts +4 -0
- package/dist/types/sdk/src/shell/thread-scroll/index.d.ts +6 -0
- package/dist/types/sdk/src/shell/thread-scroll/pin-turn-head.d.ts +12 -0
- package/dist/types/sdk/src/shell/thread-scroll/settle-thread-row.d.ts +23 -0
- package/dist/types/sdk/src/shell/thread-scroll/thread-geometry.d.ts +27 -0
- package/dist/types/sdk/src/shell/thread-scroll/thread-row-attr.d.ts +4 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-pin-turn-to-top.d.ts +22 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-scroll-has-more-below.d.ts +19 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-thread-jump-marks.d.ts +28 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-thread-landing.d.ts +1 -0
- package/dist/types/sdk/src/shell/use-composer-chip-select.d.ts +21 -0
- package/dist/types/sdk/src/shell/use-go-home.d.ts +11 -0
- package/dist/types/sdk/src/shell/use-hydrated.d.ts +19 -0
- package/dist/types/sdk/src/shell/use-menu-item-select.d.ts +13 -0
- package/dist/types/sdk/src/shell/use-overridable-toggle.d.ts +24 -0
- package/dist/types/sdk/src/shell/use-thread-rows.d.ts +41 -0
- package/dist/types/sdk/src/social/index.d.ts +2 -0
- package/dist/types/sdk/src/social/use-review-helpful.d.ts +10 -0
- package/dist/types/sdk/src/social/use-testimonials-carousel.d.ts +15 -0
- package/dist/types/sdk/src/utils/core-utils/format-distance.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/format-price.d.ts +7 -0
- package/dist/types/sdk/src/utils/core-utils/index.d.ts +10 -0
- package/dist/types/sdk/src/utils/core-utils/inject-google-fonts.d.ts +17 -0
- package/dist/types/sdk/src/utils/core-utils/is-on-sale.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/is-video-url.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/maps-directions-url.d.ts +5 -0
- package/dist/types/sdk/src/utils/core-utils/mint-id.d.ts +10 -0
- package/dist/types/sdk/src/utils/core-utils/resolve-swatch-color.d.ts +2 -0
- package/dist/types/sdk/src/utils/core-utils/validate-all.d.ts +13 -0
- package/dist/types/sdk/src/utils/index.d.ts +10 -0
- package/dist/types/sdk/src/utils/storage.d.ts +9 -0
- package/dist/types/sdk/src/utils/use-document-visible.d.ts +9 -0
- package/dist/types/sdk/src/utils/use-form-factor.d.ts +24 -0
- package/dist/types/sdk/src/utils/use-inline-completion.d.ts +48 -0
- package/dist/types/sdk/src/utils/use-interval.d.ts +7 -0
- package/dist/types/sdk/src/utils/use-success-flash.d.ts +35 -0
- package/dist/types/sdk/src/utils/use-wake-lock.d.ts +15 -0
- package/dist/types/sdk/src/utils/viewport-window.d.ts +39 -0
- package/dist/types/sdk/src/voice/index.d.ts +2 -0
- package/dist/types/sdk/src/voice/use-dictation.d.ts +80 -0
- package/dist/types/sdk/src/voice/use-voice-capture.d.ts +65 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/fact-form-registry.d.ts +43 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/fact-shape.d.ts +70 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/form-registry.d.ts +28 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/knowledge.d.ts +18 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/presence-restore.d.ts +13 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/presence-stream.d.ts +64 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/source-form-registry.d.ts +129 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/standing-signal-store.d.ts +19 -0
- package/dist/types/sdk/src/widgets/presence/flows/flow-store.d.ts +22 -0
- package/dist/types/sdk/src/widgets/presence/index.d.ts +17 -0
- package/dist/types/sdk/src/widgets/presence/runtime-context.d.ts +109 -0
- package/dist/types/sdk/src/widgets/presence/use-layout-entity-ids.d.ts +12 -0
- package/dist/types/sdk/src/widgets/presence/use-optimistic-facts.d.ts +43 -0
- package/dist/types/sdk/src/widgets/presence/use-optimistic-flow-set.d.ts +24 -0
- package/dist/types/sdk/src/widgets/presence/use-presence-notch.d.ts +75 -0
- package/dist/types/sdk/src/widgets/presence/use-presence.d.ts +45 -0
- package/dist/types/sdk/src/widgets/presence/use-standing-signal.d.ts +12 -0
- package/dist/types/spacestation/src/analytics/catalog.d.ts +89 -0
- package/dist/types/spacestation/src/analytics/ecommerce/events.d.ts +183 -0
- package/dist/types/spacestation/src/analytics/ecommerce/funnel.d.ts +22 -0
- package/dist/types/spacestation/src/analytics/ecommerce/index.d.ts +14 -0
- package/dist/types/spacestation/src/analytics/ecommerce/surfacing.d.ts +42 -0
- package/dist/types/spacestation/src/analytics/envelope.d.ts +222 -0
- package/dist/types/spacestation/src/analytics/index.d.ts +28 -0
- package/dist/types/spacestation/src/analytics/kind.d.ts +155 -0
- package/dist/types/spacestation/src/analytics/session.d.ts +35 -0
- package/dist/types/spacestation/src/attachment/attachment.d.ts +83 -0
- package/dist/types/spacestation/src/catalog/attribute-registry.d.ts +148 -0
- package/dist/types/spacestation/src/catalog/attribute-scope.d.ts +41 -0
- package/dist/types/spacestation/src/catalog/canvas-arrangement.d.ts +43 -0
- package/dist/types/spacestation/src/catalog/catalog-schemas.d.ts +264 -0
- package/dist/types/spacestation/src/catalog/config.d.ts +13 -0
- package/dist/types/spacestation/src/catalog/derive-props-doc.d.ts +11 -0
- package/dist/types/spacestation/src/catalog/element-filled.d.ts +77 -0
- package/dist/types/spacestation/src/catalog/entity-refs.d.ts +14 -0
- package/dist/types/spacestation/src/catalog/function-props.d.ts +23 -0
- package/dist/types/spacestation/src/catalog/hydration-paths.d.ts +19 -0
- package/dist/types/spacestation/src/catalog/prose.d.ts +60 -0
- package/dist/types/spacestation/src/catalog/ref-sites.d.ts +45 -0
- package/dist/types/spacestation/src/catalog/required-props.d.ts +31 -0
- package/dist/types/spacestation/src/catalog/resolved.d.ts +145 -0
- package/dist/types/spacestation/src/catalog/structural-baseline.d.ts +7 -0
- package/dist/types/spacestation/src/catalog/wire/catalog-wire.d.ts +191 -0
- package/dist/types/spacestation/src/catalog/wire/index.d.ts +5 -0
- package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +351 -0
- package/dist/types/spacestation/src/catalog/wire/schema-from-wire.d.ts +7 -0
- package/dist/types/spacestation/src/catalog/wire/schema-to-wire.d.ts +8 -0
- package/dist/types/spacestation/src/catalog/wire/wire-schema.d.ts +78 -0
- package/dist/types/spacestation/src/commerce/cart-add-signal.d.ts +125 -0
- package/dist/types/spacestation/src/commerce/cart-state.d.ts +87 -0
- package/dist/types/spacestation/src/commerce/cart-verb-signals.d.ts +80 -0
- package/dist/types/spacestation/src/commerce/page-kinds.d.ts +40 -0
- package/dist/types/spacestation/src/commerce/selection-signal.d.ts +25 -0
- package/dist/types/spacestation/src/contracts/entry-context.d.ts +35 -0
- package/dist/types/spacestation/src/contracts/knowledge/index.d.ts +12 -0
- package/dist/types/spacestation/src/contracts/knowledge/types.d.ts +238 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/knowledge-source.d.ts +36 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/platform-connector.d.ts +49 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/types.d.ts +29 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/client.d.ts +238 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/types.d.ts +23 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/connector.d.ts +11 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/domains.d.ts +27 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/types.d.ts +21 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/option-values.d.ts +71 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/types.d.ts +18 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/source.d.ts +5 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/types.d.ts +47 -0
- package/dist/types/spacestation/src/contracts/retrieval/index.d.ts +25 -0
- package/dist/types/spacestation/src/contracts/session-arrival-params.d.ts +32 -0
- package/dist/types/spacestation/src/contracts/session-arrival.d.ts +215 -0
- package/dist/types/spacestation/src/contracts/tools/definitions.d.ts +139 -0
- package/dist/types/spacestation/src/contracts/tools/execution-context.d.ts +135 -0
- package/dist/types/spacestation/src/contracts/tools/index.d.ts +9 -0
- package/dist/types/spacestation/src/contracts/tools/types.d.ts +163 -0
- package/dist/types/spacestation/src/focus/focus.d.ts +12 -0
- package/dist/types/spacestation/src/hydration/hydration.d.ts +46 -0
- package/dist/types/spacestation/src/index.d.ts +71 -0
- package/dist/types/spacestation/src/layout/apply-patch.d.ts +17 -0
- package/dist/types/spacestation/src/layout/conversation.d.ts +136 -0
- package/dist/types/spacestation/src/layout/layout-diff.d.ts +17 -0
- package/dist/types/spacestation/src/layout/layout.d.ts +275 -0
- package/dist/types/spacestation/src/layout/page.d.ts +244 -0
- package/dist/types/spacestation/src/layout/patch.d.ts +92 -0
- package/dist/types/spacestation/src/layout/reduce-patch.d.ts +19 -0
- package/dist/types/spacestation/src/layout/reserved-ids.d.ts +13 -0
- package/dist/types/spacestation/src/projection/projection.d.ts +249 -0
- package/dist/types/spacestation/src/shell/shell.d.ts +109 -0
- package/dist/types/spacestation/src/signal/agent-signals.d.ts +539 -0
- package/dist/types/spacestation/src/space/connector.d.ts +61 -0
- package/dist/types/spacestation/src/space/generation-job.d.ts +4 -0
- package/dist/types/spacestation/src/space/hosting.d.ts +36 -0
- package/dist/types/spacestation/src/space/manifest.d.ts +8 -0
- package/dist/types/spacestation/src/space/package-version.d.ts +18 -0
- package/dist/types/spacestation/src/space/package.d.ts +35 -0
- package/dist/types/spacestation/src/space/prompt-config.d.ts +17 -0
- package/dist/types/spacestation/src/space/session-activity.d.ts +71 -0
- package/dist/types/spacestation/src/space/session-queue.d.ts +2147 -0
- package/dist/types/spacestation/src/space/space-config.d.ts +96 -0
- package/dist/types/spacestation/src/space/space-otp.d.ts +18 -0
- package/dist/types/spacestation/src/space/space.d.ts +104 -0
- package/dist/types/spacestation/src/space/tool-manifest.d.ts +8 -0
- package/dist/types/spacestation/src/space/trace.d.ts +555 -0
- package/dist/types/spacestation/src/space/workspace-catalog.d.ts +112 -0
- package/dist/types/spacestation/src/tool-compression/compress.d.ts +88 -0
- package/dist/types/spacestation/src/tool-compression/index.d.ts +11 -0
- package/dist/types/spacestation/src/tool-compression/scoring.d.ts +38 -0
- package/dist/types/spacestation/src/tool-compression/tokenize.d.ts +29 -0
- package/dist/types/spacestation/src/trace/trace-data.d.ts +126 -0
- package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +224 -0
- package/dist/types/spacestation/src/trace/trace-envelopes.d.ts +144 -0
- package/dist/types/spacestation/src/trace/trace-events.d.ts +450 -0
- package/dist/types/spacestation/src/types.d.ts +253 -0
- package/dist/types/spacestation/src/view/continuation.d.ts +45 -0
- package/dist/types/spacestation/src/widgets/presence/element.d.ts +241 -0
- package/dist/types/spacestation/src/widgets/presence/frame.d.ts +56 -0
- package/dist/types/spacestation/src/widgets/presence/index.d.ts +4 -0
- package/dist/types/spacestation/src/widgets/presence/profile.d.ts +75 -0
- package/dist/types/spacestation/src/widgets/presence/scan.d.ts +45 -0
- package/package.json +43 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Row in `agent_runs`. One row per runForegroundTurn() completion. */
|
|
3
|
+
export declare const TraceRecordSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
6
|
+
sessionId: z.ZodString;
|
|
7
|
+
/** OTP-verified visitor email the session was unlocked with, or `null`
|
|
8
|
+
* for an unlocked space / anonymous unlock. */
|
|
9
|
+
visitorEmail: z.ZodNullable<z.ZodString>;
|
|
10
|
+
userPrompt: z.ZodString;
|
|
11
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
12
|
+
responseText: z.ZodNullable<z.ZodString>;
|
|
13
|
+
layout: z.ZodNullable<z.ZodUnknown>;
|
|
14
|
+
phaseTimings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
15
|
+
tokensByModel: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
input_tokens?: number | undefined;
|
|
21
|
+
output_tokens?: number | undefined;
|
|
22
|
+
cache_read_tokens?: number | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
input_tokens?: number | undefined;
|
|
25
|
+
output_tokens?: number | undefined;
|
|
26
|
+
cache_read_tokens?: number | undefined;
|
|
27
|
+
}>>>;
|
|
28
|
+
toolCalls: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
29
|
+
diagnostics: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
30
|
+
latencyFirstText: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
latencyFirstPatch: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
latencyTotal: z.ZodNullable<z.ZodNumber>;
|
|
33
|
+
/**
|
|
34
|
+
* The CLIENT's turn id for this run, or `null`.
|
|
35
|
+
*
|
|
36
|
+
* Written so a browser-emitted event can be lined up against the turn that
|
|
37
|
+
* produced it. `commerce.products_surfaced` carries the same id, and the
|
|
38
|
+
* dead-end classifier's whole question — "did this turn run a catalog search
|
|
39
|
+
* and still surface nothing?" — needs both halves of that join. Before this
|
|
40
|
+
* column the id was known at persist time and simply thrown away: it reached
|
|
41
|
+
* `trace_saved` and went no further.
|
|
42
|
+
*
|
|
43
|
+
* NULLABLE, and the classifier treats null as UNMEASURED rather than as a
|
|
44
|
+
* dead end. A run with no turn id is a background pass, a pre-column row, or
|
|
45
|
+
* a turn whose ack the client never saw — none of which is evidence that a
|
|
46
|
+
* visitor asked something and got nothing.
|
|
47
|
+
*/
|
|
48
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
49
|
+
/** Serialized `TraceTracker.exportState()` payload (parsed object) —
|
|
50
|
+
* lets the inspector rehydrate this run verbatim after a reload. */
|
|
51
|
+
trackerState: z.ZodNullable<z.ZodUnknown>;
|
|
52
|
+
createdAt: z.ZodString;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
sessionId: string;
|
|
55
|
+
id: string;
|
|
56
|
+
spaceId: string | null;
|
|
57
|
+
visitorEmail: string | null;
|
|
58
|
+
userPrompt: string;
|
|
59
|
+
branch: string | null;
|
|
60
|
+
responseText: string | null;
|
|
61
|
+
phaseTimings: Record<string, number> | null;
|
|
62
|
+
tokensByModel: Record<string, {
|
|
63
|
+
input_tokens?: number | undefined;
|
|
64
|
+
output_tokens?: number | undefined;
|
|
65
|
+
cache_read_tokens?: number | undefined;
|
|
66
|
+
}> | null;
|
|
67
|
+
toolCalls: unknown[] | null;
|
|
68
|
+
diagnostics: unknown[] | null;
|
|
69
|
+
latencyFirstText: number | null;
|
|
70
|
+
latencyFirstPatch: number | null;
|
|
71
|
+
latencyTotal: number | null;
|
|
72
|
+
turnId: string | null;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
layout?: unknown;
|
|
75
|
+
trackerState?: unknown;
|
|
76
|
+
}, {
|
|
77
|
+
sessionId: string;
|
|
78
|
+
id: string;
|
|
79
|
+
spaceId: string | null;
|
|
80
|
+
visitorEmail: string | null;
|
|
81
|
+
userPrompt: string;
|
|
82
|
+
branch: string | null;
|
|
83
|
+
responseText: string | null;
|
|
84
|
+
phaseTimings: Record<string, number> | null;
|
|
85
|
+
tokensByModel: Record<string, {
|
|
86
|
+
input_tokens?: number | undefined;
|
|
87
|
+
output_tokens?: number | undefined;
|
|
88
|
+
cache_read_tokens?: number | undefined;
|
|
89
|
+
}> | null;
|
|
90
|
+
toolCalls: unknown[] | null;
|
|
91
|
+
diagnostics: unknown[] | null;
|
|
92
|
+
latencyFirstText: number | null;
|
|
93
|
+
latencyFirstPatch: number | null;
|
|
94
|
+
latencyTotal: number | null;
|
|
95
|
+
turnId: string | null;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
layout?: unknown;
|
|
98
|
+
trackerState?: unknown;
|
|
99
|
+
}>;
|
|
100
|
+
export type TraceRecord = z.infer<typeof TraceRecordSchema>;
|
|
101
|
+
export declare const CreateTraceInputSchema: z.ZodObject<{
|
|
102
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
103
|
+
sessionId: z.ZodString;
|
|
104
|
+
visitorEmail: z.ZodNullable<z.ZodString>;
|
|
105
|
+
userPrompt: z.ZodString;
|
|
106
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
107
|
+
responseText: z.ZodNullable<z.ZodString>;
|
|
108
|
+
layout: z.ZodNullable<z.ZodUnknown>;
|
|
109
|
+
phaseTimings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
110
|
+
tokensByModel: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
111
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
input_tokens?: number | undefined;
|
|
116
|
+
output_tokens?: number | undefined;
|
|
117
|
+
cache_read_tokens?: number | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
input_tokens?: number | undefined;
|
|
120
|
+
output_tokens?: number | undefined;
|
|
121
|
+
cache_read_tokens?: number | undefined;
|
|
122
|
+
}>>>;
|
|
123
|
+
toolCalls: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
124
|
+
diagnostics: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
125
|
+
latencyFirstText: z.ZodEffects<z.ZodNullable<z.ZodNumber>, number | null, number | null>;
|
|
126
|
+
latencyFirstPatch: z.ZodEffects<z.ZodNullable<z.ZodNumber>, number | null, number | null>;
|
|
127
|
+
latencyTotal: z.ZodEffects<z.ZodNullable<z.ZodNumber>, number | null, number | null>;
|
|
128
|
+
trackerState: z.ZodNullable<z.ZodUnknown>;
|
|
129
|
+
/**
|
|
130
|
+
* The CLIENT's turn id for this run, or `null`.
|
|
131
|
+
*
|
|
132
|
+
* Written so a browser-emitted event can be lined up against the turn that
|
|
133
|
+
* produced it. `commerce.products_surfaced` carries the same id, and the
|
|
134
|
+
* dead-end classifier's whole question — "did this turn run a catalog search
|
|
135
|
+
* and still surface nothing?" — needs both halves of that join. Before this
|
|
136
|
+
* column the id was known at persist time and simply thrown away: it reached
|
|
137
|
+
* `trace_saved` and went no further.
|
|
138
|
+
*
|
|
139
|
+
* NULLABLE, and the classifier treats null as UNMEASURED rather than as a
|
|
140
|
+
* dead end. A run with no turn id is a background pass, a pre-column row, or
|
|
141
|
+
* a turn whose ack the client never saw — none of which is evidence that a
|
|
142
|
+
* visitor asked something and got nothing.
|
|
143
|
+
*/
|
|
144
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
sessionId: string;
|
|
147
|
+
spaceId: string | null;
|
|
148
|
+
visitorEmail: string | null;
|
|
149
|
+
userPrompt: string;
|
|
150
|
+
branch: string | null;
|
|
151
|
+
responseText: string | null;
|
|
152
|
+
phaseTimings: Record<string, number> | null;
|
|
153
|
+
tokensByModel: Record<string, {
|
|
154
|
+
input_tokens?: number | undefined;
|
|
155
|
+
output_tokens?: number | undefined;
|
|
156
|
+
cache_read_tokens?: number | undefined;
|
|
157
|
+
}> | null;
|
|
158
|
+
toolCalls: unknown[] | null;
|
|
159
|
+
diagnostics: unknown[] | null;
|
|
160
|
+
latencyFirstText: number | null;
|
|
161
|
+
latencyFirstPatch: number | null;
|
|
162
|
+
latencyTotal: number | null;
|
|
163
|
+
turnId: string | null;
|
|
164
|
+
layout?: unknown;
|
|
165
|
+
trackerState?: unknown;
|
|
166
|
+
}, {
|
|
167
|
+
sessionId: string;
|
|
168
|
+
spaceId: string | null;
|
|
169
|
+
visitorEmail: string | null;
|
|
170
|
+
userPrompt: string;
|
|
171
|
+
branch: string | null;
|
|
172
|
+
responseText: string | null;
|
|
173
|
+
phaseTimings: Record<string, number> | null;
|
|
174
|
+
tokensByModel: Record<string, {
|
|
175
|
+
input_tokens?: number | undefined;
|
|
176
|
+
output_tokens?: number | undefined;
|
|
177
|
+
cache_read_tokens?: number | undefined;
|
|
178
|
+
}> | null;
|
|
179
|
+
toolCalls: unknown[] | null;
|
|
180
|
+
diagnostics: unknown[] | null;
|
|
181
|
+
latencyFirstText: number | null;
|
|
182
|
+
latencyFirstPatch: number | null;
|
|
183
|
+
latencyTotal: number | null;
|
|
184
|
+
turnId: string | null;
|
|
185
|
+
layout?: unknown;
|
|
186
|
+
trackerState?: unknown;
|
|
187
|
+
}>;
|
|
188
|
+
export type CreateTraceInput = z.infer<typeof CreateTraceInputSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* One row of the session list — the `agent_run_sessions` aggregate, grouped by
|
|
191
|
+
* `session_id` over a space's turn rows.
|
|
192
|
+
*/
|
|
193
|
+
export declare const AgentSessionSummarySchema: z.ZodObject<{
|
|
194
|
+
sessionId: z.ZodString;
|
|
195
|
+
/** Turn rows only; background/secondary runs are excluded by the aggregate. */
|
|
196
|
+
turnCount: z.ZodNumber;
|
|
197
|
+
/** The session's opening prompt — titles the row in the UI. */
|
|
198
|
+
firstPrompt: z.ZodString;
|
|
199
|
+
startedAt: z.ZodString;
|
|
200
|
+
lastRunAt: z.ZodString;
|
|
201
|
+
/** Summed `latency_total` across the session's turns. */
|
|
202
|
+
totalLatencyMs: z.ZodNumber;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
sessionId: string;
|
|
205
|
+
turnCount: number;
|
|
206
|
+
firstPrompt: string;
|
|
207
|
+
startedAt: string;
|
|
208
|
+
lastRunAt: string;
|
|
209
|
+
totalLatencyMs: number;
|
|
210
|
+
}, {
|
|
211
|
+
sessionId: string;
|
|
212
|
+
turnCount: number;
|
|
213
|
+
firstPrompt: string;
|
|
214
|
+
startedAt: string;
|
|
215
|
+
lastRunAt: string;
|
|
216
|
+
totalLatencyMs: number;
|
|
217
|
+
}>;
|
|
218
|
+
export type AgentSessionSummary = z.infer<typeof AgentSessionSummarySchema>;
|
|
219
|
+
/**
|
|
220
|
+
* One replayable turn. Narrower than `TraceRecord`: it drops `trackerState`
|
|
221
|
+
* (the merged tracker ships once per session, not per row) and the fields the
|
|
222
|
+
* replay screen never reads.
|
|
223
|
+
*/
|
|
224
|
+
export declare const SessionTurnSchema: z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
userPrompt: z.ZodString;
|
|
227
|
+
responseText: z.ZodNullable<z.ZodString>;
|
|
228
|
+
/** Full cumulative Spec committed by this turn — never a patch delta. */
|
|
229
|
+
layout: z.ZodNullable<z.ZodUnknown>;
|
|
230
|
+
createdAt: z.ZodString;
|
|
231
|
+
latencyTotal: z.ZodNullable<z.ZodNumber>;
|
|
232
|
+
phaseTimings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
233
|
+
tokensByModel: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
234
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
input_tokens?: number | undefined;
|
|
238
|
+
output_tokens?: number | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
input_tokens?: number | undefined;
|
|
241
|
+
output_tokens?: number | undefined;
|
|
242
|
+
}>>>;
|
|
243
|
+
toolCalls: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
244
|
+
diagnostics: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
id: string;
|
|
247
|
+
userPrompt: string;
|
|
248
|
+
responseText: string | null;
|
|
249
|
+
phaseTimings: Record<string, number> | null;
|
|
250
|
+
tokensByModel: Record<string, {
|
|
251
|
+
input_tokens?: number | undefined;
|
|
252
|
+
output_tokens?: number | undefined;
|
|
253
|
+
}> | null;
|
|
254
|
+
toolCalls: unknown[] | null;
|
|
255
|
+
diagnostics: unknown[] | null;
|
|
256
|
+
latencyTotal: number | null;
|
|
257
|
+
createdAt: string;
|
|
258
|
+
layout?: unknown;
|
|
259
|
+
}, {
|
|
260
|
+
id: string;
|
|
261
|
+
userPrompt: string;
|
|
262
|
+
responseText: string | null;
|
|
263
|
+
phaseTimings: Record<string, number> | null;
|
|
264
|
+
tokensByModel: Record<string, {
|
|
265
|
+
input_tokens?: number | undefined;
|
|
266
|
+
output_tokens?: number | undefined;
|
|
267
|
+
}> | null;
|
|
268
|
+
toolCalls: unknown[] | null;
|
|
269
|
+
diagnostics: unknown[] | null;
|
|
270
|
+
latencyTotal: number | null;
|
|
271
|
+
createdAt: string;
|
|
272
|
+
layout?: unknown;
|
|
273
|
+
}>;
|
|
274
|
+
export type SessionTurn = z.infer<typeof SessionTurnSchema>;
|
|
275
|
+
/**
|
|
276
|
+
* The replay payload for one session: everything the canvas and transcript
|
|
277
|
+
* need, and nothing else.
|
|
278
|
+
*
|
|
279
|
+
* The trace is deliberately NOT here — see `SessionTrace`. Measured on a real
|
|
280
|
+
* 12-turn session, the turns weigh ~50KB while the trace weighs ~3.2MB, so
|
|
281
|
+
* bundling them would make the primary interaction pay a 63x tax for a pane
|
|
282
|
+
* that renders beside it.
|
|
283
|
+
*/
|
|
284
|
+
export declare const SessionReplaySchema: z.ZodObject<{
|
|
285
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
userPrompt: z.ZodString;
|
|
288
|
+
responseText: z.ZodNullable<z.ZodString>;
|
|
289
|
+
/** Full cumulative Spec committed by this turn — never a patch delta. */
|
|
290
|
+
layout: z.ZodNullable<z.ZodUnknown>;
|
|
291
|
+
createdAt: z.ZodString;
|
|
292
|
+
latencyTotal: z.ZodNullable<z.ZodNumber>;
|
|
293
|
+
phaseTimings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
294
|
+
tokensByModel: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
295
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
input_tokens?: number | undefined;
|
|
299
|
+
output_tokens?: number | undefined;
|
|
300
|
+
}, {
|
|
301
|
+
input_tokens?: number | undefined;
|
|
302
|
+
output_tokens?: number | undefined;
|
|
303
|
+
}>>>;
|
|
304
|
+
toolCalls: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
305
|
+
diagnostics: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
id: string;
|
|
308
|
+
userPrompt: string;
|
|
309
|
+
responseText: string | null;
|
|
310
|
+
phaseTimings: Record<string, number> | null;
|
|
311
|
+
tokensByModel: Record<string, {
|
|
312
|
+
input_tokens?: number | undefined;
|
|
313
|
+
output_tokens?: number | undefined;
|
|
314
|
+
}> | null;
|
|
315
|
+
toolCalls: unknown[] | null;
|
|
316
|
+
diagnostics: unknown[] | null;
|
|
317
|
+
latencyTotal: number | null;
|
|
318
|
+
createdAt: string;
|
|
319
|
+
layout?: unknown;
|
|
320
|
+
}, {
|
|
321
|
+
id: string;
|
|
322
|
+
userPrompt: string;
|
|
323
|
+
responseText: string | null;
|
|
324
|
+
phaseTimings: Record<string, number> | null;
|
|
325
|
+
tokensByModel: Record<string, {
|
|
326
|
+
input_tokens?: number | undefined;
|
|
327
|
+
output_tokens?: number | undefined;
|
|
328
|
+
}> | null;
|
|
329
|
+
toolCalls: unknown[] | null;
|
|
330
|
+
diagnostics: unknown[] | null;
|
|
331
|
+
latencyTotal: number | null;
|
|
332
|
+
createdAt: string;
|
|
333
|
+
layout?: unknown;
|
|
334
|
+
}>, "many">;
|
|
335
|
+
/**
|
|
336
|
+
* The session's own last-committed layout, read straight off the durable
|
|
337
|
+
* session record (`sessions.blob.layout`) rather than derived from `turns`.
|
|
338
|
+
*
|
|
339
|
+
* A session always has a layout — the client seeds one on arrival, agent
|
|
340
|
+
* turn or not — but `turns` only exists once the agent has SPOKEN. A visitor
|
|
341
|
+
* who deep-links into a product and leaves without a word has zero turns and
|
|
342
|
+
* a perfectly real layout; only this field can show it. Null exclusively
|
|
343
|
+
* when the durable session row itself could not be read.
|
|
344
|
+
*/
|
|
345
|
+
sessionLayout: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
turns: {
|
|
348
|
+
id: string;
|
|
349
|
+
userPrompt: string;
|
|
350
|
+
responseText: string | null;
|
|
351
|
+
phaseTimings: Record<string, number> | null;
|
|
352
|
+
tokensByModel: Record<string, {
|
|
353
|
+
input_tokens?: number | undefined;
|
|
354
|
+
output_tokens?: number | undefined;
|
|
355
|
+
}> | null;
|
|
356
|
+
toolCalls: unknown[] | null;
|
|
357
|
+
diagnostics: unknown[] | null;
|
|
358
|
+
latencyTotal: number | null;
|
|
359
|
+
createdAt: string;
|
|
360
|
+
layout?: unknown;
|
|
361
|
+
}[];
|
|
362
|
+
sessionLayout: Record<string, unknown> | null;
|
|
363
|
+
}, {
|
|
364
|
+
turns: {
|
|
365
|
+
id: string;
|
|
366
|
+
userPrompt: string;
|
|
367
|
+
responseText: string | null;
|
|
368
|
+
phaseTimings: Record<string, number> | null;
|
|
369
|
+
tokensByModel: Record<string, {
|
|
370
|
+
input_tokens?: number | undefined;
|
|
371
|
+
output_tokens?: number | undefined;
|
|
372
|
+
}> | null;
|
|
373
|
+
toolCalls: unknown[] | null;
|
|
374
|
+
diagnostics: unknown[] | null;
|
|
375
|
+
latencyTotal: number | null;
|
|
376
|
+
createdAt: string;
|
|
377
|
+
layout?: unknown;
|
|
378
|
+
}[];
|
|
379
|
+
sessionLayout: Record<string, unknown> | null;
|
|
380
|
+
}>;
|
|
381
|
+
export type SessionReplay = z.infer<typeof SessionReplaySchema>;
|
|
382
|
+
/**
|
|
383
|
+
* The full debug trace for one session, fetched separately from the replay so
|
|
384
|
+
* the canvas can render first.
|
|
385
|
+
*
|
|
386
|
+
* `trackerState` is the session's `tracker_state` chunks already merged
|
|
387
|
+
* server-side (`mergeTrackerChunks`) into a single `TraceTracker.importState`
|
|
388
|
+
* string. Merging on the server is deliberate: it mirrors the `trace_snapshot`
|
|
389
|
+
* WebSocket path (architecture invariant §II.2, DB → tracker → admin) and keeps
|
|
390
|
+
* `mergeTrackerChunks` — which pulls in `node:crypto` — out of the browser
|
|
391
|
+
* bundle. Null when no row carried a usable chunk.
|
|
392
|
+
*/
|
|
393
|
+
export declare const SessionTraceSchema: z.ZodObject<{
|
|
394
|
+
trackerState: z.ZodNullable<z.ZodString>;
|
|
395
|
+
}, "strip", z.ZodTypeAny, {
|
|
396
|
+
trackerState: string | null;
|
|
397
|
+
}, {
|
|
398
|
+
trackerState: string | null;
|
|
399
|
+
}>;
|
|
400
|
+
export type SessionTrace = z.infer<typeof SessionTraceSchema>;
|
|
401
|
+
/**
|
|
402
|
+
* Row of `llm_usage_daily` — the billing ledger's rollup, and the single shape
|
|
403
|
+
* behind every level of the Cost funnel (environment → feature → model → token
|
|
404
|
+
* class). It covers EVERY LLM call: evals, judges, BIC jobs, edit routes and
|
|
405
|
+
* embeddings included.
|
|
406
|
+
*
|
|
407
|
+
* `estimatedCostUsd` is null when the model has no pricing entry — never 0,
|
|
408
|
+
* which would render an unpriced model as free.
|
|
409
|
+
*/
|
|
410
|
+
export declare const LlmUsageDailySchema: z.ZodObject<{
|
|
411
|
+
day: z.ZodString;
|
|
412
|
+
/** Deployment that made the call — 'production', 'staging', 'pr-123', 'development'. */
|
|
413
|
+
environment: z.ZodString;
|
|
414
|
+
feature: z.ZodString;
|
|
415
|
+
model: z.ZodString;
|
|
416
|
+
provider: z.ZodString;
|
|
417
|
+
/** Masked tail of the key actually billed, or null when unknown/non-Google. */
|
|
418
|
+
keyFingerprint: z.ZodNullable<z.ZodString>;
|
|
419
|
+
/**
|
|
420
|
+
* The space the call served, or null when it served none.
|
|
421
|
+
*
|
|
422
|
+
* Null is a REAL answer, not missing data: evals, BIC scans, layout edits and
|
|
423
|
+
* embeddings are platform work with no one space behind them. Consumers must
|
|
424
|
+
* report that share rather than dropping it, or a per-space total reads as
|
|
425
|
+
* the platform total.
|
|
426
|
+
*/
|
|
427
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
428
|
+
/**
|
|
429
|
+
* The surface of the session the call served (`sessions.surface`), or null
|
|
430
|
+
* when it served no session or the session predates surface recording.
|
|
431
|
+
* `automation` is the eval harness — the signal that files an ordinary
|
|
432
|
+
* `agent-turn` as testing spend rather than as a visitor's.
|
|
433
|
+
*/
|
|
434
|
+
surface: z.ZodNullable<z.ZodString>;
|
|
435
|
+
inputTokens: z.ZodNumber;
|
|
436
|
+
outputTokens: z.ZodNumber;
|
|
437
|
+
/** Subset of inputTokens, never additional to it. */
|
|
438
|
+
cachedInputTokens: z.ZodNumber;
|
|
439
|
+
reasoningTokens: z.ZodNumber;
|
|
440
|
+
callCount: z.ZodNumber;
|
|
441
|
+
errorCount: z.ZodNumber;
|
|
442
|
+
estimatedCostUsd: z.ZodNullable<z.ZodNumber>;
|
|
443
|
+
}, "strip", z.ZodTypeAny, {
|
|
444
|
+
surface: string | null;
|
|
445
|
+
model: string;
|
|
446
|
+
spaceId: string | null;
|
|
447
|
+
day: string;
|
|
448
|
+
environment: string;
|
|
449
|
+
feature: string;
|
|
450
|
+
provider: string;
|
|
451
|
+
keyFingerprint: string | null;
|
|
452
|
+
inputTokens: number;
|
|
453
|
+
outputTokens: number;
|
|
454
|
+
cachedInputTokens: number;
|
|
455
|
+
reasoningTokens: number;
|
|
456
|
+
callCount: number;
|
|
457
|
+
errorCount: number;
|
|
458
|
+
estimatedCostUsd: number | null;
|
|
459
|
+
}, {
|
|
460
|
+
surface: string | null;
|
|
461
|
+
model: string;
|
|
462
|
+
spaceId: string | null;
|
|
463
|
+
day: string;
|
|
464
|
+
environment: string;
|
|
465
|
+
feature: string;
|
|
466
|
+
provider: string;
|
|
467
|
+
keyFingerprint: string | null;
|
|
468
|
+
inputTokens: number;
|
|
469
|
+
outputTokens: number;
|
|
470
|
+
cachedInputTokens: number;
|
|
471
|
+
reasoningTokens: number;
|
|
472
|
+
callCount: number;
|
|
473
|
+
errorCount: number;
|
|
474
|
+
estimatedCostUsd: number | null;
|
|
475
|
+
}>;
|
|
476
|
+
export type LlmUsageDaily = z.infer<typeof LlmUsageDailySchema>;
|
|
477
|
+
/**
|
|
478
|
+
* Row of `llm_usage_by_session` — one session's usage on one model.
|
|
479
|
+
*
|
|
480
|
+
* The grain that makes MEDIAN and tail economics possible. Session cost is
|
|
481
|
+
* heavily right-skewed, so an average alone overstates the typical session and
|
|
482
|
+
* hides the long tail that drives the bill; that needs per-session rows, which
|
|
483
|
+
* the daily rollup aggregates away.
|
|
484
|
+
*/
|
|
485
|
+
export declare const LlmUsageBySessionSchema: z.ZodObject<{
|
|
486
|
+
sessionId: z.ZodString;
|
|
487
|
+
environment: z.ZodString;
|
|
488
|
+
model: z.ZodString;
|
|
489
|
+
/** The space this session belongs to, or null for a session with no space. */
|
|
490
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
491
|
+
/** The session's surface — see `LlmUsageDailySchema.surface`. */
|
|
492
|
+
surface: z.ZodNullable<z.ZodString>;
|
|
493
|
+
/** Label only — the first feature seen in the session. */
|
|
494
|
+
firstFeature: z.ZodString;
|
|
495
|
+
startedAt: z.ZodString;
|
|
496
|
+
endedAt: z.ZodString;
|
|
497
|
+
inputTokens: z.ZodNumber;
|
|
498
|
+
outputTokens: z.ZodNumber;
|
|
499
|
+
cachedInputTokens: z.ZodNumber;
|
|
500
|
+
reasoningTokens: z.ZodNumber;
|
|
501
|
+
callCount: z.ZodNumber;
|
|
502
|
+
errorCount: z.ZodNumber;
|
|
503
|
+
/** Priced server-side, like the daily rollup — the browser never carries a
|
|
504
|
+
* rate table, so there is exactly one place a price can be wrong. Null when
|
|
505
|
+
* the model is unpriced; never 0, which would read as free. */
|
|
506
|
+
estimatedCostUsd: z.ZodNullable<z.ZodNumber>;
|
|
507
|
+
}, "strip", z.ZodTypeAny, {
|
|
508
|
+
sessionId: string;
|
|
509
|
+
surface: string | null;
|
|
510
|
+
model: string;
|
|
511
|
+
spaceId: string | null;
|
|
512
|
+
startedAt: string;
|
|
513
|
+
environment: string;
|
|
514
|
+
inputTokens: number;
|
|
515
|
+
outputTokens: number;
|
|
516
|
+
cachedInputTokens: number;
|
|
517
|
+
reasoningTokens: number;
|
|
518
|
+
callCount: number;
|
|
519
|
+
errorCount: number;
|
|
520
|
+
estimatedCostUsd: number | null;
|
|
521
|
+
firstFeature: string;
|
|
522
|
+
endedAt: string;
|
|
523
|
+
}, {
|
|
524
|
+
sessionId: string;
|
|
525
|
+
surface: string | null;
|
|
526
|
+
model: string;
|
|
527
|
+
spaceId: string | null;
|
|
528
|
+
startedAt: string;
|
|
529
|
+
environment: string;
|
|
530
|
+
inputTokens: number;
|
|
531
|
+
outputTokens: number;
|
|
532
|
+
cachedInputTokens: number;
|
|
533
|
+
reasoningTokens: number;
|
|
534
|
+
callCount: number;
|
|
535
|
+
errorCount: number;
|
|
536
|
+
estimatedCostUsd: number | null;
|
|
537
|
+
firstFeature: string;
|
|
538
|
+
endedAt: string;
|
|
539
|
+
}>;
|
|
540
|
+
export type LlmUsageBySession = z.infer<typeof LlmUsageBySessionSchema>;
|
|
541
|
+
/** Row of `llm_usage_sessions_daily` — the per-environment session denominator. */
|
|
542
|
+
export declare const LlmSessionsDailySchema: z.ZodObject<{
|
|
543
|
+
day: z.ZodString;
|
|
544
|
+
environment: z.ZodString;
|
|
545
|
+
sessionCount: z.ZodNumber;
|
|
546
|
+
}, "strip", z.ZodTypeAny, {
|
|
547
|
+
day: string;
|
|
548
|
+
environment: string;
|
|
549
|
+
sessionCount: number;
|
|
550
|
+
}, {
|
|
551
|
+
day: string;
|
|
552
|
+
environment: string;
|
|
553
|
+
sessionCount: number;
|
|
554
|
+
}>;
|
|
555
|
+
export type LlmSessionsDaily = z.infer<typeof LlmSessionsDailySchema>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace-bundled catalog identities.
|
|
3
|
+
*
|
|
4
|
+
* A brand increasingly OWNS its own composition identity — exported from the
|
|
5
|
+
* brand package itself (e.g. `@fourty/stevemadden/brand` exports a
|
|
6
|
+
* `BrandDefinition`), consumed by the API composition root + the admin client.
|
|
7
|
+
* spacestation stays brand-agnostic: it declares the shared SHAPE
|
|
8
|
+
* (`BrandDefinition`) but names no brand that owns its own definition.
|
|
9
|
+
*
|
|
10
|
+
* The records below are the NOT-YET-MIGRATED set — only the base pack
|
|
11
|
+
* (`@fourty/ui`) still centralizes its ids here. Every workspace brand (Steve
|
|
12
|
+
* Madden, Babysense, Current Backyard) migrated to a package-owned
|
|
13
|
+
* `BrandDefinition` (e.g. `@fourty/current-backyard-ui/brand`), so none are
|
|
14
|
+
* listed here. New brands should follow them, not these records.
|
|
15
|
+
*
|
|
16
|
+
* (Per-tenant / DB-published brands register dynamically and are NOT listed
|
|
17
|
+
* here — this is only the workspace-bundled set.)
|
|
18
|
+
*/
|
|
19
|
+
import type { ActionDefinition, AskDefinition, FlowSpec } from '../signal/agent-signals';
|
|
20
|
+
import type { Spec } from '../layout/layout';
|
|
21
|
+
/**
|
|
22
|
+
* A workspace-bundled brand's composition identity. Exported BY the brand
|
|
23
|
+
* package (the brand owns its definition); this is only the shared shape so
|
|
24
|
+
* the API composition root and the admin client read the same structure.
|
|
25
|
+
*/
|
|
26
|
+
/** One brand-shipped compose-prompt section (see `BrandDefinition.promptSections`). */
|
|
27
|
+
export interface BrandPromptSection {
|
|
28
|
+
/** Section id — namespaced by the fold under the brand's source. */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Assembly order; the vertical canvas doctrine sits at 200. */
|
|
31
|
+
order: number;
|
|
32
|
+
/** Markdown file, relative to the brand package's `promptRoot`. */
|
|
33
|
+
file: string;
|
|
34
|
+
requires: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface BrandDefinition {
|
|
37
|
+
/** Component-source id — the value spaces persist in `componentSources`.
|
|
38
|
+
* For a self-owned brand this equals its npm package name. */
|
|
39
|
+
sourceId: string;
|
|
40
|
+
/** The theme package this source defaults to: its id (the value a space's
|
|
41
|
+
* `themePackage` override carries) + the CSS class it activates on the
|
|
42
|
+
* spacefront root. */
|
|
43
|
+
theme: {
|
|
44
|
+
id: string;
|
|
45
|
+
themeClass: string;
|
|
46
|
+
};
|
|
47
|
+
/** Human label for the admin theme selector. */
|
|
48
|
+
label: string;
|
|
49
|
+
/** Client-side ACTIONS this brand WIRES (handlers registered in the brand
|
|
50
|
+
* package). Each becomes a capability provision (`action:<type>`) AND an
|
|
51
|
+
* agent-facing contract (description + payload) the prompt teaches. An action
|
|
52
|
+
* travels as a signal and is gated by a capability. Absent when the brand
|
|
53
|
+
* wires no bespoke actions. */
|
|
54
|
+
actions?: ActionDefinition[];
|
|
55
|
+
/** ASKS this brand's widgets can have the agent raise — each a `topic` (so the
|
|
56
|
+
* owning widget claims + renders it) + a `manifest` (when to raise it) the
|
|
57
|
+
* presence faculty learns from. The ask counterpart of `actions`: declared
|
|
58
|
+
* here, the agent becomes aware of it via an injected prompt manifest, and the
|
|
59
|
+
* widget intercepts the matching topic. Absent when the brand publishes none. */
|
|
60
|
+
asks?: AskDefinition[];
|
|
61
|
+
/** Reasoning FLOWS this brand ships — each folds a schema slice + prompt into
|
|
62
|
+
* the one faculty pass and emits on `flow.output{id}` for a brand widget. The
|
|
63
|
+
* flow counterpart of `actions`/`asks`: the platform runs them, the brand owns
|
|
64
|
+
* the artifact shape + the prompt + the renderer. Absent when none. */
|
|
65
|
+
flows?: FlowSpec[];
|
|
66
|
+
/** The brand's DEFAULT (welcome) layout — the seed a fresh session opens on,
|
|
67
|
+
* owned in CODE by the brand package, NOT the DB space config. The composition
|
|
68
|
+
* root registers it on the brand's ComponentSource; the session seed resolver
|
|
69
|
+
* is the ONLY seed source. Absent when the brand ships no code
|
|
70
|
+
* default (the base / per-tenant sources fall back to the DB seed). */
|
|
71
|
+
defaultLayout?: Spec;
|
|
72
|
+
/** Composition guidance for THIS brand's own blocks, shipped inside the
|
|
73
|
+
* package (`<promptRoot>/<file>`) and folded into the compose prompt of any
|
|
74
|
+
* space that uses the brand — after the vertical's canvas doctrine, which it
|
|
75
|
+
* refines. `requires` names the `render:<type>` tokens of the blocks the
|
|
76
|
+
* prose teaches, so the section can never outlive them (the capability gate
|
|
77
|
+
* fails the space, naming the section). Absent when the brand teaches none. */
|
|
78
|
+
promptSections?: BrandPromptSection[];
|
|
79
|
+
/** Opaque per-vertical extension blob (§VIII.1) — this universal shape
|
|
80
|
+
* stays vertical-agnostic; a vertical's own code (e.g. the commerce
|
|
81
|
+
* engine) reads its own keys out of this bag and owns their meaning.
|
|
82
|
+
* Absent when the brand carries no vertical-specific extension data. */
|
|
83
|
+
config?: Record<string, unknown>;
|
|
84
|
+
}
|
|
85
|
+
/** Component-source ids — the values spaces persist in `componentSources`. */
|
|
86
|
+
export declare const COMPONENT_SOURCE: {
|
|
87
|
+
ui: string;
|
|
88
|
+
};
|
|
89
|
+
/** Theme-package ids — the values a space's `themePackage` override / a
|
|
90
|
+
* source's `defaultTheme` reference. */
|
|
91
|
+
export declare const THEME_PACKAGE: {
|
|
92
|
+
ui: string;
|
|
93
|
+
};
|
|
94
|
+
/** The CSS class each theme package activates on the spacefront root. */
|
|
95
|
+
export declare const THEME_CLASS: {
|
|
96
|
+
ui: string;
|
|
97
|
+
};
|
|
98
|
+
/** Each (not-yet-migrated) component source's REQUIRED default theme package
|
|
99
|
+
* (built from the constants above — no inline ids). Self-owned brands declare
|
|
100
|
+
* their default in their own `BrandDefinition.theme`. */
|
|
101
|
+
export declare const COMPONENT_SOURCE_DEFAULT_THEME: Record<string, string>;
|
|
102
|
+
/** A selectable theme package for the admin Composition override control. */
|
|
103
|
+
export interface ThemePackageOption {
|
|
104
|
+
/** Theme-package id stored in `config.themePackage`. */
|
|
105
|
+
id: string;
|
|
106
|
+
/** Human label for the admin selector. */
|
|
107
|
+
label: string;
|
|
108
|
+
}
|
|
109
|
+
/** The not-yet-migrated workspace theme packages a space can override with.
|
|
110
|
+
* The admin selector concatenates these with the self-owned brands'
|
|
111
|
+
* `BrandDefinition.theme` options. */
|
|
112
|
+
export declare const WORKSPACE_THEME_PACKAGES: ThemePackageOption[];
|