@almadar/std 6.1.0 → 6.1.7

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 (446) hide show
  1. package/behaviors/{exports → registry}/atoms/std-agent-activity-log.orb +154 -124
  2. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-chat-thread.orb +4 -63
  3. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-classifier.orb +8 -14
  4. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-completion.orb +8 -14
  5. package/behaviors/{exports → registry}/atoms/std-agent-context-window.orb +4 -8
  6. package/behaviors/{exports → registry}/atoms/std-agent-conversation.orb +4 -79
  7. package/{dist/exports → behaviors/registry}/atoms/std-agent-memory.orb +13 -18
  8. package/behaviors/{exports → registry}/atoms/std-agent-provider.orb +9 -14
  9. package/{dist/exports → behaviors/registry}/atoms/std-agent-search.orb +5 -8
  10. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-agent-session.orb +11 -22
  11. package/behaviors/{exports → registry}/atoms/std-agent-step-progress.orb +4 -8
  12. package/{dist/exports → behaviors/registry}/atoms/std-agent-token-gauge.orb +4 -8
  13. package/behaviors/{exports → registry}/atoms/std-agent-tool-call.orb +8 -14
  14. package/behaviors/{exports → registry}/atoms/std-async.orb +4 -12
  15. package/{dist/exports → behaviors/registry}/atoms/std-autoregressive.orb +13 -2
  16. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-browse.orb +4 -8
  17. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-cache-aside.orb +4 -12
  18. package/{dist/exports → behaviors/registry}/atoms/std-calendar.orb +4 -8
  19. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-circuit-breaker.orb +4 -8
  20. package/behaviors/registry/atoms/std-classifier.orb.unconvertible.txt +7 -0
  21. package/behaviors/{exports → registry}/atoms/std-collision.orb +4 -8
  22. package/{dist/exports → behaviors/registry}/atoms/std-combat-log.orb +4 -8
  23. package/behaviors/{exports → registry}/atoms/std-combat.orb +4 -8
  24. package/{dist/exports → behaviors/registry}/atoms/std-confirmation.orb +6 -5
  25. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-dialogue-box.orb +4 -8
  26. package/behaviors/{exports → registry}/atoms/std-display.orb +4 -153
  27. package/{dist/exports → behaviors/registry}/atoms/std-drawer.orb +4 -58
  28. package/behaviors/{exports → registry}/atoms/std-filter.orb +4 -8
  29. package/{dist/exports → behaviors/registry}/atoms/std-flip-card.orb +4 -8
  30. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-gallery.orb +4 -8
  31. package/{dist/exports → behaviors/registry}/atoms/std-game-audio.orb +4 -8
  32. package/{dist/exports → behaviors/registry}/atoms/std-game-canvas2d.orb +3 -6
  33. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-game-canvas3d.orb +3 -6
  34. package/{dist/exports → behaviors/registry}/atoms/std-game-hud.orb +4 -16
  35. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-game-menu.orb +4 -8
  36. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-game-over-screen.orb +4 -8
  37. package/{dist/exports → behaviors/registry}/atoms/std-gameflow.orb +4 -8
  38. package/behaviors/registry/atoms/std-graph-classifier.orb.unconvertible.txt +7 -0
  39. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-input.orb +4 -8
  40. package/{dist/exports → behaviors/registry}/atoms/std-inventory-panel.orb +4 -12
  41. package/{dist/exports → behaviors/registry}/atoms/std-isometric-canvas.orb +4 -8
  42. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-loading.orb +4 -8
  43. package/behaviors/{exports → registry}/atoms/std-modal.orb +12 -9
  44. package/behaviors/{exports → registry}/atoms/std-movement.orb +4 -8
  45. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-notification.orb +4 -8
  46. package/{dist/exports → behaviors/registry}/atoms/std-overworld.orb +4 -8
  47. package/behaviors/{exports → registry}/atoms/std-pagination.orb +4 -8
  48. package/behaviors/{exports → registry}/atoms/std-physics2d.orb +4 -8
  49. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-platformer-canvas.orb +4 -8
  50. package/{dist/exports → behaviors/registry}/atoms/std-quest.orb +5 -14
  51. package/{dist/exports → behaviors/registry}/atoms/std-rate-limiter.orb +4 -8
  52. package/{dist/exports → behaviors/registry}/atoms/std-rating.orb +4 -8
  53. package/behaviors/registry/atoms/std-rl-agent.orb.unconvertible.txt +7 -0
  54. package/{dist/exports → behaviors/registry}/atoms/std-score-board.orb +4 -8
  55. package/{dist/exports → behaviors/registry}/atoms/std-score.orb +4 -8
  56. package/{dist/exports → behaviors/registry}/atoms/std-search.orb +4 -8
  57. package/{dist/exports → behaviors/registry}/atoms/std-selection.orb +4 -8
  58. package/{dist/exports → behaviors/registry}/atoms/std-service-custom-bearer.orb +4 -19
  59. package/{dist/exports → behaviors/registry}/atoms/std-service-custom-header.orb +4 -21
  60. package/behaviors/{exports → registry}/atoms/std-service-custom-noauth.orb +4 -15
  61. package/{dist/exports → behaviors/registry}/atoms/std-service-custom-query.orb +4 -21
  62. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-email.orb +4 -8
  63. package/{dist/exports → behaviors/registry}/atoms/std-service-github.orb +4 -8
  64. package/behaviors/{exports → registry}/atoms/std-service-llm.orb +4 -8
  65. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-oauth.orb +4 -8
  66. package/behaviors/{exports → registry}/atoms/std-service-redis.orb +4 -8
  67. package/{dist/exports → behaviors/registry}/atoms/std-service-storage.orb +4 -8
  68. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-stripe.orb +4 -8
  69. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-service-twilio.orb +4 -8
  70. package/{dist/exports → behaviors/registry}/atoms/std-service-youtube.orb +4 -8
  71. package/{dist/exports → behaviors/registry}/atoms/std-simulation-canvas.orb +4 -8
  72. package/{dist/exports → behaviors/registry}/atoms/std-sort.orb +4 -52
  73. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-sprite.orb +4 -8
  74. package/behaviors/{exports → registry}/atoms/std-tabs.orb +4 -16
  75. package/behaviors/registry/atoms/std-text-classifier.orb.unconvertible.txt +7 -0
  76. package/{dist/exports → behaviors/registry}/atoms/std-text-effects.orb +4 -8
  77. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-theme.orb +4 -8
  78. package/behaviors/{exports → registry}/atoms/std-timer.orb +4 -8
  79. package/behaviors/registry/atoms/std-trainer.orb.unconvertible.txt +7 -0
  80. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-undo.orb +4 -8
  81. package/{dist/behaviors/exports → behaviors/registry}/atoms/std-upload.orb +4 -8
  82. package/{dist/exports → behaviors/registry}/atoms/std-validate-on-save.orb +4 -32
  83. package/{dist/exports → behaviors/registry}/atoms/std-wizard.orb +4 -26
  84. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-agent-fix-loop.orb +1136 -1721
  85. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-agent-learner.orb +606 -839
  86. package/behaviors/{exports → registry}/molecules/std-agent-planner.orb +613 -869
  87. package/behaviors/{exports → registry}/molecules/std-agent-rag.orb +562 -768
  88. package/behaviors/registry/molecules/std-agent-tool-loop.orb +2507 -0
  89. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-builder-game.orb +4 -8
  90. package/{dist/exports → behaviors/registry}/molecules/std-cart.orb +197 -318
  91. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-classifier-game.orb +4 -8
  92. package/{dist/exports → behaviors/registry}/molecules/std-debugger-game.orb +4 -8
  93. package/behaviors/registry/molecules/std-detail.orb +439 -0
  94. package/behaviors/{exports → registry}/molecules/std-event-handler-game.orb +4 -8
  95. package/{dist/exports → behaviors/registry}/molecules/std-form-advanced.orb +4 -12
  96. package/behaviors/registry/molecules/std-geospatial.orb +502 -0
  97. package/behaviors/registry/molecules/std-inventory.orb +564 -0
  98. package/behaviors/registry/molecules/std-list.orb +707 -0
  99. package/behaviors/registry/molecules/std-messaging.orb +424 -0
  100. package/behaviors/{exports → registry}/molecules/std-negotiator-game.orb +4 -8
  101. package/behaviors/{exports → registry}/molecules/std-platformer-game.orb +4 -8
  102. package/behaviors/{exports → registry}/molecules/std-puzzle-game.orb +4 -8
  103. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-quiz.orb +4 -8
  104. package/{dist/exports → behaviors/registry}/molecules/std-sequencer-game.orb +4 -8
  105. package/behaviors/{exports → registry}/molecules/std-service-content-pipeline.orb +4 -8
  106. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-service-custom-api-tester.orb +4 -46
  107. package/{dist/exports → behaviors/registry}/molecules/std-service-devops-toolkit.orb +4 -8
  108. package/{dist/exports → behaviors/registry}/molecules/std-service-notification-hub.orb +4 -8
  109. package/{dist/exports → behaviors/registry}/molecules/std-service-payment-flow.orb +8 -10
  110. package/behaviors/{exports → registry}/molecules/std-simulator-game.orb +4 -8
  111. package/{dist/behaviors/exports → behaviors/registry}/molecules/std-turn-based-battle.orb +4 -8
  112. package/{dist/exports → behaviors/registry}/organisms/std-agent-assistant.orb +24 -38
  113. package/behaviors/{exports → registry}/organisms/std-agent-builder.orb +816 -1320
  114. package/{dist/exports → behaviors/registry}/organisms/std-agent-pipeline.orb +785 -1283
  115. package/{dist/exports → behaviors/registry}/organisms/std-agent-reviewer.orb +308 -372
  116. package/{dist/exports → behaviors/registry}/organisms/std-agent-tutor.orb +325 -387
  117. package/{dist/exports → behaviors/registry}/organisms/std-api-gateway.orb +24 -26
  118. package/{dist/exports → behaviors/registry}/organisms/std-arcade-game.orb +4 -4
  119. package/{dist/exports → behaviors/registry}/organisms/std-booking-system.orb +44 -48
  120. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-cicd-pipeline.orb +24 -30
  121. package/behaviors/{exports → registry}/organisms/std-cms.orb +50 -55
  122. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-coding-academy.orb +4 -4
  123. package/{dist/exports → behaviors/registry}/organisms/std-crm.orb +50 -55
  124. package/{dist/exports → behaviors/registry}/organisms/std-devops-dashboard.orb +24 -26
  125. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-ecommerce.orb +48 -58
  126. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-finance-tracker.orb +30 -33
  127. package/{dist/exports → behaviors/registry}/organisms/std-healthcare.orb +50 -55
  128. package/{dist/exports → behaviors/registry}/organisms/std-helpdesk.orb +30 -33
  129. package/behaviors/{exports → registry}/organisms/std-hr-portal.orb +44 -48
  130. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-iot-dashboard.orb +24 -26
  131. package/{dist/exports → behaviors/registry}/organisms/std-lms.orb +24 -26
  132. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-logic-training.orb +4 -4
  133. package/behaviors/{exports → registry}/organisms/std-platformer-app.orb +20 -24
  134. package/behaviors/{exports → registry}/organisms/std-project-manager.orb +44 -48
  135. package/{dist/exports → behaviors/registry}/organisms/std-puzzle-app.orb +4 -4
  136. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-realtime-chat.orb +30 -33
  137. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-rpg-game.orb +20 -28
  138. package/{dist/exports → behaviors/registry}/organisms/std-service-marketplace.orb +52 -58
  139. package/{dist/exports → behaviors/registry}/organisms/std-service-research-assistant.orb +4 -15
  140. package/behaviors/{exports → registry}/organisms/std-social-feed.orb +16 -18
  141. package/behaviors/{exports → registry}/organisms/std-stem-lab.orb +4 -4
  142. package/{dist/behaviors/exports → behaviors/registry}/organisms/std-strategy-game.orb +4 -4
  143. package/{dist/exports → behaviors/registry}/organisms/std-trading-dashboard.orb +24 -30
  144. package/dist/behaviors/{exports → registry}/atoms/std-agent-activity-log.orb +154 -124
  145. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-agent-chat-thread.orb +4 -63
  146. package/dist/{exports → behaviors/registry}/atoms/std-agent-classifier.orb +8 -14
  147. package/dist/{exports → behaviors/registry}/atoms/std-agent-completion.orb +8 -14
  148. package/dist/{exports → behaviors/registry}/atoms/std-agent-context-window.orb +4 -8
  149. package/dist/{exports → behaviors/registry}/atoms/std-agent-conversation.orb +4 -79
  150. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-agent-memory.orb +13 -18
  151. package/dist/{exports → behaviors/registry}/atoms/std-agent-provider.orb +9 -14
  152. package/dist/behaviors/{exports → registry}/atoms/std-agent-search.orb +5 -8
  153. package/dist/{exports → behaviors/registry}/atoms/std-agent-session.orb +11 -22
  154. package/dist/{exports → behaviors/registry}/atoms/std-agent-step-progress.orb +4 -8
  155. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-agent-token-gauge.orb +4 -8
  156. package/dist/behaviors/{exports → registry}/atoms/std-agent-tool-call.orb +8 -14
  157. package/dist/behaviors/{exports → registry}/atoms/std-async.orb +4 -12
  158. package/dist/behaviors/{exports → registry}/atoms/std-autoregressive.orb +13 -2
  159. package/dist/{exports → behaviors/registry}/atoms/std-browse.orb +4 -8
  160. package/dist/{exports → behaviors/registry}/atoms/std-cache-aside.orb +4 -12
  161. package/dist/behaviors/{exports → registry}/atoms/std-calendar.orb +4 -8
  162. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-circuit-breaker.orb +4 -8
  163. package/dist/behaviors/registry/atoms/std-classifier.orb.unconvertible.txt +7 -0
  164. package/dist/behaviors/{exports → registry}/atoms/std-collision.orb +4 -8
  165. package/dist/behaviors/{exports → registry}/atoms/std-combat-log.orb +4 -8
  166. package/dist/{exports → behaviors/registry}/atoms/std-combat.orb +4 -8
  167. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-confirmation.orb +6 -5
  168. package/dist/{exports → behaviors/registry}/atoms/std-dialogue-box.orb +4 -8
  169. package/dist/{exports → behaviors/registry}/atoms/std-display.orb +4 -153
  170. package/dist/behaviors/{exports → registry}/atoms/std-drawer.orb +4 -58
  171. package/dist/behaviors/{exports → registry}/atoms/std-filter.orb +4 -8
  172. package/dist/behaviors/{exports → registry}/atoms/std-flip-card.orb +4 -8
  173. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-gallery.orb +4 -8
  174. package/dist/behaviors/{exports → registry}/atoms/std-game-audio.orb +4 -8
  175. package/dist/behaviors/{exports → registry}/atoms/std-game-canvas2d.orb +3 -6
  176. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-game-canvas3d.orb +3 -6
  177. package/dist/behaviors/{exports → registry}/atoms/std-game-hud.orb +4 -16
  178. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-game-menu.orb +4 -8
  179. package/dist/{exports → behaviors/registry}/atoms/std-game-over-screen.orb +4 -8
  180. package/dist/behaviors/{exports → registry}/atoms/std-gameflow.orb +4 -8
  181. package/dist/behaviors/registry/atoms/std-graph-classifier.orb.unconvertible.txt +7 -0
  182. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-input.orb +4 -8
  183. package/dist/behaviors/{exports → registry}/atoms/std-inventory-panel.orb +4 -12
  184. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-isometric-canvas.orb +4 -8
  185. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-loading.orb +4 -8
  186. package/dist/{exports → behaviors/registry}/atoms/std-modal.orb +12 -9
  187. package/dist/behaviors/{exports → registry}/atoms/std-movement.orb +4 -8
  188. package/dist/{exports → behaviors/registry}/atoms/std-notification.orb +4 -8
  189. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-overworld.orb +4 -8
  190. package/dist/behaviors/{exports → registry}/atoms/std-pagination.orb +4 -8
  191. package/dist/behaviors/{exports → registry}/atoms/std-physics2d.orb +4 -8
  192. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-platformer-canvas.orb +4 -8
  193. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-quest.orb +5 -14
  194. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-rate-limiter.orb +4 -8
  195. package/dist/behaviors/{exports → registry}/atoms/std-rating.orb +4 -8
  196. package/dist/behaviors/registry/atoms/std-rl-agent.orb.unconvertible.txt +7 -0
  197. package/dist/behaviors/{exports → registry}/atoms/std-score-board.orb +4 -8
  198. package/dist/behaviors/{exports → registry}/atoms/std-score.orb +4 -8
  199. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-search.orb +4 -8
  200. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-selection.orb +4 -8
  201. package/dist/behaviors/{exports → registry}/atoms/std-service-custom-bearer.orb +4 -19
  202. package/dist/behaviors/{exports → registry}/atoms/std-service-custom-header.orb +4 -21
  203. package/dist/{exports → behaviors/registry}/atoms/std-service-custom-noauth.orb +4 -15
  204. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-service-custom-query.orb +4 -21
  205. package/dist/{exports → behaviors/registry}/atoms/std-service-email.orb +4 -8
  206. package/dist/behaviors/{exports → registry}/atoms/std-service-github.orb +4 -8
  207. package/dist/{exports → behaviors/registry}/atoms/std-service-llm.orb +4 -8
  208. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-service-oauth.orb +4 -8
  209. package/dist/behaviors/{exports → registry}/atoms/std-service-redis.orb +4 -8
  210. package/dist/behaviors/{exports → registry}/atoms/std-service-storage.orb +4 -8
  211. package/dist/{exports → behaviors/registry}/atoms/std-service-stripe.orb +4 -8
  212. package/dist/{exports → behaviors/registry}/atoms/std-service-twilio.orb +4 -8
  213. package/dist/behaviors/{exports → registry}/atoms/std-service-youtube.orb +4 -8
  214. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-simulation-canvas.orb +4 -8
  215. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-sort.orb +4 -52
  216. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-sprite.orb +4 -8
  217. package/dist/{exports → behaviors/registry}/atoms/std-tabs.orb +4 -16
  218. package/dist/behaviors/registry/atoms/std-text-classifier.orb.unconvertible.txt +7 -0
  219. package/dist/behaviors/{exports → registry}/atoms/std-text-effects.orb +4 -8
  220. package/dist/{exports → behaviors/registry}/atoms/std-theme.orb +4 -8
  221. package/dist/{exports → behaviors/registry}/atoms/std-timer.orb +4 -8
  222. package/dist/behaviors/registry/atoms/std-trainer.orb.unconvertible.txt +7 -0
  223. package/dist/{exports → behaviors/registry}/atoms/std-undo.orb +4 -8
  224. package/dist/{exports → behaviors/registry}/atoms/std-upload.orb +4 -8
  225. package/{behaviors/exports → dist/behaviors/registry}/atoms/std-validate-on-save.orb +4 -32
  226. package/dist/behaviors/{exports → registry}/atoms/std-wizard.orb +4 -26
  227. package/dist/{exports → behaviors/registry}/molecules/std-agent-fix-loop.orb +1136 -1721
  228. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-agent-learner.orb +606 -839
  229. package/dist/{exports → behaviors/registry}/molecules/std-agent-planner.orb +613 -869
  230. package/dist/behaviors/{exports → registry}/molecules/std-agent-rag.orb +562 -768
  231. package/dist/behaviors/registry/molecules/std-agent-tool-loop.orb +2507 -0
  232. package/dist/{exports → behaviors/registry}/molecules/std-builder-game.orb +4 -8
  233. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-cart.orb +197 -318
  234. package/dist/{exports → behaviors/registry}/molecules/std-classifier-game.orb +4 -8
  235. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-debugger-game.orb +4 -8
  236. package/dist/behaviors/registry/molecules/std-detail.orb +439 -0
  237. package/dist/{exports → behaviors/registry}/molecules/std-event-handler-game.orb +4 -8
  238. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-form-advanced.orb +4 -12
  239. package/dist/behaviors/registry/molecules/std-geospatial.orb +502 -0
  240. package/dist/behaviors/registry/molecules/std-inventory.orb +564 -0
  241. package/dist/behaviors/registry/molecules/std-list.orb +707 -0
  242. package/dist/behaviors/registry/molecules/std-messaging.orb +424 -0
  243. package/dist/{exports → behaviors/registry}/molecules/std-negotiator-game.orb +4 -8
  244. package/dist/{exports → behaviors/registry}/molecules/std-platformer-game.orb +4 -8
  245. package/dist/behaviors/{exports → registry}/molecules/std-puzzle-game.orb +4 -8
  246. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-quiz.orb +4 -8
  247. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-sequencer-game.orb +4 -8
  248. package/dist/{exports → behaviors/registry}/molecules/std-service-content-pipeline.orb +4 -8
  249. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-custom-api-tester.orb +4 -46
  250. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-devops-toolkit.orb +4 -8
  251. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-notification-hub.orb +4 -8
  252. package/{behaviors/exports → dist/behaviors/registry}/molecules/std-service-payment-flow.orb +8 -10
  253. package/dist/{exports → behaviors/registry}/molecules/std-simulator-game.orb +4 -8
  254. package/dist/{exports → behaviors/registry}/molecules/std-turn-based-battle.orb +4 -8
  255. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-agent-assistant.orb +24 -38
  256. package/dist/{exports → behaviors/registry}/organisms/std-agent-builder.orb +816 -1320
  257. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-agent-pipeline.orb +785 -1283
  258. package/dist/behaviors/{exports → registry}/organisms/std-agent-reviewer.orb +308 -372
  259. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-agent-tutor.orb +325 -387
  260. package/dist/behaviors/{exports → registry}/organisms/std-api-gateway.orb +24 -26
  261. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-arcade-game.orb +4 -4
  262. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-booking-system.orb +44 -48
  263. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-cicd-pipeline.orb +24 -30
  264. package/dist/{exports → behaviors/registry}/organisms/std-cms.orb +50 -55
  265. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-coding-academy.orb +4 -4
  266. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-crm.orb +50 -55
  267. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-devops-dashboard.orb +24 -26
  268. package/dist/{exports → behaviors/registry}/organisms/std-ecommerce.orb +48 -58
  269. package/dist/{exports → behaviors/registry}/organisms/std-finance-tracker.orb +30 -33
  270. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-healthcare.orb +50 -55
  271. package/dist/behaviors/{exports → registry}/organisms/std-helpdesk.orb +30 -33
  272. package/dist/behaviors/{exports → registry}/organisms/std-hr-portal.orb +44 -48
  273. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-iot-dashboard.orb +24 -26
  274. package/dist/behaviors/{exports → registry}/organisms/std-lms.orb +24 -26
  275. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-logic-training.orb +4 -4
  276. package/dist/behaviors/{exports → registry}/organisms/std-platformer-app.orb +20 -24
  277. package/dist/{exports → behaviors/registry}/organisms/std-project-manager.orb +44 -48
  278. package/dist/behaviors/{exports → registry}/organisms/std-puzzle-app.orb +4 -4
  279. package/dist/{exports → behaviors/registry}/organisms/std-realtime-chat.orb +30 -33
  280. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-rpg-game.orb +20 -28
  281. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-service-marketplace.orb +52 -58
  282. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-service-research-assistant.orb +4 -15
  283. package/dist/{exports → behaviors/registry}/organisms/std-social-feed.orb +16 -18
  284. package/dist/{exports → behaviors/registry}/organisms/std-stem-lab.orb +4 -4
  285. package/{behaviors/exports → dist/behaviors/registry}/organisms/std-strategy-game.orb +4 -4
  286. package/dist/behaviors/{exports → registry}/organisms/std-trading-dashboard.orb +24 -30
  287. package/package.json +2 -2
  288. package/behaviors/exports/atoms/std-agent-classifier.orb +0 -879
  289. package/behaviors/exports/atoms/std-agent-completion.orb +0 -941
  290. package/behaviors/exports/atoms/std-agent-search.orb +0 -431
  291. package/behaviors/exports/atoms/std-agent-session.orb +0 -777
  292. package/behaviors/exports/atoms/std-autoregressive.orb +0 -420
  293. package/behaviors/exports/atoms/std-browse.orb +0 -251
  294. package/behaviors/exports/atoms/std-cache-aside.orb +0 -1101
  295. package/behaviors/exports/atoms/std-calendar.orb +0 -775
  296. package/behaviors/exports/atoms/std-combat-log.orb +0 -268
  297. package/behaviors/exports/atoms/std-dialogue-box.orb +0 -249
  298. package/behaviors/exports/atoms/std-drawer.orb +0 -578
  299. package/behaviors/exports/atoms/std-flip-card.orb +0 -601
  300. package/behaviors/exports/atoms/std-game-audio.orb +0 -350
  301. package/behaviors/exports/atoms/std-game-canvas2d.orb +0 -263
  302. package/behaviors/exports/atoms/std-game-hud.orb +0 -170
  303. package/behaviors/exports/atoms/std-game-over-screen.orb +0 -206
  304. package/behaviors/exports/atoms/std-gameflow.orb +0 -419
  305. package/behaviors/exports/atoms/std-inventory-panel.orb +0 -266
  306. package/behaviors/exports/atoms/std-notification.orb +0 -446
  307. package/behaviors/exports/atoms/std-rating.orb +0 -333
  308. package/behaviors/exports/atoms/std-score-board.orb +0 -249
  309. package/behaviors/exports/atoms/std-score.orb +0 -713
  310. package/behaviors/exports/atoms/std-service-custom-bearer.orb +0 -562
  311. package/behaviors/exports/atoms/std-service-custom-header.orb +0 -564
  312. package/behaviors/exports/atoms/std-service-email.orb +0 -545
  313. package/behaviors/exports/atoms/std-service-github.orb +0 -591
  314. package/behaviors/exports/atoms/std-service-storage.orb +0 -669
  315. package/behaviors/exports/atoms/std-service-stripe.orb +0 -644
  316. package/behaviors/exports/atoms/std-service-twilio.orb +0 -616
  317. package/behaviors/exports/atoms/std-service-youtube.orb +0 -701
  318. package/behaviors/exports/atoms/std-text-effects.orb +0 -663
  319. package/behaviors/exports/atoms/std-theme.orb +0 -578
  320. package/behaviors/exports/atoms/std-undo.orb +0 -830
  321. package/behaviors/exports/atoms/std-upload.orb +0 -540
  322. package/behaviors/exports/atoms/std-wizard.orb +0 -1120
  323. package/behaviors/exports/molecules/std-agent-fix-loop.orb +0 -3327
  324. package/behaviors/exports/molecules/std-agent-tool-loop.orb +0 -4451
  325. package/behaviors/exports/molecules/std-builder-game.orb +0 -234
  326. package/behaviors/exports/molecules/std-classifier-game.orb +0 -234
  327. package/behaviors/exports/molecules/std-detail.orb +0 -621
  328. package/behaviors/exports/molecules/std-geospatial.orb +0 -657
  329. package/behaviors/exports/molecules/std-inventory.orb +0 -823
  330. package/behaviors/exports/molecules/std-list.orb +0 -1066
  331. package/behaviors/exports/molecules/std-messaging.orb +0 -605
  332. package/behaviors/exports/molecules/std-turn-based-battle.orb +0 -514
  333. package/behaviors/exports/organisms/std-agent-reviewer.orb +0 -5277
  334. package/behaviors/exports/organisms/std-api-gateway.orb +0 -3745
  335. package/behaviors/exports/organisms/std-ecommerce.orb +0 -4553
  336. package/behaviors/exports/organisms/std-finance-tracker.orb +0 -3091
  337. package/behaviors/exports/organisms/std-helpdesk.orb +0 -3328
  338. package/behaviors/exports/organisms/std-lms.orb +0 -3885
  339. package/behaviors/exports/organisms/std-puzzle-app.orb +0 -889
  340. package/behaviors/exports/organisms/std-realtime-chat.orb +0 -3428
  341. package/behaviors/exports/organisms/std-trading-dashboard.orb +0 -3080
  342. package/behaviors/exports/test-schemas/os-trigger-simulation.orb +0 -202
  343. package/behaviors/exports/validation-report.json +0 -1672
  344. package/behaviors/exports/verify-results.json +0 -126
  345. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +0 -2299
  346. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +0 -1029
  347. package/dist/behaviors/exports/atoms/std-agent-memory.orb +0 -777
  348. package/dist/behaviors/exports/atoms/std-agent-provider.orb +0 -906
  349. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +0 -994
  350. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +0 -1621
  351. package/dist/behaviors/exports/atoms/std-combat.orb +0 -421
  352. package/dist/behaviors/exports/atoms/std-confirmation.orb +0 -496
  353. package/dist/behaviors/exports/atoms/std-display.orb +0 -1803
  354. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +0 -642
  355. package/dist/behaviors/exports/atoms/std-modal.orb +0 -425
  356. package/dist/behaviors/exports/atoms/std-overworld.orb +0 -517
  357. package/dist/behaviors/exports/atoms/std-quest.orb +0 -1262
  358. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +0 -897
  359. package/dist/behaviors/exports/atoms/std-search.orb +0 -394
  360. package/dist/behaviors/exports/atoms/std-selection.orb +0 -810
  361. package/dist/behaviors/exports/atoms/std-service-custom-noauth.orb +0 -558
  362. package/dist/behaviors/exports/atoms/std-service-custom-query.orb +0 -564
  363. package/dist/behaviors/exports/atoms/std-service-llm.orb +0 -676
  364. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +0 -194
  365. package/dist/behaviors/exports/atoms/std-sort.orb +0 -760
  366. package/dist/behaviors/exports/atoms/std-tabs.orb +0 -298
  367. package/dist/behaviors/exports/atoms/std-timer.orb +0 -1428
  368. package/dist/behaviors/exports/atoms/std-validate-on-save.orb +0 -624
  369. package/dist/behaviors/exports/molecules/std-agent-planner.orb +0 -2037
  370. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +0 -4451
  371. package/dist/behaviors/exports/molecules/std-cart.orb +0 -754
  372. package/dist/behaviors/exports/molecules/std-debugger-game.orb +0 -234
  373. package/dist/behaviors/exports/molecules/std-detail.orb +0 -621
  374. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +0 -234
  375. package/dist/behaviors/exports/molecules/std-form-advanced.orb +0 -659
  376. package/dist/behaviors/exports/molecules/std-geospatial.orb +0 -657
  377. package/dist/behaviors/exports/molecules/std-inventory.orb +0 -823
  378. package/dist/behaviors/exports/molecules/std-list.orb +0 -1066
  379. package/dist/behaviors/exports/molecules/std-messaging.orb +0 -605
  380. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +0 -234
  381. package/dist/behaviors/exports/molecules/std-platformer-game.orb +0 -557
  382. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +0 -234
  383. package/dist/behaviors/exports/molecules/std-service-content-pipeline.orb +0 -920
  384. package/dist/behaviors/exports/molecules/std-service-devops-toolkit.orb +0 -1531
  385. package/dist/behaviors/exports/molecules/std-service-notification-hub.orb +0 -701
  386. package/dist/behaviors/exports/molecules/std-service-payment-flow.orb +0 -878
  387. package/dist/behaviors/exports/molecules/std-simulator-game.orb +0 -234
  388. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +0 -6336
  389. package/dist/behaviors/exports/organisms/std-agent-builder.orb +0 -14139
  390. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +0 -10974
  391. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +0 -5003
  392. package/dist/behaviors/exports/organisms/std-arcade-game.orb +0 -1144
  393. package/dist/behaviors/exports/organisms/std-booking-system.orb +0 -5142
  394. package/dist/behaviors/exports/organisms/std-cms.orb +0 -2887
  395. package/dist/behaviors/exports/organisms/std-crm.orb +0 -4366
  396. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +0 -5772
  397. package/dist/behaviors/exports/organisms/std-healthcare.orb +0 -6001
  398. package/dist/behaviors/exports/organisms/std-project-manager.orb +0 -3819
  399. package/dist/behaviors/exports/organisms/std-service-marketplace.orb +0 -4479
  400. package/dist/behaviors/exports/organisms/std-service-research-assistant.orb +0 -3568
  401. package/dist/behaviors/exports/organisms/std-social-feed.orb +0 -1246
  402. package/dist/behaviors/exports/organisms/std-stem-lab.orb +0 -1922
  403. package/dist/behaviors/exports/test-schemas/os-trigger-simulation.orb +0 -202
  404. package/dist/behaviors/exports/validation-report.json +0 -1672
  405. package/dist/behaviors/exports/verify-results.json +0 -126
  406. package/dist/exports/atoms/std-agent-activity-log.orb +0 -575
  407. package/dist/exports/atoms/std-agent-chat-thread.orb +0 -783
  408. package/dist/exports/atoms/std-agent-tool-call.orb +0 -746
  409. package/dist/exports/atoms/std-async.orb +0 -443
  410. package/dist/exports/atoms/std-circuit-breaker.orb +0 -999
  411. package/dist/exports/atoms/std-collision.orb +0 -694
  412. package/dist/exports/atoms/std-filter.orb +0 -641
  413. package/dist/exports/atoms/std-gallery.orb +0 -387
  414. package/dist/exports/atoms/std-game-canvas3d.orb +0 -401
  415. package/dist/exports/atoms/std-game-menu.orb +0 -222
  416. package/dist/exports/atoms/std-input.orb +0 -640
  417. package/dist/exports/atoms/std-loading.orb +0 -496
  418. package/dist/exports/atoms/std-movement.orb +0 -1413
  419. package/dist/exports/atoms/std-pagination.orb +0 -266
  420. package/dist/exports/atoms/std-physics2d.orb +0 -430
  421. package/dist/exports/atoms/std-platformer-canvas.orb +0 -268
  422. package/dist/exports/atoms/std-service-oauth.orb +0 -769
  423. package/dist/exports/atoms/std-service-redis.orb +0 -585
  424. package/dist/exports/atoms/std-sprite.orb +0 -315
  425. package/dist/exports/molecules/std-agent-learner.orb +0 -2315
  426. package/dist/exports/molecules/std-agent-rag.orb +0 -1745
  427. package/dist/exports/molecules/std-agent-tool-loop.orb +0 -4451
  428. package/dist/exports/molecules/std-detail.orb +0 -621
  429. package/dist/exports/molecules/std-geospatial.orb +0 -657
  430. package/dist/exports/molecules/std-inventory.orb +0 -823
  431. package/dist/exports/molecules/std-list.orb +0 -1066
  432. package/dist/exports/molecules/std-messaging.orb +0 -605
  433. package/dist/exports/molecules/std-puzzle-game.orb +0 -584
  434. package/dist/exports/molecules/std-quiz.orb +0 -1074
  435. package/dist/exports/molecules/std-service-custom-api-tester.orb +0 -865
  436. package/dist/exports/organisms/std-cicd-pipeline.orb +0 -3425
  437. package/dist/exports/organisms/std-coding-academy.orb +0 -2084
  438. package/dist/exports/organisms/std-hr-portal.orb +0 -5236
  439. package/dist/exports/organisms/std-iot-dashboard.orb +0 -3914
  440. package/dist/exports/organisms/std-logic-training.orb +0 -753
  441. package/dist/exports/organisms/std-platformer-app.orb +0 -1679
  442. package/dist/exports/organisms/std-rpg-game.orb +0 -3298
  443. package/dist/exports/organisms/std-strategy-game.orb +0 -2443
  444. package/dist/exports/test-schemas/os-trigger-simulation.orb +0 -202
  445. package/dist/exports/validation-report.json +0 -1672
  446. package/dist/exports/verify-results.json +0 -126
