@almadar/std 6.5.2 → 7.2.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 (307) hide show
  1. package/behaviors/registry/atoms/std-agent-activity-log.orb +240 -227
  2. package/behaviors/registry/atoms/std-agent-chat-thread.orb +296 -199
  3. package/behaviors/registry/atoms/std-agent-classifier.orb +384 -133
  4. package/behaviors/registry/atoms/std-agent-completion.orb +404 -141
  5. package/behaviors/registry/atoms/std-agent-context-window.orb +904 -607
  6. package/behaviors/registry/atoms/std-agent-conversation.orb +443 -234
  7. package/behaviors/registry/atoms/std-agent-memory.orb +584 -150
  8. package/behaviors/registry/atoms/std-agent-provider.orb +431 -174
  9. package/behaviors/registry/atoms/std-agent-search.orb +217 -61
  10. package/behaviors/registry/atoms/std-agent-session.orb +406 -159
  11. package/behaviors/registry/atoms/std-agent-step-progress.orb +314 -294
  12. package/behaviors/registry/atoms/std-agent-token-gauge.orb +577 -500
  13. package/behaviors/registry/atoms/std-agent-tool-call.orb +328 -138
  14. package/behaviors/registry/atoms/std-async.orb +147 -86
  15. package/behaviors/registry/atoms/std-autoregressive.orb +64 -73
  16. package/behaviors/registry/atoms/std-browse.orb +260 -126
  17. package/behaviors/registry/atoms/std-cache-aside.orb +358 -259
  18. package/behaviors/registry/atoms/std-calendar.orb +280 -215
  19. package/behaviors/registry/atoms/std-circuit-breaker.orb +295 -234
  20. package/behaviors/registry/atoms/std-collision.orb +136 -135
  21. package/behaviors/registry/atoms/std-combat-log.orb +108 -90
  22. package/behaviors/registry/atoms/std-combat.orb +171 -98
  23. package/behaviors/registry/atoms/std-confirmation.orb +28 -300
  24. package/behaviors/registry/atoms/std-dialogue-box.orb +111 -30
  25. package/behaviors/registry/atoms/std-display.orb +491 -587
  26. package/behaviors/registry/atoms/std-drawer.orb +194 -121
  27. package/behaviors/registry/atoms/std-filter.orb +311 -326
  28. package/behaviors/registry/atoms/std-flip-card.orb +223 -177
  29. package/behaviors/registry/atoms/std-gallery.orb +130 -151
  30. package/behaviors/registry/atoms/std-game-audio.orb +133 -72
  31. package/behaviors/registry/atoms/std-game-canvas2d.orb +112 -52
  32. package/behaviors/registry/atoms/std-game-canvas3d.orb +150 -107
  33. package/behaviors/registry/atoms/std-game-hud.orb +87 -20
  34. package/behaviors/registry/atoms/std-game-menu.orb +32 -32
  35. package/behaviors/registry/atoms/std-game-over-screen.orb +100 -33
  36. package/behaviors/registry/atoms/std-gameflow.orb +147 -80
  37. package/behaviors/registry/atoms/std-input.orb +128 -393
  38. package/behaviors/registry/atoms/std-inventory-panel.orb +108 -71
  39. package/behaviors/registry/atoms/std-isometric-canvas.orb +156 -407
  40. package/behaviors/registry/atoms/std-loading.orb +127 -126
  41. package/behaviors/registry/atoms/std-modal.orb +30 -267
  42. package/behaviors/registry/atoms/std-movement.orb +391 -292
  43. package/behaviors/registry/atoms/std-notification.orb +133 -75
  44. package/behaviors/registry/atoms/std-overworld.orb +194 -121
  45. package/behaviors/registry/atoms/std-pagination.orb +120 -53
  46. package/behaviors/registry/atoms/std-physics2d.orb +94 -93
  47. package/behaviors/registry/atoms/std-platformer-canvas.orb +110 -98
  48. package/behaviors/registry/atoms/std-push.orb +172 -36
  49. package/behaviors/registry/atoms/std-quest.orb +552 -449
  50. package/behaviors/registry/atoms/std-rate-limiter.orb +242 -241
  51. package/behaviors/registry/atoms/std-rating.orb +123 -65
  52. package/behaviors/registry/atoms/std-related.orb +202 -26
  53. package/behaviors/registry/atoms/std-score-board.orb +109 -28
  54. package/behaviors/registry/atoms/std-score.orb +210 -146
  55. package/behaviors/registry/atoms/std-search.orb +265 -138
  56. package/behaviors/registry/atoms/std-selection.orb +311 -220
  57. package/behaviors/registry/atoms/std-service-custom-bearer.orb +199 -110
  58. package/behaviors/registry/atoms/std-service-custom-header.orb +206 -117
  59. package/behaviors/registry/atoms/std-service-custom-noauth.orb +197 -108
  60. package/behaviors/registry/atoms/std-service-custom-query.orb +193 -104
  61. package/behaviors/registry/atoms/std-service-email.orb +195 -107
  62. package/behaviors/registry/atoms/std-service-github.orb +216 -122
  63. package/behaviors/registry/atoms/std-service-llm.orb +204 -122
  64. package/behaviors/registry/atoms/std-service-oauth.orb +290 -204
  65. package/behaviors/registry/atoms/std-service-redis.orb +177 -92
  66. package/behaviors/registry/atoms/std-service-storage.orb +211 -122
  67. package/behaviors/registry/atoms/std-service-stripe.orb +236 -154
  68. package/behaviors/registry/atoms/std-service-twilio.orb +221 -137
  69. package/behaviors/registry/atoms/std-service-youtube.orb +327 -241
  70. package/behaviors/registry/atoms/std-simulation-canvas.orb +97 -36
  71. package/behaviors/registry/atoms/std-sort.orb +284 -207
  72. package/behaviors/registry/atoms/std-sprite.orb +150 -74
  73. package/behaviors/registry/atoms/std-tabs.orb +129 -62
  74. package/behaviors/registry/atoms/std-text-effects.orb +251 -190
  75. package/behaviors/registry/atoms/std-theme.orb +193 -135
  76. package/behaviors/registry/atoms/std-timer.orb +320 -344
  77. package/behaviors/registry/atoms/std-undo.orb +278 -199
  78. package/behaviors/registry/atoms/std-upload.orb +112 -111
  79. package/behaviors/registry/atoms/std-validate-on-save.orb +159 -151
  80. package/behaviors/registry/atoms/std-wizard.orb +445 -336
  81. package/behaviors/registry/molecules/std-agent-fix-loop.orb +876 -857
  82. package/behaviors/registry/molecules/std-agent-learner.orb +635 -654
  83. package/behaviors/registry/molecules/std-agent-planner.orb +581 -548
  84. package/behaviors/registry/molecules/std-agent-rag.orb +414 -410
  85. package/behaviors/registry/molecules/std-agent-tool-loop.orb +716 -711
  86. package/behaviors/registry/molecules/std-batch-selected-list.orb +28 -12
  87. package/behaviors/registry/molecules/std-builder-game.orb +86 -28
  88. package/behaviors/registry/molecules/std-calendar-booking.orb +32 -8
  89. package/behaviors/registry/molecules/std-cart.orb +347 -406
  90. package/behaviors/registry/molecules/std-classifier-game.orb +95 -37
  91. package/behaviors/registry/molecules/std-dashboard-tabbed.orb +16 -10
  92. package/behaviors/registry/molecules/std-debugger-game.orb +95 -37
  93. package/behaviors/registry/molecules/std-detail.orb +133 -138
  94. package/behaviors/registry/molecules/std-drawer-master-list.orb +12 -6
  95. package/behaviors/registry/molecules/std-event-handler-game.orb +91 -33
  96. package/behaviors/registry/molecules/std-filtered-list.orb +14 -8
  97. package/behaviors/registry/molecules/std-form-advanced.orb +242 -153
  98. package/behaviors/registry/molecules/std-gallery-filtered.orb +16 -10
  99. package/behaviors/registry/molecules/std-geospatial.orb +175 -122
  100. package/behaviors/registry/molecules/std-inventory.orb +216 -170
  101. package/behaviors/registry/molecules/std-list.orb +280 -205
  102. package/behaviors/registry/molecules/std-messaging.orb +146 -99
  103. package/behaviors/registry/molecules/std-negotiator-game.orb +95 -37
  104. package/behaviors/registry/molecules/std-platformer-game.orb +300 -171
  105. package/behaviors/registry/molecules/std-push-activity-log.orb +32 -8
  106. package/behaviors/registry/molecules/std-puzzle-game.orb +287 -146
  107. package/behaviors/registry/molecules/std-quiz.orb +322 -263
  108. package/behaviors/registry/molecules/std-related-master-detail.orb +21 -15
  109. package/behaviors/registry/molecules/std-sequencer-game.orb +92 -34
  110. package/behaviors/registry/molecules/std-service-content-pipeline.orb +268 -267
  111. package/behaviors/registry/molecules/std-service-custom-api-tester.orb +245 -152
  112. package/behaviors/registry/molecules/std-service-devops-toolkit.orb +633 -294
  113. package/behaviors/registry/molecules/std-service-notification-hub.orb +237 -152
  114. package/behaviors/registry/molecules/std-service-payment-flow.orb +310 -180
  115. package/behaviors/registry/molecules/std-simulator-game.orb +96 -38
  116. package/behaviors/registry/molecules/std-turn-based-battle.orb +247 -137
  117. package/behaviors/registry/molecules/std-wizard-form.orb +60 -9
  118. package/behaviors/registry/organisms/std-agent-assistant.orb +2810 -1833
  119. package/behaviors/registry/organisms/std-agent-builder.orb +6401 -4539
  120. package/behaviors/registry/organisms/std-agent-pipeline.orb +5028 -3497
  121. package/behaviors/registry/organisms/std-agent-reviewer.orb +2219 -1406
  122. package/behaviors/registry/organisms/std-agent-tutor.orb +2069 -1384
  123. package/behaviors/registry/organisms/std-api-gateway.orb +1419 -870
  124. package/behaviors/registry/organisms/std-arcade-game.orb +488 -231
  125. package/behaviors/registry/organisms/std-booking-system.orb +2457 -1467
  126. package/behaviors/registry/organisms/std-cicd-pipeline.orb +1367 -825
  127. package/behaviors/registry/organisms/std-cms.orb +1549 -566
  128. package/behaviors/registry/organisms/std-coding-academy.orb +744 -495
  129. package/behaviors/registry/organisms/std-crm.orb +1997 -1014
  130. package/behaviors/registry/organisms/std-devops-dashboard.orb +2160 -1606
  131. package/behaviors/registry/organisms/std-ecommerce.orb +2279 -1153
  132. package/behaviors/registry/organisms/std-finance-tracker.orb +1375 -727
  133. package/behaviors/registry/organisms/std-healthcare.orb +2940 -1703
  134. package/behaviors/registry/organisms/std-helpdesk.orb +1443 -781
  135. package/behaviors/registry/organisms/std-hr-portal.orb +2361 -1440
  136. package/behaviors/registry/organisms/std-iot-dashboard.orb +1491 -1026
  137. package/behaviors/registry/organisms/std-lms.orb +1629 -1046
  138. package/behaviors/registry/organisms/std-logic-training.orb +321 -134
  139. package/behaviors/registry/organisms/std-platformer-app.orb +855 -417
  140. package/behaviors/registry/organisms/std-project-manager.orb +1795 -877
  141. package/behaviors/registry/organisms/std-puzzle-app.orb +407 -206
  142. package/behaviors/registry/organisms/std-realtime-chat.orb +1436 -844
  143. package/behaviors/registry/organisms/std-rpg-game.orb +1522 -1007
  144. package/behaviors/registry/organisms/std-service-marketplace.orb +2110 -1204
  145. package/behaviors/registry/organisms/std-service-research-assistant.orb +1285 -1078
  146. package/behaviors/registry/organisms/std-social-feed.orb +612 -252
  147. package/behaviors/registry/organisms/std-stem-lab.orb +642 -450
  148. package/behaviors/registry/organisms/std-strategy-game.orb +893 -650
  149. package/behaviors/registry/organisms/std-trading-dashboard.orb +1271 -805
  150. package/dist/behaviors/registry/atoms/std-agent-activity-log.orb +240 -227
  151. package/dist/behaviors/registry/atoms/std-agent-chat-thread.orb +296 -199
  152. package/dist/behaviors/registry/atoms/std-agent-classifier.orb +384 -133
  153. package/dist/behaviors/registry/atoms/std-agent-completion.orb +404 -141
  154. package/dist/behaviors/registry/atoms/std-agent-context-window.orb +904 -607
  155. package/dist/behaviors/registry/atoms/std-agent-conversation.orb +443 -234
  156. package/dist/behaviors/registry/atoms/std-agent-memory.orb +584 -150
  157. package/dist/behaviors/registry/atoms/std-agent-provider.orb +431 -174
  158. package/dist/behaviors/registry/atoms/std-agent-search.orb +217 -61
  159. package/dist/behaviors/registry/atoms/std-agent-session.orb +406 -159
  160. package/dist/behaviors/registry/atoms/std-agent-step-progress.orb +314 -294
  161. package/dist/behaviors/registry/atoms/std-agent-token-gauge.orb +577 -500
  162. package/dist/behaviors/registry/atoms/std-agent-tool-call.orb +328 -138
  163. package/dist/behaviors/registry/atoms/std-async.orb +147 -86
  164. package/dist/behaviors/registry/atoms/std-autoregressive.orb +64 -73
  165. package/dist/behaviors/registry/atoms/std-browse.orb +260 -126
  166. package/dist/behaviors/registry/atoms/std-cache-aside.orb +358 -259
  167. package/dist/behaviors/registry/atoms/std-calendar.orb +280 -215
  168. package/dist/behaviors/registry/atoms/std-circuit-breaker.orb +295 -234
  169. package/dist/behaviors/registry/atoms/std-collision.orb +136 -135
  170. package/dist/behaviors/registry/atoms/std-combat-log.orb +108 -90
  171. package/dist/behaviors/registry/atoms/std-combat.orb +171 -98
  172. package/dist/behaviors/registry/atoms/std-confirmation.orb +28 -300
  173. package/dist/behaviors/registry/atoms/std-dialogue-box.orb +111 -30
  174. package/dist/behaviors/registry/atoms/std-display.orb +491 -587
  175. package/dist/behaviors/registry/atoms/std-drawer.orb +194 -121
  176. package/dist/behaviors/registry/atoms/std-filter.orb +311 -326
  177. package/dist/behaviors/registry/atoms/std-flip-card.orb +223 -177
  178. package/dist/behaviors/registry/atoms/std-gallery.orb +130 -151
  179. package/dist/behaviors/registry/atoms/std-game-audio.orb +133 -72
  180. package/dist/behaviors/registry/atoms/std-game-canvas2d.orb +112 -52
  181. package/dist/behaviors/registry/atoms/std-game-canvas3d.orb +150 -107
  182. package/dist/behaviors/registry/atoms/std-game-hud.orb +87 -20
  183. package/dist/behaviors/registry/atoms/std-game-menu.orb +32 -32
  184. package/dist/behaviors/registry/atoms/std-game-over-screen.orb +100 -33
  185. package/dist/behaviors/registry/atoms/std-gameflow.orb +147 -80
  186. package/dist/behaviors/registry/atoms/std-input.orb +128 -393
  187. package/dist/behaviors/registry/atoms/std-inventory-panel.orb +108 -71
  188. package/dist/behaviors/registry/atoms/std-isometric-canvas.orb +156 -407
  189. package/dist/behaviors/registry/atoms/std-loading.orb +127 -126
  190. package/dist/behaviors/registry/atoms/std-modal.orb +30 -267
  191. package/dist/behaviors/registry/atoms/std-movement.orb +391 -292
  192. package/dist/behaviors/registry/atoms/std-notification.orb +133 -75
  193. package/dist/behaviors/registry/atoms/std-overworld.orb +194 -121
  194. package/dist/behaviors/registry/atoms/std-pagination.orb +120 -53
  195. package/dist/behaviors/registry/atoms/std-physics2d.orb +94 -93
  196. package/dist/behaviors/registry/atoms/std-platformer-canvas.orb +110 -98
  197. package/dist/behaviors/registry/atoms/std-push.orb +172 -36
  198. package/dist/behaviors/registry/atoms/std-quest.orb +552 -449
  199. package/dist/behaviors/registry/atoms/std-rate-limiter.orb +242 -241
  200. package/dist/behaviors/registry/atoms/std-rating.orb +123 -65
  201. package/dist/behaviors/registry/atoms/std-related.orb +202 -26
  202. package/dist/behaviors/registry/atoms/std-score-board.orb +109 -28
  203. package/dist/behaviors/registry/atoms/std-score.orb +210 -146
  204. package/dist/behaviors/registry/atoms/std-search.orb +265 -138
  205. package/dist/behaviors/registry/atoms/std-selection.orb +311 -220
  206. package/dist/behaviors/registry/atoms/std-service-custom-bearer.orb +199 -110
  207. package/dist/behaviors/registry/atoms/std-service-custom-header.orb +206 -117
  208. package/dist/behaviors/registry/atoms/std-service-custom-noauth.orb +197 -108
  209. package/dist/behaviors/registry/atoms/std-service-custom-query.orb +193 -104
  210. package/dist/behaviors/registry/atoms/std-service-email.orb +195 -107
  211. package/dist/behaviors/registry/atoms/std-service-github.orb +216 -122
  212. package/dist/behaviors/registry/atoms/std-service-llm.orb +204 -122
  213. package/dist/behaviors/registry/atoms/std-service-oauth.orb +290 -204
  214. package/dist/behaviors/registry/atoms/std-service-redis.orb +177 -92
  215. package/dist/behaviors/registry/atoms/std-service-storage.orb +211 -122
  216. package/dist/behaviors/registry/atoms/std-service-stripe.orb +236 -154
  217. package/dist/behaviors/registry/atoms/std-service-twilio.orb +221 -137
  218. package/dist/behaviors/registry/atoms/std-service-youtube.orb +327 -241
  219. package/dist/behaviors/registry/atoms/std-simulation-canvas.orb +97 -36
  220. package/dist/behaviors/registry/atoms/std-sort.orb +284 -207
  221. package/dist/behaviors/registry/atoms/std-sprite.orb +150 -74
  222. package/dist/behaviors/registry/atoms/std-tabs.orb +129 -62
  223. package/dist/behaviors/registry/atoms/std-text-effects.orb +251 -190
  224. package/dist/behaviors/registry/atoms/std-theme.orb +193 -135
  225. package/dist/behaviors/registry/atoms/std-timer.orb +320 -344
  226. package/dist/behaviors/registry/atoms/std-undo.orb +278 -199
  227. package/dist/behaviors/registry/atoms/std-upload.orb +112 -111
  228. package/dist/behaviors/registry/atoms/std-validate-on-save.orb +159 -151
  229. package/dist/behaviors/registry/atoms/std-wizard.orb +445 -336
  230. package/dist/behaviors/registry/molecules/std-agent-fix-loop.orb +876 -857
  231. package/dist/behaviors/registry/molecules/std-agent-learner.orb +635 -654
  232. package/dist/behaviors/registry/molecules/std-agent-planner.orb +581 -548
  233. package/dist/behaviors/registry/molecules/std-agent-rag.orb +414 -410
  234. package/dist/behaviors/registry/molecules/std-agent-tool-loop.orb +716 -711
  235. package/dist/behaviors/registry/molecules/std-batch-selected-list.orb +28 -12
  236. package/dist/behaviors/registry/molecules/std-builder-game.orb +86 -28
  237. package/dist/behaviors/registry/molecules/std-calendar-booking.orb +32 -8
  238. package/dist/behaviors/registry/molecules/std-cart.orb +347 -406
  239. package/dist/behaviors/registry/molecules/std-classifier-game.orb +95 -37
  240. package/dist/behaviors/registry/molecules/std-dashboard-tabbed.orb +16 -10
  241. package/dist/behaviors/registry/molecules/std-debugger-game.orb +95 -37
  242. package/dist/behaviors/registry/molecules/std-detail.orb +133 -138
  243. package/dist/behaviors/registry/molecules/std-drawer-master-list.orb +12 -6
  244. package/dist/behaviors/registry/molecules/std-event-handler-game.orb +91 -33
  245. package/dist/behaviors/registry/molecules/std-filtered-list.orb +14 -8
  246. package/dist/behaviors/registry/molecules/std-form-advanced.orb +242 -153
  247. package/dist/behaviors/registry/molecules/std-gallery-filtered.orb +16 -10
  248. package/dist/behaviors/registry/molecules/std-geospatial.orb +175 -122
  249. package/dist/behaviors/registry/molecules/std-inventory.orb +216 -170
  250. package/dist/behaviors/registry/molecules/std-list.orb +280 -205
  251. package/dist/behaviors/registry/molecules/std-messaging.orb +146 -99
  252. package/dist/behaviors/registry/molecules/std-negotiator-game.orb +95 -37
  253. package/dist/behaviors/registry/molecules/std-platformer-game.orb +300 -171
  254. package/dist/behaviors/registry/molecules/std-push-activity-log.orb +32 -8
  255. package/dist/behaviors/registry/molecules/std-puzzle-game.orb +287 -146
  256. package/dist/behaviors/registry/molecules/std-quiz.orb +322 -263
  257. package/dist/behaviors/registry/molecules/std-related-master-detail.orb +21 -15
  258. package/dist/behaviors/registry/molecules/std-sequencer-game.orb +92 -34
  259. package/dist/behaviors/registry/molecules/std-service-content-pipeline.orb +268 -267
  260. package/dist/behaviors/registry/molecules/std-service-custom-api-tester.orb +245 -152
  261. package/dist/behaviors/registry/molecules/std-service-devops-toolkit.orb +633 -294
  262. package/dist/behaviors/registry/molecules/std-service-notification-hub.orb +237 -152
  263. package/dist/behaviors/registry/molecules/std-service-payment-flow.orb +310 -180
  264. package/dist/behaviors/registry/molecules/std-simulator-game.orb +96 -38
  265. package/dist/behaviors/registry/molecules/std-turn-based-battle.orb +247 -137
  266. package/dist/behaviors/registry/molecules/std-wizard-form.orb +60 -9
  267. package/dist/behaviors/registry/organisms/std-agent-assistant.orb +2810 -1833
  268. package/dist/behaviors/registry/organisms/std-agent-builder.orb +6401 -4539
  269. package/dist/behaviors/registry/organisms/std-agent-pipeline.orb +5028 -3497
  270. package/dist/behaviors/registry/organisms/std-agent-reviewer.orb +2219 -1406
  271. package/dist/behaviors/registry/organisms/std-agent-tutor.orb +2069 -1384
  272. package/dist/behaviors/registry/organisms/std-api-gateway.orb +1419 -870
  273. package/dist/behaviors/registry/organisms/std-arcade-game.orb +488 -231
  274. package/dist/behaviors/registry/organisms/std-booking-system.orb +2457 -1467
  275. package/dist/behaviors/registry/organisms/std-cicd-pipeline.orb +1367 -825
  276. package/dist/behaviors/registry/organisms/std-cms.orb +1549 -566
  277. package/dist/behaviors/registry/organisms/std-coding-academy.orb +744 -495
  278. package/dist/behaviors/registry/organisms/std-crm.orb +1997 -1014
  279. package/dist/behaviors/registry/organisms/std-devops-dashboard.orb +2160 -1606
  280. package/dist/behaviors/registry/organisms/std-ecommerce.orb +2279 -1153
  281. package/dist/behaviors/registry/organisms/std-finance-tracker.orb +1375 -727
  282. package/dist/behaviors/registry/organisms/std-healthcare.orb +2940 -1703
  283. package/dist/behaviors/registry/organisms/std-helpdesk.orb +1443 -781
  284. package/dist/behaviors/registry/organisms/std-hr-portal.orb +2361 -1440
  285. package/dist/behaviors/registry/organisms/std-iot-dashboard.orb +1491 -1026
  286. package/dist/behaviors/registry/organisms/std-lms.orb +1629 -1046
  287. package/dist/behaviors/registry/organisms/std-logic-training.orb +321 -134
  288. package/dist/behaviors/registry/organisms/std-platformer-app.orb +855 -417
  289. package/dist/behaviors/registry/organisms/std-project-manager.orb +1795 -877
  290. package/dist/behaviors/registry/organisms/std-puzzle-app.orb +407 -206
  291. package/dist/behaviors/registry/organisms/std-realtime-chat.orb +1436 -844
  292. package/dist/behaviors/registry/organisms/std-rpg-game.orb +1522 -1007
  293. package/dist/behaviors/registry/organisms/std-service-marketplace.orb +2110 -1204
  294. package/dist/behaviors/registry/organisms/std-service-research-assistant.orb +1285 -1078
  295. package/dist/behaviors/registry/organisms/std-social-feed.orb +612 -252
  296. package/dist/behaviors/registry/organisms/std-stem-lab.orb +642 -450
  297. package/dist/behaviors/registry/organisms/std-strategy-game.orb +893 -650
  298. package/dist/behaviors/registry/organisms/std-trading-dashboard.orb +1271 -805
  299. package/dist/index.js +16 -4
  300. package/dist/index.js.map +1 -1
  301. package/dist/modules/core.js +16 -4
  302. package/dist/modules/core.js.map +1 -1
  303. package/dist/modules/index.js +16 -4
  304. package/dist/modules/index.js.map +1 -1
  305. package/dist/registry.js +16 -4
  306. package/dist/registry.js.map +1 -1
  307. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-agent-token-gauge",
