openpond 0.2.46 → 0.2.48

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 (212) hide show
  1. package/dist/app-server.d.ts +157 -1
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{actions-command-I3NI75P2.js → actions-command-DSO6YOEE.js} +1 -1
  4. package/dist/chunks/{app-layer-B3SMVO4B.js → app-layer-RRFI27N4.js} +1 -1
  5. package/dist/chunks/app-server-runtime-RWO4KGPU.js +2 -0
  6. package/dist/chunks/{apps-OA2VX34V.js → apps-NELJL377.js} +1 -1
  7. package/dist/chunks/{chunk-4UTIEH5H.js → chunk-2SPZYBDN.js} +1 -1
  8. package/dist/chunks/{chunk-LL4QP2IM.js → chunk-2ZJJFBIA.js} +1 -1
  9. package/dist/chunks/{chunk-HP2D3W2B.js → chunk-42GOV5ZU.js} +3 -3
  10. package/dist/chunks/{chunk-PGKEDR3S.js → chunk-5CMKGD43.js} +1 -1
  11. package/dist/chunks/{chunk-D6MQTNJ3.js → chunk-7K72KS5C.js} +6 -6
  12. package/dist/chunks/{chunk-JBHAU7PH.js → chunk-7MXZJQS7.js} +137 -137
  13. package/dist/chunks/{chunk-YSYXIJ46.js → chunk-7QEE4PBI.js} +1 -1
  14. package/dist/chunks/{chunk-F2AG46CV.js → chunk-7YR6CBNU.js} +1 -1
  15. package/dist/chunks/{chunk-UWO34HP6.js → chunk-DALJMSJG.js} +2 -2
  16. package/dist/chunks/chunk-DFM5JTS2.js +2 -0
  17. package/dist/chunks/{chunk-33AO3P6X.js → chunk-DLZP22WV.js} +1 -1
  18. package/dist/chunks/{chunk-BKMGBIBT.js → chunk-EMKZVP7Z.js} +1 -1
  19. package/dist/chunks/chunk-EPY7M5XS.js +2 -0
  20. package/dist/chunks/{chunk-ZJY2L43W.js → chunk-HA7EFTPF.js} +1 -1
  21. package/dist/chunks/{chunk-HK3WGUKK.js → chunk-IKWDL3RB.js} +1 -1
  22. package/dist/chunks/chunk-IOQUF34U.js +2 -0
  23. package/dist/chunks/chunk-JCCU3VFK.js +2 -0
  24. package/dist/chunks/{chunk-ZC57DX6D.js → chunk-JDLAHVAJ.js} +1 -1
  25. package/dist/chunks/{chunk-WWABOVRW.js → chunk-LVL4TIAO.js} +2 -2
  26. package/dist/chunks/{chunk-IV7F74JJ.js → chunk-MASJQWA2.js} +1 -1
  27. package/dist/chunks/{chunk-XLDW5NN3.js → chunk-N3DEA6PG.js} +1 -1
  28. package/dist/chunks/{chunk-F5DUN73H.js → chunk-N5QNXMIS.js} +1 -1
  29. package/dist/chunks/{chunk-MCRA6ZGJ.js → chunk-NAZ26IZL.js} +1 -1
  30. package/dist/chunks/chunk-NHJ26KXF.js +518 -0
  31. package/dist/chunks/chunk-NNF6KCHD.js +3 -0
  32. package/dist/chunks/{chunk-5OGRWWEH.js → chunk-O7VGFMDO.js} +1 -1
  33. package/dist/chunks/{chunk-USWZ3KUC.js → chunk-PA7XP42P.js} +1 -1
  34. package/dist/chunks/{chunk-BQNK2NMB.js → chunk-PJM2G7SG.js} +1 -1
  35. package/dist/chunks/chunk-PNE3IETM.js +190 -0
  36. package/dist/chunks/chunk-PYABBF53.js +53 -0
  37. package/dist/chunks/{chunk-TYWBEJOA.js → chunk-Q4H3NUVW.js} +2 -2
  38. package/dist/chunks/{chunk-HO5L2FUU.js → chunk-QJRXTIOC.js} +1 -1
  39. package/dist/chunks/chunk-QRWPEW3Z.js +24 -0
  40. package/dist/chunks/{chunk-LZSY5IM3.js → chunk-QXVIIM4T.js} +1 -1
  41. package/dist/chunks/{chunk-6SJZXZNA.js → chunk-R3XFY7VL.js} +1 -1
  42. package/dist/chunks/{chunk-EWS7MXTM.js → chunk-RLZPX4YP.js} +1 -1
  43. package/dist/chunks/{chunk-VW7D3DRM.js → chunk-SDEDAHV6.js} +72 -67
  44. package/dist/chunks/{chunk-BUFQKDAW.js → chunk-T5LE6R5S.js} +1 -1
  45. package/dist/chunks/{chunk-L4BYPZ4U.js → chunk-TGIB24K4.js} +1 -1
  46. package/dist/chunks/{chunk-D6E7JBBQ.js → chunk-TIUSKRBP.js} +4 -4
  47. package/dist/chunks/{chunk-6WLJWRMF.js → chunk-UJ5EFSEC.js} +1 -1
  48. package/dist/chunks/chunk-VOIH2BQA.js +2162 -0
  49. package/dist/chunks/{chunk-KE5RH6JA.js → chunk-WITSXYEW.js} +1 -1
  50. package/dist/chunks/chunk-WV2APYWG.js +2 -0
  51. package/dist/chunks/chunk-XBCIBAXD.js +4 -0
  52. package/dist/chunks/chunk-XDMUD4FW.js +5 -0
  53. package/dist/chunks/{chunk-DNXKIIV7.js → chunk-XM26DGML.js} +1 -1
  54. package/dist/chunks/{chunk-OGXSE57Z.js → chunk-YIB3J4RC.js} +1 -1
  55. package/dist/chunks/{chunk-H6W55CQG.js → chunk-YL6VFJ4P.js} +1 -1
  56. package/dist/chunks/cli-ZLDLOKPL.js +2 -0
  57. package/dist/chunks/{configuration-command-MVZS625X.js → configuration-command-SA56RV5B.js} +1 -1
  58. package/dist/chunks/{connected-evidence-7LHUZ2UI.js → connected-evidence-IVSQZYIB.js} +1 -1
  59. package/dist/chunks/{continual-K5JNHNQH.js → continual-PKK2BOTB.js} +1 -1
  60. package/dist/chunks/core-commands-W5IGIITV.js +2 -0
  61. package/dist/chunks/{datasets-KDN2EXHE.js → datasets-KSO2UG6R.js} +1 -1
  62. package/dist/chunks/{desktop-test-WIOEKMPR.js → desktop-test-6HXFM7PO.js} +1 -1
  63. package/dist/chunks/{dist-JBE7DPFZ.js → dist-4HV2W6V4.js} +1 -1
  64. package/dist/chunks/{dist-3MTJ7VM6.js → dist-BLBZENVB.js} +1 -1
  65. package/dist/chunks/{evaluation-coordination-NGYHL7HG.js → evaluation-coordination-MOFBXRXN.js} +1 -1
  66. package/dist/chunks/{experiment-improvements-2M7GRGWS.js → experiment-improvements-TDHM6NEA.js} +1 -1
  67. package/dist/chunks/{experiments-B6CRZ3GI.js → experiments-HFPDFD4I.js} +1 -1
  68. package/dist/chunks/{extension-RZTMK3ON.js → extension-R373LYIB.js} +1 -1
  69. package/dist/chunks/{help-EISFHH2F.js → help-PEFQDDTA.js} +1 -1
  70. package/dist/chunks/{hosted-experiment-improvement-6CHH65DX.js → hosted-experiment-improvement-MGMZWTZY.js} +1 -1
  71. package/dist/chunks/hosted-harness-runtime-FZZLWLBR.js +2 -0
  72. package/dist/chunks/{hosted-profile-candidate-HYEISIAC.js → hosted-profile-candidate-LVNKOTKJ.js} +1 -1
  73. package/dist/chunks/hosted-profile-compiler-PQFIWO5B.js +2 -0
  74. package/dist/chunks/{hosted-profile-evaluation-control-LV6YXOG7.js → hosted-profile-evaluation-control-7B3RAZU2.js} +1 -1
  75. package/dist/chunks/{hosted-profile-evaluation-inspection-A62UYFEP.js → hosted-profile-evaluation-inspection-FPCV42DD.js} +1 -1
  76. package/dist/chunks/hosted-profile-evaluation-preparation-JROREZH3.js +3 -0
  77. package/dist/chunks/{human-review-J6JGNRBR.js → human-review-HRGGACEM.js} +1 -1
  78. package/dist/chunks/import-RSAQ44GG.js +4 -0
  79. package/dist/chunks/{learning-REL6GGNA.js → learning-FNBEIAY6.js} +1 -1
  80. package/dist/chunks/{opchat-CUZUU2WM.js → opchat-I7ZWJ5XK.js} +1 -1
  81. package/dist/chunks/{organizations-VT27V4B2.js → organizations-LFCZIH7E.js} +1 -1
  82. package/dist/chunks/{profile-N2E5ASHQ.js → profile-EPIX5QVK.js} +1 -1
  83. package/dist/chunks/{project-agent-XMXOBJSC.js → project-agent-DGOPMECP.js} +1 -1
  84. package/dist/chunks/{sandbox-command-NC665ZZ5.js → sandbox-command-Q5F6VUOS.js} +1 -1
  85. package/dist/chunks/{sandbox-template-OTP6S3RU.js → sandbox-template-7GICPIKJ.js} +1 -1
  86. package/dist/chunks/{src-WM35IF4W.js → src-DH5AQ4Z7.js} +1 -1
  87. package/dist/chunks/src-GKWEQK2T.js +329 -0
  88. package/dist/chunks/{taskset-COAPMTT3.js → taskset-LUG3ZU6J.js} +1 -1
  89. package/dist/chunks/{teams-bot-ACWJ7PJP.js → teams-bot-Z6RJGHME.js} +1 -1
  90. package/dist/chunks/{training-4JUK7YQV.js → training-XHE6FVII.js} +1 -1
  91. package/dist/chunks/{workspaces-WTPFRJMS.js → workspaces-XIQNPAP7.js} +1 -1
  92. package/dist/cli.js +1 -1
  93. package/dist/index.js +1 -1
  94. package/dist/web/agent-sources/SOURCES.md +11 -0
  95. package/dist/web/agent-sources/claude-code.svg +1 -0
  96. package/dist/web/agent-sources/codex.svg +1 -0
  97. package/dist/web/agent-sources/grok-build.svg +3 -0
  98. package/dist/web/agent-sources/hermes.png +0 -0
  99. package/dist/web/agent-sources/oh-my-pi.svg +11 -0
  100. package/dist/web/agent-sources/openclaw.svg +54 -0
  101. package/dist/web/agent-sources/opencode.svg +4 -0
  102. package/dist/web/agent-sources/pi.svg +6 -0
  103. package/dist/web/assets/App-BI-uOpnP.js +234 -0
  104. package/dist/web/assets/App-DkH8CeoI.css +1 -0
  105. package/dist/web/assets/{AppDialog-CaxeNfsu.js → AppDialog-1iGodoot.js} +1 -1
  106. package/dist/web/assets/{AppTerminalPanel-dtK0ZPer.js → AppTerminalPanel-udtBdWFn.js} +2 -2
  107. package/dist/web/assets/AppsView-BonAGiS8.css +1 -0
  108. package/dist/web/assets/AppsView-DhKsU4yi.js +1 -0
  109. package/dist/web/assets/BrowserSidebar-BnOyqIQT.js +1 -0
  110. package/dist/web/assets/{CartesianChart-Drfk6jTn.js → CartesianChart-C24DAywn.js} +1 -1
  111. package/dist/web/assets/{CollaborationTabs-Czh2noeb.js → CollaborationTabs-DgmOF5Fe.js} +1 -1
  112. package/dist/web/assets/{CommandMenu-D-M-xomh.js → CommandMenu-CUNGtHwS.js} +1 -1
  113. package/dist/web/assets/{CommunityView-BrdxUI5Z.js → CommunityView-CE7qeJnr.js} +1 -1
  114. package/dist/web/assets/{ComposerCreateImproveStrip-CJ8nkYJf.js → ComposerCreateImproveStrip-BixNsg2a.js} +1 -1
  115. package/dist/web/assets/{GetStartedView-u7Jw7YA1.js → GetStartedView-B8gCwmBX.js} +1 -1
  116. package/dist/web/assets/{HostedModelLearningReview-D0a2nwse.js → HostedModelLearningReview-CitgUNfC.js} +1 -1
  117. package/dist/web/assets/{HostedModelLearningSettings-CQQGyjxi.js → HostedModelLearningSettings-WUaqzNsa.js} +1 -1
  118. package/dist/web/assets/{LabModelVersionDetailPage-Cxlc4sSC.js → LabModelVersionDetailPage-Cx0kL69J.js} +1 -1
  119. package/dist/web/assets/{LabSkillSidebar-BnJkDb0c.js → LabSkillSidebar-DRggqZ1j.js} +1 -1
  120. package/dist/web/assets/LabsRoute-BujTZhqC.js +99 -0
  121. package/dist/web/assets/{MainChatThread-r_TYiTnW.js → MainChatThread-CyA_644R.js} +2 -2
  122. package/dist/web/assets/MainPane-LaEtxydD.js +19 -0
  123. package/dist/web/assets/{MarkdownText-BxPHz4je.js → MarkdownText-DJI5LwT0.js} +19 -19
  124. package/dist/web/assets/{NativeSkillSidebar-CCHK6kMG.js → NativeSkillSidebar-CkFpWxjd.js} +1 -1
  125. package/dist/web/assets/{NewExperienceSwitcher-CuKWTDZj.js → NewExperienceSwitcher-DXcRHHsu.js} +1 -1
  126. package/dist/web/assets/{NewProjectDialog-CS6sw2oD.js → NewProjectDialog-gDzX_ZIJ.js} +1 -1
  127. package/dist/web/assets/{OutputsPage-JDM5bfLJ.js → OutputsPage-J_k-_N82.js} +1 -1
  128. package/dist/web/assets/{ProjectsPage-B3zTBHOA.js → ProjectsPage-BsyZmvlg.js} +1 -1
  129. package/dist/web/assets/{RightChatPanelStack-L8S3yj1u.js → RightChatPanelStack-Bz8puMUB.js} +1 -1
  130. package/dist/web/assets/{RightSidebarHomePanel-BWJQKFUp.js → RightSidebarHomePanel-DmorYb6p.js} +1 -1
  131. package/dist/web/assets/ScheduledWorkPage-BFDzQUyL.js +1 -0
  132. package/dist/web/assets/SettingsView-BB7wCdbr.js +5 -0
  133. package/dist/web/assets/SettingsView-BnANbPLS.css +1 -0
  134. package/dist/web/assets/{TeamChatView-DakXCNQE.js → TeamChatView-CZ3b7rq2.js} +2 -2
  135. package/dist/web/assets/{TerminalOverlay-DaonK5C0.js → TerminalOverlay-Ck43Qri3.js} +1 -1
  136. package/dist/web/assets/{TrainingCreationPanel-CUvSsSwp.js → TrainingCreationPanel-ejqPZm3g.js} +1 -1
  137. package/dist/web/assets/{TrainingDraftPanel-DNivtVwd.js → TrainingDraftPanel-Cy2AQxxL.js} +1 -1
  138. package/dist/web/assets/{UsageSettingsSection-rbmuoPoE.js → UsageSettingsSection-B7nyMItm.js} +1 -1
  139. package/dist/web/assets/{WorkSidebarPanel-DrYt9xzv.js → WorkSidebarPanel-BfjAc097.js} +1 -1
  140. package/dist/web/assets/{WorkspaceDiffPanel-CThoTqe4.js → WorkspaceDiffPanel-D9hAV8l7.js} +5 -5
  141. package/dist/web/assets/{WorkspaceEnvironmentMenu-DeODKxvW.js → WorkspaceEnvironmentMenu-B-K9XgFB.js} +3 -3
  142. package/dist/web/assets/{WorkspaceGitDialogs-CBarJYF-.js → WorkspaceGitDialogs-BJVFx_L3.js} +1 -1
  143. package/dist/web/assets/{WorkspaceMonacoEditor-Hmu5m_sO.js → WorkspaceMonacoEditor-p-FWMXoZ.js} +3 -3
  144. package/dist/web/assets/{arrow-up-right-BV2IHfb9.js → arrow-up-right-CFGI2YSt.js} +1 -1
  145. package/dist/web/assets/{chunk-YTGRET2L-PKzEfYnf.js → chunk-UHVJOMWN-BAlur2vw.js} +1 -1
  146. package/dist/web/assets/{clipboard-DDIvAWKp.js → clipboard-DIIxBort.js} +1 -1
  147. package/dist/web/assets/{cloud-upload-Dv6kFnfC.js → cloud-upload-BaQFNCTp.js} +1 -1
  148. package/dist/web/assets/{cssMode-BK0jFqWW.js → cssMode-6LOkSggB.js} +1 -1
  149. package/dist/web/assets/{folder-open-B9ixJQJX.js → folder-open-DZSxfPtr.js} +1 -1
  150. package/dist/web/assets/{folder-plus-DqSKvtNB.js → folder-plus-21v4D_Vx.js} +1 -1
  151. package/dist/web/assets/{git-commit-horizontal-C1lQvfxe.js → git-commit-horizontal-CgGixL64.js} +1 -1
  152. package/dist/web/assets/{htmlMode-CCV301b6.js → htmlMode-B5uRraNd.js} +1 -1
  153. package/dist/web/assets/index-DJcUXSsN.css +1 -0
  154. package/dist/web/assets/{index-DIaKfM8a.js → index-DOMrqhcz.js} +2 -2
  155. package/dist/web/assets/{info-BEvaynAD.js → info-BGTcmow7.js} +1 -1
  156. package/dist/web/assets/{jsonMode-Co4pyN4F.js → jsonMode-D3m8N4Gi.js} +1 -1
  157. package/dist/web/assets/{lspLanguageFeatures-CSU0G5da.js → lspLanguageFeatures-DoyipLsB.js} +1 -1
  158. package/dist/web/assets/{minimize-2-DT8t8wwP.js → minimize-2-B01qSko4.js} +1 -1
  159. package/dist/web/assets/{monaco.contribution-Cr0AaHCD.js → monaco.contribution--U8v3jpa.js} +2 -2
  160. package/dist/web/assets/{monaco.contribution-DSBAb_PC.js → monaco.contribution-BJyfaGX2.js} +2 -2
  161. package/dist/web/assets/{monaco.contribution-CBwGIQY1.js → monaco.contribution-Bc22foTx.js} +2 -2
  162. package/dist/web/assets/{monaco.contribution-DUZrs1D-.js → monaco.contribution-DuRhJ6zU.js} +2 -2
  163. package/dist/web/assets/{monitor-DGqnfsK9.js → monitor-eZP8ZTHe.js} +1 -1
  164. package/dist/web/assets/{play-C1XWyKh6.js → play-CGsWFR_B.js} +1 -1
  165. package/dist/web/assets/{python-Z1foxLdf.js → python-BNrLZWud.js} +1 -1
  166. package/dist/web/assets/{save-CX2kF74j.js → save-BLgjrccP.js} +1 -1
  167. package/dist/web/assets/{square-DMkXeYeV.js → square-CI1qNtvE.js} +1 -1
  168. package/dist/web/assets/{toggleHighContrast-CRMVp779.js → toggleHighContrast-B_GcTCnw.js} +1 -1
  169. package/dist/web/assets/{tsMode-Czu8YAqh.js → tsMode-CmruH_ys.js} +1 -1
  170. package/dist/web/assets/{upload-giKOPnl1.js → upload-DnlgGS2x.js} +1 -1
  171. package/dist/web/assets/useLocalAgentSchedules-BBhGUfK-.js +1 -0
  172. package/dist/web/assets/useProviderSettings-Bw-csWbH.css +1 -0
  173. package/dist/web/assets/useProviderSettings-DfhdkKdC.js +5 -0
  174. package/dist/web/assets/{useSessionTurnCache-CUYFsu_W.js → useSessionTurnCache-BwscKl5i.js} +1 -1
  175. package/dist/web/assets/{wifi-off-DbDXaV1N.js → wifi-off-Dz-4EDCc.js} +1 -1
  176. package/dist/web/assets/{workers-Cno4XklJ.js → workers-Bi9u46cp.js} +1 -1
  177. package/dist/web/assets/{yaml-C28t_C6h.js → yaml-DVTkiRnh.js} +1 -1
  178. package/dist/web/index.html +2 -2
  179. package/package.json +1 -1
  180. package/dist/chunks/app-server-runtime-FL2CHQU2.js +0 -2
  181. package/dist/chunks/chunk-4VKNBADF.js +0 -2
  182. package/dist/chunks/chunk-5ZZM3TUN.js +0 -24
  183. package/dist/chunks/chunk-6JBWHR6T.js +0 -5
  184. package/dist/chunks/chunk-FKCWOASO.js +0 -49
  185. package/dist/chunks/chunk-FOEUDMME.js +0 -2678
  186. package/dist/chunks/chunk-ICZEOMPO.js +0 -2
  187. package/dist/chunks/chunk-JO7GRBOG.js +0 -2
  188. package/dist/chunks/chunk-KUKOZJIR.js +0 -2
  189. package/dist/chunks/chunk-M7PBDRKC.js +0 -2
  190. package/dist/chunks/chunk-P653BXMY.js +0 -3
  191. package/dist/chunks/chunk-PMZH2TKS.js +0 -4
  192. package/dist/chunks/chunk-W4IL6TWB.js +0 -186
  193. package/dist/chunks/chunk-WVNN3RB2.js +0 -2
  194. package/dist/chunks/cli-5QR7QNQJ.js +0 -2
  195. package/dist/chunks/core-commands-J2SJM5I5.js +0 -2
  196. package/dist/chunks/hosted-harness-runtime-PAYMAXH7.js +0 -2
  197. package/dist/chunks/hosted-profile-compiler-KQREWJA5.js +0 -2
  198. package/dist/chunks/hosted-profile-evaluation-preparation-OR4OLYEX.js +0 -3
  199. package/dist/chunks/import-YHSX6SBZ.js +0 -4
  200. package/dist/chunks/src-TNWF3IC5.js +0 -329
  201. package/dist/web/assets/App-CdDQ-lXE.css +0 -1
  202. package/dist/web/assets/App-D2f8_mGk.js +0 -235
  203. package/dist/web/assets/AppsView-CzbB5pXp.css +0 -1
  204. package/dist/web/assets/AppsView-DwK1UBJP.js +0 -1
  205. package/dist/web/assets/BrowserSidebar-Cj9VnkgU.js +0 -1
  206. package/dist/web/assets/LabsRoute-hHwZNbqN.js +0 -99
  207. package/dist/web/assets/MainPane-DJcd4tPk.js +0 -19
  208. package/dist/web/assets/ScheduledWorkPage-qX12p4B0.js +0 -1
  209. package/dist/web/assets/SettingsView-0KMs-r2I.js +0 -9
  210. package/dist/web/assets/SettingsView-CVsuQeCZ.css +0 -1
  211. package/dist/web/assets/index-1cMIFBxZ.css +0 -1
  212. package/dist/web/assets/useLocalAgentSchedules-BHxWmOeC.js +0 -1
