@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-learn-predict","version":"1.0.0","description":"Generic predict-then-reveal instrument — each config-declared scenario states a setup and a question, the learner commits to one of the predicted outcomes, and only then does the outcome play out: a timed reveal draws the scenario's declared value frames one by one as a growing curve with per-frame captions, ending in a verdict against the committed prediction and the scenario's explanation, with a running score across scenarios. All vocabulary is config-declared, so the same mechanism serves any commit-before-you-see teaching beat: what happens to the population, which way does the price move, does the reaction speed up, where does the phase go next. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"PredictOrbital","id":"orb_X0QJEZCB0A5G5061PVHEKBGCVA","entity":{"name":"PredictScene","id":"ent_PR1WHK4R5SC2WHE4706KDJT6K7","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"scenarios","type":"array","items":{"type":"object","properties":{"question":{"name":"question","type":"string","required":true},"explanation":{"name":"explanation","type":"string","required":false},"setup":{"name":"setup","type":"string","required":true},"frames":{"name":"frames","type":"array","required":true,"items":{"type":"object","properties":{"caption":{"name":"caption","type":"string","required":true},"value":{"name":"value","type":"number","required":true}}}},"correctIndex":{"name":"correctIndex","type":"number","required":true},"options":{"name":"options","type":"array","required":true,"items":{"type":"string"}}}}},{"name":"scenarioIndex","type":"number","default":0},{"name":"totalScenarios","type":"number","default":0},{"name":"phase","type":"string"},{"name":"chosenIndex","type":"number","default":0},{"name":"frames","type":"array","items":{"type":"object","properties":{"value":{"name":"value","type":"number","required":true},"caption":{"name":"caption","type":"string","required":true}}}},{"name":"frameIndex","type":"number","default":0},{"name":"frameCaption","type":"string"},{"name":"frameValue","type":"number","default":0},{"name":"revealSamples","type":"array","items":{"type":"object","properties":{"y":{"name":"y","type":"number","required":true},"x":{"name":"x","type":"number","required":true}}}},{"name":"revealCurves","type":"array","items":{"type":"object","properties":{"color":{"name":"color","type":"string","required":false},"samples":{"name":"samples","type":"array","required":true,"items":{"type":"object","properties":{"x":{"name":"x","type":"number","required":true},"y":{"name":"y","type":"number","required":true}}}},"label":{"name":"label","type":"string","required":false}}}},{"name":"score","type":"number","default":0},{"name":"done","type":"boolean","default":false},{"name":"setupText","type":"string"},{"name":"question","type":"string"},{"name":"options","type":"array","items":{"type":"string"}},{"name":"correctIndex","type":"number","default":0},{"name":"explanation","type":"string"},{"name":"feedback","type":"string"},{"name":"view","type":"array","items":{"type":"node"}}]},"traits":[{"name":"PredictSim","id":"trt_7DGBC3A0CR06C4BAGJWA50MPF1","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","chosenIndex","correctIndex","done","explanation","feedback","frameCaption","frameIndex","frameValue","frames","options","phase","question","revealCurves","revealSamples","scenarioIndex","scenarios","score","setupText","title","totalScenarios","view"]},"effectRow":[{"kind":"emit","resource":"LEARN_ROUND_COMPLETE"},{"kind":"emit","resource":"PREDICTION_COMMITTED"},{"kind":"emit","resource":"ROUND_RESTARTED"},{"kind":"emit","resource":"SCENARIO_ADVANCED"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.chosenIndex"},{"kind":"set","resource":"@entity.correctIndex"},{"kind":"set","resource":"@entity.done"},{"kind":"set","resource":"@entity.explanation"},{"kind":"set","resource":"@entity.feedback"},{"kind":"set","resource":"@entity.feedback","site":"tick"},{"kind":"set","resource":"@entity.frameCaption"},{"kind":"set","resource":"@entity.frameCaption","site":"tick"},{"kind":"set","resource":"@entity.frameIndex"},{"kind":"set","resource":"@entity.frameIndex","site":"tick"},{"kind":"set","resource":"@entity.frameValue"},{"kind":"set","resource":"@entity.frameValue","site":"tick"},{"kind":"set","resource":"@entity.frames"},{"kind":"set","resource":"@entity.options"},{"kind":"set","resource":"@entity.phase"},{"kind":"set","resource":"@entity.phase","site":"tick"},{"kind":"set","resource":"@entity.question"},{"kind":"set","resource":"@entity.revealCurves"},{"kind":"set","resource":"@entity.revealCurves","site":"tick"},{"kind":"set","resource":"@entity.revealSamples"},{"kind":"set","resource":"@entity.revealSamples","site":"tick"},{"kind":"set","resource":"@entity.scenarioIndex"},{"kind":"set","resource":"@entity.scenarios"},{"kind":"set","resource":"@entity.score"},{"kind":"set","resource":"@entity.score","site":"tick"},{"kind":"set","resource":"@entity.setupText"},{"kind":"set","resource":"@entity.title"},{"kind":"set","resource":"@entity.totalScenarios"},{"kind":"set","resource":"@entity.view"},{"kind":"ticks","site":"tick"}],"category":"interaction","linkedEntity":"PredictScene","linkedEntityId":"ent_PR1WHK4R5SC2WHE4706KDJT6K7","entityRefIds":{"PredictScene":"ent_PR1WHK4R5SC2WHE4706KDJT6K7"},"emits":[{"event":"PREDICTION_COMMITTED","eventId":"evt_R16K5HR41D20PK6X3ZNC0MTFNC","description":"The learner locked in a prediction and the reveal started — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"predict then reveal, commit prediction, hypothesis first, what happens next","tier":"domain","scope":"external","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"chosenIndex","type":"number"}]},{"event":"SCENARIO_ADVANCED","eventId":"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F","description":"The learner moved to the next scenario (or completed the round) with the running score.","tier":"domain","scope":"external","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"done","type":"boolean"},{"name":"score","type":"number"}]},{"event":"ROUND_RESTARTED","eventId":"evt_6RYR7PJ2CJ169A485G7VYSZMST","description":"The learner restarted the round from scratch.","tier":"domain","scope":"external","payloadSchema":[{"name":"totalScenarios","type":"number"}]},{"event":"LEARN_ROUND_COMPLETE","eventId":"evt_N18KP6P33A1HN9MQP5XX63ZBMW","description":"Fired once when the round finishes (advancing past the final scenario) — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.","synonyms":"round complete, finished, done, completion","tier":"domain","scope":"external","payloadSchema":[{"name":"score","type":"number"},{"name":"total","type":"number"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_SCNTG8Z85FM2QZYX6YTV3P761T","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_86CBSPQTR3XC1YRXV785EVMMWY","name":"Mode Selected","description":"Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.","tier":"domain","payloadSchema":[{"name":"mode","type":"string"}],"listened":true},{"key":"ROSTER_LOADED","id":"evt_AMA498A0RJ0C94YMDETHBJNQFG","name":"Roster Loaded","description":"Runtime content feed, honoured only when rosterSource is event — mode names the instrument it is for (the matchMode it carries, blank when standalone) and scenarios is the scenario list; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides.","tier":"domain","payloadSchema":[{"name":"mode","type":"string","required":true},{"name":"scenarios","type":"[object]","required":true,"properties":[{"name":"setup","type":"string","required":true},{"name":"question","type":"string","required":true},{"name":"options","type":"[string]","required":true},{"name":"correctIndex","type":"number","required":true},{"name":"explanation","type":"string"},{"name":"frames","type":"[object]","required":true,"properties":[{"name":"caption","type":"string","required":true},{"name":"value","type":"number","required":true}]}]}],"listened":true},{"key":"PREDICT","id":"evt_KVF0AY4YBCF5PC7092D0EQTJXQ","name":"Predict","description":"Learner committed to one of the predicted outcomes before seeing the reveal — index is the chosen option; the reveal then plays out.","tier":"domain","payloadSchema":[{"name":"index","type":"number"}],"listened":true},{"key":"NEXT","id":"evt_AXBNXP326DH36ZXW2GFAHVC7Q2","name":"Next","description":"Learner advanced to the next scenario after the reveal was judged; past the last scenario this completes the round.","tier":"domain","listened":true},{"key":"RETRY","id":"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8","name":"Retry","description":"Learner restarted the round from the first scenario with a cleared score.","tier":"domain","listened":true},{"key":"PREDICTION_COMMITTED","id":"evt_R16K5HR41D20PK6X3ZNC0MTFNC","name":"Prediction Committed","description":"The learner locked in a prediction and the reveal started — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"predict then reveal, commit prediction, hypothesis first, what happens next","tier":"domain","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"chosenIndex","type":"number"}]},{"key":"SCENARIO_ADVANCED","id":"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F","name":"Scenario Advanced","description":"The learner moved to the next scenario (or completed the round) with the running score.","tier":"domain","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"done","type":"boolean"},{"name":"score","type":"number"}]},{"key":"ROUND_RESTARTED","id":"evt_6RYR7PJ2CJ169A485G7VYSZMST","name":"Round Restarted","description":"The learner restarted the round from scratch.","tier":"domain","payloadSchema":[{"name":"totalScenarios","type":"number"}]},{"key":"LEARN_ROUND_COMPLETE","id":"evt_N18KP6P33A1HN9MQP5XX63ZBMW","name":"Learn Round Complete","description":"Fired once when the round finishes (advancing past the final scenario) — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.","synonyms":"round complete, finished, done, completion","tier":"domain","payloadSchema":[{"name":"score","type":"number"},{"name":"total","type":"number"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_SCNTG8Z85FM2QZYX6YTV3P761T","guard":["and",["==","@config.matchMode",""],["==","@config.rosterSource","config"]],"effects":[["let",[["first",["array/nth","@config.scenarios",0]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.scenarioIndex",0],["set","@entity.scenarios","@config.scenarios"],["set","@entity.totalScenarios",["array/len","@config.scenarios"]],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_86CBSPQTR3XC1YRXV785EVMMWY","guard":["and",["not",["==","@config.matchMode",""]],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_86CBSPQTR3XC1YRXV785EVMMWY","guard":["and",["==","@payload.mode","@config.matchMode"],["==","@config.rosterSource","config"]],"effects":[["let",[["first",["array/nth","@config.scenarios",0]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.scenarioIndex",0],["set","@entity.scenarios","@config.scenarios"],["set","@entity.totalScenarios",["array/len","@config.scenarios"]],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_AMA498A0RJ0C94YMDETHBJNQFG","guard":["and",["==","@config.rosterSource","event"],["and",["==","@payload.mode","@config.matchMode"],[">",["array/len","@payload.scenarios"],0]]],"effects":[["let",[["first",["array/nth","@payload.scenarios",0]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.scenarioIndex",0],["set","@entity.scenarios","@payload.scenarios"],["set","@entity.totalScenarios",["array/len","@payload.scenarios"]],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_AMA498A0RJ0C94YMDETHBJNQFG","guard":["and",["==","@config.rosterSource","event"],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"PREDICT","eventId":"evt_KVF0AY4YBCF5PC7092D0EQTJXQ","guard":["and",["==","@entity.active",true],["and",["==","@entity.phase","commit"],["==","@entity.done",false]]],"effects":[["let",[["frame0",["array/nth","@entity.frames",0]]],["do",["set","@entity.chosenIndex","@payload.index"],["set","@entity.phase","reveal"],["set","@entity.frameIndex",0],["set","@entity.frameCaption",["object/get","@frame0","caption"]],["set","@entity.frameValue",["object/get","@frame0","value"]],["set","@entity.revealSamples",[{"x":0,"y":["object/get","@frame0","value"]}]],["set","@entity.revealCurves",[{"label":"@config.revealLabel","color":"@config.revealColor","samples":"@entity.revealSamples"}]],["set","@entity.feedback",["str/concat","Prediction locked: ",["array/nth","@entity.options","@payload.index"]," — watch what happens."]]]],["emit","PREDICTION_COMMITTED",{"scenarioIndex":"@entity.scenarioIndex","chosenIndex":"@entity.chosenIndex"}]]},{"from":"idle","to":"idle","event":"NEXT","eventId":"evt_AXBNXP326DH36ZXW2GFAHVC7Q2","guard":["and",["==","@entity.active",true],["and",["==","@entity.phase","judged"],["==","@entity.done",false]]],"effects":[["if",[">=",["+","@entity.scenarioIndex",1],["array/len","@entity.scenarios"]],["emit","LEARN_ROUND_COMPLETE",{"score":"@entity.score","total":["array/len","@entity.scenarios"]}],null],["let",[["nextIndex",["+","@entity.scenarioIndex",1]],["finished",[">=","@nextIndex",["array/len","@entity.scenarios"]]],["next",["array/nth","@entity.scenarios",["math/min","@nextIndex",["-",["array/len","@entity.scenarios"],1]]]]],["do",["set","@entity.scenarioIndex",["if","@finished","@entity.scenarioIndex","@nextIndex"]],["set","@entity.done",["if","@finished",true,false]],["set","@entity.phase",["if","@finished","judged","commit"]],["set","@entity.chosenIndex",0],["set","@entity.frames",["if","@finished","@entity.frames",["object/get","@next","frames"]]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.setupText",["if","@finished","@entity.setupText",["object/get","@next","setup"]]],["set","@entity.question",["if","@finished","@entity.question",["object/get","@next","question"]]],["set","@entity.options",["if","@finished",[],["object/get","@next","options"]]],["set","@entity.correctIndex",["if","@finished","@entity.correctIndex",["object/get","@next","correctIndex"]]],["set","@entity.explanation",["if","@finished","@entity.explanation",["object/get","@next","explanation",""]]],["set","@entity.feedback",["if","@finished",["str/concat","Round complete — ",["str/concat","","@entity.score"]," of ",["str/concat","","@entity.totalScenarios"]," predictions correct."],""]],["set","@entity.view",["if","@finished",[{"type":"typography","variant":"h4","content":"Round Complete"},{"type":"stat-display","label":"Correct predictions","value":"@entity.score","max":"@entity.totalScenarios"}],[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}],["emit","SCENARIO_ADVANCED",{"scenarioIndex":"@entity.scenarioIndex","done":"@entity.done","score":"@entity.score"}]]},{"from":"idle","to":"idle","event":"RETRY","eventId":"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8","guard":["and",["==","@entity.active",true],["==","@entity.done",true]],"effects":[["let",[["first",["array/nth","@entity.scenarios",0]]],["do",["set","@entity.scenarioIndex",0],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}],["emit","ROUND_RESTARTED",{"totalScenarios":"@entity.totalScenarios"}]]}]},"ticks":[{"name":"revealTick","interval":600,"guard":["and",["==","@entity.active",true],["==","@entity.phase","reveal"]],"effects":[["set","@entity.frameIndex",["math/min",["+","@entity.frameIndex",1],["-",["array/len","@entity.frames"],1]]],["set","@entity.frameCaption",["object/get",["array/nth","@entity.frames","@entity.frameIndex"],"caption"]],["set","@entity.frameValue",["object/get",["array/nth","@entity.frames","@entity.frameIndex"],"value"]],["set","@entity.revealSamples",["array/append","@entity.revealSamples",{"x":"@entity.frameIndex","y":"@entity.frameValue"}]],["set","@entity.revealCurves",[{"label":"@config.revealLabel","color":"@config.revealColor","samples":"@entity.revealSamples"}]],["set","@entity.phase",["if",[">=","@entity.frameIndex",["-",["array/len","@entity.frames"],1]],"judged","@entity.phase"]],["set","@entity.score",["if",["and",["==","@entity.phase","judged"],["==","@entity.chosenIndex","@entity.correctIndex"]],["+","@entity.score",1],"@entity.score"]],["set","@entity.feedback",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],["str/concat","Your prediction was right. ","@entity.explanation"],["str/concat","Not this time — the outcome was: ",["array/nth","@entity.options","@entity.correctIndex"],". ","@entity.explanation"]],"@entity.feedback"]]]}],"config":{"valueMin":{"type":"number","default":0,"label":"Value Min","description":"Lower bound of the reveal chart's y axis.","tier":"presentation"},"matchMode":{"type":"string","default":"","label":"Match Mode","description":"When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.","tier":"presentation"},"gridStep":{"type":"number","default":25,"label":"Grid Step","tier":"presentation"},"scenarios":{"type":"[PredictScenario]","default":[{"setup":"A small island hosts 40 rabbits with unlimited grass and no predators.","question":"What happens to the population over the next six seasons?","options":["It levels off","It keeps accelerating","It collapses"],"correctIndex":1,"explanation":"With no limiting factor yet, growth compounds each season.","frames":[{"caption":"Season 1: 40 rabbits","value":40},{"caption":"Season 2: 52 rabbits","value":52},{"caption":"Season 3: 68 rabbits","value":68},{"caption":"Season 4: 88 rabbits","value":88},{"caption":"Season 5: 114 rabbits","value":114},{"caption":"Season 6: 148 rabbits — still accelerating","value":148}]},{"setup":"The same island now has foxes, and grass is running short.","question":"What happens to the rabbit population now?","options":["It keeps accelerating","It levels off near a ceiling","It grows linearly"],"correctIndex":1,"explanation":"Predation and food limits impose a carrying capacity.","frames":[{"caption":"Season 1: 148 rabbits","value":148},{"caption":"Season 2: 160 rabbits","value":160},{"caption":"Season 3: 166 rabbits","value":166},{"caption":"Season 4: 169 rabbits","value":169},{"caption":"Season 5: 170 rabbits — the curve flattens","value":170}]}],"label":"Scenarios","description":"The scenario roster; each carries a setup, the question, the offered predictions with the correct index, an explanation, and the reveal frames (caption + value) that play out after the learner commits. Realizations declare their own subject's scenarios here.","tier":"domain","items":{"type":"object","properties":{"options":{"name":"options","type":"array","required":true,"items":{"type":"string"}},"setup":{"name":"setup","type":"string","required":true},"question":{"name":"question","type":"string","required":true},"explanation":{"name":"explanation","type":"string","required":false},"frames":{"name":"frames","type":"array","required":true,"items":{"type":"object","properties":{"caption":{"name":"caption","type":"string","required":true},"value":{"name":"value","type":"number","required":true}}}},"correctIndex":{"name":"correctIndex","type":"number","required":true}}}},"rosterSource":{"type":"string","default":"config","label":"Roster Source","description":"Where the scenario roster comes from: config reads the scenarios knob at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.","tier":"domain","values":["config","event"]},"title":{"type":"string","default":"Predict, Then Watch","label":"Title","description":"Title shown above the instrument.","tier":"presentation"},"width":{"type":"number","default":600,"label":"Width","tier":"presentation"},"summary":{"type":"string","default":"","label":"Concept","description":"One line under the title saying what is being predicted (keep it under ~65 characters). Empty shows no line.","tier":"presentation"},"revealColor":{"type":"string","default":"series-1","label":"Reveal Color","tier":"presentation"},"revealLabel":{"type":"string","default":"Outcome","label":"Reveal Label","tier":"presentation"},"height":{"type":"number","default":320,"label":"Height","tier":"presentation"},"nextLabel":{"type":"string","default":"Next","label":"Next Label","tier":"presentation"},"retryLabel":{"type":"string","default":"Try Again","label":"Retry Label","tier":"presentation"},"valueMax":{"type":"number","default":200,"label":"Value Max","description":"Upper bound of the reveal chart's y axis.","tier":"presentation"}},"scope":"instance"}],"pages":[{"name":"PredictPage","id":"pag_5DHEXPVCDWP6Y7NYAMJSNGPHC5","path":"/learn-predict","traits":[{"ref":"PredictSim","refId":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"}]}],"types":{"PredictCurve":[{"name":"label","type":"string"},{"name":"color","type":"string"},{"name":"samples","type":"[object]","required":true,"properties":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}]}],"PredictFrame":[{"name":"caption","type":"string","required":true},{"name":"value","type":"number","required":true}],"PredictSample":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}],"PredictScenario":[{"name":"setup","type":"string","required":true},{"name":"question","type":"string","required":true},{"name":"options","type":"[string]","required":true},{"name":"correctIndex","type":"number","required":true},{"name":"explanation","type":"string"},{"name":"frames","type":"[object]","required":true,"properties":[{"name":"caption","type":"string","required":true},{"name":"value","type":"number","required":true}]}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_PR1WHK4R5SC2WHE4706KDJT6K7":{"id":"ent_PR1WHK4R5SC2WHE4706KDJT6K7","kind":"entity","bakedName":"PredictScene","curName":"PredictScene","renames":[],"owner":"workspace"},"evt_6RYR7PJ2CJ169A485G7VYSZMST":{"id":"evt_6RYR7PJ2CJ169A485G7VYSZMST","kind":"event","bakedName":"ROUND_RESTARTED","curName":"ROUND_RESTARTED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_86CBSPQTR3XC1YRXV785EVMMWY":{"id":"evt_86CBSPQTR3XC1YRXV785EVMMWY","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8":{"id":"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8","kind":"event","bakedName":"RETRY","curName":"RETRY","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_AMA498A0RJ0C94YMDETHBJNQFG":{"id":"evt_AMA498A0RJ0C94YMDETHBJNQFG","kind":"event","bakedName":"ROSTER_LOADED","curName":"ROSTER_LOADED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_AXBNXP326DH36ZXW2GFAHVC7Q2":{"id":"evt_AXBNXP326DH36ZXW2GFAHVC7Q2","kind":"event","bakedName":"NEXT","curName":"NEXT","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F":{"id":"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F","kind":"event","bakedName":"SCENARIO_ADVANCED","curName":"SCENARIO_ADVANCED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_KVF0AY4YBCF5PC7092D0EQTJXQ":{"id":"evt_KVF0AY4YBCF5PC7092D0EQTJXQ","kind":"event","bakedName":"PREDICT","curName":"PREDICT","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_N18KP6P33A1HN9MQP5XX63ZBMW":{"id":"evt_N18KP6P33A1HN9MQP5XX63ZBMW","kind":"event","bakedName":"LEARN_ROUND_COMPLETE","curName":"LEARN_ROUND_COMPLETE","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_R16K5HR41D20PK6X3ZNC0MTFNC":{"id":"evt_R16K5HR41D20PK6X3ZNC0MTFNC","kind":"event","bakedName":"PREDICTION_COMMITTED","curName":"PREDICTION_COMMITTED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_SCNTG8Z85FM2QZYX6YTV3P761T":{"id":"evt_SCNTG8Z85FM2QZYX6YTV3P761T","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"orb_X0QJEZCB0A5G5061PVHEKBGCVA":{"id":"orb_X0QJEZCB0A5G5061PVHEKBGCVA","kind":"orbital","bakedName":"PredictOrbital","curName":"PredictOrbital","renames":[],"owner":"workspace"},"pag_5DHEXPVCDWP6Y7NYAMJSNGPHC5":{"id":"pag_5DHEXPVCDWP6Y7NYAMJSNGPHC5","kind":"page","bakedName":"PredictPage","curName":"PredictPage","renames":[],"owner":"workspace"},"trt_7DGBC3A0CR06C4BAGJWA50MPF1":{"id":"trt_7DGBC3A0CR06C4BAGJWA50MPF1","kind":"trait","bakedName":"PredictSim","curName":"PredictSim","renames":[],"owner":"workspace"}}}}
|
|
1
|
+
{"name":"std-learn-predict","version":"1.0.0","description":"Generic predict-then-reveal instrument — each config-declared scenario states a setup and a question, the learner commits to one of the predicted outcomes, and only then does the outcome play out: a timed reveal draws the scenario's declared value frames one by one as a growing curve with per-frame captions, ending in a verdict against the committed prediction and the scenario's explanation, with a running score across scenarios. All vocabulary is config-declared, so the same mechanism serves any commit-before-you-see teaching beat: what happens to the population, which way does the price move, does the reaction speed up, where does the phase go next. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"PredictOrbital","id":"orb_X0QJEZCB0A5G5061PVHEKBGCVA","entity":{"name":"PredictScene","id":"ent_PR1WHK4R5SC2WHE4706KDJT6K7","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"scenarios","type":"array","items":{"type":"object","properties":{"options":{"name":"options","type":"array","required":true,"items":{"type":"string"}},"explanation":{"name":"explanation","type":"string","required":false},"question":{"name":"question","type":"string","required":true},"frames":{"name":"frames","type":"array","required":true,"items":{"type":"object","properties":{"caption":{"name":"caption","type":"string","required":true},"value":{"name":"value","type":"number","required":true}}}},"correctIndex":{"name":"correctIndex","type":"number","required":true},"setup":{"name":"setup","type":"string","required":true}}}},{"name":"scenarioIndex","type":"number","default":0},{"name":"totalScenarios","type":"number","default":0},{"name":"phase","type":"string"},{"name":"chosenIndex","type":"number","default":0},{"name":"frames","type":"array","items":{"type":"object","properties":{"caption":{"name":"caption","type":"string","required":true},"value":{"name":"value","type":"number","required":true}}}},{"name":"frameIndex","type":"number","default":0},{"name":"frameCaption","type":"string"},{"name":"frameValue","type":"number","default":0},{"name":"revealSamples","type":"array","items":{"type":"object","properties":{"x":{"name":"x","type":"number","required":true},"y":{"name":"y","type":"number","required":true}}}},{"name":"revealCurves","type":"array","items":{"type":"object","properties":{"label":{"name":"label","type":"string","required":false},"samples":{"name":"samples","type":"array","required":true,"items":{"type":"object","properties":{"y":{"name":"y","type":"number","required":true},"x":{"name":"x","type":"number","required":true}}}},"color":{"name":"color","type":"string","required":false}}}},{"name":"score","type":"number","default":0},{"name":"done","type":"boolean","default":false},{"name":"setupText","type":"string"},{"name":"question","type":"string"},{"name":"options","type":"array","items":{"type":"string"}},{"name":"correctIndex","type":"number","default":0},{"name":"explanation","type":"string"},{"name":"feedback","type":"string"},{"name":"view","type":"array","items":{"type":"node"}}]},"traits":[{"name":"PredictSim","id":"trt_7DGBC3A0CR06C4BAGJWA50MPF1","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","chosenIndex","correctIndex","done","explanation","feedback","frameCaption","frameIndex","frameValue","frames","options","phase","question","revealCurves","revealSamples","scenarioIndex","scenarios","score","setupText","title","totalScenarios","view"]},"effectRow":[{"kind":"emit","resource":"LEARN_ROUND_COMPLETE"},{"kind":"emit","resource":"PREDICTION_COMMITTED"},{"kind":"emit","resource":"ROUND_RESTARTED"},{"kind":"emit","resource":"SCENARIO_ADVANCED"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.chosenIndex"},{"kind":"set","resource":"@entity.correctIndex"},{"kind":"set","resource":"@entity.done"},{"kind":"set","resource":"@entity.explanation"},{"kind":"set","resource":"@entity.feedback"},{"kind":"set","resource":"@entity.feedback","site":"tick"},{"kind":"set","resource":"@entity.frameCaption"},{"kind":"set","resource":"@entity.frameCaption","site":"tick"},{"kind":"set","resource":"@entity.frameIndex"},{"kind":"set","resource":"@entity.frameIndex","site":"tick"},{"kind":"set","resource":"@entity.frameValue"},{"kind":"set","resource":"@entity.frameValue","site":"tick"},{"kind":"set","resource":"@entity.frames"},{"kind":"set","resource":"@entity.options"},{"kind":"set","resource":"@entity.phase"},{"kind":"set","resource":"@entity.phase","site":"tick"},{"kind":"set","resource":"@entity.question"},{"kind":"set","resource":"@entity.revealCurves"},{"kind":"set","resource":"@entity.revealCurves","site":"tick"},{"kind":"set","resource":"@entity.revealSamples"},{"kind":"set","resource":"@entity.revealSamples","site":"tick"},{"kind":"set","resource":"@entity.scenarioIndex"},{"kind":"set","resource":"@entity.scenarios"},{"kind":"set","resource":"@entity.score"},{"kind":"set","resource":"@entity.score","site":"tick"},{"kind":"set","resource":"@entity.setupText"},{"kind":"set","resource":"@entity.title"},{"kind":"set","resource":"@entity.totalScenarios"},{"kind":"set","resource":"@entity.view"},{"kind":"ticks","site":"tick"}],"category":"interaction","linkedEntity":"PredictScene","linkedEntityId":"ent_PR1WHK4R5SC2WHE4706KDJT6K7","entityRefIds":{"PredictScene":"ent_PR1WHK4R5SC2WHE4706KDJT6K7"},"emits":[{"event":"PREDICTION_COMMITTED","eventId":"evt_R16K5HR41D20PK6X3ZNC0MTFNC","description":"The learner locked in a prediction and the reveal started — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"predict then reveal, commit prediction, hypothesis first, what happens next","tier":"domain","scope":"external","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"chosenIndex","type":"number"}]},{"event":"SCENARIO_ADVANCED","eventId":"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F","description":"The learner moved to the next scenario (or completed the round) with the running score.","tier":"domain","scope":"external","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"done","type":"boolean"},{"name":"score","type":"number"}]},{"event":"ROUND_RESTARTED","eventId":"evt_6RYR7PJ2CJ169A485G7VYSZMST","description":"The learner restarted the round from scratch.","tier":"domain","scope":"external","payloadSchema":[{"name":"totalScenarios","type":"number"}]},{"event":"LEARN_ROUND_COMPLETE","eventId":"evt_N18KP6P33A1HN9MQP5XX63ZBMW","description":"Fired once when the round finishes (advancing past the final scenario) — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.","synonyms":"round complete, finished, done, completion","tier":"domain","scope":"external","payloadSchema":[{"name":"score","type":"number"},{"name":"total","type":"number"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_SCNTG8Z85FM2QZYX6YTV3P761T","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_86CBSPQTR3XC1YRXV785EVMMWY","name":"Mode Selected","description":"Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.","tier":"domain","payloadSchema":[{"name":"mode","type":"string"}],"listened":true},{"key":"ROSTER_LOADED","id":"evt_AMA498A0RJ0C94YMDETHBJNQFG","name":"Roster Loaded","description":"Runtime content feed, honoured only when rosterSource is event — mode names the instrument it is for (the matchMode it carries, blank when standalone) and scenarios is the scenario list; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides.","tier":"domain","payloadSchema":[{"name":"mode","type":"string","required":true},{"name":"scenarios","type":"[object]","required":true,"properties":[{"name":"setup","type":"string","required":true},{"name":"question","type":"string","required":true},{"name":"options","type":"[string]","required":true},{"name":"correctIndex","type":"number","required":true},{"name":"explanation","type":"string"},{"name":"frames","type":"[object]","required":true,"properties":[{"name":"caption","type":"string","required":true},{"name":"value","type":"number","required":true}]}]}],"listened":true},{"key":"PREDICT","id":"evt_KVF0AY4YBCF5PC7092D0EQTJXQ","name":"Predict","description":"Learner committed to one of the predicted outcomes before seeing the reveal — index is the chosen option; the reveal then plays out.","tier":"domain","payloadSchema":[{"name":"index","type":"number"}],"listened":true},{"key":"NEXT","id":"evt_AXBNXP326DH36ZXW2GFAHVC7Q2","name":"Next","description":"Learner advanced to the next scenario after the reveal was judged; past the last scenario this completes the round.","tier":"domain","listened":true},{"key":"RETRY","id":"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8","name":"Retry","description":"Learner restarted the round from the first scenario with a cleared score.","tier":"domain","listened":true},{"key":"PREDICTION_COMMITTED","id":"evt_R16K5HR41D20PK6X3ZNC0MTFNC","name":"Prediction Committed","description":"The learner locked in a prediction and the reveal started — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"predict then reveal, commit prediction, hypothesis first, what happens next","tier":"domain","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"chosenIndex","type":"number"}]},{"key":"SCENARIO_ADVANCED","id":"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F","name":"Scenario Advanced","description":"The learner moved to the next scenario (or completed the round) with the running score.","tier":"domain","payloadSchema":[{"name":"scenarioIndex","type":"number"},{"name":"done","type":"boolean"},{"name":"score","type":"number"}]},{"key":"ROUND_RESTARTED","id":"evt_6RYR7PJ2CJ169A485G7VYSZMST","name":"Round Restarted","description":"The learner restarted the round from scratch.","tier":"domain","payloadSchema":[{"name":"totalScenarios","type":"number"}]},{"key":"LEARN_ROUND_COMPLETE","id":"evt_N18KP6P33A1HN9MQP5XX63ZBMW","name":"Learn Round Complete","description":"Fired once when the round finishes (advancing past the final scenario) — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.","synonyms":"round complete, finished, done, completion","tier":"domain","payloadSchema":[{"name":"score","type":"number"},{"name":"total","type":"number"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_SCNTG8Z85FM2QZYX6YTV3P761T","guard":["and",["==","@config.matchMode",""],["==","@config.rosterSource","config"]],"effects":[["let",[["first",["array/nth","@config.scenarios",0]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.scenarioIndex",0],["set","@entity.scenarios","@config.scenarios"],["set","@entity.totalScenarios",["array/len","@config.scenarios"]],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_86CBSPQTR3XC1YRXV785EVMMWY","guard":["and",["not",["==","@config.matchMode",""]],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_86CBSPQTR3XC1YRXV785EVMMWY","guard":["and",["==","@payload.mode","@config.matchMode"],["==","@config.rosterSource","config"]],"effects":[["let",[["first",["array/nth","@config.scenarios",0]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.scenarioIndex",0],["set","@entity.scenarios","@config.scenarios"],["set","@entity.totalScenarios",["array/len","@config.scenarios"]],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_AMA498A0RJ0C94YMDETHBJNQFG","guard":["and",["==","@config.rosterSource","event"],["and",["==","@payload.mode","@config.matchMode"],[">",["array/len","@payload.scenarios"],0]]],"effects":[["let",[["first",["array/nth","@payload.scenarios",0]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.scenarioIndex",0],["set","@entity.scenarios","@payload.scenarios"],["set","@entity.totalScenarios",["array/len","@payload.scenarios"]],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_AMA498A0RJ0C94YMDETHBJNQFG","guard":["and",["==","@config.rosterSource","event"],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"PREDICT","eventId":"evt_KVF0AY4YBCF5PC7092D0EQTJXQ","guard":["and",["==","@entity.active",true],["and",["==","@entity.phase","commit"],["==","@entity.done",false]]],"effects":[["let",[["frame0",["array/nth","@entity.frames",0]]],["do",["set","@entity.chosenIndex","@payload.index"],["set","@entity.phase","reveal"],["set","@entity.frameIndex",0],["set","@entity.frameCaption",["object/get","@frame0","caption"]],["set","@entity.frameValue",["object/get","@frame0","value"]],["set","@entity.revealSamples",[{"x":0,"y":["object/get","@frame0","value"]}]],["set","@entity.revealCurves",[{"label":"@config.revealLabel","color":"@config.revealColor","samples":"@entity.revealSamples"}]],["set","@entity.feedback",["str/concat","Prediction locked: ",["array/nth","@entity.options","@payload.index"]," — watch what happens."]]]],["emit","PREDICTION_COMMITTED",{"scenarioIndex":"@entity.scenarioIndex","chosenIndex":"@entity.chosenIndex"}]]},{"from":"idle","to":"idle","event":"NEXT","eventId":"evt_AXBNXP326DH36ZXW2GFAHVC7Q2","guard":["and",["==","@entity.active",true],["and",["==","@entity.phase","judged"],["==","@entity.done",false]]],"effects":[["if",[">=",["+","@entity.scenarioIndex",1],["array/len","@entity.scenarios"]],["emit","LEARN_ROUND_COMPLETE",{"score":"@entity.score","total":["array/len","@entity.scenarios"]}],null],["let",[["nextIndex",["+","@entity.scenarioIndex",1]],["finished",[">=","@nextIndex",["array/len","@entity.scenarios"]]],["next",["array/nth","@entity.scenarios",["math/min","@nextIndex",["-",["array/len","@entity.scenarios"],1]]]]],["do",["set","@entity.scenarioIndex",["if","@finished","@entity.scenarioIndex","@nextIndex"]],["set","@entity.done",["if","@finished",true,false]],["set","@entity.phase",["if","@finished","judged","commit"]],["set","@entity.chosenIndex",0],["set","@entity.frames",["if","@finished","@entity.frames",["object/get","@next","frames"]]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.setupText",["if","@finished","@entity.setupText",["object/get","@next","setup"]]],["set","@entity.question",["if","@finished","@entity.question",["object/get","@next","question"]]],["set","@entity.options",["if","@finished",[],["object/get","@next","options"]]],["set","@entity.correctIndex",["if","@finished","@entity.correctIndex",["object/get","@next","correctIndex"]]],["set","@entity.explanation",["if","@finished","@entity.explanation",["object/get","@next","explanation",""]]],["set","@entity.feedback",["if","@finished",["str/concat","Round complete — ",["str/concat","","@entity.score"]," of ",["str/concat","","@entity.totalScenarios"]," predictions correct."],""]],["set","@entity.view",["if","@finished",[{"type":"typography","variant":"h4","content":"Round Complete"},{"type":"stat-display","label":"Correct predictions","value":"@entity.score","max":"@entity.totalScenarios"}],[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}],["emit","SCENARIO_ADVANCED",{"scenarioIndex":"@entity.scenarioIndex","done":"@entity.done","score":"@entity.score"}]]},{"from":"idle","to":"idle","event":"RETRY","eventId":"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8","guard":["and",["==","@entity.active",true],["==","@entity.done",true]],"effects":[["let",[["first",["array/nth","@entity.scenarios",0]]],["do",["set","@entity.scenarioIndex",0],["set","@entity.phase","commit"],["set","@entity.chosenIndex",0],["set","@entity.frames",["object/get","@first","frames"]],["set","@entity.frameIndex",0],["set","@entity.frameCaption",""],["set","@entity.frameValue",0],["set","@entity.revealSamples",[]],["set","@entity.revealCurves",[]],["set","@entity.score",0],["set","@entity.done",false],["set","@entity.setupText",["object/get","@first","setup"]],["set","@entity.question",["object/get","@first","question"]],["set","@entity.options",["object/get","@first","options"]],["set","@entity.correctIndex",["object/get","@first","correctIndex"]],["set","@entity.explanation",["object/get","@first","explanation",""]],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.setupText"},{"type":"typography","variant":"h4","content":"@entity.question"}]}]]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if","@entity.done",["str/concat","@entity.score"," / ","@entity.totalScenarios"," correct"],["if",["==","@entity.phase","commit"],"Predict",["if",["==","@entity.phase","reveal"],"Revealing",["if",["==","@entity.chosenIndex","@entity.correctIndex"],"Correct","Incorrect"]]]],"variant":["if","@entity.done","primary",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],"success","error"],"neutral"]]}]},{"type":"progress-bar","value":["+","@entity.scenarioIndex",1],"max":"@entity.totalScenarios","showPercentage":false,"label":["str/concat","Scenario ",["str/concat","",["+","@entity.scenarioIndex",1]]," of ",["str/concat","","@entity.totalScenarios"]]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.options"]],["fn",["i"],{"type":"button","action":"PREDICT","actionPayload":{"index":"@i"},"label":["array/nth","@entity.options","@i"],"size":"lg","disabled":["!=","@entity.phase","commit"],"variant":["if",["==","@entity.phase","commit"],"secondary",["if",["==","@entity.phase","reveal"],["if",["==","@entity.chosenIndex","@i"],"primary","ghost"],["if",["==","@i","@entity.correctIndex"],"success",["if",["==","@entity.chosenIndex","@i"],"danger","ghost"]]]]}]]},{"type":"math-canvas","width":"@config.width","height":"@config.height","title":"","xMin":0,"xMax":["math/max",1,["-",["array/len","@entity.frames"],1]],"yMin":"@config.valueMin","yMax":"@config.valueMax","showAxes":true,"showGrid":true,"gridStep":"@config.gridStep","curves":"@entity.revealCurves","points":[],"vectors":[],"shapes":[],"interactive":false,"animate":false,"keyMap":{"ArrowRight":"NEXT","KeyR":"RETRY"}},{"type":"typography","variant":"body","content":"@entity.frameCaption"},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"NEXT","label":"@config.nextLabel","icon":"chevron-right","variant":"primary","disabled":["if",["and",["==","@entity.phase","judged"],["==","@entity.done",false]],false,true]},{"type":"button","action":"RETRY","label":"@config.retryLabel","icon":"rotate-ccw","variant":"ghost","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Correct ","@entity.score"," of ","@entity.totalScenarios"]}]}]}]}],["emit","ROUND_RESTARTED",{"totalScenarios":"@entity.totalScenarios"}]]}]},"ticks":[{"name":"revealTick","interval":600,"guard":["and",["==","@entity.active",true],["==","@entity.phase","reveal"]],"effects":[["set","@entity.frameIndex",["math/min",["+","@entity.frameIndex",1],["-",["array/len","@entity.frames"],1]]],["set","@entity.frameCaption",["object/get",["array/nth","@entity.frames","@entity.frameIndex"],"caption"]],["set","@entity.frameValue",["object/get",["array/nth","@entity.frames","@entity.frameIndex"],"value"]],["set","@entity.revealSamples",["array/append","@entity.revealSamples",{"x":"@entity.frameIndex","y":"@entity.frameValue"}]],["set","@entity.revealCurves",[{"label":"@config.revealLabel","color":"@config.revealColor","samples":"@entity.revealSamples"}]],["set","@entity.phase",["if",[">=","@entity.frameIndex",["-",["array/len","@entity.frames"],1]],"judged","@entity.phase"]],["set","@entity.score",["if",["and",["==","@entity.phase","judged"],["==","@entity.chosenIndex","@entity.correctIndex"]],["+","@entity.score",1],"@entity.score"]],["set","@entity.feedback",["if",["==","@entity.phase","judged"],["if",["==","@entity.chosenIndex","@entity.correctIndex"],["str/concat","Your prediction was right. ","@entity.explanation"],["str/concat","Not this time — the outcome was: ",["array/nth","@entity.options","@entity.correctIndex"],". ","@entity.explanation"]],"@entity.feedback"]]]}],"config":{"nextLabel":{"type":"string","default":"Next","label":"Next Label","tier":"presentation"},"height":{"type":"number","default":320,"label":"Height","tier":"presentation"},"retryLabel":{"type":"string","default":"Try Again","label":"Retry Label","tier":"presentation"},"scenarios":{"type":"[PredictScenario]","default":[{"setup":"A small island hosts 40 rabbits with unlimited grass and no predators.","question":"What happens to the population over the next six seasons?","options":["It levels off","It keeps accelerating","It collapses"],"correctIndex":1,"explanation":"With no limiting factor yet, growth compounds each season.","frames":[{"caption":"Season 1: 40 rabbits","value":40},{"caption":"Season 2: 52 rabbits","value":52},{"caption":"Season 3: 68 rabbits","value":68},{"caption":"Season 4: 88 rabbits","value":88},{"caption":"Season 5: 114 rabbits","value":114},{"caption":"Season 6: 148 rabbits — still accelerating","value":148}]},{"setup":"The same island now has foxes, and grass is running short.","question":"What happens to the rabbit population now?","options":["It keeps accelerating","It levels off near a ceiling","It grows linearly"],"correctIndex":1,"explanation":"Predation and food limits impose a carrying capacity.","frames":[{"caption":"Season 1: 148 rabbits","value":148},{"caption":"Season 2: 160 rabbits","value":160},{"caption":"Season 3: 166 rabbits","value":166},{"caption":"Season 4: 169 rabbits","value":169},{"caption":"Season 5: 170 rabbits — the curve flattens","value":170}]}],"label":"Scenarios","description":"The scenario roster; each carries a setup, the question, the offered predictions with the correct index, an explanation, and the reveal frames (caption + value) that play out after the learner commits. Realizations declare their own subject's scenarios here.","tier":"domain","items":{"type":"object","properties":{"correctIndex":{"name":"correctIndex","type":"number","required":true},"frames":{"name":"frames","type":"array","required":true,"items":{"type":"object","properties":{"caption":{"name":"caption","type":"string","required":true},"value":{"name":"value","type":"number","required":true}}}},"setup":{"name":"setup","type":"string","required":true},"options":{"name":"options","type":"array","required":true,"items":{"type":"string"}},"explanation":{"name":"explanation","type":"string","required":false},"question":{"name":"question","type":"string","required":true}}}},"valueMin":{"type":"number","default":0,"label":"Value Min","description":"Lower bound of the reveal chart's y axis.","tier":"presentation"},"rosterSource":{"type":"string","default":"config","label":"Roster Source","description":"Where the scenario roster comes from: config reads the scenarios knob at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.","tier":"domain","values":["config","event"]},"gridStep":{"type":"number","default":25,"label":"Grid Step","tier":"presentation"},"revealColor":{"type":"string","default":"series-1","label":"Reveal Color","tier":"presentation"},"summary":{"type":"string","default":"","label":"Concept","description":"One line under the title saying what is being predicted (keep it under ~65 characters). Empty shows no line.","tier":"presentation"},"matchMode":{"type":"string","default":"","label":"Match Mode","description":"When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.","tier":"presentation"},"revealLabel":{"type":"string","default":"Outcome","label":"Reveal Label","tier":"presentation"},"title":{"type":"string","default":"Predict, Then Watch","label":"Title","description":"Title shown above the instrument.","tier":"presentation"},"valueMax":{"type":"number","default":200,"label":"Value Max","description":"Upper bound of the reveal chart's y axis.","tier":"presentation"},"width":{"type":"number","default":600,"label":"Width","tier":"presentation"}},"scope":"instance"}],"pages":[{"name":"PredictPage","id":"pag_5DHEXPVCDWP6Y7NYAMJSNGPHC5","path":"/learn-predict","traits":[{"ref":"PredictSim","refId":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"}]}],"types":{"PredictCurve":[{"name":"label","type":"string"},{"name":"color","type":"string"},{"name":"samples","type":"[object]","required":true,"properties":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}]}],"PredictFrame":[{"name":"caption","type":"string","required":true},{"name":"value","type":"number","required":true}],"PredictSample":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}],"PredictScenario":[{"name":"setup","type":"string","required":true},{"name":"question","type":"string","required":true},{"name":"options","type":"[string]","required":true},{"name":"correctIndex","type":"number","required":true},{"name":"explanation","type":"string"},{"name":"frames","type":"[object]","required":true,"properties":[{"name":"caption","type":"string","required":true},{"name":"value","type":"number","required":true}]}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_PR1WHK4R5SC2WHE4706KDJT6K7":{"id":"ent_PR1WHK4R5SC2WHE4706KDJT6K7","kind":"entity","bakedName":"PredictScene","curName":"PredictScene","renames":[],"owner":"workspace"},"evt_6RYR7PJ2CJ169A485G7VYSZMST":{"id":"evt_6RYR7PJ2CJ169A485G7VYSZMST","kind":"event","bakedName":"ROUND_RESTARTED","curName":"ROUND_RESTARTED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_86CBSPQTR3XC1YRXV785EVMMWY":{"id":"evt_86CBSPQTR3XC1YRXV785EVMMWY","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8":{"id":"evt_8Y2VQ1YFM57T2MWAEHRGJR70E8","kind":"event","bakedName":"RETRY","curName":"RETRY","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_AMA498A0RJ0C94YMDETHBJNQFG":{"id":"evt_AMA498A0RJ0C94YMDETHBJNQFG","kind":"event","bakedName":"ROSTER_LOADED","curName":"ROSTER_LOADED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_AXBNXP326DH36ZXW2GFAHVC7Q2":{"id":"evt_AXBNXP326DH36ZXW2GFAHVC7Q2","kind":"event","bakedName":"NEXT","curName":"NEXT","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F":{"id":"evt_BGQAYNH2TBHD5VRC2VVHVXFB1F","kind":"event","bakedName":"SCENARIO_ADVANCED","curName":"SCENARIO_ADVANCED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_KVF0AY4YBCF5PC7092D0EQTJXQ":{"id":"evt_KVF0AY4YBCF5PC7092D0EQTJXQ","kind":"event","bakedName":"PREDICT","curName":"PREDICT","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_N18KP6P33A1HN9MQP5XX63ZBMW":{"id":"evt_N18KP6P33A1HN9MQP5XX63ZBMW","kind":"event","bakedName":"LEARN_ROUND_COMPLETE","curName":"LEARN_ROUND_COMPLETE","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_R16K5HR41D20PK6X3ZNC0MTFNC":{"id":"evt_R16K5HR41D20PK6X3ZNC0MTFNC","kind":"event","bakedName":"PREDICTION_COMMITTED","curName":"PREDICTION_COMMITTED","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"evt_SCNTG8Z85FM2QZYX6YTV3P761T":{"id":"evt_SCNTG8Z85FM2QZYX6YTV3P761T","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_7DGBC3A0CR06C4BAGJWA50MPF1"},"orb_X0QJEZCB0A5G5061PVHEKBGCVA":{"id":"orb_X0QJEZCB0A5G5061PVHEKBGCVA","kind":"orbital","bakedName":"PredictOrbital","curName":"PredictOrbital","renames":[],"owner":"workspace"},"pag_5DHEXPVCDWP6Y7NYAMJSNGPHC5":{"id":"pag_5DHEXPVCDWP6Y7NYAMJSNGPHC5","kind":"page","bakedName":"PredictPage","curName":"PredictPage","renames":[],"owner":"workspace"},"trt_7DGBC3A0CR06C4BAGJWA50MPF1":{"id":"trt_7DGBC3A0CR06C4BAGJWA50MPF1","kind":"trait","bakedName":"PredictSim","curName":"PredictSim","renames":[],"owner":"workspace"}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"std-learn-sample-accumulator","version":"1.0.0","description":"Generic sample-accumulator engine — a Draw button adds a batch of pseudo-random samples from a config-selected source (uniform 0..1, or a coin flip weighted by bias) into a fixed-bin histogram on a math-canvas, with running sample count, running mean, and (for the coin source) observed proportion vs bias. Subject atoms narrow the source kind and labels through config; this atom owns only the draw-and-accumulate mechanics. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"SampleAccumulatorOrbital","id":"orb_XRCCSBTSRZCWFTK7ECGTJ38EC7","entity":{"name":"SampleAccumulatorScene","id":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"sourceKind","type":"string"},{"name":"batchSize","type":"number"},{"name":"samples","type":"array","items":{"type":"number"}},{"name":"sampleCount","type":"number"},{"name":"mean","type":"number"},{"name":"proportion","type":"number"},{"name":"shapes","type":"array","items":{"type":"object","properties":{"lineWidth":{"name":"lineWidth","type":"number","required":false},"type":{"name":"type","type":"string","required":true,"values":["line","arrow","circle","rect","polygon","path","text","axis","grid"]},"step":{"name":"step","type":"number","required":false},"opacity":{"name":"opacity","type":"number","required":false},"points":{"name":"points","type":"array","required":false,"items":{"type":"object","properties":{"y":{"name":"y","type":"number","required":true},"x":{"name":"x","type":"number","required":true}}}},"fillTone":{"name":"fillTone","type":"string","required":false},"path":{"name":"path","type":"string","required":false},"text":{"name":"text","type":"string","required":false},"fill":{"name":"fill","type":"string","required":false},"height":{"name":"height","type":"number","required":false},"axis":{"name":"axis","type":"string","required":false,"values":["x","y"]},"fontSize":{"name":"fontSize","type":"number","required":false},"radius":{"name":"radius","type":"number","required":false},"y2":{"name":"y2","type":"number","required":false},"color":{"name":"color","type":"string","required":false},"min":{"name":"min","type":"number","required":false},"align":{"name":"align","type":"string","required":false,"values":["left","center","right"]},"x2":{"name":"x2","type":"number","required":false},"width":{"name":"width","type":"number","required":false},"y":{"name":"y","type":"number","required":false},"id":{"name":"id","type":"string","required":false},"max":{"name":"max","type":"number","required":false},"stroke":{"name":"stroke","type":"string","required":false},"y1":{"name":"y1","type":"number","required":false},"x":{"name":"x","type":"number","required":false},"fillStyle":{"name":"fillStyle","type":"string","required":false},"label":{"name":"label","type":"string","required":false},"tone":{"name":"tone","type":"string","required":false},"textSize":{"name":"textSize","type":"string","required":false},"x1":{"name":"x1","type":"number","required":false}}}}]},"traits":[{"name":"SampleAccumulatorSim","id":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","batchSize","mean","proportion","sampleCount","samples","shapes","sourceKind","title"]},"effectRow":[{"kind":"emit","resource":"ACCUMULATOR_RESET"},{"kind":"emit","resource":"SAMPLES_DRAWN"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.batchSize"},{"kind":"set","resource":"@entity.mean"},{"kind":"set","resource":"@entity.proportion"},{"kind":"set","resource":"@entity.sampleCount"},{"kind":"set","resource":"@entity.samples"},{"kind":"set","resource":"@entity.shapes"},{"kind":"set","resource":"@entity.sourceKind"},{"kind":"set","resource":"@entity.title"}],"category":"interaction","linkedEntity":"SampleAccumulatorScene","linkedEntityId":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE","entityRefIds":{"SampleAccumulatorScene":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE"},"emits":[{"event":"SAMPLES_DRAWN","eventId":"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX","description":"The accumulated sample count and running mean after each draw — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"sample drawn, running mean, law of large numbers, convergence, histogram","tier":"domain","scope":"external","payloadSchema":[{"name":"count","type":"number"},{"name":"mean","type":"number"}]},{"event":"ACCUMULATOR_RESET","eventId":"evt_CKPT1TM91R4GWD41G7R3BZFTQT","description":"The accumulator was cleared back to zero samples — a composed listener can subscribe; a harmless no-op when the atom runs standalone.","tier":"domain","scope":"external","payloadSchema":[{"name":"_unit","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_GDRJEDFBEWNQE3MEBH33HWY9RN","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_NEJNHW041P20V00Z7AESD1G0TW","name":"Mode Selected","description":"Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.","tier":"domain","payloadSchema":[{"name":"mode","type":"string"}],"listened":true},{"key":"DRAW","id":"evt_JYCN23Z90NMGAJHH5DN2PEF1J7","name":"Draw"},{"key":"SET_BATCH_SIZE","id":"evt_4ARKPJ013P0HVE38J6SGDXG5JA","name":"Set Batch Size","description":"Learner dragged the batch-size slider — value is the new number of samples each Draw adds.","tier":"domain","payloadSchema":[{"name":"value","type":"number"}],"listened":true},{"key":"RESET","id":"evt_VN8W1YDAHXN8YVKWW806Y1EWNB","name":"Reset"},{"key":"SAMPLES_DRAWN","id":"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX","name":"Samples Drawn","description":"The accumulated sample count and running mean after each draw — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"sample drawn, running mean, law of large numbers, convergence, histogram","tier":"domain","payloadSchema":[{"name":"count","type":"number"},{"name":"mean","type":"number"}]},{"key":"ACCUMULATOR_RESET","id":"evt_CKPT1TM91R4GWD41G7R3BZFTQT","name":"Accumulator Reset","description":"The accumulator was cleared back to zero samples — a composed listener can subscribe; a harmless no-op when the atom runs standalone.","tier":"domain","payloadSchema":[{"name":"_unit","type":"string"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_GDRJEDFBEWNQE3MEBH33HWY9RN","guard":["==","@config.matchMode",""],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.sourceKind","@config.sourceKind"],["set","@entity.batchSize","@config.batchSize"],["set","@entity.samples",[]],["set","@entity.sampleCount",0],["set","@entity.mean",0],["set","@entity.proportion",0],["set","@entity.shapes",[]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_NEJNHW041P20V00Z7AESD1G0TW","guard":["and",["not",["==","@config.matchMode",""]],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_NEJNHW041P20V00Z7AESD1G0TW","guard":["==","@payload.mode","@config.matchMode"],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.sourceKind","@config.sourceKind"],["set","@entity.batchSize","@config.batchSize"],["set","@entity.samples",[]],["set","@entity.sampleCount",0],["set","@entity.mean",0],["set","@entity.proportion",0],["set","@entity.shapes",[]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}]]},{"from":"idle","to":"idle","event":"DRAW","eventId":"evt_JYCN23Z90NMGAJHH5DN2PEF1J7","guard":["==","@entity.active",true],"effects":[["let",[["kind","@entity.sourceKind"],["bias","@config.bias"],["n","@entity.batchSize"],["newSamples",["array/map",["array/range","@n"],["fn",["i"],["if",["==","@kind","coin"],["if",["<",["math/random"],"@bias"],1,0],["math/random"]]]]],["allSamples",["array/concat","@entity.samples","@newSamples"]],["countV",["array/len","@allSamples"]],["meanV",["/",["array/reduce","@allSamples",0,["fn",["acc","x"],["+","@acc","@x"]]],"@countV"]],["proportionV",["if",["==","@kind","coin"],"@meanV",0]],["binCountV","@config.binCount"],["binW",["/",1,"@binCountV"]],["counts",["array/map",["array/range","@binCountV"],["fn","b",["array/len",["array/filter","@allSamples",["fn","v",["if",["==","@b",["-","@binCountV",1]],["and",[">=","@v",["*","@b","@binW"]],["<=","@v",["*",["+","@b",1],"@binW"]]],["and",[">=","@v",["*","@b","@binW"]],["<","@v",["*",["+","@b",1],"@binW"]]]]]]]]]],["maxCount",["math/max",1,["array/reduce","@counts",0,["fn",["acc","c"],["math/max","@acc","@c"]]]]],["plotW",["-","@config.width",48]],["plotH",["-","@config.height",48]],["histShapes",["array/map",["array/range","@binCountV"],["fn","b",["let",[["barH",["*",["/",["array/nth","@counts","@b"],"@maxCount"],"@plotH"]]],{"type":"rect","x":["+",24,["*","@b",["/","@plotW","@binCountV"]]],"y":["-",["+",24,"@plotH"],"@barH"],"width":["*",["/","@plotW","@binCountV"],0.9],"height":"@barH","tone":"@config.color","fillTone":"@config.color","fillStyle":"solid"}]]]]],["do",["set","@entity.samples","@allSamples"],["set","@entity.sampleCount","@countV"],["set","@entity.mean","@meanV"],["set","@entity.proportion","@proportionV"],["set","@entity.shapes","@histShapes"]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}],["emit","SAMPLES_DRAWN",{"count":"@entity.sampleCount","mean":"@entity.mean"}]]},{"from":"idle","to":"idle","event":"SET_BATCH_SIZE","eventId":"evt_4ARKPJ013P0HVE38J6SGDXG5JA","guard":["==","@entity.active",true],"effects":[["set","@entity.batchSize",["math/round","@payload.value"]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}]]},{"from":"idle","to":"idle","event":"RESET","eventId":"evt_VN8W1YDAHXN8YVKWW806Y1EWNB","guard":["==","@entity.active",true],"effects":[["set","@entity.samples",[]],["set","@entity.sampleCount",0],["set","@entity.mean",0],["set","@entity.proportion",0],["set","@entity.shapes",[]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}],["emit","ACCUMULATOR_RESET",{}]]}]},"config":{"binCount":{"type":"number","default":10,"label":"Bin Count","description":"Number of histogram buckets across the 0..1 value range.","tier":"presentation"},"matchMode":{"type":"string","default":"","label":"Match Mode","description":"When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.","tier":"presentation"},"height":{"type":"number","default":400,"label":"Height","tier":"presentation"},"title":{"type":"string","default":"Sample Accumulator","label":"Title","description":"The instrument's name, the header's one hero.","tier":"presentation"},"summary":{"type":"string","default":"","label":"Concept","description":"One line under the title saying what the learner is looking at (keep it under ~65 characters). Empty shows no line.","tier":"presentation"},"sourceKind":{"type":"string","default":"uniform","label":"Source Kind","description":"Distribution each draw samples from: uniform (0..1) or coin (Bernoulli 0/1 weighted by bias).","synonyms":"uniform distribution, coin flip, bernoulli trial, random sampling, source distribution","tier":"domain"},"color":{"type":"string","default":"series-1","label":"Bar Color","tier":"presentation"},"width":{"type":"number","default":600,"label":"Width","tier":"presentation"},"bias":{"type":"number","default":0.5,"label":"Bias","description":"Probability the coin source draws 1, used only when sourceKind is coin.","synonyms":"probability, bernoulli parameter, coin bias, p","tier":"domain"},"batchSize":{"type":"number","default":25,"label":"Batch Size","description":"Number of samples the Draw button adds per click.","synonyms":"batch size, draws per click, sample batch","tier":"domain"}},"scope":"instance"}],"pages":[{"name":"SampleAccumulatorPage","id":"pag_ZCHH1BJR9HC4RPVHNA2Z6WEAV4","path":"/learn-sample-accumulator","traits":[{"ref":"SampleAccumulatorSim","refId":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"}]}],"types":{"SampleAccShape":[{"name":"type","type":"string","values":["line","arrow","circle","rect","polygon","path","text","axis","grid"],"required":true},{"name":"id","type":"string"},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"x1","type":"number"},{"name":"y1","type":"number"},{"name":"x2","type":"number"},{"name":"y2","type":"number"},{"name":"radius","type":"number"},{"name":"width","type":"number"},{"name":"height","type":"number"},{"name":"points","type":"[object]","properties":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}]},{"name":"path","type":"string"},{"name":"text","type":"string"},{"name":"label","type":"string"},{"name":"fontSize","type":"number"},{"name":"align","type":"string","values":["left","center","right"]},{"name":"axis","type":"string","values":["x","y"]},{"name":"min","type":"number"},{"name":"max","type":"number"},{"name":"step","type":"number"},{"name":"color","type":"string"},{"name":"fill","type":"string"},{"name":"lineWidth","type":"number"},{"name":"opacity","type":"number"},{"name":"tone","type":"string"},{"name":"fillTone","type":"string"},{"name":"stroke","type":"string"},{"name":"textSize","type":"string"},{"name":"fillStyle","type":"string"}],"SampleAccShapePoint":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_27B0RCN94DMJ6P3RGR0M9SKYCE":{"id":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE","kind":"entity","bakedName":"SampleAccumulatorScene","curName":"SampleAccumulatorScene","renames":[],"owner":"workspace"},"evt_4ARKPJ013P0HVE38J6SGDXG5JA":{"id":"evt_4ARKPJ013P0HVE38J6SGDXG5JA","kind":"event","bakedName":"SET_BATCH_SIZE","curName":"SET_BATCH_SIZE","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_CKPT1TM91R4GWD41G7R3BZFTQT":{"id":"evt_CKPT1TM91R4GWD41G7R3BZFTQT","kind":"event","bakedName":"ACCUMULATOR_RESET","curName":"ACCUMULATOR_RESET","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_GDRJEDFBEWNQE3MEBH33HWY9RN":{"id":"evt_GDRJEDFBEWNQE3MEBH33HWY9RN","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_JYCN23Z90NMGAJHH5DN2PEF1J7":{"id":"evt_JYCN23Z90NMGAJHH5DN2PEF1J7","kind":"event","bakedName":"DRAW","curName":"DRAW","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_NEJNHW041P20V00Z7AESD1G0TW":{"id":"evt_NEJNHW041P20V00Z7AESD1G0TW","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_VN8W1YDAHXN8YVKWW806Y1EWNB":{"id":"evt_VN8W1YDAHXN8YVKWW806Y1EWNB","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX":{"id":"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX","kind":"event","bakedName":"SAMPLES_DRAWN","curName":"SAMPLES_DRAWN","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"orb_XRCCSBTSRZCWFTK7ECGTJ38EC7":{"id":"orb_XRCCSBTSRZCWFTK7ECGTJ38EC7","kind":"orbital","bakedName":"SampleAccumulatorOrbital","curName":"SampleAccumulatorOrbital","renames":[],"owner":"workspace"},"pag_ZCHH1BJR9HC4RPVHNA2Z6WEAV4":{"id":"pag_ZCHH1BJR9HC4RPVHNA2Z6WEAV4","kind":"page","bakedName":"SampleAccumulatorPage","curName":"SampleAccumulatorPage","renames":[],"owner":"workspace"},"trt_9GVRAFK4Y8JF4C14T63WBWR4DB":{"id":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB","kind":"trait","bakedName":"SampleAccumulatorSim","curName":"SampleAccumulatorSim","renames":[],"owner":"workspace"}}}}
|
|
1
|
+
{"name":"std-learn-sample-accumulator","version":"1.0.0","description":"Generic sample-accumulator engine — a Draw button adds a batch of pseudo-random samples from a config-selected source (uniform 0..1, or a coin flip weighted by bias) into a fixed-bin histogram on a math-canvas, with running sample count, running mean, and (for the coin source) observed proportion vs bias. Subject atoms narrow the source kind and labels through config; this atom owns only the draw-and-accumulate mechanics. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"SampleAccumulatorOrbital","id":"orb_XRCCSBTSRZCWFTK7ECGTJ38EC7","entity":{"name":"SampleAccumulatorScene","id":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"sourceKind","type":"string"},{"name":"batchSize","type":"number"},{"name":"samples","type":"array","items":{"type":"number"}},{"name":"sampleCount","type":"number"},{"name":"mean","type":"number"},{"name":"proportion","type":"number"},{"name":"shapes","type":"array","items":{"type":"object","properties":{"textSize":{"name":"textSize","type":"string","required":false},"width":{"name":"width","type":"number","required":false},"tone":{"name":"tone","type":"string","required":false},"label":{"name":"label","type":"string","required":false},"stroke":{"name":"stroke","type":"string","required":false},"color":{"name":"color","type":"string","required":false},"fillStyle":{"name":"fillStyle","type":"string","required":false},"y1":{"name":"y1","type":"number","required":false},"max":{"name":"max","type":"number","required":false},"x":{"name":"x","type":"number","required":false},"x1":{"name":"x1","type":"number","required":false},"axis":{"name":"axis","type":"string","required":false,"values":["x","y"]},"y":{"name":"y","type":"number","required":false},"height":{"name":"height","type":"number","required":false},"fill":{"name":"fill","type":"string","required":false},"y2":{"name":"y2","type":"number","required":false},"fillTone":{"name":"fillTone","type":"string","required":false},"type":{"name":"type","type":"string","required":true,"values":["line","arrow","circle","rect","polygon","path","text","axis","grid"]},"points":{"name":"points","type":"array","required":false,"items":{"type":"object","properties":{"x":{"name":"x","type":"number","required":true},"y":{"name":"y","type":"number","required":true}}}},"radius":{"name":"radius","type":"number","required":false},"fontSize":{"name":"fontSize","type":"number","required":false},"text":{"name":"text","type":"string","required":false},"path":{"name":"path","type":"string","required":false},"step":{"name":"step","type":"number","required":false},"lineWidth":{"name":"lineWidth","type":"number","required":false},"min":{"name":"min","type":"number","required":false},"align":{"name":"align","type":"string","required":false,"values":["left","center","right"]},"id":{"name":"id","type":"string","required":false},"x2":{"name":"x2","type":"number","required":false},"opacity":{"name":"opacity","type":"number","required":false}}}}]},"traits":[{"name":"SampleAccumulatorSim","id":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","batchSize","mean","proportion","sampleCount","samples","shapes","sourceKind","title"]},"effectRow":[{"kind":"emit","resource":"ACCUMULATOR_RESET"},{"kind":"emit","resource":"SAMPLES_DRAWN"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.batchSize"},{"kind":"set","resource":"@entity.mean"},{"kind":"set","resource":"@entity.proportion"},{"kind":"set","resource":"@entity.sampleCount"},{"kind":"set","resource":"@entity.samples"},{"kind":"set","resource":"@entity.shapes"},{"kind":"set","resource":"@entity.sourceKind"},{"kind":"set","resource":"@entity.title"}],"category":"interaction","linkedEntity":"SampleAccumulatorScene","linkedEntityId":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE","entityRefIds":{"SampleAccumulatorScene":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE"},"emits":[{"event":"SAMPLES_DRAWN","eventId":"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX","description":"The accumulated sample count and running mean after each draw — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"sample drawn, running mean, law of large numbers, convergence, histogram","tier":"domain","scope":"external","payloadSchema":[{"name":"count","type":"number"},{"name":"mean","type":"number"}]},{"event":"ACCUMULATOR_RESET","eventId":"evt_CKPT1TM91R4GWD41G7R3BZFTQT","description":"The accumulator was cleared back to zero samples — a composed listener can subscribe; a harmless no-op when the atom runs standalone.","tier":"domain","scope":"external","payloadSchema":[{"name":"_unit","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_GDRJEDFBEWNQE3MEBH33HWY9RN","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_NEJNHW041P20V00Z7AESD1G0TW","name":"Mode Selected","description":"Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.","tier":"domain","payloadSchema":[{"name":"mode","type":"string"}],"listened":true},{"key":"DRAW","id":"evt_JYCN23Z90NMGAJHH5DN2PEF1J7","name":"Draw"},{"key":"SET_BATCH_SIZE","id":"evt_4ARKPJ013P0HVE38J6SGDXG5JA","name":"Set Batch Size","description":"Learner dragged the batch-size slider — value is the new number of samples each Draw adds.","tier":"domain","payloadSchema":[{"name":"value","type":"number"}],"listened":true},{"key":"RESET","id":"evt_VN8W1YDAHXN8YVKWW806Y1EWNB","name":"Reset"},{"key":"SAMPLES_DRAWN","id":"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX","name":"Samples Drawn","description":"The accumulated sample count and running mean after each draw — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"sample drawn, running mean, law of large numbers, convergence, histogram","tier":"domain","payloadSchema":[{"name":"count","type":"number"},{"name":"mean","type":"number"}]},{"key":"ACCUMULATOR_RESET","id":"evt_CKPT1TM91R4GWD41G7R3BZFTQT","name":"Accumulator Reset","description":"The accumulator was cleared back to zero samples — a composed listener can subscribe; a harmless no-op when the atom runs standalone.","tier":"domain","payloadSchema":[{"name":"_unit","type":"string"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_GDRJEDFBEWNQE3MEBH33HWY9RN","guard":["==","@config.matchMode",""],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.sourceKind","@config.sourceKind"],["set","@entity.batchSize","@config.batchSize"],["set","@entity.samples",[]],["set","@entity.sampleCount",0],["set","@entity.mean",0],["set","@entity.proportion",0],["set","@entity.shapes",[]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_NEJNHW041P20V00Z7AESD1G0TW","guard":["and",["not",["==","@config.matchMode",""]],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_NEJNHW041P20V00Z7AESD1G0TW","guard":["==","@payload.mode","@config.matchMode"],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.sourceKind","@config.sourceKind"],["set","@entity.batchSize","@config.batchSize"],["set","@entity.samples",[]],["set","@entity.sampleCount",0],["set","@entity.mean",0],["set","@entity.proportion",0],["set","@entity.shapes",[]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}]]},{"from":"idle","to":"idle","event":"DRAW","eventId":"evt_JYCN23Z90NMGAJHH5DN2PEF1J7","guard":["==","@entity.active",true],"effects":[["let",[["kind","@entity.sourceKind"],["bias","@config.bias"],["n","@entity.batchSize"],["newSamples",["array/map",["array/range","@n"],["fn",["i"],["if",["==","@kind","coin"],["if",["<",["math/random"],"@bias"],1,0],["math/random"]]]]],["allSamples",["array/concat","@entity.samples","@newSamples"]],["countV",["array/len","@allSamples"]],["meanV",["/",["array/reduce","@allSamples",0,["fn",["acc","x"],["+","@acc","@x"]]],"@countV"]],["proportionV",["if",["==","@kind","coin"],"@meanV",0]],["binCountV","@config.binCount"],["binW",["/",1,"@binCountV"]],["counts",["array/map",["array/range","@binCountV"],["fn","b",["array/len",["array/filter","@allSamples",["fn","v",["if",["==","@b",["-","@binCountV",1]],["and",[">=","@v",["*","@b","@binW"]],["<=","@v",["*",["+","@b",1],"@binW"]]],["and",[">=","@v",["*","@b","@binW"]],["<","@v",["*",["+","@b",1],"@binW"]]]]]]]]]],["maxCount",["math/max",1,["array/reduce","@counts",0,["fn",["acc","c"],["math/max","@acc","@c"]]]]],["plotW",["-","@config.width",48]],["plotH",["-","@config.height",48]],["histShapes",["array/map",["array/range","@binCountV"],["fn","b",["let",[["barH",["*",["/",["array/nth","@counts","@b"],"@maxCount"],"@plotH"]]],{"type":"rect","x":["+",24,["*","@b",["/","@plotW","@binCountV"]]],"y":["-",["+",24,"@plotH"],"@barH"],"width":["*",["/","@plotW","@binCountV"],0.9],"height":"@barH","tone":"@config.color","fillTone":"@config.color","fillStyle":"solid"}]]]]],["do",["set","@entity.samples","@allSamples"],["set","@entity.sampleCount","@countV"],["set","@entity.mean","@meanV"],["set","@entity.proportion","@proportionV"],["set","@entity.shapes","@histShapes"]]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}],["emit","SAMPLES_DRAWN",{"count":"@entity.sampleCount","mean":"@entity.mean"}]]},{"from":"idle","to":"idle","event":"SET_BATCH_SIZE","eventId":"evt_4ARKPJ013P0HVE38J6SGDXG5JA","guard":["==","@entity.active",true],"effects":[["set","@entity.batchSize",["math/round","@payload.value"]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}]]},{"from":"idle","to":"idle","event":"RESET","eventId":"evt_VN8W1YDAHXN8YVKWW806Y1EWNB","guard":["==","@entity.active",true],"effects":[["set","@entity.samples",[]],["set","@entity.sampleCount",0],["set","@entity.mean",0],["set","@entity.proportion",0],["set","@entity.shapes",[]],["render-ui","main",{"type":"box","padding":"md","children":[{"type":"stack","direction":"vertical","gap":"md","children":[{"type":"stack","direction":"horizontal","justify":"between","align":"start","gap":"md","children":[{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"h4","content":"@entity.title"},["if",["==","@config.summary",""],null,{"type":"typography","variant":"body2","color":"muted","content":"@config.summary"}]]},{"type":"badge","label":["if",[">","@entity.sampleCount",0],["str/concat","@entity.sampleCount"," samples"],"No samples"],"variant":["if",[">","@entity.sampleCount",0],"primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"DRAW","label":"Draw","icon":"plus","variant":"primary"},{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch of ","@entity.batchSize"]}]},{"type":"math-canvas","width":"@config.width","height":"@config.height","xMin":0,"xMax":1,"yMin":0,"yMax":1,"showAxes":false,"showGrid":false,"gridStep":0.1,"curves":[],"points":[],"vectors":[],"shapes":"@entity.shapes","interactive":false,"animate":false,"keyMap":{"Space":"DRAW","KeyR":"RESET"}},{"type":"stack","direction":"vertical","gap":"xs","children":[{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Batch size: ","@entity.batchSize"]},{"type":"range-slider","min":1,"max":200,"step":1,"value":"@entity.batchSize","showTooltip":true,"action":"SET_BATCH_SIZE"}]},{"type":"typography","variant":"body","content":["if",["==","@entity.sourceKind","coin"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3],", observed proportion ",["math/round","@entity.proportion",3]," (bias ","@config.bias",")"],["str/concat","@entity.sampleCount"," sample(s) drawn — running mean ",["math/round","@entity.mean",3]]]}]}]}],["emit","ACCUMULATOR_RESET",{}]]}]},"config":{"binCount":{"type":"number","default":10,"label":"Bin Count","description":"Number of histogram buckets across the 0..1 value range.","tier":"presentation"},"color":{"type":"string","default":"series-1","label":"Bar Color","tier":"presentation"},"width":{"type":"number","default":600,"label":"Width","tier":"presentation"},"height":{"type":"number","default":400,"label":"Height","tier":"presentation"},"batchSize":{"type":"number","default":25,"label":"Batch Size","description":"Number of samples the Draw button adds per click.","synonyms":"batch size, draws per click, sample batch","tier":"domain"},"title":{"type":"string","default":"Sample Accumulator","label":"Title","description":"The instrument's name, the header's one hero.","tier":"presentation"},"sourceKind":{"type":"string","default":"uniform","label":"Source Kind","description":"Distribution each draw samples from: uniform (0..1) or coin (Bernoulli 0/1 weighted by bias).","synonyms":"uniform distribution, coin flip, bernoulli trial, random sampling, source distribution","tier":"domain"},"summary":{"type":"string","default":"","label":"Concept","description":"One line under the title saying what the learner is looking at (keep it under ~65 characters). Empty shows no line.","tier":"presentation"},"matchMode":{"type":"string","default":"","label":"Match Mode","description":"When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.","tier":"presentation"},"bias":{"type":"number","default":0.5,"label":"Bias","description":"Probability the coin source draws 1, used only when sourceKind is coin.","synonyms":"probability, bernoulli parameter, coin bias, p","tier":"domain"}},"scope":"instance"}],"pages":[{"name":"SampleAccumulatorPage","id":"pag_ZCHH1BJR9HC4RPVHNA2Z6WEAV4","path":"/learn-sample-accumulator","traits":[{"ref":"SampleAccumulatorSim","refId":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"}]}],"types":{"SampleAccShape":[{"name":"type","type":"string","values":["line","arrow","circle","rect","polygon","path","text","axis","grid"],"required":true},{"name":"id","type":"string"},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"x1","type":"number"},{"name":"y1","type":"number"},{"name":"x2","type":"number"},{"name":"y2","type":"number"},{"name":"radius","type":"number"},{"name":"width","type":"number"},{"name":"height","type":"number"},{"name":"points","type":"[object]","properties":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}]},{"name":"path","type":"string"},{"name":"text","type":"string"},{"name":"label","type":"string"},{"name":"fontSize","type":"number"},{"name":"align","type":"string","values":["left","center","right"]},{"name":"axis","type":"string","values":["x","y"]},{"name":"min","type":"number"},{"name":"max","type":"number"},{"name":"step","type":"number"},{"name":"color","type":"string"},{"name":"fill","type":"string"},{"name":"lineWidth","type":"number"},{"name":"opacity","type":"number"},{"name":"tone","type":"string"},{"name":"fillTone","type":"string"},{"name":"stroke","type":"string"},{"name":"textSize","type":"string"},{"name":"fillStyle","type":"string"}],"SampleAccShapePoint":[{"name":"x","type":"number","required":true},{"name":"y","type":"number","required":true}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_27B0RCN94DMJ6P3RGR0M9SKYCE":{"id":"ent_27B0RCN94DMJ6P3RGR0M9SKYCE","kind":"entity","bakedName":"SampleAccumulatorScene","curName":"SampleAccumulatorScene","renames":[],"owner":"workspace"},"evt_4ARKPJ013P0HVE38J6SGDXG5JA":{"id":"evt_4ARKPJ013P0HVE38J6SGDXG5JA","kind":"event","bakedName":"SET_BATCH_SIZE","curName":"SET_BATCH_SIZE","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_CKPT1TM91R4GWD41G7R3BZFTQT":{"id":"evt_CKPT1TM91R4GWD41G7R3BZFTQT","kind":"event","bakedName":"ACCUMULATOR_RESET","curName":"ACCUMULATOR_RESET","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_GDRJEDFBEWNQE3MEBH33HWY9RN":{"id":"evt_GDRJEDFBEWNQE3MEBH33HWY9RN","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_JYCN23Z90NMGAJHH5DN2PEF1J7":{"id":"evt_JYCN23Z90NMGAJHH5DN2PEF1J7","kind":"event","bakedName":"DRAW","curName":"DRAW","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_NEJNHW041P20V00Z7AESD1G0TW":{"id":"evt_NEJNHW041P20V00Z7AESD1G0TW","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_VN8W1YDAHXN8YVKWW806Y1EWNB":{"id":"evt_VN8W1YDAHXN8YVKWW806Y1EWNB","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX":{"id":"evt_WAD6C9QXA9YN4Y2ZN9BS21N7GX","kind":"event","bakedName":"SAMPLES_DRAWN","curName":"SAMPLES_DRAWN","renames":[],"owner":"workspace","parent":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB"},"orb_XRCCSBTSRZCWFTK7ECGTJ38EC7":{"id":"orb_XRCCSBTSRZCWFTK7ECGTJ38EC7","kind":"orbital","bakedName":"SampleAccumulatorOrbital","curName":"SampleAccumulatorOrbital","renames":[],"owner":"workspace"},"pag_ZCHH1BJR9HC4RPVHNA2Z6WEAV4":{"id":"pag_ZCHH1BJR9HC4RPVHNA2Z6WEAV4","kind":"page","bakedName":"SampleAccumulatorPage","curName":"SampleAccumulatorPage","renames":[],"owner":"workspace"},"trt_9GVRAFK4Y8JF4C14T63WBWR4DB":{"id":"trt_9GVRAFK4Y8JF4C14T63WBWR4DB","kind":"trait","bakedName":"SampleAccumulatorSim","curName":"SampleAccumulatorSim","renames":[],"owner":"workspace"}}}}
|