3
3
  "version": "1.0.0",
4
- "description": "Token usage display atom with threshold-based state transitions. Shows current token count, usage percentage, and progress bar. Transitions from normal -> warning -> critical based on configurable thresholds. Provides compact and reset actions.",
4
+ "description": "std-agent-token-gauge as a Function",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "AgentTokenGaugeOrbital",
@@ -38,12 +38,12 @@
38
38
  {
39
39
  "name": "current",
40
40
  "type": "number",
41
- "default": 0
41
+ "default": 0.0
42
42
  },
43
43
  {
44
44
  "name": "max",
45
45
  "type": "number",
46
- "default": 180000
46
+ "default": 180000.0
47
47
  },
48
48
  {
49
49
  "name": "threshold",
@@ -60,8 +60,64 @@
60
60
  "traits": [
61
61
  {
62
62
  "name": "AgentTokenGaugeGauge",
63
- "linkedEntity": "AgentTokenGauge",
64
63
  "category": "interaction",
64
+ "linkedEntity": "AgentTokenGauge",
65
+ "emits": [
66
+ {
67
+ "event": "AgentTokenGaugeLoaded",
68
+ "description": "Fired when AgentTokenGauge finishes loading",
69
+ "scope": "internal",
70
+ "payload": [
71
+ {
72
+ "name": "id",
73
+ "type": "string"
74
+ },
75
+ {
76
+ "name": "name",
77
+ "type": "string"
78
+ },
79
+ {
80
+ "name": "description",
81
+ "type": "string"
82
+ },
83
+ {
84
+ "name": "status",
85
+ "type": "string"
86
+ },
87
+ {
88
+ "name": "createdAt",
89
+ "type": "string"
90
+ },
91
+ {
92
+ "name": "current",
93
+ "type": "number"
94
+ },
95
+ {
96
+ "name": "max",
97
+ "type": "number"
98
+ },
99
+ {
100
+ "name": "threshold",
101
+ "type": "number"
102
+ },
103
+ {
104
+ "name": "lastCompactedAt",
105
+ "type": "string"
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "event": "AgentTokenGaugeLoadFailed",
111
+ "description": "Fired when AgentTokenGauge fails to load",
112
+ "scope": "internal",
113
+ "payload": [
114
+ {
115
+ "name": "message",
116
+ "type": "string"
117
+ }
118
+ ]
119
+ }
120
+ ],
65
121
  "stateMachine": {
66
122
  "states": [
67
123
  {
@@ -82,7 +138,7 @@
82
138
  },
83
139
  {
84
140
  "key": "UPDATE",
85
- "name": "Update Token Count",
141
+ "name": "Update",
86
142
  "payload": [
87
143
  {
88
144
  "name": "current",
@@ -93,11 +149,25 @@
93
149
  },
94
150
  {
95
151
  "key": "COMPACT",
96
- "name": "Compact Context"
152
+ "name": "Compact"
97
153
  },
98
154
  {
99
155
  "key": "RESET",
100
- "name": "Reset Gauge"
156
+ "name": "Reset"
157
+ },
158
+ {
159
+ "key": "AgentTokenGaugeLoaded",
160
+ "name": "AgentTokenGauge loaded"
161
+ },
162
+ {
163
+ "key": "AgentTokenGaugeLoadFailed",
164
+ "name": "AgentTokenGauge load failed",
165
+ "payload": [
166
+ {
167
+ "name": "message",
168
+ "type": "string"
169
+ }
170
+ ]
101
171
  }
102
172
  ],
103
173
  "transitions": [
@@ -108,38 +178,44 @@
108
178
  "effects": [
109
179
  [
110
180
  "fetch",
111
- "AgentTokenGauge"
181
+ "AgentTokenGauge",
182
+ {
183
+ "emit": {
184
+ "success": "AgentTokenGaugeLoaded",
185
+ "failure": "AgentTokenGaugeLoadFailed"
186
+ }
187
+ }
112
188
  ],
113
189
  [
114
190
  "render-ui",
115
191
  "main",
116
192
  {
117
- "type": "stack",
118
193
  "direction": "vertical",
119
194
  "gap": "lg",
195
+ "type": "stack",
120
196
  "children": [
121
197
  {
122
198
  "type": "stack",
123
199
  "direction": "horizontal",
124
200
  "gap": "sm",
125
- "align": "center",
126
201
  "children": [
127
202
  {
203
+ "size": "lg",
128
204
  "type": "icon",
129
- "name": "gauge",
130
- "size": "lg"
205
+ "name": "gauge"
131
206
  },
132
207
  {
133
- "type": "typography",
134
208
  "content": "Token Usage",
209
+ "type": "typography",
135
210
  "variant": "h2"
136
211
  },
137
212
  {
138
- "type": "badge",
139
213
  "label": "Normal",
140
- "variant": "default"
214
+ "variant": "default",
215
+ "type": "badge"
141
216
  }
142
- ]
217
+ ],
218
+ "align": "center"
143
219
  },
144
220
  {
145
221
  "type": "divider"
@@ -151,26 +227,26 @@
151
227
  },
152
228
  {
153
229
  "type": "stack",
154
- "direction": "horizontal",
155
- "gap": "md",
156
230
  "children": [
157
231
  {
232
+ "value": "@entity.current",
158
233
  "type": "stat-display",
159
- "label": "Tokens Used",
160
- "value": "@entity.current"
234
+ "label": "Tokens Used"
161
235
  },
162
236
  {
163
- "type": "stat-display",
237
+ "value": "@entity.max",
164
238
  "label": "Max Tokens",
165
- "value": "@entity.max"
239
+ "type": "stat-display"
166
240
  }
167
- ]
241
+ ],
242
+ "gap": "md",
243
+ "direction": "horizontal"
168
244
  },
169
245
  {
170
246
  "type": "button",
171
- "label": "Reset",
172
- "event": "RESET",
173
247
  "variant": "ghost",
248
+ "event": "RESET",
249
+ "label": "Reset",
174
250
  "icon": "rotate-ccw"
175
251
  }
176
252
  ]
@@ -201,24 +277,21 @@
201
277
  "render-ui",
202
278
  "main",
203
279
  {
204
- "type": "stack",
205
- "direction": "vertical",
206
- "gap": "lg",
207
280
  "children": [
208
281
  {
209
- "type": "stack",
210
- "direction": "horizontal",
211
282
  "gap": "sm",
283
+ "direction": "horizontal",
284
+ "type": "stack",
212
285
  "align": "center",
213
286
  "children": [
214
287
  {
288
+ "size": "lg",
215
289
  "type": "icon",
216
- "name": "gauge",
217
- "size": "lg"
290
+ "name": "gauge"
218
291
  },
219
292
  {
220
- "type": "typography",
221
293
  "content": "Token Usage",
294
+ "type": "typography",
222
295
  "variant": "h2"
223
296
  },
224
297
  {
@@ -237,9 +310,7 @@
237
310
  "max": "@entity.max"
238
311
  },
239
312
  {
240
- "type": "stack",
241
313
  "direction": "horizontal",
242
- "gap": "md",
243
314
  "children": [
244
315
  {
245
316
  "type": "stat-display",
@@ -247,20 +318,25 @@
247
318
  "value": "@entity.current"
248
319
  },
249
320
  {
250
- "type": "stat-display",
251
321
  "label": "Max Tokens",
252
- "value": "@entity.max"
322
+ "value": "@entity.max",
323
+ "type": "stat-display"
253
324
  }
254
- ]
325
+ ],
326
+ "gap": "md",
327
+ "type": "stack"
255
328
  },
256
329
  {
257
- "type": "button",
258
330
  "label": "Reset",
259
- "event": "RESET",
331
+ "type": "button",
260
332
  "variant": "ghost",
333
+ "event": "RESET",
261
334
  "icon": "rotate-ccw"
262
335
  }
263
- ]
336
+ ],
337
+ "gap": "lg",
338
+ "type": "stack",
339
+ "direction": "vertical"
264
340
  }
265
341
  ]
266
342
  ]
@@ -300,15 +376,8 @@
300
376
  "render-ui",
301
377
  "main",
302
378
  {
303
- "type": "stack",
304
- "direction": "vertical",
305
- "gap": "lg",
306
379
  "children": [
307
380
  {
308
- "type": "stack",
309
- "direction": "horizontal",
310
- "gap": "sm",
311
- "align": "center",
312
381
  "children": [
313
382
  {
314
383
  "type": "icon",
@@ -316,16 +385,20 @@
316
385
  "size": "lg"
317
386
  },
318
387
  {
319
- "type": "typography",
320
388
  "content": "Token Usage",
389
+ "type": "typography",
321
390
  "variant": "h2"
322
391
  },
323
392
  {
393
+ "variant": "warning",
324
394
  "type": "badge",
325
- "label": "Warning",
326
- "variant": "warning"
395
+ "label": "Warning"
327
396
  }
328
- ]
397
+ ],
398
+ "type": "stack",
399
+ "gap": "sm",
400
+ "align": "center",
401
+ "direction": "horizontal"
329
402
  },
330
403
  {
331
404
  "type": "divider"
@@ -341,44 +414,47 @@
341
414
  "max": "@entity.max"
342
415
  },
343
416
  {
344
- "type": "stack",
345
417
  "direction": "horizontal",
346
- "gap": "md",
418
+ "type": "stack",
347
419
  "children": [
348
420
  {
349
- "type": "stat-display",
350
421
  "label": "Tokens Used",
351
- "value": "@entity.current"
422
+ "value": "@entity.current",
423
+ "type": "stat-display"
352
424
  },
353
425
  {
354
426
  "type": "stat-display",
355
- "label": "Max Tokens",
356
- "value": "@entity.max"
427
+ "value": "@entity.max",
428
+ "label": "Max Tokens"
357
429
  }
358
- ]
430
+ ],
431
+ "gap": "md"
359
432
  },
360
433
  {
361
- "type": "stack",
362
434
  "direction": "horizontal",
363
435
  "gap": "sm",
436
+ "type": "stack",
364
437
  "children": [
365
438
  {
439
+ "variant": "primary",
366
440
  "type": "button",
367
- "label": "Compact",
441
+ "icon": "minimize-2",
368
442
  "event": "COMPACT",
369
- "variant": "primary",
370
- "icon": "minimize-2"
443
+ "label": "Compact"
371
444
  },
372
445
  {
446
+ "variant": "ghost",
373
447
  "type": "button",
374
448
  "label": "Reset",
375
449
  "event": "RESET",
376
- "variant": "ghost",
377
450
  "icon": "rotate-ccw"
378
451
  }
379
452
  ]
380
453
  }
381
- ]
454
+ ],
455
+ "type": "stack",
456
+ "direction": "vertical",
457
+ "gap": "lg"
382
458
  }
383
459
  ]
384
460
  ]
@@ -406,15 +482,12 @@
406
482
  "render-ui",
407
483
  "main",
408
484
  {
409
- "type": "stack",
410
- "direction": "vertical",
411
485
  "gap": "lg",
486
+ "direction": "vertical",
487
+ "type": "stack",
412
488
  "children": [
413
489
  {
414
- "type": "stack",
415
490
  "direction": "horizontal",
416
- "gap": "sm",
417
- "align": "center",
418
491
  "children": [
419
492
  {
420
493
  "type": "icon",
@@ -422,43 +495,46 @@
422
495
  "size": "lg"
423
496
  },
424
497
  {
425
- "type": "typography",
426
498
  "content": "Token Usage",
427
- "variant": "h2"
499
+ "variant": "h2",
500
+ "type": "typography"
428
501
  },
429
502
  {
430
- "type": "badge",
431
503
  "label": "Critical",
504
+ "type": "badge",
432
505
  "variant": "destructive"
433
506
  }
434
- ]
507
+ ],
508
+ "gap": "sm",
509
+ "align": "center",
510
+ "type": "stack"
435
511
  },
436
512
  {
437
513
  "type": "divider"
438
514
  },
439
515
  {
440
- "type": "alert",
516
+ "message": "Token usage critical. Compact immediately to avoid truncation.",
441
517
  "variant": "error",
442
- "message": "Token usage critical. Compact immediately to avoid truncation."
518
+ "type": "alert"
443
519
  },
444
520
  {
445
- "type": "progress-bar",
446
521
  "value": "@entity.current",
447
- "max": "@entity.max"
522
+ "max": "@entity.max",
523
+ "type": "progress-bar"
448
524
  },
449
525
  {
450
- "type": "stack",
451
526
  "direction": "horizontal",
527
+ "type": "stack",
452
528
  "gap": "md",
453
529
  "children": [
454
530
  {
455
- "type": "stat-display",
456
531
  "label": "Tokens Used",
457
- "value": "@entity.current"
532
+ "value": "@entity.current",
533
+ "type": "stat-display"
458
534
  },
459
535
  {
460
- "type": "stat-display",
461
536
  "label": "Max Tokens",
537
+ "type": "stat-display",
462
538
  "value": "@entity.max"
463
539
  }
464
540
  ]
@@ -466,23 +542,23 @@
466
542
  {
467
543
  "type": "stack",
468
544
  "direction": "horizontal",
469
- "gap": "sm",
470
545
  "children": [
471
546
  {
472
- "type": "button",
473
547
  "label": "Compact Now",
548
+ "type": "button",
474
549
  "event": "COMPACT",
475
- "variant": "primary",
476
- "icon": "minimize-2"
550
+ "icon": "minimize-2",
551
+ "variant": "primary"
477
552
  },
478
553
  {
554
+ "variant": "ghost",
479
555
  "type": "button",
556
+ "icon": "rotate-ccw",
480
557
  "label": "Reset",
481
- "event": "RESET",
482
- "variant": "ghost",
483
- "icon": "rotate-ccw"
558
+ "event": "RESET"
484
559
  }
485
- ]
560
+ ],
561
+ "gap": "sm"
486
562
  }
487
563
  ]
488
564
  }
@@ -490,53 +566,35 @@
490
566
  ]
491
567
  },
