@almadar/std 16.253.0 → 16.254.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 +152 -0
- package/behaviors/lolo/agent/organisms/std-agent-builder.lolo +320 -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-fix-loop.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-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-detail-layout.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-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-market-flow.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-scenario","version":"1.0.0","description":"Generic branching decision scenario — a config-declared node graph of situations and choices plays out as a choose-your-path story with modeled consequences: every choice shifts two config-named metrics, appends to a visible decision log, and moves to its declared next node, until a node with no choices ends the run with the final metrics and the full path. This simulates decisions rather than browsing records: the learner feels trade-offs compound. All vocabulary is config-declared, so the same mechanism serves any consequence-chain lesson: fiscal policy choices, ecosystem interventions, historical what-ifs, medical triage, engineering trade-offs. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"ScenarioOrbital","id":"orb_MSN4NPPXSPEWVDQGY85Z8XZE6H","entity":{"name":"ScenarioScene","id":"ent_D9JNRTDP8KV49HZED0BY3ZBW20","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"nodes","type":"array","items":{"type":"object","properties":{"situation":{"name":"situation","type":"string","required":true},"id":{"name":"id","type":"string","required":true},"choices":{"name":"choices","type":"array","required":false,"items":{"type":"object","properties":{"label":{"name":"label","type":"string","required":true},"note":{"name":"note","type":"string","required":false},"deltaA":{"name":"deltaA","type":"number","required":false},"deltaB":{"name":"deltaB","type":"number","required":false},"next":{"name":"next","type":"string","required":true}}}}}}},{"name":"startId","type":"string"},{"name":"currentId","type":"string"},{"name":"situation","type":"string"},{"name":"choices","type":"array","items":{"type":"object","properties":{"deltaB":{"name":"deltaB","type":"number","required":false},"note":{"name":"note","type":"string","required":false},"deltaA":{"name":"deltaA","type":"number","required":false},"label":{"name":"label","type":"string","required":true},"next":{"name":"next","type":"string","required":true}}}},{"name":"metricA","type":"number","default":0},{"name":"metricB","type":"number","default":0},{"name":"stepCount","type":"number","default":0},{"name":"path","type":"array","items":{"type":"string"}},{"name":"done","type":"boolean","default":false},{"name":"feedback","type":"string"},{"name":"view","type":"array","items":{"type":"node"}}]},"traits":[{"name":"ScenarioSim","id":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","choices","currentId","done","feedback","metricA","metricB","nodes","path","situation","startId","stepCount","title","view"]},"effectRow":[{"kind":"emit","resource":"CHOICE_MADE"},{"kind":"emit","resource":"SCENARIO_RESTARTED"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.choices"},{"kind":"set","resource":"@entity.currentId"},{"kind":"set","resource":"@entity.done"},{"kind":"set","resource":"@entity.feedback"},{"kind":"set","resource":"@entity.metricA"},{"kind":"set","resource":"@entity.metricB"},{"kind":"set","resource":"@entity.nodes"},{"kind":"set","resource":"@entity.path"},{"kind":"set","resource":"@entity.situation"},{"kind":"set","resource":"@entity.startId"},{"kind":"set","resource":"@entity.stepCount"},{"kind":"set","resource":"@entity.title"},{"kind":"set","resource":"@entity.view"}],"category":"interaction","linkedEntity":"ScenarioScene","linkedEntityId":"ent_D9JNRTDP8KV49HZED0BY3ZBW20","entityRefIds":{"ScenarioScene":"ent_D9JNRTDP8KV49HZED0BY3ZBW20"},"emits":[{"event":"CHOICE_MADE","eventId":"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR","description":"A decision was taken: the node reached, both metric values after the deltas, and whether the run just ended — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"branching scenario, choose your path, decision tree, consequences, trade-offs, what-if","tier":"domain","scope":"external","payloadSchema":[{"name":"nodeId","type":"string"},{"name":"metricA","type":"number"},{"name":"metricB","type":"number"},{"name":"ended","type":"boolean"}]},{"event":"SCENARIO_RESTARTED","eventId":"evt_96S180DF09QG4WZP4H3RV5FZPW","description":"The learner restarted the scenario from scratch.","tier":"domain","scope":"external","payloadSchema":[{"name":"startId","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_8STD64H8EAM75BXER2KAHT75BY","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_FJ122RQVNWXTY7RMYYQGN0CENN","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 nodes is the decision graph and startId the node it opens on; 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":"nodes","type":"[object]","required":true,"properties":[{"name":"id","type":"string","required":true},{"name":"situation","type":"string","required":true},{"name":"choices","type":"[object]","properties":[{"name":"label","type":"string","required":true},{"name":"next","type":"string","required":true},{"name":"deltaA","type":"number"},{"name":"deltaB","type":"number"},{"name":"note","type":"string"}]}]},{"name":"startId","type":"string","required":true}],"listened":true},{"key":"CHOOSE","id":"evt_2NJWMT2E4Q72BT30MXZJKKRGX3","name":"Choose","description":"Learner picked one of the current node's choices — index selects it; its metric deltas apply, the decision log grows, and the story moves to the declared next node.","tier":"domain","payloadSchema":[{"name":"index","type":"number"}],"listened":true},{"key":"RESTART","id":"evt_BJ1SGZKSMBWT5H0E3B6RCR267N","name":"Restart","description":"Learner restarted the scenario from the start node with fresh metrics and an empty decision log.","tier":"domain","listened":true},{"key":"CHOICE_MADE","id":"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR","name":"Choice Made","description":"A decision was taken: the node reached, both metric values after the deltas, and whether the run just ended — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"branching scenario, choose your path, decision tree, consequences, trade-offs, what-if","tier":"domain","payloadSchema":[{"name":"nodeId","type":"string"},{"name":"metricA","type":"number"},{"name":"metricB","type":"number"},{"name":"ended","type":"boolean"}]},{"key":"SCENARIO_RESTARTED","id":"evt_96S180DF09QG4WZP4H3RV5FZPW","name":"Scenario Restarted","description":"The learner restarted the scenario from scratch.","tier":"domain","payloadSchema":[{"name":"startId","type":"string"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N","guard":["and",["==","@config.matchMode",""],["==","@config.rosterSource","config"]],"effects":[["set","@entity.nodes","@config.nodes"],["set","@entity.startId","@config.startId"],["let",[["start",["array/find","@config.nodes",["fn","n",["==",["object/get","@n","id"],"@config.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@config.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_8STD64H8EAM75BXER2KAHT75BY","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_8STD64H8EAM75BXER2KAHT75BY","guard":["and",["==","@payload.mode","@config.matchMode"],["==","@config.rosterSource","config"]],"effects":[["set","@entity.nodes","@config.nodes"],["set","@entity.startId","@config.startId"],["let",[["start",["array/find","@config.nodes",["fn","n",["==",["object/get","@n","id"],"@config.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@config.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_FJ122RQVNWXTY7RMYYQGN0CENN","guard":["and",["==","@config.rosterSource","event"],["and",["==","@payload.mode","@config.matchMode"],[">",["array/len","@payload.nodes"],0]]],"effects":[["set","@entity.nodes","@payload.nodes"],["set","@entity.startId","@payload.startId"],["let",[["start",["array/find","@payload.nodes",["fn","n",["==",["object/get","@n","id"],"@payload.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@payload.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_FJ122RQVNWXTY7RMYYQGN0CENN","guard":["and",["==","@config.rosterSource","event"],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"CHOOSE","eventId":"evt_2NJWMT2E4Q72BT30MXZJKKRGX3","guard":["and",["==","@entity.active",true],["==","@entity.done",false]],"effects":[["let",[["choice",["array/nth","@entity.choices","@payload.index"]],["nextId",["object/get","@choice","next"]],["nextNode",["array/find","@entity.nodes",["fn","n",["==",["object/get","@n","id"],"@nextId"]]]],["nextChoices",["object/get","@nextNode","choices",[]]],["ended",["==",["array/len","@nextChoices"],0]],["note",["object/get","@choice","note",""]],["newA",["+","@entity.metricA",["object/get","@choice","deltaA",0]]],["newB",["+","@entity.metricB",["object/get","@choice","deltaB",0]]]],["do",["set","@entity.currentId","@nextId"],["set","@entity.situation",["object/get","@nextNode","situation"]],["set","@entity.choices","@nextChoices"],["set","@entity.metricA","@newA"],["set","@entity.metricB","@newB"],["set","@entity.stepCount",["+","@entity.stepCount",1]],["set","@entity.path",["array/append","@entity.path",["str/concat",["str/concat","","@entity.stepCount"],". ",["object/get","@choice","label"],["if",["!=","@note",""],["str/concat"," — ","@note"],""]]]],["set","@entity.done",["if","@ended",true,false]],["set","@entity.feedback",["if",["!=","@note",""],"@note",""]],["set","@entity.view",["if","@ended",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"h4","content":"Outcome"},{"type":"typography","variant":"body","content":"@entity.situation"},{"type":"typography","variant":"body","content":["str/concat","Final ","@config.metricALabel",": ",["math/round","@entity.metricA",0]," · final ","@config.metricBLabel",": ",["math/round","@entity.metricB",0]," after ",["str/concat","","@entity.stepCount"]," decisions."]}]}],[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}],["emit","CHOICE_MADE",{"nodeId":"@entity.currentId","metricA":"@entity.metricA","metricB":"@entity.metricB","ended":"@entity.done"}]]},{"from":"idle","to":"idle","event":"RESTART","eventId":"evt_BJ1SGZKSMBWT5H0E3B6RCR267N","guard":["and",["==","@entity.active",true],["==","@entity.done",true]],"effects":[["let",[["start",["array/find","@entity.nodes",["fn","n",["==",["object/get","@n","id"],"@entity.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@entity.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}],["emit","SCENARIO_RESTARTED",{"startId":"@entity.startId"}]]}]},"config":{"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, or on ROSTER_LOADED when rosterSource is event.","tier":"presentation"},"nodes":{"type":"[ScenarioNode]","default":[{"id":"start","situation":"Your town's river floods every spring. The council asks you to lead the response.","choices":[{"label":"Build a levee now","next":"levee","deltaA":-60,"deltaB":10,"note":"Fast protection, most of the budget gone."},{"label":"Restore the upstream wetlands","next":"wetlands","deltaA":-25,"deltaB":-5,"note":"Cheaper and greener, but slower to work."}]},{"id":"levee","situation":"The levee holds the first spring, but silt builds up and the river rises higher each year.","choices":[{"label":"Raise the levee again","next":"end-lock-in","deltaA":-30,"deltaB":-10,"note":"Costs keep compounding."},{"label":"Add wetlands as a second line","next":"end-hybrid","deltaA":-20,"deltaB":15,"note":"Late, but it eases the pressure."}]},{"id":"wetlands","situation":"Two springs pass; the wetlands now absorb most floods, and wildlife is returning.","choices":[{"label":"Expand the wetland corridor","next":"end-green","deltaA":-15,"deltaB":25,"note":"The town rallies behind the project."},{"label":"Bank the savings","next":"end-thrifty","deltaA":10,"deltaB":5,"note":"Prudent, though the corridor stays small."}]},{"id":"end-lock-in","situation":"You are locked into an arms race with the river: protected, but at ever-growing cost.","choices":[]},{"id":"end-hybrid","situation":"The hybrid defense works: the levee buys time and the wetlands cut the peak floods.","choices":[]},{"id":"end-green","situation":"The restored river corridor protects the town and becomes its most loved public space.","choices":[]},{"id":"end-thrifty","situation":"The town stays safe in normal years, with savings in reserve for a bigger flood.","choices":[]}],"label":"Nodes","description":"The decision graph; each node carries a situation and its choices, each choice naming the next node, metric deltas, and a consequence note. A node with no choices ends the run. Realizations declare their own subject's decision tree here.","tier":"domain","items":{"type":"object","properties":{"id":{"name":"id","type":"string","required":true},"choices":{"name":"choices","type":"array","required":false,"items":{"type":"object","properties":{"deltaA":{"name":"deltaA","type":"number","required":false},"next":{"name":"next","type":"string","required":true},"label":{"name":"label","type":"string","required":true},"deltaB":{"name":"deltaB","type":"number","required":false},"note":{"name":"note","type":"string","required":false}}}},"situation":{"name":"situation","type":"string","required":true}}}},"title":{"type":"string","default":"Decision Scenario","label":"Title","description":"Title shown above the scenario.","tier":"presentation"},"summary":{"type":"string","default":"","label":"Concept","description":"One line under the title saying what the scenario explores (keep it under ~65 characters). Empty shows no line.","tier":"presentation"},"metricAStart":{"type":"number","default":100,"label":"Metric A Start","tier":"domain"},"rosterSource":{"type":"string","default":"config","label":"Roster Source","description":"Where the roster comes from: config reads nodes and startId knobs at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.","tier":"domain","values":["config","event"]},"startId":{"type":"string","default":"start","label":"Start Node","description":"Id of the node the scenario opens on.","tier":"domain"},"metricBLabel":{"type":"string","default":"Support","label":"Metric B Label","description":"Display name of the second tracked consequence metric.","tier":"domain"},"metricALabel":{"type":"string","default":"Budget","label":"Metric A Label","description":"Display name of the first tracked consequence metric.","tier":"domain"},"metricBStart":{"type":"number","default":50,"label":"Metric B Start","tier":"domain"},"restartLabel":{"type":"string","default":"Play Again","label":"Restart Label","tier":"presentation"}},"scope":"instance"}],"pages":[{"name":"ScenarioPage","id":"pag_9JJVGRHH8DRM6KRJSA2XT9ZA83","path":"/learn-scenario","traits":[{"ref":"ScenarioSim","refId":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"}]}],"types":{"ScenarioChoice":[{"name":"label","type":"string","required":true},{"name":"next","type":"string","required":true},{"name":"deltaA","type":"number"},{"name":"deltaB","type":"number"},{"name":"note","type":"string"}],"ScenarioNode":[{"name":"id","type":"string","required":true},{"name":"situation","type":"string","required":true},{"name":"choices","type":"[object]","properties":[{"name":"label","type":"string","required":true},{"name":"next","type":"string","required":true},{"name":"deltaA","type":"number"},{"name":"deltaB","type":"number"},{"name":"note","type":"string"}]}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_D9JNRTDP8KV49HZED0BY3ZBW20":{"id":"ent_D9JNRTDP8KV49HZED0BY3ZBW20","kind":"entity","bakedName":"ScenarioScene","curName":"ScenarioScene","renames":[],"owner":"workspace"},"evt_2NJWMT2E4Q72BT30MXZJKKRGX3":{"id":"evt_2NJWMT2E4Q72BT30MXZJKKRGX3","kind":"event","bakedName":"CHOOSE","curName":"CHOOSE","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR":{"id":"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR","kind":"event","bakedName":"CHOICE_MADE","curName":"CHOICE_MADE","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_8STD64H8EAM75BXER2KAHT75BY":{"id":"evt_8STD64H8EAM75BXER2KAHT75BY","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_96S180DF09QG4WZP4H3RV5FZPW":{"id":"evt_96S180DF09QG4WZP4H3RV5FZPW","kind":"event","bakedName":"SCENARIO_RESTARTED","curName":"SCENARIO_RESTARTED","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_BJ1SGZKSMBWT5H0E3B6RCR267N":{"id":"evt_BJ1SGZKSMBWT5H0E3B6RCR267N","kind":"event","bakedName":"RESTART","curName":"RESTART","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N":{"id":"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_FJ122RQVNWXTY7RMYYQGN0CENN":{"id":"evt_FJ122RQVNWXTY7RMYYQGN0CENN","kind":"event","bakedName":"ROSTER_LOADED","curName":"ROSTER_LOADED","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"orb_MSN4NPPXSPEWVDQGY85Z8XZE6H":{"id":"orb_MSN4NPPXSPEWVDQGY85Z8XZE6H","kind":"orbital","bakedName":"ScenarioOrbital","curName":"ScenarioOrbital","renames":[],"owner":"workspace"},"pag_9JJVGRHH8DRM6KRJSA2XT9ZA83":{"id":"pag_9JJVGRHH8DRM6KRJSA2XT9ZA83","kind":"page","bakedName":"ScenarioPage","curName":"ScenarioPage","renames":[],"owner":"workspace"},"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D":{"id":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D","kind":"trait","bakedName":"ScenarioSim","curName":"ScenarioSim","renames":[],"owner":"workspace"}}}}
|
|
1
|
+
{"name":"std-learn-scenario","version":"1.0.0","description":"Generic branching decision scenario — a config-declared node graph of situations and choices plays out as a choose-your-path story with modeled consequences: every choice shifts two config-named metrics, appends to a visible decision log, and moves to its declared next node, until a node with no choices ends the run with the final metrics and the full path. This simulates decisions rather than browsing records: the learner feels trade-offs compound. All vocabulary is config-declared, so the same mechanism serves any consequence-chain lesson: fiscal policy choices, ecosystem interventions, historical what-ifs, medical triage, engineering trade-offs. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"ScenarioOrbital","id":"orb_MSN4NPPXSPEWVDQGY85Z8XZE6H","entity":{"name":"ScenarioScene","id":"ent_D9JNRTDP8KV49HZED0BY3ZBW20","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"nodes","type":"array","items":{"type":"object","properties":{"choices":{"name":"choices","type":"array","required":false,"items":{"type":"object","properties":{"label":{"name":"label","type":"string","required":true},"deltaA":{"name":"deltaA","type":"number","required":false},"deltaB":{"name":"deltaB","type":"number","required":false},"next":{"name":"next","type":"string","required":true},"note":{"name":"note","type":"string","required":false}}}},"situation":{"name":"situation","type":"string","required":true},"id":{"name":"id","type":"string","required":true}}}},{"name":"startId","type":"string"},{"name":"currentId","type":"string"},{"name":"situation","type":"string"},{"name":"choices","type":"array","items":{"type":"object","properties":{"deltaB":{"name":"deltaB","type":"number","required":false},"label":{"name":"label","type":"string","required":true},"next":{"name":"next","type":"string","required":true},"note":{"name":"note","type":"string","required":false},"deltaA":{"name":"deltaA","type":"number","required":false}}}},{"name":"metricA","type":"number","default":0},{"name":"metricB","type":"number","default":0},{"name":"stepCount","type":"number","default":0},{"name":"path","type":"array","items":{"type":"string"}},{"name":"done","type":"boolean","default":false},{"name":"feedback","type":"string"},{"name":"view","type":"array","items":{"type":"node"}}]},"traits":[{"name":"ScenarioSim","id":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","choices","currentId","done","feedback","metricA","metricB","nodes","path","situation","startId","stepCount","title","view"]},"effectRow":[{"kind":"emit","resource":"CHOICE_MADE"},{"kind":"emit","resource":"SCENARIO_RESTARTED"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.choices"},{"kind":"set","resource":"@entity.currentId"},{"kind":"set","resource":"@entity.done"},{"kind":"set","resource":"@entity.feedback"},{"kind":"set","resource":"@entity.metricA"},{"kind":"set","resource":"@entity.metricB"},{"kind":"set","resource":"@entity.nodes"},{"kind":"set","resource":"@entity.path"},{"kind":"set","resource":"@entity.situation"},{"kind":"set","resource":"@entity.startId"},{"kind":"set","resource":"@entity.stepCount"},{"kind":"set","resource":"@entity.title"},{"kind":"set","resource":"@entity.view"}],"category":"interaction","linkedEntity":"ScenarioScene","linkedEntityId":"ent_D9JNRTDP8KV49HZED0BY3ZBW20","entityRefIds":{"ScenarioScene":"ent_D9JNRTDP8KV49HZED0BY3ZBW20"},"emits":[{"event":"CHOICE_MADE","eventId":"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR","description":"A decision was taken: the node reached, both metric values after the deltas, and whether the run just ended — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"branching scenario, choose your path, decision tree, consequences, trade-offs, what-if","tier":"domain","scope":"external","payloadSchema":[{"name":"nodeId","type":"string"},{"name":"metricA","type":"number"},{"name":"metricB","type":"number"},{"name":"ended","type":"boolean"}]},{"event":"SCENARIO_RESTARTED","eventId":"evt_96S180DF09QG4WZP4H3RV5FZPW","description":"The learner restarted the scenario from scratch.","tier":"domain","scope":"external","payloadSchema":[{"name":"startId","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_8STD64H8EAM75BXER2KAHT75BY","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_FJ122RQVNWXTY7RMYYQGN0CENN","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 nodes is the decision graph and startId the node it opens on; 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":"nodes","type":"[object]","required":true,"properties":[{"name":"id","type":"string","required":true},{"name":"situation","type":"string","required":true},{"name":"choices","type":"[object]","properties":[{"name":"label","type":"string","required":true},{"name":"next","type":"string","required":true},{"name":"deltaA","type":"number"},{"name":"deltaB","type":"number"},{"name":"note","type":"string"}]}]},{"name":"startId","type":"string","required":true}],"listened":true},{"key":"CHOOSE","id":"evt_2NJWMT2E4Q72BT30MXZJKKRGX3","name":"Choose","description":"Learner picked one of the current node's choices — index selects it; its metric deltas apply, the decision log grows, and the story moves to the declared next node.","tier":"domain","payloadSchema":[{"name":"index","type":"number"}],"listened":true},{"key":"RESTART","id":"evt_BJ1SGZKSMBWT5H0E3B6RCR267N","name":"Restart","description":"Learner restarted the scenario from the start node with fresh metrics and an empty decision log.","tier":"domain","listened":true},{"key":"CHOICE_MADE","id":"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR","name":"Choice Made","description":"A decision was taken: the node reached, both metric values after the deltas, and whether the run just ended — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"branching scenario, choose your path, decision tree, consequences, trade-offs, what-if","tier":"domain","payloadSchema":[{"name":"nodeId","type":"string"},{"name":"metricA","type":"number"},{"name":"metricB","type":"number"},{"name":"ended","type":"boolean"}]},{"key":"SCENARIO_RESTARTED","id":"evt_96S180DF09QG4WZP4H3RV5FZPW","name":"Scenario Restarted","description":"The learner restarted the scenario from scratch.","tier":"domain","payloadSchema":[{"name":"startId","type":"string"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N","guard":["and",["==","@config.matchMode",""],["==","@config.rosterSource","config"]],"effects":[["set","@entity.nodes","@config.nodes"],["set","@entity.startId","@config.startId"],["let",[["start",["array/find","@config.nodes",["fn","n",["==",["object/get","@n","id"],"@config.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@config.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_8STD64H8EAM75BXER2KAHT75BY","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_8STD64H8EAM75BXER2KAHT75BY","guard":["and",["==","@payload.mode","@config.matchMode"],["==","@config.rosterSource","config"]],"effects":[["set","@entity.nodes","@config.nodes"],["set","@entity.startId","@config.startId"],["let",[["start",["array/find","@config.nodes",["fn","n",["==",["object/get","@n","id"],"@config.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@config.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_FJ122RQVNWXTY7RMYYQGN0CENN","guard":["and",["==","@config.rosterSource","event"],["and",["==","@payload.mode","@config.matchMode"],[">",["array/len","@payload.nodes"],0]]],"effects":[["set","@entity.nodes","@payload.nodes"],["set","@entity.startId","@payload.startId"],["let",[["start",["array/find","@payload.nodes",["fn","n",["==",["object/get","@n","id"],"@payload.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@payload.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}]]},{"from":"idle","to":"idle","event":"ROSTER_LOADED","eventId":"evt_FJ122RQVNWXTY7RMYYQGN0CENN","guard":["and",["==","@config.rosterSource","event"],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"CHOOSE","eventId":"evt_2NJWMT2E4Q72BT30MXZJKKRGX3","guard":["and",["==","@entity.active",true],["==","@entity.done",false]],"effects":[["let",[["choice",["array/nth","@entity.choices","@payload.index"]],["nextId",["object/get","@choice","next"]],["nextNode",["array/find","@entity.nodes",["fn","n",["==",["object/get","@n","id"],"@nextId"]]]],["nextChoices",["object/get","@nextNode","choices",[]]],["ended",["==",["array/len","@nextChoices"],0]],["note",["object/get","@choice","note",""]],["newA",["+","@entity.metricA",["object/get","@choice","deltaA",0]]],["newB",["+","@entity.metricB",["object/get","@choice","deltaB",0]]]],["do",["set","@entity.currentId","@nextId"],["set","@entity.situation",["object/get","@nextNode","situation"]],["set","@entity.choices","@nextChoices"],["set","@entity.metricA","@newA"],["set","@entity.metricB","@newB"],["set","@entity.stepCount",["+","@entity.stepCount",1]],["set","@entity.path",["array/append","@entity.path",["str/concat",["str/concat","","@entity.stepCount"],". ",["object/get","@choice","label"],["if",["!=","@note",""],["str/concat"," — ","@note"],""]]]],["set","@entity.done",["if","@ended",true,false]],["set","@entity.feedback",["if",["!=","@note",""],"@note",""]],["set","@entity.view",["if","@ended",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"h4","content":"Outcome"},{"type":"typography","variant":"body","content":"@entity.situation"},{"type":"typography","variant":"body","content":["str/concat","Final ","@config.metricALabel",": ",["math/round","@entity.metricA",0]," · final ","@config.metricBLabel",": ",["math/round","@entity.metricB",0]," after ",["str/concat","","@entity.stepCount"]," decisions."]}]}],[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}],["emit","CHOICE_MADE",{"nodeId":"@entity.currentId","metricA":"@entity.metricA","metricB":"@entity.metricB","ended":"@entity.done"}]]},{"from":"idle","to":"idle","event":"RESTART","eventId":"evt_BJ1SGZKSMBWT5H0E3B6RCR267N","guard":["and",["==","@entity.active",true],["==","@entity.done",true]],"effects":[["let",[["start",["array/find","@entity.nodes",["fn","n",["==",["object/get","@n","id"],"@entity.startId"]]]]],["do",["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.currentId","@entity.startId"],["set","@entity.situation",["object/get","@start","situation"]],["set","@entity.choices",["object/get","@start","choices",[]]],["set","@entity.metricA","@config.metricAStart"],["set","@entity.metricB","@config.metricBStart"],["set","@entity.stepCount",0],["set","@entity.path",[]],["set","@entity.done",false],["set","@entity.feedback",""],["set","@entity.view",[{"type":"card","variant":"bordered","padding":"md","children":[{"type":"typography","variant":"body","content":"@entity.situation"}]}]]]],["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","Ended",["str/concat","Decision ",["+","@entity.stepCount",1]]],"variant":["if","@entity.done","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"md","wrap":true,"children":[{"type":"stat-display","label":"@config.metricALabel","value":["math/round","@entity.metricA",0]},{"type":"stat-display","label":"@config.metricBLabel","value":["math/round","@entity.metricB",0]}]},{"type":"stack","direction":"vertical","gap":"md","children":"@entity.view"},{"type":"stack","direction":"vertical","gap":"sm","children":["array/map",["array/range",0,["array/len","@entity.choices"]],["fn",["i"],{"type":"button","action":"CHOOSE","actionPayload":{"index":"@i"},"label":["object/get",["array/nth","@entity.choices","@i"],"label"],"variant":"secondary","size":"lg","disabled":["if","@entity.done",true,false]}]]},{"type":"typography","variant":"body","content":"@entity.feedback"},{"type":"stack","direction":"vertical","gap":"xs","children":["array/map","@entity.path",["fn",["line"],{"type":"typography","variant":"caption","color":"muted","content":"@line"}]]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[{"type":"button","action":"RESTART","label":"@config.restartLabel","icon":"rotate-ccw","variant":"primary","disabled":["if","@entity.done",false,true]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Decisions ","@entity.stepCount"]}]}]}]}],["emit","SCENARIO_RESTARTED",{"startId":"@entity.startId"}]]}]},"config":{"metricBLabel":{"type":"string","default":"Support","label":"Metric B Label","description":"Display name of the second tracked consequence metric.","tier":"domain"},"metricAStart":{"type":"number","default":100,"label":"Metric A Start","tier":"domain"},"title":{"type":"string","default":"Decision Scenario","label":"Title","description":"Title shown above the scenario.","tier":"presentation"},"summary":{"type":"string","default":"","label":"Concept","description":"One line under the title saying what the scenario explores (keep it under ~65 characters). Empty shows no line.","tier":"presentation"},"rosterSource":{"type":"string","default":"config","label":"Roster Source","description":"Where the roster comes from: config reads nodes and startId knobs at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.","tier":"domain","values":["config","event"]},"startId":{"type":"string","default":"start","label":"Start Node","description":"Id of the node the scenario opens on.","tier":"domain"},"restartLabel":{"type":"string","default":"Play Again","label":"Restart Label","tier":"presentation"},"metricBStart":{"type":"number","default":50,"label":"Metric B Start","tier":"domain"},"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, or on ROSTER_LOADED when rosterSource is event.","tier":"presentation"},"metricALabel":{"type":"string","default":"Budget","label":"Metric A Label","description":"Display name of the first tracked consequence metric.","tier":"domain"},"nodes":{"type":"[ScenarioNode]","default":[{"id":"start","situation":"Your town's river floods every spring. The council asks you to lead the response.","choices":[{"label":"Build a levee now","next":"levee","deltaA":-60,"deltaB":10,"note":"Fast protection, most of the budget gone."},{"label":"Restore the upstream wetlands","next":"wetlands","deltaA":-25,"deltaB":-5,"note":"Cheaper and greener, but slower to work."}]},{"id":"levee","situation":"The levee holds the first spring, but silt builds up and the river rises higher each year.","choices":[{"label":"Raise the levee again","next":"end-lock-in","deltaA":-30,"deltaB":-10,"note":"Costs keep compounding."},{"label":"Add wetlands as a second line","next":"end-hybrid","deltaA":-20,"deltaB":15,"note":"Late, but it eases the pressure."}]},{"id":"wetlands","situation":"Two springs pass; the wetlands now absorb most floods, and wildlife is returning.","choices":[{"label":"Expand the wetland corridor","next":"end-green","deltaA":-15,"deltaB":25,"note":"The town rallies behind the project."},{"label":"Bank the savings","next":"end-thrifty","deltaA":10,"deltaB":5,"note":"Prudent, though the corridor stays small."}]},{"id":"end-lock-in","situation":"You are locked into an arms race with the river: protected, but at ever-growing cost.","choices":[]},{"id":"end-hybrid","situation":"The hybrid defense works: the levee buys time and the wetlands cut the peak floods.","choices":[]},{"id":"end-green","situation":"The restored river corridor protects the town and becomes its most loved public space.","choices":[]},{"id":"end-thrifty","situation":"The town stays safe in normal years, with savings in reserve for a bigger flood.","choices":[]}],"label":"Nodes","description":"The decision graph; each node carries a situation and its choices, each choice naming the next node, metric deltas, and a consequence note. A node with no choices ends the run. Realizations declare their own subject's decision tree here.","tier":"domain","items":{"type":"object","properties":{"situation":{"name":"situation","type":"string","required":true},"choices":{"name":"choices","type":"array","required":false,"items":{"type":"object","properties":{"deltaB":{"name":"deltaB","type":"number","required":false},"note":{"name":"note","type":"string","required":false},"next":{"name":"next","type":"string","required":true},"deltaA":{"name":"deltaA","type":"number","required":false},"label":{"name":"label","type":"string","required":true}}}},"id":{"name":"id","type":"string","required":true}}}}},"scope":"instance"}],"pages":[{"name":"ScenarioPage","id":"pag_9JJVGRHH8DRM6KRJSA2XT9ZA83","path":"/learn-scenario","traits":[{"ref":"ScenarioSim","refId":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"}]}],"types":{"ScenarioChoice":[{"name":"label","type":"string","required":true},{"name":"next","type":"string","required":true},{"name":"deltaA","type":"number"},{"name":"deltaB","type":"number"},{"name":"note","type":"string"}],"ScenarioNode":[{"name":"id","type":"string","required":true},{"name":"situation","type":"string","required":true},{"name":"choices","type":"[object]","properties":[{"name":"label","type":"string","required":true},{"name":"next","type":"string","required":true},{"name":"deltaA","type":"number"},{"name":"deltaB","type":"number"},{"name":"note","type":"string"}]}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_D9JNRTDP8KV49HZED0BY3ZBW20":{"id":"ent_D9JNRTDP8KV49HZED0BY3ZBW20","kind":"entity","bakedName":"ScenarioScene","curName":"ScenarioScene","renames":[],"owner":"workspace"},"evt_2NJWMT2E4Q72BT30MXZJKKRGX3":{"id":"evt_2NJWMT2E4Q72BT30MXZJKKRGX3","kind":"event","bakedName":"CHOOSE","curName":"CHOOSE","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR":{"id":"evt_4KHE2ZTPY2BF1F1S53E9YGP7QR","kind":"event","bakedName":"CHOICE_MADE","curName":"CHOICE_MADE","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_8STD64H8EAM75BXER2KAHT75BY":{"id":"evt_8STD64H8EAM75BXER2KAHT75BY","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_96S180DF09QG4WZP4H3RV5FZPW":{"id":"evt_96S180DF09QG4WZP4H3RV5FZPW","kind":"event","bakedName":"SCENARIO_RESTARTED","curName":"SCENARIO_RESTARTED","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_BJ1SGZKSMBWT5H0E3B6RCR267N":{"id":"evt_BJ1SGZKSMBWT5H0E3B6RCR267N","kind":"event","bakedName":"RESTART","curName":"RESTART","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N":{"id":"evt_CTY5TGQ4VZJDZX4QGYMV8AMW4N","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"evt_FJ122RQVNWXTY7RMYYQGN0CENN":{"id":"evt_FJ122RQVNWXTY7RMYYQGN0CENN","kind":"event","bakedName":"ROSTER_LOADED","curName":"ROSTER_LOADED","renames":[],"owner":"workspace","parent":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D"},"orb_MSN4NPPXSPEWVDQGY85Z8XZE6H":{"id":"orb_MSN4NPPXSPEWVDQGY85Z8XZE6H","kind":"orbital","bakedName":"ScenarioOrbital","curName":"ScenarioOrbital","renames":[],"owner":"workspace"},"pag_9JJVGRHH8DRM6KRJSA2XT9ZA83":{"id":"pag_9JJVGRHH8DRM6KRJSA2XT9ZA83","kind":"page","bakedName":"ScenarioPage","curName":"ScenarioPage","renames":[],"owner":"workspace"},"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D":{"id":"trt_CRYBM5C5JB2S5ZR2CWG92VVK7D","kind":"trait","bakedName":"ScenarioSim","curName":"ScenarioSim","renames":[],"owner":"workspace"}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"std-learn-sim-3d","version":"1.0.0","description":"Generic 3D simulation-transport (clock) instrument. Contract: the atom owns the transport and the clock but NOT the physics — a Play/Pause toggle, Reset and a SPEED_SET 0.5x/1x/2x/4x group (RUN and PAUSE inputs let a sibling drive the clock directly) drive a running flag and speed multiplier, and a 32ms tick advances steps and simTime by dt x speedMultiplier, emitting SIM_3D_TICK { dt, simTime } each step WITHOUT rendering; a composed sibling trait transitions directly on the SIM_3D_TICK / SIM_3D_UPDATED broadcasts (the same bare-event cascade the lab routers use), applies the domain physics, and owns the scene render — this atom renders no canvas. A caption readout shows steps, sim time, and current speed. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"LearnSim3DOrbital","id":"orb_KTD5YAE07903MV2RQFKZJNANGZ","entity":{"name":"Learn3DSimScene","id":"ent_PFY83EFMT2TD1EQHR459CB0Z82","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"running","type":"boolean","default":false},{"name":"speedMultiplier","type":"number","default":1},{"name":"steps","type":"number","default":0},{"name":"simTime","type":"number","default":0}]},"traits":[{"name":"Learn3DSimTransport","id":"trt_1ZR1JEWXNSETWMPC93YBQASQPW","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","running","simTime","speedMultiplier","steps","title"]},"effectRow":[{"kind":"emit","resource":"SIM_3D_TICK","site":"tick"},{"kind":"emit","resource":"SIM_3D_UPDATED"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.running"},{"kind":"set","resource":"@entity.simTime"},{"kind":"set","resource":"@entity.simTime","site":"tick"},{"kind":"set","resource":"@entity.speedMultiplier"},{"kind":"set","resource":"@entity.steps"},{"kind":"set","resource":"@entity.steps","site":"tick"},{"kind":"set","resource":"@entity.title"},{"kind":"ticks","site":"tick"}],"category":"interaction","linkedEntity":"Learn3DSimScene","linkedEntityId":"ent_PFY83EFMT2TD1EQHR459CB0Z82","entityRefIds":{"Learn3DSimScene":"ent_PFY83EFMT2TD1EQHR459CB0Z82"},"emits":[{"event":"SIM_3D_TICK","eventId":"evt_6TEBTC97QPKVV4Y9SWJHHFGC06","description":"Fires every 32ms tick while running with the effective timestep (config dt x speed multiplier) and accumulated sim time — the clock a composed physics trait subscribes to; a harmless no-op when the atom runs standalone.","synonyms":"tick, frame, step, clock, sim update, telemetry","tier":"domain","scope":"external","payloadSchema":[{"name":"dt","type":"number"},{"name":"simTime","type":"number"}]},{"event":"SIM_3D_UPDATED","eventId":"evt_71A8J4AMAAA553CAA64R8XFEBE","description":"Fires on INIT/MODE_SELECTED/Run/Pause/Reset/speed change with the transport state — running flag, speed multiplier, step counter, and sim time — a composed listener (readout, graph) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"run, pause, reset, speed, transport, sim state","tier":"domain","scope":"external","payloadSchema":[{"name":"running","type":"boolean"},{"name":"speedMultiplier","type":"number"},{"name":"steps","type":"int"},{"name":"simTime","type":"number"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","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":"TOGGLE_RUN","id":"evt_DBYQDE4FAA7N50VFF5E8RS183D","name":"Toggle Run"},{"key":"SPEED_SET","id":"evt_TVTHKFSB3WNHYF9PJ8J0355BTY","name":"Speed Set","description":"The learner picked a playback speed; the clock advances that many times faster.","tier":"presentation","payloadSchema":[{"name":"speed","type":"number"}],"listened":true},{"key":"RUN","id":"evt_FJK8NPR3WG1Y81TH1TWS39V0SY","name":"Run","description":"A sibling starts the clock (e.g. the physics trait on launch).","tier":"domain","listened":true},{"key":"PAUSE","id":"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY","name":"Pause","description":"A sibling stops the clock (e.g. the physics trait on landing).","tier":"domain","listened":true},{"key":"RESET","id":"evt_VR185FS02HG18Z2TQ04XT3H2V4","name":"Reset"},{"key":"SIM_3D_TICK","id":"evt_6TEBTC97QPKVV4Y9SWJHHFGC06","name":"Sim 3d Tick","description":"Fires every 32ms tick while running with the effective timestep (config dt x speed multiplier) and accumulated sim time — the clock a composed physics trait subscribes to; a harmless no-op when the atom runs standalone.","synonyms":"tick, frame, step, clock, sim update, telemetry","tier":"domain","payloadSchema":[{"name":"dt","type":"number"},{"name":"simTime","type":"number"}]},{"key":"SIM_3D_UPDATED","id":"evt_71A8J4AMAAA553CAA64R8XFEBE","name":"Sim 3d Updated","description":"Fires on INIT/MODE_SELECTED/Run/Pause/Reset/speed change with the transport state — running flag, speed multiplier, step counter, and sim time — a composed listener (readout, graph) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"run, pause, reset, speed, transport, sim state","tier":"domain","payloadSchema":[{"name":"running","type":"boolean"},{"name":"speedMultiplier","type":"number"},{"name":"steps","type":"int"},{"name":"simTime","type":"number"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X","guard":["==","@config.matchMode",""],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.running","@config.running"],["set","@entity.speedMultiplier",1],["set","@entity.steps",0],["set","@entity.simTime",0],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","guard":["and",["not",["==","@config.matchMode",""]],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["set","@entity.running",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","guard":["==","@payload.mode","@config.matchMode"],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.running","@config.running"],["set","@entity.speedMultiplier",1],["set","@entity.steps",0],["set","@entity.simTime",0],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"TOGGLE_RUN","eventId":"evt_DBYQDE4FAA7N50VFF5E8RS183D","guard":["==","@entity.active",true],"effects":[["set","@entity.running",["not","@entity.running"]],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"SPEED_SET","eventId":"evt_TVTHKFSB3WNHYF9PJ8J0355BTY","guard":["==","@entity.active",true],"effects":[["set","@entity.speedMultiplier","@payload.speed"],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"RUN","eventId":"evt_FJK8NPR3WG1Y81TH1TWS39V0SY","guard":["==","@entity.active",true],"effects":[["set","@entity.running",true],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"PAUSE","eventId":"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY","guard":["==","@entity.active",true],"effects":[["set","@entity.running",false],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"RESET","eventId":"evt_VR185FS02HG18Z2TQ04XT3H2V4","guard":["==","@entity.active",true],"effects":[["set","@entity.running","@config.running"],["set","@entity.speedMultiplier",1],["set","@entity.steps",0],["set","@entity.simTime",0],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]}]},"ticks":[{"name":"simTick","interval":32,"guard":["==","@entity.running",true],"effects":[["let",[["dtEff",["*","@config.dt","@entity.speedMultiplier"]]],["do",["set","@entity.steps",["+","@entity.steps",1]],["set","@entity.simTime",["+","@entity.simTime","@dtEff"]],["emit","SIM_3D_TICK",{"dt":"@dtEff","simTime":"@entity.simTime"}]]]]}],"config":{"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"},"dt":{"type":"number","default":0.02,"label":"Timestep","description":"Simulated seconds per tick before the speed multiplier; the effective step emitted on SIM_3D_TICK is dt x speedMultiplier.","tier":"domain"},"title":{"type":"string","default":"3D Simulation","label":"Title","description":"The instrument's name, the header's one hero.","tier":"presentation"},"running":{"type":"boolean","default":true,"label":"Running","description":"When true the clock starts ticking on INIT; the Reset arm restores this value.","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"}},"scope":"instance"}],"pages":[{"name":"Learn3DSimPage","id":"pag_9K1JFDWM5ZA2ZZMW1DQ8DPY6ZX","path":"/learn-sim-3d","traits":[{"ref":"Learn3DSimTransport","refId":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"}]}]}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_PFY83EFMT2TD1EQHR459CB0Z82":{"id":"ent_PFY83EFMT2TD1EQHR459CB0Z82","kind":"entity","bakedName":"Learn3DSimScene","curName":"Learn3DSimScene","renames":[],"owner":"workspace"},"evt_6TEBTC97QPKVV4Y9SWJHHFGC06":{"id":"evt_6TEBTC97QPKVV4Y9SWJHHFGC06","kind":"event","bakedName":"SIM_3D_TICK","curName":"SIM_3D_TICK","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_71A8J4AMAAA553CAA64R8XFEBE":{"id":"evt_71A8J4AMAAA553CAA64R8XFEBE","kind":"event","bakedName":"SIM_3D_UPDATED","curName":"SIM_3D_UPDATED","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X":{"id":"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY":{"id":"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY","kind":"event","bakedName":"PAUSE","curName":"PAUSE","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_DBYQDE4FAA7N50VFF5E8RS183D":{"id":"evt_DBYQDE4FAA7N50VFF5E8RS183D","kind":"event","bakedName":"TOGGLE_RUN","curName":"TOGGLE_RUN","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_FJK8NPR3WG1Y81TH1TWS39V0SY":{"id":"evt_FJK8NPR3WG1Y81TH1TWS39V0SY","kind":"event","bakedName":"RUN","curName":"RUN","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_TVTHKFSB3WNHYF9PJ8J0355BTY":{"id":"evt_TVTHKFSB3WNHYF9PJ8J0355BTY","kind":"event","bakedName":"SPEED_SET","curName":"SPEED_SET","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_VR185FS02HG18Z2TQ04XT3H2V4":{"id":"evt_VR185FS02HG18Z2TQ04XT3H2V4","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_Z95A32CH9J8MS348XH6Z4DJRZG":{"id":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"orb_KTD5YAE07903MV2RQFKZJNANGZ":{"id":"orb_KTD5YAE07903MV2RQFKZJNANGZ","kind":"orbital","bakedName":"LearnSim3DOrbital","curName":"LearnSim3DOrbital","renames":[],"owner":"workspace"},"pag_9K1JFDWM5ZA2ZZMW1DQ8DPY6ZX":{"id":"pag_9K1JFDWM5ZA2ZZMW1DQ8DPY6ZX","kind":"page","bakedName":"Learn3DSimPage","curName":"Learn3DSimPage","renames":[],"owner":"workspace"},"trt_1ZR1JEWXNSETWMPC93YBQASQPW":{"id":"trt_1ZR1JEWXNSETWMPC93YBQASQPW","kind":"trait","bakedName":"Learn3DSimTransport","curName":"Learn3DSimTransport","renames":[],"owner":"workspace"}}}}
|
|
1
|
+
{"name":"std-learn-sim-3d","version":"1.0.0","description":"Generic 3D simulation-transport (clock) instrument. Contract: the atom owns the transport and the clock but NOT the physics — a Play/Pause toggle, Reset and a SPEED_SET 0.5x/1x/2x/4x group (RUN and PAUSE inputs let a sibling drive the clock directly) drive a running flag and speed multiplier, and a 32ms tick advances steps and simTime by dt x speedMultiplier, emitting SIM_3D_TICK { dt, simTime } each step WITHOUT rendering; a composed sibling trait transitions directly on the SIM_3D_TICK / SIM_3D_UPDATED broadcasts (the same bare-event cascade the lab routers use), applies the domain physics, and owns the scene render — this atom renders no canvas. A caption readout shows steps, sim time, and current speed. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.","orbitals":[{"name":"LearnSim3DOrbital","id":"orb_KTD5YAE07903MV2RQFKZJNANGZ","entity":{"name":"Learn3DSimScene","id":"ent_PFY83EFMT2TD1EQHR459CB0Z82","persistence":"runtime","fields":[{"name":"id","type":"string","required":true},{"name":"active","type":"boolean","default":false},{"name":"title","type":"string"},{"name":"running","type":"boolean","default":false},{"name":"speedMultiplier","type":"number","default":1},{"name":"steps","type":"number","default":0},{"name":"simTime","type":"number","default":0}]},"traits":[{"name":"Learn3DSimTransport","id":"trt_1ZR1JEWXNSETWMPC93YBQASQPW","entityRebindable":true,"entityContract":{"requires":[],"provides":["active","running","simTime","speedMultiplier","steps","title"]},"effectRow":[{"kind":"emit","resource":"SIM_3D_TICK","site":"tick"},{"kind":"emit","resource":"SIM_3D_UPDATED"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.active"},{"kind":"set","resource":"@entity.running"},{"kind":"set","resource":"@entity.simTime"},{"kind":"set","resource":"@entity.simTime","site":"tick"},{"kind":"set","resource":"@entity.speedMultiplier"},{"kind":"set","resource":"@entity.steps"},{"kind":"set","resource":"@entity.steps","site":"tick"},{"kind":"set","resource":"@entity.title"},{"kind":"ticks","site":"tick"}],"category":"interaction","linkedEntity":"Learn3DSimScene","linkedEntityId":"ent_PFY83EFMT2TD1EQHR459CB0Z82","entityRefIds":{"Learn3DSimScene":"ent_PFY83EFMT2TD1EQHR459CB0Z82"},"emits":[{"event":"SIM_3D_TICK","eventId":"evt_6TEBTC97QPKVV4Y9SWJHHFGC06","description":"Fires every 32ms tick while running with the effective timestep (config dt x speed multiplier) and accumulated sim time — the clock a composed physics trait subscribes to; a harmless no-op when the atom runs standalone.","synonyms":"tick, frame, step, clock, sim update, telemetry","tier":"domain","scope":"external","payloadSchema":[{"name":"dt","type":"number"},{"name":"simTime","type":"number"}]},{"event":"SIM_3D_UPDATED","eventId":"evt_71A8J4AMAAA553CAA64R8XFEBE","description":"Fires on INIT/MODE_SELECTED/Run/Pause/Reset/speed change with the transport state — running flag, speed multiplier, step counter, and sim time — a composed listener (readout, graph) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"run, pause, reset, speed, transport, sim state","tier":"domain","scope":"external","payloadSchema":[{"name":"running","type":"boolean"},{"name":"speedMultiplier","type":"number"},{"name":"steps","type":"int"},{"name":"simTime","type":"number"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X","name":"Initialize"},{"key":"MODE_SELECTED","id":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","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":"TOGGLE_RUN","id":"evt_DBYQDE4FAA7N50VFF5E8RS183D","name":"Toggle Run"},{"key":"SPEED_SET","id":"evt_TVTHKFSB3WNHYF9PJ8J0355BTY","name":"Speed Set","description":"The learner picked a playback speed; the clock advances that many times faster.","tier":"presentation","payloadSchema":[{"name":"speed","type":"number"}],"listened":true},{"key":"RUN","id":"evt_FJK8NPR3WG1Y81TH1TWS39V0SY","name":"Run","description":"A sibling starts the clock (e.g. the physics trait on launch).","tier":"domain","listened":true},{"key":"PAUSE","id":"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY","name":"Pause","description":"A sibling stops the clock (e.g. the physics trait on landing).","tier":"domain","listened":true},{"key":"RESET","id":"evt_VR185FS02HG18Z2TQ04XT3H2V4","name":"Reset"},{"key":"SIM_3D_TICK","id":"evt_6TEBTC97QPKVV4Y9SWJHHFGC06","name":"Sim 3d Tick","description":"Fires every 32ms tick while running with the effective timestep (config dt x speed multiplier) and accumulated sim time — the clock a composed physics trait subscribes to; a harmless no-op when the atom runs standalone.","synonyms":"tick, frame, step, clock, sim update, telemetry","tier":"domain","payloadSchema":[{"name":"dt","type":"number"},{"name":"simTime","type":"number"}]},{"key":"SIM_3D_UPDATED","id":"evt_71A8J4AMAAA553CAA64R8XFEBE","name":"Sim 3d Updated","description":"Fires on INIT/MODE_SELECTED/Run/Pause/Reset/speed change with the transport state — running flag, speed multiplier, step counter, and sim time — a composed listener (readout, graph) can subscribe; a harmless no-op when the atom runs standalone.","synonyms":"run, pause, reset, speed, transport, sim state","tier":"domain","payloadSchema":[{"name":"running","type":"boolean"},{"name":"speedMultiplier","type":"number"},{"name":"steps","type":"int"},{"name":"simTime","type":"number"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X","guard":["==","@config.matchMode",""],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.running","@config.running"],["set","@entity.speedMultiplier",1],["set","@entity.steps",0],["set","@entity.simTime",0],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","guard":["and",["not",["==","@config.matchMode",""]],["not",["==","@payload.mode","@config.matchMode"]]],"effects":[["set","@entity.active",false],["set","@entity.running",false],["render-ui","main",null]]},{"from":"idle","to":"idle","event":"MODE_SELECTED","eventId":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","guard":["==","@payload.mode","@config.matchMode"],"effects":[["set","@entity.active",true],["set","@entity.title","@config.title"],["set","@entity.running","@config.running"],["set","@entity.speedMultiplier",1],["set","@entity.steps",0],["set","@entity.simTime",0],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"TOGGLE_RUN","eventId":"evt_DBYQDE4FAA7N50VFF5E8RS183D","guard":["==","@entity.active",true],"effects":[["set","@entity.running",["not","@entity.running"]],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"SPEED_SET","eventId":"evt_TVTHKFSB3WNHYF9PJ8J0355BTY","guard":["==","@entity.active",true],"effects":[["set","@entity.speedMultiplier","@payload.speed"],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"RUN","eventId":"evt_FJK8NPR3WG1Y81TH1TWS39V0SY","guard":["==","@entity.active",true],"effects":[["set","@entity.running",true],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"PAUSE","eventId":"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY","guard":["==","@entity.active",true],"effects":[["set","@entity.running",false],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]},{"from":"idle","to":"idle","event":"RESET","eventId":"evt_VR185FS02HG18Z2TQ04XT3H2V4","guard":["==","@entity.active",true],"effects":[["set","@entity.running","@config.running"],["set","@entity.speedMultiplier",1],["set","@entity.steps",0],["set","@entity.simTime",0],["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.running","Running","Paused"],"variant":["if","@entity.running","primary","neutral"]}]},{"type":"stack","direction":"horizontal","align":"center","gap":"sm","wrap":true,"children":[["if","@entity.running",{"type":"button","action":"TOGGLE_RUN","label":"Pause","icon":"pause","variant":"primary","aria-pressed":"true"},{"type":"button","action":"TOGGLE_RUN","label":"Play","icon":"play","variant":"primary","aria-pressed":"false"}],{"type":"button","action":"RESET","label":"Reset","icon":"rotate-ccw","variant":"ghost"},{"type":"stack","direction":"horizontal","align":"center","gap":"xs","role":"group","aria-label":"Speed","children":[{"type":"button","action":"SPEED_SET","actionPayload":{"speed":0.5},"label":"0.5×","size":"sm","variant":["if",["==","@entity.speedMultiplier",0.5],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",0.5],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":1},"label":"1×","size":"sm","variant":["if",["==","@entity.speedMultiplier",1],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",1],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":2},"label":"2×","size":"sm","variant":["if",["==","@entity.speedMultiplier",2],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",2],"true","false"]},{"type":"button","action":"SPEED_SET","actionPayload":{"speed":4},"label":"4×","size":"sm","variant":["if",["==","@entity.speedMultiplier",4],"secondary","ghost"],"aria-pressed":["if",["==","@entity.speedMultiplier",4],"true","false"]}]},{"type":"typography","variant":"caption","color":"muted","content":["str/concat","Step ","@entity.steps"," · ",["math/round","@entity.simTime",1]," s"]}]}]}]}],["emit","SIM_3D_UPDATED",{"running":"@entity.running","speedMultiplier":"@entity.speedMultiplier","steps":"@entity.steps","simTime":"@entity.simTime"}]]}]},"ticks":[{"name":"simTick","interval":32,"guard":["==","@entity.running",true],"effects":[["let",[["dtEff",["*","@config.dt","@entity.speedMultiplier"]]],["do",["set","@entity.steps",["+","@entity.steps",1]],["set","@entity.simTime",["+","@entity.simTime","@dtEff"]],["emit","SIM_3D_TICK",{"dt":"@dtEff","simTime":"@entity.simTime"}]]]]}],"config":{"title":{"type":"string","default":"3D Simulation","label":"Title","description":"The instrument's name, the header's one hero.","tier":"presentation"},"dt":{"type":"number","default":0.02,"label":"Timestep","description":"Simulated seconds per tick before the speed multiplier; the effective step emitted on SIM_3D_TICK is dt x speedMultiplier.","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"},"running":{"type":"boolean","default":true,"label":"Running","description":"When true the clock starts ticking on INIT; the Reset arm restores this value.","tier":"domain"},"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"}},"scope":"instance"}],"pages":[{"name":"Learn3DSimPage","id":"pag_9K1JFDWM5ZA2ZZMW1DQ8DPY6ZX","path":"/learn-sim-3d","traits":[{"ref":"Learn3DSimTransport","refId":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"}]}]}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_PFY83EFMT2TD1EQHR459CB0Z82":{"id":"ent_PFY83EFMT2TD1EQHR459CB0Z82","kind":"entity","bakedName":"Learn3DSimScene","curName":"Learn3DSimScene","renames":[],"owner":"workspace"},"evt_6TEBTC97QPKVV4Y9SWJHHFGC06":{"id":"evt_6TEBTC97QPKVV4Y9SWJHHFGC06","kind":"event","bakedName":"SIM_3D_TICK","curName":"SIM_3D_TICK","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_71A8J4AMAAA553CAA64R8XFEBE":{"id":"evt_71A8J4AMAAA553CAA64R8XFEBE","kind":"event","bakedName":"SIM_3D_UPDATED","curName":"SIM_3D_UPDATED","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X":{"id":"evt_9FN3Q315CJJP9ADZ2MQCQJYE9X","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY":{"id":"evt_CSBWA9AW1BE0NMPWCJSE4Y9DTY","kind":"event","bakedName":"PAUSE","curName":"PAUSE","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_DBYQDE4FAA7N50VFF5E8RS183D":{"id":"evt_DBYQDE4FAA7N50VFF5E8RS183D","kind":"event","bakedName":"TOGGLE_RUN","curName":"TOGGLE_RUN","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_FJK8NPR3WG1Y81TH1TWS39V0SY":{"id":"evt_FJK8NPR3WG1Y81TH1TWS39V0SY","kind":"event","bakedName":"RUN","curName":"RUN","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_TVTHKFSB3WNHYF9PJ8J0355BTY":{"id":"evt_TVTHKFSB3WNHYF9PJ8J0355BTY","kind":"event","bakedName":"SPEED_SET","curName":"SPEED_SET","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_VR185FS02HG18Z2TQ04XT3H2V4":{"id":"evt_VR185FS02HG18Z2TQ04XT3H2V4","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"evt_Z95A32CH9J8MS348XH6Z4DJRZG":{"id":"evt_Z95A32CH9J8MS348XH6Z4DJRZG","kind":"event","bakedName":"MODE_SELECTED","curName":"MODE_SELECTED","renames":[],"owner":"workspace","parent":"trt_1ZR1JEWXNSETWMPC93YBQASQPW"},"orb_KTD5YAE07903MV2RQFKZJNANGZ":{"id":"orb_KTD5YAE07903MV2RQFKZJNANGZ","kind":"orbital","bakedName":"LearnSim3DOrbital","curName":"LearnSim3DOrbital","renames":[],"owner":"workspace"},"pag_9K1JFDWM5ZA2ZZMW1DQ8DPY6ZX":{"id":"pag_9K1JFDWM5ZA2ZZMW1DQ8DPY6ZX","kind":"page","bakedName":"Learn3DSimPage","curName":"Learn3DSimPage","renames":[],"owner":"workspace"},"trt_1ZR1JEWXNSETWMPC93YBQASQPW":{"id":"trt_1ZR1JEWXNSETWMPC93YBQASQPW","kind":"trait","bakedName":"Learn3DSimTransport","curName":"Learn3DSimTransport","renames":[],"owner":"workspace"}}}}
|