@bolt-foundry/gambit 0.8.6-rc.5 → 0.8.6-rc.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 (262) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/esm/gambit/simulator-ui/dist/bundle.js +14226 -23324
  3. package/esm/gambit/simulator-ui/dist/bundle.js.map +4 -4
  4. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.d.ts.map +1 -1
  5. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.js +5 -0
  6. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts +1 -1
  7. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts.map +1 -1
  8. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.js +1 -0
  9. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts +1 -0
  10. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts.map +1 -1
  11. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.d.ts.map +1 -1
  12. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.js +5 -0
  13. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts +1 -1
  14. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts.map +1 -1
  15. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.js +1 -0
  16. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts +1 -0
  17. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts.map +1 -1
  18. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.d.ts.map +1 -1
  19. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.js +5 -0
  20. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts +1 -1
  21. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts.map +1 -1
  22. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.js +1 -0
  23. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts +1 -0
  24. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts.map +1 -1
  25. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.d.ts.map +1 -1
  26. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.js +5 -0
  27. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts +1 -1
  28. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts.map +1 -1
  29. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.js +1 -0
  30. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts +1 -0
  31. package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts.map +1 -1
  32. package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts +65 -0
  33. package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts.map +1 -1
  34. package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.d.ts.map +1 -1
  35. package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.js +8 -1
  36. package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts +82 -0
  37. package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts.map +1 -1
  38. package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.d.ts.map +1 -1
  39. package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.js +8 -1
  40. package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts +106 -0
  41. package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts.map +1 -1
  42. package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.d.ts.map +1 -1
  43. package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.js +8 -1
  44. package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts +32 -0
  45. package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts.map +1 -1
  46. package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.d.ts.map +1 -1
  47. package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.js +8 -1
  48. package/esm/simulator-ui/isograph/components/Query/SimulatorBuildPage.d.ts.map +1 -1
  49. package/esm/simulator-ui/isograph/components/Query/SimulatorBuildPage.js +4 -11
  50. package/esm/simulator-ui/isograph/components/Query/SimulatorGradePage.d.ts.map +1 -1
  51. package/esm/simulator-ui/isograph/components/Query/SimulatorGradePage.js +79 -20
  52. package/esm/simulator-ui/isograph/components/Query/SimulatorTestPage.d.ts.map +1 -1
  53. package/esm/simulator-ui/isograph/components/Query/SimulatorTestPage.js +88 -27
  54. package/esm/simulator-ui/isograph/components/Query/SimulatorVerifyPage.d.ts.map +1 -1
  55. package/esm/simulator-ui/isograph/components/Query/SimulatorVerifyPage.js +31 -17
  56. package/esm/simulator-ui/isograph/components/Query/SimulatorWorkspacesPage.d.ts.map +1 -1
  57. package/esm/simulator-ui/isograph/components/Query/SimulatorWorkspacesPage.js +2 -6
  58. package/esm/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.d.ts.map +1 -1
  59. package/esm/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.js +27 -23
  60. package/esm/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts +3 -0
  61. package/esm/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts.map +1 -1
  62. package/esm/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.js +76 -50
  63. package/esm/simulator-ui/isograph/components/grade/GradeTabView.d.ts +14 -0
  64. package/esm/simulator-ui/isograph/components/grade/GradeTabView.d.ts.map +1 -1
  65. package/esm/simulator-ui/isograph/components/grade/GradeTabView.js +1 -1
  66. package/esm/simulator-ui/isograph/entrypoints/EntrypointSimulatorRedirect.d.ts.map +1 -1
  67. package/esm/simulator-ui/isograph/entrypoints/EntrypointSimulatorRedirect.js +3 -16
  68. package/esm/simulator-ui/isograph/entrypoints/EntrypointSimulatorWorkspaceShell.d.ts.map +1 -1
  69. package/esm/simulator-ui/isograph/entrypoints/EntrypointSimulatorWorkspaceShell.js +1 -9
  70. package/esm/simulator-ui/src/AppShell.d.ts.map +1 -1
  71. package/esm/simulator-ui/src/AppShell.js +21 -31
  72. package/esm/simulator-ui/src/Chat.d.ts +6 -30
  73. package/esm/simulator-ui/src/Chat.d.ts.map +1 -1
  74. package/esm/simulator-ui/src/Chat.js +14 -109
  75. package/esm/simulator-ui/src/MinimalRouterRoot.d.ts.map +1 -1
  76. package/esm/simulator-ui/src/MinimalRouterRoot.js +1 -16
  77. package/esm/simulator-ui/src/TestBotChatPanel.d.ts +2 -0
  78. package/esm/simulator-ui/src/TestBotChatPanel.d.ts.map +1 -1
  79. package/esm/simulator-ui/src/TestBotChatPanel.js +2 -2
  80. package/esm/simulator-ui/src/WorkbenchChatIntro.d.ts +10 -0
  81. package/esm/simulator-ui/src/WorkbenchChatIntro.d.ts.map +1 -0
  82. package/esm/simulator-ui/src/WorkbenchChatIntro.js +24 -0
  83. package/esm/simulator-ui/src/WorkbenchDrawerIso.d.ts +1 -0
  84. package/esm/simulator-ui/src/WorkbenchDrawerIso.d.ts.map +1 -1
  85. package/esm/simulator-ui/src/WorkbenchDrawerIso.js +3 -15
  86. package/esm/simulator-ui/src/gds/WorkbenchComposerChip.d.ts +2 -17
  87. package/esm/simulator-ui/src/gds/WorkbenchComposerChip.d.ts.map +1 -1
  88. package/esm/simulator-ui/src/grade/GradeResultsPanel.d.ts +10 -0
  89. package/esm/simulator-ui/src/grade/GradeResultsPanel.d.ts.map +1 -1
  90. package/esm/simulator-ui/src/grade/GradeResultsPanel.js +16 -1
  91. package/esm/simulator-ui/src/routing.d.ts.map +1 -1
  92. package/esm/simulator-ui/src/routing.js +0 -31
  93. package/esm/simulator-ui/src/shared.d.ts +1 -0
  94. package/esm/simulator-ui/src/shared.d.ts.map +1 -1
  95. package/esm/simulator-ui/src/shared.js +4 -2
  96. package/esm/simulator-ui/src/styles.d.ts +1 -1
  97. package/esm/simulator-ui/src/styles.d.ts.map +1 -1
  98. package/esm/simulator-ui/src/styles.js +65 -0
  99. package/esm/simulator-ui/src/utils.d.ts +1 -0
  100. package/esm/simulator-ui/src/utils.d.ts.map +1 -1
  101. package/esm/simulator-ui/src/utils.js +2 -0
  102. package/esm/simulator-ui/src/workbenchChipStore.d.ts +12 -0
  103. package/esm/simulator-ui/src/workbenchChipStore.d.ts.map +1 -0
  104. package/esm/simulator-ui/src/workbenchChipStore.js +69 -0
  105. package/esm/simulator-ui/src/workbenchContext.d.ts +50 -0
  106. package/esm/simulator-ui/src/workbenchContext.d.ts.map +1 -0
  107. package/esm/simulator-ui/src/workbenchContext.js +159 -0
  108. package/esm/src/server/request_handler.d.ts.map +1 -1
  109. package/esm/src/server/request_handler.js +0 -40
  110. package/esm/src/server.js +1 -1
  111. package/esm/src/server_legacy_api_routes.d.ts +2 -122
  112. package/esm/src/server_legacy_api_routes.d.ts.map +1 -1
  113. package/esm/src/server_legacy_api_routes.js +0 -591
  114. package/esm/src/server_simulator_ui.d.ts.map +1 -1
  115. package/esm/src/server_simulator_ui.js +34 -0
  116. package/esm/src/server_ui_routes.d.ts.map +1 -1
  117. package/esm/src/server_ui_routes.js +0 -2
  118. package/esm/src/server_workspace_graphql.d.ts +1 -1
  119. package/esm/src/server_workspace_graphql.d.ts.map +1 -1
  120. package/esm/src/server_workspace_graphql.js +66 -46
  121. package/esm/src/simulator_graphql.d.ts.map +1 -1
  122. package/esm/src/simulator_graphql.js +5 -0
  123. package/package.json +1 -1
  124. package/script/gambit/simulator-ui/dist/bundle.js +14226 -23324
  125. package/script/gambit/simulator-ui/dist/bundle.js.map +4 -4
  126. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.d.ts.map +1 -1
  127. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.js +5 -0
  128. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts +1 -1
  129. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts.map +1 -1
  130. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.js +1 -0
  131. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts +1 -0
  132. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts.map +1 -1
  133. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.d.ts.map +1 -1
  134. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.js +5 -0
  135. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts +1 -1
  136. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts.map +1 -1
  137. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.js +1 -0
  138. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts +1 -0
  139. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts.map +1 -1
  140. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.d.ts.map +1 -1
  141. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.js +5 -0
  142. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts +1 -1
  143. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts.map +1 -1
  144. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.js +1 -0
  145. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts +1 -0
  146. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts.map +1 -1
  147. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.d.ts.map +1 -1
  148. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.js +5 -0
  149. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts +1 -1
  150. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts.map +1 -1
  151. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.js +1 -0
  152. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts +1 -0
  153. package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts.map +1 -1
  154. package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts +65 -0
  155. package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts.map +1 -1
  156. package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.d.ts.map +1 -1
  157. package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.js +8 -1
  158. package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts +82 -0
  159. package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts.map +1 -1
  160. package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.d.ts.map +1 -1
  161. package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.js +8 -1
  162. package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts +106 -0
  163. package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts.map +1 -1
  164. package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.d.ts.map +1 -1
  165. package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.js +8 -1
  166. package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts +32 -0
  167. package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts.map +1 -1
  168. package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.d.ts.map +1 -1
  169. package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.js +8 -1
  170. package/script/simulator-ui/isograph/components/Query/SimulatorBuildPage.d.ts.map +1 -1
  171. package/script/simulator-ui/isograph/components/Query/SimulatorBuildPage.js +4 -11
  172. package/script/simulator-ui/isograph/components/Query/SimulatorGradePage.d.ts.map +1 -1
  173. package/script/simulator-ui/isograph/components/Query/SimulatorGradePage.js +112 -20
  174. package/script/simulator-ui/isograph/components/Query/SimulatorTestPage.d.ts.map +1 -1
  175. package/script/simulator-ui/isograph/components/Query/SimulatorTestPage.js +121 -27
  176. package/script/simulator-ui/isograph/components/Query/SimulatorVerifyPage.d.ts.map +1 -1
  177. package/script/simulator-ui/isograph/components/Query/SimulatorVerifyPage.js +31 -17
  178. package/script/simulator-ui/isograph/components/Query/SimulatorWorkspacesPage.d.ts.map +1 -1
  179. package/script/simulator-ui/isograph/components/Query/SimulatorWorkspacesPage.js +2 -6
  180. package/script/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.d.ts.map +1 -1
  181. package/script/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.js +26 -22
  182. package/script/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts +3 -0
  183. package/script/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts.map +1 -1
  184. package/script/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.js +75 -49
  185. package/script/simulator-ui/isograph/components/grade/GradeTabView.d.ts +14 -0
  186. package/script/simulator-ui/isograph/components/grade/GradeTabView.d.ts.map +1 -1
  187. package/script/simulator-ui/isograph/components/grade/GradeTabView.js +1 -1
  188. package/script/simulator-ui/isograph/entrypoints/EntrypointSimulatorRedirect.d.ts.map +1 -1
  189. package/script/simulator-ui/isograph/entrypoints/EntrypointSimulatorRedirect.js +3 -16
  190. package/script/simulator-ui/isograph/entrypoints/EntrypointSimulatorWorkspaceShell.d.ts.map +1 -1
  191. package/script/simulator-ui/isograph/entrypoints/EntrypointSimulatorWorkspaceShell.js +1 -9
  192. package/script/simulator-ui/src/AppShell.d.ts.map +1 -1
  193. package/script/simulator-ui/src/AppShell.js +21 -31
  194. package/script/simulator-ui/src/Chat.d.ts +6 -30
  195. package/script/simulator-ui/src/Chat.d.ts.map +1 -1
  196. package/script/simulator-ui/src/Chat.js +14 -109
  197. package/script/simulator-ui/src/MinimalRouterRoot.d.ts.map +1 -1
  198. package/script/simulator-ui/src/MinimalRouterRoot.js +1 -16
  199. package/script/simulator-ui/src/TestBotChatPanel.d.ts +2 -0
  200. package/script/simulator-ui/src/TestBotChatPanel.d.ts.map +1 -1
  201. package/script/simulator-ui/src/TestBotChatPanel.js +2 -2
  202. package/script/simulator-ui/src/WorkbenchChatIntro.d.ts +10 -0
  203. package/script/simulator-ui/src/WorkbenchChatIntro.d.ts.map +1 -0
  204. package/script/simulator-ui/src/WorkbenchChatIntro.js +30 -0
  205. package/script/simulator-ui/src/WorkbenchDrawerIso.d.ts +1 -0
  206. package/script/simulator-ui/src/WorkbenchDrawerIso.d.ts.map +1 -1
  207. package/script/simulator-ui/src/WorkbenchDrawerIso.js +3 -15
  208. package/script/simulator-ui/src/gds/WorkbenchComposerChip.d.ts +2 -17
  209. package/script/simulator-ui/src/gds/WorkbenchComposerChip.d.ts.map +1 -1
  210. package/script/simulator-ui/src/grade/GradeResultsPanel.d.ts +10 -0
  211. package/script/simulator-ui/src/grade/GradeResultsPanel.d.ts.map +1 -1
  212. package/script/simulator-ui/src/grade/GradeResultsPanel.js +16 -1
  213. package/script/simulator-ui/src/routing.d.ts.map +1 -1
  214. package/script/simulator-ui/src/routing.js +0 -31
  215. package/script/simulator-ui/src/shared.d.ts +1 -0
  216. package/script/simulator-ui/src/shared.d.ts.map +1 -1
  217. package/script/simulator-ui/src/shared.js +4 -2
  218. package/script/simulator-ui/src/styles.d.ts +1 -1
  219. package/script/simulator-ui/src/styles.d.ts.map +1 -1
  220. package/script/simulator-ui/src/styles.js +65 -0
  221. package/script/simulator-ui/src/utils.d.ts +1 -0
  222. package/script/simulator-ui/src/utils.d.ts.map +1 -1
  223. package/script/simulator-ui/src/utils.js +3 -1
  224. package/script/simulator-ui/src/workbenchChipStore.d.ts +12 -0
  225. package/script/simulator-ui/src/workbenchChipStore.d.ts.map +1 -0
  226. package/script/simulator-ui/src/workbenchChipStore.js +108 -0
  227. package/script/simulator-ui/src/workbenchContext.d.ts +50 -0
  228. package/script/simulator-ui/src/workbenchContext.d.ts.map +1 -0
  229. package/script/simulator-ui/src/workbenchContext.js +165 -0
  230. package/script/src/server/request_handler.d.ts.map +1 -1
  231. package/script/src/server/request_handler.js +0 -40
  232. package/script/src/server.js +1 -1
  233. package/script/src/server_legacy_api_routes.d.ts +2 -122
  234. package/script/src/server_legacy_api_routes.d.ts.map +1 -1
  235. package/script/src/server_legacy_api_routes.js +0 -624
  236. package/script/src/server_simulator_ui.d.ts.map +1 -1
  237. package/script/src/server_simulator_ui.js +34 -0
  238. package/script/src/server_ui_routes.d.ts.map +1 -1
  239. package/script/src/server_ui_routes.js +0 -2
  240. package/script/src/server_workspace_graphql.d.ts +1 -1
  241. package/script/src/server_workspace_graphql.d.ts.map +1 -1
  242. package/script/src/server_workspace_graphql.js +66 -46
  243. package/script/src/simulator_graphql.d.ts.map +1 -1
  244. package/script/src/simulator_graphql.js +5 -0
  245. package/esm/simulator-ui/src/ProviderLoginPanel.d.ts +0 -8
  246. package/esm/simulator-ui/src/ProviderLoginPanel.d.ts.map +0 -1
  247. package/esm/simulator-ui/src/ProviderLoginPanel.js +0 -156
  248. package/esm/simulator-ui/src/WorkbenchDrawer.d.ts +0 -38
  249. package/esm/simulator-ui/src/WorkbenchDrawer.d.ts.map +0 -1
  250. package/esm/simulator-ui/src/WorkbenchDrawer.js +0 -716
  251. package/esm/simulator-ui/src/gds/Accordion.d.ts +0 -19
  252. package/esm/simulator-ui/src/gds/Accordion.d.ts.map +0 -1
  253. package/esm/simulator-ui/src/gds/Accordion.js +0 -47
  254. package/script/simulator-ui/src/ProviderLoginPanel.d.ts +0 -8
  255. package/script/simulator-ui/src/ProviderLoginPanel.d.ts.map +0 -1
  256. package/script/simulator-ui/src/ProviderLoginPanel.js +0 -162
  257. package/script/simulator-ui/src/WorkbenchDrawer.d.ts +0 -38
  258. package/script/simulator-ui/src/WorkbenchDrawer.d.ts.map +0 -1
  259. package/script/simulator-ui/src/WorkbenchDrawer.js +0 -722
  260. package/script/simulator-ui/src/gds/Accordion.d.ts +0 -19
  261. package/script/simulator-ui/src/gds/Accordion.d.ts.map +0 -1
  262. package/script/simulator-ui/src/gds/Accordion.js +0 -86