492
568
  {
493
- "from": "warning",
494
- "to": "warning",
495
- "event": "UPDATE",
496
- "guard": [
497
- "and",
569
+ "from": "normal",
570
+ "to": "normal",
571
+ "event": "COMPACT",
572
+ "effects": [
498
573
  [
499
- ">=",
500
- [
501
- "/",
502
- "@payload.current",
503
- "@entity.max"
504
- ],
505
- 0.85
574
+ "agent/compact"
506
575
  ],
507
- [
508
- "<",
509
- [
510
- "/",
511
- "@payload.current",
512
- "@entity.max"
513
- ],
514
- 0.95
515
- ]
516
- ],
517
- "effects": [
518
576
  [
519
577
  "set",
520
- "@entity.current",
521
- "@payload.current"
578
+ "@entity.lastCompactedAt",
579
+ "@now"
580
+ ],
581
+ [
582
+ "agent/token-count"
522
583
  ],
523
584
  [
524
585
  "render-ui",
525
586
  "main",
526
587
  {
527
- "type": "stack",
528
- "direction": "vertical",
529
588
  "gap": "lg",
530
589
  "children": [
531
590
  {
532
591
  "type": "stack",
533
592
  "direction": "horizontal",
534
- "gap": "sm",
535
593
  "align": "center",
536
594
  "children": [
537
595
  {
538
596
  "type": "icon",
539
- "name": "alert-triangle",
597
+ "name": "gauge",
540
598
  "size": "lg"
541
599
  },
542
600
  {
@@ -545,23 +603,19 @@
545
603
  "variant": "h2"
546
604
  },
547
605
  {
548
- "type": "badge",
549
- "label": "Warning",
550
- "variant": "warning"
606
+ "label": "Normal",
607
+ "variant": "default",
608
+ "type": "badge"
551
609
  }
552
- ]
610
+ ],
611
+ "gap": "sm"
553
612
  },
554
613
  {
555
614
  "type": "divider"
556
615
  },
557
616
  {
558
- "type": "alert",
559
- "variant": "warning",
560
- "message": "Token usage approaching limit. Consider compacting."
561
- },
562
- {
563
- "type": "progress-bar",
564
617
  "value": "@entity.current",
618
+ "type": "progress-bar",
565
619
  "max": "@entity.max"
566
620
  },
567
621
  {
@@ -570,80 +624,59 @@
570
624
  "gap": "md",
571
625
  "children": [
572
626
  {
573
- "type": "stat-display",
574
627
  "label": "Tokens Used",
575
- "value": "@entity.current"
628
+ "value": "@entity.current",
629
+ "type": "stat-display"
576
630
  },
577
631
  {
578
632
  "type": "stat-display",
579
- "label": "Max Tokens",
580
- "value": "@entity.max"
633
+ "value": "@entity.max",
634
+ "label": "Max Tokens"
581
635
  }
582
636
  ]
583
637
  },
584
638
  {
585
- "type": "stack",
586
- "direction": "horizontal",
587
- "gap": "sm",
588
- "children": [
589
- {
590
- "type": "button",
591
- "label": "Compact",
592
- "event": "COMPACT",
593
- "variant": "primary",
594
- "icon": "minimize-2"
595
- },
596
- {
597
- "type": "button",
598
- "label": "Reset",
599
- "event": "RESET",
600
- "variant": "ghost",
601
- "icon": "rotate-ccw"
602
- }
603
- ]
639
+ "type": "button",
640
+ "event": "RESET",
641
+ "label": "Reset",
642
+ "variant": "ghost",
643
+ "icon": "rotate-ccw"
604
644
  }
605
- ]
645
+ ],
646
+ "direction": "vertical",
647
+ "type": "stack"
606
648
  }
607
649
  ]
608
650
  ]