@@ -1,4451 +0,0 @@
1
- {
2
- "name": "AgentToolLoopOrbital",
3
- "version": "1.0.0",
4
- "orbitals": [
5
- {
6
- "name": "AgentToolLoopOrbital",
7
- "entity": {
8
- "name": "AgentToolLoop",
9
- "persistence": "runtime",
10
- "fields": [
11
- {
12
- "name": "id",
13
- "type": "string"
14
- },
15
- {
16
- "name": "name",
17
- "type": "string"
18
- },
19
- {
20
- "name": "description",
21
- "type": "string"
22
- },
23
- {
24
- "name": "status",
25
- "type": "string",
26
- "default": "active",
27
- "values": [
28
- "active",
29
- "inactive",
30
- "pending"
31
- ]
32
- },
33
- {
34
- "name": "createdAt",
35
- "type": "string"
36
- },
37
- {
38
- "name": "pendingId",
39
- "type": "string"
40
- },
41
- {
42
- "name": "task",
43
- "type": "string",
44
- "default": ""
45
- },
46
- {
47
- "name": "plan",
48
- "type": "string",
49
- "default": ""
50
- },
51
- {
52
- "name": "iterations",
53
- "type": "number",
54
- "default": 0
55
- },
56
- {
57
- "name": "maxIterations",
58
- "type": "number",
59
- "default": 10
60
- },
61
- {
62
- "name": "result",
63
- "type": "string",
64
- "default": ""
65
- },
66
- {
67
- "name": "currentTool",
68
- "type": "string",
69
- "default": ""
70
- },
71
- {
72
- "name": "lastToolResult",
73
- "type": "string",
74
- "default": ""
75
- },
76
- {
77
- "name": "error",
78
- "type": "string",
79
- "default": ""
80
- },
81
- {
82
- "name": "currentStep",
83
- "type": "number",
84
- "default": 0
85
- },
86
- {
87
- "name": "totalSteps",
88
- "type": "number",
89
- "default": 4
90
- },
91
- {
92
- "name": "steps",
93
- "type": "string",
94
- "default": "Plan,Execute,Check,Complete"
95
- },
96
- {
97
- "name": "toolName",
98
- "type": "string",
99
- "default": ""
100
- },
101
- {
102
- "name": "args",
103
- "type": "string",
104
- "default": ""
105
- },
106
- {
107
- "name": "prompt",
108
- "type": "string",
109
- "default": ""
110
- },
111
- {
112
- "name": "response",
113
- "type": "string",
114
- "default": ""
115
- },
116
- {
117
- "name": "provider",
118
- "type": "string",
119
- "default": "anthropic"
120
- },
121
- {
122
- "name": "model",
123
- "type": "string",
124
- "default": "claude-sonnet-4-20250514"
125
- },
126
- {
127
- "name": "tokenCount",
128
- "type": "number",
129
- "default": 0
130
- },
131
- {
132
- "name": "maxTokens",
133
- "type": "number",
134
- "default": 200000
135
- },
136
- {
137
- "name": "usage",
138
- "type": "number",
139
- "default": 0
140
- },
141
- {
142
- "name": "current",
143
- "type": "number",
144
- "default": 0
145
- },
146
- {
147
- "name": "max",
148
- "type": "number",
149
- "default": 200000
150
- },
151
- {
152
- "name": "threshold",
153
- "type": "number",
154
- "default": 0.85
155
- },
156
- {
157
- "name": "lastCompactedAt",
158
- "type": "string",
159
- "default": ""
160
- },
161
- {
162
- "name": "action",
163
- "type": "string",
164
- "default": ""
165
- },
166
- {
167
- "name": "detail",
168
- "type": "string",
169
- "default": ""
170
- },
171
- {
172
- "name": "timestamp",
173
- "type": "string",
174
- "default": ""
175
- },
176
- {
177
- "name": "duration",
178
- "type": "number",
179
- "default": 0
180
- }
181
- ]
182
- },
183
- "traits": [
184
- {
185
- "name": "AgentToolLoopLoop",
186
- "linkedEntity": "AgentToolLoop",
187
- "category": "interaction",
188
- "stateMachine": {
189
- "states": [
190
- {
191
- "name": "idle",
192
- "isInitial": true
193
- },
194
- {
195
- "name": "planning"
196
- },
197
- {
198
- "name": "executing"
199
- },
200
- {
201
- "name": "checking"
202
- },
203
- {
204
- "name": "completed"
205
- },
206
- {
207
- "name": "failed"
208
- }
209
- ],
210
- "events": [
211
- {
212
- "key": "INIT",
213
- "name": "Initialize"
214
- },
215
- {
216
- "key": "EXECUTE",
217
- "name": "Execute"
218
- },
219
- {
220
- "key": "PLAN_GENERATED",
221
- "name": "Plan Generated",
222
- "payload": [
223
- {
224
- "name": "plan",
225
- "type": "string",
226
- "required": true
227
- },
228
- {
229
- "name": "toolName",
230
- "type": "string",
231
- "required": true
232
- },
233
- {
234
- "name": "toolArgs",
235
- "type": "object",
236
- "required": true
237
- }
238
- ]
239
- },
240
- {
241
- "key": "TOOL_RESULT",
242
- "name": "Tool Result",
243
- "payload": [
244
- {
245
- "name": "output",
246
- "type": "string",
247
- "required": true
248
- }
249
- ]
250
- },
251
- {
252
- "key": "CHECK_PASSED",
253
- "name": "Check Passed",
254
- "payload": [
255
- {
256
- "name": "result",
257
- "type": "string",
258
- "required": true
259
- }
260
- ]
261
- },
262
- {
263
- "key": "CHECK_NEEDS_MORE",
264
- "name": "Check Needs More",
265
- "payload": [
266
- {
267
- "name": "toolName",
268
- "type": "string",
269
- "required": true
270
- },
271
- {
272
- "name": "toolArgs",
273
- "type": "object",
274
- "required": true
275
- }
276
- ]
277
- },
278
- {
279
- "key": "MAX_ITERATIONS",
280
- "name": "Max Iterations Reached",
281
- "payload": [
282
- {
283
- "name": "error",
284
- "type": "string",
285
- "required": true
286
- }
287
- ]
288
- },
289
- {
290
- "key": "FAILED",
291
- "name": "Failed",
292
- "payload": [
293
- {
294
- "name": "error",
295
- "type": "string",
296
- "required": true
297
- }
298
- ]
299
- },
300
- {
301
- "key": "RESET",
302
- "name": "Reset"
303
- }
304
- ],
305
- "transitions": [
306
- {
307
- "from": "idle",
308
- "to": "idle",
309
- "event": "INIT",
310
- "effects": [
311
- [
312
- "render-ui",
313
- "main",
314
- {
315
- "type": "stack",
316
- "direction": "vertical",
317
- "gap": "lg",
318
- "children": [
319
- {
320
- "type": "stack",
321
- "direction": "horizontal",
322
- "gap": "sm",
323
- "align": "center",
324
- "children": [
325
- {
326
- "type": "icon",
327
- "name": "repeat",
328
- "size": "lg"
329
- },
330
- {
331
- "type": "typography",
332
- "content": "Tool Execution Loop",
333
- "variant": "h2"
334
- }
335
- ]
336
- },
337
- {
338
- "type": "divider"
339
- },
340
- {
341
- "type": "card",
342
- "children": [
343
- {
344
- "type": "stack",
345
- "direction": "vertical",
346
- "gap": "md",
347
- "children": [
348
- {
349
- "type": "typography",
350
- "content": "Describe the task to execute with tools",
351
- "variant": "body"
352
- },
353
- {
354
- "type": "form-section",
355
- "entity": "AgentToolLoop",
356
- "mode": "edit",
357
- "submitEvent": "EXECUTE",
358
- "fields": [
359
- "task"
360
- ]
361
- }
362
- ]
363
- }
364
- ]
365
- }
366
- ]
367
- }
368
- ]
369
- ]
370
- },
371
- {
372
- "from": "idle",
373
- "to": "planning",
374
- "event": "EXECUTE",
375
- "effects": [
376
- [
377
- "set",
378
- "@entity.status",
379
- "planning"
380
- ],
381
- [
382
- "set",
383
- "@entity.iterations",
384
- 0
385
- ],
386
- [
387
- "agent/generate",
388
- [
389
- "str/concat",
390
- "Task: ",
391
- "@entity.task",
392
- "\n\nAvailable tools: ",
393
- [
394
- "str/join",
395
- [
396
- "agent/tools"
397
- ],
398
- ", "
399
- ],
400
- "\n\nGenerate a step-by-step plan. Return the first tool to call and its arguments."
401
- ]
402
- ],
403
- [
404
- "render-ui",
405
- "main",
406
- {
407
- "type": "stack",
408
- "direction": "vertical",
409
- "gap": "lg",
410
- "align": "center",
411
- "children": [
412
- {
413
- "type": "icon",
414
- "name": "brain",
415
- "size": "lg"
416
- },
417
- {
418
- "type": "typography",
419
- "content": "Planning execution...",
420
- "variant": "h3"
421
- },
422
- {
423
- "type": "spinner",
424
- "size": "lg"
425
- },
426
- {
427
- "type": "typography",
428
- "content": "@entity.task",
429
- "variant": "caption"
430
- }
431
- ]
432
- }
433
- ]
434
- ]
435
- },
436
- {
437
- "from": "planning",
438
- "to": "executing",
439
- "event": "PLAN_GENERATED",
440
- "effects": [
441
- [
442
- "set",
443
- "@entity.plan",
444
- "@payload.plan"
445
- ],
446
- [
447
- "set",
448
- "@entity.currentTool",
449
- "@payload.toolName"
450
- ],
451
- [
452
- "set",
453
- "@entity.iterations",
454
- [
455
- "+",
456
- "@entity.iterations",
457
- 1
458
- ]
459
- ],
460
- [
461
- "agent/invoke",
462
- "@payload.toolName",
463
- "@payload.toolArgs"
464
- ],
465
- [
466
- "render-ui",
467
- "main",
468
- {
469
- "type": "stack",
470
- "direction": "vertical",
471
- "gap": "lg",
472
- "children": [
473
- {
474
- "type": "stack",
475
- "direction": "horizontal",
476
- "gap": "sm",
477
- "align": "center",
478
- "justify": "space-between",
479
- "children": [
480
- {
481
- "type": "stack",
482
- "direction": "horizontal",
483
- "gap": "sm",
484
- "align": "center",
485
- "children": [
486
- {
487
- "type": "icon",
488
- "name": "tool",
489
- "size": "lg"
490
- },
491
- {
492
- "type": "typography",
493
- "content": "Executing Tool",
494
- "variant": "h2"
495
- }
496
- ]
497
- },
498
- {
499
- "type": "badge",
500
- "label": [
501
- "str/concat",
502
- "Iteration ",
503
- "@entity.iterations",
504
- "/",
505
- "@entity.maxIterations"
506
- ]
507
- }
508
- ]
509
- },
510
- {
511
- "type": "divider"
512
- },
513
- {
514
- "type": "card",
515
- "children": [
516
- {
517
- "type": "stack",
518
- "direction": "vertical",
519
- "gap": "sm",
520
- "children": [
521
- {
522
- "type": "typography",
523
- "content": "Current Tool",
524
- "variant": "caption"
525
- },
526
- {
527
- "type": "typography",
528
- "content": "@entity.currentTool",
529
- "variant": "h4"
530
- },
531
- {
532
- "type": "spinner",
533
- "size": "md"
534
- }
535
- ]
536
- }
537
- ]
538
- },
539
- {
540
- "type": "card",
541
- "children": [
542
- {
543
- "type": "stack",
544
- "direction": "vertical",
545
- "gap": "sm",
546
- "children": [
547
- {
548
- "type": "typography",
549
- "content": "Plan",
550
- "variant": "caption"
551
- },
552
- {
553
- "type": "typography",
554
- "content": "@entity.plan",
555
- "variant": "body"
556
- }
557
- ]
558
- }
559
- ]
560
- }
561
- ]
562
- }
563
- ]
564
- ]
565
- },
566
- {
567
- "from": "executing",
568
- "to": "checking",
569
- "event": "TOOL_RESULT",
570
- "effects": [
571
- [
572
- "set",
573
- "@entity.lastToolResult",
574
- "@payload.output"
575
- ],
576
- [
577
- "agent/generate",
578
- [
579
- "str/concat",
580
- "Task: ",
581
- "@entity.task",
582
- "\nPlan: ",
583
- "@entity.plan",
584
- "\nTool output: ",
585
- "@payload.output",
586
- "\n\nIs the task complete? If yes, provide the final result. If no, specify the next tool and arguments."
587
- ]
588
- ],
589
- [
590
- "render-ui",
591
- "main",
592
- {
593
- "type": "stack",
594
- "direction": "vertical",
595
- "gap": "lg",
596
- "align": "center",
597
- "children": [
598
- {
599
- "type": "icon",
600
- "name": "eye",
601
- "size": "lg"
602
- },
603
- {
604
- "type": "typography",
605
- "content": "Checking result...",
606
- "variant": "h3"
607
- },
608
- {
609
- "type": "spinner",
610
- "size": "lg"
611
- },
612
- {
613
- "type": "badge",
614
- "label": [
615
- "str/concat",
616
- "Iteration ",
617
- "@entity.iterations"
618
- ]
619
- }
620
- ]
621
- }
622
- ]
623
- ]
624
- },
625
- {
626
- "from": "checking",
627
- "to": "completed",
628
- "event": "CHECK_PASSED",
629
- "effects": [
630
- [
631
- "set",
632
- "@entity.result",
633
- "@payload.result"
634
- ],
635
- [
636
- "set",
637
- "@entity.status",
638
- "completed"
639
- ],
640
- [
641
- "render-ui",
642
- "main",
643
- {
644
- "type": "stack",
645
- "direction": "vertical",
646
- "gap": "lg",
647
- "children": [
648
- {
649
- "type": "stack",
650
- "direction": "horizontal",
651
- "gap": "sm",
652
- "align": "center",
653
- "justify": "space-between",
654
- "children": [
655
- {
656
- "type": "stack",
657
- "direction": "horizontal",
658
- "gap": "sm",
659
- "align": "center",
660
- "children": [
661
- {
662
- "type": "icon",
663
- "name": "check-circle",
664
- "size": "lg"
665
- },
666
- {
667
- "type": "typography",
668
- "content": "Loop Complete",
669
- "variant": "h2"
670
- }
671
- ]
672
- },
673
- {
674
- "type": "button",
675
- "label": "New Task",
676
- "event": "RESET",
677
- "variant": "ghost",
678
- "icon": "rotate-ccw"
679
- }
680
- ]
681
- },
682
- {
683
- "type": "divider"
684
- },
685
- {
686
- "type": "simple-grid",
687
- "cols": 2,
688
- "children": [
689
- {
690
- "type": "stat-display",
691
- "label": "Iterations",
692
- "value": "@entity.iterations",
693
- "icon": "repeat"
694
- },
695
- {
696
- "type": "stat-display",
697
- "label": "Status",
698
- "value": "@entity.status",
699
- "icon": "check"
700
- }
701
- ]
702
- },
703
- {
704
- "type": "divider"
705
- },
706
- {
707
- "type": "card",
708
- "children": [
709
- {
710
- "type": "stack",
711
- "direction": "vertical",
712
- "gap": "md",
713
- "children": [
714
- {
715
- "type": "typography",
716
- "content": "Task",
717
- "variant": "caption"
718
- },
719
- {
720
- "type": "typography",
721
- "content": "@entity.task",
722
- "variant": "body"
723
- },
724
- {
725
- "type": "divider"
726
- },
727
- {
728
- "type": "typography",
729
- "content": "Result",
730
- "variant": "caption"
731
- },
732
- {
733
- "type": "typography",
734
- "content": "@entity.result",
735
- "variant": "body"
736
- }
737
- ]
738
- }
739
- ]
740
- }
741
- ]
742
- }
743
- ]
744
- ]
745
- },
746
- {
747
- "from": "checking",
748
- "to": "executing",
749
- "event": "CHECK_NEEDS_MORE",
750
- "guards": [
751
- [
752
- "math/lt",
753
- "@entity.iterations",
754
- 10
755
- ]
756
- ],
757
- "effects": [
758
- [
759
- "set",
760
- "@entity.currentTool",
761
- "@payload.toolName"
762
- ],
763
- [
764
- "set",
765
- "@entity.iterations",
766
- [
767
- "+",
768
- "@entity.iterations",
769
- 1
770
- ]
771
- ],
772
- [
773
- "if",
774
- [
775
- ">=",
776
- [
777
- "agent/context-usage"
778
- ],
779
- 0.8
780
- ],
781
- [
782
- "agent/compact",
783
- "hybrid"
784
- ],
785
- [
786
- "log",
787
- "Context below compact threshold"
788
- ]
789
- ],
790
- [
791
- "agent/invoke",
792
- "@payload.toolName",
793
- "@payload.toolArgs"
794
- ],
795
- [
796
- "render-ui",
797
- "main",
798
- {
799
- "type": "stack",
800
- "direction": "vertical",
801
- "gap": "lg",
802
- "children": [
803
- {
804
- "type": "stack",
805
- "direction": "horizontal",
806
- "gap": "sm",
807
- "align": "center",
808
- "justify": "space-between",
809
- "children": [
810
- {
811
- "type": "stack",
812
- "direction": "horizontal",
813
- "gap": "sm",
814
- "align": "center",
815
- "children": [
816
- {
817
- "type": "icon",
818
- "name": "tool",
819
- "size": "lg"
820
- },
821
- {
822
- "type": "typography",
823
- "content": "Executing Tool",
824
- "variant": "h2"
825
- }
826
- ]
827
- },
828
- {
829
- "type": "badge",
830
- "label": [
831
- "str/concat",
832
- "Iteration ",
833
- "@entity.iterations",
834
- "/",
835
- "@entity.maxIterations"
836
- ]
837
- }
838
- ]
839
- },
840
- {
841
- "type": "divider"
842
- },
843
- {
844
- "type": "card",
845
- "children": [
846
- {
847
- "type": "stack",
848
- "direction": "vertical",
849
- "gap": "sm",
850
- "children": [
851
- {
852
- "type": "typography",
853
- "content": "Current Tool",
854
- "variant": "caption"
855
- },
856
- {
857
- "type": "typography",
858
- "content": "@entity.currentTool",
859
- "variant": "h4"
860
- },
861
- {
862
- "type": "spinner",
863
- "size": "md"
864
- }
865
- ]
866
- }
867
- ]
868
- },
869
- {
870
- "type": "card",
871
- "children": [
872
- {
873
- "type": "stack",
874
- "direction": "vertical",
875
- "gap": "sm",
876
- "children": [
877
- {
878
- "type": "typography",
879
- "content": "Plan",
880
- "variant": "caption"
881
- },
882
- {
883
- "type": "typography",
884
- "content": "@entity.plan",
885
- "variant": "body"
886
- }
887
- ]
888
- }
889
- ]
890
- }
891
- ]
892
- }
893
- ]
894
- ]
895
- },
896
- {
897
- "from": "checking",
898
- "to": "failed",
899
- "event": "MAX_ITERATIONS",
900
- "effects": [
901
- [
902
- "set",
903
- "@entity.error",
904
- "@payload.error"
905
- ],
906
- [
907
- "set",
908
- "@entity.status",
909
- "failed"
910
- ],
911
- [
912
- "render-ui",
913
- "main",
914
- {
915
- "type": "stack",
916
- "direction": "vertical",
917
- "gap": "lg",
918
- "align": "center",
919
- "children": [
920
- {
921
- "type": "icon",
922
- "name": "x-circle",
923
- "size": "lg"
924
- },
925
- {
926
- "type": "typography",
927
- "content": "Loop Failed",
928
- "variant": "h2"
929
- },
930
- {
931
- "type": "alert",
932
- "variant": "error",
933
- "message": "@entity.error"
934
- },
935
- {
936
- "type": "simple-grid",
937
- "cols": 2,
938
- "children": [
939
- {
940
- "type": "stat-display",
941
- "label": "Iterations Used",
942
- "value": "@entity.iterations",
943
- "icon": "repeat"
944
- },
945
- {
946
- "type": "stat-display",
947
- "label": "Max Allowed",
948
- "value": "@entity.maxIterations",
949
- "icon": "shield"
950
- }
951
- ]
952
- },
953
- {
954
- "type": "button",
955
- "label": "Retry",
956
- "event": "RESET",
957
- "variant": "primary",
958
- "icon": "rotate-ccw"
959
- }
960
- ]
961
- }
962
- ]
963
- ]
964
- },
965
- {
966
- "from": "planning",
967
- "to": "failed",
968
- "event": "FAILED",
969
- "effects": [
970
- [
971
- "set",
972
- "@entity.error",
973
- "@payload.error"
974
- ],
975
- [
976
- "set",
977
- "@entity.status",
978
- "failed"
979
- ],
980
- [
981
- "render-ui",
982
- "main",
983
- {
984
- "type": "stack",
985
- "direction": "vertical",
986
- "gap": "lg",
987
- "align": "center",
988
- "children": [
989
- {
990
- "type": "icon",
991
- "name": "x-circle",
992
- "size": "lg"
993
- },
994
- {
995
- "type": "typography",
996
- "content": "Loop Failed",
997
- "variant": "h2"
998
- },
999
- {
1000
- "type": "alert",
1001
- "variant": "error",
1002
- "message": "@entity.error"
1003
- },
1004
- {
1005
- "type": "simple-grid",
1006
- "cols": 2,
1007
- "children": [
1008
- {
1009
- "type": "stat-display",
1010
- "label": "Iterations Used",
1011
- "value": "@entity.iterations",
1012
- "icon": "repeat"
1013
- },
1014
- {
1015
- "type": "stat-display",
1016
- "label": "Max Allowed",
1017
- "value": "@entity.maxIterations",
1018
- "icon": "shield"
1019
- }
1020
- ]
1021
- },
1022
- {
1023
- "type": "button",
1024
- "label": "Retry",
1025
- "event": "RESET",
1026
- "variant": "primary",
1027
- "icon": "rotate-ccw"
1028
- }
1029
- ]
1030
- }
1031
- ]
1032
- ]
1033
- },
1034
- {
1035
- "from": "executing",
1036
- "to": "failed",
1037
- "event": "FAILED",
1038
- "effects": [
1039
- [
1040
- "set",
1041
- "@entity.error",
1042
- "@payload.error"
1043
- ],
1044
- [
1045
- "set",
1046
- "@entity.status",
1047
- "failed"
1048
- ],
1049
- [
1050
- "render-ui",
1051
- "main",
1052
- {
1053
- "type": "stack",
1054
- "direction": "vertical",
1055
- "gap": "lg",
1056
- "align": "center",
1057
- "children": [
1058
- {
1059
- "type": "icon",
1060
- "name": "x-circle",
1061
- "size": "lg"
1062
- },
1063
- {
1064
- "type": "typography",
1065
- "content": "Loop Failed",
1066
- "variant": "h2"
1067
- },
1068
- {
1069
- "type": "alert",
1070
- "variant": "error",
1071
- "message": "@entity.error"
1072
- },
1073
- {
1074
- "type": "simple-grid",
1075
- "cols": 2,
1076
- "children": [
1077
- {
1078
- "type": "stat-display",
1079
- "label": "Iterations Used",
1080
- "value": "@entity.iterations",
1081
- "icon": "repeat"
1082
- },
1083
- {
1084
- "type": "stat-display",
1085
- "label": "Max Allowed",
1086
- "value": "@entity.maxIterations",
1087
- "icon": "shield"
1088
- }
1089
- ]
1090
- },
1091
- {
1092
- "type": "button",
1093
- "label": "Retry",
1094
- "event": "RESET",
1095
- "variant": "primary",
1096
- "icon": "rotate-ccw"
1097
- }
1098
- ]
1099
- }
1100
- ]
1101
- ]
1102
- },
1103
- {
1104
- "from": "completed",
1105
- "to": "idle",
1106
- "event": "RESET",
1107
- "effects": [
1108
- [
1109
- "set",
1110
- "@entity.status",
1111
- "idle"
1112
- ],
1113
- [
1114
- "set",
1115
- "@entity.task",
1116
- ""
1117
- ],
1118
- [
1119
- "set",
1120
- "@entity.plan",
1121
- ""
1122
- ],
1123
- [
1124
- "set",
1125
- "@entity.result",
1126
- ""
1127
- ],
1128
- [
1129
- "set",
1130
- "@entity.currentTool",
1131
- ""
1132
- ],
1133
- [
1134
- "set",
1135
- "@entity.lastToolResult",
1136
- ""
1137
- ],
1138
- [
1139
- "set",
1140
- "@entity.iterations",
1141
- 0
1142
- ],
1143
- [
1144
- "set",
1145
- "@entity.error",
1146
- ""
1147
- ],
1148
- [
1149
- "render-ui",
1150
- "main",
1151
- {
1152
- "type": "stack",
1153
- "direction": "vertical",
1154
- "gap": "lg",
1155
- "children": [
1156
- {
1157
- "type": "stack",
1158
- "direction": "horizontal",
1159
- "gap": "sm",
1160
- "align": "center",
1161
- "children": [
1162
- {
1163
- "type": "icon",
1164
- "name": "repeat",
1165
- "size": "lg"
1166
- },
1167
- {
1168
- "type": "typography",
1169
- "content": "Tool Execution Loop",
1170
- "variant": "h2"
1171
- }
1172
- ]
1173
- },
1174
- {
1175
- "type": "divider"
1176
- },
1177
- {
1178
- "type": "card",
1179
- "children": [
1180
- {
1181
- "type": "stack",
1182
- "direction": "vertical",
1183
- "gap": "md",
1184
- "children": [
1185
- {
1186
- "type": "typography",
1187
- "content": "Describe the task to execute with tools",
1188
- "variant": "body"
1189
- },
1190
- {
1191
- "type": "form-section",
1192
- "entity": "AgentToolLoop",
1193
- "mode": "edit",
1194
- "submitEvent": "EXECUTE",
1195
- "fields": [
1196
- "task"
1197
- ]
1198
- }
1199
- ]
1200
- }
1201
- ]
1202
- }
1203
- ]
1204
- }
1205
- ]
1206
- ]
1207
- },
1208
- {
1209
- "from": "failed",
1210
- "to": "idle",
1211
- "event": "RESET",
1212
- "effects": [
1213
- [
1214
- "set",
1215
- "@entity.status",
1216
- "idle"
1217
- ],
1218
- [
1219
- "set",
1220
- "@entity.task",
1221
- ""
1222
- ],
1223
- [
1224
- "set",
1225
- "@entity.plan",
1226
- ""
1227
- ],
1228
- [
1229
- "set",
1230
- "@entity.result",
1231
- ""
1232
- ],
1233
- [
1234
- "set",
1235
- "@entity.currentTool",
1236
- ""
1237
- ],
1238
- [
1239
- "set",
1240
- "@entity.lastToolResult",
1241
- ""
1242
- ],
1243
- [
1244
- "set",
1245
- "@entity.iterations",
1246
- 0
1247
- ],
1248
- [
1249
- "set",
1250
- "@entity.error",
1251
- ""
1252
- ],
1253
- [
1254
- "render-ui",
1255
- "main",
1256
- {
1257
- "type": "stack",
1258
- "direction": "vertical",
1259
- "gap": "lg",
1260
- "children": [
1261
- {
1262
- "type": "stack",
1263
- "direction": "horizontal",
1264
- "gap": "sm",
1265
- "align": "center",
1266
- "children": [
1267
- {
1268
- "type": "icon",
1269
- "name": "repeat",
1270
- "size": "lg"
1271
- },
1272
- {
1273
- "type": "typography",
1274
- "content": "Tool Execution Loop",
1275
- "variant": "h2"
1276
- }
1277
- ]
1278
- },
1279
- {
1280
- "type": "divider"
1281
- },
1282
- {
1283
- "type": "card",
1284
- "children": [
1285
- {
1286
- "type": "stack",
1287
- "direction": "vertical",
1288
- "gap": "md",
1289
- "children": [
1290
- {
1291
- "type": "typography",
1292
- "content": "Describe the task to execute with tools",
1293
- "variant": "body"
1294
- },
1295
- {
1296
- "type": "form-section",
1297
- "entity": "AgentToolLoop",
1298
- "mode": "edit",
1299
- "submitEvent": "EXECUTE",
1300
- "fields": [
1301
- "task"
1302
- ]
1303
- }
1304
- ]
1305
- }
1306
- ]
1307
- }
1308
- ]
1309
- }
1310
- ]
1311
- ]
1312
- }
1313
- ]
1314
- }
1315
- },
1316
- {
1317
- "name": "ToolLoopStepProgress",
1318
- "linkedEntity": "AgentToolLoop",
1319
- "category": "interaction",
1320
- "emits": [
1321
- {
1322
- "event": "ADVANCE",
1323
- "scope": "internal",
1324
- "payload": [
1325
- {
1326
- "name": "step",
1327
- "type": "number"
1328
- }
1329
- ]
1330
- },
1331
- {
1332
- "event": "COMPLETE",
1333
- "scope": "internal",
1334
- "payload": [
1335
- {
1336
- "name": "totalSteps",
1337
- "type": "number"
1338
- }
1339
- ]
1340
- },
1341
- {
1342
- "event": "FAIL",
1343
- "scope": "internal",
1344
- "payload": [
1345
- {
1346
- "name": "step",
1347
- "type": "number"
1348
- }
1349
- ]
1350
- }
1351
- ],
1352
- "listens": [],
1353
- "stateMachine": {
1354
- "states": [
1355
- {
1356
- "name": "idle",
1357
- "isInitial": true
1358
- },
1359
- {
1360
- "name": "in_progress"
1361
- },
1362
- {
1363
- "name": "completed"
1364
- },
1365
- {
1366
- "name": "failed"
1367
- }
1368
- ],
1369
- "events": [
1370
- {
1371
- "key": "INIT",
1372
- "name": "Initialize"
1373
- },
1374
- {
1375
- "key": "START",
1376
- "name": "Start Pipeline"
1377
- },
1378
- {
1379
- "key": "ADVANCE",
1380
- "name": "Advance Step"
1381
- },
1382
- {
1383
- "key": "COMPLETE",
1384
- "name": "Complete Pipeline"
1385
- },
1386
- {
1387
- "key": "FAIL",
1388
- "name": "Pipeline Failed"
1389
- },
1390
- {
1391
- "key": "RESET",
1392
- "name": "Reset Pipeline"
1393
- }
1394
- ],
1395
- "transitions": [
1396
- {
1397
- "from": "idle",
1398
- "to": "idle",
1399
- "event": "INIT",
1400
- "effects": [
1401
- [
1402
- "fetch",
1403
- "AgentToolLoop"
1404
- ],
1405
- [
1406
- "render-ui",
1407
- "main",
1408
- {
1409
- "type": "stack",
1410
- "direction": "vertical",
1411
- "gap": "lg",
1412
- "children": [
1413
- {
1414
- "type": "stack",
1415
- "direction": "horizontal",
1416
- "gap": "sm",
1417
- "align": "center",
1418
- "children": [
1419
- {
1420
- "type": "icon",
1421
- "name": "list-ordered",
1422
- "size": "lg"
1423
- },
1424
- {
1425
- "type": "typography",
1426
- "content": "AgentToolLoop",
1427
- "variant": "h2"
1428
- },
1429
- {
1430
- "type": "badge",
1431
- "label": "Idle",
1432
- "variant": "default"
1433
- }
1434
- ]
1435
- },
1436
- {
1437
- "type": "divider"
1438
- },
1439
- {
1440
- "type": "wizard-progress",
1441
- "currentStep": "@entity.currentStep",
1442
- "steps": [
1443
- {
1444
- "id": "0",
1445
- "title": "Plan"
1446
- },
1447
- {
1448
- "id": "1",
1449
- "title": "Execute"
1450
- },
1451
- {
1452
- "id": "2",
1453
- "title": "Check"
1454
- },
1455
- {
1456
- "id": "3",
1457
- "title": "Complete"
1458
- }
1459
- ]
1460
- },
1461
- {
1462
- "type": "button",
1463
- "label": "Start",
1464
- "event": "START",
1465
- "variant": "primary",
1466
- "icon": "play"
1467
- }
1468
- ]
1469
- }
1470
- ]
1471
- ]
1472
- },
1473
- {
1474
- "from": "idle",
1475
- "to": "in_progress",
1476
- "event": "START",
1477
- "effects": [
1478
- [
1479
- "set",
1480
- "@entity.status",
1481
- "in_progress"
1482
- ],
1483
- [
1484
- "set",
1485
- "@entity.currentStep",
1486
- 0
1487
- ],
1488
- [
1489
- "render-ui",
1490
- "main",
1491
- {
1492
- "type": "stack",
1493
- "direction": "vertical",
1494
- "gap": "lg",
1495
- "children": [
1496
- {
1497
- "type": "stack",
1498
- "direction": "horizontal",
1499
- "gap": "sm",
1500
- "align": "center",
1501
- "children": [
1502
- {
1503
- "type": "icon",
1504
- "name": "loader",
1505
- "size": "lg"
1506
- },
1507
- {
1508
- "type": "typography",
1509
- "content": "AgentToolLoop",
1510
- "variant": "h2"
1511
- },
1512
- {
1513
- "type": "badge",
1514
- "label": "In Progress",
1515
- "variant": "warning"
1516
- }
1517
- ]
1518
- },
1519
- {
1520
- "type": "divider"
1521
- },
1522
- {
1523
- "type": "wizard-progress",
1524
- "currentStep": "@entity.currentStep",
1525
- "steps": [
1526
- {
1527
- "id": "0",
1528
- "title": "Plan"
1529
- },
1530
- {
1531
- "id": "1",
1532
- "title": "Execute"
1533
- },
1534
- {
1535
- "id": "2",
1536
- "title": "Check"
1537
- },
1538
- {
1539
- "id": "3",
1540
- "title": "Complete"
1541
- }
1542
- ]
1543
- },
1544
- {
1545
- "type": "stack",
1546
- "direction": "horizontal",
1547
- "gap": "sm",
1548
- "align": "center",
1549
- "children": [
1550
- {
1551
- "type": "stat-display",
1552
- "label": "Current Step",
1553
- "value": "@entity.currentStep"
1554
- },
1555
- {
1556
- "type": "stat-display",
1557
- "label": "Total Steps",
1558
- "value": "@entity.totalSteps"
1559
- }
1560
- ]
1561
- },
1562
- {
1563
- "type": "stack",
1564
- "direction": "horizontal",
1565
- "gap": "sm",
1566
- "children": [
1567
- {
1568
- "type": "button",
1569
- "label": "Advance",
1570
- "event": "ADVANCE",
1571
- "variant": "primary",
1572
- "icon": "chevron-right"
1573
- },
1574
- {
1575
- "type": "button",
1576
- "label": "Reset",
1577
- "event": "RESET",
1578
- "variant": "ghost",
1579
- "icon": "rotate-ccw"
1580
- }
1581
- ]
1582
- }
1583
- ]
1584
- }
1585
- ]
1586
- ]
1587
- },
1588
- {
1589
- "from": "in_progress",
1590
- "to": "in_progress",
1591
- "event": "ADVANCE",
1592
- "guard": [
1593
- "<",
1594
- "@entity.currentStep",
1595
- "@entity.totalSteps"
1596
- ],
1597
- "effects": [
1598
- [
1599
- "set",
1600
- "@entity.currentStep",
1601
- [
1602
- "+",
1603
- "@entity.currentStep",
1604
- 1
1605
- ]
1606
- ],
1607
- [
1608
- "render-ui",
1609
- "main",
1610
- {
1611
- "type": "stack",
1612
- "direction": "vertical",
1613
- "gap": "lg",
1614
- "children": [
1615
- {
1616
- "type": "stack",
1617
- "direction": "horizontal",
1618
- "gap": "sm",
1619
- "align": "center",
1620
- "children": [
1621
- {
1622
- "type": "icon",
1623
- "name": "loader",
1624
- "size": "lg"
1625
- },
1626
- {
1627
- "type": "typography",
1628
- "content": "AgentToolLoop",
1629
- "variant": "h2"
1630
- },
1631
- {
1632
- "type": "badge",
1633
- "label": "In Progress",
1634
- "variant": "warning"
1635
- }
1636
- ]
1637
- },
1638
- {
1639
- "type": "divider"
1640
- },
1641
- {
1642
- "type": "wizard-progress",
1643
- "currentStep": "@entity.currentStep",
1644
- "steps": [
1645
- {
1646
- "id": "0",
1647
- "title": "Plan"
1648
- },
1649
- {
1650
- "id": "1",
1651
- "title": "Execute"
1652
- },
1653
- {
1654
- "id": "2",
1655
- "title": "Check"
1656
- },
1657
- {
1658
- "id": "3",
1659
- "title": "Complete"
1660
- }
1661
- ]
1662
- },
1663
- {
1664
- "type": "stack",
1665
- "direction": "horizontal",
1666
- "gap": "sm",
1667
- "align": "center",
1668
- "children": [
1669
- {
1670
- "type": "stat-display",
1671
- "label": "Current Step",
1672
- "value": "@entity.currentStep"
1673
- },
1674
- {
1675
- "type": "stat-display",
1676
- "label": "Total Steps",
1677
- "value": "@entity.totalSteps"
1678
- }
1679
- ]
1680
- },
1681
- {
1682
- "type": "stack",
1683
- "direction": "horizontal",
1684
- "gap": "sm",
1685
- "children": [
1686
- {
1687
- "type": "button",
1688
- "label": "Advance",
1689
- "event": "ADVANCE",
1690
- "variant": "primary",
1691
- "icon": "chevron-right"
1692
- },
1693
- {
1694
- "type": "button",
1695
- "label": "Reset",
1696
- "event": "RESET",
1697
- "variant": "ghost",
1698
- "icon": "rotate-ccw"
1699
- }
1700
- ]
1701
- }
1702
- ]
1703
- }
1704
- ]
1705
- ]
1706
- },
1707
- {
1708
- "from": "in_progress",
1709
- "to": "completed",
1710
- "event": "COMPLETE",
1711
- "effects": [
1712
- [
1713
- "set",
1714
- "@entity.status",
1715
- "completed"
1716
- ],
1717
- [
1718
- "set",
1719
- "@entity.currentStep",
1720
- "@entity.totalSteps"
1721
- ],
1722
- [
1723
- "render-ui",
1724
- "main",
1725
- {
1726
- "type": "stack",
1727
- "direction": "vertical",
1728
- "gap": "lg",
1729
- "children": [
1730
- {
1731
- "type": "stack",
1732
- "direction": "horizontal",
1733
- "gap": "sm",
1734
- "align": "center",
1735
- "children": [
1736
- {
1737
- "type": "icon",
1738
- "name": "check-circle",
1739
- "size": "lg"
1740
- },
1741
- {
1742
- "type": "typography",
1743
- "content": "AgentToolLoop",
1744
- "variant": "h2"
1745
- },
1746
- {
1747
- "type": "badge",
1748
- "label": "Completed",
1749
- "variant": "success"
1750
- }
1751
- ]
1752
- },
1753
- {
1754
- "type": "divider"
1755
- },
1756
- {
1757
- "type": "wizard-progress",
1758
- "currentStep": "@entity.totalSteps",
1759
- "steps": [
1760
- {
1761
- "id": "0",
1762
- "title": "Plan"
1763
- },
1764
- {
1765
- "id": "1",
1766
- "title": "Execute"
1767
- },
1768
- {
1769
- "id": "2",
1770
- "title": "Check"
1771
- },
1772
- {
1773
- "id": "3",
1774
- "title": "Complete"
1775
- }
1776
- ]
1777
- },
1778
- {
1779
- "type": "alert",
1780
- "variant": "success",
1781
- "message": "All steps completed successfully."
1782
- },
1783
- {
1784
- "type": "button",
1785
- "label": "Reset",
1786
- "event": "RESET",
1787
- "variant": "ghost",
1788
- "icon": "rotate-ccw"
1789
- }
1790
- ]
1791
- }
1792
- ]
1793
- ]
1794
- },
1795
- {
1796
- "from": "in_progress",
1797
- "to": "failed",
1798
- "event": "FAIL",
1799
- "effects": [
1800
- [
1801
- "set",
1802
- "@entity.status",
1803
- "failed"
1804
- ],
1805
- [
1806
- "render-ui",
1807
- "main",
1808
- {
1809
- "type": "stack",
1810
- "direction": "vertical",
1811
- "gap": "lg",
1812
- "children": [
1813
- {
1814
- "type": "stack",
1815
- "direction": "horizontal",
1816
- "gap": "sm",
1817
- "align": "center",
1818
- "children": [
1819
- {
1820
- "type": "icon",
1821
- "name": "x-circle",
1822
- "size": "lg"
1823
- },
1824
- {
1825
- "type": "typography",
1826
- "content": "AgentToolLoop",
1827
- "variant": "h2"
1828
- },
1829
- {
1830
- "type": "badge",
1831
- "label": "Failed",
1832
- "variant": "destructive"
1833
- }
1834
- ]
1835
- },
1836
- {
1837
- "type": "divider"
1838
- },
1839
- {
1840
- "type": "wizard-progress",
1841
- "currentStep": "@entity.currentStep",
1842
- "steps": [
1843
- {
1844
- "id": "0",
1845
- "title": "Plan"
1846
- },
1847
- {
1848
- "id": "1",
1849
- "title": "Execute"
1850
- },
1851
- {
1852
- "id": "2",
1853
- "title": "Check"
1854
- },
1855
- {
1856
- "id": "3",
1857
- "title": "Complete"
1858
- }
1859
- ]
1860
- },
1861
- {
1862
- "type": "alert",
1863
- "variant": "error",
1864
- "message": "Pipeline failed at the current step."
1865
- },
1866
- {
1867
- "type": "stack",
1868
- "direction": "horizontal",
1869
- "gap": "sm",
1870
- "children": [
1871
- {
1872
- "type": "stat-display",
1873
- "label": "Failed At Step",
1874
- "value": "@entity.currentStep"
1875
- }
1876
- ]
1877
- },
1878
- {
1879
- "type": "button",
1880
- "label": "Reset",
1881
- "event": "RESET",
1882
- "variant": "ghost",
1883
- "icon": "rotate-ccw"
1884
- }
1885
- ]
1886
- }
1887
- ]
1888
- ]
1889
- },
1890
- {
1891
- "from": "idle",
1892
- "to": "idle",
1893
- "event": "RESET",
1894
- "effects": [
1895
- [
1896
- "set",
1897
- "@entity.status",
1898
- "idle"
1899
- ],
1900
- [
1901
- "set",
1902
- "@entity.currentStep",
1903
- 0
1904
- ],
1905
- [
1906
- "render-ui",
1907
- "main",
1908
- {
1909
- "type": "stack",
1910
- "direction": "vertical",
1911
- "gap": "lg",
1912
- "children": [
1913
- {
1914
- "type": "stack",
1915
- "direction": "horizontal",
1916
- "gap": "sm",
1917
- "align": "center",
1918
- "children": [
1919
- {
1920
- "type": "icon",
1921
- "name": "list-ordered",
1922
- "size": "lg"
1923
- },
1924
- {
1925
- "type": "typography",
1926
- "content": "AgentToolLoop",
1927
- "variant": "h2"
1928
- },
1929
- {
1930
- "type": "badge",
1931
- "label": "Idle",
1932
- "variant": "default"
1933
- }
1934
- ]
1935
- },
1936
- {
1937
- "type": "divider"
1938
- },
1939
- {
1940
- "type": "wizard-progress",
1941
- "currentStep": "@entity.currentStep",
1942
- "steps": [
1943
- {
1944
- "id": "0",
1945
- "title": "Plan"
1946
- },
1947
- {
1948
- "id": "1",
1949
- "title": "Execute"
1950
- },
1951
- {
1952
- "id": "2",
1953
- "title": "Check"
1954
- },
1955
- {
1956
- "id": "3",
1957
- "title": "Complete"
1958
- }
1959
- ]
1960
- },
1961
- {
1962
- "type": "button",
1963
- "label": "Start",
1964
- "event": "START",
1965
- "variant": "primary",
1966
- "icon": "play"
1967
- }
1968
- ]
1969
- }
1970
- ]
1971
- ]
1972
- },
1973
- {
1974
- "from": "in_progress",
1975
- "to": "idle",
1976
- "event": "RESET",
1977
- "effects": [
1978
- [
1979
- "set",
1980
- "@entity.status",
1981
- "idle"
1982
- ],
1983
- [
1984
- "set",
1985
- "@entity.currentStep",
1986
- 0
1987
- ],
1988
- [
1989
- "render-ui",
1990
- "main",
1991
- {
1992
- "type": "stack",
1993
- "direction": "vertical",
1994
- "gap": "lg",
1995
- "children": [
1996
- {
1997
- "type": "stack",
1998
- "direction": "horizontal",
1999
- "gap": "sm",
2000
- "align": "center",
2001
- "children": [
2002
- {
2003
- "type": "icon",
2004
- "name": "list-ordered",
2005
- "size": "lg"
2006
- },
2007
- {
2008
- "type": "typography",
2009
- "content": "AgentToolLoop",
2010
- "variant": "h2"
2011
- },
2012
- {
2013
- "type": "badge",
2014
- "label": "Idle",
2015
- "variant": "default"
2016
- }
2017
- ]
2018
- },
2019
- {
2020
- "type": "divider"
2021
- },
2022
- {
2023
- "type": "wizard-progress",
2024
- "currentStep": "@entity.currentStep",
2025
- "steps": [
2026
- {
2027
- "id": "0",
2028
- "title": "Plan"
2029
- },
2030
- {
2031
- "id": "1",
2032
- "title": "Execute"
2033
- },
2034
- {
2035
- "id": "2",
2036
- "title": "Check"
2037
- },
2038
- {
2039
- "id": "3",
2040
- "title": "Complete"
2041
- }
2042
- ]
2043
- },
2044
- {
2045
- "type": "button",
2046
- "label": "Start",
2047
- "event": "START",
2048
- "variant": "primary",
2049
- "icon": "play"
2050
- }
2051
- ]
2052
- }
2053
- ]
2054
- ]
2055
- },
2056
- {
2057
- "from": "completed",
2058
- "to": "idle",
2059
- "event": "RESET",
2060
- "effects": [
2061
- [
2062
- "set",
2063
- "@entity.status",
2064
- "idle"
2065
- ],
2066
- [
2067
- "set",
2068
- "@entity.currentStep",
2069
- 0
2070
- ],
2071
- [
2072
- "render-ui",
2073
- "main",
2074
- {
2075
- "type": "stack",
2076
- "direction": "vertical",
2077
- "gap": "lg",
2078
- "children": [
2079
- {
2080
- "type": "stack",
2081
- "direction": "horizontal",
2082
- "gap": "sm",
2083
- "align": "center",
2084
- "children": [
2085
- {
2086
- "type": "icon",
2087
- "name": "list-ordered",
2088
- "size": "lg"
2089
- },
2090
- {
2091
- "type": "typography",
2092
- "content": "AgentToolLoop",
2093
- "variant": "h2"
2094
- },
2095
- {
2096
- "type": "badge",
2097
- "label": "Idle",
2098
- "variant": "default"
2099
- }
2100
- ]
2101
- },
2102
- {
2103
- "type": "divider"
2104
- },
2105
- {
2106
- "type": "wizard-progress",
2107
- "currentStep": "@entity.currentStep",
2108
- "steps": [
2109
- {
2110
- "id": "0",
2111
- "title": "Plan"
2112
- },
2113
- {
2114
- "id": "1",
2115
- "title": "Execute"
2116
- },
2117
- {
2118
- "id": "2",
2119
- "title": "Check"
2120
- },
2121
- {
2122
- "id": "3",
2123
- "title": "Complete"
2124
- }
2125
- ]
2126
- },
2127
- {
2128
- "type": "button",
2129
- "label": "Start",
2130
- "event": "START",
2131
- "variant": "primary",
2132
- "icon": "play"
2133
- }
2134
- ]
2135
- }
2136
- ]
2137
- ]
2138
- },
2139
- {
2140
- "from": "failed",
2141
- "to": "idle",
2142
- "event": "RESET",
2143
- "effects": [
2144
- [
2145
- "set",
2146
- "@entity.status",
2147
- "idle"
2148
- ],
2149
- [
2150
- "set",
2151
- "@entity.currentStep",
2152
- 0
2153
- ],
2154
- [
2155
- "render-ui",
2156
- "main",
2157
- {
2158
- "type": "stack",
2159
- "direction": "vertical",
2160
- "gap": "lg",
2161
- "children": [
2162
- {
2163
- "type": "stack",
2164
- "direction": "horizontal",
2165
- "gap": "sm",
2166
- "align": "center",
2167
- "children": [
2168
- {
2169
- "type": "icon",
2170
- "name": "list-ordered",
2171
- "size": "lg"
2172
- },
2173
- {
2174
- "type": "typography",
2175
- "content": "AgentToolLoop",
2176
- "variant": "h2"
2177
- },
2178
- {
2179
- "type": "badge",
2180
- "label": "Idle",
2181
- "variant": "default"
2182
- }
2183
- ]
2184
- },
2185
- {
2186
- "type": "divider"
2187
- },
2188
- {
2189
- "type": "wizard-progress",
2190
- "currentStep": "@entity.currentStep",
2191
- "steps": [
2192
- {
2193
- "id": "0",
2194
- "title": "Plan"
2195
- },
2196
- {
2197
- "id": "1",
2198
- "title": "Execute"
2199
- },
2200
- {
2201
- "id": "2",
2202
- "title": "Check"
2203
- },
2204
- {
2205
- "id": "3",
2206
- "title": "Complete"
2207
- }
2208
- ]
2209
- },
2210
- {
2211
- "type": "button",
2212
- "label": "Start",
2213
- "event": "START",
2214
- "variant": "primary",
2215
- "icon": "play"
2216
- }
2217
- ]
2218
- }
2219
- ]
2220
- ]
2221
- }
2222
- ]
2223
- }
2224
- },
2225
- {
2226
- "name": "ToolLoopCompletionFlow",
2227
- "linkedEntity": "AgentToolLoop",
2228
- "category": "interaction",
2229
- "emits": [
2230
- {
2231
- "event": "SAVE",
2232
- "scope": "internal"
2233
- },
2234
- {
2235
- "event": "GENERATED",
2236
- "scope": "internal"
2237
- }
2238
- ],
2239
- "stateMachine": {
2240
- "states": [
2241
- {
2242
- "name": "closed",
2243
- "isInitial": true
2244
- },
2245
- {
2246
- "name": "open"
2247
- }
2248
- ],
2249
- "events": [
2250
- {
2251
- "key": "INIT",
2252
- "name": "Initialize"
2253
- },
2254
- {
2255
- "key": "GENERATE",
2256
- "name": "Open"
2257
- },
2258
- {
2259
- "key": "CLOSE",
2260
- "name": "Close"
2261
- },
2262
- {
2263
- "key": "SAVE",
2264
- "name": "Save",
2265
- "payload": [
2266
- {
2267
- "name": "data",
2268
- "type": "object",
2269
- "required": true
2270
- }
2271
- ]
2272
- }
2273
- ],
2274
- "transitions": [
2275
- {
2276
- "from": "closed",
2277
- "to": "closed",
2278
- "event": "INIT",
2279
- "effects": [
2280
- [
2281
- "ref",
2282
- "AgentToolLoop"
2283
- ],
2284
- [
2285
- "render-ui",
2286
- "main",
2287
- {
2288
- "type": "stack",
2289
- "direction": "vertical",
2290
- "gap": "lg",
2291
- "children": [
2292
- {
2293
- "type": "stack",
2294
- "direction": "horizontal",
2295
- "gap": "md",
2296
- "justify": "space-between",
2297
- "children": [
2298
- {
2299
- "type": "stack",
2300
- "direction": "horizontal",
2301
- "gap": "md",
2302
- "children": [
2303
- {
2304
- "type": "icon",
2305
- "name": "sparkles",
2306
- "size": "lg"
2307
- },
2308
- {
2309
- "type": "typography",
2310
- "content": "AgentToolLoop",
2311
- "variant": "h2"
2312
- }
2313
- ]
2314
- },
2315
- {
2316
- "type": "button",
2317
- "label": "Open",
2318
- "event": "GENERATE",
2319
- "variant": "primary",
2320
- "icon": "sparkles"
2321
- }
2322
- ]
2323
- },
2324
- {
2325
- "type": "divider"
2326
- },
2327
- {
2328
- "type": "empty-state",
2329
- "icon": "sparkles",
2330
- "title": "Nothing open",
2331
- "description": "Click Open to view details in a modal overlay."
2332
- }
2333
- ]
2334
- }
2335
- ]
2336
- ]
2337
- },
2338
- {
2339
- "from": "closed",
2340
- "to": "open",
2341
- "event": "GENERATE",
2342
- "effects": [
2343
- [
2344
- "render-ui",
2345
- "modal",
2346
- {
2347
- "type": "stack",
2348
- "direction": "vertical",
2349
- "gap": "md",
2350
- "children": [
2351
- {
2352
- "type": "stack",
2353
- "direction": "horizontal",
2354
- "gap": "sm",
2355
- "children": [
2356
- {
2357
- "type": "icon",
2358
- "name": "sparkles",
2359
- "size": "md"
2360
- },
2361
- {
2362
- "type": "typography",
2363
- "content": "AgentToolLoop",
2364
- "variant": "h3"
2365
- }
2366
- ]
2367
- },
2368
- {
2369
- "type": "divider"
2370
- },
2371
- {
2372
- "type": "stack",
2373
- "direction": "horizontal",
2374
- "gap": "sm",
2375
- "children": [
2376
- {
2377
- "type": "badge",
2378
- "label": "@entity.provider"
2379
- },
2380
- {
2381
- "type": "badge",
2382
- "label": "@entity.model"
2383
- }
2384
- ]
2385
- },
2386
- {
2387
- "type": "form-section",
2388
- "entity": "AgentToolLoop",
2389
- "mode": "create",
2390
- "submitEvent": "SAVE",
2391
- "cancelEvent": "CLOSE",
2392
- "fields": [
2393
- "prompt"
2394
- ]
2395
- }
2396
- ]
2397
- }
2398
- ]
2399
- ]
2400
- },
2401
- {
2402
- "from": "open",
2403
- "to": "closed",
2404
- "event": "CLOSE",
2405
- "effects": [
2406
- [
2407
- "render-ui",
2408
- "modal",
2409
- null
2410
- ],
2411
- [
2412
- "notify",
2413
- "Cancelled",
2414
- "info"
2415
- ],
2416
- [
2417
- "ref",
2418
- "AgentToolLoop"
2419
- ],
2420
- [
2421
- "render-ui",
2422
- "main",
2423
- {
2424
- "type": "stack",
2425
- "direction": "vertical",
2426
- "gap": "lg",
2427
- "children": [
2428
- {
2429
- "type": "stack",
2430
- "direction": "horizontal",
2431
- "gap": "md",
2432
- "justify": "space-between",
2433
- "children": [
2434
- {
2435
- "type": "stack",
2436
- "direction": "horizontal",
2437
- "gap": "md",
2438
- "children": [
2439
- {
2440
- "type": "icon",
2441
- "name": "sparkles",
2442
- "size": "lg"
2443
- },
2444
- {
2445
- "type": "typography",
2446
- "content": "AgentToolLoop",
2447
- "variant": "h2"
2448
- }
2449
- ]
2450
- },
2451
- {
2452
- "type": "button",
2453
- "label": "Open",
2454
- "event": "GENERATE",
2455
- "variant": "primary",
2456
- "icon": "sparkles"
2457
- }
2458
- ]
2459
- },
2460
- {
2461
- "type": "divider"
2462
- },
2463
- {
2464
- "type": "empty-state",
2465
- "icon": "sparkles",
2466
- "title": "Nothing open",
2467
- "description": "Click Open to view details in a modal overlay."
2468
- }
2469
- ]
2470
- }
2471
- ]
2472
- ]
2473
- },
2474
- {
2475
- "from": "open",
2476
- "to": "closed",
2477
- "event": "SAVE",
2478
- "effects": [
2479
- [
2480
- "persist",
2481
- "create",
2482
- "AgentToolLoop",
2483
- "@payload.data"
2484
- ],
2485
- [
2486
- "render-ui",
2487
- "modal",
2488
- null
2489
- ],
2490
- [
2491
- "emit",
2492
- "GENERATED"
2493
- ],
2494
- [
2495
- "ref",
2496
- "AgentToolLoop"
2497
- ],
2498
- [
2499
- "render-ui",
2500
- "main",
2501
- {
2502
- "type": "stack",
2503
- "direction": "vertical",
2504
- "gap": "lg",
2505
- "children": [
2506
- {
2507
- "type": "stack",
2508
- "direction": "horizontal",
2509
- "gap": "md",
2510
- "justify": "space-between",
2511
- "children": [
2512
- {
2513
- "type": "stack",
2514
- "direction": "horizontal",
2515
- "gap": "md",
2516
- "children": [
2517
- {
2518
- "type": "icon",
2519
- "name": "sparkles",
2520
- "size": "lg"
2521
- },
2522
- {
2523
- "type": "typography",
2524
- "content": "AgentToolLoop",
2525
- "variant": "h2"
2526
- }
2527
- ]
2528
- },
2529
- {
2530
- "type": "button",
2531
- "label": "Open",
2532
- "event": "GENERATE",
2533
- "variant": "primary",
2534
- "icon": "sparkles"
2535
- }
2536
- ]
2537
- },
2538
- {
2539
- "type": "divider"
2540
- },
2541
- {
2542
- "type": "empty-state",
2543
- "icon": "sparkles",
2544
- "title": "Nothing open",
2545
- "description": "Click Open to view details in a modal overlay."
2546
- }
2547
- ]
2548
- }
2549
- ],
2550
- [
2551
- "notify",
2552
- "AgentToolLoop created successfully"
2553
- ]
2554
- ]
2555
- }
2556
- ]
2557
- },
2558
- "listens": []
2559
- },
2560
- {
2561
- "name": "ToolLoopToolCallFlow",
2562
- "linkedEntity": "AgentToolLoop",
2563
- "category": "interaction",
2564
- "emits": [
2565
- {
2566
- "event": "SAVE",
2567
- "scope": "internal"
2568
- },
2569
- {
2570
- "event": "INVOKED",
2571
- "scope": "internal"
2572
- }
2573
- ],
2574
- "stateMachine": {
2575
- "states": [
2576
- {
2577
- "name": "closed",
2578
- "isInitial": true
2579
- },
2580
- {
2581
- "name": "open"
2582
- }
2583
- ],
2584
- "events": [
2585
- {
2586
- "key": "INIT",
2587
- "name": "Initialize"
2588
- },
2589
- {
2590
- "key": "INVOKE",
2591
- "name": "Open"
2592
- },
2593
- {
2594
- "key": "CLOSE",
2595
- "name": "Close"
2596
- },
2597
- {
2598
- "key": "SAVE",
2599
- "name": "Save",
2600
- "payload": [
2601
- {
2602
- "name": "data",
2603
- "type": "object",
2604
- "required": true
2605
- }
2606
- ]
2607
- }
2608
- ],
2609
- "transitions": [
2610
- {
2611
- "from": "closed",
2612
- "to": "closed",
2613
- "event": "INIT",
2614
- "effects": [
2615
- [
2616
- "ref",
2617
- "AgentToolLoop"
2618
- ],
2619
- [
2620
- "render-ui",
2621
- "main",
2622
- {
2623
- "type": "stack",
2624
- "direction": "vertical",
2625
- "gap": "lg",
2626
- "children": [
2627
- {
2628
- "type": "stack",
2629
- "direction": "horizontal",
2630
- "gap": "md",
2631
- "justify": "space-between",
2632
- "children": [
2633
- {
2634
- "type": "stack",
2635
- "direction": "horizontal",
2636
- "gap": "md",
2637
- "children": [
2638
- {
2639
- "type": "icon",
2640
- "name": "wrench",
2641
- "size": "lg"
2642
- },
2643
- {
2644
- "type": "typography",
2645
- "content": "Invoke Tool",
2646
- "variant": "h2"
2647
- }
2648
- ]
2649
- },
2650
- {
2651
- "type": "button",
2652
- "label": "Open",
2653
- "event": "INVOKE",
2654
- "variant": "primary",
2655
- "icon": "wrench"
2656
- }
2657
- ]
2658
- },
2659
- {
2660
- "type": "divider"
2661
- },
2662
- {
2663
- "type": "empty-state",
2664
- "icon": "wrench",
2665
- "title": "Nothing open",
2666
- "description": "Click Open to view details in a modal overlay."
2667
- }
2668
- ]
2669
- }
2670
- ]
2671
- ]
2672
- },
2673
- {
2674
- "from": "closed",
2675
- "to": "open",
2676
- "event": "INVOKE",
2677
- "effects": [
2678
- [
2679
- "render-ui",
2680
- "modal",
2681
- {
2682
- "type": "stack",
2683
- "direction": "vertical",
2684
- "gap": "md",
2685
- "children": [
2686
- {
2687
- "type": "stack",
2688
- "direction": "horizontal",
2689
- "gap": "sm",
2690
- "children": [
2691
- {
2692
- "type": "icon",
2693
- "name": "wrench",
2694
- "size": "md"
2695
- },
2696
- {
2697
- "type": "typography",
2698
- "content": "Invoke Tool",
2699
- "variant": "h3"
2700
- }
2701
- ]
2702
- },
2703
- {
2704
- "type": "divider"
2705
- },
2706
- {
2707
- "type": "form-section",
2708
- "entity": "AgentToolLoop",
2709
- "mode": "create",
2710
- "submitEvent": "SAVE",
2711
- "cancelEvent": "CLOSE",
2712
- "fields": [
2713
- "toolName",
2714
- "args"
2715
- ]
2716
- }
2717
- ]
2718
- }
2719
- ]
2720
- ]
2721
- },
2722
- {
2723
- "from": "open",
2724
- "to": "closed",
2725
- "event": "CLOSE",
2726
- "effects": [
2727
- [
2728
- "render-ui",
2729
- "modal",
2730
- null
2731
- ],
2732
- [
2733
- "notify",
2734
- "Cancelled",
2735
- "info"
2736
- ],
2737
- [
2738
- "ref",
2739
- "AgentToolLoop"
2740
- ],
2741
- [
2742
- "render-ui",
2743
- "main",
2744
- {
2745
- "type": "stack",
2746
- "direction": "vertical",
2747
- "gap": "lg",
2748
- "children": [
2749
- {
2750
- "type": "stack",
2751
- "direction": "horizontal",
2752
- "gap": "md",
2753
- "justify": "space-between",
2754
- "children": [
2755
- {
2756
- "type": "stack",
2757
- "direction": "horizontal",
2758
- "gap": "md",
2759
- "children": [
2760
- {
2761
- "type": "icon",
2762
- "name": "wrench",
2763
- "size": "lg"
2764
- },
2765
- {
2766
- "type": "typography",
2767
- "content": "Invoke Tool",
2768
- "variant": "h2"
2769
- }
2770
- ]
2771
- },
2772
- {
2773
- "type": "button",
2774
- "label": "Open",
2775
- "event": "INVOKE",
2776
- "variant": "primary",
2777
- "icon": "wrench"
2778
- }
2779
- ]
2780
- },
2781
- {
2782
- "type": "divider"
2783
- },
2784
- {
2785
- "type": "empty-state",
2786
- "icon": "wrench",
2787
- "title": "Nothing open",
2788
- "description": "Click Open to view details in a modal overlay."
2789
- }
2790
- ]
2791
- }
2792
- ]
2793
- ]
2794
- },
2795
- {
2796
- "from": "open",
2797
- "to": "closed",
2798
- "event": "SAVE",
2799
- "effects": [
2800
- [
2801
- "persist",
2802
- "create",
2803
- "AgentToolLoop",
2804
- "@payload.data"
2805
- ],
2806
- [
2807
- "render-ui",
2808
- "modal",
2809
- null
2810
- ],
2811
- [
2812
- "emit",
2813
- "INVOKED"
2814
- ],
2815
- [
2816
- "ref",
2817
- "AgentToolLoop"
2818
- ],
2819
- [
2820
- "render-ui",
2821
- "main",
2822
- {
2823
- "type": "stack",
2824
- "direction": "vertical",
2825
- "gap": "lg",
2826
- "children": [
2827
- {
2828
- "type": "stack",
2829
- "direction": "horizontal",
2830
- "gap": "md",
2831
- "justify": "space-between",
2832
- "children": [
2833
- {
2834
- "type": "stack",
2835
- "direction": "horizontal",
2836
- "gap": "md",
2837
- "children": [
2838
- {
2839
- "type": "icon",
2840
- "name": "wrench",
2841
- "size": "lg"
2842
- },
2843
- {
2844
- "type": "typography",
2845
- "content": "Invoke Tool",
2846
- "variant": "h2"
2847
- }
2848
- ]
2849
- },
2850
- {
2851
- "type": "button",
2852
- "label": "Open",
2853
- "event": "INVOKE",
2854
- "variant": "primary",
2855
- "icon": "wrench"
2856
- }
2857
- ]
2858
- },
2859
- {
2860
- "type": "divider"
2861
- },
2862
- {
2863
- "type": "empty-state",
2864
- "icon": "wrench",
2865
- "title": "Nothing open",
2866
- "description": "Click Open to view details in a modal overlay."
2867
- }
2868
- ]
2869
- }
2870
- ],
2871
- [
2872
- "notify",
2873
- "AgentToolLoop created successfully"
2874
- ]
2875
- ]
2876
- }
2877
- ]
2878
- },
2879
- "listens": []
2880
- },
2881
- {
2882
- "name": "ToolLoopContextMonitor",
2883
- "linkedEntity": "AgentToolLoop",
2884
- "category": "interaction",
2885
- "stateMachine": {
2886
- "states": [
2887
- {
2888
- "name": "normal",
2889
- "isInitial": true
2890
- },
2891
- {
2892
- "name": "warning"
2893
- },
2894
- {
2895
- "name": "critical"
2896
- }
2897
- ],
2898
- "events": [
2899
- {
2900
- "key": "INIT",
2901
- "name": "Initialize"
2902
- },
2903
- {
2904
- "key": "UPDATE",
2905
- "name": "Update Token Count",
2906
- "payload": [
2907
- {
2908
- "name": "current",
2909
- "type": "number",
2910
- "required": true
2911
- }
2912
- ]
2913
- },
2914
- {
2915
- "key": "COMPACT",
2916
- "name": "Compact Context"
2917
- },
2918
- {
2919
- "key": "RESET",
2920
- "name": "Reset Gauge"
2921
- }
2922
- ],
2923
- "transitions": [
2924
- {
2925
- "from": "normal",
2926
- "to": "normal",
2927
- "event": "INIT",
2928
- "effects": [
2929
- [
2930
- "fetch",
2931
- "AgentToolLoop"
2932
- ],
2933
- [
2934
- "render-ui",
2935
- "main",
2936
- {
2937
- "type": "stack",
2938
- "direction": "vertical",
2939
- "gap": "lg",
2940
- "children": [
2941
- {
2942
- "type": "stack",
2943
- "direction": "horizontal",
2944
- "gap": "sm",
2945
- "align": "center",
2946
- "children": [
2947
- {
2948
- "type": "icon",
2949
- "name": "gauge",
2950
- "size": "lg"
2951
- },
2952
- {
2953
- "type": "typography",
2954
- "content": "Token Usage",
2955
- "variant": "h2"
2956
- },
2957
- {
2958
- "type": "badge",
2959
- "label": "Normal",
2960
- "variant": "default"
2961
- }
2962
- ]
2963
- },
2964
- {
2965
- "type": "divider"
2966
- },
2967
- {
2968
- "type": "progress-bar",
2969
- "value": "@entity.current",
2970
- "max": "@entity.max"
2971
- },
2972
- {
2973
- "type": "stack",
2974
- "direction": "horizontal",
2975
- "gap": "md",
2976
- "children": [
2977
- {
2978
- "type": "stat-display",
2979
- "label": "Tokens Used",
2980
- "value": "@entity.current"
2981
- },
2982
- {
2983
- "type": "stat-display",
2984
- "label": "Max Tokens",
2985
- "value": "@entity.max"
2986
- }
2987
- ]
2988
- },
2989
- {
2990
- "type": "button",
2991
- "label": "Reset",
2992
- "event": "RESET",
2993
- "variant": "ghost",
2994
- "icon": "rotate-ccw"
2995
- }
2996
- ]
2997
- }
2998
- ]
2999
- ]
3000
- },
3001
- {
3002
- "from": "normal",
3003
- "to": "normal",
3004
- "event": "UPDATE",
3005
- "guard": [
3006
- "<",
3007
- [
3008
- "/",
3009
- "@payload.current",
3010
- "@entity.max"
3011
- ],
3012
- 0.85
3013
- ],
3014
- "effects": [
3015
- [
3016
- "set",
3017
- "@entity.current",
3018
- "@payload.current"
3019
- ],
3020
- [
3021
- "render-ui",
3022
- "main",
3023
- {
3024
- "type": "stack",
3025
- "direction": "vertical",
3026
- "gap": "lg",
3027
- "children": [
3028
- {
3029
- "type": "stack",
3030
- "direction": "horizontal",
3031
- "gap": "sm",
3032
- "align": "center",
3033
- "children": [
3034
- {
3035
- "type": "icon",
3036
- "name": "gauge",
3037
- "size": "lg"
3038
- },
3039
- {
3040
- "type": "typography",
3041
- "content": "Token Usage",
3042
- "variant": "h2"
3043
- },
3044
- {
3045
- "type": "badge",
3046
- "label": "Normal",
3047
- "variant": "default"
3048
- }
3049
- ]
3050
- },
3051
- {
3052
- "type": "divider"
3053
- },
3054
- {
3055
- "type": "progress-bar",
3056
- "value": "@entity.current",
3057
- "max": "@entity.max"
3058
- },
3059
- {
3060
- "type": "stack",
3061
- "direction": "horizontal",
3062
- "gap": "md",
3063
- "children": [
3064
- {
3065
- "type": "stat-display",
3066
- "label": "Tokens Used",
3067
- "value": "@entity.current"
3068
- },
3069
- {
3070
- "type": "stat-display",
3071
- "label": "Max Tokens",
3072
- "value": "@entity.max"
3073
- }
3074
- ]
3075
- },
3076
- {
3077
- "type": "button",
3078
- "label": "Reset",
3079
- "event": "RESET",
3080
- "variant": "ghost",
3081
- "icon": "rotate-ccw"
3082
- }
3083
- ]
3084
- }
3085
- ]
3086
- ]
3087
- },
3088
- {
3089
- "from": "normal",
3090
- "to": "warning",
3091
- "event": "UPDATE",
3092
- "guard": [
3093
- "and",
3094
- [
3095
- ">=",
3096
- [
3097
- "/",
3098
- "@payload.current",
3099
- "@entity.max"
3100
- ],
3101
- 0.85
3102
- ],
3103
- [
3104
- "<",
3105
- [
3106
- "/",
3107
- "@payload.current",
3108
- "@entity.max"
3109
- ],
3110
- 0.95
3111
- ]
3112
- ],
3113
- "effects": [
3114
- [
3115
- "set",
3116
- "@entity.current",
3117
- "@payload.current"
3118
- ],
3119
- [
3120
- "render-ui",
3121
- "main",
3122
- {
3123
- "type": "stack",
3124
- "direction": "vertical",
3125
- "gap": "lg",
3126
- "children": [
3127
- {
3128
- "type": "stack",
3129
- "direction": "horizontal",
3130
- "gap": "sm",
3131
- "align": "center",
3132
- "children": [
3133
- {
3134
- "type": "icon",
3135
- "name": "alert-triangle",
3136
- "size": "lg"
3137
- },
3138
- {
3139
- "type": "typography",
3140
- "content": "Token Usage",
3141
- "variant": "h2"
3142
- },
3143
- {
3144
- "type": "badge",
3145
- "label": "Warning",
3146
- "variant": "warning"
3147
- }
3148
- ]
3149
- },
3150
- {
3151
- "type": "divider"
3152
- },
3153
- {
3154
- "type": "alert",
3155
- "variant": "warning",
3156
- "message": "Token usage approaching limit. Consider compacting."
3157
- },
3158
- {
3159
- "type": "progress-bar",
3160
- "value": "@entity.current",
3161
- "max": "@entity.max"
3162
- },
3163
- {
3164
- "type": "stack",
3165
- "direction": "horizontal",
3166
- "gap": "md",
3167
- "children": [
3168
- {
3169
- "type": "stat-display",
3170
- "label": "Tokens Used",
3171
- "value": "@entity.current"
3172
- },
3173
- {
3174
- "type": "stat-display",
3175
- "label": "Max Tokens",
3176
- "value": "@entity.max"
3177
- }
3178
- ]
3179
- },
3180
- {
3181
- "type": "stack",
3182
- "direction": "horizontal",
3183
- "gap": "sm",
3184
- "children": [
3185
- {
3186
- "type": "button",
3187
- "label": "Compact",
3188
- "event": "COMPACT",
3189
- "variant": "primary",
3190
- "icon": "minimize-2"
3191
- },
3192
- {
3193
- "type": "button",
3194
- "label": "Reset",
3195
- "event": "RESET",
3196
- "variant": "ghost",
3197
- "icon": "rotate-ccw"
3198
- }
3199
- ]
3200
- }
3201
- ]
3202
- }
3203
- ]
3204
- ]
3205
- },
3206
- {
3207
- "from": "normal",
3208
- "to": "critical",
3209
- "event": "UPDATE",
3210
- "guard": [
3211
- ">=",
3212
- [
3213
- "/",
3214
- "@payload.current",
3215
- "@entity.max"
3216
- ],
3217
- 0.95
3218
- ],
3219
- "effects": [
3220
- [
3221
- "set",
3222
- "@entity.current",
3223
- "@payload.current"
3224
- ],
3225
- [
3226
- "render-ui",
3227
- "main",
3228
- {
3229
- "type": "stack",
3230
- "direction": "vertical",
3231
- "gap": "lg",
3232
- "children": [
3233
- {
3234
- "type": "stack",
3235
- "direction": "horizontal",
3236
- "gap": "sm",
3237
- "align": "center",
3238
- "children": [
3239
- {
3240
- "type": "icon",
3241
- "name": "alert-octagon",
3242
- "size": "lg"
3243
- },
3244
- {
3245
- "type": "typography",
3246
- "content": "Token Usage",
3247
- "variant": "h2"
3248
- },
3249
- {
3250
- "type": "badge",
3251
- "label": "Critical",
3252
- "variant": "destructive"
3253
- }
3254
- ]
3255
- },
3256
- {
3257
- "type": "divider"
3258
- },
3259
- {
3260
- "type": "alert",
3261
- "variant": "error",
3262
- "message": "Token usage critical. Compact immediately to avoid truncation."
3263
- },
3264
- {
3265
- "type": "progress-bar",
3266
- "value": "@entity.current",
3267
- "max": "@entity.max"
3268
- },
3269
- {
3270
- "type": "stack",
3271
- "direction": "horizontal",
3272
- "gap": "md",
3273
- "children": [
3274
- {
3275
- "type": "stat-display",
3276
- "label": "Tokens Used",
3277
- "value": "@entity.current"
3278
- },
3279
- {
3280
- "type": "stat-display",
3281
- "label": "Max Tokens",
3282
- "value": "@entity.max"
3283
- }
3284
- ]
3285
- },
3286
- {
3287
- "type": "stack",
3288
- "direction": "horizontal",
3289
- "gap": "sm",
3290
- "children": [
3291
- {
3292
- "type": "button",
3293
- "label": "Compact Now",
3294
- "event": "COMPACT",
3295
- "variant": "primary",
3296
- "icon": "minimize-2"
3297
- },
3298
- {
3299
- "type": "button",
3300
- "label": "Reset",
3301
- "event": "RESET",
3302
- "variant": "ghost",
3303
- "icon": "rotate-ccw"
3304
- }
3305
- ]
3306
- }
3307
- ]
3308
- }
3309
- ]
3310
- ]
3311
- },
3312
- {
3313
- "from": "warning",
3314
- "to": "warning",
3315
- "event": "UPDATE",
3316
- "guard": [
3317
- "and",
3318
- [
3319
- ">=",
3320
- [
3321
- "/",
3322
- "@payload.current",
3323
- "@entity.max"
3324
- ],
3325
- 0.85
3326
- ],
3327
- [
3328
- "<",
3329
- [
3330
- "/",
3331
- "@payload.current",
3332
- "@entity.max"
3333
- ],
3334
- 0.95
3335
- ]
3336
- ],
3337
- "effects": [
3338
- [
3339
- "set",
3340
- "@entity.current",
3341
- "@payload.current"
3342
- ],
3343
- [
3344
- "render-ui",
3345
- "main",
3346
- {
3347
- "type": "stack",
3348
- "direction": "vertical",
3349
- "gap": "lg",
3350
- "children": [
3351
- {
3352
- "type": "stack",
3353
- "direction": "horizontal",
3354
- "gap": "sm",
3355
- "align": "center",
3356
- "children": [
3357
- {
3358
- "type": "icon",
3359
- "name": "alert-triangle",
3360
- "size": "lg"
3361
- },
3362
- {
3363
- "type": "typography",
3364
- "content": "Token Usage",
3365
- "variant": "h2"
3366
- },
3367
- {
3368
- "type": "badge",
3369
- "label": "Warning",
3370
- "variant": "warning"
3371
- }
3372
- ]
3373
- },
3374
- {
3375
- "type": "divider"
3376
- },
3377
- {
3378
- "type": "alert",
3379
- "variant": "warning",
3380
- "message": "Token usage approaching limit. Consider compacting."
3381
- },
3382
- {
3383
- "type": "progress-bar",
3384
- "value": "@entity.current",
3385
- "max": "@entity.max"
3386
- },
3387
- {
3388
- "type": "stack",
3389
- "direction": "horizontal",
3390
- "gap": "md",
3391
- "children": [
3392
- {
3393
- "type": "stat-display",
3394
- "label": "Tokens Used",
3395
- "value": "@entity.current"
3396
- },
3397
- {
3398
- "type": "stat-display",
3399
- "label": "Max Tokens",
3400
- "value": "@entity.max"
3401
- }
3402
- ]
3403
- },
3404
- {
3405
- "type": "stack",
3406
- "direction": "horizontal",
3407
- "gap": "sm",
3408
- "children": [
3409
- {
3410
- "type": "button",
3411
- "label": "Compact",
3412
- "event": "COMPACT",
3413
- "variant": "primary",
3414
- "icon": "minimize-2"
3415
- },
3416
- {
3417
- "type": "button",
3418
- "label": "Reset",
3419
- "event": "RESET",
3420
- "variant": "ghost",
3421
- "icon": "rotate-ccw"
3422
- }
3423
- ]
3424
- }
3425
- ]
3426
- }
3427
- ]
3428
- ]
3429
- },
3430
- {
3431
- "from": "warning",
3432
- "to": "critical",
3433
- "event": "UPDATE",
3434
- "guard": [
3435
- ">=",
3436
- [
3437
- "/",
3438
- "@payload.current",
3439
- "@entity.max"
3440
- ],
3441
- 0.95
3442
- ],
3443
- "effects": [
3444
- [
3445
- "set",
3446
- "@entity.current",
3447
- "@payload.current"
3448
- ],
3449
- [
3450
- "render-ui",
3451
- "main",
3452
- {
3453
- "type": "stack",
3454
- "direction": "vertical",
3455
- "gap": "lg",
3456
- "children": [
3457
- {
3458
- "type": "stack",
3459
- "direction": "horizontal",
3460
- "gap": "sm",
3461
- "align": "center",
3462
- "children": [
3463
- {
3464
- "type": "icon",
3465
- "name": "alert-octagon",
3466
- "size": "lg"
3467
- },
3468
- {
3469
- "type": "typography",
3470
- "content": "Token Usage",
3471
- "variant": "h2"
3472
- },
3473
- {
3474
- "type": "badge",
3475
- "label": "Critical",
3476
- "variant": "destructive"
3477
- }
3478
- ]
3479
- },
3480
- {
3481
- "type": "divider"
3482
- },
3483
- {
3484
- "type": "alert",
3485
- "variant": "error",
3486
- "message": "Token usage critical. Compact immediately to avoid truncation."
3487
- },
3488
- {
3489
- "type": "progress-bar",
3490
- "value": "@entity.current",
3491
- "max": "@entity.max"
3492
- },
3493
- {
3494
- "type": "stack",
3495
- "direction": "horizontal",
3496
- "gap": "md",
3497
- "children": [
3498
- {
3499
- "type": "stat-display",
3500
- "label": "Tokens Used",
3501
- "value": "@entity.current"
3502
- },
3503
- {
3504
- "type": "stat-display",
3505
- "label": "Max Tokens",
3506
- "value": "@entity.max"
3507
- }
3508
- ]
3509
- },
3510
- {
3511
- "type": "stack",
3512
- "direction": "horizontal",
3513
- "gap": "sm",
3514
- "children": [
3515
- {
3516
- "type": "button",
3517
- "label": "Compact Now",
3518
- "event": "COMPACT",
3519
- "variant": "primary",
3520
- "icon": "minimize-2"
3521
- },
3522
- {
3523
- "type": "button",
3524
- "label": "Reset",
3525
- "event": "RESET",
3526
- "variant": "ghost",
3527
- "icon": "rotate-ccw"
3528
- }
3529
- ]
3530
- }
3531
- ]
3532
- }
3533
- ]
3534
- ]
3535
- },
3536
- {
3537
- "from": "warning",
3538
- "to": "normal",
3539
- "event": "UPDATE",
3540
- "guard": [
3541
- "<",
3542
- [
3543
- "/",
3544
- "@payload.current",
3545
- "@entity.max"
3546
- ],
3547
- 0.85
3548
- ],
3549
- "effects": [
3550
- [
3551
- "set",
3552
- "@entity.current",
3553
- "@payload.current"
3554
- ],
3555
- [
3556
- "render-ui",
3557
- "main",
3558
- {
3559
- "type": "stack",
3560
- "direction": "vertical",
3561
- "gap": "lg",
3562
- "children": [
3563
- {
3564
- "type": "stack",
3565
- "direction": "horizontal",
3566
- "gap": "sm",
3567
- "align": "center",
3568
- "children": [
3569
- {
3570
- "type": "icon",
3571
- "name": "gauge",
3572
- "size": "lg"
3573
- },
3574
- {
3575
- "type": "typography",
3576
- "content": "Token Usage",
3577
- "variant": "h2"
3578
- },
3579
- {
3580
- "type": "badge",
3581
- "label": "Normal",
3582
- "variant": "default"
3583
- }
3584
- ]
3585
- },
3586
- {
3587
- "type": "divider"
3588
- },
3589
- {
3590
- "type": "progress-bar",
3591
- "value": "@entity.current",
3592
- "max": "@entity.max"
3593
- },
3594
- {
3595
- "type": "stack",
3596
- "direction": "horizontal",
3597
- "gap": "md",
3598
- "children": [
3599
- {
3600
- "type": "stat-display",
3601
- "label": "Tokens Used",
3602
- "value": "@entity.current"
3603
- },
3604
- {
3605
- "type": "stat-display",
3606
- "label": "Max Tokens",
3607
- "value": "@entity.max"
3608
- }
3609
- ]
3610
- },
3611
- {
3612
- "type": "button",
3613
- "label": "Reset",
3614
- "event": "RESET",
3615
- "variant": "ghost",
3616
- "icon": "rotate-ccw"
3617
- }
3618
- ]
3619
- }
3620
- ]
3621
- ]
3622
- },
3623
- {
3624
- "from": "critical",
3625
- "to": "critical",
3626
- "event": "UPDATE",
3627
- "guard": [
3628
- ">=",
3629
- [
3630
- "/",
3631
- "@payload.current",
3632
- "@entity.max"
3633
- ],
3634
- 0.95
3635
- ],
3636
- "effects": [
3637
- [
3638
- "set",
3639
- "@entity.current",
3640
- "@payload.current"
3641
- ],
3642
- [
3643
- "render-ui",
3644
- "main",
3645
- {
3646
- "type": "stack",
3647
- "direction": "vertical",
3648
- "gap": "lg",
3649
- "children": [
3650
- {
3651
- "type": "stack",
3652
- "direction": "horizontal",
3653
- "gap": "sm",
3654
- "align": "center",
3655
- "children": [
3656
- {
3657
- "type": "icon",
3658
- "name": "alert-octagon",
3659
- "size": "lg"
3660
- },
3661
- {
3662
- "type": "typography",
3663
- "content": "Token Usage",
3664
- "variant": "h2"
3665
- },
3666
- {
3667
- "type": "badge",
3668
- "label": "Critical",
3669
- "variant": "destructive"
3670
- }
3671
- ]
3672
- },
3673
- {
3674
- "type": "divider"
3675
- },
3676
- {
3677
- "type": "alert",
3678
- "variant": "error",
3679
- "message": "Token usage critical. Compact immediately to avoid truncation."
3680
- },
3681
- {
3682
- "type": "progress-bar",
3683
- "value": "@entity.current",
3684
- "max": "@entity.max"
3685
- },
3686
- {
3687
- "type": "stack",
3688
- "direction": "horizontal",
3689
- "gap": "md",
3690
- "children": [
3691
- {
3692
- "type": "stat-display",
3693
- "label": "Tokens Used",
3694
- "value": "@entity.current"
3695
- },
3696
- {
3697
- "type": "stat-display",
3698
- "label": "Max Tokens",
3699
- "value": "@entity.max"
3700
- }
3701
- ]
3702
- },
3703
- {
3704
- "type": "stack",
3705
- "direction": "horizontal",
3706
- "gap": "sm",
3707
- "children": [
3708
- {
3709
- "type": "button",
3710
- "label": "Compact Now",
3711
- "event": "COMPACT",
3712
- "variant": "primary",
3713
- "icon": "minimize-2"
3714
- },
3715
- {
3716
- "type": "button",
3717
- "label": "Reset",
3718
- "event": "RESET",
3719
- "variant": "ghost",
3720
- "icon": "rotate-ccw"
3721
- }
3722
- ]
3723
- }
3724
- ]
3725
- }
3726
- ]
3727
- ]
3728
- },
3729
- {
3730
- "from": "critical",
3731
- "to": "warning",
3732
- "event": "UPDATE",
3733
- "guard": [
3734
- "and",
3735
- [
3736
- ">=",
3737
- [
3738
- "/",
3739
- "@payload.current",
3740
- "@entity.max"
3741
- ],
3742
- 0.85
3743
- ],
3744
- [
3745
- "<",
3746
- [
3747
- "/",
3748
- "@payload.current",
3749
- "@entity.max"
3750
- ],
3751
- 0.95
3752
- ]
3753
- ],
3754
- "effects": [
3755
- [
3756
- "set",
3757
- "@entity.current",
3758
- "@payload.current"
3759
- ],
3760
- [
3761
- "render-ui",
3762
- "main",
3763
- {
3764
- "type": "stack",
3765
- "direction": "vertical",
3766
- "gap": "lg",
3767
- "children": [
3768
- {
3769
- "type": "stack",
3770
- "direction": "horizontal",
3771
- "gap": "sm",
3772
- "align": "center",
3773
- "children": [
3774
- {
3775
- "type": "icon",
3776
- "name": "alert-triangle",
3777
- "size": "lg"
3778
- },
3779
- {
3780
- "type": "typography",
3781
- "content": "Token Usage",
3782
- "variant": "h2"
3783
- },
3784
- {
3785
- "type": "badge",
3786
- "label": "Warning",
3787
- "variant": "warning"
3788
- }
3789
- ]
3790
- },
3791
- {
3792
- "type": "divider"
3793
- },
3794
- {
3795
- "type": "alert",
3796
- "variant": "warning",
3797
- "message": "Token usage approaching limit. Consider compacting."
3798
- },
3799
- {
3800
- "type": "progress-bar",
3801
- "value": "@entity.current",
3802
- "max": "@entity.max"
3803
- },
3804
- {
3805
- "type": "stack",
3806
- "direction": "horizontal",
3807
- "gap": "md",
3808
- "children": [
3809
- {
3810
- "type": "stat-display",
3811
- "label": "Tokens Used",
3812
- "value": "@entity.current"
3813
- },
3814
- {
3815
- "type": "stat-display",
3816
- "label": "Max Tokens",
3817
- "value": "@entity.max"
3818
- }
3819
- ]
3820
- },
3821
- {
3822
- "type": "stack",
3823
- "direction": "horizontal",
3824
- "gap": "sm",
3825
- "children": [
3826
- {
3827
- "type": "button",
3828
- "label": "Compact",
3829
- "event": "COMPACT",
3830
- "variant": "primary",
3831
- "icon": "minimize-2"
3832
- },
3833
- {
3834
- "type": "button",
3835
- "label": "Reset",
3836
- "event": "RESET",
3837
- "variant": "ghost",
3838
- "icon": "rotate-ccw"
3839
- }
3840
- ]
3841
- }
3842
- ]
3843
- }
3844
- ]
3845
- ]
3846
- },
3847
- {
3848
- "from": "critical",
3849
- "to": "normal",
3850
- "event": "UPDATE",
3851
- "guard": [
3852
- "<",
3853
- [
3854
- "/",
3855
- "@payload.current",
3856
- "@entity.max"
3857
- ],
3858
- 0.85
3859
- ],
3860
- "effects": [
3861
- [
3862
- "set",
3863
- "@entity.current",
3864
- "@payload.current"
3865
- ],
3866
- [
3867
- "render-ui",
3868
- "main",
3869
- {
3870
- "type": "stack",
3871
- "direction": "vertical",
3872
- "gap": "lg",
3873
- "children": [
3874
- {
3875
- "type": "stack",
3876
- "direction": "horizontal",
3877
- "gap": "sm",
3878
- "align": "center",
3879
- "children": [
3880
- {
3881
- "type": "icon",
3882
- "name": "gauge",
3883
- "size": "lg"
3884
- },
3885
- {
3886
- "type": "typography",
3887
- "content": "Token Usage",
3888
- "variant": "h2"
3889
- },
3890
- {
3891
- "type": "badge",
3892
- "label": "Normal",
3893
- "variant": "default"
3894
- }
3895
- ]
3896
- },
3897
- {
3898
- "type": "divider"
3899
- },
3900
- {
3901
- "type": "progress-bar",
3902
- "value": "@entity.current",
3903
- "max": "@entity.max"
3904
- },
3905
- {
3906
- "type": "stack",
3907
- "direction": "horizontal",
3908
- "gap": "md",
3909
- "children": [
3910
- {
3911
- "type": "stat-display",
3912
- "label": "Tokens Used",
3913
- "value": "@entity.current"
3914
- },
3915
- {
3916
- "type": "stat-display",
3917
- "label": "Max Tokens",
3918
- "value": "@entity.max"
3919
- }
3920
- ]
3921
- },
3922
- {
3923
- "type": "button",
3924
- "label": "Reset",
3925
- "event": "RESET",
3926
- "variant": "ghost",
3927
- "icon": "rotate-ccw"
3928
- }
3929
- ]
3930
- }
3931
- ]
3932
- ]
3933
- },
3934
- {
3935
- "from": "normal",
3936
- "to": "normal",
3937
- "event": "COMPACT",
3938
- "effects": [
3939
- [
3940
- "agent/compact"
3941
- ],
3942
- [
3943
- "set",
3944
- "@entity.lastCompactedAt",
3945
- "@now"
3946
- ],
3947
- [
3948
- "agent/token-count"
3949
- ],
3950
- [
3951
- "render-ui",
3952
- "main",
3953
- {
3954
- "type": "stack",
3955
- "direction": "vertical",
3956
- "gap": "lg",
3957
- "children": [
3958
- {
3959
- "type": "stack",
3960
- "direction": "horizontal",
3961
- "gap": "sm",
3962
- "align": "center",
3963
- "children": [
3964
- {
3965
- "type": "icon",
3966
- "name": "gauge",
3967
- "size": "lg"
3968
- },
3969
- {
3970
- "type": "typography",
3971
- "content": "Token Usage",
3972
- "variant": "h2"
3973
- },
3974
- {
3975
- "type": "badge",
3976
- "label": "Normal",
3977
- "variant": "default"
3978
- }
3979
- ]
3980
- },
3981
- {
3982
- "type": "divider"
3983
- },
3984
- {
3985
- "type": "progress-bar",
3986
- "value": "@entity.current",
3987
- "max": "@entity.max"
3988
- },
3989
- {
3990
- "type": "stack",
3991
- "direction": "horizontal",
3992
- "gap": "md",
3993
- "children": [
3994
- {
3995
- "type": "stat-display",
3996
- "label": "Tokens Used",
3997
- "value": "@entity.current"
3998
- },
3999
- {
4000
- "type": "stat-display",
4001
- "label": "Max Tokens",
4002
- "value": "@entity.max"
4003
- }
4004
- ]
4005
- },
4006
- {
4007
- "type": "button",
4008
- "label": "Reset",
4009
- "event": "RESET",
4010
- "variant": "ghost",
4011
- "icon": "rotate-ccw"
4012
- }
4013
- ]
4014
- }
4015
- ]
4016
- ]
4017
- },
4018
- {
4019
- "from": "warning",
4020
- "to": "normal",
4021
- "event": "COMPACT",
4022
- "effects": [
4023
- [
4024
- "agent/compact"
4025
- ],
4026
- [
4027
- "set",
4028
- "@entity.lastCompactedAt",
4029
- "@now"
4030
- ],
4031
- [
4032
- "agent/token-count"
4033
- ],
4034
- [
4035
- "render-ui",
4036
- "main",
4037
- {
4038
- "type": "stack",
4039
- "direction": "vertical",
4040
- "gap": "lg",
4041
- "children": [
4042
- {
4043
- "type": "stack",
4044
- "direction": "horizontal",
4045
- "gap": "sm",
4046
- "align": "center",
4047
- "children": [
4048
- {
4049
- "type": "icon",
4050
- "name": "gauge",
4051
- "size": "lg"
4052
- },
4053
- {
4054
- "type": "typography",
4055
- "content": "Token Usage",
4056
- "variant": "h2"
4057
- },
4058
- {
4059
- "type": "badge",
4060
- "label": "Normal",
4061
- "variant": "default"
4062
- }
4063
- ]
4064
- },
4065
- {
4066
- "type": "divider"
4067
- },
4068
- {
4069
- "type": "progress-bar",
4070
- "value": "@entity.current",
4071
- "max": "@entity.max"
4072
- },
4073
- {
4074
- "type": "stack",
4075
- "direction": "horizontal",
4076
- "gap": "md",
4077
- "children": [
4078
- {
4079
- "type": "stat-display",
4080
- "label": "Tokens Used",
4081
- "value": "@entity.current"
4082
- },
4083
- {
4084
- "type": "stat-display",
4085
- "label": "Max Tokens",
4086
- "value": "@entity.max"
4087
- }
4088
- ]
4089
- },
4090
- {
4091
- "type": "button",
4092
- "label": "Reset",
4093
- "event": "RESET",
4094
- "variant": "ghost",
4095
- "icon": "rotate-ccw"
4096
- }
4097
- ]
4098
- }
4099
- ]
4100
- ]
4101
- },
4102
- {
4103
- "from": "critical",
4104
- "to": "normal",
4105
- "event": "COMPACT",
4106
- "effects": [
4107
- [
4108
- "agent/compact"
4109
- ],
4110
- [
4111
- "set",
4112
- "@entity.lastCompactedAt",
4113
- "@now"
4114
- ],
4115
- [
4116
- "agent/token-count"
4117
- ],
4118
- [
4119
- "render-ui",
4120
- "main",
4121
- {
4122
- "type": "stack",
4123
- "direction": "vertical",
4124
- "gap": "lg",
4125
- "children": [
4126
- {
4127
- "type": "stack",
4128
- "direction": "horizontal",
4129
- "gap": "sm",
4130
- "align": "center",
4131
- "children": [
4132
- {
4133
- "type": "icon",
4134
- "name": "gauge",
4135
- "size": "lg"
4136
- },
4137
- {
4138
- "type": "typography",
4139
- "content": "Token Usage",
4140
- "variant": "h2"
4141
- },
4142
- {
4143
- "type": "badge",
4144
- "label": "Normal",
4145
- "variant": "default"
4146
- }
4147
- ]
4148
- },
4149
- {
4150
- "type": "divider"
4151
- },
4152
- {
4153
- "type": "progress-bar",
4154
- "value": "@entity.current",
4155
- "max": "@entity.max"
4156
- },
4157
- {
4158
- "type": "stack",
4159
- "direction": "horizontal",
4160
- "gap": "md",
4161
- "children": [
4162
- {
4163
- "type": "stat-display",
4164
- "label": "Tokens Used",
4165
- "value": "@entity.current"
4166
- },
4167
- {
4168
- "type": "stat-display",
4169
- "label": "Max Tokens",
4170
- "value": "@entity.max"
4171
- }
4172
- ]
4173
- },
4174
- {
4175
- "type": "button",
4176
- "label": "Reset",
4177
- "event": "RESET",
4178
- "variant": "ghost",
4179
- "icon": "rotate-ccw"
4180
- }
4181
- ]
4182
- }
4183
- ]
4184
- ]
4185
- },
4186
- {
4187
- "from": "normal",
4188
- "to": "normal",
4189
- "event": "RESET",
4190
- "effects": [
4191
- [
4192
- "set",
4193
- "@entity.current",
4194
- 0
4195
- ],
4196
- [
4197
- "render-ui",
4198
- "main",
4199
- {
4200
- "type": "stack",
4201
- "direction": "vertical",
4202
- "gap": "lg",
4203
- "children": [
4204
- {
4205
- "type": "stack",
4206
- "direction": "horizontal",
4207
- "gap": "sm",
4208
- "align": "center",
4209
- "children": [
4210
- {
4211
- "type": "icon",
4212
- "name": "gauge",
4213
- "size": "lg"
4214
- },
4215
- {
4216
- "type": "typography",
4217
- "content": "Token Usage",
4218
- "variant": "h2"
4219
- },
4220
- {
4221
- "type": "badge",
4222
- "label": "Normal",
4223
- "variant": "default"
4224
- }
4225
- ]
4226
- },
4227
- {
4228
- "type": "divider"
4229
- },
4230
- {
4231
- "type": "progress-bar",
4232
- "value": "@entity.current",
4233
- "max": "@entity.max"
4234
- },
4235
- {
4236
- "type": "stack",
4237
- "direction": "horizontal",
4238
- "gap": "md",
4239
- "children": [
4240
- {
4241
- "type": "stat-display",
4242
- "label": "Tokens Used",
4243
- "value": "@entity.current"
4244
- },
4245
- {
4246
- "type": "stat-display",
4247
- "label": "Max Tokens",
4248
- "value": "@entity.max"
4249
- }
4250
- ]
4251
- },
4252
- {
4253
- "type": "button",
4254
- "label": "Reset",
4255
- "event": "RESET",
4256
- "variant": "ghost",
4257
- "icon": "rotate-ccw"
4258
- }
4259
- ]
4260
- }
4261
- ]
4262
- ]
4263
- },
4264
- {
4265
- "from": "warning",
4266
- "to": "normal",
4267
- "event": "RESET",
4268
- "effects": [
4269
- [
4270
- "set",
4271
- "@entity.current",
4272
- 0
4273
- ],
4274
- [
4275
- "render-ui",
4276
- "main",
4277
- {
4278
- "type": "stack",
4279
- "direction": "vertical",
4280
- "gap": "lg",
4281
- "children": [
4282
- {
4283
- "type": "stack",
4284
- "direction": "horizontal",
4285
- "gap": "sm",
4286
- "align": "center",
4287
- "children": [
4288
- {
4289
- "type": "icon",
4290
- "name": "gauge",
4291
- "size": "lg"
4292
- },
4293
- {
4294
- "type": "typography",
4295
- "content": "Token Usage",
4296
- "variant": "h2"
4297
- },
4298
- {
4299
- "type": "badge",
4300
- "label": "Normal",
4301
- "variant": "default"
4302
- }
4303
- ]
4304
- },
4305
- {
4306
- "type": "divider"
4307
- },
4308
- {
4309
- "type": "progress-bar",
4310
- "value": "@entity.current",
4311
- "max": "@entity.max"
4312
- },
4313
- {
4314
- "type": "stack",
4315
- "direction": "horizontal",
4316
- "gap": "md",
4317
- "children": [
4318
- {
4319
- "type": "stat-display",
4320
- "label": "Tokens Used",
4321
- "value": "@entity.current"
4322
- },
4323
- {
4324
- "type": "stat-display",
4325
- "label": "Max Tokens",
4326
- "value": "@entity.max"
4327
- }
4328
- ]
4329
- },
4330
- {
4331
- "type": "button",
4332
- "label": "Reset",
4333
- "event": "RESET",
4334
- "variant": "ghost",
4335
- "icon": "rotate-ccw"
4336
- }
4337
- ]
4338
- }
4339
- ]
4340
- ]
4341
- },
4342
- {
4343
- "from": "critical",
4344
- "to": "normal",
4345
- "event": "RESET",
4346
- "effects": [
4347
- [
4348
- "set",
4349
- "@entity.current",
4350
- 0
4351
- ],
4352
- [
4353
- "render-ui",
4354
- "main",
4355
- {
4356
- "type": "stack",
4357
- "direction": "vertical",
4358
- "gap": "lg",
4359
- "children": [
4360
- {
4361
- "type": "stack",
4362
- "direction": "horizontal",
4363
- "gap": "sm",
4364
- "align": "center",
4365
- "children": [
4366
- {
4367
- "type": "icon",
4368
- "name": "gauge",
4369
- "size": "lg"
4370
- },
4371
- {
4372
- "type": "typography",
4373
- "content": "Token Usage",
4374
- "variant": "h2"
4375
- },
4376
- {
4377
- "type": "badge",
4378
- "label": "Normal",
4379
- "variant": "default"
4380
- }
4381
- ]
4382
- },
4383
- {
4384
- "type": "divider"
4385
- },
4386
- {
4387
- "type": "progress-bar",
4388
- "value": "@entity.current",
4389
- "max": "@entity.max"
4390
- },
4391
- {
4392
- "type": "stack",
4393
- "direction": "horizontal",
4394
- "gap": "md",
4395
- "children": [
4396
- {
4397
- "type": "stat-display",
4398
- "label": "Tokens Used",
4399
- "value": "@entity.current"
4400
- },
4401
- {
4402
- "type": "stat-display",
4403
- "label": "Max Tokens",
4404
- "value": "@entity.max"
4405
- }
4406
- ]
4407
- },
4408
- {
4409
- "type": "button",
4410
- "label": "Reset",
4411
- "event": "RESET",
4412
- "variant": "ghost",
4413
- "icon": "rotate-ccw"
4414
- }
4415
- ]
4416
- }
4417
- ]
4418
- ]
4419
- }
4420
- ]
4421
- },
4422
- "listens": []
4423
- }
4424
- ],
4425
- "pages": [
4426
- {
4427
- "name": "AgentToolLoopPage",
4428
- "path": "/agenttoolloops",
4429
- "traits": [
4430
- {
4431
- "ref": "AgentToolLoopLoop"
4432
- },
4433
- {
4434
- "ref": "ToolLoopStepProgress"
4435
- },
4436
- {
4437
- "ref": "ToolLoopCompletionFlow"
4438
- },
4439
- {
4440
- "ref": "ToolLoopToolCallFlow"
4441
- },
4442
- {
4443
- "ref": "ToolLoopContextMonitor"
4444
- }
4445
- ]
4446
- }
4447
- ]
4448
- }
4449
- ],
4450
- "description": "Composes agent atoms + UI atoms into an iterative tool-use loop with step progress tracking and activity logging. The agent generates a plan, invokes tools to execute steps, checks results, and either loops or finishes. Composed atoms: - stdAgentCompletion: LLM plan generation and result checking - stdAgentToolCall: tool invocation with argument passing - stdAgentContextWindow: context window monitoring and compaction - stdAgentStepProgress: visual pipeline step indicator - stdAgentActivityLog: chronological action timeline (2026-04-08). The canonical source for std behaviors is now the registry `.orb` file at `packages/almadar-std/behaviors/registry/<level>/<name>.orb`, which is generated from this TS source by `tools/almadar-behavior-ts-to-orb/` and consumed by the compiler's embedded loader. Consumers should import behaviors via `.lolo`/`.orb` `uses` declarations and reference them as `Alias.entity` / `Alias.traits.X` / `Alias.pages.X`, applying overrides at the call site (`linkedEntity`, `name`, `events`, `effects`, `listens`, `emitsScope`). The TS `*Params` interface and the exported factory functions remain ONLY as the authoring path for the converter; they are NOT a stable public API and may change without notice. See `docs/Almadar_Orb_Behaviors.md` for the orbital-as-function model and `docs/LOLO_Gaps.md` for the migration plan."
4451
- }