openpond 0.2.44 → 0.2.46
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.
- package/RELEASE.md +16 -13
- package/dist/app-server.d.ts +20954 -11829
- package/dist/app-server.js +1 -1
- package/dist/chunks/actions-command-I3NI75P2.js +2 -0
- package/dist/chunks/{app-layer-7SPLENWD.js → app-layer-B3SMVO4B.js} +1 -1
- package/dist/chunks/app-server-runtime-FL2CHQU2.js +2 -0
- package/dist/chunks/apps-OA2VX34V.js +2 -0
- package/dist/chunks/{chunk-PEYA2Q7Q.js → chunk-33AO3P6X.js} +3 -3
- package/dist/chunks/chunk-4UTIEH5H.js +16 -0
- package/dist/chunks/chunk-4VKNBADF.js +2 -0
- package/dist/chunks/{chunk-ANVOHBUV.js → chunk-5OGRWWEH.js} +1 -1
- package/dist/chunks/chunk-5ZZM3TUN.js +24 -0
- package/dist/chunks/chunk-6JBWHR6T.js +5 -0
- package/dist/chunks/{chunk-DXAZUJPA.js → chunk-6SJZXZNA.js} +1 -1
- package/dist/chunks/chunk-6WLJWRMF.js +2 -0
- package/dist/chunks/chunk-BKMGBIBT.js +2 -0
- package/dist/chunks/chunk-BQNK2NMB.js +21 -0
- package/dist/chunks/chunk-BUFQKDAW.js +2 -0
- package/dist/chunks/chunk-D6E7JBBQ.js +19 -0
- package/dist/chunks/chunk-D6MQTNJ3.js +9 -0
- package/dist/chunks/chunk-DNXKIIV7.js +3 -0
- package/dist/chunks/{chunk-OI2N2636.js → chunk-EWS7MXTM.js} +1 -1
- package/dist/chunks/chunk-F2AG46CV.js +2 -0
- package/dist/chunks/{chunk-CR6CDOKS.js → chunk-F5DUN73H.js} +2 -2
- package/dist/chunks/chunk-FKCWOASO.js +49 -0
- package/dist/chunks/chunk-FOEUDMME.js +2678 -0
- package/dist/chunks/chunk-H6W55CQG.js +2 -0
- package/dist/chunks/chunk-HK3WGUKK.js +17 -0
- package/dist/chunks/{chunk-ZEVARU6J.js → chunk-HO5L2FUU.js} +1 -1
- package/dist/chunks/chunk-HP2D3W2B.js +42 -0
- package/dist/chunks/chunk-ICZEOMPO.js +2 -0
- package/dist/chunks/{chunk-X2B4MN6W.js → chunk-IV7F74JJ.js} +1 -1
- package/dist/chunks/chunk-JBHAU7PH.js +2409 -0
- package/dist/chunks/chunk-JO7GRBOG.js +2 -0
- package/dist/chunks/{chunk-KPDWQCF6.js → chunk-KE5RH6JA.js} +1 -1
- package/dist/chunks/chunk-KUKOZJIR.js +2 -0
- package/dist/chunks/chunk-L4BYPZ4U.js +22 -0
- package/dist/chunks/{chunk-2CXJK2M3.js → chunk-LL4QP2IM.js} +1 -1
- package/dist/chunks/{chunk-Z2BYC6TP.js → chunk-LZSY5IM3.js} +1 -1
- package/dist/chunks/chunk-M7PBDRKC.js +2 -0
- package/dist/chunks/{chunk-OJVIH7J6.js → chunk-MCRA6ZGJ.js} +1 -1
- package/dist/chunks/chunk-NPOHW5OU.js +2 -0
- package/dist/chunks/{chunk-KIGN4FI6.js → chunk-OGXSE57Z.js} +1 -1
- package/dist/chunks/{chunk-HZP5U2AA.js → chunk-P653BXMY.js} +1 -1
- package/dist/chunks/{chunk-YF6IDYTS.js → chunk-PGKEDR3S.js} +1 -1
- package/dist/chunks/chunk-PMZH2TKS.js +4 -0
- package/dist/chunks/chunk-TYWBEJOA.js +3 -0
- package/dist/chunks/chunk-USWZ3KUC.js +2 -0
- package/dist/chunks/chunk-UWO34HP6.js +33 -0
- package/dist/chunks/{chunk-Z6ZR5O3J.js → chunk-VW7D3DRM.js} +2 -2
- package/dist/chunks/chunk-W4IL6TWB.js +186 -0
- package/dist/chunks/chunk-WVNN3RB2.js +2 -0
- package/dist/chunks/{chunk-RAWEO7SJ.js → chunk-WWABOVRW.js} +2 -2
- package/dist/chunks/{chunk-B3O2GAQH.js → chunk-XLDW5NN3.js} +1 -1
- package/dist/chunks/chunk-YSYXIJ46.js +8 -0
- package/dist/chunks/{chunk-V62BHD5G.js → chunk-ZC57DX6D.js} +1 -1
- package/dist/chunks/{chunk-W5NQ2DI7.js → chunk-ZJY2L43W.js} +3 -3
- package/dist/chunks/cli-5QR7QNQJ.js +2 -0
- package/dist/chunks/{configuration-command-LDPUCHVH.js → configuration-command-MVZS625X.js} +1 -1
- package/dist/chunks/connected-evidence-7LHUZ2UI.js +2 -0
- package/dist/chunks/{continual-MHMPLLUZ.js → continual-K5JNHNQH.js} +3 -3
- package/dist/chunks/core-commands-J2SJM5I5.js +2 -0
- package/dist/chunks/datasets-KDN2EXHE.js +2 -0
- package/dist/chunks/desktop-test-WIOEKMPR.js +3 -0
- package/dist/chunks/dist-3MTJ7VM6.js +2 -0
- package/dist/chunks/{dist-ELWB75PL.js → dist-JBE7DPFZ.js} +1 -1
- package/dist/chunks/evaluation-coordination-NGYHL7HG.js +2 -0
- package/dist/chunks/experiment-improvements-2M7GRGWS.js +2 -0
- package/dist/chunks/experiments-B6CRZ3GI.js +2 -0
- package/dist/chunks/{extension-JEUZZJ5X.js → extension-RZTMK3ON.js} +1 -1
- package/dist/chunks/{help-4F4QGL4C.js → help-EISFHH2F.js} +1 -1
- package/dist/chunks/hosted-experiment-improvement-6CHH65DX.js +3 -0
- package/dist/chunks/hosted-harness-runtime-PAYMAXH7.js +2 -0
- package/dist/chunks/hosted-profile-candidate-HYEISIAC.js +3 -0
- package/dist/chunks/hosted-profile-compiler-KQREWJA5.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-LV6YXOG7.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-A62UYFEP.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-OR4OLYEX.js +3 -0
- package/dist/chunks/human-review-J6JGNRBR.js +2 -0
- package/dist/chunks/import-YHSX6SBZ.js +4 -0
- package/dist/chunks/learning-REL6GGNA.js +2 -0
- package/dist/chunks/opchat-CUZUU2WM.js +3 -0
- package/dist/chunks/organizations-VT27V4B2.js +2 -0
- package/dist/chunks/{profile-ESULTWDN.js → profile-N2E5ASHQ.js} +1 -1
- package/dist/chunks/project-agent-XMXOBJSC.js +2 -0
- package/dist/chunks/sandbox-command-NC665ZZ5.js +2 -0
- package/dist/chunks/{sandbox-template-7WHGNVM6.js → sandbox-template-OTP6S3RU.js} +1 -1
- package/dist/chunks/src-TNWF3IC5.js +329 -0
- package/dist/chunks/{src-A3OVZOSV.js → src-WM35IF4W.js} +5 -5
- package/dist/chunks/taskset-COAPMTT3.js +2 -0
- package/dist/chunks/{teams-bot-YMCDLBGT.js → teams-bot-ACWJ7PJP.js} +1 -1
- package/dist/chunks/training-4JUK7YQV.js +2 -0
- package/dist/chunks/{workspaces-ZZ7R5BUL.js → workspaces-WTPFRJMS.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/web/assets/App-CdDQ-lXE.css +1 -0
- package/dist/web/assets/App-D2f8_mGk.js +235 -0
- package/dist/web/assets/{AppDialog-CV3ddujB.js → AppDialog-CaxeNfsu.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-dhbGOO_K.js → AppTerminalPanel-dtK0ZPer.js} +2 -2
- package/dist/web/assets/{AppsView-Bxa-9BF2.js → AppsView-DwK1UBJP.js} +1 -1
- package/dist/web/assets/BrowserSidebar-Cj9VnkgU.js +1 -0
- package/dist/web/assets/{CartesianChart-BOxN-Su1.js → CartesianChart-Drfk6jTn.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-DTmJvNJx.js → CollaborationTabs-Czh2noeb.js} +1 -1
- package/dist/web/assets/{CommandMenu-DggN2ygj.js → CommandMenu-D-M-xomh.js} +1 -1
- package/dist/web/assets/CommunityView-BrdxUI5Z.js +1 -0
- package/dist/web/assets/ComposerCreateImproveStrip-CJ8nkYJf.js +1 -0
- package/dist/web/assets/GetStartedView-u7Jw7YA1.js +1 -0
- package/dist/web/assets/HostedModelLearningReview-D0a2nwse.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-CQQGyjxi.js +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-Cxlc4sSC.js +1 -0
- package/dist/web/assets/LabSkillSidebar-BnJkDb0c.js +1 -0
- package/dist/web/assets/LabsRoute-ACN76d2j.css +1 -0
- package/dist/web/assets/LabsRoute-hHwZNbqN.js +99 -0
- package/dist/web/assets/MainChatThread-r_TYiTnW.js +2 -0
- package/dist/web/assets/MainPane-DJcd4tPk.js +19 -0
- package/dist/web/assets/MainPane-DOWsSew1.css +1 -0
- package/dist/web/assets/{MarkdownText-BhzHRq1J.js → MarkdownText-BxPHz4je.js} +1 -1
- package/dist/web/assets/{NativeSkillSidebar-LU-PhEhW.js → NativeSkillSidebar-CCHK6kMG.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-Bi_gpHLG.js → NewExperienceSwitcher-CuKWTDZj.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-B8pWvSkq.js → NewProjectDialog-CS6sw2oD.js} +1 -1
- package/dist/web/assets/OutputsPage-JDM5bfLJ.js +1 -0
- package/dist/web/assets/{ProjectsPage-Ca8_iEWu.js → ProjectsPage-B3zTBHOA.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-L8S3yj1u.js +1 -0
- package/dist/web/assets/{RightSidebarHomePanel-6pygznxX.js → RightSidebarHomePanel-BWJQKFUp.js} +1 -1
- package/dist/web/assets/ScheduledWorkPage-qX12p4B0.js +1 -0
- package/dist/web/assets/SettingsView-0KMs-r2I.js +9 -0
- package/dist/web/assets/SettingsView-CVsuQeCZ.css +1 -0
- package/dist/web/assets/{TeamChatView-BGLCPTen.js → TeamChatView-DakXCNQE.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-DHkS2cVJ.js → TerminalOverlay-DaonK5C0.js} +12 -12
- package/dist/web/assets/{TrainingCreationPanel-Dneamjzh.js → TrainingCreationPanel-CUvSsSwp.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-Cfh59jLZ.js → TrainingDraftPanel-DNivtVwd.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-C9l1KY-O.js → UsageSettingsSection-rbmuoPoE.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-DrYt9xzv.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-CThoTqe4.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-DeODKxvW.js +32 -0
- package/dist/web/assets/{WorkspaceGitDialogs-mE3Og6Zo.js → WorkspaceGitDialogs-CBarJYF-.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-DPZ0n0G9.js → WorkspaceMonacoEditor-Hmu5m_sO.js} +3 -3
- package/dist/web/assets/{arrow-up-right-DU2KsZD-.js → arrow-up-right-BV2IHfb9.js} +1 -1
- package/dist/web/assets/chunk-YTGRET2L-PKzEfYnf.js +1 -0
- package/dist/web/assets/{clipboard-g2b4_k81.js → clipboard-DDIvAWKp.js} +1 -1
- package/dist/web/assets/{cloud-upload-P2bDOPsQ.js → cloud-upload-Dv6kFnfC.js} +1 -1
- package/dist/web/assets/{cssMode-CPbPVAUt.js → cssMode-BK0jFqWW.js} +1 -1
- package/dist/web/assets/{folder-open-BmsONNsr.js → folder-open-B9ixJQJX.js} +1 -1
- package/dist/web/assets/{folder-plus-B18NgUxy.js → folder-plus-DqSKvtNB.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-enxGCV_e.js → git-commit-horizontal-C1lQvfxe.js} +1 -1
- package/dist/web/assets/{htmlMode-DiV88uQv.js → htmlMode-CCV301b6.js} +1 -1
- package/dist/web/assets/index-1cMIFBxZ.css +1 -0
- package/dist/web/assets/{index-vfpCN9zy.js → index-DIaKfM8a.js} +2 -2
- package/dist/web/assets/{info-DmuSBIYe.js → info-BEvaynAD.js} +1 -1
- package/dist/web/assets/{jsonMode-BaeOjuKU.js → jsonMode-Co4pyN4F.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-D8To0CQA.js → lspLanguageFeatures-CSU0G5da.js} +1 -1
- package/dist/web/assets/{minimize-2-C2xnEzCe.js → minimize-2-DT8t8wwP.js} +1 -1
- package/dist/web/assets/{monaco.contribution-JW3MxX6k.js → monaco.contribution-CBwGIQY1.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DgTFvG2Q.js → monaco.contribution-Cr0AaHCD.js} +2 -2
- package/dist/web/assets/{monaco.contribution-bytkwn0O.js → monaco.contribution-DSBAb_PC.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DbrACt99.js → monaco.contribution-DUZrs1D-.js} +2 -2
- package/dist/web/assets/{monitor-mtHVW7gU.js → monitor-DGqnfsK9.js} +1 -1
- package/dist/web/assets/play-C1XWyKh6.js +1 -0
- package/dist/web/assets/{python-DAPe0Urm.js → python-Z1foxLdf.js} +1 -1
- package/dist/web/assets/{save-B2eVAjW6.js → save-CX2kF74j.js} +1 -1
- package/dist/web/assets/{square-16bX2k2i.js → square-DMkXeYeV.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-Ce0YhEQg.js → toggleHighContrast-CRMVp779.js} +1 -1
- package/dist/web/assets/{tsMode-CnvMmHz6.js → tsMode-Czu8YAqh.js} +1 -1
- package/dist/web/assets/{upload-COPbAaD-.js → upload-giKOPnl1.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-C-Wjm5HK.js → useLocalAgentSchedules-BHxWmOeC.js} +1 -1
- package/dist/web/assets/{useSessionTurnCache-BfVbncMB.js → useSessionTurnCache-CUYFsu_W.js} +1 -1
- package/dist/web/assets/{wifi-off-C9iLbCC-.js → wifi-off-DbDXaV1N.js} +1 -1
- package/dist/web/assets/{workers-BXh_u8Fr.js → workers-Cno4XklJ.js} +1 -1
- package/dist/web/assets/{yaml-CRSr9x6_.js → yaml-C28t_C6h.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +99 -0
- package/package.json +4 -3
- package/dist/chunks/actions-command-5IEZEP6W.js +0 -2
- package/dist/chunks/app-server-runtime-NQ2BYPGK.js +0 -2
- package/dist/chunks/apps-XQ7PHJTD.js +0 -2
- package/dist/chunks/chunk-36RCXSEJ.js +0 -2
- package/dist/chunks/chunk-3QC2DDQ5.js +0 -2
- package/dist/chunks/chunk-3XDFNA7W.js +0 -2
- package/dist/chunks/chunk-4S4WH65X.js +0 -3
- package/dist/chunks/chunk-4TMC5F2P.js +0 -5
- package/dist/chunks/chunk-65BW2QXY.js +0 -2
- package/dist/chunks/chunk-65QCNUGE.js +0 -659
- package/dist/chunks/chunk-6XF4GI35.js +0 -2
- package/dist/chunks/chunk-ALZRXBEC.js +0 -33
- package/dist/chunks/chunk-ARJUNUH6.js +0 -5
- package/dist/chunks/chunk-CEEZ7Y2J.js +0 -2
- package/dist/chunks/chunk-DZVVGU6K.js +0 -8
- package/dist/chunks/chunk-HY2Q7EDK.js +0 -4
- package/dist/chunks/chunk-IT4AT6LB.js +0 -42
- package/dist/chunks/chunk-KRC2S5QF.js +0 -5
- package/dist/chunks/chunk-L6HCBIAU.js +0 -2
- package/dist/chunks/chunk-LNEOLOK2.js +0 -13
- package/dist/chunks/chunk-MTJNKRXL.js +0 -22
- package/dist/chunks/chunk-NM2GYDPA.js +0 -19
- package/dist/chunks/chunk-OMM4ZO7E.js +0 -2182
- package/dist/chunks/chunk-OQPFFKU6.js +0 -2
- package/dist/chunks/chunk-QID62K65.js +0 -2400
- package/dist/chunks/chunk-YOOPTMQK.js +0 -3
- package/dist/chunks/cli-OJU6NQSA.js +0 -2
- package/dist/chunks/core-commands-UZL5RF2M.js +0 -2
- package/dist/chunks/datasets-42AZHVSV.js +0 -13
- package/dist/chunks/desktop-test-DI76HKS7.js +0 -3
- package/dist/chunks/dist-6YP37XI5.js +0 -2
- package/dist/chunks/experiments-Z3S35BYN.js +0 -2
- package/dist/chunks/hosted-harness-runtime-VZNYNQ6T.js +0 -2
- package/dist/chunks/hosted-profile-compiler-JXLPR7SX.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-Q54YXXIM.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-7WESM3ZH.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-QP24PYBL.js +0 -3
- package/dist/chunks/opchat-UFWWVJL6.js +0 -3
- package/dist/chunks/organizations-SBBIOF6O.js +0 -2
- package/dist/chunks/project-agent-IBHUQ3JX.js +0 -2
- package/dist/chunks/sandbox-command-PAJAIMWM.js +0 -2
- package/dist/chunks/src-5MJSO3UD.js +0 -326
- package/dist/chunks/taskset-BZYQT65N.js +0 -2
- package/dist/chunks/training-7PST5HZU.js +0 -2
- package/dist/web/assets/App-6AQXN2SM.js +0 -226
- package/dist/web/assets/App-7h_oHCFd.css +0 -1
- package/dist/web/assets/BrowserSidebar-BLwL2FOG.js +0 -1
- package/dist/web/assets/CommunityView-CuDrYOIf.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-BrduENlL.js +0 -1
- package/dist/web/assets/GetStartedView-Db1IEWzv.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-kofNdPAe.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-6ij3nwWD.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-C7Maqcit.js +0 -1
- package/dist/web/assets/LabSkillSidebar-Bz0U-Nmw.js +0 -1
- package/dist/web/assets/LabsRoute-Ch1N-e2S.js +0 -52
- package/dist/web/assets/LabsRoute-Dw6-12kt.css +0 -1
- package/dist/web/assets/MainChatThread-BJbhZOvs.js +0 -2
- package/dist/web/assets/MainPane-Cs2Kng_k.js +0 -19
- package/dist/web/assets/OutputsPage-BkGI0kHp.js +0 -1
- package/dist/web/assets/RightChatPanelStack-DjEdxsq8.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-BSiOxxAH.js +0 -1
- package/dist/web/assets/SettingsView-1XN7KLBl.js +0 -9
- package/dist/web/assets/SettingsView-C7av3zwv.css +0 -1
- package/dist/web/assets/WorkSidebarPanel-CEnO-Txp.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-BiuQBflC.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-Dr-E0c1j.js +0 -32
- package/dist/web/assets/index-B9VSiz_z.css +0 -1
- package/dist/web/assets/refresh-cw-Dvm_Pq3U.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as N,b as E,c as P,d as J,e as j,f as S,g as O,h as C,i as R,j as k,k as B,l as q,m as U,n as L,o as l}from"./chunk-KPDWQCF6.js";import{m as v,s as w,t as y}from"./chunk-B3O2GAQH.js";import"./chunk-65BW2QXY.js";import"./chunk-BSHAIAXY.js";import"./chunk-OI2N2636.js";import"./chunk-4S4WH65X.js";import"./chunk-XWPC3AN4.js";import{b as I,f,g as h,h as p}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-Z2BYC6TP.js";import"./chunk-ARJUNUH6.js";import"./chunk-DXAZUJPA.js";import"./chunk-GLUWATL5.js";import"./chunk-3QC2DDQ5.js";import"./chunk-Z3D4C7BG.js";import"./chunk-LNEOLOK2.js";import"./chunk-Z6ZR5O3J.js";import"./chunk-ALZRXBEC.js";import"./chunk-MTJNKRXL.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import{a as b}from"./chunk-FTQLQJQV.js";async function M(r,o,e,i){if(o==="list-files"){let t=i[1];if(!t)throw new Error("usage: sandbox list-files <sandboxId> [--path <path>]");let n=typeof e.path=="string"?e.path.trim():void 0,s=h(e.maxEntries,"max-entries"),a=e.recursive!==void 0?f(e.recursive):void 0,d=await r.listFiles(t,{...n?{path:n}:{},...a!==void 0?{recursive:a}:{},...s!==void 0?{maxEntries:s}:{}});return console.log(JSON.stringify({sandbox:l(d.sandbox),files:d.files},null,2)),!0}if(o==="upload-file"){let t=i[1],n=typeof e.path=="string"?e.path.trim():"",s=typeof e.contents=="string"?e.contents:typeof e.content=="string"?e.content:"",a=typeof e.contentsBase64=="string"?e.contentsBase64.trim():typeof e.contentBase64=="string"?e.contentBase64.trim():"";if(!t||!n)throw new Error('usage: sandbox upload-file <sandboxId> --path <path> --contents "text"');if(!s&&!a)throw new Error('usage: sandbox upload-file <sandboxId> --path <path> --contents "text"');let d=a?await r.uploadFileBase64(t,n,a):await r.uploadFile(t,n,s);return console.log(JSON.stringify({sandbox:l(d.sandbox),file:d.file},null,2)),!0}if(o==="download-file"){let t=i[1],n=typeof e.path=="string"?e.path.trim():"",s=Number(e["offset-bytes"]),a=Number(e["max-bytes"]);if(!t||!n)throw new Error("usage: sandbox download-file <sandboxId> --path <path>");let d=await r.downloadFileResponse(t,{path:n,...Number.isFinite(s)?{offsetBytes:s}:{},...Number.isFinite(a)?{maxBytes:a}:{}});return console.log(JSON.stringify({sandbox:l(d.sandbox),file:d.file,contents:Buffer.from(d.file.contentsBase64,"base64").toString("utf-8")},null,2)),!0}if(o==="search-files"){let t=i[1],n=typeof e.query=="string"?e.query.trim():"";if(!t||!n)throw new Error("usage: sandbox search-files <sandboxId> --query <text> [--path <path>]");let s=typeof e.path=="string"?e.path.trim():void 0,a=h(e.maxResults,"max-results"),d=await r.searchFiles(t,{query:n,...s?{path:s}:{},...a!==void 0?{maxResults:a}:{}});return console.log(JSON.stringify({sandbox:l(d.sandbox),matches:d.matches},null,2)),!0}if(o==="delete-file"){let t=i[1],n=typeof e.path=="string"?e.path.trim():"";if(!t||!n)throw new Error("usage: sandbox delete-file <sandboxId> --path <path> [--recursive]");let s=await r.deleteFile(t,n,{recursive:f(e.recursive)});return console.log(JSON.stringify({sandbox:l(s.sandbox),deleted:s.deleted},null,2)),!0}if(o==="stat-file"){let t=i[1],n=typeof e.path=="string"?e.path.trim():"";if(!t||!n)throw new Error("usage: sandbox stat-file <sandboxId> --path <path>");let s=await r.statFile(t,n);return console.log(JSON.stringify({sandbox:l(s.sandbox),file:s.file},null,2)),!0}if(o==="mkdir"){let t=i[1],n=typeof e.path=="string"?e.path.trim():"";if(!t||!n)throw new Error("usage: sandbox mkdir <sandboxId> --path <path> [--recursive false]");let s=await r.mkdir(t,{path:n,recursive:e.recursive!==void 0?f(e.recursive):void 0});return console.log(JSON.stringify({sandbox:l(s.sandbox),directory:s.directory},null,2)),!0}if(o==="move-file"){let t=i[1],n=typeof e.fromPath=="string"?e.fromPath.trim():"",s=typeof e.toPath=="string"?e.toPath.trim():"";if(!t||!n||!s)throw new Error("usage: sandbox move-file <sandboxId> --from-path <path> --to-path <path> [--overwrite]");let a=await r.moveFile(t,{fromPath:n,toPath:s,overwrite:f(e.overwrite)});return console.log(JSON.stringify({sandbox:l(a.sandbox),moved:a.moved,file:a.file},null,2)),!0}return!1}b(M,"handleSandboxFilesCommand");async function T(r,o,e,i){if(o==="git-status"){let t=i[1];if(!t)throw new Error("usage: sandbox git-status <sandboxId>");let n=await r.gitStatus(t);return console.log(JSON.stringify({sandbox:l(n.sandbox),status:n.status},null,2)),!0}if(o==="git-diff"){let t=i[1];if(!t)throw new Error("usage: sandbox git-diff <sandboxId> [--base-ref <ref>]");let n=typeof e.baseRef=="string"&&e.baseRef.trim()?e.baseRef.trim():void 0,s=await r.gitDiff(t,{...n?{baseRef:n}:{}});return console.log(JSON.stringify({sandbox:l(s.sandbox),diff:s.diff},null,2)),!0}if(o==="git-export-patch"){let t=i[1];if(!t)throw new Error("usage: sandbox git-export-patch <sandboxId> [--base-ref <ref>]");let n=typeof e.baseRef=="string"&&e.baseRef.trim()?e.baseRef.trim():void 0,s=await r.gitExportPatch(t,{...n?{baseRef:n}:{}});return console.log(JSON.stringify({sandbox:l(s.sandbox),patch:s.patch},null,2)),!0}if(o==="git-branch"){let t=i[1],n=typeof e.branch=="string"?e.branch.trim():"",s=typeof e.startPoint=="string"&&e.startPoint.trim()?e.startPoint.trim():void 0;if(!t||!n)throw new Error("usage: sandbox git-branch <sandboxId> --branch <name> [--create] [--start-point <ref>]");let a=await r.gitBranch(t,{branch:n,create:f(e.create),...s?{startPoint:s}:{}});return console.log(JSON.stringify({sandbox:l(a.sandbox),branch:a.branch},null,2)),!0}if(o==="git-commit"){let t=i[1],n=typeof e.message=="string"?e.message.trim():"",s=f(e.all),d=(typeof e.paths=="string"?e.paths:typeof e.path=="string"?e.path:"").split(",").map(g=>g.trim()).filter(Boolean);if(!t||!n||!s&&d.length===0)throw new Error('usage: sandbox git-commit <sandboxId> --message "..." [--all|--paths <csv>]');let c=await r.gitCommit(t,{message:n,...s?{all:!0}:{paths:d}});return console.log(JSON.stringify({sandbox:l(c.sandbox),commit:c.commit},null,2)),!0}if(o==="git-pull"){let t=i[1];if(!t)throw new Error("usage: sandbox git-pull <sandboxId> [--remote origin] [--branch main] [--rebase|--ff-only false]");let n=typeof e.remote=="string"&&e.remote.trim()?e.remote.trim():void 0,s=typeof e.branch=="string"&&e.branch.trim()?e.branch.trim():void 0,a=await r.gitPull(t,{...n?{remote:n}:{},...s?{branch:s}:{},...e.rebase!==void 0?{rebase:f(e.rebase)}:{},...e.ffOnly!==void 0?{ffOnly:f(e.ffOnly)}:{}});return console.log(JSON.stringify({sandbox:l(a.sandbox),pull:a.pull},null,2)),!0}if(o==="git-push"){let t=i[1];if(!t)throw new Error("usage: sandbox git-push <sandboxId> [--remote origin] [--branch main] [--set-upstream] [--force-with-lease]");let n=typeof e.remote=="string"&&e.remote.trim()?e.remote.trim():void 0,s=typeof e.branch=="string"&&e.branch.trim()?e.branch.trim():void 0,a=await r.gitPush(t,{...n?{remote:n}:{},...s?{branch:s}:{},...e.setUpstream!==void 0?{setUpstream:f(e.setUpstream)}:{},...e.forceWithLease!==void 0?{forceWithLease:f(e.forceWithLease)}:{}});return console.log(JSON.stringify({sandbox:l(a.sandbox),push:a.push},null,2)),!0}return!1}b(T,"handleSandboxGitCommand");async function F(r,o,e,i){if(o==="process-start"){let t=i[1],n=(typeof e.command=="string"?e.command:null)||i.slice(2).join(" ");if(!t||!n.trim())throw new Error("usage: sandbox process-start <sandboxId> --command <command>");let s=p(e.timeoutSeconds,"timeout-seconds"),a=await r.startProcess(t,{command:n.trim(),...s!==void 0?{timeoutSeconds:s}:{}});return console.log(JSON.stringify({sandbox:l(a.sandbox),process:a.process},null,2)),!0}if(o==="process-list"){let t=i[1];if(!t)throw new Error("usage: sandbox process-list <sandboxId>");let n=await r.listProcesses(t);return console.log(JSON.stringify({sandbox:l(n.sandbox),processes:n.processes},null,2)),!0}if(o==="process-get"){let t=i[1],n=i[2];if(!t||!n)throw new Error("usage: sandbox process-get <sandboxId> <processId> [--since <cursor>]");let s=p(e.since,"since"),a=await r.getProcess(t,n,{...s!==void 0?{since:s}:{}});return console.log(JSON.stringify({sandbox:l(a.sandbox),process:a.process,output:a.output,cursor:a.cursor,completed:a.completed},null,2)),!0}if(o==="process-stop"){let t=i[1],n=i[2];if(!t||!n)throw new Error("usage: sandbox process-stop <sandboxId> <processId>");let s=await r.stopProcess(t,n);return console.log(JSON.stringify({sandbox:l(s.sandbox),process:s.process},null,2)),!0}if(o==="process-stream"){let t=i[1],n=i[2];if(!t||!n)throw new Error("usage: sandbox process-stream <sandboxId> <processId> [--since <cursor>]");let s=p(e.since,"since");return await r.streamProcessOutput(t,n,{...s!==void 0?{since:s}:{}}),!0}if(o==="pty-start"){let t=i[1];if(!t)throw new Error("usage: sandbox pty-start <sandboxId> [--command <command>]");let n=(typeof e.command=="string"?e.command:null)||i.slice(2).join(" "),s=p(e.timeoutSeconds,"timeout-seconds"),a=p(e.rows,"rows"),d=p(e.cols,"cols"),c=await r.startPty(t,{...n.trim()?{command:n.trim()}:{},...s!==void 0?{timeoutSeconds:s}:{},...a!==void 0?{rows:a}:{},...d!==void 0?{cols:d}:{}});return console.log(JSON.stringify({sandbox:l(c.sandbox),pty:c.pty},null,2)),!0}if(o==="pty-list"){let t=i[1];if(!t)throw new Error("usage: sandbox pty-list <sandboxId>");let n=await r.listPtys(t);return console.log(JSON.stringify({sandbox:l(n.sandbox),ptys:n.ptys},null,2)),!0}if(o==="pty-get"){let t=i[1],n=i[2];if(!t||!n)throw new Error("usage: sandbox pty-get <sandboxId> <ptyId> [--since <cursor>]");let s=p(e.since,"since"),a=await r.getPty(t,n,{...s!==void 0?{since:s}:{}});return console.log(JSON.stringify({sandbox:l(a.sandbox),pty:a.pty,output:a.output,cursor:a.cursor,completed:a.completed},null,2)),!0}if(o==="pty-write"){let t=i[1],n=i[2],s=typeof e.inputBase64=="string"?e.inputBase64.trim():"",a=(typeof e.input=="string"?e.input:null)||i.slice(3).join(" ");if(!t||!n||!s&&!a)throw new Error("usage: sandbox pty-write <sandboxId> <ptyId> --input <text>");let d=await r.writePtyInput(t,n,s?{dataBase64:s}:a);return console.log(JSON.stringify({sandbox:l(d.sandbox),pty:d.pty},null,2)),!0}if(o==="pty-stop"){let t=i[1],n=i[2];if(!t||!n)throw new Error("usage: sandbox pty-stop <sandboxId> <ptyId>");let s=await r.stopPty(t,n);return console.log(JSON.stringify({sandbox:l(s.sandbox),pty:s.pty},null,2)),!0}if(o==="pty-stream"){let t=i[1],n=i[2];if(!t||!n)throw new Error("usage: sandbox pty-stream <sandboxId> <ptyId> [--since <cursor>]");let s=p(e.since,"since");return await r.streamPtyOutput(t,n,{...s!==void 0?{since:s}:{}}),!0}return!1}b(F,"handleSandboxProcessCommand");async function A(r,o,e,i){if(o==="replays"||o==="replay-list"){let t=typeof e.teamId=="string"?e.teamId.trim():"",n=typeof e.projectId=="string"?e.projectId.trim():"",s=await r.listReplays({...t?{teamId:t}:{},...n?{projectId:n}:{}});if(f(e.json))return console.log(JSON.stringify(s,null,2)),!0;if(s.replays.length===0)return console.log("no sandbox replays found"),!0;for(let a of s.replays)console.log(O(a));return!0}if(o==="replay-start"||o==="start-replay"){let t=await r.startReplay(k(e));return console.log(JSON.stringify(t,null,2)),!0}if(o==="replay-get"||o==="get-replay"){let t=i[1];if(!t)throw new Error("usage: sandbox replay-get <replayId> [--team-id <id>]");let n=typeof e.teamId=="string"?e.teamId.trim():"",s=typeof e.projectId=="string"?e.projectId.trim():"",a=await r.getReplay(t,{...n?{teamId:n}:{},...s?{projectId:s}:{}});return console.log(JSON.stringify(a,null,2)),!0}if(o==="replay-logs"||o==="logs-replay"){let t=i[1];if(!t)throw new Error("usage: sandbox replay-logs <replayId> [--team-id <id>]");let n=typeof e.teamId=="string"?e.teamId.trim():"",s=typeof e.projectId=="string"?e.projectId.trim():"",a=await r.getReplayLogs(t,{...n?{teamId:n}:{},...s?{projectId:s}:{}});for(let d of a.logs)console.log(d);return!0}if(o==="replay-artifacts"||o==="artifacts-replay"){let t=i[1];if(!t)throw new Error("usage: sandbox replay-artifacts <replayId> [--team-id <id>]");let n=typeof e.teamId=="string"?e.teamId.trim():"",s=typeof e.projectId=="string"?e.projectId.trim():"",a=await r.getReplayArtifacts(t,{...n?{teamId:n}:{},...s?{projectId:s}:{}});return console.log(JSON.stringify({replayId:a.replayId,artifacts:a.artifacts.map(C)},null,2)),!0}if(o==="replay-cancel"||o==="cancel-replay"){let t=i[1];if(!t)throw new Error("usage: sandbox replay-cancel <replayId> [--team-id <id>]");let n=typeof e.teamId=="string"?e.teamId.trim():"",s=typeof e.projectId=="string"?e.projectId.trim():"",a=await r.cancelReplay(t,{...n?{teamId:n}:{},...s?{projectId:s}:{}});return console.log(JSON.stringify(a,null,2)),!0}if(o==="replay-watch"||o==="watch-replay"){let t=i[1];if(!t)throw new Error("usage: sandbox replay-watch <replayId> [--team-id <id>]");let n=typeof e.teamId=="string"?e.teamId.trim():"",s=typeof e.projectId=="string"?e.projectId.trim():"",a=p(e.intervalMs,"interval-ms")??5e3,d=p(e.timeoutMs,"timeout-ms")??900*1e3,c=Date.now(),g=new Set;for(;Date.now()-c<=d;){let u=await r.getReplay(t,{...n?{teamId:n}:{},...s?{projectId:s}:{}});for(let m of u.replay.logs)g.has(m)||(g.add(m),console.log(m));if(u.replay.state==="succeeded"||u.replay.state==="failed"||u.replay.state==="canceled"){if(console.log(O(u.replay)),u.replay.state!=="succeeded")throw new Error(`sandbox replay ${u.replay.state}: ${u.replay.error??"no error"}`);return!0}await new Promise(m=>setTimeout(m,a))}throw new Error(`sandbox replay did not finish within ${d}ms`)}return!1}b(A,"handleSandboxReplayCommand");async function V(r,o,e,i){if(o==="runtime-list"){let t=typeof e.teamId=="string"?e.teamId.trim():"",n=typeof e.projectId=="string"?e.projectId.trim():"",s=typeof e.agentId=="string"?e.agentId.trim():"",a=await r.listSandboxRuntimes({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{agentId:s}:{}});return console.log(JSON.stringify({runtimes:a},null,2)),!0}if(o==="runtime-get"){let t=i[1]?.trim();if(!t)throw new Error("usage: sandbox runtime-get <runtimeId>");let n=await r.getSandboxRuntime(t);return console.log(JSON.stringify({runtime:n},null,2)),!0}if(o==="runtime-events"){let t=i[1]?.trim();if(!t)throw new Error("usage: sandbox runtime-events <runtimeId>");return console.log(JSON.stringify(await r.listSandboxRuntimeEvents(t),null,2)),!0}if(o==="runtime-status"){let t=i[1]?.trim(),n=typeof e.status=="string"&&e.status.trim()?e.status.trim():"",s=Number(e.expectedVersion),a=typeof e.summary=="string"&&e.summary.trim()?e.summary.trim():void 0;if(!t||!n||!Number.isInteger(s))throw new Error("usage: sandbox runtime-status <runtimeId> --status <status> --expected-version <n>");let d=await r.updateSandboxRuntimeStatus(t,{status:n,expectedVersion:s,...a?{summary:a}:{}});return console.log(JSON.stringify({runtime:d},null,2)),!0}if(o==="runtime-event"){let t=i[1]?.trim(),n=typeof e.type=="string"&&e.type.trim()?e.type.trim():"",s=typeof e.summary=="string"&&e.summary.trim()?e.summary.trim():void 0,a=typeof e.payload=="string"&&e.payload.trim()?I(e.payload,"payload"):void 0,d=typeof e.lifecycleHint=="string"&&e.lifecycleHint.trim()?I(e.lifecycleHint,"lifecycle-hint"):void 0;if(!t||!n)throw new Error("usage: sandbox runtime-event <runtimeId> --type <eventType> [--summary <text>] [--payload <json>] [--lifecycle-hint <json>]");return console.log(JSON.stringify(await r.emitSandboxRuntimeEvent(t,{type:n,...s?{summary:s}:{},...a?{payload:a}:{},...d?{lifecycleHint:d}:{}}),null,2)),!0}if(o==="runtime-preserve-source"||o==="runtime-preserve"){let t=i[1]?.trim(),n=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():"",s=typeof e.sandboxId=="string"&&e.sandboxId.trim()?e.sandboxId.trim():"",a=typeof e.message=="string"&&e.message.trim()?e.message.trim():"";if(!t)throw new Error("usage: sandbox runtime-preserve-source <runtimeId> [--team-id <id>] [--sandbox-id <id>] [--message <text>]");return console.log(JSON.stringify(await r.runtimes.preserveSource(t,{...s?{sandboxId:s}:{},...a?{message:a}:{}},{...n?{teamId:n}:{}}),null,2)),!0}return!1}b(V,"handleSandboxRuntimeCommand");async function $(r,o,e,i){if(o==="secrets"||o==="secret-list"){let t=typeof e.teamId=="string"?e.teamId.trim():"",n=await r.listSecrets({...t?{teamId:t}:{}});if(f(e.json))return console.log(JSON.stringify({secrets:n.map(y)},null,2)),!0;if(n.length===0)return console.log("no sandbox secrets found"),!0;for(let s of n)console.log(`${s.name} ${s.status} v${s.currentVersion??"current"} ${s.secretRef}`);return!0}if(o==="secret-create"){let t=typeof e.teamId=="string"?e.teamId.trim():"",n=typeof e.name=="string"?e.name.trim():"",s=typeof e.description=="string"&&e.description.trim()?e.description.trim():void 0,a=e.scope==="project"||e.scope==="template"||e.scope==="team"?e.scope:void 0;if(!n)throw new Error("usage: sandbox secret-create --name <ENV_NAME> [--team-id <id>] [--stdin]");let d=await w(e,`Value for ${n}`),c=await r.createSecret({...t?{teamId:t}:{},name:n,value:d,...s?{description:s}:{},...a?{scope:a}:{}});return console.log(JSON.stringify({secret:y(c)},null,2)),!0}if(o==="secret-rotate"){let t=i[1],n=typeof e.teamId=="string"?e.teamId.trim():"";if(!t)throw new Error("usage: sandbox secret-rotate <secretId> [--team-id <id>] [--stdin]");let s=await w(e,"New secret value"),a=await r.rotateSecret(t,{...n?{teamId:n}:{},value:s});return console.log(JSON.stringify({secret:y(a)},null,2)),!0}if(o==="secret-attach"){let t=i[1],n=typeof e.teamId=="string"?e.teamId.trim():"",s=typeof e.envName=="string"?e.envName.trim():"",a=e.targetType==="sandbox"||e.targetType==="template"||e.targetType==="project"||e.targetType==="agent"||e.targetType==="replay"?e.targetType:void 0,d=typeof e.targetId=="string"?e.targetId.trim():"";if(!t||!s||!a||!d)throw new Error("usage: sandbox secret-attach <secretId> --env-name <ENV_NAME> --target-type sandbox|project|agent|template|replay --target-id <id>");let c=await r.attachSecret(t,{...n?{teamId:n}:{},envName:s,targetType:a,targetId:d});return console.log(JSON.stringify({secret:y(c)},null,2)),!0}if(o==="secret-revoke"||o==="secret-delete"){let t=i[1],n=typeof e.teamId=="string"?e.teamId.trim():"";if(!t)throw new Error(`usage: sandbox ${o} <secretId> [--team-id <id>]`);let s=o==="secret-revoke"?await r.revokeSecret(t,{...n?{teamId:n}:{}}):await r.deleteSecret(t,{...n?{teamId:n}:{}});return console.log(JSON.stringify({secret:y(s)},null,2)),!0}return!1}b($,"handleSandboxSecretsCommand");async function H(r,o,e,i){if(o==="published-snapshot-builds"||o==="published-snapshot-build-list"||o==="template-builds"||o==="template-build-list"){let t=typeof e.teamId=="string"?e.teamId.trim():"";if(!t)throw new Error("usage: sandbox published-snapshot-builds --team-id <id>");let n=await r.listPublishedSnapshotBuilds({teamId:t});if(f(e.json))return console.log(JSON.stringify({builds:n},null,2)),!0;if(n.length===0)return console.log("no published snapshot builds found"),!0;for(let s of n)console.log(S(s));return!0}if(o==="published-snapshot-build-create"||o==="create-published-snapshot-build"||o==="template-build-create"||o==="create-template-build"){let t=await r.createPublishedSnapshotBuild(U(e));return console.log(JSON.stringify({build:t},null,2)),!0}if(o==="published-snapshot-build-get"||o==="get-published-snapshot-build"||o==="template-build-get"||o==="get-template-build"){let t=i[1];if(!t)throw new Error("usage: sandbox published-snapshot-build-get <buildId>");let n=await r.getPublishedSnapshotBuild(t);return console.log(JSON.stringify({build:n},null,2)),!0}if(o==="published-snapshot-build-logs"||o==="published-snapshot-build-log"||o==="template-build-logs"||o==="template-build-log"){let t=i[1];if(!t)throw new Error("usage: sandbox published-snapshot-build-logs <buildId>");let n=await r.getPublishedSnapshotBuildLogs(t);if(f(e.json))return console.log(JSON.stringify(n,null,2)),!0;for(let s of n.logs)console.log(s);return!0}if(o==="published-snapshot-build-cancel"||o==="cancel-published-snapshot-build"||o==="template-build-cancel"||o==="cancel-template-build"){let t=i[1];if(!t)throw new Error("usage: sandbox published-snapshot-build-cancel <buildId>");let n=await r.cancelPublishedSnapshotBuild(t);return console.log(JSON.stringify({build:n},null,2)),!0}if(o==="published-snapshot-build-watch"||o==="watch-published-snapshot-build"||o==="template-build-watch"||o==="watch-template-build"){let t=i[1];if(!t)throw new Error("usage: sandbox published-snapshot-build-watch <buildId>");let n=p(e.intervalMs,"interval-ms")??5e3,s=p(e.timeoutMs,"timeout-ms")??900*1e3,a=Date.now(),d=new Set;for(;Date.now()-a<=s;){let[c,g]=await Promise.all([r.getPublishedSnapshotBuild(t),r.getPublishedSnapshotBuildLogs(t)]);for(let u of g.logs)d.has(u)||(d.add(u),console.log(u));if(c.status==="succeeded"||c.status==="failed"||c.status==="cancelled"){if(console.log(S(c)),c.status!=="succeeded")throw new Error(`published snapshot build ${c.status}: ${c.error??"no error"}`);return!0}await new Promise(u=>setTimeout(u,n))}throw new Error(`published snapshot build did not finish within ${s}ms`)}return!1}b(H,"handleSandboxTemplateBuildsCommand");function G(r){return f(r.async)||f(r.respondAsync)}b(G,"parseSandboxAsyncOption");async function Pe(r,o){let e=o[0]||"list",i=await v(r);if(e==="list"){let t=typeof r.teamId=="string"?r.teamId.trim():"",n=typeof r.projectId=="string"?r.projectId.trim():"",s=typeof r.agentId=="string"?r.agentId.trim():"",a=await i.list({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{agentId:s}:{}});if(a.length===0){console.log("no sandboxes found");return}for(let d of a)console.log(P(d));return}if(e==="mcp-config"||e==="mcp-url"){let t=i.mcpServerConfig();console.log(JSON.stringify({...t,headers:{"openpond-api-key":"set OPENPOND_API_KEY or use your saved openpond profile"}},null,2));return}if(!await V(i,e,r,o)){if(e==="pricing"){let t=await i.pricing();console.log(JSON.stringify(t,null,2));return}if(e==="costs"){let t=typeof r.teamId=="string"?r.teamId.trim():"",n=typeof r.projectId=="string"?r.projectId.trim():"",s=typeof r.agentId=="string"?r.agentId.trim():"",a=await i.costs({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{agentId:s}:{}});if(f(r.summary)){console.log(JSON.stringify({costs:{teamId:a.costs.teamId,ownerUserId:a.costs.ownerUserId,generatedAt:a.costs.generatedAt,summary:a.costs.summary,lineItems:a.costs.lineItems,tiers:a.costs.pricing.tiers.map(d=>({key:d.key,resources:d.resources,keepRunningEstimate:d.keepRunningEstimate}))}},null,2));return}console.log(JSON.stringify(a,null,2));return}if(!await $(i,e,r,o)){if(e==="snapshots"||e==="snapshot-catalog"){let t=typeof r.teamId=="string"?r.teamId.trim():"",n=typeof r.projectId=="string"?r.projectId.trim():"",s=typeof r.agentId=="string"?r.agentId.trim():"",a=typeof r.query=="string"&&r.query.trim()?r.query.trim():typeof r.q=="string"&&r.q.trim()?r.q.trim():"",d=typeof r.tag=="string"?r.tag.trim():"",c=typeof r.useCase=="string"?r.useCase.trim():"",g=typeof r.replayState=="string"?r.replayState.trim():"",u=await i.snapshotCatalog({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{agentId:s}:{},...a?{q:a}:{},...d?{tag:d}:{},...c?{useCase:c}:{},...g==="draft"||g==="validated"||g==="published"?{replayState:g}:{}});if(u.snapshots.length===0){console.log("no sandbox snapshots found");return}for(let m of u.snapshots)console.log(J(m));return}if(e==="published-snapshots"||e==="published-snapshot-catalog"||e==="templates"||e==="template-catalog"){let t=typeof r.teamId=="string"?r.teamId.trim():"",n=typeof r.projectId=="string"?r.projectId.trim():"",s=typeof r.query=="string"&&r.query.trim()?r.query.trim():typeof r.q=="string"&&r.q.trim()?r.q.trim():"",a=typeof r.name=="string"&&r.name.trim()?r.name.trim():typeof r.templateName=="string"&&r.templateName.trim()?r.templateName.trim():"",d=typeof r.version=="string"?r.version.trim():"",c=typeof r.tag=="string"?r.tag.trim():"",g=typeof r.useCase=="string"?r.useCase.trim():"",u=await i.publishedSnapshots({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{q:s}:{},...a?{name:a}:{},...d?{version:d}:{},...c?{tag:c}:{},...g?{useCase:g}:{}});if(u.publishedSnapshots.length===0){console.log("no published snapshots found");return}for(let m of u.publishedSnapshots)console.log(j(m));return}if(!(await H(i,e,r,o)||await A(i,e,r,o))){if(e==="run-published-snapshot"||e==="published-snapshot-run"||e==="template-launch"||e==="launch-template"){let t=typeof r.teamId=="string"?r.teamId.trim():"",n=typeof r.projectId=="string"?r.projectId.trim():"",s=typeof r.snapshotId=="string"&&r.snapshotId.trim()?r.snapshotId.trim():typeof r.snapshot=="string"&&r.snapshot.trim()?r.snapshot.trim():"",a=typeof r.templateName=="string"&&r.templateName.trim()?r.templateName.trim():typeof r.name=="string"&&r.name.trim()?r.name.trim():typeof o[1]=="string"&&o[1].trim()?o[1].trim():"",d=typeof r.version=="string"?r.version.trim():"",c=typeof r.useCase=="string"?r.useCase.trim():"";if(!s&&!a&&!c)throw new Error("usage: sandbox run-published-snapshot [--snapshot-id <id>|--name <name>|--use-case <id>] [--version <v>]");let g=typeof r.budgetUsd=="string"&&r.budgetUsd.trim()?r.budgetUsd.trim():typeof r.budget=="string"&&r.budget.trim()?r.budget.trim():"",u=await i.runPublishedSnapshot({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{snapshotId:s}:{},...a?{templateName:a}:{},...d?{version:d}:{},...c?{useCase:c}:{},...g?{budget:{maxUsd:g}}:{},metadata:{source:"openpond-code-published-snapshot-run"}});console.log(JSON.stringify(u,null,2));return}if(e==="snapshot-fork"||e==="fork-snapshot"){let t=o[1];if(!t)throw new Error("snapshot-fork requires <snapshotId>");let n=typeof r.teamId=="string"?r.teamId.trim():"",s=typeof r.projectId=="string"?r.projectId.trim():"",a=typeof r.budgetUsd=="string"&&r.budgetUsd.trim()?r.budgetUsd.trim():typeof r.budget=="string"&&r.budget.trim()?r.budget.trim():"",d=await i.forkSnapshot(t,{...n?{teamId:n}:{},...s?{projectId:s}:{},...a?{budget:{maxUsd:a}}:{},metadata:{source:"openpond-code-snapshot-fork",templateSnapshotId:t}});console.log(JSON.stringify(d,null,2));return}if(e==="snapshot-create"||e==="create-snapshot"){let t=o[1];if(!t)throw new Error("usage: sandbox snapshot-create <sandboxId> --name <name>");let n=await i.createSnapshot(t,L(r));console.log(JSON.stringify(n,null,2));return}if(e==="snapshot-validate"||e==="validate-snapshot"){let t=o[1],n=o[2];if(!t||!n)throw new Error("snapshot-validate requires <sandboxId> <snapshotId>");let s=R(r.cleanup),a=await i.validateSnapshot(t,n,{...s?{cleanup:s}:{}});console.log(JSON.stringify(a,null,2));return}if(e==="snapshot-publish"||e==="publish-snapshot"){let t=o[1],n=o[2];if(!t||!n)throw new Error("snapshot-publish requires <sandboxId> <snapshotId>");let s=await i.publishSnapshot(t,n);console.log(JSON.stringify(s,null,2));return}if(e==="integration-connections"){let t=typeof r.teamId=="string"?r.teamId.trim():"",n=typeof r.projectId=="string"?r.projectId.trim():"",s=typeof r.agentId=="string"?r.agentId.trim():"",a=r.status==="active"||r.status==="revoked"||r.status==="error"||r.status==="all"?r.status:void 0,d=await i.integrationConnections({...t?{teamId:t}:{},...n?{projectId:n}:{},...s?{agentId:s}:{},...a?{status:a}:{}});console.log(JSON.stringify(d,null,2));return}if(e==="create"){let t=await N(i,B(r));console.log(JSON.stringify({sandbox:l(t.sandbox),...t.runtime?{runtime:t.runtime}:{}},null,2));return}if(e==="exec"){let t=o[1],n=(typeof r.command=="string"?r.command:null)||o.slice(2).join(" ");if(!t||!n.trim())throw new Error("usage: sandbox exec <sandboxId> --command <command>");let s=p(r.timeoutSeconds,"timeout-seconds"),a=await i.exec(t,{command:n.trim(),...s!==void 0?{timeoutSeconds:s}:{}});console.log(JSON.stringify({sandbox:l(a.sandbox),command:a.command},null,2));return}if(e==="port"||e==="preview"){let t=o[1],n=p(r.port,"port");if(!t||n===void 0)throw new Error("usage: sandbox port <sandboxId> --port <port>");let s=typeof r.label=="string"?r.label:void 0,a=typeof r.access=="string"?r.access.trim():"";if(a&&a!=="private"&&a!=="public")throw new Error("sandbox port --access must be private or public");let d=a==="public"?"public":"private",c=typeof r.domain=="string"?r.domain.trim():"",g=typeof r.authToken=="string"?r.authToken:"",u=typeof r.authHeader=="string"?r.authHeader.trim():"",m=typeof r.authHeaderValue=="string"?r.authHeaderValue:"";if(g&&(u||m))throw new Error("sandbox port auth options must use either --auth-token or --auth-header with --auth-header-value");if(u&&!m||!u&&m)throw new Error("sandbox port custom header auth requires both --auth-header and --auth-header-value");let x=await i.openPort(t,{port:n,...s?{label:s}:{},access:d,...r["auto-start"]||r.autoStart?{autoStart:!0}:{},...c?{customDomain:c}:{},...g?{authPolicy:{mode:"bearer",token:g}}:{},...u&&m?{authPolicy:{mode:"header",headerName:u,headerValue:m}}:{}});console.log(JSON.stringify(x.preview,null,2));return}if(e==="stop"){let t=o[1];if(!t)throw new Error("usage: sandbox stop <sandboxId> [--fail-on-unpreserved-changes] [--async]");let n=await i.stop(t,{failOnUnpreservedChanges:f(r.failOnUnpreservedChanges),async:G(r)});console.log(JSON.stringify({sandbox:l(n.sandbox),receipt:n.receipt},null,2));return}if(e==="start"){let t=o[1];if(!t)throw new Error("usage: sandbox start <sandboxId>");let n=await i.start(t);console.log(JSON.stringify({sandbox:await E(i,n.sandbox),receipt:n.receipt},null,2));return}if(e==="delete"){let t=o[1];if(!t)throw new Error("usage: sandbox delete <sandboxId> [--fail-on-unpreserved-changes] [--async]");let n=await i.delete(t,{failOnUnpreservedChanges:f(r.failOnUnpreservedChanges),async:G(r)});console.log(JSON.stringify({sandbox:l(n)},null,2));return}if(e==="receipts"){let t=o[1];if(!t)throw new Error("usage: sandbox receipts <sandboxId>");let n=await i.receipts(t);console.log(JSON.stringify({receipts:n},null,2));return}if(e==="logs"){let t=o[1];if(!t)throw new Error("usage: sandbox logs <sandboxId>");let n=await i.logs(t);for(let s of n)console.log(s);return}if(!(await F(i,e,r,o)||await M(i,e,r,o)||await T(i,e,r,o))){if(e==="billing"){let t=o[1];if(!t)throw new Error("usage: sandbox billing <sandboxId>");let n=await i.billing(t);console.log(JSON.stringify({sandbox:l(n.sandbox),billing:n.billing},null,2));return}if(e==="integration-leases"){let t=o[1];if(!t)throw new Error("usage: sandbox integration-leases <sandboxId>");let n=await i.integrationLeases(t);console.log(JSON.stringify({sandbox:l(n.sandbox),integrationLeases:n.integrationLeases},null,2));return}if(e==="integration-attach"){let t=o[1];if(!t)throw new Error("usage: sandbox integration-attach <sandboxId> --integration-connection <id> --integration-capabilities <csv>");let n=await i.attachIntegrationConnection(t,q(r));console.log(JSON.stringify({sandbox:l(n.sandbox),integrationLeases:n.integrationLeases},null,2));return}if(e==="integration-remove"){let t=o[1],n=typeof r.leaseId=="string"?r.leaseId.trim():"";if(!t||!n)throw new Error("usage: sandbox integration-remove <sandboxId> --lease-id <id>");let s=await i.removeIntegrationLease(t,n);console.log(JSON.stringify({sandbox:l(s.sandbox),integrationLeases:s.integrationLeases},null,2));return}if(e==="smoke"){let t=typeof r.repo=="string"?r.repo.trim():void 0,n=typeof r.budgetUsd=="string"?r.budgetUsd.trim():typeof r.budget=="string"?r.budget.trim():void 0,s=f(r.keep),a=r.preview!==void 0?f(r.preview):!f(r.noPreview),d=f(r.snapshot),c=f(r.fork),g={...t?{repo:t}:{},...n?{budgetUsd:n}:{},keep:s,preview:a,snapshot:d,fork:c};typeof r.expectedMppMode=="string"&&r.expectedMppMode.trim()&&(g.expectedMppMode=r.expectedMppMode.trim());let u=h(r.cpu,"cpu"),m=h(r.memoryGb,"memory-gb"),x=h(r.diskGb,"disk-gb");u!==void 0&&(g.cpu=u),m!==void 0&&(g.memoryGb=m),x!==void 0&&(g.diskGb=x);let z=await i.smoke(g);console.log(JSON.stringify(z,null,2));return}throw new Error("usage: sandbox <list|mcp-config|runtime-list|runtime-get|runtime-events|runtime-status|runtime-event|runtime-preserve-source|pricing|costs|secrets|secret-create|secret-rotate|secret-attach|secret-revoke|secret-delete|snapshots|published-snapshots|run-published-snapshot|snapshot-fork|snapshot-validate|snapshot-publish|create|exec|port|preview|stop|start|delete|receipts|logs|billing|process-start|process-list|process-get|process-stop|process-stream|pty-start|pty-list|pty-get|pty-write|pty-stop|pty-stream|upload-file|download-file|list-files|search-files|delete-file|stat-file|mkdir|move-file|git-status|git-diff|git-export-patch|git-branch|git-commit|git-pull|git-push|smoke> [args]")}}}}}b(Pe,"runSandboxCommand");export{Pe as runSandboxCommand};
|