openpond 0.2.61 → 0.2.62

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 (420) hide show
  1. package/dist/app-server.d.ts +3264 -18
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{acp-FUAWCKBH.js → acp-DYRBDJRU.js} +1 -1
  4. package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-UTLP7C3I.js} +1 -1
  5. package/dist/chunks/{actions-command-LOHNQUWP.js → actions-command-6LF4Z4WK.js} +1 -1
  6. package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-N2H3RBEN.js} +1 -1
  7. package/dist/chunks/{app-server-connected-apps-Q2VWWJNX.js → app-server-connected-apps-3T546FE7.js} +1 -1
  8. package/dist/chunks/app-server-evaluations-TXD747QA.js +2 -0
  9. package/dist/chunks/{app-server-harness-services-2PSZBT7U.js → app-server-harness-services-BBCDV5P3.js} +1 -1
  10. package/dist/chunks/app-server-runtime-VEJPDAFP.js +2 -0
  11. package/dist/chunks/{apps-7PIBF32Q.js → apps-CTT2XYRR.js} +1 -1
  12. package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
  13. package/dist/chunks/{chunk-5VPU7OS7.js → chunk-2IIBCCOK.js} +1 -1
  14. package/dist/chunks/{chunk-ZISYLRH6.js → chunk-2UDAKLJ4.js} +1 -1
  15. package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
  16. package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-3R4MSE2S.js} +1 -1
  17. package/dist/chunks/{chunk-OFVUN4KI.js → chunk-47AXSBPV.js} +1 -1
  18. package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
  19. package/dist/chunks/chunk-4PZWGNX4.js +86 -0
  20. package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-4RZBGKT7.js} +1 -1
  21. package/dist/chunks/{chunk-VBW2X42G.js → chunk-4TM75R7V.js} +1 -1
  22. package/dist/chunks/chunk-4U2FNXQW.js +2 -0
  23. package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
  24. package/dist/chunks/{chunk-VWJ5IYQP.js → chunk-547AUVKN.js} +1 -1
  25. package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-557XSPVS.js} +1 -1
  26. package/dist/chunks/{chunk-ZHFH2TZN.js → chunk-557YG77L.js} +1 -1
  27. package/dist/chunks/{chunk-MF35MALN.js → chunk-5A6ER3M2.js} +1 -1
  28. package/dist/chunks/{chunk-U4HZD2GM.js → chunk-5OSM75X5.js} +1 -1
  29. package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-6SH4B7DV.js} +1 -1
  30. package/dist/chunks/chunk-6XSSM4WT.js +3 -0
  31. package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-7JBB4PXS.js} +1 -1
  32. package/dist/chunks/{chunk-SID4X3YN.js → chunk-7JXZNCBC.js} +1 -1
  33. package/dist/chunks/chunk-7KTARW23.js +2 -0
  34. package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
  35. package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-AKZPMKWP.js} +1 -1
  36. package/dist/chunks/{chunk-SIV5P6JO.js → chunk-AMO5DVKM.js} +2 -2
  37. package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
  38. package/dist/chunks/{chunk-4RHM4WN2.js → chunk-B42QQUZY.js} +1 -1
  39. package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
  40. package/dist/chunks/{chunk-CQF6QZEL.js → chunk-BEI4YULC.js} +1 -1
  41. package/dist/chunks/chunk-BKEDG3A4.js +22 -0
  42. package/dist/chunks/{chunk-GEXKTGLY.js → chunk-C7M2WBWZ.js} +14 -14
  43. package/dist/chunks/{chunk-ELYRVTTG.js → chunk-CJUVHE4U.js} +1 -1
  44. package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-EIX2V2KU.js} +1 -1
  45. package/dist/chunks/{chunk-AWPYTDH4.js → chunk-EWOTDVDJ.js} +1 -1
  46. package/dist/chunks/{chunk-B47JMAVW.js → chunk-F4TJ7WQV.js} +1 -1
  47. package/dist/chunks/{chunk-TXBIZDXG.js → chunk-F7D4BMTO.js} +1 -1
  48. package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FFWOTZQM.js} +1 -1
  49. package/dist/chunks/{chunk-6RVF2J47.js → chunk-FUSCTBJI.js} +1 -1
  50. package/dist/chunks/{chunk-BN5AVRUG.js → chunk-GAQLXFOT.js} +1 -1
  51. package/dist/chunks/{chunk-LHENAWLH.js → chunk-GEKORCMN.js} +1 -1
  52. package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-GNCEZ3UP.js} +1 -1
  53. package/dist/chunks/{chunk-WRQEYW3V.js → chunk-GOIKLFXK.js} +1 -1
  54. package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GQGLPKU4.js} +1 -1
  55. package/dist/chunks/{chunk-LBBXVOVR.js → chunk-GSWBNJGZ.js} +1 -1
  56. package/dist/chunks/{chunk-7EAWLYYB.js → chunk-GV3LFSMI.js} +1 -1
  57. package/dist/chunks/{chunk-GQUS7MCH.js → chunk-GW5SE3FM.js} +1 -1
  58. package/dist/chunks/{chunk-I3W27VK4.js → chunk-HBLN4OLY.js} +1 -1
  59. package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
  60. package/dist/chunks/{chunk-4P3X2RXA.js → chunk-HKV7RX5E.js} +1 -1
  61. package/dist/chunks/{chunk-QDBYLJGH.js → chunk-HXZXDDKW.js} +1 -1
  62. package/dist/chunks/{chunk-LNRFRAV5.js → chunk-INO67SEN.js} +1 -1
  63. package/dist/chunks/{chunk-E67M5WGY.js → chunk-IWK3RTLR.js} +1 -1
  64. package/dist/chunks/{chunk-U447MS3Y.js → chunk-J3B2GM4A.js} +1 -1
  65. package/dist/chunks/chunk-JCLTFDVW.js +2 -0
  66. package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
  67. package/dist/chunks/{chunk-D4JZALZ4.js → chunk-JIFUGA3U.js} +1 -1
  68. package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
  69. package/dist/chunks/{chunk-FWIPHEVA.js → chunk-JX6OX6XE.js} +1 -1
  70. package/dist/chunks/{chunk-D5ADDBS5.js → chunk-JY3YSI54.js} +1 -1
  71. package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
  72. package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
  73. package/dist/chunks/chunk-LILXHGIA.js +2 -0
  74. package/dist/chunks/{chunk-MCIIGQT7.js → chunk-LJDBR3RN.js} +1 -1
  75. package/dist/chunks/{chunk-3TYCIYW6.js → chunk-LJPO3TEL.js} +1 -1
  76. package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LRRBYIGH.js} +2 -2
  77. package/dist/chunks/{chunk-P4XM7LUT.js → chunk-M5IX6VUA.js} +1 -1
  78. package/dist/chunks/chunk-MEK7DLX3.js +2 -0
  79. package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
  80. package/dist/chunks/{chunk-ZBBVRYU3.js → chunk-MNFW5WLD.js} +1 -1
  81. package/dist/chunks/{chunk-2VXL6AU3.js → chunk-MNXNZDDW.js} +1 -1
  82. package/dist/chunks/chunk-N5GPINVP.js +2 -0
  83. package/dist/chunks/{chunk-TSAW2QVU.js → chunk-NBE74GLF.js} +1 -1
  84. package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-NE4ESZPT.js} +1 -1
  85. package/dist/chunks/{chunk-CO3OJFPU.js → chunk-NKZNPTLA.js} +1 -1
  86. package/dist/chunks/{chunk-WFVOG5PU.js → chunk-NLQ2UPN2.js} +1 -1
  87. package/dist/chunks/chunk-NOSBNHGC.js +18 -0
  88. package/dist/chunks/{chunk-TTN63EAM.js → chunk-NWOK6NLE.js} +1 -1
  89. package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
  90. package/dist/chunks/chunk-O3MHHGC5.js +151 -0
  91. package/dist/chunks/{chunk-IUGK6BBY.js → chunk-OCC43RSJ.js} +1 -1
  92. package/dist/chunks/{chunk-BQUWZRWU.js → chunk-P74RR2GB.js} +1 -1
  93. package/dist/chunks/{chunk-PAZDQRYU.js → chunk-PAE3PQEC.js} +1 -1
  94. package/dist/chunks/{chunk-M4ZRCRJM.js → chunk-PGO4FRHU.js} +2 -2
  95. package/dist/chunks/chunk-Q34IF4PW.js +2 -0
  96. package/dist/chunks/{chunk-Q324ZA5M.js → chunk-QAVQJZCM.js} +1 -1
  97. package/dist/chunks/{chunk-EIIGTADO.js → chunk-RBDUMASL.js} +1 -1
  98. package/dist/chunks/{chunk-TMMFF6DO.js → chunk-RH43WLBX.js} +1 -1
  99. package/dist/chunks/{chunk-RPOD6I64.js → chunk-RTJCELRR.js} +1 -1
  100. package/dist/chunks/{chunk-L3GA2CQI.js → chunk-SD64CLJX.js} +1 -1
  101. package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
  102. package/dist/chunks/{chunk-MLTKB5G3.js → chunk-SZKFNKWO.js} +1 -1
  103. package/dist/chunks/chunk-T4QXKU5Y.js +1 -0
  104. package/dist/chunks/{chunk-PE7UKJXK.js → chunk-T6C5BNXK.js} +1 -1
  105. package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
  106. package/dist/chunks/{chunk-OQUKSRU3.js → chunk-TGEGXTPR.js} +1 -1
  107. package/dist/chunks/chunk-TM4VEMNN.js +2 -0
  108. package/dist/chunks/chunk-TUCKED4T.js +4 -0
  109. package/dist/chunks/chunk-TVTFEGTU.js +2 -0
  110. package/dist/chunks/{chunk-HZLV773Y.js → chunk-TW3SRBLU.js} +1 -1
  111. package/dist/chunks/{chunk-BNZTJPK7.js → chunk-U456UP3N.js} +1 -1
  112. package/dist/chunks/chunk-UC3FXTDL.js +9 -0
  113. package/dist/chunks/{chunk-XLULTQLZ.js → chunk-UT6F6AIB.js} +1 -1
  114. package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
  115. package/dist/chunks/{chunk-DW3GJRY3.js → chunk-VAJSRUAB.js} +1 -1
  116. package/dist/chunks/chunk-VE6ZIGUQ.js +2 -0
  117. package/dist/chunks/{chunk-GLVR74PX.js → chunk-VI32G77S.js} +1 -1
  118. package/dist/chunks/{chunk-ROE24PN5.js → chunk-VK4TPZTA.js} +1 -1
  119. package/dist/chunks/{chunk-Q66LWQGF.js → chunk-VSQXDS6H.js} +1 -1
  120. package/dist/chunks/{chunk-4GZ2FPB5.js → chunk-VWRTE64Y.js} +1 -1
  121. package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
  122. package/dist/chunks/{chunk-57RY3LSR.js → chunk-WGLVSGFA.js} +1 -1
  123. package/dist/chunks/{chunk-I7JCARVH.js → chunk-WQMXEZVE.js} +3 -3
  124. package/dist/chunks/chunk-X4ZT22SG.js +2 -0
  125. package/dist/chunks/{chunk-DGPGOBYZ.js → chunk-XSB3T4JZ.js} +1 -1
  126. package/dist/chunks/{chunk-ZZWAQBA2.js → chunk-XWDFXM3S.js} +1 -1
  127. package/dist/chunks/{chunk-4LZLO4OW.js → chunk-Y2KPHVZK.js} +1 -1
  128. package/dist/chunks/chunk-ZQHPGEYT.js +2 -0
  129. package/dist/chunks/{chunk-T4LLJC5N.js → chunk-ZXT7V64X.js} +1 -1
  130. package/dist/chunks/cli-GCSO2OAI.js +2 -0
  131. package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-BU2RPG33.js} +1 -1
  132. package/dist/chunks/connected-app-executor-UDE7U4KG.js +2 -0
  133. package/dist/chunks/{connected-evidence-4J3YXU4O.js → connected-evidence-GXIY2L7C.js} +1 -1
  134. package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-V5QXRK5Q.js} +1 -1
  135. package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
  136. package/dist/chunks/{continual-CJUZM5ZQ.js → continual-FLW6DAJK.js} +1 -1
  137. package/dist/chunks/{core-commands-JGXU6B4C.js → core-commands-NJ6TGND4.js} +1 -1
  138. package/dist/chunks/{dataset-preparation-authoring-DFGJBMVF.js → dataset-preparation-authoring-IUXUQK3L.js} +1 -1
  139. package/dist/chunks/{datasets-MNHZAZIB.js → datasets-AH56DKLZ.js} +1 -1
  140. package/dist/chunks/{desktop-test-P23MHAIG.js → desktop-test-PYUTEOWO.js} +1 -1
  141. package/dist/chunks/{dist-IIFTZWNR.js → dist-5267UT3V.js} +1 -1
  142. package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
  143. package/dist/chunks/{evaluation-coordination-6NQEH5WU.js → evaluation-coordination-3AUICOC5.js} +1 -1
  144. package/dist/chunks/{experiment-improvements-M27Z5OF4.js → experiment-improvements-YS7GGPDW.js} +1 -1
  145. package/dist/chunks/experiments-EJZK7FPT.js +2 -0
  146. package/dist/chunks/{experiments-signal-R3NNH7WR.js → experiments-signal-NKUIJCIY.js} +1 -1
  147. package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
  148. package/dist/chunks/{help-M2VQGPVC.js → help-PXUUREHZ.js} +1 -1
  149. package/dist/chunks/host-profile-evaluation-tools-CTC5JQPD.js +2 -0
  150. package/dist/chunks/host-profile-external-dataset-GJWDY3YT.js +2 -0
  151. package/dist/chunks/hosted-app-server-composition-TLJSKMJT.js +2 -0
  152. package/dist/chunks/hosted-experiment-improvement-TIVXXRPG.js +3 -0
  153. package/dist/chunks/hosted-harness-runtime-SFLJEZFI.js +2 -0
  154. package/dist/chunks/{hosted-profile-candidate-37ZFY2LH.js → hosted-profile-candidate-DKEMVIYG.js} +1 -1
  155. package/dist/chunks/hosted-profile-compiler-V6YR6EHO.js +2 -0
  156. package/dist/chunks/{hosted-profile-evaluation-control-UQBMML6K.js → hosted-profile-evaluation-control-ERCXAPZD.js} +1 -1
  157. package/dist/chunks/{hosted-profile-evaluation-inspection-YASS4T6L.js → hosted-profile-evaluation-inspection-Q3AIIIB6.js} +1 -1
  158. package/dist/chunks/hosted-profile-evaluation-preparation-ELLGH44Z.js +3 -0
  159. package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-X2YCFYEJ.js} +1 -1
  160. package/dist/chunks/{human-review-IJETDOWB.js → human-review-5WM6MSON.js} +1 -1
  161. package/dist/chunks/{import-WLLUIDS6.js → import-JWZSZCE4.js} +1 -1
  162. package/dist/chunks/local-harness-improvement-runtime-IGIKM6GJ.js +2 -0
  163. package/dist/chunks/local-harness-taskset-review-DR2ZIDOH.js +2 -0
  164. package/dist/chunks/{model-projects-AVBQDNYG.js → model-projects-H22KENI4.js} +1 -1
  165. package/dist/chunks/opchat-3S6TSDZO.js +3 -0
  166. package/dist/chunks/opchat-bounded-chat-B7LPCD4U.js +2 -0
  167. package/dist/chunks/{organizations-DJRJWC5I.js → organizations-62YNTZTO.js} +1 -1
  168. package/dist/chunks/{profile-JRS3JNRC.js → profile-ELE2D7HU.js} +1 -1
  169. package/dist/chunks/project-action-payload-32F4X2BB.js +2 -0
  170. package/dist/chunks/{project-agent-2KNJFNZI.js → project-agent-O4REKO6T.js} +1 -1
  171. package/dist/chunks/{published-experiment-source-LFYHKFAO.js → published-experiment-source-DAOTJLIN.js} +1 -1
  172. package/dist/chunks/refiner-profile-service-DYMZ7J3X.js +2 -0
  173. package/dist/chunks/{runtime-CBJF5GMB.js → runtime-776NUSE7.js} +2 -2
  174. package/dist/chunks/{sandbox-command-IIGTPYN3.js → sandbox-command-UQ26NDIX.js} +1 -1
  175. package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-WP6YCGBK.js} +1 -1
  176. package/dist/chunks/saved-work-PG52WCRQ.js +2 -0
  177. package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-RPB65PME.js} +1 -1
  178. package/dist/chunks/{src-4YZF6L6H.js → src-2R4CMCJ5.js} +1 -1
  179. package/dist/chunks/src-AU6LG7E6.js +421 -0
  180. package/dist/chunks/standalone-experiment-turn-owner-SD3SUTKX.js +2 -0
  181. package/dist/chunks/{store-chat-resources-CGW7PDCG.js → store-chat-resources-T4LR7K25.js} +1 -1
  182. package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-R62D2HD6.js} +1 -1
  183. package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-25O7BAR2.js} +1 -1
  184. package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-T5E2GUKK.js} +1 -1
  185. package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-5Y4U5L3R.js} +1 -1
  186. package/dist/chunks/{store-evaluation-results-V5J6L4NV.js → store-evaluation-results-WUVJWCFU.js} +1 -1
  187. package/dist/chunks/{store-harness-workspaces-HHMM6GNK.js → store-harness-workspaces-IFEFY5CK.js} +1 -1
  188. package/dist/chunks/{store-human-review-V5H4QDHR.js → store-human-review-ZQNLZRGG.js} +1 -1
  189. package/dist/chunks/store-learned-preference-migration-validation-UH6MJQSH.js +2 -0
  190. package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-LOH4F4TF.js} +1 -1
  191. package/dist/chunks/{store-model-batch-review-KMYPYWJR.js → store-model-batch-review-QO4VVKWC.js} +1 -1
  192. package/dist/chunks/{store-model-configuration-UXNC4PGY.js → store-model-configuration-C3HSOFD5.js} +1 -1
  193. package/dist/chunks/store-model-project-preparation-RQ2YTC2Y.js +2 -0
  194. package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-RNIFLJRW.js} +1 -1
  195. package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-DVQ2PP4F.js} +1 -1
  196. package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-LXWFFYCZ.js} +1 -1
  197. package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-4HH7LX6N.js} +1 -1
  198. package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-JLW4GD4Q.js} +1 -1
  199. package/dist/chunks/{store-task-inbox-LNDCZOYE.js → store-task-inbox-DL5RYFPO.js} +1 -1
  200. package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-NJXRXFLC.js} +1 -1
  201. package/dist/chunks/store-taskset-drafts-UFGN4SGF.js +9 -0
  202. package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-VRLU6NFX.js} +1 -1
  203. package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-3ZHG4LGI.js} +1 -1
  204. package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-KWQD5PRP.js} +1 -1
  205. package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-ZRS3ILF2.js} +1 -1
  206. package/dist/chunks/{taskset-NYLUYX6K.js → taskset-QDMCQQDJ.js} +1 -1
  207. package/dist/chunks/{taskset-packages-I7I5KBFP.js → taskset-packages-CBLJFWDQ.js} +1 -1
  208. package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-GF272RGC.js} +1 -1
  209. package/dist/chunks/{training-UBX6E7SK.js → training-DF5UEPY3.js} +1 -1
  210. package/dist/chunks/{training-error-AYOGHHL2.js → training-error-L5V5IBX3.js} +1 -1
  211. package/dist/chunks/training-hosted-I2NDBYGS.js +2 -0
  212. package/dist/chunks/training-hosted-report-4F25RZZ4.js +2 -0
  213. package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
  214. package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
  215. package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-5RUXYIOF.js} +1 -1
  216. package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-JRY2IE7H.js} +1 -1
  217. package/dist/cli.js +2 -2
  218. package/dist/hosted-chat.d.ts +28 -0
  219. package/dist/index.js +1 -1
  220. package/dist/skills/openpond-cli/SKILL.md +15 -2
  221. package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
  222. package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
  223. package/dist/skills/openpond-cli/references/experiments-and-training.md +155 -10
  224. package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
  225. package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
  226. package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
  227. package/dist/web/assets/App-DHJVXTI2.js +54 -0
  228. package/dist/web/assets/App-DpFKLxuA.css +1 -0
  229. package/dist/web/assets/AppDialog-BurL61qE.js +1 -0
  230. package/dist/web/assets/AppTerminalPanel-RjFlF-a4.js +2 -0
  231. package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-DZLErwj0.js} +1 -1
  232. package/dist/web/assets/AppsView-ttlr9ckQ.js +1 -0
  233. package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-CpMSfHCK.js} +1 -1
  234. package/dist/web/assets/BrowserSidebar-Cp2l0kg0.js +1 -0
  235. package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-CEbM980A.js} +1 -1
  236. package/dist/web/assets/{ChatTimelineEntry-IKzZsHoI.js → ChatTimelineEntry-BITv20Ze.js} +1 -1
  237. package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-DrKJmJZK.js} +1 -1
  238. package/dist/web/assets/{CommandMenu-CBY2AJxV.js → CommandMenu-6oj8FUr6.js} +1 -1
  239. package/dist/web/assets/CommunityView-BzpIq1lD.js +1 -0
  240. package/dist/web/assets/ComposerAttachments-6en7m_ov.js +2 -0
  241. package/dist/web/assets/ComposerCreateImproveStrip-ChplO9YP.js +1 -0
  242. package/dist/web/assets/ConversationImportsSettings-DRHgc7j_.js +1 -0
  243. package/dist/web/assets/FilePagePreview-CW4J_1u7.js +2 -0
  244. package/dist/web/assets/GetStartedView-CaBk_mX6.js +1 -0
  245. package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
  246. package/dist/web/assets/GettingStartedDialog-JtFLyU3F.js +1 -0
  247. package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-hhcjDifK.js} +1 -1
  248. package/dist/web/assets/HostedModelLearningSettings-CY8198Y1.js +1 -0
  249. package/dist/web/assets/LabModelVersionDetailPage-f0tHT-Sn.js +1 -0
  250. package/dist/web/assets/LabSkillSidebar-HibUEEko.js +1 -0
  251. package/dist/web/assets/{LabsRoute-DOnw39du.js → LabsRoute-B61l1b8P.js} +8 -8
  252. package/dist/web/assets/MainChatThread-egKi0gLk.js +2 -0
  253. package/dist/web/assets/MainPane-2dj6Dg4l.js +95 -0
  254. package/dist/web/assets/{MainPane-CuBUBA9F.css → MainPane-BwHw3UYp.css} +1 -1
  255. package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
  256. package/dist/web/assets/NativeSetupTerminal-CNHTByLo.js +2 -0
  257. package/dist/web/assets/NativeSkillSidebar-DCdMbSfe.js +1 -0
  258. package/dist/web/assets/NewProjectDialog-t9Imnb__.js +1 -0
  259. package/dist/web/assets/OutputsPage-CeGq_F1S.js +1 -0
  260. package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-VHME5V8j.js} +1 -1
  261. package/dist/web/assets/ProjectsPage-2TMZoEPB.js +1 -0
  262. package/dist/web/assets/RightChatPanelStack-B3mBViGC.js +1 -0
  263. package/dist/web/assets/RightSidebarHomePanel-CxDYSyyx.js +1 -0
  264. package/dist/web/assets/ScheduledWorkPage-Dh47iH11.js +1 -0
  265. package/dist/web/assets/SettingsView-D2bu3tK_.js +5 -0
  266. package/dist/web/assets/TeamChatView-CN17AsgA.js +1 -0
  267. package/dist/web/assets/TerminalOverlay-DlhRpi-X.js +16 -0
  268. package/dist/web/assets/TrainingCreationPanel-DJKzaNFj.js +1 -0
  269. package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-BhhZPPuY.js} +1 -1
  270. package/dist/web/assets/{TrainingMetricWorkbench-BmzHLwIP.js → TrainingMetricWorkbench-DBy8F1xp.js} +1 -1
  271. package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-DTZslBeW.js} +2 -2
  272. package/dist/web/assets/WorkSidebarPanel-Ds-eTQLs.js +1 -0
  273. package/dist/web/assets/WorkspaceDiffPanel-D_iyg2D4.js +11 -0
  274. package/dist/web/assets/WorkspaceEnvironmentMenu-Fn-NlfMQ.js +35 -0
  275. package/dist/web/assets/WorkspaceFileLocation-ChEeZffU.js +1 -0
  276. package/dist/web/assets/WorkspaceGitDialogs-D_RUXhTi.js +1 -0
  277. package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-BJxaiDrj.js} +3 -3
  278. package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-A28Poeca.js} +1 -1
  279. package/dist/web/assets/{chat-resources-CItQ4mZD.js → chat-resources-3SvnVeKv.js} +1 -1
  280. package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-dYn0pd4Q.js} +1 -1
  281. package/dist/web/assets/chevron-right-sFx2xRvT.js +1 -0
  282. package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-BYNVSWIQ-DWh9SmdB.js} +1 -1
  283. package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ZFYI4P6C-BmsNtSkR.js} +1 -1
  284. package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-DTTLbrYt.js} +1 -1
  285. package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-CRMPCFnq.js} +1 -1
  286. package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
  287. package/dist/web/assets/copy-DR4ielPn.js +1 -0
  288. package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-DmttVQ_a.js} +1 -1
  289. package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-d-2GuNvW.js} +1 -1
  290. package/dist/web/assets/external-link-B4rPiZEp.js +1 -0
  291. package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-BrIUcUk_.js} +1 -1
  292. package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-DwImGEt-.js} +1 -1
  293. package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-Ds1mkrlW.js} +1 -1
  294. package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-s15GR0Fn.js} +1 -1
  295. package/dist/web/assets/icons-CK5-nxVC.js +1 -0
  296. package/dist/web/assets/{image-C7HVlg3X.js → image-CY-sHbfQ.js} +1 -1
  297. package/dist/web/assets/{index-BsPUniZy.js → index-DYrLeSyY.js} +2 -2
  298. package/dist/web/assets/index-Dezj4Z2p.css +1 -0
  299. package/dist/web/assets/{info-BLWDShaz.js → info-aSvM8YlJ.js} +1 -1
  300. package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-vos9H2hz.js} +1 -1
  301. package/dist/web/assets/loader-circle-cyf35w3i.js +1 -0
  302. package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-pQmEaoMt.js} +1 -1
  303. package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-DgF6ZVOM.js} +1 -1
  304. package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-BPwsKvRB.js} +2 -2
  305. package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-BbMpa0_-.js} +2 -2
  306. package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-CJlccVX3.js} +2 -2
  307. package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-pWurLXbm.js} +2 -2
  308. package/dist/web/assets/{monitor-B6OuAu13.js → monitor-DlEV241C.js} +1 -1
  309. package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-fnRZSIRc.js} +1 -1
  310. package/dist/web/assets/{pdf-RXlFwNte.js → pdf-CT3zVKCE.js} +1 -1
  311. package/dist/web/assets/play-wI_3FLr4.js +1 -0
  312. package/dist/web/assets/plus-DoJe4fLj.js +1 -0
  313. package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-Bb8ecExR.js} +1 -1
  314. package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
  315. package/dist/web/assets/{python-BQXo7wMt.js → python-DXA1xp0A.js} +1 -1
  316. package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-B53QjxMO.js} +1 -1
  317. package/dist/web/assets/{save-BxXc21N6.js → save-V1Q4Fcqa.js} +1 -1
  318. package/dist/web/assets/settings-lists-CtH1A57b.js +5 -0
  319. package/dist/web/assets/square-BqSK-hv9.js +1 -0
  320. package/dist/web/assets/square-terminal-Dmgkm5zY.js +1 -0
  321. package/dist/web/assets/submit-issue-command-DRgUboVW.js +3 -0
  322. package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-B-BD2K2Q.js} +1 -1
  323. package/dist/web/assets/{training-managed-adapter-81RrdT1k.js → training-managed-adapter-BXNwgd3P.js} +1 -1
  324. package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-14942K_Z.js} +5 -5
  325. package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-DdgIcxK3.js} +1 -1
  326. package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
  327. package/dist/web/assets/{upload-NXasN1wU.js → upload-82Y6RjLi.js} +1 -1
  328. package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-BgHXNpq_.js} +1 -1
  329. package/dist/web/assets/{useAgentInventory-BV4CUWzJ.js → useAgentInventory-B-LNn3up.js} +1 -1
  330. package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CsKv22Hs.js} +1 -1
  331. package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-CPC2wsWm.js} +1 -1
  332. package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-DXOoDN9l.js} +1 -1
  333. package/dist/web/assets/{workers-u92Boudu.js → workers-Clf4hKt5.js} +1 -1
  334. package/dist/web/assets/x-IPhrr4ju.js +1 -0
  335. package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-I1tf8Uxx.js} +1 -1
  336. package/dist/web/index.html +12 -3
  337. package/docs/command-reference.md +28 -2
  338. package/package.json +2 -1
  339. package/dist/chunks/app-server-evaluations-HAAYVEXB.js +0 -2
  340. package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
  341. package/dist/chunks/chunk-4N3UF3U5.js +0 -2
  342. package/dist/chunks/chunk-6DCXAXVD.js +0 -22
  343. package/dist/chunks/chunk-BLKTUFGB.js +0 -2
  344. package/dist/chunks/chunk-E3EKBPCB.js +0 -2
  345. package/dist/chunks/chunk-F5JDBDYL.js +0 -2
  346. package/dist/chunks/chunk-JEVA7YQL.js +0 -3
  347. package/dist/chunks/chunk-KC7I6E6W.js +0 -2
  348. package/dist/chunks/chunk-OJSK4NSW.js +0 -151
  349. package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
  350. package/dist/chunks/chunk-UJBEWIR3.js +0 -8
  351. package/dist/chunks/chunk-V67IFV26.js +0 -86
  352. package/dist/chunks/chunk-VSUHJ46L.js +0 -18
  353. package/dist/chunks/chunk-X3WEQL3O.js +0 -2
  354. package/dist/chunks/chunk-XK7SPL63.js +0 -2
  355. package/dist/chunks/chunk-YR5ID2SS.js +0 -2
  356. package/dist/chunks/cli-WC45SI7E.js +0 -2
  357. package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
  358. package/dist/chunks/experiments-IWSCFDBB.js +0 -2
  359. package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
  360. package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
  361. package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
  362. package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
  363. package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
  364. package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
  365. package/dist/chunks/hosted-profile-evaluation-preparation-ZAOGDQXO.js +0 -3
  366. package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
  367. package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
  368. package/dist/chunks/opchat-KSOJEL4W.js +0 -3
  369. package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
  370. package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
  371. package/dist/chunks/saved-work-QA46KCME.js +0 -2
  372. package/dist/chunks/src-E7NWAN5B.js +0 -420
  373. package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
  374. package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
  375. package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
  376. package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
  377. package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
  378. package/dist/web/assets/App-Df7uYQGj.css +0 -1
  379. package/dist/web/assets/App-Yy3l2sdD.js +0 -56
  380. package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
  381. package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
  382. package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
  383. package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
  384. package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
  385. package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
  386. package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
  387. package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
  388. package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
  389. package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
  390. package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
  391. package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
  392. package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
  393. package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
  394. package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
  395. package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
  396. package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
  397. package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
  398. package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
  399. package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
  400. package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
  401. package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
  402. package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
  403. package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
  404. package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
  405. package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
  406. package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
  407. package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
  408. package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
  409. package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
  410. package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
  411. package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
  412. package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
  413. package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
  414. package/dist/web/assets/icons-kaq6k88m.js +0 -1
  415. package/dist/web/assets/index-DUMDOdB2.css +0 -1
  416. package/dist/web/assets/play-BPPQoqMl.js +0 -1
  417. package/dist/web/assets/plus-D18vYzHF.js +0 -1
  418. package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
  419. package/dist/web/assets/square-Da8RuqW4.js +0 -1
  420. package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as R,c as p,d as m}from"./chunk-4BJGUCHY.js";import{a as v}from"./chunk-TNHDD3LO.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import"./chunk-MTP3B2SU.js";import{A as O}from"./chunk-VSUHJ46L.js";import"./chunk-FWIPHEVA.js";import{d as P}from"./chunk-OJFDI7VM.js";import"./chunk-QCSLEMZF.js";import"./chunk-4RHM4WN2.js";import"./chunk-BLKTUFGB.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-YBNKGA5C.js";import"./chunk-ZZWAQBA2.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import{promises as $,watch as C}from"node:fs";import y from"node:path";import{execFile as J}from"node:child_process";import{promisify as k}from"node:util";var K=k(J);async function G(t,n){let e=n[0]??"check",o=y.resolve(i(t,"cwd")??process.cwd()),l=i(t,"sourceDirectory"),u=i(t,"outputDirectory"),d=b(t.json);if(e==="check"||e==="build"){let r=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u});if(d){console.log(JSON.stringify({status:"passed",actionCount:r.registry.actions.length,registry:r.registry,manifest:r.manifest,outputDirectory:r.outputDirectory},null,2));return}console.log(`${e==="check"?"Validated":"Built"} ${r.registry.actions.length} Project Action${r.registry.actions.length===1?"":"s"}.`),console.log(`Registry: ${r.registryPath}`),console.log(`Bundle: ${r.bundlePath}`);return}if(e==="run"){let r=n[1];if(!r)throw new Error("usage: openpond actions run <action-id> [--input JSON|--input-file PATH]");let a=await m({projectRoot:o,sourceDirectory:l,outputDirectory:u,build:"always"}).run({actionId:r,input:await I(t,o),timeoutMs:A(t,"timeoutMs")});console.log(JSON.stringify(a,null,2));return}if(e==="dev"){let r=n[1]??null;await _({projectRoot:o,sourceDirectory:l,outputDirectory:u,actionId:r,options:t,json:d});return}if(e==="publish"){let r=j(t,"projectId"),s=j(t,"teamId"),a=i(t,"apiKey"),w=process.env.OPENPOND_API_KEY?.trim()||null,g=a||w?null:await P({account:i(t,"account")}),h=a??w??(g?v(g):null);if(!h)throw new Error("OpenPond API key is required. Select a saved OpenPond account, set OPENPOND_API_KEY, or pass --api-key.");let N=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u}),E=i(t,"sourceCommitSha")??await D(o,["rev-parse","HEAD"]),S=i(t,"sourceRef")??await D(o,["rev-parse","--abbrev-ref","HEAD"]),f=await O({apiKey:h,baseUrl:i(t,"baseUrl")??(process.env.OPENPOND_API_URL?.trim()||g?.apiBaseUrl)}).actions.publish({projectId:r,teamId:s,sourceRef:S,sourceCommitSha:E,build:N});console.log(d?JSON.stringify({release:f},null,2):`Published Project Actions release ${f.id} from ${f.sourceCommitSha}.`);return}throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]")}c(G,"runProjectActionsCommand");async function _(t){let n=!1,e=!1,o=c(async()=>{if(n){e=!0;return}n=!0;try{let r=m({projectRoot:t.projectRoot,sourceDirectory:t.sourceDirectory,outputDirectory:t.outputDirectory,build:"always"});if(t.actionId){let s=await r.run({actionId:t.actionId,input:await I(t.options,t.projectRoot),timeoutMs:A(t.options,"timeoutMs")});console.log(JSON.stringify(s,null,2))}else{let s=await r.build(),a={status:"ready",actionCount:s.registry.actions.length,bundleHash:s.manifest.bundleHash};console.log(t.json?JSON.stringify(a):`Ready with ${a.actionCount} Project Action${a.actionCount===1?"":"s"}.`)}}catch(r){console.error(r instanceof Error?r.message:String(r))}finally{n=!1,e&&(e=!1,await o())}},"execute");await o();let l=await R(t.projectRoot),u=y.resolve(t.projectRoot,t.sourceDirectory??l.sourceDirectory??"openpond/actions");console.log(`Watching ${u}`);let d=C(u,{recursive:!0},()=>{setTimeout(()=>{o()},50)});await new Promise(r=>{let s=c(()=>{d.close(),r()},"stop");process.once("SIGINT",s),process.once("SIGTERM",s)})}c(_,"runDev");async function I(t,n){let e=i(t,"input"),o=i(t,"inputFile");if(e&&o)throw new Error("Use either --input or --input-file, not both.");return e?JSON.parse(e):o?JSON.parse(await $.readFile(y.resolve(n,o),"utf8")):{}}c(I,"actionInput");function i(t,n){let e=t[n];return typeof e=="string"&&e.trim()?e.trim():void 0}c(i,"stringOption");function j(t,n){let e=i(t,n);if(!e)throw new Error(`--${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)} is required.`);return e}c(j,"requiredOption");async function D(t,n){let{stdout:e}=await K("git",n,{cwd:t}),o=e.trim();if(!o)throw new Error(`git ${n.join(" ")} returned no value.`);return o}c(D,"gitValue");function A(t,n){let e=i(t,n);if(e===void 0)return;let o=Number(e);if(!Number.isInteger(o)||o<=0)throw new Error(`--${n} must be a positive integer.`);return o}c(A,"integerOption");export{G as runProjectActionsCommand};