609
651
  },
610
652
  {
611
- "from": "warning",
612
- "to": "critical",
613
- "event": "UPDATE",
614
- "guard": [
615
- ">=",
616
- [
617
- "/",
618
- "@payload.current",
619
- "@entity.max"
620
- ],
621
- 0.95
622
- ],
653
+ "from": "normal",
654
+ "to": "normal",
655
+ "event": "RESET",
623
656
  "effects": [
624
657
  [
625
658
  "set",
626
659
  "@entity.current",
627
- "@payload.current"
660
+ 0.0
628
661
  ],
629
662
  [
630
663
  "render-ui",
631
664
  "main",
632
665
  {
633
- "type": "stack",
634
- "direction": "vertical",
635
666
  "gap": "lg",
667
+ "direction": "vertical",
668
+ "type": "stack",
636
669
  "children": [
637
670
  {
638
- "type": "stack",
639
671
  "direction": "horizontal",
672
+ "type": "stack",
640
673
  "gap": "sm",
641
674
  "align": "center",
642
675
  "children": [
643
676
  {
644
- "type": "icon",
645
- "name": "alert-octagon",
646
- "size": "lg"
677
+ "name": "gauge",
678
+ "size": "lg",
679
+ "type": "icon"
647
680
  },
648
681
  {
649
682
  "type": "typography",
@@ -651,34 +684,29 @@
651
684
  "variant": "h2"
652
685
  },
653
686
  {
687
+ "variant": "default",
654
688
  "type": "badge",
655
- "label": "Critical",
656
- "variant": "destructive"
689
+ "label": "Normal"
657
690
  }
658
691
  ]
659
692
  },
660
693
  {
661
694
  "type": "divider"
662
695
  },
663
- {
664
- "type": "alert",
665
- "variant": "error",
666
- "message": "Token usage critical. Compact immediately to avoid truncation."
667
- },
668
696
  {
669
697
  "type": "progress-bar",
670
- "value": "@entity.current",
671
- "max": "@entity.max"
698
+ "max": "@entity.max",
699
+ "value": "@entity.current"
672
700
  },
673
701
  {
674
- "type": "stack",
675
702
  "direction": "horizontal",
703
+ "type": "stack",
676
704
  "gap": "md",
677
705
  "children": [
678
706
  {
707
+ "value": "@entity.current",
679
708
  "type": "stat-display",
680
- "label": "Tokens Used",
681
- "value": "@entity.current"
709
+ "label": "Tokens Used"
682
710
  },
683
711
  {
684
712
  "type": "stat-display",
@@ -688,25 +716,11 @@
688
716
  ]
689
717
  },
690
718
  {
691
- "type": "stack",
692
- "direction": "horizontal",
693
- "gap": "sm",
694
- "children": [
695
- {
696
- "type": "button",
697
- "label": "Compact Now",
698
- "event": "COMPACT",
699
- "variant": "primary",
700
- "icon": "minimize-2"
701
- },
702
- {
703
- "type": "button",
704
- "label": "Reset",
705
- "event": "RESET",
706
- "variant": "ghost",
707
- "icon": "rotate-ccw"
708
- }
709
- ]
719
+ "variant": "ghost",
720
+ "icon": "rotate-ccw",
721
+ "event": "RESET",
722
+ "type": "button",
723
+ "label": "Reset"
710
724
  }
711
725
  ]
712
726
  }
@@ -715,16 +729,28 @@
715
729
  },
716
730
  {
717
731
  "from": "warning",
718
- "to": "normal",
732
+ "to": "warning",
719
733
  "event": "UPDATE",
720
734
  "guard": [
721
- "<",
735
+ "and",
722
736
  [
723
- "/",
724
- "@payload.current",
725
- "@entity.max"
737
+ ">=",
738
+ [
739
+ "/",
740
+ "@payload.current",
741
+ "@entity.max"
742
+ ],
743
+ 0.85
726
744
  ],
727
- 0.85
745
+ [
746
+ "<",
747
+ [
748
+ "/",
749
+ "@payload.current",
750
+ "@entity.max"
751
+ ],
752
+ 0.95
753
+ ]
728
754
  ],
729
755
  "effects": [
730
756
  [
@@ -737,19 +763,16 @@
737
763
  "main",
738
764
  {
739
765
  "type": "stack",
740
- "direction": "vertical",
741
766
  "gap": "lg",
742
767
  "children": [
743
768
  {
744
- "type": "stack",
745
- "direction": "horizontal",
746
- "gap": "sm",
747
769
  "align": "center",
770
+ "direction": "horizontal",
748
771
  "children": [
749
772
  {
750
- "type": "icon",
751
- "name": "gauge",
752
- "size": "lg"
773
+ "size": "lg",
774
+ "name": "alert-triangle",
775
+ "type": "icon"
753
776
  },
754
777
  {
755
778
  "type": "typography",
@@ -758,50 +781,72 @@
758
781
  },
759
782
  {
760
783
  "type": "badge",
761
- "label": "Normal",
762
- "variant": "default"
784
+ "label": "Warning",
785
+ "variant": "warning"
763
786
  }
764
- ]
787
+ ],
788
+ "gap": "sm",
789
+ "type": "stack"
765
790
  },
766
791
  {
767
792
  "type": "divider"
768
793
  },
769
794
  {
795
+ "type": "alert",
796
+ "variant": "warning",
797
+ "message": "Token usage approaching limit. Consider compacting."
798
+ },
799
+ {
800
+ "max": "@entity.max",
770
801
  "type": "progress-bar",
771
- "value": "@entity.current",
772
- "max": "@entity.max"
802
+ "value": "@entity.current"
773
803
  },
774
804
  {
775
805
  "type": "stack",
776
- "direction": "horizontal",
777
806
  "gap": "md",
807
+ "direction": "horizontal",
778
808
  "children": [
779
809
  {
780
- "type": "stat-display",
781
810
  "label": "Tokens Used",
811
+ "type": "stat-display",
782
812
  "value": "@entity.current"
783
813
  },
784
814
  {
815
+ "value": "@entity.max",
785
816
  "type": "stat-display",
786
- "label": "Max Tokens",
787
- "value": "@entity.max"
817
+ "label": "Max Tokens"
788
818
  }
789
819
  ]
790
820
  },
791
821
  {
792
- "type": "button",
793
- "label": "Reset",
794
- "event": "RESET",
795
- "variant": "ghost",
796
- "icon": "rotate-ccw"
822
+ "gap": "sm",
823
+ "direction": "horizontal",
824
+ "children": [
825
+ {
826
+ "icon": "minimize-2",
827
+ "type": "button",
828
+ "event": "COMPACT",
829
+ "label": "Compact",
830
+ "variant": "primary"
831
+ },
832
+ {
833
+ "icon": "rotate-ccw",
834
+ "label": "Reset",
835
+ "event": "RESET",
836
+ "variant": "ghost",
837
+ "type": "button"
838
+ }
839
+ ],
840
+ "type": "stack"
797
841
  }
798
- ]
842
+ ],
843
+ "direction": "vertical"
799
844
  }
800
845
  ]
801
846
  ]
802
847
  },
803
848
  {
804
- "from": "critical",
849
+ "from": "warning",
805
850
  "to": "critical",
806
851
  "event": "UPDATE",
807
852
  "guard": [
@@ -825,7 +870,6 @@
825
870
  {
826
871
  "type": "stack",
827
872
  "direction": "vertical",
828
- "gap": "lg",
829
873
  "children": [
830
874
  {
831
875
  "type": "stack",
@@ -834,19 +878,19 @@
834
878
  "align": "center",
835
879
  "children": [
836
880
  {
837
- "type": "icon",
838
881
  "name": "alert-octagon",
839
- "size": "lg"
882
+ "size": "lg",
883
+ "type": "icon"
840
884
  },
841
885
  {
842
- "type": "typography",
843
886
  "content": "Token Usage",
844
- "variant": "h2"
887
+ "variant": "h2",
888
+ "type": "typography"
845
889
  },
846
890
  {
847
- "type": "badge",
848
891
  "label": "Critical",
849
- "variant": "destructive"
892
+ "variant": "destructive",
893
+ "type": "badge"
850
894
  }
851
895
  ]
852
896
  },
@@ -864,72 +908,61 @@
864
908
  "max": "@entity.max"
865
909
  },
866
910
  {
867
- "type": "stack",
868
911
  "direction": "horizontal",
912
+ "type": "stack",
869
913
  "gap": "md",
870
914
  "children": [
871
915
  {
872
916
  "type": "stat-display",
873
- "label": "Tokens Used",
874
- "value": "@entity.current"
917
+ "value": "@entity.current",
918
+ "label": "Tokens Used"
875
919
  },
876
920
  {
877
- "type": "stat-display",
921
+ "value": "@entity.max",
878
922
  "label": "Max Tokens",
879
- "value": "@entity.max"
923
+ "type": "stat-display"
880
924
  }
881
925
  ]
882
926
  },
883
927
  {
884
- "type": "stack",
885
928
  "direction": "horizontal",
929
+ "type": "stack",
886
930
  "gap": "sm",
887
931
  "children": [
888
932
  {
889
- "type": "button",
890
- "label": "Compact Now",
891
933
  "event": "COMPACT",
892
934
  "variant": "primary",
935
+ "type": "button",
936
+ "label": "Compact Now",
893
937
  "icon": "minimize-2"
894
938
  },
895
939
  {
896
940
  "type": "button",
897
- "label": "Reset",
898
- "event": "RESET",
899
941
  "variant": "ghost",
900
- "icon": "rotate-ccw"
942
+ "icon": "rotate-ccw",
943
+ "label": "Reset",
944
+ "event": "RESET"
901
945
  }
902
946
  ]
903
947
  }
904
- ]
948
+ ],
949
+ "gap": "lg"
905
950
  }
906
951
  ]
