@almadar/std 16.254.0 → 16.255.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/behaviors/lolo/agent/atoms/std-agent-pool.lolo +10 -10
  2. package/behaviors/lolo/agent/evals/eval-agent-builder.lolo +15 -8
  3. package/behaviors/lolo/agent/organisms/std-agent-builder.lolo +6 -5
  4. package/behaviors/registry/agent/atoms/std-agent-context.orb +1 -1
  5. package/behaviors/registry/agent/atoms/std-agent-fix-loop.orb +1 -1
  6. package/behaviors/registry/agent/atoms/std-agent-planner.orb +1 -1
  7. package/behaviors/registry/agent/atoms/std-agent-pool.orb +1 -1
  8. package/behaviors/registry/agent/atoms/std-agent-proposal.orb +1 -1
  9. package/behaviors/registry/agent/atoms/std-agent-session.orb +1 -1
  10. package/behaviors/registry/agent/atoms/std-agent-suggestions.orb +1 -1
  11. package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +1 -1
  12. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +1 -1
  13. package/behaviors/registry/agent/atoms/std-agent-trace.orb +1 -1
  14. package/behaviors/registry/agent/evals/eval-agent-builder.orb +1 -1
  15. package/behaviors/registry/agent/organisms/std-agent-assistant.orb +1 -1
  16. package/behaviors/registry/agent/organisms/std-agent-builder.orb +1 -1
  17. package/behaviors/registry/infra/atoms/std-analytics.orb +1 -1
  18. package/behaviors/registry/infra/atoms/std-approval-gate.orb +1 -1
  19. package/behaviors/registry/infra/atoms/std-audit-capture.orb +1 -1
  20. package/behaviors/registry/infra/atoms/std-cache-aside.orb +1 -1
  21. package/behaviors/registry/infra/atoms/std-calendar-sync.orb +1 -1
  22. package/behaviors/registry/infra/atoms/std-cascade-on-delete.orb +1 -1
  23. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +1 -1
  24. package/behaviors/registry/infra/atoms/std-cross-reference.orb +1 -1
  25. package/behaviors/registry/infra/atoms/std-data-erasure.orb +1 -1
  26. package/behaviors/registry/infra/atoms/std-data-import.orb +1 -1
  27. package/behaviors/registry/infra/atoms/std-global-search.orb +1 -1
  28. package/behaviors/registry/infra/atoms/std-knowledge-loop.orb +1 -1
  29. package/behaviors/registry/infra/atoms/std-lifecycle.orb +1 -1
  30. package/behaviors/registry/infra/atoms/std-migration-job.orb +1 -1
  31. package/behaviors/registry/infra/atoms/std-mod-queue.orb +1 -1
  32. package/behaviors/registry/infra/atoms/std-notification-center.orb +1 -1
  33. package/behaviors/registry/infra/atoms/std-notification-preferences.orb +1 -1
  34. package/behaviors/registry/infra/atoms/std-notify-on-event.orb +1 -1
  35. package/behaviors/registry/infra/atoms/std-page-search.orb +1 -1
  36. package/behaviors/registry/infra/atoms/std-page-watch.orb +1 -1
  37. package/behaviors/registry/infra/atoms/std-permission-matrix.orb +1 -1
  38. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +1 -1
  39. package/behaviors/registry/infra/atoms/std-reminder-scheduler.orb +1 -1
  40. package/behaviors/registry/infra/atoms/std-review-cycle.orb +1 -1
  41. package/behaviors/registry/infra/atoms/std-row-access-control.orb +1 -1
  42. package/behaviors/registry/infra/atoms/std-status-lifecycle.orb +1 -1
  43. package/behaviors/registry/infra/organisms/std-status-lifecycle-control.orb +1 -1
  44. package/behaviors/registry/ml/atoms/std-data-collector.orb +1 -1
  45. package/behaviors/registry/ml/atoms/std-graph-builder.orb +1 -1
  46. package/behaviors/registry/ml/atoms/std-ml-classify.orb +1 -1
  47. package/behaviors/registry/ml/atoms/std-ml-exact-check.orb +1 -1
  48. package/behaviors/registry/ml/atoms/std-ml-infer.orb +1 -1
  49. package/behaviors/registry/ml/atoms/std-ml-posterior.orb +1 -1
  50. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +1 -1
  51. package/behaviors/registry/ml/atoms/std-tokenizer.orb +1 -1
  52. package/behaviors/registry/ml/atoms/std-weight-validator.orb +1 -1
  53. package/behaviors/registry/ml/organisms/std-escalating-decision.orb +1 -1
  54. package/behaviors/registry/ml/organisms/std-knowledge-tracing.orb +1 -1
  55. package/behaviors/registry/ui/avl/atoms/std-avl-cosmic-zoom.orb +1 -1
  56. package/behaviors/registry/ui/avl/atoms/ui-avl-glyph.orb +1 -1
  57. package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +1 -1
  58. package/behaviors/registry/ui/avl/atoms/ui-avl-transition-detail.orb +1 -1
  59. package/behaviors/registry/ui/avl/atoms/ui-avl-transition-explainer.orb +1 -1
  60. package/behaviors/registry/ui/avl/atoms/ui-behavior-view.orb +1 -1
  61. package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +1 -1
  62. package/behaviors/registry/ui/avl/organisms/ui-flow-canvas.orb +1 -1
  63. package/behaviors/registry/ui/avl/organisms/ui-layers-panel.orb +1 -1
  64. package/behaviors/registry/ui/avl/organisms/ui-orb-inspector.orb +1 -1
  65. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +1 -1
  66. package/behaviors/registry/ui/core/atoms/std-app-search.orb +1 -1
  67. package/behaviors/registry/ui/core/atoms/std-behavior-catalog.orb +1 -1
  68. package/behaviors/registry/ui/core/atoms/std-behavior-tour.orb +1 -1
  69. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +1 -1
  70. package/behaviors/registry/ui/core/atoms/std-board.orb +1 -1
  71. package/behaviors/registry/ui/core/atoms/std-book-reader.orb +1 -1
  72. package/behaviors/registry/ui/core/atoms/std-browse.orb +1 -1
  73. package/behaviors/registry/ui/core/atoms/std-calendar.orb +1 -1
  74. package/behaviors/registry/ui/core/atoms/std-card-grid.orb +1 -1
  75. package/behaviors/registry/ui/core/atoms/std-confirmation.orb +1 -1
  76. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +1 -1
  77. package/behaviors/registry/ui/core/atoms/std-date-range.orb +1 -1
  78. package/behaviors/registry/ui/core/atoms/std-detail-layout.orb +1 -1
  79. package/behaviors/registry/ui/core/atoms/std-doc-page.orb +1 -1
  80. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +1 -1
  81. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +1 -1
  82. package/behaviors/registry/ui/core/atoms/std-event-log.orb +1 -1
  83. package/behaviors/registry/ui/core/atoms/std-export.orb +1 -1
  84. package/behaviors/registry/ui/core/atoms/std-file-store.orb +1 -1
  85. package/behaviors/registry/ui/core/atoms/std-filter.orb +1 -1
  86. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -1
  87. package/behaviors/registry/ui/core/atoms/std-gallery.orb +1 -1
  88. package/behaviors/registry/ui/core/atoms/std-gantt-schedule.orb +1 -1
  89. package/behaviors/registry/ui/core/atoms/std-geosearch.orb +1 -1
  90. package/behaviors/registry/ui/core/atoms/std-graphs.orb +1 -1
  91. package/behaviors/registry/ui/core/atoms/std-hero.orb +1 -1
  92. package/behaviors/registry/ui/core/atoms/std-home.orb +1 -1
  93. package/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +1 -1
  94. package/behaviors/registry/ui/core/atoms/std-import.orb +1 -1
  95. package/behaviors/registry/ui/core/atoms/std-language-picker.orb +1 -1
  96. package/behaviors/registry/ui/core/atoms/std-media-section.orb +1 -1
  97. package/behaviors/registry/ui/core/atoms/std-modal-editor.orb +1 -1
  98. package/behaviors/registry/ui/core/atoms/std-modal.orb +1 -1
  99. package/behaviors/registry/ui/core/atoms/std-multi-party-flow.orb +1 -1
  100. package/behaviors/registry/ui/core/atoms/std-notification-panel.orb +1 -1
  101. package/behaviors/registry/ui/core/atoms/std-panel-launcher.orb +1 -1
  102. package/behaviors/registry/ui/core/atoms/std-pricing.orb +1 -1
  103. package/behaviors/registry/ui/core/atoms/std-proof.orb +1 -1
  104. package/behaviors/registry/ui/core/atoms/std-prose.orb +1 -1
  105. package/behaviors/registry/ui/core/atoms/std-rating-review.orb +1 -1
  106. package/behaviors/registry/ui/core/atoms/std-record-detail.orb +1 -1
  107. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +1 -1
  108. package/behaviors/registry/ui/core/atoms/std-related.orb +1 -1
  109. package/behaviors/registry/ui/core/atoms/std-role-gate.orb +1 -1
  110. package/behaviors/registry/ui/core/atoms/std-saved-search.orb +1 -1
  111. package/behaviors/registry/ui/core/atoms/std-scatter.orb +1 -1
  112. package/behaviors/registry/ui/core/atoms/std-scoped-list.orb +1 -1
  113. package/behaviors/registry/ui/core/atoms/std-search.orb +1 -1
  114. package/behaviors/registry/ui/core/atoms/std-selection.orb +1 -1
  115. package/behaviors/registry/ui/core/atoms/std-site-footer.orb +1 -1
  116. package/behaviors/registry/ui/core/atoms/std-site-header.orb +1 -1
  117. package/behaviors/registry/ui/core/atoms/std-slide-deck.orb +1 -1
  118. package/behaviors/registry/ui/core/atoms/std-stat-band.orb +1 -1
  119. package/behaviors/registry/ui/core/atoms/std-stats.orb +1 -1
  120. package/behaviors/registry/ui/core/atoms/std-step-flow.orb +1 -1
  121. package/behaviors/registry/ui/core/atoms/std-steps.orb +1 -1
  122. package/behaviors/registry/ui/core/atoms/std-tabs.orb +1 -1
  123. package/behaviors/registry/ui/core/atoms/std-tag-strip.orb +1 -1
  124. package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +1 -1
  125. package/behaviors/registry/ui/core/atoms/std-thread.orb +1 -1
  126. package/behaviors/registry/ui/core/atoms/std-tree.orb +1 -1
  127. package/behaviors/registry/ui/core/atoms/std-version-history.orb +1 -1
  128. package/behaviors/registry/ui/core/atoms/std-wizard.orb +1 -1
  129. package/behaviors/registry/ui/core/atoms/std-workspace-layout.orb +1 -1
  130. package/behaviors/registry/ui/core/atoms/ui-animated-graphic.orb +1 -1
  131. package/behaviors/registry/ui/core/atoms/ui-animated-reveal.orb +1 -1
  132. package/behaviors/registry/ui/core/atoms/ui-aside.orb +1 -1
  133. package/behaviors/registry/ui/core/atoms/ui-atlas-image.orb +1 -1
  134. package/behaviors/registry/ui/core/atoms/ui-atlas-panel.orb +1 -1
  135. package/behaviors/registry/ui/core/atoms/ui-avatar.orb +1 -1
  136. package/behaviors/registry/ui/core/atoms/ui-badge.orb +1 -1
  137. package/behaviors/registry/ui/core/atoms/ui-box.orb +1 -1
  138. package/behaviors/registry/ui/core/atoms/ui-button.orb +1 -1
  139. package/behaviors/registry/ui/core/atoms/ui-card.orb +1 -1
  140. package/behaviors/registry/ui/core/atoms/ui-center.orb +1 -1
  141. package/behaviors/registry/ui/core/atoms/ui-checkbox.orb +1 -1
  142. package/behaviors/registry/ui/core/atoms/ui-conditional-wrapper.orb +1 -1
  143. package/behaviors/registry/ui/core/atoms/ui-confetti-effect.orb +1 -1
  144. package/behaviors/registry/ui/core/atoms/ui-day-cell.orb +1 -1
  145. package/behaviors/registry/ui/core/atoms/ui-dialog.orb +1 -1
  146. package/behaviors/registry/ui/core/atoms/ui-divider.orb +1 -1
  147. package/behaviors/registry/ui/core/atoms/ui-filter-pill.orb +1 -1
  148. package/behaviors/registry/ui/core/atoms/ui-flip-container.orb +1 -1
  149. package/behaviors/registry/ui/core/atoms/ui-game-icon.orb +1 -1
  150. package/behaviors/registry/ui/core/atoms/ui-hstack.orb +1 -1
  151. package/behaviors/registry/ui/core/atoms/ui-icon.orb +1 -1
  152. package/behaviors/registry/ui/core/atoms/ui-image.orb +1 -1
  153. package/behaviors/registry/ui/core/atoms/ui-infinite-scroll-sentinel.orb +1 -1
  154. package/behaviors/registry/ui/core/atoms/ui-input.orb +1 -1
  155. package/behaviors/registry/ui/core/atoms/ui-label.orb +1 -1
  156. package/behaviors/registry/ui/core/atoms/ui-law-reference-tooltip.orb +1 -1
  157. package/behaviors/registry/ui/core/atoms/ui-overlay.orb +1 -1
  158. package/behaviors/registry/ui/core/atoms/ui-pattern-tile.orb +1 -1
  159. package/behaviors/registry/ui/core/atoms/ui-presence.orb +1 -1
  160. package/behaviors/registry/ui/core/atoms/ui-progress-bar.orb +1 -1
  161. package/behaviors/registry/ui/core/atoms/ui-radio.orb +1 -1
  162. package/behaviors/registry/ui/core/atoms/ui-range-slider.orb +1 -1
  163. package/behaviors/registry/ui/core/atoms/ui-section-header.orb +1 -1
  164. package/behaviors/registry/ui/core/atoms/ui-select.orb +1 -1
  165. package/behaviors/registry/ui/core/atoms/ui-spacer.orb +1 -1
  166. package/behaviors/registry/ui/core/atoms/ui-sparkline.orb +1 -1
  167. package/behaviors/registry/ui/core/atoms/ui-spinner.orb +1 -1
  168. package/behaviors/registry/ui/core/atoms/ui-stack.orb +1 -1
  169. package/behaviors/registry/ui/core/atoms/ui-status-dot.orb +1 -1
  170. package/behaviors/registry/ui/core/atoms/ui-svg-branch.orb +1 -1
  171. package/behaviors/registry/ui/core/atoms/ui-svg-connection.orb +1 -1
  172. package/behaviors/registry/ui/core/atoms/ui-svg-flow.orb +1 -1
  173. package/behaviors/registry/ui/core/atoms/ui-svg-grid.orb +1 -1
  174. package/behaviors/registry/ui/core/atoms/ui-svg-lobe.orb +1 -1
  175. package/behaviors/registry/ui/core/atoms/ui-svg-mesh.orb +1 -1
  176. package/behaviors/registry/ui/core/atoms/ui-svg-morph.orb +1 -1
  177. package/behaviors/registry/ui/core/atoms/ui-svg-node.orb +1 -1
  178. package/behaviors/registry/ui/core/atoms/ui-svg-pulse.orb +1 -1
  179. package/behaviors/registry/ui/core/atoms/ui-svg-ring.orb +1 -1
  180. package/behaviors/registry/ui/core/atoms/ui-svg-shield.orb +1 -1
  181. package/behaviors/registry/ui/core/atoms/ui-svg-stack.orb +1 -1
  182. package/behaviors/registry/ui/core/atoms/ui-switch.orb +1 -1
  183. package/behaviors/registry/ui/core/atoms/ui-text-highlight.orb +1 -1
  184. package/behaviors/registry/ui/core/atoms/ui-textarea.orb +1 -1
  185. package/behaviors/registry/ui/core/atoms/ui-theme-toggle.orb +1 -1
  186. package/behaviors/registry/ui/core/atoms/ui-time-slot-cell.orb +1 -1
  187. package/behaviors/registry/ui/core/atoms/ui-trend-indicator.orb +1 -1
  188. package/behaviors/registry/ui/core/atoms/ui-typewriter-text.orb +1 -1
  189. package/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
  190. package/behaviors/registry/ui/core/atoms/ui-video-embed.orb +1 -1
  191. package/behaviors/registry/ui/core/atoms/ui-vstack.orb +1 -1
  192. package/behaviors/registry/ui/core/molecules/std-stat-rows.orb +1 -1
  193. package/behaviors/registry/ui/core/molecules/ui-accordion.orb +1 -1
  194. package/behaviors/registry/ui/core/molecules/ui-activation-block.orb +1 -1
  195. package/behaviors/registry/ui/core/molecules/ui-activity-rail.orb +1 -1
  196. package/behaviors/registry/ui/core/molecules/ui-agent-activity-feed.orb +1 -1
  197. package/behaviors/registry/ui/core/molecules/ui-agent-activity-row.orb +1 -1
  198. package/behaviors/registry/ui/core/molecules/ui-agent-chat-feed.orb +1 -1
  199. package/behaviors/registry/ui/core/molecules/ui-alert.orb +1 -1
  200. package/behaviors/registry/ui/core/molecules/ui-animated-counter.orb +1 -1
  201. package/behaviors/registry/ui/core/molecules/ui-bloom-quiz-block.orb +1 -1
  202. package/behaviors/registry/ui/core/molecules/ui-branching-logic-builder.orb +1 -1
  203. package/behaviors/registry/ui/core/molecules/ui-breadcrumb.orb +1 -1
  204. package/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +1 -1
  205. package/behaviors/registry/ui/core/molecules/ui-carousel.orb +1 -1
  206. package/behaviors/registry/ui/core/molecules/ui-change-list.orb +1 -1
  207. package/behaviors/registry/ui/core/molecules/ui-chart-legend.orb +1 -1
  208. package/behaviors/registry/ui/core/molecules/ui-chart.orb +1 -1
  209. package/behaviors/registry/ui/core/molecules/ui-code-block.orb +1 -1
  210. package/behaviors/registry/ui/core/molecules/ui-command-palette.orb +1 -1
  211. package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +1 -1
  212. package/behaviors/registry/ui/core/molecules/ui-confirm-dialog.orb +1 -1
  213. package/behaviors/registry/ui/core/molecules/ui-connection-block.orb +1 -1
  214. package/behaviors/registry/ui/core/molecules/ui-container.orb +1 -1
  215. package/behaviors/registry/ui/core/molecules/ui-content-renderer.orb +1 -1
  216. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +1 -1
  217. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +1 -1
  218. package/behaviors/registry/ui/core/molecules/ui-date-range-picker.orb +1 -1
  219. package/behaviors/registry/ui/core/molecules/ui-date-range-selector.orb +1 -1
  220. package/behaviors/registry/ui/core/molecules/ui-doc-breadcrumb.orb +1 -1
  221. package/behaviors/registry/ui/core/molecules/ui-doc-pagination.orb +1 -1
  222. package/behaviors/registry/ui/core/molecules/ui-doc-search.orb +1 -1
  223. package/behaviors/registry/ui/core/molecules/ui-doc-sidebar.orb +1 -1
  224. package/behaviors/registry/ui/core/molecules/ui-doc-toc.orb +1 -1
  225. package/behaviors/registry/ui/core/molecules/ui-document-details.orb +1 -1
  226. package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +1 -1
  227. package/behaviors/registry/ui/core/molecules/ui-document-viewer.orb +1 -1
  228. package/behaviors/registry/ui/core/molecules/ui-drawer.orb +1 -1
  229. package/behaviors/registry/ui/core/molecules/ui-edge-decoration.orb +1 -1
  230. package/behaviors/registry/ui/core/molecules/ui-emoji-picker.orb +1 -1
  231. package/behaviors/registry/ui/core/molecules/ui-empty-state.orb +1 -1
  232. package/behaviors/registry/ui/core/molecules/ui-error-boundary.orb +1 -1
  233. package/behaviors/registry/ui/core/molecules/ui-error-state.orb +1 -1
  234. package/behaviors/registry/ui/core/molecules/ui-feature-card.orb +1 -1
  235. package/behaviors/registry/ui/core/molecules/ui-feature-grid.orb +1 -1
  236. package/behaviors/registry/ui/core/molecules/ui-file-tree.orb +1 -1
  237. package/behaviors/registry/ui/core/molecules/ui-filter-group.orb +1 -1
  238. package/behaviors/registry/ui/core/molecules/ui-flex.orb +1 -1
  239. package/behaviors/registry/ui/core/molecules/ui-flip-card.orb +1 -1
  240. package/behaviors/registry/ui/core/molecules/ui-floating-action-button.orb +1 -1
  241. package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +1 -1
  242. package/behaviors/registry/ui/core/molecules/ui-form-actions.orb +1 -1
  243. package/behaviors/registry/ui/core/molecules/ui-form-field.orb +1 -1
  244. package/behaviors/registry/ui/core/molecules/ui-form-layout.orb +1 -1
  245. package/behaviors/registry/ui/core/molecules/ui-form-section-header.orb +1 -1
  246. package/behaviors/registry/ui/core/molecules/ui-fx-overlay.orb +1 -1
  247. package/behaviors/registry/ui/core/molecules/ui-gantt.orb +1 -1
  248. package/behaviors/registry/ui/core/molecules/ui-geometric-pattern.orb +1 -1
  249. package/behaviors/registry/ui/core/molecules/ui-gradient-divider.orb +1 -1
  250. package/behaviors/registry/ui/core/molecules/ui-graph-canvas.orb +1 -1
  251. package/behaviors/registry/ui/core/molecules/ui-graph-view.orb +1 -1
  252. package/behaviors/registry/ui/core/molecules/ui-grid.orb +1 -1
  253. package/behaviors/registry/ui/core/molecules/ui-header.orb +1 -1
  254. package/behaviors/registry/ui/core/molecules/ui-icon-button.orb +1 -1
  255. package/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +1 -1
  256. package/behaviors/registry/ui/core/molecules/ui-import-progress.orb +1 -1
  257. package/behaviors/registry/ui/core/molecules/ui-import-source-picker.orb +1 -1
  258. package/behaviors/registry/ui/core/molecules/ui-input-group.orb +1 -1
  259. package/behaviors/registry/ui/core/molecules/ui-jazari-state-machine.orb +1 -1
  260. package/behaviors/registry/ui/core/molecules/ui-lightbox.orb +1 -1
  261. package/behaviors/registry/ui/core/molecules/ui-likert-scale.orb +1 -1
  262. package/behaviors/registry/ui/core/molecules/ui-line-chart.orb +1 -1
  263. package/behaviors/registry/ui/core/molecules/ui-loading-state.orb +1 -1
  264. package/behaviors/registry/ui/core/molecules/ui-map-view.orb +1 -1
  265. package/behaviors/registry/ui/core/molecules/ui-markdown-content.orb +1 -1
  266. package/behaviors/registry/ui/core/molecules/ui-matrix-question.orb +1 -1
  267. package/behaviors/registry/ui/core/molecules/ui-menu.orb +1 -1
  268. package/behaviors/registry/ui/core/molecules/ui-meter.orb +1 -1
  269. package/behaviors/registry/ui/core/molecules/ui-modal.orb +1 -1
  270. package/behaviors/registry/ui/core/molecules/ui-navigation.orb +1 -1
  271. package/behaviors/registry/ui/core/molecules/ui-notification.orb +1 -1
  272. package/behaviors/registry/ui/core/molecules/ui-number-stepper.orb +1 -1
  273. package/behaviors/registry/ui/core/molecules/ui-option-constraint-group.orb +1 -1
  274. package/behaviors/registry/ui/core/molecules/ui-orbital-visualization.orb +1 -1
  275. package/behaviors/registry/ui/core/molecules/ui-page-header.orb +1 -1
  276. package/behaviors/registry/ui/core/molecules/ui-page-transition.orb +1 -1
  277. package/behaviors/registry/ui/core/molecules/ui-pagination.orb +1 -1
  278. package/behaviors/registry/ui/core/molecules/ui-popover.orb +1 -1
  279. package/behaviors/registry/ui/core/molecules/ui-positioned-canvas.orb +1 -1
  280. package/behaviors/registry/ui/core/molecules/ui-progress-dots.orb +1 -1
  281. package/behaviors/registry/ui/core/molecules/ui-pull-to-refresh.orb +1 -1
  282. package/behaviors/registry/ui/core/molecules/ui-qr-scanner.orb +1 -1
  283. package/behaviors/registry/ui/core/molecules/ui-quiz-block.orb +1 -1
  284. package/behaviors/registry/ui/core/molecules/ui-reflection-block.orb +1 -1
  285. package/behaviors/registry/ui/core/molecules/ui-relation-select.orb +1 -1
  286. package/behaviors/registry/ui/core/molecules/ui-repeatable-form-section.orb +1 -1
  287. package/behaviors/registry/ui/core/molecules/ui-reply-tree.orb +1 -1
  288. package/behaviors/registry/ui/core/molecules/ui-rich-text-editor.orb +1 -1
  289. package/behaviors/registry/ui/core/molecules/ui-scaled-diagram.orb +1 -1
  290. package/behaviors/registry/ui/core/molecules/ui-search-input.orb +1 -1
  291. package/behaviors/registry/ui/core/molecules/ui-section.orb +1 -1
  292. package/behaviors/registry/ui/core/molecules/ui-side-panel.orb +1 -1
  293. package/behaviors/registry/ui/core/molecules/ui-sidebar.orb +1 -1
  294. package/behaviors/registry/ui/core/molecules/ui-signature-pad.orb +1 -1
  295. package/behaviors/registry/ui/core/molecules/ui-simple-grid.orb +1 -1
  296. package/behaviors/registry/ui/core/molecules/ui-skeleton.orb +1 -1
  297. package/behaviors/registry/ui/core/molecules/ui-social-proof.orb +1 -1
  298. package/behaviors/registry/ui/core/molecules/ui-sortable-list.orb +1 -1
  299. package/behaviors/registry/ui/core/molecules/ui-split.orb +1 -1
  300. package/behaviors/registry/ui/core/molecules/ui-star-rating.orb +1 -1
  301. package/behaviors/registry/ui/core/molecules/ui-stat-display.orb +1 -1
  302. package/behaviors/registry/ui/core/molecules/ui-swipeable-row.orb +1 -1
  303. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +1 -1
  304. package/behaviors/registry/ui/core/molecules/ui-tabs.orb +1 -1
  305. package/behaviors/registry/ui/core/molecules/ui-tag-input.orb +1 -1
  306. package/behaviors/registry/ui/core/molecules/ui-tooltip.orb +1 -1
  307. package/behaviors/registry/ui/core/molecules/ui-top-nav-item.orb +1 -1
  308. package/behaviors/registry/ui/core/molecules/ui-upload-drop-zone.orb +1 -1
  309. package/behaviors/registry/ui/core/molecules/ui-version-diff.orb +1 -1
  310. package/behaviors/registry/ui/core/molecules/ui-violation-alert.orb +1 -1
  311. package/behaviors/registry/ui/core/molecules/ui-vote-stack.orb +1 -1
  312. package/behaviors/registry/ui/core/molecules/ui-wizard-container.orb +1 -1
  313. package/behaviors/registry/ui/core/molecules/ui-wizard-navigation.orb +1 -1
  314. package/behaviors/registry/ui/core/molecules/ui-wizard-progress.orb +1 -1
  315. package/behaviors/registry/ui/core/organisms/ui-chat-bar.orb +1 -1
  316. package/behaviors/registry/ui/core/organisms/ui-code-runner-panel.orb +1 -1
  317. package/behaviors/registry/ui/core/organisms/ui-dashboard-grid.orb +1 -1
  318. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +1 -1
  319. package/behaviors/registry/ui/core/organisms/ui-dock-layout.orb +1 -1
  320. package/behaviors/registry/ui/core/organisms/ui-drawer-slot.orb +1 -1
  321. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +1 -1
  322. package/behaviors/registry/ui/core/organisms/ui-form.orb +1 -1
  323. package/behaviors/registry/ui/core/organisms/ui-master-detail-layout.orb +1 -1
  324. package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +1 -1
  325. package/behaviors/registry/ui/core/organisms/ui-modal-slot.orb +1 -1
  326. package/behaviors/registry/ui/core/organisms/ui-runtime-debugger.orb +1 -1
  327. package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +1 -1
  328. package/behaviors/registry/ui/core/organisms/ui-split-pane.orb +1 -1
  329. package/behaviors/registry/ui/core/organisms/ui-stat-card.orb +1 -1
  330. package/behaviors/registry/ui/core/organisms/ui-state-machine-view.orb +1 -1
  331. package/behaviors/registry/ui/core/organisms/ui-subagent-trace-panel.orb +1 -1
  332. package/behaviors/registry/ui/core/organisms/ui-tabbed-container.orb +1 -1
  333. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +1 -1
  334. package/behaviors/registry/ui/core/organisms/ui-toast-slot.orb +1 -1
  335. package/behaviors/registry/ui/core/templates/ui-auth-layout.orb +1 -1
  336. package/behaviors/registry/ui/core/templates/ui-counter-template.orb +1 -1
  337. package/behaviors/registry/ui/core/templates/ui-dashboard-layout.orb +1 -1
  338. package/behaviors/registry/ui/core/templates/ui-generic-app-template.orb +1 -1
  339. package/behaviors/registry/ui/game/atoms/std-arcade-play.orb +1 -1
  340. package/behaviors/registry/ui/game/atoms/std-area-fill.orb +1 -1
  341. package/behaviors/registry/ui/game/atoms/std-audio-cue.orb +1 -1
  342. package/behaviors/registry/ui/game/atoms/std-camera-rig.orb +1 -1
  343. package/behaviors/registry/ui/game/atoms/std-chase-ai.orb +1 -1
  344. package/behaviors/registry/ui/game/atoms/std-choice-gate.orb +1 -1
  345. package/behaviors/registry/ui/game/atoms/std-coef-pad.orb +1 -1
  346. package/behaviors/registry/ui/game/atoms/std-curve-fog.orb +1 -1
  347. package/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +1 -1
  348. package/behaviors/registry/ui/game/atoms/std-fx-narrative.orb +1 -1
  349. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +1 -1
  350. package/behaviors/registry/ui/game/atoms/std-fx-trail.orb +1 -1
  351. package/behaviors/registry/ui/game/atoms/std-gate-lock.orb +1 -1
  352. package/behaviors/registry/ui/game/atoms/std-gather.orb +1 -1
  353. package/behaviors/registry/ui/game/atoms/std-gold.orb +1 -1
  354. package/behaviors/registry/ui/game/atoms/std-grid-tactics.orb +1 -1
  355. package/behaviors/registry/ui/game/atoms/std-hero-nav.orb +1 -1
  356. package/behaviors/registry/ui/game/atoms/std-lives.orb +1 -1
  357. package/behaviors/registry/ui/game/atoms/std-loop-lock.orb +1 -1
  358. package/behaviors/registry/ui/game/atoms/std-market-flow.orb +1 -1
  359. package/behaviors/registry/ui/game/atoms/std-motion-body.orb +1 -1
  360. package/behaviors/registry/ui/game/atoms/std-objective-reach.orb +1 -1
  361. package/behaviors/registry/ui/game/atoms/std-pad-lock.orb +1 -1
  362. package/behaviors/registry/ui/game/atoms/std-patience.orb +1 -1
  363. package/behaviors/registry/ui/game/atoms/std-patrol-hazard.orb +1 -1
  364. package/behaviors/registry/ui/game/atoms/std-pickup.orb +1 -1
  365. package/behaviors/registry/ui/game/atoms/std-platformer-body.orb +1 -1
  366. package/behaviors/registry/ui/game/atoms/std-production.orb +1 -1
  367. package/behaviors/registry/ui/game/atoms/std-score.orb +1 -1
  368. package/behaviors/registry/ui/game/atoms/std-tutorial-autodemo.orb +1 -1
  369. package/behaviors/registry/ui/game/atoms/std-tutorial-overlay.orb +1 -1
  370. package/behaviors/registry/ui/game/atoms/std-velocity-gate.orb +1 -1
  371. package/behaviors/registry/ui/game/atoms/std-xp.orb +1 -1
  372. package/behaviors/registry/ui/game/atoms/std-zone-card.orb +1 -1
  373. package/behaviors/registry/ui/game/atoms/ui-action-palette.orb +1 -1
  374. package/behaviors/registry/ui/game/atoms/ui-action-tile.orb +1 -1
  375. package/behaviors/registry/ui/game/atoms/ui-canvas-2d.orb +1 -1
  376. package/behaviors/registry/ui/game/atoms/ui-canvas.orb +1 -1
  377. package/behaviors/registry/ui/game/atoms/ui-choice-button.orb +1 -1
  378. package/behaviors/registry/ui/game/atoms/ui-control-button.orb +1 -1
  379. package/behaviors/registry/ui/game/atoms/ui-control-grid.orb +1 -1
  380. package/behaviors/registry/ui/game/atoms/ui-dialogue-bubble.orb +1 -1
  381. package/behaviors/registry/ui/game/atoms/ui-draw-fx-layer.orb +1 -1
  382. package/behaviors/registry/ui/game/atoms/ui-draw-group.orb +1 -1
  383. package/behaviors/registry/ui/game/atoms/ui-draw-mesh.orb +1 -1
  384. package/behaviors/registry/ui/game/atoms/ui-draw-shape-layer.orb +1 -1
  385. package/behaviors/registry/ui/game/atoms/ui-draw-shape.orb +1 -1
  386. package/behaviors/registry/ui/game/atoms/ui-draw-skinned-mesh.orb +1 -1
  387. package/behaviors/registry/ui/game/atoms/ui-draw-sprite-layer.orb +1 -1
  388. package/behaviors/registry/ui/game/atoms/ui-draw-sprite.orb +1 -1
  389. package/behaviors/registry/ui/game/atoms/ui-draw-text-layer.orb +1 -1
  390. package/behaviors/registry/ui/game/atoms/ui-draw-text.orb +1 -1
  391. package/behaviors/registry/ui/game/atoms/ui-game-audio-cue.orb +1 -1
  392. package/behaviors/registry/ui/game/atoms/ui-game-audio-toggle.orb +1 -1
  393. package/behaviors/registry/ui/game/atoms/ui-game-hud.orb +1 -1
  394. package/behaviors/registry/ui/game/atoms/ui-game-menu.orb +1 -1
  395. package/behaviors/registry/ui/game/atoms/ui-health-bar.orb +1 -1
  396. package/behaviors/registry/ui/game/atoms/ui-score-display.orb +1 -1
  397. package/behaviors/registry/ui/game/atoms/ui-sequence-bar.orb +1 -1
  398. package/behaviors/registry/ui/game/atoms/ui-stat-badge.orb +1 -1
  399. package/behaviors/registry/ui/game/atoms/ui-state-graph.orb +1 -1
  400. package/behaviors/registry/ui/game/atoms/ui-state-json-view.orb +1 -1
  401. package/behaviors/registry/ui/game/atoms/ui-timer-display.orb +1 -1
  402. package/behaviors/registry/ui/game/atoms/ui-trait-slot.orb +1 -1
  403. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +1 -1
  404. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +1 -1
  405. package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +1 -1
  406. package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +1 -1
  407. package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +1 -1
  408. package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +1 -1
  409. package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +1 -1
  410. package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +1 -1
  411. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +1 -1
  412. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +1 -1
  413. package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +1 -1
  414. package/behaviors/registry/ui/game/templates/ui-game-shell.orb +1 -1
  415. package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +1 -1
  416. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1 -1
  417. package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +1 -1
  418. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +1 -1
  419. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +1 -1
  420. package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +1 -1
  421. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +1 -1
  422. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +1 -1
  423. package/behaviors/registry/ui/learning/atoms/std-learn-fx-cues.orb +1 -1
  424. package/behaviors/registry/ui/learning/atoms/std-learn-generate.orb +1 -1
  425. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +1 -1
  426. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +1 -1
  427. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +1 -1
  428. package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +1 -1
  429. package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +1 -1
  430. package/behaviors/registry/ui/learning/atoms/std-learn-param-explorer.orb +1 -1
  431. package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +1 -1
  432. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +1 -1
  433. package/behaviors/registry/ui/learning/atoms/std-learn-sample-accumulator.orb +1 -1
  434. package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +1 -1
  435. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1 -1
  436. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +1 -1
  437. package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +1 -1
  438. package/behaviors/registry/ui/learning/atoms/std-learn-slope-probe.orb +1 -1
  439. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +1 -1
  440. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +1 -1
  441. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +1 -1
  442. package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +1 -1
  443. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +1 -1
  444. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +1 -1
  445. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +1 -1
  446. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +1 -1
  447. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +1 -1
  448. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +1 -1
  449. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +1 -1
  450. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +1 -1
  451. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1 -1
  452. package/dist/behaviors-embeddings.hash.json +1 -1
  453. package/dist/behaviors-embeddings.json +1 -1
  454. package/dist/knob-embeddings.hash.json +1 -1
  455. package/package.json +1 -1
