@almadar/std 16.253.0 → 16.255.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/behaviors/lolo/agent/atoms/std-agent-pool.lolo +355 -0
- package/behaviors/lolo/agent/evals/eval-agent-builder.lolo +159 -0
- package/behaviors/lolo/agent/organisms/std-agent-builder.lolo +321 -26
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/agent/atoms/std-agent-context.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-memory.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-planner.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-pool.orb +1 -0
- package/behaviors/registry/agent/atoms/std-agent-proposal.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-session.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-suggestions.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +1 -1
- package/behaviors/registry/agent/atoms/std-agent-trace.orb +1 -1
- package/behaviors/registry/agent/evals/eval-agent-builder.orb +1 -0
- package/behaviors/registry/agent/organisms/std-agent-assistant.orb +1 -1
- package/behaviors/registry/agent/organisms/std-agent-builder.orb +1 -1
- package/behaviors/registry/infra/atoms/std-analytics.orb +1 -1
- package/behaviors/registry/infra/atoms/std-approval-gate.orb +1 -1
- package/behaviors/registry/infra/atoms/std-audit-capture.orb +1 -1
- package/behaviors/registry/infra/atoms/std-cache-aside.orb +1 -1
- package/behaviors/registry/infra/atoms/std-calendar-sync.orb +1 -1
- package/behaviors/registry/infra/atoms/std-cascade-on-delete.orb +1 -1
- package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +1 -1
- package/behaviors/registry/infra/atoms/std-cross-reference.orb +1 -1
- package/behaviors/registry/infra/atoms/std-data-erasure.orb +1 -1
- package/behaviors/registry/infra/atoms/std-data-import.orb +1 -1
- package/behaviors/registry/infra/atoms/std-global-search.orb +1 -1
- package/behaviors/registry/infra/atoms/std-knowledge-loop.orb +1 -1
- package/behaviors/registry/infra/atoms/std-lifecycle.orb +1 -1
- package/behaviors/registry/infra/atoms/std-migration-job.orb +1 -1
- package/behaviors/registry/infra/atoms/std-mod-queue.orb +1 -1
- package/behaviors/registry/infra/atoms/std-notification-center.orb +1 -1
- package/behaviors/registry/infra/atoms/std-notification-preferences.orb +1 -1
- package/behaviors/registry/infra/atoms/std-notify-on-event.orb +1 -1
- package/behaviors/registry/infra/atoms/std-page-search.orb +1 -1
- package/behaviors/registry/infra/atoms/std-page-watch.orb +1 -1
- package/behaviors/registry/infra/atoms/std-permission-matrix.orb +1 -1
- package/behaviors/registry/infra/atoms/std-rate-limiter.orb +1 -1
- package/behaviors/registry/infra/atoms/std-reminder-scheduler.orb +1 -1
- package/behaviors/registry/infra/atoms/std-review-cycle.orb +1 -1
- package/behaviors/registry/infra/atoms/std-row-access-control.orb +1 -1
- package/behaviors/registry/infra/atoms/std-status-lifecycle.orb +1 -1
- package/behaviors/registry/infra/organisms/std-status-lifecycle-control.orb +1 -1
- package/behaviors/registry/ml/atoms/std-data-collector.orb +1 -1
- package/behaviors/registry/ml/atoms/std-graph-builder.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-classify.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-exact-check.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-infer.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-label-capture.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-lookup.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-posterior.orb +1 -1
- package/behaviors/registry/ml/atoms/std-ml-similarity.orb +1 -1
- package/behaviors/registry/ml/atoms/std-tokenizer.orb +1 -1
- package/behaviors/registry/ml/atoms/std-weight-validator.orb +1 -1
- package/behaviors/registry/ml/organisms/std-escalating-decision.orb +1 -1
- package/behaviors/registry/ml/organisms/std-knowledge-tracing.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/std-avl-cosmic-zoom.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-avl-glyph.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-avl-transition-detail.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-avl-transition-explainer.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-behavior-view.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +1 -1
- package/behaviors/registry/ui/avl/organisms/ui-flow-canvas.orb +1 -1
- package/behaviors/registry/ui/avl/organisms/ui-layers-panel.orb +1 -1
- package/behaviors/registry/ui/avl/organisms/ui-orb-inspector.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-app-layout.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-app-search.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-behavior-catalog.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-behavior-tour.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-board.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-book-reader.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-browse.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-calendar.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-card-grid.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-confirmation.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-date-range.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-doc-page.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-esign-request.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-event-log.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-export.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-file-store.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-filter.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-gallery.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-gantt-schedule.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-geosearch.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-graphs.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-hero.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-home.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-import.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-language-picker.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-media-section.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-modal-editor.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-modal.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-multi-party-flow.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-notification-panel.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-panel-launcher.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-pricing.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-proof.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-prose.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-rating-review.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-record-detail.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-recurrence.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-related.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-role-gate.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-saved-search.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-scatter.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-scoped-list.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-search.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-selection.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-site-footer.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-site-header.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-slide-deck.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-stat-band.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-stats.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-step-flow.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-steps.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-tabs.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-tag-strip.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-thread.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-tree.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-version-history.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-wizard.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-workspace-layout.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-animated-graphic.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-animated-reveal.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-aside.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-atlas-image.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-atlas-panel.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-avatar.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-badge.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-box.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-button.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-card.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-center.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-checkbox.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-conditional-wrapper.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-confetti-effect.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-day-cell.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-dialog.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-divider.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-filter-pill.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-flip-container.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-game-icon.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-hstack.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-icon.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-image.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-infinite-scroll-sentinel.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-input.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-label.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-law-reference-tooltip.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-overlay.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-pattern-tile.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-presence.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-progress-bar.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-radio.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-range-slider.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-section-header.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-select.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-spacer.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-sparkline.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-spinner.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-stack.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-status-dot.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-branch.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-connection.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-flow.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-grid.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-lobe.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-mesh.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-morph.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-node.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-pulse.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-ring.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-shield.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-svg-stack.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-switch.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-text-highlight.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-textarea.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-theme-toggle.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-time-slot-cell.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-trend-indicator.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-typewriter-text.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-video-embed.orb +1 -1
- package/behaviors/registry/ui/core/atoms/ui-vstack.orb +1 -1
- package/behaviors/registry/ui/core/molecules/std-stat-rows.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-accordion.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-activation-block.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-activity-rail.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-agent-activity-feed.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-agent-activity-row.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-agent-chat-feed.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-alert.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-animated-counter.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-bloom-quiz-block.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-branching-logic-builder.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-breadcrumb.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-carousel.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-change-list.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-chart-legend.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-chart.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-code-block.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-command-palette.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-confirm-dialog.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-connection-block.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-container.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-content-renderer.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-data-list.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-date-range-picker.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-date-range-selector.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-doc-breadcrumb.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-doc-pagination.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-doc-search.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-doc-sidebar.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-doc-toc.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-document-details.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-document-viewer.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-drawer.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-edge-decoration.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-emoji-picker.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-empty-state.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-error-boundary.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-error-state.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-feature-card.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-feature-grid.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-file-tree.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-filter-group.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-flex.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-flip-card.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-floating-action-button.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-form-actions.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-form-field.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-form-layout.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-form-section-header.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-fx-overlay.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-gantt.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-geometric-pattern.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-gradient-divider.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-graph-canvas.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-graph-view.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-grid.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-header.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-icon-button.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-import-progress.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-import-source-picker.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-input-group.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-jazari-state-machine.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-lightbox.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-likert-scale.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-line-chart.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-loading-state.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-map-view.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-markdown-content.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-matrix-question.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-menu.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-meter.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-modal.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-navigation.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-notification.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-number-stepper.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-option-constraint-group.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-orbital-visualization.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-page-header.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-page-transition.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-pagination.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-popover.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-positioned-canvas.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-progress-dots.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-pull-to-refresh.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-qr-scanner.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-quiz-block.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-reflection-block.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-relation-select.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-repeatable-form-section.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-reply-tree.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-rich-text-editor.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-scaled-diagram.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-search-input.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-section.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-side-panel.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-sidebar.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-signature-pad.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-simple-grid.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-skeleton.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-social-proof.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-sortable-list.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-split.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-star-rating.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-stat-display.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-swipeable-row.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-table-view.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-tabs.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-tag-input.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-tooltip.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-top-nav-item.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-upload-drop-zone.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-version-diff.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-violation-alert.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-vote-stack.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-wizard-container.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-wizard-navigation.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-wizard-progress.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-chat-bar.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-code-runner-panel.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-dashboard-grid.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-dock-layout.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-drawer-slot.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-form-section.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-form.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-master-detail-layout.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-modal-slot.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-runtime-debugger.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-split-pane.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-stat-card.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-state-machine-view.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-subagent-trace-panel.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-tabbed-container.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-timeline.orb +1 -1
- package/behaviors/registry/ui/core/organisms/ui-toast-slot.orb +1 -1
- package/behaviors/registry/ui/core/templates/ui-auth-layout.orb +1 -1
- package/behaviors/registry/ui/core/templates/ui-counter-template.orb +1 -1
- package/behaviors/registry/ui/core/templates/ui-dashboard-layout.orb +1 -1
- package/behaviors/registry/ui/core/templates/ui-generic-app-template.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-arcade-play.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-area-fill.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-audio-cue.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-camera-rig.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-chase-ai.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-choice-gate.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-coef-pad.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-curve-fog.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-fx-narrative.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-fx-trail.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-gate-lock.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-gather.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-gold.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-grid-tactics.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-hero-nav.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-lives.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-loop-lock.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-motion-body.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-objective-reach.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-pad-lock.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-patience.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-patrol-hazard.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-pickup.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-platformer-body.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-production.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-score.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-tutorial-autodemo.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-tutorial-overlay.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-velocity-gate.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-xp.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-zone-card.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-action-palette.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-action-tile.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-canvas-2d.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-canvas.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-choice-button.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-control-button.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-control-grid.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-dialogue-bubble.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-fx-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-group.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-mesh.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-shape-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-shape.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-skinned-mesh.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-sprite-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-sprite.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-text-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-text.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-game-audio-cue.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-game-audio-toggle.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-game-hud.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-game-menu.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-health-bar.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-score-display.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-sequence-bar.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-stat-badge.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-state-graph.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-state-json-view.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-timer-display.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-trait-slot.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +1 -1
- package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +1 -1
- package/behaviors/registry/ui/game/templates/ui-game-shell.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-fx-cues.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-generate.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-param-explorer.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-sample-accumulator.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-slope-probe.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +1 -1
- package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1 -1
- package/dist/behaviors-embeddings.hash.json +2 -2
- package/dist/behaviors-embeddings.json +1 -1
- package/dist/knob-embeddings.hash.json +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"std-data-import","version":"1.0.0","description":"std-data-import — staged CSV import run, source-agnostic: upload → staged review → confirm → parse+map → handoff. UPLOAD_CSV opens a run and persists an ImportBatch row (status uploaded, fieldMappingJson recorded verbatim for provenance); once the batch row is persisted the atom parses the picked file's text with csv/parse and stages it itself with STAGE_ROWS, one JSON string per raw row (a host that parses elsewhere may still answer STAGE_ROWS directly), which the atom bulk-persists into import_rows against the batch id and presents as a staged review (row/error counts + Confirm/Discard). CONFIRM_IMPORT marks the batch confirmed, emits IMPORT_CONFIRMED { batchId, sourceName, rowCount }, and fetches the batch's staged rows; on fetch success the atom parses each rowJson via json/parse, remaps keys through the batch's mappingJson, and emits IMPORT_ROWS_PARSED { batchId, rows, failed } — the persist half is the CONSUMER organism's: it listens for IMPORT_ROWS_PARSED and persists the mapped rows into its own target entity (cross-atom persist into a consumer's entity is not expressible from here). This is deliberately the CSV-file path: the atom never calls a source service — sourceName/fieldMappingJson/targetEntity are consumer configs, and any persist failure marks the batch row failed and fires IMPORT_FAILED, never a silent swallow. Compose with std-import for the file-picker menu.","orbitals":[{"name":"DataImportOrbital","id":"orb_SEGZ912B1W5GY5WTV9HCN7PA23","entity":{"name":"ImportBatch","id":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT","collection":"import_batches","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"sourceName","type":"string","default":"","description":"Free-form name of the upstream source this run imported from.","synonyms":"source, origin, provider name"},{"name":"status","type":"string","default":"uploaded","values":["uploaded","staged","confirmed","failed"],"description":"Lifecycle position of the import run."},{"name":"rowCount","type":"number","default":0,"description":"Number of rows staged for review.","synonyms":"rows, staged count, record count"},{"name":"errorCount","type":"number","default":0,"description":"Number of rows the host parser flagged with errors during staging.","synonyms":"errors, failed rows, parse errors"},{"name":"mappingJson","type":"string","default":"{}","description":"Source-column → target-field mapping (JSON string), recorded verbatim from config for provenance; the atom applies it when parsing staged rows on confirm.","synonyms":"field mapping, column mapping, mapping"},{"name":"createdAt","type":"number","default":0,"description":"Run start timestamp."},{"name":"pendingCsv","type":"string","default":"","intrinsic":true,"description":"The picked file's CSV text, held from UPLOAD_CSV until the batch row is persisted and the rows are staged.","synonyms":"uploaded file text"}]},"auxiliaryEntities":[{"name":"ImportRow","id":"ent_5SB17CT6A7353GW3JV6TP3RNAN","collection":"import_rows","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"batchId","type":"string","default":"","description":"ImportBatch id this staged row belongs to.","synonyms":"batch, import run, parent batch"},{"name":"rowJson","type":"string","default":"{}","description":"The raw parsed CSV row as a JSON string (source shape, pre-mapping). The consumer maps it into its own entity shape after confirm.","synonyms":"row, raw row, staged row, record json"},{"name":"status","type":"string","default":"staged","values":["staged","imported","failed"],"description":"staged = awaiting confirm; imported = the consumer persisted it into the target entity; failed = rejected."}]}],"traits":[{"name":"DataImportLifecycle","id":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57","entityRebindable":true,"entityContract":{"requires":[],"provides":["errorCount","mappingJson","pendingCsv","rowCount","sourceName","status"]},"effectRow":[{"kind":"emit","resource":"IMPORT_CONFIRMED"},{"kind":"emit","resource":"IMPORT_FAILED"},{"kind":"emit","resource":"IMPORT_ROWS_PARSED"},{"kind":"emit","resource":"STAGE_ROWS"},{"kind":"fetch","resource":"ImportRow"},{"kind":"persist","resource":"ImportBatch"},{"kind":"persist","resource":"ImportRow"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.createdAt"},{"kind":"set","resource":"@entity.errorCount"},{"kind":"set","resource":"@entity.id"},{"kind":"set","resource":"@entity.mappingJson"},{"kind":"set","resource":"@entity.pendingCsv"},{"kind":"set","resource":"@entity.rowCount"},{"kind":"set","resource":"@entity.sourceName"},{"kind":"set","resource":"@entity.status"}],"category":"lifecycle","capabilities":["import"],"linkedEntity":"ImportBatch","linkedEntityId":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT","entityRefIds":{"ImportRow":"ent_5SB17CT6A7353GW3JV6TP3RNAN","ImportBatch":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT"},"emits":[{"event":"STAGE_ROWS","eventId":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","description":"The uploaded file's text was parsed into rows (csv/parse): rows carries one JSON string per data row, keyed by the header row (raw source shape, pre-mapping). The atom bulk-persists them and opens the staged review.","tier":"internal","payloadSchema":[{"name":"rows","type":"[string]","required":true},{"name":"errorCount","type":"number"}]},{"event":"BATCH_CREATED","eventId":"evt_2QEKRZBASWNCY96V0S56K8JMSR","description":"import_batches persist-create success — rebinds @entity.id to the server-issued id, the fallback for when the host didn't mint a client-side batchId on UPLOAD_CSV","tier":"secondary","payloadSchema":[{"name":"id","type":"string","required":true}]},{"event":"ROWS_STAGED","eventId":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196","description":"import_rows bulk persist-create success signal — payload carries the persisted rows flat; the atom never reads it (self-loop only)","tier":"secondary"},{"event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","description":"Any import_batches / import_rows persist failure — the batch row is updated to failed and IMPORT_FAILED emitted, never a silent swallow; the trait stays put so the user can retry or discard","tier":"secondary","payloadSchema":[{"name":"error","type":"string","required":true}]},{"event":"IMPORT_CONFIRMED","eventId":"evt_F8B9HZSQBKVNSX2V6A81REDMZN","description":"The user confirmed the staged review and the batch row is persisted as confirmed. The atom then fetches the batch's staged rows, parses and key-maps them, and emits IMPORT_ROWS_PARSED for the consumer's persist half.","synonyms":"import confirmed, commit import, accept staged rows, approve import","tier":"domain","scope":"external","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"sourceName","type":"string"},{"name":"rowCount","type":"number"}]},{"event":"IMPORT_ROWS_FETCHED","eventId":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","description":"import_rows collection-fetch success on confirm — payload carries every staged row flat; the atom filters to @entity.id by batchId in the IMPORT_ROWS_PARSED arm (self-loop only)","tier":"secondary","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"batchId","type":"string"},{"name":"rowJson","type":"string"},{"name":"status","type":"string","values":["staged","imported","failed"]}],"entity":"ImportRow"}]},{"event":"IMPORT_ROWS_PARSED","eventId":"evt_X7PNG6W82B415MB00SVFPT3RDZ","description":"Confirmed rows parsed and key-mapped: each staged row's rowJson was parsed via json/parse and remapped through the batch's mappingJson; failed counts rows whose rowJson did not parse to an object (surfaced, never dropped). The consumer persists rows into its own target entity and marks them imported.","synonyms":"rows parsed, rows mapped, import rows ready","tier":"domain","scope":"external","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"failed","type":"number"},{"name":"rows","type":"[ImportCells]"},{"name":"targetEntity","type":"string"}]},{"event":"IMPORT_FAILED","eventId":"evt_46GFM38PM6BA328XXYQSZ3Y66X","description":"The run failed (persist failure or empty staging); error carries the detail and the batch row was updated to failed","synonyms":"import failed, upload failed, staging failed","tier":"domain","scope":"external","payloadSchema":[{"name":"batchId","type":"string"},{"name":"error","type":"string","required":true}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true},{"name":"uploaded"},{"name":"staged"},{"name":"confirmed"},{"name":"failed"}],"events":[{"key":"INIT","id":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","name":"Initialize"},{"key":"UPLOAD_CSV","id":"evt_FRYWGMEHMJ8T98YBRSH9S14PSS","name":"Upload Csv","description":"Starts an import run for a CSV file upload, fired by the idle state's own upload-drop-zone affordance. batchId is the client-minted batch id (idempotent upload — the host generates it so a retry never double-creates a batch); when omitted, the server-issued id is bound on BATCH_CREATED instead. files carries the picked file(s) (name/size/type/content, content as UTF-8 text); the first file's text is parsed with csv/parse and staged once the batch row is persisted.","synonyms":"upload csv, import csv, start import, import file, bulk import","tier":"domain","payloadSchema":[{"name":"batchId","type":"string"},{"name":"sourceName","type":"string"},{"name":"files","type":"[object]","required":true,"properties":[{"name":"name","type":"string","required":true},{"name":"size","type":"number"},{"name":"type","type":"string"},{"name":"content","type":"string"}]}],"listened":true},{"key":"BATCH_CREATED","id":"evt_2QEKRZBASWNCY96V0S56K8JMSR","name":"Batch Created","description":"import_batches persist-create success — rebinds @entity.id to the server-issued id, the fallback for when the host didn't mint a client-side batchId on UPLOAD_CSV","tier":"secondary","payloadSchema":[{"name":"id","type":"string","required":true}]},{"key":"STAGE_ROWS","id":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","name":"Stage Rows","description":"The uploaded file's text was parsed into rows (csv/parse): rows carries one JSON string per data row, keyed by the header row (raw source shape, pre-mapping). The atom bulk-persists them and opens the staged review.","tier":"internal","payloadSchema":[{"name":"rows","type":"[string]","required":true},{"name":"errorCount","type":"number"}],"listened":true},{"key":"IMPORT_PERSIST_FAILED","id":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","name":"Import Persist Failed","description":"Any import_batches / import_rows persist failure — the batch row is updated to failed and IMPORT_FAILED emitted, never a silent swallow; the trait stays put so the user can retry or discard","tier":"secondary","payloadSchema":[{"name":"error","type":"string","required":true}]},{"key":"DISCARD_IMPORT","id":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","name":"Discard Import","description":"The user discarded the staged run before confirm; the batch row stays for provenance.","tier":"internal","listened":true},{"key":"ROWS_STAGED","id":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196","name":"Rows Staged","description":"import_rows bulk persist-create success signal — payload carries the persisted rows flat; the atom never reads it (self-loop only)","tier":"secondary"},{"key":"CONFIRM_IMPORT","id":"evt_C6E77W43CD1P6XJE265910CS1P","name":"Confirm Import","description":"The user approved the staged review; the batch is marked confirmed, IMPORT_CONFIRMED fires, and the atom parses+maps the staged rows into IMPORT_ROWS_PARSED for the consumer's persist half.","synonyms":"confirm import, approve staged rows, accept import","tier":"domain","listened":true},{"key":"IMPORT_ROWS_FETCHED","id":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","name":"Import Rows Fetched","description":"import_rows collection-fetch success on confirm — payload carries every staged row flat; the atom filters to @entity.id by batchId in the IMPORT_ROWS_PARSED arm (self-loop only)","tier":"secondary","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"batchId","type":"string"},{"name":"rowJson","type":"string"},{"name":"status","type":"string","values":["staged","imported","failed"]}],"entity":"ImportRow"}]},{"key":"RESET","id":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","name":"Reset","description":"Returns the atom to idle from a terminal state","tier":"internal","listened":true},{"key":"IMPORT_CONFIRMED","id":"evt_F8B9HZSQBKVNSX2V6A81REDMZN","name":"Import Confirmed","description":"The user confirmed the staged review and the batch row is persisted as confirmed. The atom then fetches the batch's staged rows, parses and key-maps them, and emits IMPORT_ROWS_PARSED for the consumer's persist half.","synonyms":"import confirmed, commit import, accept staged rows, approve import","tier":"domain","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"sourceName","type":"string"},{"name":"rowCount","type":"number"}]},{"key":"IMPORT_ROWS_PARSED","id":"evt_X7PNG6W82B415MB00SVFPT3RDZ","name":"Import Rows Parsed","description":"Confirmed rows parsed and key-mapped: each staged row's rowJson was parsed via json/parse and remapped through the batch's mappingJson; failed counts rows whose rowJson did not parse to an object (surfaced, never dropped). The consumer persists rows into its own target entity and marks them imported.","synonyms":"rows parsed, rows mapped, import rows ready","tier":"domain","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"failed","type":"number"},{"name":"rows","type":"[ImportCells]"},{"name":"targetEntity","type":"string"}]},{"key":"IMPORT_FAILED","id":"evt_46GFM38PM6BA328XXYQSZ3Y66X","name":"Import Failed","description":"The run failed (persist failure or empty staging); error carries the detail and the batch row was updated to failed","synonyms":"import failed, upload failed, staging failed","tier":"domain","payloadSchema":[{"name":"batchId","type":"string"},{"name":"error","type":"string","required":true}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"idle","to":"uploaded","event":"UPLOAD_CSV","eventId":"evt_FRYWGMEHMJ8T98YBRSH9S14PSS","effects":[["set","@entity.id","@payload.batchId"],["set","@entity.pendingCsv",["str/default",["object/get",["array/first","@payload.files"],"content"],""]],["set","@entity.sourceName",["or","@payload.sourceName","@config.sourceName"]],["set","@entity.status","uploaded"],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.createdAt",["time/now"]],["persist","create","ImportBatch",{"createdAt":"@entity.createdAt","errorCount":0,"id":"@entity.id","mappingJson":"@entity.mappingJson","rowCount":0,"sourceName":"@entity.sourceName","status":"uploaded"},{"emit":{"failure":"IMPORT_PERSIST_FAILED","success":"BATCH_CREATED"}}]]},{"from":"uploaded","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"uploaded","to":"uploaded","event":"BATCH_CREATED","eventId":"evt_2QEKRZBASWNCY96V0S56K8JMSR","effects":[["set","@entity.id","@payload.id"],["render-ui","main",{"message":["str/concat","Import started — ","@entity.sourceName",". Staging the file's rows."],"type":"alert","variant":"info"}],["emit","STAGE_ROWS",{"rows":["array/map",["csv/parse","@entity.pendingCsv"],["fn","r",["json/stringify","@r"]]]}]]},{"from":"uploaded","to":"staged","event":"STAGE_ROWS","eventId":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","guard":[">",["array/len","@payload.rows"],0],"effects":[["set","@entity.rowCount",["array/len","@payload.rows"]],["set","@entity.errorCount",["or","@payload.errorCount",0]],["set","@entity.status","staged"],["persist","create","ImportRow",["array/map","@payload.rows",["fn","r",{"batchId":"@entity.id","rowJson":"@r","status":"staged"}]],{"emit":{"failure":"IMPORT_PERSIST_FAILED","success":"ROWS_STAGED"}}],["persist","update","ImportBatch",{"errorCount":"@entity.errorCount","id":"@entity.id","rowCount":"@entity.rowCount","status":"staged"}],["render-ui","main",{"children":[{"content":["str/concat","Review staged import — ","@entity.sourceName"],"type":"typography","variant":"h3"},{"label":"Rows staged","type":"stat-display","value":"@entity.rowCount"},{"label":"Rows with errors","type":"stat-display","value":"@entity.errorCount"},{"children":[{"action":"CONFIRM_IMPORT","label":"Confirm import","type":"button","variant":"primary"},{"action":"DISCARD_IMPORT","label":"Discard","type":"button","variant":"ghost"}],"direction":"horizontal","gap":"sm","type":"stack"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"uploaded","to":"failed","event":"STAGE_ROWS","eventId":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","guard":["<",["array/len","@payload.rows"],1],"effects":[["set","@entity.status","failed"],["persist","update","ImportBatch",{"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"The file parsed to zero rows — nothing to stage."}],["render-ui","main",{"message":"The file parsed to zero rows — nothing to stage.","type":"alert","variant":"error"}]]},{"from":"uploaded","to":"uploaded","event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","effects":[["set","@entity.status","failed"],["set","@entity.errorCount",1],["persist","update","ImportBatch",{"errorCount":1,"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"@payload.error"}],["render-ui","main",{"message":"@payload.error","type":"alert","variant":"error"}]]},{"from":"uploaded","to":"idle","event":"DISCARD_IMPORT","eventId":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0]]},{"from":"staged","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"staged","to":"staged","event":"ROWS_STAGED","eventId":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196"},{"from":"staged","to":"confirmed","event":"CONFIRM_IMPORT","eventId":"evt_C6E77W43CD1P6XJE265910CS1P","effects":[["set","@entity.status","confirmed"],["persist","update","ImportBatch",{"id":"@entity.id","status":"confirmed"}],["render-ui","main",{"message":"Import confirmed — staged rows are ready for mapping.","type":"alert","variant":"success"}],["emit","IMPORT_CONFIRMED",{"batchId":"@entity.id","rowCount":"@entity.rowCount","sourceName":"@entity.sourceName"}],["fetch","ImportRow",{"emit":{"failure":"IMPORT_PERSIST_FAILED","success":"IMPORT_ROWS_FETCHED"}}]]},{"from":"staged","to":"staged","event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","effects":[["set","@entity.status","failed"],["set","@entity.errorCount",1],["persist","update","ImportBatch",{"errorCount":1,"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"@payload.error"}],["render-ui","main",{"message":"@payload.error","type":"alert","variant":"error"}]]},{"from":"staged","to":"idle","event":"DISCARD_IMPORT","eventId":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["render-ui","main",null]]},{"from":"confirmed","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"confirmed","to":"confirmed","event":"IMPORT_ROWS_FETCHED","eventId":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","effects":[["emit","IMPORT_ROWS_PARSED",{"batchId":"@entity.id","failed":["array/len",["array/filter","@payload.data",["fn","row",["and",["=",["object/get","@row","batchId"],"@entity.id"],["not",["validate/object",["json/parse",["object/get","@row","rowJson"],"ImportCells"]]]]]]],"rows":["array/map",["array/filter","@payload.data",["fn","row",["and",["=",["object/get","@row","batchId"],"@entity.id"],["validate/object",["json/parse",["object/get","@row","rowJson"],"ImportCells"]]]]],["fn","row",["object/mapKeys",["json/parse",["object/get","@row","rowJson"],"ImportCells"],["fn","k",["if",["object/has",["json/parse","@entity.mappingJson","ImportCells"],"@k"],["object/get",["json/parse","@entity.mappingJson","ImportCells"],"@k"],"@k"]]]]],"targetEntity":"@config.targetEntity"}]]},{"from":"confirmed","to":"confirmed","event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","effects":[["set","@entity.status","failed"],["set","@entity.errorCount",1],["persist","update","ImportBatch",{"errorCount":1,"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"@payload.error"}],["render-ui","main",{"message":"@payload.error","type":"alert","variant":"error"}]]},{"from":"confirmed","to":"idle","event":"RESET","eventId":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["render-ui","main",null]]},{"from":"confirmed","to":"confirmed","event":"IMPORT_CONFIRMED","eventId":"evt_F8B9HZSQBKVNSX2V6A81REDMZN"},{"from":"confirmed","to":"confirmed","event":"IMPORT_ROWS_PARSED","eventId":"evt_X7PNG6W82B415MB00SVFPT3RDZ"},{"from":"failed","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"failed","to":"idle","event":"RESET","eventId":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["render-ui","main",null]]},{"from":"failed","to":"failed","event":"IMPORT_FAILED","eventId":"evt_46GFM38PM6BA328XXYQSZ3Y66X"}]},"config":{"targetEntity":{"type":"string","default":"","label":"Target entity","description":"Name of the consumer organism's entity the staged rows land in after confirm. Carried on IMPORT_ROWS_PARSED so the consumer's persist half knows where the mapped rows belong — the atom never writes the target entity itself.","synonyms":"destination, import into, target type","tier":"domain"},"sourceName":{"type":"string","default":"","label":"Source name","description":"Free-form name of the upstream source this import pulls from — whatever tool or file export the user names. Recorded on the batch row for provenance and echoed on IMPORT_CONFIRMED.","synonyms":"source, origin, import from, provider name, data source","tier":"domain"},"fieldMappingJson":{"type":"string","default":"{}","label":"Field mapping (JSON)","description":"JSON object mapping source CSV column names to target field names. Stored verbatim on the batch row (mappingJson); the atom applies it when it parses staged rows into IMPORT_ROWS_PARSED, so the consumer persists already-mapped rows into the target entity.","synonyms":"field mapping, column mapping, map columns, remap fields, csv columns","tier":"domain"}},"scope":"instance"}],"pages":[{"name":"DataImportPage","id":"pag_JM5BRF67NH3TRGDED50XT4CY1N","path":"/data-import","traits":[{"ref":"DataImportLifecycle","refId":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"}]}],"types":{"DataImportFile":[{"name":"name","type":"string","required":true},{"name":"size","type":"number"},{"name":"type","type":"string"},{"name":"content","type":"string"}],"ImportCells":[{"name":"","type":"Map<string,string>"}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_5SB17CT6A7353GW3JV6TP3RNAN":{"id":"ent_5SB17CT6A7353GW3JV6TP3RNAN","kind":"entity","bakedName":"ImportRow","curName":"ImportRow","renames":[],"owner":"workspace"},"ent_G6S5K88SXKCYSS9WF2S8C6MSKT":{"id":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT","kind":"entity","bakedName":"ImportBatch","curName":"ImportBatch","renames":[],"owner":"workspace"},"evt_2QEKRZBASWNCY96V0S56K8JMSR":{"id":"evt_2QEKRZBASWNCY96V0S56K8JMSR","kind":"event","bakedName":"BATCH_CREATED","curName":"BATCH_CREATED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_46GFM38PM6BA328XXYQSZ3Y66X":{"id":"evt_46GFM38PM6BA328XXYQSZ3Y66X","kind":"event","bakedName":"IMPORT_FAILED","curName":"IMPORT_FAILED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_C6E77W43CD1P6XJE265910CS1P":{"id":"evt_C6E77W43CD1P6XJE265910CS1P","kind":"event","bakedName":"CONFIRM_IMPORT","curName":"CONFIRM_IMPORT","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ":{"id":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_DTW788N9X3MYHJ7B7VVDM62T9R":{"id":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","kind":"event","bakedName":"IMPORT_PERSIST_FAILED","curName":"IMPORT_PERSIST_FAILED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_F8B9HZSQBKVNSX2V6A81REDMZN":{"id":"evt_F8B9HZSQBKVNSX2V6A81REDMZN","kind":"event","bakedName":"IMPORT_CONFIRMED","curName":"IMPORT_CONFIRMED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_FRYWGMEHMJ8T98YBRSH9S14PSS":{"id":"evt_FRYWGMEHMJ8T98YBRSH9S14PSS","kind":"event","bakedName":"UPLOAD_CSV","curName":"UPLOAD_CSV","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_KQSJH13B4FNJ7Z94GK8PQWX238":{"id":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","kind":"event","bakedName":"DISCARD_IMPORT","curName":"DISCARD_IMPORT","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W":{"id":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","kind":"event","bakedName":"IMPORT_ROWS_FETCHED","curName":"IMPORT_ROWS_FETCHED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_N2Z4345XGKYR9PAD2RDVYJW9YG":{"id":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196":{"id":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196","kind":"event","bakedName":"ROWS_STAGED","curName":"ROWS_STAGED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD":{"id":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","kind":"event","bakedName":"STAGE_ROWS","curName":"STAGE_ROWS","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_X7PNG6W82B415MB00SVFPT3RDZ":{"id":"evt_X7PNG6W82B415MB00SVFPT3RDZ","kind":"event","bakedName":"IMPORT_ROWS_PARSED","curName":"IMPORT_ROWS_PARSED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"orb_SEGZ912B1W5GY5WTV9HCN7PA23":{"id":"orb_SEGZ912B1W5GY5WTV9HCN7PA23","kind":"orbital","bakedName":"DataImportOrbital","curName":"DataImportOrbital","renames":[],"owner":"workspace"},"pag_JM5BRF67NH3TRGDED50XT4CY1N":{"id":"pag_JM5BRF67NH3TRGDED50XT4CY1N","kind":"page","bakedName":"DataImportPage","curName":"DataImportPage","renames":[],"owner":"workspace"},"trt_K0FQPGV5RSJWCPHYS16PFXSZ57":{"id":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57","kind":"trait","bakedName":"DataImportLifecycle","curName":"DataImportLifecycle","renames":[],"owner":"workspace"}}}}
|
|
1
|
+
{"name":"std-data-import","version":"1.0.0","description":"std-data-import — staged CSV import run, source-agnostic: upload → staged review → confirm → parse+map → handoff. UPLOAD_CSV opens a run and persists an ImportBatch row (status uploaded, fieldMappingJson recorded verbatim for provenance); once the batch row is persisted the atom parses the picked file's text with csv/parse and stages it itself with STAGE_ROWS, one JSON string per raw row (a host that parses elsewhere may still answer STAGE_ROWS directly), which the atom bulk-persists into import_rows against the batch id and presents as a staged review (row/error counts + Confirm/Discard). CONFIRM_IMPORT marks the batch confirmed, emits IMPORT_CONFIRMED { batchId, sourceName, rowCount }, and fetches the batch's staged rows; on fetch success the atom parses each rowJson via json/parse, remaps keys through the batch's mappingJson, and emits IMPORT_ROWS_PARSED { batchId, rows, failed } — the persist half is the CONSUMER organism's: it listens for IMPORT_ROWS_PARSED and persists the mapped rows into its own target entity (cross-atom persist into a consumer's entity is not expressible from here). This is deliberately the CSV-file path: the atom never calls a source service — sourceName/fieldMappingJson/targetEntity are consumer configs, and any persist failure marks the batch row failed and fires IMPORT_FAILED, never a silent swallow. Compose with std-import for the file-picker menu.","orbitals":[{"name":"DataImportOrbital","id":"orb_SEGZ912B1W5GY5WTV9HCN7PA23","entity":{"name":"ImportBatch","id":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT","collection":"import_batches","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"sourceName","type":"string","default":"","description":"Free-form name of the upstream source this run imported from.","synonyms":"source, origin, provider name"},{"name":"status","type":"string","default":"uploaded","values":["uploaded","staged","confirmed","failed"],"description":"Lifecycle position of the import run."},{"name":"rowCount","type":"number","default":0,"description":"Number of rows staged for review.","synonyms":"rows, staged count, record count"},{"name":"errorCount","type":"number","default":0,"description":"Number of rows the host parser flagged with errors during staging.","synonyms":"errors, failed rows, parse errors"},{"name":"mappingJson","type":"string","default":"{}","description":"Source-column → target-field mapping (JSON string), recorded verbatim from config for provenance; the atom applies it when parsing staged rows on confirm.","synonyms":"field mapping, column mapping, mapping"},{"name":"createdAt","type":"number","default":0,"description":"Run start timestamp."},{"name":"pendingCsv","type":"string","default":"","intrinsic":true,"description":"The picked file's CSV text, held from UPLOAD_CSV until the batch row is persisted and the rows are staged.","synonyms":"uploaded file text"}]},"auxiliaryEntities":[{"name":"ImportRow","id":"ent_5SB17CT6A7353GW3JV6TP3RNAN","collection":"import_rows","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"batchId","type":"string","default":"","description":"ImportBatch id this staged row belongs to.","synonyms":"batch, import run, parent batch"},{"name":"rowJson","type":"string","default":"{}","description":"The raw parsed CSV row as a JSON string (source shape, pre-mapping). The consumer maps it into its own entity shape after confirm.","synonyms":"row, raw row, staged row, record json"},{"name":"status","type":"string","default":"staged","values":["staged","imported","failed"],"description":"staged = awaiting confirm; imported = the consumer persisted it into the target entity; failed = rejected."}]}],"traits":[{"name":"DataImportLifecycle","id":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57","entityRebindable":true,"entityContract":{"requires":[],"provides":["errorCount","mappingJson","pendingCsv","rowCount","sourceName","status"]},"effectRow":[{"kind":"emit","resource":"IMPORT_CONFIRMED"},{"kind":"emit","resource":"IMPORT_FAILED"},{"kind":"emit","resource":"IMPORT_ROWS_PARSED"},{"kind":"emit","resource":"STAGE_ROWS"},{"kind":"fetch","resource":"ImportRow"},{"kind":"persist","resource":"ImportBatch"},{"kind":"persist","resource":"ImportRow"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.createdAt"},{"kind":"set","resource":"@entity.errorCount"},{"kind":"set","resource":"@entity.id"},{"kind":"set","resource":"@entity.mappingJson"},{"kind":"set","resource":"@entity.pendingCsv"},{"kind":"set","resource":"@entity.rowCount"},{"kind":"set","resource":"@entity.sourceName"},{"kind":"set","resource":"@entity.status"}],"category":"lifecycle","capabilities":["import"],"linkedEntity":"ImportBatch","linkedEntityId":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT","entityRefIds":{"ImportRow":"ent_5SB17CT6A7353GW3JV6TP3RNAN","ImportBatch":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT"},"emits":[{"event":"STAGE_ROWS","eventId":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","description":"The uploaded file's text was parsed into rows (csv/parse): rows carries one JSON string per data row, keyed by the header row (raw source shape, pre-mapping). The atom bulk-persists them and opens the staged review.","tier":"internal","payloadSchema":[{"name":"rows","type":"[string]","required":true},{"name":"errorCount","type":"number"}]},{"event":"BATCH_CREATED","eventId":"evt_2QEKRZBASWNCY96V0S56K8JMSR","description":"import_batches persist-create success — rebinds @entity.id to the server-issued id, the fallback for when the host didn't mint a client-side batchId on UPLOAD_CSV","tier":"secondary","payloadSchema":[{"name":"id","type":"string","required":true}]},{"event":"ROWS_STAGED","eventId":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196","description":"import_rows bulk persist-create success signal — payload carries the persisted rows flat; the atom never reads it (self-loop only)","tier":"secondary"},{"event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","description":"Any import_batches / import_rows persist failure — the batch row is updated to failed and IMPORT_FAILED emitted, never a silent swallow; the trait stays put so the user can retry or discard","tier":"secondary","payloadSchema":[{"name":"error","type":"string","required":true}]},{"event":"IMPORT_CONFIRMED","eventId":"evt_F8B9HZSQBKVNSX2V6A81REDMZN","description":"The user confirmed the staged review and the batch row is persisted as confirmed. The atom then fetches the batch's staged rows, parses and key-maps them, and emits IMPORT_ROWS_PARSED for the consumer's persist half.","synonyms":"import confirmed, commit import, accept staged rows, approve import","tier":"domain","scope":"external","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"sourceName","type":"string"},{"name":"rowCount","type":"number"}]},{"event":"IMPORT_ROWS_FETCHED","eventId":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","description":"import_rows collection-fetch success on confirm — payload carries every staged row flat; the atom filters to @entity.id by batchId in the IMPORT_ROWS_PARSED arm (self-loop only)","tier":"secondary","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"batchId","type":"string"},{"name":"rowJson","type":"string"},{"name":"status","type":"string","values":["staged","imported","failed"]}],"entity":"ImportRow"}]},{"event":"IMPORT_ROWS_PARSED","eventId":"evt_X7PNG6W82B415MB00SVFPT3RDZ","description":"Confirmed rows parsed and key-mapped: each staged row's rowJson was parsed via json/parse and remapped through the batch's mappingJson; failed counts rows whose rowJson did not parse to an object (surfaced, never dropped). The consumer persists rows into its own target entity and marks them imported.","synonyms":"rows parsed, rows mapped, import rows ready","tier":"domain","scope":"external","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"failed","type":"number"},{"name":"rows","type":"[ImportCells]"},{"name":"targetEntity","type":"string"}]},{"event":"IMPORT_FAILED","eventId":"evt_46GFM38PM6BA328XXYQSZ3Y66X","description":"The run failed (persist failure or empty staging); error carries the detail and the batch row was updated to failed","synonyms":"import failed, upload failed, staging failed","tier":"domain","scope":"external","payloadSchema":[{"name":"batchId","type":"string"},{"name":"error","type":"string","required":true}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true},{"name":"uploaded"},{"name":"staged"},{"name":"confirmed"},{"name":"failed"}],"events":[{"key":"INIT","id":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","name":"Initialize"},{"key":"UPLOAD_CSV","id":"evt_FRYWGMEHMJ8T98YBRSH9S14PSS","name":"Upload Csv","description":"Starts an import run for a CSV file upload, fired by the idle state's own upload-drop-zone affordance. batchId is the client-minted batch id (idempotent upload — the host generates it so a retry never double-creates a batch); when omitted, the server-issued id is bound on BATCH_CREATED instead. files carries the picked file(s) (name/size/type/content, content as UTF-8 text); the first file's text is parsed with csv/parse and staged once the batch row is persisted.","synonyms":"upload csv, import csv, start import, import file, bulk import","tier":"domain","payloadSchema":[{"name":"batchId","type":"string"},{"name":"sourceName","type":"string"},{"name":"files","type":"[object]","required":true,"properties":[{"name":"name","type":"string","required":true},{"name":"size","type":"number"},{"name":"type","type":"string"},{"name":"content","type":"string"}]}],"listened":true},{"key":"BATCH_CREATED","id":"evt_2QEKRZBASWNCY96V0S56K8JMSR","name":"Batch Created","description":"import_batches persist-create success — rebinds @entity.id to the server-issued id, the fallback for when the host didn't mint a client-side batchId on UPLOAD_CSV","tier":"secondary","payloadSchema":[{"name":"id","type":"string","required":true}]},{"key":"STAGE_ROWS","id":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","name":"Stage Rows","description":"The uploaded file's text was parsed into rows (csv/parse): rows carries one JSON string per data row, keyed by the header row (raw source shape, pre-mapping). The atom bulk-persists them and opens the staged review.","tier":"internal","payloadSchema":[{"name":"rows","type":"[string]","required":true},{"name":"errorCount","type":"number"}],"listened":true},{"key":"IMPORT_PERSIST_FAILED","id":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","name":"Import Persist Failed","description":"Any import_batches / import_rows persist failure — the batch row is updated to failed and IMPORT_FAILED emitted, never a silent swallow; the trait stays put so the user can retry or discard","tier":"secondary","payloadSchema":[{"name":"error","type":"string","required":true}]},{"key":"DISCARD_IMPORT","id":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","name":"Discard Import","description":"The user discarded the staged run before confirm; the batch row stays for provenance.","tier":"internal","listened":true},{"key":"ROWS_STAGED","id":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196","name":"Rows Staged","description":"import_rows bulk persist-create success signal — payload carries the persisted rows flat; the atom never reads it (self-loop only)","tier":"secondary"},{"key":"CONFIRM_IMPORT","id":"evt_C6E77W43CD1P6XJE265910CS1P","name":"Confirm Import","description":"The user approved the staged review; the batch is marked confirmed, IMPORT_CONFIRMED fires, and the atom parses+maps the staged rows into IMPORT_ROWS_PARSED for the consumer's persist half.","synonyms":"confirm import, approve staged rows, accept import","tier":"domain","listened":true},{"key":"IMPORT_ROWS_FETCHED","id":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","name":"Import Rows Fetched","description":"import_rows collection-fetch success on confirm — payload carries every staged row flat; the atom filters to @entity.id by batchId in the IMPORT_ROWS_PARSED arm (self-loop only)","tier":"secondary","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"batchId","type":"string"},{"name":"rowJson","type":"string"},{"name":"status","type":"string","values":["staged","imported","failed"]}],"entity":"ImportRow"}]},{"key":"RESET","id":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","name":"Reset","description":"Returns the atom to idle from a terminal state","tier":"internal","listened":true},{"key":"IMPORT_CONFIRMED","id":"evt_F8B9HZSQBKVNSX2V6A81REDMZN","name":"Import Confirmed","description":"The user confirmed the staged review and the batch row is persisted as confirmed. The atom then fetches the batch's staged rows, parses and key-maps them, and emits IMPORT_ROWS_PARSED for the consumer's persist half.","synonyms":"import confirmed, commit import, accept staged rows, approve import","tier":"domain","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"sourceName","type":"string"},{"name":"rowCount","type":"number"}]},{"key":"IMPORT_ROWS_PARSED","id":"evt_X7PNG6W82B415MB00SVFPT3RDZ","name":"Import Rows Parsed","description":"Confirmed rows parsed and key-mapped: each staged row's rowJson was parsed via json/parse and remapped through the batch's mappingJson; failed counts rows whose rowJson did not parse to an object (surfaced, never dropped). The consumer persists rows into its own target entity and marks them imported.","synonyms":"rows parsed, rows mapped, import rows ready","tier":"domain","payloadSchema":[{"name":"batchId","type":"string","required":true},{"name":"failed","type":"number"},{"name":"rows","type":"[ImportCells]"},{"name":"targetEntity","type":"string"}]},{"key":"IMPORT_FAILED","id":"evt_46GFM38PM6BA328XXYQSZ3Y66X","name":"Import Failed","description":"The run failed (persist failure or empty staging); error carries the detail and the batch row was updated to failed","synonyms":"import failed, upload failed, staging failed","tier":"domain","payloadSchema":[{"name":"batchId","type":"string"},{"name":"error","type":"string","required":true}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"idle","to":"uploaded","event":"UPLOAD_CSV","eventId":"evt_FRYWGMEHMJ8T98YBRSH9S14PSS","effects":[["set","@entity.id","@payload.batchId"],["set","@entity.pendingCsv",["str/default",["object/get",["array/first","@payload.files"],"content"],""]],["set","@entity.sourceName",["or","@payload.sourceName","@config.sourceName"]],["set","@entity.status","uploaded"],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.createdAt",["time/now"]],["persist","create","ImportBatch",{"createdAt":"@entity.createdAt","errorCount":0,"id":"@entity.id","mappingJson":"@entity.mappingJson","rowCount":0,"sourceName":"@entity.sourceName","status":"uploaded"},{"emit":{"failure":"IMPORT_PERSIST_FAILED","success":"BATCH_CREATED"}}]]},{"from":"uploaded","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"uploaded","to":"uploaded","event":"BATCH_CREATED","eventId":"evt_2QEKRZBASWNCY96V0S56K8JMSR","effects":[["set","@entity.id","@payload.id"],["render-ui","main",{"message":["str/concat","Import started — ","@entity.sourceName",". Staging the file's rows."],"type":"alert","variant":"info"}],["emit","STAGE_ROWS",{"rows":["array/map",["csv/parse","@entity.pendingCsv"],["fn","r",["json/stringify","@r"]]]}]]},{"from":"uploaded","to":"staged","event":"STAGE_ROWS","eventId":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","guard":[">",["array/len","@payload.rows"],0],"effects":[["set","@entity.rowCount",["array/len","@payload.rows"]],["set","@entity.errorCount",["or","@payload.errorCount",0]],["set","@entity.status","staged"],["persist","create","ImportRow",["array/map","@payload.rows",["fn","r",{"batchId":"@entity.id","rowJson":"@r","status":"staged"}]],{"emit":{"failure":"IMPORT_PERSIST_FAILED","success":"ROWS_STAGED"}}],["persist","update","ImportBatch",{"errorCount":"@entity.errorCount","id":"@entity.id","rowCount":"@entity.rowCount","status":"staged"}],["render-ui","main",{"children":[{"content":["str/concat","Review staged import — ","@entity.sourceName"],"type":"typography","variant":"h3"},{"label":"Rows staged","type":"stat-display","value":"@entity.rowCount"},{"label":"Rows with errors","type":"stat-display","value":"@entity.errorCount"},{"children":[{"action":"CONFIRM_IMPORT","label":"Confirm import","type":"button","variant":"primary"},{"action":"DISCARD_IMPORT","label":"Discard","type":"button","variant":"ghost"}],"direction":"horizontal","gap":"sm","type":"stack"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"uploaded","to":"failed","event":"STAGE_ROWS","eventId":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","guard":["<",["array/len","@payload.rows"],1],"effects":[["set","@entity.status","failed"],["persist","update","ImportBatch",{"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"The file parsed to zero rows — nothing to stage."}],["render-ui","main",{"message":"The file parsed to zero rows — nothing to stage.","type":"alert","variant":"error"}]]},{"from":"uploaded","to":"uploaded","event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","effects":[["set","@entity.status","failed"],["set","@entity.errorCount",1],["persist","update","ImportBatch",{"errorCount":1,"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"@payload.error"}],["render-ui","main",{"message":"@payload.error","type":"alert","variant":"error"}]]},{"from":"uploaded","to":"idle","event":"DISCARD_IMPORT","eventId":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0]]},{"from":"staged","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"staged","to":"staged","event":"ROWS_STAGED","eventId":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196"},{"from":"staged","to":"confirmed","event":"CONFIRM_IMPORT","eventId":"evt_C6E77W43CD1P6XJE265910CS1P","effects":[["set","@entity.status","confirmed"],["persist","update","ImportBatch",{"id":"@entity.id","status":"confirmed"}],["render-ui","main",{"message":"Import confirmed — staged rows are ready for mapping.","type":"alert","variant":"success"}],["emit","IMPORT_CONFIRMED",{"batchId":"@entity.id","rowCount":"@entity.rowCount","sourceName":"@entity.sourceName"}],["fetch","ImportRow",{"emit":{"failure":"IMPORT_PERSIST_FAILED","success":"IMPORT_ROWS_FETCHED"}}]]},{"from":"staged","to":"staged","event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","effects":[["set","@entity.status","failed"],["set","@entity.errorCount",1],["persist","update","ImportBatch",{"errorCount":1,"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"@payload.error"}],["render-ui","main",{"message":"@payload.error","type":"alert","variant":"error"}]]},{"from":"staged","to":"idle","event":"DISCARD_IMPORT","eventId":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["render-ui","main",null]]},{"from":"confirmed","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"confirmed","to":"confirmed","event":"IMPORT_ROWS_FETCHED","eventId":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","effects":[["emit","IMPORT_ROWS_PARSED",{"batchId":"@entity.id","failed":["array/len",["array/filter","@payload.data",["fn","row",["and",["=",["object/get","@row","batchId"],"@entity.id"],["not",["validate/object",["json/parse",["object/get","@row","rowJson"],"ImportCells"]]]]]]],"rows":["array/map",["array/filter","@payload.data",["fn","row",["and",["=",["object/get","@row","batchId"],"@entity.id"],["validate/object",["json/parse",["object/get","@row","rowJson"],"ImportCells"]]]]],["fn","row",["object/mapKeys",["json/parse",["object/get","@row","rowJson"],"ImportCells"],["fn","k",["if",["object/has",["json/parse","@entity.mappingJson","ImportCells"],"@k"],["object/get",["json/parse","@entity.mappingJson","ImportCells"],"@k"],"@k"]]]]],"targetEntity":"@config.targetEntity"}]]},{"from":"confirmed","to":"confirmed","event":"IMPORT_PERSIST_FAILED","eventId":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","effects":[["set","@entity.status","failed"],["set","@entity.errorCount",1],["persist","update","ImportBatch",{"errorCount":1,"id":"@entity.id","status":"failed"}],["emit","IMPORT_FAILED",{"batchId":"@entity.id","error":"@payload.error"}],["render-ui","main",{"message":"@payload.error","type":"alert","variant":"error"}]]},{"from":"confirmed","to":"idle","event":"RESET","eventId":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["render-ui","main",null]]},{"from":"confirmed","to":"confirmed","event":"IMPORT_CONFIRMED","eventId":"evt_F8B9HZSQBKVNSX2V6A81REDMZN"},{"from":"confirmed","to":"confirmed","event":"IMPORT_ROWS_PARSED","eventId":"evt_X7PNG6W82B415MB00SVFPT3RDZ"},{"from":"failed","to":"idle","event":"INIT","eventId":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","effects":[["set","@entity.sourceName","@config.sourceName"],["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["set","@entity.mappingJson","@config.fieldMappingJson"],["set","@entity.createdAt",0],["render-ui","main",{"children":[{"content":["str/concat","Import ","@entity.sourceName"],"type":"typography","variant":"h3"},{"accept":".csv,text/csv","action":"UPLOAD_CSV","description":"Drop a CSV file here or click to browse","icon":"upload","label":"Upload CSV file","maxFiles":1,"readAs":"text","type":"upload-drop-zone"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"failed","to":"idle","event":"RESET","eventId":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","effects":[["set","@entity.status","uploaded"],["set","@entity.rowCount",0],["set","@entity.errorCount",0],["render-ui","main",null]]},{"from":"failed","to":"failed","event":"IMPORT_FAILED","eventId":"evt_46GFM38PM6BA328XXYQSZ3Y66X"}]},"config":{"targetEntity":{"type":"string","default":"","label":"Target entity","description":"Name of the consumer organism's entity the staged rows land in after confirm. Carried on IMPORT_ROWS_PARSED so the consumer's persist half knows where the mapped rows belong — the atom never writes the target entity itself.","synonyms":"destination, import into, target type","tier":"domain"},"fieldMappingJson":{"type":"string","default":"{}","label":"Field mapping (JSON)","description":"JSON object mapping source CSV column names to target field names. Stored verbatim on the batch row (mappingJson); the atom applies it when it parses staged rows into IMPORT_ROWS_PARSED, so the consumer persists already-mapped rows into the target entity.","synonyms":"field mapping, column mapping, map columns, remap fields, csv columns","tier":"domain"},"sourceName":{"type":"string","default":"","label":"Source name","description":"Free-form name of the upstream source this import pulls from — whatever tool or file export the user names. Recorded on the batch row for provenance and echoed on IMPORT_CONFIRMED.","synonyms":"source, origin, import from, provider name, data source","tier":"domain"}},"scope":"instance"}],"pages":[{"name":"DataImportPage","id":"pag_JM5BRF67NH3TRGDED50XT4CY1N","path":"/data-import","traits":[{"ref":"DataImportLifecycle","refId":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"}]}],"types":{"DataImportFile":[{"name":"name","type":"string","required":true},{"name":"size","type":"number"},{"name":"type","type":"string"},{"name":"content","type":"string"}],"ImportCells":[{"name":"","type":"Map<string,string>"}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_5SB17CT6A7353GW3JV6TP3RNAN":{"id":"ent_5SB17CT6A7353GW3JV6TP3RNAN","kind":"entity","bakedName":"ImportRow","curName":"ImportRow","renames":[],"owner":"workspace"},"ent_G6S5K88SXKCYSS9WF2S8C6MSKT":{"id":"ent_G6S5K88SXKCYSS9WF2S8C6MSKT","kind":"entity","bakedName":"ImportBatch","curName":"ImportBatch","renames":[],"owner":"workspace"},"evt_2QEKRZBASWNCY96V0S56K8JMSR":{"id":"evt_2QEKRZBASWNCY96V0S56K8JMSR","kind":"event","bakedName":"BATCH_CREATED","curName":"BATCH_CREATED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_46GFM38PM6BA328XXYQSZ3Y66X":{"id":"evt_46GFM38PM6BA328XXYQSZ3Y66X","kind":"event","bakedName":"IMPORT_FAILED","curName":"IMPORT_FAILED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_C6E77W43CD1P6XJE265910CS1P":{"id":"evt_C6E77W43CD1P6XJE265910CS1P","kind":"event","bakedName":"CONFIRM_IMPORT","curName":"CONFIRM_IMPORT","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ":{"id":"evt_CX4CEK1KGYSRF0M3DQCKA6G6DQ","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_DTW788N9X3MYHJ7B7VVDM62T9R":{"id":"evt_DTW788N9X3MYHJ7B7VVDM62T9R","kind":"event","bakedName":"IMPORT_PERSIST_FAILED","curName":"IMPORT_PERSIST_FAILED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_F8B9HZSQBKVNSX2V6A81REDMZN":{"id":"evt_F8B9HZSQBKVNSX2V6A81REDMZN","kind":"event","bakedName":"IMPORT_CONFIRMED","curName":"IMPORT_CONFIRMED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_FRYWGMEHMJ8T98YBRSH9S14PSS":{"id":"evt_FRYWGMEHMJ8T98YBRSH9S14PSS","kind":"event","bakedName":"UPLOAD_CSV","curName":"UPLOAD_CSV","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_KQSJH13B4FNJ7Z94GK8PQWX238":{"id":"evt_KQSJH13B4FNJ7Z94GK8PQWX238","kind":"event","bakedName":"DISCARD_IMPORT","curName":"DISCARD_IMPORT","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W":{"id":"evt_KR35J5QS8BWM5Z8J4W2DE2VB3W","kind":"event","bakedName":"IMPORT_ROWS_FETCHED","curName":"IMPORT_ROWS_FETCHED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_N2Z4345XGKYR9PAD2RDVYJW9YG":{"id":"evt_N2Z4345XGKYR9PAD2RDVYJW9YG","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196":{"id":"evt_RV3CGTA8PQ4BBW6T6ZFZK7T196","kind":"event","bakedName":"ROWS_STAGED","curName":"ROWS_STAGED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD":{"id":"evt_S35Y9AEPVABDN4V5JKNRZ0EWAD","kind":"event","bakedName":"STAGE_ROWS","curName":"STAGE_ROWS","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"evt_X7PNG6W82B415MB00SVFPT3RDZ":{"id":"evt_X7PNG6W82B415MB00SVFPT3RDZ","kind":"event","bakedName":"IMPORT_ROWS_PARSED","curName":"IMPORT_ROWS_PARSED","renames":[],"owner":"workspace","parent":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57"},"orb_SEGZ912B1W5GY5WTV9HCN7PA23":{"id":"orb_SEGZ912B1W5GY5WTV9HCN7PA23","kind":"orbital","bakedName":"DataImportOrbital","curName":"DataImportOrbital","renames":[],"owner":"workspace"},"pag_JM5BRF67NH3TRGDED50XT4CY1N":{"id":"pag_JM5BRF67NH3TRGDED50XT4CY1N","kind":"page","bakedName":"DataImportPage","curName":"DataImportPage","renames":[],"owner":"workspace"},"trt_K0FQPGV5RSJWCPHYS16PFXSZ57":{"id":"trt_K0FQPGV5RSJWCPHYS16PFXSZ57","kind":"trait","bakedName":"DataImportLifecycle","curName":"DataImportLifecycle","renames":[],"owner":"workspace"}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"std-global-search","version":"1.0.0","description":"std-global-search — cross-module federated search. Use when a user voices that one search box should query several modules at once (global search, search everything, unified search, cross-module search, federated search, search across records, omnisearch, one search box, aggregated results, grouped results). One SEARCH event fans out to every module key listed in the `modules` config (comma-separated, deterministic — no registry magic): the trait walks the parsed key list with an internal FAN_OUT_STEP sentinel and emits one scoped MODULE_SEARCH_REQUESTED { moduleKey, queryText, typeFilter, scopeJson } -> external per key, so modules respond in parallel rather than in sequence. Modules answer with SEARCH_RESULTS { moduleKey, resultsJson }; each answer appends a SearchResultGroup to the entity, so the merged view stays grouped by module. A module that answers twice is counted once, a keyless answer is filed under the answering module's name, and every group records which behavior answered it. Client/person/date/type filters ride `scopeJson` — the atom never interprets them. Every query persists as a SearchQuery row (recent/saved searches) when `saveHistory` is on. The input is the mapped `search-input` type rendered inline with event renamed to SEARCH (the std-geosearch idiom); its native {searchTerm}/{value} payloads are bridged via str/default, so programmatic SEARCH { queryText, typeFilter, scopeJson } emitters and the UI box drive the same arm.","orbitals":[{"name":"GlobalSearchOrbital","id":"orb_80JJ8SEPZJBFS3093FGA7AKFJG","uses":[{"from":"std/behaviors/ui-typography","as":"Typography"},{"from":"std/behaviors/ui-spinner","as":"Spinner"}],"entity":{"name":"SearchQuery","id":"ent_2QE8N78N24AH28FCCQ9A363744","collection":"search_queries","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"personId","type":"string","default":"","description":"Owner of this query — the user who ran it.","synonyms":"user, owner, searcher, account"},{"name":"queryText","type":"string","default":"","description":"The search text the user typed.","synonyms":"query, search term, keywords, search string"},{"name":"typeFilter","type":"string","default":"","description":"Record-type filter applied to the query; blank = all types.","synonyms":"type, kind, category filter, record type"},{"name":"scopeJson","type":"string","default":"","description":"Serialized scope filters (client/person/date/type) passed through to modules uninterpreted.","synonyms":"filters, scope, search filters, filter json"},{"name":"createdAt","type":"number","default":0,"description":"When the query was run.","synonyms":"timestamp, searched at, date"},{"name":"pendingModules","type":"array","default":[],"items":{"type":"string"},"description":"Scratch: configured module keys still awaiting a fan-out request.","synonyms":"remaining modules, queue"},{"name":"requestedCount","type":"number","default":0,"description":"How many module requests have been emitted for the current query.","synonyms":"fanned out, requests sent"},{"name":"respondedCount","type":"number","default":0,"description":"How many modules have answered the current query.","synonyms":"answers received, responses"},{"name":"fanOutDone","type":"boolean","default":false,"description":"Scratch: true once every configured module has been sent its request.","synonyms":"fan-out complete, all requested"},{"name":"searching","type":"boolean","default":false,"description":"True while a query is in flight.","synonyms":"loading, in progress, busy"},{"name":"results","type":"array","default":[],"items":{"type":"object","properties":{"moduleKey":{"name":"moduleKey","type":"string","required":false},"receivedAt":{"name":"receivedAt","type":"number","required":false},"answeredBy":{"name":"answeredBy","type":"string","required":false},"resultsJson":{"name":"resultsJson","type":"string","required":false}}},"description":"Merged answers, one entry per responding module, grouped by moduleKey.","synonyms":"grouped results, hits, matches, answers"},{"name":"resultsSummary","type":"string","default":"","description":"Display rendering of the grouped results: one \"moduleKey: resultsJson\" line per answering module.","synonyms":"results text, summary, grouped display"},{"name":"savedQueryId","type":"string","default":"","description":"Id of the persisted SearchQuery row for the current query; blank until saved.","synonyms":"query id, saved search id"},{"name":"lastError","type":"string","default":"","description":"Scratch: last failure shown to the user; blank = none.","synonyms":"error, failure reason"}]},"traits":[{"name":"GlobalSearch","id":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J","entityRebindable":true,"entityContract":{"requires":[],"provides":["fanOutDone","lastError","pendingModules","personId","queryText","requestedCount","respondedCount","results","resultsSummary","savedQueryId","scopeJson","searching","typeFilter"]},"effectRow":[{"kind":"emit","resource":"FAN_OUT_STEP"},{"kind":"emit","resource":"GLOBAL_SEARCH_COMPLETED"},{"kind":"emit","resource":"MODULE_SEARCH_REQUESTED"},{"kind":"fetch","resource":"SearchQuery"},{"kind":"persist","resource":"SearchQuery"},{"kind":"render-ui","resource":"main"},{"kind":"render-ui","resource":"toast"},{"kind":"set","resource":"@entity.createdAt"},{"kind":"set","resource":"@entity.fanOutDone"},{"kind":"set","resource":"@entity.lastError"},{"kind":"set","resource":"@entity.pendingModules"},{"kind":"set","resource":"@entity.personId"},{"kind":"set","resource":"@entity.queryText"},{"kind":"set","resource":"@entity.requestedCount"},{"kind":"set","resource":"@entity.respondedCount"},{"kind":"set","resource":"@entity.results"},{"kind":"set","resource":"@entity.resultsSummary"},{"kind":"set","resource":"@entity.savedQueryId"},{"kind":"set","resource":"@entity.scopeJson"},{"kind":"set","resource":"@entity.searching"},{"kind":"set","resource":"@entity.typeFilter"}],"category":"lifecycle","capabilities":["discovery","search"],"linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","entityRefIds":{"SearchQuery":"ent_2QE8N78N24AH28FCCQ9A363744"},"traitEmbedIds":{"InlineTypographyRender6":"trt_F4XKKSYPMABA5AY25FH89WZN0N","InlineTypographyRender1":"trt_685SV2SX23YH1TMX2ATEW9JSS1","InlineSpinnerRender2":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J","InlineTypographyRender3":"trt_YXWVA6RNRNAWATRNEW2SW113H4","InlineTypographyRender5":"trt_XMZ636PE687349A08207X70M4D","InlineTypographyRender4":"trt_JQN055P6E1370MWFVC34YWTC20"},"emits":[{"event":"SEARCH","eventId":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","description":"The query as submitted — re-broadcast so downstream listeners (recent-searches trays, analytics) can react without intercepting the input","tier":"essential","scope":"external","payloadSchema":[{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"},{"name":"value","type":"string"},{"name":"searchTerm","type":"string"}]},{"event":"MODULE_SEARCH_REQUESTED","eventId":"evt_GK2BTEDT9FX4QWJDM313VHHDR4","description":"One per configured module key — the module owning that key runs its own search and answers with SEARCH_RESULTS","tier":"essential","scope":"external","payloadSchema":[{"name":"moduleKey","type":"string"},{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"}]},{"event":"GLOBAL_SEARCH_COMPLETED","eventId":"evt_ANF8XEXNEPTQBD734F7B5362JQ","description":"Every requested module has answered; the grouped view is final","tier":"secondary","scope":"external","payloadSchema":[{"name":"queryText","type":"string"},{"name":"moduleCount","type":"number"},{"name":"respondedCount","type":"number"}]},{"event":"QUERY_SAVED","eventId":"evt_QBA5BDH5GGJR845X90JG51CYA6","description":"The query persisted to search history","tier":"secondary","scope":"external","payloadSchema":[{"name":"id","type":"string","required":true}]},{"event":"QUERY_SAVE_FAILED","eventId":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","description":"Persisting the query failed — the search itself is unaffected","tier":"secondary","scope":"external","payloadSchema":[{"name":"error","type":"string","required":true}]},{"event":"FAN_OUT_STEP","eventId":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","description":"Internal sentinel draining the module queue, one MODULE_SEARCH_REQUESTED per pass; `remaining` is the queue length after the last seed/drop","tier":"internal","payloadSchema":[{"name":"remaining","type":"number"}]}],"listens":[{"event":"SEARCH_RESULTS","eventId":"evt_DWX34CAKVZ9XZNH0A1V87EG926","triggers":"SEARCH_RESULTS","triggersId":"evt_DWX34CAKVZ9XZNH0A1V87EG926","source":{"kind":"any"}}],"stateMachine":{"states":[{"name":"idle","isInitial":true},{"name":"searching"}],"events":[{"key":"INIT","id":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","name":"Initialize"},{"key":"SEARCH","id":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","name":"Search","description":"The query as submitted — re-broadcast so downstream listeners (recent-searches trays, analytics) can react without intercepting the input","tier":"essential","payloadSchema":[{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"},{"name":"value","type":"string"},{"name":"searchTerm","type":"string"}],"listened":true},{"key":"FAN_OUT_STEP","id":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","name":"Fan Out Step","description":"Internal sentinel draining the module queue, one MODULE_SEARCH_REQUESTED per pass; `remaining` is the queue length after the last seed/drop","tier":"internal","payloadSchema":[{"name":"remaining","type":"number"}],"listened":true},{"key":"SEARCH_RESULTS","id":"evt_DWX34CAKVZ9XZNH0A1V87EG926","name":"Search Results","payloadSchema":[{"name":"moduleKey","type":"string"},{"name":"resultsJson","type":"string"}],"listened":true},{"key":"QUERY_SAVED","id":"evt_QBA5BDH5GGJR845X90JG51CYA6","name":"Query Saved","description":"The query persisted to search history","tier":"secondary","payloadSchema":[{"name":"id","type":"string","required":true}]},{"key":"QUERY_SAVE_FAILED","id":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","name":"Query Save Failed","description":"Persisting the query failed — the search itself is unaffected","tier":"secondary","payloadSchema":[{"name":"error","type":"string","required":true}]},{"key":"MODULE_SEARCH_REQUESTED","id":"evt_GK2BTEDT9FX4QWJDM313VHHDR4","name":"Module Search Requested","description":"One per configured module key — the module owning that key runs its own search and answers with SEARCH_RESULTS","tier":"essential","payloadSchema":[{"name":"moduleKey","type":"string"},{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"}]},{"key":"GLOBAL_SEARCH_COMPLETED","id":"evt_ANF8XEXNEPTQBD734F7B5362JQ","name":"Global Search Completed","description":"Every requested module has answered; the grouped view is final","tier":"secondary","payloadSchema":[{"name":"queryText","type":"string"},{"name":"moduleCount","type":"number"},{"name":"respondedCount","type":"number"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","effects":[["fetch","SearchQuery"],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},"@trait.InlineTypographyRender1"],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"idle","to":"searching","event":"SEARCH","eventId":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","effects":[["set","@entity.queryText",["str/default","@payload.queryText",["str/default","@payload.value","@payload.searchTerm"]]],["set","@entity.typeFilter",["str/default","@payload.typeFilter",""]],["set","@entity.scopeJson",["str/default","@payload.scopeJson",""]],["set","@entity.personId","@user.id"],["set","@entity.createdAt","@now"],["set","@entity.pendingModules",["array/filter",["array/map",["str/split","@config.modules",","],["fn","m",["str/trim","@m"]]],["fn","m",["!=","@m",""]]]],["set","@entity.requestedCount",0],["set","@entity.respondedCount",0],["set","@entity.fanOutDone",false],["set","@entity.searching",true],["set","@entity.results",[]],["set","@entity.resultsSummary",""],["set","@entity.lastError",""],["when","@config.saveHistory",["persist","create","SearchQuery",{"createdAt":"@entity.createdAt","personId":"@entity.personId","queryText":"@entity.queryText","scopeJson":"@entity.scopeJson","typeFilter":"@entity.typeFilter"},{"emit":{"failure":"QUERY_SAVE_FAILED","success":"QUERY_SAVED"}}]],["when",[">",["array/len","@entity.pendingModules"],0],["emit","FAN_OUT_STEP",{"remaining":["array/len","@entity.pendingModules"]}]],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},{"align":"center","children":["@trait.InlineSpinnerRender2","@trait.InlineTypographyRender3"],"direction":"horizontal","gap":"sm","type":"stack"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"searching","to":"idle","event":"INIT","eventId":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","effects":[["fetch","SearchQuery"],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},"@trait.InlineTypographyRender4"],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"searching","to":"searching","event":"SEARCH","eventId":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","effects":[["set","@entity.queryText",["str/default","@payload.queryText",["str/default","@payload.value","@payload.searchTerm"]]],["set","@entity.typeFilter",["str/default","@payload.typeFilter",""]],["set","@entity.scopeJson",["str/default","@payload.scopeJson",""]],["set","@entity.personId","@user.id"],["set","@entity.createdAt","@now"],["set","@entity.pendingModules",["array/filter",["array/map",["str/split","@config.modules",","],["fn","m",["str/trim","@m"]]],["fn","m",["!=","@m",""]]]],["set","@entity.requestedCount",0],["set","@entity.respondedCount",0],["set","@entity.fanOutDone",false],["set","@entity.searching",true],["set","@entity.results",[]],["set","@entity.resultsSummary",""],["set","@entity.lastError",""],["when","@config.saveHistory",["persist","create","SearchQuery",{"createdAt":"@entity.createdAt","personId":"@entity.personId","queryText":"@entity.queryText","scopeJson":"@entity.scopeJson","typeFilter":"@entity.typeFilter"},{"emit":{"failure":"QUERY_SAVE_FAILED","success":"QUERY_SAVED"}}]],["when",[">",["array/len","@entity.pendingModules"],0],["emit","FAN_OUT_STEP",{"remaining":["array/len","@entity.pendingModules"]}]]]},{"from":"searching","to":"searching","event":"FAN_OUT_STEP","eventId":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","guard":[">","@payload.remaining",0],"effects":[["emit","MODULE_SEARCH_REQUESTED",{"moduleKey":["array/first","@entity.pendingModules"],"queryText":"@entity.queryText","scopeJson":"@entity.scopeJson","typeFilter":"@entity.typeFilter"}],["set","@entity.requestedCount",["+","@entity.requestedCount",1]],["set","@entity.pendingModules",["array/drop","@entity.pendingModules",1]],["when",["=",["array/len","@entity.pendingModules"],0],["set","@entity.fanOutDone",true]],["when",[">",["array/len","@entity.pendingModules"],0],["emit","FAN_OUT_STEP",{"remaining":["array/len","@entity.pendingModules"]}]]]},{"from":"searching","to":"searching","event":"SEARCH_RESULTS","eventId":"evt_DWX34CAKVZ9XZNH0A1V87EG926","guard":["not",["array/some","@entity.results",["fn","g",["=","@g.moduleKey",["str/default","@payload.moduleKey",["str/default","@event.source.orbital",""]]]]]],"effects":[["set","@entity.respondedCount",["+","@entity.respondedCount",1]],["set","@entity.results",["array/append","@entity.results",{"moduleKey":["str/default","@payload.moduleKey",["str/default","@event.source.orbital",""]],"receivedAt":"@now","resultsJson":"@payload.resultsJson","answeredBy":["str/default","@event.source.trait",""]}]],["set","@entity.resultsSummary",["str/concat","@entity.resultsSummary",["str/concat",["str/default","@payload.moduleKey",["str/default","@event.source.orbital",""]],["str/concat",": ",["str/concat","@payload.resultsJson","\n"]]]]],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},["if",[">",["array/len",["array/filter","@entity.results",["fn","g",["!=","@g.resultsJson",""]]]],0],{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/filter","@entity.results",["fn","g",["!=","@g.resultsJson",""]]],["fn","g",{"type":"stack","direction":"vertical","gap":"sm","children":["@trait.InlineTypographyRender5",{"type":"stack","direction":"vertical","gap":"xs","children":["array/map",["array/filter",["str/split","@g.resultsJson",", "],["fn","item",["!=","@item",""]]],["fn","item","@trait.InlineTypographyRender6"]]}]}]]},{"description":["if",["and","@entity.fanOutDone",[">=","@entity.respondedCount","@entity.requestedCount"]],"Try a different search term or module.","Waiting for the rest of the results…"],"icon":"search-x","title":["if",["and","@entity.fanOutDone",[">=","@entity.respondedCount","@entity.requestedCount"]],"No results found","Searching…"],"type":"empty-state"}]],"direction":"vertical","gap":"md","type":"stack"}],["when",["and","@entity.fanOutDone",[">=","@entity.respondedCount","@entity.requestedCount"]],["do",["set","@entity.searching",false],["emit","GLOBAL_SEARCH_COMPLETED",{"moduleCount":"@entity.requestedCount","queryText":"@entity.queryText","respondedCount":"@entity.respondedCount"}]]]]},{"from":"searching","to":"searching","event":"QUERY_SAVED","eventId":"evt_QBA5BDH5GGJR845X90JG51CYA6","effects":[["set","@entity.savedQueryId","@payload.id"]]},{"from":"searching","to":"searching","event":"QUERY_SAVE_FAILED","eventId":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","effects":[["set","@entity.lastError","@payload.error"],["render-ui","toast",{"type":"alert","variant":"warning","message":"Could not save the search to history","dismissible":true}]]}]},"config":{"placeholder":{"type":"string","default":"Search across modules…","label":"Search placeholder","description":"Hint text in the search input.","synonyms":"placeholder, hint text, input hint","tier":"presentation"},"modules":{"type":"string","default":"","label":"Modules to search","description":"Comma-separated module keys to fan each query out to (e.g. \"contacts,projects,invoices\"). Each key gets one scoped MODULE_SEARCH_REQUESTED; the module owning a key subscribes to it and answers with SEARCH_RESULTS. Empty = no fan-out (the query is still persisted to history).","synonyms":"search modules, search scope, sources, providers, search providers, indexes, search targets, modules","tier":"internal"},"saveHistory":{"type":"boolean","default":true,"label":"Keep recent searches","description":"Persist each query as a SearchQuery row so recent and saved searches survive reloads.","synonyms":"search history, recent searches, saved searches, remember searches, keep history","tier":"policy"}},"scope":"instance"},{"ref":"Typography.traits.TypographyRender","id":"trt_685SV2SX23YH1TMX2ATEW9JSS1","name":"InlineTypographyRender1","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"content":{"type":"unknown","default":"Search across every connected module — results group by module."},"color":{"type":"unknown","default":"muted"},"variant":{"type":"unknown","default":"caption"}}},{"ref":"Spinner.traits.SpinnerRender","id":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J","name":"InlineSpinnerRender2","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744"},{"ref":"Typography.traits.TypographyRender","id":"trt_YXWVA6RNRNAWATRNEW2SW113H4","name":"InlineTypographyRender3","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"color":{"type":"unknown","default":"muted"},"variant":{"type":"unknown","default":"caption"},"content":{"type":"unknown","default":"Searching…"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_JQN055P6E1370MWFVC34YWTC20","name":"InlineTypographyRender4","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"content":{"type":"unknown","default":"Search across every connected module — results group by module."},"variant":{"type":"unknown","default":"caption"},"color":{"type":"unknown","default":"muted"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_XMZ636PE687349A08207X70M4D","name":"InlineTypographyRender5","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"variant":{"type":"unknown","default":"h4"},"content":{"type":"unknown","default":"@g.moduleKey"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_F4XKKSYPMABA5AY25FH89WZN0N","name":"InlineTypographyRender6","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"content":{"type":"unknown","default":"@item"},"variant":{"type":"unknown","default":"body"}}}],"pages":[{"name":"GlobalSearchPage","id":"pag_7FNZG6D8KZM9ZTG1H9VK345MFG","path":"/global-search","traits":[{"ref":"GlobalSearch","refId":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},{"ref":"InlineTypographyRender1","refId":"trt_685SV2SX23YH1TMX2ATEW9JSS1"},{"ref":"InlineSpinnerRender2","refId":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J"},{"ref":"InlineTypographyRender3","refId":"trt_YXWVA6RNRNAWATRNEW2SW113H4"},{"ref":"InlineTypographyRender4","refId":"trt_JQN055P6E1370MWFVC34YWTC20"},{"ref":"InlineTypographyRender5","refId":"trt_XMZ636PE687349A08207X70M4D"},{"ref":"InlineTypographyRender6","refId":"trt_F4XKKSYPMABA5AY25FH89WZN0N"}]}],"types":{"SearchResultGroup":[{"name":"moduleKey","type":"string"},{"name":"resultsJson","type":"string"},{"name":"receivedAt","type":"number"},{"name":"answeredBy","type":"string"}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_2QE8N78N24AH28FCCQ9A363744":{"id":"ent_2QE8N78N24AH28FCCQ9A363744","kind":"entity","bakedName":"SearchQuery","curName":"SearchQuery","renames":[],"owner":"workspace"},"evt_23PGGMTVP6DV3AAFWTD0XQRPT1":{"id":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","kind":"event","bakedName":"FAN_OUT_STEP","curName":"FAN_OUT_STEP","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4":{"id":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_ANF8XEXNEPTQBD734F7B5362JQ":{"id":"evt_ANF8XEXNEPTQBD734F7B5362JQ","kind":"event","bakedName":"GLOBAL_SEARCH_COMPLETED","curName":"GLOBAL_SEARCH_COMPLETED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_DWX34CAKVZ9XZNH0A1V87EG926":{"id":"evt_DWX34CAKVZ9XZNH0A1V87EG926","kind":"event","bakedName":"SEARCH_RESULTS","curName":"SEARCH_RESULTS","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ":{"id":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","kind":"event","bakedName":"QUERY_SAVE_FAILED","curName":"QUERY_SAVE_FAILED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_GK2BTEDT9FX4QWJDM313VHHDR4":{"id":"evt_GK2BTEDT9FX4QWJDM313VHHDR4","kind":"event","bakedName":"MODULE_SEARCH_REQUESTED","curName":"MODULE_SEARCH_REQUESTED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_QBA5BDH5GGJR845X90JG51CYA6":{"id":"evt_QBA5BDH5GGJR845X90JG51CYA6","kind":"event","bakedName":"QUERY_SAVED","curName":"QUERY_SAVED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW":{"id":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","kind":"event","bakedName":"SEARCH","curName":"SEARCH","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"orb_80JJ8SEPZJBFS3093FGA7AKFJG":{"id":"orb_80JJ8SEPZJBFS3093FGA7AKFJG","kind":"orbital","bakedName":"GlobalSearchOrbital","curName":"GlobalSearchOrbital","renames":[],"owner":"workspace"},"pag_7FNZG6D8KZM9ZTG1H9VK345MFG":{"id":"pag_7FNZG6D8KZM9ZTG1H9VK345MFG","kind":"page","bakedName":"GlobalSearchPage","curName":"GlobalSearchPage","renames":[],"owner":"workspace"},"trt_685SV2SX23YH1TMX2ATEW9JSS1":{"id":"trt_685SV2SX23YH1TMX2ATEW9JSS1","kind":"trait","bakedName":"InlineTypographyRender1","curName":"InlineTypographyRender1","renames":[],"owner":"workspace"},"trt_F4XKKSYPMABA5AY25FH89WZN0N":{"id":"trt_F4XKKSYPMABA5AY25FH89WZN0N","kind":"trait","bakedName":"InlineTypographyRender6","curName":"InlineTypographyRender6","renames":[],"owner":"workspace"},"trt_HG214JMY7SF3WH5ZZYX4DS0E7J":{"id":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J","kind":"trait","bakedName":"GlobalSearch","curName":"GlobalSearch","renames":[],"owner":"workspace"},"trt_JQN055P6E1370MWFVC34YWTC20":{"id":"trt_JQN055P6E1370MWFVC34YWTC20","kind":"trait","bakedName":"InlineTypographyRender4","curName":"InlineTypographyRender4","renames":[],"owner":"workspace"},"trt_PDSS1XXMX7TEKYHGZQMXRECV2J":{"id":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J","kind":"trait","bakedName":"InlineSpinnerRender2","curName":"InlineSpinnerRender2","renames":[],"owner":"workspace"},"trt_XMZ636PE687349A08207X70M4D":{"id":"trt_XMZ636PE687349A08207X70M4D","kind":"trait","bakedName":"InlineTypographyRender5","curName":"InlineTypographyRender5","renames":[],"owner":"workspace"},"trt_YXWVA6RNRNAWATRNEW2SW113H4":{"id":"trt_YXWVA6RNRNAWATRNEW2SW113H4","kind":"trait","bakedName":"InlineTypographyRender3","curName":"InlineTypographyRender3","renames":[],"owner":"workspace"}}}}
|
|
1
|
+
{"name":"std-global-search","version":"1.0.0","description":"std-global-search — cross-module federated search. Use when a user voices that one search box should query several modules at once (global search, search everything, unified search, cross-module search, federated search, search across records, omnisearch, one search box, aggregated results, grouped results). One SEARCH event fans out to every module key listed in the `modules` config (comma-separated, deterministic — no registry magic): the trait walks the parsed key list with an internal FAN_OUT_STEP sentinel and emits one scoped MODULE_SEARCH_REQUESTED { moduleKey, queryText, typeFilter, scopeJson } -> external per key, so modules respond in parallel rather than in sequence. Modules answer with SEARCH_RESULTS { moduleKey, resultsJson }; each answer appends a SearchResultGroup to the entity, so the merged view stays grouped by module. A module that answers twice is counted once, a keyless answer is filed under the answering module's name, and every group records which behavior answered it. Client/person/date/type filters ride `scopeJson` — the atom never interprets them. Every query persists as a SearchQuery row (recent/saved searches) when `saveHistory` is on. The input is the mapped `search-input` type rendered inline with event renamed to SEARCH (the std-geosearch idiom); its native {searchTerm}/{value} payloads are bridged via str/default, so programmatic SEARCH { queryText, typeFilter, scopeJson } emitters and the UI box drive the same arm.","orbitals":[{"name":"GlobalSearchOrbital","id":"orb_80JJ8SEPZJBFS3093FGA7AKFJG","uses":[{"from":"std/behaviors/ui-typography","as":"Typography"},{"from":"std/behaviors/ui-spinner","as":"Spinner"}],"entity":{"name":"SearchQuery","id":"ent_2QE8N78N24AH28FCCQ9A363744","collection":"search_queries","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"personId","type":"string","default":"","description":"Owner of this query — the user who ran it.","synonyms":"user, owner, searcher, account"},{"name":"queryText","type":"string","default":"","description":"The search text the user typed.","synonyms":"query, search term, keywords, search string"},{"name":"typeFilter","type":"string","default":"","description":"Record-type filter applied to the query; blank = all types.","synonyms":"type, kind, category filter, record type"},{"name":"scopeJson","type":"string","default":"","description":"Serialized scope filters (client/person/date/type) passed through to modules uninterpreted.","synonyms":"filters, scope, search filters, filter json"},{"name":"createdAt","type":"number","default":0,"description":"When the query was run.","synonyms":"timestamp, searched at, date"},{"name":"pendingModules","type":"array","default":[],"items":{"type":"string"},"description":"Scratch: configured module keys still awaiting a fan-out request.","synonyms":"remaining modules, queue"},{"name":"requestedCount","type":"number","default":0,"description":"How many module requests have been emitted for the current query.","synonyms":"fanned out, requests sent"},{"name":"respondedCount","type":"number","default":0,"description":"How many modules have answered the current query.","synonyms":"answers received, responses"},{"name":"fanOutDone","type":"boolean","default":false,"description":"Scratch: true once every configured module has been sent its request.","synonyms":"fan-out complete, all requested"},{"name":"searching","type":"boolean","default":false,"description":"True while a query is in flight.","synonyms":"loading, in progress, busy"},{"name":"results","type":"array","default":[],"items":{"type":"object","properties":{"moduleKey":{"name":"moduleKey","type":"string","required":false},"resultsJson":{"name":"resultsJson","type":"string","required":false},"receivedAt":{"name":"receivedAt","type":"number","required":false},"answeredBy":{"name":"answeredBy","type":"string","required":false}}},"description":"Merged answers, one entry per responding module, grouped by moduleKey.","synonyms":"grouped results, hits, matches, answers"},{"name":"resultsSummary","type":"string","default":"","description":"Display rendering of the grouped results: one \"moduleKey: resultsJson\" line per answering module.","synonyms":"results text, summary, grouped display"},{"name":"savedQueryId","type":"string","default":"","description":"Id of the persisted SearchQuery row for the current query; blank until saved.","synonyms":"query id, saved search id"},{"name":"lastError","type":"string","default":"","description":"Scratch: last failure shown to the user; blank = none.","synonyms":"error, failure reason"}]},"traits":[{"name":"GlobalSearch","id":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J","entityRebindable":true,"entityContract":{"requires":[],"provides":["fanOutDone","lastError","pendingModules","personId","queryText","requestedCount","respondedCount","results","resultsSummary","savedQueryId","scopeJson","searching","typeFilter"]},"effectRow":[{"kind":"emit","resource":"FAN_OUT_STEP"},{"kind":"emit","resource":"GLOBAL_SEARCH_COMPLETED"},{"kind":"emit","resource":"MODULE_SEARCH_REQUESTED"},{"kind":"fetch","resource":"SearchQuery"},{"kind":"persist","resource":"SearchQuery"},{"kind":"render-ui","resource":"main"},{"kind":"render-ui","resource":"toast"},{"kind":"set","resource":"@entity.createdAt"},{"kind":"set","resource":"@entity.fanOutDone"},{"kind":"set","resource":"@entity.lastError"},{"kind":"set","resource":"@entity.pendingModules"},{"kind":"set","resource":"@entity.personId"},{"kind":"set","resource":"@entity.queryText"},{"kind":"set","resource":"@entity.requestedCount"},{"kind":"set","resource":"@entity.respondedCount"},{"kind":"set","resource":"@entity.results"},{"kind":"set","resource":"@entity.resultsSummary"},{"kind":"set","resource":"@entity.savedQueryId"},{"kind":"set","resource":"@entity.scopeJson"},{"kind":"set","resource":"@entity.searching"},{"kind":"set","resource":"@entity.typeFilter"}],"category":"lifecycle","capabilities":["discovery","search"],"linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","entityRefIds":{"SearchQuery":"ent_2QE8N78N24AH28FCCQ9A363744"},"traitEmbedIds":{"InlineTypographyRender1":"trt_685SV2SX23YH1TMX2ATEW9JSS1","InlineTypographyRender4":"trt_JQN055P6E1370MWFVC34YWTC20","InlineSpinnerRender2":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J","InlineTypographyRender5":"trt_XMZ636PE687349A08207X70M4D","InlineTypographyRender6":"trt_F4XKKSYPMABA5AY25FH89WZN0N","InlineTypographyRender3":"trt_YXWVA6RNRNAWATRNEW2SW113H4"},"emits":[{"event":"SEARCH","eventId":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","description":"The query as submitted — re-broadcast so downstream listeners (recent-searches trays, analytics) can react without intercepting the input","tier":"essential","scope":"external","payloadSchema":[{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"},{"name":"value","type":"string"},{"name":"searchTerm","type":"string"}]},{"event":"MODULE_SEARCH_REQUESTED","eventId":"evt_GK2BTEDT9FX4QWJDM313VHHDR4","description":"One per configured module key — the module owning that key runs its own search and answers with SEARCH_RESULTS","tier":"essential","scope":"external","payloadSchema":[{"name":"moduleKey","type":"string"},{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"}]},{"event":"GLOBAL_SEARCH_COMPLETED","eventId":"evt_ANF8XEXNEPTQBD734F7B5362JQ","description":"Every requested module has answered; the grouped view is final","tier":"secondary","scope":"external","payloadSchema":[{"name":"queryText","type":"string"},{"name":"moduleCount","type":"number"},{"name":"respondedCount","type":"number"}]},{"event":"QUERY_SAVED","eventId":"evt_QBA5BDH5GGJR845X90JG51CYA6","description":"The query persisted to search history","tier":"secondary","scope":"external","payloadSchema":[{"name":"id","type":"string","required":true}]},{"event":"QUERY_SAVE_FAILED","eventId":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","description":"Persisting the query failed — the search itself is unaffected","tier":"secondary","scope":"external","payloadSchema":[{"name":"error","type":"string","required":true}]},{"event":"FAN_OUT_STEP","eventId":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","description":"Internal sentinel draining the module queue, one MODULE_SEARCH_REQUESTED per pass; `remaining` is the queue length after the last seed/drop","tier":"internal","payloadSchema":[{"name":"remaining","type":"number"}]}],"listens":[{"event":"SEARCH_RESULTS","eventId":"evt_DWX34CAKVZ9XZNH0A1V87EG926","triggers":"SEARCH_RESULTS","triggersId":"evt_DWX34CAKVZ9XZNH0A1V87EG926","source":{"kind":"any"}}],"stateMachine":{"states":[{"name":"idle","isInitial":true},{"name":"searching"}],"events":[{"key":"INIT","id":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","name":"Initialize"},{"key":"SEARCH","id":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","name":"Search","description":"The query as submitted — re-broadcast so downstream listeners (recent-searches trays, analytics) can react without intercepting the input","tier":"essential","payloadSchema":[{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"},{"name":"value","type":"string"},{"name":"searchTerm","type":"string"}],"listened":true},{"key":"FAN_OUT_STEP","id":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","name":"Fan Out Step","description":"Internal sentinel draining the module queue, one MODULE_SEARCH_REQUESTED per pass; `remaining` is the queue length after the last seed/drop","tier":"internal","payloadSchema":[{"name":"remaining","type":"number"}],"listened":true},{"key":"SEARCH_RESULTS","id":"evt_DWX34CAKVZ9XZNH0A1V87EG926","name":"Search Results","payloadSchema":[{"name":"moduleKey","type":"string"},{"name":"resultsJson","type":"string"}],"listened":true},{"key":"QUERY_SAVED","id":"evt_QBA5BDH5GGJR845X90JG51CYA6","name":"Query Saved","description":"The query persisted to search history","tier":"secondary","payloadSchema":[{"name":"id","type":"string","required":true}]},{"key":"QUERY_SAVE_FAILED","id":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","name":"Query Save Failed","description":"Persisting the query failed — the search itself is unaffected","tier":"secondary","payloadSchema":[{"name":"error","type":"string","required":true}]},{"key":"MODULE_SEARCH_REQUESTED","id":"evt_GK2BTEDT9FX4QWJDM313VHHDR4","name":"Module Search Requested","description":"One per configured module key — the module owning that key runs its own search and answers with SEARCH_RESULTS","tier":"essential","payloadSchema":[{"name":"moduleKey","type":"string"},{"name":"queryText","type":"string"},{"name":"typeFilter","type":"string"},{"name":"scopeJson","type":"string"}]},{"key":"GLOBAL_SEARCH_COMPLETED","id":"evt_ANF8XEXNEPTQBD734F7B5362JQ","name":"Global Search Completed","description":"Every requested module has answered; the grouped view is final","tier":"secondary","payloadSchema":[{"name":"queryText","type":"string"},{"name":"moduleCount","type":"number"},{"name":"respondedCount","type":"number"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","effects":[["fetch","SearchQuery"],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},"@trait.InlineTypographyRender1"],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"idle","to":"searching","event":"SEARCH","eventId":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","effects":[["set","@entity.queryText",["str/default","@payload.queryText",["str/default","@payload.value","@payload.searchTerm"]]],["set","@entity.typeFilter",["str/default","@payload.typeFilter",""]],["set","@entity.scopeJson",["str/default","@payload.scopeJson",""]],["set","@entity.personId","@user.id"],["set","@entity.createdAt","@now"],["set","@entity.pendingModules",["array/filter",["array/map",["str/split","@config.modules",","],["fn","m",["str/trim","@m"]]],["fn","m",["!=","@m",""]]]],["set","@entity.requestedCount",0],["set","@entity.respondedCount",0],["set","@entity.fanOutDone",false],["set","@entity.searching",true],["set","@entity.results",[]],["set","@entity.resultsSummary",""],["set","@entity.lastError",""],["when","@config.saveHistory",["persist","create","SearchQuery",{"createdAt":"@entity.createdAt","personId":"@entity.personId","queryText":"@entity.queryText","scopeJson":"@entity.scopeJson","typeFilter":"@entity.typeFilter"},{"emit":{"failure":"QUERY_SAVE_FAILED","success":"QUERY_SAVED"}}]],["when",[">",["array/len","@entity.pendingModules"],0],["emit","FAN_OUT_STEP",{"remaining":["array/len","@entity.pendingModules"]}]],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},{"align":"center","children":["@trait.InlineSpinnerRender2","@trait.InlineTypographyRender3"],"direction":"horizontal","gap":"sm","type":"stack"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"searching","to":"idle","event":"INIT","eventId":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","effects":[["fetch","SearchQuery"],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},"@trait.InlineTypographyRender4"],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"searching","to":"searching","event":"SEARCH","eventId":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","effects":[["set","@entity.queryText",["str/default","@payload.queryText",["str/default","@payload.value","@payload.searchTerm"]]],["set","@entity.typeFilter",["str/default","@payload.typeFilter",""]],["set","@entity.scopeJson",["str/default","@payload.scopeJson",""]],["set","@entity.personId","@user.id"],["set","@entity.createdAt","@now"],["set","@entity.pendingModules",["array/filter",["array/map",["str/split","@config.modules",","],["fn","m",["str/trim","@m"]]],["fn","m",["!=","@m",""]]]],["set","@entity.requestedCount",0],["set","@entity.respondedCount",0],["set","@entity.fanOutDone",false],["set","@entity.searching",true],["set","@entity.results",[]],["set","@entity.resultsSummary",""],["set","@entity.lastError",""],["when","@config.saveHistory",["persist","create","SearchQuery",{"createdAt":"@entity.createdAt","personId":"@entity.personId","queryText":"@entity.queryText","scopeJson":"@entity.scopeJson","typeFilter":"@entity.typeFilter"},{"emit":{"failure":"QUERY_SAVE_FAILED","success":"QUERY_SAVED"}}]],["when",[">",["array/len","@entity.pendingModules"],0],["emit","FAN_OUT_STEP",{"remaining":["array/len","@entity.pendingModules"]}]]]},{"from":"searching","to":"searching","event":"FAN_OUT_STEP","eventId":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","guard":[">","@payload.remaining",0],"effects":[["emit","MODULE_SEARCH_REQUESTED",{"moduleKey":["array/first","@entity.pendingModules"],"queryText":"@entity.queryText","scopeJson":"@entity.scopeJson","typeFilter":"@entity.typeFilter"}],["set","@entity.requestedCount",["+","@entity.requestedCount",1]],["set","@entity.pendingModules",["array/drop","@entity.pendingModules",1]],["when",["=",["array/len","@entity.pendingModules"],0],["set","@entity.fanOutDone",true]],["when",[">",["array/len","@entity.pendingModules"],0],["emit","FAN_OUT_STEP",{"remaining":["array/len","@entity.pendingModules"]}]]]},{"from":"searching","to":"searching","event":"SEARCH_RESULTS","eventId":"evt_DWX34CAKVZ9XZNH0A1V87EG926","guard":["not",["array/some","@entity.results",["fn","g",["=","@g.moduleKey",["str/default","@payload.moduleKey",["str/default","@event.source.orbital",""]]]]]],"effects":[["set","@entity.respondedCount",["+","@entity.respondedCount",1]],["set","@entity.results",["array/append","@entity.results",{"moduleKey":["str/default","@payload.moduleKey",["str/default","@event.source.orbital",""]],"receivedAt":"@now","resultsJson":"@payload.resultsJson","answeredBy":["str/default","@event.source.trait",""]}]],["set","@entity.resultsSummary",["str/concat","@entity.resultsSummary",["str/concat",["str/default","@payload.moduleKey",["str/default","@event.source.orbital",""]],["str/concat",": ",["str/concat","@payload.resultsJson","\n"]]]]],["render-ui","main",{"children":[{"event":"SEARCH","placeholder":"@config.placeholder","type":"search-input"},["if",[">",["array/len",["array/filter","@entity.results",["fn","g",["!=","@g.resultsJson",""]]]],0],{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/filter","@entity.results",["fn","g",["!=","@g.resultsJson",""]]],["fn","g",{"type":"stack","direction":"vertical","gap":"sm","children":["@trait.InlineTypographyRender5",{"type":"stack","direction":"vertical","gap":"xs","children":["array/map",["array/filter",["str/split","@g.resultsJson",", "],["fn","item",["!=","@item",""]]],["fn","item","@trait.InlineTypographyRender6"]]}]}]]},{"description":["if",["and","@entity.fanOutDone",[">=","@entity.respondedCount","@entity.requestedCount"]],"Try a different search term or module.","Waiting for the rest of the results…"],"icon":"search-x","title":["if",["and","@entity.fanOutDone",[">=","@entity.respondedCount","@entity.requestedCount"]],"No results found","Searching…"],"type":"empty-state"}]],"direction":"vertical","gap":"md","type":"stack"}],["when",["and","@entity.fanOutDone",[">=","@entity.respondedCount","@entity.requestedCount"]],["do",["set","@entity.searching",false],["emit","GLOBAL_SEARCH_COMPLETED",{"moduleCount":"@entity.requestedCount","queryText":"@entity.queryText","respondedCount":"@entity.respondedCount"}]]]]},{"from":"searching","to":"searching","event":"QUERY_SAVED","eventId":"evt_QBA5BDH5GGJR845X90JG51CYA6","effects":[["set","@entity.savedQueryId","@payload.id"]]},{"from":"searching","to":"searching","event":"QUERY_SAVE_FAILED","eventId":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","effects":[["set","@entity.lastError","@payload.error"],["render-ui","toast",{"type":"alert","variant":"warning","message":"Could not save the search to history","dismissible":true}]]}]},"config":{"placeholder":{"type":"string","default":"Search across modules…","label":"Search placeholder","description":"Hint text in the search input.","synonyms":"placeholder, hint text, input hint","tier":"presentation"},"modules":{"type":"string","default":"","label":"Modules to search","description":"Comma-separated module keys to fan each query out to (e.g. \"contacts,projects,invoices\"). Each key gets one scoped MODULE_SEARCH_REQUESTED; the module owning a key subscribes to it and answers with SEARCH_RESULTS. Empty = no fan-out (the query is still persisted to history).","synonyms":"search modules, search scope, sources, providers, search providers, indexes, search targets, modules","tier":"internal"},"saveHistory":{"type":"boolean","default":true,"label":"Keep recent searches","description":"Persist each query as a SearchQuery row so recent and saved searches survive reloads.","synonyms":"search history, recent searches, saved searches, remember searches, keep history","tier":"policy"}},"scope":"instance"},{"ref":"Typography.traits.TypographyRender","id":"trt_685SV2SX23YH1TMX2ATEW9JSS1","name":"InlineTypographyRender1","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"content":{"type":"unknown","default":"Search across every connected module — results group by module."},"color":{"type":"unknown","default":"muted"},"variant":{"type":"unknown","default":"caption"}}},{"ref":"Spinner.traits.SpinnerRender","id":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J","name":"InlineSpinnerRender2","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744"},{"ref":"Typography.traits.TypographyRender","id":"trt_YXWVA6RNRNAWATRNEW2SW113H4","name":"InlineTypographyRender3","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"color":{"type":"unknown","default":"muted"},"content":{"type":"unknown","default":"Searching…"},"variant":{"type":"unknown","default":"caption"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_JQN055P6E1370MWFVC34YWTC20","name":"InlineTypographyRender4","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"color":{"type":"unknown","default":"muted"},"variant":{"type":"unknown","default":"caption"},"content":{"type":"unknown","default":"Search across every connected module — results group by module."}}},{"ref":"Typography.traits.TypographyRender","id":"trt_XMZ636PE687349A08207X70M4D","name":"InlineTypographyRender5","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"content":{"type":"unknown","default":"@g.moduleKey"},"variant":{"type":"unknown","default":"h4"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_F4XKKSYPMABA5AY25FH89WZN0N","name":"InlineTypographyRender6","linkedEntity":"SearchQuery","linkedEntityId":"ent_2QE8N78N24AH28FCCQ9A363744","config":{"variant":{"type":"unknown","default":"body"},"content":{"type":"unknown","default":"@item"}}}],"pages":[{"name":"GlobalSearchPage","id":"pag_7FNZG6D8KZM9ZTG1H9VK345MFG","path":"/global-search","traits":[{"ref":"GlobalSearch","refId":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},{"ref":"InlineTypographyRender1","refId":"trt_685SV2SX23YH1TMX2ATEW9JSS1"},{"ref":"InlineSpinnerRender2","refId":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J"},{"ref":"InlineTypographyRender3","refId":"trt_YXWVA6RNRNAWATRNEW2SW113H4"},{"ref":"InlineTypographyRender4","refId":"trt_JQN055P6E1370MWFVC34YWTC20"},{"ref":"InlineTypographyRender5","refId":"trt_XMZ636PE687349A08207X70M4D"},{"ref":"InlineTypographyRender6","refId":"trt_F4XKKSYPMABA5AY25FH89WZN0N"}]}],"types":{"SearchResultGroup":[{"name":"moduleKey","type":"string"},{"name":"resultsJson","type":"string"},{"name":"receivedAt","type":"number"},{"name":"answeredBy","type":"string"}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_2QE8N78N24AH28FCCQ9A363744":{"id":"ent_2QE8N78N24AH28FCCQ9A363744","kind":"entity","bakedName":"SearchQuery","curName":"SearchQuery","renames":[],"owner":"workspace"},"evt_23PGGMTVP6DV3AAFWTD0XQRPT1":{"id":"evt_23PGGMTVP6DV3AAFWTD0XQRPT1","kind":"event","bakedName":"FAN_OUT_STEP","curName":"FAN_OUT_STEP","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4":{"id":"evt_9E7VX2PYCNF6AVXNJ6MQJECWJ4","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_ANF8XEXNEPTQBD734F7B5362JQ":{"id":"evt_ANF8XEXNEPTQBD734F7B5362JQ","kind":"event","bakedName":"GLOBAL_SEARCH_COMPLETED","curName":"GLOBAL_SEARCH_COMPLETED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_DWX34CAKVZ9XZNH0A1V87EG926":{"id":"evt_DWX34CAKVZ9XZNH0A1V87EG926","kind":"event","bakedName":"SEARCH_RESULTS","curName":"SEARCH_RESULTS","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ":{"id":"evt_EATS5R3ZNNZTTZYCXB6HDW16ZJ","kind":"event","bakedName":"QUERY_SAVE_FAILED","curName":"QUERY_SAVE_FAILED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_GK2BTEDT9FX4QWJDM313VHHDR4":{"id":"evt_GK2BTEDT9FX4QWJDM313VHHDR4","kind":"event","bakedName":"MODULE_SEARCH_REQUESTED","curName":"MODULE_SEARCH_REQUESTED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_QBA5BDH5GGJR845X90JG51CYA6":{"id":"evt_QBA5BDH5GGJR845X90JG51CYA6","kind":"event","bakedName":"QUERY_SAVED","curName":"QUERY_SAVED","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW":{"id":"evt_RPE5MXZBNENTQ5EB7YV2C7TJSW","kind":"event","bakedName":"SEARCH","curName":"SEARCH","renames":[],"owner":"workspace","parent":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J"},"orb_80JJ8SEPZJBFS3093FGA7AKFJG":{"id":"orb_80JJ8SEPZJBFS3093FGA7AKFJG","kind":"orbital","bakedName":"GlobalSearchOrbital","curName":"GlobalSearchOrbital","renames":[],"owner":"workspace"},"pag_7FNZG6D8KZM9ZTG1H9VK345MFG":{"id":"pag_7FNZG6D8KZM9ZTG1H9VK345MFG","kind":"page","bakedName":"GlobalSearchPage","curName":"GlobalSearchPage","renames":[],"owner":"workspace"},"trt_685SV2SX23YH1TMX2ATEW9JSS1":{"id":"trt_685SV2SX23YH1TMX2ATEW9JSS1","kind":"trait","bakedName":"InlineTypographyRender1","curName":"InlineTypographyRender1","renames":[],"owner":"workspace"},"trt_F4XKKSYPMABA5AY25FH89WZN0N":{"id":"trt_F4XKKSYPMABA5AY25FH89WZN0N","kind":"trait","bakedName":"InlineTypographyRender6","curName":"InlineTypographyRender6","renames":[],"owner":"workspace"},"trt_HG214JMY7SF3WH5ZZYX4DS0E7J":{"id":"trt_HG214JMY7SF3WH5ZZYX4DS0E7J","kind":"trait","bakedName":"GlobalSearch","curName":"GlobalSearch","renames":[],"owner":"workspace"},"trt_JQN055P6E1370MWFVC34YWTC20":{"id":"trt_JQN055P6E1370MWFVC34YWTC20","kind":"trait","bakedName":"InlineTypographyRender4","curName":"InlineTypographyRender4","renames":[],"owner":"workspace"},"trt_PDSS1XXMX7TEKYHGZQMXRECV2J":{"id":"trt_PDSS1XXMX7TEKYHGZQMXRECV2J","kind":"trait","bakedName":"InlineSpinnerRender2","curName":"InlineSpinnerRender2","renames":[],"owner":"workspace"},"trt_XMZ636PE687349A08207X70M4D":{"id":"trt_XMZ636PE687349A08207X70M4D","kind":"trait","bakedName":"InlineTypographyRender5","curName":"InlineTypographyRender5","renames":[],"owner":"workspace"},"trt_YXWVA6RNRNAWATRNEW2SW113H4":{"id":"trt_YXWVA6RNRNAWATRNEW2SW113H4","kind":"trait","bakedName":"InlineTypographyRender3","curName":"InlineTypographyRender3","renames":[],"owner":"workspace"}}}}
|