@superblocksteam/vite-plugin-file-sync 2.0.3-next.99 → 2.0.4

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 (392) hide show
  1. package/dist/ai-service/app-interface/shell.d.ts +15 -0
  2. package/dist/ai-service/app-interface/shell.d.ts.map +1 -0
  3. package/dist/ai-service/app-interface/shell.js +81 -0
  4. package/dist/ai-service/app-interface/shell.js.map +1 -0
  5. package/dist/ai-service/app-interface/source-tracker.d.ts +17 -0
  6. package/dist/ai-service/app-interface/source-tracker.d.ts.map +1 -0
  7. package/dist/ai-service/app-interface/source-tracker.js +41 -0
  8. package/dist/ai-service/app-interface/source-tracker.js.map +1 -0
  9. package/dist/ai-service/artifacts/bolt.js +1 -1
  10. package/dist/ai-service/artifacts/bolt.js.map +1 -1
  11. package/dist/ai-service/const.d.ts +8 -1
  12. package/dist/ai-service/const.d.ts.map +1 -1
  13. package/dist/ai-service/const.js +8 -1
  14. package/dist/ai-service/const.js.map +1 -1
  15. package/dist/ai-service/eval/template-renderer.d.ts.map +1 -1
  16. package/dist/ai-service/eval/template-renderer.js +3 -2
  17. package/dist/ai-service/eval/template-renderer.js.map +1 -1
  18. package/dist/ai-service/index.d.ts +11 -4
  19. package/dist/ai-service/index.d.ts.map +1 -1
  20. package/dist/ai-service/index.js +50 -19
  21. package/dist/ai-service/index.js.map +1 -1
  22. package/dist/ai-service/integrations/const.d.ts +1 -1
  23. package/dist/ai-service/integrations/const.js +1 -1
  24. package/dist/ai-service/integrations/const.js.map +1 -1
  25. package/dist/ai-service/integrations/to-sdk-prompt.js +211 -18
  26. package/dist/ai-service/integrations/to-sdk-prompt.js.map +1 -1
  27. package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.d.ts +1 -1
  28. package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.d.ts.map +1 -1
  29. package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.js +2 -2
  30. package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.js.map +1 -1
  31. package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.d.ts +1 -1
  32. package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.d.ts.map +1 -1
  33. package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.js +2 -2
  34. package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.js.map +1 -1
  35. package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.d.ts +1 -1
  36. package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.d.ts.map +1 -1
  37. package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.js +2 -2
  38. package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.js.map +1 -1
  39. package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.d.ts +1 -1
  40. package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.d.ts.map +1 -1
  41. package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.js +2 -2
  42. package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.js.map +1 -1
  43. package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.d.ts +1 -1
  44. package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.d.ts.map +1 -1
  45. package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.js +2 -2
  46. package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.js.map +1 -1
  47. package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.d.ts +1 -1
  48. package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.d.ts.map +1 -1
  49. package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.js +2 -2
  50. package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.js.map +1 -1
  51. package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.d.ts +1 -1
  52. package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.d.ts.map +1 -1
  53. package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.js +2 -2
  54. package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.js.map +1 -1
  55. package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.d.ts +1 -1
  56. package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.d.ts.map +1 -1
  57. package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.js +2 -2
  58. package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.js.map +1 -1
  59. package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.d.ts +1 -1
  60. package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.d.ts.map +1 -1
  61. package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.js +2 -2
  62. package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.js.map +1 -1
  63. package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.d.ts +1 -1
  64. package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.d.ts.map +1 -1
  65. package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.js +2 -2
  66. package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.js.map +1 -1
  67. package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.d.ts +1 -1
  68. package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.d.ts.map +1 -1
  69. package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.js +2 -2
  70. package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.js.map +1 -1
  71. package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.d.ts +1 -1
  72. package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.d.ts.map +1 -1
  73. package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.js +2 -2
  74. package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.js.map +1 -1
  75. package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.d.ts +1 -1
  76. package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.d.ts.map +1 -1
  77. package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.js +2 -2
  78. package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.js.map +1 -1
  79. package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.d.ts +1 -1
  80. package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.d.ts.map +1 -1
  81. package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.js +2 -2
  82. package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.js.map +1 -1
  83. package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.d.ts +1 -1
  84. package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.d.ts.map +1 -1
  85. package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.js +2 -2
  86. package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.js.map +1 -1
  87. package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.d.ts +1 -1
  88. package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.d.ts.map +1 -1
  89. package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.js +2 -2
  90. package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.js.map +1 -1
  91. package/dist/ai-service/prompts/generated/library-components/index.d.ts +0 -1
  92. package/dist/ai-service/prompts/generated/library-components/index.d.ts.map +1 -1
  93. package/dist/ai-service/prompts/generated/library-components/index.js +0 -1
  94. package/dist/ai-service/prompts/generated/library-components/index.js.map +1 -1
  95. package/dist/ai-service/prompts/generated/library-typedefs/Dim.js +1 -1
  96. package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.d.ts +1 -1
  97. package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.d.ts.map +1 -1
  98. package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.js +2 -2
  99. package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.js.map +1 -1
  100. package/dist/ai-service/prompts/generated/subprompts/index.d.ts +3 -0
  101. package/dist/ai-service/prompts/generated/subprompts/index.d.ts.map +1 -1
  102. package/dist/ai-service/prompts/generated/subprompts/index.js +3 -0
  103. package/dist/ai-service/prompts/generated/subprompts/index.js.map +1 -1
  104. package/dist/ai-service/prompts/generated/subprompts/superblocks-api.d.ts +1 -1
  105. package/dist/ai-service/prompts/generated/subprompts/superblocks-api.d.ts.map +1 -1
  106. package/dist/ai-service/prompts/generated/subprompts/superblocks-api.js +2 -2
  107. package/dist/ai-service/prompts/generated/subprompts/superblocks-api.js.map +1 -1
  108. package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.d.ts +1 -1
  109. package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.d.ts.map +1 -1
  110. package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.js +2 -2
  111. package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.js.map +1 -1
  112. package/dist/ai-service/prompts/generated/subprompts/superblocks-custom-components.d.ts +1 -1
  113. package/dist/ai-service/prompts/generated/subprompts/superblocks-custom-components.d.ts.map +1 -1
  114. package/dist/ai-service/prompts/generated/subprompts/superblocks-custom-components.js +2 -2
  115. package/dist/ai-service/prompts/generated/subprompts/superblocks-custom-components.js.map +1 -1
  116. package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.d.ts +2 -0
  117. package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.d.ts.map +1 -0
  118. package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.js +6 -0
  119. package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.js.map +1 -0
  120. package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.d.ts +1 -1
  121. package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.d.ts.map +1 -1
  122. package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.js +2 -2
  123. package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.js.map +1 -1
  124. package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.d.ts +2 -0
  125. package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.d.ts.map +1 -0
  126. package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.js +6 -0
  127. package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.js.map +1 -0
  128. package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.d.ts +1 -1
  129. package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.d.ts.map +1 -1
  130. package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.js +2 -2
  131. package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.js.map +1 -1
  132. package/dist/ai-service/prompts/generated/subprompts/superblocks-page.d.ts +1 -1
  133. package/dist/ai-service/prompts/generated/subprompts/superblocks-page.d.ts.map +1 -1
  134. package/dist/ai-service/prompts/generated/subprompts/superblocks-page.js +2 -2
  135. package/dist/ai-service/prompts/generated/subprompts/superblocks-page.js.map +1 -1
  136. package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.d.ts +2 -0
  137. package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.d.ts.map +1 -0
  138. package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.js +6 -0
  139. package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.js.map +1 -0
  140. package/dist/ai-service/prompts/generated/subprompts/superblocks-routes.d.ts +1 -1
  141. package/dist/ai-service/prompts/generated/subprompts/superblocks-routes.d.ts.map +1 -1
  142. package/dist/ai-service/prompts/generated/subprompts/superblocks-routes.js +2 -2
  143. package/dist/ai-service/prompts/generated/subprompts/superblocks-routes.js.map +1 -1
  144. package/dist/ai-service/prompts/generated/subprompts/superblocks-state.d.ts +1 -1
  145. package/dist/ai-service/prompts/generated/subprompts/superblocks-state.d.ts.map +1 -1
  146. package/dist/ai-service/prompts/generated/subprompts/superblocks-state.js +2 -2
  147. package/dist/ai-service/prompts/generated/subprompts/superblocks-state.js.map +1 -1
  148. package/dist/ai-service/prompts/generated/subprompts/superblocks-theming.d.ts +1 -1
  149. package/dist/ai-service/prompts/generated/subprompts/superblocks-theming.d.ts.map +1 -1
  150. package/dist/ai-service/prompts/generated/subprompts/superblocks-theming.js +2 -2
  151. package/dist/ai-service/prompts/generated/subprompts/superblocks-theming.js.map +1 -1
  152. package/dist/ai-service/prompts/generated/subprompts/system.d.ts +1 -1
  153. package/dist/ai-service/prompts/generated/subprompts/system.d.ts.map +1 -1
  154. package/dist/ai-service/prompts/generated/subprompts/system.js +2 -2
  155. package/dist/ai-service/prompts/generated/subprompts/system.js.map +1 -1
  156. package/dist/ai-service/prompts/markdown-loader.d.ts.map +1 -1
  157. package/dist/ai-service/prompts/markdown-loader.js +11 -5
  158. package/dist/ai-service/prompts/markdown-loader.js.map +1 -1
  159. package/dist/ai-service/prompts/system.d.ts.map +1 -1
  160. package/dist/ai-service/prompts/system.js +12 -0
  161. package/dist/ai-service/prompts/system.js.map +1 -1
  162. package/dist/ai-service/result-buffer/bolt.d.ts +3 -0
  163. package/dist/ai-service/result-buffer/bolt.d.ts.map +1 -1
  164. package/dist/ai-service/result-buffer/bolt.js +28 -1
  165. package/dist/ai-service/result-buffer/bolt.js.map +1 -1
  166. package/dist/ai-service/result-buffer/shared.d.ts +6 -2
  167. package/dist/ai-service/result-buffer/shared.d.ts.map +1 -1
  168. package/dist/ai-service/result-buffer/shared.js.map +1 -1
  169. package/dist/ai-service/state-machine/clark-fsm.d.ts +39 -5
  170. package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
  171. package/dist/ai-service/state-machine/clark-fsm.js +10 -1
  172. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  173. package/dist/ai-service/state-machine/fsm.d.ts.map +1 -1
  174. package/dist/ai-service/state-machine/fsm.js +15 -6
  175. package/dist/ai-service/state-machine/fsm.js.map +1 -1
  176. package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
  177. package/dist/ai-service/state-machine/handlers/agent-planning.js +175 -56
  178. package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
  179. package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts +2 -2
  180. package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts.map +1 -1
  181. package/dist/ai-service/state-machine/handlers/awaiting-user.js +31 -4
  182. package/dist/ai-service/state-machine/handlers/awaiting-user.js.map +1 -1
  183. package/dist/ai-service/state-machine/handlers/idle.d.ts.map +1 -1
  184. package/dist/ai-service/state-machine/handlers/idle.js +6 -4
  185. package/dist/ai-service/state-machine/handlers/idle.js.map +1 -1
  186. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts +1 -1
  187. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  188. package/dist/ai-service/state-machine/handlers/llm-generating.js +125 -19
  189. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  190. package/dist/ai-service/state-machine/handlers/post-processing.d.ts +6 -1
  191. package/dist/ai-service/state-machine/handlers/post-processing.d.ts.map +1 -1
  192. package/dist/ai-service/state-machine/handlers/post-processing.js +216 -22
  193. package/dist/ai-service/state-machine/handlers/post-processing.js.map +1 -1
  194. package/dist/ai-service/state-machine/handlers/runtime-reviewing.d.ts +2 -1
  195. package/dist/ai-service/state-machine/handlers/runtime-reviewing.d.ts.map +1 -1
  196. package/dist/ai-service/state-machine/handlers/runtime-reviewing.js +62 -11
  197. package/dist/ai-service/state-machine/handlers/runtime-reviewing.js.map +1 -1
  198. package/dist/ai-service/state-machine/helpers/change-info.d.ts +8 -0
  199. package/dist/ai-service/state-machine/helpers/change-info.d.ts.map +1 -0
  200. package/dist/ai-service/state-machine/helpers/change-info.js +109 -0
  201. package/dist/ai-service/state-machine/helpers/change-info.js.map +1 -0
  202. package/dist/ai-service/state-machine/helpers/peer.d.ts +3 -2
  203. package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
  204. package/dist/ai-service/state-machine/helpers/peer.js +35 -4
  205. package/dist/ai-service/state-machine/helpers/peer.js.map +1 -1
  206. package/dist/ai-service/state-machine/helpers/transition.d.ts +1 -2
  207. package/dist/ai-service/state-machine/helpers/transition.d.ts.map +1 -1
  208. package/dist/ai-service/state-machine/helpers/transition.js +6 -0
  209. package/dist/ai-service/state-machine/helpers/transition.js.map +1 -1
  210. package/dist/ai-service/state-machine/mocks.d.ts.map +1 -1
  211. package/dist/ai-service/state-machine/mocks.js +17 -0
  212. package/dist/ai-service/state-machine/mocks.js.map +1 -1
  213. package/dist/ai-service/transform/add-metadata-to-api-yaml/transformer.d.ts.map +1 -1
  214. package/dist/ai-service/transform/add-metadata-to-api-yaml/transformer.js +5 -4
  215. package/dist/ai-service/transform/add-metadata-to-api-yaml/transformer.js.map +1 -1
  216. package/dist/ai-service/transform/api-builder/shared.d.ts.map +1 -1
  217. package/dist/ai-service/transform/api-builder/shared.js +4 -2
  218. package/dist/ai-service/transform/api-builder/shared.js.map +1 -1
  219. package/dist/ai-service/transform/api-builder/to-sdk-transformer.d.ts.map +1 -1
  220. package/dist/ai-service/transform/api-builder/to-sdk-transformer.js +2 -1
  221. package/dist/ai-service/transform/api-builder/to-sdk-transformer.js.map +1 -1
  222. package/dist/ai-service/transform/shared.d.ts +5 -0
  223. package/dist/ai-service/transform/shared.d.ts.map +1 -1
  224. package/dist/ai-service/transform/shared.js +29 -3
  225. package/dist/ai-service/transform/shared.js.map +1 -1
  226. package/dist/ai-service/types.d.ts +15 -0
  227. package/dist/ai-service/types.d.ts.map +1 -1
  228. package/dist/ai-service/types.js +7 -1
  229. package/dist/ai-service/types.js.map +1 -1
  230. package/dist/binding-extraction/extract-embedded-identifiers.d.ts +2 -11
  231. package/dist/binding-extraction/extract-embedded-identifiers.d.ts.map +1 -1
  232. package/dist/binding-extraction/extract-embedded-identifiers.js +9 -91
  233. package/dist/binding-extraction/extract-embedded-identifiers.js.map +1 -1
  234. package/dist/binding-extraction/template-strings.d.ts +1 -2
  235. package/dist/binding-extraction/template-strings.d.ts.map +1 -1
  236. package/dist/codegen.d.ts +5 -5
  237. package/dist/codegen.d.ts.map +1 -1
  238. package/dist/codegen.js +63 -26
  239. package/dist/codegen.js.map +1 -1
  240. package/dist/draft-interface.d.ts +1 -0
  241. package/dist/draft-interface.d.ts.map +1 -1
  242. package/dist/errors/make-server-error.d.ts +1 -0
  243. package/dist/errors/make-server-error.d.ts.map +1 -1
  244. package/dist/errors/make-server-error.js +9 -0
  245. package/dist/errors/make-server-error.js.map +1 -1
  246. package/dist/file-sync-vite-plugin.d.ts.map +1 -1
  247. package/dist/file-sync-vite-plugin.js +83 -15
  248. package/dist/file-sync-vite-plugin.js.map +1 -1
  249. package/dist/file-system-manager.d.ts +7 -5
  250. package/dist/file-system-manager.d.ts.map +1 -1
  251. package/dist/file-system-manager.js +94 -27
  252. package/dist/file-system-manager.js.map +1 -1
  253. package/dist/index.d.ts +3 -0
  254. package/dist/index.d.ts.map +1 -1
  255. package/dist/index.js +2 -0
  256. package/dist/index.js.map +1 -1
  257. package/dist/inject-index-vite-plugin.d.ts +8 -0
  258. package/dist/inject-index-vite-plugin.d.ts.map +1 -0
  259. package/dist/inject-index-vite-plugin.js +41 -0
  260. package/dist/inject-index-vite-plugin.js.map +1 -0
  261. package/dist/lock-service/index.d.ts +29 -3
  262. package/dist/lock-service/index.d.ts.map +1 -1
  263. package/dist/lock-service/index.js +108 -28
  264. package/dist/lock-service/index.js.map +1 -1
  265. package/dist/parsing/computed/index.d.ts +4 -0
  266. package/dist/parsing/computed/index.d.ts.map +1 -0
  267. package/dist/parsing/computed/index.js +7 -0
  268. package/dist/parsing/computed/index.js.map +1 -0
  269. package/dist/parsing/computed/to-code-computed.d.ts +2 -1
  270. package/dist/parsing/computed/to-code-computed.d.ts.map +1 -1
  271. package/dist/parsing/computed/to-code-computed.js +22 -11
  272. package/dist/parsing/computed/to-code-computed.js.map +1 -1
  273. package/dist/parsing/dim/index.d.ts +5 -0
  274. package/dist/parsing/dim/index.d.ts.map +1 -0
  275. package/dist/parsing/dim/index.js +7 -0
  276. package/dist/parsing/dim/index.js.map +1 -0
  277. package/dist/parsing/entity/index.d.ts +2 -3
  278. package/dist/parsing/entity/index.d.ts.map +1 -1
  279. package/dist/parsing/entity/index.js +2 -3
  280. package/dist/parsing/entity/index.js.map +1 -1
  281. package/dist/parsing/events/index.d.ts +5 -0
  282. package/dist/parsing/events/index.d.ts.map +1 -0
  283. package/dist/parsing/events/index.js +7 -0
  284. package/dist/parsing/events/index.js.map +1 -0
  285. package/dist/parsing/events/to-code-events.d.ts.map +1 -1
  286. package/dist/parsing/events/to-code-events.js +52 -19
  287. package/dist/parsing/events/to-code-events.js.map +1 -1
  288. package/dist/parsing/events/to-value-events.d.ts +5 -0
  289. package/dist/parsing/events/to-value-events.d.ts.map +1 -1
  290. package/dist/parsing/events/to-value-events.js +96 -11
  291. package/dist/parsing/events/to-value-events.js.map +1 -1
  292. package/dist/parsing/ids.d.ts.map +1 -1
  293. package/dist/parsing/ids.js +48 -27
  294. package/dist/parsing/ids.js.map +1 -1
  295. package/dist/parsing/imports.d.ts +15 -0
  296. package/dist/parsing/imports.d.ts.map +1 -1
  297. package/dist/parsing/imports.js +46 -0
  298. package/dist/parsing/imports.js.map +1 -1
  299. package/dist/parsing/jsx-utils.d.ts +1 -1
  300. package/dist/parsing/jsx-utils.d.ts.map +1 -1
  301. package/dist/parsing/jsx-utils.js +10 -4
  302. package/dist/parsing/jsx-utils.js.map +1 -1
  303. package/dist/parsing/jsx.d.ts.map +1 -1
  304. package/dist/parsing/jsx.js +5 -13
  305. package/dist/parsing/jsx.js.map +1 -1
  306. package/dist/parsing/properties.d.ts.map +1 -1
  307. package/dist/parsing/properties.js +12 -2
  308. package/dist/parsing/properties.js.map +1 -1
  309. package/dist/parsing/scope.d.ts +10 -2
  310. package/dist/parsing/scope.d.ts.map +1 -1
  311. package/dist/parsing/scope.js +127 -37
  312. package/dist/parsing/scope.js.map +1 -1
  313. package/dist/parsing/template/index.d.ts +5 -0
  314. package/dist/parsing/template/index.d.ts.map +1 -0
  315. package/dist/parsing/template/index.js +7 -0
  316. package/dist/parsing/template/index.js.map +1 -0
  317. package/dist/parsing/template/to-value-template.d.ts.map +1 -1
  318. package/dist/parsing/template/to-value-template.js +15 -4
  319. package/dist/parsing/template/to-value-template.js.map +1 -1
  320. package/dist/parsing/theme.js +2 -2
  321. package/dist/parsing/theme.js.map +1 -1
  322. package/dist/parsing/type-parsing-registry.d.ts +5 -15
  323. package/dist/parsing/type-parsing-registry.d.ts.map +1 -1
  324. package/dist/parsing/type-parsing-registry.js +4 -24
  325. package/dist/parsing/type-parsing-registry.js.map +1 -1
  326. package/dist/parsing/types.d.ts +10 -0
  327. package/dist/parsing/types.d.ts.map +1 -0
  328. package/dist/parsing/types.js +2 -0
  329. package/dist/parsing/types.js.map +1 -0
  330. package/dist/parsing/util.d.ts +6 -1
  331. package/dist/parsing/util.d.ts.map +1 -1
  332. package/dist/parsing/util.js +59 -7
  333. package/dist/parsing/util.js.map +1 -1
  334. package/dist/plugin-options.d.ts +2 -2
  335. package/dist/plugin-options.d.ts.map +1 -1
  336. package/dist/refactor/javascript.d.ts.map +1 -1
  337. package/dist/refactor/javascript.js +7 -0
  338. package/dist/refactor/javascript.js.map +1 -1
  339. package/dist/rename-manager.d.ts.map +1 -1
  340. package/dist/rename-manager.js +19 -4
  341. package/dist/rename-manager.js.map +1 -1
  342. package/dist/routing.d.ts +2 -2
  343. package/dist/routing.d.ts.map +1 -1
  344. package/dist/routing.js +1 -2
  345. package/dist/routing.js.map +1 -1
  346. package/dist/sb-scope-manager.d.ts +3 -1
  347. package/dist/sb-scope-manager.d.ts.map +1 -1
  348. package/dist/sb-scope-manager.js +40 -13
  349. package/dist/sb-scope-manager.js.map +1 -1
  350. package/dist/socket-manager.d.ts +6 -5
  351. package/dist/socket-manager.d.ts.map +1 -1
  352. package/dist/socket-manager.js +38 -15
  353. package/dist/socket-manager.js.map +1 -1
  354. package/dist/source-tracker.d.ts +6 -14
  355. package/dist/source-tracker.d.ts.map +1 -1
  356. package/dist/source-tracker.js +69 -64
  357. package/dist/source-tracker.js.map +1 -1
  358. package/dist/sync-service/draft-helpers.d.ts +9 -0
  359. package/dist/sync-service/draft-helpers.d.ts.map +1 -1
  360. package/dist/sync-service/draft-helpers.js +65 -0
  361. package/dist/sync-service/draft-helpers.js.map +1 -1
  362. package/dist/sync-service/index.d.ts +11 -0
  363. package/dist/sync-service/index.d.ts.map +1 -1
  364. package/dist/sync-service/index.js +85 -14
  365. package/dist/sync-service/index.js.map +1 -1
  366. package/dist/sync-service/server-rpc/client.d.ts +5 -1
  367. package/dist/sync-service/server-rpc/client.d.ts.map +1 -1
  368. package/dist/sync-service/server-rpc/client.js +12 -25
  369. package/dist/sync-service/server-rpc/client.js.map +1 -1
  370. package/dist/sync-service/server-rpc/handlers.d.ts +2 -2
  371. package/dist/sync-service/server-rpc/handlers.d.ts.map +1 -1
  372. package/dist/sync-service/server-rpc/handlers.js.map +1 -1
  373. package/dist/sync-service/snapshot/take-snapshot.d.ts +0 -3
  374. package/dist/sync-service/snapshot/take-snapshot.d.ts.map +1 -1
  375. package/dist/sync-service/snapshot/take-snapshot.js +0 -5
  376. package/dist/sync-service/snapshot/take-snapshot.js.map +1 -1
  377. package/dist/util/logger.d.ts.map +1 -1
  378. package/dist/util/logger.js +9 -8
  379. package/dist/util/logger.js.map +1 -1
  380. package/dist/util/tracing.d.ts +1 -1
  381. package/dist/util/tracing.d.ts.map +1 -1
  382. package/dist/util/tracing.js +38 -1
  383. package/dist/util/tracing.js.map +1 -1
  384. package/dist/util.d.ts +2 -0
  385. package/dist/util.d.ts.map +1 -1
  386. package/dist/util.js +41 -0
  387. package/dist/util.js.map +1 -1
  388. package/package.json +16 -10
  389. package/dist/ai-service/prompts/generated/library-components/SbKeyValuePropsDocs.d.ts +0 -2
  390. package/dist/ai-service/prompts/generated/library-components/SbKeyValuePropsDocs.d.ts.map +0 -1
  391. package/dist/ai-service/prompts/generated/library-components/SbKeyValuePropsDocs.js +0 -6
  392. package/dist/ai-service/prompts/generated/library-components/SbKeyValuePropsDocs.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from system.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-06-04T20:53:31.834Z