907
952
  ]
908
953
  },
909
954
  {
910
- "from": "critical",
911
- "to": "warning",
955
+ "from": "warning",
956
+ "to": "normal",
912
957
  "event": "UPDATE",
913
958
  "guard": [
914
- "and",
959
+ "<",
915
960
  [
916
- ">=",
917
- [
918
- "/",
919
- "@payload.current",
920
- "@entity.max"
921
- ],
922
- 0.85
961
+ "/",
962
+ "@payload.current",
963
+ "@entity.max"
923
964
  ],
924
- [
925
- "<",
926
- [
927
- "/",
928
- "@payload.current",
929
- "@entity.max"
930
- ],
931
- 0.95
932
- ]
965
+ 0.85
933
966
  ],
934
967
  "effects": [
935
968
  [
@@ -941,19 +974,17 @@
941
974
  "render-ui",
942
975
  "main",
943
976
  {
977
+ "gap": "lg",
944
978
  "type": "stack",
945
979
  "direction": "vertical",
946
- "gap": "lg",
947
980
  "children": [
948
981
  {
949
- "type": "stack",
950
982
  "direction": "horizontal",
951
- "gap": "sm",
952
983
  "align": "center",
953
984
  "children": [
954
985
  {
986
+ "name": "gauge",
955
987
  "type": "icon",
956
- "name": "alert-triangle",
957
988
  "size": "lg"
958
989
  },
959
990
  {
@@ -962,62 +993,45 @@
962
993
  "variant": "h2"
963
994
  },
964
995
  {
996
+ "label": "Normal",
965
997
  "type": "badge",
966
- "label": "Warning",
967
- "variant": "warning"
998
+ "variant": "default"
968
999
  }
969
- ]
1000
+ ],
1001
+ "type": "stack",
1002
+ "gap": "sm"
970
1003
  },
971
1004
  {
972
1005
  "type": "divider"
973
1006
  },
974
1007
  {
975
- "type": "alert",
976
- "variant": "warning",
977
- "message": "Token usage approaching limit. Consider compacting."
978
- },
979
- {
1008
+ "max": "@entity.max",
980
1009
  "type": "progress-bar",
981
- "value": "@entity.current",
982
- "max": "@entity.max"
1010
+ "value": "@entity.current"
983
1011
  },
984
1012
  {
985
1013
  "type": "stack",
986
1014
  "direction": "horizontal",
987
- "gap": "md",
988
1015
  "children": [
989
1016
  {
990
1017
  "type": "stat-display",
991
- "label": "Tokens Used",
992
- "value": "@entity.current"
1018
+ "value": "@entity.current",
1019
+ "label": "Tokens Used"
993
1020
  },
994
1021
  {
995
- "type": "stat-display",
1022
+ "value": "@entity.max",
996
1023
  "label": "Max Tokens",
997
- "value": "@entity.max"
1024
+ "type": "stat-display"
998
1025
  }
999
- ]
1026
+ ],
1027
+ "gap": "md"
1000
1028
  },
1001
1029
  {
1002
- "type": "stack",
1003
- "direction": "horizontal",
1004
- "gap": "sm",
1005
- "children": [
1006
- {
1007
- "type": "button",
1008
- "label": "Compact",
1009
- "event": "COMPACT",
1010
- "variant": "primary",
1011
- "icon": "minimize-2"
1012
- },
1013
- {
1014
- "type": "button",
1015
- "label": "Reset",
1016
- "event": "RESET",
1017
- "variant": "ghost",
1018
- "icon": "rotate-ccw"
1019
- }
1020
- ]
1030
+ "label": "Reset",
1031
+ "event": "RESET",
1032
+ "icon": "rotate-ccw",
1033
+ "variant": "ghost",
1034
+ "type": "button"
1021
1035
  }
1022
1036
  ]
1023
1037
  }
@@ -1025,52 +1039,48 @@
1025
1039
  ]