@@ -1 +1 @@
1
- {"name":"std-permission-matrix","version":"1.0.0","description":"std-permission-matrix — role × module permission grant table / capability matrix admin surface. Use when a user voices that permissions must be managed per role and module (permission matrix, role permissions, capability matrix, permission grants, access matrix, who can see finance, hide margins, module-level permissions, admin permission screen, grant management, finance visibility by role, restrict modules by role). Persists PermissionGrant rows (workspaceId + role + module + capability flags canReadFinance / canSeeOthersHours / canSeeMargins) with full CRUD on an admin page mounted at /admin/permissions — create/edit forms are the std-modal ModalRecordModal substrate (the corpus's two-trait CRUD shape, mirroring std-list), persists live in a sibling coordinator trait, and adminRoles is ENFORCED at the persist boundary (a viewer whose role is not listed cannot fire a write, from the button or from the bus). Ships a query trait other traits consult event-wise: CHECK_GRANT { role, module } fetches the matching grant(s) and re-emits GRANT_RESOLVED { role, module, canReadFinance, canSeeOthersHours, canSeeMargins, found }. Grant SURFACE only — entity-layer @read/@update gate integration is a recorded core gap (gates are pure @entity/@user S-expressions and cannot consult another entity's rows), so enforcement stays with the consumer until that core lands.","orbitals":[{"name":"PermissionMatrixOrbital","id":"orb_YCP1MH9ZMPZTB79MDWVFCA43GB","uses":[{"from":"std/behaviors/std-modal","as":"Modal"},{"from":"std/behaviors/ui-spinner","as":"Spinner"},{"from":"std/behaviors/ui-typography","as":"Typography"},{"from":"std/behaviors/ui-icon","as":"Icon"},{"from":"std/behaviors/ui-divider","as":"Divider"},{"from":"std/behaviors/ui-alert","as":"Alert"}],"entity":{"name":"PermissionGrant","id":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","collection":"permission_grants","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string","default":"","description":"Workspace the grant applies to; blank = applies to every workspace.","synonyms":"workspace, tenant, org, organization"},{"name":"role","type":"string","required":true,"description":"The role the grant applies to (e.g. admin, manager, contractor).","synonyms":"user role, group, team role"},{"name":"module","type":"string","required":true,"description":"The module or feature area the grant governs.","synonyms":"feature, area, section, screen"},{"name":"canReadFinance","type":"boolean","default":false,"description":"Whether the role may read finance data in this module.","synonyms":"see finance, read financials, view finance, finance access"},{"name":"canSeeOthersHours","type":"boolean","default":false,"description":"Whether the role may see other people's logged hours in this module.","synonyms":"see others hours, view team hours, timesheet visibility, other people's time"},{"name":"canSeeMargins","type":"boolean","default":false,"description":"Whether the role may see margin / profit figures in this module.","synonyms":"see margins, view profit, margin visibility, profitability"},{"name":"createdAt","type":"number","default":0,"description":"Timestamp indicating when the grant was created.","synonyms":"creation time, created, date added"}]},"traits":[{"ref":"Spinner.traits.SpinnerRender","id":"trt_HA0DSNAXMNETAJ8391GEGESVRQ","name":"LoadingSpinner","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},{"ref":"Spinner.traits.SpinnerRender","id":"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD","name":"ErrorSpinner","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"size":{"type":"unknown","default":"sm"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_GVXX88A6AM35AECBG1BBRCTH5J","name":"LoadingText","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"color":{"type":"unknown","default":"muted"},"variant":{"type":"unknown","default":"caption"},"content":{"type":"unknown","default":"Loading permission grants…"}}},{"ref":"Icon.traits.IconRender","id":"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M","name":"ShieldCheckIcon","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"name":{"type":"unknown","default":"shield-check"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_MJT54JH8YRMFC6NCWREGW39JA6","name":"PermissionMatrixTitle","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"variant":{"type":"unknown","default":"h3"},"content":{"type":"unknown","default":"Permission matrix"}}},{"ref":"Divider.traits.DividerRender","id":"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS","name":"GrantDivider","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},{"ref":"Alert.traits.AlertRender","id":"trt_G03XVFMATF5D7Z7KGFYYHHRMXA","name":"ErrorAlert","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"message":{"type":"unknown","default":"@payload.error"},"variant":{"type":"unknown","default":"error"}}},{"name":"PermissionMatrixAdmin","id":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ","entityRebindable":true,"entityContract":{"requires":[],"provides":[]},"effectRow":[{"kind":"fetch","resource":"PermissionGrant"},{"kind":"render-ui","resource":"main"}],"category":"interaction","capabilities":["access"],"linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","entityRefIds":{"PermissionGrant":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},"traitEmbedIds":{"ErrorAlert":"trt_G03XVFMATF5D7Z7KGFYYHHRMXA","ErrorSpinner":"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD","LoadingText":"trt_GVXX88A6AM35AECBG1BBRCTH5J","ShieldCheckIcon":"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M","PermissionMatrixTitle":"trt_MJT54JH8YRMFC6NCWREGW39JA6","GrantDivider":"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS","LoadingSpinner":"trt_HA0DSNAXMNETAJ8391GEGESVRQ"},"emits":[{"event":"NEW","eventId":"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT","description":"Requests the create-grant form (the create modal listens).","synonyms":"add grant, new permission, create grant","tier":"domain"},{"event":"EDIT","eventId":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT","description":"Requests the edit form for a grant row (the edit modal listens).","synonyms":"modify grant, change permission, update grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"DELETE","eventId":"evt_KJJRX0825S12WH7CYQAFYDVR2J","description":"Requests deletion of a grant row (the persistor listens; adminRoles-guarded there).","synonyms":"remove grant, revoke permission, delete grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"PermissionGrantLoaded","eventId":"evt_TN708VYY64F324117703KE0S67","description":"Indicates the permission-grant collection has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"PermissionGrantLoadFailed","eventId":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","description":"Indicates failure to load the permission-grant collection.","synonyms":"load error, failed load, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]}],"listens":[{"event":"PermissionGrantSaved","eventId":"evt_V221SQHT9KX4SVYARWX8WWT480","triggers":"INIT","triggersId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","source":{"kind":"trait","trait":"PermissionGrantPersistor","traitId":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"}},{"event":"PermissionGrantDeleted","eventId":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","triggers":"INIT","triggersId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","source":{"kind":"trait","trait":"PermissionGrantPersistor","traitId":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"}}],"stateMachine":{"states":[{"name":"loading","isInitial":true},{"name":"listing"},{"name":"error"}],"events":[{"key":"INIT","id":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","name":"Initialize"},{"key":"PermissionGrantLoaded","id":"evt_TN708VYY64F324117703KE0S67","name":"PermissionGrant loaded","description":"Indicates the permission-grant collection has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"key":"PermissionGrantLoadFailed","id":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","name":"PermissionGrant load failed","description":"Indicates failure to load the permission-grant collection.","synonyms":"load error, failed load, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}],"listened":true},{"key":"NEW","id":"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT","name":"New","description":"Requests the create-grant form (the create modal listens).","synonyms":"add grant, new permission, create grant","tier":"domain"},{"key":"EDIT","id":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT","name":"Edit","description":"Requests the edit form for a grant row (the edit modal listens).","synonyms":"modify grant, change permission, update grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"key":"DELETE","id":"evt_KJJRX0825S12WH7CYQAFYDVR2J","name":"Delete","description":"Requests deletion of a grant row (the persistor listens; adminRoles-guarded there).","synonyms":"remove grant, revoke permission, delete grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]}],"transitions":[{"from":"loading","to":"loading","event":"INIT","eventId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","effects":[["fetch","PermissionGrant",{"emit":{"failure":"PermissionGrantLoadFailed","success":"PermissionGrantLoaded"}}],["render-ui","main",{"align":"center","children":["@trait.LoadingSpinner","@trait.LoadingText"],"className":"py-12","direction":"vertical","gap":"md","type":"stack"}]]},{"from":"loading","to":"listing","event":"PermissionGrantLoaded","eventId":"evt_TN708VYY64F324117703KE0S67","effects":[["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldCheckIcon","@trait.PermissionMatrixTitle"],"direction":"horizontal","gap":"sm","type":"stack"},{"action":"NEW","icon":"plus","label":"New grant","type":"button","variant":"primary"}],"direction":"horizontal","gap":"sm","justify":"between","type":"stack"},"@trait.GrantDivider",{"cols":1,"entity":"@payload.data","fields":[{"label":"Role","name":"role","variant":"h4"},{"label":"Module","name":"module","variant":"badge"},{"label":"Workspace","name":"workspaceId","variant":"caption"},{"format":"boolean","label":"Read finance","name":"canReadFinance","variant":"caption"},{"format":"boolean","label":"Others' hours","name":"canSeeOthersHours","variant":"caption"},{"format":"boolean","label":"Margins","name":"canSeeMargins","variant":"caption"}],"gap":"sm","itemClickEvent":"@config.itemClickEvent","itemActions":["array/filter","@config.itemActions",["fn","action",["or",["=",["array/len",["object/get","@action","roles",[]]],0],["array/includes",["object/get","@action","roles",[]],"@config.viewerRole"]]]],"type":"data-grid"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"loading","to":"error","event":"PermissionGrantLoadFailed","eventId":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","effects":[["render-ui","main",{"children":["@trait.ErrorAlert"],"type":"stack"}]]},{"from":"listing","to":"loading","event":"INIT","eventId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","effects":[["fetch","PermissionGrant",{"emit":{"failure":"PermissionGrantLoadFailed","success":"PermissionGrantLoaded"}}]]},{"from":"error","to":"loading","event":"INIT","eventId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","effects":[["fetch","PermissionGrant",{"emit":{"failure":"PermissionGrantLoadFailed","success":"PermissionGrantLoaded"}}],["render-ui","main",{"align":"center","children":["@trait.ErrorSpinner"],"type":"stack"}]]}]},"config":{"itemClickEvent":{"type":"event","default":"EDIT","label":"Row click","description":"Event emitted when a row is clicked; opens the grant for editing. Empty disables the row click.","tier":"presentation","refId":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT"},"itemActions":{"type":"[ItemAction]","default":[{"event":"EDIT","icon":"pencil","label":"Edit","variant":"ghost"},{"event":"DELETE","icon":"trash","label":"Delete","variant":"danger"}],"label":"Row actions","description":"Actions offered on each row; give an item `roles` to show it only to those viewer roles.","tier":"presentation","items":{"type":"object","properties":{"label":{"name":"label","type":"string","required":true},"when":{"name":"when","type":"SExpr","required":false},"icon":{"name":"icon","type":"string","required":false},"event":{"name":"event","type":"event","required":false},"roles":{"name":"roles","type":"array","required":false,"items":{"type":"string"}},"variant":{"name":"variant","type":"string","required":false}}}},"viewerRole":{"type":"string","default":"","label":"Viewer's role","description":"The signed-in viewer's role that each action's `roles` is checked against. Bind it explicitly at the call site (e.g. `viewerRole: @user.role`) in an app whose identity carries a role; left empty, only actions with no `roles` show.","tier":"policy"}},"scope":"collection"},{"ref":"Modal.traits.ModalRecordModal","id":"trt_ZP35997MWCTE629K6WS8R8710P","name":"PermissionGrantCreate","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"mode":{"type":"unknown","default":"create"},"icon":{"type":"unknown","default":"plus-circle"},"fields":{"type":"unknown","default":["workspaceId","role","module","canReadFinance","canSeeOthersHours","canSeeMargins"]},"title":{"type":"unknown","default":"Create grant"}},"events":{"SAVE":"GRANT_CREATED","OPEN":"NEW"},"listens":[{"event":"NEW","triggers":"NEW","source":{"kind":"trait","trait":"PermissionMatrixAdmin"}}]},{"ref":"Modal.traits.ModalRecordModal","id":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS","name":"PermissionGrantEdit","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"fields":{"type":"unknown","default":["workspaceId","role","module","canReadFinance","canSeeOthersHours","canSeeMargins"]},"icon":{"type":"unknown","default":"pencil"},"title":{"type":"unknown","default":"Edit grant"},"mode":{"type":"unknown","default":"edit"}},"events":{"OPEN":"EDIT","SAVE":"GRANT_UPDATED"},"listens":[{"event":"EDIT","triggers":"EDIT","source":{"kind":"trait","trait":"PermissionMatrixAdmin"}}]},{"name":"PermissionGrantPersistor","id":"trt_Q37K23YFS47WJ4H2K1P86SJNVB","effectRow":[{"kind":"persist","resource":"PermissionGrant"},{"kind":"render-ui","resource":"toast"}],"category":"lifecycle","capabilities":["access"],"linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","entityRefIds":{"PermissionGrant":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},"emits":[{"event":"PermissionGrantSaved","eventId":"evt_V221SQHT9KX4SVYARWX8WWT480","description":"Signals that a permission grant has been persisted (create / update); carries the persisted row's id.","synonyms":"saved, created, updated, persisted","tier":"domain","scope":"external","payloadSchema":[{"name":"id","type":"string","required":true}]},{"event":"PermissionGrantSaveFailed","eventId":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","description":"Indicates a failure to persist a permission grant.","synonyms":"save error, failed save, persist failure","tier":"internal","scope":"external","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"event":"PermissionGrantDeleted","eventId":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","description":"Signals that a permission grant has been deleted.","synonyms":"deleted, removed, revoked","tier":"domain","scope":"external","payloadSchema":[{"name":"id","type":"string"},{"name":"deleted","type":"boolean"}]},{"event":"PermissionGrantDeleteFailed","eventId":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","description":"Indicates a failure to delete a permission grant.","synonyms":"delete error, failed delete","tier":"internal","scope":"external","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]}],"listens":[{"event":"GRANT_CREATED","triggers":"DO_CREATE","triggersId":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","source":{"kind":"trait","trait":"PermissionGrantCreate","traitId":"trt_ZP35997MWCTE629K6WS8R8710P"}},{"event":"GRANT_UPDATED","triggers":"DO_UPDATE","triggersId":"evt_YETC0VM21710KR580FGBQAS1J7","source":{"kind":"trait","trait":"PermissionGrantEdit","traitId":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS"}},{"event":"DELETE","eventId":"evt_KJJRX0825S12WH7CYQAFYDVR2J","triggers":"DO_DELETE","triggersId":"evt_1SHDNSR8EJ479A6707DKFE1AB6","source":{"kind":"trait","trait":"PermissionMatrixAdmin","traitId":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"}}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_P950MR5X6HYK8NQQR6HMS0V92T","name":"Initialize"},{"key":"DO_CREATE","id":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","name":"Do Create","description":"Indicates a request to create a grant row.","synonyms":"add, new, insert","tier":"domain","payloadSchema":[{"name":"data","type":"object","required":true,"properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}],"listened":true},{"key":"DO_UPDATE","id":"evt_YETC0VM21710KR580FGBQAS1J7","name":"Do Update","description":"Indicates a grant row has been modified.","synonyms":"modify, update, change","tier":"domain","payloadSchema":[{"name":"data","type":"object","required":true,"properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}],"listened":true},{"key":"DO_DELETE","id":"evt_1SHDNSR8EJ479A6707DKFE1AB6","name":"Do Delete","description":"Indicates a request to delete a grant row.","synonyms":"remove, discard, erase","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true}],"listened":true},{"key":"PermissionGrantSaveFailed","id":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","name":"PermissionGrant save failed","description":"Indicates a failure to persist a permission grant.","synonyms":"save error, failed save, persist failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"key":"PermissionGrantDeleteFailed","id":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","name":"PermissionGrant delete failed","description":"Indicates a failure to delete a permission grant.","synonyms":"delete error, failed delete","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"key":"PermissionGrantSaved","id":"evt_V221SQHT9KX4SVYARWX8WWT480","name":"PermissionGrant saved","description":"Signals that a permission grant has been persisted (create / update); carries the persisted row's id.","synonyms":"saved, created, updated, persisted","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true}]},{"key":"PermissionGrantDeleted","id":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","name":"PermissionGrant deleted","description":"Signals that a permission grant has been deleted.","synonyms":"deleted, removed, revoked","tier":"domain","payloadSchema":[{"name":"id","type":"string"},{"name":"deleted","type":"boolean"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_P950MR5X6HYK8NQQR6HMS0V92T"},{"from":"idle","to":"idle","event":"DO_CREATE","eventId":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","guard":["or",["=",["array/len","@config.adminRoles"],0],["array/includes","@config.adminRoles","@user.role"]],"effects":[["persist","create","PermissionGrant","@payload.data",{"emit":{"failure":"PermissionGrantSaveFailed","success":"PermissionGrantSaved"}}]]},{"from":"idle","to":"idle","event":"DO_UPDATE","eventId":"evt_YETC0VM21710KR580FGBQAS1J7","guard":["or",["=",["array/len","@config.adminRoles"],0],["array/includes","@config.adminRoles","@user.role"]],"effects":[["persist","update","PermissionGrant","@payload.data",{"emit":{"failure":"PermissionGrantSaveFailed","success":"PermissionGrantSaved"}}]]},{"from":"idle","to":"idle","event":"DO_DELETE","eventId":"evt_1SHDNSR8EJ479A6707DKFE1AB6","guard":["or",["=",["array/len","@config.adminRoles"],0],["array/includes","@config.adminRoles","@user.role"]],"effects":[["persist","delete","PermissionGrant","@payload.id",{"emit":{"failure":"PermissionGrantDeleteFailed","success":"PermissionGrantDeleted"}}]]},{"from":"idle","to":"idle","event":"PermissionGrantSaveFailed","eventId":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't save the permission grant — ","@payload.error"],"dismissible":true}]]},{"from":"idle","to":"idle","event":"PermissionGrantDeleteFailed","eventId":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't delete the permission grant — ","@payload.error"],"dismissible":true}]]}]},"config":{"adminRoles":{"type":"[string]","default":[],"label":"Who can manage grants?","description":"Roles eligible to create, edit, or delete grants. ENFORCED by the DO_CREATE/DO_UPDATE/DO_DELETE transition guards: a viewer whose @user.role is not listed cannot fire a write, from the form submit or from the bus. Empty = every signed-in viewer may manage grants (ungated). Mounting the page is the opt-in — there is deliberately no separate enable flag (a default-off flag made the whole page's affordances dead on a fresh mount).","synonyms":"admin roles, permission managers, who edits permissions, grant admins, permission matrix, role permissions, capability matrix, permission grants, access matrix, manage permissions","tier":"policy","items":{"type":"string"}}},"scope":"instance"},{"name":"PermissionGrantQuery","id":"trt_51B3E9RK4G9J832SCN1RQE48PZ","entityRebindable":true,"entityContract":{"requires":[],"provides":["module","role"]},"effectRow":[{"kind":"emit","resource":"GRANT_RESOLVED"},{"kind":"fetch","resource":"PermissionGrant"},{"kind":"render-ui","resource":"toast"},{"kind":"set","resource":"@entity.module"},{"kind":"set","resource":"@entity.role"}],"category":"lifecycle","capabilities":["access"],"linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","entityRefIds":{"PermissionGrant":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},"emits":[{"event":"GRANT_RESOLVED","eventId":"evt_C2MKDKCP82B41459P5GAHJAZYY","description":"Answers a CHECK_GRANT: the capability flags of the first matching grant row, with found=false (and all flags false) when no row matches. Rename to wire the downstream listener; default-deny on found=false is the consumer's choice.","synonyms":"grant resolved, permission answer, capabilities returned, access decision data","tier":"domain","scope":"external","payloadSchema":[{"name":"role","type":"string"},{"name":"module","type":"string"},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"found","type":"boolean"}]},{"event":"GrantCheckLoaded","eventId":"evt_YWEKQET27813M2N2FC0PJDZQDA","description":"Indicates the grant lookup for a CHECK_GRANT has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"GrantCheckFailed","eventId":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","description":"Indicates the grant lookup for a CHECK_GRANT failed.","synonyms":"lookup error, failed lookup, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"CHECK_GRANT","id":"evt_YEGGC37PJRV9CBX15YRXXJWWS4","name":"Check Grant","description":"Asks which capabilities a role holds in a module; the answer arrives as GRANT_RESOLVED (asynchronous — correlate by the echoed role/module).","synonyms":"check grant, lookup permission, resolve capabilities, can this role see","tier":"domain","payloadSchema":[{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true}],"listened":true},{"key":"GrantCheckLoaded","id":"evt_YWEKQET27813M2N2FC0PJDZQDA","name":"Grant check loaded","description":"Indicates the grant lookup for a CHECK_GRANT has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}],"listened":true},{"key":"GrantCheckFailed","id":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","name":"Grant check failed","description":"Indicates the grant lookup for a CHECK_GRANT failed.","synonyms":"lookup error, failed lookup, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}],"listened":true},{"key":"GRANT_RESOLVED","id":"evt_C2MKDKCP82B41459P5GAHJAZYY","name":"Grant Resolved","description":"Answers a CHECK_GRANT: the capability flags of the first matching grant row, with found=false (and all flags false) when no row matches. Rename to wire the downstream listener; default-deny on found=false is the consumer's choice.","synonyms":"grant resolved, permission answer, capabilities returned, access decision data","tier":"domain","payloadSchema":[{"name":"role","type":"string"},{"name":"module","type":"string"},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"found","type":"boolean"}]}],"transitions":[{"from":"idle","to":"idle","event":"CHECK_GRANT","eventId":"evt_YEGGC37PJRV9CBX15YRXXJWWS4","guard":"@config.enabled","effects":[["set","@entity.role","@payload.role"],["set","@entity.module","@payload.module"],["fetch","PermissionGrant",{"filter":["and",["=",["object/get","@entity","role"],"@payload.role"],["=",["object/get","@entity","module"],"@payload.module"]],"emit":{"failure":"GrantCheckFailed","success":"GrantCheckLoaded"}}]]},{"from":"idle","to":"idle","event":"GrantCheckLoaded","eventId":"evt_YWEKQET27813M2N2FC0PJDZQDA","effects":[["emit","GRANT_RESOLVED",{"role":"@entity.role","module":"@entity.module","canReadFinance":["if",[">",["array/len","@payload.data"],0],["object/get",["array/first","@payload.data"],"canReadFinance",false],false],"canSeeOthersHours":["if",[">",["array/len","@payload.data"],0],["object/get",["array/first","@payload.data"],"canSeeOthersHours",false],false],"canSeeMargins":["if",[">",["array/len","@payload.data"],0],["object/get",["array/first","@payload.data"],"canSeeMargins",false],false],"found":[">",["array/len","@payload.data"],0]}]]},{"from":"idle","to":"idle","event":"GrantCheckFailed","eventId":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't resolve the permission grant — ","@payload.error"],"dismissible":true}]]}]},"config":{"enabled":{"type":"boolean","default":false,"label":"Answer permission lookups","description":"Answer CHECK_GRANT lookups with GRANT_RESOLVED from the persisted grant table. Off by default.","synonyms":"enable, turn on, activate, permission lookup, grant query, resolve capabilities","tier":"policy"}},"scope":"instance"}],"pages":[{"name":"PermissionMatrixPage","id":"pag_7J79DW7VG8XR42AFPXJP6VPDQJ","path":"/admin/permissions","traits":[{"ref":"PermissionMatrixAdmin","refId":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},{"ref":"PermissionGrantCreate","refId":"trt_ZP35997MWCTE629K6WS8R8710P"},{"ref":"PermissionGrantEdit","refId":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS"},{"ref":"PermissionGrantPersistor","refId":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},{"ref":"PermissionGrantQuery","refId":"trt_51B3E9RK4G9J832SCN1RQE48PZ"}]}],"types":{"ItemAction":[{"name":"label","type":"string","required":true},{"name":"event","type":"event"},{"name":"variant","type":"string"},{"name":"icon","type":"string"},{"name":"roles","type":"[string]"},{"name":"when","type":"SExpr"}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_B7FCMQGT19D0MPTJXYCK1X96EC":{"id":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","kind":"entity","bakedName":"PermissionGrant","curName":"PermissionGrant","renames":[],"owner":"workspace"},"evt_100H2TZKE1SQ0NBYRDQMTF2MST":{"id":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","kind":"event","bakedName":"PermissionGrantSaveFailed","curName":"PermissionGrantSaveFailed","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_1SHDNSR8EJ479A6707DKFE1AB6":{"id":"evt_1SHDNSR8EJ479A6707DKFE1AB6","kind":"event","bakedName":"DO_DELETE","curName":"DO_DELETE","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT":{"id":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT","kind":"event","bakedName":"EDIT","curName":"EDIT","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_6SKE4M7F8SQMCJBR8MWXY50SKB":{"id":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","kind":"event","bakedName":"GrantCheckFailed","curName":"GrantCheckFailed","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ":{"id":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","kind":"event","bakedName":"PermissionGrantLoadFailed","curName":"PermissionGrantLoadFailed","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_C2MKDKCP82B41459P5GAHJAZYY":{"id":"evt_C2MKDKCP82B41459P5GAHJAZYY","kind":"event","bakedName":"GRANT_RESOLVED","curName":"GRANT_RESOLVED","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_HASK0ZHW7GY3R0EPKBY18SP96H":{"id":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_HW2FQF4C9V64XKZ2VR29SXN02P":{"id":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","kind":"event","bakedName":"PermissionGrantDeleteFailed","curName":"PermissionGrantDeleteFailed","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_KJJRX0825S12WH7CYQAFYDVR2J":{"id":"evt_KJJRX0825S12WH7CYQAFYDVR2J","kind":"event","bakedName":"DELETE","curName":"DELETE","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T":{"id":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","kind":"event","bakedName":"DO_CREATE","curName":"DO_CREATE","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_P950MR5X6HYK8NQQR6HMS0V92T":{"id":"evt_P950MR5X6HYK8NQQR6HMS0V92T","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT":{"id":"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT","kind":"event","bakedName":"NEW","curName":"NEW","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_TN708VYY64F324117703KE0S67":{"id":"evt_TN708VYY64F324117703KE0S67","kind":"event","bakedName":"PermissionGrantLoaded","curName":"PermissionGrantLoaded","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_V221SQHT9KX4SVYARWX8WWT480":{"id":"evt_V221SQHT9KX4SVYARWX8WWT480","kind":"event","bakedName":"PermissionGrantSaved","curName":"PermissionGrantSaved","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_YEGGC37PJRV9CBX15YRXXJWWS4":{"id":"evt_YEGGC37PJRV9CBX15YRXXJWWS4","kind":"event","bakedName":"CHECK_GRANT","curName":"CHECK_GRANT","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_YETC0VM21710KR580FGBQAS1J7":{"id":"evt_YETC0VM21710KR580FGBQAS1J7","kind":"event","bakedName":"DO_UPDATE","curName":"DO_UPDATE","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_YWEKQET27813M2N2FC0PJDZQDA":{"id":"evt_YWEKQET27813M2N2FC0PJDZQDA","kind":"event","bakedName":"GrantCheckLoaded","curName":"GrantCheckLoaded","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_ZJN9VCCD556JJM2GWNYV1G1HFR":{"id":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","kind":"event","bakedName":"PermissionGrantDeleted","curName":"PermissionGrantDeleted","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"orb_YCP1MH9ZMPZTB79MDWVFCA43GB":{"id":"orb_YCP1MH9ZMPZTB79MDWVFCA43GB","kind":"orbital","bakedName":"PermissionMatrixOrbital","curName":"PermissionMatrixOrbital","renames":[],"owner":"workspace"},"pag_7J79DW7VG8XR42AFPXJP6VPDQJ":{"id":"pag_7J79DW7VG8XR42AFPXJP6VPDQJ","kind":"page","bakedName":"PermissionMatrixPage","curName":"PermissionMatrixPage","renames":[],"owner":"workspace"},"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS":{"id":"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS","kind":"trait","bakedName":"GrantDivider","curName":"GrantDivider","renames":[],"owner":"workspace"},"trt_51B3E9RK4G9J832SCN1RQE48PZ":{"id":"trt_51B3E9RK4G9J832SCN1RQE48PZ","kind":"trait","bakedName":"PermissionGrantQuery","curName":"PermissionGrantQuery","renames":[],"owner":"workspace"},"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ":{"id":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ","kind":"trait","bakedName":"PermissionMatrixAdmin","curName":"PermissionMatrixAdmin","renames":[],"owner":"workspace"},"trt_G03XVFMATF5D7Z7KGFYYHHRMXA":{"id":"trt_G03XVFMATF5D7Z7KGFYYHHRMXA","kind":"trait","bakedName":"ErrorAlert","curName":"ErrorAlert","renames":[],"owner":"workspace"},"trt_GVXX88A6AM35AECBG1BBRCTH5J":{"id":"trt_GVXX88A6AM35AECBG1BBRCTH5J","kind":"trait","bakedName":"LoadingText","curName":"LoadingText","renames":[],"owner":"workspace"},"trt_HA0DSNAXMNETAJ8391GEGESVRQ":{"id":"trt_HA0DSNAXMNETAJ8391GEGESVRQ","kind":"trait","bakedName":"LoadingSpinner","curName":"LoadingSpinner","renames":[],"owner":"workspace"},"trt_MJT54JH8YRMFC6NCWREGW39JA6":{"id":"trt_MJT54JH8YRMFC6NCWREGW39JA6","kind":"trait","bakedName":"PermissionMatrixTitle","curName":"PermissionMatrixTitle","renames":[],"owner":"workspace"},"trt_Q37K23YFS47WJ4H2K1P86SJNVB":{"id":"trt_Q37K23YFS47WJ4H2K1P86SJNVB","kind":"trait","bakedName":"PermissionGrantPersistor","curName":"PermissionGrantPersistor","renames":[],"owner":"workspace"},"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS":{"id":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS","kind":"trait","bakedName":"PermissionGrantEdit","curName":"PermissionGrantEdit","renames":[],"owner":"workspace"},"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD":{"id":"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD","kind":"trait","bakedName":"ErrorSpinner","curName":"ErrorSpinner","renames":[],"owner":"workspace"},"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M":{"id":"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M","kind":"trait","bakedName":"ShieldCheckIcon","curName":"ShieldCheckIcon","renames":[],"owner":"workspace"},"trt_ZP35997MWCTE629K6WS8R8710P":{"id":"trt_ZP35997MWCTE629K6WS8R8710P","kind":"trait","bakedName":"PermissionGrantCreate","curName":"PermissionGrantCreate","renames":[],"owner":"workspace"}}}}
1
+ {"name":"std-permission-matrix","version":"1.0.0","description":"std-permission-matrix — role × module permission grant table / capability matrix admin surface. Use when a user voices that permissions must be managed per role and module (permission matrix, role permissions, capability matrix, permission grants, access matrix, who can see finance, hide margins, module-level permissions, admin permission screen, grant management, finance visibility by role, restrict modules by role). Persists PermissionGrant rows (workspaceId + role + module + capability flags canReadFinance / canSeeOthersHours / canSeeMargins) with full CRUD on an admin page mounted at /admin/permissions — create/edit forms are the std-modal ModalRecordModal substrate (the corpus's two-trait CRUD shape, mirroring std-list), persists live in a sibling coordinator trait, and adminRoles is ENFORCED at the persist boundary (a viewer whose role is not listed cannot fire a write, from the button or from the bus). Ships a query trait other traits consult event-wise: CHECK_GRANT { role, module } fetches the matching grant(s) and re-emits GRANT_RESOLVED { role, module, canReadFinance, canSeeOthersHours, canSeeMargins, found }. Grant SURFACE only — entity-layer @read/@update gate integration is a recorded core gap (gates are pure @entity/@user S-expressions and cannot consult another entity's rows), so enforcement stays with the consumer until that core lands.","orbitals":[{"name":"PermissionMatrixOrbital","id":"orb_YCP1MH9ZMPZTB79MDWVFCA43GB","uses":[{"from":"std/behaviors/std-modal","as":"Modal"},{"from":"std/behaviors/ui-spinner","as":"Spinner"},{"from":"std/behaviors/ui-typography","as":"Typography"},{"from":"std/behaviors/ui-icon","as":"Icon"},{"from":"std/behaviors/ui-divider","as":"Divider"},{"from":"std/behaviors/ui-alert","as":"Alert"}],"entity":{"name":"PermissionGrant","id":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","collection":"permission_grants","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string","default":"","description":"Workspace the grant applies to; blank = applies to every workspace.","synonyms":"workspace, tenant, org, organization"},{"name":"role","type":"string","required":true,"description":"The role the grant applies to (e.g. admin, manager, contractor).","synonyms":"user role, group, team role"},{"name":"module","type":"string","required":true,"description":"The module or feature area the grant governs.","synonyms":"feature, area, section, screen"},{"name":"canReadFinance","type":"boolean","default":false,"description":"Whether the role may read finance data in this module.","synonyms":"see finance, read financials, view finance, finance access"},{"name":"canSeeOthersHours","type":"boolean","default":false,"description":"Whether the role may see other people's logged hours in this module.","synonyms":"see others hours, view team hours, timesheet visibility, other people's time"},{"name":"canSeeMargins","type":"boolean","default":false,"description":"Whether the role may see margin / profit figures in this module.","synonyms":"see margins, view profit, margin visibility, profitability"},{"name":"createdAt","type":"number","default":0,"description":"Timestamp indicating when the grant was created.","synonyms":"creation time, created, date added"}]},"traits":[{"ref":"Spinner.traits.SpinnerRender","id":"trt_HA0DSNAXMNETAJ8391GEGESVRQ","name":"LoadingSpinner","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},{"ref":"Spinner.traits.SpinnerRender","id":"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD","name":"ErrorSpinner","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"size":{"type":"unknown","default":"sm"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_GVXX88A6AM35AECBG1BBRCTH5J","name":"LoadingText","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"color":{"type":"unknown","default":"muted"},"variant":{"type":"unknown","default":"caption"},"content":{"type":"unknown","default":"Loading permission grants…"}}},{"ref":"Icon.traits.IconRender","id":"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M","name":"ShieldCheckIcon","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"name":{"type":"unknown","default":"shield-check"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_MJT54JH8YRMFC6NCWREGW39JA6","name":"PermissionMatrixTitle","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"variant":{"type":"unknown","default":"h3"},"content":{"type":"unknown","default":"Permission matrix"}}},{"ref":"Divider.traits.DividerRender","id":"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS","name":"GrantDivider","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},{"ref":"Alert.traits.AlertRender","id":"trt_G03XVFMATF5D7Z7KGFYYHHRMXA","name":"ErrorAlert","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"variant":{"type":"unknown","default":"error"},"message":{"type":"unknown","default":"@payload.error"}}},{"name":"PermissionMatrixAdmin","id":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ","entityRebindable":true,"entityContract":{"requires":[],"provides":[]},"effectRow":[{"kind":"fetch","resource":"PermissionGrant"},{"kind":"render-ui","resource":"main"}],"category":"interaction","capabilities":["access"],"linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","entityRefIds":{"PermissionGrant":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},"traitEmbedIds":{"PermissionMatrixTitle":"trt_MJT54JH8YRMFC6NCWREGW39JA6","ErrorAlert":"trt_G03XVFMATF5D7Z7KGFYYHHRMXA","GrantDivider":"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS","ErrorSpinner":"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD","LoadingSpinner":"trt_HA0DSNAXMNETAJ8391GEGESVRQ","LoadingText":"trt_GVXX88A6AM35AECBG1BBRCTH5J","ShieldCheckIcon":"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M"},"emits":[{"event":"NEW","eventId":"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT","description":"Requests the create-grant form (the create modal listens).","synonyms":"add grant, new permission, create grant","tier":"domain"},{"event":"EDIT","eventId":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT","description":"Requests the edit form for a grant row (the edit modal listens).","synonyms":"modify grant, change permission, update grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"DELETE","eventId":"evt_KJJRX0825S12WH7CYQAFYDVR2J","description":"Requests deletion of a grant row (the persistor listens; adminRoles-guarded there).","synonyms":"remove grant, revoke permission, delete grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"PermissionGrantLoaded","eventId":"evt_TN708VYY64F324117703KE0S67","description":"Indicates the permission-grant collection has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"PermissionGrantLoadFailed","eventId":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","description":"Indicates failure to load the permission-grant collection.","synonyms":"load error, failed load, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]}],"listens":[{"event":"PermissionGrantSaved","eventId":"evt_V221SQHT9KX4SVYARWX8WWT480","triggers":"INIT","triggersId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","source":{"kind":"trait","trait":"PermissionGrantPersistor","traitId":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"}},{"event":"PermissionGrantDeleted","eventId":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","triggers":"INIT","triggersId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","source":{"kind":"trait","trait":"PermissionGrantPersistor","traitId":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"}}],"stateMachine":{"states":[{"name":"loading","isInitial":true},{"name":"listing"},{"name":"error"}],"events":[{"key":"INIT","id":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","name":"Initialize"},{"key":"PermissionGrantLoaded","id":"evt_TN708VYY64F324117703KE0S67","name":"PermissionGrant loaded","description":"Indicates the permission-grant collection has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"key":"PermissionGrantLoadFailed","id":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","name":"PermissionGrant load failed","description":"Indicates failure to load the permission-grant collection.","synonyms":"load error, failed load, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}],"listened":true},{"key":"NEW","id":"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT","name":"New","description":"Requests the create-grant form (the create modal listens).","synonyms":"add grant, new permission, create grant","tier":"domain"},{"key":"EDIT","id":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT","name":"Edit","description":"Requests the edit form for a grant row (the edit modal listens).","synonyms":"modify grant, change permission, update grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"key":"DELETE","id":"evt_KJJRX0825S12WH7CYQAFYDVR2J","name":"Delete","description":"Requests deletion of a grant row (the persistor listens; adminRoles-guarded there).","synonyms":"remove grant, revoke permission, delete grant","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true},{"name":"row","type":"object","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]}],"transitions":[{"from":"loading","to":"loading","event":"INIT","eventId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","effects":[["fetch","PermissionGrant",{"emit":{"failure":"PermissionGrantLoadFailed","success":"PermissionGrantLoaded"}}],["render-ui","main",{"align":"center","children":["@trait.LoadingSpinner","@trait.LoadingText"],"className":"py-12","direction":"vertical","gap":"md","type":"stack"}]]},{"from":"loading","to":"listing","event":"PermissionGrantLoaded","eventId":"evt_TN708VYY64F324117703KE0S67","effects":[["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldCheckIcon","@trait.PermissionMatrixTitle"],"direction":"horizontal","gap":"sm","type":"stack"},{"action":"NEW","icon":"plus","label":"New grant","type":"button","variant":"primary"}],"direction":"horizontal","gap":"sm","justify":"between","type":"stack"},"@trait.GrantDivider",{"cols":1,"entity":"@payload.data","fields":[{"label":"Role","name":"role","variant":"h4"},{"label":"Module","name":"module","variant":"badge"},{"label":"Workspace","name":"workspaceId","variant":"caption"},{"format":"boolean","label":"Read finance","name":"canReadFinance","variant":"caption"},{"format":"boolean","label":"Others' hours","name":"canSeeOthersHours","variant":"caption"},{"format":"boolean","label":"Margins","name":"canSeeMargins","variant":"caption"}],"gap":"sm","itemClickEvent":"@config.itemClickEvent","itemActions":["array/filter","@config.itemActions",["fn","action",["or",["=",["array/len",["object/get","@action","roles",[]]],0],["array/includes",["object/get","@action","roles",[]],"@config.viewerRole"]]]],"type":"data-grid"}],"direction":"vertical","gap":"md","type":"stack"}]]},{"from":"loading","to":"error","event":"PermissionGrantLoadFailed","eventId":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","effects":[["render-ui","main",{"children":["@trait.ErrorAlert"],"type":"stack"}]]},{"from":"listing","to":"loading","event":"INIT","eventId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","effects":[["fetch","PermissionGrant",{"emit":{"failure":"PermissionGrantLoadFailed","success":"PermissionGrantLoaded"}}]]},{"from":"error","to":"loading","event":"INIT","eventId":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","effects":[["fetch","PermissionGrant",{"emit":{"failure":"PermissionGrantLoadFailed","success":"PermissionGrantLoaded"}}],["render-ui","main",{"align":"center","children":["@trait.ErrorSpinner"],"type":"stack"}]]}]},"config":{"itemClickEvent":{"type":"event","default":"EDIT","label":"Row click","description":"Event emitted when a row is clicked; opens the grant for editing. Empty disables the row click.","tier":"presentation","refId":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT"},"itemActions":{"type":"[ItemAction]","default":[{"event":"EDIT","icon":"pencil","label":"Edit","variant":"ghost"},{"event":"DELETE","icon":"trash","label":"Delete","variant":"danger"}],"label":"Row actions","description":"Actions offered on each row; give an item `roles` to show it only to those viewer roles.","tier":"presentation","items":{"type":"object","properties":{"event":{"name":"event","type":"event","required":false},"roles":{"name":"roles","type":"array","required":false,"items":{"type":"string"}},"variant":{"name":"variant","type":"string","required":false},"when":{"name":"when","type":"SExpr","required":false},"label":{"name":"label","type":"string","required":true},"icon":{"name":"icon","type":"string","required":false}}}},"viewerRole":{"type":"string","default":"","label":"Viewer's role","description":"The signed-in viewer's role that each action's `roles` is checked against. Bind it explicitly at the call site (e.g. `viewerRole: @user.role`) in an app whose identity carries a role; left empty, only actions with no `roles` show.","tier":"policy"}},"scope":"collection"},{"ref":"Modal.traits.ModalRecordModal","id":"trt_ZP35997MWCTE629K6WS8R8710P","name":"PermissionGrantCreate","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"title":{"type":"unknown","default":"Create grant"},"icon":{"type":"unknown","default":"plus-circle"},"mode":{"type":"unknown","default":"create"},"fields":{"type":"unknown","default":["workspaceId","role","module","canReadFinance","canSeeOthersHours","canSeeMargins"]}},"events":{"OPEN":"NEW","SAVE":"GRANT_CREATED"},"listens":[{"event":"NEW","triggers":"NEW","source":{"kind":"trait","trait":"PermissionMatrixAdmin"}}]},{"ref":"Modal.traits.ModalRecordModal","id":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS","name":"PermissionGrantEdit","linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","config":{"title":{"type":"unknown","default":"Edit grant"},"fields":{"type":"unknown","default":["workspaceId","role","module","canReadFinance","canSeeOthersHours","canSeeMargins"]},"icon":{"type":"unknown","default":"pencil"},"mode":{"type":"unknown","default":"edit"}},"events":{"SAVE":"GRANT_UPDATED","OPEN":"EDIT"},"listens":[{"event":"EDIT","triggers":"EDIT","source":{"kind":"trait","trait":"PermissionMatrixAdmin"}}]},{"name":"PermissionGrantPersistor","id":"trt_Q37K23YFS47WJ4H2K1P86SJNVB","effectRow":[{"kind":"persist","resource":"PermissionGrant"},{"kind":"render-ui","resource":"toast"}],"category":"lifecycle","capabilities":["access"],"linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","entityRefIds":{"PermissionGrant":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},"emits":[{"event":"PermissionGrantSaved","eventId":"evt_V221SQHT9KX4SVYARWX8WWT480","description":"Signals that a permission grant has been persisted (create / update); carries the persisted row's id.","synonyms":"saved, created, updated, persisted","tier":"domain","scope":"external","payloadSchema":[{"name":"id","type":"string","required":true}]},{"event":"PermissionGrantSaveFailed","eventId":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","description":"Indicates a failure to persist a permission grant.","synonyms":"save error, failed save, persist failure","tier":"internal","scope":"external","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"event":"PermissionGrantDeleted","eventId":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","description":"Signals that a permission grant has been deleted.","synonyms":"deleted, removed, revoked","tier":"domain","scope":"external","payloadSchema":[{"name":"id","type":"string"},{"name":"deleted","type":"boolean"}]},{"event":"PermissionGrantDeleteFailed","eventId":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","description":"Indicates a failure to delete a permission grant.","synonyms":"delete error, failed delete","tier":"internal","scope":"external","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]}],"listens":[{"event":"GRANT_CREATED","triggers":"DO_CREATE","triggersId":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","source":{"kind":"trait","trait":"PermissionGrantCreate","traitId":"trt_ZP35997MWCTE629K6WS8R8710P"}},{"event":"GRANT_UPDATED","triggers":"DO_UPDATE","triggersId":"evt_YETC0VM21710KR580FGBQAS1J7","source":{"kind":"trait","trait":"PermissionGrantEdit","traitId":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS"}},{"event":"DELETE","eventId":"evt_KJJRX0825S12WH7CYQAFYDVR2J","triggers":"DO_DELETE","triggersId":"evt_1SHDNSR8EJ479A6707DKFE1AB6","source":{"kind":"trait","trait":"PermissionMatrixAdmin","traitId":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"}}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"INIT","id":"evt_P950MR5X6HYK8NQQR6HMS0V92T","name":"Initialize"},{"key":"DO_CREATE","id":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","name":"Do Create","description":"Indicates a request to create a grant row.","synonyms":"add, new, insert","tier":"domain","payloadSchema":[{"name":"data","type":"object","required":true,"properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}],"listened":true},{"key":"DO_UPDATE","id":"evt_YETC0VM21710KR580FGBQAS1J7","name":"Do Update","description":"Indicates a grant row has been modified.","synonyms":"modify, update, change","tier":"domain","payloadSchema":[{"name":"data","type":"object","required":true,"properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}],"listened":true},{"key":"DO_DELETE","id":"evt_1SHDNSR8EJ479A6707DKFE1AB6","name":"Do Delete","description":"Indicates a request to delete a grant row.","synonyms":"remove, discard, erase","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true}],"listened":true},{"key":"PermissionGrantSaveFailed","id":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","name":"PermissionGrant save failed","description":"Indicates a failure to persist a permission grant.","synonyms":"save error, failed save, persist failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"key":"PermissionGrantDeleteFailed","id":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","name":"PermissionGrant delete failed","description":"Indicates a failure to delete a permission grant.","synonyms":"delete error, failed delete","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"key":"PermissionGrantSaved","id":"evt_V221SQHT9KX4SVYARWX8WWT480","name":"PermissionGrant saved","description":"Signals that a permission grant has been persisted (create / update); carries the persisted row's id.","synonyms":"saved, created, updated, persisted","tier":"domain","payloadSchema":[{"name":"id","type":"string","required":true}]},{"key":"PermissionGrantDeleted","id":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","name":"PermissionGrant deleted","description":"Signals that a permission grant has been deleted.","synonyms":"deleted, removed, revoked","tier":"domain","payloadSchema":[{"name":"id","type":"string"},{"name":"deleted","type":"boolean"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_P950MR5X6HYK8NQQR6HMS0V92T"},{"from":"idle","to":"idle","event":"DO_CREATE","eventId":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","guard":["or",["=",["array/len","@config.adminRoles"],0],["array/includes","@config.adminRoles","@user.role"]],"effects":[["persist","create","PermissionGrant","@payload.data",{"emit":{"failure":"PermissionGrantSaveFailed","success":"PermissionGrantSaved"}}]]},{"from":"idle","to":"idle","event":"DO_UPDATE","eventId":"evt_YETC0VM21710KR580FGBQAS1J7","guard":["or",["=",["array/len","@config.adminRoles"],0],["array/includes","@config.adminRoles","@user.role"]],"effects":[["persist","update","PermissionGrant","@payload.data",{"emit":{"failure":"PermissionGrantSaveFailed","success":"PermissionGrantSaved"}}]]},{"from":"idle","to":"idle","event":"DO_DELETE","eventId":"evt_1SHDNSR8EJ479A6707DKFE1AB6","guard":["or",["=",["array/len","@config.adminRoles"],0],["array/includes","@config.adminRoles","@user.role"]],"effects":[["persist","delete","PermissionGrant","@payload.id",{"emit":{"failure":"PermissionGrantDeleteFailed","success":"PermissionGrantDeleted"}}]]},{"from":"idle","to":"idle","event":"PermissionGrantSaveFailed","eventId":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't save the permission grant — ","@payload.error"],"dismissible":true}]]},{"from":"idle","to":"idle","event":"PermissionGrantDeleteFailed","eventId":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't delete the permission grant — ","@payload.error"],"dismissible":true}]]}]},"config":{"adminRoles":{"type":"[string]","default":[],"label":"Who can manage grants?","description":"Roles eligible to create, edit, or delete grants. ENFORCED by the DO_CREATE/DO_UPDATE/DO_DELETE transition guards: a viewer whose @user.role is not listed cannot fire a write, from the form submit or from the bus. Empty = every signed-in viewer may manage grants (ungated). Mounting the page is the opt-in — there is deliberately no separate enable flag (a default-off flag made the whole page's affordances dead on a fresh mount).","synonyms":"admin roles, permission managers, who edits permissions, grant admins, permission matrix, role permissions, capability matrix, permission grants, access matrix, manage permissions","tier":"policy","items":{"type":"string"}}},"scope":"instance"},{"name":"PermissionGrantQuery","id":"trt_51B3E9RK4G9J832SCN1RQE48PZ","entityRebindable":true,"entityContract":{"requires":[],"provides":["module","role"]},"effectRow":[{"kind":"emit","resource":"GRANT_RESOLVED"},{"kind":"fetch","resource":"PermissionGrant"},{"kind":"render-ui","resource":"toast"},{"kind":"set","resource":"@entity.module"},{"kind":"set","resource":"@entity.role"}],"category":"lifecycle","capabilities":["access"],"linkedEntity":"PermissionGrant","linkedEntityId":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","entityRefIds":{"PermissionGrant":"ent_B7FCMQGT19D0MPTJXYCK1X96EC"},"emits":[{"event":"GRANT_RESOLVED","eventId":"evt_C2MKDKCP82B41459P5GAHJAZYY","description":"Answers a CHECK_GRANT: the capability flags of the first matching grant row, with found=false (and all flags false) when no row matches. Rename to wire the downstream listener; default-deny on found=false is the consumer's choice.","synonyms":"grant resolved, permission answer, capabilities returned, access decision data","tier":"domain","scope":"external","payloadSchema":[{"name":"role","type":"string"},{"name":"module","type":"string"},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"found","type":"boolean"}]},{"event":"GrantCheckLoaded","eventId":"evt_YWEKQET27813M2N2FC0PJDZQDA","description":"Indicates the grant lookup for a CHECK_GRANT has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}]},{"event":"GrantCheckFailed","eventId":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","description":"Indicates the grant lookup for a CHECK_GRANT failed.","synonyms":"lookup error, failed lookup, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true}],"events":[{"key":"CHECK_GRANT","id":"evt_YEGGC37PJRV9CBX15YRXXJWWS4","name":"Check Grant","description":"Asks which capabilities a role holds in a module; the answer arrives as GRANT_RESOLVED (asynchronous — correlate by the echoed role/module).","synonyms":"check grant, lookup permission, resolve capabilities, can this role see","tier":"domain","payloadSchema":[{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true}],"listened":true},{"key":"GrantCheckLoaded","id":"evt_YWEKQET27813M2N2FC0PJDZQDA","name":"Grant check loaded","description":"Indicates the grant lookup for a CHECK_GRANT has been successfully loaded.","synonyms":"loaded, fetched, retrieved","tier":"internal","payloadSchema":[{"name":"data","type":"[object]","properties":[{"name":"id","type":"string","required":true},{"name":"workspaceId","type":"string"},{"name":"role","type":"string","required":true},{"name":"module","type":"string","required":true},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"createdAt","type":"number"}],"entity":"PermissionGrant"}],"listened":true},{"key":"GrantCheckFailed","id":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","name":"Grant check failed","description":"Indicates the grant lookup for a CHECK_GRANT failed.","synonyms":"lookup error, failed lookup, request failure","tier":"internal","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}],"listened":true},{"key":"GRANT_RESOLVED","id":"evt_C2MKDKCP82B41459P5GAHJAZYY","name":"Grant Resolved","description":"Answers a CHECK_GRANT: the capability flags of the first matching grant row, with found=false (and all flags false) when no row matches. Rename to wire the downstream listener; default-deny on found=false is the consumer's choice.","synonyms":"grant resolved, permission answer, capabilities returned, access decision data","tier":"domain","payloadSchema":[{"name":"role","type":"string"},{"name":"module","type":"string"},{"name":"canReadFinance","type":"boolean"},{"name":"canSeeOthersHours","type":"boolean"},{"name":"canSeeMargins","type":"boolean"},{"name":"found","type":"boolean"}]}],"transitions":[{"from":"idle","to":"idle","event":"CHECK_GRANT","eventId":"evt_YEGGC37PJRV9CBX15YRXXJWWS4","guard":"@config.enabled","effects":[["set","@entity.role","@payload.role"],["set","@entity.module","@payload.module"],["fetch","PermissionGrant",{"filter":["and",["=",["object/get","@entity","role"],"@payload.role"],["=",["object/get","@entity","module"],"@payload.module"]],"emit":{"failure":"GrantCheckFailed","success":"GrantCheckLoaded"}}]]},{"from":"idle","to":"idle","event":"GrantCheckLoaded","eventId":"evt_YWEKQET27813M2N2FC0PJDZQDA","effects":[["emit","GRANT_RESOLVED",{"role":"@entity.role","module":"@entity.module","canReadFinance":["if",[">",["array/len","@payload.data"],0],["object/get",["array/first","@payload.data"],"canReadFinance",false],false],"canSeeOthersHours":["if",[">",["array/len","@payload.data"],0],["object/get",["array/first","@payload.data"],"canSeeOthersHours",false],false],"canSeeMargins":["if",[">",["array/len","@payload.data"],0],["object/get",["array/first","@payload.data"],"canSeeMargins",false],false],"found":[">",["array/len","@payload.data"],0]}]]},{"from":"idle","to":"idle","event":"GrantCheckFailed","eventId":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't resolve the permission grant — ","@payload.error"],"dismissible":true}]]}]},"config":{"enabled":{"type":"boolean","default":false,"label":"Answer permission lookups","description":"Answer CHECK_GRANT lookups with GRANT_RESOLVED from the persisted grant table. Off by default.","synonyms":"enable, turn on, activate, permission lookup, grant query, resolve capabilities","tier":"policy"}},"scope":"instance"}],"pages":[{"name":"PermissionMatrixPage","id":"pag_7J79DW7VG8XR42AFPXJP6VPDQJ","path":"/admin/permissions","traits":[{"ref":"PermissionMatrixAdmin","refId":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},{"ref":"PermissionGrantCreate","refId":"trt_ZP35997MWCTE629K6WS8R8710P"},{"ref":"PermissionGrantEdit","refId":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS"},{"ref":"PermissionGrantPersistor","refId":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},{"ref":"PermissionGrantQuery","refId":"trt_51B3E9RK4G9J832SCN1RQE48PZ"}]}],"types":{"ItemAction":[{"name":"label","type":"string","required":true},{"name":"event","type":"event"},{"name":"variant","type":"string"},{"name":"icon","type":"string"},{"name":"roles","type":"[string]"},{"name":"when","type":"SExpr"}]}}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_B7FCMQGT19D0MPTJXYCK1X96EC":{"id":"ent_B7FCMQGT19D0MPTJXYCK1X96EC","kind":"entity","bakedName":"PermissionGrant","curName":"PermissionGrant","renames":[],"owner":"workspace"},"evt_100H2TZKE1SQ0NBYRDQMTF2MST":{"id":"evt_100H2TZKE1SQ0NBYRDQMTF2MST","kind":"event","bakedName":"PermissionGrantSaveFailed","curName":"PermissionGrantSaveFailed","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_1SHDNSR8EJ479A6707DKFE1AB6":{"id":"evt_1SHDNSR8EJ479A6707DKFE1AB6","kind":"event","bakedName":"DO_DELETE","curName":"DO_DELETE","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT":{"id":"evt_4JPNRW7EH6Q8KC0R8B9P6BW5JT","kind":"event","bakedName":"EDIT","curName":"EDIT","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_6SKE4M7F8SQMCJBR8MWXY50SKB":{"id":"evt_6SKE4M7F8SQMCJBR8MWXY50SKB","kind":"event","bakedName":"GrantCheckFailed","curName":"GrantCheckFailed","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ":{"id":"evt_9Q2NMFCXCNEPAPETP2PQJK76NZ","kind":"event","bakedName":"PermissionGrantLoadFailed","curName":"PermissionGrantLoadFailed","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_C2MKDKCP82B41459P5GAHJAZYY":{"id":"evt_C2MKDKCP82B41459P5GAHJAZYY","kind":"event","bakedName":"GRANT_RESOLVED","curName":"GRANT_RESOLVED","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_HASK0ZHW7GY3R0EPKBY18SP96H":{"id":"evt_HASK0ZHW7GY3R0EPKBY18SP96H","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_HW2FQF4C9V64XKZ2VR29SXN02P":{"id":"evt_HW2FQF4C9V64XKZ2VR29SXN02P","kind":"event","bakedName":"PermissionGrantDeleteFailed","curName":"PermissionGrantDeleteFailed","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_KJJRX0825S12WH7CYQAFYDVR2J":{"id":"evt_KJJRX0825S12WH7CYQAFYDVR2J","kind":"event","bakedName":"DELETE","curName":"DELETE","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T":{"id":"evt_ME37M0BFHRQRWC7KSZ0R9DFC7T","kind":"event","bakedName":"DO_CREATE","curName":"DO_CREATE","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_P950MR5X6HYK8NQQR6HMS0V92T":{"id":"evt_P950MR5X6HYK8NQQR6HMS0V92T","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT":{"id":"evt_PFDT5XDQ1KVGSQF4X1G6P4CQMT","kind":"event","bakedName":"NEW","curName":"NEW","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_TN708VYY64F324117703KE0S67":{"id":"evt_TN708VYY64F324117703KE0S67","kind":"event","bakedName":"PermissionGrantLoaded","curName":"PermissionGrantLoaded","renames":[],"owner":"workspace","parent":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ"},"evt_V221SQHT9KX4SVYARWX8WWT480":{"id":"evt_V221SQHT9KX4SVYARWX8WWT480","kind":"event","bakedName":"PermissionGrantSaved","curName":"PermissionGrantSaved","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_YEGGC37PJRV9CBX15YRXXJWWS4":{"id":"evt_YEGGC37PJRV9CBX15YRXXJWWS4","kind":"event","bakedName":"CHECK_GRANT","curName":"CHECK_GRANT","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_YETC0VM21710KR580FGBQAS1J7":{"id":"evt_YETC0VM21710KR580FGBQAS1J7","kind":"event","bakedName":"DO_UPDATE","curName":"DO_UPDATE","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"evt_YWEKQET27813M2N2FC0PJDZQDA":{"id":"evt_YWEKQET27813M2N2FC0PJDZQDA","kind":"event","bakedName":"GrantCheckLoaded","curName":"GrantCheckLoaded","renames":[],"owner":"workspace","parent":"trt_51B3E9RK4G9J832SCN1RQE48PZ"},"evt_ZJN9VCCD556JJM2GWNYV1G1HFR":{"id":"evt_ZJN9VCCD556JJM2GWNYV1G1HFR","kind":"event","bakedName":"PermissionGrantDeleted","curName":"PermissionGrantDeleted","renames":[],"owner":"workspace","parent":"trt_Q37K23YFS47WJ4H2K1P86SJNVB"},"orb_YCP1MH9ZMPZTB79MDWVFCA43GB":{"id":"orb_YCP1MH9ZMPZTB79MDWVFCA43GB","kind":"orbital","bakedName":"PermissionMatrixOrbital","curName":"PermissionMatrixOrbital","renames":[],"owner":"workspace"},"pag_7J79DW7VG8XR42AFPXJP6VPDQJ":{"id":"pag_7J79DW7VG8XR42AFPXJP6VPDQJ","kind":"page","bakedName":"PermissionMatrixPage","curName":"PermissionMatrixPage","renames":[],"owner":"workspace"},"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS":{"id":"trt_2AN7JQFXHVYRXJQ0D4VEQF2MXS","kind":"trait","bakedName":"GrantDivider","curName":"GrantDivider","renames":[],"owner":"workspace"},"trt_51B3E9RK4G9J832SCN1RQE48PZ":{"id":"trt_51B3E9RK4G9J832SCN1RQE48PZ","kind":"trait","bakedName":"PermissionGrantQuery","curName":"PermissionGrantQuery","renames":[],"owner":"workspace"},"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ":{"id":"trt_BNHM5XRVQ4DVJ6MGPQQQEMKHYZ","kind":"trait","bakedName":"PermissionMatrixAdmin","curName":"PermissionMatrixAdmin","renames":[],"owner":"workspace"},"trt_G03XVFMATF5D7Z7KGFYYHHRMXA":{"id":"trt_G03XVFMATF5D7Z7KGFYYHHRMXA","kind":"trait","bakedName":"ErrorAlert","curName":"ErrorAlert","renames":[],"owner":"workspace"},"trt_GVXX88A6AM35AECBG1BBRCTH5J":{"id":"trt_GVXX88A6AM35AECBG1BBRCTH5J","kind":"trait","bakedName":"LoadingText","curName":"LoadingText","renames":[],"owner":"workspace"},"trt_HA0DSNAXMNETAJ8391GEGESVRQ":{"id":"trt_HA0DSNAXMNETAJ8391GEGESVRQ","kind":"trait","bakedName":"LoadingSpinner","curName":"LoadingSpinner","renames":[],"owner":"workspace"},"trt_MJT54JH8YRMFC6NCWREGW39JA6":{"id":"trt_MJT54JH8YRMFC6NCWREGW39JA6","kind":"trait","bakedName":"PermissionMatrixTitle","curName":"PermissionMatrixTitle","renames":[],"owner":"workspace"},"trt_Q37K23YFS47WJ4H2K1P86SJNVB":{"id":"trt_Q37K23YFS47WJ4H2K1P86SJNVB","kind":"trait","bakedName":"PermissionGrantPersistor","curName":"PermissionGrantPersistor","renames":[],"owner":"workspace"},"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS":{"id":"trt_RZHNSC56F5K7JKE6Z37WAS9ZJS","kind":"trait","bakedName":"PermissionGrantEdit","curName":"PermissionGrantEdit","renames":[],"owner":"workspace"},"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD":{"id":"trt_VDCYKQ0CXX6EYSHQXRNWPDN5VD","kind":"trait","bakedName":"ErrorSpinner","curName":"ErrorSpinner","renames":[],"owner":"workspace"},"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M":{"id":"trt_Y7D6Z2PZAGFN81JQ8S35VRVW7M","kind":"trait","bakedName":"ShieldCheckIcon","curName":"ShieldCheckIcon","renames":[],"owner":"workspace"},"trt_ZP35997MWCTE629K6WS8R8710P":{"id":"trt_ZP35997MWCTE629K6WS8R8710P","kind":"trait","bakedName":"PermissionGrantCreate","curName":"PermissionGrantCreate","renames":[],"owner":"workspace"}}}}
@@ -1 +1 @@
1
- {"name":"std-rate-limiter","version":"1.0.0","description":"std-rate-limiter as a Function","orbitals":[{"name":"RateBucketOrbital","id":"orb_C0ZA32BJ6RS3C92DJG1CYJEF10","uses":[{"from":"std/behaviors/ui-icon","as":"Icon"},{"from":"std/behaviors/ui-typography","as":"Typography"},{"from":"std/behaviors/ui-status-dot","as":"StatusDot"},{"from":"std/behaviors/ui-alert","as":"Alert"},{"from":"std/behaviors/ui-stat-display","as":"StatDisplay"},{"from":"std/behaviors/ui-meter","as":"Meter"},{"from":"std/behaviors/ui-progress-bar","as":"ProgressBar"},{"from":"std/behaviors/ui-button","as":"Button"},{"from":"std/behaviors/ui-divider","as":"Divider"},{"from":"std/behaviors/ui-simple-grid","as":"SimpleGrid"}],"entity":{"name":"RateBucket","id":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","persistence":"runtime","fields":[{"name":"id","type":"string"},{"name":"name","type":"string","description":"A user-defined identifier for the rate limiting bucket.","synonyms":"label, identifier, alias"},{"name":"description","type":"string","description":"A textual explanation of the rate bucket's purpose.","synonyms":"explanation, details, notes"},{"name":"status","type":"string","default":"active","values":["active","inactive","pending"],"description":"Current operational state of the rate limiting bucket.","synonyms":"state, condition, operationalStatus"},{"name":"createdAt","type":"string"},{"name":"count","type":"number","default":0,"description":"The current value of a counter.","synonyms":"value, amount, total"},{"name":"window","type":"number","default":0,"description":"The duration of the rate limiting window, in seconds.","synonyms":"duration, time, interval, period"},{"name":"limiterStatus","type":"string","default":"open","description":"Current operational state of the rate limiter.","synonyms":"state, condition, mode"},{"name":"limit","type":"number","default":60,"description":"Requests this bucket admits per window before it throttles; set from requestsPerMinute when the limiter mounts.","synonyms":"cap, quota, ceiling, maximum requests"}]},"traits":[{"ref":"Icon.traits.IconRender","id":"trt_2ZCKFSF6HRK8W9PWNYX886TXBY","name":"ShieldIcon","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"name":{"type":"unknown","default":"shield"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_AKFBZ126XR3EWEWT15B0DKXY56","name":"RateBucketTitle","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"variant":{"type":"unknown","default":"h2"},"content":{"type":"unknown","default":"RateBucket Rate Limiter"}}},{"ref":"StatusDot.traits.StatusDotRender","id":"trt_YCP5CBM30D1G6W67FZHHQ1T3R1","name":"OpenStatusDot","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"pulse":{"type":"unknown","default":false},"status":{"type":"unknown","default":"online"},"label":{"type":"unknown","default":"Open"}}},{"ref":"StatusDot.traits.StatusDotRender","id":"trt_WB61X9T02V01DXWSA6FR6C1K1S","name":"ThrottledStatusDot","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"pulse":{"type":"unknown","default":true},"label":{"type":"unknown","default":"Throttled"},"status":{"type":"unknown","default":"critical"}}},{"ref":"Alert.traits.AlertRender","id":"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV","name":"RateLimitAlert","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"variant":{"type":"unknown","default":"error"},"message":{"type":"unknown","default":"Rate limit exceeded. Requests are being throttled."}}},{"ref":"StatDisplay.traits.StatDisplayRender","id":"trt_28M7HXV8DFM6QVBJ5AF6PQY3PX","name":"RequestsStat","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"value":{"type":"unknown","default":"@entity.count"},"label":{"type":"unknown","default":"Requests"},"look":{"type":"unknown","default":"@config.statLook"}}},{"ref":"StatDisplay.traits.StatDisplayRender","id":"trt_9DH8N52V6JDK9EGM72RVA6VKZ0","name":"WindowStat","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"value":{"type":"unknown","default":"@entity.window"},"label":{"type":"unknown","default":"Window"},"look":{"type":"unknown","default":"@config.statLook"}}},{"ref":"Meter.traits.MeterRender","id":"trt_8KPER0HWSQYCVY9RE50591P4H7","name":"CountMeter","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"max":{"type":"unknown","default":"@entity.limit"},"min":{"type":"unknown","default":0},"value":{"type":"unknown","default":"@entity.count"}}},{"ref":"ProgressBar.traits.ProgressBarRender","id":"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ","name":"CountProgressBar","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"showPercentage":{"type":"unknown","default":true},"max":{"type":"unknown","default":"@entity.limit"},"value":{"type":"unknown","default":"@entity.count"}}},{"ref":"Button.traits.ButtonRender","id":"trt_EBZ31NDF78QKMBAY5K16FS75QZ","name":"RequestButton","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"icon":{"type":"unknown","default":"send"},"variant":{"type":"unknown","default":"primary"},"label":{"type":"unknown","default":"Request"},"action":{"type":"unknown","default":"REQUEST"}}},{"ref":"Button.traits.ButtonRender","id":"trt_BB474F27PN3VAN0HVJE9DWCBMJ","name":"ResetButton","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"label":{"type":"unknown","default":"Reset"},"action":{"type":"unknown","default":"RESET"},"variant":{"type":"unknown","default":"ghost"},"icon":{"type":"unknown","default":"rotate-ccw"}}},{"ref":"Button.traits.ButtonRender","id":"trt_SAW628PERT7CDA2ZZTP1V5RQFM","name":"ResetPrimaryButton","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"label":{"type":"unknown","default":"Reset"},"icon":{"type":"unknown","default":"rotate-ccw"},"action":{"type":"unknown","default":"RESET"},"variant":{"type":"unknown","default":"primary"}}},{"ref":"Divider.traits.DividerRender","id":"trt_P5HQ2XZ460J307SQM8NWNE1MVK","name":"RateBucketDivider","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2"},{"ref":"SimpleGrid.traits.SimpleGridRender","id":"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7","name":"StatsGrid","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"children":{"type":"unknown","default":["@trait.RequestsStat","@trait.WindowStat"]},"cols":{"type":"unknown","default":2}}},{"name":"RateBucketRateLimiter","id":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4","effectRow":[{"kind":"emit","resource":"WINDOW_ELAPSED","site":"tick"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.count"},{"kind":"set","resource":"@entity.limit"},{"kind":"set","resource":"@entity.limiterStatus"},{"kind":"set","resource":"@entity.window"},{"kind":"ticks","site":"tick"}],"category":"interaction","capabilities":["rate-limit"],"linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","entityRefIds":{"RateBucket":"ent_BGHMGBM69A34NA0KPEXD8AC5A2"},"traitEmbedIds":{"CountProgressBar":"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ","RateBucketTitle":"trt_AKFBZ126XR3EWEWT15B0DKXY56","ResetButton":"trt_BB474F27PN3VAN0HVJE9DWCBMJ","ThrottledStatusDot":"trt_WB61X9T02V01DXWSA6FR6C1K1S","RateLimitAlert":"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV","OpenStatusDot":"trt_YCP5CBM30D1G6W67FZHHQ1T3R1","ShieldIcon":"trt_2ZCKFSF6HRK8W9PWNYX886TXBY","RequestButton":"trt_EBZ31NDF78QKMBAY5K16FS75QZ","ResetPrimaryButton":"trt_SAW628PERT7CDA2ZZTP1V5RQFM","StatsGrid":"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7","CountMeter":"trt_8KPER0HWSQYCVY9RE50591P4H7","RateBucketDivider":"trt_P5HQ2XZ460J307SQM8NWNE1MVK"},"emits":[{"event":"WINDOW_ELAPSED","eventId":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","description":"One rate-limit window (a minute) has elapsed; the request count starts over.","scope":"internal"}],"stateMachine":{"states":[{"name":"open","isInitial":true},{"name":"throttled"}],"events":[{"key":"INIT","id":"evt_J3HDXYCBA25N13GEENSX3HHQAV","name":"Initialize"},{"key":"REQUEST","id":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","name":"Request"},{"key":"RESET","id":"evt_61W6W016SVKCXQ718D8VZ976RN","name":"Reset"},{"key":"WINDOW_ELAPSED","id":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","name":"Window Elapsed","description":"One rate-limit window (a minute) has elapsed; the request count starts over."},{"key":"CONFIGURE","id":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","name":"Configure","description":"Sets this bucket's limit (requests per window), e.g. from the host row's own rate limit.","payloadSchema":[{"name":"limit","type":"number"}],"listened":true}],"transitions":[{"from":"open","to":"open","event":"INIT","eventId":"evt_J3HDXYCBA25N13GEENSX3HHQAV","effects":[["set","@entity.count",0],["set","@entity.window",60],["set","@entity.limit","@config.requestsPerMinute"],["set","@entity.limiterStatus","open"],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"throttled","event":"REQUEST","eventId":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","guard":["and","@config.enabled",[">=",["+","@entity.count",1],"@entity.limit"]],"effects":[["set","@entity.count",["+","@entity.count",1]],["set","@entity.limiterStatus","throttled"],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.ThrottledStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.RateLimitAlert","@trait.StatsGrid","@trait.CountMeter",{"children":["@trait.ResetPrimaryButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"open","event":"REQUEST","eventId":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","guard":["and","@config.enabled",["<",["+","@entity.count",1],"@entity.limit"]],"effects":[["set","@entity.count",["+","@entity.count",1]],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"open","event":"RESET","eventId":"evt_61W6W016SVKCXQ718D8VZ976RN","effects":[["set","@entity.count",0],["set","@entity.limiterStatus","open"],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"open","event":"WINDOW_ELAPSED","eventId":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","effects":[["set","@entity.count",0]]},{"from":"open","to":"open","event":"CONFIGURE","eventId":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","effects":[["set","@entity.limit","@payload.limit"]]},{"from":"throttled","to":"throttled","event":"CONFIGURE","eventId":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","effects":[["set","@entity.limit","@payload.limit"]]},{"from":"throttled","to":"open","event":"WINDOW_ELAPSED","eventId":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","effects":[["set","@entity.limiterStatus","open"],["set","@entity.count",0],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"throttled","to":"open","event":"RESET","eventId":"evt_61W6W016SVKCXQ718D8VZ976RN","effects":[["set","@entity.limiterStatus","open"],["set","@entity.count",0],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"throttled","to":"throttled","event":"INIT","eventId":"evt_J3HDXYCBA25N13GEENSX3HHQAV","effects":[["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.ThrottledStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.RateLimitAlert","@trait.StatsGrid","@trait.CountMeter",{"children":["@trait.ResetPrimaryButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]}]},"ticks":[{"name":"windowElapsed","interval":60000,"effects":[["emit","WINDOW_ELAPSED"]]}],"config":{"requestsPerMinute":{"type":"number","default":60,"label":"Requests per minute","description":"Requests a bucket admits per one-minute window; the next request throttles it, and each elapsed minute (or RESET) reopens it.","synonyms":"rate limit, request cap, RPS, throttle threshold","tier":"domain"},"statLook":{"type":"string","default":"elevated","label":"Stat display look","description":"Layer 2 visual treatment for stat / KPI cards.","tier":"presentation","values":["elevated","flat","progress-backed","gauge","sparkline"]},"enabled":{"type":"boolean","default":false,"label":"Enabled","description":"Whether rate limiting is active for the host orbital. Off by default; turn on to throttle requests.","synonyms":"enable, turn on, enforce, require, activate, apply, switch on, rate limit, throttle, requests per minute, slow down, cap usage, request cap, limit traffic, prevent abuse","tier":"domain"}},"scope":"collection"}],"pages":[{"name":"RateBucketRateLimiterPage","id":"pag_CVW58X1R92W4HE0WVCMF39RQ28","path":"/ratebuckets/rate-limiter","traits":[{"ref":"RateBucketRateLimiter","refId":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"}]}]}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_BGHMGBM69A34NA0KPEXD8AC5A2":{"id":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","kind":"entity","bakedName":"RateBucket","curName":"RateBucket","renames":[],"owner":"workspace"},"evt_61W6W016SVKCXQ718D8VZ976RN":{"id":"evt_61W6W016SVKCXQ718D8VZ976RN","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_6DDPKEBSGYWRF6QCGC71Y53VZN":{"id":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","kind":"event","bakedName":"REQUEST","curName":"REQUEST","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_9ZWD7213VQHXVSS8G5PJNZTSPB":{"id":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","kind":"event","bakedName":"WINDOW_ELAPSED","curName":"WINDOW_ELAPSED","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_J3HDXYCBA25N13GEENSX3HHQAV":{"id":"evt_J3HDXYCBA25N13GEENSX3HHQAV","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_RMFGTBCDAT6NDE3970DP9BGEBK":{"id":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","kind":"event","bakedName":"CONFIGURE","curName":"CONFIGURE","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"orb_C0ZA32BJ6RS3C92DJG1CYJEF10":{"id":"orb_C0ZA32BJ6RS3C92DJG1CYJEF10","kind":"orbital","bakedName":"RateBucketOrbital","curName":"RateBucketOrbital","renames":[],"owner":"workspace"},"pag_CVW58X1R92W4HE0WVCMF39RQ28":{"id":"pag_CVW58X1R92W4HE0WVCMF39RQ28","kind":"page","bakedName":"RateBucketRateLimiterPage","curName":"RateBucketRateLimiterPage","renames":[],"owner":"workspace"},"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7":{"id":"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7","kind":"trait","bakedName":"StatsGrid","curName":"StatsGrid","renames":[],"owner":"workspace"},"trt_28M7HXV8DFM6QVBJ5AF6PQY3PX":{"id":"trt_28M7HXV8DFM6QVBJ5AF6PQY3PX","kind":"trait","bakedName":"RequestsStat","curName":"RequestsStat","renames":[],"owner":"workspace"},"trt_2ZCKFSF6HRK8W9PWNYX886TXBY":{"id":"trt_2ZCKFSF6HRK8W9PWNYX886TXBY","kind":"trait","bakedName":"ShieldIcon","curName":"ShieldIcon","renames":[],"owner":"workspace"},"trt_59XVQ0QZTRZXCCQCTEH3B33MA4":{"id":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4","kind":"trait","bakedName":"RateBucketRateLimiter","curName":"RateBucketRateLimiter","renames":[],"owner":"workspace"},"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ":{"id":"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ","kind":"trait","bakedName":"CountProgressBar","curName":"CountProgressBar","renames":[],"owner":"workspace"},"trt_8KPER0HWSQYCVY9RE50591P4H7":{"id":"trt_8KPER0HWSQYCVY9RE50591P4H7","kind":"trait","bakedName":"CountMeter","curName":"CountMeter","renames":[],"owner":"workspace"},"trt_9DH8N52V6JDK9EGM72RVA6VKZ0":{"id":"trt_9DH8N52V6JDK9EGM72RVA6VKZ0","kind":"trait","bakedName":"WindowStat","curName":"WindowStat","renames":[],"owner":"workspace"},"trt_AKFBZ126XR3EWEWT15B0DKXY56":{"id":"trt_AKFBZ126XR3EWEWT15B0DKXY56","kind":"trait","bakedName":"RateBucketTitle","curName":"RateBucketTitle","renames":[],"owner":"workspace"},"trt_BB474F27PN3VAN0HVJE9DWCBMJ":{"id":"trt_BB474F27PN3VAN0HVJE9DWCBMJ","kind":"trait","bakedName":"ResetButton","curName":"ResetButton","renames":[],"owner":"workspace"},"trt_EBZ31NDF78QKMBAY5K16FS75QZ":{"id":"trt_EBZ31NDF78QKMBAY5K16FS75QZ","kind":"trait","bakedName":"RequestButton","curName":"RequestButton","renames":[],"owner":"workspace"},"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV":{"id":"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV","kind":"trait","bakedName":"RateLimitAlert","curName":"RateLimitAlert","renames":[],"owner":"workspace"},"trt_P5HQ2XZ460J307SQM8NWNE1MVK":{"id":"trt_P5HQ2XZ460J307SQM8NWNE1MVK","kind":"trait","bakedName":"RateBucketDivider","curName":"RateBucketDivider","renames":[],"owner":"workspace"},"trt_SAW628PERT7CDA2ZZTP1V5RQFM":{"id":"trt_SAW628PERT7CDA2ZZTP1V5RQFM","kind":"trait","bakedName":"ResetPrimaryButton","curName":"ResetPrimaryButton","renames":[],"owner":"workspace"},"trt_WB61X9T02V01DXWSA6FR6C1K1S":{"id":"trt_WB61X9T02V01DXWSA6FR6C1K1S","kind":"trait","bakedName":"ThrottledStatusDot","curName":"ThrottledStatusDot","renames":[],"owner":"workspace"},"trt_YCP5CBM30D1G6W67FZHHQ1T3R1":{"id":"trt_YCP5CBM30D1G6W67FZHHQ1T3R1","kind":"trait","bakedName":"OpenStatusDot","curName":"OpenStatusDot","renames":[],"owner":"workspace"}}}}
1
+ {"name":"std-rate-limiter","version":"1.0.0","description":"std-rate-limiter as a Function","orbitals":[{"name":"RateBucketOrbital","id":"orb_C0ZA32BJ6RS3C92DJG1CYJEF10","uses":[{"from":"std/behaviors/ui-icon","as":"Icon"},{"from":"std/behaviors/ui-typography","as":"Typography"},{"from":"std/behaviors/ui-status-dot","as":"StatusDot"},{"from":"std/behaviors/ui-alert","as":"Alert"},{"from":"std/behaviors/ui-stat-display","as":"StatDisplay"},{"from":"std/behaviors/ui-meter","as":"Meter"},{"from":"std/behaviors/ui-progress-bar","as":"ProgressBar"},{"from":"std/behaviors/ui-button","as":"Button"},{"from":"std/behaviors/ui-divider","as":"Divider"},{"from":"std/behaviors/ui-simple-grid","as":"SimpleGrid"}],"entity":{"name":"RateBucket","id":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","persistence":"runtime","fields":[{"name":"id","type":"string"},{"name":"name","type":"string","description":"A user-defined identifier for the rate limiting bucket.","synonyms":"label, identifier, alias"},{"name":"description","type":"string","description":"A textual explanation of the rate bucket's purpose.","synonyms":"explanation, details, notes"},{"name":"status","type":"string","default":"active","values":["active","inactive","pending"],"description":"Current operational state of the rate limiting bucket.","synonyms":"state, condition, operationalStatus"},{"name":"createdAt","type":"string"},{"name":"count","type":"number","default":0,"description":"The current value of a counter.","synonyms":"value, amount, total"},{"name":"window","type":"number","default":0,"description":"The duration of the rate limiting window, in seconds.","synonyms":"duration, time, interval, period"},{"name":"limiterStatus","type":"string","default":"open","description":"Current operational state of the rate limiter.","synonyms":"state, condition, mode"},{"name":"limit","type":"number","default":60,"description":"Requests this bucket admits per window before it throttles; set from requestsPerMinute when the limiter mounts.","synonyms":"cap, quota, ceiling, maximum requests"}]},"traits":[{"ref":"Icon.traits.IconRender","id":"trt_2ZCKFSF6HRK8W9PWNYX886TXBY","name":"ShieldIcon","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"name":{"type":"unknown","default":"shield"}}},{"ref":"Typography.traits.TypographyRender","id":"trt_AKFBZ126XR3EWEWT15B0DKXY56","name":"RateBucketTitle","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"content":{"type":"unknown","default":"RateBucket Rate Limiter"},"variant":{"type":"unknown","default":"h2"}}},{"ref":"StatusDot.traits.StatusDotRender","id":"trt_YCP5CBM30D1G6W67FZHHQ1T3R1","name":"OpenStatusDot","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"status":{"type":"unknown","default":"online"},"pulse":{"type":"unknown","default":false},"label":{"type":"unknown","default":"Open"}}},{"ref":"StatusDot.traits.StatusDotRender","id":"trt_WB61X9T02V01DXWSA6FR6C1K1S","name":"ThrottledStatusDot","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"status":{"type":"unknown","default":"critical"},"pulse":{"type":"unknown","default":true},"label":{"type":"unknown","default":"Throttled"}}},{"ref":"Alert.traits.AlertRender","id":"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV","name":"RateLimitAlert","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"message":{"type":"unknown","default":"Rate limit exceeded. Requests are being throttled."},"variant":{"type":"unknown","default":"error"}}},{"ref":"StatDisplay.traits.StatDisplayRender","id":"trt_28M7HXV8DFM6QVBJ5AF6PQY3PX","name":"RequestsStat","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"label":{"type":"unknown","default":"Requests"},"look":{"type":"unknown","default":"@config.statLook"},"value":{"type":"unknown","default":"@entity.count"}}},{"ref":"StatDisplay.traits.StatDisplayRender","id":"trt_9DH8N52V6JDK9EGM72RVA6VKZ0","name":"WindowStat","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"value":{"type":"unknown","default":"@entity.window"},"label":{"type":"unknown","default":"Window"},"look":{"type":"unknown","default":"@config.statLook"}}},{"ref":"Meter.traits.MeterRender","id":"trt_8KPER0HWSQYCVY9RE50591P4H7","name":"CountMeter","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"min":{"type":"unknown","default":0},"max":{"type":"unknown","default":"@entity.limit"},"value":{"type":"unknown","default":"@entity.count"}}},{"ref":"ProgressBar.traits.ProgressBarRender","id":"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ","name":"CountProgressBar","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"max":{"type":"unknown","default":"@entity.limit"},"showPercentage":{"type":"unknown","default":true},"value":{"type":"unknown","default":"@entity.count"}}},{"ref":"Button.traits.ButtonRender","id":"trt_EBZ31NDF78QKMBAY5K16FS75QZ","name":"RequestButton","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"icon":{"type":"unknown","default":"send"},"label":{"type":"unknown","default":"Request"},"action":{"type":"unknown","default":"REQUEST"},"variant":{"type":"unknown","default":"primary"}}},{"ref":"Button.traits.ButtonRender","id":"trt_BB474F27PN3VAN0HVJE9DWCBMJ","name":"ResetButton","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"label":{"type":"unknown","default":"Reset"},"variant":{"type":"unknown","default":"ghost"},"icon":{"type":"unknown","default":"rotate-ccw"},"action":{"type":"unknown","default":"RESET"}}},{"ref":"Button.traits.ButtonRender","id":"trt_SAW628PERT7CDA2ZZTP1V5RQFM","name":"ResetPrimaryButton","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"icon":{"type":"unknown","default":"rotate-ccw"},"action":{"type":"unknown","default":"RESET"},"label":{"type":"unknown","default":"Reset"},"variant":{"type":"unknown","default":"primary"}}},{"ref":"Divider.traits.DividerRender","id":"trt_P5HQ2XZ460J307SQM8NWNE1MVK","name":"RateBucketDivider","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2"},{"ref":"SimpleGrid.traits.SimpleGridRender","id":"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7","name":"StatsGrid","linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","config":{"cols":{"type":"unknown","default":2},"children":{"type":"unknown","default":["@trait.RequestsStat","@trait.WindowStat"]}}},{"name":"RateBucketRateLimiter","id":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4","effectRow":[{"kind":"emit","resource":"WINDOW_ELAPSED","site":"tick"},{"kind":"render-ui","resource":"main"},{"kind":"set","resource":"@entity.count"},{"kind":"set","resource":"@entity.limit"},{"kind":"set","resource":"@entity.limiterStatus"},{"kind":"set","resource":"@entity.window"},{"kind":"ticks","site":"tick"}],"category":"interaction","capabilities":["rate-limit"],"linkedEntity":"RateBucket","linkedEntityId":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","entityRefIds":{"RateBucket":"ent_BGHMGBM69A34NA0KPEXD8AC5A2"},"traitEmbedIds":{"RateBucketDivider":"trt_P5HQ2XZ460J307SQM8NWNE1MVK","ShieldIcon":"trt_2ZCKFSF6HRK8W9PWNYX886TXBY","RateLimitAlert":"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV","StatsGrid":"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7","CountMeter":"trt_8KPER0HWSQYCVY9RE50591P4H7","OpenStatusDot":"trt_YCP5CBM30D1G6W67FZHHQ1T3R1","CountProgressBar":"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ","RateBucketTitle":"trt_AKFBZ126XR3EWEWT15B0DKXY56","ThrottledStatusDot":"trt_WB61X9T02V01DXWSA6FR6C1K1S","ResetButton":"trt_BB474F27PN3VAN0HVJE9DWCBMJ","ResetPrimaryButton":"trt_SAW628PERT7CDA2ZZTP1V5RQFM","RequestButton":"trt_EBZ31NDF78QKMBAY5K16FS75QZ"},"emits":[{"event":"WINDOW_ELAPSED","eventId":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","description":"One rate-limit window (a minute) has elapsed; the request count starts over.","scope":"internal"}],"stateMachine":{"states":[{"name":"open","isInitial":true},{"name":"throttled"}],"events":[{"key":"INIT","id":"evt_J3HDXYCBA25N13GEENSX3HHQAV","name":"Initialize"},{"key":"REQUEST","id":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","name":"Request"},{"key":"RESET","id":"evt_61W6W016SVKCXQ718D8VZ976RN","name":"Reset"},{"key":"WINDOW_ELAPSED","id":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","name":"Window Elapsed","description":"One rate-limit window (a minute) has elapsed; the request count starts over."},{"key":"CONFIGURE","id":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","name":"Configure","description":"Sets this bucket's limit (requests per window), e.g. from the host row's own rate limit.","payloadSchema":[{"name":"limit","type":"number"}],"listened":true}],"transitions":[{"from":"open","to":"open","event":"INIT","eventId":"evt_J3HDXYCBA25N13GEENSX3HHQAV","effects":[["set","@entity.count",0],["set","@entity.window",60],["set","@entity.limit","@config.requestsPerMinute"],["set","@entity.limiterStatus","open"],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"throttled","event":"REQUEST","eventId":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","guard":["and","@config.enabled",[">=",["+","@entity.count",1],"@entity.limit"]],"effects":[["set","@entity.count",["+","@entity.count",1]],["set","@entity.limiterStatus","throttled"],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.ThrottledStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.RateLimitAlert","@trait.StatsGrid","@trait.CountMeter",{"children":["@trait.ResetPrimaryButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"open","event":"REQUEST","eventId":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","guard":["and","@config.enabled",["<",["+","@entity.count",1],"@entity.limit"]],"effects":[["set","@entity.count",["+","@entity.count",1]],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"open","event":"RESET","eventId":"evt_61W6W016SVKCXQ718D8VZ976RN","effects":[["set","@entity.count",0],["set","@entity.limiterStatus","open"],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"open","to":"open","event":"WINDOW_ELAPSED","eventId":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","effects":[["set","@entity.count",0]]},{"from":"open","to":"open","event":"CONFIGURE","eventId":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","effects":[["set","@entity.limit","@payload.limit"]]},{"from":"throttled","to":"throttled","event":"CONFIGURE","eventId":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","effects":[["set","@entity.limit","@payload.limit"]]},{"from":"throttled","to":"open","event":"WINDOW_ELAPSED","eventId":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","effects":[["set","@entity.limiterStatus","open"],["set","@entity.count",0],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"throttled","to":"open","event":"RESET","eventId":"evt_61W6W016SVKCXQ718D8VZ976RN","effects":[["set","@entity.limiterStatus","open"],["set","@entity.count",0],["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.OpenStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.StatsGrid","@trait.CountMeter","@trait.CountProgressBar",{"children":["@trait.RequestButton","@trait.ResetButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]},{"from":"throttled","to":"throttled","event":"INIT","eventId":"evt_J3HDXYCBA25N13GEENSX3HHQAV","effects":[["render-ui","main",{"children":[{"align":"center","children":[{"align":"center","children":["@trait.ShieldIcon","@trait.RateBucketTitle"],"direction":"horizontal","gap":"md","type":"stack"},"@trait.ThrottledStatusDot"],"direction":"horizontal","gap":"md","justify":"between","type":"stack"},"@trait.RateBucketDivider","@trait.RateLimitAlert","@trait.StatsGrid","@trait.CountMeter",{"children":["@trait.ResetPrimaryButton"],"direction":"horizontal","gap":"sm","justify":"center","type":"stack"}],"direction":"vertical","gap":"lg","type":"stack"}]]}]},"ticks":[{"name":"windowElapsed","interval":60000,"effects":[["emit","WINDOW_ELAPSED"]]}],"config":{"statLook":{"type":"string","default":"elevated","label":"Stat display look","description":"Layer 2 visual treatment for stat / KPI cards.","tier":"presentation","values":["elevated","flat","progress-backed","gauge","sparkline"]},"requestsPerMinute":{"type":"number","default":60,"label":"Requests per minute","description":"Requests a bucket admits per one-minute window; the next request throttles it, and each elapsed minute (or RESET) reopens it.","synonyms":"rate limit, request cap, RPS, throttle threshold","tier":"domain"},"enabled":{"type":"boolean","default":false,"label":"Enabled","description":"Whether rate limiting is active for the host orbital. Off by default; turn on to throttle requests.","synonyms":"enable, turn on, enforce, require, activate, apply, switch on, rate limit, throttle, requests per minute, slow down, cap usage, request cap, limit traffic, prevent abuse","tier":"domain"}},"scope":"collection"}],"pages":[{"name":"RateBucketRateLimiterPage","id":"pag_CVW58X1R92W4HE0WVCMF39RQ28","path":"/ratebuckets/rate-limiter","traits":[{"ref":"RateBucketRateLimiter","refId":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"}]}]}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_BGHMGBM69A34NA0KPEXD8AC5A2":{"id":"ent_BGHMGBM69A34NA0KPEXD8AC5A2","kind":"entity","bakedName":"RateBucket","curName":"RateBucket","renames":[],"owner":"workspace"},"evt_61W6W016SVKCXQ718D8VZ976RN":{"id":"evt_61W6W016SVKCXQ718D8VZ976RN","kind":"event","bakedName":"RESET","curName":"RESET","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_6DDPKEBSGYWRF6QCGC71Y53VZN":{"id":"evt_6DDPKEBSGYWRF6QCGC71Y53VZN","kind":"event","bakedName":"REQUEST","curName":"REQUEST","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_9ZWD7213VQHXVSS8G5PJNZTSPB":{"id":"evt_9ZWD7213VQHXVSS8G5PJNZTSPB","kind":"event","bakedName":"WINDOW_ELAPSED","curName":"WINDOW_ELAPSED","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_J3HDXYCBA25N13GEENSX3HHQAV":{"id":"evt_J3HDXYCBA25N13GEENSX3HHQAV","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"evt_RMFGTBCDAT6NDE3970DP9BGEBK":{"id":"evt_RMFGTBCDAT6NDE3970DP9BGEBK","kind":"event","bakedName":"CONFIGURE","curName":"CONFIGURE","renames":[],"owner":"workspace","parent":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4"},"orb_C0ZA32BJ6RS3C92DJG1CYJEF10":{"id":"orb_C0ZA32BJ6RS3C92DJG1CYJEF10","kind":"orbital","bakedName":"RateBucketOrbital","curName":"RateBucketOrbital","renames":[],"owner":"workspace"},"pag_CVW58X1R92W4HE0WVCMF39RQ28":{"id":"pag_CVW58X1R92W4HE0WVCMF39RQ28","kind":"page","bakedName":"RateBucketRateLimiterPage","curName":"RateBucketRateLimiterPage","renames":[],"owner":"workspace"},"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7":{"id":"trt_0VR5AWHRP3WB1TYY7WV6FB64Q7","kind":"trait","bakedName":"StatsGrid","curName":"StatsGrid","renames":[],"owner":"workspace"},"trt_28M7HXV8DFM6QVBJ5AF6PQY3PX":{"id":"trt_28M7HXV8DFM6QVBJ5AF6PQY3PX","kind":"trait","bakedName":"RequestsStat","curName":"RequestsStat","renames":[],"owner":"workspace"},"trt_2ZCKFSF6HRK8W9PWNYX886TXBY":{"id":"trt_2ZCKFSF6HRK8W9PWNYX886TXBY","kind":"trait","bakedName":"ShieldIcon","curName":"ShieldIcon","renames":[],"owner":"workspace"},"trt_59XVQ0QZTRZXCCQCTEH3B33MA4":{"id":"trt_59XVQ0QZTRZXCCQCTEH3B33MA4","kind":"trait","bakedName":"RateBucketRateLimiter","curName":"RateBucketRateLimiter","renames":[],"owner":"workspace"},"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ":{"id":"trt_7NVB5GG9VF4XQH9BAEXDNQ7XRQ","kind":"trait","bakedName":"CountProgressBar","curName":"CountProgressBar","renames":[],"owner":"workspace"},"trt_8KPER0HWSQYCVY9RE50591P4H7":{"id":"trt_8KPER0HWSQYCVY9RE50591P4H7","kind":"trait","bakedName":"CountMeter","curName":"CountMeter","renames":[],"owner":"workspace"},"trt_9DH8N52V6JDK9EGM72RVA6VKZ0":{"id":"trt_9DH8N52V6JDK9EGM72RVA6VKZ0","kind":"trait","bakedName":"WindowStat","curName":"WindowStat","renames":[],"owner":"workspace"},"trt_AKFBZ126XR3EWEWT15B0DKXY56":{"id":"trt_AKFBZ126XR3EWEWT15B0DKXY56","kind":"trait","bakedName":"RateBucketTitle","curName":"RateBucketTitle","renames":[],"owner":"workspace"},"trt_BB474F27PN3VAN0HVJE9DWCBMJ":{"id":"trt_BB474F27PN3VAN0HVJE9DWCBMJ","kind":"trait","bakedName":"ResetButton","curName":"ResetButton","renames":[],"owner":"workspace"},"trt_EBZ31NDF78QKMBAY5K16FS75QZ":{"id":"trt_EBZ31NDF78QKMBAY5K16FS75QZ","kind":"trait","bakedName":"RequestButton","curName":"RequestButton","renames":[],"owner":"workspace"},"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV":{"id":"trt_H4BAE9XZ2QZHBS9BJFRYSREYGV","kind":"trait","bakedName":"RateLimitAlert","curName":"RateLimitAlert","renames":[],"owner":"workspace"},"trt_P5HQ2XZ460J307SQM8NWNE1MVK":{"id":"trt_P5HQ2XZ460J307SQM8NWNE1MVK","kind":"trait","bakedName":"RateBucketDivider","curName":"RateBucketDivider","renames":[],"owner":"workspace"},"trt_SAW628PERT7CDA2ZZTP1V5RQFM":{"id":"trt_SAW628PERT7CDA2ZZTP1V5RQFM","kind":"trait","bakedName":"ResetPrimaryButton","curName":"ResetPrimaryButton","renames":[],"owner":"workspace"},"trt_WB61X9T02V01DXWSA6FR6C1K1S":{"id":"trt_WB61X9T02V01DXWSA6FR6C1K1S","kind":"trait","bakedName":"ThrottledStatusDot","curName":"ThrottledStatusDot","renames":[],"owner":"workspace"},"trt_YCP5CBM30D1G6W67FZHHQ1T3R1":{"id":"trt_YCP5CBM30D1G6W67FZHHQ1T3R1","kind":"trait","bakedName":"OpenStatusDot","curName":"OpenStatusDot","renames":[],"owner":"workspace"}}}}
@@ -1 +1 @@
1
- {"name":"std-reminder-scheduler","version":"1.1.0","description":"std-reminder-scheduler — deadline reminders for a target entity. A periodic tick scans the target for records whose `dateField` deadline (a ms-epoch number or an ISO datetime string) is within `offsetHours` of now and that have not been reminded yet, and emits `ReminderDue` for each — every matching record, via a self-driving scan loop. `direction` picks which side of now the scan matches: 'future' (default) fires for deadlines up to `offsetHours` ahead; 'past' fires once a record's date is at least `offsetHours` behind now. Marks each record `remindedAt` so it isn't reminded twice — and only when the record actually matched the scan, so records outside the window stay eligible for later passes. Compose alongside std-notify-on-event to deliver the reminder.","orbitals":[{"name":"ReminderSchedulerOrbital","id":"orb_6ZVJ0PFM7HT3RR40BZM02K4EM7","entity":{"name":"ReminderRunLog","id":"ent_68ASJ8J2J5192GV607C9Q6VMCW","collection":"reminder_runs","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"targetEntity","type":"string","default":"","description":"The entity to which the reminder applies.","synonyms":"subject, referenced entity, related object"},{"name":"recordCount","type":"number","default":0,"description":"The number of records processed during this run.","synonyms":"count, total, size"},{"name":"ranAt","type":"number","default":0,"description":"Timestamp indicating when the process was executed.","synonyms":"execution time, timestamp, run time"},{"name":"errors","type":"string","default":"","description":"Records any errors encountered during processing.","synonyms":"error, problem, fault"},{"name":"dueAt","type":"number","default":0,"description":"Deadline timestamp (also lets the standalone default target validate).","synonyms":"deadline, due, expiry"},{"name":"remindedAt","type":"number","default":0,"description":"When this record was last reminded — the dedup marker; 0 = not yet reminded.","synonyms":"notified at, last reminder"},{"name":"headId","type":"string","default":"","description":"Scratch: id of the record the scan loop is currently reminding.","synonyms":"current id, cursor"}]},"traits":[{"name":"ReminderScheduler","id":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK","entityRebindable":true,"entityContract":{"requires":[],"provides":["headId"]},"effectRow":[{"kind":"emit","resource":"ReminderDue"},{"kind":"fetch","resource":"@config.targetEntity","resolved":false},{"kind":"fetch","resource":"@config.targetEntity","resolved":false,"site":"tick"},{"kind":"persist","resource":"@config.targetEntity","resolved":false},{"kind":"render-ui","resource":"toast"},{"kind":"set","resource":"@entity.headId"},{"kind":"ticks","site":"tick"}],"category":"lifecycle","linkedEntity":"ReminderRunLog","linkedEntityId":"ent_68ASJ8J2J5192GV607C9Q6VMCW","entityRefIds":{"ReminderRunLog":"ent_68ASJ8J2J5192GV607C9Q6VMCW"},"emits":[{"event":"ReminderDue","eventId":"evt_STS3GYE76Q3KBP1VA54J9SG50Z","scope":"external","payloadSchema":[{"name":"entityId","type":"string"},{"name":"severity","type":"string"},{"name":"template","type":"string"}]},{"event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","payloadSchema":[{"name":"data","type":"[@entity(targetEntity)]"}]},{"event":"ScanFailed","eventId":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"event":"ReminderStepped","eventId":"evt_7305B7G0F407JBZ9NC62Q6NC86","payloadSchema":[{"name":"id","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true},{"name":"scanning"}],"events":[{"key":"INIT","id":"evt_NKSTNTX7V4KXJEPZACF2RGN436","name":"Initialize"},{"key":"ScanRecordsLoaded","id":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","name":"Scan records loaded","payloadSchema":[{"name":"data","type":"[@entity(targetEntity)]"}],"listened":true},{"key":"ScanFailed","id":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","name":"Scan failed","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}],"listened":true},{"key":"ReminderStepped","id":"evt_7305B7G0F407JBZ9NC62Q6NC86","name":"Reminder stepped","payloadSchema":[{"name":"id","type":"string"}],"listened":true},{"key":"ReminderDue","id":"evt_STS3GYE76Q3KBP1VA54J9SG50Z","name":"Reminder due","payloadSchema":[{"name":"entityId","type":"string"},{"name":"severity","type":"string"},{"name":"template","type":"string"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_NKSTNTX7V4KXJEPZACF2RGN436"},{"from":"idle","to":"scanning","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["and","@config.enabled",[">",["array/len","@payload.data"],0]],"effects":[["set","@entity.headId",["object/get",["array/first","@payload.data"],"id"]],["emit","ReminderDue",{"entityId":"@entity.headId","severity":"@config.severity","template":"@config.template"}],["persist","update","@config.targetEntity",{"id":"@entity.headId","remindedAt":"@now"},{"emit":{"failure":"ScanFailed","success":"ReminderStepped"}}]]},{"from":"idle","to":"idle","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["=",["array/len","@payload.data"],0]},{"from":"idle","to":"idle","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["=","@config.enabled",false]},{"from":"idle","to":"idle","event":"ScanFailed","eventId":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't scan for reminders — ","@payload.error"],"dismissible":true}]]},{"from":"scanning","to":"idle","event":"INIT","eventId":"evt_NKSTNTX7V4KXJEPZACF2RGN436"},{"from":"scanning","to":"scanning","event":"ReminderStepped","eventId":"evt_7305B7G0F407JBZ9NC62Q6NC86","effects":[["fetch","@config.targetEntity",{"emit":{"failure":"ScanFailed","success":"ScanRecordsLoaded"},"filter":["and",["=",["object/get","@entity","remindedAt"],0],["or",["and",["=","@config.direction","future"],[">",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["<",["-",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["*","@config.offsetHours",3600000]]],["and",["=","@config.direction","past"],[">",["-","@now",["time/parse",["object/get","@entity","@config.dateField"]]],["*","@config.offsetHours",3600000]]]]]}]]},{"from":"scanning","to":"scanning","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":[">",["array/len","@payload.data"],0],"effects":[["set","@entity.headId",["object/get",["array/first","@payload.data"],"id"]],["emit","ReminderDue",{"entityId":"@entity.headId","severity":"@config.severity","template":"@config.template"}],["persist","update","@config.targetEntity",{"id":"@entity.headId","remindedAt":"@now"},{"emit":{"failure":"ScanFailed","success":"ReminderStepped"}}]]},{"from":"scanning","to":"idle","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["=",["array/len","@payload.data"],0]},{"from":"scanning","to":"idle","event":"ScanFailed","eventId":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't scan for reminders — ","@payload.error"],"dismissible":true}]]}]},"ticks":[{"name":"scanCycle","interval":"*/15 * * * *","effects":[["fetch","@config.targetEntity",{"emit":{"failure":"ScanFailed","success":"ScanRecordsLoaded"},"filter":["and",["=",["object/get","@entity","remindedAt"],0],["or",["and",["=","@config.direction","future"],[">",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["<",["-",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["*","@config.offsetHours",3600000]]],["and",["=","@config.direction","past"],[">",["-","@now",["time/parse",["object/get","@entity","@config.dateField"]]],["*","@config.offsetHours",3600000]]]]]}]],"runsInBackground":true}],"config":{"dateField":{"type":"string","default":"dueAt","label":"Which date field is the deadline?","description":"Field on the target entity holding the deadline (e.g. 'dueAt', 'startsAt'). Accepts a ms-epoch number or an ISO datetime string; both are coerced to ms-epoch for comparison.","synonyms":"due date field, timestamp field, cutoff field, expiry field, when it's due","tier":"internal"},"direction":{"type":"string","default":"future","label":"Scan which side of now?","description":"'future' (default) matches records whose dateField is still ahead, up to offsetHours out — upcoming-deadline reminders. 'past' matches records whose dateField is at least offsetHours behind now — act-after-the-fact policies. The emitted event and the dedup marker are identical either way.","synonyms":"direction, past due, overdue, after the deadline, look back, backward scan, past-window","tier":"infra","values":["future","past"]},"severity":{"type":"string","default":"info","label":"How urgent are the reminders?","description":"Severity passed to the notifier: info / warning / error.","synonyms":"urgency level, priority, importance, alert level, how urgent","tier":"infra"},"offsetHours":{"type":"number","default":24,"label":"How many hours before the deadline to remind?","description":"A reminder fires once the deadline is within this many hours of now.","synonyms":"advance notice, lead time, heads up, early warning hours, how far ahead","tier":"infra"},"template":{"type":"string","default":"","label":"What should the reminder message say?","description":"Message body passed to the notifier.","synonyms":"message text, reminder body, notification copy, alert message, what to say","tier":"presentation"},"targetEntity":{"type":"entity","default":"ReminderRunLog","label":"Target entity","description":"Entity to scan for upcoming deadlines (e.g. 'Task', 'ClassSession'). Defaults to the atom's own log so the standalone validates; rebind per composition. Typed `entity`, so a rename of the bound entity threads through to this value automatically.","synonyms":"entity to monitor, entity to watch, record type, object type","tier":"internal","refId":"ent_68ASJ8J2J5192GV607C9Q6VMCW"},"enabled":{"type":"boolean","default":false,"label":"Send deadline reminders","description":"Automatically remind about upcoming deadlines. Off by default.","synonyms":"enable, turn on, activate, switch on, reminders, deadline reminders, due-date reminders, advance notice, heads up, nudge before due","tier":"infra"}},"scope":"instance"}],"pages":[{"name":"ReminderSchedulerPage","id":"pag_TJNBFPKZN0ZTGD8V08CAGSB434","path":"/reminders/scheduler","traits":[{"ref":"ReminderScheduler","refId":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"}]}]}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_68ASJ8J2J5192GV607C9Q6VMCW":{"id":"ent_68ASJ8J2J5192GV607C9Q6VMCW","kind":"entity","bakedName":"ReminderRunLog","curName":"ReminderRunLog","renames":[],"owner":"workspace"},"evt_7305B7G0F407JBZ9NC62Q6NC86":{"id":"evt_7305B7G0F407JBZ9NC62Q6NC86","kind":"event","bakedName":"ReminderStepped","curName":"ReminderStepped","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_NKSTNTX7V4KXJEPZACF2RGN436":{"id":"evt_NKSTNTX7V4KXJEPZACF2RGN436","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_P2S2STQNWGTY88TXCSKSVQCSGG":{"id":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","kind":"event","bakedName":"ScanRecordsLoaded","curName":"ScanRecordsLoaded","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_QBZYC4PPYSBFCP0XCA1TASDT93":{"id":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","kind":"event","bakedName":"ScanFailed","curName":"ScanFailed","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_STS3GYE76Q3KBP1VA54J9SG50Z":{"id":"evt_STS3GYE76Q3KBP1VA54J9SG50Z","kind":"event","bakedName":"ReminderDue","curName":"ReminderDue","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"orb_6ZVJ0PFM7HT3RR40BZM02K4EM7":{"id":"orb_6ZVJ0PFM7HT3RR40BZM02K4EM7","kind":"orbital","bakedName":"ReminderSchedulerOrbital","curName":"ReminderSchedulerOrbital","renames":[],"owner":"workspace"},"pag_TJNBFPKZN0ZTGD8V08CAGSB434":{"id":"pag_TJNBFPKZN0ZTGD8V08CAGSB434","kind":"page","bakedName":"ReminderSchedulerPage","curName":"ReminderSchedulerPage","renames":[],"owner":"workspace"},"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK":{"id":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK","kind":"trait","bakedName":"ReminderScheduler","curName":"ReminderScheduler","renames":[],"owner":"workspace"}}}}
1
+ {"name":"std-reminder-scheduler","version":"1.1.0","description":"std-reminder-scheduler — deadline reminders for a target entity. A periodic tick scans the target for records whose `dateField` deadline (a ms-epoch number or an ISO datetime string) is within `offsetHours` of now and that have not been reminded yet, and emits `ReminderDue` for each — every matching record, via a self-driving scan loop. `direction` picks which side of now the scan matches: 'future' (default) fires for deadlines up to `offsetHours` ahead; 'past' fires once a record's date is at least `offsetHours` behind now. Marks each record `remindedAt` so it isn't reminded twice — and only when the record actually matched the scan, so records outside the window stay eligible for later passes. Compose alongside std-notify-on-event to deliver the reminder.","orbitals":[{"name":"ReminderSchedulerOrbital","id":"orb_6ZVJ0PFM7HT3RR40BZM02K4EM7","entity":{"name":"ReminderRunLog","id":"ent_68ASJ8J2J5192GV607C9Q6VMCW","collection":"reminder_runs","persistence":"persistent","fields":[{"name":"id","type":"string","required":true},{"name":"targetEntity","type":"string","default":"","description":"The entity to which the reminder applies.","synonyms":"subject, referenced entity, related object"},{"name":"recordCount","type":"number","default":0,"description":"The number of records processed during this run.","synonyms":"count, total, size"},{"name":"ranAt","type":"number","default":0,"description":"Timestamp indicating when the process was executed.","synonyms":"execution time, timestamp, run time"},{"name":"errors","type":"string","default":"","description":"Records any errors encountered during processing.","synonyms":"error, problem, fault"},{"name":"dueAt","type":"number","default":0,"description":"Deadline timestamp (also lets the standalone default target validate).","synonyms":"deadline, due, expiry"},{"name":"remindedAt","type":"number","default":0,"description":"When this record was last reminded — the dedup marker; 0 = not yet reminded.","synonyms":"notified at, last reminder"},{"name":"headId","type":"string","default":"","description":"Scratch: id of the record the scan loop is currently reminding.","synonyms":"current id, cursor"}]},"traits":[{"name":"ReminderScheduler","id":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK","entityRebindable":true,"entityContract":{"requires":[],"provides":["headId"]},"effectRow":[{"kind":"emit","resource":"ReminderDue"},{"kind":"fetch","resource":"@config.targetEntity","resolved":false},{"kind":"fetch","resource":"@config.targetEntity","resolved":false,"site":"tick"},{"kind":"persist","resource":"@config.targetEntity","resolved":false},{"kind":"render-ui","resource":"toast"},{"kind":"set","resource":"@entity.headId"},{"kind":"ticks","site":"tick"}],"category":"lifecycle","linkedEntity":"ReminderRunLog","linkedEntityId":"ent_68ASJ8J2J5192GV607C9Q6VMCW","entityRefIds":{"ReminderRunLog":"ent_68ASJ8J2J5192GV607C9Q6VMCW"},"emits":[{"event":"ReminderDue","eventId":"evt_STS3GYE76Q3KBP1VA54J9SG50Z","scope":"external","payloadSchema":[{"name":"entityId","type":"string"},{"name":"severity","type":"string"},{"name":"template","type":"string"}]},{"event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","payloadSchema":[{"name":"data","type":"[@entity(targetEntity)]"}]},{"event":"ScanFailed","eventId":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}]},{"event":"ReminderStepped","eventId":"evt_7305B7G0F407JBZ9NC62Q6NC86","payloadSchema":[{"name":"id","type":"string"}]}],"stateMachine":{"states":[{"name":"idle","isInitial":true},{"name":"scanning"}],"events":[{"key":"INIT","id":"evt_NKSTNTX7V4KXJEPZACF2RGN436","name":"Initialize"},{"key":"ScanRecordsLoaded","id":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","name":"Scan records loaded","payloadSchema":[{"name":"data","type":"[@entity(targetEntity)]"}],"listened":true},{"key":"ScanFailed","id":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","name":"Scan failed","payloadSchema":[{"name":"error","type":"string"},{"name":"code","type":"string"}],"listened":true},{"key":"ReminderStepped","id":"evt_7305B7G0F407JBZ9NC62Q6NC86","name":"Reminder stepped","payloadSchema":[{"name":"id","type":"string"}],"listened":true},{"key":"ReminderDue","id":"evt_STS3GYE76Q3KBP1VA54J9SG50Z","name":"Reminder due","payloadSchema":[{"name":"entityId","type":"string"},{"name":"severity","type":"string"},{"name":"template","type":"string"}]}],"transitions":[{"from":"idle","to":"idle","event":"INIT","eventId":"evt_NKSTNTX7V4KXJEPZACF2RGN436"},{"from":"idle","to":"scanning","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["and","@config.enabled",[">",["array/len","@payload.data"],0]],"effects":[["set","@entity.headId",["object/get",["array/first","@payload.data"],"id"]],["emit","ReminderDue",{"entityId":"@entity.headId","severity":"@config.severity","template":"@config.template"}],["persist","update","@config.targetEntity",{"id":"@entity.headId","remindedAt":"@now"},{"emit":{"failure":"ScanFailed","success":"ReminderStepped"}}]]},{"from":"idle","to":"idle","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["=",["array/len","@payload.data"],0]},{"from":"idle","to":"idle","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["=","@config.enabled",false]},{"from":"idle","to":"idle","event":"ScanFailed","eventId":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't scan for reminders — ","@payload.error"],"dismissible":true}]]},{"from":"scanning","to":"idle","event":"INIT","eventId":"evt_NKSTNTX7V4KXJEPZACF2RGN436"},{"from":"scanning","to":"scanning","event":"ReminderStepped","eventId":"evt_7305B7G0F407JBZ9NC62Q6NC86","effects":[["fetch","@config.targetEntity",{"emit":{"failure":"ScanFailed","success":"ScanRecordsLoaded"},"filter":["and",["=",["object/get","@entity","remindedAt"],0],["or",["and",["=","@config.direction","future"],[">",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["<",["-",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["*","@config.offsetHours",3600000]]],["and",["=","@config.direction","past"],[">",["-","@now",["time/parse",["object/get","@entity","@config.dateField"]]],["*","@config.offsetHours",3600000]]]]]}]]},{"from":"scanning","to":"scanning","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":[">",["array/len","@payload.data"],0],"effects":[["set","@entity.headId",["object/get",["array/first","@payload.data"],"id"]],["emit","ReminderDue",{"entityId":"@entity.headId","severity":"@config.severity","template":"@config.template"}],["persist","update","@config.targetEntity",{"id":"@entity.headId","remindedAt":"@now"},{"emit":{"failure":"ScanFailed","success":"ReminderStepped"}}]]},{"from":"scanning","to":"idle","event":"ScanRecordsLoaded","eventId":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","guard":["=",["array/len","@payload.data"],0]},{"from":"scanning","to":"idle","event":"ScanFailed","eventId":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","effects":[["render-ui","toast",{"type":"alert","variant":"error","message":["str/concat","Couldn't scan for reminders — ","@payload.error"],"dismissible":true}]]}]},"ticks":[{"name":"scanCycle","interval":"*/15 * * * *","effects":[["fetch","@config.targetEntity",{"emit":{"failure":"ScanFailed","success":"ScanRecordsLoaded"},"filter":["and",["=",["object/get","@entity","remindedAt"],0],["or",["and",["=","@config.direction","future"],[">",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["<",["-",["time/parse",["object/get","@entity","@config.dateField"]],"@now"],["*","@config.offsetHours",3600000]]],["and",["=","@config.direction","past"],[">",["-","@now",["time/parse",["object/get","@entity","@config.dateField"]]],["*","@config.offsetHours",3600000]]]]]}]],"runsInBackground":true}],"config":{"template":{"type":"string","default":"","label":"What should the reminder message say?","description":"Message body passed to the notifier.","synonyms":"message text, reminder body, notification copy, alert message, what to say","tier":"presentation"},"targetEntity":{"type":"entity","default":"ReminderRunLog","label":"Target entity","description":"Entity to scan for upcoming deadlines (e.g. 'Task', 'ClassSession'). Defaults to the atom's own log so the standalone validates; rebind per composition. Typed `entity`, so a rename of the bound entity threads through to this value automatically.","synonyms":"entity to monitor, entity to watch, record type, object type","tier":"internal","refId":"ent_68ASJ8J2J5192GV607C9Q6VMCW"},"direction":{"type":"string","default":"future","label":"Scan which side of now?","description":"'future' (default) matches records whose dateField is still ahead, up to offsetHours out — upcoming-deadline reminders. 'past' matches records whose dateField is at least offsetHours behind now — act-after-the-fact policies. The emitted event and the dedup marker are identical either way.","synonyms":"direction, past due, overdue, after the deadline, look back, backward scan, past-window","tier":"infra","values":["future","past"]},"offsetHours":{"type":"number","default":24,"label":"How many hours before the deadline to remind?","description":"A reminder fires once the deadline is within this many hours of now.","synonyms":"advance notice, lead time, heads up, early warning hours, how far ahead","tier":"infra"},"enabled":{"type":"boolean","default":false,"label":"Send deadline reminders","description":"Automatically remind about upcoming deadlines. Off by default.","synonyms":"enable, turn on, activate, switch on, reminders, deadline reminders, due-date reminders, advance notice, heads up, nudge before due","tier":"infra"},"dateField":{"type":"string","default":"dueAt","label":"Which date field is the deadline?","description":"Field on the target entity holding the deadline (e.g. 'dueAt', 'startsAt'). Accepts a ms-epoch number or an ISO datetime string; both are coerced to ms-epoch for comparison.","synonyms":"due date field, timestamp field, cutoff field, expiry field, when it's due","tier":"internal"},"severity":{"type":"string","default":"info","label":"How urgent are the reminders?","description":"Severity passed to the notifier: info / warning / error.","synonyms":"urgency level, priority, importance, alert level, how urgent","tier":"infra"}},"scope":"instance"}],"pages":[{"name":"ReminderSchedulerPage","id":"pag_TJNBFPKZN0ZTGD8V08CAGSB434","path":"/reminders/scheduler","traits":[{"ref":"ReminderScheduler","refId":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"}]}]}],"schemaVersion":1,"ledger":{"schemaVersion":1,"entries":{"ent_68ASJ8J2J5192GV607C9Q6VMCW":{"id":"ent_68ASJ8J2J5192GV607C9Q6VMCW","kind":"entity","bakedName":"ReminderRunLog","curName":"ReminderRunLog","renames":[],"owner":"workspace"},"evt_7305B7G0F407JBZ9NC62Q6NC86":{"id":"evt_7305B7G0F407JBZ9NC62Q6NC86","kind":"event","bakedName":"ReminderStepped","curName":"ReminderStepped","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_NKSTNTX7V4KXJEPZACF2RGN436":{"id":"evt_NKSTNTX7V4KXJEPZACF2RGN436","kind":"event","bakedName":"INIT","curName":"INIT","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_P2S2STQNWGTY88TXCSKSVQCSGG":{"id":"evt_P2S2STQNWGTY88TXCSKSVQCSGG","kind":"event","bakedName":"ScanRecordsLoaded","curName":"ScanRecordsLoaded","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_QBZYC4PPYSBFCP0XCA1TASDT93":{"id":"evt_QBZYC4PPYSBFCP0XCA1TASDT93","kind":"event","bakedName":"ScanFailed","curName":"ScanFailed","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"evt_STS3GYE76Q3KBP1VA54J9SG50Z":{"id":"evt_STS3GYE76Q3KBP1VA54J9SG50Z","kind":"event","bakedName":"ReminderDue","curName":"ReminderDue","renames":[],"owner":"workspace","parent":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK"},"orb_6ZVJ0PFM7HT3RR40BZM02K4EM7":{"id":"orb_6ZVJ0PFM7HT3RR40BZM02K4EM7","kind":"orbital","bakedName":"ReminderSchedulerOrbital","curName":"ReminderSchedulerOrbital","renames":[],"owner":"workspace"},"pag_TJNBFPKZN0ZTGD8V08CAGSB434":{"id":"pag_TJNBFPKZN0ZTGD8V08CAGSB434","kind":"page","bakedName":"ReminderSchedulerPage","curName":"ReminderSchedulerPage","renames":[],"owner":"workspace"},"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK":{"id":"trt_VQ6JV68GEZ87FKXGR7MZN1R5BK","kind":"trait","bakedName":"ReminderScheduler","curName":"ReminderScheduler","renames":[],"owner":"workspace"}}}}