5
- export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\nWhen talking always sign off with \"Clark out\"\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. ALWAYS put all the generated code in the page/index.tsx file. ONLY create files for custom components. Do not use backticks like `\n4. Prefer writing Node.js scripts instead of shell scripts. The environment doesn't support shell scripts, so use Node.js for scripting tasks whenever possible!\n5. You cannot install any NEW 3rd party packages / dependencies that are not already part of the project. If you try to install a new 3rd party package / dependency that is not already in the package.json, the app will crash! Do not do this.\n6. ALWAYS destructure all needed Page1 entities at the top of the component function\n7. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJs() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n8. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n\nAvailable shell commands:\nFile Operations: - cat: Display file contents - cp: Copy files/directories - ls: List directory contents - mkdir: Create directory - mv: Move/rename files - rm: Remove files - rmdir: Remove empty directories - touch: Create empty file/update timestamp\n\n System Information:\n - hostname: Show system name\n - ps: Display running processes\n - pwd: Print working directory\n - uptime: Show system uptime\n - env: Environment variables\n\n Development Tools:\n - node: Execute Node.js code\n - code: VSCode operations\n - jq: Process JSON\n\n Other Utilities:\n - curl, head, sort, tail, clear, which, export, chmod, scho, hostname, kill, ln, xxd, alias, false, getconf, true, loadenv, wasm, xdg-open, command, exit, source\n\n Think hard about this: Always import ALL Superblocks library components and functions in the first line of Page files.\n\n Example of importing all Superblocks library components and functions:\n\n ```tsx\n import {\n SbPage,\n SbContainer,\n SbText,\n SbButton,\n SbTable,\n SbModal,\n SbInput,\n SbDropdown,\n SbCheckbox,\n SbDatePicker,\n SbSwitch,\n SbIcon,\n SbImage,\n Dim,\n type DimModes,\n sbComputed,\n SbEventFlow,\n SbVariable,\n SbVariablePersistence,\n SbTimer,\n registerPage,\n SbApi,\n } from \"@superblocksteam/library\";\n ```\n\n Example of NOT importing all Superblocks library components and functions. This is wrong:\n\n ```tsx\n import { SbPage } from \"@superblocksteam/library\";\n ```\n\n</system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. The theme is always available in the state object, nested under \"theme\". Example: theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<SbContainer layout=\"vertical\">...` or `<SbContainer layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on SBContainer components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on SBContainer components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an SBTable component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like SbTable have heading text built in. Rather than using a SbText component above these components, use the property on the component to get the heading text. Example: For SbTable, use the \"tableHeader\" property. If you absolutely must use an SbText component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return SBContainer components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root SbContainer's height to Dim.fill(). Example: `<SbContainer height={Dim.fill()}>...`\n- SbModal components DO NOT need to have their own close button. The modal component comes with a close button by default.\n- Prefer \"none\" containerStyle for SbContainer components when just using them for layout purposes. Example: `<SbContainer containerStyle=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" containerStyle.\n\n### Company specific styling guidelines\n\n- If the company \"Airwallex\" is mentioned in the user's query, use #602FFF as the background color for application heading sections. Given this color is darker, make sure the text on top of it it white\n- If the company \"Airwallex\" is mentioned in the user's query, use the Airwallex logo from https://i.imgur.com/vWgvG58.png for the application\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<mock_data_info>\nIf you're going to use mock data to fulfill a user's request, think hard about following these rules:\n\n1. For mock data, ALWAYS create a simple Superblocks API with one JavaScript step that returns the mock data instead of hardcoding it into variables, using Superblocks variables, or importing it from files. Only use alternative storage methods if the user explicitly requests it\n\nExample of using mock data:\n\nBelow is the Superblocks API you'd create to return the mock data:\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrders.ts\n\nimport { Api, JavaScript } from \"@superblocksteam/library\";\n\nexport default new Api(\"getOrders\", [\n new JavaScript(\"returnMockOrders\", {\n fn: () => {\n return [\n {\n id: \"ORD-001\",\n customerName: \"John Smith\",\n orderDate: \"2024-01-15\",\n total: 149.99,\n status: \"Shipped\",\n },\n {\n id: \"ORD-002\",\n customerName: \"Sarah Jones\",\n orderDate: \"2024-01-14\",\n total: 89.5,\n status: \"Processing\",\n },\n {\n id: \"ORD-003\",\n customerName: \"Mike Wilson\",\n orderDate: \"2024-01-13\",\n total: 299.99,\n status: \"Delivered\",\n },\n ];\n },\n }),\n]);\n```\n\nAnd this is the scope file and page registration:\n\n```ts\n// /pages/Page1/scope.ts\nimport { createSbScope, SbApi } from \"@superblocksteam/library\";\n\nexport const Page1Scope = createSbScope(\n {\n getOrders: SbApi({}),\n },\n {\n name: \"Page1\",\n },\n);\n\nexport const Page1 = Page1Scope.entities;\n```\n\n```tsx\n// /pages/Page1/index.tsx\nimport {\n SbPage,\n SbTable,\n sbComputed,\n registerPage,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nconst MyPage = () => {\n const { getOrders } = Page1;\n\n return (\n <SbPage>\n <SbTable tableData={sbComputed(() => getOrders.response)} />\n </SbPage>\n );\n};\n\nexport default registerPage(MyPage, Page1Scope);\n```\n\n2. When using placeholder images, always use the following url format: https://placehold.co/{widthInteger}x{heightInteger}?text={urlEscapedText}\n\nExample: `https://placehold.co/600x400?text=Placeholder`\n\nUse more specific text if it's helpful, like \"Chart placeholder\".\n\n</mock_data_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<chain_of_thought_instructions>\nBefore providing a solution, BRIEFLY outline your implementation steps. This helps ensure systematic thinking and clear communication. Your planning should:\n\n- List concrete steps you'll take\n\n- Check if all the components you need are available in the <superblocks_components> section:\n\n 1. Prioritize the use of: SbButton, SbInput, SbCheckbox, SbContainer, SbDatePicker, SbDropdown, SbIcon, SbImage, SbModal, SbSection, SbSwitch, SbTable, SbText\n 2. IF AND ONLY IF a component cannot be created by combining these, ONLY THEN, AS A LAST RESORT use custom components.\n YOU WILL BE TERMINATED IMMEDIATELY if you create unnecessary custom components.\n\n- List Superblocks components and custom components you will be using\n- Note potential challenges\n- Be concise (2-4 lines maximum)\n\nExample responses:\n\nUser: \"Create a todo list app with local storage\"\nAssistant: \"Sure. I'll start by:\n\n1. Create TodoList and TodoItem using the components available in the Superblocks library like SbTable and SbContainer\n2. Implement localStorage for persistence\n3. Add CRUD operations\n\nLet's start now.\n\n[Rest of response...]\"\n\nUser: \"Help debug why my API calls aren't working\"\nAssistant: \"Great. My first steps will be:\n\n1. Check network requests\n2. Verify API endpoint format\n3. Examine error handling\n\n[Rest of response...]\"\n\nUser: \"Generate an app with a header, table and filters. The filters should have a numeric slider and a dropdown.\"\nAssistant: \"Sure:\n\n1. I will make a header component out of <SbContainer>, stacks, <SbText />.\n2. For the table, I will use SbTable. For filters, I will use SbDropdown.\n3. Since there is no slider component, I will create a custom component\n4. Implement filters\n\n[Rest of response...]\"\n\n</chain_of_thought_instructions>\n\n<artifact_info>\nBolt creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components, including:\n\n- Shell commands to run including dependencies to install using a package manager (NPM)\n- Files to create and their contents\n- Folders to create if necessary\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications (as shown in diffs, see diff_spec)\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - shell: For running shell commands.\n\n - When Using `npx`, ALWAYS provide the `--yes` flag.\n - When running multiple shell commands, use `&&` to run them sequentially.\n - ULTRA IMPORTANT: Do NOT run a dev command with shell action use start action to run dev commands\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the file contents. All file paths MUST BE relative to the current working directory.\n\n - start: For starting a development server.\n - Use to start application if it hasn't been started yet or when NEW dependencies have been added.\n - Only use this action when you need to run a dev server or start the application\n - ULTRA IMPORTANT: do NOT re-run a dev server if files are updated. The existing dev server can automatically detect changes and executes the file changes\n\n\n 8. The order of the actions is VERY IMPORTANT. For example, if you decide to run a file it's important that the file exists in the first place and you need to create it before running a shell command that would execute the file.\n\n 9. ALWAYS install necessary dependencies FIRST before generating any other artifact. If that requires a `package.json` then you should create that first!\n\n IMPORTANT: Add all required dependencies to the `package.json` already and try to avoid `npm i <pkg>` if possible!\n\n 10. CRITICAL: Always provide the FULL, updated content of the artifact. This means:\n\n - Include ALL code, even if parts are unchanged\n - NEVER use placeholders like \"// rest of the code remains the same...\" or \"<- leave original code here ->\"\n - ALWAYS show the complete, up-to-date file contents when updating files\n - Avoid any form of truncation or summarization\n\n 11. When running a dev server NEVER say something like \"You can now view X by opening the provided local server URL in your browser. The preview will be opened automatically or by the user manually!\n\n 12. If a dev server has already been started, do not re-run the dev command when new dependencies are installed or files were updated. Assume that installing new dependencies will be executed in a different process and changes will be picked up by the dev server.\n\n 13. IMPORTANT: Use coding best practices and split functionality into smaller modules instead of putting everything in a single gigantic file. Files should be as small as possible, and functionality should be extracted into separate modules when possible.\n\n - Ensure code is clean, readable, and maintainable.\n - Adhere to proper naming conventions and consistent formatting.\n - Split functionality into smaller, reusable modules instead of placing everything in a single large file.\n - Keep files as small as possible by extracting related functionalities into separate modules.\n - Use imports to connect these modules together effectively.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A project consists of one or more pages. Each page is a directory in the `pages` directory.\n - Pages are registered in the `routes.json` file.\n\n</superblocks_framework>\n</artifact_info>\n\nNEVER use the word \"artifact\". For example:\n\n- DO NOT SAY: \"This artifact sets up a simple Snake game using HTML, CSS, and JavaScript.\"\n- INSTEAD SAY: \"We set up a simple Snake game using HTML, CSS, and JavaScript.\"\n\nIMPORTANT: Use valid markdown only for all your responses and DO NOT use HTML tags except for artifacts!\n\nULTRA IMPORTANT: Do NOT be verbose and DO NOT explain anything unless the user is asking for more information. That is VERY important.\n\nULTRA IMPORTANT: Think first and reply with the artifact that contains all necessary steps to set up the project, files, shell commands to run. It is SUPER IMPORTANT to respond with this first.\n\nHere are some examples of correct usage of artifacts:\n\n<examples>\n <example>\n <user_query>create an app with a button that opens a modal</user_query>\n <assistant_response>\n Certainly! I'll create an app with a button that opens a modal.\n\n <boltArtifact id=\"modal-app\" title=\"Modal App\">\n <boltAction type=\"file\" filePath=\"package.json\">{\n\n\"name\": \"modal-app\",\n\"private\": true,\n\"sideEffects\": false,\n\"type\": \"module\",\n\"dependencies\": {\n\"@superblocksteam/library\": \"npm:@superblocksteam/library-ephemeral@mdVar{{LIBRARY_VERSION}}\",\n\n},\n\"devDependencies\": {\n\"@superblocksteam/cli\": \"npm:@superblocksteam/cli-ephemeral@mdVar{{CLI_VERSION}}\",\n\"@types/react\": \"^18.2.20\",\n\"@types/react-dom\": \"^18.2.7\",\n\"typescript\": \"^5.1.6\"\n},\n}</boltAction>\n<boltAction type=\"file\" filePath=\"pages/App.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/app.css\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/appTheme.ts\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/root.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/Page1/index.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"routes.json\">...</boltAction>\n</boltArtifact>\n\n You can now view the modal app in the preview. The button will open the modal when clicked.\n </assistant_response>\n\n </example>\n</examples>\n";
4
+ // Generated at: 2025-06-15T06:08:09.958Z
5
+ export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n6. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n7. NEVER use sbComputed as a child component. React cannot render the object type it returns as JSX children.\n8. ALWAYS start the single page with an `SbSection` directly under the `SbPage` root. That section must contain at least one `SbColumn` and may have more. Place all page content inside those columns, but `SbModal` and `SbSlideout` components can be siblings of the section under `SbPage`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <SbText text={item.name} />)`). The framework does not support this pattern. For repeated data display, use SbTable components instead.\n12. NEVER use sbComputed to render React children (e.g., `<SbContainer>{sbComputed(() => { ... })}</SbContainer>`). This is unsupported usage of the `sbComputed` API.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <SbButton />}`, use `<SbButton isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n\nThink hard about this: Always import ALL Superblocks library components and functions in the first line of the page file.\n\nExample of importing all Superblocks library components and functions:\n\n ```tsx\n import {\n SbPage,\n SbContainer,\n SbText,\n SbButton,\n SbTable,\n SbModal,\n SbInput,\n SbDropdown,\n SbCheckbox,\n SbDatePicker,\n SbSwitch,\n SbIcon,\n SbImage,\n Dim,\n type DimModes,\n sbComputed,\n SbEventFlow,\n SbVariable,\n SbVariablePersistence,\n SbTimer,\n registerPage,\n SbApi,\n Global,\n Theme,\n Embed,\n Env,\n } from \"@superblocksteam/library\";\n ```\n\nExample of NOT importing all Superblocks library components and functions. This is wrong:\n\n```tsx\nimport { SbPage } from \"@superblocksteam/library\";\n```\n\n</system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<SbContainer layout=\"vertical\">...` or `<SbContainer layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on SBContainer components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on SBContainer components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an SBTable component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like SbTable have heading text built in. Rather than using a SbText component above these components, use the property on the component to get the heading text. Example: For SbTable, use the \"tableHeader\" property. If you absolutely must use an SbText component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return SBContainer components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root SbContainer's height to Dim.fill(). Example: `<SbContainer height={Dim.fill()}>...`\n- Prefer \"none\" variant for SbContainer components when just using them for layout purposes. Example: `<SbContainer variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<mock_data_info>\nIf you're going to use mock data to fulfill a user's request, think hard about following these rules:\n\n1. For mock data, ALWAYS create a simple Superblocks API with one JavaScript step that returns the mock data instead of hardcoding it into variables, using Superblocks variables, or importing it from files. Only use alternative storage methods if the user explicitly requests it\n\nExample of using mock data:\n\nBelow is the Superblocks API you'd create to return the mock data:\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrders.ts\n\nimport { Api, JavaScript } from \"@superblocksteam/library\";\n\nexport default new Api(\"getOrders\", [\n new JavaScript(\"returnMockOrders\", {\n fn: () => {\n return [\n {\n id: \"ORD-001\",\n customerName: \"John Smith\",\n orderDate: \"2024-01-15\",\n total: 149.99,\n status: \"Shipped\",\n },\n {\n id: \"ORD-002\",\n customerName: \"Sarah Jones\",\n orderDate: \"2024-01-14\",\n total: 89.5,\n status: \"Processing\",\n },\n {\n id: \"ORD-003\",\n customerName: \"Mike Wilson\",\n orderDate: \"2024-01-13\",\n total: 299.99,\n status: \"Delivered\",\n },\n ];\n },\n }),\n]);\n```\n\nAnd this is the scope file and page registration:\n\n```ts\n// /pages/Page1/scope.ts\nimport { createSbScope, SbApi } from \"@superblocksteam/library\";\n\nexport const Page1Scope = createSbScope(\n () => ({\n getOrders: SbApi({}),\n }),\n {\n name: \"Page1\",\n },\n);\n\nexport const Page1 = Page1Scope.entities;\n```\n\n```tsx\n// /pages/Page1/index.tsx\nimport {\n SbPage,\n SbSection,\n SbColumn,\n SbTable,\n SbModal,\n SbText,\n sbComputed,\n registerPage,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nconst MyPage = () => {\n const { getOrders } = Page1;\n\n return (\n <SbPage name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <SbSection height={Dim.fill()}>\n <SbColumn width={Dim.fill()}>\n <SbTable tableData={sbComputed(() => getOrders.response)} />\n </SbColumn>\n </SbSection>\n <SbModal>\n <SbContainer width={Dim.fill()} layout=\"vertical\">\n <SbText text=\"Modal content here\" />\n </SbContainer>\n </SbModal>\n </SbPage>\n );\n};\n\nexport default registerPage(MyPage, Page1Scope);\n```\n\n2. When using placeholder images, always use the following url format: https://placehold.co/{widthInteger}x{heightInteger}?text={urlEscapedText}\n\nExample: `https://placehold.co/600x400?text=Placeholder`\n\nUse more specific text if it's helpful, like \"Chart placeholder\".\n\n</mock_data_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<chain_of_thought_instructions>\nBefore providing a solution, BRIEFLY outline your implementation steps. This helps ensure systematic thinking and clear communication. Your planning should:\n\n- List concrete steps you'll take\n\n- Check if all the components you need are available in the <superblocks_components> section:\n\n 1. Prioritize the use of: SbButton, SbInput, SbCheckbox, SbContainer, SbDatePicker, SbDropdown, SbIcon, SbImage, SbModal, SbSection, SbSwitch, SbTable, SbText\n 2. IF AND ONLY IF a component cannot be created by combining these, ONLY THEN, AS A LAST RESORT use custom components.\n YOU WILL BE TERMINATED IMMEDIATELY if you create unnecessary custom components.\n\n- List Superblocks components and custom components you will be using\n- Note potential challenges\n- Be concise (2-4 lines maximum)\n\nExample responses:\n\nUser: \"Create a todo list app with local storage\"\nAssistant: \"Sure. I'll start by:\n\n1. Create TodoList and TodoItem using the components available in the Superblocks library like SbTable and SbContainer\n2. Implement localStorage for persistence\n3. Add CRUD operations\n\nLet's start now.\n\n[Rest of response...]\"\n\nUser: \"Help debug why my API calls aren't working\"\nAssistant: \"Great. My first steps will be:\n\n1. Check network requests\n2. Verify API endpoint format\n3. Examine error handling\n\n[Rest of response...]\"\n\nUser: \"Generate an app with a header, table and filters. The filters should have a numeric slider and a dropdown.\"\nAssistant: \"Sure:\n\n1. I will make a header component out of <SbContainer>, stacks, <SbText />.\n2. For the table, I will use SbTable. For filters, I will use SbDropdown.\n3. Since there is no slider component, I will create a custom component\n4. Implement filters\n\n[Rest of response...]\"\n\n</chain_of_thought_instructions>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the file contents. All file paths MUST BE relative to the current working directory.\n\n 8. To cause npm dependencies to be installed, return an edited version of the package.json artifact you were provided. Always add the corresponding TypeScript definitions if you know them. If no package.json artifact was provided, you cannot add or remove dependencies.\n\n 9. ONLY remove package.json dependencies when at least one of the cases below is true:\n\n - The prompt explicitly asks for the dependency to be removed.\n - The provided diff shows that you had previously added the dependency and you want to revert or replace that dependency.\n\n 10. CRITICAL: Always provide the FULL, updated content of the artifact. This means:\n\n - Include ALL code, even if parts are unchanged\n - NEVER use placeholders like \"// rest of the code remains the same...\" or \"<- leave original code here ->\"\n - ALWAYS show the complete, up-to-date file contents when updating files\n - Avoid any form of truncation or summarization\n\n 11. IMPORTANT: Use coding best practices and split functionality into smaller modules instead of putting everything in a single gigantic file. Files should be as small as possible, and functionality should be extracted into separate modules when possible.\n\n - Ensure code is clean, readable, and maintainable.\n - Adhere to proper naming conventions and consistent formatting.\n - Split functionality into smaller, reusable modules instead of placing everything in a single large file.\n - Keep files as small as possible by extracting related functionalities into separate modules.\n - Use imports to connect these modules together effectively.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n\nNEVER use the word \"artifact\". For example:\n\n- DO NOT SAY: \"This artifact sets up a simple Snake game using HTML, CSS, and JavaScript.\"\n- INSTEAD SAY: \"We set up a simple Snake game using HTML, CSS, and JavaScript.\"\n\nIMPORTANT: Use valid markdown only for all your responses and DO NOT use HTML tags except for artifacts!\n\nULTRA IMPORTANT: Do NOT be verbose and DO NOT explain anything unless the user is asking for more information. That is VERY important.\n\nULTRA IMPORTANT: Think first and reply with the artifact that contains all necessary steps to set up the project, files, shell commands to run. It is SUPER IMPORTANT to respond with this first.\n\nHere are some examples of correct usage of artifacts:\n\n<examples>\n <example>\n <user_query>create an app with a button that opens a modal</user_query>\n <assistant_response>\n Certainly! I'll create an app with a button that opens a modal.\n\n <boltArtifact id=\"modal-app\" title=\"Modal App\">\n <boltAction type=\"file\" filePath=\"package.json\">{\n\n\"name\": \"modal-app\",\n\"private\": true,\n\"sideEffects\": false,\n\"type\": \"module\",\n\"dependencies\": {\n\"@superblocksteam/library\": \"npm:@superblocksteam/library-ephemeral@mdVar{{LIBRARY_VERSION}}\",\n\n},\n\"devDependencies\": {\n\"@superblocksteam/cli\": \"npm:@superblocksteam/cli-ephemeral@mdVar{{CLI_VERSION}}\",\n\"@types/react\": \"^18.2.20\",\n\"@types/react-dom\": \"^18.2.7\",\n\"typescript\": \"^5.1.6\"\n},\n}</boltAction>\n<boltAction type=\"file\" filePath=\"pages/App.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/app.css\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/appTheme.ts\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/root.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/Page1/index.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"routes.json\">...</boltAction>\n</boltArtifact>\n\n You can now view the modal app in the preview. The button will open the modal when clicked.\n </assistant_response>\n\n </example>\n</examples>\n";
6
6
  //# sourceMappingURL=system.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/subprompts/system.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,gCAAgC;AAChC,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,kzmBAAkzmB,CAAC"}
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/subprompts/system.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,gCAAgC;AAChC,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,oylBAAoylB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-loader.d.ts","sourceRoot":"","sources":["../../../src/ai-service/prompts/markdown-loader.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACrC,MAAM,CAwCR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYzD"}
1
+ {"version":3,"file":"markdown-loader.d.ts","sourceRoot":"","sources":["../../../src/ai-service/prompts/markdown-loader.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACrC,MAAM,CAqDR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYzD"}
@@ -1,3 +1,4 @@
1
+ import { getLogger } from "../../util/logger.js";
1
2
  // Import generated markdown modules
2
3
  // Note: These imports will be available after running the generate script
3
4
  let generated = {};
@@ -6,7 +7,7 @@ try {
6
7
  generated = await import("../prompts/generated/index.js");
7
8
  }
8
9
  catch (_error) {
9
- console.warn("Generated markdown modules not found. Run `pnpm generate:markdown` first.");
10
+ getLogger().warn("[ai-service] Generated markdown modules not found. Run `pnpm generate:markdown` first.");
10
11
  }
11
12
  // Cache for processed content to avoid repeated variable replacement
12
13
  const processedCache = new Map();
@@ -15,6 +16,9 @@ const processedCache = new Map();
15
16
  * @param path - Path in format "module/name" (e.g., "subprompts/superblocks_api" or "library_typedefs/SbEventFlow")
16
17
  */
17
18
  export function loadSubprompt(path, variables = {}) {
19
+ if (!path.includes("/")) {
20
+ getLogger().warn(`Subprompt path "${path}" should include module and name (e.g., "api/create")`);
21
+ }
18
22
  const cacheKey = JSON.stringify(variables);
19
23
  if (!processedCache.has(path)) {
20
24
  processedCache.set(path, new Map());
@@ -34,11 +38,13 @@ export function loadSubprompt(path, variables = {}) {
34
38
  }
35
39
  }
36
40
  else {
37
- console.warn(`Invalid path format: ${path}. Expected "module/name"`);
41
+ getLogger().warn(`[ai-service] Invalid path format: ${path}. Expected "module/name"`);
42
+ return "";
38
43
  }
39
44
  }
40
- catch (_error) {
41
- console.warn(`Could not load subprompt: ${path}`);
45
+ catch (error) {
46
+ getLogger().warn(`[ai-service] Failed to load subprompt at ${path}:`, error instanceof Error ? error.message : String(error));
47
+ return "";
42
48
  }
43
49
  // Replace variables in the content
44
50
  let processedContent = content;
@@ -58,7 +64,7 @@ export function loadLibraryComponent(name) {
58
64
  return generated.library_components?.[fileName] || "";
59
65
  }
60
66
  catch (_error) {
61
- console.warn(`Could not load library component: ${name}, using file name: ${fileName}`);
67
+ getLogger().warn(`[ai-service] Could not load library component: ${name}, using file name: ${fileName}`);
62
68
  return "";
63
69
  }
64
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-loader.js","sourceRoot":"","sources":["../../../src/ai-service/prompts/markdown-loader.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,0EAA0E;AAC1E,IAAI,SAAS,GAAQ,EAAE,CAAC;AAExB,IAAI,CAAC;IACH,uEAAuE;IACvE,SAAS,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC5D,CAAC;AAAC,OAAO,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,IAAI,CACV,2EAA2E,CAC5E,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,MAAM,cAAc,GAAG,IAAI,GAAG,EAA+B,CAAC;AAE9D;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAY,EACZ,YAAoC,EAAE;IAEtC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAE3C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;IAE5C,IAAI,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;IAClC,CAAC;IAED,qCAAqC;IACrC,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG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K,IAAI,WAAW,CAAC;IAEtC,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACxD,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,SAAS,EAAE,CAAC,IAAI,CACd,kDAAkD,IAAI,sBAAsB,QAAQ,EAAE,CACvF,CAAC;QACF,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../src/ai-service/prompts/system.ts"],"names":[],"mappings":"AA6IA,eAAO,MAAM,eAAe,cAe3B,CAAC"}
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../src/ai-service/prompts/system.ts"],"names":[],"mappings":"AAyJA,eAAO,MAAM,eAAe,cAe3B,CAAC"}
@@ -53,6 +53,10 @@ const superblocksParts = [
53
53
  name: "superblocks_layouts",
54
54
  content: loadSubprompt("subprompts/superblocks_layouts"),
55
55
  },
56
+ {
57
+ name: "superblocks_forms",
58
+ content: loadSubprompt("subprompts/superblocks_forms"),
59
+ },
56
60
  {
57
61
  name: "superblocks_state",
58
62
  content: loadSubprompt("subprompts/superblocks_state"),
@@ -74,6 +78,14 @@ const superblocksParts = [
74
78
  name: "superblocks_theming",
75
79
  content: loadSubprompt("subprompts/superblocks_theming"),
76
80
  },
81
+ {
82
+ name: "superblocks_rbac",
83
+ content: loadSubprompt("subprompts/superblocks_rbac"),
84
+ },
85
+ {
86
+ name: "superblocks_data_filtering",
87
+ content: loadSubprompt("subprompts/superblocks_data_filtering"),
88
+ },
77
89
  ];
78
90
  const wrapWithTags = (name, content, tab = 2) => {
79
91
  return `
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/ai-service/prompts/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE3E,8CAA8C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IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,KAAK;IACL,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,GAAG;IACH,MAAM;IACN,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,SAAS;IACT,KAAK;IACL,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,OAAO;CACR,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,8EAA8E;IAC9E,MAAM,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,EAAE;QAC7D,eAAe;QACf,WAAW;QACX,qBAAqB,EAAE,mBAAmB;aACvC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,OAAO,GAAG,CAAC;aAChC,IAAI,CAAC,IAAI,CAAC;QACb,iBAAiB,EAAE,gBAAgB;aAChC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;aACpD,IAAI,CAAC,IAAI,CAAC;KACd,CAAC,CAAC;IAEH,mCAAmC;IACnC,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC"}
@@ -7,8 +7,11 @@ export declare enum BoltResultType {
7
7
  export declare class BoltResultBuffer extends ResultBuffer<BoltResultType> {
8
8
  private buffer;
9
9
  private currentType;
10
+ private filesSeen;
11
+ private processingFilePath;
10
12
  add(text: string): void;
11
13
  maybeFlush(force?: boolean): void;
14
+ private checkFileActions;
12
15
  private removeTrailingTags;
13
16
  private shouldFlush;
14
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bolt.d.ts","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/bolt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,qBAAa,gBAAiB,SAAQ,YAAY,CAAC,cAAc,CAAC;IAChE,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,WAAW,CAAuC;IAE1D,GAAG,CAAC,IAAI,EAAE,MAAM;IA0ChB,UAAU,CAAC,KAAK,UAAQ;IASxB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,WAAW;CAWpB"}
1
+ {"version":3,"file":"bolt.d.ts","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/bolt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAKD,qBAAa,gBAAiB,SAAQ,YAAY,CAAC,cAAc,CAAC;IAChE,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,kBAAkB,CAAuB;IAEjD,GAAG,CAAC,IAAI,EAAE,MAAM;IA+ChB,UAAU,CAAC,KAAK,UAAQ;IAcxB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,WAAW;CAWpB"}
@@ -5,9 +5,13 @@ export var BoltResultType;
5
5
  BoltResultType["Artifact"] = "artifact";
6
6
  BoltResultType["Think"] = "think";
7
7
  })(BoltResultType || (BoltResultType = {}));
8
+ // <boltAction type="file" filePath="package.json">
9
+ const fileActionRegex = /<boltAction type="file" filePath="([^"]+)"/g;
8
10
  export class BoltResultBuffer extends ResultBuffer {
9
11
  buffer = "";
10
12
  currentType = BoltResultType.Text;
13
+ filesSeen = new Set();
14
+ processingFilePath = null;
11
15
  add(text) {
12
16
  let type = this.currentType;
13
17
  if (text.trimStart().startsWith("<boltArtifact")) {
@@ -26,6 +30,7 @@ export class BoltResultBuffer extends ResultBuffer {
26
30
  if (text.includes("</boltArtifact>")) {
27
31
  const [lhs, rhs] = text.split("</boltArtifact>");
28
32
  this.buffer += lhs + "</boltArtifact>";
33
+ this.currentType = BoltResultType.Artifact;
29
34
  this.maybeFlush(true);
30
35
  if (rhs) {
31
36
  this.add(rhs);
@@ -42,17 +47,39 @@ export class BoltResultBuffer extends ResultBuffer {
42
47
  }
43
48
  }
44
49
  if (!this.buffer) {
45
- this.params.onPending(type);
50
+ this.params.onTypeChange(type);
46
51
  }
47
52
  this.buffer += text;
48
53
  this.currentType = type;
54
+ if (type === BoltResultType.Artifact) {
55
+ this.checkFileActions();
56
+ }
49
57
  }
50
58
  maybeFlush(force = false) {
51
59
  if (this.buffer && (force || this.shouldFlush())) {
52
60
  this.removeTrailingTags();
61
+ // ensure the last file action is flushed
62
+ if (this.processingFilePath) {
63
+ this.params.onFlushFile(this.processingFilePath, this.buffer);
64
+ }
53
65
  this.params.onFlush(this.currentType, this.buffer);
54
66
  this.buffer = "";
55
67
  this.currentType = BoltResultType.Text;
68
+ this.processingFilePath = null;
69
+ }
70
+ }
71
+ checkFileActions() {
72
+ const fileActions = this.buffer.matchAll(fileActionRegex);
73
+ for (const fileAction of fileActions) {
74
+ const filePath = fileAction[1];
75
+ if (filePath && !this.filesSeen.has(filePath)) {
76
+ this.filesSeen.add(filePath);
77
+ this.params.onPendingFile(filePath);
78
+ if (this.processingFilePath) {
79
+ this.params.onFlushFile(this.processingFilePath, this.buffer);
80
+ }
81
+ this.processingFilePath = filePath;
82
+ }
56
83
  }
57
84
  }
58
85
  removeTrailingTags() {
@@ -1 +1 @@
1
- {"version":3,"file":"bolt.js","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/bolt.ts"],"names":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MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;gBACpC,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;oBAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBAChE,CAAC;gBAED,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;IAEO,kBAAkB;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAEO,WAAW;QACjB,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;YACzB,KAAK,cAAc,CAAC,IAAI;gBACtB,sCAAsC;gBACtC,OAAO,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACnD,KAAK,cAAc,CAAC,QAAQ;gBAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YAC3D,KAAK,cAAc,CAAC,KAAK;gBACvB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
@@ -1,11 +1,15 @@
1
1
  export declare abstract class ResultBuffer<T> {
2
2
  protected readonly params: {
3
3
  onFlush: (type: T, text: string) => void;
4
- onPending: (type: T) => void;
4
+ onTypeChange: (type: T) => void;
5
+ onPendingFile: (filePath: string) => void;
6
+ onFlushFile: (filePath: string, text: string) => void;
5
7
  };
6
8
  constructor(params: {
7
9
  onFlush: (type: T, text: string) => void;
8
- onPending: (type: T) => void;
10
+ onTypeChange: (type: T) => void;
11
+ onPendingFile: (filePath: string) => void;
12
+ onFlushFile: (filePath: string, text: string) => void;
9
13
  });
10
14
  abstract add(text: string): void;
11
15
  abstract maybeFlush(force?: boolean): void;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/shared.ts"],"names":[],"mappings":"AAAA,8BAAsB,YAAY,CAAC,CAAC;IAEhC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QACzC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;KAC9B;gBAHkB,MAAM,EAAE;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QACzC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;KAC9B;IAEH,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;CAC3C"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/shared.ts"],"names":[],"mappings":"AAAA,8BAAsB,YAAY,CAAC,CAAC;IAEhC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;QAChC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC1C,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KACvD;gBALkB,MAAM,EAAE;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;QAChC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC1C,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KACvD;IAEH,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;CAC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/shared.ts"],"names":[],"mappings":"AAAA,MAAM,OAAgB,YAAY;IAEX;IADrB,YACqB,MAGlB;QAHkB,WAAM,GAAN,MAAM,CAGxB;IACA,CAAC;CAGL"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/ai-service/result-buffer/shared.ts"],"names":[],"mappings":"AAAA,MAAM,OAAgB,YAAY;IAEX;IADrB,YACqB,MAKlB;QALkB,WAAM,GAAN,MAAM,CAKxB;IACA,CAAC;CAGL"}
@@ -1,11 +1,14 @@
1
- import type { AiServiceConfig, AnthropicError, ArtifactProcessor, FileArtifact } from "../types.js";
1
+ import type { AiServiceConfig, AiServiceEvents, AnthropicError, ArtifactProcessor, ChangeInfo, FileArtifact } from "../types.js";
2
2
  import type { FSM, FSMOnTransitionParams } from "./fsm.js";
3
3
  import type { OperationQueue } from "../../util/operation-queue.js";
4
+ import type { AppShell } from "../app-interface/shell.js";
5
+ import type { SourceTrackerInterface } from "../app-interface/source-tracker.js";
4
6
  import type { TemplateRenderer } from "../eval/template-renderer.js";
5
7
  import type { AnthropicProvider } from "@ai-sdk/anthropic";
6
8
  import type { AiGenerateRequest, EditorClientMethods } from "@superblocksteam/library-shared/types";
7
9
  import type { ISocketClient } from "@superblocksteam/shared";
8
10
  import type { FinishReason } from "ai";
11
+ import type { EventEmitter } from "node:events";
9
12
  declare const $: {
10
13
  readonly Idle: "Idle";
11
14
  readonly AgentPlanning: "AgentPlanning";
@@ -28,6 +31,7 @@ export type ClarkState = keyof typeof $;
28
31
  export declare const USER_SENT_PROMPT = "userSentPrompt";
29
32
  export declare const USER_ACCEPTED_DRAFT = "userAcceptedDraft";
30
33
  export declare const USER_REJECTED_DRAFT = "userRejectedDraft";
34
+ export declare const USER_CANCELED = "userCanceled";
31
35
  export declare const AGENT_PLANNED = "agentPlanned";
32
36
  export declare const AGENT_REPORTED_ERROR_TO_USER = "agentReportedErrorToUser";
33
37
  export declare const AGENT_NEEDS_USER_INPUT = "agentNeedsUserInput";
@@ -41,6 +45,7 @@ export declare const POST_PROCESSING_FINISHED = "postProcessingFinished";
41
45
  export declare const RUNTIME_REVIEW_FINISHED = "runtimeReviewFinished";
42
46
  export declare const APP_RUNTIME_UPDATED_WITHOUT_EDITS = "appRuntimeUpdatedWithoutEdits";
43
47
  export declare const RUNTIME_REVIEW_ERRORED = "runtimeReviewErrored";
48
+ export declare const BUILD_SYSTEM_ERRORED = "buildSystemErrored";
44
49
  export declare const SERVICE_STARTED_WITH_DRAFT = "serviceStartedWithDraft";
45
50
  export type ClarkEvent = {
46
51
  type: typeof USER_SENT_PROMPT;
@@ -50,15 +55,23 @@ export type ClarkEvent = {
50
55
  type: typeof USER_ACCEPTED_DRAFT;
51
56
  } | {
52
57
  type: typeof USER_REJECTED_DRAFT;
58
+ } | {
59
+ type: typeof USER_CANCELED;
53
60
  } | {
54
61
  type: typeof AGENT_PLANNED;
55
- systemPrompt: string;
62
+ systemMessages: {
63
+ role: "system";
64
+ content: string;
65
+ providerOptions?: Record<string, unknown>;
66
+ }[];
56
67
  userPrompt: string;
68
+ debugging?: boolean;
57
69
  } | {
58
70
  type: typeof AGENT_REPORTED_ERROR_TO_USER;
59
71
  error: Error;
60
72
  } | {
61
73
  type: typeof AGENT_NEEDS_USER_INPUT;
74
+ advice: string;
62
75
  } | {
63
76
  type: typeof AGENT_GAVE_UP;
64
77
  } | {
@@ -75,20 +88,21 @@ export type ClarkEvent = {
75
88
  } | {
76
89
  type: typeof LLM_FINISHED;
77
90
  files: FileArtifact[];
78
- annotations?: string[];
79
91
  } | {
80
92
  type: typeof POST_PROCESSING_ERRORED;
81
93
  error: Error;
82
94
  } | {
83
95
  type: typeof POST_PROCESSING_FINISHED;
84
96
  files: FileArtifact[];
85
- annotations?: string[];
86
97
  } | {
87
98
  type: typeof RUNTIME_REVIEW_FINISHED;
88
99
  } | {
89
100
  type: typeof APP_RUNTIME_UPDATED_WITHOUT_EDITS;
90
101
  } | {
91
102
  type: typeof RUNTIME_REVIEW_ERRORED;
103
+ tsErrorsByPath: Record<string, string[]>;
104
+ } | {
105
+ type: typeof BUILD_SYSTEM_ERRORED;
92
106
  error: Error;
93
107
  } | {
94
108
  type: typeof SERVICE_STARTED_WITH_DRAFT;
@@ -100,8 +114,9 @@ export declare const transitions: {
100
114
  };
101
115
  readonly AgentPlanning: {
102
116
  readonly agentPlanned: "LLMGenerating";
103
- readonly agentReportedErrorToUser: "Idle";
117
+ readonly agentNeedsUserInput: "AwaitingUser";
104
118
  readonly agentGaveUp: "Dead";
119
+ readonly userCanceled: "Idle";
105
120
  };
106
121
  readonly LLMGenerating: {
107
122
  readonly llmFinished: "PostProcessing";
@@ -109,20 +124,26 @@ export declare const transitions: {
109
124
  readonly llmFinishedUnexpectedly: "AgentPlanning";
110
125
  readonly llmRequestedContext: "AgentPlanning";
111
126
  readonly appRuntimeUpdatedWithoutEdits: "Idle";
127
+ readonly userCanceled: "Idle";
128
+ readonly postProcessingErrored: "AgentPlanning";
112
129
  };
113
130
  readonly PostProcessing: {
114
131
  readonly postProcessingFinished: "RuntimeReviewing";
115
132
  readonly postProcessingErrored: "AgentPlanning";
133
+ readonly userCanceled: "Idle";
116
134
  };
117
135
  readonly RuntimeReviewing: {
118
136
  readonly runtimeReviewErrored: "AgentPlanning";
137
+ readonly buildSystemErrored: "AgentPlanning";
119
138
  readonly runtimeReviewFinished: "AwaitingUser";
120
139
  readonly appRuntimeUpdatedWithoutEdits: "Idle";
140
+ readonly userCanceled: "Idle";
121
141
  };
122
142
  readonly AwaitingUser: {
123
143
  readonly userAcceptedDraft: "Idle";
124
144
  readonly userRejectedDraft: "RuntimeReviewing";
125
145
  readonly userSentPrompt: "AgentPlanning";
146
+ readonly userCanceled: "Idle";
126
147
  };
127
148
  readonly Dead: {};
128
149
  };
@@ -147,12 +168,25 @@ export type ValidEventsForState<S extends ClarkState> = keyof (typeof transition
147
168
  export type ClarkContext = {
148
169
  peer?: ISocketClient<EditorClientMethods>;
149
170
  hasSuggestions?: boolean;
171
+ summaryMessages?: string[];
172
+ abortController?: AbortController;
173
+ initialElementIds?: string[];
174
+ initialFilePaths?: {
175
+ apis: string[];
176
+ components: string[];
177
+ };
178
+ generatedChangeInfo?: Record<string, ChangeInfo>;
179
+ peerChannelQueue?: OperationQueue;
180
+ usedDebugging?: boolean;
150
181
  };
151
182
  export type ClarkStateHandlerParams = AiServiceConfig & {
152
183
  fsOperationQueue: OperationQueue;
153
184
  templateRenderer: TemplateRenderer;
154
185
  artifactProcessor: ArtifactProcessor;
155
186
  anthropicProvider: AnthropicProvider;
187
+ appShell: AppShell;
188
+ signals: EventEmitter<AiServiceEvents>;
189
+ sourceTrackerInterface: SourceTrackerInterface;
156
190
  };
157
191
  export {};
158
192
  //# sourceMappingURL=clark-fsm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clark-fsm.d.ts","sourceRoot":"","sources":["../../../src/ai-service/state-machine/clark-fsm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAA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IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;CACvE,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;IACF,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjD,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD,gBAAgB,EAAE,cAAc,CAAC;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IACvC,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC"}
@@ -11,6 +11,7 @@ export const ClarkStateNames = $;
11
11
  export const USER_SENT_PROMPT = "userSentPrompt";
12
12
  export const USER_ACCEPTED_DRAFT = "userAcceptedDraft";
13
13
  export const USER_REJECTED_DRAFT = "userRejectedDraft";
14
+ export const USER_CANCELED = "userCanceled";
14
15
  export const AGENT_PLANNED = "agentPlanned";
15
16
  export const AGENT_REPORTED_ERROR_TO_USER = "agentReportedErrorToUser";
16
17
  export const AGENT_NEEDS_USER_INPUT = "agentNeedsUserInput";
@@ -24,6 +25,7 @@ export const POST_PROCESSING_FINISHED = "postProcessingFinished";
24
25
  export const RUNTIME_REVIEW_FINISHED = "runtimeReviewFinished";
25
26
  export const APP_RUNTIME_UPDATED_WITHOUT_EDITS = "appRuntimeUpdatedWithoutEdits";
26
27
  export const RUNTIME_REVIEW_ERRORED = "runtimeReviewErrored";
28
+ export const BUILD_SYSTEM_ERRORED = "buildSystemErrored";
27
29
  export const SERVICE_STARTED_WITH_DRAFT = "serviceStartedWithDraft";
28
30
  // Maps current state to the next state by event
29
31
  export const transitions = {
@@ -33,8 +35,9 @@ export const transitions = {
33
35
  },
34
36
  [$.AgentPlanning]: {
35
37
  [AGENT_PLANNED]: $.LLMGenerating,
36
- [AGENT_REPORTED_ERROR_TO_USER]: $.Idle,
38
+ [AGENT_NEEDS_USER_INPUT]: $.AwaitingUser,
37
39
  [AGENT_GAVE_UP]: $.Dead,
40
+ [USER_CANCELED]: $.Idle,
38
41
  },
39
42
  [$.LLMGenerating]: {
40
43
  [LLM_FINISHED]: $.PostProcessing,
@@ -42,20 +45,26 @@ export const transitions = {
42
45
  [LLM_FINISHED_UNEXPECTEDLY]: $.AgentPlanning,
43
46
  [LLM_REQUESTED_CONTEXT]: $.AgentPlanning,
44
47
  [APP_RUNTIME_UPDATED_WITHOUT_EDITS]: $.Idle,
48
+ [USER_CANCELED]: $.Idle,
49
+ [POST_PROCESSING_ERRORED]: $.AgentPlanning,
45
50
  },
46
51
  [$.PostProcessing]: {
47
52
  [POST_PROCESSING_FINISHED]: $.RuntimeReviewing,
48
53
  [POST_PROCESSING_ERRORED]: $.AgentPlanning,
54
+ [USER_CANCELED]: $.Idle,
49
55
  },
50
56
  [$.RuntimeReviewing]: {
51
57
  [RUNTIME_REVIEW_ERRORED]: $.AgentPlanning,
58
+ [BUILD_SYSTEM_ERRORED]: $.AgentPlanning,
52
59
  [RUNTIME_REVIEW_FINISHED]: $.AwaitingUser,
53
60
  [APP_RUNTIME_UPDATED_WITHOUT_EDITS]: $.Idle,
61
+ [USER_CANCELED]: $.Idle,
54
62
  },
55
63
  [$.AwaitingUser]: {
56
64
  [USER_ACCEPTED_DRAFT]: $.Idle,
57
65
  [USER_REJECTED_DRAFT]: $.RuntimeReviewing,
58
66
  [USER_SENT_PROMPT]: $.AgentPlanning,
67
+ [USER_CANCELED]: $.Idle,
59
68
  },
60
69
  [$.Dead]: {},
61
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"clark-fsm.js","sourceRoot":"","sources":["../../../src/ai-service/state-machine/clark-fsm.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,GAAG;IACR,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAGjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AACjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAC5C,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AACvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAC5D,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAC3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAC3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC;AACnE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,uBAAuB,GAA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