1026
1040
  },
1027
1041
  {
1028
- "from": "critical",
1042
+ "from": "warning",
1029
1043
  "to": "normal",
1030
- "event": "UPDATE",
1031
- "guard": [
1032
- "<",
1044
+ "event": "COMPACT",
1045
+ "effects": [
1033
1046
  [
1034
- "/",
1035
- "@payload.current",
1036
- "@entity.max"
1047
+ "agent/compact"
1037
1048
  ],
1038
- 0.85
1039
- ],
1040
- "effects": [
1041
1049
  [
1042
1050
  "set",
1043
- "@entity.current",
1044
- "@payload.current"
1051
+ "@entity.lastCompactedAt",
1052
+ "@now"
1053
+ ],
1054
+ [
1055
+ "agent/token-count"
1045
1056
  ],
1046
1057
  [
1047
1058
  "render-ui",
1048
1059
  "main",
1049
1060
  {
1050
- "type": "stack",
1051
- "direction": "vertical",
1052
1061
  "gap": "lg",
1062
+ "direction": "vertical",
1053
1063
  "children": [
1054
1064
  {
1055
- "type": "stack",
1056
1065
  "direction": "horizontal",
1057
1066
  "gap": "sm",
1067
+ "type": "stack",
1058
1068
  "align": "center",
1059
1069
  "children": [
1060
1070
  {
1061
- "type": "icon",
1062
1071
  "name": "gauge",
1063
- "size": "lg"
1072
+ "size": "lg",
1073
+ "type": "icon"
1064
1074
  },
1065
1075
  {
1066
- "type": "typography",
1067
1076
  "content": "Token Usage",
1077
+ "type": "typography",
1068
1078
  "variant": "h2"
1069
1079
  },
1070
1080
  {
1071
- "type": "badge",
1072
1081
  "label": "Normal",
1073
- "variant": "default"
1082
+ "variant": "default",
1083
+ "type": "badge"
1074
1084
  }
1075
1085
  ]
1076
1086
  },
@@ -1079,67 +1089,60 @@
1079
1089
  },
1080
1090
  {
1081
1091
  "type": "progress-bar",
1082
- "value": "@entity.current",
1083
- "max": "@entity.max"
1092
+ "max": "@entity.max",
1093
+ "value": "@entity.current"
1084
1094
  },
1085
1095
  {
1086
- "type": "stack",
1087
- "direction": "horizontal",
1088
- "gap": "md",
1089
1096
  "children": [
1090
1097
  {
1091
- "type": "stat-display",
1092
1098
  "label": "Tokens Used",
1093
- "value": "@entity.current"
1099
+ "value": "@entity.current",
1100
+ "type": "stat-display"
1094
1101
  },
1095
1102
  {
1096
1103
  "type": "stat-display",
1097
- "label": "Max Tokens",
1098
- "value": "@entity.max"
1104
+ "value": "@entity.max",
1105
+ "label": "Max Tokens"
1099
1106
  }
1100
- ]
1107
+ ],
1108
+ "direction": "horizontal",
1109
+ "gap": "md",
1110
+ "type": "stack"
1101
1111
  },
1102
1112
  {
1103
- "type": "button",
1104
1113
  "label": "Reset",
1114
+ "type": "button",
1105
1115
  "event": "RESET",
1106
1116
  "variant": "ghost",
1107
1117
  "icon": "rotate-ccw"
1108
1118
  }
1109
- ]
1119
+ ],
1120
+ "type": "stack"
1110
1121
  }
1111
1122
  ]
1112
1123
  ]
1113
1124
  },