@@ -1,5 +1,3 @@
1
- import * as dntShim from "../_dnt.shims.js";
2
- import { asGambitID } from "./gambit_id.js";
3
1
  const jsonResponse = (payload, status = 200) => new Response(JSON.stringify(payload), {
4
2
  status,
5
3
  headers: { "content-type": "application/json" },
@@ -7,509 +5,6 @@ const jsonResponse = (payload, status = 200) => new Response(JSON.stringify(payl
7
5
  const methodNotAllowed = () => new Response("Method not allowed", { status: 405 });
8
6
  export const handleLegacyApiRoutes = async (deps) => {
9
7
  const { req, url } = deps;
10
- if (url.pathname === `${deps.workspaceApiBase}/new`) {
11
- if (req.method !== "POST")
12
- return methodNotAllowed();
13
- try {
14
- let onboarding = false;
15
- try {
16
- const body = await req.json();
17
- onboarding = body.onboarding === true;
18
- }
19
- catch {
20
- // ignore malformed body
21
- }
22
- const workspace = await deps.createWorkspaceSession({ onboarding });
23
- await deps.activateWorkspaceDeck(workspace.id);
24
- return jsonResponse({
25
- workspaceId: workspace.id,
26
- deckPath: workspace.rootDeckPath,
27
- workspaceDir: workspace.rootDir,
28
- createdAt: workspace.createdAt,
29
- workspaceSchemaVersion: deps.workspaceStateSchemaVersion,
30
- });
31
- }
32
- catch (error) {
33
- const message = error instanceof Error ? error.message : String(error);
34
- return jsonResponse({ error: message }, 500);
35
- }
36
- }
37
- if (url.pathname === `${deps.workspaceApiBase}/delete`) {
38
- if (req.method !== "POST")
39
- return methodNotAllowed();
40
- try {
41
- const body = await req.json().catch(() => ({}));
42
- const workspaceId = deps.getWorkspaceIdFromBody(body);
43
- if (!workspaceId)
44
- throw new Error("Missing workspaceId");
45
- const deleted = deps.deleteSessionState(workspaceId);
46
- if (!deleted) {
47
- return jsonResponse({ error: "Workspace not found" }, 404);
48
- }
49
- deps.deleteWorkspaceRuntime(workspaceId);
50
- return jsonResponse({ workspaceId, deleted: true });
51
- }
52
- catch (error) {
53
- const message = error instanceof Error ? error.message : String(error);
54
- return jsonResponse({ error: message }, 400);
55
- }
56
- }
57
- if (url.pathname === `${deps.workspaceApiBase}/feedback`) {
58
- if (req.method !== "POST")
59
- return methodNotAllowed();
60
- try {
61
- const body = await req.json().catch(() => ({}));
62
- const workspaceId = deps.getWorkspaceIdFromBody(body);
63
- if (!workspaceId)
64
- throw new Error("Missing workspaceId");
65
- if (!body.messageRefId)
66
- throw new Error("Missing messageRefId");
67
- if (body.score !== null &&
68
- (typeof body.score !== "number" || Number.isNaN(body.score))) {
69
- throw new Error("Invalid score");
70
- }
71
- const state = deps.readSessionState(workspaceId);
72
- if (!state)
73
- throw new Error("Workspace not found");
74
- const requestedRunId = typeof body.runId === "string" &&
75
- body.runId.trim().length > 0
76
- ? body.runId.trim()
77
- : undefined;
78
- const feedbackEligible = deps.isFeedbackEligibleMessageRef(state, body.messageRefId) ||
79
- (requestedRunId
80
- ? deps.isFeedbackEligiblePersistedTestRunMessageRef(state, requestedRunId, body.messageRefId)
81
- : false);
82
- if (!feedbackEligible) {
83
- throw new Error("Feedback target is not eligible");
84
- }
85
- const existing = state.feedback ?? [];
86
- const idx = existing.findIndex((entry) => entry.messageRefId === body.messageRefId);
87
- let entry;
88
- let feedback = existing;
89
- let deleted = false;
90
- if (body.score === null) {
91
- if (idx >= 0) {
92
- feedback = existing.filter((_, i) => i !== idx);
93
- deleted = true;
94
- }
95
- }
96
- else {
97
- const clamped = Math.max(-3, Math.min(3, Math.round(body.score)));
98
- const reason = typeof body.reason === "string"
99
- ? body.reason
100
- : idx >= 0
101
- ? existing[idx].reason
102
- : undefined;
103
- const runId = requestedRunId ??
104
- (typeof state.runId === "string" ? state.runId : "session");
105
- const scenarioRunId = requestedRunId ??
106
- (typeof state.meta?.scenarioRunId === "string"
107
- ? state.meta.scenarioRunId
108
- : runId);
109
- const now = new Date().toISOString();
110
- entry = idx >= 0
111
- ? {
112
- ...existing[idx],
113
- score: clamped,
114
- reason,
115
- runId: existing[idx].runId ?? runId,
116
- }
117
- : {
118
- id: deps.randomId("fb"),
119
- runId,
120
- messageRefId: body.messageRefId,
121
- score: clamped,
122
- reason,
123
- createdAt: now,
124
- };
125
- if (entry) {
126
- entry.workspaceId = workspaceId;
127
- entry.scenarioRunId = scenarioRunId;
128
- }
129
- feedback = idx >= 0
130
- ? existing.map((item, i) => i === idx ? entry : item)
131
- : [...existing, entry];
132
- }
133
- const nextState = deps.persistSessionState({ ...state, feedback });
134
- deps.appendSessionEvent(nextState, {
135
- type: "feedback.update",
136
- kind: "artifact",
137
- category: "feedback",
138
- workspaceId,
139
- scenarioRunId: typeof nextState.meta?.scenarioRunId === "string"
140
- ? nextState.meta.scenarioRunId
141
- : nextState.runId,
142
- messageRefId: body.messageRefId,
143
- feedback: entry,
144
- deleted,
145
- });
146
- const testBotRunId = typeof nextState.meta?.testBotRunId === "string"
147
- ? nextState.meta.testBotRunId
148
- : undefined;
149
- if (testBotRunId) {
150
- const testEntry = deps.getLiveTestRunEntry(testBotRunId);
151
- if (testEntry) {
152
- deps.syncTestBotRunFromState(testEntry.run, nextState);
153
- deps.broadcastTestBot({ type: "testBotStatus", run: testEntry.run }, workspaceId);
154
- }
155
- }
156
- return jsonResponse({
157
- workspaceId,
158
- feedback: entry,
159
- saved: !deleted,
160
- deleted,
161
- });
162
- }
163
- catch (error) {
164
- const message = error instanceof Error ? error.message : String(error);
165
- return jsonResponse({ error: message }, 400);
166
- }
167
- }
168
- if (url.pathname === "/api/test") {
169
- if (req.method !== "GET")
170
- return methodNotAllowed();
171
- try {
172
- const workspaceId = deps.getWorkspaceIdFromQuery(url) ??
173
- deps.activeWorkspaceId;
174
- await deps.logWorkspaceBotRoot("/api/test", workspaceId);
175
- const deckState = workspaceId
176
- ? (await deps.activateWorkspaceDeck(workspaceId),
177
- deps.readWorkspaceDeckStateStrict(workspaceId))
178
- : await deps.readPrimaryDeckState();
179
- const requestedDeck = url.searchParams.get("deckPath");
180
- const selection = requestedDeck
181
- ? deckState
182
- ? deps.resolveScenarioDeckFromState(deckState, requestedDeck)
183
- : undefined
184
- : deckState?.scenarioDecks[0];
185
- if (requestedDeck && !selection) {
186
- return jsonResponse({ error: "Unknown scenario deck selection" }, 400);
187
- }
188
- if (!selection) {
189
- return jsonResponse({
190
- botPath: null,
191
- botLabel: null,
192
- botDescription: null,
193
- selectedDeckId: null,
194
- inputSchema: null,
195
- inputSchemaError: null,
196
- defaults: {},
197
- testDecks: deckState?.scenarioDecks ?? [],
198
- });
199
- }
200
- return jsonResponse({
201
- botPath: selection.path,
202
- botLabel: selection.label,
203
- botDescription: selection.description,
204
- selectedDeckId: selection.id,
205
- inputSchema: selection.inputSchema ?? null,
206
- inputSchemaError: selection.inputSchemaError ?? null,
207
- defaults: { input: selection.defaults },
208
- testDecks: deckState?.scenarioDecks ?? [],
209
- });
210
- }
211
- catch (error) {
212
- const message = error instanceof Error ? error.message : String(error);
213
- return jsonResponse({ error: message }, 400);
214
- }
215
- }
216
- if (url.pathname === "/api/test/run") {
217
- if (req.method !== "POST")
218
- return methodNotAllowed();
219
- try {
220
- const body = await req.json().catch(() => ({}));
221
- let workspaceId = deps.getWorkspaceIdFromBody(body);
222
- if (!workspaceId) {
223
- const created = await deps.createWorkspaceSession();
224
- workspaceId = created.id;
225
- }
226
- deps.ensureWorkspaceSession(workspaceId);
227
- await deps.logWorkspaceBotRoot("/api/test/run", workspaceId);
228
- await deps.activateWorkspaceDeck(workspaceId);
229
- let run = await deps.startWorkspaceScenarioRunForGraphql({
230
- workspaceId,
231
- scenarioDeckId: typeof body.botDeckPath === "string"
232
- ? body.botDeckPath
233
- : typeof body.scenarioDeckId === "string"
234
- ? body.scenarioDeckId
235
- : null,
236
- scenarioInput: body.botInput,
237
- assistantInit: body.context ?? body.init,
238
- });
239
- const initialUserMessage = typeof body.initialUserMessage === "string"
240
- ? body.initialUserMessage.trim()
241
- : "";
242
- if (initialUserMessage.length > 0) {
243
- run = await deps.sendWorkspaceScenarioRunForGraphql({
244
- workspaceId,
245
- runId: run.id,
246
- message: initialUserMessage,
247
- });
248
- }
249
- const liveRun = deps.getLiveTestRunEntry(run.id)?.run;
250
- const runPayload = liveRun?.maxTurns !== undefined
251
- ? { ...run, maxTurns: liveRun.maxTurns }
252
- : run;
253
- return jsonResponse({ run: runPayload });
254
- }
255
- catch (error) {
256
- const message = error instanceof Error ? error.message : String(error);
257
- return jsonResponse({ error: message }, 400);
258
- }
259
- }
260
- if (url.pathname === "/api/test/message") {
261
- if (req.method !== "POST")
262
- return methodNotAllowed();
263
- try {
264
- const body = await req.json().catch(() => ({}));
265
- let workspaceId = deps.getWorkspaceIdFromBody(body);
266
- const requestedRunId = typeof body.runId === "string"
267
- ? body.runId.trim()
268
- : "";
269
- if (!workspaceId && requestedRunId) {
270
- const active = deps.getLiveTestRunEntry(requestedRunId)?.run;
271
- workspaceId = active?.workspaceId ?? active?.sessionId;
272
- }
273
- if (!workspaceId) {
274
- const created = await deps.createWorkspaceSession();
275
- workspaceId = created.id;
276
- }
277
- deps.ensureWorkspaceSession(workspaceId);
278
- await deps.logWorkspaceBotRoot("/api/test/message", workspaceId);
279
- await deps.activateWorkspaceDeck(workspaceId);
280
- const existingRun = requestedRunId.length > 0
281
- ? deps.readWorkspaceScenarioRunsForGraphql(workspaceId).find((run) => run.id === requestedRunId)
282
- : undefined;
283
- let runId = existingRun?.id;
284
- if (!runId) {
285
- const started = await deps.startWorkspaceScenarioRunForGraphql({
286
- runId: requestedRunId || undefined,
287
- workspaceId,
288
- scenarioDeckId: typeof body.botDeckPath === "string"
289
- ? body.botDeckPath
290
- : typeof body.scenarioDeckId === "string"
291
- ? body.scenarioDeckId
292
- : null,
293
- scenarioInput: body.botInput,
294
- assistantInit: body.context ?? body.init,
295
- });
296
- runId = started.id;
297
- const initialMessage = typeof body.message === "string"
298
- ? body.message.trim()
299
- : "";
300
- if (initialMessage.length === 0) {
301
- const liveStarted = deps.getLiveTestRunEntry(started.id)?.run;
302
- const startedPayload = liveStarted?.maxTurns !== undefined
303
- ? { ...started, maxTurns: liveStarted.maxTurns }
304
- : started;
305
- return jsonResponse({ run: startedPayload });
306
- }
307
- }
308
- const message = typeof body.message === "string" ? body.message : "";
309
- const run = await deps.sendWorkspaceScenarioRunForGraphql({
310
- workspaceId,
311
- runId,
312
- message,
313
- });
314
- const liveRun = deps.getLiveTestRunEntry(run.id)?.run;
315
- const runPayload = liveRun?.maxTurns !== undefined
316
- ? { ...run, maxTurns: liveRun.maxTurns }
317
- : run;
318
- return jsonResponse({ run: runPayload });
319
- }
320
- catch (error) {
321
- const message = error instanceof Error ? error.message : String(error);
322
- return jsonResponse({ error: message }, 400);
323
- }
324
- }
325
- if (url.pathname === "/api/test/stop") {
326
- if (req.method !== "POST")
327
- return methodNotAllowed();
328
- try {
329
- const body = await req.json().catch(() => ({}));
330
- const runId = typeof body.runId === "string" ? body.runId : "";
331
- if (!runId) {
332
- return jsonResponse({
333
- stopped: false,
334
- run: {
335
- id: "",
336
- status: "idle",
337
- messages: [],
338
- traces: [],
339
- toolInserts: [],
340
- },
341
- });
342
- }
343
- const existing = deps.getLiveTestRunEntry(runId);
344
- const workspaceId = typeof body.workspaceId === "string"
345
- ? body.workspaceId
346
- : existing?.run.workspaceId ?? existing?.run.sessionId;
347
- const wasRunning = Boolean(existing?.promise);
348
- if (!workspaceId) {
349
- existing?.abort?.abort();
350
- return jsonResponse({
351
- stopped: wasRunning,
352
- run: existing?.run ?? {
353
- id: runId,
354
- status: "idle",
355
- messages: [],
356
- traces: [],
357
- toolInserts: [],
358
- },
359
- });
360
- }
361
- const run = await deps.stopWorkspaceScenarioRunForGraphql({
362
- workspaceId,
363
- runId,
364
- });
365
- return jsonResponse({ stopped: wasRunning, run });
366
- }
367
- catch (error) {
368
- const message = error instanceof Error ? error.message : String(error);
369
- return jsonResponse({ error: message }, 400);
370
- }
371
- }
372
- if (url.pathname === "/api/codex/trust-workspace" ||
373
- url.pathname === "/api/build/provider-status") {
374
- if (req.method !== "GET" && req.method !== "POST") {
375
- return methodNotAllowed();
376
- }
377
- return await deps.handleBuildProviderStatusRequest({
378
- req,
379
- url,
380
- isLegacyCodexTrustEndpoint: url.pathname === "/api/codex/trust-workspace",
381
- getWorkspaceIdFromQuery: deps.getWorkspaceIdFromQuery,
382
- logWorkspaceBotRoot: deps.logWorkspaceBotRoot,
383
- readCodexWorkspaceStatus: deps.readCodexWorkspaceStatus,
384
- });
385
- }
386
- if (url.pathname === "/api/simulator/run") {
387
- if (req.method !== "POST")
388
- return methodNotAllowed();
389
- try {
390
- const body = await req.json().catch(() => ({}));
391
- const requestedWorkspaceId = deps.getWorkspaceIdFromBody(body);
392
- let workspaceId = requestedWorkspaceId;
393
- if (!workspaceId) {
394
- const created = await deps.createWorkspaceSession();
395
- workspaceId = created.id;
396
- }
397
- if (requestedWorkspaceId) {
398
- try {
399
- deps.readSessionStateStrict(requestedWorkspaceId, {
400
- withTraces: true,
401
- });
402
- }
403
- catch (error) {
404
- const message = error instanceof Error
405
- ? error.message
406
- : String(error);
407
- return jsonResponse({ error: message }, 400);
408
- }
409
- }
410
- deps.ensureWorkspaceSession(workspaceId);
411
- await deps.logWorkspaceBotRoot(url.pathname, workspaceId);
412
- await deps.activateWorkspaceDeck(workspaceId);
413
- let run = await deps.startWorkspaceScenarioRunForGraphql({
414
- workspaceId,
415
- scenarioDeckId: typeof body.botDeckPath === "string"
416
- ? body.botDeckPath
417
- : typeof body.scenarioDeckId === "string"
418
- ? body.scenarioDeckId
419
- : null,
420
- scenarioInput: body.botInput,
421
- assistantInit: body.context ?? body.init ??
422
- (typeof body.input === "string"
423
- ? JSON.stringify(body.input)
424
- : body.input),
425
- });
426
- const initialUserMessage = typeof body.message === "string"
427
- ? body.message.trim()
428
- : "";
429
- if (initialUserMessage.length > 0) {
430
- run = await deps.sendWorkspaceScenarioRunForGraphql({
431
- workspaceId,
432
- runId: run.id,
433
- message: initialUserMessage,
434
- });
435
- }
436
- const liveRun = deps.getLiveTestRunEntry(run.id)?.run;
437
- const runPayload = liveRun?.maxTurns !== undefined
438
- ? { ...run, maxTurns: liveRun.maxTurns }
439
- : run;
440
- return jsonResponse({
441
- run: runPayload,
442
- runId: run.id,
443
- workspaceId,
444
- });
445
- }
446
- catch (error) {
447
- const message = error instanceof Error ? error.message : String(error);
448
- return jsonResponse({ error: message }, 400);
449
- }
450
- }
451
- if (url.pathname === "/api/build/message") {
452
- if (req.method !== "POST")
453
- return methodNotAllowed();
454
- try {
455
- const body = await req.json().catch(() => ({}));
456
- let workspaceId = deps.getWorkspaceIdFromBody(body);
457
- if (!workspaceId && typeof body.runId === "string") {
458
- workspaceId = body.runId;
459
- }
460
- if (!workspaceId) {
461
- const created = await deps.createWorkspaceSession();
462
- workspaceId = created.id;
463
- }
464
- deps.ensureWorkspaceSession(workspaceId);
465
- await deps.logWorkspaceBotRoot(url.pathname, workspaceId);
466
- await deps.activateWorkspaceDeck(workspaceId);
467
- const buildChatProvider = deps.normalizeBuildChatProvider(body.buildChatProvider) ?? undefined;
468
- if (buildChatProvider) {
469
- const state = deps.readSessionStateStrict(workspaceId, {
470
- withTraces: true,
471
- });
472
- if (state) {
473
- deps.persistSessionState(deps.persistBuildChatProviderMeta(state, workspaceId, buildChatProvider));
474
- }
475
- }
476
- const message = typeof body.message === "string"
477
- ? body.message
478
- : typeof body.input === "string"
479
- ? body.input
480
- : "";
481
- const run = deps.startWorkspaceBuildRun({
482
- workspaceId,
483
- message,
484
- buildChatProvider,
485
- });
486
- return jsonResponse({ run });
487
- }
488
- catch (error) {
489
- const message = error instanceof Error ? error.message : String(error);
490
- const status = message.includes("already in progress") ? 409 : 400;
491
- return jsonResponse({ error: message }, status);
492
- }
493
- }
494
- if (url.pathname === "/api/build/stop") {
495
- if (req.method !== "POST")
496
- return methodNotAllowed();
497
- try {
498
- const body = await req.json().catch(() => ({}));
499
- const workspaceId = deps.getWorkspaceIdFromBody(body);
500
- if (!workspaceId)
501
- throw new Error("Missing workspaceId");
502
- const active = deps.getLiveBuildRunEntry(workspaceId);
503
- const wasRunning = Boolean(active?.promise);
504
- const runId = active?.run.id ?? deps.readWorkspaceBuildRunForGraphql(workspaceId).id;
505
- const run = await deps.stopWorkspaceBuildRun({ workspaceId, runId });
506
- return jsonResponse({ stopped: wasRunning, run });
507
- }
508
- catch (error) {
509
- const message = error instanceof Error ? error.message : String(error);
510
- return jsonResponse({ error: message }, 400);
511
- }
512
- }
513
8
  if (url.pathname === "/api/build/provider") {
514
9
  if (req.method !== "POST")
515
10
  return methodNotAllowed();
@@ -536,92 +31,6 @@ export const handleLegacyApiRoutes = async (deps) => {
536
31
  return jsonResponse({ error: message }, 400);
537
32
  }
538
33
  }
539
- if (url.pathname === "/api/build/reset") {
540
- if (req.method !== "POST")
541
- return methodNotAllowed();
542
- try {
543
- const body = await req.json().catch(() => ({}));
544
- const workspaceId = deps.getWorkspaceIdFromBody(body);
545
- if (!workspaceId)
546
- throw new Error("Missing workspaceId");
547
- const run = await deps.resetWorkspaceBuild(workspaceId);
548
- return jsonResponse({ reset: true, run });
549
- }
550
- catch (error) {
551
- const message = error instanceof Error ? error.message : String(error);
552
- return jsonResponse({ error: message }, 400);
553
- }
554
- }
555
- if (url.pathname === "/api/build/files") {
556
- if (req.method !== "GET")
557
- return methodNotAllowed();
558
- try {
559
- const workspaceId = deps.getWorkspaceIdFromQuery(url) ??
560
- deps.activeWorkspaceId ??
561
- "";
562
- await deps.logWorkspaceBotRoot("/api/build/files", workspaceId);
563
- const root = await deps.resolveBuildBotRoot(workspaceId);
564
- const records = await deps.readWorkspaceFiles({
565
- workspaceId: asGambitID(workspaceId),
566
- });
567
- const entries = records.map((record) => ({
568
- path: record.path,
569
- type: "file",
570
- size: typeof record.size === "number" ? record.size : undefined,
571
- modifiedAt: record.modifiedAt ?? undefined,
572
- }));
573
- return jsonResponse({ root, entries });
574
- }
575
- catch (error) {
576
- const message = error instanceof Error ? error.message : String(error);
577
- return jsonResponse({ error: message }, 400);
578
- }
579
- }
580
- if (url.pathname === "/api/build/file") {
581
- if (req.method !== "GET")
582
- return methodNotAllowed();
583
- const workspaceId = deps.getWorkspaceIdFromQuery(url) ??
584
- deps.activeWorkspaceId ??
585
- "";
586
- await deps.logWorkspaceBotRoot("/api/build/file", workspaceId);
587
- const inputPath = url.searchParams.get("path") ?? "";
588
- if (!inputPath) {
589
- return jsonResponse({ error: "Missing path" }, 400);
590
- }
591
- try {
592
- const root = await deps.resolveBuildBotRoot(workspaceId);
593
- const resolved = await deps.resolveBuildBotPath(root, inputPath);
594
- if (!resolved.stat.isFile) {
595
- return jsonResponse({ error: "Path is not a file" }, 400);
596
- }
597
- if (typeof resolved.stat.size === "number" &&
598
- resolved.stat.size > deps.maxFilePreviewBytes) {
599
- return jsonResponse({
600
- path: resolved.relativePath,
601
- tooLarge: true,
602
- size: resolved.stat.size,
603
- });
604
- }
605
- const bytes = await dntShim.Deno.readFile(resolved.fullPath);
606
- const text = deps.readPreviewText(bytes);
607
- if (text === null) {
608
- return jsonResponse({
609
- path: resolved.relativePath,
610
- binary: true,
611
- size: resolved.stat.size,
612
- });
613
- }
614
- return jsonResponse({
615
- path: resolved.relativePath,
616
- contents: text,
617
- size: resolved.stat.size,
618
- });
619
- }
620
- catch (error) {
621
- const message = error instanceof Error ? error.message : String(error);
622
- return jsonResponse({ error: message }, 400);
623
- }
624
- }
625
34
  if (url.pathname.startsWith("/api/")) {
626
35
  return new Response("Not found", { status: 404 });
627
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server_simulator_ui.d.ts","sourceRoot":"","sources":["../../src/src/server_simulator_ui.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,+BAA+B,EAC/B,KAAK,0BAA0B,EAChC,MAAM,kCAAkC,CAAC;AAY1C,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhF,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACvC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACzC,CAAC;AAiLF,wBAAgB,wBAAwB,IAAI,OAAO,CAIlD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAMlE;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAM3E;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAG5D;AA0BD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CACzB,GAAG,IAAI,CAwDP;AAED,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAqB1B;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAqB7E;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE;IACL,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,EACD,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,UAAU,CAAC,EAAE,0BAA0B,GACtC,OAAO,CAAC,MAAM,CAAC,CAyNjB"}
1
+ {"version":3,"file":"server_simulator_ui.d.ts","sourceRoot":"","sources":["../../src/src/server_simulator_ui.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,+BAA+B,EAC/B,KAAK,0BAA0B,EAChC,MAAM,kCAAkC,CAAC;AAY1C,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhF,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACvC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACzC,CAAC;AAiLF,wBAAgB,wBAAwB,IAAI,OAAO,CAIlD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAMlE;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAM3E;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAG5D;AA0BD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CACzB,GAAG,IAAI,CAwDP;AAED,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAqB1B;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CA+C7E;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE;IACL,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,EACD,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,UAAU,CAAC,EAAE,0BAA0B,GACtC,OAAO,CAAC,MAAM,CAAC,CA6OjB"}
@@ -298,6 +298,28 @@ export async function handleSimulatorFaviconRequest(req) {
298
298
  }
299
299
  }
300
300
  export function handleSimulatorPathRedirect(pathname) {
301
+ if (pathname === "/isograph" || pathname.startsWith("/isograph/")) {
302
+ const strippedPath = pathname.slice("/isograph".length);
303
+ const canonicalPath = strippedPath.length > 0 ? strippedPath : "/";
304
+ const canonicalEntrypoint = Array.from(simulatorIsographAppRoutes).find(([pattern]) => matchSimulatorRouteWithParams(canonicalPath, pattern).match)?.[1];
305
+ if (!canonicalEntrypoint)
306
+ return null;
307
+ const globals = dntShim.dntGlobalThis;
308
+ const previousPath = globals.__GAMBIT_CURRENT_PATH__;
309
+ globals.__GAMBIT_CURRENT_PATH__ = canonicalPath;
310
+ try {
311
+ const redirect = getRedirectFromEntrypoint(canonicalEntrypoint);
312
+ return createServerRedirectResponse(redirect?.location ?? canonicalPath);
313
+ }
314
+ finally {
315
+ if (previousPath === undefined) {
316
+ delete globals.__GAMBIT_CURRENT_PATH__;
317
+ }
318
+ else {
319
+ globals.__GAMBIT_CURRENT_PATH__ = previousPath;
320
+ }
321
+ }
322
+ }
301
323
  const matchedEntrypoint = Array.from(simulatorIsographAppRoutes).find(([pattern]) => matchSimulatorRouteWithParams(pathname, pattern).match)?.[1];
302
324
  if (!matchedEntrypoint)
303
325
  return null;
@@ -324,6 +346,7 @@ export async function simulatorReactHtml(deckPath, deckLabel, opts, readWorkspac
324
346
  const verifyTabEnabled = readEnvBoolean("GAMBIT_SIMULATOR_VERIFY_TAB", true);
325
347
  const chatAccordionEnabled = readEnvBoolean("GAMBIT_SIMULATOR_CHAT_ACCORDION", false);
326
348
  const buildStreamDebugEnabled = readEnvBoolean("GAMBIT_SIMULATOR_BUILD_STREAM_DEBUG", false);
349
+ const workbenchChatTopActionsEnabled = readEnvBoolean("GAMBIT_SIMULATOR_WORKBENCH_CHAT_TOP_ACTIONS", false);
327
350
  const gambitDev = (() => {
328
351
  const raw = (dntShim.Deno.env.get("GAMBIT_ENV") ?? dntShim.Deno.env.get("NODE_ENV") ?? "")
329
352
  .trim()
@@ -368,6 +391,7 @@ export async function simulatorReactHtml(deckPath, deckLabel, opts, readWorkspac
368
391
  const previousBuildTabEnabled = globals.__GAMBIT_BUILD_TAB_ENABLED__;
369
392
  const previousVerifyTabEnabled = globals.__GAMBIT_VERIFY_TAB_ENABLED__;
370
393
  const previousChatAccordionEnabled = globals.__GAMBIT_CHAT_ACCORDION_ENABLED__;
394
+ const previousWorkbenchChatTopActions = globals.__GAMBIT_WORKBENCH_CHAT_TOP_ACTIONS__;
371
395
  const previousWorkspaceId = globals.__GAMBIT_WORKSPACE_ID__;
372
396
  const previousWorkspaceOnboarding = globals.__GAMBIT_WORKSPACE_ONBOARDING__;
373
397
  const previousBuildStreamDebug = globals.__GAMBIT_BUILD_STREAM_DEBUG__;
@@ -379,6 +403,8 @@ export async function simulatorReactHtml(deckPath, deckLabel, opts, readWorkspac
379
403
  globals.__GAMBIT_BUILD_TAB_ENABLED__ = buildTabEnabled;
380
404
  globals.__GAMBIT_VERIFY_TAB_ENABLED__ = verifyTabEnabled;
381
405
  globals.__GAMBIT_CHAT_ACCORDION_ENABLED__ = chatAccordionEnabled;
406
+ globals.__GAMBIT_WORKBENCH_CHAT_TOP_ACTIONS__ =
407
+ workbenchChatTopActionsEnabled;
382
408
  globals.__GAMBIT_WORKSPACE_ID__ = workspaceId;
383
409
  globals.__GAMBIT_WORKSPACE_ONBOARDING__ = workspaceOnboarding;
384
410
  globals.__GAMBIT_BUILD_STREAM_DEBUG__ = buildStreamDebugEnabled;
@@ -436,6 +462,13 @@ export async function simulatorReactHtml(deckPath, deckLabel, opts, readWorkspac
436
462
  globals.__GAMBIT_CHAT_ACCORDION_ENABLED__ =
437
463
  previousChatAccordionEnabled;
438
464
  }
465
+ if (previousWorkbenchChatTopActions === undefined) {
466
+ delete globals.__GAMBIT_WORKBENCH_CHAT_TOP_ACTIONS__;
467
+ }
468
+ else {
469
+ globals.__GAMBIT_WORKBENCH_CHAT_TOP_ACTIONS__ =
470
+ previousWorkbenchChatTopActions;
471
+ }
439
472
  if (previousWorkspaceId === undefined) {
440
473
  delete globals.__GAMBIT_WORKSPACE_ID__;
441
474
  }
@@ -487,6 +520,7 @@ ${globalStyles}
487
520
  window.__GAMBIT_BUILD_TAB_ENABLED__ = ${JSON.stringify(buildTabEnabled)};
488
521
  window.__GAMBIT_VERIFY_TAB_ENABLED__ = ${JSON.stringify(verifyTabEnabled)};
489
522
  window.__GAMBIT_CHAT_ACCORDION_ENABLED__ = ${JSON.stringify(chatAccordionEnabled)};
523
+ window.__GAMBIT_WORKBENCH_CHAT_TOP_ACTIONS__ = ${JSON.stringify(workbenchChatTopActionsEnabled)};
490
524
  window.__GAMBIT_WORKSPACE_ID__ = ${JSON.stringify(workspaceId)};
491
525
  window.__GAMBIT_WORKSPACE_ONBOARDING__ = ${JSON.stringify(workspaceOnboarding)};
492
526
  window.__GAMBIT_BUILD_STREAM_DEBUG__ = ${JSON.stringify(buildStreamDebugEnabled)};