2
+ import{b as R,c as p,d as m}from"./chunk-4BJGUCHY.js";import{a as v}from"./chunk-SXMR6E2W.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import"./chunk-MTP3B2SU.js";import{A as O}from"./chunk-NOSBNHGC.js";import"./chunk-JX6OX6XE.js";import{d as P}from"./chunk-UTNGEMW5.js";import"./chunk-QCSLEMZF.js";import"./chunk-B42QQUZY.js";import"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-XWDFXM3S.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import{promises as $,watch as C}from"node:fs";import y from"node:path";import{execFile as J}from"node:child_process";import{promisify as k}from"node:util";var K=k(J);async function G(t,n){let e=n[0]??"check",o=y.resolve(i(t,"cwd")??process.cwd()),l=i(t,"sourceDirectory"),u=i(t,"outputDirectory"),d=b(t.json);if(e==="check"||e==="build"){let r=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u});if(d){console.log(JSON.stringify({status:"passed",actionCount:r.registry.actions.length,registry:r.registry,manifest:r.manifest,outputDirectory:r.outputDirectory},null,2));return}console.log(`${e==="check"?"Validated":"Built"} ${r.registry.actions.length} Project Action${r.registry.actions.length===1?"":"s"}.`),console.log(`Registry: ${r.registryPath}`),console.log(`Bundle: ${r.bundlePath}`);return}if(e==="run"){let r=n[1];if(!r)throw new Error("usage: openpond actions run <action-id> [--input JSON|--input-file PATH]");let a=await m({projectRoot:o,sourceDirectory:l,outputDirectory:u,build:"always"}).run({actionId:r,input:await I(t,o),timeoutMs:A(t,"timeoutMs")});console.log(JSON.stringify(a,null,2));return}if(e==="dev"){let r=n[1]??null;await _({projectRoot:o,sourceDirectory:l,outputDirectory:u,actionId:r,options:t,json:d});return}if(e==="publish"){let r=j(t,"projectId"),s=j(t,"teamId"),a=i(t,"apiKey"),w=process.env.OPENPOND_API_KEY?.trim()||null,g=a||w?null:await P({account:i(t,"account")}),h=a??w??(g?v(g):null);if(!h)throw new Error("OpenPond API key is required. Select a saved OpenPond account, set OPENPOND_API_KEY, or pass --api-key.");let N=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u}),E=i(t,"sourceCommitSha")??await D(o,["rev-parse","HEAD"]),S=i(t,"sourceRef")??await D(o,["rev-parse","--abbrev-ref","HEAD"]),f=await O({apiKey:h,baseUrl:i(t,"baseUrl")??(process.env.OPENPOND_API_URL?.trim()||g?.apiBaseUrl)}).actions.publish({projectId:r,teamId:s,sourceRef:S,sourceCommitSha:E,build:N});console.log(d?JSON.stringify({release:f},null,2):`Published Project Actions release ${f.id} from ${f.sourceCommitSha}.`);return}throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]")}c(G,"runProjectActionsCommand");async function _(t){let n=!1,e=!1,o=c(async()=>{if(n){e=!0;return}n=!0;try{let r=m({projectRoot:t.projectRoot,sourceDirectory:t.sourceDirectory,outputDirectory:t.outputDirectory,build:"always"});if(t.actionId){let s=await r.run({actionId:t.actionId,input:await I(t.options,t.projectRoot),timeoutMs:A(t.options,"timeoutMs")});console.log(JSON.stringify(s,null,2))}else{let s=await r.build(),a={status:"ready",actionCount:s.registry.actions.length,bundleHash:s.manifest.bundleHash};console.log(t.json?JSON.stringify(a):`Ready with ${a.actionCount} Project Action${a.actionCount===1?"":"s"}.`)}}catch(r){console.error(r instanceof Error?r.message:String(r))}finally{n=!1,e&&(e=!1,await o())}},"execute");await o();let l=await R(t.projectRoot),u=y.resolve(t.projectRoot,t.sourceDirectory??l.sourceDirectory??"openpond/actions");console.log(`Watching ${u}`);let d=C(u,{recursive:!0},()=>{setTimeout(()=>{o()},50)});await new Promise(r=>{let s=c(()=>{d.close(),r()},"stop");process.once("SIGINT",s),process.once("SIGTERM",s)})}c(_,"runDev");async function I(t,n){let e=i(t,"input"),o=i(t,"inputFile");if(e&&o)throw new Error("Use either --input or --input-file, not both.");return e?JSON.parse(e):o?JSON.parse(await $.readFile(y.resolve(n,o),"utf8")):{}}c(I,"actionInput");function i(t,n){let e=t[n];return typeof e=="string"&&e.trim()?e.trim():void 0}c(i,"stringOption");function j(t,n){let e=i(t,n);if(!e)throw new Error(`--${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)} is required.`);return e}c(j,"requiredOption");async function D(t,n){let{stdout:e}=await K("git",n,{cwd:t}),o=e.trim();if(!o)throw new Error(`git ${n.join(" ")} returned no value.`);return o}c(D,"gitValue");function A(t,n){let e=i(t,n);if(e===void 0)return;let o=Number(e);if(!Number.isInteger(o)||o<=0)throw new Error(`--${n} must be a positive integer.`);return o}c(A,"integerOption");export{G as runProjectActionsCommand};
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{u as m}from"./chunk-Q66LWQGF.js";import"./chunk-TNHDD3LO.js";import{a as l}from"./chunk-HN2ZK6EV.js";import"./chunk-UJBEWIR3.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-TYHCBVQT.js";import"./chunk-VSUHJ46L.js";import"./chunk-FWIPHEVA.js";import"./chunk-BT5YNE5U.js";import"./chunk-OJFDI7VM.js";import"./chunk-QCSLEMZF.js";import"./chunk-4RHM4WN2.js";import"./chunk-BLKTUFGB.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-YBNKGA5C.js";import"./chunk-ZZWAQBA2.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{existsSync as c}from"node:fs";import{createRequire as v}from"node:module";import s from"node:path";import{fileURLToPath as E}from"node:url";var p="24.18.0";function N(e=process.versions.node){let r=/^(\d+)\.(\d+)\.(\d+)/.exec(e),n=r?Number(r[1]):Number.NaN,o=r?Number(r[2]):Number.NaN;return n===24&&o>=18?null:[`OpenPond TUI requires Node.js ${p} or newer in the Node 24 release line; detected Node.js ${e}.`,`Switch Node versions and retry (with nvm: \`nvm install ${p} && nvm use ${p}\`).`].join(`
2
+ import{u as m}from"./chunk-VSQXDS6H.js";import"./chunk-SXMR6E2W.js";import{a as l}from"./chunk-7JBB4PXS.js";import"./chunk-UC3FXTDL.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-MILEWROZ.js";import"./chunk-NOSBNHGC.js";import"./chunk-JX6OX6XE.js";import"./chunk-BT5YNE5U.js";import"./chunk-UTNGEMW5.js";import"./chunk-QCSLEMZF.js";import"./chunk-B42QQUZY.js";import"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-XWDFXM3S.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{existsSync as c}from"node:fs";import{createRequire as v}from"node:module";import s from"node:path";import{fileURLToPath as E}from"node:url";var p="24.18.0";function N(e=process.versions.node){let r=/^(\d+)\.(\d+)\.(\d+)/.exec(e),n=r?Number(r[1]):Number.NaN,o=r?Number(r[2]):Number.NaN;return n===24&&o>=18?null:[`OpenPond TUI requires Node.js ${p} or newer in the Node 24 release line; detected Node.js ${e}.`,`Switch Node versions and retry (with nvm: \`nvm install ${p} && nvm use ${p}\`).`].join(`
3
3
  `)}i(N,"openPondTuiNodeRuntimeMessage");var u=s.dirname(E(import.meta.url)),O=class extends Error{constructor(n,o){super(n);this.exitCode=o;this.name="OpenPondChildProcessExitError"}exitCode;static{i(this,"OpenPondChildProcessExitError")}};async function F(e,r,n){let o=f(e==="app-server"?"app-server":"server"),t=[...o.args,e,...P(r),...n];e==="web"&&t.push(r.noOpen===!0||r.noOpen==="true"?"--print-access-url":"--open-browser");let a=e==="web"&&typeof r.webRoot!="string"?C():null;a&&t.push("--web-root",a),await w(o.runner,t,e==="app-server"?process.cwd():o.cwd)}i(F,"runOpenPondServerCommand");async function q(e,r){b(e);let n=N();if(n)throw new l(n);let o=f("terminal"),t=f("server"),a=[...o.args,"chat",...P(R(e)),...r];await w(o.runner,a,process.cwd(),{OPENPOND_SERVER_RUNNER:t.runner,OPENPOND_SERVER_ARGS:JSON.stringify(t.args),OPENPOND_SERVER_CWD:t.cwd})}i(q,"runOpenPondTerminalCommand");function h(){if(process.env.OPENPOND_FORCE_EMBEDDED_COMPANIONS==="1")return null;let e=[s.resolve(u,"../../../.."),s.resolve(u,"../../.."),process.cwd()];for(let r of e)if(c(s.join(r,"apps","server"))&&c(s.join(r,"apps","terminal")))return r;return null}i(h,"findWorkspaceRoot");function f(e){let r=h();if(r){let t=e==="app-server"?s.join(r,"apps","server","src","app-server-entry.ts"):s.join(r,"apps",e,"src","index.ts");if(c(t)){let d=v(s.join(r,"package.json"));return{runner:process.execPath,args:[d.resolve("tsx/cli"),t],cwd:r}}let a=e==="app-server"?s.join(r,"apps","server","dist","app-server-entry.js"):s.join(r,"apps",e,"dist","index.js");if(c(a))return{runner:process.execPath,args:[a],cwd:r}}let n=_(),o=e==="app-server"?"__app-server":e==="server"?"__server":"__terminal";if(n)return{runner:process.execPath,args:[n,o],cwd:s.dirname(s.dirname(n))};if(D())return{runner:process.execPath,args:[o],cwd:process.cwd()};throw new Error(`Could not find the installed OpenPond ${e} companion.`)}i(f,"resolveAppEntrypoint");function _(){for(let e of[s.resolve(u,"../cli.js"),s.resolve(u,"../../dist/cli.js")])if(c(e))return e;return null}i(_,"installedCliEntrypoint");function C(){if(!1){let n=s.join(s.dirname(process.execPath),"web");return c(s.join(n,"index.html"))?n:null}let e=_();if(!e)return null;let r=s.join(s.dirname(e),"web");return c(s.join(r,"index.html"))?r:null}i(C,"packagedWebRoot");function D(){if(!1)return!0;let e=process.argv[1];return!!(e&&s.resolve(e)===s.resolve(process.execPath))}i(D,"isCompiledExecutable");function P(e){let r=new Set(["account","handle","baseUrl","noOpen","tui","home"]),n=[];for(let[o,t]of Object.entries(e)){if(r.has(o))continue;let a=`--${o.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`)}`;if(t===!0||t==="true")n.push(a);else{if(t===!1||t==="false")continue;n.push(a,t)}}return n}i(P,"forwardedOptions");function R(e){let r=process.cwd(),n={...e};return typeof e.cwd=="string"&&e.cwd.trim().length>0&&(n.cwd=s.resolve(r,e.cwd)),typeof e.messageFile=="string"&&e.messageFile.trim().length>0&&(n.messageFile=s.resolve(r,e.messageFile)),n}i(R,"normalizeTerminalPaths");function b(e){if(typeof e.approvalPolicy=="string"&&!["on-request","never","on-failure","untrusted"].includes(e.approvalPolicy))throw new l("approval-policy must be on-request, never, on-failure, or untrusted");if(typeof e.sandbox=="string"&&!["read-only","workspace-write","danger-full-access"].includes(e.sandbox))throw new l("sandbox must be read-only, workspace-write, or danger-full-access")}i(b,"validateTerminalForwardingOptions");async function w(e,r,n,o){let t=await m(e,r,{cwd:n,detached:!1,env:o,inherit:!0,timeoutMs:0});if(t.code!==0||t.signal){let a=t.signal?`signal ${t.signal}`:`code ${t.code??"unknown"}`;throw new O(`${s.basename(e)} exited with ${a}`,t.code??1)}}i(w,"runChild");export{O as OpenPondChildProcessExitError,F as runOpenPondServerCommand,q as runOpenPondTerminalCommand};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as u}from"./chunk-ZBBVRYU3.js";import"./chunk-BFKYRQMA.js";import"./chunk-SGK4GR44.js";import"./chunk-5ZBLCWEJ.js";import{b as m}from"./chunk-FWIPHEVA.js";import{a as l}from"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-6FA3GG5B.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";async function x(o){let n=await u(),e=process.env.OPENPOND_SANDBOX_API_KEY?.trim()||process.env.OPENPOND_API_KEY?.trim()||n.token?.trim();if(!e)throw new Error("OpenPond account API key is required to resolve connected apps.");let t=process.env.OPENPOND_SANDBOX_API_URL?.trim(),s=m({apiKey:e,...t?{sandboxApiUrl:l(t)}:{baseUrl:n.apiBaseUrl}}),d=o.status??"active";if(o.teamId?.trim())return s.integrationConnections({teamId:o.teamId.trim(),status:d});let p=await s.listOrganizations(),a=I(p);if(a.length===0)return{teamId:null,connections:[]};let c=(await Promise.all(a.map(r=>s.integrationConnections({teamId:r,status:d}).catch(()=>null)))).filter(r=>!!r);return{teamId:c.find(r=>r.connections.length>0)?.teamId??c[0]?.teamId??a[0]??null,connections:f(c)}}i(x,"listAppServerIntegrationConnections");function I(o){return Array.from(new Set(o.flatMap(n=>{if(typeof n.status=="string"&&n.status!=="active")return[];let e=n.id,t=typeof n.teamId=="string"?n.teamId:typeof e=="string"?e:"";return t.trim()?[t.trim()]:[]})))}i(I,"activeTeamIds");function f(o){let n=new Map;for(let e of o)for(let t of e.connections)n.set(t.id,t);return[...n.values()]}i(f,"mergeConnections");export{x as listAppServerIntegrationConnections};