1114
1125
  {
1115
- "from": "normal",
1126
+ "from": "warning",
1116
1127
  "to": "normal",
1117
- "event": "COMPACT",
1128
+ "event": "RESET",
1118
1129
  "effects": [
1119
- [
1120
- "agent/compact"
1121
- ],
1122
1130
  [
1123
1131
  "set",
1124
- "@entity.lastCompactedAt",
1125
- "@now"
1126
- ],
1127
- [
1128
- "agent/token-count"
1132
+ "@entity.current",
1133
+ 0.0
1129
1134
  ],
1130
1135
  [
1131
1136
  "render-ui",
1132
1137
  "main",
1133
1138
  {
1134
- "type": "stack",
1135
- "direction": "vertical",
1136
1139
  "gap": "lg",
1137
1140
  "children": [
1138
1141
  {
1139
- "type": "stack",
1140
- "direction": "horizontal",
1141
1142
  "gap": "sm",
1143
+ "type": "stack",
1142
1144
  "align": "center",
1145
+ "direction": "horizontal",
1143
1146
  "children": [
1144
1147
  {
1145
1148
  "type": "icon",
@@ -1162,98 +1165,104 @@
1162
1165
  "type": "divider"
1163
1166
  },
1164
1167
  {
1165
- "type": "progress-bar",
1166
1168
  "value": "@entity.current",
1167
- "max": "@entity.max"
1169
+ "max": "@entity.max",
1170
+ "type": "progress-bar"
1168
1171
  },
1169
1172
  {
1170
- "type": "stack",
1171
1173
  "direction": "horizontal",
1172
1174
  "gap": "md",
1173
1175
  "children": [
1174
1176
  {
1175
- "type": "stat-display",
1176
1177
  "label": "Tokens Used",
1177
- "value": "@entity.current"
1178
+ "value": "@entity.current",
1179
+ "type": "stat-display"
1178
1180
  },
1179
1181
  {
1180
- "type": "stat-display",
1182
+ "value": "@entity.max",
1181
1183
  "label": "Max Tokens",
1182
- "value": "@entity.max"
1184
+ "type": "stat-display"
1183
1185
  }
1184
- ]
1186
+ ],
1187
+ "type": "stack"
1185
1188
  },
1186
1189
  {
1187
- "type": "button",
1188
- "label": "Reset",
1189
1190
  "event": "RESET",
1191
+ "type": "button",
1192
+ "icon": "rotate-ccw",
1190
1193
  "variant": "ghost",
1191
- "icon": "rotate-ccw"
1194
+ "label": "Reset"
1192
1195
  }
1193
- ]
1196
+ ],
1197
+ "type": "stack",
1198
+ "direction": "vertical"
1194
1199
  }
1195
1200
  ]
1196
1201
  ]
1197
1202
  },
1198
1203
  {
1199
- "from": "warning",
1200
- "to": "normal",
1201
- "event": "COMPACT",
1202
- "effects": [
1204
+ "from": "critical",
1205
+ "to": "critical",
1206
+ "event": "UPDATE",
1207
+ "guard": [
1208
+ ">=",
1203
1209
  [
1204
- "agent/compact"
1210
+ "/",
1211
+ "@payload.current",
1212
+ "@entity.max"
1205
1213
  ],
1214
+ 0.95
1215
+ ],
1216
+ "effects": [
1206
1217
  [
1207
1218
  "set",
1208
- "@entity.lastCompactedAt",
1209
- "@now"
1210
- ],
1211
- [
1212
- "agent/token-count"
1219
+ "@entity.current",
1220
+ "@payload.current"
1213
1221
  ],
1214
1222
  [
1215
1223
  "render-ui",
1216
1224
  "main",
1217
1225
  {
1218
- "type": "stack",
1219
- "direction": "vertical",
1220
- "gap": "lg",
1221
1226
  "children": [
1222
1227
  {
1223
- "type": "stack",
1224
- "direction": "horizontal",
1225
- "gap": "sm",
1226
- "align": "center",
1227
1228
  "children": [
1228
1229
  {
1229
1230
  "type": "icon",
1230
- "name": "gauge",
1231
+ "name": "alert-octagon",
1231
1232
  "size": "lg"
1232
1233
  },
1233
1234
  {
1234
1235
  "type": "typography",
1235
- "content": "Token Usage",
1236
- "variant": "h2"
1236
+ "variant": "h2",
1237
+ "content": "Token Usage"
1237
1238
  },
1238
1239
  {
1239
- "type": "badge",
1240
- "label": "Normal",
1241
- "variant": "default"
1240
+ "variant": "destructive",
1241
+ "label": "Critical",
1242
+ "type": "badge"
1242
1243
  }
1243
- ]
1244
+ ],
1245
+ "direction": "horizontal",
1246
+ "type": "stack",
1247
+ "gap": "sm",
1248
+ "align": "center"
1244
1249
  },
1245
1250
  {
1246
1251
  "type": "divider"
1247
1252
  },
1248
1253
  {
1254
+ "message": "Token usage critical. Compact immediately to avoid truncation.",
1255
+ "type": "alert",
1256
+ "variant": "error"
1257
+ },
1258
+ {
1259
+ "max": "@entity.max",
1249
1260
  "type": "progress-bar",
1250
- "value": "@entity.current",
1251
- "max": "@entity.max"
1261
+ "value": "@entity.current"
1252
1262
  },
1253
1263
  {
1254
- "type": "stack",
1255
- "direction": "horizontal",
1256
1264
  "gap": "md",
1265
+ "direction": "horizontal",
1257
1266
  "children": [
1258
1267
  {
1259
1268
  "type": "stat-display",
@@ -1261,102 +1270,154 @@
1261
1270
  "value": "@entity.current"
1262
1271
  },
1263
1272
  {
1264
- "type": "stat-display",
1273
+ "value": "@entity.max",
1265
1274
  "label": "Max Tokens",
1266
- "value": "@entity.max"
1275
+ "type": "stat-display"
1267
1276
  }
1268
- ]
1277
+ ],
1278
+ "type": "stack"
1269
1279
  },
1270
1280
  {
1271
- "type": "button",
1272
- "label": "Reset",
1273
- "event": "RESET",
1274
- "variant": "ghost",
1275
- "icon": "rotate-ccw"
1281
+ "children": [
1282
+ {
1283
+ "event": "COMPACT",
1284
+ "label": "Compact Now",
1285
+ "type": "button",
1286
+ "variant": "primary",
1287
+ "icon": "minimize-2"
1288
+ },
1289
+ {
1290
+ "label": "Reset",
1291
+ "variant": "ghost",
1292
+ "type": "button",
1293
+ "event": "RESET",
1294
+ "icon": "rotate-ccw"
1295
+ }
1296
+ ],
1297
+ "gap": "sm",
1298
+ "direction": "horizontal",
1299
+ "type": "stack"
1276
1300
  }
1277
- ]
1301
+ ],
1302
+ "gap": "lg",
1303
+ "direction": "vertical",
1304
+ "type": "stack"
1278
1305
  }
1279
1306
  ]
1280
1307
  ]
1281
1308
  },
1282
1309
  {
1283
1310
  "from": "critical",
1284
- "to": "normal",
1285
- "event": "COMPACT",
1286
- "effects": [
1311
+ "to": "warning",
1312
+ "event": "UPDATE",
1313
+ "guard": [
1314
+ "and",
1287
1315
  [
1288
- "agent/compact"
1316
+ ">=",
1317
+ [
1318
+ "/",
1319
+ "@payload.current",
1320
+ "@entity.max"
1321
+ ],
1322
+ 0.85
1289
1323
  ],
1290
1324
  [
1291
- "set",
1292
- "@entity.lastCompactedAt",
1293
- "@now"
1294
- ],
1325
+ "<",
1326
+ [
1327
+ "/",
1328
+ "@payload.current",
1329
+ "@entity.max"
1330
+ ],
1331
+ 0.95
1332
+ ]
1333
+ ],
1334
+ "effects": [
1295
1335
  [
1296
- "agent/token-count"
1336
+ "set",
1337
+ "@entity.current",
1338
+ "@payload.current"
1297
1339
  ],
1298
1340
  [
1299
1341
  "render-ui",
1300
1342
  "main",
1301
1343
  {
1302
1344
  "type": "stack",
1303
- "direction": "vertical",
1304
1345
  "gap": "lg",
1346
+ "direction": "vertical",
1305
1347
  "children": [
1306
1348
  {
1307
- "type": "stack",
1308
- "direction": "horizontal",
1309
- "gap": "sm",
1310
- "align": "center",
1311
1349
  "children": [
1312
1350
  {
1313
1351
  "type": "icon",
1314
- "name": "gauge",
1352
+ "name": "alert-triangle",
1315
1353
  "size": "lg"
1316
1354
  },
1317
1355
  {
1356
+ "variant": "h2",
1318
1357
  "type": "typography",
1319
- "content": "Token Usage",
1320
- "variant": "h2"
1358
+ "content": "Token Usage"
1321
1359
  },
1322
1360
  {
1361
+ "label": "Warning",
1323
1362
  "type": "badge",
1324
- "label": "Normal",
1325
- "variant": "default"
1363
+ "variant": "warning"
1326
1364
  }
1327
- ]
1365
+ ],
1366
+ "gap": "sm",
1367
+ "align": "center",
1368
+ "type": "stack",
1369
+ "direction": "horizontal"
1328
1370
  },
1329
1371
  {
1330
1372
  "type": "divider"
1331
1373
  },
1332
1374
  {
1333
- "type": "progress-bar",
1375
+ "variant": "warning",
1376
+ "message": "Token usage approaching limit. Consider compacting.",
1377
+ "type": "alert"
1378
+ },
1379
+ {
1380
+ "max": "@entity.max",
1334
1381
  "value": "@entity.current",
1335
- "max": "@entity.max"
1382
+ "type": "progress-bar"
1336
1383
  },
1337
1384
  {
1338
- "type": "stack",
1339
- "direction": "horizontal",
1340
1385
  "gap": "md",
1386
+ "type": "stack",
1341
1387
  "children": [
1342
1388
  {
1343
- "type": "stat-display",
1344
1389
  "label": "Tokens Used",
1345
- "value": "@entity.current"
1390
+ "value": "@entity.current",
1391
+ "type": "stat-display"
1346
1392
  },
1347
1393
  {
1348
1394
  "type": "stat-display",
1349
1395
  "label": "Max Tokens",
1350
1396
  "value": "@entity.max"
1351
1397
  }
1352
- ]
1398
+ ],
1399
+ "direction": "horizontal"
1353
1400
  },
1354
1401
  {
1355
- "type": "button",
1356
- "label": "Reset",
1357
- "event": "RESET",
1358
- "variant": "ghost",
1359
- "icon": "rotate-ccw"
1402
+ "gap": "sm",
1403
+ "type": "stack",
1404
+ "direction": "horizontal",
1405
+ "children": [
1406
+ {
1407
+ "label": "Compact",
1408
+ "event": "COMPACT",
1409
+ "type": "button",
1410
+ "variant": "primary",
1411
+ "icon": "minimize-2"
1412
+ },
1413
+ {
1414
+ "icon": "rotate-ccw",
1415
+ "variant": "ghost",
1416
+ "type": "button",
1417
+ "label": "Reset",
1418
+ "event": "RESET"
1419
+ }
1420
+ ]
1360
1421
  }
1361
1422
  ]
1362
1423
  }
@@ -1364,43 +1425,49 @@
1364
1425
  ]
