@adia-ai/gen-ui 0.8.37
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/CHANGELOG.md +26 -0
- package/README.md +77 -0
- package/compose/CHANGELOG.md +1707 -0
- package/compose/README.md +215 -0
- package/compose/core/artifacts.js +262 -0
- package/compose/core/context-store.js +218 -0
- package/compose/core/generator.d.ts +4 -0
- package/compose/core/generator.js +602 -0
- package/compose/core/pipeline/engine.js +289 -0
- package/compose/core/pipeline/types.js +91 -0
- package/compose/core/plan-primitives.js +120 -0
- package/compose/core/plan-turn.js +145 -0
- package/compose/core/reference.js +150 -0
- package/compose/core/state.js +15 -0
- package/compose/evals/harness.d.ts +4 -0
- package/compose/evals/harness.mjs +193 -0
- package/compose/index.d.ts +4 -0
- package/compose/index.js +16 -0
- package/compose/shared/validate-and-repair.js +122 -0
- package/compose/strategies/_shared/chunk-loader.js +282 -0
- package/compose/strategies/cascade.d.ts +67 -0
- package/compose/strategies/cascade.js +165 -0
- package/compose/strategies/escalation.d.ts +13 -0
- package/compose/strategies/escalation.js +132 -0
- package/compose/strategies/free-form-composer/index.js +254 -0
- package/compose/strategies/free-form-composer/system-prompt.js +205 -0
- package/compose/strategies/free-form-composer/transpile.js +279 -0
- package/compose/strategies/monolithic/_shared.js +1619 -0
- package/compose/strategies/monolithic/generate-instant.js +228 -0
- package/compose/strategies/monolithic/generate-pro.js +490 -0
- package/compose/strategies/monolithic/generate-thinking.js +206 -0
- package/compose/strategies/registry.d.ts +20 -0
- package/compose/strategies/registry.js +495 -0
- package/compose/strategies/zettel/_smoke.js +27 -0
- package/compose/strategies/zettel/chunk-composer.js +214 -0
- package/compose/strategies/zettel/chunk-refiner.js +582 -0
- package/compose/strategies/zettel/chunk-synthesizer.js +458 -0
- package/compose/strategies/zettel/composer.js +78 -0
- package/compose/strategies/zettel/composition-library.js +418 -0
- package/compose/strategies/zettel/generate.js +15 -0
- package/compose/strategies/zettel/generator-adapter.d.ts +4 -0
- package/compose/strategies/zettel/generator-adapter.js +242 -0
- package/compose/strategies/zettel/issue-reporter.js +607 -0
- package/compose/strategies/zettel/session-store.js +121 -0
- package/compose/strategies/zettel/state-cache.js +158 -0
- package/compose/transpiler/transpiler-maps.js +675 -0
- package/compose/transpiler/transpiler.d.ts +4 -0
- package/compose/transpiler/transpiler.js +962 -0
- package/corpus/CHANGELOG.md +1957 -0
- package/corpus/README.md +279 -0
- package/corpus/catalog-a2ui_0_9.d.ts +4 -0
- package/corpus/catalog-a2ui_0_9.json +29571 -0
- package/corpus/catalog-a2ui_0_9_rules.txt +1215 -0
- package/corpus/chunk-embeddings.d.ts +4 -0
- package/corpus/chunk-embeddings.json +1 -0
- package/corpus/chunks/_index.json +16658 -0
- package/corpus/chunks/_source-hashes.json +571 -0
- package/corpus/chunks/access-denied-with-request.json +124 -0
- package/corpus/chunks/access-request-form.json +166 -0
- package/corpus/chunks/access-request-pending.json +133 -0
- package/corpus/chunks/accordion-settings.json +176 -0
- package/corpus/chunks/achievement-badges.json +413 -0
- package/corpus/chunks/achievement-unlock.json +104 -0
- package/corpus/chunks/action-list-record-actions.json +84 -0
- package/corpus/chunks/activity-feed.json +390 -0
- package/corpus/chunks/admin-page-header-flush.json +83 -0
- package/corpus/chunks/admin-page-header-title-description.json +80 -0
- package/corpus/chunks/admin-page-header-with-actions.json +107 -0
- package/corpus/chunks/admin-page-header-with-tabs.json +144 -0
- package/corpus/chunks/admin-shell-rounded-borderless.json +287 -0
- package/corpus/chunks/admin-shell-standard.json +310 -0
- package/corpus/chunks/admin-sidebar-brand-signin.json +158 -0
- package/corpus/chunks/admin-sidebar-brand-version.json +130 -0
- package/corpus/chunks/admin-sidebar-flat-nav.json +131 -0
- package/corpus/chunks/admin-sidebar-nav-dividers.json +150 -0
- package/corpus/chunks/admin-sidebar-nav-groups.json +171 -0
- package/corpus/chunks/admin-sidebar-workspace-switcher.json +139 -0
- package/corpus/chunks/admin-topbar-breadcrumb-actions.json +130 -0
- package/corpus/chunks/admin-topbar-breadcrumb-minimal.json +79 -0
- package/corpus/chunks/admin-topbar-deep-breadcrumb.json +129 -0
- package/corpus/chunks/admin-topbar-search.json +104 -0
- package/corpus/chunks/admin-topbar-status-indicator.json +122 -0
- package/corpus/chunks/admin-topbar-trailing-toggle.json +114 -0
- package/corpus/chunks/agent-activity-feed.json +163 -0
- package/corpus/chunks/agent-artifact-stub-card.json +115 -0
- package/corpus/chunks/agent-canvas-shell.json +305 -0
- package/corpus/chunks/agent-citations-source-chips.json +82 -0
- package/corpus/chunks/agent-command-palette-search.json +120 -0
- package/corpus/chunks/agent-cost-detailed.json +260 -0
- package/corpus/chunks/agent-cost-inline.json +78 -0
- package/corpus/chunks/agent-memory-detail.json +181 -0
- package/corpus/chunks/agent-memory-editor.json +173 -0
- package/corpus/chunks/agent-memory-list.json +207 -0
- package/corpus/chunks/agent-pipeline-status-stages.json +61 -0
- package/corpus/chunks/agent-prompt-card.json +179 -0
- package/corpus/chunks/agent-prompt-library-grid.json +341 -0
- package/corpus/chunks/agent-prompt-picker.json +282 -0
- package/corpus/chunks/agent-rate-limit.json +100 -0
- package/corpus/chunks/agent-reasoning-collapsed.json +128 -0
- package/corpus/chunks/agent-tool-call-accordion.json +109 -0
- package/corpus/chunks/agent-tool-call-collapsed.json +98 -0
- package/corpus/chunks/agent-tool-call-error.json +112 -0
- package/corpus/chunks/agent-tool-call-result.json +145 -0
- package/corpus/chunks/agent-tool-call-running.json +85 -0
- package/corpus/chunks/agent-tool-call-success.json +137 -0
- package/corpus/chunks/agent-trace-timeline.json +244 -0
- package/corpus/chunks/ai-streaming-response.json +147 -0
- package/corpus/chunks/alert-banner-stack.json +78 -0
- package/corpus/chunks/alert-banner.json +55 -0
- package/corpus/chunks/alert-dialog-simple.json +72 -0
- package/corpus/chunks/alert-dialog-typed.json +107 -0
- package/corpus/chunks/alert-dialog-unsaved.json +81 -0
- package/corpus/chunks/analytics-chart.json +213 -0
- package/corpus/chunks/analytics-sparklines-dashboard.json +259 -0
- package/corpus/chunks/anchor-bar-selection-bar.json +226 -0
- package/corpus/chunks/api-key-table.json +148 -0
- package/corpus/chunks/api-keys-create.json +140 -0
- package/corpus/chunks/api-keys-list.json +271 -0
- package/corpus/chunks/app-nav-badges-counts.json +77 -0
- package/corpus/chunks/app-nav-badges-group-rollup-badges.json +100 -0
- package/corpus/chunks/app-nav-badges-plan-tiers.json +76 -0
- package/corpus/chunks/app-nav-badges-status-callouts.json +75 -0
- package/corpus/chunks/app-nav-full-example.json +195 -0
- package/corpus/chunks/app-nav-groups.json +103 -0
- package/corpus/chunks/app-nav-items.json +74 -0
- package/corpus/chunks/app-nav-labels-and-dividers.json +92 -0
- package/corpus/chunks/app-nav-spacer.json +77 -0
- package/corpus/chunks/app-product-listing-card.json +214 -0
- package/corpus/chunks/approvals-detail.json +240 -0
- package/corpus/chunks/approvals-queue.json +321 -0
- package/corpus/chunks/audit-log-basic.json +184 -0
- package/corpus/chunks/audit-log.json +174 -0
- package/corpus/chunks/auth-account-deleted-actions.json +51 -0
- package/corpus/chunks/auth-account-deleted.json +202 -0
- package/corpus/chunks/auth-card-content.json +260 -0
- package/corpus/chunks/auth-card-header.json +205 -0
- package/corpus/chunks/auth-email-entry.json +65 -0
- package/corpus/chunks/auth-email-verify-confirm.json +52 -0
- package/corpus/chunks/auth-email-verify.json +196 -0
- package/corpus/chunks/auth-forbidden-actions.json +59 -0
- package/corpus/chunks/auth-forbidden.json +203 -0
- package/corpus/chunks/auth-invite-actions.json +49 -0
- package/corpus/chunks/auth-invite-team-card.json +86 -0
- package/corpus/chunks/auth-link-expired-form.json +65 -0
- package/corpus/chunks/auth-link-expired.json +196 -0
- package/corpus/chunks/auth-locked-account.json +211 -0
- package/corpus/chunks/auth-locked-recovery-options.json +60 -0
- package/corpus/chunks/auth-mfa-enrollment-submit.json +54 -0
- package/corpus/chunks/auth-mfa-enrollment.json +284 -0
- package/corpus/chunks/auth-mfa-fallback-actions.json +52 -0
- package/corpus/chunks/auth-mfa-recovery.json +61 -0
- package/corpus/chunks/auth-new-password-form.json +75 -0
- package/corpus/chunks/auth-new-password.json +217 -0
- package/corpus/chunks/auth-oauth-fallback-actions.json +52 -0
- package/corpus/chunks/auth-oauth-interstitial.json +160 -0
- package/corpus/chunks/auth-password-challenge.json +94 -0
- package/corpus/chunks/auth-password-reset-form.json +64 -0
- package/corpus/chunks/auth-password-reset.json +195 -0
- package/corpus/chunks/auth-profile-form.json +72 -0
- package/corpus/chunks/auth-profile-setup.json +194 -0
- package/corpus/chunks/auth-reset-sent.json +188 -0
- package/corpus/chunks/auth-session-expired-actions.json +52 -0
- package/corpus/chunks/auth-session-expired.json +201 -0
- package/corpus/chunks/auth-signin-card-email.json +245 -0
- package/corpus/chunks/auth-signin-card-magic-link.json +147 -0
- package/corpus/chunks/auth-signin-card-mfa.json +231 -0
- package/corpus/chunks/auth-signin-card-otp.json +205 -0
- package/corpus/chunks/auth-signin-card-password.json +264 -0
- package/corpus/chunks/auth-signin-card-recovery.json +218 -0
- package/corpus/chunks/auth-signout-actions.json +51 -0
- package/corpus/chunks/auth-signout.json +184 -0
- package/corpus/chunks/auth-signup-email-entry.json +66 -0
- package/corpus/chunks/auth-signup-entry.json +281 -0
- package/corpus/chunks/auth-signup-social-auths.json +54 -0
- package/corpus/chunks/auth-signup-verify.json +227 -0
- package/corpus/chunks/auth-social-auths.json +62 -0
- package/corpus/chunks/auth-sso-providers.json +55 -0
- package/corpus/chunks/auth-sso-required.json +213 -0
- package/corpus/chunks/auth-team-invite.json +288 -0
- package/corpus/chunks/avatar-group-overflow.json +137 -0
- package/corpus/chunks/avatar-stack-overflow.json +124 -0
- package/corpus/chunks/banner-announcement-beta.json +99 -0
- package/corpus/chunks/banner-announcement-promo.json +102 -0
- package/corpus/chunks/banner-live-update.json +102 -0
- package/corpus/chunks/banner-system-maintenance.json +101 -0
- package/corpus/chunks/banner-system-offline.json +85 -0
- package/corpus/chunks/banner-system-update.json +102 -0
- package/corpus/chunks/bell-menu-empty.json +107 -0
- package/corpus/chunks/bell-menu-unread.json +395 -0
- package/corpus/chunks/billing-cancel-subscription-danger.json +61 -0
- package/corpus/chunks/billing-invoice-history-table.json +75 -0
- package/corpus/chunks/billing-overview.json +202 -0
- package/corpus/chunks/billing-payment-method-card-on-file.json +157 -0
- package/corpus/chunks/billing-progress-label.json +101 -0
- package/corpus/chunks/blog-post-card.json +212 -0
- package/corpus/chunks/breadcrumb-navigation.json +72 -0
- package/corpus/chunks/bulk-action-toolbar-floating.json +199 -0
- package/corpus/chunks/bulk-action-toolbar-swap.json +158 -0
- package/corpus/chunks/bulk-selection-actions-bar.json +162 -0
- package/corpus/chunks/business-address-form.json +953 -0
- package/corpus/chunks/calendar-month-view.json +74 -0
- package/corpus/chunks/card-grid-images.json +459 -0
- package/corpus/chunks/card-header-with-description.json +47 -0
- package/corpus/chunks/card-with-empty-state.json +96 -0
- package/corpus/chunks/card-with-form.json +143 -0
- package/corpus/chunks/card-with-sparkline.json +90 -0
- package/corpus/chunks/card-with-stat-kpi.json +86 -0
- package/corpus/chunks/changelog-feed-basic.json +470 -0
- package/corpus/chunks/chart-in-card-chart-plus-breakdown.json +188 -0
- package/corpus/chunks/chart-in-card-chart-plus-stat.json +89 -0
- package/corpus/chunks/chart-in-card-chart-with-filter-pills.json +124 -0
- package/corpus/chunks/chart-in-card-full-bleed-legend.json +116 -0
- package/corpus/chunks/chart-in-card-full-chart.json +107 -0
- package/corpus/chunks/chart-in-card-sparkline-tile.json +93 -0
- package/corpus/chunks/chart-in-card-stat-with-sparkline.json +73 -0
- package/corpus/chunks/chart-in-card-trend-footer.json +115 -0
- package/corpus/chunks/chart-with-filter-pills.json +169 -0
- package/corpus/chunks/chat-empty-state-hero.json +102 -0
- package/corpus/chunks/chat-message-assistant-byline.json +85 -0
- package/corpus/chunks/chat-message-user-byline.json +84 -0
- package/corpus/chunks/chat-page-shell.json +379 -0
- package/corpus/chunks/chat-streaming-surface.json +169 -0
- package/corpus/chunks/checkout-order-summary-card.json +140 -0
- package/corpus/chunks/code-snippet.json +107 -0
- package/corpus/chunks/col-form-stack.json +93 -0
- package/corpus/chunks/col-heading-body-action.json +79 -0
- package/corpus/chunks/col-stat-label.json +63 -0
- package/corpus/chunks/color-picker-swatches.json +153 -0
- package/corpus/chunks/command-palette.json +327 -0
- package/corpus/chunks/comments-composer.json +158 -0
- package/corpus/chunks/comments-mention-menu.json +237 -0
- package/corpus/chunks/comments-thread.json +344 -0
- package/corpus/chunks/commerce-pricing-tiers.json +401 -0
- package/corpus/chunks/comparison-table.json +246 -0
- package/corpus/chunks/contact-form-card.json +197 -0
- package/corpus/chunks/contact-form.json +157 -0
- package/corpus/chunks/contact-support-form.json +702 -0
- package/corpus/chunks/conversion-funnel-4-step-funnel.json +139 -0
- package/corpus/chunks/conversion-funnel-6step.json +151 -0
- package/corpus/chunks/conversion-funnel-wide-summary.json +192 -0
- package/corpus/chunks/conversion-funnel-with-segment-compare.json +202 -0
- package/corpus/chunks/cta-banner-centered.json +102 -0
- package/corpus/chunks/dashboard-acquisition-panel.json +212 -0
- package/corpus/chunks/dashboard-admin-page.json +104 -0
- package/corpus/chunks/dashboard-audience-kpis.json +165 -0
- package/corpus/chunks/dashboard-audience-panel.json +756 -0
- package/corpus/chunks/dashboard-behavior-panel.json +114 -0
- package/corpus/chunks/dashboard-chart-recent.json +566 -0
- package/corpus/chunks/dashboard-cohort-retention.json +83 -0
- package/corpus/chunks/dashboard-conversion-panel.json +234 -0
- package/corpus/chunks/dashboard-country-list.json +304 -0
- package/corpus/chunks/dashboard-filter-bar.json +118 -0
- package/corpus/chunks/dashboard-funnel.json +142 -0
- package/corpus/chunks/dashboard-notifications-panel.json +423 -0
- package/corpus/chunks/dashboard-overview-panel.json +1644 -0
- package/corpus/chunks/dashboard-page-header.json +166 -0
- package/corpus/chunks/dashboard-pages-table.json +86 -0
- package/corpus/chunks/dashboard-quick-actions.json +116 -0
- package/corpus/chunks/dashboard-reports-panel.json +166 -0
- package/corpus/chunks/dashboard-reports-table.json +138 -0
- package/corpus/chunks/dashboard-storage-card.json +117 -0
- package/corpus/chunks/dashboard-tabs.json +86 -0
- package/corpus/chunks/dashboard-team-actions-storage.json +605 -0
- package/corpus/chunks/dashboard-team-list.json +334 -0
- package/corpus/chunks/dashboard-traffic-channels.json +184 -0
- package/corpus/chunks/dashboard-transactions-table.json +145 -0
- package/corpus/chunks/data-export-history.json +192 -0
- package/corpus/chunks/data-export-request.json +197 -0
- package/corpus/chunks/data-import-wizard.json +391 -0
- package/corpus/chunks/date-range-picker.json +156 -0
- package/corpus/chunks/date-time-picker-form.json +222 -0
- package/corpus/chunks/departments-checkbox-form.json +390 -0
- package/corpus/chunks/destructive-confirm-modal.json +149 -0
- package/corpus/chunks/diff-inline.json +84 -0
- package/corpus/chunks/diff-side-by-side.json +131 -0
- package/corpus/chunks/diff-structured.json +216 -0
- package/corpus/chunks/digest-email-preview.json +374 -0
- package/corpus/chunks/divider-text-label.json +87 -0
- package/corpus/chunks/doc-editor-shell.json +356 -0
- package/corpus/chunks/drawer-2fa-key.json +273 -0
- package/corpus/chunks/drawer-2fa-sms.json +261 -0
- package/corpus/chunks/drawer-2fa-totp.json +385 -0
- package/corpus/chunks/drawer-cancel-sub.json +636 -0
- package/corpus/chunks/drawer-change-plan.json +561 -0
- package/corpus/chunks/drawer-custom-roles.json +696 -0
- package/corpus/chunks/drawer-data-start.json +171 -0
- package/corpus/chunks/drawer-delete-account.json +341 -0
- package/corpus/chunks/drawer-delete-workspace.json +362 -0
- package/corpus/chunks/drawer-discord.json +434 -0
- package/corpus/chunks/drawer-figma.json +401 -0
- package/corpus/chunks/drawer-first-dashboard.json +220 -0
- package/corpus/chunks/drawer-gcal.json +475 -0
- package/corpus/chunks/drawer-github.json +589 -0
- package/corpus/chunks/drawer-invite.json +397 -0
- package/corpus/chunks/drawer-record-detail.json +44 -0
- package/corpus/chunks/drawer-report.json +528 -0
- package/corpus/chunks/drawer-revoke-session.json +331 -0
- package/corpus/chunks/drawer-role.json +190 -0
- package/corpus/chunks/drawer-slack.json +429 -0
- package/corpus/chunks/drawer-smtp.json +476 -0
- package/corpus/chunks/drawer-source.json +294 -0
- package/corpus/chunks/drawer-transaction.json +493 -0
- package/corpus/chunks/drawer-with-create-form.json +43 -0
- package/corpus/chunks/editor-code-pane.json +204 -0
- package/corpus/chunks/editor-page-shell.json +149 -0
- package/corpus/chunks/editor-preview-pane.json +136 -0
- package/corpus/chunks/editor-statusbar-ready.json +99 -0
- package/corpus/chunks/editor-toolbar-import-export.json +195 -0
- package/corpus/chunks/email-inbox-list.json +678 -0
- package/corpus/chunks/empty-state-danger.json +58 -0
- package/corpus/chunks/empty-state-minimal.json +44 -0
- package/corpus/chunks/empty-state-warning.json +53 -0
- package/corpus/chunks/empty-state.json +65 -0
- package/corpus/chunks/error-404-actions.json +54 -0
- package/corpus/chunks/error-404.json +204 -0
- package/corpus/chunks/error-500-actions.json +61 -0
- package/corpus/chunks/error-500.json +220 -0
- package/corpus/chunks/error-maintenance-actions.json +53 -0
- package/corpus/chunks/error-maintenance.json +203 -0
- package/corpus/chunks/error-page-shell.json +132 -0
- package/corpus/chunks/export-flow-async.json +210 -0
- package/corpus/chunks/export-flow-delivery.json +163 -0
- package/corpus/chunks/export-flow-sync.json +162 -0
- package/corpus/chunks/extended-profile-form.json +512 -0
- package/corpus/chunks/faq-accordion.json +123 -0
- package/corpus/chunks/feature-grid-icons.json +314 -0
- package/corpus/chunks/feature-grid-three-cards.json +187 -0
- package/corpus/chunks/feature-toggle-switch-grid.json +213 -0
- package/corpus/chunks/file-upload-dnd.json +166 -0
- package/corpus/chunks/file-upload-field.json +97 -0
- package/corpus/chunks/file-upload-form.json +251 -0
- package/corpus/chunks/filter-bar-active-filters.json +176 -0
- package/corpus/chunks/filter-bar-filter-bar-with-table.json +113 -0
- package/corpus/chunks/filter-bar-saved-views.json +117 -0
- package/corpus/chunks/filter-popover-form.json +137 -0
- package/corpus/chunks/footer-multi-column.json +270 -0
- package/corpus/chunks/footer-primary-only.json +41 -0
- package/corpus/chunks/form-checkbox-group.json +65 -0
- package/corpus/chunks/form-drawer-edit-form.json +178 -0
- package/corpus/chunks/form-drawer-simple-form.json +151 -0
- package/corpus/chunks/form-drawer-tall-form.json +325 -0
- package/corpus/chunks/form-field-email-hint.json +53 -0
- package/corpus/chunks/form-field-range.json +54 -0
- package/corpus/chunks/form-field-required.json +52 -0
- package/corpus/chunks/form-field-select.json +66 -0
- package/corpus/chunks/form-field-textarea.json +51 -0
- package/corpus/chunks/form-field-with-error.json +151 -0
- package/corpus/chunks/form-fields-two-column.json +69 -0
- package/corpus/chunks/form-page-shell.json +146 -0
- package/corpus/chunks/form-switch-toggle.json +41 -0
- package/corpus/chunks/form-system-live-demo.json +123 -0
- package/corpus/chunks/forms-address-autocomplete.json +277 -0
- package/corpus/chunks/forms-address-fields.json +221 -0
- package/corpus/chunks/forms-conditional-reveal.json +195 -0
- package/corpus/chunks/gallery-page-shell.json +444 -0
- package/corpus/chunks/grid-2col-entry-cards.json +140 -0
- package/corpus/chunks/grid-kpi-4col.json +164 -0
- package/corpus/chunks/grid-responsive-kpi.json +165 -0
- package/corpus/chunks/hero-cta-simple.json +107 -0
- package/corpus/chunks/hero-cta-split.json +183 -0
- package/corpus/chunks/hero-section-split.json +111 -0
- package/corpus/chunks/icon-text-row.json +60 -0
- package/corpus/chunks/image-caption-tile.json +99 -0
- package/corpus/chunks/image-carousel.json +156 -0
- package/corpus/chunks/image-thumbnail-grid.json +77 -0
- package/corpus/chunks/image-upload-preview.json +118 -0
- package/corpus/chunks/import-mapping-flow.json +972 -0
- package/corpus/chunks/inline-dialog-rename.json +128 -0
- package/corpus/chunks/inline-dialog-schedule.json +154 -0
- package/corpus/chunks/inline-dialog-status.json +179 -0
- package/corpus/chunks/integrations-api-keys-card-list.json +475 -0
- package/corpus/chunks/integrations-connect-form.json +550 -0
- package/corpus/chunks/integrations-grid.json +141 -0
- package/corpus/chunks/integrations-webhooks-empty-state.json +66 -0
- package/corpus/chunks/inventory-list-stock.json +137 -0
- package/corpus/chunks/invite-members.json +153 -0
- package/corpus/chunks/invoice-line-items.json +493 -0
- package/corpus/chunks/kanban-board-3col.json +713 -0
- package/corpus/chunks/kanban-page-shell.json +671 -0
- package/corpus/chunks/key-value-detail-list.json +242 -0
- package/corpus/chunks/keyboard-shortcut-display.json +250 -0
- package/corpus/chunks/labeled-textarea.json +45 -0
- package/corpus/chunks/leaderboard-table.json +140 -0
- package/corpus/chunks/library-browser-search-filter.json +109 -0
- package/corpus/chunks/linked-record-row.json +61 -0
- package/corpus/chunks/loading-skeleton-placeholder.json +387 -0
- package/corpus/chunks/login-form-card.json +207 -0
- package/corpus/chunks/logo-cloud-trusted-by.json +235 -0
- package/corpus/chunks/map-with-location-list.json +293 -0
- package/corpus/chunks/marketing-hero-cta.json +102 -0
- package/corpus/chunks/marketing-page-shell.json +352 -0
- package/corpus/chunks/masonry-gallery.json +154 -0
- package/corpus/chunks/member-edit-drawer.json +236 -0
- package/corpus/chunks/members-active-table-search-filter.json +184 -0
- package/corpus/chunks/members-pending-invites-cards.json +251 -0
- package/corpus/chunks/members-roles-permissions-list.json +146 -0
- package/corpus/chunks/menu-context-actions.json +113 -0
- package/corpus/chunks/metadata-description-list.json +178 -0
- package/corpus/chunks/modal-create-project-form.json +133 -0
- package/corpus/chunks/modal-preferences-tabs.json +147 -0
- package/corpus/chunks/multi-field-form-validation.json +394 -0
- package/corpus/chunks/nav-menu-icons.json +74 -0
- package/corpus/chunks/newsletter-subscription.json +190 -0
- package/corpus/chunks/notification-badges-feed.json +411 -0
- package/corpus/chunks/notification-preferences-panel.json +238 -0
- package/corpus/chunks/onb-completion.json +139 -0
- package/corpus/chunks/onb-extension-install.json +172 -0
- package/corpus/chunks/onb-hero-welcome.json +156 -0
- package/corpus/chunks/onb-import-picker.json +86 -0
- package/corpus/chunks/onb-mobile-handoff.json +121 -0
- package/corpus/chunks/onb-notification-prefs.json +83 -0
- package/corpus/chunks/onb-persona-picker.json +82 -0
- package/corpus/chunks/onb-provider-tiles.json +137 -0
- package/corpus/chunks/onb-settings-review.json +257 -0
- package/corpus/chunks/onb-step-footer.json +121 -0
- package/corpus/chunks/onb-step-header.json +121 -0
- package/corpus/chunks/onb-step-progress.json +140 -0
- package/corpus/chunks/onb-step-shell.json +380 -0
- package/corpus/chunks/onb-story-pane.json +121 -0
- package/corpus/chunks/onb-tutorial-steps.json +193 -0
- package/corpus/chunks/order-confirmation-success-card.json +177 -0
- package/corpus/chunks/order-tracking-timeline.json +131 -0
- package/corpus/chunks/pagination-controls.json +82 -0
- package/corpus/chunks/pane-settings-sidebar.json +204 -0
- package/corpus/chunks/patient-visit-shell.json +191 -0
- package/corpus/chunks/payment-checkout-form.json +341 -0
- package/corpus/chunks/payment-method-form.json +328 -0
- package/corpus/chunks/period-comparison.json +236 -0
- package/corpus/chunks/permission-matrix-table.json +438 -0
- package/corpus/chunks/permissions-matrix-grid.json +111 -0
- package/corpus/chunks/permissions-matrix-summary.json +157 -0
- package/corpus/chunks/permissions-role-picker-radio.json +107 -0
- package/corpus/chunks/permissions-role-picker-select.json +101 -0
- package/corpus/chunks/permissions-share-link.json +256 -0
- package/corpus/chunks/permissions-share-people.json +297 -0
- package/corpus/chunks/permissions-sharing-scopes.json +109 -0
- package/corpus/chunks/plan-selection-form.json +529 -0
- package/corpus/chunks/playground-a2ui.json +181 -0
- package/corpus/chunks/playground-agent-admin.json +117 -0
- package/corpus/chunks/playground-agent-chat.json +126 -0
- package/corpus/chunks/playground-app-shell.json +488 -0
- package/corpus/chunks/playground-chat.json +265 -0
- package/corpus/chunks/playground-construct-canvas.json +118 -0
- package/corpus/chunks/playground-css-channel.json +487 -0
- package/corpus/chunks/playground-gen-ui.json +224 -0
- package/corpus/chunks/playground-render-preview.json +369 -0
- package/corpus/chunks/playground-streams-bridge.json +437 -0
- package/corpus/chunks/playground-table-toolbar.json +38 -0
- package/corpus/chunks/popover-with-content.json +118 -0
- package/corpus/chunks/pricing-tiers.json +561 -0
- package/corpus/chunks/product-tour.json +158 -0
- package/corpus/chunks/profile-public.json +297 -0
- package/corpus/chunks/progress-tracker-milestones.json +294 -0
- package/corpus/chunks/radio-button-group.json +83 -0
- package/corpus/chunks/rating-stars-review-summary.json +259 -0
- package/corpus/chunks/reactions-bar.json +75 -0
- package/corpus/chunks/reactions-picker.json +245 -0
- package/corpus/chunks/real-time-metrics-dashboard.json +344 -0
- package/corpus/chunks/record-detail-drawer-simple-detail.json +296 -0
- package/corpus/chunks/record-detail-drawer-tabbed-detail.json +443 -0
- package/corpus/chunks/referral-share-link.json +128 -0
- package/corpus/chunks/referral-status.json +243 -0
- package/corpus/chunks/reg-address-form.json +825 -0
- package/corpus/chunks/reg-billing-card.json +210 -0
- package/corpus/chunks/reg-brand-scrape.json +599 -0
- package/corpus/chunks/reg-departments-toggle.json +259 -0
- package/corpus/chunks/reg-extended-profile.json +356 -0
- package/corpus/chunks/reg-final-done.json +457 -0
- package/corpus/chunks/reg-helpdesk-grid.json +571 -0
- package/corpus/chunks/reg-import-picker.json +112 -0
- package/corpus/chunks/reg-integrations-grid.json +418 -0
- package/corpus/chunks/reg-invite-form.json +245 -0
- package/corpus/chunks/reg-legal-entity.json +260 -0
- package/corpus/chunks/reg-org-chart-review.json +891 -0
- package/corpus/chunks/reg-profile-identity.json +188 -0
- package/corpus/chunks/reg-step-footer.json +201 -0
- package/corpus/chunks/reg-step-header.json +201 -0
- package/corpus/chunks/reg-step-progress.json +236 -0
- package/corpus/chunks/reg-step-shell.json +605 -0
- package/corpus/chunks/reg-story-pane.json +201 -0
- package/corpus/chunks/reg-success-summary.json +257 -0
- package/corpus/chunks/reg-team-size.json +128 -0
- package/corpus/chunks/reg-usecase-picker.json +104 -0
- package/corpus/chunks/reg-workspace-name.json +159 -0
- package/corpus/chunks/responsive-grid-pattern.json +71 -0
- package/corpus/chunks/responsive-kpi-grid.json +166 -0
- package/corpus/chunks/responsive-row-pattern.json +71 -0
- package/corpus/chunks/responsive-shell-sidebar.json +308 -0
- package/corpus/chunks/responsive-wrap-at-pattern.json +124 -0
- package/corpus/chunks/retention-cohort-default-retention.json +80 -0
- package/corpus/chunks/retention-cohort-stat-pair.json +163 -0
- package/corpus/chunks/retention-cohort-with-legend.json +135 -0
- package/corpus/chunks/revenue-heatmap.json +82 -0
- package/corpus/chunks/role-management.json +272 -0
- package/corpus/chunks/row-action-cluster.json +54 -0
- package/corpus/chunks/row-avatar-name-role.json +71 -0
- package/corpus/chunks/row-icon-label.json +52 -0
- package/corpus/chunks/row-spread-label-value.json +54 -0
- package/corpus/chunks/row-wrap-tags.json +72 -0
- package/corpus/chunks/schedule-meeting-form-card.json +229 -0
- package/corpus/chunks/search-recents-menu.json +195 -0
- package/corpus/chunks/search-results-grouped.json +357 -0
- package/corpus/chunks/search-results-list.json +202 -0
- package/corpus/chunks/search-saved-views.json +356 -0
- package/corpus/chunks/search-with-filters.json +311 -0
- package/corpus/chunks/searchable-picker-modal.json +164 -0
- package/corpus/chunks/section-with-stack.json +48 -0
- package/corpus/chunks/security-active-sessions-devices.json +287 -0
- package/corpus/chunks/security-change-password-form.json +102 -0
- package/corpus/chunks/security-delete-account-danger.json +79 -0
- package/corpus/chunks/segmented-control-billing-tabs.json +164 -0
- package/corpus/chunks/select-multiple-preselected.json +70 -0
- package/corpus/chunks/settings-2fa-setup.json +307 -0
- package/corpus/chunks/settings-admin-page.json +1205 -0
- package/corpus/chunks/settings-appearance-primitives.json +145 -0
- package/corpus/chunks/settings-appearance-theme-panel.json +55 -0
- package/corpus/chunks/settings-appearance.json +81 -0
- package/corpus/chunks/settings-danger-zone-delete-workspace.json +93 -0
- package/corpus/chunks/settings-general-form.json +69 -0
- package/corpus/chunks/settings-integrations.json +298 -0
- package/corpus/chunks/settings-members-invite.json +112 -0
- package/corpus/chunks/settings-notification-activity-checkboxes.json +108 -0
- package/corpus/chunks/settings-notification-channels-switches.json +101 -0
- package/corpus/chunks/settings-page-shell.json +190 -0
- package/corpus/chunks/settings-privacy.json +83 -0
- package/corpus/chunks/settings-profile-security.json +122 -0
- package/corpus/chunks/settings-toggle-switches.json +66 -0
- package/corpus/chunks/sidebar-nav.json +120 -0
- package/corpus/chunks/sidebar-navigation-panel.json +165 -0
- package/corpus/chunks/signup-form-card.json +218 -0
- package/corpus/chunks/signup-team-size-form.json +259 -0
- package/corpus/chunks/single-select-card-form.json +231 -0
- package/corpus/chunks/slider-range-controls.json +119 -0
- package/corpus/chunks/social-media-post-card.json +159 -0
- package/corpus/chunks/sortable-list.json +307 -0
- package/corpus/chunks/sortable-search-paginate-table.json +162 -0
- package/corpus/chunks/split-pane-editor.json +146 -0
- package/corpus/chunks/stack-avatar-badge-overlay.json +53 -0
- package/corpus/chunks/stack-image-shimmer.json +51 -0
- package/corpus/chunks/stat-cards-kpi-dashboard.json +178 -0
- package/corpus/chunks/stats-band-big-numbers.json +175 -0
- package/corpus/chunks/status-dashboard.json +282 -0
- package/corpus/chunks/stepper-form-wizard.json +165 -0
- package/corpus/chunks/subscription-status-renewal-card.json +285 -0
- package/corpus/chunks/survey-rating-form.json +165 -0
- package/corpus/chunks/swiper-product-carousel.json +349 -0
- package/corpus/chunks/swiper-testimonial-carousel.json +279 -0
- package/corpus/chunks/table-empty-state.json +116 -0
- package/corpus/chunks/table-inline-edit-row.json +269 -0
- package/corpus/chunks/table-spreadsheet-cells.json +334 -0
- package/corpus/chunks/table-toolbar-no-search.json +42 -0
- package/corpus/chunks/table-toolbar-with-table.json +208 -0
- package/corpus/chunks/table-with-toolbar-card.json +80 -0
- package/corpus/chunks/tabs-with-panels.json +187 -0
- package/corpus/chunks/tag-chips-filter.json +100 -0
- package/corpus/chunks/team-invite-form.json +380 -0
- package/corpus/chunks/team-members-list.json +341 -0
- package/corpus/chunks/testimonial-grid.json +269 -0
- package/corpus/chunks/testimonial-pull-quote.json +137 -0
- package/corpus/chunks/testimonials-avatar-cards.json +286 -0
- package/corpus/chunks/timeline-events.json +89 -0
- package/corpus/chunks/timezone-selector-basic.json +99 -0
- package/corpus/chunks/timezone-selector-preview.json +104 -0
- package/corpus/chunks/toolbar-icons.json +216 -0
- package/corpus/chunks/toolbar-rich-text-editor.json +230 -0
- package/corpus/chunks/toolbar-tooltips.json +191 -0
- package/corpus/chunks/tooltip-hover-button.json +106 -0
- package/corpus/chunks/tree-file-explorer.json +136 -0
- package/corpus/chunks/tree-table-basic.json +171 -0
- package/corpus/chunks/trial-banner.json +158 -0
- package/corpus/chunks/url-import-form.json +728 -0
- package/corpus/chunks/usage-quota-meter-card.json +217 -0
- package/corpus/chunks/user-identity-row.json +81 -0
- package/corpus/chunks/user-onboarding-checklist.json +301 -0
- package/corpus/chunks/user-profile-card.json +192 -0
- package/corpus/chunks/users-table-badge.json +135 -0
- package/corpus/chunks/verification-document-upload.json +179 -0
- package/corpus/chunks/verification-status.json +97 -0
- package/corpus/chunks/verification-stepper.json +111 -0
- package/corpus/chunks/video-player-controls.json +120 -0
- package/corpus/chunks/webhook-config.json +209 -0
- package/corpus/chunks/webhooks-list.json +204 -0
- package/corpus/chunks/wizard-drawer-three-step-wizard.json +443 -0
- package/corpus/manifest.d.ts +4 -0
- package/corpus/manifest.json +6 -0
- package/corpus/scripts/chunk-library.d.ts +4 -0
- package/corpus/scripts/chunk-library.js +335 -0
- package/node-shims.d.ts +48 -0
- package/package.json +215 -0
- package/retrieval/CHANGELOG.md +1073 -0
- package/retrieval/README.md +71 -0
- package/retrieval/anti-patterns.js +189 -0
- package/retrieval/authoring/index.d.ts +4 -0
- package/retrieval/authoring/index.js +9 -0
- package/retrieval/authoring/web-research.js +220 -0
- package/retrieval/catalog.js +250 -0
- package/retrieval/component-catalog.js +168 -0
- package/retrieval/component-entry.js +80 -0
- package/retrieval/context-assembler.js +174 -0
- package/retrieval/domain-router.js +417 -0
- package/retrieval/embedding/chunk-embedding-retriever.js +117 -0
- package/retrieval/embedding/embedding-provider.js +72 -0
- package/retrieval/embedding/index.d.ts +4 -0
- package/retrieval/embedding/index.js +2 -0
- package/retrieval/feedback/dialog-recorder.js +107 -0
- package/retrieval/feedback/feedback-analyzer.js +180 -0
- package/retrieval/feedback/feedback-store.js +194 -0
- package/retrieval/feedback/feedback.js +117 -0
- package/retrieval/feedback/gap-registry.js +80 -0
- package/retrieval/feedback/human-signal.js +113 -0
- package/retrieval/feedback/index.d.ts +4 -0
- package/retrieval/feedback/index.js +24 -0
- package/retrieval/feedback/submit-feedback.js +45 -0
- package/retrieval/index.d.ts +4 -0
- package/retrieval/index.js +53 -0
- package/retrieval/intent/clarity.js +139 -0
- package/retrieval/intent/decomposer.js +124 -0
- package/retrieval/intent/index.d.ts +4 -0
- package/retrieval/intent/index.js +18 -0
- package/retrieval/intent/intent-alignment.js +172 -0
- package/retrieval/intent/intent-categorizer.js +69 -0
- package/retrieval/intent/intent-gate.js +96 -0
- package/retrieval/intent/prompt-analyzer.js +162 -0
- package/retrieval/wiring-catalog.js +168 -0
- package/validate/catalog-validator.d.ts +4 -0
- package/validate/catalog-validator.js +327 -0
- package/validate/semantic/cache.js +54 -0
- package/validate/semantic/classify-intent.js +128 -0
- package/validate/semantic/index.js +163 -0
- package/validate/semantic/intent-specs.js +162 -0
- package/validate/semantic/judge.js +180 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gen-UI training-chunk library.
|
|
3
|
+
*
|
|
4
|
+
* Loads the harvester's per-chunk JSON records + aggregate index from
|
|
5
|
+
* `packages/gen-ui/corpus/chunks/` into in-memory Maps for fast retrieval.
|
|
6
|
+
*
|
|
7
|
+
* Used by:
|
|
8
|
+
* - packages/a2ui/mcp/server.js — exposes search_chunks / get_chunk / lookup_chunk tools
|
|
9
|
+
* - packages/gen-ui/compose/strategies/zettel/chunk-synthesizer.js — Phase C.2
|
|
10
|
+
*
|
|
11
|
+
* Spec: .claude/docs/specs/genui-chunk-marker.md (Draft v0.1.0).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { readFileSync, readdirSync, existsSync } from 'node:fs';
|
|
15
|
+
import { join, dirname } from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const CHUNKS_DIR = join(__dirname, '..', 'chunks');
|
|
20
|
+
|
|
21
|
+
let _state = null;
|
|
22
|
+
|
|
23
|
+
function load() {
|
|
24
|
+
if (_state) return _state;
|
|
25
|
+
|
|
26
|
+
const indexPath = join(CHUNKS_DIR, '_index.json');
|
|
27
|
+
if (!existsSync(indexPath)) {
|
|
28
|
+
_state = { index: null, chunks: new Map(), byPrimary: new Map(), byKind: new Map() };
|
|
29
|
+
return _state;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const index = JSON.parse(readFileSync(indexPath, 'utf8'));
|
|
33
|
+
const chunks = new Map(); // name → record
|
|
34
|
+
const byPrimary = new Map(); // tagName → Set<name>
|
|
35
|
+
const byKind = new Map(); // kind → Set<name>
|
|
36
|
+
|
|
37
|
+
for (const file of readdirSync(CHUNKS_DIR)) {
|
|
38
|
+
// Underscore-prefixed files are harvester aux records (_index.json,
|
|
39
|
+
// _source-hashes.json), not chunks. The sibling loader
|
|
40
|
+
// (compose/strategies/_shared/chunk-loader.js) applies the same
|
|
41
|
+
// `rec.name` guard — a nameless record would poison the name→record Map.
|
|
42
|
+
if (file.startsWith('_') || !file.endsWith('.json')) continue;
|
|
43
|
+
const rec = JSON.parse(readFileSync(join(CHUNKS_DIR, file), 'utf8'));
|
|
44
|
+
const name = rec.name;
|
|
45
|
+
if (!name) continue;
|
|
46
|
+
chunks.set(name, rec);
|
|
47
|
+
|
|
48
|
+
const primary = rec.primary || rec.instances?.[0]?.primary || 'unknown';
|
|
49
|
+
if (!byPrimary.has(primary)) byPrimary.set(primary, new Set());
|
|
50
|
+
byPrimary.get(primary).add(name);
|
|
51
|
+
|
|
52
|
+
const kind = rec.kind || 'block';
|
|
53
|
+
if (!byKind.has(kind)) byKind.set(kind, new Set());
|
|
54
|
+
byKind.get(kind).add(name);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_state = { index, chunks, byPrimary, byKind };
|
|
58
|
+
return _state;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function getChunk(name) {
|
|
62
|
+
const { chunks } = load();
|
|
63
|
+
return chunks.get(name) || null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Inline `<!-- nested: other-chunk -->` placeholders with the referenced
|
|
68
|
+
* chunk's own HTML, recursively.
|
|
69
|
+
*
|
|
70
|
+
* The harvester splits a page into one chunk per `data-chunk` marker and
|
|
71
|
+
* leaves a comment where a nested marker was. 47 block chunks are such
|
|
72
|
+
* skeletons: `auth-signin-card-password` is a `card-ui` whose entire body is
|
|
73
|
+
* two placeholder comments, so handing it to a consumer verbatim renders an
|
|
74
|
+
* empty card. Resolving the references restores the markup the source page
|
|
75
|
+
* actually shipped.
|
|
76
|
+
*
|
|
77
|
+
* **Page-scoped.** A generic name like `auth-card-header` has 23 instances,
|
|
78
|
+
* one per page that used the marker; the record's first instance belongs to
|
|
79
|
+
* whichever page the harvester read first (the 404 page, as it happens).
|
|
80
|
+
* Only an instance harvested from the SAME page as the parent may be
|
|
81
|
+
* inlined — otherwise the sign-in card fills with 404 copy. With no
|
|
82
|
+
* same-page instance the placeholder comment stays.
|
|
83
|
+
*
|
|
84
|
+
* Cycle- and depth-guarded.
|
|
85
|
+
*/
|
|
86
|
+
export function resolveNestedChunks(html, { page, maxDepth = 4, seen = new Set() } = {}) {
|
|
87
|
+
if (!html || typeof html !== 'string' || maxDepth <= 0) return html || '';
|
|
88
|
+
|
|
89
|
+
const expand = (name) => {
|
|
90
|
+
if (seen.has(name)) return null;
|
|
91
|
+
const nested = getChunk(name);
|
|
92
|
+
if (!nested) return null;
|
|
93
|
+
const samePage = (nested.instances || []).find(
|
|
94
|
+
(i) => samePagePath(i.page, page) || samePagePath(i.source, page),
|
|
95
|
+
);
|
|
96
|
+
const nestedHtml = samePage?.html
|
|
97
|
+
|| (samePagePath(nested.page, page) || samePagePath(nested.source, page) ? nested.html : null);
|
|
98
|
+
if (!nestedHtml) return null;
|
|
99
|
+
return resolveNestedChunks(nestedHtml, {
|
|
100
|
+
page,
|
|
101
|
+
maxDepth: maxDepth - 1,
|
|
102
|
+
seen: new Set([...seen, name]),
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// The placeholder usually sits inside the very element the nested chunk is
|
|
107
|
+
// rooted at (`<header><!-- nested: auth-card-header --></header>`), so a
|
|
108
|
+
// naive splice would double the wrapper. Swap the whole element instead.
|
|
109
|
+
const withHosts = html.replace(
|
|
110
|
+
/<([a-z][a-z0-9-]*)\b[^>]*>\s*<!--\s*nested:\s*([a-z0-9-]+)\s*-->\s*<\/\1>/gi,
|
|
111
|
+
(match, hostTag, name) => {
|
|
112
|
+
const expanded = expand(name);
|
|
113
|
+
if (!expanded) return match;
|
|
114
|
+
const rootTag = expanded.match(/^\s*<([a-z][a-z0-9-]*)/i)?.[1];
|
|
115
|
+
return rootTag?.toLowerCase() === hostTag.toLowerCase() ? expanded : match;
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
return withHosts.replace(/<!--\s*nested:\s*([a-z0-9-]+)\s*-->/gi, (match, name) => expand(name) ?? match);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Compare harvest paths that differ only by a leading slash. */
|
|
123
|
+
function samePagePath(a, b) {
|
|
124
|
+
if (!a || !b) return false;
|
|
125
|
+
return String(a).replace(/^\//, '') === String(b).replace(/^\//, '');
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function getAllChunks() {
|
|
129
|
+
const { chunks } = load();
|
|
130
|
+
return [...chunks.values()];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function getChunkIndex() {
|
|
134
|
+
const { index } = load();
|
|
135
|
+
return index;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function lookupChunksByPrimary(componentName) {
|
|
139
|
+
const { byPrimary, chunks } = load();
|
|
140
|
+
const names = byPrimary.get(componentName);
|
|
141
|
+
if (!names) return [];
|
|
142
|
+
return [...names].map((n) => chunks.get(n)).filter(Boolean);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function listChunksByKind(kind) {
|
|
146
|
+
const { byKind, chunks } = load();
|
|
147
|
+
const names = byKind.get(kind);
|
|
148
|
+
if (!names) return [];
|
|
149
|
+
return [...names].map((n) => chunks.get(n)).filter(Boolean);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Generic UI words that must never be the evidence for a match: every
|
|
154
|
+
* corpus entry is a "form"/"page"/"component", so scoring them full weight
|
|
155
|
+
* ranks by vocabulary noise instead of by subject. Deliberate mirror of
|
|
156
|
+
* `compose/strategies/zettel/composition-library.js`'s `STOP_WORDS` — that
|
|
157
|
+
* module is browser-safe and must not import this node-only one, so the
|
|
158
|
+
* list is copied rather than shared. Change both or neither.
|
|
159
|
+
*/
|
|
160
|
+
export const SEARCH_STOP_WORDS = new Set([
|
|
161
|
+
'a', 'an', 'the', 'and', 'or', 'but', 'of', 'to', 'in', 'on', 'at', 'for', 'with',
|
|
162
|
+
'form', 'forms', 'page', 'pages', 'view', 'views', 'screen', 'screens',
|
|
163
|
+
'ui', 'component', 'components', 'widget', 'widgets', 'block', 'blocks',
|
|
164
|
+
'section', 'sections', 'layout', 'layouts',
|
|
165
|
+
]);
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Crude singularizer so a plural intent word reaches a singular chunk name:
|
|
169
|
+
* "notifications" → `settings-notification-channels-switches`. Applied to
|
|
170
|
+
* both sides of every comparison, so it can only join words that already
|
|
171
|
+
* differ by an "s" — never conflate two distinct concepts.
|
|
172
|
+
*/
|
|
173
|
+
function stem(word) {
|
|
174
|
+
if (word.length > 4 && word.endsWith('ies')) return `${word.slice(0, -3)}y`;
|
|
175
|
+
if (word.length > 3 && word.endsWith('s') && !word.endsWith('ss')) return word.slice(0, -1);
|
|
176
|
+
return word;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The component words a chunk is actually built from — `<table-ui>` → "table".
|
|
181
|
+
* "table of orders" must reach the chunks containing a table, not every chunk
|
|
182
|
+
* whose prose mentions orders. Mirrors the composition ranker's tag-token
|
|
183
|
+
* weight. Cached per record; the corpus is immutable once loaded.
|
|
184
|
+
*/
|
|
185
|
+
const tagWordCache = new WeakMap();
|
|
186
|
+
function componentWords(rec) {
|
|
187
|
+
let words = tagWordCache.get(rec);
|
|
188
|
+
if (words) return words;
|
|
189
|
+
const html = rec.html || rec.instances?.[0]?.html || '';
|
|
190
|
+
words = new Set(
|
|
191
|
+
[...String(html).matchAll(/<([a-z][a-z0-9]*(?:-[a-z0-9]+)+)[\s>]/gi)]
|
|
192
|
+
.map((m) => stem(m[1].toLowerCase().replace(/-ui$/, '').replace(/-/g, ''))),
|
|
193
|
+
);
|
|
194
|
+
tagWordCache.set(rec, words);
|
|
195
|
+
return words;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Keyword scoring over chunk metadata. Used as the floor when embeddings
|
|
200
|
+
* are unavailable AND blended into the final score when they are.
|
|
201
|
+
*/
|
|
202
|
+
function keywordScore(name, rec, query) {
|
|
203
|
+
const q = query.toLowerCase();
|
|
204
|
+
// Split on everything that isn't alphanumeric: real intents carry
|
|
205
|
+
// punctuation ("split-pane editor: code on the left"), and a token of
|
|
206
|
+
// `editor:` matched no chunk name at all.
|
|
207
|
+
const tokens = q.split(/[^a-z0-9]+/).filter(Boolean);
|
|
208
|
+
// Hyphenated query compounds also match their closed form: "sign-in" →
|
|
209
|
+
// "signin", so the annotation keyword `signin` is reachable from the
|
|
210
|
+
// hyphenated intent wording (and vice versa).
|
|
211
|
+
for (const compound of q.match(/[a-z0-9]+(?:-[a-z0-9]+)+/g) || []) {
|
|
212
|
+
tokens.push(compound.replace(/-/g, ''));
|
|
213
|
+
}
|
|
214
|
+
// Harvested annotations (`data-chunk-keywords` / `data-chunk-description`)
|
|
215
|
+
// exist to make a chunk findable by the words a user actually types. They
|
|
216
|
+
// are whole-word matched only — substring matching here would let one long
|
|
217
|
+
// description outrank a name hit.
|
|
218
|
+
const annotationKeywords = new Set(
|
|
219
|
+
(rec.metadata?.keywords || []).map((k) => stem(String(k).toLowerCase())),
|
|
220
|
+
);
|
|
221
|
+
const descriptionWords = new Set(
|
|
222
|
+
String(rec.metadata?.description || '').toLowerCase()
|
|
223
|
+
.split(/[^a-z0-9]+/).filter(Boolean).map(stem),
|
|
224
|
+
);
|
|
225
|
+
const haystack = [
|
|
226
|
+
name,
|
|
227
|
+
rec.primary || '',
|
|
228
|
+
...(rec.slots || []).map((s) => s.name || ''),
|
|
229
|
+
...(rec.instances?.[0]?.slots || []).map((s) => s.name || ''),
|
|
230
|
+
Object.values(rec.attrs || {}).join(' '),
|
|
231
|
+
].join(' ').toLowerCase();
|
|
232
|
+
|
|
233
|
+
const tagWords = componentWords(rec);
|
|
234
|
+
|
|
235
|
+
const nameWords = name.toLowerCase().split(/[-_]+/).map(stem);
|
|
236
|
+
let score = 0;
|
|
237
|
+
// Boost when the chunk's first word matches any query token (e.g. "dashboard" → dashboard-*).
|
|
238
|
+
// Stop-words are excluded: otherwise every `form-*` chunk out-ranks the actual
|
|
239
|
+
// form composition on the word "form" alone.
|
|
240
|
+
if (tokens.some((tok) => nameWords[0] === stem(tok) && !SEARCH_STOP_WORDS.has(tok))) score += 10;
|
|
241
|
+
if (haystack.includes(q)) score += 5;
|
|
242
|
+
const seen = new Set();
|
|
243
|
+
for (const raw of tokens) {
|
|
244
|
+
const tok = stem(raw);
|
|
245
|
+
if (seen.has(tok)) continue; // a repeated query word scores once
|
|
246
|
+
seen.add(tok);
|
|
247
|
+
const isStop = SEARCH_STOP_WORDS.has(raw) || SEARCH_STOP_WORDS.has(tok);
|
|
248
|
+
if (nameWords.includes(tok)) score += isStop ? 1 : 3; // whole-word match (e.g. pane ≠ panel)
|
|
249
|
+
else if (name.toLowerCase().includes(tok)) score += 1; // substring fallback
|
|
250
|
+
if (haystack.includes(tok)) score += 1;
|
|
251
|
+
if (isStop) continue;
|
|
252
|
+
if (tagWords.has(tok)) score += 2; // built-from-this-component hit
|
|
253
|
+
if (annotationKeywords.has(tok)) score += 2; // authored keyword hit
|
|
254
|
+
else if (descriptionWords.has(tok)) score += 1; // authored description hit
|
|
255
|
+
}
|
|
256
|
+
return score;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Search chunks. Two-mode:
|
|
261
|
+
* - Sync (default): keyword-only scoring; no API calls.
|
|
262
|
+
* - Async (`searchChunksAsync`): blends semantic embedding cosine score
|
|
263
|
+
* (when chunk-embeddings.json + an OPENAI/VOYAGE key are available)
|
|
264
|
+
* with keyword score; falls back to keyword-only on any failure.
|
|
265
|
+
*
|
|
266
|
+
* The sync path is preserved for callers that need a synchronous result
|
|
267
|
+
* (e.g. compose_from_chunks's retrieval-first tier doesn't want to await
|
|
268
|
+
* a network round trip just to short-circuit on a strong keyword hit).
|
|
269
|
+
*/
|
|
270
|
+
export function searchChunks(query, { kind, limit = 20 } = {}) {
|
|
271
|
+
const { chunks } = load();
|
|
272
|
+
if (!query || typeof query !== 'string') return [];
|
|
273
|
+
|
|
274
|
+
const candidates = [];
|
|
275
|
+
for (const [name, rec] of chunks) {
|
|
276
|
+
if (kind && rec.kind !== kind) continue;
|
|
277
|
+
const score = keywordScore(name, rec, query);
|
|
278
|
+
if (score > 0) candidates.push({ name, score, kind: rec.kind, primary: rec.primary });
|
|
279
|
+
}
|
|
280
|
+
// Ties break by name, never by directory-read order: `readdir` is
|
|
281
|
+
// inode-ordered on Linux and alphabetical on macOS, so an arbitrary
|
|
282
|
+
// tie-break made the same query rank differently in CI than locally.
|
|
283
|
+
candidates.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name));
|
|
284
|
+
return candidates.slice(0, limit);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Embedding-blended search. Returns the top `limit` chunks ranked by
|
|
289
|
+
* (keyword + 5×cosine) when embeddings are available; falls back to
|
|
290
|
+
* keyword-only when not. Scoring weights are tuned so a perfect cosine
|
|
291
|
+
* match (1.0) contributes ~5 to the score, comparable to a name-prefix hit.
|
|
292
|
+
*/
|
|
293
|
+
export async function searchChunksAsync(query, { kind, limit = 20 } = {}) {
|
|
294
|
+
const { chunks } = load();
|
|
295
|
+
if (!query || typeof query !== 'string') return [];
|
|
296
|
+
|
|
297
|
+
let cosineByName = null;
|
|
298
|
+
// Env-var override: A2UI_DISABLE_EMBEDDINGS=1 forces keyword-only mode.
|
|
299
|
+
// Used by `npm run eval:diff -- --engine chunk-zettel-fast` and any
|
|
300
|
+
// diagnostic that needs to confirm the keyword path is independently
|
|
301
|
+
// healthy (i.e. retrieval works even when embeddings are stale or
|
|
302
|
+
// missing). Default: embeddings enabled when available.
|
|
303
|
+
const embeddingsDisabled = process.env.A2UI_DISABLE_EMBEDDINGS === '1';
|
|
304
|
+
if (!embeddingsDisabled) {
|
|
305
|
+
try {
|
|
306
|
+
const { scoreAll, available } = await import('../../retrieval/embedding/chunk-embedding-retriever.js');
|
|
307
|
+
if (await available()) {
|
|
308
|
+
cosineByName = await scoreAll(query);
|
|
309
|
+
}
|
|
310
|
+
} catch { /* embeddings unavailable — keyword-only */ }
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const candidates = [];
|
|
314
|
+
for (const [name, rec] of chunks) {
|
|
315
|
+
if (kind && rec.kind !== kind) continue;
|
|
316
|
+
const kw = keywordScore(name, rec, query);
|
|
317
|
+
const cos = cosineByName?.get(name) || 0;
|
|
318
|
+
const blended = kw + cos * 5;
|
|
319
|
+
if (blended > 0) {
|
|
320
|
+
candidates.push({
|
|
321
|
+
name,
|
|
322
|
+
score: blended,
|
|
323
|
+
keywordScore: kw,
|
|
324
|
+
cosineScore: cos,
|
|
325
|
+
kind: rec.kind,
|
|
326
|
+
primary: rec.primary,
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// Ties break by name, never by directory-read order: `readdir` is
|
|
331
|
+
// inode-ordered on Linux and alphabetical on macOS, so an arbitrary
|
|
332
|
+
// tie-break made the same query rank differently in CI than locally.
|
|
333
|
+
candidates.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name));
|
|
334
|
+
return candidates.slice(0, limit);
|
|
335
|
+
}
|
package/node-shims.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal ambient type shims for node: built-in modules.
|
|
3
|
+
* Required because tsconfig.base.json sets "types": [] which suppresses
|
|
4
|
+
* @types/node. Only the symbols actually used by the consuming projects
|
|
5
|
+
* are declared.
|
|
6
|
+
*
|
|
7
|
+
* Consumers: gen-ui/{compose,retrieval,validate} (via `../node-shims.d.ts`)
|
|
8
|
+
* and a2ui/mcp (via `../../gen-ui/node-shims.d.ts`). This lived at
|
|
9
|
+
* packages/a2ui/node-shims.d.ts until ADR-0048 P1 moved retrieval — its
|
|
10
|
+
* original and primary consumer — into @adia-ai/gen-ui. Kept as ONE copy
|
|
11
|
+
* on purpose: two ambient shim files drift silently.
|
|
12
|
+
*
|
|
13
|
+
* This file must NOT contain any import/export statements so it remains
|
|
14
|
+
* a script (ambient declaration file) rather than a module — only ambient
|
|
15
|
+
* module declarations placed in scripts work without TS2664.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
declare module 'node:fs/promises' {
|
|
19
|
+
function readFile(path: string, encoding: string): Promise<string>;
|
|
20
|
+
function writeFile(path: string, data: string): Promise<void>;
|
|
21
|
+
function mkdir(path: string, opts?: { recursive?: boolean }): Promise<string | undefined>;
|
|
22
|
+
function appendFile(path: string, data: string): Promise<void>;
|
|
23
|
+
function readdir(path: string): Promise<string[]>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare module 'node:path' {
|
|
27
|
+
const default_: {
|
|
28
|
+
dirname(p: string): string;
|
|
29
|
+
resolve(...paths: string[]): string;
|
|
30
|
+
join(...paths: string[]): string;
|
|
31
|
+
basename(p: string, ext?: string): string;
|
|
32
|
+
extname(p: string): string;
|
|
33
|
+
};
|
|
34
|
+
export default default_;
|
|
35
|
+
export function dirname(p: string): string;
|
|
36
|
+
export function resolve(...paths: string[]): string;
|
|
37
|
+
export function join(...paths: string[]): string;
|
|
38
|
+
export function basename(p: string, ext?: string): string;
|
|
39
|
+
export function extname(p: string): string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare module 'node:url' {
|
|
43
|
+
export function fileURLToPath(url: string): string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare module 'node:module' {
|
|
47
|
+
export function createRequire(filename: string): { resolve(id: string): string };
|
|
48
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adia-ai/gen-ui",
|
|
3
|
+
"version": "0.8.37",
|
|
4
|
+
"description": "AdiaUI generative-UI system — compose strategies, retrieval, the harvested training corpus, and catalog-aware + LLM-judge validation. Emits A2UI protocol messages; pairs with @adia-ai/a2ui (the protocol runtime). Folded from @adia-ai/a2ui-{compose,retrieval,corpus} + the catalog/semantic halves of the former @adia-ai/a2ui-validator (ADR-0048).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./compose/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./compose/index.d.ts",
|
|
10
|
+
"import": "./compose/index.js",
|
|
11
|
+
"default": "./compose/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./compose": {
|
|
14
|
+
"types": "./compose/index.d.ts",
|
|
15
|
+
"import": "./compose/index.js",
|
|
16
|
+
"default": "./compose/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./compose/core": {
|
|
19
|
+
"types": "./compose/core/generator.d.ts",
|
|
20
|
+
"import": "./compose/core/generator.js",
|
|
21
|
+
"default": "./compose/core/generator.js"
|
|
22
|
+
},
|
|
23
|
+
"./compose/strategies/zettel": {
|
|
24
|
+
"types": "./compose/strategies/zettel/generator-adapter.d.ts",
|
|
25
|
+
"import": "./compose/strategies/zettel/generator-adapter.js",
|
|
26
|
+
"default": "./compose/strategies/zettel/generator-adapter.js"
|
|
27
|
+
},
|
|
28
|
+
"./compose/strategies/registry": {
|
|
29
|
+
"types": "./compose/strategies/registry.d.ts",
|
|
30
|
+
"import": "./compose/strategies/registry.js",
|
|
31
|
+
"default": "./compose/strategies/registry.js"
|
|
32
|
+
},
|
|
33
|
+
"./compose/strategies/cascade": {
|
|
34
|
+
"types": "./compose/strategies/cascade.d.ts",
|
|
35
|
+
"import": "./compose/strategies/cascade.js",
|
|
36
|
+
"default": "./compose/strategies/cascade.js"
|
|
37
|
+
},
|
|
38
|
+
"./compose/strategies/escalation": {
|
|
39
|
+
"types": "./compose/strategies/escalation.d.ts",
|
|
40
|
+
"import": "./compose/strategies/escalation.js",
|
|
41
|
+
"default": "./compose/strategies/escalation.js"
|
|
42
|
+
},
|
|
43
|
+
"./compose/transpiler": {
|
|
44
|
+
"types": "./compose/transpiler/transpiler.d.ts",
|
|
45
|
+
"import": "./compose/transpiler/transpiler.js",
|
|
46
|
+
"default": "./compose/transpiler/transpiler.js"
|
|
47
|
+
},
|
|
48
|
+
"./compose/evals": {
|
|
49
|
+
"types": "./compose/evals/harness.d.ts",
|
|
50
|
+
"import": "./compose/evals/harness.mjs",
|
|
51
|
+
"default": "./compose/evals/harness.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./compose/core/*": {
|
|
54
|
+
"types": "./compose/core/*.d.ts",
|
|
55
|
+
"import": "./compose/core/*.js",
|
|
56
|
+
"default": "./compose/core/*.js"
|
|
57
|
+
},
|
|
58
|
+
"./compose/strategies/*": {
|
|
59
|
+
"types": "./compose/strategies/*.d.ts",
|
|
60
|
+
"import": "./compose/strategies/*.js",
|
|
61
|
+
"default": "./compose/strategies/*.js"
|
|
62
|
+
},
|
|
63
|
+
"./compose/shared/*": {
|
|
64
|
+
"types": "./compose/shared/*.d.ts",
|
|
65
|
+
"import": "./compose/shared/*.js",
|
|
66
|
+
"default": "./compose/shared/*.js"
|
|
67
|
+
},
|
|
68
|
+
"./compose/transpiler/*": {
|
|
69
|
+
"types": "./compose/transpiler/*.d.ts",
|
|
70
|
+
"import": "./compose/transpiler/*.js",
|
|
71
|
+
"default": "./compose/transpiler/*.js"
|
|
72
|
+
},
|
|
73
|
+
"./retrieval": {
|
|
74
|
+
"types": "./retrieval/index.d.ts",
|
|
75
|
+
"import": "./retrieval/index.js",
|
|
76
|
+
"default": "./retrieval/index.js"
|
|
77
|
+
},
|
|
78
|
+
"./retrieval/intent": {
|
|
79
|
+
"types": "./retrieval/intent/index.d.ts",
|
|
80
|
+
"import": "./retrieval/intent/index.js",
|
|
81
|
+
"default": "./retrieval/intent/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./retrieval/intent/*": {
|
|
84
|
+
"types": "./retrieval/intent/*.d.ts",
|
|
85
|
+
"import": "./retrieval/intent/*.js",
|
|
86
|
+
"default": "./retrieval/intent/*.js"
|
|
87
|
+
},
|
|
88
|
+
"./retrieval/embedding": {
|
|
89
|
+
"types": "./retrieval/embedding/index.d.ts",
|
|
90
|
+
"import": "./retrieval/embedding/index.js",
|
|
91
|
+
"default": "./retrieval/embedding/index.js"
|
|
92
|
+
},
|
|
93
|
+
"./retrieval/embedding/*": {
|
|
94
|
+
"types": "./retrieval/embedding/*.d.ts",
|
|
95
|
+
"import": "./retrieval/embedding/*.js",
|
|
96
|
+
"default": "./retrieval/embedding/*.js"
|
|
97
|
+
},
|
|
98
|
+
"./retrieval/feedback": {
|
|
99
|
+
"types": "./retrieval/feedback/index.d.ts",
|
|
100
|
+
"import": "./retrieval/feedback/index.js",
|
|
101
|
+
"default": "./retrieval/feedback/index.js"
|
|
102
|
+
},
|
|
103
|
+
"./retrieval/feedback/*": {
|
|
104
|
+
"types": "./retrieval/feedback/*.d.ts",
|
|
105
|
+
"import": "./retrieval/feedback/*.js",
|
|
106
|
+
"default": "./retrieval/feedback/*.js"
|
|
107
|
+
},
|
|
108
|
+
"./retrieval/authoring": {
|
|
109
|
+
"types": "./retrieval/authoring/index.d.ts",
|
|
110
|
+
"import": "./retrieval/authoring/index.js",
|
|
111
|
+
"default": "./retrieval/authoring/index.js"
|
|
112
|
+
},
|
|
113
|
+
"./retrieval/authoring/*": {
|
|
114
|
+
"types": "./retrieval/authoring/*.d.ts",
|
|
115
|
+
"import": "./retrieval/authoring/*.js",
|
|
116
|
+
"default": "./retrieval/authoring/*.js"
|
|
117
|
+
},
|
|
118
|
+
"./retrieval/*": {
|
|
119
|
+
"types": "./retrieval/*.d.ts",
|
|
120
|
+
"import": "./retrieval/*.js",
|
|
121
|
+
"default": "./retrieval/*.js"
|
|
122
|
+
},
|
|
123
|
+
"./corpus": {
|
|
124
|
+
"types": "./corpus/catalog-a2ui_0_9.d.ts",
|
|
125
|
+
"import": "./corpus/catalog-a2ui_0_9.json",
|
|
126
|
+
"default": "./corpus/catalog-a2ui_0_9.json"
|
|
127
|
+
},
|
|
128
|
+
"./corpus/manifest": {
|
|
129
|
+
"types": "./corpus/manifest.d.ts",
|
|
130
|
+
"import": "./corpus/manifest.json",
|
|
131
|
+
"default": "./corpus/manifest.json"
|
|
132
|
+
},
|
|
133
|
+
"./corpus/chunks": {
|
|
134
|
+
"types": "./corpus/chunks/_index.d.ts",
|
|
135
|
+
"import": "./corpus/chunks/_index.json",
|
|
136
|
+
"default": "./corpus/chunks/_index.json"
|
|
137
|
+
},
|
|
138
|
+
"./corpus/chunks/*": {
|
|
139
|
+
"types": "./corpus/chunks/*.d.ts",
|
|
140
|
+
"import": "./corpus/chunks/*",
|
|
141
|
+
"default": "./corpus/chunks/*"
|
|
142
|
+
},
|
|
143
|
+
"./corpus/chunk-library": {
|
|
144
|
+
"types": "./corpus/scripts/chunk-library.d.ts",
|
|
145
|
+
"import": "./corpus/scripts/chunk-library.js",
|
|
146
|
+
"default": "./corpus/scripts/chunk-library.js"
|
|
147
|
+
},
|
|
148
|
+
"./corpus/chunk-embeddings": {
|
|
149
|
+
"types": "./corpus/chunk-embeddings.d.ts",
|
|
150
|
+
"import": "./corpus/chunk-embeddings.json",
|
|
151
|
+
"default": "./corpus/chunk-embeddings.json"
|
|
152
|
+
},
|
|
153
|
+
"./validate/catalog": {
|
|
154
|
+
"types": "./validate/catalog-validator.d.ts",
|
|
155
|
+
"import": "./validate/catalog-validator.js",
|
|
156
|
+
"default": "./validate/catalog-validator.js"
|
|
157
|
+
},
|
|
158
|
+
"./validate/semantic": {
|
|
159
|
+
"types": "./validate/semantic/index.d.ts",
|
|
160
|
+
"import": "./validate/semantic/index.js",
|
|
161
|
+
"default": "./validate/semantic/index.js"
|
|
162
|
+
},
|
|
163
|
+
"./validate/semantic/*": {
|
|
164
|
+
"types": "./validate/semantic/*.d.ts",
|
|
165
|
+
"import": "./validate/semantic/*.js",
|
|
166
|
+
"default": "./validate/semantic/*.js"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"files": [
|
|
170
|
+
"compose/core/",
|
|
171
|
+
"compose/strategies/",
|
|
172
|
+
"compose/shared/",
|
|
173
|
+
"compose/evals/",
|
|
174
|
+
"compose/transpiler/",
|
|
175
|
+
"compose/index.js",
|
|
176
|
+
"retrieval/*.js",
|
|
177
|
+
"retrieval/intent/",
|
|
178
|
+
"retrieval/embedding/",
|
|
179
|
+
"retrieval/feedback/",
|
|
180
|
+
"retrieval/authoring/",
|
|
181
|
+
"corpus/catalog-a2ui_0_9.json",
|
|
182
|
+
"corpus/catalog-a2ui_0_9_rules.txt",
|
|
183
|
+
"corpus/manifest.json",
|
|
184
|
+
"corpus/chunks/",
|
|
185
|
+
"corpus/chunk-embeddings.json",
|
|
186
|
+
"corpus/scripts/chunk-library.js",
|
|
187
|
+
"validate/catalog-validator.js",
|
|
188
|
+
"validate/semantic/",
|
|
189
|
+
"README.md",
|
|
190
|
+
"CHANGELOG.md",
|
|
191
|
+
"!**/*.ts",
|
|
192
|
+
"**/*.d.ts",
|
|
193
|
+
"!**/*.test.js"
|
|
194
|
+
],
|
|
195
|
+
"license": "MIT",
|
|
196
|
+
"publishConfig": {
|
|
197
|
+
"access": "public",
|
|
198
|
+
"registry": "https://registry.npmjs.org"
|
|
199
|
+
},
|
|
200
|
+
"repository": {
|
|
201
|
+
"type": "git",
|
|
202
|
+
"url": "git+https://github.com/adiahealth/gen-ui-kit.git",
|
|
203
|
+
"directory": "packages/gen-ui"
|
|
204
|
+
},
|
|
205
|
+
"dependencies": {
|
|
206
|
+
"@adia-ai/agent": "^0.8.0",
|
|
207
|
+
"@adia-ai/a2ui": "^0.8.0",
|
|
208
|
+
"@adia-ai/llm": "^0.8.0",
|
|
209
|
+
"ajv": "^8.0.0",
|
|
210
|
+
"ajv-formats": "^3.0.0"
|
|
211
|
+
},
|
|
212
|
+
"devDependencies": {
|
|
213
|
+
"@genui/producer": "*"
|
|
214
|
+
}
|
|
215
|
+
}
|