openpond 0.2.55 → 0.2.56

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 (399) hide show
  1. package/dist/app-server.d.ts +10545 -10254
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/actions-command-QU4H53OG.js +2 -0
  4. package/dist/chunks/{app-layer-Y2UERCPY.js → app-layer-NSTE5HIT.js} +1 -1
  5. package/dist/chunks/app-server-connected-apps-JHGWLBXT.js +2 -0
  6. package/dist/chunks/app-server-evaluations-GJPFWIDA.js +2 -0
  7. package/dist/chunks/app-server-harness-services-IH4G6POY.js +2 -0
  8. package/dist/chunks/app-server-runtime-DVKOZ5B6.js +2 -0
  9. package/dist/chunks/apps-BKTOR4F7.js +2 -0
  10. package/dist/chunks/chunk-25MBPJVY.js +2 -0
  11. package/dist/chunks/chunk-2D4Y3HNW.js +2 -0
  12. package/dist/chunks/chunk-2IHO4GDJ.js +2 -0
  13. package/dist/chunks/chunk-2QUCCP6Z.js +2 -0
  14. package/dist/chunks/chunk-3K4VVB7S.js +6 -0
  15. package/dist/chunks/chunk-3QIB5FXI.js +10 -0
  16. package/dist/chunks/chunk-3RCRSMWZ.js +17 -0
  17. package/dist/chunks/chunk-3VUATFZD.js +2 -0
  18. package/dist/chunks/chunk-3Z47M3YY.js +2 -0
  19. package/dist/chunks/{chunk-UA5DA5I2.js → chunk-4D7HWVWD.js} +1 -1
  20. package/dist/chunks/chunk-4EPSHPZL.js +2 -0
  21. package/dist/chunks/chunk-4NESNOK5.js +2 -0
  22. package/dist/chunks/chunk-523TE4BI.js +2 -0
  23. package/dist/chunks/{chunk-B7QDZPNX.js → chunk-5MCNZCVQ.js} +1 -1
  24. package/dist/chunks/{chunk-DLVPSCTB.js → chunk-6QSSIT62.js} +1 -1
  25. package/dist/chunks/chunk-6ZFPQYHG.js +2 -0
  26. package/dist/chunks/chunk-74IIXVAE.js +2 -0
  27. package/dist/chunks/chunk-74ZXXBGN.js +6 -0
  28. package/dist/chunks/chunk-773TH7FN.js +2 -0
  29. package/dist/chunks/chunk-7E6T7GP5.js +2 -0
  30. package/dist/chunks/chunk-7ED24PP6.js +2 -0
  31. package/dist/chunks/chunk-7HPDGZOR.js +86 -0
  32. package/dist/chunks/chunk-7KWD2I6W.js +2 -0
  33. package/dist/chunks/chunk-7PXZ4X4P.js +2 -0
  34. package/dist/chunks/chunk-A6USMRWK.js +2 -0
  35. package/dist/chunks/chunk-ABD5M2D2.js +2 -0
  36. package/dist/chunks/chunk-ACYFMLWG.js +10 -0
  37. package/dist/chunks/chunk-AN525SPP.js +6 -0
  38. package/dist/chunks/chunk-APB2STJK.js +2 -0
  39. package/dist/chunks/chunk-AY64VY4E.js +2 -0
  40. package/dist/chunks/{chunk-G6JMQGX7.js → chunk-B7RFL4N2.js} +1 -1
  41. package/dist/chunks/chunk-BLXEAZCQ.js +12 -0
  42. package/dist/chunks/chunk-D74JEERO.js +5 -0
  43. package/dist/chunks/{chunk-U2YMBCX7.js → chunk-DARVPBZ4.js} +1 -1
  44. package/dist/chunks/chunk-DBK66CJP.js +8 -0
  45. package/dist/chunks/chunk-DDMZSZFL.js +1 -0
  46. package/dist/chunks/chunk-DIO5CB6U.js +2 -0
  47. package/dist/chunks/chunk-DMFUEUAZ.js +5 -0
  48. package/dist/chunks/chunk-DMVD2RFZ.js +2 -0
  49. package/dist/chunks/chunk-DUURYZOI.js +2 -0
  50. package/dist/chunks/chunk-DZUAT3TP.js +1 -0
  51. package/dist/chunks/chunk-EIEZHFIW.js +6 -0
  52. package/dist/chunks/chunk-EIRYMSEG.js +19 -0
  53. package/dist/chunks/{chunk-R27YGT77.js → chunk-EKM2D7JU.js} +1 -1
  54. package/dist/chunks/chunk-EQFGBL3O.js +2 -0
  55. package/dist/chunks/chunk-EYPCBBMS.js +2 -0
  56. package/dist/chunks/chunk-F4KOGISR.js +10 -0
  57. package/dist/chunks/chunk-F74GBN6K.js +2 -0
  58. package/dist/chunks/chunk-FEAKTSRS.js +2 -0
  59. package/dist/chunks/chunk-FFRFSDBM.js +2 -0
  60. package/dist/chunks/chunk-FTEOCCPB.js +23 -0
  61. package/dist/chunks/chunk-FUOEIDMA.js +8 -0
  62. package/dist/chunks/{chunk-BQAF5P7K.js → chunk-FV2R5RUN.js} +2 -2
  63. package/dist/chunks/chunk-FWIPHEVA.js +12 -0
  64. package/dist/chunks/chunk-FY5KHLMW.js +2 -0
  65. package/dist/chunks/chunk-G3RXYI2L.js +6 -0
  66. package/dist/chunks/chunk-GJ2ZJFDD.js +2 -0
  67. package/dist/chunks/chunk-GLDYJM7O.js +1 -0
  68. package/dist/chunks/chunk-GPVCOEUH.js +2 -0
  69. package/dist/chunks/chunk-GW766ZSO.js +5 -0
  70. package/dist/chunks/chunk-GWCHDF2C.js +4 -0
  71. package/dist/chunks/chunk-GZ7M5XBP.js +2 -0
  72. package/dist/chunks/chunk-H6IW2R22.js +140 -0
  73. package/dist/chunks/chunk-HCYX6RHP.js +2 -0
  74. package/dist/chunks/chunk-HDL5YSAA.js +2 -0
  75. package/dist/chunks/chunk-HIOKCIL7.js +2 -0
  76. package/dist/chunks/{chunk-IODUCRBA.js → chunk-HY3GOBFJ.js} +1 -1
  77. package/dist/chunks/chunk-HZEIRHEB.js +2 -0
  78. package/dist/chunks/chunk-I2NXNMRZ.js +2 -0
  79. package/dist/chunks/chunk-I7AQMAQI.js +33 -0
  80. package/dist/chunks/chunk-IZ6DLEVY.js +2 -0
  81. package/dist/chunks/chunk-J2TWKFML.js +1871 -0
  82. package/dist/chunks/chunk-JDEEWOD7.js +2 -0
  83. package/dist/chunks/chunk-JFXWI3EN.js +6 -0
  84. package/dist/chunks/chunk-JYKRR7E5.js +5 -0
  85. package/dist/chunks/chunk-KCJVFLBB.js +2 -0
  86. package/dist/chunks/{chunk-5CMKGD43.js → chunk-KG325WTN.js} +1 -1
  87. package/dist/chunks/chunk-KUERKVEU.js +3 -0
  88. package/dist/chunks/chunk-KVTBX2UP.js +2 -0
  89. package/dist/chunks/chunk-L3KS6MOV.js +2 -0
  90. package/dist/chunks/chunk-L6K7ERG5.js +2 -0
  91. package/dist/chunks/{chunk-MH3LHSGX.js → chunk-LQQNBVEB.js} +1 -1
  92. package/dist/chunks/{chunk-BTI4N7YO.js → chunk-M4JWQSV7.js} +1 -1
  93. package/dist/chunks/chunk-MQULU465.js +2 -0
  94. package/dist/chunks/chunk-N4FFQPLR.js +2 -0
  95. package/dist/chunks/chunk-N73MU2C3.js +2 -0
  96. package/dist/chunks/chunk-NHQ36THU.js +3 -0
  97. package/dist/chunks/chunk-O6ULLQJ6.js +2 -0
  98. package/dist/chunks/chunk-O72BSKSO.js +2 -0
  99. package/dist/chunks/chunk-OGDADQGH.js +143 -0
  100. package/dist/chunks/chunk-OIUTWU6K.js +2 -0
  101. package/dist/chunks/chunk-OLLLZVHF.js +2 -0
  102. package/dist/chunks/chunk-OPNRWESL.js +3 -0
  103. package/dist/chunks/chunk-OQKJGTTO.js +4 -0
  104. package/dist/chunks/chunk-OQPJ7FJF.js +9 -0
  105. package/dist/chunks/{chunk-TERVLCRG.js → chunk-OS3LO5J3.js} +1 -1
  106. package/dist/chunks/chunk-OUVIWDL2.js +2 -0
  107. package/dist/chunks/chunk-PCSIOUHF.js +7 -0
  108. package/dist/chunks/chunk-PF5R6CMP.js +21 -0
  109. package/dist/chunks/chunk-PPAPVGJP.js +3 -0
  110. package/dist/chunks/chunk-PRGBLQVH.js +2 -0
  111. package/dist/chunks/chunk-PSGGOZFM.js +2 -0
  112. package/dist/chunks/chunk-PUZQU66L.js +2 -0
  113. package/dist/chunks/{chunk-NOTXPD2T.js → chunk-Q2QL6UWN.js} +1 -1
  114. package/dist/chunks/chunk-Q4TBTRIG.js +2 -0
  115. package/dist/chunks/chunk-Q5LEXXJG.js +16 -0
  116. package/dist/chunks/chunk-QDC4OW3S.js +2 -0
  117. package/dist/chunks/chunk-QEFHOJFE.js +7 -0
  118. package/dist/chunks/chunk-QHWGQ3A4.js +5 -0
  119. package/dist/chunks/chunk-QIKWJ2AA.js +11 -0
  120. package/dist/chunks/chunk-QNG27G3T.js +6 -0
  121. package/dist/chunks/chunk-QOGJAQDO.js +3 -0
  122. package/dist/chunks/chunk-QOTVNQDI.js +4 -0
  123. package/dist/chunks/{chunk-NNIRIUSY.js → chunk-RAXOSUSW.js} +1 -1
  124. package/dist/chunks/chunk-RNIAFXMB.js +50 -0
  125. package/dist/chunks/{chunk-SHQOIROR.js → chunk-S5ESN275.js} +3 -3
  126. package/dist/chunks/chunk-SDAUS5PY.js +2 -0
  127. package/dist/chunks/chunk-SDXFLO7J.js +5 -0
  128. package/dist/chunks/chunk-SH5CBAFC.js +2 -0
  129. package/dist/chunks/chunk-SWUEFLOH.js +2 -0
  130. package/dist/chunks/chunk-SYUKES6H.js +3 -0
  131. package/dist/chunks/chunk-T5AACNJI.js +2 -0
  132. package/dist/chunks/chunk-TRQQNFMO.js +4 -0
  133. package/dist/chunks/chunk-TVQAPBLZ.js +2 -0
  134. package/dist/chunks/chunk-UCPGRPWY.js +2 -0
  135. package/dist/chunks/chunk-UGL7WF3W.js +2 -0
  136. package/dist/chunks/chunk-UHFZHBGW.js +2 -0
  137. package/dist/chunks/{chunk-C6D4WAYN.js → chunk-UKMA4R6X.js} +2 -2
  138. package/dist/chunks/{chunk-4WEUCGJ3.js → chunk-VRIEKBBH.js} +1 -1
  139. package/dist/chunks/chunk-VYLGI3IH.js +13 -0
  140. package/dist/chunks/chunk-W45RKGM6.js +1 -0
  141. package/dist/chunks/chunk-WJ43MJ3F.js +2 -0
  142. package/dist/chunks/chunk-WMKYHXVM.js +3 -0
  143. package/dist/chunks/chunk-WN3V6KDN.js +3 -0
  144. package/dist/chunks/chunk-X4OSOOSU.js +3 -0
  145. package/dist/chunks/chunk-XDQMGUWL.js +2 -0
  146. package/dist/chunks/chunk-XTFPDQMH.js +3 -0
  147. package/dist/chunks/chunk-XVDFJ3ZF.js +2 -0
  148. package/dist/chunks/chunk-XW6HGSIT.js +8 -0
  149. package/dist/chunks/chunk-XXYGGNVM.js +2 -0
  150. package/dist/chunks/chunk-Y4OWBBDD.js +184 -0
  151. package/dist/chunks/chunk-YBT2NB32.js +2 -0
  152. package/dist/chunks/chunk-YCJO3YVD.js +10 -0
  153. package/dist/chunks/{chunk-QRAKXZOC.js → chunk-YOBN7KTF.js} +6 -6
  154. package/dist/chunks/chunk-YOQRYNLP.js +2 -0
  155. package/dist/chunks/chunk-YY7LEQGP.js +2 -0
  156. package/dist/chunks/chunk-Z4Z5UOZM.js +22 -0
  157. package/dist/chunks/chunk-Z54O534A.js +3 -0
  158. package/dist/chunks/chunk-ZCHXGRRU.js +2 -0
  159. package/dist/chunks/chunk-ZFSHBFG5.js +40 -0
  160. package/dist/chunks/chunk-ZGTOK7ZK.js +12 -0
  161. package/dist/chunks/{chunk-Q7AXHFZV.js → chunk-ZRDGQDZL.js} +1 -1
  162. package/dist/chunks/chunk-ZUJ3XUCP.js +2 -0
  163. package/dist/chunks/chunk-ZZWAQBA2.js +2 -0
  164. package/dist/chunks/cli-X25RSO2X.js +2 -0
  165. package/dist/chunks/configuration-command-6C5UO7GE.js +2 -0
  166. package/dist/chunks/connected-app-executor-IVLGQP65.js +2 -0
  167. package/dist/chunks/connected-evidence-GH2ATNEX.js +2 -0
  168. package/dist/chunks/connection-HTF6CC7M.js +2 -0
  169. package/dist/chunks/{continual-TTGJ6YTR.js → continual-6CQAMTTR.js} +3 -3
  170. package/dist/chunks/core-commands-A2DGGIPS.js +2 -0
  171. package/dist/chunks/datasets-7BNMVJOY.js +2 -0
  172. package/dist/chunks/desktop-test-3CUHVLXV.js +3 -0
  173. package/dist/chunks/dist-OMGUJYPD.js +2 -0
  174. package/dist/chunks/dist-VYC5VMQB.js +2 -0
  175. package/dist/chunks/{dist-FAJX2UBW.js → dist-ZVJPJLXR.js} +1 -1
  176. package/dist/chunks/enclave-QS4BUNDU.js +2 -0
  177. package/dist/chunks/evaluation-coordination-XEF5L7KZ.js +2 -0
  178. package/dist/chunks/experiment-improvements-KRX2DP27.js +2 -0
  179. package/dist/chunks/experiments-DFGQYA4O.js +2 -0
  180. package/dist/chunks/experiments-VFQGE4HC.js +2 -0
  181. package/dist/chunks/{extension-DWMY6D2R.js → extension-XKXXOP5N.js} +1 -1
  182. package/dist/chunks/{help-A72QDRNG.js → help-S7THC6IE.js} +1 -1
  183. package/dist/chunks/host-profile-evaluation-tools-JJQWJUBT.js +2 -0
  184. package/dist/chunks/host-profile-external-dataset-K3ICDHIP.js +2 -0
  185. package/dist/chunks/hosted-app-server-composition-BCOO5ANF.js +2 -0
  186. package/dist/chunks/hosted-experiment-improvement-NFSVS5TU.js +3 -0
  187. package/dist/chunks/hosted-harness-runtime-723S5ZSH.js +2 -0
  188. package/dist/chunks/hosted-profile-candidate-2S5LFUWD.js +3 -0
  189. package/dist/chunks/hosted-profile-compiler-2DQIFSXW.js +2 -0
  190. package/dist/chunks/hosted-profile-evaluation-control-76BTRTYD.js +2 -0
  191. package/dist/chunks/hosted-profile-evaluation-inspection-V6Z3A5XJ.js +3 -0
  192. package/dist/chunks/hosted-profile-evaluation-preparation-IDJYREW3.js +3 -0
  193. package/dist/chunks/hosted-tasksets-ANAE2PIW.js +2 -0
  194. package/dist/chunks/human-review-WR777ODH.js +2 -0
  195. package/dist/chunks/import-MLZUHITH.js +4 -0
  196. package/dist/chunks/learning-ACEVFL5M.js +2 -0
  197. package/dist/chunks/local-harness-improvement-runtime-JIQ6ZVDW.js +2 -0
  198. package/dist/chunks/local-harness-taskset-review-XVYTGAGK.js +2 -0
  199. package/dist/chunks/local-scope-HVF2GZ5W.js +2 -0
  200. package/dist/chunks/model-projects-QPO22JPA.js +2 -0
  201. package/dist/chunks/opchat-T4QTNEIY.js +3 -0
  202. package/dist/chunks/organizations-75L5DZDV.js +2 -0
  203. package/dist/chunks/{profile-NOZ6TVXL.js → profile-TFZMUEDR.js} +1 -1
  204. package/dist/chunks/profile-training-source-6GOT7AHM.js +2 -0
  205. package/dist/chunks/project-action-payload-7VGL7OER.js +2 -0
  206. package/dist/chunks/project-agent-6RRO233B.js +2 -0
  207. package/dist/chunks/published-experiment-source-DZFENAQA.js +2 -0
  208. package/dist/chunks/refiner-profile-service-UUIWFJVT.js +2 -0
  209. package/dist/chunks/runtime-A7OZXM43.js +6 -0
  210. package/dist/chunks/sandbox-command-IU5XFTJP.js +2 -0
  211. package/dist/chunks/{sandbox-template-LKGBDVJ4.js → sandbox-template-C4V6T36U.js} +1 -1
  212. package/dist/chunks/saved-work-6BMBFP43.js +2 -0
  213. package/dist/chunks/send-turn-XTAIS2JN.js +2 -0
  214. package/dist/chunks/src-CJM6HY5Y.js +326 -0
  215. package/dist/chunks/{src-ZWJ5IO7A.js → src-LMC3K6LH.js} +1 -1
  216. package/dist/chunks/standalone-experiment-turn-owner-JCY5LL5R.js +2 -0
  217. package/dist/chunks/store-chat-workflows-S72HZXQR.js +18 -0
  218. package/dist/chunks/store-continual-support-reviews-HHA6NX7K.js +7 -0
  219. package/dist/chunks/store-conversation-serving-KPC62UEY.js +2 -0
  220. package/dist/chunks/store-create-improve-QV54XIZW.js +40 -0
  221. package/dist/chunks/store-datasets-RXJ33SUN.js +86 -0
  222. package/dist/chunks/store-evaluation-results-3F3P527G.js +7 -0
  223. package/dist/chunks/store-harness-evaluation-review-settings-I2R3HPO3.js +29 -0
  224. package/dist/chunks/store-harness-memory-VINCZ4GK.js +17 -0
  225. package/dist/chunks/store-harness-refinement-candidates-EA5KFQPH.js +21 -0
  226. package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +2 -0
  227. package/dist/chunks/store-human-review-RAH7WMIP.js +7 -0
  228. package/dist/chunks/store-learned-preference-migration-validation-4CI2IRUF.js +2 -0
  229. package/dist/chunks/store-learning-WLG6KFIO.js +2 -0
  230. package/dist/chunks/store-learning-credentials-WZQJ4HPJ.js +2 -0
  231. package/dist/chunks/store-local-experiments-5LUJR7GI.js +97 -0
  232. package/dist/chunks/store-model-batch-review-YEGX327M.js +2 -0
  233. package/dist/chunks/store-model-configuration-5ZURQATB.js +3 -0
  234. package/dist/chunks/store-preference-comparison-LV32MHVL.js +6 -0
  235. package/dist/chunks/store-schedules-VGTEQVKH.js +53 -0
  236. package/dist/chunks/store-sidebar-file-bookmarks-VB5GTLFY.js +18 -0
  237. package/dist/chunks/store-sidebar-preferences-GWIOG2NH.js +16 -0
  238. package/dist/chunks/store-subagents-T7R2Z6TB.js +67 -0
  239. package/dist/chunks/store-task-inbox-JJTBW76C.js +33 -0
  240. package/dist/chunks/store-task-inventory-OB3F2APC.js +10 -0
  241. package/dist/chunks/store-taskset-drafts-EKQWWFYQ.js +9 -0
  242. package/dist/chunks/store-training-G6YLFSIR.js +70 -0
  243. package/dist/chunks/store-training-jobs-RC46YBF6.js +19 -0
  244. package/dist/chunks/store-training-models-6BA43IPP.js +49 -0
  245. package/dist/chunks/store-usage-IE2U2FD3.js +63 -0
  246. package/dist/chunks/store-work-evidence-QQDKM5AQ.js +8 -0
  247. package/dist/chunks/taskset-EQRFQBYM.js +2 -0
  248. package/dist/chunks/taskset-packages-XC6HEE3K.js +2 -0
  249. package/dist/chunks/{teams-bot-H7XT23XB.js → teams-bot-EAPGPTHZ.js} +1 -1
  250. package/dist/chunks/training-UF6RPI4T.js +2 -0
  251. package/dist/chunks/web-search-CZ3NCLPY.js +2 -0
  252. package/dist/chunks/workspaces-EKKE5NAC.js +2 -0
  253. package/dist/cli.js +1 -1
  254. package/dist/index.js +1 -1
  255. package/dist/web/assets/{App-CTlAPuCY.css → App-CaRMZoxo.css} +1 -1
  256. package/dist/web/assets/App-s-CJswyt.js +154 -0
  257. package/dist/web/assets/{AppDialog-CPHTPqrx.js → AppDialog-t2Fx5tK3.js} +1 -1
  258. package/dist/web/assets/{AppTerminalPanel-BVj5Tj93.js → AppTerminalPanel-Dj1Y32oI.js} +2 -2
  259. package/dist/web/assets/{AppsView-O69zEBY3.js → AppsView-BYE5EBDJ.js} +1 -1
  260. package/dist/web/assets/{BrowserSidebar-Pr_Kpe8p.js → BrowserSidebar-jhWi4rVm.js} +1 -1
  261. package/dist/web/assets/{CartesianChart-JPqo6YOf.js → CartesianChart-C1DIx0Ia.js} +1 -1
  262. package/dist/web/assets/{CollaborationTabs-CAJcQFn2.js → CollaborationTabs-Bdr-HmOL.js} +1 -1
  263. package/dist/web/assets/{CommandMenu-B-w53n9A.js → CommandMenu-Ux2yOHAc.js} +1 -1
  264. package/dist/web/assets/{CommunityView-DbZKK8_P.js → CommunityView-DPEeVKFn.js} +1 -1
  265. package/dist/web/assets/{ComposerCreateImproveStrip-3_083PF4.js → ComposerCreateImproveStrip-CEgh4OtN.js} +1 -1
  266. package/dist/web/assets/{GetStartedView-D7JGm_6c.js → GetStartedView-CFHP0AaI.js} +1 -1
  267. package/dist/web/assets/{HostedModelLearningReview-DwgMfZ7_.js → HostedModelLearningReview-D8BGTPVN.js} +1 -1
  268. package/dist/web/assets/{HostedModelLearningSettings-JRfQadRl.js → HostedModelLearningSettings-JS1S7vNO.js} +1 -1
  269. package/dist/web/assets/{LabModelVersionDetailPage-BUYflJY_.js → LabModelVersionDetailPage-Dx5Q3xV2.js} +1 -1
  270. package/dist/web/assets/{LabSkillSidebar-BBiqk7Rf.js → LabSkillSidebar-BxffN-pN.js} +1 -1
  271. package/dist/web/assets/{LabsRoute-Ci6vUnSd.js → LabsRoute-CyYF8-dw.js} +4 -4
  272. package/dist/web/assets/{MainChatThread-BQK3oI2N.js → MainChatThread-DZpcFRFl.js} +2 -2
  273. package/dist/web/assets/MainPane-5DTtwVCk.js +65 -0
  274. package/dist/web/assets/MainPane-BIM_UJ3q.css +1 -0
  275. package/dist/web/assets/{MarkdownText-DOdOVFXL.js → MarkdownText-BR4V6lNO.js} +21 -21
  276. package/dist/web/assets/{NativeSkillSidebar-CRI_ri8z.js → NativeSkillSidebar-DU9IEgIO.js} +1 -1
  277. package/dist/web/assets/{NewExperienceSwitcher-DhYtfE68.js → NewExperienceSwitcher-mIy6FzCj.js} +1 -1
  278. package/dist/web/assets/{NewProjectDialog-D8sy1gOz.js → NewProjectDialog-RfTZTHxl.js} +1 -1
  279. package/dist/web/assets/{OutputsPage-CbWgrhXA.js → OutputsPage-Cr1Spf7S.js} +1 -1
  280. package/dist/web/assets/{ProjectsPage-DLB67lyA.js → ProjectsPage-CE6QUB-b.js} +1 -1
  281. package/dist/web/assets/{RightChatPanelStack-ozSKnDyX.js → RightChatPanelStack-T6VRWuHo.js} +1 -1
  282. package/dist/web/assets/RightSidebarHomePanel-CK0rP3WT.js +1 -0
  283. package/dist/web/assets/{ScheduledWorkPage-Cafv_QnR.js → ScheduledWorkPage-vOrYv8pp.js} +1 -1
  284. package/dist/web/assets/SettingsView-DCKVrfjj.js +5 -0
  285. package/dist/web/assets/SettingsView-Dulr_xlq.css +1 -0
  286. package/dist/web/assets/{TeamChatView-vIrmXOY_.js → TeamChatView-Bwrjr-vk.js} +2 -2
  287. package/dist/web/assets/{TerminalOverlay-CAmF__Dq.js → TerminalOverlay-DhPoKZAq.js} +1 -1
  288. package/dist/web/assets/TrainingCreationPanel-BXHfohNm.js +1 -0
  289. package/dist/web/assets/{TrainingDraftPanel-D7XZePAk.js → TrainingDraftPanel-C9cRX5qf.js} +1 -1
  290. package/dist/web/assets/{UsageSettingsSection-CYTmp7PG.js → UsageSettingsSection-CrdcSGeW.js} +1 -1
  291. package/dist/web/assets/WorkSidebarPanel-DSSikNFQ.js +1 -0
  292. package/dist/web/assets/{WorkspaceDiffPanel-DQGoIjH9.js → WorkspaceDiffPanel-BAFo0CPN.js} +6 -6
  293. package/dist/web/assets/{WorkspaceEnvironmentMenu-c1pHDskn.js → WorkspaceEnvironmentMenu-BVHAhwnJ.js} +1 -1
  294. package/dist/web/assets/WorkspaceGitDialogs-CwVoiDQ2.js +1 -0
  295. package/dist/web/assets/{WorkspaceMonacoEditor-BCKzvSj2.js → WorkspaceMonacoEditor-TxLyhzNp.js} +3 -3
  296. package/dist/web/assets/{arrow-up-right-CP4hZdrJ.js → arrow-up-right-C9aE8Mfz.js} +1 -1
  297. package/dist/web/assets/{chunk-NOJECMB7-Bhcms-w5.js → chunk-P3BRSSRD-DUGfuKA8.js} +1 -1
  298. package/dist/web/assets/{clipboard-BgrXorn-.js → clipboard-Dk158Qp4.js} +1 -1
  299. package/dist/web/assets/{cloud-upload-B_zYztb6.js → cloud-upload-k9eqBsHr.js} +1 -1
  300. package/dist/web/assets/{cssMode-DanjGgA8.js → cssMode-CO35ARZp.js} +1 -1
  301. package/dist/web/assets/{folder-open-CdVKbtGq.js → folder-open-sYgceW_f.js} +1 -1
  302. package/dist/web/assets/{folder-plus-Cc5KElB6.js → folder-plus-CS0R49m9.js} +1 -1
  303. package/dist/web/assets/{git-commit-horizontal-CjGIIgRi.js → git-commit-horizontal-DrGxH2h4.js} +1 -1
  304. package/dist/web/assets/{htmlMode-DRGDF_UL.js → htmlMode-REMmzdfq.js} +1 -1
  305. package/dist/web/assets/index-3iPNbbER.css +1 -0
  306. package/dist/web/assets/{index-BE-wXZ5R.js → index-C8aCGagb.js} +2 -2
  307. package/dist/web/assets/{info-BLj0RvhA.js → info-DLdbiUrh.js} +1 -1
  308. package/dist/web/assets/{jsonMode-CCu0j2GD.js → jsonMode-KEdMfkIf.js} +1 -1
  309. package/dist/web/assets/{lspLanguageFeatures-s_Lhm7P6.js → lspLanguageFeatures-5KZwEoxW.js} +1 -1
  310. package/dist/web/assets/{minimize-2-Cyg_zD9z.js → minimize-2-CqcI4zcM.js} +1 -1
  311. package/dist/web/assets/{monaco.contribution-CY7mRgOB.js → monaco.contribution-BJGj65F9.js} +2 -2
  312. package/dist/web/assets/{monaco.contribution-CAzXvYkn.js → monaco.contribution-Cly9Wt7L.js} +2 -2
  313. package/dist/web/assets/{monaco.contribution-mUPNK9ra.js → monaco.contribution-DO10L0zW.js} +2 -2
  314. package/dist/web/assets/{monaco.contribution-aUeLcBEg.js → monaco.contribution-omszXBEj.js} +2 -2
  315. package/dist/web/assets/{monitor-DZvOs_wC.js → monitor-BFVCcbxp.js} +1 -1
  316. package/dist/web/assets/{play-BJPzemuY.js → play-C469pVZq.js} +1 -1
  317. package/dist/web/assets/{python-B_qnnVaG.js → python-Dw0YcVy9.js} +1 -1
  318. package/dist/web/assets/{save-BDy9tA3E.js → save-CtSjPydi.js} +1 -1
  319. package/dist/web/assets/{square-Cb2c5td4.js → square-BuImvLhT.js} +1 -1
  320. package/dist/web/assets/{toggleHighContrast-MhO1JLyR.js → toggleHighContrast-DjCO9lIP.js} +1 -1
  321. package/dist/web/assets/{tsMode-DfBXJb9V.js → tsMode-BAOnxKd6.js} +1 -1
  322. package/dist/web/assets/{upload-D56kThRh.js → upload-2JkFZo3h.js} +1 -1
  323. package/dist/web/assets/{useLocalAgentSchedules-DMnGfswi.js → useLocalAgentSchedules-BNqAisfS.js} +1 -1
  324. package/dist/web/assets/useProviderSettings-C4L4wDoh.js +5 -0
  325. package/dist/web/assets/{useProviderSettings-Bw-csWbH.css → useProviderSettings-CmL_BaxP.css} +1 -1
  326. package/dist/web/assets/{useSessionTurnCache-ClAY8gze.js → useSessionTurnCache-BHU2-Jmz.js} +1 -1
  327. package/dist/web/assets/{wifi-off-C9lWJmVm.js → wifi-off-CpOAH62M.js} +1 -1
  328. package/dist/web/assets/{workers-BYzrH8by.js → workers-0QvlA2T5.js} +1 -1
  329. package/dist/web/assets/{yaml-D3T8UkT3.js → yaml-BK3qxo7D.js} +1 -1
  330. package/dist/web/index.html +2 -2
  331. package/package.json +1 -1
  332. package/dist/chunks/actions-command-WTFZA7LF.js +0 -2
  333. package/dist/chunks/app-server-runtime-2RM3N4I6.js +0 -2
  334. package/dist/chunks/apps-KDNWYO3G.js +0 -2
  335. package/dist/chunks/chunk-2DFR7PJ4.js +0 -2460
  336. package/dist/chunks/chunk-4CRM2ADK.js +0 -2
  337. package/dist/chunks/chunk-55G6B54U.js +0 -6
  338. package/dist/chunks/chunk-73G5UYBB.js +0 -12
  339. package/dist/chunks/chunk-ARQEJOEK.js +0 -33
  340. package/dist/chunks/chunk-CGBI2VYJ.js +0 -2
  341. package/dist/chunks/chunk-GGIG3XU7.js +0 -3
  342. package/dist/chunks/chunk-JIMU3KDA.js +0 -24
  343. package/dist/chunks/chunk-JUJSA7KI.js +0 -22
  344. package/dist/chunks/chunk-K5SBVO3B.js +0 -195
  345. package/dist/chunks/chunk-KD3QVRIJ.js +0 -21
  346. package/dist/chunks/chunk-L4235TRQ.js +0 -140
  347. package/dist/chunks/chunk-MVF3F5QS.js +0 -2
  348. package/dist/chunks/chunk-OULAKUIN.js +0 -2
  349. package/dist/chunks/chunk-OWNLDB2O.js +0 -2
  350. package/dist/chunks/chunk-QDHMP5FS.js +0 -2
  351. package/dist/chunks/chunk-QKD5OMDI.js +0 -2
  352. package/dist/chunks/chunk-R2BSIRYL.js +0 -3
  353. package/dist/chunks/chunk-STDMBJOQ.js +0 -9
  354. package/dist/chunks/chunk-T4QGDQHP.js +0 -4
  355. package/dist/chunks/chunk-USMZT5FZ.js +0 -18
  356. package/dist/chunks/chunk-VJEZPDBS.js +0 -5
  357. package/dist/chunks/chunk-WDFLCNRC.js +0 -8
  358. package/dist/chunks/chunk-WZYRAR7X.js +0 -16
  359. package/dist/chunks/chunk-YDT7L3VZ.js +0 -24
  360. package/dist/chunks/chunk-YUPBAWBJ.js +0 -554
  361. package/dist/chunks/cli-465VC2WP.js +0 -2
  362. package/dist/chunks/configuration-command-LAAP2EXT.js +0 -2
  363. package/dist/chunks/connected-evidence-XM626247.js +0 -2
  364. package/dist/chunks/core-commands-W7EK552V.js +0 -2
  365. package/dist/chunks/datasets-QJWYTTQL.js +0 -2
  366. package/dist/chunks/desktop-test-3B2D34NF.js +0 -3
  367. package/dist/chunks/dist-HUAE2KFZ.js +0 -2
  368. package/dist/chunks/evaluation-coordination-2MONR4AX.js +0 -2
  369. package/dist/chunks/experiment-improvements-WVQ5FK46.js +0 -2
  370. package/dist/chunks/experiments-S5UQ32QB.js +0 -2
  371. package/dist/chunks/hosted-experiment-improvement-2OWOQLHC.js +0 -3
  372. package/dist/chunks/hosted-harness-runtime-TGFMAV7W.js +0 -2
  373. package/dist/chunks/hosted-profile-candidate-WQSI6HZO.js +0 -3
  374. package/dist/chunks/hosted-profile-compiler-Z2A4TEA6.js +0 -2
  375. package/dist/chunks/hosted-profile-evaluation-control-FKGARUEE.js +0 -2
  376. package/dist/chunks/hosted-profile-evaluation-inspection-QOY2JKV4.js +0 -3
  377. package/dist/chunks/hosted-profile-evaluation-preparation-WVP6CALP.js +0 -3
  378. package/dist/chunks/human-review-TGHQKXFZ.js +0 -2
  379. package/dist/chunks/import-4UE5XNSG.js +0 -4
  380. package/dist/chunks/learning-R2XBMMEM.js +0 -2
  381. package/dist/chunks/opchat-WULL6CUP.js +0 -3
  382. package/dist/chunks/organizations-I37HISVX.js +0 -2
  383. package/dist/chunks/project-agent-T6XKC54C.js +0 -2
  384. package/dist/chunks/sandbox-command-STB47FRY.js +0 -2
  385. package/dist/chunks/src-T3KWWCAH.js +0 -322
  386. package/dist/chunks/taskset-RNYDR4GS.js +0 -2
  387. package/dist/chunks/training-M6FAPRSJ.js +0 -2
  388. package/dist/chunks/workspaces-MFZ3OO6O.js +0 -2
  389. package/dist/web/assets/App-CLFfy_Av.js +0 -154
  390. package/dist/web/assets/MainPane-D3ojiN-p.js +0 -18
  391. package/dist/web/assets/MainPane-DOWsSew1.css +0 -1
  392. package/dist/web/assets/RightSidebarHomePanel-CKs3OwhD.js +0 -1
  393. package/dist/web/assets/SettingsView-BnANbPLS.css +0 -1
  394. package/dist/web/assets/SettingsView-T1vYDPjh.js +0 -5
  395. package/dist/web/assets/TrainingCreationPanel-D75K0yk5.js +0 -1
  396. package/dist/web/assets/WorkSidebarPanel-CODMjVHY.js +0 -1
  397. package/dist/web/assets/WorkspaceGitDialogs-DrVtapQQ.js +0 -1
  398. package/dist/web/assets/index-B5re-RJy.css +0 -1
  399. package/dist/web/assets/useProviderSettings-Bv5B9eNk.js +0 -5
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
3
- import{q as vt,r as St}from"./chunk-C6D4WAYN.js";import"./chunk-BFKYRQMA.js";import"./chunk-DLVPSCTB.js";import{Ya as yt,na as pe,oa as ht,qa as me}from"./chunk-JIMU3KDA.js";import"./chunk-6MI4KKWF.js";import"./chunk-QDHMP5FS.js";import"./chunk-YDT7L3VZ.js";import"./chunk-6FA3GG5B.js";import"./chunk-YR5ID2SS.js";import"./chunk-55G6B54U.js";import"./chunk-KD3QVRIJ.js";import"./chunk-ARQEJOEK.js";import{G as He,H as ee,J as pt,L as mt,O as ft,R as gt}from"./chunk-JUJSA7KI.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{f as dt,h as ct}from"./chunk-H7IWJN7L.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createInterface as oo}from"node:readline/promises";import{stdin as Fe,stdout as k}from"node:process";import{pathToFileURL as io}from"node:url";function ge(){return{text:"",cursor:0,history:[],historyIndex:null}}i(ge,"createComposer");function wt(e,t){let r=e.text.slice(0,e.cursor),n=e.text.slice(e.cursor);return{...e,text:`${r}${t}${n}`,cursor:e.cursor+t.length,historyIndex:null}}i(wt,"insertText");function fe(e,t){return{...e,text:t,cursor:t.length}}i(fe,"replaceComposerText");function Rr(e){let t=e.text.trim();return t?{state:{text:"",cursor:0,history:[...e.history.filter(r=>r!==t),t].slice(-100),historyIndex:null},action:{type:"submit",text:t}}:{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}}i(Rr,"submitComposer");function Tt(e,t){if(t==="ctrl+c")return{state:e,action:{type:"cancel-or-exit"}};if(t==="ctrl+d")return{state:e,action:e.text?{type:"none"}:{type:"exit"}};if(t==="ctrl+l")return{state:e,action:{type:"rerender"}};if(t==="enter")return Rr(e);if(t==="alt+enter")return{state:wt(e,`
3
+ import{q as vt,r as St}from"./chunk-UKMA4R6X.js";import{h as yt}from"./chunk-QOTVNQDI.js";import{i as pe,j as ht,l as me}from"./chunk-OQPJ7FJF.js";import"./chunk-WJ43MJ3F.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-BFKYRQMA.js";import"./chunk-6QSSIT62.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-I7AQMAQI.js";import{D as He,E as ee,G as pt,I as mt,L as ft,O as gt}from"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{f as dt,h as ct}from"./chunk-H7IWJN7L.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createInterface as oo}from"node:readline/promises";import{stdin as Fe,stdout as k}from"node:process";import{pathToFileURL as io}from"node:url";function ge(){return{text:"",cursor:0,history:[],historyIndex:null}}i(ge,"createComposer");function wt(e,t){let r=e.text.slice(0,e.cursor),n=e.text.slice(e.cursor);return{...e,text:`${r}${t}${n}`,cursor:e.cursor+t.length,historyIndex:null}}i(wt,"insertText");function fe(e,t){return{...e,text:t,cursor:t.length}}i(fe,"replaceComposerText");function Rr(e){let t=e.text.trim();return t?{state:{text:"",cursor:0,history:[...e.history.filter(r=>r!==t),t].slice(-100),historyIndex:null},action:{type:"submit",text:t}}:{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}}i(Rr,"submitComposer");function Tt(e,t){if(t==="ctrl+c")return{state:e,action:{type:"cancel-or-exit"}};if(t==="ctrl+d")return{state:e,action:e.text?{type:"none"}:{type:"exit"}};if(t==="ctrl+l")return{state:e,action:{type:"rerender"}};if(t==="enter")return Rr(e);if(t==="alt+enter")return{state:wt(e,`
4
4
  `),action:{type:"none"}};if(t==="backspace")return e.cursor<=0?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor-1)}${e.text.slice(e.cursor)}`,cursor:e.cursor-1},action:{type:"none"}};if(t==="delete")return e.cursor>=e.text.length?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor)}${e.text.slice(e.cursor+1)}`},action:{type:"none"}};if(t==="left")return{state:{...e,cursor:Math.max(0,e.cursor-1)},action:{type:"none"}};if(t==="right")return{state:{...e,cursor:Math.min(e.text.length,e.cursor+1)},action:{type:"none"}};if(t==="home"||t==="ctrl+a")return{state:{...e,cursor:0},action:{type:"none"}};if(t==="end"||t==="ctrl+e")return{state:{...e,cursor:e.text.length},action:{type:"none"}};if(t==="ctrl+u")return{state:{...e,text:e.text.slice(e.cursor),cursor:0},action:{type:"none"}};if(t==="ctrl+k")return{state:{...e,text:e.text.slice(0,e.cursor)},action:{type:"none"}};if(t==="up"){if(e.history.length===0)return{state:e,action:{type:"none"}};let r=e.historyIndex===null?e.history.length-1:Math.max(0,e.historyIndex-1);return{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}if(t==="down"){if(e.historyIndex===null)return{state:e,action:{type:"none"}};let r=e.historyIndex+1;return r>=e.history.length?{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}:{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}return t.length>0?{state:wt(e,t),action:{type:"none"}}:{state:e,action:{type:"none"}}}i(Tt,"handleComposerKey");var bt="A turn is already running. Wait for it to finish before sending another line.";function Mr(){let e=!1;return{isRunning(){return e},tryStartSubmission(){return e?!1:(e=!0,!0)},failSubmission(){e=!1},applyRuntimeEvent(t){t.name==="turn.started"&&(e=!0),(t.name==="turn.completed"||t.name==="turn.failed"||t.name==="turn.interrupted")&&(e=!1)}}}i(Mr,"createTerminalTurnSubmissionGuard");function Pt(){return Mr()}i(Pt,"createLineModeTurnGuard");var he=[{name:"help",usage:"/help",description:"show this help"},{name:"providers",usage:"/providers",description:"list providers"},{name:"provider",usage:"/provider [id]",description:"switch provider",requiresArgument:!0},{name:"model",usage:"/model [id]",description:"list or switch model"},{name:"apps",usage:"/apps",description:"list connectable apps"},{name:"install",usage:"/install <app>",description:"open app details",requiresArgument:!0},{name:"projects",usage:"/projects",description:"list projects"},{name:"project",usage:"/project <id>",description:"switch project",requiresArgument:!0},{name:"permissions",usage:"/permissions [ask|full-access]",description:"show or change command access"},{name:"profile",usage:"/profile [status|diff|catalog|check|push]",description:"show or sync profile"},{name:"agents",usage:"/agents",description:"list agents"},{name:"agent",usage:"/agent <id>",description:"select agent",requiresArgument:!0},{name:"run",usage:"/run <action> [json]",description:"run profile action",requiresArgument:!0},{name:"settings",usage:"/settings",description:"show settings"},{name:"logs",usage:"/logs",description:"show recent events"},{name:"compact",usage:"/compact",description:"compact current session"},{name:"clear",usage:"/clear",description:"clear terminal transcript"},{name:"exit",usage:"/exit",description:"exit"},{name:"hooks",usage:"/hooks",description:"show hook status"},{name:"start",usage:"/start",description:"start a new session"}];function ze(e){if(!e.startsWith("/"))return null;let[t="",...r]=e.slice(1).trim().split(/\s+/),n=t.toLowerCase();if(!n)return null;if(n==="exit"||n==="quit")return{type:"exit"};if(n==="help")return{type:"help"};if(n==="clear")return{type:"clear"};if(n==="agents")return{type:"agents"};if(n==="apps")return{type:"apps"};if(n==="agent")return{type:"agent",id:r.join(" ").trim()};if(n==="install")return{type:"install",id:r.join(" ").trim()};if(n==="projects")return{type:"projects"};if(n==="project")return{type:"project",id:r.join(" ").trim()};if(n==="model")return{type:"model",id:r.join(" ").trim()||null};if(n==="permissions")return{type:"permissions",args:r};if(n==="profile")return{type:"profile",args:r};if(n==="logs")return{type:"logs"};if(n==="providers")return{type:"providers"};if(n==="provider")return{type:"provider",id:r.join(" ").trim()||null};if(n==="compact")return{type:"compact"};if(n==="hooks")return{type:"hooks"};if(n==="start")return{type:"start"};if(n==="run"){let o=r[0]??"",s=r.slice(1).join(" ").trim();return s?{type:"run",action:o,input:JSON.parse(s)}:{type:"run",action:o,input:void 0}}return n==="settings"?{type:"settings",args:r}:{type:"unknown",command:n}}i(ze,"parseSlashCommand");function xt(e){let t=e.trim();if(!t.startsWith("!"))return null;let r=t.slice(1).trim();return r?{command:r}:null}i(xt,"parseDirectCommandPrompt");function Ct(){let e=Math.max(...he.map(t=>t.usage.length));return["Commands:",...he.map(t=>`${t.usage.padEnd(e+2)}${t.description}`)].join(`