1365
1426
  },
1366
1427
  {
1367
- "from": "normal",
1428
+ "from": "critical",
1368
1429
  "to": "normal",
1369
- "event": "RESET",
1430
+ "event": "UPDATE",
1431
+ "guard": [
1432
+ "<",
1433
+ [
1434
+ "/",
1435
+ "@payload.current",
1436
+ "@entity.max"
1437
+ ],
1438
+ 0.85
1439
+ ],
1370
1440
  "effects": [
1371
1441
  [
1372
1442
  "set",
1373
1443
  "@entity.current",
1374
- 0
1444
+ "@payload.current"
1375
1445
  ],
1376
1446
  [
1377
1447
  "render-ui",
1378
1448
  "main",
1379
1449
  {
1380
- "type": "stack",
1381
- "direction": "vertical",
1382
- "gap": "lg",
1383
1450
  "children": [
1384
1451
  {
1385
1452
  "type": "stack",
1453
+ "align": "center",
1386
1454
  "direction": "horizontal",
1387
1455
  "gap": "sm",
1388
- "align": "center",
1389
1456
  "children": [
1390
1457
  {
1391
- "type": "icon",
1458
+ "size": "lg",
1392
1459
  "name": "gauge",
1393
- "size": "lg"
1460
+ "type": "icon"
1394
1461
  },
1395
1462
  {
1396
- "type": "typography",
1397
1463
  "content": "Token Usage",
1464
+ "type": "typography",
1398
1465
  "variant": "h2"
1399
1466
  },
1400
1467
  {
1468
+ "variant": "default",
1401
1469
  "type": "badge",
1402
- "label": "Normal",
1403
- "variant": "default"
1470
+ "label": "Normal"
1404
1471
  }
1405
1472
  ]
1406
1473
  },
@@ -1413,61 +1480,69 @@
1413
1480
  "max": "@entity.max"
1414
1481
  },
1415
1482
  {
1416
- "type": "stack",
1417
- "direction": "horizontal",
1418
1483
  "gap": "md",
1484
+ "direction": "horizontal",
1419
1485
  "children": [
1420
1486
  {
1421
- "type": "stat-display",
1422
1487
  "label": "Tokens Used",
1423
- "value": "@entity.current"
1488
+ "value": "@entity.current",
1489
+ "type": "stat-display"
1424
1490
  },
1425
1491
  {
1426
- "type": "stat-display",
1427
1492
  "label": "Max Tokens",
1428
- "value": "@entity.max"
1493
+ "value": "@entity.max",
1494
+ "type": "stat-display"
1429
1495
  }
1430
- ]
1496
+ ],
1497
+ "type": "stack"
1431
1498
  },
1432
1499
  {
1433
- "type": "button",
1434
1500
  "label": "Reset",
1435
- "event": "RESET",
1501
+ "icon": "rotate-ccw",
1436
1502
  "variant": "ghost",
1437
- "icon": "rotate-ccw"
1503
+ "event": "RESET",
1504
+ "type": "button"
1438
1505
  }
1439
- ]
1506
+ ],
1507
+ "direction": "vertical",
1508
+ "type": "stack",
1509
+ "gap": "lg"
1440
1510
  }
1441
1511
  ]
1442
1512
  ]
1443
1513
  },
1444
1514
  {
1445
- "from": "warning",
1515
+ "from": "critical",
1446
1516
  "to": "normal",
1447
- "event": "RESET",
1517
+ "event": "COMPACT",
1448
1518
  "effects": [
1519
+ [
1520
+ "agent/compact"
1521
+ ],
1449
1522
  [
1450
1523
  "set",
1451
- "@entity.current",
1452
- 0
1524
+ "@entity.lastCompactedAt",
1525
+ "@now"
1526
+ ],
1527
+ [
1528
+ "agent/token-count"
1453
1529
  ],
1454
1530
  [
1455
1531
  "render-ui",
1456
1532
  "main",
1457
1533
  {
1458
- "type": "stack",
1459
1534
  "direction": "vertical",
1460
1535
  "gap": "lg",
1536
+ "type": "stack",
1461
1537
  "children": [
1462
1538
  {
1463
- "type": "stack",
1464
- "direction": "horizontal",
1465
- "gap": "sm",
1466
1539
  "align": "center",
1540
+ "gap": "sm",
1541
+ "type": "stack",
1467
1542
  "children": [
1468
1543
  {
1469
- "type": "icon",
1470
1544
  "name": "gauge",
1545
+ "type": "icon",
1471
1546
  "size": "lg"
1472
1547
  },
1473
1548
  {
@@ -1476,24 +1551,25 @@
1476
1551
  "variant": "h2"
1477
1552
  },
1478
1553
  {
1554
+ "variant": "default",
1479
1555
  "type": "badge",
1480
- "label": "Normal",
1481
- "variant": "default"
1556
+ "label": "Normal"
1482
1557
  }
1483
- ]
1558
+ ],
1559
+ "direction": "horizontal"
1484
1560
  },
1485
1561
  {
1486
1562
  "type": "divider"
1487
1563
  },
1488
1564
  {
1489
1565
  "type": "progress-bar",
1490
- "value": "@entity.current",
1491
- "max": "@entity.max"
1566
+ "max": "@entity.max",
1567
+ "value": "@entity.current"
1492
1568
  },
1493
1569
  {
1494
1570
  "type": "stack",
1495
- "direction": "horizontal",
1496
1571
  "gap": "md",
1572
+ "direction": "horizontal",
1497
1573
  "children": [
1498
1574
  {
1499
1575
  "type": "stat-display",
@@ -1501,18 +1577,18 @@
1501
1577
  "value": "@entity.current"
1502
1578
  },
1503
1579
  {
1504
- "type": "stat-display",
1505
1580
  "label": "Max Tokens",
1506
- "value": "@entity.max"
1581
+ "value": "@entity.max",
1582
+ "type": "stat-display"
1507
1583
  }
1508
1584
  ]
1509
1585
  },
1510
1586
  {
1511
1587
  "type": "button",
1512
- "label": "Reset",
1513
1588
  "event": "RESET",
1589
+ "icon": "rotate-ccw",
1514
1590
  "variant": "ghost",
1515
- "icon": "rotate-ccw"
1591
+ "label": "Reset"
1516
1592
  }
1517
1593
  ]
1518
1594
  }
@@ -1527,56 +1603,55 @@
1527
1603
  [
1528
1604
  "set",
1529
1605
  "@entity.current",
1530
- 0
1606
+ 0.0
1531
1607
  ],
1532
1608
  [
1533
1609
  "render-ui",
1534
1610
  "main",
1535
1611
  {
1536
- "type": "stack",
1537
1612
  "direction": "vertical",
1538
1613
  "gap": "lg",
1539
1614
  "children": [
1540
1615
  {
1541
- "type": "stack",
1542
1616
  "direction": "horizontal",
1543
- "gap": "sm",
1544
1617
  "align": "center",
1545
1618
  "children": [
1546
1619
  {
1547
- "type": "icon",
1548
1620
  "name": "gauge",
1549
- "size": "lg"
1621
+ "size": "lg",
1622
+ "type": "icon"
1550
1623
  },
1551
1624
  {
1552
1625
  "type": "typography",
1553
- "content": "Token Usage",
1554
- "variant": "h2"
1626
+ "variant": "h2",
1627
+ "content": "Token Usage"
1555
1628
  },
1556
1629
  {
1630
+ "variant": "default",
1557
1631
  "type": "badge",
1558
- "label": "Normal",
1559
- "variant": "default"
1632
+ "label": "Normal"
1560
1633
  }
1561
- ]
1634
+ ],
1635
+ "gap": "sm",
1636
+ "type": "stack"
1562
1637
  },
1563
1638
  {
1564
1639
  "type": "divider"
1565
1640
  },
1566
1641
  {
1642
+ "max": "@entity.max",
1567
1643
  "type": "progress-bar",
1568
- "value": "@entity.current",
1569
- "max": "@entity.max"
1644
+ "value": "@entity.current"
1570
1645
  },
1571
1646
  {
1572
- "type": "stack",
1573
- "direction": "horizontal",
1574
1647
  "gap": "md",
1648
+ "direction": "horizontal",
1649
+ "type": "stack",
1575
1650
  "children": [
1576
1651
  {
1577
1652
  "type": "stat-display",
1578
- "label": "Tokens Used",
1579
- "value": "@entity.current"
1653
+ "value": "@entity.current",
1654
+ "label": "Tokens Used"
1580
1655
  },
1581
1656
  {
1582
1657
  "type": "stat-display",
@@ -1588,17 +1663,19 @@
1588
1663
  {
1589
1664
  "type": "button",
1590
1665
  "label": "Reset",
1591
- "event": "RESET",
1592
1666
  "variant": "ghost",
1593
- "icon": "rotate-ccw"
1667
+ "icon": "rotate-ccw",
1668
+ "event": "RESET"
1594
1669
  }
1595
- ]
1670
+ ],
1671
+ "type": "stack"
1596
1672
  }
1597
1673
  ]
1598
1674
  ]
1599
1675
  }
1600
1676
  ]
1601
- }
1677
+ },
1678
+ "scope": "instance"
1602
1679
  }
1603
1680
  ],
1604
1681
  "pages": [
@@ -1614,4 +1691,4 @@
1614
1691
  ]
1615
1692
  }
1616
1693
  ]
1617
- }
1694
+ }