2
+ import{a as u}from"./chunk-MNFW5WLD.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import{b as m}from"./chunk-JX6OX6XE.js";import{a as l}from"./chunk-XWDFXM3S.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";async function x(o){let n=await u(),e=process.env.OPENPOND_SANDBOX_API_KEY?.trim()||process.env.OPENPOND_API_KEY?.trim()||n.token?.trim();if(!e)throw new Error("OpenPond account API key is required to resolve connected apps.");let t=process.env.OPENPOND_SANDBOX_API_URL?.trim(),s=m({apiKey:e,...t?{sandboxApiUrl:l(t)}:{baseUrl:n.apiBaseUrl}}),d=o.status??"active";if(o.teamId?.trim())return s.integrationConnections({teamId:o.teamId.trim(),status:d});let p=await s.listOrganizations(),a=I(p);if(a.length===0)return{teamId:null,connections:[]};let c=(await Promise.all(a.map(r=>s.integrationConnections({teamId:r,status:d}).catch(()=>null)))).filter(r=>!!r);return{teamId:c.find(r=>r.connections.length>0)?.teamId??c[0]?.teamId??a[0]??null,connections:f(c)}}i(x,"listAppServerIntegrationConnections");function I(o){return Array.from(new Set(o.flatMap(n=>{if(typeof n.status=="string"&&n.status!=="active")return[];let e=n.id,t=typeof n.teamId=="string"?n.teamId:typeof e=="string"?e:"";return t.trim()?[t.trim()]:[]})))}i(I,"activeTeamIds");function f(o){let n=new Map;for(let e of o)for(let t of e.connections)n.set(t.id,t);return[...n.values()]}i(f,"mergeConnections");export{x as listAppServerIntegrationConnections};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as Y,b as Z}from"./chunk-47AXSBPV.js";import"./chunk-NBE74GLF.js";import{c as G,d as B,e as V}from"./chunk-5A6ER3M2.js";import{b as F,c as K}from"./chunk-VWRTE64Y.js";import{a as C,p as z,q as Q,r as X}from"./chunk-TM4VEMNN.js";import{a as P}from"./chunk-7JXZNCBC.js";import{a as $,b as U}from"./chunk-KUPJNBWG.js";import"./chunk-S7A2OGL2.js";import"./chunk-EWOTDVDJ.js";import"./chunk-6PKXJEJM.js";import"./chunk-GAQLXFOT.js";import"./chunk-FEAKTSRS.js";import"./chunk-HIYQPZ7C.js";import"./chunk-LJDBR3RN.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-VE6ZIGUQ.js";import"./chunk-W45RKGM6.js";import"./chunk-RBDUMASL.js";import"./chunk-F4TJ7WQV.js";import"./chunk-MEK7DLX3.js";import"./chunk-ZQHPGEYT.js";import"./chunk-GW5SE3FM.js";import{b as L}from"./chunk-FUSCTBJI.js";import"./chunk-PAE3PQEC.js";import"./chunk-7R56WC7L.js";import"./chunk-VFH5C6D2.js";import{a as W}from"./chunk-4NXEYPPX.js";import"./chunk-NWOK6NLE.js";import{Z as R}from"./chunk-5MTN6KXV.js";import"./chunk-6SH4B7DV.js";import"./chunk-LRRBYIGH.js";import"./chunk-GOIKLFXK.js";import"./chunk-Y2KPHVZK.js";import"./chunk-IZ56L2ZK.js";import{s as k,u as J}from"./chunk-B4RKHHF7.js";import"./chunk-KCJVFLBB.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import{p as N}from"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import{d as j}from"./chunk-4M3YW3EQ.js";import{x as M}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as S}from"./chunk-VVNV4NNW.js";import{A as s}from"./chunk-PF56N7ZY.js";import{a as r}from"./chunk-FTQLQJQV.js";import{createHash as le}from"node:crypto";function q(v,o){if(o.environment.kind!=="javascript")throw new Error("experiment_environment_required");let{definition:t,asset:d}=o.environment,l=j(d,t.module),p=le("sha256").update(o.id).digest("hex"),x=0;return async a=>{if(a.signal?.throwIfAborted(),a.source!==l)throw new Error("experiment_environment_source_mismatch");let c=a.value.action,n=t.executionServices?.filter(y=>y.operation===a.operation&&(a.operation!=="step"||y.toolName===c?.name))??[];if(S(a.executionServices??[])!==S(n))throw new Error("experiment_environment_services_mismatch");let u=x++,h=await v.request({contractVersion:R,requestId:`environment-${p}-${u}`,operation:"experiment/environment",params:{caseId:o.id,admissionHash:o.admissionHash,definitionHash:t.contentHash,ordinal:u,operation:a.operation,value:a.value,timeoutMs:a.timeoutMs}},3e5);return a.signal?.throwIfAborted(),M(h,1572864),N.parse(h)}}r(q,"createHostExperimentEnvironment");import{createHash as pe}from"node:crypto";var ce=s.object({text:s.string().max(262144),toolCalls:s.array(s.object({id:s.string().min(1).max(200),name:s.string().min(1).max(64),arguments:s.record(s.string(),s.unknown())}).strict()).max(200)}).strict();function H(v,o){let t=0;return async({messages:d,tools:l,signal:p})=>{p.throwIfAborted();let x=t++,a=await v.request({contractVersion:R,requestId:`experiment-${pe("sha256").update(o.id).digest("hex")}-${x}`,operation:"experiment/policy",params:{caseId:o.id,admissionHash:o.admissionHash,ordinal:x,messages:d.map(c=>({...c})),tools:l.map(c=>({...c}))}},Math.min(o.timeoutMs,3e5));return p.throwIfAborted(),ce.parse(a)}}r(H,"createHostExperimentPolicy");function ee(v,o,t){let d=H(v,o);return async function*(l){let p=o.model;if(!l.signal||l.model!==p.modelId||l.maxTokens!==p.maxOutputTokens||l.temperature!==p.temperature||l.topP!==p.topP)throw new Error("Native Experiment policy request differs from its admitted model configuration.");let x=l.messages.map(n=>{if(n.images?.length||n.continuation)throw new Error("The owner policy capability does not admit multimodal or caller-supplied continuation inputs.");if(n.role==="tool")return{role:"tool",callId:s.string().min(1).max(200).parse(n.tool_call_id),name:s.string().min(1).max(64).parse(n.name),observation:ue(n.content??"")};if(n.role==="assistant")return{role:"assistant",text:n.content??"",toolCalls:(n.tool_calls??[]).map(u=>({id:s.string().min(1).max(200).parse(u.id),name:s.string().min(1).max(64).parse(u.function?.name),arguments:s.record(s.string(),s.unknown()).parse(JSON.parse(s.string().parse(u.function?.arguments)))}))};if(n.role!=="user"&&n.role!=="system")throw new Error("Native Experiment message role is not admitted.");return{role:n.role,text:n.content??""}}),a=(l.tools??[]).map(n=>{if(n.type!=="function"||!n.function)throw new Error("Native Experiment requires declared function tools.");let u=t.find(h=>h.name===n.function.name);if(!u||S(n.function.parameters)!==u.inputSchemaHash)throw new Error("Native Experiment requested an undeclared or changed tool.");return u});if(a.length!==t.length||new Set(a.map(n=>n.name)).size!==a.length)throw new Error("Native Experiment changed its admitted tool inventory.");let c=await d({messages:x,tools:a,signal:l.signal});l.signal.throwIfAborted(),c.text&&(yield{type:"text_delta",text:c.text,raw:null}),c.toolCalls.length&&(yield{type:"tool_call_delta",toolCalls:c.toolCalls.map(n=>({id:n.id,type:"function",function:{name:n.name,arguments:JSON.stringify(n.arguments)}})),raw:null}),yield{type:"finish",finishReason:c.toolCalls.length?"tool_calls":"stop",raw:null}}}r(ee,"createHostExperimentNativeStream");function ue(v){try{let o=JSON.parse(v);return o&&typeof o=="object"&&!Array.isArray(o)?o:{output:o}}catch{return{output:v}}}r(ue,"observation");function Qe(v){let{options:o,store:t,storeDir:d,explicitProfileRelease:l,externalDataset:p,isolatedProfileTools:x,selectedEvaluationProfile:a,listProfileWorkflows:c,createSessionWithAutoTitle:n,turnRunner:u,streamOpenPondHostedChatTurn:h,publishedExperimentSource:y,standaloneExperimentOwner:D}=v,w=new AbortController,oe=G({resolveExternalDataset:p?.resolveExternalDataset,admitSession:x?.admitSession,settleSession:x?.settleSession,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),store:t,storeDir:d,selectedProfile:a,createSession:n,sendTurn:r((e,i,m)=>u.sendTurn(e,i,void 0,void 0,m),"sendTurn"),interruptSessionTurn:u.interruptSessionTurn}),T=r((e,i)=>oe(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationCase"),I=z({privateGradingPreflight:r(e=>Q(e,!1),"privateGradingPreflight"),resolveExternalDataset:p?.resolveExternalDataset,sourceCandidate:p?.sourceCandidate,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),selectedWorkflows:c,loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),modelConfigurationHash:r(async(e,i)=>{if(!o.profileSource||e.providerId!=="openpond"||!i.hostModelConfigurationHash)throw new Error("Hosted Profile evaluation requires an explicit source and trusted OpenPond model configuration receipt.");return i.hostModelConfigurationHash},"modelConfigurationHash"),placement:"remote"}),te=B({loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),privateGrading:r(async(e,i,m)=>X({manifest:e,packageValue:i,signal:m,authorize:r(async()=>{let f=await a(),E=e.profileEvaluation;if(!f||!E||f.ref.profileId!==E.profileId||f.sourceRevision!==E.sourceRevision)throw new Error("The current private Profile source changed.");p&&await p.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:e.contentHash});let O=await P({ref:f.ref,sourceRevision:f.sourceRevision,harnessRelease:E.harnessRelease,store:t});if(!E.externalDatasetBinding&&O.catalogHash!==E.catalogHash)throw new Error("The current private evaluation catalog changed.")},"authorize")}),"privateGrading"),resolveExternalDataset:p?.resolveExternalDataset,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedProfile:a,executeCase:T}),A=r((e,i)=>te(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationRun"),re=V({loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedWorkflows:c,prepareRun:I,executeRun:A}),b=Y({...y&&o.experimentPolicyClient?{executeHarness:r(async(e,i)=>{if(!e.harness||!D)throw new Error("Standalone Experiment source owner is unavailable.");return(await D.execute({executionId:e.id,request:e,source:e.harness,stream:ee(o.experimentPolicyClient,e,W(y.release)),signal:i,maxOutputBytes:262144})).attempt},"executeHarness")}:{},...o.experimentPolicyClient?{resolveEnvironment:r(async e=>q(o.experimentPolicyClient,e),"resolveEnvironment")}:{},resolvePolicy:r(async e=>o.experimentPolicyClient?H(o.experimentPolicyClient,e):Z({request:e,stream:h}),"resolvePolicy"),executeProfile:r(e=>{if(o.experimentPolicyClient)throw new Error("A model-case owner cannot execute a Profile.");return T(e)},"executeProfile")});return{listProfileEvaluations:r(async e=>{if(e&&typeof e=="object"&&!Array.isArray(e)&&"runId"in e){let _=F.parse(e),g=await a();if(!g)throw new Error("Select a Profile before inspecting an evaluation run.");return K({store:t,profileRef:g.ref,..._})}if(o.profileSource&&l){let _=await P({store:t,ref:{source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId},sourceRevision:o.profileSource.sourceRevision,harnessRelease:{id:l.harnessRelease.id,contentHash:l.harnessRelease.contentHash}}),[g,ae,se]=await Promise.all([t.listProfileEvaluationRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationComparisons({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationSuiteRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId})]);return{..._,runs:g,comparisons:ae,suiteRuns:se}}let[i,m]=await Promise.all([J(),k()]);if(!i.lastUsed)throw new Error("Select a Profile before loading its evaluations.");let f=await L({store:t,storeDir:d,ref:i.lastUsed,profile:m,reloadProfile:k}),E=await P({store:t,ref:f.profileRef,sourceRevision:f.sourceRevision,harnessRelease:f.harnessRelease}),[O,ne,ie]=await Promise.all([t.listProfileEvaluationRuns(f.profileRef),t.listProfileEvaluationComparisons(f.profileRef),t.listProfileEvaluationSuiteRuns(f.profileRef)]);return{...E,runs:O,comparisons:ne,suiteRuns:ie}},"listProfileEvaluations"),executeProfileEvaluationCase:T,executeExperimentCase:b.execute,cancelExperimentCase:r(e=>Promise.resolve(b.cancel(s.object({id:s.string().min(1)}).strict().parse(e).id)),"cancelExperimentCase"),executeProfileEvaluationRun:A,prepareProfileEvaluationRun:I,runPreparedProfileEvaluation:r(async e=>A(await I(e,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:re,compareProfileEvaluationRuns:$({store:t,selectedProfile:a}),buildProfileEvaluationReport:r(async e=>{let i=await a();if(!i)throw new Error("Select a Profile before building an evaluation report.");return U({store:t,profileRef:i.ref,request:e})},"buildProfileEvaluationReport"),async close(){w.abort(new Error("Evaluation runtime closed")),await b.close()}}}r(Qe,"createAppServerEvaluations");export{Qe as createAppServerEvaluations};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as H,c as m,d as k}from"./chunk-U4HZD2GM.js";import"./chunk-ELYRVTTG.js";import{d,f as p,g as f,h as w}from"./chunk-VZXZ6CHS.js";import"./chunk-PAZDQRYU.js";import"./chunk-AN525SPP.js";import{c as R}from"./chunk-TTN63EAM.js";import"./chunk-IZ6DLEVY.js";import"./chunk-TH6Y4K5Z.js";import"./chunk-MHYI7ATG.js";import"./chunk-3DVWJCOA.js";import"./chunk-ROE24PN5.js";import"./chunk-YU3C6U5V.js";import"./chunk-FJ3HMHT6.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-4LZLO4OW.js";import"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-UBCLPZSQ.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-LNRFRAV5.js";import"./chunk-2ITZW2CN.js";import"./chunk-CQF6QZEL.js";import"./chunk-D5ADDBS5.js";import"./chunk-QRJPLZF7.js";import"./chunk-PWK5Z5S3.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-OZ6LRNRE.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-TMMFF6DO.js";import"./chunk-BQUWZRWU.js";import"./chunk-SGK4GR44.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-CM5USMXN.js";import"./chunk-WFVOG5PU.js";import"./chunk-XGY4OQLC.js";import"./chunk-VWJ5IYQP.js";import"./chunk-E67M5WGY.js";import"./chunk-PCB65K4G.js";import"./chunk-4N3UF3U5.js";import"./chunk-HZLV773Y.js";import"./chunk-M4ZRCRJM.js";import"./chunk-VNJAAYNQ.js";import"./chunk-XK7SPL63.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-6FA3GG5B.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as t}from"./chunk-FTQLQJQV.js";function b(i){let{store:n,storeDir:s,backgroundReview:r,harnessEvaluationEnabled:o,harnessTasksetReview:c}=i,v=new AbortController,u=t(e=>{let g=e.signal?AbortSignal.any([e.signal,v.signal]):v.signal;return i.harnessEvaluationReviewStream({...e,signal:g})},"harnessEvaluationReviewStream"),l=m({store:n,storeDir:s,evaluationReviewStream:u});return{inspectHarness:t(()=>k(n),"inspectHarness"),reviewHarnessProposal:a(r,"Harness review",l.reviewHarnessProposalPayload),reviewHarness:a(o,"Harness evaluation",e=>H({store:n,request:e,stream:u,continuation:{storeDir:s,stream:u}})),acceptHarnessEvaluationReview:a(o,"Tasksets",e=>c.acceptEvaluationReview(e)),materializeHarnessEvaluationTaskset:a(o,"Tasksets",e=>c.materializeEvaluationTaskset(e)),runHarnessEvaluationBaseline:a(o,"Tasksets",e=>c.runEvaluationBaseline(e)),validateHarness:t(async()=>{let e=await R(n);return e?{valid:!0,workspaceId:e.workspaceId,harnessRelease:e.harnessRelease,agentSnapshot:e.agentSnapshot}:{valid:!1,reason:"No app-server Harness release is selected."}},"validateHarness"),updateHarnessBackgroundReview:a(r,"Background review",l.updateHarnessBackgroundReviewPayload),diffHarness:l.harnessDiffPayload,rollbackHarness:l.rollbackHarnessPayload,inspectRefiner:a(r,"Refiner",()=>d(s)),updateRefiner:a(r,"Refiner",e=>p(s,e)),activateRefiner:a(r,"Refiner",e=>f(s,e)),rollbackRefiner:a(r,"Refiner",e=>w(s,e)),async close(){v.abort(new Error("Harness runtime closed"))}}}t(b,"createAppServerHarnessServices");function a(i,n,s){return async(...r)=>{if(!i)throw new Error(`${n} is disabled in this app-server deployment.`);return s(...r)}}t(a,"guardService");export{b as createAppServerHarnessServices};
2
+ import{a as H,c as m,d as k}from"./chunk-5OSM75X5.js";import"./chunk-CJUVHE4U.js";import{d,f as p,g as f,h as w}from"./chunk-NE4ESZPT.js";import"./chunk-PAE3PQEC.js";import"./chunk-AN525SPP.js";import{c as R}from"./chunk-NWOK6NLE.js";import"./chunk-IZ6DLEVY.js";import"./chunk-6SH4B7DV.js";import"./chunk-LRRBYIGH.js";import"./chunk-Y2KPHVZK.js";import"./chunk-IZ56L2ZK.js";import"./chunk-B4RKHHF7.js";import"./chunk-VK4TPZTA.js";import"./chunk-YU3C6U5V.js";import"./chunk-557XSPVS.js";import"./chunk-KCJVFLBB.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as t}from"./chunk-FTQLQJQV.js";function b(i){let{store:n,storeDir:s,backgroundReview:r,harnessEvaluationEnabled:o,harnessTasksetReview:c}=i,v=new AbortController,u=t(e=>{let g=e.signal?AbortSignal.any([e.signal,v.signal]):v.signal;return i.harnessEvaluationReviewStream({...e,signal:g})},"harnessEvaluationReviewStream"),l=m({store:n,storeDir:s,evaluationReviewStream:u});return{inspectHarness:t(()=>k(n),"inspectHarness"),reviewHarnessProposal:a(r,"Harness review",l.reviewHarnessProposalPayload),reviewHarness:a(o,"Harness evaluation",e=>H({store:n,request:e,stream:u,continuation:{storeDir:s,stream:u}})),acceptHarnessEvaluationReview:a(o,"Tasksets",e=>c.acceptEvaluationReview(e)),materializeHarnessEvaluationTaskset:a(o,"Tasksets",e=>c.materializeEvaluationTaskset(e)),runHarnessEvaluationBaseline:a(o,"Tasksets",e=>c.runEvaluationBaseline(e)),validateHarness:t(async()=>{let e=await R(n);return e?{valid:!0,workspaceId:e.workspaceId,harnessRelease:e.harnessRelease,agentSnapshot:e.agentSnapshot}:{valid:!1,reason:"No app-server Harness release is selected."}},"validateHarness"),updateHarnessBackgroundReview:a(r,"Background review",l.updateHarnessBackgroundReviewPayload),diffHarness:l.harnessDiffPayload,rollbackHarness:l.rollbackHarnessPayload,inspectRefiner:a(r,"Refiner",()=>d(s)),updateRefiner:a(r,"Refiner",e=>p(s,e)),activateRefiner:a(r,"Refiner",e=>f(s,e)),rollbackRefiner:a(r,"Refiner",e=>w(s,e)),async close(){v.abort(new Error("Harness runtime closed"))}}}t(b,"createAppServerHarnessServices");function a(i,n,s){return async(...r)=>{if(!i)throw new Error(`${n} is disabled in this app-server deployment.`);return s(...r)}}t(a,"guardService");export{b as createAppServerHarnessServices};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{k as c,l as d}from"./chunk-WQMXEZVE.js";import"./chunk-C7M2WBWZ.js";import"./chunk-2V4LPUBH.js";import"./chunk-SD64CLJX.js";import"./chunk-FUSCTBJI.js";import"./chunk-PAE3PQEC.js";import"./chunk-O3MHHGC5.js";import"./chunk-SZKFNKWO.js";import{b}from"./chunk-R4PDSOB4.js";import"./chunk-WGLVSGFA.js";import"./chunk-7R56WC7L.js";import"./chunk-VFH5C6D2.js";import"./chunk-AN525SPP.js";import"./chunk-UT6F6AIB.js";import"./chunk-RTJCELRR.js";import"./chunk-SYUKES6H.js";import"./chunk-4NXEYPPX.js";import"./chunk-NWOK6NLE.js";import{e as a}from"./chunk-5MTN6KXV.js";import"./chunk-IZ6DLEVY.js";import"./chunk-6SH4B7DV.js";import"./chunk-LRRBYIGH.js";import"./chunk-VPDG2V2R.js";import"./chunk-GOIKLFXK.js";import"./chunk-7PXZ4X4P.js";import"./chunk-N73MU2C3.js";import"./chunk-TGEGXTPR.js";import"./chunk-GNCEZ3UP.js";import"./chunk-Y2KPHVZK.js";import"./chunk-IZ56L2ZK.js";import"./chunk-GW766ZSO.js";import"./chunk-MNFW5WLD.js";import"./chunk-QAVQJZCM.js";import"./chunk-GV3LFSMI.js";import"./chunk-7KWD2I6W.js";import"./chunk-B4RKHHF7.js";import"./chunk-VK4TPZTA.js";import"./chunk-YU3C6U5V.js";import"./chunk-MNXNZDDW.js";import"./chunk-KVTBX2UP.js";import"./chunk-557XSPVS.js";import"./chunk-LJPO3TEL.js";import"./chunk-4ZBOYWQ3.js";import"./chunk-DMFUEUAZ.js";import"./chunk-KCJVFLBB.js";import"./chunk-JHR3LF2F.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-JFXINDOQ.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-OSVGNONV.js";import"./chunk-XWDFXM3S.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as AGENT_PROTOCOL_VERSION,c as APP_SERVER_COMPOSITION,d as createOpenPondAppServer,b as runAppServerJsonl};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{f as $,g as J,h as L,i as v,j as q}from"./chunk-Q66LWQGF.js";import{c as g}from"./chunk-TNHDD3LO.js";import"./chunk-HN2ZK6EV.js";import"./chunk-UJBEWIR3.js";import"./chunk-XRKFTPHD.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import{J as C,K as G,L as k,O as W,Q as M,S as z,T as F,c as D,m as K,r as V,s as _}from"./chunk-TYHCBVQT.js";import"./chunk-VSUHJ46L.js";import"./chunk-FWIPHEVA.js";import"./chunk-BT5YNE5U.js";import{d as f}from"./chunk-OJFDI7VM.js";import"./chunk-QCSLEMZF.js";import"./chunk-4RHM4WN2.js";import"./chunk-BLKTUFGB.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-YBNKGA5C.js";import"./chunk-ZZWAQBA2.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await f(),s=m(e),t=await g(e,s),n=y(e),r=await L({apiBase:n,apiKey:t});console.log(JSON.stringify(r,null,2))}p(ie,"runAppsTools");async function se(e){let s=await f(),t=m(s),n=y(s),r=await g(s,t),i=typeof e.handle=="string"?String(e.handle):void 0,o=i?$(i):null,c=e.refresh!==void 0?w(e.refresh):void 0,l=await J({apiBase:n,apiKey:r,forceRefresh:c}),u=o?l.filter(a=>$(a.handle||a.gitOwner)===o):l;if(u.length===0){console.log("no apps found");return}if(w(e.json)){console.log(JSON.stringify({apps:u},null,2));return}for(let a of u){let d=a.handle||a.gitOwner||"unknown",h=a.repo||a.gitRepo||a.id,B=a.latestDeployment?.status||"no-deploy",R=a.latestDeployment?.gitBranch||a.defaultBranch||"-",I=a.codeVisibility||"unknown",E=a.sandbox?"yes":"no";console.log(`${d}/${h} ${B} ${R} code=${I} sandbox=${E} ${a.id}`)}}p(se,"runAppsList");async function oe(e,s){let t=typeof e.visibility=="string"?e.visibility.trim():typeof e.codeVisibility=="string"?e.codeVisibility.trim():"";if(t!=="public"&&t!=="private")throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");let n=await f(),r=m(n),i=y(n),o=await g(n,r),{app:c,handle:l,repo:u}=await v(i,o,s),a=await K(i,o,c.id,t);console.log(`${l}/${u} code_visibility=${a.app?.codeVisibility??t} app_id=${c.id}`)}p(oe,"runAppsCodeVisibility");async function ae(e){let s=await f(),t=m(s),n=await g(s,t),r=y(s),i=typeof e.appId=="string"?String(e.appId):void 0,o=await G(r,n,{appId:i});console.log(JSON.stringify(o,null,2))}p(ae,"runAppsPerformance");async function ce(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await k(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(ce,"runAppsSummary");async function le(e,s,t,n){let r=(typeof e.prompt=="string"?e.prompt:null)||n.join(" ");if(!r.trim())throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,t),a=await W(c,l,{appId:u.id,mode:s,prompt:r.trim()});console.log(JSON.stringify(a,null,2))}p(le,"runAppsAssistant");async function de(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),o=(typeof e.prompt=="string"?e.prompt:null)||s.join(" ");if(!o.trim())throw new Error("usage: apps agent create --prompt <text> [--team-id <id>]");let c=typeof e.templateRepoUrl=="string"?e.templateRepoUrl:void 0,l=typeof e.templateBranch=="string"?e.templateBranch:void 0,u=typeof e.templateLocalPath=="string"?e.templateLocalPath:void 0,a=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0;if(u&&String(u).trim().length>0)throw new Error("templateLocalPath is not supported; use templateRepoUrl");let d=typeof e.env=="string"?S(e.env,"env"):void 0;if(d){if(typeof d!="object"||Array.isArray(d))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(d))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}let h=c||l||d?{templateRepoUrl:c,templateBranch:l,envVars:d}:void 0,B=typeof e.deployEnvironment=="string"?e.deployEnvironment==="preview"?"preview":"production":void 0,R=e.deployDisabled!==void 0?w(e.deployDisabled):void 0,I=e.streamDeployLogs!==void 0?w(e.streamDeployLogs):!0,E=await C(i,r,{prompt:o.trim(),...a?{teamId:a}:{},...h?{template:h}:{},...B?{deployEnvironment:B}:{},...R!==void 0?{deployDisabled:R}:{},streamDeployLogs:I});if(!E.ok){let b=await E.text().catch(()=>"");throw new Error(`agent create failed: ${E.status} ${b}`)}let N=null,O=null,P=null;await H(E,{onConversationId:p(b=>{N=b},"onConversationId"),onItems:p(b=>{for(let A of b){let U=Q(A);U&&console.log(U);let x=A;!O&&typeof x.appId=="string"&&(O=x.appId),!P&&typeof x.deploymentId=="string"&&(P=x.deploymentId)}},"onItems")}),N&&console.log(`conversation_id: ${N}`),O&&console.log(`app_id: ${O}`),P&&console.log(`deployment_id: ${P}`);try{await J({apiBase:i,apiKey:r,forceRefresh:!0}),await L({apiBase:i,apiKey:r,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}p(de,"runAppsAgentCreate");async function pe(e,s,t,n){let r=await f(),i=m(r),o=await g(r,i),c=y(r),l=typeof e.method=="string"?String(e.method).toUpperCase():void 0,u=l&&["GET","POST","PUT","DELETE"].includes(l)?l:void 0;if(l&&!u)throw new Error("method must be GET, POST, PUT, or DELETE");let a=typeof e.body=="string"?S(String(e.body),"body"):void 0,d=typeof e.headers=="string"?S(String(e.headers),"headers"):void 0,h=typeof e.scheduleId=="string"?String(e.scheduleId):void 0,B=w(e.notifyEmail),R=w(e.summary)||w(e.withSummary),I=await M(c,o,{appId:s,deploymentId:t,toolName:n,scheduleId:h,method:u,body:a,headers:d,notifyEmail:B||void 0});if(console.log(JSON.stringify(I,null,2)),R&&I.ok){let E=await k(c,o,s);console.log(JSON.stringify({summary:E},null,2))}}p(pe,"runAppsToolsExecute");async function ue(e,s){let t=typeof e.env=="string"?e.env:typeof e.vars=="string"?e.vars:typeof e.envVars=="string"?e.envVars:null;if(!t)throw new Error("usage: apps env set <handle>/<repo> --env <json>");let n=S(t,"env");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("env must be a JSON object");let r={};for(let[d,h]of Object.entries(n)){if(typeof h!="string")throw new Error(`env value for ${d} must be a string`);if(!d.startsWith("OPENTOOL_PUBLIC_"))throw new Error("only OPENTOOL_PUBLIC_ env vars can be set");r[d]=h}let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,s),a=await V(c,l,u.id,{envVars:r});console.log(JSON.stringify(a,null,2))}p(ue,"runAppsEnvSet");async function fe(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await _(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(fe,"runAppsEnvGet");async function ge(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o,handle:c,repo:l}=await v(r,i,s),u=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,a=j(u),d=await D(r,i,o.id,{environment:a});console.log(JSON.stringify(d,null,2)),(w(e.watch)||w(e.wait)||w(e.follow))&&await q({baseUrl:r,apiKey:i,deploymentId:d.deploymentId,prefix:`[${c}/${l}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}p(ge,"runAppsDeploy");function X(e){let s={};if(typeof e.params=="string"){let n=S(String(e.params),"params");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("params must be a JSON object");for(let[r,i]of Object.entries(n))i!==void 0&&(s[r]=typeof i=="string"?i:JSON.stringify(i))}let t=p((n,r)=>{r===void 0||r===""||(s[n]=r)},"addParam");if(t("source",typeof e.source=="string"?e.source.trim():void 0),t("symbol",typeof e.symbol=="string"?e.symbol.trim():void 0),t("cursor",typeof e.cursor=="string"?e.cursor.trim():void 0),t("status",typeof e.status=="string"?e.status.trim():void 0),t("backtestRunId",typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():void 0),t("since",T(e.since,"since")),t("until",T(e.until,"until")),typeof e.limit=="string"&&e.limit.trim().length>0){let n=Number.parseInt(e.limit,10);if(!Number.isFinite(n))throw new Error("limit must be a number");t("limit",String(n))}return Object.keys(s).length?s:void 0}p(X,"resolveBacktestEventsParams");async function me(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),{app:o}=await v(i,r,s),c={...X(e)??{},appId:o.id},l=await z(i,r,{method:"GET",query:c});console.log(JSON.stringify(l,null,2))}p(me,"runBacktestEvents");async function ye(e,s){let t=typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():"";if(!t)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");let n=await f(),r=m(n),i=await g(n,r),o=y(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};
2
+ import{f as $,g as J,h as L,i as v,j as q}from"./chunk-VSQXDS6H.js";import{c as g}from"./chunk-SXMR6E2W.js";import"./chunk-7JBB4PXS.js";import"./chunk-UC3FXTDL.js";import"./chunk-XRKFTPHD.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import{J as C,K as G,L as k,O as W,Q as M,S as z,T as F,c as D,m as K,r as V,s as _}from"./chunk-MILEWROZ.js";import"./chunk-NOSBNHGC.js";import"./chunk-JX6OX6XE.js";import"./chunk-BT5YNE5U.js";import{d as f}from"./chunk-UTNGEMW5.js";import"./chunk-QCSLEMZF.js";import"./chunk-B42QQUZY.js";import"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-XWDFXM3S.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await f(),s=m(e),t=await g(e,s),n=y(e),r=await L({apiBase:n,apiKey:t});console.log(JSON.stringify(r,null,2))}p(ie,"runAppsTools");async function se(e){let s=await f(),t=m(s),n=y(s),r=await g(s,t),i=typeof e.handle=="string"?String(e.handle):void 0,o=i?$(i):null,c=e.refresh!==void 0?w(e.refresh):void 0,l=await J({apiBase:n,apiKey:r,forceRefresh:c}),u=o?l.filter(a=>$(a.handle||a.gitOwner)===o):l;if(u.length===0){console.log("no apps found");return}if(w(e.json)){console.log(JSON.stringify({apps:u},null,2));return}for(let a of u){let d=a.handle||a.gitOwner||"unknown",h=a.repo||a.gitRepo||a.id,B=a.latestDeployment?.status||"no-deploy",R=a.latestDeployment?.gitBranch||a.defaultBranch||"-",I=a.codeVisibility||"unknown",E=a.sandbox?"yes":"no";console.log(`${d}/${h} ${B} ${R} code=${I} sandbox=${E} ${a.id}`)}}p(se,"runAppsList");async function oe(e,s){let t=typeof e.visibility=="string"?e.visibility.trim():typeof e.codeVisibility=="string"?e.codeVisibility.trim():"";if(t!=="public"&&t!=="private")throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");let n=await f(),r=m(n),i=y(n),o=await g(n,r),{app:c,handle:l,repo:u}=await v(i,o,s),a=await K(i,o,c.id,t);console.log(`${l}/${u} code_visibility=${a.app?.codeVisibility??t} app_id=${c.id}`)}p(oe,"runAppsCodeVisibility");async function ae(e){let s=await f(),t=m(s),n=await g(s,t),r=y(s),i=typeof e.appId=="string"?String(e.appId):void 0,o=await G(r,n,{appId:i});console.log(JSON.stringify(o,null,2))}p(ae,"runAppsPerformance");async function ce(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await k(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(ce,"runAppsSummary");async function le(e,s,t,n){let r=(typeof e.prompt=="string"?e.prompt:null)||n.join(" ");if(!r.trim())throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,t),a=await W(c,l,{appId:u.id,mode:s,prompt:r.trim()});console.log(JSON.stringify(a,null,2))}p(le,"runAppsAssistant");async function de(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),o=(typeof e.prompt=="string"?e.prompt:null)||s.join(" ");if(!o.trim())throw new Error("usage: apps agent create --prompt <text> [--team-id <id>]");let c=typeof e.templateRepoUrl=="string"?e.templateRepoUrl:void 0,l=typeof e.templateBranch=="string"?e.templateBranch:void 0,u=typeof e.templateLocalPath=="string"?e.templateLocalPath:void 0,a=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0;if(u&&String(u).trim().length>0)throw new Error("templateLocalPath is not supported; use templateRepoUrl");let d=typeof e.env=="string"?S(e.env,"env"):void 0;if(d){if(typeof d!="object"||Array.isArray(d))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(d))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}let h=c||l||d?{templateRepoUrl:c,templateBranch:l,envVars:d}:void 0,B=typeof e.deployEnvironment=="string"?e.deployEnvironment==="preview"?"preview":"production":void 0,R=e.deployDisabled!==void 0?w(e.deployDisabled):void 0,I=e.streamDeployLogs!==void 0?w(e.streamDeployLogs):!0,E=await C(i,r,{prompt:o.trim(),...a?{teamId:a}:{},...h?{template:h}:{},...B?{deployEnvironment:B}:{},...R!==void 0?{deployDisabled:R}:{},streamDeployLogs:I});if(!E.ok){let b=await E.text().catch(()=>"");throw new Error(`agent create failed: ${E.status} ${b}`)}let N=null,O=null,P=null;await H(E,{onConversationId:p(b=>{N=b},"onConversationId"),onItems:p(b=>{for(let A of b){let U=Q(A);U&&console.log(U);let x=A;!O&&typeof x.appId=="string"&&(O=x.appId),!P&&typeof x.deploymentId=="string"&&(P=x.deploymentId)}},"onItems")}),N&&console.log(`conversation_id: ${N}`),O&&console.log(`app_id: ${O}`),P&&console.log(`deployment_id: ${P}`);try{await J({apiBase:i,apiKey:r,forceRefresh:!0}),await L({apiBase:i,apiKey:r,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}p(de,"runAppsAgentCreate");async function pe(e,s,t,n){let r=await f(),i=m(r),o=await g(r,i),c=y(r),l=typeof e.method=="string"?String(e.method).toUpperCase():void 0,u=l&&["GET","POST","PUT","DELETE"].includes(l)?l:void 0;if(l&&!u)throw new Error("method must be GET, POST, PUT, or DELETE");let a=typeof e.body=="string"?S(String(e.body),"body"):void 0,d=typeof e.headers=="string"?S(String(e.headers),"headers"):void 0,h=typeof e.scheduleId=="string"?String(e.scheduleId):void 0,B=w(e.notifyEmail),R=w(e.summary)||w(e.withSummary),I=await M(c,o,{appId:s,deploymentId:t,toolName:n,scheduleId:h,method:u,body:a,headers:d,notifyEmail:B||void 0});if(console.log(JSON.stringify(I,null,2)),R&&I.ok){let E=await k(c,o,s);console.log(JSON.stringify({summary:E},null,2))}}p(pe,"runAppsToolsExecute");async function ue(e,s){let t=typeof e.env=="string"?e.env:typeof e.vars=="string"?e.vars:typeof e.envVars=="string"?e.envVars:null;if(!t)throw new Error("usage: apps env set <handle>/<repo> --env <json>");let n=S(t,"env");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("env must be a JSON object");let r={};for(let[d,h]of Object.entries(n)){if(typeof h!="string")throw new Error(`env value for ${d} must be a string`);if(!d.startsWith("OPENTOOL_PUBLIC_"))throw new Error("only OPENTOOL_PUBLIC_ env vars can be set");r[d]=h}let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,s),a=await V(c,l,u.id,{envVars:r});console.log(JSON.stringify(a,null,2))}p(ue,"runAppsEnvSet");async function fe(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await _(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(fe,"runAppsEnvGet");async function ge(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o,handle:c,repo:l}=await v(r,i,s),u=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,a=j(u),d=await D(r,i,o.id,{environment:a});console.log(JSON.stringify(d,null,2)),(w(e.watch)||w(e.wait)||w(e.follow))&&await q({baseUrl:r,apiKey:i,deploymentId:d.deploymentId,prefix:`[${c}/${l}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}p(ge,"runAppsDeploy");function X(e){let s={};if(typeof e.params=="string"){let n=S(String(e.params),"params");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("params must be a JSON object");for(let[r,i]of Object.entries(n))i!==void 0&&(s[r]=typeof i=="string"?i:JSON.stringify(i))}let t=p((n,r)=>{r===void 0||r===""||(s[n]=r)},"addParam");if(t("source",typeof e.source=="string"?e.source.trim():void 0),t("symbol",typeof e.symbol=="string"?e.symbol.trim():void 0),t("cursor",typeof e.cursor=="string"?e.cursor.trim():void 0),t("status",typeof e.status=="string"?e.status.trim():void 0),t("backtestRunId",typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():void 0),t("since",T(e.since,"since")),t("until",T(e.until,"until")),typeof e.limit=="string"&&e.limit.trim().length>0){let n=Number.parseInt(e.limit,10);if(!Number.isFinite(n))throw new Error("limit must be a number");t("limit",String(n))}return Object.keys(s).length?s:void 0}p(X,"resolveBacktestEventsParams");async function me(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),{app:o}=await v(i,r,s),c={...X(e)??{},appId:o.id},l=await z(i,r,{method:"GET",query:c});console.log(JSON.stringify(l,null,2))}p(me,"runBacktestEvents");async function ye(e,s){let t=typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():"";if(!t)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");let n=await f(),r=m(n),i=await g(n,r),o=y(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{D as Lr,H as Or,J as Pt,K as Cr,L as Nr,M as xr,V as Z,X as it,e as Tr,j as Er,q as br,r as Ar,s as Sr,t as vr,u as Ir}from"./chunk-6DCXAXVD.js";import{d as wr}from"./chunk-OE22TAXP.js";import{c as w,d as hr,e as R,f as gr,g as _r,h as _,i as je,j as yr,k as Rt,l as me,m as D,n as kr,o as Rr,p as he,q as Pr,r as ae,t as $}from"./chunk-UGOK7VTC.js";import{A as d}from"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import{randomUUID as Dt,createHash as ho}from"node:crypto";import{promises as V,constants as Mt}from"node:fs";import Be from"node:path";var go="missing";function G(e){return e===null?go:ho("sha256").update(e).digest("hex")}c(G,"fileRevision");async function S(e){me(Be.dirname(e));try{let t=await V.lstat(e);if(!t.isFile()||t.isSymbolicLink())throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Storage must be a regular file, not a symbolic link.",action:"Use a regular file in the OpenPond home."});return await V.readFile(e,"utf8")}catch(t){if(R(t))return null;throw t}}c(S,"readOptionalFile");async function U(e){if(me(e),await V.mkdir(e,{recursive:!0,mode:448}),(await V.lstat(e)).isSymbolicLink())throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Managed storage directories cannot be symbolic links.",action:"Select a regular local storage folder."});Rt(e)}c(U,"privateDirectory");async function I(e,t,r={}){let n=Be.dirname(e);r.privateParent===!1?await V.mkdir(n,{recursive:!0,mode:448}):await U(n);let o=await V.lstat(e).catch(a=>{if(R(a))return null;throw a});if(o&&(!o.isFile()||o.isSymbolicLink()))throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Cannot replace a non-regular storage file.",action:"Use a regular file in the OpenPond home."});let i=Be.join(n,`.${Be.basename(e)}.${process.pid}.${Dt()}.tmp`);try{let a=await V.open(i,Mt.O_CREAT|Mt.O_EXCL|Mt.O_WRONLY,384);try{await a.writeFile(t),await a.sync()}finally{await a.close()}if(await V.rename(i,e),process.platform!=="win32"){let s=await V.open(n,"r");try{await s.sync()}finally{await s.close()}}}finally{await V.rm(i,{force:!0})}}c(I,"atomicWriteFile");async function L(e,t,r=1e4){let n=await we(e,r);try{return await t()}finally{await n()}}c(L,"withFileLock");async function _o(e,t){let r=`${e}.${process.pid}.${Dt()}.candidate`;try{let n=await V.open(r,"wx",384);try{await n.writeFile(t),await n.sync()}finally{await n.close()}await V.link(r,e)}finally{await V.rm(r,{force:!0})}}c(_o,"publishLock");async function we(e,t=1e4){await U(Be.dirname(e));let r=`${e}.lock`,n={pid:process.pid,nonce:Dt()},o=JSON.stringify(n),i=Date.now()+t;for(;;)try{await _o(r,o);break}catch(a){if(a.code!=="EEXIST")throw a;let s=await S(r);if(s){let l;try{l=JSON.parse(s).pid}catch{}if(typeof l=="number"&&Number.isInteger(l)&&l>0&&yo(l)){let p=await we(`${r}.reclaim`,Math.max(0,i-Date.now()));try{await S(r)===s&&await V.unlink(r).catch(f=>{if(!R(f))throw f})}finally{await p()}}}if(Date.now()>=i)throw new w({code:"STORAGE_BUSY",path:e,message:"Another OpenPond process is updating this storage.",action:"Wait for that process to finish, then retry. Do not delete a live process lock."});await new Promise(l=>setTimeout(l,25))}return async()=>{await S(r)===o&&await V.unlink(r)}}c(we,"acquireFileLock");function yo(e){try{return process.kill(e,0),!1}catch(t){return t.code==="ESRCH"}}c(yo,"processIsDead");async function M(e,t){let r=await S(e);if(r===null)return t();try{return JSON.parse(r)}catch(n){throw new w({code:"INVALID_STORAGE_JSON",path:e,message:"A storage file contains invalid JSON.",action:"Restore a verified backup or correct the file, then retry."},{cause:n})}}c(M,"readJsonFile");async function ba(e,t,r){return L(e,async()=>{let n=await r(await M(e,t));return await I(e,`${JSON.stringify(n,null,2)}
2
+ import{D as Lr,H as Or,J as Pt,K as Cr,L as Nr,M as xr,V as Z,X as it,e as Tr,j as Er,q as br,r as Ar,s as Sr,t as vr,u as Ir}from"./chunk-BKEDG3A4.js";import{d as wr}from"./chunk-OE22TAXP.js";import{c as w,d as hr,e as R,f as gr,g as _r,h as _,i as je,j as yr,k as Rt,l as me,m as D,n as kr,o as Rr,p as he,q as Pr,r as ae,t as $}from"./chunk-UGOK7VTC.js";import{A as d}from"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import{randomUUID as Dt,createHash as ho}from"node:crypto";import{promises as V,constants as Mt}from"node:fs";import Be from"node:path";var go="missing";function G(e){return e===null?go:ho("sha256").update(e).digest("hex")}c(G,"fileRevision");async function S(e){me(Be.dirname(e));try{let t=await V.lstat(e);if(!t.isFile()||t.isSymbolicLink())throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Storage must be a regular file, not a symbolic link.",action:"Use a regular file in the OpenPond home."});return await V.readFile(e,"utf8")}catch(t){if(R(t))return null;throw t}}c(S,"readOptionalFile");async function U(e){if(me(e),await V.mkdir(e,{recursive:!0,mode:448}),(await V.lstat(e)).isSymbolicLink())throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Managed storage directories cannot be symbolic links.",action:"Select a regular local storage folder."});Rt(e)}c(U,"privateDirectory");async function I(e,t,r={}){let n=Be.dirname(e);r.privateParent===!1?await V.mkdir(n,{recursive:!0,mode:448}):await U(n);let o=await V.lstat(e).catch(a=>{if(R(a))return null;throw a});if(o&&(!o.isFile()||o.isSymbolicLink()))throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Cannot replace a non-regular storage file.",action:"Use a regular file in the OpenPond home."});let i=Be.join(n,`.${Be.basename(e)}.${process.pid}.${Dt()}.tmp`);try{let a=await V.open(i,Mt.O_CREAT|Mt.O_EXCL|Mt.O_WRONLY,384);try{await a.writeFile(t),await a.sync()}finally{await a.close()}if(await V.rename(i,e),process.platform!=="win32"){let s=await V.open(n,"r");try{await s.sync()}finally{await s.close()}}}finally{await V.rm(i,{force:!0})}}c(I,"atomicWriteFile");async function L(e,t,r=1e4){let n=await we(e,r);try{return await t()}finally{await n()}}c(L,"withFileLock");async function _o(e,t){let r=`${e}.${process.pid}.${Dt()}.candidate`;try{let n=await V.open(r,"wx",384);try{await n.writeFile(t),await n.sync()}finally{await n.close()}await V.link(r,e)}finally{await V.rm(r,{force:!0})}}c(_o,"publishLock");async function we(e,t=1e4){await U(Be.dirname(e));let r=`${e}.lock`,n={pid:process.pid,nonce:Dt()},o=JSON.stringify(n),i=Date.now()+t;for(;;)try{await _o(r,o);break}catch(a){if(a.code!=="EEXIST")throw a;let s=await S(r);if(s){let l;try{l=JSON.parse(s).pid}catch{}if(typeof l=="number"&&Number.isInteger(l)&&l>0&&yo(l)){let p=await we(`${r}.reclaim`,Math.max(0,i-Date.now()));try{await S(r)===s&&await V.unlink(r).catch(f=>{if(!R(f))throw f})}finally{await p()}}}if(Date.now()>=i)throw new w({code:"STORAGE_BUSY",path:e,message:"Another OpenPond process is updating this storage.",action:"Wait for that process to finish, then retry. Do not delete a live process lock."});await new Promise(l=>setTimeout(l,25))}return async()=>{await S(r)===o&&await V.unlink(r)}}c(we,"acquireFileLock");function yo(e){try{return process.kill(e,0),!1}catch(t){return t.code==="ESRCH"}}c(yo,"processIsDead");async function M(e,t){let r=await S(e);if(r===null)return t();try{return JSON.parse(r)}catch(n){throw new w({code:"INVALID_STORAGE_JSON",path:e,message:"A storage file contains invalid JSON.",action:"Restore a verified backup or correct the file, then retry."},{cause:n})}}c(M,"readJsonFile");async function ba(e,t,r){return L(e,async()=>{let n=await r(await M(e,t));return await I(e,`${JSON.stringify(n,null,2)}
3
3
  `),n})}c(ba,"updateJsonFile");var F=d.string().trim().min(1),at=d.string().trim().max(4096),st=F.max(200).refine(e=>!["__proto__","prototype","constructor"].includes(e),"Reserved identifier"),ct=F.max(2048).refine(e=>{try{let t=new URL(e);return["http:","https:"].includes(t.protocol)&&!t.username&&!t.password&&!t.hash&&![...t.searchParams.keys()].some(r=>/(?:token|secret|password|authorization|api[_-]?key|credential)/i.test(r))}catch{return!1}},"Use an HTTP endpoint without embedded credentials; configure authentication through a credential reference."),Dr=d.strictObject({provider_id:wr,model_id:F.max(300)}),Ft=d.discriminatedUnion("mode",[d.strictObject({mode:d.literal("inherit")}),d.strictObject({mode:d.literal("custom"),ref:Dr})]),Ur=d.discriminatedUnion("source",[d.strictObject({source:d.literal("secret"),id:st}),d.strictObject({source:d.literal("env"),name:F.regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(160)})]),wo=d.strictObject({handle:F,base_url:ct.optional(),api_base_url:ct.optional(),chat_api_base_url:ct.optional(),environment:F.optional(),credential:Ur.optional(),enabled:d.boolean().optional()}),To=Tr.omit({registryId:!0,version:!0,installUrl:!0,authMethodId:!0}).extend({registryId:F.max(160).optional(),version:F.max(200).optional(),installUrl:d.string().url().optional(),authMethodId:F.max(200).optional()}),Eo=d.strictObject({acp:To.optional(),enabled:d.boolean().optional(),binary_path:F.max(4096).optional(),source_home:F.max(4096).optional(),native_mode:F.max(200).optional(),native_options:d.record(d.string().max(200),d.string().max(300)).optional(),base_url:ct.optional(),default_model:F.max(300).optional(),model_overrides:d.array(F.max(300)).max(500).optional(),credential:Ur.optional()}),Ut=d.strictObject({mode:d.enum(["auto","disabled","custom"]).optional(),custom_command:at.optional()}),Mr=d.union([d.number().int().min(1).max(32),d.literal("unlimited")]),bo=d.strictObject({enabled:d.boolean().optional(),model:Ft.optional(),isolation_mode:Ar.optional(),max_concurrent_runs:d.number().int().min(1).max(16).optional(),tool_policy:Sr.optional(),background:d.boolean().optional(),peer_messages:vr.optional()}),Ao=d.strictObject({source:d.enum(["local","github","openpond_git"]),repository_id:F,profile_id:F}),jt=d.strictObject({schema_version:d.literal(1),chat:d.strictObject({model:Dr.optional(),steer_active_responses:d.boolean().optional()}).optional(),codex:d.strictObject({reasoning_effort:xr.optional()}).optional(),permissions:d.strictObject({command_access:Nr.optional(),codex_mode:Cr.optional()}).optional(),context_compaction:d.strictObject({auto_enabled:d.boolean().optional(),trigger_percent:d.number().int().min(50).max(95).optional(),summary_model:d.literal("same_model").optional()}).optional(),subagents:d.strictObject({enabled:d.boolean().optional(),delegation_mode:Ir.optional(),default_model:Ft.optional(),max_concurrent_runs:d.number().int().min(1).max(32).optional(),max_concurrent_runs_per_provider:Mr.optional(),max_concurrent_runs_per_workspace_target:Mr.optional(),roles:d.record(br,bo).refine(e=>Object.keys(e).length<=64,"At most 64 roles").optional()}).optional(),projects:d.strictObject({branch_prefix:d.string().trim().max(48).optional(),new_project_directory:at.optional()}).optional(),defaults:d.strictObject({account_id:st.optional(),team_id:F.max(191).optional(),profile_ref:Ao.optional()}).optional(),editor:d.strictObject({language_servers:d.enum(["auto","off"]).optional(),diagnostics_while_editing:d.boolean().optional(),check_on_save:d.boolean().optional(),languages:d.strictObject({typescript:Ut.optional(),python:Ut.optional(),rust:Ut.optional()}).optional()}).optional(),training:d.strictObject({default_model:Ft.optional(),creation_mode:d.enum(["defaults","customize"]).optional(),auto_approve_evidence:d.boolean().optional()}).optional(),notifications:d.strictObject({team_chat:d.enum(["all","direct_mentions","none"]).optional()}).optional(),ui:d.strictObject({advanced_workspace_controls:d.boolean().optional()}).optional(),runtime:d.strictObject({execution_mode:d.enum(["local","hosted"]).optional(),mode:d.enum(["general","builder"]).optional()}).optional(),personalization:d.strictObject({active:F.regex(/^(builtin|custom):[a-zA-Z0-9_-]+$/).optional(),mode:d.enum(["enabled","disabled"]).optional(),user_instructions:at.optional()}).optional(),storage:d.strictObject({datasets_dir:at.optional()}).optional(),accounts:d.record(st,wo).optional(),providers:d.record(st,Eo).optional()});function ne(e,t="user"){let r=jt.parse(e);if(t==="project"){let n=new Set(["schema_version","chat","codex","permissions","context_compaction","subagents","projects","editor"]);for(let o of Object.keys(r))if(!n.has(o))throw new Error(`Setting ${o} is not permitted in project configuration.`);if(r.projects?.new_project_directory!==void 0)throw new Error("projects.new_project_directory is a user-only setting.");for(let o of Object.values(r.editor?.languages??{}))if(o.custom_command!==void 0)throw new Error("Custom editor commands must be configured in user settings.");if(r.permissions?.command_access==="full-access"||r.permissions?.codex_mode==="full-access"||r.permissions?.codex_mode==="auto-review")throw new Error("Project configuration can restrict permissions but cannot grant additional access.");for(let o of Object.values(r.subagents?.roles??{}))if(o.tool_policy&&o.tool_policy!=="read_only")throw new Error("Project roles cannot grant additional tool access.")}return r}c(ne,"validateConfigDocument");import{promises as Xt}from"node:fs";import Ne from"node:path";var lt={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},So=Object.keys(lt);for(let e of So)Object.freeze(lt[e]);Object.freeze(lt);var Fr=lt;function jr(e){let t=Object.assign({},Fr);for(let r of Object.keys(e))if(Object.hasOwn(t,r)){let n=new Set(e[r]);for(let o of t[r])n.add(o);t[r]=Object.freeze(Array.from(n))}else t[r]=Object.freeze(Array.from(e[r]));return Object.freeze(t)}c(jr,"unionWith");function Te(e){return e[e.length-1]??null}c(Te,"last");function Kt(e){return e.type==="TOMLBare"?e.name:e.value}c(Kt,"toKeyName");var qr=class{static{c(this,"TOMLVerImpl")}constructor(e,t){this.major=e,this.minor=t}lt(e,t){return this.major<e||this.major===e&&this.minor<t}gte(e,t){return this.major>e||this.major===e&&this.minor>=t}},Br=new qr(1,0),Je=new qr(1,1),vo=Je,Io={"1.0":Br,"1.0.0":Br,"1.1":Je,"1.1.0":Je,latest:Je,next:Je};function Qr(e){return e&&Io[e]||vo}c(Qr,"getTOMLVer");var $r={"unterminated-string":"Unterminated string constant","unterminated-table-key":"Unterminated table-key","unterminated-array":"Unterminated array","unterminated-inline-table":"Unterminated inline table","missing-key":"Empty bare keys are not allowed","missing-newline":"Must be a newline","missing-equals-sign":"Expected equal (=) token","missing-value":"Unspecified values are invalid","missing-comma":"Expected comma (,) token","dupe-keys":"Defining a key multiple times is invalid","unexpected-char":"Unexpected character","unexpected-token":"Unexpected token","invalid-control-character":"Control characters (codes < 0x1f and 0x7f) are not allowed","invalid-comment-character":"Invalid code point {{cp}} within comments","invalid-key-value-newline":"The key, equals sign, and value must be on the same line","invalid-inline-table-newline":"No newlines are allowed between the curly braces unless they are valid within a value","invalid-underscore":"Underscores are allowed between digits","invalid-space":"Unexpected spaces","invalid-three-quotes":"Three or more quotes are not permitted","invalid-date":"Unexpected invalid date","invalid-time":"Unexpected invalid time","invalid-leading-zero":"Leading zeros are not allowed","invalid-trailing-comma-in-inline-table":"Trailing comma is not permitted in an inline table","invalid-char-in-escape-sequence":"Invalid character in escape sequence","invalid-consecutive-dots-in-key":"Consecutive dots are not permitted in keys","invalid-code-point":"Invalid code point {{cp}}","invalid-trailing-dot-in-key":"Keys cannot end with a dot","invalid-leading-dot-in-key":"Keys cannot start with a dot"};function Lo(e,t){return t?$r[e].replace(/\{\{(.*?)\}\}/gu,(r,n)=>n in t?t[n]:`{{${n}}}`):$r[e]}c(Lo,"getMessage");var Yr=class extends SyntaxError{static{c(this,"ParseError")}constructor(e,t,r,n,o){super(Lo(e,o)),this.index=t,this.lineNumber=r,this.column=n}},u={EOF:-1,NULL:0,SOH:1,BACKSPACE:8,TABULATION:9,LINE_FEED:10,FORM_FEED:12,CARRIAGE_RETURN:13,ESCAPE:27,SO:14,US:31,SPACE:32,QUOTATION_MARK:34,HASH:35,SINGLE_QUOTE:39,PLUS_SIGN:43,COMMA:44,DASH:45,DOT:46,DIGIT_0:48,DIGIT_1:49,DIGIT_2:50,DIGIT_3:51,DIGIT_7:55,DIGIT_9:57,COLON:58,EQUALS_SIGN:61,LATIN_CAPITAL_A:65,LATIN_CAPITAL_E:69,LATIN_CAPITAL_F:70,LATIN_CAPITAL_T:84,LATIN_CAPITAL_U:85,LATIN_CAPITAL_Z:90,LEFT_BRACKET:91,BACKSLASH:92,RIGHT_BRACKET:93,UNDERSCORE:95,LATIN_SMALL_A:97,LATIN_SMALL_B:98,LATIN_SMALL_E:101,LATIN_SMALL_F:102,LATIN_SMALL_I:105,LATIN_SMALL_L:108,LATIN_SMALL_N:110,LATIN_SMALL_O:111,LATIN_SMALL_R:114,LATIN_SMALL_S:115,LATIN_SMALL_T:116,LATIN_SMALL_U:117,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,LEFT_BRACE:123,RIGHT_BRACE:125,TILDE:126,DELETE:127,PAD:128,SUPERSCRIPT_TWO:178,SUPERSCRIPT_THREE:179,SUPERSCRIPT_ONE:185,VULGAR_FRACTION_ONE_QUARTER:188,VULGAR_FRACTION_THREE_QUARTERS:190,LATIN_CAPITAL_LETTER_A_WITH_GRAVE:192,LATIN_CAPITAL_LETTER_O_WITH_DIAERESIS:214,LATIN_CAPITAL_LETTER_O_WITH_STROKE:216,LATIN_SMALL_LETTER_O_WITH_DIAERESIS:246,LATIN_SMALL_LETTER_O_WITH_STROKE:248,GREEK_SMALL_REVERSED_DOTTED_LUNATE_SIGMA_SYMBOL:891,GREEK_CAPITAL_LETTER_YOT:895,CP_1FFF:8191,ZERO_WIDTH_NON_JOINER:8204,ZERO_WIDTH_JOINER:8205,UNDERTIE:8255,CHARACTER_TIE:8256,SUPERSCRIPT_ZERO:8304,CP_218F:8591,CIRCLED_DIGIT_ONE:9312,NEGATIVE_CIRCLED_DIGIT_ZERO:9471,GLAGOLITIC_CAPITAL_LETTER_AZU:11264,CP_2FEF:12271,IDEOGRAPHIC_COMMA:12289,CP_D7FF:55295,CP_E000:57344,CJK_COMPATIBILITY_IDEOGRAPH_F900:63744,ARABIC_LIGATURE_SALAAMUHU_ALAYNAA:64975,ARABIC_LIGATURE_SALLA_USED_AS_KORANIC_STOP_SIGN_ISOLATED_FORM:65008,REPLACEMENT_CHARACTER:65533,LINEAR_B_SYLLABLE_B008_A:65536,CP_EFFFF:983039,CP_10FFFF:1114111};function Oo(e){return e>=u.NULL&&e<=u.US}c(Oo,"isControl");function $e(e){return e===u.TABULATION||e===u.SPACE}c($e,"isWhitespace");function Vr(e){return e===u.LINE_FEED||e===u.CARRIAGE_RETURN}c(Vr,"isEOL");function Co(e){return e>=u.LATIN_CAPITAL_A&&e<=u.LATIN_CAPITAL_Z}c(Co,"isUpperLetter");function No(e){return e>=u.LATIN_SMALL_A&&e<=u.LATIN_SMALL_Z}c(No,"isLowerLetter");function xo(e){return No(e)||Co(e)}c(xo,"isLetter");function N(e){return e>=u.DIGIT_0&&e<=u.DIGIT_9}c(N,"isDigit");function Gr(e){return N(e)||e>=u.LATIN_SMALL_A&&e<=u.LATIN_SMALL_F||e>=u.LATIN_CAPITAL_A&&e<=u.LATIN_CAPITAL_F}c(Gr,"isHexDig");function ko(e){return e>=u.DIGIT_0&&e<=u.DIGIT_7}c(ko,"isOctalDig");function Ro(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}c(Ro,"isUnicodeScalarValue");function Po(e,t){let r=0,n=e.length;for(;r<n;){let o=r+n>>>1,i=e[o];if(i===t)return o+1;i<t?r=o+1:n=o}return r}c(Po,"sortedLastIndex");var Mo=class{static{c(this,"Locations")}constructor(){this.offsets=[]}addOffset(e){for(let t=this.offsets.length-1;t>=0;t--){let r=this.offsets[t];if(r===e)return;if(r<e)break}this.offsets.push(e)}getLocFromIndex(e){let t=Po(this.offsets,e)+1;return{line:t,column:e-(t===1?0:this.offsets[t-2])}}},Do=class{static{c(this,"CodePointIterator")}constructor(e){this.locs=new Mo,this.lastCodePoint=u.NULL,this.start=-1,this.end=0,this.text=e}next(){return this.lastCodePoint===u.EOF?u.EOF:this.lastCodePoint=this.moveAt(this.end)}getLocFromIndex(e){return this.locs.getLocFromIndex(e)}eat(e){return this.text.codePointAt(this.end)===e?(this.next(),!0):!1}moveAt(e){this.start=this.end=e;let t=this.text.codePointAt(this.start)??u.EOF;if(t===u.EOF)return this.end=this.start,t;if(this.end+=t>=65536?2:1,t===u.LINE_FEED)this.locs.addOffset(this.end);else if(t===u.CARRIAGE_RETURN)return this.text.codePointAt(this.end)===u.LINE_FEED&&(this.end++,this.locs.addOffset(this.end)),u.LINE_FEED;return t}},Uo=typeof BigInt<"u",Fo={16:"0x",10:"",8:"0o",2:"0b"},Zr={[u.QUOTATION_MARK]:u.QUOTATION_MARK,[u.BACKSLASH]:u.BACKSLASH,[u.LATIN_SMALL_B]:u.BACKSPACE,[u.LATIN_SMALL_F]:u.FORM_FEED,[u.LATIN_SMALL_N]:u.LINE_FEED,[u.LATIN_SMALL_R]:u.CARRIAGE_RETURN,[u.LATIN_SMALL_T]:u.TABULATION},jo={...Zr,[u.LATIN_SMALL_E]:u.ESCAPE},Bo=class{static{c(this,"Tokenizer")}constructor(e,t){this.backCode=!1,this.lastCodePoint=u.NULL,this.state="DATA",this.token=null,this.tokenStart=-1,this.valuesEnabled=!1,this.text=e,this.parserOptions=t||{},this.codePointIterator=new Do(e),this.tomlVersion=Qr(this.parserOptions.tomlVersion),this.ESCAPES=this.tomlVersion.gte(1,1)?jo:Zr}get start(){return this.codePointIterator.start}get end(){return this.codePointIterator.end}getLocFromIndex(e){return this.codePointIterator.getLocFromIndex(e)}reportParseError(e,t){let r=this.codePointIterator.start,n=this.codePointIterator.getLocFromIndex(r);throw new Yr(e,r,n.line,n.column,t)}nextToken(){let e=this.token;if(e!=null)return this.token=null,e;let t=this.lastCodePoint;for(;t!==u.EOF&&!this.token;){t=this.nextCode();let r=this[this.state](t);if(!r)throw new Error(`Unknown error: pre state=${this.state}`);this.state=r}return e=this.token,this.token=null,e}nextCode(){return this.lastCodePoint===u.EOF?u.EOF:this.backCode?(this.backCode=!1,this.lastCodePoint):this.lastCodePoint=this.codePointIterator.next()}eatCode(e){return this.lastCodePoint===u.EOF?!1:this.backCode?this.lastCodePoint===e?(this.backCode=!1,!0):!1:this.codePointIterator.eat(e)}moveAt(e){this.backCode&&(this.backCode=!1),this.lastCodePoint=this.codePointIterator.moveAt(e)}back(e){return this.backCode=!0,e}punctuatorToken(){this.startToken(),this.endToken("Punctuator","end")}startToken(){this.tokenStart=this.codePointIterator.start}endToken(e,t,r,n){let{tokenStart:o}=this,i=this.codePointIterator[t],a=[o,i],s={start:this.codePointIterator.getLocFromIndex(o),end:this.codePointIterator.getLocFromIndex(i)};if(e==="Block")this.token={type:e,value:this.text.slice(o+1,i),range:a,loc:s};else{let l,p=this.text.slice(o,i);if(e==="BasicString"||e==="LiteralString"||e==="MultiLineBasicString"||e==="MultiLineLiteralString")l={type:e,value:p,string:r,range:a,loc:s};else if(e==="Integer"){let f=r;l={type:e,value:p,number:parseInt(f,n),bigint:Uo?BigInt(Fo[n]+f):null,range:a,loc:s}}else e==="Float"?l={type:e,value:p,number:r,range:a,loc:s}:e==="Boolean"?l={type:e,value:p,boolean:r,range:a,loc:s}:e==="LocalDate"||e==="LocalTime"||e==="LocalDateTime"||e==="OffsetDateTime"?l={type:e,value:p,date:r,range:a,loc:s}:l={type:e,value:p,range:a,loc:s};this.token=l}}DATA(e){for(;$e(e)||Vr(e);)e=this.nextCode();if(e===u.HASH)return this.startToken(),"COMMENT";if(e===u.QUOTATION_MARK)return this.startToken(),"BASIC_STRING";if(e===u.SINGLE_QUOTE)return this.startToken(),"LITERAL_STRING";if(e===u.DOT||e===u.EQUALS_SIGN||e===u.LEFT_BRACKET||e===u.RIGHT_BRACKET||e===u.LEFT_BRACE||e===u.RIGHT_BRACE||e===u.COMMA)return this.punctuatorToken(),"DATA";if(this.valuesEnabled){if(e===u.DASH||e===u.PLUS_SIGN)return this.startToken(),"SIGN";if(e===u.LATIN_SMALL_N||e===u.LATIN_SMALL_I)return this.startToken(),this.back("NAN_OR_INF");if(N(e))return this.startToken(),this.back("NUMBER");if(e===u.LATIN_SMALL_T||e===u.LATIN_SMALL_F)return this.startToken(),this.back("BOOLEAN")}else if(Kr(e,this.tomlVersion))return this.startToken(),"BARE";return e===u.EOF?"DATA":this.reportParseError("unexpected-char")}COMMENT(e){let t=this.tomlVersion.gte(1,1)?r=>{$o(r)||this.reportParseError("invalid-comment-character",{cp:JSON.stringify(String.fromCodePoint(r)).slice(1,-1)})}:r=>{Ve(r)&&this.reportParseErrorControlChar()};for(;!Vr(e)&&e!==u.EOF;)t(e),e=this.nextCode();return this.endToken("Block","start"),"DATA"}BARE(e){for(;Kr(e,this.tomlVersion);)e=this.nextCode();return this.endToken("Bare","start"),this.back("DATA")}BASIC_STRING(e){if(e===u.QUOTATION_MARK)return e=this.nextCode(),e===u.QUOTATION_MARK?"MULTI_LINE_BASIC_STRING":(this.endToken("BasicString","start",""),this.back("DATA"));let t=[];for(;e!==u.QUOTATION_MARK&&e!==u.EOF&&e!==u.LINE_FEED;){if(Ve(e))return this.reportParseErrorControlChar();if(e===u.BACKSLASH){e=this.nextCode();let r=this.ESCAPES[e];if(r){t.push(r),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_U){let n=this.parseUnicode(4);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_CAPITAL_U){let n=this.parseUnicode(8);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_X&&this.tomlVersion.gte(1,1)){let n=this.parseUnicode(2);t.push(n),e=this.nextCode();continue}return this.reportParseError("invalid-char-in-escape-sequence")}t.push(e),e=this.nextCode()}return e!==u.QUOTATION_MARK?this.reportParseError("unterminated-string"):(this.endToken("BasicString","end",String.fromCodePoint(...t)),"DATA")}MULTI_LINE_BASIC_STRING(e){let t=[];for(e===u.LINE_FEED&&(e=this.nextCode());e!==u.EOF;){if(e!==u.LINE_FEED&&Ve(e))return this.reportParseErrorControlChar();if(e===u.QUOTATION_MARK){let r=this.codePointIterator.start;if(this.eatCode(u.QUOTATION_MARK)&&this.eatCode(u.QUOTATION_MARK))return this.eatCode(u.QUOTATION_MARK)&&(t.push(u.QUOTATION_MARK),this.eatCode(u.QUOTATION_MARK)&&(t.push(u.QUOTATION_MARK),this.eatCode(u.QUOTATION_MARK)))?(this.moveAt(r),this.reportParseError("invalid-three-quotes")):(this.endToken("MultiLineBasicString","end",String.fromCodePoint(...t)),"DATA");this.moveAt(r)}if(e===u.BACKSLASH){e=this.nextCode();let r=this.ESCAPES[e];if(r){t.push(r),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_U){let n=this.parseUnicode(4);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_CAPITAL_U){let n=this.parseUnicode(8);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_X&&this.tomlVersion.gte(1,1)){let n=this.parseUnicode(2);t.push(n),e=this.nextCode();continue}else if(e===u.LINE_FEED){for(e=this.nextCode();$e(e)||e===u.LINE_FEED;)e=this.nextCode();continue}else if($e(e)){let n=!0,o=this.codePointIterator.start,i;for(;(i=this.nextCode())!==u.EOF&&i!==u.LINE_FEED;)if(!$e(i)){this.moveAt(o),n=!1;break}if(n){for(e=this.nextCode();$e(e)||e===u.LINE_FEED;)e=this.nextCode();continue}}return this.reportParseError("invalid-char-in-escape-sequence")}t.push(e),e=this.nextCode()}return this.reportParseError("unterminated-string")}LITERAL_STRING(e){if(e===u.SINGLE_QUOTE)return e=this.nextCode(),e===u.SINGLE_QUOTE?"MULTI_LINE_LITERAL_STRING":(this.endToken("LiteralString","start",""),this.back("DATA"));let t=[];for(;e!==u.SINGLE_QUOTE&&e!==u.EOF&&e!==u.LINE_FEED;){if(Ve(e))return this.reportParseErrorControlChar();t.push(e),e=this.nextCode()}return e!==u.SINGLE_QUOTE?this.reportParseError("unterminated-string"):(this.endToken("LiteralString","end",String.fromCodePoint(...t)),"DATA")}MULTI_LINE_LITERAL_STRING(e){let t=[];for(e===u.LINE_FEED&&(e=this.nextCode());e!==u.EOF;){if(e!==u.LINE_FEED&&Ve(e))return this.reportParseErrorControlChar();if(e===u.SINGLE_QUOTE){let r=this.codePointIterator.start;if(this.eatCode(u.SINGLE_QUOTE)&&this.eatCode(u.SINGLE_QUOTE))return this.eatCode(u.SINGLE_QUOTE)&&(t.push(u.SINGLE_QUOTE),this.eatCode(u.SINGLE_QUOTE)&&(t.push(u.SINGLE_QUOTE),this.eatCode(u.SINGLE_QUOTE)))?(this.moveAt(r),this.reportParseError("invalid-three-quotes")):(this.endToken("MultiLineLiteralString","end",String.fromCodePoint(...t)),"DATA");this.moveAt(r)}t.push(e),e=this.nextCode()}return this.reportParseError("unterminated-string")}SIGN(e){return e===u.LATIN_SMALL_N||e===u.LATIN_SMALL_I?this.back("NAN_OR_INF"):N(e)?this.back("NUMBER"):this.reportParseError("unexpected-char")}NAN_OR_INF(e){if(e===u.LATIN_SMALL_N){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_A)&&this.eatCode(u.LATIN_SMALL_N))return this.endToken("Float","end",NaN),"DATA";this.moveAt(t)}else if(e===u.LATIN_SMALL_I){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_N)&&this.eatCode(u.LATIN_SMALL_F))return this.endToken("Float","end",this.text[this.tokenStart]==="-"?-1/0:1/0),"DATA";this.moveAt(t)}return this.reportParseError("unexpected-char")}NUMBER(e){let t=this.text[this.tokenStart],r=t==="+"?u.PLUS_SIGN:t==="-"?u.DASH:u.NULL;if(e===u.DIGIT_0){if(r===u.NULL){let a=this.codePointIterator.start,s=this.nextCode();if(N(s)){let l=this.nextCode();if(l===u.COLON)return this.data={hasDate:!1,year:0,month:0,day:0,hour:Number(String.fromCodePoint(u.DIGIT_0,s)),minute:0,second:0},"TIME_MINUTE";if(N(l)){let p=this.nextCode();if(N(p)&&this.eatCode(u.DASH))return this.data={hasDate:!0,year:Number(String.fromCodePoint(u.DIGIT_0,s,l,p)),month:0,day:0,hour:0,minute:0,second:0},"DATE_MONTH"}return this.moveAt(a),this.reportParseError("invalid-leading-zero")}this.moveAt(a)}return e=this.nextCode(),e===u.LATIN_SMALL_X||e===u.LATIN_SMALL_O||e===u.LATIN_SMALL_B?r!==u.NULL?this.reportParseError("unexpected-char"):e===u.LATIN_SMALL_X?"HEX":e===u.LATIN_SMALL_O?"OCTAL":"BINARY":e===u.LATIN_SMALL_E||e===u.LATIN_CAPITAL_E?(this.data={minus:r===u.DASH,left:[u.DIGIT_0]},"EXPONENT_RIGHT"):e===u.DOT?(this.data={minus:r===u.DASH,absInt:[u.DIGIT_0]},"FRACTIONAL_RIGHT"):(this.endToken("Integer","start","0",10),this.back("DATA"))}let{out:n,nextCp:o,hasUnderscore:i}=this.parseDigits(e,N);return o===u.DASH&&r===u.NULL&&!i&&n.length===4?(this.data={hasDate:!0,year:Number(String.fromCodePoint(...n)),month:0,day:0,hour:0,minute:0,second:0},"DATE_MONTH"):o===u.COLON&&r===u.NULL&&!i&&n.length===2?(this.data={hasDate:!1,year:0,month:0,day:0,hour:Number(String.fromCodePoint(...n)),minute:0,second:0},"TIME_MINUTE"):o===u.LATIN_SMALL_E||o===u.LATIN_CAPITAL_E?(this.data={minus:r===u.DASH,left:n},"EXPONENT_RIGHT"):o===u.DOT?(this.data={minus:r===u.DASH,absInt:n},"FRACTIONAL_RIGHT"):(this.endToken("Integer","start",r===u.DASH?String.fromCodePoint(u.DASH,...n):String.fromCodePoint(...n),10),this.back("DATA"))}HEX(e){let{out:t}=this.parseDigits(e,Gr);return this.endToken("Integer","start",String.fromCodePoint(...t),16),this.back("DATA")}OCTAL(e){let{out:t}=this.parseDigits(e,ko);return this.endToken("Integer","start",String.fromCodePoint(...t),8),this.back("DATA")}BINARY(e){let{out:t}=this.parseDigits(e,r=>r===u.DIGIT_0||r===u.DIGIT_1);return this.endToken("Integer","start",String.fromCodePoint(...t),2),this.back("DATA")}FRACTIONAL_RIGHT(e){let{minus:t,absInt:r}=this.data,{out:n,nextCp:o}=this.parseDigits(e,N),i=[...r,u.DOT,...n];if(o===u.LATIN_SMALL_E||o===u.LATIN_CAPITAL_E)return this.data={minus:t,left:i},"EXPONENT_RIGHT";let a=Number(t?String.fromCodePoint(u.DASH,...i):String.fromCodePoint(...i));return this.endToken("Float","start",a),this.back("DATA")}EXPONENT_RIGHT(e){let{left:t,minus:r}=this.data,n=!1;(e===u.DASH||e===u.PLUS_SIGN)&&(n=e===u.DASH,e=this.nextCode());let{out:o}=this.parseDigits(e,N),i=o;n&&i.unshift(u.DASH);let a=Number(r?String.fromCodePoint(u.DASH,...t,u.LATIN_SMALL_E,...i):String.fromCodePoint(...t,u.LATIN_SMALL_E,...i));return this.endToken("Float","start",a),this.back("DATA")}BOOLEAN(e){if(e===u.LATIN_SMALL_T){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_R)&&this.eatCode(u.LATIN_SMALL_U)&&this.eatCode(u.LATIN_SMALL_E))return this.endToken("Boolean","end",!0),"DATA";this.moveAt(t)}else if(e===u.LATIN_SMALL_F){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_A)&&this.eatCode(u.LATIN_SMALL_L)&&this.eatCode(u.LATIN_SMALL_S)&&this.eatCode(u.LATIN_SMALL_E))return this.endToken("Boolean","end",!1),"DATA";this.moveAt(t)}return this.reportParseError("unexpected-char")}DATE_MONTH(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),e!==u.DASH)return this.reportParseError("unexpected-char");let r=this.codePointIterator.start,n=this.data;return n.month=Number(this.text.slice(t,r)),"DATE_DAY"}DATE_DAY(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let r=this.codePointIterator.end,n=this.data;if(n.day=Number(this.text.slice(t,r)),!Go(n.year,n.month,n.day))return this.reportParseError("invalid-date");if(e=this.nextCode(),e===u.LATIN_CAPITAL_T||e===u.LATIN_SMALL_T)return"TIME_HOUR";if(e===u.SPACE){let i=this.codePointIterator.start;if(N(this.nextCode())&&N(this.nextCode()))return this.moveAt(i),"TIME_HOUR";this.moveAt(i)}let o=Ge(n,"");return this.endToken("LocalDate","start",o),this.back("DATA")}TIME_HOUR(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),e!==u.COLON)return this.reportParseError("unexpected-char");let r=this.codePointIterator.start,n=this.data;return n.hour=Number(this.text.slice(t,r)),"TIME_MINUTE"}TIME_MINUTE(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let r=this.codePointIterator.end,n=this.data;return n.minute=Number(this.text.slice(t,r)),e=this.nextCode(),e===u.COLON?"TIME_SECOND":this.tomlVersion.lt(1,1)?this.reportParseError("unexpected-char"):Bt(n.hour,n.minute,n.second)?this.processTimeEnd(e,n):this.reportParseError("invalid-time")}TIME_SECOND(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let r=this.codePointIterator.end,n=this.data;return n.second=Number(this.text.slice(t,r)),Bt(n.hour,n.minute,n.second)?(e=this.nextCode(),e===u.DOT?"TIME_SEC_FRAC":this.processTimeEnd(e,n)):this.reportParseError("invalid-time")}TIME_SEC_FRAC(e){if(!N(e))return this.reportParseError("unexpected-char");let t=this.codePointIterator.start;for(;N(e);)e=this.nextCode();let r=this.codePointIterator.start,n=this.data;return n.frac=this.text.slice(t,r),this.processTimeEnd(e,n)}processTimeEnd(e,t){if(t.hasDate){if(e===u.DASH||e===u.PLUS_SIGN)return t.offsetSign=e,"TIME_OFFSET";if(e===u.LATIN_CAPITAL_Z||e===u.LATIN_SMALL_Z){let o=Ge(t,"Z");return this.endToken("OffsetDateTime","end",o),"DATA"}let n=Ge(t,"");return this.endToken("LocalDateTime","start",n),this.back("DATA")}let r=Ge(t,"");return this.endToken("LocalTime","start",r),this.back("DATA")}TIME_OFFSET(e){if(!N(e))return this.reportParseError("unexpected-char");let t=this.codePointIterator.start;if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),e!==u.COLON)return this.reportParseError("unexpected-char");let r=this.codePointIterator.start;e=this.nextCode();let n=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let o=this.codePointIterator.end,i=Number(this.text.slice(t,r)),a=Number(this.text.slice(n,o));if(!Bt(i,a,0))return this.reportParseError("invalid-time");let s=this.data,l=Ge(s,`${String.fromCodePoint(s.offsetSign)}${ge(i,2)}:${ge(a,2)}`);return this.endToken("OffsetDateTime","end",l),"DATA"}parseDigits(e,t){if(e===u.UNDERSCORE)return this.reportParseError("invalid-underscore");if(!t(e))return this.reportParseError("unexpected-char");let r=[],n=u.NULL,o=!1;for(;t(e)||e===u.UNDERSCORE;){if(e===u.UNDERSCORE){if(o=!0,n===u.UNDERSCORE)return this.reportParseError("invalid-underscore")}else r.push(e);n=e,e=this.nextCode()}return n===u.UNDERSCORE?this.reportParseError("invalid-underscore"):{out:r,nextCp:e,hasUnderscore:o}}parseUnicode(e){let t=this.codePointIterator.start,r=this.codePointIterator.end,n=0,o;for(;(o=this.nextCode())!==u.EOF;){if(!Gr(o))return this.moveAt(t),this.reportParseError("invalid-char-in-escape-sequence");if(n++,n>=e)break}let i=this.codePointIterator.end,a=this.text.slice(r,i),s=parseInt(a,16);return Ro(s)?s:this.reportParseError("invalid-code-point",{cp:a})}reportParseErrorControlChar(){return this.reportParseError("invalid-control-character")}};function Kr(e,t){return xo(e)||N(e)||e===u.UNDERSCORE||e===u.DASH?!0:(t.lt(1,1),!1)}c(Kr,"isUnquotedKeyChar");function Ve(e){return Oo(e)&&e!==u.TABULATION||e===u.DELETE}c(Ve,"isControlOtherThanTab");function $o(e){return e===u.TABULATION||u.SPACE<=e&&e<=u.TILDE||Vo(e)}c($o,"isNonEOL");function Vo(e){return u.PAD<=e&&e<=u.CP_D7FF||u.CP_E000<=e&&e<=u.CP_10FFFF}c(Vo,"isNonAscii");function Go(e,t,r){return e>=0&&t<=12&&t>=1&&r>=1?r<=(t===2?e&3||!(e%25)&&e&15?28:29:30+(t+(t>>3)&1)):!1}c(Go,"isValidDate");function Bt(e,t,r){return!(e>=24||e<0||t>59||t<0||r>60||r<0)}c(Bt,"isValidTime");function Ge(e,t){let r=ge(e.year,4),n=e.month?ge(e.month,2):"01",o=e.day?ge(e.day,2):"01",i=ge(e.hour,2),a=ge(e.minute,2),s=ge(e.second,2),l=`${r}-${n}-${o}`,p=e.frac?`.${e.frac}`:"",f=new Date(`${l}T${i}:${a}:${s}${p}${t}`);return!isNaN(f.getTime())||e.second!==60?f:new Date(`${l}T${i}:${a}:59${p}${t}`)}c(Ge,"getDateFromDateTimeData");function ge(e,t){return String(e).padStart(t,"0")}c(ge,"padStart");var Ht=Symbol("VALUE_KIND_VALUE"),Hr=Symbol("VALUE_KIND_INTERMEDIATE"),Ko=class{static{c(this,"KeysResolver")}constructor(e){this.rootKeys=new Map,this.tables=[],this.ctx=e}applyResolveKeyForTable(e){let t=this.rootKeys,r=e.key.keys.length-1;for(let a=0;a<r;a++){let s=e.key.keys[a],l=Kt(s);e.resolvedKey.push(l);let p=t.get(l);if(!p)p={node:s,keys:new Map},t.set(l,p);else if(p.table==="array"){let f=p.peekIndex;e.resolvedKey.push(f),p=p.keys.get(f)}t=p.keys}let n=e.key.keys[r],o=Kt(n);e.resolvedKey.push(o);let i=t.get(o);if(i)if(i.table)if(i.table==="array")if(e.kind==="array"){let a={node:n,keys:new Map},s=i.peekIndex+1;e.resolvedKey.push(s),i.keys.set(s,a),i.peekIndex=s,this.tables.push({node:e,keys:a.keys})}else this.ctx.reportParseError("dupe-keys",n);else this.ctx.reportParseError("dupe-keys",n);else if(e.kind==="array")this.ctx.reportParseError("dupe-keys",n);else{let a={table:e.kind,node:n,keys:i.keys};t.set(o,a),this.tables.push({node:e,keys:a.keys})}else if(e.kind==="array"){e.resolvedKey.push(0);let a={node:n,keys:new Map};t.set(o,{table:e.kind,node:n,keys:new Map([[0,a]]),peekIndex:0}),this.tables.push({node:e,keys:a.keys})}else{let a={table:e.kind,node:n,keys:new Map};t.set(o,a),this.tables.push({node:e,keys:a.keys})}}verifyDuplicateKeys(e){for(let t of e.body)t.type==="TOMLKeyValue"&&Jt(this.ctx,this.rootKeys,t);for(let{node:t,keys:r}of this.tables)for(let n of t.body)Jt(this.ctx,r,n)}};function Jt(e,t,r){let n=t,o=Te(r.key.keys);for(let i of r.key.keys){let a=Kt(i),s=n.get(a);s?((s.value===Ht||o===i||s.table)&&e.reportParseError("dupe-keys",ut(i,s.node)),s.value=Hr):(o===i?s={value:Ht,node:i,keys:new Map}:s={value:Hr,node:i,keys:new Map},n.set(a,s)),n=s.keys}r.value.type==="TOMLInlineTable"?en(e,n,r.value):r.value.type==="TOMLArray"&&tn(e,n,r.value)}c(Jt,"verifyDuplicateKeysForKeyValue");function en(e,t,r){for(let n of r.body)Jt(e,t,n)}c(en,"verifyDuplicateKeysForInlineTable");function tn(e,t,r){let n=t;for(let o=0;o<r.elements.length;o++){let i=r.elements[o],a=n.get(o);a?e.reportParseError("dupe-keys",ut(i,a.node)):(a={value:Ht,node:i,keys:new Map},t.set(o,a),i.type==="TOMLInlineTable"?en(e,a.keys,i):i.type==="TOMLArray"&&tn(e,a.keys,i))}}c(tn,"verifyDuplicateKeysForArray");function ut(e,t){return e.range[0]<=t.range[0]?t:e}c(ut,"getAfterNode");var Ho=class{static{c(this,"Context")}constructor(e){this.tokens=[],this.comments=[],this.back=null,this.stateStack=[],this.needNewLine=!1,this.needSameLine=!1,this.currToken=null,this.prevToken=null,this.valueContainerStack=[],this.tokenizer=new Bo(e.text,e.parserOptions),this.topLevelTable=e.topLevelTable,this.table=e.topLevelTable,this.keysResolver=new Ko(this)}nextToken(e){if(this.prevToken=this.currToken,this.back?(this.currToken=this.back,this.back=null):this.currToken=this._nextTokenFromTokenizer(e),(this.needNewLine||this.needSameLine||e?.needSameLine)&&this.prevToken&&this.currToken)if(this.prevToken.loc.end.line===this.currToken.loc.start.line){if(this.needNewLine)return this.reportParseError("missing-newline",this.currToken)}else{let t=this.needSameLine||e?.needSameLine;if(t)return this.reportParseError(t,this.currToken)}return this.needNewLine=!1,this.needSameLine=!1,this.currToken}_nextTokenFromTokenizer(e){let t=this.tokenizer.valuesEnabled;e?.valuesEnabled&&(this.tokenizer.valuesEnabled=e.valuesEnabled);let r=this.tokenizer.nextToken();for(;r&&r.type==="Block";)this.comments.push(r),r=this.tokenizer.nextToken();return r&&this.tokens.push(r),this.tokenizer.valuesEnabled=t,r}backToken(){if(this.back)throw new Error("Illegal state");this.back=this.currToken,this.currToken=this.prevToken}addValueContainer(e){this.valueContainerStack.push(e),this.tokenizer.valuesEnabled=!0}consumeValueContainer(){let e=this.valueContainerStack.pop();return this.tokenizer.valuesEnabled=this.valueContainerStack.length>0,e}applyResolveKeyForTable(e){this.keysResolver.applyResolveKeyForTable(e)}verifyDuplicateKeys(){this.keysResolver.verifyDuplicateKeys(this.topLevelTable)}reportParseError(e,t){let r,n,o;if(t)r=t.range[0],n=t.loc.start.line,o=t.loc.start.column;else{r=this.tokenizer.start;let i=this.tokenizer.getLocFromIndex(r);n=i.line,o=i.column}throw new Yr(e,r,n,o)}},Jr={VALUE:"missing-value"},Jo={BasicString:"basic",MultiLineBasicString:"basic",LiteralString:"literal",MultiLineLiteralString:"literal"},zo={BasicString:"basic",LiteralString:"literal"},Wo={OffsetDateTime:"offset-date-time",LocalDateTime:"local-date-time",LocalDate:"local-date",LocalTime:"local-time"},Xo=class{static{c(this,"TOMLParser")}constructor(e,t){this.text=e,this.parserOptions=t||{},this.tomlVersion=Qr(this.parserOptions.tomlVersion)}parse(){let e={type:"Program",body:[],sourceType:"module",tokens:[],comments:[],parent:null,range:[0,0],loc:{start:{line:1,column:0},end:{line:1,column:0}}},t={type:"TOMLTopLevelTable",body:[],parent:e,range:H(e.range),loc:J(e.loc)};e.body=[t];let r=new Ho({text:this.text,parserOptions:this.parserOptions,topLevelTable:t}),n=r.nextToken();if(n){for(t.range[0]=n.range[0],t.loc.start=ft(n.loc.start);n;){let s=r.stateStack.pop()||"TABLE";r.stateStack.push(...this[s](n,r)),n=r.nextToken()}let a=r.stateStack.pop()||"TABLE";if(a in Jr)return r.reportParseError(Jr[a],null);r.table.type==="TOMLTable"&&oe(r.table,Te(r.table.body)),oe(t,Te(t.body))}r.verifyDuplicateKeys(),e.tokens=r.tokens,e.comments=r.comments;let o=r.tokenizer.end,i=r.tokenizer.getLocFromIndex(o);return e.range[1]=o,e.loc.end={line:i.line,column:i.column},e}TABLE(e,t){return dt(e)||He(e)?this.processKeyValue(e,t.table,t):Vt(e)?this.processTable(e,t.topLevelTable,t):t.reportParseError("unexpected-token",e)}VALUE(e,t){return He(e)||Xr(e)?this.processStringValue(e,t):Qo(e)?this.processNumberValue(e,t):Yo(e)?this.processBooleanValue(e,t):Zo(e)?this.processDateTimeValue(e,t):Vt(e)?this.processArray(e,t):qo(e)?this.processInlineTable(e,t):t.reportParseError("unexpected-token",e)}processTable(e,t,r){let n={type:"TOMLTable",kind:"standard",key:null,resolvedKey:[],body:[],parent:t,range:H(e.range),loc:J(e.loc)};r.table.type==="TOMLTable"&&oe(r.table,Te(r.table.body)),t.body.push(n),r.table=n;let o=r.nextToken({needSameLine:"invalid-key-value-newline"});if(Vt(o)){if(e.range[1]<o.range[0])return r.reportParseError("invalid-space",o);n.kind="array",o=r.nextToken({needSameLine:"invalid-key-value-newline"})}if(Ke(o))return r.reportParseError("missing-key",o);if(!o)return r.reportParseError("unterminated-table-key",null);if(o=this.processKeyNode(o,n,r).nextToken,!Ke(o))return r.reportParseError("unterminated-table-key",o);if(n.kind==="array"){let i=o;if(o=r.nextToken({needSameLine:"invalid-key-value-newline"}),!Ke(o))return r.reportParseError("unterminated-table-key",o);if(i.range[1]<o.range[0])return r.reportParseError("invalid-space",o)}return oe(n,o),r.applyResolveKeyForTable(n),r.needNewLine=!0,[]}processKeyValue(e,t,r){let n={type:"TOMLKeyValue",key:null,value:null,parent:t,range:H(e.range),loc:J(e.loc)};t.body.push(n);let{nextToken:o}=this.processKeyNode(e,n,r);return zr(o)?(r.addValueContainer({parent:n,set:c(i=>(n.value=i,oe(n,i),r.needNewLine=!0,[]),"set")}),r.needSameLine="invalid-key-value-newline",["VALUE"]):r.reportParseError("missing-equals-sign",o)}processKeyNode(e,t,r){$t(e)&&r.reportParseError("invalid-leading-dot-in-key",e);let n={type:"TOMLKey",keys:[],parent:t,range:H(e.range),loc:J(e.loc)};t.key=n;let o=e,i=null;do{if(dt(o))this.processBareKey(o,n);else if(He(o))this.processStringKey(o,n);else break;if(i=null,o=r.nextToken({needSameLine:"invalid-key-value-newline"}),!$t(o))break;i=o,o=r.nextToken({needSameLine:"invalid-key-value-newline"})}while(o);return i&&r.reportParseError($t(o)?"invalid-consecutive-dots-in-key":"invalid-trailing-dot-in-key",i),oe(n,Te(n.keys)),{keyNode:n,nextToken:o}}processBareKey(e,t){let r={type:"TOMLBare",name:e.value,parent:t,range:H(e.range),loc:J(e.loc)};t.keys.push(r)}processStringKey(e,t){let r={type:"TOMLQuoted",kind:"string",value:e.string,style:zo[e.type],multiline:!1,parent:t,range:H(e.range),loc:J(e.loc)};t.keys.push(r)}processStringValue(e,t){let r=t.consumeValueContainer(),n={type:"TOMLValue",kind:"string",value:e.string,style:Jo[e.type],multiline:Xr(e),parent:r.parent,range:H(e.range),loc:J(e.loc)};return r.set(n)}processNumberValue(e,t){let r=t.consumeValueContainer(),n=this.text,[o,i]=e.range,a=null,s=c(()=>a??(a=n.slice(o,i).replace(/_/g,"")),"getNumberText"),l;return e.type==="Integer"?l={type:"TOMLValue",kind:"integer",value:e.number,bigint:e.bigint,get number(){return s()},parent:r.parent,range:H(e.range),loc:J(e.loc)}:l={type:"TOMLValue",kind:"float",value:e.number,get number(){return s()},parent:r.parent,range:H(e.range),loc:J(e.loc)},r.set(l)}processBooleanValue(e,t){let r=t.consumeValueContainer(),n={type:"TOMLValue",kind:"boolean",value:e.boolean,parent:r.parent,range:H(e.range),loc:J(e.loc)};return r.set(n)}processDateTimeValue(e,t){let r=t.consumeValueContainer(),n={type:"TOMLValue",kind:Wo[e.type],value:e.date,datetime:e.value,parent:r.parent,range:H(e.range),loc:J(e.loc)};return r.set(n)}processArray(e,t){let r=t.consumeValueContainer(),n={type:"TOMLArray",elements:[],parent:r.parent,range:H(e.range),loc:J(e.loc)},o=t.nextToken({valuesEnabled:!0});return Ke(o)?(oe(n,o),r.set(n)):(t.backToken(),this.processArrayValue(n,r,t))}processArrayValue(e,t,r){return r.addValueContainer({parent:e,set:c(n=>{e.elements.push(n);let o=r.nextToken({valuesEnabled:!0}),i=Wr(o);return i&&(o=r.nextToken({valuesEnabled:!0})),Ke(o)?(oe(e,o),t.set(e)):i?(r.backToken(),this.processArrayValue(e,t,r)):r.reportParseError(o?"missing-comma":"unterminated-array",o)},"set")}),["VALUE"]}processInlineTable(e,t){let r=t.consumeValueContainer(),n={type:"TOMLInlineTable",body:[],parent:r.parent,range:H(e.range),loc:J(e.loc)},o=this.tomlVersion.gte(1,1)?void 0:"invalid-inline-table-newline",i=t.nextToken({needSameLine:o});if(i){if(dt(i)||He(i))return this.processInlineTableKeyValue(i,n,r,t);if(Gt(i))return oe(n,i),r.set(n)}return t.reportParseError("unexpected-token",i)}processInlineTableKeyValue(e,t,r,n){let o={type:"TOMLKeyValue",key:null,value:null,parent:t,range:H(e.range),loc:J(e.loc)};t.body.push(o);let{nextToken:i}=this.processKeyNode(e,o,n);if(!zr(i))return n.reportParseError("missing-equals-sign",i);let a=this.tomlVersion.gte(1,1)?void 0:"invalid-inline-table-newline";return n.addValueContainer({parent:o,set:c(s=>{o.value=s,oe(o,s);let l=n.nextToken({needSameLine:a});if(Wr(l)){if(l=n.nextToken({needSameLine:a}),l&&(dt(l)||He(l)))return this.processInlineTableKeyValue(l,t,r,n);if(Gt(l)){if(this.tomlVersion.lt(1,1))return n.reportParseError("invalid-trailing-comma-in-inline-table",l)}else return n.reportParseError(l?"unexpected-token":"unterminated-inline-table",l)}return Gt(l)?(oe(t,l),r.set(t)):n.reportParseError(l?"missing-comma":"unterminated-inline-table",l)},"set")}),n.needSameLine="invalid-key-value-newline",["VALUE"]}};function $t(e){return Ee(e)&&e.value==="."}c($t,"isDot");function zr(e){return Ee(e)&&e.value==="="}c(zr,"isEq");function Vt(e){return Ee(e)&&e.value==="["}c(Vt,"isLeftBracket");function Ke(e){return Ee(e)&&e.value==="]"}c(Ke,"isRightBracket");function qo(e){return Ee(e)&&e.value==="{"}c(qo,"isLeftBrace");function Gt(e){return Ee(e)&&e.value==="}"}c(Gt,"isRightBrace");function Wr(e){return Ee(e)&&e.value===","}c(Wr,"isComma");function Ee(e){return!!(e&&e.type==="Punctuator")}c(Ee,"isPunctuator");function dt(e){return e.type==="Bare"}c(dt,"isBare");function He(e){return e.type==="BasicString"||e.type==="LiteralString"}c(He,"isString");function Xr(e){return e.type==="MultiLineBasicString"||e.type==="MultiLineLiteralString"}c(Xr,"isMultiLineString");function Qo(e){return e.type==="Integer"||e.type==="Float"}c(Qo,"isNumber");function Yo(e){return e.type==="Boolean"}c(Yo,"isBoolean");function Zo(e){return e.type==="OffsetDateTime"||e.type==="LocalDateTime"||e.type==="LocalDate"||e.type==="LocalTime"}c(Zo,"isDateTime");function oe(e,t){t&&(e.range[1]=t.range[1],e.loc.end=ft(t.loc.end))}c(oe,"applyEndLoc");function H(e){return[e[0],e[1]]}c(H,"cloneRange");function J(e){return{start:ft(e.start),end:ft(e.end)}}c(J,"cloneLoc");function ft(e){return{line:e.line,column:e.column}}c(ft,"clonePos");var ei={Program:["body"],TOMLTopLevelTable:["body"],TOMLTable:["key","body"],TOMLKeyValue:["key","value"],TOMLKey:["keys"],TOMLArray:["elements"],TOMLInlineTable:["body"],TOMLBare:[],TOMLQuoted:[],TOMLValue:[]},ti=jr(ei);function ri(e,t){return{ast:new Xo(e,t).parse(),visitorKeys:ti,services:{isTOML:!0}}}c(ri,"parseForESLint");var zt=ni(e=>e.value);function ni(e){function t(n,o){return r[n.type](n,o)}c(t,"resolveValue");let r={Program(n,o={}){return t(n.body[0],o)},TOMLTopLevelTable(n,o={}){for(let i of n.body)t(i,o);return o},TOMLKeyValue(n,o={}){let i=t(n.value);return ii(o,t(n.key),i),o},TOMLTable(n,o={}){let i=oi(o,t(n.key),n.kind==="array");for(let a of n.body)t(a,i);return o},TOMLArray(n){return n.elements.map(o=>t(o))},TOMLInlineTable(n){let o={};for(let i of n.body)t(i,o);return o},TOMLKey(n){return n.keys.map(o=>t(o))},TOMLBare(n){return n.name},TOMLQuoted(n){return n.value},TOMLValue(n){return e(n)}};return n=>t(n)}c(ni,"generateConvertTOMLValue");function oi(e,t,r){let n=e;for(let l=0;l<t.length-1;l++){let p=t[l];n=s(n,p)}let o=Te(t),i=n[o];if(i==null){let l={};return n[o]=r?[l]:l,l}if(pt(i)){let l={};return n[o]=r?[l]:l,l}if(!r){if(Array.isArray(i)){let l={};return n[o]=l,l}return i}if(Array.isArray(i)){let l={};return i.push(l),l}let a={};return n[o]=[a],a;function s(l,p){let f=l[p];if(f==null){let m={};return l[p]=m,m}if(pt(f)){let m={};return l[p]=m,m}let g=f;for(;Array.isArray(g);){let m=g.length-1,h=g[m];if(pt(h)){let y={};return g[m]=y,y}g=h}return g}c(s,"getNextTargetFromKey")}c(oi,"getTable");function ii(e,t,r){let n=e;for(let o=0;o<t.length-1;o++){let i=t[o],a=n[i];if(a==null){let s={};n[i]=s,n=s}else if(pt(a)||Array.isArray(a)){let s={};n[i]=s,n=s}else n=a}n[Te(t)]=r}c(ii,"set");function pt(e){return typeof e!="object"||e instanceof Date}c(pt,"isValue");function rn(e,t){return ri(e,t).ast}c(rn,"parseTOML");function te(e,t){try{let r=rn(e,{tomlVersion:"1.0"}),n=zt(r);return an(n),{ast:r,value:n}}catch(r){let n=r;throw new w({code:"INVALID_CONFIG",path:t,message:"Configuration contains invalid TOML or an unsupported value.",line:n.lineNumber,column:n.column===void 0?void 0:n.column+1,action:"Open config.toml, correct the indicated value, and retry."},{cause:r})}}c(te,"parseToml");function an(e){if(e instanceof Date||typeof e=="bigint"||typeof e=="number"&&(!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)))throw new Error("Unsupported TOML value");if(e&&typeof e=="object")for(let[t,r]of Object.entries(e)){if(["__proto__","prototype","constructor"].includes(t))throw new Error("Reserved key");an(r)}}c(an,"assertJsonValue");function _e(e){if(typeof e=="string")return JSON.stringify(e).replace(/\\u([0-9a-f]{4})/gi,"\\u$1");if(typeof e=="boolean"||typeof e=="number"&&Number.isFinite(e))return String(e);if(Array.isArray(e))return`[${e.map(_e).join(", ")}]`;if(se(e))return`{ ${Object.entries(e).filter(([,t])=>t!==void 0).map(([t,r])=>`${be(t)} = ${_e(r)}`).join(", ")} }`;throw new Error("Configuration cannot contain null or unsupported values.")}c(_e,"tomlValue");var be=c(e=>/^[A-Za-z0-9_-]+$/.test(e)?e:JSON.stringify(e),"tomlKey"),nn=c(e=>e.keys.map(t=>t.type==="TOMLBare"?t.name:t.value),"keyPath"),ai=c((e,t)=>e.length===t.length&&e.every((r,n)=>r===t[n]),"samePath"),mt=c((e,t)=>e.length<=t.length&&e.every((r,n)=>r===t[n]),"prefix");function se(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)}c(se,"isRecord");function ze(e,t,r){let n=e;for(let o of t)n=sn(n,o,r);return te(n,r),n.endsWith(`
4
4
  `)?n:`${n}
5
5
  `}c(ze,"editToml");function sn(e,t,r){if(!t.path.length||t.path.some(m=>!m||["__proto__","prototype","constructor"].includes(m)))throw new Error("Invalid configuration key path.");let{ast:n}=te(e,r),o=[],i=[];for(let m of n.body[0].body)if(m.type==="TOMLKeyValue")o.push({path:nn(m.key),node:m});else{if(i.push(m),m.kind!=="standard")continue;for(let h of m.body)o.push({path:[...m.resolvedKey.map(String),...nn(h.key)],node:h})}let a=o.find(m=>ai(m.path,t.path));if(a){let m=a.node;if(t.op==="set")return ht(e,m.value.range,on(e,n,m.value.range,_e(t.value)));let h=n.comments.filter(y=>y.range[0]>=m.range[0]&&y.range[1]<=m.range[1]).map(y=>e.slice(...y.range)).join(`
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as D,b as J,c as q}from"./chunk-AKGCM53D.js";import{a as Y}from"./chunk-BN5AVRUG.js";import{a as L}from"./chunk-FEAKTSRS.js";import{b as z}from"./chunk-L3KS6MOV.js";import{x as F}from"./chunk-UBCLPZSQ.js";import{sa as C,z as W}from"./chunk-PBZCXPPC.js";import{m as N,n as j}from"./chunk-VVNV4NNW.js";import{A as x}from"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as se}from"node:crypto";function U(a){let d=a.replace(/^\/workspace\/outputs\//,"").replace(/^\/workspace\/work\/outputs\//,"").replace(/^outputs\//,"");if(!d||d.startsWith("/")||d.includes("\0")||d.split(/[\\/]/).some(g=>!g||g==="."||g===".."))throw new Error("Select one file inside this case's writable outputs.");return d}i(U,"confinedProfileOutputPath");var K=i(a=>`'${a.replaceAll("'","'\\''")}'`,"quote");async function V(a){let d=U(a.path),g="const f=require('fs'),p=require('path'),c=require('crypto'),a=JSON.parse(process.argv[1]),r=f.realpathSync('/workspace/work/outputs'),q=f.realpathSync(p.join(r,a.path));if(!q.startsWith(r+'/'))throw Error('Output path escapes the case');const s=f.statSync(q);if(!s.isFile()||s.size>10000000)throw Error('Output exceeds its bound');if(a.offset===undefined){const b=f.readFileSync(q);process.stdout.write(JSON.stringify({size:b.length,hash:c.createHash('sha256').update(b).digest('hex')}))}else{const h=f.openSync(q,'r'),b=Buffer.alloc(Math.min(524288,s.size-a.offset));try{const n=f.readSync(h,b,0,b.length,a.offset);process.stdout.write(b.subarray(0,n).toString('base64'))}finally{f.closeSync(h)}}";async function w(E){let y=await a.command(`/runtime/node -e ${K(g)} ${K(JSON.stringify({path:d,...E!==void 0?{offset:E}:{}}))}`);if(y.code!==0)throw new Error("The confined output could not be read.");return y.stdout}i(w,"read");let b=x.object({size:x.number().int().min(1).max(F),hash:x.string().regex(/^[a-f0-9]{64}$/)}).strict().parse(JSON.parse(await w())),P=[];for(let E=0;E<b.size;E+=524288){let y=await w(E);if(!/^[A-Za-z0-9+/]*={0,2}$/.test(y)||y.length>7e5)throw new Error("Output chunk exceeded its boundary.");let O=Buffer.from(y,"base64");if(O.length!==Math.min(524288,b.size-E))throw new Error("The output changed during readback.");P.push(O)}let R=Buffer.concat(P),k=se("sha256").update(R).digest("hex"),T=x.object({size:x.number(),hash:x.string()}).strict().parse(JSON.parse(await w()));if(k!==b.hash||T.hash!==k||T.size!==R.length)throw new Error("The output changed before immutable readback.");return{bytes:R,title:d.split("/").at(-1)}}i(V,"readConfinedProfileOutput");import l from"node:path";import{promises as m}from"node:fs";import M from"node:path";function X(a,d,g,w){let b=i(()=>new Error("This source file is outside the public policy closure."),"denied"),P;if(a==="context_read"){if(typeof d.path!="string")throw b();P=d.path}else{let R=typeof d.name=="string"?w.get(d.name.trim()):void 0;if(!R||!Object.hasOwn(g,R))throw b();if(d.path===void 0)return R;let k=d.path;if(typeof k!="string"||!k||k.includes("\\")||k.includes("\0")||M.posix.isAbsolute(k)||M.win32.isAbsolute(k)||k.split("/").includes(".."))throw b();P=M.posix.join(M.posix.dirname(R),k)}if(!Object.hasOwn(g,P))throw b();return P}i(X,"resolveProfilePolicySourcePath");var Z=String.raw`
2
+ import{a as D,b as J,c as q}from"./chunk-AKGCM53D.js";import{a as Y}from"./chunk-GAQLXFOT.js";import{a as L}from"./chunk-FEAKTSRS.js";import{x as F}from"./chunk-TUCKED4T.js";import{b as z}from"./chunk-L3KS6MOV.js";import{sa as C,z as W}from"./chunk-PBZCXPPC.js";import{m as N,n as j}from"./chunk-VVNV4NNW.js";import{A as x}from"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as se}from"node:crypto";function U(a){let d=a.replace(/^\/workspace\/outputs\//,"").replace(/^\/workspace\/work\/outputs\//,"").replace(/^outputs\//,"");if(!d||d.startsWith("/")||d.includes("\0")||d.split(/[\\/]/).some(g=>!g||g==="."||g===".."))throw new Error("Select one file inside this case's writable outputs.");return d}i(U,"confinedProfileOutputPath");var K=i(a=>`'${a.replaceAll("'","'\\''")}'`,"quote");async function V(a){let d=U(a.path),g="const f=require('fs'),p=require('path'),c=require('crypto'),a=JSON.parse(process.argv[1]),r=f.realpathSync('/workspace/work/outputs'),q=f.realpathSync(p.join(r,a.path));if(!q.startsWith(r+'/'))throw Error('Output path escapes the case');const s=f.statSync(q);if(!s.isFile()||s.size>10000000)throw Error('Output exceeds its bound');if(a.offset===undefined){const b=f.readFileSync(q);process.stdout.write(JSON.stringify({size:b.length,hash:c.createHash('sha256').update(b).digest('hex')}))}else{const h=f.openSync(q,'r'),b=Buffer.alloc(Math.min(524288,s.size-a.offset));try{const n=f.readSync(h,b,0,b.length,a.offset);process.stdout.write(b.subarray(0,n).toString('base64'))}finally{f.closeSync(h)}}";async function w(E){let y=await a.command(`/runtime/node -e ${K(g)} ${K(JSON.stringify({path:d,...E!==void 0?{offset:E}:{}}))}`);if(y.code!==0)throw new Error("The confined output could not be read.");return y.stdout}i(w,"read");let b=x.object({size:x.number().int().min(1).max(F),hash:x.string().regex(/^[a-f0-9]{64}$/)}).strict().parse(JSON.parse(await w())),P=[];for(let E=0;E<b.size;E+=524288){let y=await w(E);if(!/^[A-Za-z0-9+/]*={0,2}$/.test(y)||y.length>7e5)throw new Error("Output chunk exceeded its boundary.");let O=Buffer.from(y,"base64");if(O.length!==Math.min(524288,b.size-E))throw new Error("The output changed during readback.");P.push(O)}let R=Buffer.concat(P),k=se("sha256").update(R).digest("hex"),T=x.object({size:x.number(),hash:x.string()}).strict().parse(JSON.parse(await w()));if(k!==b.hash||T.hash!==k||T.size!==R.length)throw new Error("The output changed before immutable readback.");return{bytes:R,title:d.split("/").at(-1)}}i(V,"readConfinedProfileOutput");import l from"node:path";import{promises as m}from"node:fs";import M from"node:path";function X(a,d,g,w){let b=i(()=>new Error("This source file is outside the public policy closure."),"denied"),P;if(a==="context_read"){if(typeof d.path!="string")throw b();P=d.path}else{let R=typeof d.name=="string"?w.get(d.name.trim()):void 0;if(!R||!Object.hasOwn(g,R))throw b();if(d.path===void 0)return R;let k=d.path;if(typeof k!="string"||!k||k.includes("\\")||k.includes("\0")||M.posix.isAbsolute(k)||M.win32.isAbsolute(k)||k.split("/").includes(".."))throw b();P=M.posix.join(M.posix.dirname(R),k)}if(!Object.hasOwn(g,P))throw b();return P}i(X,"resolveProfilePolicySourcePath");var Z=String.raw`
3
3
  const fs=require('node:fs'),p=require('node:path');
4
4
  const a=JSON.parse(fs.readFileSync(0,'utf8'));
5
5
  const roots={work:'outputs',inputs:'inputs',harness:'harness'};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as g}from"./chunk-VWJ5IYQP.js";import{A as p}from"./chunk-PF56N7ZY.js";import{a as o}from"./chunk-FTQLQJQV.js";var x=p.object({schemaVersion:p.literal("openpond.taskAuthoringDecision.v1"),proposal:g}),T=10*6e4;function S(e){return b(e)}o(S,"createTaskAuthoringMessages");function A(e,n){let r=f(e);if(!r)throw new Error("Task authoring returned invalid structured output.");let i=h(r.proposal),s=m(i,n);if(s)throw new Error(`Task authoring returned an incompatible proposal: ${s}`);return i}o(A,"parseTaskAuthoringDecision");async function P(e){let n=w(e.signal,e.timeoutMs??T);try{let r=b(e),i=await y(e.stream({model:e.model,reasoningEffort:e.reasoningEffort,messages:r,signal:n.signal})),s=f(i),d=s?h(s.proposal):null,t=d?m(d,e.evidence):null;if(d&&!t)return{proposal:d,repairHistory:[]};let l=s?`The prior proposal is incompatible with the current Taskset materializer: ${t} Redesign it without changing the selected evidence.`:`The prior response was invalid. Return only valid JSON matching openpond.taskAuthoringDecision.v1. Invalid response:
2
+ import{b as g}from"./chunk-547AUVKN.js";import{A as p}from"./chunk-PF56N7ZY.js";import{a as o}from"./chunk-FTQLQJQV.js";var x=p.object({schemaVersion:p.literal("openpond.taskAuthoringDecision.v1"),proposal:g}),T=10*6e4;function S(e){return b(e)}o(S,"createTaskAuthoringMessages");function A(e,n){let r=f(e);if(!r)throw new Error("Task authoring returned invalid structured output.");let i=h(r.proposal),s=m(i,n);if(s)throw new Error(`Task authoring returned an incompatible proposal: ${s}`);return i}o(A,"parseTaskAuthoringDecision");async function P(e){let n=w(e.signal,e.timeoutMs??T);try{let r=b(e),i=await y(e.stream({model:e.model,reasoningEffort:e.reasoningEffort,messages:r,signal:n.signal})),s=f(i),d=s?h(s.proposal):null,t=d?m(d,e.evidence):null;if(d&&!t)return{proposal:d,repairHistory:[]};let l=s?`The prior proposal is incompatible with the current Taskset materializer: ${t} Redesign it without changing the selected evidence.`:`The prior response was invalid. Return only valid JSON matching openpond.taskAuthoringDecision.v1. Invalid response:
3
3
  ${i.slice(0,2e4)}`,u=await y(e.stream({model:e.model,reasoningEffort:e.reasoningEffort,signal:n.signal,messages:[...r,{role:"user",content:l}]})),c=f(u);if(!c)throw new Error("Task authoring model returned invalid structured output after one repair attempt.");let a=h(c.proposal),v=m(a,e.evidence);if(v)throw new Error(`Task authoring model returned an incompatible proposal after one repair attempt: ${v}`);return{proposal:a,repairHistory:[{attempt:1,summary:"Repaired invalid or method-incompatible TaskDesignProposal output.",createdAt:new Date().toISOString()}]}}catch(r){throw n.signal.aborted&&!e.signal.aborted?new Error(`Task authoring timed out after ${n.timeoutMs}ms.`):r}finally{n.cleanup()}}o(P,"authorTaskDesignWithModel");function b(e){return[{role:"system",content:["You are OpenPond Taskset Authoring.","Use only the consented evidence supplied below.","Diagnose the work before designing a task. Repetition alone is not evidence that weights are the right intervention.","Produce one provider-neutral capability diagnosis and, only when justified, one task design. Separate policy-visible input from privileged outcomes.","The diagnosis must identify stableBehavior, changingKnowledge, requiredContext, requiredTools, the recommended intervention, whether training is eligible, and an evidence-backed rationale.","Use intervention=no_training when the behavior is already reliable or lacks a coherent repeated job. Use prompting when instructions or application logic are sufficient. Use retrieval when the primary value is changing facts or documents.","Prefer deterministic graders. Model judges must be calibrated and cannot silently become reward.","Do not fabricate expert approval, preferences, corrections, or rewards.","A methodHint is a user preference, not permission to misclassify the evidence. Explain a different recommendation when the hint is unsuitable.","A buildIntent is the learning signal the user wants to construct, not permission to invent unsupported demonstrations, preferences, rewards, or labels.","Historical assistant messages are candidate outcomes, not automatically approved truth. Exclude stale, contradictory, speculative, context-incomplete, or unsuccessful answers.","Explicitly selected local chats may supply extracted candidate examples when the assistant output is complete, internally consistent, and supports the stated objective. Do not require a separate historical expert-approval field; final approval occurs when the user creates the Taskset.","For each usable example, populate proposedExamples with its exact input and expected output, source and turn provenance, split, origin, and rationale.","Use origin=extracted only when inputPrompt and expectedOutputText exactly match the selected user/assistant pair. Label any repaired or newly generated text corrected or synthetic.","Keep every source cluster wholly within one data split. Evaluation examples should come from independent conversations when available.","For no_training, prompting, or retrieval recommendations, set trainingEligible=false, proposedMethod to none or retrieval as appropriate, and leave proposedExamples, graders, fixtures, and generated files empty.","Recommend provider-neutral methods from the evidence. A versioned executable environment with deterministic reward variance may justify GRPO even when the current local destination can execute only a separately labeled SFT trajectory bootstrap.","For Cross-System Operations traces, preserve the four required tools, the shared tool-contract hash, structured tool messages, split-isolated worlds, and the exact trajectory verifier. Never relabel the primary GRPO recommendation as SFT because local GPU execution is unavailable.","Generated verifier paths and custom-verifier modules must start with graders/. Fixture files must start with fixtures/ and environment files with environment/.","Return JSON only: {schemaVersion:'openpond.taskAuthoringDecision.v1', proposal: TaskDesignProposal}.",`TaskDesignProposal JSON schema:
4
4
  ${JSON.stringify(p.toJSONSchema(g),null,2)}`,"Follow the bundled Taskset Authoring skill below:",e.skillText].join(`
5
5
  `)},{role:"user",content:JSON.stringify({proposalId:e.id,buildIntent:e.buildIntent,buildSpecification:e.buildSpecification,methodHint:e.methodHint??null,instruction:e.instruction??null,currentProposal:e.currentProposal??null,evidence:e.evidence},null,2)}]}o(b,"taskAuthoringMessages");function m(e,n){if(new Set(["no_training","prompting","retrieval"]).has(e.diagnosis.intervention)&&e.diagnosis.trainingEligible)return`${e.diagnosis.intervention} cannot be trainingEligible.`;if(e.diagnosis.intervention==="retrieval"&&e.proposedMethod!=="retrieval")return"Retrieval diagnoses must set proposedMethod=retrieval.";if((e.diagnosis.intervention==="no_training"||e.diagnosis.intervention==="prompting")&&e.proposedMethod!=="none")return`${e.diagnosis.intervention} diagnoses must set proposedMethod=none.`;if(!e.diagnosis.trainingEligible&&(e.proposedExamples.length||e.proposedGraders.length||e.graderFixtures.length||e.generatedFiles.length))return"Non-training diagnoses must not package training examples, graders, fixtures, or generated files.";if(e.diagnosis.trainingEligible&&e.diagnosis.stableBehavior.length===0)return"Training-eligible diagnoses must identify at least one stable behavior.";let i=new Set(n.map(t=>t.source.id));if(e.sourceIds.some(t=>!i.has(t)))return"proposal sourceIds must stay within the selected evidence.";for(let t of e.proposedExamples){if(!i.has(t.sourceId))return`Example ${t.id} references unselected source ${t.sourceId}.`;if(t.origin!=="extracted")continue;if(!t.sourceTurnId)return`Extracted example ${t.id} must declare sourceTurnId.`;let l=n.find(a=>a.source.id===t.sourceId),u=l?.excerpts.find(a=>a.role==="user"&&a.turnId===t.sourceTurnId),c=l?.excerpts.find(a=>a.role==="assistant"&&a.turnId===t.sourceTurnId);if(!u||u.text!==t.inputPrompt||!c||c.text!==t.expectedOutputText)return`Extracted example ${t.id} must exactly match its selected user/assistant pair.`}if(!e.diagnosis.trainingEligible)return null;if(!e.policy.policyVisibleFields.includes("input.prompt"))return"policyVisibleFields must include input.prompt.";if(!e.policy.privilegedFields.includes("expectedOutput.text"))return"privilegedFields must include expectedOutput.text.";if(e.proposedGraders.length===0)return"Training-eligible proposals must include an evaluation grader.";let s={verifier:"graders/",fixture:"fixtures/",environment:"environment/"};for(let t of e.generatedFiles)if(!t.path.replaceAll("\\","/").startsWith(s[t.role]))return`${t.role} file ${t.path} must start with ${s[t.role]}.`;let d=new Set(e.generatedFiles.map(t=>t.path.replaceAll("\\","/")));for(let t of e.proposedGraders){if(t.kind!=="custom_verifier")continue;let l=t.module.replaceAll("\\","/");if(!l.startsWith("graders/"))return`custom verifier ${t.id} module must start with graders/.`;if(!d.has(l))return`custom verifier ${t.id} module ${l} must have a matching generated file.`}return null}o(m,"proposalCompatibilityIssue");function h(e){return e.diagnosis.trainingEligible?g.parse({...e,policy:{...e.policy,policyVisibleFields:[...new Set([...e.policy.policyVisibleFields,"input.prompt"])],privilegedFields:[...new Set([...e.policy.privilegedFields,"expectedOutput.text"])]}}):e}o(h,"normalizePolicyBoundary");function w(e,n){let r=new AbortController,i=o(()=>r.abort(e.reason),"abortFromParent");e.aborted?i():e.addEventListener("abort",i,{once:!0});let s=setTimeout(()=>r.abort(new Error(`Task authoring timed out after ${n}ms.`)),n);return s.unref?.(),{signal:r.signal,timeoutMs:n,cleanup:o(()=>{clearTimeout(s),e.removeEventListener("abort",i)},"cleanup")}}o(w,"authoringTimeoutSignal");function f(e){let n=[e,e.replace(/^```(?:json)?\s*/i,"").replace(/```\s*$/,"")];for(let r of n)try{let i=x.safeParse(JSON.parse(r));if(i.success)return i.data}catch{}return null}o(f,"parseEnvelope");async function y(e){let n="";for await(let r of e)r.text&&(n+=r.text);return n}o(y,"collect");export{S as a,A as b,P as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{c as d,e as p,f,g,i as w,qa as P}from"./chunk-KK626T3Z.js";import{a as u,c as m,f as l,h as r}from"./chunk-UGOK7VTC.js";import{a as e}from"./chunk-FTQLQJQV.js";import c from"node:path";import{AsyncLocalStorage as v}from"node:async_hooks";import{promises as h}from"node:fs";var y=new v;function E(n,i=!1){let t=y.getStore();t&&(i&&(t.length=0),t.push(n))}e(E,"onStartupFailure");async function N(n,i){await P(n);let t;try{t=await g(c.join(r(n).runtime,"server-owner"),100)}catch(o){if(o instanceof m&&o.issue.code==="STORAGE_BUSY"){let a=await w(c.join(r(n).runtime,"endpoint.json"),()=>null);throw new m({code:"RUNTIME_ALREADY_RUNNING",path:n,message:"An OpenPond runtime already owns this home.",action:a?.url?`Connect to the existing runtime at ${a.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw o}let s=[];try{let o=await u(n,()=>y.run(s,i)),a=o.close.bind(o);s.length=0;let k;return{...o,close:e(()=>k??=(async()=>{try{await u(n,a)}finally{await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0}),await t()}})(),"close")}}catch(o){try{for(let a of s.reverse())await Promise.resolve().then(()=>u(n,a)).catch(()=>{});await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0})}finally{await t()}throw o}}e(N,"ownHomeRuntime");async function b(n,i,t){await p(c.join(r(n).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:i,serverId:t}))}e(b,"publishRuntimeEndpoint");import{randomBytes as x}from"node:crypto";function D(){return l()}e(D,"appDataDir");function _(n){return r(n).config}e(_,"providersConfigPath");function H(n){return r(n).credentials}e(H,"providerSecretsConfigPath");function L(n){return r(n).key}e(L,"providerSecretsKeyPath");async function U(n){let i=r(n).token;return f(i,async()=>{let t=(await d(i))?.trim(),s=process.env.OPENPOND_APP_TOKEN||t||x(32).toString("base64url");return s!==t&&await p(i,s),{token:s,tokenFile:i}})}e(U,"ensureCapabilityToken");export{E as a,N as b,b as c,D as d,_ as e,H as f,L as g,U as h};