5
5
  `)}i(Ct,"helpText");var ye=class{static{i(this,"RawInput")}input;onKey;previousRawMode=!1;dataHandler=null;constructor(t,r){this.input=t,this.onKey=r}start(){this.previousRawMode=this.input.isRaw??!1,this.input.setRawMode(!0),this.input.resume(),this.dataHandler=t=>{for(let r of Or(t))this.onKey(r)},this.input.on("data",this.dataHandler)}stop(){this.dataHandler&&this.input.off("data",this.dataHandler),this.dataHandler=null,this.input.setRawMode(this.previousRawMode),this.input.pause()}};function Or(e){let t=e.toString("utf8"),r=[];for(let n=0;n<t.length;n+=1){let o=t[n],s=t[n+1];if(o==="\x1B"){let a=jr(t,n);r.push(a.key),n=a.end;continue}o===""?r.push("ctrl+c"):o===""?r.push("ctrl+d"):o==="\f"?r.push("ctrl+l"):o===""?r.push("ctrl+a"):o===""?r.push("ctrl+e"):o==="\v"?r.push("ctrl+k"):o===""?r.push("ctrl+u"):o==="\x7F"||o==="\b"?r.push("backspace"):o==="\r"||o===`
6
6
  `?r.push("enter"):(o>=" "||o&&s)&&r.push(o)}return r}i(Or,"decodeKeys");function jr(e,t){let r=e.slice(t);return r.startsWith("\x1B\r")||r.startsWith(`\x1B
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{d as a}from"./chunk-F4KOGISR.js";import"./chunk-UCPGRPWY.js";import"./chunk-773TH7FN.js";import"./chunk-FUOEIDMA.js";import"./chunk-NHQ36THU.js";import"./chunk-QNG27G3T.js";import"./chunk-EIRYMSEG.js";import"./chunk-7ED24PP6.js";import"./chunk-RNIAFXMB.js";import"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-6QSSIT62.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-7E6T7GP5.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-I7AQMAQI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-FTQLQJQV.js";export{a as createStandaloneExperimentTurnOwner};
@@ -0,0 +1,18 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as o}from"./chunk-KCJVFLBB.js";import{a as i}from"./chunk-FTQLQJQV.js";var n=class extends o{static{i(this,"SqliteChatWorkflowStore")}async listChatWorkflows(t={}){return await this.ready,await this.writeQueue,(await this.all(`SELECT * FROM chat_workflows
3
+ ${t.sessionId?"WHERE session_id = ?":""}
4
+ ORDER BY created_at DESC`,t.sessionId?[t.sessionId]:[])).map(a=>JSON.parse(a.payload))}async listDueChatWorkflows(t,e=25){return await this.ready,await this.writeQueue,(await this.all(`SELECT * FROM chat_workflows
5
+ WHERE enabled = 1 AND next_run_at IS NOT NULL AND next_run_at <= ?
6
+ ORDER BY next_run_at ASC LIMIT ?`,[t,Math.max(1,Math.min(100,Math.trunc(e)))])).map(s=>JSON.parse(s.payload))}async getChatWorkflow(t){await this.ready,await this.writeQueue;let e=await this.get("SELECT * FROM chat_workflows WHERE id = ?",[t]);return e?JSON.parse(e.payload):null}async upsertChatWorkflow(t){await this.ready;let e=this.writeQueue.then(async()=>{await this.run(`INSERT INTO chat_workflows
7
+ (id, session_id, enabled, next_run_at, payload, created_at, updated_at)
8
+ VALUES (?, ?, ?, ?, ?, ?, ?)
9
+ ON CONFLICT(id) DO UPDATE SET
10
+ session_id = excluded.session_id,
11
+ enabled = excluded.enabled,
12
+ next_run_at = excluded.next_run_at,
13
+ payload = excluded.payload,
14
+ updated_at = excluded.updated_at`,[t.id,t.sessionId,t.enabled?1:0,t.nextRunAt,JSON.stringify(t),t.createdAt,t.updatedAt])});return this.writeQueue=e.catch(()=>{}),await e,await this.getChatWorkflow(t.id)??t}async patchChatWorkflow(t,e){await this.ready;let a=null,s=this.writeQueue.then(async()=>{let r=await this.get("SELECT * FROM chat_workflows WHERE id = ?",[t]);r&&(a=e(JSON.parse(r.payload)),await this.run("UPDATE chat_workflows SET enabled = ?, next_run_at = ?, payload = ?, updated_at = ? WHERE id = ?",[a.enabled?1:0,a.nextRunAt,JSON.stringify(a),a.updatedAt,t]))});return this.writeQueue=s.catch(()=>{}),await s,a}async deleteChatWorkflow(t){await this.ready;let e=!1,a=this.writeQueue.then(async()=>{await this.get("SELECT id FROM chat_workflows WHERE id = ?",[t])&&(await this.run("DELETE FROM chat_workflows WHERE id = ?",[t]),e=!0)});return this.writeQueue=a.catch(()=>{}),await a,e}async insertChatWorkflowRun(t){await this.ready;let e=this.writeQueue.then(async()=>{await this.run(`INSERT INTO chat_workflow_runs
15
+ (id, workflow_id, session_id, scheduled_for, trigger, status, payload, created_at, updated_at)
16
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,[t.id,t.workflowId,t.sessionId,t.scheduledFor,t.trigger,t.status,JSON.stringify(t),t.createdAt,t.updatedAt])});return this.writeQueue=e.catch(()=>{}),await e,t}async listChatWorkflowRuns(t,e=100){await this.ready,await this.writeQueue;let a=Math.max(1,Math.min(500,Math.trunc(e)));return(await this.all(`SELECT * FROM chat_workflow_runs
17
+ ${t?"WHERE workflow_id = ?":""}
18
+ ORDER BY created_at DESC LIMIT ?`,t?[t,a]:[a])).map(r=>JSON.parse(r.payload))}async patchChatWorkflowRun(t,e){await this.ready;let a=null,s=this.writeQueue.then(async()=>{let r=await this.get("SELECT * FROM chat_workflow_runs WHERE id = ?",[t]);r&&(a=e(JSON.parse(r.payload)),await this.run("UPDATE chat_workflow_runs SET status = ?, payload = ?, updated_at = ? WHERE id = ?",[a.status,JSON.stringify(a),a.updatedAt,t]))});return this.writeQueue=s.catch(()=>{}),await s,a}};export{n as SqliteChatWorkflowStore};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import"./chunk-QOTVNQDI.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WJ43MJ3F.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import{A as t,z as s}from"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import{a as r}from"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as n}from"./chunk-FTQLQJQV.js";var d=class extends r{static{n(this,"SqliteContinualBenchReviewStore")}async saveContinualLearningDailyBatch(i){let e=s.parse(i),a=await this.getContinualLearningDailyBatch(e.id);if(a&&(a.seriesId!==e.seriesId||a.scheduleEntryId!==e.scheduleEntryId||a.dayOrdinal!==e.dayOrdinal||JSON.stringify(a.sourceTaskset)!==JSON.stringify(e.sourceTaskset)||e.revision!==a.revision+1)){if(JSON.stringify(a)===JSON.stringify(e))return a;throw new Error("A daily learning batch update must preserve its intake identity and use the next revision.")}return await this.upsertPayload(`INSERT INTO continual_learning_daily_batches
3
+ (id, series_id, schedule_entry_id, day_ordinal, status, revision, payload, created_at, updated_at)
4
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
5
+ ON CONFLICT(id) DO UPDATE SET status = excluded.status, revision = excluded.revision, payload = excluded.payload, updated_at = excluded.updated_at`,[e.id,e.seriesId,e.scheduleEntryId,e.dayOrdinal,e.status,e.revision,JSON.stringify(e),e.createdAt,e.updatedAt]),e}async getContinualLearningDailyBatch(i){return this.getParsedPayload("SELECT payload FROM continual_learning_daily_batches WHERE id = ?",[i],s.parse)}async listContinualLearningDailyBatches(i={}){return i.seriesId?this.listParsedPayloads("SELECT payload FROM continual_learning_daily_batches WHERE series_id = ? ORDER BY day_ordinal ASC",[i.seriesId],s.parse):this.listParsedPayloads("SELECT payload FROM continual_learning_daily_batches ORDER BY series_id, day_ordinal ASC",[],s.parse)}async saveContinualBenchIssueReview(i){let e=t.parse(i),a=await this.getContinualBenchIssueReview(e.id);if(a&&(a.seriesId!==e.seriesId||a.passLabel!==e.passLabel||a.packet.contentHash!==e.packet.contentHash||e.revision!==a.revision+1)){if(JSON.stringify(a)===JSON.stringify(e))return a;throw new Error("A Continual Support review update must preserve its sealed packet and use the next revision.")}return await this.upsertPayload(`INSERT INTO continual_bench_issue_reviews (id, series_id, pass_label, status, revision, payload, created_at, updated_at)
6
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?)
7
+ ON CONFLICT(id) DO UPDATE SET status = excluded.status, revision = excluded.revision, payload = excluded.payload, updated_at = excluded.updated_at`,[e.id,e.seriesId,e.passLabel,e.status,e.revision,JSON.stringify(e),e.createdAt,e.updatedAt]),e}async getContinualBenchIssueReview(i){return this.getParsedPayload("SELECT payload FROM continual_bench_issue_reviews WHERE id = ?",[i],t.parse)}async listContinualBenchIssueReviews(i={}){return i.seriesId?this.listParsedPayloads("SELECT payload FROM continual_bench_issue_reviews WHERE series_id = ? ORDER BY updated_at DESC",[i.seriesId],t.parse):this.listParsedPayloads("SELECT payload FROM continual_bench_issue_reviews ORDER BY updated_at DESC",[],t.parse)}};export{d as SqliteContinualBenchReviewStore};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as s,b as o}from"./chunk-YOQRYNLP.js";import"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-4EPSHPZL.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as l}from"./chunk-FTQLQJQV.js";var T=class extends u{static{l(this,"SqliteConversationServingStore")}conversationTables=null;async ensureConversationTables(){if(await this.ready,!this.conversationTables){let e=this.writeQueue.then(async()=>{await this.exec("CREATE TABLE IF NOT EXISTS conversation_serving_grants (id TEXT PRIMARY KEY, revision INTEGER NOT NULL, payload TEXT NOT NULL)"),await this.exec("CREATE TABLE IF NOT EXISTS conversation_serving_executions (id TEXT PRIMARY KEY, grant_id TEXT NOT NULL, revision INTEGER NOT NULL, payload TEXT NOT NULL)")});this.writeQueue=e.catch(()=>{}),this.conversationTables=e}await this.conversationTables}async listConversationServingGrants(){return await this.ensureConversationTables(),await this.writeQueue,(await this.all("SELECT payload FROM conversation_serving_grants ORDER BY id",[])).map(e=>s.parse(JSON.parse(e.payload)))}async listConversationServingExecutions(e){return await this.ensureConversationTables(),await this.writeQueue,(await this.all("SELECT payload FROM conversation_serving_executions WHERE grant_id = ? ORDER BY id",[e])).map(i=>o.parse(JSON.parse(i.payload)))}async saveConversationServingGrant(e,i){let n=s.parse(e);return await this.saveConversationServingRow("conversation_serving_grants",n.id,n.revision,n,i),n}async saveConversationServingExecution(e,i){let n=o.parse(e);return await this.saveConversationServingRow("conversation_serving_executions",n.id,n.revision,n,i,n.grantId),n}async saveConversationServingRow(e,i,n,t,v,c){if(n!==v+1)throw new Error("Conversation serving revision is invalid.");await this.ensureConversationTables();let d=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{let r=await this.get(`SELECT revision, payload FROM ${e} WHERE id = ?`,[i]);if((r?.revision??0)!==v)throw new Error("Conversation serving authority changed.");if(r){let a=JSON.parse(r.payload),g=t;if((e==="conversation_serving_grants"?["id","ownerInstanceId","teamId","profileId","projectId","hostedModelId","role","roleTargetId"]:["id","grantId","jobId","artifactHash","priorBindingId","leaseId","canarySeconds","createdAt"]).some(E=>a[E]!==g[E]))throw new Error("The retained serving identity cannot be replaced.")}if(e==="conversation_serving_grants"){let a=s.parse(t);if(a.enabled&&await this.get("SELECT id FROM conversation_serving_grants WHERE id != ? AND json_extract(payload, '$.enabled') = 1 AND json_extract(payload, '$.profileId') = ? AND json_extract(payload, '$.role') = ? AND json_extract(payload, '$.roleTargetId') = ? LIMIT 1",[i,a.profileId,a.role,a.roleTargetId]))throw new Error("This native serving target already has an enabled owner grant. Revoke it before registering another.")}r?await this.run(`UPDATE ${e} SET revision = ?, payload = ? WHERE id = ?`,[n,JSON.stringify(t),i]):c?await this.run(`INSERT INTO ${e} (id, grant_id, revision, payload) VALUES (?, ?, ?, ?)`,[i,c,n,JSON.stringify(t)]):await this.run(`INSERT INTO ${e} (id, revision, payload) VALUES (?, ?, ?)`,[i,n,JSON.stringify(t)]),await this.exec("COMMIT")}catch(r){throw await this.exec("ROLLBACK").catch(()=>{}),r}});this.writeQueue=d.catch(()=>{}),await d}};export{T as SqliteConversationServingStore};
@@ -0,0 +1,40 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import"./chunk-QOTVNQDI.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WJ43MJ3F.js";import{h as d}from"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import{a as c}from"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as p}from"./chunk-FTQLQJQV.js";var l=class extends c{static{p(this,"SqliteCreateImproveStore")}async getCreateImproveRun(e){await this.ready,await this.writeQueue;let t=await this.get("SELECT payload FROM create_improve_runs WHERE id = ?",[e]);return t?d.parse(JSON.parse(t.payload)):null}async listCreateImproveRuns(e={}){await this.ready,await this.writeQueue;let t=[],a=[];e.profileId&&(t.push("profile_id = ?"),a.push(e.profileId)),e.conversationId&&(t.push("conversation_id = ?"),a.push(e.conversationId)),e.targetKind&&(t.push("target_kind = ?"),a.push(e.targetKind)),e.targetId&&(t.push("target_id = ?"),a.push(e.targetId));let o=Array.isArray(e.state)?e.state:e.state?[e.state]:[];o.length>0&&(t.push(`state IN (${o.map(()=>"?").join(", ")})`),a.push(...o));let s=Math.max(1,Math.min(1e3,Math.trunc(e.limit??250)));return a.push(s),(await this.all(`SELECT payload
3
+ FROM create_improve_runs
4
+ ${t.length>0?`WHERE ${t.join(" AND ")}`:""}
5
+ ORDER BY updated_at DESC
6
+ LIMIT ?`,a)).map(n=>d.parse(JSON.parse(n.payload)))}async upsertCreateImproveRun(e){await this.ready;let t=d.parse(e),a=this.writeQueue.then(async()=>{let o=await this.get("SELECT revision FROM create_improve_runs WHERE id = ?",[t.id]);if(o&&o.revision>t.revision)throw new Error(`Create/Improve run ${t.id} is already at revision ${o.revision}; refusing revision ${t.revision}.`);await this.assertNoCompetingCreateImproveRun(t),await this.run(`INSERT INTO create_improve_runs (
7
+ id, profile_id, conversation_id, origin_turn_id, target_kind, target_id,
8
+ state, revision, payload, created_at, updated_at
9
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
10
+ ON CONFLICT(id) DO UPDATE SET
11
+ profile_id = excluded.profile_id,
12
+ conversation_id = excluded.conversation_id,
13
+ origin_turn_id = excluded.origin_turn_id,
14
+ target_kind = excluded.target_kind,
15
+ target_id = excluded.target_id,
16
+ state = excluded.state,
17
+ revision = excluded.revision,
18
+ payload = excluded.payload,
19
+ updated_at = excluded.updated_at`,m(t))});return this.writeQueue=a.catch(()=>{}),await a,t}async mutateCreateImproveRun(e,t){await this.ready;let a=null,o=this.writeQueue.then(async()=>{let s=await this.get("SELECT payload FROM create_improve_run_actions WHERE action_id = ?",[e.actionId]);if(s){a={run:d.parse(JSON.parse(s.payload)),replayed:!0};return}let u=await this.get("SELECT revision, payload FROM create_improve_runs WHERE id = ?",[e.runId]);if(!u)throw new Error(`Create/Improve run not found: ${e.runId}`);let n=d.parse(JSON.parse(u.payload));if(n.revision!==e.expectedRevision)throw new Error(`Create/Improve run ${e.runId} changed from revision ${e.expectedRevision} to ${n.revision}. Refresh and try again.`);let i=d.parse(t(n));if(i.id!==n.id)throw new Error("Create/Improve mutation cannot change the run id.");if(i.revision!==n.revision+1)throw new Error("Create/Improve mutation must advance exactly one revision.");if(!i.appliedActionIds.includes(e.actionId))throw new Error("Create/Improve mutation must record its action id.");await this.assertNoCompetingCreateImproveRun(i),await this.exec("BEGIN IMMEDIATE");try{await this.run(`UPDATE create_improve_runs SET
20
+ profile_id = ?, conversation_id = ?, origin_turn_id = ?, target_kind = ?,
21
+ target_id = ?, state = ?, revision = ?, payload = ?, updated_at = ?
22
+ WHERE id = ? AND revision = ?`,[i.scope.profileId,i.scope.conversationId,i.scope.originTurnId,i.target.kind,i.target.id,i.state,i.revision,JSON.stringify(i),i.updatedAt,i.id,n.revision]),await this.run(`INSERT INTO create_improve_run_actions (
23
+ action_id, run_id, expected_revision, resulting_revision, payload, created_at
24
+ ) VALUES (?, ?, ?, ?, ?, ?)`,[e.actionId,e.runId,e.expectedRevision,i.revision,JSON.stringify(i),i.updatedAt]),await this.exec("COMMIT")}catch(v){throw await this.exec("ROLLBACK").catch(()=>{}),v}a={run:i,replayed:!1}});if(this.writeQueue=o.catch(()=>{}),await o,!a)throw new Error(`Create/Improve mutation failed: ${e.actionId}`);return a}async assertNoCompetingCreateImproveRun(e){if(!e.target.id||I(e.state))return;let t=await this.get(`SELECT id
25
+ FROM create_improve_runs
26
+ WHERE profile_id = ?
27
+ AND target_kind = ?
28
+ AND target_id = ?
29
+ AND id <> ?
30
+ AND state NOT IN (
31
+ 'released',
32
+ 'rejected',
33
+ 'ready',
34
+ 'ready_local',
35
+ 'published_hosted',
36
+ 'blocked',
37
+ 'failed',
38
+ 'cancelled'
39
+ )
40
+ LIMIT 1`,[e.scope.profileId,e.target.kind,e.target.id,e.id]);if(t)throw new Error(`Workproduct ${e.target.kind}:${e.target.id} already has active Create/Improve run ${t.id}.`)}};function m(r){return[r.id,r.scope.profileId,r.scope.conversationId,r.scope.originTurnId,r.target.kind,r.target.id,r.state,r.revision,JSON.stringify(r),r.createdAt,r.updatedAt]}p(m,"createImproveRunParams");function I(r){return r==="released"||r==="rejected"||r==="ready"||r==="ready_local"||r==="published_hosted"||r==="blocked"||r==="failed"||r==="cancelled"}p(I,"isTerminalCreateImproveRunState");export{l as SqliteCreateImproveStore};
@@ -0,0 +1,86 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{d as l}from"./chunk-KG325WTN.js";import"./chunk-QOTVNQDI.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WJ43MJ3F.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import{d as i}from"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import{o as r,w as o}from"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as n}from"./chunk-FTQLQJQV.js";var c=class extends u{static{n(this,"SqliteDatasetStore")}async listDatasetCatalogTasksets(e){return await this.ready,await this.writeQueue,(await this.all(`SELECT
3
+ id AS taskset_id,
4
+ CAST(json_extract(payload, '$.revision') AS INTEGER) AS taskset_revision,
5
+ json_extract(payload, '$.datasetArtifact.id') AS artifact_id,
6
+ json_extract(payload, '$.name') AS name,
7
+ status,
8
+ CASE
9
+ WHEN json_type(payload, '$.datasetArtifact') = 'object'
10
+ THEN 'parquet'
11
+ ELSE 'inline'
12
+ END AS storage_kind,
13
+ CAST(COALESCE(
14
+ json_extract(payload, '$.datasetArtifact.rowCount'),
15
+ json_array_length(payload, '$.tasks'),
16
+ 0
17
+ ) AS INTEGER) AS row_count,
18
+ CAST(COALESCE(
19
+ json_extract(payload, '$.datasetArtifact.splitCounts.train'),
20
+ (SELECT COUNT(*) FROM json_each(tasksets.payload, '$.tasks')
21
+ WHERE json_extract(value, '$.split') = 'train'),
22
+ 0
23
+ ) AS INTEGER) AS train_count,
24
+ CAST(COALESCE(
25
+ json_extract(payload, '$.datasetArtifact.splitCounts.validation'),
26
+ (SELECT COUNT(*) FROM json_each(tasksets.payload, '$.tasks')
27
+ WHERE json_extract(value, '$.split') = 'validation'),
28
+ 0
29
+ ) AS INTEGER) AS validation_count,
30
+ CAST(COALESCE(
31
+ json_extract(payload, '$.datasetArtifact.splitCounts.test'),
32
+ (SELECT COUNT(*) FROM json_each(tasksets.payload, '$.tasks')
33
+ WHERE json_extract(value, '$.split') = 'test'),
34
+ 0
35
+ ) AS INTEGER) AS test_count,
36
+ CAST(COALESCE(
37
+ json_extract(payload, '$.datasetArtifact.splitCounts.frozen_eval'),
38
+ (SELECT COUNT(*) FROM json_each(tasksets.payload, '$.tasks')
39
+ WHERE json_extract(value, '$.split') = 'frozen_eval'),
40
+ 0
41
+ ) AS INTEGER) AS frozen_eval_count,
42
+ created_at,
43
+ updated_at
44
+ FROM tasksets
45
+ WHERE profile_id = ?
46
+ ORDER BY updated_at DESC`,[e])).map(a=>({tasksetId:a.taskset_id,tasksetRevision:a.taskset_revision,artifactId:a.artifact_id,name:a.name,status:a.status,storageKind:a.storage_kind,rowCount:a.row_count,splitCounts:{train:a.train_count,validation:a.validation_count,test:a.test_count,frozen_eval:a.frozen_eval_count},createdAt:a.created_at,updatedAt:a.updated_at}))}async listExternalDatasetSources(e){return await this.ready,await this.writeQueue,(await this.all("SELECT payload FROM training_sources WHERE profile_id = ? AND source_kind <> 'conversation' ORDER BY updated_at DESC",[e])).map(a=>o.parse(JSON.parse(a.payload)))}async getExternalDatasetSource(e){await this.ready,await this.writeQueue;let t=await this.get("SELECT payload FROM training_sources WHERE id = ? AND source_kind <> 'conversation'",[e]);return t?o.parse(JSON.parse(t.payload)):null}async upsertExternalDatasetSource(e){let t=o.parse(e);await this.ready;let a=l(),s=t.kind==="huggingface"?t.repositoryId:null,p=t.kind==="huggingface"?t.revision:null,d=this.writeQueue.then(()=>this.run(`INSERT INTO training_sources (
47
+ id, profile_id, source_kind, session_id, source_hash,
48
+ repository_id, revision, payload, created_at, updated_at
49
+ )
50
+ VALUES (?, ?, ?, NULL, ?, ?, ?, ?, ?, ?)
51
+ ON CONFLICT(id) DO UPDATE SET
52
+ profile_id = excluded.profile_id,
53
+ source_kind = excluded.source_kind,
54
+ session_id = NULL,
55
+ source_hash = excluded.source_hash,
56
+ repository_id = excluded.repository_id,
57
+ revision = excluded.revision,
58
+ payload = excluded.payload,
59
+ updated_at = excluded.updated_at`,[t.id,t.profileId,t.kind,t.sourceHash,s,p,JSON.stringify(t),a,a]));return this.writeQueue=d.catch(()=>{}),await d,t}async listDatasetImportJobs(e){return this.listParsedPayloads("SELECT payload FROM dataset_import_jobs WHERE profile_id = ? ORDER BY updated_at DESC",[e],i.parse)}async listAllDatasetImportJobs(){return this.listParsedPayloads("SELECT payload FROM dataset_import_jobs ORDER BY updated_at DESC",[],i.parse)}async getDatasetImportJob(e){return this.getParsedPayload("SELECT payload FROM dataset_import_jobs WHERE id = ?",[e],i.parse)}async upsertDatasetImportJob(e){let t=i.parse(e),a=t.locator?.repositoryId??null,s=t.inspection?.resolvedRevision??t.locator?.requestedRevision??null;return await this.upsertPayload(`INSERT INTO dataset_import_jobs (
60
+ id, profile_id, source_kind, status, repository_id, revision,
61
+ taskset_id, payload, created_at, updated_at
62
+ )
63
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
64
+ ON CONFLICT(id) DO UPDATE SET
65
+ profile_id = excluded.profile_id,
66
+ source_kind = excluded.source_kind,
67
+ status = excluded.status,
68
+ repository_id = excluded.repository_id,
69
+ revision = excluded.revision,
70
+ taskset_id = excluded.taskset_id,
71
+ payload = excluded.payload,
72
+ updated_at = excluded.updated_at`,[t.id,t.profileId,t.sourceKind,t.status,a,s,t.tasksetId,JSON.stringify(t),t.createdAt,t.updatedAt]),t}async listDatasetArtifactRegistryEntries(e){return this.listParsedPayloads("SELECT payload FROM dataset_artifacts WHERE profile_id = ? ORDER BY updated_at DESC",[e],r.parse)}async getDatasetArtifactRegistryEntry(e){return this.getParsedPayload("SELECT payload FROM dataset_artifacts WHERE id = ?",[e],r.parse)}async getDatasetArtifactForTaskset(e,t){let a=t?[e,t]:[e],s=t?"SELECT payload FROM dataset_artifacts WHERE taskset_id = ? AND taskset_revision = ?":"SELECT payload FROM dataset_artifacts WHERE taskset_id = ? ORDER BY taskset_revision DESC LIMIT 1";return this.getParsedPayload(s,a,r.parse)}async upsertDatasetArtifactRegistryEntry(e){let t=r.parse(e),a=t.manifest;return await this.upsertPayload(`INSERT INTO dataset_artifacts (
73
+ id, profile_id, taskset_id, taskset_revision, content_hash,
74
+ format, row_count, storage_root, payload, created_at, updated_at
75
+ )
76
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
77
+ ON CONFLICT(id) DO UPDATE SET
78
+ profile_id = excluded.profile_id,
79
+ taskset_id = excluded.taskset_id,
80
+ taskset_revision = excluded.taskset_revision,
81
+ content_hash = excluded.content_hash,
82
+ format = excluded.format,
83
+ row_count = excluded.row_count,
84
+ storage_root = excluded.storage_root,
85
+ payload = excluded.payload,
86
+ updated_at = excluded.updated_at`,[a.id,t.profileId,a.tasksetId,a.tasksetRevision,a.contentHash,a.format,a.rowCount,t.storageRoot,JSON.stringify(t),t.createdAt,t.updatedAt]),t}};export{c as SqliteDatasetStore};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as m}from"./chunk-O6ULLQJ6.js";import"./chunk-QOTVNQDI.js";import"./chunk-OQPJ7FJF.js";import{o as f}from"./chunk-WJ43MJ3F.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import{a as k}from"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import{Hb as E,Ib as O,O as v,Ob as h,Pb as C,Q as y,f as R,h as p,m as H}from"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import{C as _,w as P}from"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import{m as s,n as c}from"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as g}from"./chunk-FTQLQJQV.js";var w=class extends k{static{g(this,"SqliteEvaluationResultStore")}async saveProfileEvaluationGrade(a){let e=P.parse(a);c(e,"Profile evaluation grade");let n=await this.getProfileEvaluationGrade(e.contentHash);return n||(await this.upsertPayload("INSERT INTO profile_evaluation_grades (content_hash, payload) VALUES (?, ?) ON CONFLICT(content_hash) DO NOTHING",[e.contentHash,JSON.stringify(e)]),e)}async getProfileEvaluationGrade(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_grades WHERE content_hash = ?",[a],P.parse)}async saveProfileEvaluationReceipt(a){let e=R.parse(a);H(e);let n=await this.getProfileEvaluationReceipt(e.id);if(n){if(n.contentHash!==e.contentHash)throw new Error(`Profile evaluation receipt ${e.id} is immutable.`);return n}return await this.upsertPayload("INSERT INTO profile_evaluation_receipts (id, run_id, payload) VALUES (?, ?, ?)",[e.id,e.runManifest.id,JSON.stringify(e)]),e}async getProfileEvaluationReceipt(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_receipts WHERE id = ?",[a],R.parse)}async saveProfileEvaluationRun(a){let e=m.parse(a);c(e,"Profile evaluation run"),c(e.manifest,"Profile evaluation run manifest"),_(e.metric);let n=e.manifest.profileEvaluation;if(!n||n.profileId!==e.profileRef.profileId||e.metric.runManifest.id!==e.manifest.id||e.metric.runManifest.contentHash!==e.manifest.contentHash||s(e.receiptRefs)!==s(e.metric.receiptRefs))throw new Error("Profile evaluation run differs from its manifest or metric receipts.");if(e.receiptRefs.length!==e.manifest.population.length||e.gradeRefs.length!==e.receiptRefs.length)throw new Error("Profile evaluation run has an incomplete receipt or grade population.");for(let[t,u]of e.manifest.population.entries()){let d=e.receiptRefs[t],r=await this.getProfileEvaluationReceipt(d.id);if(!r||r.contentHash!==d.contentHash||r.runManifest.id!==e.manifest.id||r.runManifest.contentHash!==e.manifest.contentHash||r.id!==u.receiptId||r.taskId!==u.taskId||r.seed!==u.seed)throw new Error("Profile evaluation run references a missing or mismatched receipt.");let l=e.gradeRefs[t],o=await this.getProfileEvaluationGrade(l.contentHash);if(!o||o.contentHash!==l.contentHash||!r.graderEvidenceRefs.some(S=>S.id===l.id&&S.contentHash===l.contentHash))throw new Error("Profile evaluation run references a missing or mismatched grade.")}let i=await this.getProfileEvaluationRun(e.manifest.id);if(i){if(i.contentHash!==e.contentHash)throw new Error(`Profile evaluation run ${e.manifest.id} is immutable.`);return i}return await this.upsertPayload("INSERT INTO profile_evaluation_runs (id, profile_key, taskset_id, payload, created_at) VALUES (?, ?, ?, ?, ?)",[e.manifest.id,s(e.profileRef),e.manifest.tasksetRelease.id,JSON.stringify(e),e.completedAt]),e}async getProfileEvaluationRun(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_runs WHERE id = ?",[a],m.parse)}async listProfileEvaluationRuns(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_runs WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],m.parse)}async saveProfileEvaluationComparison(a,e){let n=f.parse(a),i=E.parse(e);c(i,"Profile evaluation comparison");let t=[];for(let d of i.members){let r=await this.getProfileEvaluationRun(d.runManifest.id);if(!r||s(r.profileRef)!==s(n)||r.manifest.contentHash!==d.runManifest.contentHash||r.metric.contentHash!==d.metricResultHash)throw new Error("Profile evaluation comparison references a missing or mismatched run.");t.push({manifest:r.manifest,result:r.metric})}if(O({id:i.id,members:t,createdAt:i.createdAt}).contentHash!==i.contentHash)throw new Error("Profile evaluation comparison differs from retained run evidence.");let u=await this.getProfileEvaluationComparison(i.id);if(u){if(u.contentHash!==i.contentHash)throw new Error(`Profile evaluation comparison ${i.id} is immutable.`);return u}return await this.upsertPayload("INSERT INTO profile_evaluation_comparisons (id, profile_key, payload, created_at) VALUES (?, ?, ?, ?)",[i.id,s(n),JSON.stringify(i),i.createdAt]),i}async getProfileEvaluationComparison(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_comparisons WHERE id = ?",[a],E.parse)}async listProfileEvaluationComparisons(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_comparisons WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],E.parse)}async saveProfileEvaluationSuiteRun(a,e,n){let i=f.parse(a),t=h.parse(n);c(t,"Profile evaluation suite run");let u=[];for(let l of t.members){let o=await this.getProfileEvaluationRun(l.runManifest.id);if(!o||s(o.profileRef)!==s(i)||o.manifest.contentHash!==l.runManifest.contentHash||o.contentHash!==l.runHash||o.passed!==l.passed||o.metric.value!==l.score)throw new Error("Profile evaluation suite references a missing or mismatched run.");u.push({definitionId:l.definitionId,manifest:o.manifest,runHash:o.contentHash,passed:o.passed,score:o.metric.value})}if(C({id:t.id,suiteId:t.suiteId,catalog:e,members:u,createdAt:t.createdAt,completedAt:t.completedAt}).contentHash!==t.contentHash)throw new Error("Profile evaluation suite differs from retained run evidence.");let r=await this.getProfileEvaluationSuiteRun(t.id);if(r){if(r.contentHash!==t.contentHash)throw new Error(`Profile evaluation suite run ${t.id} is immutable.`);return r}return await this.upsertPayload("INSERT INTO profile_evaluation_suite_runs (id, profile_key, payload, created_at) VALUES (?, ?, ?, ?)",[t.id,s(i),JSON.stringify(t),t.createdAt]),t}async getProfileEvaluationSuiteRun(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_suite_runs WHERE id = ?",[a],h.parse)}async listProfileEvaluationSuiteRuns(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_suite_runs WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],h.parse)}async saveBenchmarkRun(a){let e=v.parse(a.run);return c(e,"Benchmark run"),await this.upsertPayload(`INSERT INTO benchmark_runs (id, taskset_id, phase, payload, created_at)
3
+ VALUES (?, ?, ?, ?, ?)
4
+ ON CONFLICT(id) DO NOTHING`,[e.id,a.tasksetId,e.phase,JSON.stringify(e),e.createdAt]),e}async listBenchmarkRuns(a){return this.listParsedPayloads("SELECT payload FROM benchmark_runs WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",[a],v.parse)}async saveBenchmarkComparison(a){let e=y.parse(a.comparison);return c(e,"Benchmark comparison"),await this.upsertPayload(`INSERT INTO benchmark_comparisons (id, taskset_id, payload, created_at)
5
+ VALUES (?, ?, ?, ?)
6
+ ON CONFLICT(id) DO NOTHING`,[e.id,a.tasksetId,JSON.stringify(e),e.createdAt]),e}async listBenchmarkComparisons(a){return this.listParsedPayloads("SELECT payload FROM benchmark_comparisons WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",[a],y.parse)}async saveEvaluationResult(a){let e=p.parse(a.result);if(c(e,"Evaluation result"),e.metadata.sourceTasksetId!==a.tasksetId)throw new Error("Evaluation result does not match the supplied Taskset identity.");let n=await this.getEvaluationResult(e.id);if(n){if(n.contentHash!==e.contentHash)throw new Error(`Evaluation result ${e.id} is immutable and already has another content hash.`);return n}return await this.upsertPayload(`INSERT INTO evaluation_results (id, taskset_id, kind, payload, created_at)
7
+ VALUES (?, ?, ?, ?, ?)`,[e.id,a.tasksetId,a.kind,JSON.stringify(e),a.createdAt]),e}async getEvaluationResult(a){return this.getParsedPayload("SELECT payload FROM evaluation_results WHERE id = ?",[a],p.parse)}async listEvaluationResults(a,e){return this.listParsedPayloads(e?"SELECT payload FROM evaluation_results WHERE taskset_id = ? AND kind = ? ORDER BY created_at DESC, id ASC":"SELECT payload FROM evaluation_results WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",e?[a,e]:[a],p.parse)}};export{m as LocalProfileEvaluationRunSchema,w as SqliteEvaluationResultStore};
@@ -0,0 +1,29 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as n}from"./chunk-KCJVFLBB.js";import{a as i}from"./chunk-FTQLQJQV.js";var d={enabled:!1,activityEnabled:!1,activityBatchSize:10,cadence:"manual",maxEstimatedCostUsd:.1,nextRunAt:null,lastRunAt:null,lastResult:null,lastError:null,updatedAt:null},r=class extends n{static{i(this,"SqliteHarnessEvaluationReviewSettingsStore")}async getHarnessBackgroundReviewSettings(e){await this.ready,await this.writeQueue;let t=await this.get(`SELECT background_review_enabled, updated_at
3
+ FROM harness_workspace_settings WHERE workspace_id = ?`,[e]);return t?{enabled:t.background_review_enabled===1,updatedAt:t.updated_at}:{enabled:!0,updatedAt:null}}async setHarnessBackgroundReviewSettings(e){await this.ready;let t=this.writeQueue.then(async()=>{if(!await this.get("SELECT id FROM harness_workspaces WHERE id = ?",[e.workspaceId]))throw new Error(`Harness workspace ${e.workspaceId} does not exist.`);await this.run(`INSERT INTO harness_workspace_settings (
4
+ workspace_id, background_review_enabled, updated_at
5
+ ) VALUES (?, ?, ?)
6
+ ON CONFLICT(workspace_id) DO UPDATE SET
7
+ background_review_enabled = excluded.background_review_enabled,
8
+ updated_at = excluded.updated_at`,[e.workspaceId,e.enabled?1:0,e.updatedAt])});return this.writeQueue=t.catch(()=>{}),await t,{enabled:e.enabled,updatedAt:e.updatedAt}}async getHarnessEvaluationReviewSettings(e){await this.ready,await this.writeQueue;let t=await this.get(`SELECT enabled, activity_enabled, activity_batch_size, cadence,
9
+ max_estimated_cost_usd, next_run_at, last_run_at,
10
+ last_review_id, last_review_hash, last_classification, last_error, updated_at
11
+ FROM harness_evaluation_review_settings WHERE workspace_id = ?`,[e]);if(!t)return{...d};let a=t.last_review_id&&t.last_review_hash&&t.last_classification?{id:t.last_review_id,contentHash:t.last_review_hash,classification:t.last_classification}:null;return{enabled:t.enabled===1,activityEnabled:t.activity_enabled===1,activityBatchSize:t.activity_batch_size,cadence:t.cadence,maxEstimatedCostUsd:t.max_estimated_cost_usd,nextRunAt:t.next_run_at,lastRunAt:t.last_run_at,lastResult:a,lastError:t.last_error,updatedAt:t.updated_at}}async setHarnessEvaluationReviewSettings(e){await this.ready;let t=this.writeQueue.then(async()=>{if(!await this.get("SELECT id FROM harness_workspaces WHERE id = ?",[e.workspaceId]))throw new Error(`Harness workspace ${e.workspaceId} does not exist.`);let s=e.settings.lastResult;await this.run(`INSERT INTO harness_evaluation_review_settings (
12
+ workspace_id, enabled, activity_enabled, activity_batch_size,
13
+ cadence, max_estimated_cost_usd, next_run_at,
14
+ last_run_at, last_review_id, last_review_hash, last_classification,
15
+ last_error, updated_at
16
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
17
+ ON CONFLICT(workspace_id) DO UPDATE SET
18
+ enabled = excluded.enabled,
19
+ activity_enabled = excluded.activity_enabled,
20
+ activity_batch_size = excluded.activity_batch_size,
21
+ cadence = excluded.cadence,
22
+ max_estimated_cost_usd = excluded.max_estimated_cost_usd,
23
+ next_run_at = excluded.next_run_at,
24
+ last_run_at = excluded.last_run_at,
25
+ last_review_id = excluded.last_review_id,
26
+ last_review_hash = excluded.last_review_hash,
27
+ last_classification = excluded.last_classification,
28
+ last_error = excluded.last_error,
29
+ updated_at = excluded.updated_at`,[e.workspaceId,e.settings.enabled?1:0,e.settings.activityEnabled?1:0,e.settings.activityBatchSize,e.settings.cadence,e.settings.maxEstimatedCostUsd,e.settings.nextRunAt,e.settings.lastRunAt,s?.id??null,s?.contentHash??null,s?.classification??null,e.settings.lastError,e.settings.updatedAt??new Date().toISOString()])});return this.writeQueue=t.catch(()=>{}),await t,e.settings}};export{r as SqliteHarnessEvaluationReviewSettingsStore};
@@ -0,0 +1,17 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as m}from"./chunk-KCJVFLBB.js";import{m as n}from"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as d}from"./chunk-FTQLQJQV.js";var w=class extends m{static{d(this,"SqliteHarnessMemoryStore")}async listHarnessMemories(e,s={}){await this.ready,await this.writeQueue;let a=(await this.all(`SELECT revisions.payload
3
+ FROM harness_memory_revisions revisions
4
+ INNER JOIN (
5
+ SELECT key, MAX(revision) AS revision
6
+ FROM harness_memory_revisions
7
+ WHERE workspace_id = ?
8
+ GROUP BY key
9
+ ) latest ON latest.key = revisions.key AND latest.revision = revisions.revision
10
+ WHERE revisions.workspace_id = ?
11
+ ORDER BY revisions.created_at DESC, revisions.key ASC`,[e,e])).map(t=>JSON.parse(t.payload));return s.includeDeleted?a:a.filter(t=>t.status==="active")}async getHarnessMemory(e,s){await this.ready,await this.writeQueue;let r=await this.get(`SELECT payload FROM harness_memory_revisions
12
+ WHERE workspace_id = ? AND key = ?
13
+ ORDER BY revision DESC LIMIT 1`,[e,s]);return r?JSON.parse(r.payload):null}async writeHarnessMemory(e){let s=e.key.trim().toLowerCase();if(!/^[a-z0-9][a-z0-9-]{0,119}$/.test(s))throw new Error("Harness memory keys must be lowercase slugs up to 120 characters.");if(e.content!==null&&(!e.content.trim()||e.content.length>24e3))throw new Error("Harness memory content must contain 1-24,000 characters.");await this.ready;let r=null,a=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{let t=await this.get(`SELECT payload FROM harness_memory_revisions
14
+ WHERE workspace_id = ? AND key = ?
15
+ ORDER BY revision DESC LIMIT 1`,[e.workspaceId,s]),o=t?JSON.parse(t.payload):null,i=o?.revision??null;if(i!==e.expectedRevision)throw new Error(`Harness memory ${s} changed concurrently (expected ${e.expectedRevision??"new"}, observed ${i??"new"}).`);if(e.content===null&&(!o||o.status==="deleted"))throw new Error(`Harness memory ${s} does not exist.`);let c=(o?.revision??0)+1,y={schemaVersion:"openpond.harnessMemoryEntry.v1",id:o?.id??`memory-${n({workspaceId:e.workspaceId,key:s}).slice(0,24)}`,workspaceId:e.workspaceId,key:s,content:e.content?.trim()??"",tags:[...new Set((e.tags??o?.tags??[]).map(l=>l.trim().toLowerCase()).filter(Boolean))].slice(0,20),revision:c,status:e.content===null?"deleted":"active",sourceRunId:e.sourceRunId,sourceProposal:e.sourceProposal,createdAt:o?.createdAt??e.createdAt,updatedAt:e.createdAt};r={...y,contentHash:n(y)},await this.run(`INSERT INTO harness_memory_revisions (
16
+ workspace_id, key, revision, status, payload, created_at
17
+ ) VALUES (?, ?, ?, ?, ?, ?)`,[e.workspaceId,s,c,r.status,JSON.stringify(r),e.createdAt]),await this.exec("COMMIT")}catch(t){throw await this.exec("ROLLBACK").catch(()=>{}),t}});if(this.writeQueue=a.catch(()=>{}),await a,!r)throw new Error("Harness memory write did not produce a revision.");return r}};export{w as SqliteHarnessMemoryStore};
@@ -0,0 +1,21 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as w}from"./chunk-KCJVFLBB.js";import{a as i,b as h,c as o}from"./chunk-AY64VY4E.js";import{a as p}from"./chunk-GJ2ZJFDD.js";import"./chunk-74ZXXBGN.js";import"./chunk-JFXWI3EN.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as c}from"./chunk-FTQLQJQV.js";var f=class extends w{static{c(this,"SqliteHarnessRefinementCandidateStore")}async listHarnessRefinementCandidates(t,e){return await this.ready,await this.writeQueue,(e?await this.all(`SELECT payload FROM harness_refinement_candidates
3
+ WHERE workspace_id = ? AND status = ?
4
+ ORDER BY updated_at DESC, candidate_id ASC`,[t,e]):await this.all(`SELECT payload FROM harness_refinement_candidates
5
+ WHERE workspace_id = ? ORDER BY updated_at DESC, candidate_id ASC`,[t])).map(s=>i.parse(JSON.parse(s.payload)))}async getHarnessRefinementCandidateByFingerprint(t,e){await this.ready,await this.writeQueue;let a=await this.get(`SELECT payload FROM harness_refinement_candidates
6
+ WHERE workspace_id = ? AND fingerprint = ?`,[t,e]);return a?i.parse(JSON.parse(a.payload)):null}async saveHarnessRefinementCandidateTransition(t){let e=i.parse(t.candidate),a=h.parse(t.receipt);if(a.candidateId!==e.id||a.afterCandidate.id!==e.id||a.afterCandidate.contentHash!==e.contentHash)throw new Error("Candidate lifecycle receipt is not bound to the candidate revision.");await this.ready;let s=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{let n=await this.requireCandidateWorkspace(t.workspaceId);if(n.ownerScope.kind!==e.ownerScope.kind||n.ownerScope.id!==e.ownerScope.id||e.workspaceRef!==n.id)throw new Error("Candidate is not bound to the target Harness workspace owner.");let d=await this.get("SELECT payload FROM harness_refinement_candidates WHERE candidate_id = ?",[e.id]),r=d?i.parse(JSON.parse(d.payload)):null;if(r===null!=(a.beforeCandidate===null)||r&&(r.id!==a.beforeCandidate?.id||r.contentHash!==a.beforeCandidate.contentHash))throw new Error("Candidate lifecycle transition does not match the current revision.");await this.insertCandidateArtifact(t.workspaceId,"refinement_candidate",e),await this.insertCandidateArtifact(t.workspaceId,"refinement_candidate_lifecycle",a),await this.run(`INSERT INTO harness_refinement_candidates (
7
+ candidate_id, workspace_id, fingerprint, status, content_hash,
8
+ payload, created_at, updated_at
9
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
10
+ ON CONFLICT(candidate_id) DO UPDATE SET
11
+ fingerprint = excluded.fingerprint,
12
+ status = excluded.status,
13
+ content_hash = excluded.content_hash,
14
+ payload = excluded.payload,
15
+ updated_at = excluded.updated_at`,[e.id,t.workspaceId,e.fingerprint,e.status,e.contentHash,JSON.stringify(e),e.createdAt,e.updatedAt]),await this.exec("COMMIT")}catch(n){throw await this.exec("ROLLBACK").catch(()=>{}),n}});return this.writeQueue=s.catch(()=>{}),await s,e}async saveHarnessCrossRunRefinementRequestIfAbsent(t){let e=o.parse(t.request);if(e.workspaceRef!==t.workspaceId)throw new Error("Cross-run refinement request is not bound to the target workspace.");await this.ready;let a=null,s=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{await this.requireCandidateWorkspace(t.workspaceId);let n=await this.get(`SELECT payload FROM harness_cross_run_refinement_requests
16
+ WHERE deduplication_key = ?`,[e.deduplicationKey]);n?a={request:o.parse(JSON.parse(n.payload)),created:!1}:(await this.insertCandidateArtifact(t.workspaceId,"cross_run_refinement_request",e),await this.run(`INSERT INTO harness_cross_run_refinement_requests (
17
+ deduplication_key, workspace_id, candidate_id,
18
+ admitted_release_hash, content_hash, payload, created_at
19
+ ) VALUES (?, ?, ?, ?, ?, ?, ?)`,[e.deduplicationKey,t.workspaceId,e.candidate.id,e.admittedHarness.contentHash,e.contentHash,JSON.stringify(e),e.createdAt]),a={request:e,created:!0}),await this.exec("COMMIT")}catch(n){throw await this.exec("ROLLBACK").catch(()=>{}),n}});if(this.writeQueue=s.catch(()=>{}),await s,!a)throw new Error("Cross-run refinement request was not persisted.");return a}async requireCandidateWorkspace(t){let e=await this.get("SELECT payload FROM harness_workspaces WHERE id = ?",[t]);if(!e)throw new Error(`Harness workspace ${t} does not exist.`);return p.parse(JSON.parse(e.payload))}async insertCandidateArtifact(t,e,a){let s=JSON.stringify(a),n=await this.get("SELECT payload FROM harness_improvement_artifacts WHERE content_hash = ?",[a.contentHash]);if(n){if(n.payload!==s)throw new Error("An immutable Harness improvement artifact hash already has different content.");return}if(e!=="refinement_candidate"&&await this.get("SELECT payload FROM harness_improvement_artifacts WHERE id = ? AND kind = ?",[a.id,e]))throw new Error("An immutable Harness improvement artifact id already has different content.");await this.run(`INSERT INTO harness_improvement_artifacts (
20
+ content_hash, id, workspace_id, kind, payload, created_at
21
+ ) VALUES (?, ?, ?, ?, ?, ?)`,[a.contentHash,a.id,t,e,s,a.createdAt])}};export{f as SqliteHarnessRefinementCandidateStore};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{b}from"./chunk-RNIAFXMB.js";import{a}from"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-74ZXXBGN.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as LocalHarnessReleaseRecordSchema,b as SqliteHarnessWorkspaceStore};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as h,b as d,c as p,h as N}from"./chunk-GWCHDF2C.js";import"./chunk-EQFGBL3O.js";import"./chunk-GZ7M5XBP.js";import"./chunk-F74GBN6K.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-QOTVNQDI.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WJ43MJ3F.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import{a as T}from"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import{P as u,h as I}from"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import{m as l}from"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as c}from"./chunk-FTQLQJQV.js";function L(o,e){let i=d(o,e.scope,e.executionId);if(i.ownerActorId!==e.actorId||!i.completedAt)throw new Error("human_local_publication_source_denied");return o.exec("CREATE TABLE IF NOT EXISTS human_local_publications(scope TEXT NOT NULL,actor_id TEXT NOT NULL,execution_id TEXT NOT NULL,operation_id TEXT NOT NULL,execution_hash TEXT NOT NULL,publication TEXT NOT NULL,PRIMARY KEY(scope,actor_id,execution_id,operation_id))"),i}c(L,"setup");function w(o,e){if(L(o,e).executionHash!==e.executionHash)throw new Error("human_local_publication_source_changed");let t=o.get("SELECT publication,execution_hash FROM human_local_publications WHERE scope=? AND actor_id=? AND execution_id=? AND operation_id=?",[e.scope,e.actorId,e.executionId,e.operationId]);if(t){if(t.execution_hash!==e.executionHash||l(JSON.parse(t.publication))!==l(e.publication))throw new Error("human_local_publication_operation_conflict");return}o.run("INSERT INTO human_local_publications VALUES(?,?,?,?,?,?)",[e.scope,e.actorId,e.executionId,e.operationId,e.executionHash,JSON.stringify(e.publication)])}c(w,"retainHumanLocalPublication");function O(o,e){let i=L(o,e);return o.all("SELECT publication,execution_hash FROM human_local_publications WHERE scope=? AND actor_id=? AND execution_id=? ORDER BY operation_id LIMIT 1001",[e.scope,e.actorId,e.executionId]).map(t=>{if(t.execution_hash!==i.executionHash)throw new Error("human_local_publication_source_changed");return JSON.parse(t.publication)})}c(O,"readHumanLocalPublications");function _(o,e){let i=d(o,e.teamId,e.executionId);if(i.ownerActorId!==e.actorId)throw new Error("live_agent_account_denied");let t=o.get("SELECT owner_id FROM local_experiment_executions WHERE team_id=? AND id=?",[e.teamId,e.executionId]),n=p(o,e.teamId,e.executionId).find(g=>g.receiptId===e.receiptId);if(!n||n.admission.request.model.providerId!=="claude-code")throw new Error("live_agent_case_denied");let a=o.get("SELECT payload FROM local_experiment_events WHERE team_id=? AND execution_id=? AND case_id=? AND type='external.start' ORDER BY sequence LIMIT 1",[e.teamId,e.executionId,e.receiptId]);if(!a||JSON.parse(a.payload).sessionId!==e.sessionId)throw new Error("live_agent_session_stale");o.exec("CREATE TABLE IF NOT EXISTS human_live_controls(team_id TEXT NOT NULL,actor_id TEXT NOT NULL,operation_id TEXT NOT NULL,request_hash TEXT NOT NULL,state TEXT NOT NULL,PRIMARY KEY(team_id,actor_id,operation_id))");let{phase:r,ownerId:R,...E}=e,m=l(E),s=o.get("SELECT request_hash,state FROM human_live_controls WHERE team_id=? AND actor_id=? AND operation_id=?",[e.teamId,e.actorId,e.operationId]);if(s&&s.request_hash!==m)throw new Error("live_agent_operation_conflict");if(e.phase==="inspect")return s?{replay:!0,state:s.state}:null;if(N(o,e.ownerId),t?.owner_id!==e.ownerId)throw new Error("live_agent_execution_lease_lost");if(e.phase==="acknowledge"){if(!s)throw new Error("live_agent_operation_missing");return s.state==="acknowledged"?{replay:!0,state:"acknowledged"}:(v(o,e,"external.control_receipt",{sessionId:e.sessionId,operationId:e.operationId,action:e.action,transport:"process_stdin",state:"acknowledged",occurredAt:new Date().toISOString()}),o.run("UPDATE human_live_controls SET state='acknowledged' WHERE team_id=? AND actor_id=? AND operation_id=?",[e.teamId,e.actorId,e.operationId]),{replay:!1,state:"acknowledged"})}if(s)return{replay:!0,state:s.state};if(o.get("SELECT c.operation_id FROM human_live_controls c JOIN local_experiment_events e ON e.team_id=c.team_id AND json_extract(e.payload,'$.actorId')=c.actor_id AND json_extract(e.payload,'$.operationId')=c.operation_id WHERE c.team_id=? AND c.actor_id=? AND c.state='prepared' AND e.execution_id=? AND e.case_id=? AND e.type='external.human_intervention' LIMIT 1",[e.teamId,e.actorId,e.executionId,e.receiptId]))throw new Error("live_agent_prior_delivery_unknown");if(n.status!=="running"||i.completedAt)throw new Error("live_agent_already_sealed");return o.run("INSERT INTO human_live_controls VALUES(?,?,?,?,'prepared')",[e.teamId,e.actorId,e.operationId,m]),v(o,e,"external.human_intervention",{...E,occurredAt:new Date().toISOString()}),{replay:!1,state:"prepared"}}c(_,"writeHumanLiveControl");function v(o,e,i,t){let n=JSON.stringify(t),a=Buffer.byteLength(n),r=o.get("SELECT event_count,byte_count FROM local_experiment_trace_budgets WHERE team_id=? AND execution_id=?",[e.teamId,e.executionId]);if(a>1048576||(r?.event_count??0)>=2e4||(r?.byte_count??0)+a>67108864)throw new Error("live_agent_control_too_large");o.run("INSERT INTO local_experiment_events(team_id,execution_id,case_id,type,payload) VALUES(?,?,?,?,?)",[e.teamId,e.executionId,e.receiptId,i,n]),o.run("INSERT INTO local_experiment_trace_budgets(team_id,execution_id,event_count,byte_count) VALUES(?,?,1,?) ON CONFLICT(team_id,execution_id) DO UPDATE SET event_count=event_count+1,byte_count=byte_count+excluded.byte_count",[e.teamId,e.executionId,a])}c(v,"appendControlEvent");var y=`
3
+ CREATE TABLE IF NOT EXISTS human_review_revisions(scope TEXT NOT NULL,id TEXT NOT NULL,revision INTEGER NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id,revision));
4
+ CREATE TABLE IF NOT EXISTS human_reviews(scope TEXT NOT NULL,id TEXT NOT NULL,revision INTEGER NOT NULL,project_id TEXT NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id));
5
+ CREATE INDEX IF NOT EXISTS human_reviews_project_idx ON human_reviews(scope,project_id,id);
6
+ CREATE TABLE IF NOT EXISTS human_review_operations(scope TEXT NOT NULL,id TEXT NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id));
7
+ `,x=class extends T{static{c(this,"SqliteHumanReviewStore")}async humanLiveControl(e){await this.ready;let i=this.writeQueue.then(()=>{let t=this.database;t.exec("BEGIN IMMEDIATE");try{let n=_(t,e);return t.exec("COMMIT"),n}catch(n){throw t.exec("ROLLBACK"),n}});return this.writeQueue=i.then(()=>{},()=>{}),i}async humanLiveControlReceipt(e){return await this.ready,await this.writeQueue,_(this.database,{...e,phase:"inspect"})}async rememberHumanLocalPublication(e){await this.ready;let i=this.writeQueue.then(()=>{let t=this.database;t.exec("BEGIN IMMEDIATE");try{w(t,e),t.exec("COMMIT")}catch(n){throw t.exec("ROLLBACK"),n}});return this.writeQueue=i.then(()=>{},()=>{}),i}async forgetHumanLocalPublication(e){await this.ready;let i=this.writeQueue.then(()=>{if(this.database.get("SELECT name FROM sqlite_master WHERE type='table' AND name='human_local_publications'"))return this.database.run("DELETE FROM human_local_publications WHERE scope=? AND actor_id=? AND json_extract(publication,'$.id')=?",[e.scope,e.actorId,e.publicationId])});return this.writeQueue=i.then(()=>{},()=>{}),i}async humanLocalPublications(e){return await this.ready,await this.writeQueue,O(this.database,e)}humanReviewRepository(){return{transaction:c(async(e,i)=>{await this.ready;let t=this.writeQueue.then(async()=>{let n=this.database;n.exec(y),n.exec("BEGIN IMMEDIATE");let a=!0;try{let r=await i(S(n,e,()=>{if(!a)throw new Error("human_transaction_closed")}));return n.exec("COMMIT"),r}catch(r){throw n.exec("ROLLBACK"),r}finally{a=!1}});return this.writeQueue=t.then(()=>{},()=>{}),t},"transaction")}}humanReviewLocalEvidence(e,i){let t=d(this.database,e,i),n=h(this.database,e,t.definition.id,t.definition.revision);return{execution:t,released:n,cases:p(this.database,e,i)}}};function S(o,e,i){return{async get(t,n){i();let a=n===void 0?o.get("SELECT payload FROM human_reviews WHERE scope=? AND id=?",[e,t]):o.get("SELECT payload FROM human_review_revisions WHERE scope=? AND id=? AND revision=?",[e,t,n]);return a?u.parse(JSON.parse(a.payload)):null},async put(t,n){i();let a=u.parse(t),r=o.get("SELECT revision FROM human_reviews WHERE scope=? AND id=?",[e,a.id]);if(a.scope!==e||a.revision!==n+1||(r?.revision??0)!==n)throw new I("human_revision_conflict",409);o.run("INSERT INTO human_review_revisions(scope,id,revision,payload) VALUES(?,?,?,?)",[e,a.id,a.revision,JSON.stringify(a)]),o.run("INSERT INTO human_reviews(scope,id,revision,project_id,payload) VALUES(?,?,?,?,?) ON CONFLICT(scope,id) DO UPDATE SET revision=excluded.revision,payload=excluded.payload",[e,a.id,a.revision,a.projectId,JSON.stringify(a)])},async list(t){i();let n=o.all(`SELECT payload FROM human_reviews WHERE scope=? ${t.projectId?"AND project_id=?":""} ${t.afterId?"AND id>?":""} ORDER BY id LIMIT ?`,[e,...t.projectId?[t.projectId]:[],...t.afterId?[t.afterId]:[],t.limit+1]),a=n.slice(0,t.limit).map(r=>u.parse(JSON.parse(r.payload)));return{items:a,nextCursor:n.length>t.limit?a.at(-1).id:null}},async operation(t){i();let n=o.get("SELECT payload FROM human_review_operations WHERE scope=? AND id=?",[e,t]);return n?JSON.parse(n.payload):null},async saveOperation(t,n){i(),o.run("INSERT INTO human_review_operations(scope,id,payload) VALUES(?,?,?)",[e,t,JSON.stringify(n)])}}}c(S,"createHumanReviewTransaction");export{y as HUMAN_REVIEW_SQL,x as SqliteHumanReviewStore,S as createHumanReviewTransaction};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import"./chunk-QOTVNQDI.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WJ43MJ3F.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import{B as d}from"./chunk-QOGJAQDO.js";import"./chunk-EYPCBBMS.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-3VUATFZD.js";import"./chunk-4EPSHPZL.js";import"./chunk-MQULU465.js";import"./chunk-PRGBLQVH.js";import"./chunk-7E6T7GP5.js";import"./chunk-DZUAT3TP.js";import"./chunk-XDQMGUWL.js";import"./chunk-FTEOCCPB.js";import"./chunk-25MBPJVY.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-6FA3GG5B.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as s}from"./chunk-FTQLQJQV.js";function f(e){if(Array.isArray(e)){let r=!1,n=e.map(c=>{let t=f(c);return r||=t.changed,t.value});return{value:r?n:e,changed:r}}if(!u(e))return{value:e,changed:!1};let o=!1,i={};for(let[r,n]of Object.entries(e)){if(r==="learnedPreference"&&n!==null){let t=u(n)?Object.fromEntries(Object.entries(n).filter(([l])=>l!=="qualificationKind")):n,a=d.safeParse(t);i[r]=a.success?a.data:null,o||=!a.success||t!==n;continue}let c=f(n);i[r]=c.value,o||=c.changed}return{value:o?i:e,changed:o}}s(f,"sanitizeUnverifiableLearnedPreferenceBindings");function u(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}s(u,"isRecord");export{f as sanitizeUnverifiableLearnedPreferenceBindings};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-QIKWJ2AA.js";import"./chunk-KCJVFLBB.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as SqliteLearningStore,b as createLearningTransaction,c as putLearningResourceInTransaction};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import"./chunk-ZUJ3XUCP.js";import{a as s}from"./chunk-GPVCOEUH.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-WN3V6KDN.js";import"./chunk-ZCHXGRRU.js";import"./chunk-VYLGI3IH.js";import{h as c}from"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as l}from"./chunk-FTQLQJQV.js";var p=class extends u{static{l(this,"SqliteLearningCredentialStore")}async credentialTransaction(t){await this.ready;let n=this.writeQueue.then(()=>{let e=this.database;e.exec("BEGIN IMMEDIATE");try{let r=t(e);return e.exec("COMMIT"),r}catch(r){throw e.exec("ROLLBACK"),r}});return this.writeQueue=n.then(()=>{},()=>{}),n}async createLearningSourceCredential(t,n,e){let r=s.parse(t);return this.credentialTransaction(a=>{let i=a.get("SELECT payload, request_hash FROM learning_source_credentials WHERE id = ?",[r.id]);if(i){if(i.request_hash!==e)throw new c("learning_credential_operation_conflict",409);return s.parse(JSON.parse(i.payload))}if(a.get("SELECT id FROM learning_source_credentials WHERE key_hash = ?",[n]))throw new c("learning_credential_secret_reused",409);return a.run("INSERT INTO learning_source_credentials (id, scope, source_id, key_hash, request_hash, payload) VALUES (?, ?, ?, ?, ?, ?)",[r.id,r.scope,r.sourceId,n,e,JSON.stringify(r)]),r})}async findLearningSourceCredential(t){await this.ready,await this.writeQueue;let n=this.database.get("SELECT payload FROM learning_source_credentials WHERE key_hash = ?",[t]);return n?s.parse(JSON.parse(n.payload)):null}async listLearningSourceCredentials(t,n,e,r){if(!Number.isInteger(e)||e<1||e>100)throw new Error("learning_credential_page_invalid");await this.ready,await this.writeQueue;let a=this.database.all("SELECT payload FROM learning_source_credentials WHERE scope = ? AND source_id = ? AND id > ? ORDER BY id LIMIT ?",[t,n,r??"",e+1]),i=a.slice(0,e).map(o=>s.parse(JSON.parse(o.payload)));return{items:i,nextCursor:a.length>e?i.at(-1).id:null}}async revokeLearningSourceCredential(t,n,e,r){return this.credentialTransaction(a=>{let i=a.get("SELECT payload FROM learning_source_credentials WHERE scope = ? AND source_id = ? AND id = ?",[t,n,e]);if(!i)return null;let o=s.parse(JSON.parse(i.payload));if(o.revokedAt!==null)return o;let d=s.parse({...o,revokedAt:r});return a.run("UPDATE learning_source_credentials SET payload = ? WHERE scope = ? AND source_id = ? AND id = ?",[JSON.stringify(d),t,n,e]),d})}};export{p as SqliteLearningCredentialStore};