@@ -12,6 +12,7 @@ declare const RuntimeEventSchema: z.ZodObject<{
12
12
  "task.input": "task.input";
13
13
  "task.wait": "task.wait";
14
14
  "session.started": "session.started";
15
+ "session.updated": "session.updated";
15
16
  "session.title.updated": "session.title.updated";
16
17
  "turn.started": "turn.started";
17
18
  "assistant.delta": "assistant.delta";
@@ -20865,6 +20866,53 @@ type AgentRuntimeHost = {
20865
20866
  type JsonRpcRequest = z.infer<typeof JsonRpcRequestSchema>;
20866
20867
  type JsonRpcNotification = z.infer<typeof JsonRpcNotificationSchema>;
20867
20868
  declare const HostStorageRequestSchema: z.ZodDiscriminatedUnion<[
20869
+ z.ZodObject<{
20870
+ contractVersion: z.ZodLiteral<1>;
20871
+ requestId: z.ZodString;
20872
+ operation: z.ZodLiteral<"profile-evaluations/grade">;
20873
+ params: z.ZodObject<{
20874
+ action: z.ZodEnum<{
20875
+ upload: "upload";
20876
+ execute: "execute";
20877
+ }>;
20878
+ callId: z.ZodString;
20879
+ sessionId: z.ZodString;
20880
+ turnId: z.ZodString;
20881
+ sha256: z.ZodString;
20882
+ sizeBytes: z.ZodNumber;
20883
+ timeoutMs: z.ZodNumber;
20884
+ offset: z.ZodOptional<z.ZodNumber>;
20885
+ contentsBase64: z.ZodOptional<z.ZodString>;
20886
+ }, z.core.$strict>;
20887
+ }, z.core.$strict>,
20888
+ z.ZodObject<{
20889
+ contractVersion: z.ZodLiteral<1>;
20890
+ requestId: z.ZodString;
20891
+ operation: z.ZodLiteral<"profile-evaluations/sandbox">;
20892
+ params: z.ZodObject<{
20893
+ sessionId: z.ZodString;
20894
+ turnId: z.ZodString;
20895
+ action: z.ZodEnum<{
20896
+ stop: "stop";
20897
+ exec: "exec";
20898
+ upload: "upload";
20899
+ read: "read";
20900
+ }>;
20901
+ area: z.ZodOptional<z.ZodEnum<{
20902
+ runtime: "runtime";
20903
+ policy: "policy";
20904
+ }>>;
20905
+ path: z.ZodOptional<z.ZodString>;
20906
+ sha256: z.ZodOptional<z.ZodString>;
20907
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
20908
+ offset: z.ZodOptional<z.ZodNumber>;
20909
+ contentsBase64: z.ZodOptional<z.ZodString>;
20910
+ command: z.ZodOptional<z.ZodString>;
20911
+ stdin: z.ZodOptional<z.ZodString>;
20912
+ cwd: z.ZodOptional<z.ZodString>;
20913
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
20914
+ }, z.core.$strict>;
20915
+ }, z.core.$strict>,
20868
20916
  z.ZodObject<{
20869
20917
  contractVersion: z.ZodLiteral<1>;
20870
20918
  requestId: z.ZodString;
@@ -20884,6 +20932,20 @@ declare const HostStorageRequestSchema: z.ZodDiscriminatedUnion<[
20884
20932
  pageCount: z.ZodOptional<z.ZodNumber>;
20885
20933
  }, z.core.$strict>;
20886
20934
  }, z.core.$strict>,
20935
+ z.ZodObject<{
20936
+ contractVersion: z.ZodLiteral<1>;
20937
+ requestId: z.ZodString;
20938
+ operation: z.ZodLiteral<"output/readBytes">;
20939
+ params: z.ZodObject<{
20940
+ sessionId: z.ZodString;
20941
+ turnId: z.ZodString;
20942
+ fileId: z.ZodString;
20943
+ revision: z.ZodNumber;
20944
+ sha256: z.ZodString;
20945
+ sizeBytes: z.ZodNumber;
20946
+ offset: z.ZodNumber;
20947
+ }, z.core.$strict>;
20948
+ }, z.core.$strict>,
20887
20949
  z.ZodObject<{
20888
20950
  contractVersion: z.ZodLiteral<1>;
20889
20951
  requestId: z.ZodString;
@@ -25981,6 +26043,55 @@ type PreferenceComparisonReleaseRecord = z.infer<typeof PreferenceComparisonRele
25981
26043
  type PreferenceComparisonAssignmentRecord = z.infer<typeof PreferenceComparisonAssignmentRecordSchema>;
25982
26044
  type PreferenceComparisonSubmissionRecord = z.infer<typeof PreferenceComparisonSubmissionRecordSchema>;
25983
26045
  type PreferenceComparisonCalibrationRecord = z.infer<typeof PreferenceComparisonCalibrationRecordSchema>;
26046
+ declare const ConversationServingGrantSchema: z.ZodObject<{
26047
+ id: z.ZodString;
26048
+ revision: z.ZodNumber;
26049
+ ownerInstanceId: z.ZodString;
26050
+ teamId: z.ZodString;
26051
+ profileId: z.ZodString;
26052
+ projectId: z.ZodString;
26053
+ hostedModelId: z.ZodString;
26054
+ role: z.ZodEnum<{
26055
+ agent: "agent";
26056
+ extension: "extension";
26057
+ chat_manual: "chat_manual";
26058
+ authoring_optimizer: "authoring_optimizer";
26059
+ }>;
26060
+ roleTargetId: z.ZodString;
26061
+ expectedBindingId: z.ZodString;
26062
+ policyId: z.ZodNullable<z.ZodString>;
26063
+ authorizedConfigurationHash: z.ZodNullable<z.ZodString>;
26064
+ enabled: z.ZodBoolean;
26065
+ updatedAt: z.ZodString;
26066
+ }, z.core.$strict>;
26067
+ type ConversationServingGrant = z.infer<typeof ConversationServingGrantSchema>;
26068
+ declare const ConversationServingExecutionSchema: z.ZodObject<{
26069
+ id: z.ZodString;
26070
+ grantId: z.ZodString;
26071
+ revision: z.ZodNumber;
26072
+ jobId: z.ZodString;
26073
+ artifactHash: z.ZodString;
26074
+ priorBindingId: z.ZodString;
26075
+ bindingId: z.ZodNullable<z.ZodString>;
26076
+ restoredBindingId: z.ZodNullable<z.ZodString>;
26077
+ status: z.ZodEnum<{
26078
+ failed: "failed";
26079
+ binding: "binding";
26080
+ prepared: "prepared";
26081
+ superseded: "superseded";
26082
+ active: "active";
26083
+ rolled_back: "rolled_back";
26084
+ canary: "canary";
26085
+ rolling_back: "rolling_back";
26086
+ }>;
26087
+ leaseId: z.ZodString;
26088
+ canarySeconds: z.ZodNumber;
26089
+ activatedAt: z.ZodNullable<z.ZodString>;
26090
+ failure: z.ZodNullable<z.ZodString>;
26091
+ createdAt: z.ZodString;
26092
+ updatedAt: z.ZodString;
26093
+ }, z.core.$strict>;
26094
+ type ConversationServingExecution = z.infer<typeof ConversationServingExecutionSchema>;
25984
26095
  type Logger = {
25985
26096
  debug: (message: string, fields?: Record<string, unknown>) => void;
25986
26097
  info: (message: string, fields?: Record<string, unknown>) => void;
@@ -26101,7 +26212,47 @@ declare class SqliteLearningStore extends SqliteLearningCredentialStore {
26101
26212
  listLearningScopes(): Promise<string[]>;
26102
26213
  learningRepository(): LearningRepository;
26103
26214
  }
26104
- declare class SqliteTrainingModelStore extends SqliteLearningStore {
26215
+ declare class SqliteConversationServingStore extends SqliteLearningStore {
26216
+ private conversationTables;
26217
+ private ensureConversationTables;
26218
+ listConversationServingGrants(): Promise<ConversationServingGrant[]>;
26219
+ listConversationServingExecutions(grantId: string): Promise<ConversationServingExecution[]>;
26220
+ saveConversationServingGrant(raw: ConversationServingGrant, expectedRevision: number): Promise<{
26221
+ id: string;
26222
+ revision: number;
26223
+ ownerInstanceId: string;
26224
+ teamId: string;
26225
+ profileId: string;
26226
+ projectId: string;
26227
+ hostedModelId: string;
26228
+ role: "agent" | "extension" | "chat_manual" | "authoring_optimizer";
26229
+ roleTargetId: string;
26230
+ expectedBindingId: string;
26231
+ policyId: string | null;
26232
+ authorizedConfigurationHash: string | null;
26233
+ enabled: boolean;
26234
+ updatedAt: string;
26235
+ }>;
26236
+ saveConversationServingExecution(raw: ConversationServingExecution, expectedRevision: number): Promise<{
26237
+ id: string;
26238
+ grantId: string;
26239
+ revision: number;
26240
+ jobId: string;
26241
+ artifactHash: string;
26242
+ priorBindingId: string;
26243
+ bindingId: string | null;
26244
+ restoredBindingId: string | null;
26245
+ status: "failed" | "binding" | "prepared" | "superseded" | "active" | "rolled_back" | "canary" | "rolling_back";
26246
+ leaseId: string;
26247
+ canarySeconds: number;
26248
+ activatedAt: string | null;
26249
+ failure: string | null;
26250
+ createdAt: string;
26251
+ updatedAt: string;
26252
+ }>;
26253
+ private saveConversationServingRow;
26254
+ }
26255
+ declare class SqliteTrainingModelStore extends SqliteConversationServingStore {
26105
26256
  saveModelCurrencySnapshot(snapshotInput: ModelCurrencySnapshot): Promise<ModelCurrencySnapshot>;
26106
26257
  getModelCurrencySnapshot(id: string): Promise<ModelCurrencySnapshot | null>;
26107
26258
  listModelCurrencySnapshots(input?: {
@@ -26172,6 +26323,11 @@ declare class SqliteTrainingModelStore extends SqliteLearningStore {
26172
26323
  role: ModelBinding["role"];
26173
26324
  roleTargetId: string;
26174
26325
  expectedActiveBindingId: string | null;
26326
+ servingGrant?: {
26327
+ id: string;
26328
+ expectedRevision: number;
26329
+ authorizationHash: string;
26330
+ };
26175
26331
  next: ModelBinding | null;
26176
26332
  timestamp: string;
26177
26333
  }): Promise<{
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{jc as r}from"./chunks/chunk-W4IL6TWB.js";import{e as p}from"./chunks/chunk-KUKOZJIR.js";import"./chunks/chunk-5OGRWWEH.js";import{i as e}from"./chunks/chunk-D6MQTNJ3.js";import"./chunks/chunk-ICZEOMPO.js";import"./chunks/chunk-DNXKIIV7.js";import"./chunks/chunk-WVNN3RB2.js";import"./chunks/chunk-FOEUDMME.js";import"./chunks/chunk-BKMGBIBT.js";import"./chunks/chunk-33AO3P6X.js";import"./chunks/chunk-4VKNBADF.js";import"./chunks/chunk-BUFQKDAW.js";import"./chunks/chunk-HO5L2FUU.js";import"./chunks/chunk-JBHAU7PH.js";import"./chunks/chunk-F2AG46CV.js";import"./chunks/chunk-SDO4FC4Q.js";import"./chunks/chunk-IR3YJWPW.js";import"./chunks/chunk-LL4QP2IM.js";import"./chunks/chunk-PGKEDR3S.js";import"./chunks/chunk-XEOEKFG6.js";import"./chunks/chunk-ZJY2L43W.js";import"./chunks/chunk-L3KS6MOV.js";import"./chunks/chunk-YSYXIJ46.js";import"./chunks/chunk-6JBWHR6T.js";import"./chunks/chunk-HK3WGUKK.js";import"./chunks/chunk-6MI4KKWF.js";import"./chunks/chunk-5ZZM3TUN.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-H6W55CQG.js";import"./chunks/chunk-Z3D4C7BG.js";import"./chunks/chunk-JO7GRBOG.js";import"./chunks/chunk-BQNK2NMB.js";import"./chunks/chunk-VW7D3DRM.js";import"./chunks/chunk-UWO34HP6.js";import"./chunks/chunk-L4BYPZ4U.js";import"./chunks/chunk-P653BXMY.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
2
+ import{lc as r}from"./chunks/chunk-PNE3IETM.js";import"./chunks/chunk-NHJ26KXF.js";import"./chunks/chunk-EMKZVP7Z.js";import{e as p}from"./chunks/chunk-JCCU3VFK.js";import"./chunks/chunk-O7VGFMDO.js";import"./chunks/chunk-DLZP22WV.js";import"./chunks/chunk-DFM5JTS2.js";import"./chunks/chunk-VOIH2BQA.js";import"./chunks/chunk-T5LE6R5S.js";import"./chunks/chunk-QJRXTIOC.js";import"./chunks/chunk-SDO4FC4Q.js";import"./chunks/chunk-IR3YJWPW.js";import{i as e}from"./chunks/chunk-7K72KS5C.js";import"./chunks/chunk-XM26DGML.js";import"./chunks/chunk-EPY7M5XS.js";import"./chunks/chunk-7MXZJQS7.js";import"./chunks/chunk-7YR6CBNU.js";import"./chunks/chunk-2ZJJFBIA.js";import"./chunks/chunk-5CMKGD43.js";import"./chunks/chunk-XEOEKFG6.js";import"./chunks/chunk-HA7EFTPF.js";import"./chunks/chunk-L3KS6MOV.js";import"./chunks/chunk-7QEE4PBI.js";import"./chunks/chunk-XDMUD4FW.js";import"./chunks/chunk-IKWDL3RB.js";import"./chunks/chunk-6MI4KKWF.js";import"./chunks/chunk-QRWPEW3Z.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-YL6VFJ4P.js";import"./chunks/chunk-Z3D4C7BG.js";import"./chunks/chunk-WV2APYWG.js";import"./chunks/chunk-PJM2G7SG.js";import"./chunks/chunk-SDEDAHV6.js";import"./chunks/chunk-DALJMSJG.js";import"./chunks/chunk-TGIB24K4.js";import"./chunks/chunk-NNF6KCHD.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
@@ -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-XEOEKFG6.js";import{a as v}from"./chunk-USWZ3KUC.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import{C as O}from"./chunk-4UTIEH5H.js";import{d as P}from"./chunk-6SJZXZNA.js";import"./chunk-GLUWATL5.js";import"./chunk-H6W55CQG.js";import"./chunk-Z3D4C7BG.js";import"./chunk-JO7GRBOG.js";import"./chunk-BQNK2NMB.js";import"./chunk-VW7D3DRM.js";import"./chunk-UWO34HP6.js";import"./chunk-L4BYPZ4U.js";import"./chunk-P653BXMY.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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-XEOEKFG6.js";import{a as v}from"./chunk-PA7XP42P.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import{C as O}from"./chunk-2SPZYBDN.js";import{d as P}from"./chunk-R3XFY7VL.js";import"./chunk-GLUWATL5.js";import"./chunk-YL6VFJ4P.js";import"./chunk-Z3D4C7BG.js";import"./chunk-WV2APYWG.js";import"./chunk-PJM2G7SG.js";import"./chunk-SDEDAHV6.js";import"./chunk-DALJMSJG.js";import"./chunk-TGIB24K4.js";import"./chunk-NNF6KCHD.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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-XLDW5NN3.js";import"./chunk-USWZ3KUC.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as l}from"./chunk-EWS7MXTM.js";import"./chunk-TYWBEJOA.js";import"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-4UTIEH5H.js";import"./chunk-LZSY5IM3.js";import"./chunk-6SJZXZNA.js";import"./chunk-GLUWATL5.js";import"./chunk-H6W55CQG.js";import"./chunk-Z3D4C7BG.js";import"./chunk-JO7GRBOG.js";import"./chunk-BQNK2NMB.js";import"./chunk-VW7D3DRM.js";import"./chunk-UWO34HP6.js";import"./chunk-L4BYPZ4U.js";import"./chunk-P653BXMY.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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-N3DEA6PG.js";import"./chunk-PA7XP42P.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as l}from"./chunk-RLZPX4YP.js";import"./chunk-Q4H3NUVW.js";import"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-2SPZYBDN.js";import"./chunk-QXVIIM4T.js";import"./chunk-R3XFY7VL.js";import"./chunk-GLUWATL5.js";import"./chunk-YL6VFJ4P.js";import"./chunk-Z3D4C7BG.js";import"./chunk-WV2APYWG.js";import"./chunk-PJM2G7SG.js";import"./chunk-SDEDAHV6.js";import"./chunk-DALJMSJG.js";import"./chunk-TGIB24K4.js";import"./chunk-NNF6KCHD.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{kc as c,lc as d}from"./chunk-PNE3IETM.js";import"./chunk-NHJ26KXF.js";import"./chunk-EMKZVP7Z.js";import{e as b}from"./chunk-JCCU3VFK.js";import"./chunk-O7VGFMDO.js";import"./chunk-DLZP22WV.js";import"./chunk-DFM5JTS2.js";import"./chunk-VOIH2BQA.js";import"./chunk-T5LE6R5S.js";import"./chunk-QJRXTIOC.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{i as a}from"./chunk-7K72KS5C.js";import"./chunk-XM26DGML.js";import"./chunk-EPY7M5XS.js";import"./chunk-7MXZJQS7.js";import"./chunk-7YR6CBNU.js";import"./chunk-2ZJJFBIA.js";import"./chunk-5CMKGD43.js";import"./chunk-XEOEKFG6.js";import"./chunk-HA7EFTPF.js";import"./chunk-L3KS6MOV.js";import"./chunk-7QEE4PBI.js";import"./chunk-XDMUD4FW.js";import"./chunk-IKWDL3RB.js";import"./chunk-6MI4KKWF.js";import"./chunk-QRWPEW3Z.js";import"./chunk-6FA3GG5B.js";import"./chunk-YL6VFJ4P.js";import"./chunk-Z3D4C7BG.js";import"./chunk-WV2APYWG.js";import"./chunk-PJM2G7SG.js";import"./chunk-SDEDAHV6.js";import"./chunk-DALJMSJG.js";import"./chunk-TGIB24K4.js";import"./chunk-NNF6KCHD.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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{b as H,c as Q}from"./chunk-22UARBPW.js";import{f as $,g as J,h as L,i as v,j as q}from"./chunk-XLDW5NN3.js";import{c as g}from"./chunk-USWZ3KUC.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-EWS7MXTM.js";import"./chunk-TYWBEJOA.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-4UTIEH5H.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-LZSY5IM3.js";import{d as f}from"./chunk-6SJZXZNA.js";import"./chunk-GLUWATL5.js";import"./chunk-H6W55CQG.js";import"./chunk-Z3D4C7BG.js";import"./chunk-JO7GRBOG.js";import"./chunk-BQNK2NMB.js";import"./chunk-VW7D3DRM.js";import"./chunk-UWO34HP6.js";import"./chunk-L4BYPZ4U.js";import"./chunk-P653BXMY.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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{b as H,c as Q}from"./chunk-22UARBPW.js";import{f as $,g as J,h as L,i as v,j as q}from"./chunk-N3DEA6PG.js";import{c as g}from"./chunk-PA7XP42P.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-RLZPX4YP.js";import"./chunk-Q4H3NUVW.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-2SPZYBDN.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-QXVIIM4T.js";import{d as f}from"./chunk-R3XFY7VL.js";import"./chunk-GLUWATL5.js";import"./chunk-YL6VFJ4P.js";import"./chunk-Z3D4C7BG.js";import"./chunk-WV2APYWG.js";import"./chunk-PJM2G7SG.js";import"./chunk-SDEDAHV6.js";import"./chunk-DALJMSJG.js";import"./chunk-TGIB24K4.js";import"./chunk-NNF6KCHD.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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};