2
+ import{c as d,e as p,f,g,i as w,qa as P}from"./chunk-2EPR4HLF.js";import{a as u,c as m,f as l,h as r}from"./chunk-UGOK7VTC.js";import{a as e}from"./chunk-FTQLQJQV.js";import c from"node:path";import{AsyncLocalStorage as v}from"node:async_hooks";import{promises as h}from"node:fs";var y=new v;function E(n,i=!1){let t=y.getStore();t&&(i&&(t.length=0),t.push(n))}e(E,"onStartupFailure");async function N(n,i){await P(n);let t;try{t=await g(c.join(r(n).runtime,"server-owner"),100)}catch(o){if(o instanceof m&&o.issue.code==="STORAGE_BUSY"){let a=await w(c.join(r(n).runtime,"endpoint.json"),()=>null);throw new m({code:"RUNTIME_ALREADY_RUNNING",path:n,message:"An OpenPond runtime already owns this home.",action:a?.url?`Connect to the existing runtime at ${a.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw o}let s=[];try{let o=await u(n,()=>y.run(s,i)),a=o.close.bind(o);s.length=0;let k;return{...o,close:e(()=>k??=(async()=>{try{await u(n,a)}finally{await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0}),await t()}})(),"close")}}catch(o){try{for(let a of s.reverse())await Promise.resolve().then(()=>u(n,a)).catch(()=>{});await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0})}finally{await t()}throw o}}e(N,"ownHomeRuntime");async function b(n,i,t){await p(c.join(r(n).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:i,serverId:t}))}e(b,"publishRuntimeEndpoint");import{randomBytes as x}from"node:crypto";function D(){return l()}e(D,"appDataDir");function _(n){return r(n).config}e(_,"providersConfigPath");function H(n){return r(n).credentials}e(H,"providerSecretsConfigPath");function L(n){return r(n).key}e(L,"providerSecretsKeyPath");async function U(n){let i=r(n).token;return f(i,async()=>{let t=(await d(i))?.trim(),s=process.env.OPENPOND_APP_TOKEN||t||x(32).toString("base64url");return s!==t&&await p(i,s),{token:s,tokenFile:i}})}e(U,"ensureCapabilityToken");export{E as a,N as b,b as c,D as d,_ as e,H as f,L as g,U as h};
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b}from"./chunk-6PKXJEJM.js";import{b as P}from"./chunk-PAZDQRYU.js";import{a as T}from"./chunk-4NXEYPPX.js";import{d as q,e as I}from"./chunk-TTN63EAM.js";import{qb as k,zb as R}from"./chunk-PBZCXPPC.js";import{r as y}from"./chunk-NJLULBTM.js";import{n as i}from"./chunk-VVNV4NNW.js";import{a as d}from"./chunk-FTQLQJQV.js";import{readFile as B}from"node:fs/promises";import A from"node:path";async function O(t){let o=k.parse(t.source),s;if(t.authorizeWorkspace){let r=await t.store.getHarnessReleaseRecord(o.harnessRelease.contentHash),m=r&&await t.store.getHarnessWorkspace(r.workspaceId);if(!r||!m||r.harnessRelease.id!==o.harnessRelease.id)throw new Error("The selected immutable Harness has no persisted owning workspace.");await t.authorizeWorkspace(o,m),s=await I({workspace:m,release:r})}else s=await q(t.store,o.harnessRelease);if(!s)throw new Error("The selected immutable Harness is unavailable.");let n=s.release;if(i(o.agentSnapshot)!==i({id:n.agentSnapshot.id,contentHash:n.agentSnapshot.contentHash}))throw new Error("The selected Harness differs from its admitted Agent snapshot.");let e=A.join(n.bundlePath,"source"),p=new Map;for(let r of n.harnessRelease.files)p.set(r.path,await B(A.join(e,...r.path.split("/"))));let l=y({agentSnapshot:n.agentSnapshot,harnessRelease:n.harnessRelease,files:p});if(l.contentHash!==o.sourcePackageHash)throw new Error("The selected Harness source bytes differ from the admitted package.");let c=T(n);return b({sourcePackage:l,expectedRelease:o.harnessRelease,baseSystemPrompt:"",runtimeId:"openpond.native-standalone-experiment.v1",tools:c.map(r=>({name:r.name,inputSchema:r.inputSchema,definition:{type:"function",function:{name:r.name,description:r.description,parameters:r.inputSchema}}})),maxContextCharacters:262144}),{runtime:s,sourcePackage:l}}d(O,"resolveStandaloneExperimentSource");function C(t){if(!t.turn.completedAt)throw new Error("Native Experiment receipt requires a settled turn.");let o=Buffer.byteLength(t.output,"utf8")>t.maxOutputBytes,s=t.cancelled?"cancelled":t.timedOut?"timed_out":t.turn.status==="interrupted"?"cancelled":t.turn.status==="completed"&&!o?"completed":"policy_failure",n=s==="completed"?null:o?"Native Harness output exceeded its admitted byte limit.":s==="timed_out"?"Native Harness case timed out.":s==="cancelled"?"Native Harness case was cancelled.":"Native Harness case failed; inspect its retained turn evidence.",e={schemaVersion:"openpond.nativeHarnessExperimentAttempt.v1",taskId:t.request.taskId,status:s,output:s==="completed"?t.output:null,error:n,messages:[{role:"user",text:JSON.stringify({instructions:t.request.instructions,input:t.request.input,policyVisibleContext:t.request.policyVisibleContext})},...s==="completed"?[{role:"assistant",text:t.output,toolCalls:[]}]:[]],collected:s==="completed",environmentCleanupComplete:!0,snapshot:null,native:{sessionId:t.turn.sessionId,turnId:t.turn.id,source:t.source,admissionHash:t.request.admissionHash,modelConfigurationHash:t.request.model.configurationHash,traceHash:t.traceHash,runtimeEventRefs:t.runtimeEventRefs,startedAt:t.turn.startedAt,completedAt:t.turn.completedAt,outputHash:i(t.output),partialOutputAvailable:s!=="completed"&&t.output.length>0}};return R(e)}d(C,"sealStandaloneExperimentReceipt");function ee(t){let o=new Map;async function s(e,p){let l=e.metadata?.standaloneExperiment;if(l===void 0)return null;let c=o.get(e.id);if(!c||i(l)!==i(c.binding)||e.currentProfile||e.profileComponentBinding||e.profileWorkflowBinding||p.sessionId!==e.id||p.profileSnapshot)throw new Error("Standalone Experiment turn has no matching active execution owner.");return c.stream}d(s,"resolveSessionModelStream");async function n(e){if(!Number.isSafeInteger(e.maxOutputBytes)||e.maxOutputBytes<1||e.maxOutputBytes>8388608)throw new Error("Native Experiment requires a bounded positive output limit.");if(!e.request.harness||i(e.request.harness)!==i(e.source))throw new Error("Native Experiment source differs from its admitted case.");if(e.request.environment.kind!=="text")throw new Error("Standalone native Harness execution requires a compatible text Dataset.");if(e.request.model.messages.length)throw new Error("Standalone Harness cases use released instructions; additional raw prompt messages are not qualified.");e.signal.throwIfAborted();let{runtime:p}=await O({store:t.store,source:e.source,authorizeWorkspace:t.authorizeWorkspace}),l={executionId:e.executionId,caseId:e.request.id,admissionHash:e.request.admissionHash,source:e.source,modelConfigurationHash:e.request.model.configurationHash},c={providerId:e.request.model.providerId,modelId:e.request.model.modelId},r=await t.createSession({provider:c.providerId,modelRef:c,currentProfile:null,hiddenFromDefaultSidebar:!0,metadata:{standaloneExperiment:l}});if(r.currentProfile||r.profileComponentBinding||r.profileWorkflowBinding)throw new Error("Standalone Experiment session acquired an unrelated Profile.");await P({store:t.store,runId:r.id,workspace:p.workspace,harnessRelease:e.source.harnessRelease,admittedAt:r.createdAt});let m=AbortSignal.any([e.signal,AbortSignal.timeout(e.request.timeoutMs)]),N=d(async function*(u){if(u.model!==c.modelId)throw new Error("Native Experiment requested a different model.");for await(let a of e.stream({...u,maxTokens:e.request.model.maxOutputTokens,temperature:e.request.model.temperature,topP:e.request.model.topP,signal:u.signal?AbortSignal.any([m,u.signal]):m}))yield a},"stream");o.set(r.id,{binding:l,stream:N});let h,x=d(()=>{h??=t.interruptSessionTurn(r.id,"Standalone Experiment case cancelled or timed out."),h.catch(()=>{})},"onAbort");m.addEventListener("abort",x,{once:!0});let w=!1,g=!1;try{m.throwIfAborted();let u=[e.request.instructions,JSON.stringify({input:e.request.input,policyVisibleContext:e.request.policyVisibleContext})].filter(Boolean).join(`
2
+ import{b}from"./chunk-6PKXJEJM.js";import{b as P}from"./chunk-PAE3PQEC.js";import{a as T}from"./chunk-4NXEYPPX.js";import{d as q,e as I}from"./chunk-NWOK6NLE.js";import{qb as k,zb as R}from"./chunk-PBZCXPPC.js";import{r as y}from"./chunk-NJLULBTM.js";import{n as i}from"./chunk-VVNV4NNW.js";import{a as d}from"./chunk-FTQLQJQV.js";import{readFile as B}from"node:fs/promises";import A from"node:path";async function O(t){let o=k.parse(t.source),s;if(t.authorizeWorkspace){let r=await t.store.getHarnessReleaseRecord(o.harnessRelease.contentHash),m=r&&await t.store.getHarnessWorkspace(r.workspaceId);if(!r||!m||r.harnessRelease.id!==o.harnessRelease.id)throw new Error("The selected immutable Harness has no persisted owning workspace.");await t.authorizeWorkspace(o,m),s=await I({workspace:m,release:r})}else s=await q(t.store,o.harnessRelease);if(!s)throw new Error("The selected immutable Harness is unavailable.");let n=s.release;if(i(o.agentSnapshot)!==i({id:n.agentSnapshot.id,contentHash:n.agentSnapshot.contentHash}))throw new Error("The selected Harness differs from its admitted Agent snapshot.");let e=A.join(n.bundlePath,"source"),p=new Map;for(let r of n.harnessRelease.files)p.set(r.path,await B(A.join(e,...r.path.split("/"))));let l=y({agentSnapshot:n.agentSnapshot,harnessRelease:n.harnessRelease,files:p});if(l.contentHash!==o.sourcePackageHash)throw new Error("The selected Harness source bytes differ from the admitted package.");let c=T(n);return b({sourcePackage:l,expectedRelease:o.harnessRelease,baseSystemPrompt:"",runtimeId:"openpond.native-standalone-experiment.v1",tools:c.map(r=>({name:r.name,inputSchema:r.inputSchema,definition:{type:"function",function:{name:r.name,description:r.description,parameters:r.inputSchema}}})),maxContextCharacters:262144}),{runtime:s,sourcePackage:l}}d(O,"resolveStandaloneExperimentSource");function C(t){if(!t.turn.completedAt)throw new Error("Native Experiment receipt requires a settled turn.");let o=Buffer.byteLength(t.output,"utf8")>t.maxOutputBytes,s=t.cancelled?"cancelled":t.timedOut?"timed_out":t.turn.status==="interrupted"?"cancelled":t.turn.status==="completed"&&!o?"completed":"policy_failure",n=s==="completed"?null:o?"Native Harness output exceeded its admitted byte limit.":s==="timed_out"?"Native Harness case timed out.":s==="cancelled"?"Native Harness case was cancelled.":"Native Harness case failed; inspect its retained turn evidence.",e={schemaVersion:"openpond.nativeHarnessExperimentAttempt.v1",taskId:t.request.taskId,status:s,output:s==="completed"?t.output:null,error:n,messages:[{role:"user",text:JSON.stringify({instructions:t.request.instructions,input:t.request.input,policyVisibleContext:t.request.policyVisibleContext})},...s==="completed"?[{role:"assistant",text:t.output,toolCalls:[]}]:[]],collected:s==="completed",environmentCleanupComplete:!0,snapshot:null,native:{sessionId:t.turn.sessionId,turnId:t.turn.id,source:t.source,admissionHash:t.request.admissionHash,modelConfigurationHash:t.request.model.configurationHash,traceHash:t.traceHash,runtimeEventRefs:t.runtimeEventRefs,startedAt:t.turn.startedAt,completedAt:t.turn.completedAt,outputHash:i(t.output),partialOutputAvailable:s!=="completed"&&t.output.length>0}};return R(e)}d(C,"sealStandaloneExperimentReceipt");function ee(t){let o=new Map;async function s(e,p){let l=e.metadata?.standaloneExperiment;if(l===void 0)return null;let c=o.get(e.id);if(!c||i(l)!==i(c.binding)||e.currentProfile||e.profileComponentBinding||e.profileWorkflowBinding||p.sessionId!==e.id||p.profileSnapshot)throw new Error("Standalone Experiment turn has no matching active execution owner.");return c.stream}d(s,"resolveSessionModelStream");async function n(e){if(!Number.isSafeInteger(e.maxOutputBytes)||e.maxOutputBytes<1||e.maxOutputBytes>8388608)throw new Error("Native Experiment requires a bounded positive output limit.");if(!e.request.harness||i(e.request.harness)!==i(e.source))throw new Error("Native Experiment source differs from its admitted case.");if(e.request.environment.kind!=="text")throw new Error("Standalone native Harness execution requires a compatible text Dataset.");if(e.request.model.messages.length)throw new Error("Standalone Harness cases use released instructions; additional raw prompt messages are not qualified.");e.signal.throwIfAborted();let{runtime:p}=await O({store:t.store,source:e.source,authorizeWorkspace:t.authorizeWorkspace}),l={executionId:e.executionId,caseId:e.request.id,admissionHash:e.request.admissionHash,source:e.source,modelConfigurationHash:e.request.model.configurationHash},c={providerId:e.request.model.providerId,modelId:e.request.model.modelId},r=await t.createSession({provider:c.providerId,modelRef:c,currentProfile:null,hiddenFromDefaultSidebar:!0,metadata:{standaloneExperiment:l}});if(r.currentProfile||r.profileComponentBinding||r.profileWorkflowBinding)throw new Error("Standalone Experiment session acquired an unrelated Profile.");await P({store:t.store,runId:r.id,workspace:p.workspace,harnessRelease:e.source.harnessRelease,admittedAt:r.createdAt});let m=AbortSignal.any([e.signal,AbortSignal.timeout(e.request.timeoutMs)]),N=d(async function*(u){if(u.model!==c.modelId)throw new Error("Native Experiment requested a different model.");for await(let a of e.stream({...u,maxTokens:e.request.model.maxOutputTokens,temperature:e.request.model.temperature,topP:e.request.model.topP,signal:u.signal?AbortSignal.any([m,u.signal]):m}))yield a},"stream");o.set(r.id,{binding:l,stream:N});let h,x=d(()=>{h??=t.interruptSessionTurn(r.id,"Standalone Experiment case cancelled or timed out."),h.catch(()=>{})},"onAbort");m.addEventListener("abort",x,{once:!0});let w=!1,g=!1;try{m.throwIfAborted();let u=[e.request.instructions,JSON.stringify({input:e.request.input,policyVisibleContext:e.request.policyVisibleContext})].filter(Boolean).join(`
3
3
 
4
4
  `);w=!0;let a=await t.sendTurn(r.id,{prompt:u,modelRef:c,approvalPolicy:"on-request"});if(h&&await h,!a.completedAt||a.status==="in_progress")throw new Error("Native Experiment turn did not settle.");if(g=!0,a.profileSnapshot||!a.harnessSnapshot||i(a.harnessSnapshot.harnessRelease)!==i(e.source.harnessRelease)||i(a.modelRef)!==i(c))throw new Error("Native Experiment turn differs from its admitted model or standalone Harness.");let S=await t.store.runtimeEventsForTurn(a.id);if(S.some(f=>f.sessionId!==r.id||f.turnId!==a.id))throw new Error("Native Experiment trace contains evidence from another case.");let W=S.filter(f=>f.name==="assistant.delta"&&typeof f.output=="string").map(f=>f.output).join(""),H=i(S),E=M(S),v=C({request:e.request,source:e.source,turn:a,output:W,traceHash:H,runtimeEventRefs:E,cancelled:e.signal.aborted,timedOut:m.aborted&&!e.signal.aborted,maxOutputBytes:e.maxOutputBytes});return{sessionId:r.id,turn:a,output:v.output,traceHash:H,runtimeEventRefs:E,cleanupComplete:!0,attempt:v}}catch(u){if(w&&!g){let a=await(h??t.interruptSessionTurn(r.id,"Standalone Experiment execution failed."));if(a.status==="in_progress"||!a.completedAt)throw new Error("Standalone Experiment cleanup remains unconfirmed.",{cause:u})}throw u}finally{m.removeEventListener("abort",x),o.delete(r.id)}}return d(n,"execute"),{execute:n,resolveSessionModelStream:s}}d(ee,"createStandaloneExperimentTurnOwner");function M(t){let o=-1;for(let n=t.length-1;n>=0;n--)if(t[n]?.name.endsWith(".delta")){o=n;break}let s=t.flatMap((n,e)=>n.name.endsWith(".delta")&&e!==o?[]:[n.id]);if(s.length>1e4)throw new Error("Native Experiment trace exceeds its evidence-reference limit.");return s}d(M,"retainedEventRefs");export{O as a,ee as b};
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as E,c as g}from"./chunk-TSAW2QVU.js";import{g as v}from"./chunk-MCIIGQT7.js";import{x as C}from"./chunk-PBZCXPPC.js";import{n as h}from"./chunk-VVNV4NNW.js";import{A as p}from"./chunk-PF56N7ZY.js";import{a as d}from"./chunk-FTQLQJQV.js";function _(n){let i=new Map;async function f(e){C(e,8388608);let o=v.parse(e);if(o.kind==="profile")return n.executeProfile(o.request);let s=h(o),l=i.get(o.id);if(l){if(l.hash!==s)throw new Error("Experiment case operation already owns different admitted inputs.");return l.result}if(i.size>=100)throw new Error("Experiment case execution capacity reached.");let c=new AbortController,a=x(o,c.signal);i.set(o.id,{hash:s,controller:c,result:a});try{return await a}finally{i.delete(o.id)}}d(f,"execute");async function x(e,o){let s=AbortSignal.any([o,AbortSignal.timeout(e.timeoutMs)]);if(s.throwIfAborted(),e.harness){if(!n.executeHarness||e.environment.kind!=="text")throw new Error("The selected standalone Harness has no compatible native Experiment adapter.");return n.executeHarness(e,s)}let l=await n.resolvePolicy(e);if(s.throwIfAborted(),e.environment.kind==="javascript"){let r=n.resolveEnvironment?await n.resolveEnvironment(e):g;return E({taskId:e.taskId,instructions:`${e.instructions}
2
+ import{a as E,c as g}from"./chunk-NBE74GLF.js";import{g as v}from"./chunk-LJDBR3RN.js";import{x as C}from"./chunk-PBZCXPPC.js";import{n as h}from"./chunk-VVNV4NNW.js";import{A as p}from"./chunk-PF56N7ZY.js";import{a as d}from"./chunk-FTQLQJQV.js";function _(n){let i=new Map;async function f(e){C(e,8388608);let o=v.parse(e);if(o.kind==="profile")return n.executeProfile(o.request);let s=h(o),l=i.get(o.id);if(l){if(l.hash!==s)throw new Error("Experiment case operation already owns different admitted inputs.");return l.result}if(i.size>=100)throw new Error("Experiment case execution capacity reached.");let c=new AbortController,a=x(o,c.signal);i.set(o.id,{hash:s,controller:c,result:a});try{return await a}finally{i.delete(o.id)}}d(f,"execute");async function x(e,o){let s=AbortSignal.any([o,AbortSignal.timeout(e.timeoutMs)]);if(s.throwIfAborted(),e.harness){if(!n.executeHarness||e.environment.kind!=="text")throw new Error("The selected standalone Harness has no compatible native Experiment adapter.");return n.executeHarness(e,s)}let l=await n.resolvePolicy(e);if(s.throwIfAborted(),e.environment.kind==="javascript"){let r=n.resolveEnvironment?await n.resolveEnvironment(e):g;return E({taskId:e.taskId,instructions:`${e.instructions}
3
3
  ${JSON.stringify({policyVisibleContext:e.policyVisibleContext})}`,input:e.input,definition:e.environment.definition,asset:e.environment.asset,initialState:e.environment.initialState,seed:e.environment.seed,timeoutMs:e.timeoutMs,execute:r,policy:l,signal:s})}let c=[{role:"system",text:e.instructions},{role:"user",text:JSON.stringify({input:e.input,policyVisibleContext:e.policyVisibleContext})}],a=null,u=null,m="completed";try{let r=await l({messages:c,tools:[],signal:s});if(s.throwIfAborted(),r.toolCalls.length)throw new Error("Text cases do not support tool calls.");a=r.text,c.push({role:"assistant",text:r.text,toolCalls:[]})}catch(r){u=r instanceof Error?r.message:"Experiment policy failed.",m=o.aborted?"cancelled":s.aborted?"timed_out":"policy_failure"}let t={schemaVersion:"openpond.javascriptEnvironmentAttempt.v1",taskId:e.taskId,status:m,output:a,error:u,messages:c,collected:m==="completed",environmentCleanupComplete:!0,snapshot:null};return{...t,contentHash:h(t)}}return d(x,"run"),{execute:f,cancel(e){let o=i.get(e);return o?.controller.abort(new Error("experiment_case_cancelled")),{id:e,cancelled:!!o}},async close(){for(let e of i.values())e.controller.abort(new Error("experiment_runtime_closed"));await Promise.allSettled([...i.values()].map(e=>e.result))}}}d(_,"createExperimentCaseService");function A(n){let i=0,f=new Map;return async({messages:x,tools:e,signal:o})=>{let s=`experiment:${n.request.id}:${i++}`,l=0,c=x.map(t=>{if(t.role==="tool")return{role:"tool",tool_call_id:t.callId,name:t.name,content:JSON.stringify(t.observation)};if(t.role==="assistant"){let r=f.get(l++);return{role:"assistant",content:t.text,...r?{continuation:r}:{},...t.toolCalls.length?{tool_calls:t.toolCalls.map(y=>({id:y.id,type:"function",function:{name:y.name,arguments:JSON.stringify(y.arguments)}}))}:{}}}return{role:t.role,content:t.text}}),a="",u=[],m;for await(let t of n.stream({model:n.request.model.modelId,messages:[...n.request.model.messages,...c],tools:e.map(r=>({type:"function",function:{name:r.name,description:r.description,parameters:r.inputSchema}})),requestId:s,maxTokens:n.request.model.maxOutputTokens,temperature:n.request.model.temperature,topP:n.request.model.topP,signal:o})){if(o.throwIfAborted(),t.type==="text_delta"&&(a+=t.text,a.length>262144))throw new Error("Experiment policy response exceeded its retained-output limit.");if(t.type==="tool_call_delta"&&(u=t.toolCalls,u.length>200))throw new Error("Experiment policy response exceeded its tool-call limit.");t.type==="continuation"&&(m=t.continuation),t.type==="usage"&&await n.onUsage?.({requestId:s,usage:t.usage})}return m&&f.set(i-1,m),{text:a,toolCalls:u.map(t=>({id:p.string().min(1).parse(t.id),name:p.string().min(1).parse(t.function?.name),arguments:p.record(p.string(),p.unknown()).parse(JSON.parse(p.string().parse(t.function?.arguments)))}))}}}d(A,"createLocalExperimentPolicy");export{_ as a,A as b};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as r,d as i,e as p}from"./chunk-YR5ID2SS.js";import{a}from"./chunk-FTQLQJQV.js";var T=new URL(p).hostname,A=new URL(i).hostname;async function d(n,s,e){let t=new URLSearchParams;e?.handle&&t.set("handle",e.handle),typeof e?.limit=="number"&&Number.isFinite(e.limit)&&t.set("limit",String(Math.max(1,Math.floor(e.limit)))),typeof e?.offset=="number"&&Number.isFinite(e.offset)&&t.set("offset",String(Math.max(0,Math.floor(e.offset)))),typeof e?.includeScheduled=="boolean"&&t.set("includeScheduled",e.includeScheduled?"true":"false");let o=t.toString(),c=await r(n,s,`/apps/list${o?`?${o}`:""}`,{method:"GET"});if(!c.ok){let u=await c.text().catch(()=>"");throw new Error(`Apps list failed: ${c.status} ${u}`)}let l=await c.json().catch(()=>({}));return Array.isArray(l.apps)?l.apps:[]}a(d,"listApps");async function h(n,s,e){let t=await r(n,s,"/apps/repo/create",{method:"POST",body:JSON.stringify(e)});if(!t.ok){let o=await t.text().catch(()=>"");throw new Error(`Repo create failed: ${t.status} ${o}`)}return await t.json()}a(h,"createRepo");async function x(n,s,e,t){let o=await r(n,s,`/apps/${encodeURIComponent(e)}/code-visibility`,{method:"PATCH",body:JSON.stringify({codeVisibility:t})});if(!o.ok){let c=await o.text().catch(()=>"");throw new Error(`Code visibility update failed: ${o.status} ${c}`)}return await o.json()}a(x,"updateAppCodeVisibility");async function f(n,s,e){let t=await r(n,s,`/v4/apps/${e}/environment`,{method:"GET"});if(!t.ok){let o=await t.text().catch(()=>"");throw new Error(`Environment get failed: ${t.status} ${o}`)}return await t.json()}a(f,"getAppEnvironment");async function m(n,s){let e=await r(n,s,"/v1/account",{method:"GET"});if(!e.ok){let t=await e.text().catch(()=>"");throw new Error(`Account lookup failed: ${e.status} ${t}`)}return await e.json()}a(m,"getOpenPondAccount");export{d as a,h as b,x as c,f as d,m as e};
2
+ import{b as r,d as i,e as p}from"./chunk-JCLTFDVW.js";import{a}from"./chunk-FTQLQJQV.js";var T=new URL(p).hostname,A=new URL(i).hostname;async function d(n,s,e){let t=new URLSearchParams;e?.handle&&t.set("handle",e.handle),typeof e?.limit=="number"&&Number.isFinite(e.limit)&&t.set("limit",String(Math.max(1,Math.floor(e.limit)))),typeof e?.offset=="number"&&Number.isFinite(e.offset)&&t.set("offset",String(Math.max(0,Math.floor(e.offset)))),typeof e?.includeScheduled=="boolean"&&t.set("includeScheduled",e.includeScheduled?"true":"false");let o=t.toString(),c=await r(n,s,`/apps/list${o?`?${o}`:""}`,{method:"GET"});if(!c.ok){let u=await c.text().catch(()=>"");throw new Error(`Apps list failed: ${c.status} ${u}`)}let l=await c.json().catch(()=>({}));return Array.isArray(l.apps)?l.apps:[]}a(d,"listApps");async function h(n,s,e){let t=await r(n,s,"/apps/repo/create",{method:"POST",body:JSON.stringify(e)});if(!t.ok){let o=await t.text().catch(()=>"");throw new Error(`Repo create failed: ${t.status} ${o}`)}return await t.json()}a(h,"createRepo");async function x(n,s,e,t){let o=await r(n,s,`/apps/${encodeURIComponent(e)}/code-visibility`,{method:"PATCH",body:JSON.stringify({codeVisibility:t})});if(!o.ok){let c=await o.text().catch(()=>"");throw new Error(`Code visibility update failed: ${o.status} ${c}`)}return await o.json()}a(x,"updateAppCodeVisibility");async function f(n,s,e){let t=await r(n,s,`/v4/apps/${e}/environment`,{method:"GET"});if(!t.ok){let o=await t.text().catch(()=>"");throw new Error(`Environment get failed: ${t.status} ${o}`)}return await t.json()}a(f,"getAppEnvironment");async function m(n,s){let e=await r(n,s,"/v1/account",{method:"GET"});if(!e.ok){let t=await e.text().catch(()=>"");throw new Error(`Account lookup failed: ${e.status} ${t}`)}return await e.json()}a(m,"getOpenPondAccount");export{d as a,h as b,x as c,f as d,m as e};