openpond 0.2.61 → 0.2.63
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/README.md +2 -0
- package/dist/app-server.d.ts +4713 -477
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-FUAWCKBH.js → acp-H3MJCPHX.js} +1 -1
- package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-DWA7272M.js} +1 -1
- package/dist/chunks/actions-command-IIYOO4LL.js +2 -0
- package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-K7H2WJ56.js} +1 -1
- package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +2 -0
- package/dist/chunks/{app-server-evaluations-HAAYVEXB.js → app-server-evaluations-XGMGS67X.js} +1 -1
- package/dist/chunks/app-server-harness-services-BHD6S5II.js +2 -0
- package/dist/chunks/app-server-runtime-LFIL6F7D.js +2 -0
- package/dist/chunks/apps-QKAHJGQ4.js +2 -0
- package/dist/chunks/chunk-25XXZS3E.js +2 -0
- package/dist/chunks/chunk-27JGS3KB.js +12 -0
- package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
- package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-2HAWOMZK.js} +1 -1
- package/dist/chunks/chunk-2LJCJOJ7.js +2 -0
- package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
- package/dist/chunks/{chunk-CN5OXQ7A.js → chunk-3YXYBYWK.js} +1 -1
- package/dist/chunks/{chunk-LHENAWLH.js → chunk-42V4NV2F.js} +1 -1
- package/dist/chunks/{chunk-DW3GJRY3.js → chunk-4FNCBA3Y.js} +1 -1
- package/dist/chunks/{chunk-TXBIZDXG.js → chunk-4L6DU6Z2.js} +1 -1
- package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
- package/dist/chunks/{chunk-MLTKB5G3.js → chunk-4SZ3HKHU.js} +1 -1
- package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
- package/dist/chunks/chunk-5EP2DZLJ.js +2 -0
- package/dist/chunks/chunk-5FU5RLML.js +2 -0
- package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-5MHYGMJG.js} +1 -1
- package/dist/chunks/chunk-6EBCS57F.js +2 -0
- package/dist/chunks/chunk-6RS4NAOY.js +2 -0
- package/dist/chunks/chunk-6XSSM4WT.js +3 -0
- package/dist/chunks/{chunk-NVHZRKXB.js → chunk-7HRLWPPZ.js} +1 -1
- package/dist/chunks/chunk-7O6Z3VOZ.js +2 -0
- package/dist/chunks/{chunk-BQUWZRWU.js → chunk-7WYL2IDD.js} +1 -1
- package/dist/chunks/chunk-7YLXGILH.js +2 -0
- package/dist/chunks/chunk-7ZLXFKRI.js +2 -0
- package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
- package/dist/chunks/{chunk-TTN63EAM.js → chunk-AH26AQN7.js} +1 -1
- package/dist/chunks/chunk-AHOBCBVZ.js +2 -0
- package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
- package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
- package/dist/chunks/chunk-B5R53U74.js +2 -0
- package/dist/chunks/chunk-BKEDG3A4.js +22 -0
- package/dist/chunks/{chunk-CO3OJFPU.js → chunk-BPZOABMC.js} +1 -1
- package/dist/chunks/{chunk-5VPU7OS7.js → chunk-BSPFY3Y5.js} +1 -1
- package/dist/chunks/{chunk-U4HZD2GM.js → chunk-BU27SLZP.js} +2 -2
- package/dist/chunks/chunk-C2AXMKK4.js +2 -0
- package/dist/chunks/{chunk-SIV5P6JO.js → chunk-C2LAEGOW.js} +2 -2
- package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-CZ5R4JXZ.js} +1 -1
- package/dist/chunks/{chunk-D4JZALZ4.js → chunk-DABBHWSF.js} +1 -1
- package/dist/chunks/{chunk-ROE24PN5.js → chunk-DLANLLKH.js} +1 -1
- package/dist/chunks/{chunk-57RY3LSR.js → chunk-DQI5TE6A.js} +2 -2
- package/dist/chunks/chunk-DTTFUANI.js +12 -0
- package/dist/chunks/{chunk-VBW2X42G.js → chunk-DUL6DXOI.js} +1 -1
- package/dist/chunks/{chunk-OQUKSRU3.js → chunk-ELX7VRSU.js} +1 -1
- package/dist/chunks/chunk-ERL2M773.js +3 -0
- package/dist/chunks/chunk-ERT32RZA.js +86 -0
- package/dist/chunks/{chunk-RPOD6I64.js → chunk-EZRUWIP6.js} +1 -1
- package/dist/chunks/{chunk-MCIIGQT7.js → chunk-F6UQ6PPK.js} +1 -1
- package/dist/chunks/chunk-F7QTIHXX.js +2 -0
- package/dist/chunks/chunk-FAKDGLZQ.js +8 -0
- package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FVRII5XO.js} +1 -1
- package/dist/chunks/{chunk-GEXKTGLY.js → chunk-FYYYECHE.js} +50 -48
- package/dist/chunks/chunk-G32BO6M5.js +4 -0
- package/dist/chunks/{chunk-TSAW2QVU.js → chunk-G6OR5NB6.js} +1 -1
- package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GGJUWIGR.js} +1 -1
- package/dist/chunks/{chunk-Q66LWQGF.js → chunk-GPL2Z65R.js} +1 -1
- package/dist/chunks/{chunk-LNRFRAV5.js → chunk-GS6ZUSIN.js} +2 -2
- package/dist/chunks/{chunk-OFVUN4KI.js → chunk-GVARQXYI.js} +1 -1
- package/dist/chunks/chunk-GXCUH2VV.js +17 -0
- package/dist/chunks/{chunk-IUGK6BBY.js → chunk-GXZCMO6S.js} +1 -1
- package/dist/chunks/{chunk-CLFYRN46.js → chunk-H6C4MAUN.js} +1 -1
- package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
- package/dist/chunks/{chunk-I3W27VK4.js → chunk-HUCBKXTU.js} +1 -1
- package/dist/chunks/{chunk-P4XM7LUT.js → chunk-IHB5GTOJ.js} +2 -2
- package/dist/chunks/{chunk-U447MS3Y.js → chunk-IWWXIUAQ.js} +1 -1
- package/dist/chunks/chunk-J572ANHX.js +13 -0
- package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-J7ZTPXRQ.js} +1 -1
- package/dist/chunks/chunk-JCLTFDVW.js +2 -0
- package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
- package/dist/chunks/{chunk-ELYRVTTG.js → chunk-JORRZ4BB.js} +1 -1
- package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
- package/dist/chunks/chunk-JSQRLLN6.js +2 -0
- package/dist/chunks/chunk-KCOTDUGW.js +2 -0
- package/dist/chunks/{chunk-NK4JKB7C.js → chunk-KHTAAVC2.js} +1 -1
- package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
- package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
- package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LK2K3SPM.js} +2 -2
- package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-LKKMLBOH.js} +1 -1
- package/dist/chunks/{chunk-BNZTJPK7.js → chunk-LSZJ5M3X.js} +1 -1
- package/dist/chunks/chunk-M3FLEZ4E.js +4 -0
- package/dist/chunks/{chunk-4LZLO4OW.js → chunk-M3SCON53.js} +1 -1
- package/dist/chunks/{chunk-VPDG2V2R.js → chunk-MEGKXGW3.js} +1 -1
- package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
- package/dist/chunks/chunk-MPNJ2BB4.js +2 -0
- package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-N33D7KCW.js} +1 -1
- package/dist/chunks/chunk-N42HT64M.js +2 -0
- package/dist/chunks/{chunk-L3GA2CQI.js → chunk-N4VHLJBZ.js} +1 -1
- package/dist/chunks/chunk-NEJLJ2XY.js +2 -0
- package/dist/chunks/chunk-NG2L6D7G.js +2 -0
- package/dist/chunks/{chunk-7EAWLYYB.js → chunk-NLYZ5K7U.js} +2 -2
- package/dist/chunks/{chunk-B47JMAVW.js → chunk-NT7N6KLE.js} +1 -1
- package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
- package/dist/chunks/{chunk-PAZDQRYU.js → chunk-NZTCH6K5.js} +1 -1
- package/dist/chunks/{chunk-CQF6QZEL.js → chunk-OG33QAG6.js} +1 -1
- package/dist/chunks/chunk-OTUBJV6C.js +6 -0
- package/dist/chunks/{chunk-TMMFF6DO.js → chunk-PBTXLQAU.js} +1 -1
- package/dist/chunks/chunk-Q34IF4PW.js +2 -0
- package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-QJ6KUVAR.js} +1 -1
- package/dist/chunks/{chunk-SID4X3YN.js → chunk-QU4UE73E.js} +1 -1
- package/dist/chunks/{chunk-I7JCARVH.js → chunk-R6VJDOQM.js} +3 -3
- package/dist/chunks/{chunk-6RVF2J47.js → chunk-R6WMY6AH.js} +1 -1
- package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-RDSVU6F6.js} +1 -1
- package/dist/chunks/{chunk-R4PDSOB4.js → chunk-RFMME46Z.js} +1 -1
- package/dist/chunks/{chunk-GQUS7MCH.js → chunk-RZUCVF2Q.js} +1 -1
- package/dist/chunks/chunk-SFKZITAG.js +9 -0
- package/dist/chunks/{chunk-MF35MALN.js → chunk-SHJY5RLU.js} +1 -1
- package/dist/chunks/chunk-SI5W5LBV.js +2 -0
- package/dist/chunks/chunk-SO42ZB5K.js +2 -0
- package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
- package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
- package/dist/chunks/{chunk-ZISYLRH6.js → chunk-TCOTXCV6.js} +1 -1
- package/dist/chunks/{chunk-QCSLEMZF.js → chunk-U2K7QJCG.js} +1 -1
- package/dist/chunks/{chunk-ISIXFK6U.js → chunk-UH4JSSRL.js} +28 -28
- package/dist/chunks/chunk-UPWJSNL5.js +2 -0
- package/dist/chunks/chunk-URNMC46H.js +157 -0
- package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
- package/dist/chunks/{chunk-WFVOG5PU.js → chunk-V7KR74NO.js} +1 -1
- package/dist/chunks/{chunk-QDBYLJGH.js → chunk-VHXDWAEH.js} +1 -1
- package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-W2TICQ62.js} +1 -1
- package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
- package/dist/chunks/chunk-WP2L2NY2.js +2 -0
- package/dist/chunks/chunk-WSOUMXH3.js +24 -0
- package/dist/chunks/chunk-WWQNMC7C.js +6 -0
- package/dist/chunks/chunk-XMHIQ3SK.js +5 -0
- package/dist/chunks/{chunk-5MTN6KXV.js → chunk-XNOMIWEY.js} +1 -1
- package/dist/chunks/{chunk-T4LLJC5N.js → chunk-XOB6FKQV.js} +1 -1
- package/dist/chunks/chunk-Y766IN7Y.js +2 -0
- package/dist/chunks/chunk-YCZZ62C2.js +2 -0
- package/dist/chunks/chunk-YM4PSVFW.js +4 -0
- package/dist/chunks/chunk-YNQWJWIC.js +10 -0
- package/dist/chunks/{chunk-LBBXVOVR.js → chunk-Z3BWCFLV.js} +1 -1
- package/dist/chunks/{chunk-WRQEYW3V.js → chunk-ZG6353RM.js} +1 -1
- package/dist/chunks/{chunk-PE7UKJXK.js → chunk-ZPTKR3GB.js} +1 -1
- package/dist/chunks/{chunk-2VXL6AU3.js → chunk-ZYVHOVKL.js} +1 -1
- package/dist/chunks/chunk-ZZHXQCNB.js +22 -0
- package/dist/chunks/cli-PSXMIJTF.js +2 -0
- package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-XYKMXIWF.js} +1 -1
- package/dist/chunks/connected-app-executor-6G2LA3PQ.js +2 -0
- package/dist/chunks/connected-evidence-IRXYN6YD.js +2 -0
- package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-JONPTII6.js} +1 -1
- package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
- package/dist/chunks/{continual-CJUZM5ZQ.js → continual-Z7MO2PF6.js} +1 -1
- package/dist/chunks/core-commands-WWN7X3XC.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +4 -0
- package/dist/chunks/datasets-2PC2HP7N.js +2 -0
- package/dist/chunks/desktop-test-VU6AFAMO.js +3 -0
- package/dist/chunks/dist-47AYOIH6.js +2 -0
- package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
- package/dist/chunks/{dist-DCSLPBO2.js → dist-MXBEBM4D.js} +1 -1
- package/dist/chunks/evaluation-coordination-UOWZHHC5.js +2 -0
- package/dist/chunks/experiment-improvements-EB2CV5RA.js +2 -0
- package/dist/chunks/experiments-SZQYR6MH.js +2 -0
- package/dist/chunks/experiments-signal-2KJCP25D.js +2 -0
- package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
- package/dist/chunks/{help-M2VQGPVC.js → help-7HXFWIKS.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +2 -0
- package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +2 -0
- package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +3 -0
- package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +2 -0
- package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +3 -0
- package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +3 -0
- package/dist/chunks/{hosted-profile-evaluation-preparation-ZAOGDQXO.js → hosted-profile-evaluation-preparation-2LSMZQNA.js} +1 -1
- package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-WGXGXJ7E.js} +1 -1
- package/dist/chunks/human-review-M26UKGJL.js +2 -0
- package/dist/chunks/{import-WLLUIDS6.js → import-6SI4BEKS.js} +2 -2
- package/dist/chunks/learning-HM3NWOV5.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +2 -0
- package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +2 -0
- package/dist/chunks/model-projects-YUAMBQTO.js +2 -0
- package/dist/chunks/opchat-AG4CWVY4.js +3 -0
- package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +2 -0
- package/dist/chunks/organizations-KDKX77XZ.js +2 -0
- package/dist/chunks/{profile-JRS3JNRC.js → profile-O5HL5DTQ.js} +1 -1
- package/dist/chunks/project-action-payload-QA24HYGF.js +2 -0
- package/dist/chunks/project-agent-XBOOM5TS.js +2 -0
- package/dist/chunks/published-experiment-source-GZGN354O.js +2 -0
- package/dist/chunks/refiner-profile-service-BJMOYKTC.js +2 -0
- package/dist/chunks/{runtime-CBJF5GMB.js → runtime-XBA744HJ.js} +2 -2
- package/dist/chunks/sandbox-command-5ECGS7DG.js +2 -0
- package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-27U3FQN7.js} +1 -1
- package/dist/chunks/saved-work-KUNVTJ7O.js +2 -0
- package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-FIPWOXWV.js} +1 -1
- package/dist/chunks/src-BLWX6DRG.js +424 -0
- package/dist/chunks/{src-4YZF6L6H.js → src-PU7QTFO5.js} +1 -1
- package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +2 -0
- package/dist/chunks/store-chat-resources-YOEJ2BI6.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-FOMYYS25.js} +1 -1
- package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-K324SQTO.js} +1 -1
- package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-3LQMIYAP.js} +1 -1
- package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-3KSX7RSO.js} +1 -1
- package/dist/chunks/store-evaluation-results-LHCCNNE6.js +7 -0
- package/dist/chunks/{store-harness-evaluation-review-settings-I2R3HPO3.js → store-harness-evaluation-review-settings-AAN7KKJ5.js} +1 -1
- package/dist/chunks/{store-harness-refinement-candidates-SUT45FQX.js → store-harness-refinement-candidates-3PHL3BUY.js} +1 -1
- package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +2 -0
- package/dist/chunks/store-human-review-QJY3ZPPF.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +2 -0
- package/dist/chunks/{store-learning-MFS4DGQR.js → store-learning-DW3QLQXU.js} +1 -1
- package/dist/chunks/{store-learning-credentials-BECWEG2Y.js → store-learning-credentials-67QNTPA7.js} +1 -1
- package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-QTVHJAEP.js} +1 -1
- package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +2 -0
- package/dist/chunks/store-model-configuration-3SU73CMS.js +3 -0
- package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +2 -0
- package/dist/chunks/store-ponder-history-WDLMXBIJ.js +2 -0
- package/dist/chunks/store-ponder-hosted-DX6E2BVW.js +4 -0
- package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-DWV5XSMY.js} +1 -1
- package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-2KUY4T6M.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-A4XCS7RM.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-V2PKRXUZ.js} +1 -1
- package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-UGVEFA6M.js} +1 -1
- package/dist/chunks/store-task-inbox-QABI4ZAH.js +33 -0
- package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-GEQIZELY.js} +1 -1
- package/dist/chunks/store-taskset-drafts-GXABQR5G.js +9 -0
- package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-CQV7PL3V.js} +1 -1
- package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-XKN6K66J.js} +18 -10
- package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-Q7DTTR4S.js} +1 -1
- package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-XGAX7NLB.js} +1 -1
- package/dist/chunks/{taskset-NYLUYX6K.js → taskset-ARKJQKYQ.js} +1 -1
- package/dist/chunks/taskset-packages-X4K65DTW.js +2 -0
- package/dist/chunks/taskset-packages-XK7FSD45.js +2 -0
- package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-UTQAJA6H.js} +1 -1
- package/dist/chunks/training-3IWW4256.js +2 -0
- package/dist/chunks/{training-UBX6E7SK.js → training-RVIESURJ.js} +1 -1
- package/dist/chunks/training-error-2EWDOQ4G.js +2 -0
- package/dist/chunks/training-hosted-PFJHYTEU.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +2 -0
- package/dist/chunks/training-hosted-feedback-5B2KJGOT.js +2 -0
- package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +2 -0
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +2 -0
- package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
- package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +2 -0
- package/dist/chunks/training-hosted-workers-LST4ZUXN.js +2 -0
- package/dist/chunks/training-model-start-ROLS3E4V.js +2 -0
- package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
- package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-7FBUBZ66.js} +1 -1
- package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-G3CMY7ZA.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/hosted-chat.d.ts +28 -0
- package/dist/index.js +1 -1
- package/dist/sandbox/url.d.ts +3 -1
- package/dist/skills/LICENSE +21 -0
- package/dist/skills/manifest.json +168 -0
- package/dist/skills/openpond-agent-authoring/SKILL.md +9 -3
- package/dist/skills/openpond-agent-authoring/references/profile-layout.md +1 -1
- package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +2 -2
- package/dist/skills/openpond-cli/SKILL.md +24 -7
- package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
- package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
- package/dist/skills/openpond-cli/references/experiments-and-training.md +156 -11
- package/dist/skills/openpond-refiner-authoring/SKILL.md +4 -0
- package/dist/skills/openpond-skill-authoring/SKILL.md +5 -1
- package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
- package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
- package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
- package/dist/web/assets/App-DY2R8Z6r.js +53 -0
- package/dist/web/assets/App-DpFKLxuA.css +1 -0
- package/dist/web/assets/AppDialog-8Y0FYalT.js +1 -0
- package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +2 -0
- package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-BiQbbVxq.js} +1 -1
- package/dist/web/assets/AppsView-Dtte4h6e.js +1 -0
- package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-DgADV7dn.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BUqDvEv9.js +1 -0
- package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-J4ChOjvG.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +8 -0
- package/dist/web/assets/ChatTimelineEntry-DztFb85D.css +1 -0
- package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-CFCpk2Ck.js} +1 -1
- package/dist/web/assets/CommandMenu-EPPjB14H.js +1 -0
- package/dist/web/assets/CommunityView-Okydjpqm.js +1 -0
- package/dist/web/assets/ComposerAttachments-RXCiE88M.js +2 -0
- package/dist/web/assets/ComposerCreateImproveStrip-CSngc8-V.js +1 -0
- package/dist/web/assets/ConversationImportsSettings-DS73kyfj.js +1 -0
- package/dist/web/assets/FilePagePreview-Qc4B0vue.js +2 -0
- package/dist/web/assets/GetStartedView-DGFPQ1We.js +1 -0
- package/dist/web/assets/GettingStartedDialog-DFBYQdHz.js +1 -0
- package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
- package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-BDu3FlcU.js} +1 -1
- package/dist/web/assets/HostedModelLearningSettings-CHaTHwC8.js +1 -0
- package/dist/web/assets/HtmlVisual-C7GlEVfH.css +1 -0
- package/dist/web/assets/HtmlVisual-D9Mh7xds.js +81 -0
- package/dist/web/assets/LabModelVersionDetailPage-DgY7lAu5.js +1 -0
- package/dist/web/assets/LabSkillSidebar-BwtlThO7.js +1 -0
- package/dist/web/assets/LabsRoute-BV7ZJGEw.js +101 -0
- package/dist/web/assets/MainChatThread-pzHKd_YN.js +2 -0
- package/dist/web/assets/MainPane-6OlLiKKb.js +10 -0
- package/dist/web/assets/MainPane-Dje-hfUM.css +1 -0
- package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
- package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +2 -0
- package/dist/web/assets/NativeSkillSidebar-BEJvt5_H.js +1 -0
- package/dist/web/assets/NewProjectDialog-CjrjgkTN.js +1 -0
- package/dist/web/assets/OutputsPage-jzx93QQ3.js +1 -0
- package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-C1M13qG2.js} +1 -1
- package/dist/web/assets/ProjectsPage-DZrjlMp2.js +1 -0
- package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-Cw1ja2GF.js +1 -0
- package/dist/web/assets/{SettingsView-Y8f98GSE.css → SettingsView-Cc0376pY.css} +1 -1
- package/dist/web/assets/SettingsView-CckoIki3.js +5 -0
- package/dist/web/assets/TasksetDraftEditorPrimitives-ByC8bDjp.js +1 -0
- package/dist/web/assets/TeamChatView-OprnSKLF.js +1 -0
- package/dist/web/assets/TerminalOverlay-d7A2F9Lx.js +16 -0
- package/dist/web/assets/TrainingCreationPanel-Cyn6R6I6.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-Mpb5e7t5.js} +1 -1
- package/dist/web/assets/TrainingRunLineage-PXzWR65d.css +1 -0
- package/dist/web/assets/TrainingRunLineage-VcKz7dIR.js +1 -0
- package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-FhYymrfc.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-C8y3537a.js +35 -0
- package/dist/web/assets/WorkspaceFileLocation-LrEWj4UK.js +1 -0
- package/dist/web/assets/WorkspaceGitDialogs-NRIMXnkS.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-CvDGjKAL.js} +3 -3
- package/dist/web/assets/WorkspacePdfPreview-BZ0BbnHv.js +2 -0
- package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-DJrjrvT0.js} +1 -1
- package/dist/web/assets/app-models-CUA9XB9U.js +1 -0
- package/dist/web/assets/bot-6OhUEmkE.js +1 -0
- package/dist/web/assets/browser-sidebar-links-ZyYiYBBd.js +1 -0
- package/dist/web/assets/chat-resources-CI8KFVO5.js +1 -0
- package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-jmVA1BIf.js} +1 -1
- package/dist/web/assets/chevron-right-BYmDQ7ti.js +1 -0
- package/dist/web/assets/chevron-up-CstyLXH3.js +1 -0
- package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ONGOAEY6-C__DQmRT.js} +5 -5
- package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-SQBYHWZU-DumrB9SB.js} +1 -1
- package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-BdQ_YDuk.js} +1 -1
- package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-Ck1ufAr8.js} +1 -1
- package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
- package/dist/web/assets/contracts-BLiqJxBv.js +1 -0
- package/dist/web/assets/copy-CPkbMfXt.js +1 -0
- package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-CXQny8HU.js} +1 -1
- package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-CYxYl_om.js} +1 -1
- package/dist/web/assets/external-link-CDKOLG_v.js +1 -0
- package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-CEtOb_lK.js} +1 -1
- package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-CVMYZs3e.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-DDyhPjxS.js} +1 -1
- package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-DoY4V_j0.js} +1 -1
- package/dist/web/assets/icons-D7jkCa2d.js +1 -0
- package/dist/web/assets/{image-C7HVlg3X.js → image-B-PjDSwU.js} +1 -1
- package/dist/web/assets/{index-BsPUniZy.js → index-D9WbJMSq.js} +2 -2
- package/dist/web/assets/index-g7UqJhnX.css +1 -0
- package/dist/web/assets/{info-BLWDShaz.js → info-CCnw-K3b.js} +1 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +1 -0
- package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-CeOpZdPj.js} +1 -1
- package/dist/web/assets/loader-circle-CPaJeTDy.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-DAbgLCqZ.js} +1 -1
- package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-BZX38cpr.js} +1 -1
- package/dist/web/assets/message-square-CvgSecgD.js +1 -0
- package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-CF2JDhi4.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-cbDqt48m.js} +2 -2
- package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-m2ze2EsL.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-yeyow_-Q.js} +2 -2
- package/dist/web/assets/{monitor-B6OuAu13.js → monitor-By0s4hxb.js} +1 -1
- package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-BJ2QgJLa.js} +1 -1
- package/dist/web/assets/{pdf-RXlFwNte.js → pdf-C4x-1jjP.js} +1 -1
- package/dist/web/assets/pdf.worker.min-BrEVksTu.js +1 -0
- package/dist/web/assets/play-D_SuGDBM.js +1 -0
- package/dist/web/assets/plus-yw95Iaj8.js +1 -0
- package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-I86G1Gd9.js} +1 -1
- package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
- package/dist/web/assets/{python-BQXo7wMt.js → python-CqFTPj8r.js} +1 -1
- package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-Dga35Eay.js} +1 -1
- package/dist/web/assets/requests-BCbaFiqV.js +1 -0
- package/dist/web/assets/{reward-checks-5AOStF27.js → reward-checks-Bcq9ETCA.js} +1 -1
- package/dist/web/assets/{save-BxXc21N6.js → save-BLKjYtzR.js} +1 -1
- package/dist/web/assets/settings-D7C-Auyi.js +21 -0
- package/dist/web/assets/settings-lists-DMKA1lCN.js +5 -0
- package/dist/web/assets/square-BY5lG2Ol.js +1 -0
- package/dist/web/assets/square-terminal-B-n7vUex.js +1 -0
- package/dist/web/assets/submit-issue-command-B7Hrt2tU.js +3 -0
- package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-BhmBE5XE.js} +1 -1
- package/dist/web/assets/training-QrdkRQZQ.js +2 -0
- package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-DB-jg6L_.js} +12 -12
- package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-BSWEII2p.js} +1 -1
- package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
- package/dist/web/assets/{upload-NXasN1wU.js → upload-C4MPhQn8.js} +1 -1
- package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-9oqWdRLs.js} +1 -1
- package/dist/web/assets/useAgentInventory-isO79ui9.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CZX6PxoK.js} +1 -1
- package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-BD0Uexmh.js} +1 -1
- package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-Cloe0WuQ.js} +1 -1
- package/dist/web/assets/{workers-u92Boudu.js → workers-BXagz5eg.js} +1 -1
- package/dist/web/assets/x-Dqpel42h.js +1 -0
- package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-sBdvVbCc.js} +1 -1
- package/dist/web/index.html +12 -3
- package/docs/command-reference.md +49 -5
- package/package.json +6 -2
- package/dist/chunks/actions-command-LOHNQUWP.js +0 -2
- package/dist/chunks/app-server-connected-apps-Q2VWWJNX.js +0 -2
- package/dist/chunks/app-server-harness-services-2PSZBT7U.js +0 -2
- package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
- package/dist/chunks/apps-7PIBF32Q.js +0 -2
- package/dist/chunks/chunk-3TYCIYW6.js +0 -17
- package/dist/chunks/chunk-4GZ2FPB5.js +0 -2
- package/dist/chunks/chunk-4M3YW3EQ.js +0 -13
- package/dist/chunks/chunk-4N3UF3U5.js +0 -2
- package/dist/chunks/chunk-4P3X2RXA.js +0 -2
- package/dist/chunks/chunk-4RHM4WN2.js +0 -2
- package/dist/chunks/chunk-6DCXAXVD.js +0 -22
- package/dist/chunks/chunk-AWPYTDH4.js +0 -4
- package/dist/chunks/chunk-BLKTUFGB.js +0 -2
- package/dist/chunks/chunk-BN5AVRUG.js +0 -2
- package/dist/chunks/chunk-D5ADDBS5.js +0 -2
- package/dist/chunks/chunk-DGPGOBYZ.js +0 -5
- package/dist/chunks/chunk-E3EKBPCB.js +0 -2
- package/dist/chunks/chunk-E67M5WGY.js +0 -2
- package/dist/chunks/chunk-EIIGTADO.js +0 -2
- package/dist/chunks/chunk-F5JDBDYL.js +0 -2
- package/dist/chunks/chunk-FWIPHEVA.js +0 -12
- package/dist/chunks/chunk-GLVR74PX.js +0 -2
- package/dist/chunks/chunk-HZLV773Y.js +0 -22
- package/dist/chunks/chunk-JEVA7YQL.js +0 -3
- package/dist/chunks/chunk-KC7I6E6W.js +0 -2
- package/dist/chunks/chunk-M4ZRCRJM.js +0 -10
- package/dist/chunks/chunk-N663LL27.js +0 -2
- package/dist/chunks/chunk-NR5VASQB.js +0 -2
- package/dist/chunks/chunk-OJSK4NSW.js +0 -151
- package/dist/chunks/chunk-OZ6LRNRE.js +0 -2
- package/dist/chunks/chunk-Q324ZA5M.js +0 -2
- package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
- package/dist/chunks/chunk-UJBEWIR3.js +0 -8
- package/dist/chunks/chunk-V67IFV26.js +0 -86
- package/dist/chunks/chunk-VSUHJ46L.js +0 -18
- package/dist/chunks/chunk-VWJ5IYQP.js +0 -2
- package/dist/chunks/chunk-X3WEQL3O.js +0 -2
- package/dist/chunks/chunk-XK7SPL63.js +0 -2
- package/dist/chunks/chunk-XLULTQLZ.js +0 -12
- package/dist/chunks/chunk-YR5ID2SS.js +0 -2
- package/dist/chunks/chunk-ZBBVRYU3.js +0 -6
- package/dist/chunks/chunk-ZHFH2TZN.js +0 -2
- package/dist/chunks/chunk-ZZWAQBA2.js +0 -2
- package/dist/chunks/cli-WC45SI7E.js +0 -2
- package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
- package/dist/chunks/connected-evidence-4J3YXU4O.js +0 -2
- package/dist/chunks/core-commands-JGXU6B4C.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-DFGJBMVF.js +0 -4
- package/dist/chunks/datasets-MNHZAZIB.js +0 -2
- package/dist/chunks/desktop-test-P23MHAIG.js +0 -3
- package/dist/chunks/dist-IIFTZWNR.js +0 -2
- package/dist/chunks/evaluation-coordination-6NQEH5WU.js +0 -2
- package/dist/chunks/experiment-improvements-M27Z5OF4.js +0 -2
- package/dist/chunks/experiments-IWSCFDBB.js +0 -2
- package/dist/chunks/experiments-signal-R3NNH7WR.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
- package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
- package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
- package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
- package/dist/chunks/hosted-profile-candidate-37ZFY2LH.js +0 -3
- package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-UQBMML6K.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-YASS4T6L.js +0 -3
- package/dist/chunks/human-review-IJETDOWB.js +0 -2
- package/dist/chunks/learning-KVLTMRLD.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
- package/dist/chunks/model-projects-AVBQDNYG.js +0 -2
- package/dist/chunks/opchat-KSOJEL4W.js +0 -3
- package/dist/chunks/organizations-DJRJWC5I.js +0 -2
- package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
- package/dist/chunks/project-agent-2KNJFNZI.js +0 -2
- package/dist/chunks/published-experiment-source-LFYHKFAO.js +0 -2
- package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
- package/dist/chunks/sandbox-command-IIGTPYN3.js +0 -2
- package/dist/chunks/saved-work-QA46KCME.js +0 -2
- package/dist/chunks/src-E7NWAN5B.js +0 -420
- package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
- package/dist/chunks/store-chat-resources-CGW7PDCG.js +0 -2
- package/dist/chunks/store-evaluation-results-V5J6L4NV.js +0 -7
- package/dist/chunks/store-harness-workspaces-HHMM6GNK.js +0 -2
- package/dist/chunks/store-human-review-V5H4QDHR.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
- package/dist/chunks/store-model-batch-review-KMYPYWJR.js +0 -2
- package/dist/chunks/store-model-configuration-UXNC4PGY.js +0 -3
- package/dist/chunks/store-task-inbox-LNDCZOYE.js +0 -33
- package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
- package/dist/chunks/taskset-packages-I7I5KBFP.js +0 -2
- package/dist/chunks/training-error-AYOGHHL2.js +0 -2
- package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
- package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
- package/dist/chunks/training-hosted-workers-KI767T4Y.js +0 -2
- package/dist/skills/openpond-desktop-harness/SKILL.md +0 -113
- package/dist/skills/openpond-desktop-harness/agents/openai.yaml +0 -4
- package/dist/web/assets/App-Df7uYQGj.css +0 -1
- package/dist/web/assets/App-Yy3l2sdD.js +0 -56
- package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
- package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
- package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-IKzZsHoI.js +0 -1
- package/dist/web/assets/CommandMenu-CBY2AJxV.js +0 -1
- package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
- package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
- package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
- package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
- package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
- package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
- package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
- package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
- package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
- package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
- package/dist/web/assets/LabsRoute-DOnw39du.js +0 -101
- package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
- package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
- package/dist/web/assets/MainPane-CuBUBA9F.css +0 -1
- package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
- package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
- package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
- package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
- package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
- package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
- package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
- package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
- package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
- package/dist/web/assets/TrainingMetricWorkbench-BmzHLwIP.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
- package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
- package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
- package/dist/web/assets/app-models-BviS9b7U.js +0 -1
- package/dist/web/assets/browser-sidebar-links-ujSvTf5h.js +0 -1
- package/dist/web/assets/chat-resources-CItQ4mZD.js +0 -1
- package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
- package/dist/web/assets/contracts-BHTOD1nd.js +0 -1
- package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
- package/dist/web/assets/icons-kaq6k88m.js +0 -1
- package/dist/web/assets/index-DUMDOdB2.css +0 -1
- package/dist/web/assets/play-BPPQoqMl.js +0 -1
- package/dist/web/assets/plus-D18vYzHF.js +0 -1
- package/dist/web/assets/settings-BKmRueaw.js +0 -21
- package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
- package/dist/web/assets/square-Da8RuqW4.js +0 -1
- package/dist/web/assets/training-managed-adapter-81RrdT1k.js +0 -1
- package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
- package/dist/web/assets/useAgentInventory-BV4CUWzJ.js +0 -1
- /package/dist/chunks/{chunk-GLDYJM7O.js → chunk-T4QXKU5Y.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as y}from"./chunk-NVHZRKXB.js";import{x as v}from"./chunk-PBZCXPPC.js";import{A as e}from"./chunk-PF56N7ZY.js";import{a as s}from"./chunk-FTQLQJQV.js";var te="application/vnd.openpond.training+json;version=2",M="application/vnd.openpond.model-project+json;version=2",ne=1048576,ae=67108864,oe=8388608,h=524288,J=8388608,u=class extends Error{static{s(this,"OpenPondProtocolError")}code;constructor(t,n){super(n),this.name="OpenPondProtocolError",this.code=t}};function w(t){return JSON.stringify(S(t))}s(w,"canonicalJson");function $(t){return new TextEncoder().encode(w(t)).byteLength}s($,"canonicalJsonByteLength");async function O(t){let n=new TextEncoder().encode(w(t)),i=await globalThis.crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(i),o=>o.toString(16).padStart(2,"0")).join("")}s(O,"canonicalSha256");function x(t,n,i){let o=$(t);if(o>n)throw new u("payload_too_large",`${i} is ${o} bytes; the maximum is ${n} bytes.`)}s(x,"assertCanonicalPayloadSize");function H(t,n,i){let o=new TextEncoder().encode(t).byteLength;if(o>n)throw new u("response_too_large",`${i} is ${o} bytes; the maximum is ${n} bytes.`);try{return JSON.parse(t)}catch{throw new u("invalid_json",`${i} was not valid JSON.`)}}s(H,"parseBoundedJson");function S(t){if(t===null||typeof t=="string"||typeof t=="boolean")return t;if(typeof t=="number"){if(!Number.isFinite(t))throw new u("non_json_value","Canonical JSON cannot contain a non-finite number.");return Object.is(t,-0)?0:t}if(Array.isArray(t))return t.map(n=>S(n));if(typeof t=="object"){let n=Object.getPrototypeOf(t);if(n!==Object.prototype&&n!==null)throw new u("non_json_value","Canonical JSON accepts only plain objects.");let i={};for(let o of Object.keys(t).sort()){let r=t[o];if(r===void 0||typeof r=="function"||typeof r=="symbol")throw new u("non_json_value",`Canonical JSON cannot contain ${typeof r} at ${o}.`);i[o]=S(r)}return i}throw new u("non_json_value",`Canonical JSON cannot contain ${typeof t}.`)}s(S,"normalizeCanonicalJson");var a=e.string().trim().min(1).max(500),d=e.string().regex(/^[a-f0-9]{64}$/),c=e.string().datetime({offset:!0}),m=e.object({id:a,contentHash:d}).strict(),P=m.extend({revision:e.number().int().positive()}).strict(),p=e.object({schemaVersion:e.literal("openpond.baseModelPreference.v1"),modelId:a,revision:e.string().trim().min(1).max(256).nullable(),tokenizerRevision:e.string().trim().min(1).max(256).nullable(),chatTemplateHash:e.string().trim().min(8).max(256).nullable(),modelAssetId:a.nullable(),source:e.enum(["managed","local","builtin"])}).strict(),T=e.enum(["sft","dpo","grpo","ppo","sdft","opd","opsd","sdpo"]),B=e.object({schemaVersion:e.string().regex(/^openpond\.[A-Za-z0-9]+Recipe\.v\d+$/),method:T,parameterization:e.enum(["lora","full"])}).catchall(e.unknown()),D=e.object({profileProjectId:a,sourceRevision:e.string().regex(/^[a-f0-9]{40,64}$/),harnessRelease:m}).strict(),U=e.object({profileProjectId:a,sourceRevision:e.string().regex(/^[a-f0-9]{40,64}$/),catalogHash:d,definitionId:a,harnessRelease:m,tasksetRelease:m}).strict(),E=e.object({tasksetRef:P.nullable().default(null),evaluationTasksetRef:P.nullable().optional(),profileSource:D.nullable().optional(),profileEvaluation:U.nullable().optional(),rewardBindingRef:P.nullable().optional(),tasksetRelease:m.nullable().default(null),harnessRelease:m.nullable().default(null),baseModel:p.nullable().default(null),method:T.nullable().default(null),destinationId:a.nullable().default(null),managedRolloutPlacement:e.enum(["local","remote"]).default("remote"),managedGpuPlacementObjective:e.enum(["fast","balanced","economical"]).default("balanced"),managedGpuRequirement:e.enum(["any","h100_hbm3"]).default("any"),runPreset:e.enum(["small","standard","custom","small_experiment"]).nullable().default(null),recipe:B.nullable().default(null),preferredMaximumSpendUsd:e.number().nonnegative().nullable().default(null),preferredRetentionDays:e.number().int().nonnegative().nullable().default(null)}).strict(),N=E.omit({managedGpuRequirement:!0}),q=e.object({schemaVersion:e.literal("openpond.hostedModelProjectLink.v1"),apiOrigin:e.string().url().refine(t=>new URL(t).origin===t,"Use a canonical API origin.").nullable().default(null),teamId:a,projectId:a,portableProjectId:a,revision:e.number().int().positive(),etag:d,syncedSourceRevision:e.number().int().positive(),syncedAt:c,tasksets:e.array(e.object({localTasksetId:a,localTasksetHash:d.nullable().default(null),releaseId:a,releaseRevision:e.number().int().positive(),releaseHash:d,packageHash:d.nullable().default(null),hostedTasksetId:a,syncedAt:c}).strict()).max(1e4).default([])}).strict(),L=e.object({localTasksetId:a,releaseId:a,releaseRevision:e.number().int().positive(),releaseHash:d,state:e.enum(["syncing","synced","sync_failed"]),hostedTasksetId:a.nullable().default(null),lastAttemptAt:c,syncedAt:c.nullable().default(null),lastError:e.string().trim().min(1).max(5e3).nullable().default(null)}).strict(),V=e.object({schemaVersion:e.literal("openpond.modelProject.v2"),id:a,profileId:a,revision:e.number().int().positive().default(1),name:e.string().trim().min(1).max(200),objective:e.string().trim().max(5e3).nullable(),defaultBaseModel:p.nullable(),defaultDestinationId:a.nullable(),trainingSetup:E,hosted:q.nullable().default(null),tasksetSyncs:e.array(L).max(1e4).default([]),createdAt:c,updatedAt:c}).strict(),k=V.pick({id:!0,profileId:!0,name:!0,objective:!0,defaultBaseModel:!0,defaultDestinationId:!0,trainingSetup:!0}),G=e.object({schemaVersion:e.literal("openpond.modelProjectSave.v1"),operationId:a,expectedRevision:e.number().int().nonnegative(),project:k,learning:y.optional()}).strict().superRefine((t,n)=>{t.learning&&t.expectedRevision!==0&&n.addIssue({code:"custom",path:["learning"],message:"Use learning settings to edit an existing Model's policy."})}),Y=e.object({schemaVersion:e.literal("openpond.modelProjectConfigurationCheck.v1"),configurationHash:d,projectId:a,expectedRevision:e.number().int().nonnegative(),checkedAt:c,canSave:e.boolean(),deferred:e.array(e.enum(["base_model","taskset"])).max(2),findings:e.array(e.object({code:a,severity:e.enum(["error","warning"]),message:e.string().min(1).max(5e3),field:e.string().min(1).max(500).nullable()}).strict()).max(100)}).strict(),z=e.object({id:a,name:e.string().min(1).max(500),available:e.boolean(),preference:p}).strict();async function re(t){let n=g(t);return O({project:n.project,expectedRevision:n.expectedRevision,...n.learning?{learning:n.learning}:{}})}s(re,"modelProjectConfigurationHash");function g(t){try{v(t,h)}catch{throw new C(400,{schemaVersion:"openpond.modelProjectApiError.v2",code:"model_configuration_json_invalid",message:"Model configuration must be bounded JSON data.",retryable:!1,requestId:null,details:{}})}return G.parse(t)}s(g,"parseModelProjectSaveRequest");async function ie(t,n,i){v(t,h);let o=k.parse(t);x(o,h,"Model configuration");let r=i?y.parse(i):void 0,l=await O({project:o,expectedRevision:n,...r?{learning:r}:{}});return g({schemaVersion:"openpond.modelProjectSave.v1",operationId:`model-save:${l}`,expectedRevision:n,project:o,...r?{learning:r}:{}})}s(ie,"createModelProjectSaveRequest");var X=e.object({schemaVersion:e.literal("openpond.hostedModelProjectSync.v2"),portableProjectId:a,name:e.string().trim().min(1).max(200),objective:e.string().trim().max(5e3).nullable(),defaultBaseModel:p.nullable(),defaultDestinationId:a.nullable(),trainingSetup:N,sourceRevision:e.number().int().positive(),sourceUpdatedAt:c,expectedEtag:d.nullable().default(null)}).strict(),b=e.object({id:a,teamId:a,portableProjectId:a,name:e.string().trim().min(1).max(200),objective:e.string().trim().max(5e3).nullable(),defaultBaseModel:p.nullable(),defaultDestinationId:a.nullable(),trainingSetup:N,sourceRevision:e.number().int().positive(),sourceUpdatedAt:c,revision:e.number().int().positive(),etag:d,createdAt:c,updatedAt:c}).strict(),F=e.object({kind:e.enum(["taskset_release","harness_release","dataset_release","evidence_set","model_version","reward_model_version","evaluation_receipt"]),ref:m,role:e.string().trim().min(1).max(200).nullable().default(null),updatedAt:c}).strict(),Z=e.object({project:b,resources:e.array(F).max(1e4),jobCount:e.number().int().nonnegative(),latestJobIds:e.array(a).max(100)}).strict(),K=e.object({schemaVersion:e.literal("openpond.modelProjectApiError.v2"),code:e.string().trim().min(1).max(200),message:e.string().trim().min(1).max(5e3),retryable:e.boolean().default(!1),requestId:e.string().trim().min(1).max(500).nullable().default(null),details:e.record(e.string(),e.unknown()).default({})}).strict(),C=class extends Error{static{s(this,"OpenPondModelProjectApiError")}status;code;retryable;requestId;details;constructor(t,n){super(n.message),this.name="OpenPondModelProjectApiError",this.status=t,this.code=n.code,this.retryable=n.retryable,this.requestId=n.requestId,this.details=n.details}};function R(t){let n={};return new Headers(t).forEach((i,o)=>{n[o]=i}),n}s(R,"headersRecord");function se(t){let n=t.fetch??fetch,i=t.baseUrl.replace(/\/$/,"");async function o(r,l){let j=typeof t.headers=="function"?await t.headers():t.headers??{},f=await n(`${i}${r}`,{...l,headers:{accept:M,...l?.body?{"content-type":M}:{},...R(j),...R(l?.headers)}}),I=H(await f.text(),J,"Model Project API response");if(!f.ok){let _=K.safeParse(I);throw _.success?new C(f.status,_.data):new u("invalid_error_response",`Model Project request failed with HTTP ${f.status} and an invalid error envelope.`)}return I}return s(o,"request"),{async configurationCandidates(){return e.object({candidates:e.array(z).max(1e3)}).strict().parse(await o("/v1/model-projects/configuration/candidates",{headers:{accept:"application/json"}})).candidates},async checkConfiguration(r){let l=g(r);return Y.parse(await o("/v1/model-projects/configuration/check",{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(l)}))},async saveConfiguration(r){let l=g(r);return b.parse(await o("/v1/model-projects/configuration/save",{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(l)}))},async upsert(r){x(r,h,"Model Project sync");let l=X.parse(r),j=await o(`/v1/model-projects/${encodeURIComponent(l.portableProjectId)}`,{method:"PUT",body:JSON.stringify(l)});return b.parse(A(j,"project"))},async list(){let r=await o("/v1/model-projects");return e.array(b).parse(A(r,"projects"))},async get(r){let l=await o(`/v1/model-projects/${encodeURIComponent(a.parse(r))}`);return Z.parse(l)}}}s(se,"createModelProjectsClient");function A(t,n){return!t||typeof t!="object"||Array.isArray(t)?t:n in t?t[n]:t}s(A,"unwrapObject");export{te as a,M as b,ne as c,ae as d,oe as e,h as f,J as g,u as h,w as i,O as j,x as k,H as l,m,P as n,p as o,T as p,B as q,D as r,U as s,E as t,N as u,q as v,L as w,V as x,k as y,G as z,Y as A,z as B,re as C,g as D,ie as E,X as F,b as G,F as H,Z as I,K as J,C as K,se as L};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as N,b as W,c as Te,d as ze,e as U,f as ie,i as de,o as Le,q as ce}from"./chunk-WRQEYW3V.js";import{b as Ne}from"./chunk-SYUKES6H.js";import{a as ue}from"./chunk-ZBBVRYU3.js";import{k as ae,m as se,n as je}from"./chunk-OQPJ7FJF.js";import{c as _e}from"./chunk-BQUWZRWU.js";import{a as re,b as oe}from"./chunk-5ZBLCWEJ.js";import{Za as L}from"./chunk-M4ZRCRJM.js";import{f as G,m as f,n as $e}from"./chunk-VNJAAYNQ.js";import{b as Ce,c as Pe,f as Ee}from"./chunk-YBNKGA5C.js";import{a as Oe}from"./chunk-ZZWAQBA2.js";import{e as K,f as Re}from"./chunk-LV3CQ72P.js";import{b as z}from"./chunk-YR5ID2SS.js";import{k as Ue}from"./chunk-4M3YW3EQ.js";import{Ba as Ae,Hb as qe,Na as ke}from"./chunk-PBZCXPPC.js";import{A as o}from"./chunk-PF56N7ZY.js";import{a as d}from"./chunk-FTQLQJQV.js";var jt=3e4,_t=8*1024*1024,Bn={timeoutMs:900*1e3,maxResponseBytes:64*1024*1024},Be=class extends Error{static{d(this,"ApiTimeoutError")}timeoutMs;requestUrl;code="OPENPOND_API_TIMEOUT";constructor(t,e){super(`API request timed out after ${t}ms: ${e}`),this.timeoutMs=t,this.requestUrl=e,this.name="ApiTimeoutError"}},pe=class extends Error{static{d(this,"ApiResponseTooLargeError")}maximumBytes;requestUrl;code="OPENPOND_API_RESPONSE_TOO_LARGE";constructor(t,e){super(`API response exceeded ${t} bytes: ${e}`),this.maximumBytes=t,this.requestUrl=e,this.name="ApiResponseTooLargeError"}},He=class extends Error{static{d(this,"OpenPondApiError")}status;apiMessage;code;constructor(t,e,n,r=null){let a=r||e;super(`${n} failed: ${t}${a?` ${a}`:""}`),this.status=t,this.apiMessage=r,this.name="OpenPondApiError",this.code=e||"OPENPOND_API_ERROR"}};async function X(t,e,n,r={}){let{timeoutMs:a=jt,maxResponseBytes:s=_t,explicitBearerAuth:i=!1,...u}=r,c=`${t}${n}`,p=new Headers(u.headers);p.set("Content-Type","application/json");let b=i?void 0:process.env.OPENPOND_API_KEY,l=e?.trim()||"",g=!i&&l.startsWith("opk_"),P=b||(g?l:null);P&&!p.has("openpond-api-key")&&p.set("openpond-api-key",P),e?p.set("Authorization",g?`ApiKey ${l}`:`Bearer ${e}`):b&&!p.has("Authorization")&&p.set("Authorization",`ApiKey ${b}`);let T=new AbortController,q=new Be(a,c),j=a>0?setTimeout(()=>T.abort(q),a):null;j?.unref?.();let ne=zt(u.signal,T.signal,a),J=d(()=>{j&&clearTimeout(j)},"cleanup");try{let R=await fetch(c,{...u,headers:p,signal:ne});return Tt(R,{cleanup:J,maximumBytes:s,requestUrl:c,timeoutController:T,timeoutError:q})}catch(R){throw J(),T.signal.aborted?q:R}}d(X,"apiFetch");async function me(t,e){let n;try{let r=await t.text();n=r?JSON.parse(r):{}}catch(r){if(r instanceof Be||r instanceof pe)throw r;n={}}if(!t.ok){let r=typeof n.error=="string"?n.error:null,a=typeof n.message=="string"?n.message:null;throw new He(t.status,r,e,a)}return n}d(me,"readApiJson");function Tt(t,e){if(!t.body)return e.cleanup(),t;let n=Number(t.headers.get("content-length"));if(e.maximumBytes>0&&Number.isFinite(n)&&n>e.maximumBytes)throw e.cleanup(),t.body.cancel(),new pe(e.maximumBytes,e.requestUrl);let r=t.body.getReader(),a=0,s=new ReadableStream({async pull(i){try{let u=await r.read();if(u.done){e.cleanup(),i.close();return}if(a+=u.value.byteLength,e.maximumBytes>0&&a>e.maximumBytes){e.cleanup(),await r.cancel(),i.error(new pe(e.maximumBytes,e.requestUrl));return}i.enqueue(u.value)}catch(u){e.cleanup(),i.error(e.timeoutController.signal.aborted?e.timeoutError:u)}},async cancel(i){e.cleanup(),await r.cancel(i)}});return new Response(s,{headers:t.headers,status:t.status,statusText:t.statusText})}d(Tt,"boundedResponse");function zt(t,e,n){return n<=0?t??void 0:t?AbortSignal.any([t,e]):e}d(zt,"composedSignal");var C=o.string().min(1).max(200),_=o.string().regex(/^[a-f0-9]{64}$/),le=o.object({operationId:C,name:o.string().trim().min(1).max(500),projectId:C,dataset:G.extend({revision:o.number().int().positive()}).strict(),caseIds:o.array(C).min(1).max(1e4)}).strict().superRefine((t,e)=>{new Set(t.caseIds).size!==t.caseIds.length&&e.addIssue({code:"custom",message:"Select each case once."})}),Lt=N.extend({inputHash:_,outputHash:_.nullable(),task:Ae,taskHash:_}).strict(),Nt=o.object({schemaVersion:o.literal("openpond.connectedRecordedExecution.v1"),id:C,teamId:C,ownerUserId:C,request:le,manifest:qe,sources:o.array(Lt).min(1).max(1e4),contentHash:_}).strict();function Fe(t){let e=Nt.parse(t),{contentHash:n,...r}=e,{contentHash:a,...s}=e.manifest;if(f(r)!==n||f(s)!==a||e.manifest.teamId!==e.teamId||e.manifest.id!==e.id||e.manifest.operationId!==e.request.operationId||f(e.manifest.dataset)!==f(e.request.dataset)||e.sources.length!==e.request.caseIds.length||e.sources.length!==e.manifest.population.length||e.sources.some((i,u)=>i.taskHash!==f(i.task)||i.task.id!==e.request.caseIds[u]||i.boundaryId!==i.task.id||e.manifest.population[u]?.caseId!==i.boundaryId))throw new Error("Recorded execution identity or population integrity failed.");return e}d(Fe,"verifyConnectedRecordedExecution");var Bt=o.object({projectId:C.optional(),cursor:C.optional(),limit:o.number().int().min(1).max(50).default(20)}).strict(),Ht=o.object({id:C,teamId:C,ownerUserId:C,projectId:C,name:o.string().min(1).max(500),dataset:le.shape.dataset,manifestHash:_,contentHash:_,caseCount:o.number().int().min(1).max(1e4),createdAt:o.string().datetime()}).strict(),Ft=o.object({teamId:C,items:o.array(Ht).max(50),nextCursor:C.nullable()}).strict(),Mt=o.object({datasetId:o.string().trim().min(1).max(240),expectedRevision:o.number().int().positive(),operationId:o.string().trim().min(1).max(240),graders:o.array(ke).min(1).max(100).optional()}).strict().superRefine((t,e)=>{t.graders&&new Set(t.graders.map(n=>n.id)).size!==t.graders.length&&e.addIssue({code:"custom",path:["graders"],message:"Choose one exact revision of each grader."})}),B=o.string().min(1).max(500),k=o.number().int().nonnegative(),Dt=o.object({teamId:B,ownerUserId:B,projectId:B.nullable(),status:o.enum(["active","paused","archived"]),revision:k,state:o.enum(["collecting","pending","attention","paused","archived"]),lastReconciledAt:o.string().datetime().nullable(),lastCapturedAt:o.string().datetime().nullable(),historyDays:o.number().int().positive(),sources:k,tasks:k,datasets:o.array(o.object({datasetId:B,projection:o.enum(["turn","conversation"]),revision:k}).strict()).max(2),latestBatch:o.object({operationId:B,updatedAt:o.string().datetime(),scanned:k,captured:k,unchanged:k,pending:k,failed:k,excluded:k,paused:k,hasMore:o.boolean()}).strict().nullable()}).strict(),h=o.string().min(1).max(500),E=o.string().regex(/^[a-f0-9]{64}$/),Me=o.object({teamId:h,projectId:h.nullable(),status:o.enum(["active","paused","archived"]),revision:o.number().int().nonnegative()}).strict(),Jt=o.object({teamId:h,operationId:h,projectId:h.nullable(),outcomes:o.array(o.object({conversationId:h,state:o.enum(["captured","unchanged","pending","paused","excluded","failed"]),sourceId:h.optional(),snapshotHash:E.optional(),reason:o.string().optional()}).strict()).max(50),nextCursor:h.nullable()}).strict(),Kt=o.object({teamId:h,ref:N,origin:W.shape.source,sessionId:h,projectId:h,capturedAt:o.string().datetime(),unmappedEvidence:o.object({count:o.number().int().nonnegative().max(1e5),contentHash:E}).strict(),evidence:o.object({input:o.array(K),observed:o.array(K),answer:o.json(),boundary:Re}).strict()}).strict(),Gt=o.object({teamId:h,sourceId:h,snapshotHash:E,contentHash:E,count:o.number().int().nonnegative(),offset:o.number().int().nonnegative(),events:o.array(K).max(50),nextOffset:o.number().int().nonnegative().nullable()}).strict(),Wt=o.object({teamId:h,source:U.shape.source,sourceHash:E,previewHash:E,destination:U.shape.destination,issues:o.array(o.object({file:o.string(),message:o.string()}).strict()).max(100),sessions:o.array(o.object({sessionHash:E,sessionId:h,origin:W.shape.source,exporterVersion:o.string().nullable(),eventCount:o.number().int().nonnegative(),boundaries:o.array(o.object({id:h,projection:o.enum(["turn","conversation"]),answer:o.boolean(),process:o.enum(["retained","partial","absent"]),terminal:o.enum(["completed","failed","cancelled","unknown"])}).strict()).max(5001),warnings:o.array(o.string()).max(100),sample:o.array(o.object({role:o.enum(["user","assistant","system","tool"]).nullable(),text:o.string().max(4e3)}).strict()).max(3)}).strict()).max(1e3)}).strict(),De=o.object({teamId:h,operationId:h,requestHash:E,previewHash:E,projectId:h.optional(),state:o.enum(["admitting","publishing","completed","failed"]),outcomes:o.array(o.object({sessionHash:E,sourceId:h,status:o.enum(["imported","already_present"]),datasets:o.array(o.object({datasetId:h,revision:o.number().int().positive(),changed:o.boolean()}).strict()).max(2)}).strict()).max(1e3),error:o.string().optional()}).strict(),Je=class extends Error{static{d(this,"ConnectedEvidenceError")}constructor(t,e,n){super(n),this.status=t,this.code=e,this.name="ConnectedEvidenceError"}status;code},or=class{static{d(this,"ConnectedEvidenceClient")}constructor(t){this.options=t;let e=new URL(t.baseUrl);if(!["http:","https:"].includes(e.protocol)||e.username||e.password||e.search||e.hash||!t.apiKey.trim()||!t.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=e.toString().replace(/\/+$/,"")}options;baseUrl;async capture(t,e){let n=Te.parse(t),r=Jt.parse(await this.request("/capture","POST",n,e));if(this.scope(r.teamId),r.operationId!==n.operationId||r.outcomes.length>n.limit||n.conversationId&&r.outcomes.some(a=>a.conversationId!==n.conversationId))throw new Error("Capture receipt differs from its requested source or operation.");return r}async retainStartingAssets(t,e){let n=Le.parse(t),r=ce(await this.request("/starting-assets","POST",n,e));if(this.scope(r.teamId),r.operationId!==n.operationId||r.requestHash!==f(n)||f(r.source)!==f(n.source)||r.assets.length!==n.proofs.length||r.assets.some((a,s)=>a.path!==n.proofs[s].path))throw new Error("Starting assets differ from the exact source, operation or selected paths.");return r}async startingAssets(t,e){let n=ce(await this.request(`/starting-assets/${encodeURIComponent(h.parse(t))}`,"GET",void 0,e));if(this.scope(n.teamId),n.id!==t)throw new Error("Starting assets identity mismatch.");return n}async list(t={},e){let n=o.object({projectId:h.optional(),cursor:h.optional(),limit:o.number().int().min(1).max(50).default(20)}).strict().parse(t),r=new URLSearchParams(Object.entries(n).filter(([,s])=>s!==void 0).map(([s,i])=>[s,String(i)])),a=o.object({teamId:h,items:o.array(W).max(50),nextCursor:h.nullable()}).strict().parse(await this.request(`?${r}`,"GET",void 0,e));if(this.scope(a.teamId),a.items.length>n.limit||new Set(a.items.map(s=>s.sourceId)).size!==a.items.length||a.nextCursor!==null&&a.nextCursor===n.cursor||n.projectId&&a.items.some(s=>s.projectId!==n.projectId))throw new Error("Connected source page differs from its requested scope.");return a}async read(t,e){let n=N.parse(t),r=Kt.parse(await this.request(`/${encodeURIComponent(n.id)}/cases/${encodeURIComponent(n.boundaryId)}?snapshotHash=${n.snapshotHash}&revisionHash=${n.boundaryRevisionHash}`,"GET",void 0,e));if(this.scope(r.teamId),f(r.ref)!==f(n)||r.evidence.boundary.id!==n.boundaryId||r.evidence.boundary.revisionHash!==n.boundaryRevisionHash||f(r.evidence.input)!==r.evidence.boundary.inputHash||f(r.evidence.observed)!==n.boundaryRevisionHash||r.evidence.boundary.outputHash!==null&&f(r.evidence.answer)!==r.evidence.boundary.outputHash)throw new Error("Connected case readback differs from its exact snapshot or cutoff.");return r}async setCollection(t,e){let n=Me.parse(await this.request("/collection","PUT",o.object({paused:o.boolean()}).strict().parse({paused:t}),e));return this.scope(n.teamId),n}async collection(t){let e=Me.parse(await this.request("/collection","GET",void 0,t));return this.scope(e.teamId),e}async collectionStatus(t){let e=Dt.parse(await this.request("/collection/status","GET",void 0,t));return this.scope(e.teamId),e}async unmappedEvents(t,e){let n=o.object({id:h,snapshotHash:E,contentHash:E,offset:o.number().int().nonnegative().default(0),limit:o.number().int().min(1).max(50).default(20)}).strict().parse(t),r=Gt.parse(await this.request(`/${encodeURIComponent(n.id)}/unmapped-events?snapshotHash=${n.snapshotHash}&offset=${n.offset}&limit=${n.limit}`,"GET",void 0,e));if(this.scope(r.teamId),r.sourceId!==n.id||r.snapshotHash!==n.snapshotHash||r.contentHash!==n.contentHash||r.offset!==n.offset||r.events.length>n.limit||r.events.some((a,s)=>a.sequence!==n.offset+s)||r.nextOffset!==null&&r.nextOffset!==n.offset+r.events.length)throw new Error("Unmapped source event page differs from its pinned snapshot.");return r}async homeSummary(t,e){let n=o.object({from:o.string().datetime(),to:o.string().datetime(),projectId:h.optional()}).strict(),r=n.parse(t),a=new URLSearchParams(Object.entries(r)),s=o.object({teamId:h,range:n,activity:o.object({conversations:o.number().int().nonnegative(),turns:o.number().int().nonnegative(),chatTurns:o.number().int().nonnegative(),workTurns:o.number().int().nonnegative()}).strict(),accounting:o.object({contextSnapshots:o.number().int().nonnegative()}).strict(),usage:Ee}).strict().parse(await this.request(`/summary?${a}`,"GET",void 0,e));if(this.scope(s.teamId),f(s.range)!==f(r)||s.activity.chatTurns+s.activity.workTurns!==s.activity.turns)throw new Error("Activity summary differs from its requested range.");for(let i of[s.usage.days,s.usage.modes,s.usage.models]){if(new Set(i.map(u=>u.key)).size!==i.length)throw new Error("Duplicate usage summary group.");for(let u of Object.keys(s.usage.total))if(i.reduce((c,p)=>c+p[u],0)!==s.usage.total[u])throw new Error("Usage totals differ from their displayed groups.")}return s}async uploadPart(t,e){let n=ze.parse(t),r=o.object({teamId:h,hash:E,parts:o.number().int(),index:o.number().int()}).strict().parse(await this.request("/imports/upload","POST",n,e));if(this.scope(r.teamId),r.hash!==n.hash||r.parts!==n.parts||r.index!==n.index)throw new Error("Upload receipt differs from its part identity.");return r}async preview(t,e){let n=U.parse(t),r=Wt.parse(await this.request("/imports/preview","POST",n,e));if(this.scope(r.teamId),r.source!==n.source||f(r.destination)!==f(n.destination)||r.sessions.some(a=>a.origin!==n.source)||new Set(r.sessions.map(a=>a.sessionHash)).size!==r.sessions.length)throw new Error("Import preview differs from its source or destination.");return r}async commit(t,e){let n=ie.parse(t),r=De.parse(await this.request("/imports/commit","POST",n,e));if(this.scope(r.teamId),r.operationId!==n.operationId||r.previewHash!==n.previewHash||r.requestHash!==f(n)||r.outcomes.some(a=>!n.selection.some(s=>s.sessionHash===a.sessionHash))||r.state==="completed"&&r.outcomes.length!==n.selection.length)throw new Error("Import receipt differs from its exact selection or operation.");return r}async readImport(t,e){let n=h.parse(t),r=De.parse(await this.request(`/imports/${encodeURIComponent(n)}`,"GET",void 0,e));if(this.scope(r.teamId),r.operationId!==n)throw new Error("Import identity mismatch.");return r}async prepareRecorded(t,e){let n=le.parse(t),r=Fe(await this.request("/recorded-executions","POST",n,e));if(this.scope(r.teamId),f(r.request)!==f(n))throw new Error("Recorded admission differs from its selected Dataset/cases.");return r}async listRecordedExecutions(t={},e){let n=Bt.parse(t),r=new URLSearchParams(Object.entries(n).filter(([,s])=>s!==void 0).map(([s,i])=>[s,String(i)])),a=Ft.parse(await this.request(`/recorded-executions?${r}`,"GET",void 0,e));if(this.scope(a.teamId),a.items.length>n.limit||a.items.some((s,i)=>s.teamId!==a.teamId||n.projectId&&s.projectId!==n.projectId||n.cursor&&s.id<=n.cursor||i>0&&s.id<=a.items[i-1].id)||a.items.some(s=>s.ownerUserId!==a.items[0]?.ownerUserId)||a.nextCursor!==null&&(n.cursor!==void 0&&a.nextCursor<=n.cursor||a.items.length>0&&a.nextCursor<a.items.at(-1).id))throw new Error("Recorded execution page differs from its requested scope or cursor.");return a}async recordedExecution(t,e){let n=Fe(await this.request(`/recorded-executions/${encodeURIComponent(h.parse(t))}`,"GET",void 0,e));if(this.scope(n.teamId),n.id!==t)throw new Error("Recorded execution identity mismatch.");return n}async publishDataset(t,e){let n=Mt.parse(t),r=de.parse(await this.request("/datasets/publish","POST",n,e));this.scope(r.teamId);let a=r.workspace.draft.metadata.connectedPublication;if(r.datasetId!==n.datasetId||!r.publication||!a||typeof a!="object"||!("requestHash"in a)||a.requestHash!==f(n))throw new Error("Published Dataset identity or original selection mismatch.");return r}async createSelection(t,e){let n=o.object({operationId:h.max(240),projectId:h.max(240),name:o.string().trim().min(1).max(200),cases:o.array(N).min(1).max(500)}).strict().parse(t),r=de.parse(await this.request("/datasets/selection","POST",n,e));if(this.scope(r.teamId),r.originProjectId!==n.projectId||r.workspace.draft.tasks.length!==n.cases.length||r.workspace.draft.tasks.some((a,s)=>f(a.input&&typeof a.input=="object"&&!Array.isArray(a.input)?a.input.connectedEvidenceRef:null)!==f(n.cases[s])))throw new Error("Selected Dataset differs from its exact source population.");return r}scope(t){if(t!==this.options.teamId)throw new Error("Connected evidence workspace mismatch.")}async request(t,e,n,r){let{response:a,value:s}=await _e(this.options.fetch??fetch,`${this.baseUrl}/v1/connected-evidence${t}`,{method:e,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...n===void 0?{}:{body:JSON.stringify(n)}},(i,u,c)=>new Je(i,u,c));if(!a.ok){let i=o.object({code:o.string(),message:o.string()}).safeParse(s);throw new Je(a.status,i.success?i.data.code:"connected_request_failed",i.success?i.data.message:"Connected evidence request failed.")}return s}},I=o.string().trim().min(1).max(240),ir=o.object({id:I,expectedRevision:o.number().int().positive(),manifest:Ce}).strict().refine(t=>t.id===t.manifest.connectionId&&t.expectedRevision===t.manifest.connectionRevision,"Collector coverage scope differs from its connection."),dr=o.object({id:I,cutoff:o.iso.datetime().optional()}).strict(),cr=o.object({schemaVersion:o.literal("openpond.connectedSyncCoverageReceipt.v1"),id:I,teamId:I,ownerUserId:I,connectionId:I,connectionRevision:o.number().int().positive(),receivedAt:o.iso.datetime(),summary:Pe}).strict(),ur=o.object({id:I,source:U.shape.source,machineId:I,sourceInstanceId:I,sourceLabel:o.string().trim().min(1).max(200),sourceRoot:o.string().min(1).max(2e3),destination:U.shape.destination,since:o.string().datetime().nullable(),keepSyncing:o.boolean(),expectedRevision:o.number().int().nonnegative()}).strict(),pr=o.object({id:I,expectedRevision:o.number().int().positive(),action:o.enum(["pause","resume","disconnect"])}).strict(),mr=o.object({id:I,operationId:I,expectedRevision:o.number().int().positive()}).strict(),lr=o.object({id:I,expectedRevision:o.number().int().positive(),pendingOperations:o.number().int().min(0).max(1e4),error:o.string().max(500).nullable(),completedSyncRevision:o.number().int().nonnegative().default(0)}).strict(),hr=o.object({teamId:I,id:I,revision:o.number().int().positive(),source:U.shape.source,sourceLabel:o.string(),sourceRoot:o.string(),taskDatasetId:I.nullable(),conversationDatasetId:I.nullable(),machineId:I,sourceInstanceId:I,projectId:I,datasetIds:o.array(I).max(2),since:o.string().datetime().nullable(),keepSyncing:o.boolean(),state:o.enum(["active","paused","disconnected"]),health:o.enum(["online","offline"]),lastHeartbeatAt:o.string().datetime().nullable(),lastAdmissionAt:o.string().datetime().nullable(),pendingOperations:o.number().int().nonnegative(),admittedTasks:o.number().int().nonnegative(),error:o.string().nullable(),requestedSyncRevision:o.number().int().nonnegative().default(0),completedSyncRevision:o.number().int().nonnegative().default(0),syncRequestedAt:o.string().datetime().nullable().default(null),syncCompletedAt:o.string().datetime().nullable().default(null)}).strict().refine(t=>t.completedSyncRevision<=t.requestedSyncRevision&&t.requestedSyncRevision<=t.revision,"Invalid sync acknowledgement generation."),fr=o.object({connectionId:I,expectedRevision:o.number().int().positive(),request:ie}).strict();function vr(t){let e=d(r=>`/v1/training/candidate-evaluations/${encodeURIComponent(r)}`,"path");function n(r,a,s){let i=Yt.parse(r);if(i.teamId!==a||s&&i.id!==s)throw new Error("The preparation belongs to another workspace or candidate operation.");return i}return d(n,"read"),{async options(r,a={}){let s=new URLSearchParams({teamId:r,...a}),i=Vt.parse(await t(`/v1/training/candidates?${s}`));if(i.teamId!==r)throw new Error("The candidate catalog belongs to another workspace.");return i},async save(r){let a=Ge.parse(r),s=n(await t(`/v1/training/candidate-evaluations?teamId=${encodeURIComponent(a.teamId)}`,{method:"POST",body:JSON.stringify(a)}),a.teamId);if(s.requestHash!==f(a))throw new Error("The saved preparation differs from the selected candidate or frozen evaluation.");return s},async get(r,a){return n(await t(`${e(a)}?teamId=${encodeURIComponent(r)}`),r,a)},async control(r,a,s,i){let u=Zt.parse(i),c=n(await t(`${e(a)}/${s}?teamId=${encodeURIComponent(r)}`,{method:"POST",body:JSON.stringify(u)}),r,a);if(c.requestHash!==u.requestHash)throw new Error("The command returned a different frozen evaluation.");return c}}}d(vr,"createCandidateEvaluationClient");var S=o.string().trim().min(1).max(200),he=o.string().regex(/^[a-f0-9]{64}$/),Ke=o.object({id:S,contentHash:he}).strict(),Xt=o.object({artifact:Ke,trainingJobId:S,configurationId:S,baseProfileId:S,ready:o.boolean(),reason:o.string().max(1e3).nullable()}).strict(),Vt=o.object({teamId:S,ownerUserId:S,items:o.array(Xt).max(100),nextCursor:S.nullable()}).strict(),Ge=o.object({teamId:S,operationId:S,artifact:Ke,configuration:L}).strict().superRefine((t,e)=>{(t.configuration.request.teamId!==t.teamId||t.configuration.request.policy.kind==="fixture"||t.configuration.request.policy.candidate)&&e.addIssue({code:"custom",message:"Choose one exact model-backed evaluation before preparing the trained version."})}),Yt=o.object({schemaVersion:o.literal("openpond.candidateEvaluationPreparation.v1"),teamId:S,ownerUserId:S,id:S,revision:o.number().int().positive(),requestHash:he,request:Ge,trainingJobId:S,dispatchId:S,lastOperationId:S.nullable(),runtime:o.object({poolId:S,endpointId:S.nullable(),baseProfileId:S,workerImageDigest:o.string().regex(/^sha256:[a-f0-9]{64}$/),modelId:S.nullable()}).strict().nullable(),state:o.enum(["configured","preparing","ready","dispatching","submitted","cleaning","completed","failed","cancelled"]),experimentId:S.nullable(),authorizedAt:o.iso.datetime().nullable(),cancelledAt:o.iso.datetime().nullable(),reason:o.string().max(1e3).nullable(),createdAt:o.iso.datetime(),updatedAt:o.iso.datetime()}).strict().superRefine((t,e)=>{(t.requestHash!==f(t.request)||!t.runtime&&["ready","dispatching","submitted","completed"].includes(t.state))&&e.addIssue({code:"custom",message:"The exact candidate preparation request or runtime changed."})}),Zt=o.object({operationId:S,expectedRevision:o.number().int().positive(),requestHash:he}).strict();var x=o.string().trim().min(1).max(200),H=o.string().regex(/^[a-f0-9]{64}$/),F=o.string().datetime(),We=o.object({operationId:x,id:x.optional(),expectedRevision:o.number().int().nonnegative(),teamId:x,projectId:x.nullable(),enabled:o.boolean(),configuration:L,cadence:o.discriminatedUnion("kind",[o.object({kind:o.literal("interval"),seconds:o.number().int().min(60).max(31536e3)}).strict(),o.object({kind:o.literal("nightly"),calendar:Ue}).strict()]),maximumTotalSpendUsd:o.number().finite().positive().max(1e4),maximumAttempts:o.number().int().min(1).max(20)}).strict().superRefine((t,e)=>{(t.configuration.request.teamId!==t.teamId||(t.configuration.request.project?.id??null)!==t.projectId)&&e.addIssue({code:"custom",message:"The scheduled Experiment must retain its actual workspace and Project."}),t.configuration.maximumCostUsd>t.maximumTotalSpendUsd&&e.addIssue({code:"custom",message:"The run ceiling exceeds the approved cumulative schedule ceiling."})}),Qt=o.object({id:x,scheduledAt:F,coalescedThroughAt:F,coalescedCount:o.number().int().nonnegative(),configurationHash:H,operationId:x,state:o.enum(["reserved","dispatching","running","cleaning","completed","failed","cancelled","uncertain"]),executionId:x.nullable(),attempt:o.number().int().positive(),maximumCostUsd:o.number().finite().positive(),actualSpendUsd:o.number().finite().nonnegative().nullable(),cleanupComplete:o.boolean(),error:o.string().max(4e3).nullable()}).strict(),en=o.object({schemaVersion:o.literal("openpond.experimentEvaluationSchedule.v1"),id:x,revision:o.number().int().positive(),actorId:x,teamId:x,projectId:x.nullable(),operationId:x,requestHash:H,configuration:L,configurationHash:H,cadence:We.shape.cadence,state:o.enum(["scheduled","disabled","blocked"]),nextRunAt:F.nullable(),maximumTotalSpendUsd:o.number().finite().positive(),maximumAttempts:o.number().int().positive(),lastEvaluatedConfigurationHash:H.nullable(),newerUnevaluatedRelease:G.nullable(),fires:o.array(Qt).max(1e4),reason:o.string().max(4e3).nullable(),createdAt:F,updatedAt:F,contentHash:H}).strict();function tn(t){let{operationId:e,request:n,...r}=t,{operationId:a,...s}=n;return f({...r,request:s})}d(tn,"scheduledExperimentHash");function nn(t){let e=en.parse(t);if($e(e,"Scheduled Experiment"),e.configurationHash!==tn(e.configuration)||e.configuration.request.teamId!==e.teamId||(e.configuration.request.project?.id??null)!==e.projectId)throw new Error("Scheduled Experiment immutable authority differs from its recipe.");return e}d(nn,"verifyExperimentEvaluationSchedule");function qr(t){return nn({...t,contentHash:f(t)})}d(qr,"sealExperimentEvaluationSchedule");var rn=o.object({teamId:x,id:x,operationId:x,expectedRevision:o.number().int().positive(),action:o.enum(["cancel_active","retry_active","pause"])}).strict(),Ur=o.discriminatedUnion("operation",[o.object({operation:o.literal("publish"),request:We}).strict(),o.object({operation:o.literal("control"),request:rn}).strict(),o.object({operation:o.literal("read"),id:x}).strict(),o.object({operation:o.literal("list"),cursor:x.optional(),limit:o.number().int().min(1).max(100).default(50)}).strict()]);function on(t){return{list:d((e={})=>t.listSandboxRuntimes(e),"list"),create:d(e=>t.createSandboxRuntime(e),"create"),handle:d((e,n=null)=>t.sandboxRuntime(e,n),"handle"),get:d(e=>t.getSandboxRuntime(e),"get"),createSandbox:d((e,n={},r={})=>t.createSandboxRuntimeSandbox(e,n,r),"createSandbox"),updateStatus:d((e,n)=>t.updateSandboxRuntimeStatus(e,n),"updateStatus"),events:d(e=>t.listSandboxRuntimeEvents(e),"events"),event:d((e,n)=>t.emitSandboxRuntimeEvent(e,n),"event"),checkpoint:d((e,n={})=>t.checkpointSandboxRuntime(e,n),"checkpoint"),promote:d((e,n,r={})=>t.promoteSandboxRuntime(e,n,r),"promote"),preserveSource:d((e,n={},r={})=>t.preserveSandboxRuntimeSource(e,n,r),"preserveSource")}}d(on,"createSandboxRuntimeNamespace");function an(t){return{list:d((e={})=>t.list(e),"list"),create:d(e=>t.create(e),"create"),get:d(e=>t.get(e),"get"),pricing:d(()=>t.pricing(),"pricing"),costs:d((e={})=>t.costs(e),"costs")}}d(an,"createSandboxNamespace");function sn(t){return{list:d(e=>t.listProjects(e),"list"),upsert:d(e=>t.upsertProject(e),"upsert"),upsertGitRemote:d(e=>t.upsertProjectGitRemote(e),"upsertGitRemote"),get:d((e,n)=>t.getProject(e,n),"get"),update:d((e,n)=>t.updateProject(e,n),"update"),sync:d((e,n)=>t.syncProject(e,n),"sync"),ensureGitRemote:d((e,n)=>t.ensureProjectGitRemote(e,n),"ensureGitRemote"),getGitRemote:d((e,n)=>t.ensureProjectGitRemote(e,n),"getGitRemote"),git:d((e,n)=>t.ensureProjectGitRemote(e,n),"git"),uploadSource:d((e,n)=>t.uploadProjectSource(e,n),"uploadSource"),archive:d((e,n)=>t.archiveProject(e,n),"archive")}}d(sn,"createSandboxProjectNamespace");function dn(t){return{get:d(e=>t.getHostedProfile(e),"get"),status:d(e=>t.getHostedProfile(e),"status"),ensureHosted:d(e=>t.ensureHostedProfile(e),"ensureHosted"),push:d(e=>t.pushHostedProfile(e),"push")}}d(dn,"createSandboxProfileNamespace");function cn(t){return{list:d(e=>t.listAgents(e),"list"),upsert:d(e=>t.upsertAgent(e),"upsert"),get:d((e,n)=>t.getAgent(e,n),"get"),update:d((e,n)=>t.updateAgent(e,n),"update"),archive:d((e,n)=>t.archiveAgent(e,n),"archive"),run:d((e,n)=>t.runAgent(e,n),"run"),sourceDeployPlan:d((e,n)=>t.getAgentSourceDeployPlan(e,n),"sourceDeployPlan"),manifestSnapshots:d((e,n)=>t.listAgentManifestSnapshots(e,n),"manifestSnapshots"),requestSourceChecks:d((e,n)=>t.requestAgentSourceChecks(e,n),"requestSourceChecks"),configureSourceSetup:d((e,n)=>t.configureAgentSourceSetup(e,n),"configureSourceSetup"),publishSource:d((e,n)=>t.publishAgentSource(e,n),"publishSource")}}d(cn,"createSandboxAgentNamespace");function un(t,e,n=null){let r=d(async(c={},p={})=>{let b=await t.getSandboxRuntime(e);return b.sandboxId?t.get(b.sandboxId):t.createSandboxRuntimeSandbox(e,c,p).then(l=>l.sandbox)},"currentSandbox"),a=d(async(c={},p={})=>{let b=await t.getSandboxRuntime(e);if(!b.sandboxId)return t.createSandboxRuntimeSandbox(e,c,p).then(g=>g.sandbox);let l=await t.get(b.sandboxId);return l.state==="stopped"?t.start(l.id,p).then(g=>g.sandbox):l.state==="archived"?t.restore(l.id).then(g=>g.sandbox):l.state==="deleted"||l.state==="error"?t.createSandboxRuntimeSandbox(e,c,p).then(g=>g.sandbox):l},"resume");return{id:e,initial:n,get:d(()=>t.getSandboxRuntime(e),"get"),sandbox:r,resume:a,createSandbox:d((c={},p={})=>t.createSandboxRuntimeSandbox(e,c,p),"createSandbox"),status:d(async c=>{if(typeof c!="string")return t.updateSandboxRuntimeStatus(e,c);let p=await t.getSandboxRuntime(e);return t.updateSandboxRuntimeStatus(e,{status:c,expectedVersion:p.version})},"status"),events:d(()=>t.listSandboxRuntimeEvents(e),"events"),event:d(c=>t.emitSandboxRuntimeEvent(e,c),"event"),recordCommit:d((c,p={})=>t.emitSandboxRuntimeEvent(e,{...p,type:p.type??"git.commit",commitSha:c}),"recordCommit"),checkpointHint:d((c={})=>t.emitSandboxRuntimeEvent(e,{type:"workflow.checkpoint_hint",summary:c.summary??c.reason??"Workflow checkpoint hint",payload:{...c.payload,reason:c.reason??null},artifactRefs:c.artifactRefs,lifecycleHint:{kind:"checkpoint",reason:c.reason??null}}),"checkpointHint"),waitForUser:d(async(c={})=>{await t.emitSandboxRuntimeEvent(e,{type:"workflow.waiting_for_user",summary:c.summary??c.reason??"Waiting for user",payload:{...c.payload,reason:c.reason??null},lifecycleHint:{kind:"waiting_for_user",reason:c.reason??null}});let p=await t.getSandboxRuntime(e);return p.status==="waiting_for_user"?p:t.updateSandboxRuntimeStatus(e,{status:"waiting_for_user",expectedVersion:p.version,summary:c.summary??c.reason,metadata:{workflowWaitForUserReason:c.reason??null}})},"waitForUser"),keepAlive:d((c={})=>{let p=pn(c);return t.emitSandboxRuntimeEvent(e,{type:"workflow.keepalive",summary:c.summary??c.reason??"Workflow keepalive",payload:{...c.payload,reason:c.reason??null,keepaliveUntil:p},lifecycleHint:{kind:"keepalive",reason:c.reason??null,keepaliveUntil:p}})},"keepAlive"),checkpoint:d(c=>t.checkpointSandboxRuntime(e,c),"checkpoint"),files:{write:d(async(c,p)=>t.uploadFile((await a()).id,c,p),"write"),read:d(async c=>t.downloadFile((await a()).id,c),"read"),readResponse:d(async c=>t.downloadFileResponse((await a()).id,c),"readResponse"),list:d(async(c={})=>t.listFiles((await a()).id,c),"list"),delete:d(async(c,p={})=>t.deleteFile((await a()).id,c,p),"delete"),search:d(async c=>t.searchFiles((await a()).id,c),"search"),stat:d(async c=>t.statFile((await a()).id,c),"stat"),mkdir:d(async c=>t.mkdir((await a()).id,c),"mkdir"),move:d(async c=>t.moveFile((await a()).id,c),"move")},commands:{run:d(async c=>t.exec((await a()).id,typeof c=="string"?{command:c}:c),"run")},ports:{expose:d(async c=>t.openPort((await a()).id,typeof c=="number"?{port:c}:c),"expose")},promote:d((c,p={})=>t.promoteSandboxRuntime(e,c,p),"promote"),preserveSource:d((c={},p={})=>t.preserveSandboxRuntimeSource(e,c,p),"preserveSource"),archive:d(async c=>{let p=c??(await t.getSandboxRuntime(e)).version;return t.updateSandboxRuntimeStatus(e,{status:"archived",expectedVersion:p})},"archive")}}d(un,"createSandboxRuntimeHandle");function pn(t){if(t?.until instanceof Date)return t.until.toISOString();if(typeof t?.until=="string"&&t.until.trim())return new Date(t.until).toISOString();let e=typeof t?.seconds=="number"&&Number.isFinite(t.seconds)?Math.max(1,Math.trunc(t.seconds)):60;return new Date(Date.now()+e*1e3).toISOString()}d(pn,"runtimeKeepaliveUntilIso");async function mn(t,e={}){let n=`openpond-code-smoke-${Date.now()}`,r=`openpond-code-exec-ok:${n}`,a=`openpond-code-preview-ok:${n}`,s=`openpond-code-file-ok:${n}`,i=4173,u=null,c=null,p=!1,b=!1;try{let l=await Ve(t,await t.create({repo:e.repo??"https://github.com/octocat/Hello-World",resources:{cpu:e.cpu??1,memoryGb:e.memoryGb??1,diskGb:e.diskGb??8},budget:{maxUsd:e.budgetUsd??"0.05"},quotas:{maxSpendUsd:e.budgetUsd??"0.05",maxDurationSeconds:600,idleTimeoutSeconds:600,maxOpenPorts:2},metadata:{runId:n,source:"openpond-code-sandbox-smoke"}},{async:!0}));u=l.id;let g=e.expectedMppMode;if(g&&l.reservation.mpp?.mode!==g)throw new Error(`expected ${g} reservation, got ${l.reservation.mpp?.mode??"none"}`);if(!g&&!l.reservation.mpp?.mode)throw new Error("expected sandbox reservation MPP metadata");let P=await t.exec(l.id,{command:[`printf '${r}\\n'`,"test -f README && printf 'repo-clone-ok\\n'","cat > server.cjs <<'EOF'","const { createServer } = require('node:http');",`createServer((_request, response) => response.end('${a}')).listen(${i}, '0.0.0.0');`,"EOF","nohup node server.cjs > server.log 2>&1 & sleep 1"].join(`
|
|
3
|
-
`),timeoutSeconds:120});if(P.command.status!=="succeeded")throw new Error(`expected command success, got ${P.command.status}`);if(!P.command.output.includes(r))throw new Error("expected exec marker");if(await t.uploadFile(l.id,"openpond-code-smoke.txt",s),await t.downloadFile(l.id,"openpond-code-smoke.txt")!==s)throw new Error("expected file roundtrip marker");let q=null;if(e.snapshot||e.fork){let R=await t.createSnapshot(l.id,{async:!0,name:`openpond-code-smoke-${n}`,replay:{entrypoints:[{command:"cat openpond-code-smoke.txt",name:"default"}],retention:{class:"pinned"},safety:{cleanup:"delete",idleTimeoutSeconds:600,internetEgress:"block",maxDurationSeconds:600,maxSpendUsd:e.budgetUsd??"0.05",publicPreview:!1},validation:{commands:[{command:"test -f openpond-code-smoke.txt"}]}}}),A=R.snapshot??(await fn(t,l.id,R.snapshotJob?.snapshotId)).snapshot;if(q=A.id,A.state!=="ready")throw new Error(`expected ready snapshot, got ${A.state}`)}if(e.fork){if(!q)throw new Error("expected snapshot id before fork");let R=await Ve(t,(await t.forkSnapshot(q,{budget:{maxUsd:e.budgetUsd??"0.05"},metadata:{source:"openpond-code-sandbox-smoke-fork",templateSnapshotId:q}},{async:!0})).sandbox);c=R.id;let A=await t.exec(R.id,{command:"cat openpond-code-smoke.txt",timeoutSeconds:120});if(A.command.status!=="succeeded")throw new Error(`expected fork command success, got ${A.command.status}`);if(!A.command.output.includes(s))throw new Error("expected fork snapshot marker");e.keep||(await fe(t,R.id),b=!0)}let j=null;if(e.preview!==!1){let R=await t.openPort(l.id,{label:"openpond-code-smoke",port:i}),A=await fetch(R.preview.url);j=A.status;let $t=await A.text();if(A.status!==200)throw new Error(`expected preview HTTP 200, got ${A.status}`);if(!$t.includes(a))throw new Error("expected preview marker")}let{sandbox:ne,receipts:J}=await ln(t,l.id);return e.keep||(await fe(t,l.id),p=!0),{deleted:p,execOutput:P.command.output.trim(),fileRoundtrip:!0,forkSandboxId:c,previewStatus:j,receiptRefs:J.map(R=>R.mpp.receiptRef??null),reservationRef:l.reservation.mpp?.reservationRef??null,runId:n,sandboxId:l.id,snapshotId:q,state:ne.state}}finally{c&&!e.keep&&!b&&await Xe(t,c),u&&!e.keep&&!p&&await Xe(t,u)}}d(mn,"runSandboxSmoke");async function ln(t,e){try{await t.stop(e)}catch{await t.stop(e,{async:!0})}let n=await Ze(t,e,new Set(["stopped","deleted"]),"stop"),r=await hn(t,e);if(r.length===0)throw new Error("expected receipt readback");return{sandbox:n,receipts:r}}d(ln,"stopSandboxForSmoke");async function fe(t,e){try{let n=await t.delete(e);if(n.state==="deleted")return n;await t.delete(e,{async:!0})}catch{await t.delete(e,{async:!0})}return Ze(t,e,new Set(["deleted"]),"delete")}d(fe,"deleteSandboxForSmoke");async function Xe(t,e){try{await fe(t,e)}catch{await t.delete(e,{async:!0}).catch(()=>{})}}d(Xe,"cleanupSandboxBestEffort");async function Ze(t,e,n,r){let i=Date.now()+3e5,u=await t.get(e);for(;Date.now()<i;){if(n.has(u.state))return u;if(u.state==="error")throw new Error(`sandbox ${r} failed: ${e}`);await V(3e3),u=await t.get(e)}throw new Error(`sandbox ${r} did not reach ${[...n].join("/")} before timeout: ${e} (${u.state})`)}d(Ze,"waitForSandboxState");async function hn(t,e){let a=Date.now()+12e4,s=await t.receipts(e);for(;Date.now()<a;){if(s.length>0)return s;await V(3e3),s=await t.receipts(e)}return s}d(hn,"waitForReceipts");async function Ve(t,e){if(e.state==="running"||e.state==="stopped")return e;if(e.state==="error")throw new Error(`sandbox create failed: ${e.id}
|
|
4
|
-
${e.logs.join(`
|
|
5
|
-
`)}`);let n=12*6e4,r=3e3,a=Date.now()+n,s=e;for(;Date.now()<a;){if(await V(r),s=await t.get(e.id),s.state==="running"||s.state==="stopped")return s;if(s.state==="error")throw new Error(`sandbox create failed: ${s.id}
|
|
6
|
-
${s.logs.join(`
|
|
7
|
-
`)}`)}throw new Error(`sandbox create did not reach running state before timeout: ${s.id} (${s.state})`)}d(Ve,"waitForCreateReady");async function fn(t,e,n){if(!n)throw new Error("snapshot job did not return snapshot id");let r=12*6e4,a=3e3,s=Date.now()+r,i=await t.get(e);for(;Date.now()<s;){let u=i.snapshots?.find(p=>p.id===n);if(u?.state==="ready")return{sandbox:i,snapshot:u};let c=i.snapshotJobs?.find(p=>p.snapshotId===n);if(c?.status==="failed")throw new Error(`snapshot job failed: ${c.error??n}`);await V(a),i=await t.get(e)}throw new Error(`snapshot did not reach ready state before timeout: ${n}`)}d(fn,"waitForSnapshotReady");function V(t){return new Promise(e=>setTimeout(e,t))}d(V,"sleep");function M(t={}){return t.async||t.respondAsync?{Prefer:"respond-async"}:void 0}d(M,"asyncRequestHeaders");var yn="https://openpond.ai",Qe="https://api.openpond.ai";async function Ye(t){let e=await X(t.sandboxApiUrl,t.apiKey,t.path,{timeoutMs:0,maxResponseBytes:0});if(!e.body)return;let n=e.body.getReader(),r=new TextDecoder,a="";try{for(;;){let{done:s,value:i}=await n.read();if(s)break;a+=r.decode(i,{stream:!0});let u=a.indexOf(`
|
|
8
|
-
|
|
9
|
-
`);for(;u!==-1;){let c=a.slice(0,u);a=a.slice(u+2);let p=bn(c);p&&process.stdout.write(p),u=a.indexOf(`
|
|
10
|
-
|
|
11
|
-
`)}}}finally{n.releaseLock()}}d(Ye,"streamSandboxEventOutput");function gn(t){return typeof t=="string"?{dataBase64:Buffer.from(t,"utf-8").toString("base64")}:t instanceof Uint8Array?{dataBase64:Buffer.from(t).toString("base64")}:t}d(gn,"normalizePtyInput");function bn(t){if(!t.includes("event: output"))return null;let e=t.split(/\r?\n/).filter(n=>n.startsWith("data: ")).map(n=>n.slice(6));if(e.length===0)return null;try{let n=JSON.parse(e.join(`
|
|
12
|
-
`));return typeof n.output=="string"?n.output:null}catch{return null}}d(bn,"parseProcessOutputEvent");function O(t){let e=t.trim().replace(/\/$/,"");if(!e)throw new Error("sandbox API URL must be non-empty");let n=new URL(e),r=n.pathname.replace(/\/$/,"");return r.endsWith("/v1/sandboxes")||r.endsWith("/api/sandboxes")?`${n.origin}${r}`:r.endsWith("/v1")?`${n.origin}${r}/sandboxes`:Sn(n.hostname)?`${n.origin}${r}/v1/sandboxes`:n.origin===yn?`${Qe}/v1/sandboxes`:`${n.origin}${r}/api/sandboxes`}d(O,"normalizeSandboxApiUrl");function In(t){let e="/sandboxes";if(!t.endsWith(e))throw new Error("sandbox API URL must end with /sandboxes");return t.slice(0,-e.length)}d(In,"apiRootUrlFromSandboxApiUrl");function Sn(t){return t==="api.openpond.ai"||t==="staging-api.openpond.ai"||t.startsWith("api")&&t.endsWith(".openpond.ai")}d(Sn,"isOpenPondHostedApiHost");var wn=class{static{d(this,"OpenPondSandboxInstanceClient")}apiKey;apiRootUrl;sandboxApiUrl;customEndpoint;constructor(t){this.apiKey=t.apiKey,this.customEndpoint=t.customEndpoint??!1,this.sandboxApiUrl=O(t.sandboxApiUrl??t.baseUrl??Qe),this.apiRootUrl=In(this.sandboxApiUrl)}create(t,e={}){return this.request("",{method:"POST",...this.customEndpoint?{timeoutMs:18e4}:{},headers:M(e),body:JSON.stringify(t)}).then(n=>n.sandbox)}get(t){return this.request(`/${encodeURIComponent(t)}`).then(e=>e.sandbox)}exec(t,e){return this.request(`/${encodeURIComponent(t)}/exec`,{method:"POST",body:JSON.stringify(e)})}startProcess(t,e){return this.request(`/${encodeURIComponent(t)}/processes`,{method:"POST",body:JSON.stringify(e)})}listProcesses(t){return this.request(`/${encodeURIComponent(t)}/processes`)}getProcess(t,e,n={}){let r=new URLSearchParams;return n.since!==void 0&&r.set("since",String(Math.max(0,n.since))),this.request(`/${encodeURIComponent(t)}/processes/${encodeURIComponent(e)}${r.size>0?`?${r.toString()}`:""}`)}stopProcess(t,e){return this.request(`/${encodeURIComponent(t)}/processes/${encodeURIComponent(e)}`,{method:"DELETE"})}async streamProcessOutput(t,e,n={}){let r=new URLSearchParams;n.since!==void 0&&r.set("since",String(Math.max(0,n.since))),await Ye({sandboxApiUrl:this.sandboxApiUrl,apiKey:this.apiKey,path:`/${encodeURIComponent(t)}/processes/${encodeURIComponent(e)}/stream${r.size>0?`?${r.toString()}`:""}`})}startPty(t,e={}){return this.request(`/${encodeURIComponent(t)}/pty`,{method:"POST",body:JSON.stringify(e)})}listPtys(t){return this.request(`/${encodeURIComponent(t)}/pty`)}getPty(t,e,n={}){let r=new URLSearchParams;return n.since!==void 0&&r.set("since",String(Math.max(0,n.since))),this.request(`/${encodeURIComponent(t)}/pty/${encodeURIComponent(e)}${r.size>0?`?${r.toString()}`:""}`)}writePtyInput(t,e,n){return this.request(`/${encodeURIComponent(t)}/pty/${encodeURIComponent(e)}/input`,{method:"POST",body:JSON.stringify(gn(n))})}stopPty(t,e){return this.request(`/${encodeURIComponent(t)}/pty/${encodeURIComponent(e)}`,{method:"DELETE"})}async streamPtyOutput(t,e,n={}){let r=new URLSearchParams;n.since!==void 0&&r.set("since",String(Math.max(0,n.since))),await Ye({sandboxApiUrl:this.sandboxApiUrl,apiKey:this.apiKey,path:`/${encodeURIComponent(t)}/pty/${encodeURIComponent(e)}/stream${r.size>0?`?${r.toString()}`:""}`})}uploadFile(t,e,n){return this.uploadFileBase64(t,e,Buffer.from(n,"utf-8").toString("base64"))}uploadFileBase64(t,e,n){return this.request(`/${encodeURIComponent(t)}/files`,{method:"POST",body:JSON.stringify({path:e,contentsBase64:n})})}async downloadFile(t,e){let n=await this.downloadFileResponse(t,e);return Buffer.from(n.file.contentsBase64,"base64").toString("utf-8")}downloadFileResponse(t,e){let n=typeof e=="string"?{path:e}:e,r=new URLSearchParams({path:n.path});return n.offsetBytes!==void 0&&r.set("offsetBytes",String(n.offsetBytes)),n.maxBytes!==void 0&&r.set("maxBytes",String(n.maxBytes)),this.request(`/${encodeURIComponent(t)}/files?${r.toString()}`)}listFiles(t,e={}){let n=new URLSearchParams({list:"1"});return e.path&&n.set("path",e.path),e.recursive!==void 0&&n.set("recursive",String(e.recursive)),e.maxEntries!==void 0&&n.set("maxEntries",String(e.maxEntries)),this.request(`/${encodeURIComponent(t)}/files?${n.toString()}`)}deleteFile(t,e,n={}){let r=new URLSearchParams({path:e});return n.recursive!==void 0&&r.set("recursive",String(n.recursive)),this.request(`/${encodeURIComponent(t)}/files?${r.toString()}`,{method:"DELETE"})}statFile(t,e){let n=new URLSearchParams({stat:"1",path:e});return this.request(`/${encodeURIComponent(t)}/files?${n.toString()}`)}mkdir(t,e){let n=typeof e=="string"?{path:e}:e,r=new URLSearchParams({path:n.path});return n.recursive!==void 0&&r.set("recursive",String(n.recursive)),this.request(`/${encodeURIComponent(t)}/files?${r.toString()}`,{method:"PUT"})}moveFile(t,e){let n=new URLSearchParams({fromPath:e.fromPath,toPath:e.toPath});return e.overwrite!==void 0&&n.set("overwrite",String(e.overwrite)),this.request(`/${encodeURIComponent(t)}/files?${n.toString()}`,{method:"PATCH"})}searchFiles(t,e){let n=new URLSearchParams({search:"1",query:e.query});return e.path&&n.set("path",e.path),e.maxResults!==void 0&&n.set("maxResults",String(e.maxResults)),this.request(`/${encodeURIComponent(t)}/files?${n.toString()}`)}openPort(t,e){return this.request(`/${encodeURIComponent(t)}/ports`,{method:"POST",body:JSON.stringify(e)})}createSnapshot(t,e){return this.request(`/${encodeURIComponent(t)}/snapshots`,{method:"POST",body:JSON.stringify(e)})}updateSnapshot(t,e,n){return this.request(`/${encodeURIComponent(t)}/snapshots/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(n)})}validateSnapshot(t,e,n={}){return this.request(`/${encodeURIComponent(t)}/snapshots/${encodeURIComponent(e)}/validate`,{method:"POST",body:JSON.stringify(n)})}publishSnapshot(t,e){return this.request(`/${encodeURIComponent(t)}/snapshots/${encodeURIComponent(e)}/publish`,{method:"POST"})}fork(t,e={}){return this.request(`/${encodeURIComponent(t)}/fork`,{method:"POST",body:JSON.stringify(e)})}stop(t,e={}){let n=new URLSearchParams;return e.failOnUnpreservedChanges&&n.set("failOnUnpreservedChanges","true"),this.request(`/${encodeURIComponent(t)}/stop${n.size>0?`?${n.toString()}`:""}`,{method:"POST",headers:M(e)})}start(t,e={}){return this.request(`/${encodeURIComponent(t)}/start`,{method:"POST",headers:M(e)})}restore(t){return this.request(`/${encodeURIComponent(t)}/restore`,{method:"POST"})}delete(t,e={}){let n=new URLSearchParams;return e.failOnUnpreservedChanges&&n.set("failOnUnpreservedChanges","true"),this.request(`/${encodeURIComponent(t)}${n.size>0?`?${n.toString()}`:""}`,{method:"DELETE",headers:M(e)}).then(r=>r.sandbox)}receipts(t){return this.request(`/${encodeURIComponent(t)}/receipts`).then(e=>e.receipts)}logs(t){return this.request(`/${encodeURIComponent(t)}/logs`).then(e=>e.logs)}gitStatus(t){return this.request(`/${encodeURIComponent(t)}/git/status`)}gitDiff(t,e={}){return this.request(`/${encodeURIComponent(t)}/git/diff`,{method:"POST",body:JSON.stringify(e)})}gitExportPatch(t,e={}){return this.request(`/${encodeURIComponent(t)}/git/export-patch`,{method:"POST",body:JSON.stringify(e)})}gitBranch(t,e){return this.request(`/${encodeURIComponent(t)}/git/branch`,{method:"POST",body:JSON.stringify(e)})}gitCommit(t,e){return this.request(`/${encodeURIComponent(t)}/git/commit`,{method:"POST",body:JSON.stringify(e)})}gitPull(t,e={}){return this.request(`/${encodeURIComponent(t)}/git/pull`,{method:"POST",body:JSON.stringify(e)})}gitPush(t,e={}){return this.request(`/${encodeURIComponent(t)}/git/push`,{method:"POST",body:JSON.stringify(e)})}billing(t){return this.request(`/${encodeURIComponent(t)}/billing`)}pricing(){return this.request("/pricing")}costs(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.agentId&&e.set("agentId",t.agentId),this.request(`/costs${e.size>0?`?${e.toString()}`:""}`)}integrationLeases(t){return this.request(`/${encodeURIComponent(t)}/integrations`)}attachIntegrationConnection(t,e){return this.request(`/${encodeURIComponent(t)}/integrations`,{method:"POST",body:JSON.stringify(e)})}removeIntegrationLease(t,e){return this.request(`/${encodeURIComponent(t)}/integrations`,{method:"DELETE",body:JSON.stringify({leaseId:e})})}async request(t,e={}){let n=await X(this.sandboxApiUrl,this.apiKey,t,this.customEndpoint?{...e,explicitBearerAuth:!0,redirect:"error"}:e);return me(n,"Sandbox request")}async requestApiRoot(t,e={}){let n=await X(this.apiRootUrl,this.apiKey,t,this.customEndpoint?{...e,explicitBearerAuth:!0,redirect:"error"}:e);return me(n,"OpenPond API request")}},xn=class extends wn{static{d(this,"OpenPondSandboxClient")}runtimes=on(this);sandboxes=an(this);profile=dn(this);projects=sn(this);agents=cn(this);list(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.agentId&&e.set("agentId",t.agentId),this.request(e.size>0?`?${e.toString()}`:"").then(n=>n.sandboxes)}listSecrets(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),this.requestApiRoot(`/sandbox-secrets${e.size>0?`?${e.toString()}`:""}`).then(n=>n.secrets)}getSecret(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(t)}${n.size>0?`?${n.toString()}`:""}`).then(r=>r.secret)}createSecret(t){return this.requestApiRoot("/sandbox-secrets",{method:"POST",body:JSON.stringify(t)}).then(e=>e.secret)}rotateSecret(t,e){let n=new URLSearchParams;e.teamId&&n.set("teamId",e.teamId);let{teamId:r,...a}=e;return this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(t)}/rotate${n.size>0?`?${n.toString()}`:""}`,{method:"POST",body:JSON.stringify(a)}).then(s=>s.secret)}attachSecret(t,e){let n=new URLSearchParams;e.teamId&&n.set("teamId",e.teamId);let{teamId:r,...a}=e;return this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(t)}/attach${n.size>0?`?${n.toString()}`:""}`,{method:"POST",body:JSON.stringify(a)}).then(s=>s.secret)}revokeSecret(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(t)}/revoke${n.size>0?`?${n.toString()}`:""}`,{method:"POST"}).then(r=>r.secret)}deleteSecret(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(t)}${n.size>0?`?${n.toString()}`:""}`,{method:"DELETE"}).then(r=>r.secret)}snapshotCatalog(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.agentId&&e.set("agentId",t.agentId),t.q&&e.set("q",t.q),t.kind&&e.set("kind",t.kind),t.replayState&&e.set("replayState",t.replayState),t.visibility&&e.set("visibility",t.visibility),t.tag&&e.set("tag",t.tag),t.useCase&&e.set("useCase",t.useCase),t.limit&&e.set("limit",String(t.limit)),this.request(`/catalog/snapshots${e.size>0?`?${e.toString()}`:""}`)}listSandboxRuntimes(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.agentId&&e.set("agentId",t.agentId),this.requestApiRoot(`/runtimes${e.size>0?`?${e.toString()}`:""}`).then(n=>n.runtimes)}listProjects(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/projects?${e.toString()}`).then(n=>n.projects)}upsertProject(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/projects?${e.toString()}`,{method:"POST",body:JSON.stringify(t)}).then(n=>n.project)}getHostedProfile(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/profile?${e.toString()}`).then(n=>n.profile)}ensureHostedProfile(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/profile/ensure?${e.toString()}`,{method:"POST"}).then(n=>{if(!n.profile)throw new Error("hosted_profile_missing");return n.profile})}pushHostedProfile(t){let e=new URLSearchParams({teamId:t.teamId}),{teamId:n,...r}=t;return this.requestApiRoot(`/profile/push?${e.toString()}`,{method:"POST",body:JSON.stringify(r)})}async upsertProjectGitRemote(t){let e=await this.upsertProject(t);return this.ensureProjectGitRemote(e.id,{teamId:t.teamId})}getProject(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(t)}?${n.toString()}`).then(r=>r.project)}syncProject(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(t)}/sync?${n.toString()}`,{method:"POST"}).then(r=>r.project)}ensureProjectGitRemote(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(t)}/git?${n.toString()}`,{method:"POST"})}uploadProjectSource(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/projects/${encodeURIComponent(t)}/source?${n.toString()}`,{method:"POST",body:JSON.stringify(a)}).then(s=>s.project)}updateProject(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/projects/${encodeURIComponent(t)}?${n.toString()}`,{method:"PATCH",body:JSON.stringify(a)}).then(s=>s.project)}archiveProject(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(t)}?${n.toString()}`,{method:"DELETE"}).then(r=>r.project)}listAgents(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/agents?${e.toString()}`).then(n=>n.agents)}upsertAgent(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/agents?${e.toString()}`,{method:"POST",body:JSON.stringify(t)}).then(n=>n.agent)}getAgent(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/agents/${encodeURIComponent(t)}?${n.toString()}`).then(r=>r.agent)}archiveAgent(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/agents/${encodeURIComponent(t)}?${n.toString()}`,{method:"DELETE"}).then(r=>r.agent)}updateAgent(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/agents/${encodeURIComponent(t)}?${n.toString()}`,{method:"PATCH",body:JSON.stringify(a)}).then(s=>s.agent)}runAgent(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/agents/${encodeURIComponent(t)}/run?${n.toString()}`,{method:"POST",headers:{Prefer:"respond-async"},body:JSON.stringify(a)})}getAgentSourceDeployPlan(t,e){let n=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/agents/${encodeURIComponent(t)}/source/deploy-plan?${n.toString()}`).then(r=>r.deployPlan)}listAgentManifestSnapshots(t,e){let n=new URLSearchParams({teamId:e.teamId});return e.limit!==void 0&&n.set("limit",String(e.limit)),this.requestApiRoot(`/agents/${encodeURIComponent(t)}/source/manifest-snapshots?${n.toString()}`).then(r=>r.manifestSnapshots)}requestAgentSourceChecks(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/agents/${encodeURIComponent(t)}/source/checks?${n.toString()}`,{method:"POST",body:JSON.stringify(a),timeoutMs:900*1e3})}configureAgentSourceSetup(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/agents/${encodeURIComponent(t)}/source/setup?${n.toString()}`,{method:"POST",body:JSON.stringify(a)})}publishAgentSource(t,e){let n=new URLSearchParams({teamId:e.teamId}),{teamId:r,...a}=e;return this.requestApiRoot(`/agents/${encodeURIComponent(t)}/source/publish?${n.toString()}`,{method:"POST",body:JSON.stringify(a)})}getMicrosoftTeamsBotOverview(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/teams/bot/overview?${e.toString()}`)}bindMicrosoftTeamsBotConversation(t){return this.requestApiRoot("/teams/bot/bindings",{method:"POST",body:JSON.stringify(t)})}rebindMicrosoftTeamsBotConversation(t,e){return this.requestApiRoot(`/teams/bot/bindings/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(e)})}unlinkMicrosoftTeamsBotConversation(t){return this.requestApiRoot(`/teams/bot/bindings/${encodeURIComponent(t.bindingId)}`,{method:"DELETE",body:JSON.stringify({teamId:t.teamId})})}sendMicrosoftTeamsBotDiagnostic(t){return this.requestApiRoot("/teams/bot/diagnostics",{method:"POST",body:JSON.stringify(t)})}sendMicrosoftTeamsBotDiagnosticRun(t){return this.requestApiRoot("/teams/bot/diagnostics/run",{method:"POST",body:JSON.stringify(t)})}createSandboxRuntime(t){return this.requestApiRoot("/runtimes",{method:"POST",body:JSON.stringify(t)}).then(e=>e.runtime)}sandboxRuntime(t,e=null){return un(this,t,e)}getSandboxRuntime(t){return this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}`).then(e=>e.runtime)}createSandboxRuntimeSandbox(t,e={},n={}){return this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/sandbox`,{method:"POST",headers:M(n),body:JSON.stringify(e)})}updateSandboxRuntimeStatus(t,e){return this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/status`,{method:"PATCH",body:JSON.stringify(e)}).then(n=>n.runtime)}listSandboxRuntimeEvents(t){return this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/events`)}emitSandboxRuntimeEvent(t,e){return this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/events`,{method:"POST",body:JSON.stringify(e)})}checkpointSandboxRuntime(t,e){return this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/checkpoints`,{method:"POST",body:JSON.stringify(e)}).then(n=>n.runtime)}promoteSandboxRuntime(t,e,n={}){let r=new URLSearchParams;return n.teamId&&r.set("teamId",n.teamId),this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/promote${r.size>0?`?${r.toString()}`:""}`,{method:"POST",body:JSON.stringify(e)})}preserveSandboxRuntimeSource(t,e={},n={}){let r=new URLSearchParams;return n.teamId&&r.set("teamId",n.teamId),this.requestApiRoot(`/runtimes/${encodeURIComponent(t)}/preserve-source${r.size>0?`?${r.toString()}`:""}`,{method:"POST",body:JSON.stringify(e)})}forkSnapshot(t,e={},n={}){let r=new URLSearchParams;e.teamId&&r.set("teamId",e.teamId),e.projectId&&r.set("projectId",e.projectId),n.async&&r.set("async","1");let{teamId:a,projectId:s,...i}=e;return this.request(`/catalog/snapshots/${encodeURIComponent(t)}/fork${r.size>0?`?${r.toString()}`:""}`,{method:"POST",headers:n.async?{Prefer:"respond-async"}:void 0,body:JSON.stringify({...i,snapshotId:t})})}templates(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.q&&e.set("q",t.q),t.name&&e.set("name",t.name),t.version&&e.set("version",t.version),t.visibility&&e.set("visibility",t.visibility),t.tag&&e.set("tag",t.tag),t.useCase&&e.set("useCase",t.useCase),t.limit&&e.set("limit",String(t.limit)),this.request(`/templates${e.size>0?`?${e.toString()}`:""}`)}publishedSnapshots(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.q&&e.set("q",t.q),t.name&&e.set("name",t.name),t.version&&e.set("version",t.version),t.visibility&&e.set("visibility",t.visibility),t.tag&&e.set("tag",t.tag),t.useCase&&e.set("useCase",t.useCase),t.limit&&e.set("limit",String(t.limit)),this.request(`/published-snapshots${e.size>0?`?${e.toString()}`:""}`).then(n=>{let r=n.publishedSnapshots??n.templates;return{...n,templates:r,publishedSnapshots:r}})}launchTemplate(t){let e=new URLSearchParams;t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId);let{teamId:n,projectId:r,...a}=t;return this.request(`/templates/launch${e.size>0?`?${e.toString()}`:""}`,{method:"POST",body:JSON.stringify(a)})}runPublishedSnapshot(t){let e=new URLSearchParams;t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId);let{teamId:n,projectId:r,...a}=t;return this.request(`/published-snapshots/launch${e.size>0?`?${e.toString()}`:""}`,{method:"POST",body:JSON.stringify(a)}).then(s=>{let i=s.publishedSnapshot??s.template;return{...s,template:i,publishedSnapshot:i}})}listSchedules(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.sourceSandboxId&&e.set("sourceSandboxId",t.sourceSandboxId),this.request(`/schedules${e.size>0?`?${e.toString()}`:""}`)}createSchedule(t){let e=new URLSearchParams;t.projectId&&e.set("projectId",t.projectId);let{projectId:n,...r}=t;return this.request(`/schedules${e.size>0?`?${e.toString()}`:""}`,{method:"POST",body:JSON.stringify(r)})}getSchedule(t){return this.request(`/schedules/${encodeURIComponent(t)}`)}updateSchedule(t,e){return this.request(`/schedules/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(e)})}deleteSchedule(t){return this.request(`/schedules/${encodeURIComponent(t)}`,{method:"DELETE"})}listScheduleRuns(t,e={}){let n=new URLSearchParams;return e.limit!==void 0&&n.set("limit",String(e.limit)),this.request(`/schedules/${encodeURIComponent(t)}/runs${n.size>0?`?${n.toString()}`:""}`)}runScheduleNow(t,e={}){return this.request(`/schedules/${encodeURIComponent(t)}/run`,{method:"POST",body:JSON.stringify(e)})}listTemplateBuilds(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/sandbox-template-builds?${e.toString()}`).then(n=>n.builds)}createTemplateBuild(t){return this.requestApiRoot("/sandbox-template-builds",{method:"POST",body:JSON.stringify(t)}).then(e=>e.build)}getTemplateBuild(t){return this.requestApiRoot(`/sandbox-template-builds/${encodeURIComponent(t)}`).then(e=>e.build)}getTemplateBuildLogs(t){return this.requestApiRoot(`/sandbox-template-builds/${encodeURIComponent(t)}/logs`)}cancelTemplateBuild(t){return this.requestApiRoot(`/sandbox-template-builds/${encodeURIComponent(t)}/cancel`,{method:"POST"}).then(e=>e.build)}listPublishedSnapshotBuilds(t){let e=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/published-snapshot-builds?${e.toString()}`).then(n=>n.builds)}createPublishedSnapshotBuild(t){return this.requestApiRoot("/published-snapshot-builds",{method:"POST",body:JSON.stringify(t)}).then(e=>e.build)}getPublishedSnapshotBuild(t){return this.requestApiRoot(`/published-snapshot-builds/${encodeURIComponent(t)}`).then(e=>e.build)}getPublishedSnapshotBuildLogs(t){return this.requestApiRoot(`/published-snapshot-builds/${encodeURIComponent(t)}/logs`)}cancelPublishedSnapshotBuild(t){return this.requestApiRoot(`/published-snapshot-builds/${encodeURIComponent(t)}/cancel`,{method:"POST"}).then(e=>e.build)}listOrganizations(){return this.requestApiRoot("/organizations").then(t=>t.organizations??t.teams??[])}createOrganization(t){return this.requestApiRoot("/organizations",{method:"POST",body:JSON.stringify(t)}).then(e=>e.organization)}getOrganization(t){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}`).then(e=>e.organization)}updateOrganization(t,e){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(e)}).then(n=>n.organization)}listOrganizationMembers(t){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/members`).then(e=>e.members)}upsertOrganizationMember(t,e){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/members`,{method:"POST",body:JSON.stringify(e)}).then(n=>n.member)}getOrganizationMcpServer(t){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/mcp-server`).then(e=>e.mcpServer)}generateOrganizationMcpServer(t,e={}){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/mcp-server`,{method:"POST",body:JSON.stringify(e)}).then(n=>n.mcpServer)}rotateOrganizationMcpServer(t){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/mcp-server/rotate`,{method:"POST"}).then(e=>e.mcpServer)}disableOrganizationMcpServer(t){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/mcp-server/disable`,{method:"POST"}).then(e=>e.mcpServer)}enableOrganizationMcpServer(t){return this.requestApiRoot(`/organizations/${encodeURIComponent(t)}/mcp-server/enable`,{method:"POST"}).then(e=>e.mcpServer)}startReplay(t){let e=new URLSearchParams;t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId);let{teamId:n,projectId:r,...a}=t;return this.requestApiRoot(`/sandbox-replays${e.size>0?`?${e.toString()}`:""}`,{method:"POST",body:JSON.stringify(a)})}listReplays(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),this.requestApiRoot(`/sandbox-replays${e.size>0?`?${e.toString()}`:""}`)}getReplay(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),e.projectId&&n.set("projectId",e.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(t)}${n.size>0?`?${n.toString()}`:""}`)}getReplayLogs(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),e.projectId&&n.set("projectId",e.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(t)}/logs${n.size>0?`?${n.toString()}`:""}`)}getReplayArtifacts(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),e.projectId&&n.set("projectId",e.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(t)}/artifacts${n.size>0?`?${n.toString()}`:""}`)}cancelReplay(t,e={}){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),e.projectId&&n.set("projectId",e.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(t)}/cancel${n.size>0?`?${n.toString()}`:""}`,{method:"POST"})}integrationConnections(t={}){let e=new URLSearchParams;return t.teamId&&e.set("teamId",t.teamId),t.projectId&&e.set("projectId",t.projectId),t.agentId&&e.set("agentId",t.agentId),t.status&&e.set("status",t.status),this.requestApiRoot(`/integrations/connections${e.size>0?`?${e.toString()}`:""}`)}mcpServerConfig(){return{name:"openpond-sandboxes",transport:"streamable-http",url:`${this.sandboxApiUrl}/mcp`,headers:{"openpond-api-key":this.apiKey}}}smoke(t={}){return mn(this,t)}};function Y(t){return new xn(t)}d(Y,"createOpenPondSandboxClient");var Tr=o.object({choices:o.array(o.object({message:o.object({content:o.string().nullable().optional(),tool_calls:o.array(o.object({id:o.string().min(1),type:o.literal("function"),function:o.object({name:o.string().min(1),arguments:o.string()})})).optional()})})).min(1)});var zr=100*1024*1024;var Lr=Object.freeze({".avif":"image/avif",".csv":"text/csv",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".gif":"image/gif",".html":"text/html",".jpeg":"image/jpeg",".jpg":"image/jpeg",".json":"application/json",".m4a":"audio/mp4",".md":"text/markdown",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".pdf":"application/pdf",".png":"image/png",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".svg":"image/svg+xml",".tsv":"text/tab-separated-values",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".webp":"image/webp",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});function $(t){let e=t?.trim();return e?e.replace(/\/$/,""):null}d($,"normalizeOptionalUrl");function m(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}d(m,"asRecord");var et=["workspacePurpose","purpose"];function tt(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e={...t};for(let n of et)delete e[n];return e}d(tt,"sanitizeCreateMetadata");function vn(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e={...t};for(let r of et)delete e[r];let n=tt(e.metadata);return n?e.metadata=n:delete e.metadata,e}d(vn,"sanitizeSandboxRuntimeInput");function Z(t){let e=m(t);if(e.sandboxRuntime)throw new Error("Sandbox runtime settings must use /v1/runtimes before materializing a sandbox.");let n={};typeof e.repo=="string"&&e.repo.trim()&&(n.repo=e.repo.trim()),typeof e.teamId=="string"&&e.teamId.trim()&&(n.teamId=e.teamId.trim()),typeof e.projectId=="string"&&e.projectId.trim()&&(n.projectId=e.projectId.trim()),typeof e.agentId=="string"&&e.agentId.trim()&&(n.agentId=e.agentId.trim()),typeof e.command=="string"&&e.command.trim()&&(n.command=e.command.trim()),typeof e.runtimeProfileId=="string"&&e.runtimeProfileId.trim()&&(n.runtimeProfileId=e.runtimeProfileId.trim()),e.workloadSource&&typeof e.workloadSource=="object"&&!Array.isArray(e.workloadSource)&&(n.workloadSource=e.workloadSource),e.sourceArchive&&typeof e.sourceArchive=="object"&&!Array.isArray(e.sourceArchive)&&(n.sourceArchive=e.sourceArchive),(e.visibility==="private"||e.visibility==="team")&&(n.visibility=e.visibility),e.resources&&typeof e.resources=="object"&&!Array.isArray(e.resources)&&(n.resources=e.resources),e.budget&&typeof e.budget=="object"&&!Array.isArray(e.budget)&&(n.budget=e.budget),"env"in e&&(n.env=xe(e.env)),e.networkPolicy&&typeof e.networkPolicy=="object"&&!Array.isArray(e.networkPolicy)&&(n.networkPolicy=e.networkPolicy),e.quotas&&typeof e.quotas=="object"&&!Array.isArray(e.quotas)&&(n.quotas=e.quotas),Array.isArray(e.volumes)&&(n.volumes=e.volumes),"integrationLeases"in e&&(n.integrationLeases=ot(e.integrationLeases)),Array.isArray(e.integrationConnectionLeases)&&(n.integrationConnectionLeases=e.integrationConnectionLeases);let r=tt(e.metadata);return r&&(n.metadata=r),n}d(Z,"normalizeCreateInput");function ge(t){let e=m(t),n=vn(e)??{},r={};return typeof n.teamId=="string"&&n.teamId.trim()&&(r.teamId=n.teamId.trim()),typeof n.projectId=="string"&&n.projectId.trim()&&(r.projectId=n.projectId.trim()),typeof n.agentId=="string"&&n.agentId.trim()&&(r.agentId=n.agentId.trim()),typeof n.workflowMode=="string"&&n.workflowMode.trim()?r.workflowMode=n.workflowMode.trim():typeof n.mode=="string"&&n.mode.trim()&&(r.workflowMode=n.mode.trim()),typeof n.baseBranch=="string"&&n.baseBranch.trim()&&(r.baseBranch=n.baseBranch.trim()),typeof n.baseSha=="string"&&n.baseSha.trim()&&(r.baseSha=n.baseSha.trim()),typeof n.sandboxId=="string"&&n.sandboxId.trim()&&(r.sandboxId=n.sandboxId.trim()),typeof n.rootfsSnapshotId=="string"&&n.rootfsSnapshotId.trim()&&(r.rootfsSnapshotId=n.rootfsSnapshotId.trim()),typeof n.dependencySnapshotId=="string"&&n.dependencySnapshotId.trim()&&(r.dependencySnapshotId=n.dependencySnapshotId.trim()),typeof n.runtimeProfileId=="string"&&n.runtimeProfileId.trim()&&(r.runtimeProfileId=n.runtimeProfileId.trim()),typeof n.promotionPolicy=="string"&&n.promotionPolicy.trim()&&(r.promotionPolicy=n.promotionPolicy.trim()),n.metadata&&typeof n.metadata=="object"&&!Array.isArray(n.metadata)&&(r.metadata=n.metadata),r}d(ge,"normalizeSandboxRuntimeCreateInput");function Q(t){return Z(t)}d(Q,"normalizeSandboxRuntimeSandboxCreateInput");function nt(t){return m(t)}d(nt,"normalizeSnapshotCreateInput");function y(t){let e=m(t),n=typeof e.teamId=="string"?e.teamId.trim():"",r=typeof e.projectId=="string"?e.projectId.trim():"",a=typeof e.agentId=="string"?e.agentId.trim():"";return{...n?{teamId:n}:{},...r?{projectId:r}:{},...a?{agentId:a}:{}}}d(y,"normalizeSandboxListInput");function rt(t){let e=m(t),n=typeof e.teamId=="string"?e.teamId.trim():"",r=typeof e.projectId=="string"?e.projectId.trim():"",{teamId:a,projectId:s,appId:i,...u}=e,c=u;return n&&(c.teamId=n),r&&(c.projectId=r),c}d(rt,"normalizeReplayStartInput");function be(t){if(t==="active"||t==="revoked"||t==="error"||t==="all")return t}d(be,"normalizeIntegrationStatusFilter");function Ie(t){let e=m(t),n=typeof e.connectionId=="string"?e.connectionId.trim():"";if(!n)throw new Error("Sandbox integration connection is required.");let r=st(e.capabilities);if(r.length===0)throw new Error("Sandbox integration capabilities are required.");at(e.provider,r);let a=it(e.scopes,"Sandbox integration scopes"),s=dt(e.expiresAt),i=En(e.ttlSeconds),u=ct(e.resourcePolicy);return{connectionId:n,capabilities:r,...a.length>0?{scopes:a}:{},...u?{resourcePolicy:u}:{},...s?{expiresAt:s}:{},...i!==void 0?{ttlSeconds:i}:{},...typeof e.required=="boolean"?{required:e.required}:{}}}d(Ie,"normalizeIntegrationAttachInput");function ot(t){if(t==null)return[];if(!Array.isArray(t))throw new Error("Sandbox integration leases must be an array.");return t.map(e=>Rn(e))}d(ot,"normalizeIntegrationLeaseRefsForRuntime");function Rn(t){let e=m(t),n=typeof e.leaseId=="string"?e.leaseId.trim():"";if(!n)throw new Error("Sandbox integration leaseId is required.");if("connectionId"in e)throw new Error("Sandbox integration leases must use leaseId/proxy refs, not connection ids.");Pn(e);let r=Cn(e.provider),a=st(e.capabilities);if(a.length===0)throw new Error("Sandbox integration lease capabilities are required.");at(r,a);let s=it(e.scopes,"Sandbox integration lease scopes"),i=ct(e.resourcePolicy),u=dt(e.expiresAt),c=typeof e.proxyUrl=="string"?e.proxyUrl.trim():"";return{leaseId:n,provider:r,capabilities:a,...s.length>0?{scopes:s}:{},...i?{resourcePolicy:i}:{},...u?{expiresAt:u}:{},...c?{proxyUrl:c}:{},...typeof e.required=="boolean"?{required:e.required}:{}}}d(Rn,"normalizeIntegrationLeaseRefForRuntime");function Cn(t){if(typeof t!="string")throw new Error("Sandbox integration lease provider is required.");let e=se(t);if(!e)throw new Error(`Sandbox integration provider is not supported: ${t}`);if(!ae(e)?.leasePolicy.leaseable)throw new Error(`Sandbox integration provider is not leaseable: ${e}`);return e}d(Cn,"normalizeLeaseableIntegrationProvider");function Pn(t){for(let e of Object.keys(t))if(ut(e))throw new Error("Sandbox integration leases must not include secrets or credentials.")}d(Pn,"assertNoSensitiveIntegrationLeaseKeys");function at(t,e){if(t==null||t==="")return;if(typeof t!="string")throw new Error("Sandbox integration provider must be a string.");let n=se(t);if(!n)throw new Error(`Sandbox integration provider is not supported: ${t}`);let r=ae(n);if(!r?.leasePolicy.leaseable)throw new Error(`Sandbox integration provider is not leaseable: ${n}`);let a=new Set(r.leasePolicy.allowedCapabilityIds),s=e.filter(i=>!a.has(i));if(s.length>0)throw new Error(`Sandbox integration capabilities are not allowed for ${n}: ${s.join(", ")}`)}d(at,"validateIntegrationCapabilitiesForProvider");function Se(t){let e=m(t),n=typeof e.leaseId=="string"?e.leaseId.trim():"";if(!n)throw new Error("Sandbox integration lease is required.");return n}d(Se,"normalizeIntegrationLeaseId");function st(t){return Array.isArray(t)?t.map(e=>typeof e=="string"?e.trim():"").filter(Boolean):[]}d(st,"normalizeStringArray");function it(t,e){if(t==null)return[];if(!Array.isArray(t))throw new Error(`${e} must be an array of strings.`);return t.map(n=>{if(typeof n!="string")throw new Error(`${e} must contain only strings.`);let r=n.trim();if(!r)throw new Error(`${e} must not contain empty values.`);return r})}d(it,"normalizeOptionalStringArray");function En(t){if(t==null||t==="")return;let e=Number(t);if(!Number.isFinite(e)||e<=0)throw new Error("Sandbox integration ttlSeconds must be a positive number.");return Math.max(1,Math.floor(e))}d(En,"normalizeIntegrationTtlSeconds");function dt(t){if(t==null||t==="")return;if(typeof t!="string")throw new Error("Sandbox integration expiresAt must be an ISO timestamp string.");let e=t.trim();if(!e)return;let n=Date.parse(e);if(!Number.isFinite(n))throw new Error("Sandbox integration expiresAt must be a valid ISO timestamp.");return e}d(dt,"normalizeIntegrationExpiresAt");function ct(t){if(t==null)return;if(typeof t!="object"||Array.isArray(t))throw new Error("Sandbox integration resourcePolicy must be an object.");if(ye(t,[]),JSON.stringify(t).length>16*1024)throw new Error("Sandbox integration resourcePolicy is too large.");return t}d(ct,"normalizeIntegrationResourcePolicy");function ye(t,e){if(!(!t||typeof t!="object")){if(e.length>8)throw new Error("Sandbox integration resourcePolicy is too deeply nested.");if(Array.isArray(t)){for(let n of t)ye(n,e);return}for(let[n,r]of Object.entries(t)){if(ut(n))throw new Error("Sandbox integration resourcePolicy must not include secrets or credentials.");ye(r,[...e,n])}}}d(ye,"assertNoSensitiveResourcePolicyKeys");function ut(t){let e=t.toLowerCase().replace(/[^a-z0-9]/g,"");return e.includes("accesstoken")||e.includes("refreshtoken")||e.includes("idtoken")||e.includes("oauth")||e.includes("bearer")||e.includes("authorization")||e.includes("cookie")||e.includes("secret")||e.includes("password")||e.includes("credential")}d(ut,"isSensitivePolicyKey");function pt(t){let e=m(t),n=typeof e.command=="string"?e.command.trim():"";if(!n)throw new Error("Sandbox command is required.");let r=typeof e.timeoutSeconds=="number"&&Number.isFinite(e.timeoutSeconds)?Math.max(1,Math.floor(e.timeoutSeconds)):void 0,a=Ne(n);return r?{command:a,timeoutSeconds:r}:{command:a}}d(pt,"normalizeExecInput");function mt(t){let e=m(t),n=typeof e.command=="string"?e.command.trim():"";if(!n)throw new Error("Sandbox process command is required.");let r=typeof e.timeoutSeconds=="number"&&Number.isFinite(e.timeoutSeconds)?Math.max(1,Math.floor(e.timeoutSeconds)):void 0;return r?{command:n,timeoutSeconds:r}:{command:n}}d(mt,"normalizeProcessStartInput");function lt(t){let e=m(t),n=Number(e.since);return Number.isFinite(n)?{since:Math.max(0,Math.floor(n))}:{}}d(lt,"normalizeProcessCursorInput");function ht(t){let e=m(t),n=typeof e.port=="number"?e.port:Number(e.port);if(!Number.isInteger(n)||n<re||n>oe)throw new Error(`Sandbox preview port must be between ${re} and ${oe}.`);let r=typeof e.label=="string"&&e.label.trim()?e.label.trim():void 0,a=e.access==="public"||e.access==="private"?e.access:void 0,s=e.autoStart===!0,i=typeof e.customDomain=="string"&&e.customDomain.trim()?e.customDomain.trim():void 0,u={port:n,...r?{label:r}:{},...a?{access:a}:{},...s?{autoStart:s}:{},...i?{customDomain:i}:{}};return e.cors&&typeof e.cors=="object"&&!Array.isArray(e.cors)&&(u.cors=e.cors),e.headerPolicy&&typeof e.headerPolicy=="object"&&!Array.isArray(e.headerPolicy)&&(u.headerPolicy=e.headerPolicy),e.authPolicy&&typeof e.authPolicy=="object"&&!Array.isArray(e.authPolicy)&&(u.authPolicy=e.authPolicy),u}d(ht,"normalizeOpenPortInput");function ft(t){let e=m(t),n={};if(e.template&&typeof e.template=="object"&&!Array.isArray(e.template)){let r=m(e.template),a={};typeof r.description=="string"?a.description=r.description.trim():r.description===null&&(a.description=null),Array.isArray(r.tags)&&(a.tags=r.tags.map(s=>typeof s=="string"?s.trim():"").filter(Boolean).slice(0,20)),(r.visibility==="private"||r.visibility==="team")&&(a.visibility=r.visibility),typeof r.useCase=="string"?a.useCase=r.useCase.trim():r.useCase===null&&(a.useCase=null),Object.keys(a).length>0&&(n.template=a)}if(e.retention&&typeof e.retention=="object"&&!Array.isArray(e.retention)){let r=m(e.retention),a={};(r.class==="ephemeral"||r.class==="cached"||r.class==="pinned")&&(a.class=r.class),r.ttlSeconds===null?a.ttlSeconds=null:typeof r.ttlSeconds=="number"&&Number.isFinite(r.ttlSeconds)&&(a.ttlSeconds=Math.max(1,Math.floor(r.ttlSeconds))),Object.keys(a).length>0&&(n.retention=a)}if(!n.template&&!n.retention)throw new Error("Snapshot update requires template or retention changes.");return n}d(ft,"normalizeSnapshotUpdateInput");function yt(t){let e=m(t),n=typeof e.cleanup=="string"?e.cleanup.trim():"";return n==="delete"||n==="stop"||n==="archive"?{cleanup:n}:{}}d(yt,"normalizeSnapshotValidateInput");function we(t){let e=m(t),n={};return typeof e.snapshotId=="string"&&e.snapshotId.trim()&&(n.snapshotId=e.snapshotId.trim()),(e.visibility==="private"||e.visibility==="team")&&(n.visibility=e.visibility),e.resources&&typeof e.resources=="object"&&!Array.isArray(e.resources)&&(n.resources=e.resources),e.budget&&typeof e.budget=="object"&&!Array.isArray(e.budget)&&(n.budget=e.budget),e.networkPolicy&&typeof e.networkPolicy=="object"&&!Array.isArray(e.networkPolicy)&&(n.networkPolicy=e.networkPolicy),e.quotas&&typeof e.quotas=="object"&&!Array.isArray(e.quotas)&&(n.quotas=e.quotas),Array.isArray(e.volumes)&&(n.volumes=e.volumes),"integrationLeases"in e&&(n.integrationLeases=ot(e.integrationLeases)),"env"in e&&(n.env=xe(e.env)),e.metadata&&typeof e.metadata=="object"&&!Array.isArray(e.metadata)&&(n.metadata=e.metadata),n}d(we,"normalizeForkInput");function xe(t){if(t==null)return[];if(!Array.isArray(t))throw new Error("Sandbox env must be an array.");return t.map(e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Sandbox env entries must be objects.");let n=e;if("value"in n)throw new Error("Sandbox env entries must use secretRef, not inline values.");let r=typeof n.name=="string"?n.name.trim():"",a=typeof n.secretRef=="string"?n.secretRef.trim():"";if(!r||!a)throw new Error("Sandbox env entries require name and secretRef.");return{name:r,secretRef:a}})}d(xe,"normalizeSandboxEnvRefsForApp");function gt(t){let e=m(t),n=typeof e.teamId=="string"?e.teamId.trim():"",r=typeof e.projectId=="string"?e.projectId.trim():"",a=typeof e.snapshotId=="string"?e.snapshotId.trim():"",s=typeof e.templateName=="string"?e.templateName.trim():"",i=typeof e.version=="string"?e.version.trim():"",u=typeof e.useCase=="string"?e.useCase.trim():"";if(!a&&!s&&!u)throw new Error("Sandbox template launch requires snapshotId, templateName, or useCase.");return{...we(t),...n?{teamId:n}:{},...r?{projectId:r}:{},...a?{snapshotId:a}:{},...s?{templateName:s}:{},...i?{version:i}:{},...u?{useCase:u}:{}}}d(gt,"normalizeTemplateLaunchInput");function bt(t){let e=m(t),n=typeof e.path=="string"?e.path.trim():"",r=Number(e.maxEntries);return{...n?{path:n}:{},...typeof e.recursive=="boolean"?{recursive:e.recursive}:{},...Number.isFinite(r)?{maxEntries:r}:{}}}d(bt,"normalizeListFilesInput");function It(t){let e=m(t),n=typeof e.query=="string"?e.query.trim():"";if(!n)throw new Error("Sandbox file search query is required.");let r=typeof e.path=="string"?e.path.trim():"",a=Number(e.maxResults);return{query:n,...r?{path:r}:{},...Number.isFinite(a)?{maxResults:a}:{}}}d(It,"normalizeSearchFilesInput");function D(t){let e=m(t),n=typeof e.path=="string"?e.path.trim():"";if(!n)throw new Error("Sandbox file path is required.");return{path:n,recursive:typeof e.recursive=="boolean"?e.recursive:void 0}}d(D,"normalizeDeleteFileInput");function St(t){let e=D(t),n=m(t),r=Number(n.offsetBytes),a=Number(n.maxBytes);return{path:e.path,...Number.isFinite(r)?{offsetBytes:r}:{},...Number.isFinite(a)?{maxBytes:a}:{}}}d(St,"normalizeDownloadFileInput");function wt(t){let e=m(t),n=typeof e.path=="string"?e.path.trim():"",r=typeof e.contents=="string"?e.contents:"",a=typeof e.contentsBase64=="string"?e.contentsBase64.trim():"";if(!n)throw new Error("Sandbox file path is required.");if(!r&&!a)throw new Error("Sandbox file contents are required.");return{path:n,contents:r,contentsBase64:a}}d(wt,"normalizeUploadFileInput");function xt(t){let e=m(t),n=typeof e.fromPath=="string"?e.fromPath.trim():"",r=typeof e.toPath=="string"?e.toPath.trim():"";if(!n||!r)throw new Error("Sandbox file source and target paths are required.");return{fromPath:n,toPath:r,overwrite:typeof e.overwrite=="boolean"?e.overwrite:void 0}}d(xt,"normalizeMoveFileInput");function vt(t){let e=m(t),n=typeof e.branch=="string"?e.branch.trim():"",r=typeof e.startPoint=="string"?e.startPoint.trim():"";if(!n)throw new Error("Sandbox git branch name is required.");return{branch:n,create:e.create===!0,...r?{startPoint:r}:{}}}d(vt,"normalizeGitBranchInput");function Rt(t){let e=m(t),n=typeof e.message=="string"?e.message.trim():"",r=e.all===!0,a=Array.isArray(e.paths)?e.paths.filter(s=>typeof s=="string"&&s.trim()!==""):[];if(!n)throw new Error("Sandbox git commit message is required.");if(!r&&a.length===0)throw new Error("Sandbox git commit requires all=true or at least one path.");return{message:n,...r?{all:!0}:{paths:a.map(s=>s.trim())}}}d(Rt,"normalizeGitCommitInput");function Ct(t){let e=m(t),n=typeof e.remote=="string"?e.remote.trim():"",r=typeof e.branch=="string"?e.branch.trim():"",a=e.rebase===!0,s=typeof e.ffOnly=="boolean"?e.ffOnly:void 0;if(a&&s)throw new Error("Sandbox git pull cannot use rebase and ff-only together.");return{...n?{remote:n}:{},...r?{branch:r}:{},...a?{rebase:a}:{},...typeof s=="boolean"?{ffOnly:s}:{}}}d(Ct,"normalizeGitPullInput");function Pt(t){let e=m(t),n=typeof e.remote=="string"?e.remote.trim():"",r=typeof e.branch=="string"?e.branch.trim():"";return{...n?{remote:n}:{},...r?{branch:r}:{},...e.setUpstream===!0?{setUpstream:!0}:{},...e.forceWithLease===!0?{forceWithLease:!0}:{}}}d(Pt,"normalizeGitPushInput");function An(t,e){let n=t.token?.trim();if(!n||t.accountState.state!=="signed_in"||!t.accountState.activeProfile)throw new Error("A signed-in OpenPond account is required.");let r=Oe(t.apiBaseUrl),a=/\/api\/sandboxes\/?$/.test(r)?r.replace(/\/api\/sandboxes\/?$/,"/v1"):r.replace(/\/sandboxes\/?$/,"");return{audience:new URL(a).origin,async request(s){let i=n.startsWith("opk_"),u=await z(a,n,s.path,{method:s.method??"GET",signal:s.signal,explicitBearerAuth:!i,headers:{...i?{"openpond-api-key":n}:{},...s.idempotencyKey?{"idempotency-key":s.idempotencyKey}:{},...e?{"X-OpenPond-Team-Id":e}:{}},...s.body?{body:JSON.stringify(s.body)}:{},...s.timeoutMs!==void 0?{timeoutMs:s.timeoutMs}:{}}),c=await u.json().catch(()=>({}));if(!u.ok)throw new Error(typeof c.error=="string"?c.error:`OpenPond API request failed with status ${u.status}`);return c}}}d(An,"createCapturedOpenPondPublicApiClient");async function oo(){return(await te()).client}d(oo,"resolveOpenPondSandboxClient");var kn="https://api.openpond.ai";async function ao(t){let{client:e,context:n,apiKey:r,sandboxApiUrl:a}=await te(),s=Ln(n,a);if(t.type==="list")return{sandboxes:await e.list(y(t.payload)),account:s};if(t.type==="snapshot_catalog"){let i=m(t.payload),u=typeof i.teamId=="string"?i.teamId.trim():"",c=typeof i.projectId=="string"?i.projectId.trim():"",p=typeof i.agentId=="string"?i.agentId.trim():"",b=typeof i.q=="string"?i.q.trim():"",l=typeof i.tag=="string"?i.tag.trim():"",g=typeof i.useCase=="string"?i.useCase.trim():"",P=i.replayState==="draft"||i.replayState==="validated"||i.replayState==="published"?i.replayState:void 0;return{...await e.snapshotCatalog({...u?{teamId:u}:{},...c?{projectId:c}:{},...p?{agentId:p}:{},...b?{q:b}:{},...l?{tag:l}:{},...g?{useCase:g}:{},...P?{replayState:P}:{}}),account:s}}if(t.type==="snapshot_create")return{...await e.createSnapshot(t.sandboxId,nt(t.payload)),account:s};if(t.type==="template_catalog"){let i=m(t.payload),u=typeof i.teamId=="string"?i.teamId.trim():"",c=typeof i.projectId=="string"?i.projectId.trim():"",p=typeof i.q=="string"?i.q.trim():"",b=typeof i.name=="string"?i.name.trim():"",l=typeof i.version=="string"?i.version.trim():"",g=typeof i.tag=="string"?i.tag.trim():"",P=typeof i.useCase=="string"?i.useCase.trim():"";return{...await e.templates({...u?{teamId:u}:{},...c?{projectId:c}:{},...p?{q:p}:{},...b?{name:b}:{},...l?{version:l}:{},...g?{tag:g}:{},...P?{useCase:P}:{}}),account:s}}if(t.type==="integration_connections"){let i=m(t.payload),u=typeof i.teamId=="string"?i.teamId.trim():"",c=typeof i.projectId=="string"?i.projectId.trim():"",p=typeof i.agentId=="string"?i.agentId.trim():"",b=be(i.status),l={...c?{projectId:c}:{},...p?{agentId:p}:{},status:b??"all"};return{...u?await e.integrationConnections({teamId:u,...l}):await ve(e,l),account:s}}if(t.type==="connected_app_status"){let i=m(t.payload),u=typeof i.teamId=="string"?i.teamId.trim():"",c=typeof i.projectId=="string"?i.projectId.trim():"",p=typeof i.agentId=="string"?i.agentId.trim():"",b=be(i.status)??"all",l={...c?{projectId:c}:{},...p?{agentId:p}:{},status:b},g=u?await e.integrationConnections({teamId:u,...l}):await ve(e,l);return{teamId:g.teamId,apps:je({connections:g.connections}),account:s}}if(t.type==="sandbox_runtime_list")return{runtimes:await e.listSandboxRuntimes(y(t.payload)),account:s};if(t.type==="sandbox_runtime_get")return{runtime:await e.getSandboxRuntime(t.runtimeId),account:s};if(t.type==="sandbox_runtime_create")return{runtime:await e.createSandboxRuntime(ge(t.payload)),account:s};if(t.type==="sandbox_runtime_sandbox_create")return{...await e.createSandboxRuntimeSandbox(t.runtimeId,Q(t.payload),{respondAsync:!0}),account:s};if(t.type==="sandbox_runtime_resume"){let i=await e.sandboxRuntime(t.runtimeId).resume(Q(t.payload),{respondAsync:!0});return{runtime:await e.getSandboxRuntime(t.runtimeId),sandbox:i,account:s}}if(t.type==="sandbox_runtime_preserve_source"){let i=m(t.payload);return{...await e.preserveSandboxRuntimeSource(t.runtimeId,{...typeof i.sandboxId=="string"&&i.sandboxId.trim()?{sandboxId:i.sandboxId.trim()}:{},...typeof i.message=="string"&&i.message.trim()?{message:i.message.trim()}:{},...i.source==="profile"?{source:"profile"}:{}},y(t.payload)),account:s}}if(t.type==="sandbox_runtime_promote"){let i=m(t.payload);return{...await e.promoteSandboxRuntime(t.runtimeId,{expectedTargetSha:typeof i.expectedTargetSha=="string"?i.expectedTargetSha.trim():"",...i.validationState==="pending"||i.validationState==="passed"?{validationState:i.validationState}:{},...typeof i.summary=="string"&&i.summary.trim()?{summary:i.summary.trim()}:{}},y(t.payload)),account:s}}if(t.type==="project_list")return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/projects",y(t.payload))}),account:s};if(t.type==="profile_get")return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/profile",y(t.payload))}),account:s};if(t.type==="profile_ensure")return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/profile/ensure",y(t.payload)),method:"POST"}),account:s};if(t.type==="profile_push"){let i=m(t.payload),{teamId:u,...c}=i;return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/profile/push",y(i)),method:"POST",body:c}),account:s}}if(t.type==="project_upsert")return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/projects",y(t.payload)),method:"POST",body:m(t.payload)}),account:s};if(t.type==="project_get")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/projects/${encodeURIComponent(t.projectId)}`,y(t.payload))}),account:s};if(t.type==="project_workspace")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/projects/${encodeURIComponent(t.projectId)}/workspace`,y(t.payload))}),account:s};if(t.type==="project_git")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/projects/${encodeURIComponent(t.projectId)}/git`,y(t.payload)),method:"POST"}),account:s};if(t.type==="project_sync")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/projects/${encodeURIComponent(t.projectId)}/sync`,y(t.payload)),method:"POST"}),account:s};if(t.type==="project_source_upload"){let i=m(t.payload),{teamId:u,...c}=i;return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/projects/${encodeURIComponent(t.projectId)}/source`,y(i)),method:"POST",body:c}),account:s}}if(t.type==="project_archive")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/projects/${encodeURIComponent(t.projectId)}`,y(t.payload)),method:"DELETE"}),account:s};if(t.type==="agent_list")return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/agents",y(t.payload))}),account:s};if(t.type==="agent_upsert")return{...await w({apiKey:r,sandboxApiUrl:a,path:v("/agents",y(t.payload)),method:"POST",body:m(t.payload)}),account:s};if(t.type==="agent_run")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/agents/${encodeURIComponent(t.agentId)}/run`,y(t.payload)),method:"POST",body:m(t.payload)}),account:s};if(t.type==="agent_source_deploy_plan")return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/agents/${encodeURIComponent(t.agentId)}/source/deploy-plan`,y(t.payload))}),account:s};if(t.type==="agent_source_checks"){let i=m(t.payload),{teamId:u,...c}=i;return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/agents/${encodeURIComponent(t.agentId)}/source/checks`,y(i)),method:"POST",body:c,timeoutMs:900*1e3}),account:s}}if(t.type==="agent_source_publish"){let i=m(t.payload),{teamId:u,...c}=i;return{...await w({apiKey:r,sandboxApiUrl:a,path:v(`/agents/${encodeURIComponent(t.agentId)}/source/publish`,y(i)),method:"POST",body:c}),account:s}}if(t.type==="create")return{sandbox:await e.create(Z(t.payload)),account:s};if(t.type==="get")return{sandbox:await e.get(t.sandboxId),account:s};if(t.type==="start")return{...await e.start(t.sandboxId,{respondAsync:!0}),account:s};if(t.type==="delete"){let i=await Et(e,t.sandboxId,{failOnUnpreservedChanges:t.failOnUnpreservedChanges}),u=await e.delete(t.sandboxId,i).catch(c=>kt("delete",e,t.sandboxId,c));return At("delete",u),{sandbox:u,account:s}}if(t.type==="exec")return{...await e.exec(t.sandboxId,pt(t.payload)),account:s};if(t.type==="action_run")return{...await zn({apiKey:r,sandboxApiUrl:a,path:`/sandboxes/${encodeURIComponent(t.sandboxId)}/actions/${encodeURIComponent(t.actionName)}/run`,method:"POST",body:m(t.payload)}),account:s};if(t.type==="open_port")return{...await e.openPort(t.sandboxId,ht(t.payload)),account:s};if(t.type==="snapshot_update")return{...await e.updateSnapshot(t.sandboxId,t.snapshotId,ft(t.payload)),account:s};if(t.type==="snapshot_validate")return{...await e.validateSnapshot(t.sandboxId,t.snapshotId,yt(t.payload)),account:s};if(t.type==="snapshot_publish")return{...await e.publishSnapshot(t.sandboxId,t.snapshotId),account:s};if(t.type==="replays")return{...await e.listReplays(y(t.payload)),account:s};if(t.type==="replay_start")return{...await e.startReplay(rt(t.payload)),account:s};if(t.type==="replay_get")return{...await e.getReplay(t.replayId,y(t.payload)),account:s};if(t.type==="replay_logs")return{...await e.getReplayLogs(t.replayId,y(t.payload)),account:s};if(t.type==="replay_artifacts")return{...await e.getReplayArtifacts(t.replayId,y(t.payload)),account:s};if(t.type==="replay_cancel")return{...await e.cancelReplay(t.replayId,y(t.payload)),account:s};if(t.type==="schedule_create")return{...await e.createSchedule(m(t.payload)),account:s};if(t.type==="template_launch")return{...await e.launchTemplate(gt(t.payload)),account:s};if(t.type==="fork")return{...await e.fork(t.sandboxId,we(t.payload)),account:s};if(t.type==="stop"){let i=await Et(e,t.sandboxId,{failOnUnpreservedChanges:t.failOnUnpreservedChanges}),u=await e.stop(t.sandboxId,i).catch(c=>kt("stop",e,t.sandboxId,c));return At("stop",u.sandbox),{...u,account:s}}if(t.type==="receipts")return{receipts:await e.receipts(t.sandboxId),account:s};if(t.type==="logs")return{logs:await e.logs(t.sandboxId),account:s};if(t.type==="integration_leases")return{...await e.integrationLeases(t.sandboxId),account:s};if(t.type==="integration_attach")return{...await e.attachIntegrationConnection(t.sandboxId,Ie(t.payload)),account:s};if(t.type==="integration_remove")return{...await e.removeIntegrationLease(t.sandboxId,Se(t.payload)),account:s};if(t.type==="process_start")return{...await e.startProcess(t.sandboxId,mt(t.payload)),account:s};if(t.type==="process_get")return{...await e.getProcess(t.sandboxId,t.processId,lt(t.payload)),account:s};if(t.type==="upload_file"){let i=wt(t.payload);return{...i.contentsBase64?await e.uploadFileBase64(t.sandboxId,i.path,i.contentsBase64):await e.uploadFile(t.sandboxId,i.path,i.contents),account:s}}if(t.type==="download_file"){let i=St(t.payload);return{...await e.downloadFileResponse(t.sandboxId,i),account:s}}if(t.type==="list_files")return{...await e.listFiles(t.sandboxId,bt(t.payload)),account:s};if(t.type==="search_files")return{...await e.searchFiles(t.sandboxId,It(t.payload)),account:s};if(t.type==="delete_file"){let i=D(t.payload);return{...await e.deleteFile(t.sandboxId,i.path,{recursive:i.recursive}),account:s}}if(t.type==="stat_file"){let i=D(t.payload);return{...await e.statFile(t.sandboxId,i.path),account:s}}if(t.type==="mkdir"){let i=D(t.payload);return{...await e.mkdir(t.sandboxId,{path:i.path,recursive:i.recursive}),account:s}}if(t.type==="move_file"){let i=xt(t.payload);return{...await e.moveFile(t.sandboxId,i),account:s}}if(t.type==="git_status")return{...await e.gitStatus(t.sandboxId),account:s};if(t.type==="git_diff"){let i=m(t.payload),u=typeof i.baseRef=="string"?i.baseRef.trim():"";return{...await e.gitDiff(t.sandboxId,{...u?{baseRef:u}:{}}),account:s}}if(t.type==="git_export_patch"){let i=m(t.payload),u=typeof i.baseRef=="string"?i.baseRef.trim():"";return{...await e.gitExportPatch(t.sandboxId,{...u?{baseRef:u}:{}}),account:s}}if(t.type==="git_branch")return{...await e.gitBranch(t.sandboxId,vt(t.payload)),account:s};if(t.type==="git_commit")return{...await e.gitCommit(t.sandboxId,Rt(t.payload)),account:s};if(t.type==="git_pull")return{...await e.gitPull(t.sandboxId,Ct(t.payload)),account:s};if(t.type==="git_push")return{...await e.gitPush(t.sandboxId,Pt(t.payload)),account:s};throw new Error(`Unsupported sandbox action: ${t.type}`)}d(ao,"sandboxRequestPayload");async function so(t={}){let{client:e}=await te();return t.teamId?e.integrationConnections(t):ve(e,{...t.projectId?{projectId:t.projectId}:{},...t.agentId?{agentId:t.agentId}:{},status:t.status??"all"})}d(so,"listSandboxIntegrationConnections");async function Et(t,e,n={}){let r=await t.get(e).then(a=>!qt(a)).catch(()=>!0);return{failOnUnpreservedChanges:n.failOnUnpreservedChanges,...r?{respondAsync:!0}:{}}}d(Et,"sandboxLifecycleRequestOptions");function qt(t){return t.reservation.status==="reserved"&&(t.state==="creating"||Ut.has(t.state))}d(qt,"sandboxLifecycleRequiresSynchronousAccounting");function At(t,e){if(Ut.has(e.state)&&e.reservation.status==="reserved")throw new Error(`Sandbox ${t} reached ${e.state}, but reservation ${e.reservation.id} is still reserved. Cleanup accounting has not settled; retry status before treating cleanup as complete.`)}d(At,"assertTerminalSandboxLifecycleSettled");async function kt(t,e,n,r){let a=await e.get(n).catch(()=>null);if(a&&qt(a)){let s=r instanceof Error?r.message:String(r);throw new Error(`Sandbox ${t} failed while sandbox ${n} is still creating with active reservation ${a.reservation.id}. Cleanup accounting has not settled; retry status before treating cleanup as complete. Original error: ${s}`)}throw r instanceof Error?r:new Error(String(r))}d(kt,"throwSandboxLifecycleRequestFailure");var Ut=new Set(["stopped","archived","deleted","error"]);async function ve(t,e){let n=await t.listOrganizations().catch(()=>{throw new Error("Connected app status is unavailable because organizations could not be loaded.")}),r=jn(n),a=$n(n)||null;if(r.length===0)return{teamId:a,connections:[]};let s=await Promise.all(r.map(u=>t.integrationConnections({teamId:u,...e.projectId?{projectId:e.projectId}:{},...e.agentId?{agentId:e.agentId}:{},status:e.status}).catch(()=>null))),i=On(s);return{teamId:qn(i)??a??i.find(u=>u.teamId.trim())?.teamId.trim()??null,connections:Un(i)}}d(ve,"resolveImplicitConnectedAppStatusConnections");function qn(t){for(let e of t){if((e.connections?.length??0)===0)continue;let n=e.teamId?.trim();if(n)return n}return null}d(qn,"connectedAppStatusTeamIdWithConnections");function Un(t){let e=[],n=new Set;for(let r of t)for(let a of r.connections??[]){let s=a.id.trim()||[a.teamId,a.provider,a.providerAccountId].join(":");n.has(s)||(n.add(s),e.push(a))}return e}d(Un,"mergeConnectedAppStatusConnectionResults");function On(t){let e=t.filter(a=>a!==null),n=t.length-e.length,r=e.reduce((a,s)=>a+(s.connections?.length??0),0);if(n>0&&r===0)throw new Error("Connected app status is unavailable because one or more team integration connection lookups could not be loaded.");return e}d(On,"successfulConnectedAppStatusConnectionResults");function $n(t){let e=t.filter(n=>Ot(n)==="active");return ee(e.find(n=>n.role==="owner"))??ee(e.find(n=>n.role==="admin"))??ee(e[0])??""}d($n,"selectImplicitConnectedAppStatusTeamId");function jn(t){let e=[],n=new Set;for(let r of t){if(Ot(r)!=="active")continue;let a=ee(r);!a||n.has(a)||(n.add(a),e.push(a))}return e}d(jn,"implicitConnectedAppStatusTeamIds");function ee(t){if(!t)return null;let e=t.id;return(typeof t.teamId=="string"?t.teamId:typeof e=="string"?e:"").trim()||null}d(ee,"organizationTeamId");function Ot(t){return typeof t.status=="string"?t.status:"active"}d(Ot,"organizationStatus");async function te(){let t=$(process.env.OPENPOND_SANDBOX_API_URL),e=process.env.OPENPOND_SANDBOX_API_KEY?.trim();if(e&&t)return{client:Y({apiKey:e,sandboxApiUrl:t}),context:await ue().catch(()=>null),apiKey:e,sandboxApiUrl:O(t)};let n=await ue(),r=n.token?.trim();if(!r)throw new Error("OpenPond account API key is required to manage sandboxes.");if(t)return{client:Y({apiKey:r,sandboxApiUrl:t}),context:n,apiKey:r,sandboxApiUrl:O(t)};let a=Nn(n);return{client:Y({apiKey:r,baseUrl:a}),context:n,apiKey:r,sandboxApiUrl:O(a)}}d(te,"resolveSandboxClient");function _n(t){return O(t).replace(/\/sandboxes\/?$/,"")}d(_n,"sandboxApiRootUrl");function Tn(t){let e=O(t);return/\/api\/sandboxes\/?$/.test(e)?e.replace(/\/api\/sandboxes\/?$/,"/v1"):e.replace(/\/sandboxes\/?$/,"")}d(Tn,"sandboxPublicApiRootUrl");function v(t,e){let n=new URLSearchParams;return e.teamId&&n.set("teamId",e.teamId),e.projectId&&n.set("projectId",e.projectId),e.agentId&&n.set("agentId",e.agentId),`${t}${n.size>0?`?${n.toString()}`:""}`}d(v,"sandboxScopedCollectionPath");async function zn(t){let e=await z(_n(t.sandboxApiUrl),t.apiKey,t.path,{method:t.method??"GET",...t.body?{body:JSON.stringify(t.body)}:{}}),n=await e.json().catch(()=>({}));if(!e.ok){let r=typeof n.error=="string"?n.error:`Sandbox API request failed with status ${e.status}`;throw new Error(r)}return n}d(zn,"requestSandboxApiRoot");async function w(t){let e=await z(Tn(t.sandboxApiUrl),t.apiKey,t.path,{method:t.method??"GET",signal:t.signal,headers:{...t.idempotencyKey?{"idempotency-key":t.idempotencyKey}:{},...t.teamId?{"X-OpenPond-Team-Id":t.teamId}:{}},...t.body?{body:JSON.stringify(t.body)}:{},...t.timeoutMs!==void 0?{timeoutMs:t.timeoutMs}:{}}),n=await e.json().catch(()=>({}));if(!e.ok){let r=typeof n.error=="string"?n.error:`Sandbox API request failed with status ${e.status}`;throw new Error(r)}return n}d(w,"requestSandboxPublicApiRoot");async function io(t){let{apiKey:e,sandboxApiUrl:n}=await te();return w({apiKey:e,sandboxApiUrl:n,...t})}d(io,"requestOpenPondPublicApi");function Ln(t,e){if(!t)return{label:"Sandbox API",handle:null,baseUrl:null,sandboxApiUrl:e,state:"signed_out"};let n=t.accountState;return{label:n.label,handle:n.activeProfile?.handle??t.account?.handle??null,baseUrl:n.baseUrl??t.account?.baseUrl??null,sandboxApiUrl:e,state:n.state}}d(Ln,"sandboxAccountSummary");function Nn(t){return $(process.env.OPENPOND_SANDBOX_BASE_URL)??$(process.env.OPENPOND_API_URL)??$(t.apiBaseUrl)??$(t.account?.baseUrl)??$(t.config.baseUrl)??kn}d(Nn,"resolveSandboxBaseUrl");export{or as a,vr as b,We as c,tn as d,nn as e,qr as f,rn as g,Ur as h,An as i,oo as j,ao as k,so as l,io as m};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-FTQLQJQV.js";var p=class extends Error{static{a(this,"ApiTimeoutError")}timeoutMs;requestUrl;code="OPENPOND_API_TIMEOUT";constructor(e,s){super(`API request timed out after ${e}ms: ${s}`),this.timeoutMs=e,this.requestUrl=s,this.name="ApiTimeoutError"}},u=class extends Error{static{a(this,"ApiResponseTooLargeError")}maximumBytes;requestUrl;code="OPENPOND_API_RESPONSE_TOO_LARGE";constructor(e,s){super(`API response exceeded ${e} bytes: ${s}`),this.maximumBytes=e,this.requestUrl=s,this.name="ApiResponseTooLargeError"}},g=class extends Error{static{a(this,"OpenPondApiError")}status;apiMessage;code;constructor(e,s,r,o=null){let c=o||s;super(`${r} failed: ${e}${c?` ${c}`:""}`),this.status=e,this.apiMessage=o,this.name="OpenPondApiError",this.code=s||"OPENPOND_API_ERROR"}};async function S(t,e,s,r={}){let{timeoutMs:o=3e4,maxResponseBytes:c=8388608,explicitBearerAuth:n=!1,...i}=r,h=`${t}${s}`,d=new Headers(i.headers);d.set("Content-Type","application/json");let m=n?void 0:process.env.OPENPOND_API_KEY,y=e?.trim()||"",w=!n&&y.startsWith("opk_"),U=m||(w?y:null);U&&!d.has("openpond-api-key")&&d.set("openpond-api-key",U),e?d.set("Authorization",w?`ApiKey ${y}`:`Bearer ${e}`):m&&!d.has("Authorization")&&d.set("Authorization",`ApiKey ${m}`);let f=new AbortController,_=new p(o,h),E=o>0?setTimeout(()=>f.abort(_),o):null;E?.unref?.();let N=I(i.signal,f.signal,o),P=a(()=>{E&&clearTimeout(E)},"cleanup");try{let A=await fetch(h,{...i,headers:d,signal:N});return b(A,{cleanup:P,maximumBytes:c,requestUrl:h,timeoutController:f,timeoutError:_})}catch(A){throw P(),f.signal.aborted?_:A}}a(S,"apiFetch");async function C(t,e){let s;try{let r=await t.text();s=r?JSON.parse(r):{}}catch(r){if(r instanceof p||r instanceof u)throw r;s={}}if(!t.ok){let r=typeof s.error=="string"?s.error:null,o=typeof s.message=="string"?s.message:null;throw new g(t.status,r,e,o)}return s}a(C,"readApiJson");function b(t,e){if(!t.body)return e.cleanup(),t;let s=Number(t.headers.get("content-length"));if(e.maximumBytes>0&&Number.isFinite(s)&&s>e.maximumBytes)throw e.cleanup(),t.body.cancel(),new u(e.maximumBytes,e.requestUrl);let r=t.body.getReader(),o=0,c=new ReadableStream({async pull(n){try{let i=await r.read();if(i.done){e.cleanup(),n.close();return}if(o+=i.value.byteLength,e.maximumBytes>0&&o>e.maximumBytes){e.cleanup(),await r.cancel(),n.error(new u(e.maximumBytes,e.requestUrl));return}n.enqueue(i.value)}catch(i){e.cleanup(),n.error(e.timeoutController.signal.aborted?e.timeoutError:i)}},async cancel(n){e.cleanup(),await r.cancel(n)}});return new Response(c,{headers:t.headers,status:t.status,statusText:t.statusText})}a(b,"boundedResponse");function I(t,e,s){return s<=0?t??void 0:t?AbortSignal.any([t,e]):e}a(I,"composedSignal");var H="https://openpond.ai",q="https://api.openpond.ai",O="https://api.openpond.ai/opchat/v1";import{randomUUID as k}from"node:crypto";function B(t){let e=l(t);if(!e)throw new Error("apiBaseUrl is required");return e}a(B,"normalizeApiBaseUrl");function x(t){return t.replace(/\/+$/,"")}a(x,"trimTrailingSlashes");function l(t){let e=x(t?.trim()??"");return e?(e=e.replace(/\/chat\/completions$/i,"").replace(/\/models(?:\/[^/]+)?$/i,""),e.endsWith("/opchat/v1")?e:e.endsWith("/opchat")?`${e}/v1`:(e.endsWith("/v1")&&(e=e.slice(0,-3)),`${x(e)}/opchat/v1`)):null}a(l,"normalizeOptionalOpChatApiBaseUrl");function G(t={}){let e=t.env??(typeof process<"u"?process.env:{}),s=l(t.opChatApiBaseUrl)??l(e.OPENPOND_OPCHAT_API_URL);if(s)return s;let r=l(t.chatApiBaseUrl)??l(e.OPENPOND_CHAT_API_URL)??l(e.OPENPOND_GATEWAY_URL);return r||(l(t.apiBaseUrl)??l(e.OPENPOND_API_URL)??O)}a(G,"resolveOpChatApiBaseUrl");function v(t){let e=t.trim();if(!e)throw new Error("OpenPond API key is required");return e}a(v,"requireToken");function T(t,e,s){let r=new Headers;return r.set("Authorization",`Bearer ${v(t)}`),r.set("Content-Type","application/json"),r.set("Accept",e),r.set("x-openpond-client","openpond-code"),r.set("x-openpond-request-id",s||k()),r}a(T,"hostedHeaders");async function $(t){let e=await t.text().catch(()=>"");if(!e)return t.statusText||`HTTP ${t.status}`;try{let s=JSON.parse(e),r=typeof s.error=="string"||s.error&&typeof s.error=="object"&&!Array.isArray(s.error)?s.error:null,o=typeof s.code=="string"?s.code:r&&typeof r!="string"&&typeof r.code=="string"?r.code:null,c=typeof s.message=="string"?s.message:r&&typeof r!="string"&&typeof r.message=="string"?r.message:null,n=typeof r=="string"?r:r&&typeof r.type=="string"?r.type:null;return[o,n,c].filter(Boolean).join(": ")||e}catch{return e}}a($,"readError");function R(t,e){let s={model:t.model,messages:t.messages,stream:e};typeof t.temperature=="number"&&(s.temperature=t.temperature),typeof t.maxTokens=="number"&&(s.max_tokens=t.maxTokens),t.reasoningEffort==="off"?s.thinking={type:"disabled"}:t.reasoningEffort&&(s.reasoning_effort=t.reasoningEffort),t.tools&&(s.tools=t.tools);let r=t.toolChoice??t.tool_choice;return r!==void 0&&(s.tool_choice=r),t.metadata&&(s.metadata=t.metadata),s}a(R,"buildHostedChatBody");async function W(t){let s=`${B(t.apiBaseUrl)}/models`,r=await fetch(s,{method:"GET",headers:T(t.token,"application/json"),signal:t.signal});if(!r.ok)throw new Error(`Hosted model list failed: ${r.status} ${await $(r)}`);return await r.json()}a(W,"listOpChatModels");async function z(t){let s=`${B(t.apiBaseUrl)}/chat/completions`,r=await fetch(s,{method:"POST",headers:T(t.token,"application/json",t.requestId),body:JSON.stringify(R(t,!1)),signal:t.signal});if(!r.ok)throw new Error(`Hosted chat failed: ${r.status} ${await $(r)}`);return await r.json()}a(z,"sendHostedChatTurn");export{g as a,S as b,C as c,H as d,q as e,G as f,W as g,z as h};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as he,b as ye,d as Ae,e as D}from"./chunk-BFKYRQMA.js";import{a as L,b as ge,c as Pe,d as we,e as Oe}from"./chunk-SGK4GR44.js";import{j as xe}from"./chunk-5ZBLCWEJ.js";import{d as N,e as E}from"./chunk-YR5ID2SS.js";import{E as ae,h as re}from"./chunk-6DCXAXVD.js";import{d as me}from"./chunk-OE22TAXP.js";import{a}from"./chunk-FTQLQJQV.js";var Le=new URL(E).hostname,be=new URL(N).hostname,$e=`${E}/opchat/v1`;function l(e){if(!e)return null;let t=e.trim();return t?t.replace(/\/+$/,""):null}a(l,"normalizeBaseUrl");function X(e){let t=l(e);if(!t)return null;try{let o=new URL(t).hostname.toLowerCase();if(o===Le)return E;if(o===be||o===`www.${be}`||o==="openpond.live"||o==="www.openpond.live")return E;if(o.startsWith("api."))return t}catch{return null}return null}a(X,"mapUiBaseToApiBase");function Y(e,t){let n=l(process.env.OPENPOND_API_URL);if(n)return n;let o=l(e?.apiBaseUrl);if(o)return o;let r=l(t.apiBaseUrl);if(r)return r;let s=X(process.env.OPENPOND_BASE_URL);return s||(X(e?.baseUrl||t.baseUrl)??E)}a(Y,"resolvePublicApiBaseUrl");function Q(e,t,n){return He(e,t,n)}a(Q,"resolveHostedChatApiBaseUrl");function He(e,t,n){let o=typeof process<"u"?process.env:{};return J(o.OPENPOND_OPCHAT_API_URL)??J(e?.chatApiBaseUrl??t.chatApiBaseUrl)??J(o.OPENPOND_CHAT_API_URL)??Me(n)}a(He,"resolveOpChatApiBaseUrl");function J(e){let t=l(e);if(!t)return null;try{let n=new URL(t),o=n.pathname.split("/").filter(Boolean),r=o.findIndex(i=>i.toLowerCase()==="opchat");return r>=0?(n.pathname=`/${[...o.slice(0,r+1),"v1"].join("/")}`,n.search="",n.hash="",l(n.toString())??null):o.findIndex(i=>i.toLowerCase()==="v1")>=0?(n.pathname="/opchat/v1",n.search="",n.hash="",l(n.toString())??null):(n.pathname=`${n.pathname.replace(/\/+$/,"")}/opchat/v1`.replace(/\/{2,}/g,"/"),n.search="",n.hash="",l(n.toString())??null)}catch{return null}}a(J,"normalizeOpChatApiBaseUrl");function Me(e){return J(e)??$e}a(Me,"opChatBaseFromPublicApiBase");function $(e){return e?.trim()?e.trim():"production"}a($,"deriveEnvironment");function Z(e,t=process.env){let n=[e?.apiKey,e?.session?.token,e?.token,t.OPENPOND_API_KEY];for(let o of n){let r=typeof o=="string"?o.trim():"";if(r)return r}return null}a(Z,"accountToken");function P(e,t){return!!(e&&t&&e.toLowerCase()===t.toLowerCase())}a(P,"handleEquals");function b(e,t){return l(e)===l(t)}a(b,"baseUrlEquals");function q(e,t){return`${e?.trim().toLowerCase()||""}|${l(t)??"default"}`}a(q,"profileKey");function ee(e){return l(e?.baseUrl)}a(ee,"selectorBaseUrl");function v(e){let t=l(e.baseUrl);return t?{handle:e.handle,baseUrl:t}:{handle:e.handle}}a(v,"selectorFromAccount");function A(e){let t=typeof e?.handle=="string"?e.handle.trim():"";if(!t)return null;let n=l(e?.baseUrl);return n?{handle:t,baseUrl:n}:{handle:t}}a(A,"normalizeActiveProfile");function U(e,t){if(!P(e.handle,t.handle))return!1;let n=ee(t);return n?b(e.baseUrl,n):!l(e.baseUrl)}a(U,"accountMatchesSelector");function se(e,t){if(!P(e.handle,t.handle))return!1;let n=ee(t);return n?b(e.baseUrl,n):!l(e.baseUrl)}a(se,"profileMatchesSelector");function Ue(e,t,n){let o=Array.isArray(e.accounts)?e.accounts:[],r=t||process.env.OPENPOND_ACCOUNT?A({handle:t||process.env.OPENPOND_ACCOUNT||"",baseUrl:n??process.env.OPENPOND_BASE_URL??null}):A(e.activeProfile);if(r){let s=o.find(c=>U(c,r));if(s)return s;let i=o.filter(c=>P(c.handle,r.handle));return i.length===1?i[0]??null:null}return o[0]?o[0]:null}a(Ue,"findActiveAccount");function ke(e){let t=Array.isArray(e.accounts)?e.accounts:[],n=A(e.activeProfile)??(t[0]?v(t[0]):null);return ie(t.map(o=>({handle:o.handle,baseUrl:l(o.baseUrl),apiBaseUrl:l(o.apiBaseUrl),chatApiBaseUrl:l(o.chatApiBaseUrl),environment:$(o.environment),isActive:n?U(o,n):!1,hasApiKey:!!o.apiKey?.trim(),hasSessionToken:!!(o.session?.token?.trim()||o.token?.trim()),sessionAppId:o.session?.appId??null,sessionConversationId:o.session?.conversationId??null})))}a(ke,"fallbackProfilesFromConfig");function ie(e){let t=new Map;for(let n of e){let o=l(n.baseUrl),r=`${n.handle.toLowerCase()}|${o??"default"}`,s={...n,baseUrl:o,apiBaseUrl:l(n.apiBaseUrl),chatApiBaseUrl:l(n.chatApiBaseUrl),environment:$(n.environment),isActive:n.isActive},i=t.get(r);(!i||s.isActive&&!i.isActive||s.hasApiKey&&!i.hasApiKey)&&t.set(r,s)}return Array.from(t.values())}a(ie,"normalizeProfiles");function Ee(e){return e.hasApiKey||e.hasSessionToken?"signed_in":"signed_out"}a(Ee,"profileAuthHealth");function ze(e,t){return e?{reachable:e.reachable,authenticated:e.authenticated,apiBase:e.apiBase||t,latencyMs:e.latencyMs,status:e.status,service:e.service,checkedAt:e.checkedAt,error:e.error??null}:null}a(ze,"normalizeHealth");function Be(e){let t=e?.account;return t?{id:t.id??null,email:t.email??null,name:t.name??null,handle:t.handle??null,image:t.image??null,timezone:t.timezone??null,isAdmin:t.isAdmin??null,isVerified:t.isVerified??null,dailyAgentAppId:t.dailyAgentAppId??null,dailyAgentDeploymentId:t.dailyAgentDeploymentId??null,credits:t.credits??null}:null}a(Be,"normalizeProfile");function Fe(e){return(e??[]).map(t=>({...t,id:t.id||t.userProductId||t.openPondProductId||t.name,name:t.name,type:t.type,status:t.status,isActive:t.isActive??null,price:t.price??null,currency:t.currency??null,credits:t.credits??null}))}a(Fe,"normalizeProducts");function je(e){return e.handle.trim().toLowerCase()==="default"&&!l(e.baseUrl)&&!e.hasApiKey&&!e.hasSessionToken}a(je,"isEmptyDefaultProfile");function Ke(e){let t=e?.trim();return t?t.length>=12?`\u2022\u2022\u2022\u2022\u2022\u2022${t.slice(-6)}`:"\u2022\u2022\u2022\u2022\u2022\u2022":null}a(Ke,"apiKeyHint");function qe(e){return e?.auth?.authType!=="openpond-api-key"||!e.auth.keyAccess?null:{ownerType:e.auth.keyAccess.ownerType,teamId:e.auth.keyAccess.teamId,scopes:e.auth.scopes}}a(qe,"apiKeyAccess");function H(e){let{config:t,profiles:n,account:o,token:r,apiBaseUrl:s,accountResponse:i,accountProfiles:c,health:m,authFailed:g,error:f}=e,w=Q(o,t,s),h=Be(i??null),C=A(t.activeProfile),_=(o?v(o):null)??C,O=h?.handle||o?.handle||_?.handle||null,I=(_?n.find(p=>se(p,_)):null)??n.find(p=>p.isActive)??null,y=g?"auth_error":r?"signed_in":"signed_out",d=h?.name||h?.handle||h?.email||O||"Signed out",R=l(I?.baseUrl||o?.baseUrl||N),k=$(I?.environment||o?.environment),x=A(_)??(O?A({handle:O,baseUrl:I?.baseUrl??o?.baseUrl}):null),j=(n.length>0?n:O?[{handle:O,baseUrl:ee(x)??l(o?.baseUrl),apiBaseUrl:s,chatApiBaseUrl:w,environment:k,isActive:!0,hasApiKey:!!r,hasSessionToken:!1,sessionAppId:null,sessionConversationId:null}]:[]).filter(p=>!je(p));return{state:y,activeProfile:x,label:d,email:h?.email??null,avatarUrl:h?.image??null,environment:k,baseUrl:R,apiBaseUrl:s,chatApiBaseUrl:w,creditsLabel:h?.credits??null,profile:h,products:Fe(i?.products),apiHealth:ze(m??null,s),accounts:j.map(p=>{let T=l(p.baseUrl),De=t.accounts?.find(fe=>P(fe.handle,p.handle)&&b(fe.baseUrl,T)),oe=c?.[q(p.handle,T)]??null,K=Be(oe?.response??null);return{handle:p.handle,baseUrl:T,apiBaseUrl:l(p.apiBaseUrl),chatApiBaseUrl:l(p.chatApiBaseUrl),environment:$(p.environment),isActive:x?se(p,x):!1,authHealth:oe?.authFailed?"auth_error":Ee(p),displayLabel:K?.name||K?.handle||K?.email||p.handle,email:K?.email??null,avatarUrl:K?.image??null,apiKeyHint:Ke(De?.apiKey),apiKeyAccess:qe(oe?.response??null)}}),error:f??m?.error??null}}a(H,"toAccountState");async function Ge(e){try{return ie(await Pe())}catch{return ke(e)}}a(Ge,"loadProfiles");async function u(e,t){let n=await ge(),o=await Ge(n),r=Ue(n,e,t),s=Z(r),i=Y(r,n),c=Q(r,n,i);return{config:n,profiles:o,account:r,token:s,apiBaseUrl:i,chatApiBaseUrl:c,accountState:H({config:n,profiles:o,account:r,token:s,apiBaseUrl:i})}}a(u,"loadOpenPondAccountContext");async function We(e){let t=l(e.baseUrl);return await we(e.handle,{baseUrl:t}),u(e.handle,t)}a(We,"switchOpenPondAccount");import{randomUUID as Ve}from"node:crypto";function M(e){return e instanceof Error?e.message:String(e)}a(M,"errorMessage");var Je=15e3;function Xe(e){return e===ae?"OpenPond Chat":e==="deepseek-v4-flash"?"DeepSeek V4 Flash":e.replace(/[-_/]+/g," ")}a(Xe,"displayNameForHostedModel");function Ye(e){let t=typeof e.id=="string"?e.id:null;return t?{id:t,displayName:Xe(t),ownedBy:typeof e.owned_by=="string"?e.owned_by:null,streaming:!0,raw:e}:null}a(Ye,"normalizeHostedModel");async function Qe(){let e=await u();if(!e.token)return{models:[],error:"No OpenPond API key or session token is configured."};try{return{models:(await tt({apiBaseUrl:e.chatApiBaseUrl,token:e.token})).data.map(o=>Ye(o)).filter(o=>!!o),error:null}}catch(t){return{models:[],error:M(t)}}}a(Qe,"loadOpenPondHostedModels");async function Ze(){let e=await u();if(!e.token)return{catalog:null,error:"No OpenPond API key or session token is configured."};let t=new AbortController,n=setTimeout(()=>{t.abort(new Error("OpenPond provider catalog request timed out."))},Je);try{return{catalog:await Se({apiBaseUrl:e.chatApiBaseUrl,token:e.token,signal:t.signal}),error:null}}catch(o){return{catalog:null,error:M(o)}}finally{clearTimeout(n)}}a(Ze,"loadOpenPondProviderCatalog");async function*et(e){let t=await u();if(!t.token)throw new Error("OpenPond is signed out. Add an account in Settings before using OpenPond Chat.");yield*Ce({apiBaseUrl:t.chatApiBaseUrl,token:t.token,model:e.model||ae,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,requestId:e.requestId,reasoningEffort:e.reasoningEffort,maxTokens:e.maxTokens,temperature:e.temperature,topP:e.topP,signal:e.signal})}a(et,"streamOpenPondHostedChatTurn");async function tt(e){let t=le(e.apiBaseUrl,"models"),n=await fetch(t,{method:"GET",headers:ce(e.token,"application/json"),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat model list failed: ${n.status} ${await ue(n)}`);return await n.json()}a(tt,"listOpChatModels");async function Se(e){let t=le(e.apiBaseUrl,"provider-catalog"),n=await fetch(t,{method:"GET",headers:ce(e.token,"application/json"),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat provider catalog failed: ${n.status} ${await ue(n)}`);let o=await n.json();return!o||typeof o!="object"||!Array.isArray(o.providers)?re.parse(o):re.parse({...o,providers:o.providers.filter(r=>r!==null&&typeof r=="object"&&me.safeParse(r.id).success)})}a(Se,"listOpChatProviderCatalog");async function*Ce(e){let t=le(e.apiBaseUrl,"chat/completions"),n=await fetch(t,{method:"POST",headers:ce(e.token,"text/event-stream",e.requestId),body:JSON.stringify(it(e,!0)),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat request failed: ${n.status} ${await ue(n)}`);if(!n.body)throw new Error("OpenPond OpChat request failed: streaming response body is missing.");let o=new Map,r=!1,s=null,i={},c="",m=null,g=nt(n.headers),f=n.body.getReader(),w=new TextDecoder,h="",C=[],ne=a(()=>{if(C.length===0)return[];let y=C.join(`
|
|
3
|
-
`);if(C=[],y==="[DONE]")return r=!0,[];let d;try{d=JSON.parse(y)}catch{throw new Error("OpenPond OpChat request failed: malformed streaming event.")}if(d&&typeof d=="object"&&"error"in d)throw new Error(`OpenPond OpChat request failed: ${Ie(d)}`);i=d;let R=d&&typeof d=="object"?d:{},k=Array.isArray(R.choices)?R.choices:[],x=k[0]&&typeof k[0]=="object"?k[0]:{},V=x.delta&&typeof x.delta=="object"?x.delta:{},j=[],p=ve(V.reasoning_content);p&&(c+=p,j.push({type:"reasoning_delta",text:p,raw:d}));let T=ve(V.content);return T&&j.push({type:"text_delta",text:T,raw:d}),at(o,V.tool_calls),s=z(x.finish_reason)??s,m=ut(d)??m,j},"consumeEvent"),_=a(y=>{let d=y.endsWith("\r")?y.slice(0,-1):y;return d?d.startsWith(":")?[]:(d.startsWith("data:")&&C.push(d.slice(5).trimStart()),[]):ne()},"consumeLine");try{for(;;){let y=await f.read();if(y.done)break;h+=w.decode(y.value,{stream:!0});let d=h.split(`
|
|
4
|
-
`);h=d.pop()??"";for(let R of d)for(let k of _(R))yield k}if(h+=w.decode(),h)for(let y of _(h))yield y;for(let y of ne())yield y}finally{f.releaseLock()}if(!r)throw new Error("OpenPond OpChat request failed: stream ended before [DONE].");let O=st(o);O.length>0&&(yield{type:"tool_call_delta",toolCalls:O,raw:i}),O.length>0&&c&&(yield{type:"continuation",continuation:{kind:"chat_completions_reasoning",reasoningContent:c},raw:i});let I=ot(m,g);I&&(yield{type:"usage",usage:I,raw:i}),yield{type:"finish",finishReason:s,raw:i}}a(Ce,"streamOpChatChatCompletion");function nt(e){let t=_e(e,["fireworks-prompt-tokens","prompt-tokens"]),n=_e(e,["fireworks-cached-prompt-tokens","cached-prompt-tokens"]);return n===null?null:{...t===null?{}:{prompt_tokens:t},cached_input_tokens:n,cache_telemetry_source:"provider_response_headers"}}a(nt,"cacheUsageFromResponseHeaders");function _e(e,t){for(let n of t){let o=e.get(n);if(o===null||!/^\d+$/.test(o.trim()))continue;let r=Number(o);if(Number.isSafeInteger(r)&&r>=0)return r}return null}a(_e,"firstHeaderTokenCount");function ot(e,t){if(!t||rt(e))return e;let n={...e??{},cached_input_tokens:t.cached_input_tokens,cache_telemetry_source:"provider_response_headers"};return B(e?.prompt_tokens)===null&&t.prompt_tokens!==void 0&&(n.prompt_tokens=t.prompt_tokens),n}a(ot,"usageWithResponseHeaderCache");function rt(e){return e?B(e.cached_input_tokens)!==null||B(e.cache_read_input_tokens)!==null||B(e.cache_creation_input_tokens)!==null||B(e.prompt_cache_hit_tokens)!==null||B(e.prompt_cache_miss_tokens)!==null?!0:B(e.prompt_tokens_details?.cached_tokens)!==null||B(e.input_tokens_details?.cached_tokens)!==null:!1}a(rt,"usageHasCacheTelemetry");function B(e){if(typeof e=="number"&&Number.isSafeInteger(e)&&e>=0)return e;if(typeof e!="string"||!/^\d+$/.test(e.trim()))return null;let t=Number(e);return Number.isSafeInteger(t)?t:null}a(B,"usageTokenCount");function at(e,t){Array.isArray(t)&&t.forEach((n,o)=>{if(!n||typeof n!="object")return;let r=n,s=typeof r.index=="number"&&Number.isInteger(r.index)?r.index:o,i=e.get(s)??{arguments:""};typeof r.id=="string"&&(i.id=r.id);let c=r.function&&typeof r.function=="object"?r.function:{};typeof c.name=="string"&&(i.name=`${i.name??""}${c.name}`),typeof c.arguments=="string"&&(i.arguments+=c.arguments),e.set(s,i)})}a(at,"mergeOpChatToolCallDeltas");function st(e){return[...e.entries()].sort(([t],[n])=>t-n).flatMap(([,t])=>t.id&&t.name?[{id:t.id,type:"function",function:{name:t.name,arguments:t.arguments}}]:[])}a(st,"completedOpChatToolCalls");function it(e,t){let n={model:e.model,messages:e.messages.map(ct),stream:t};return e.tools&&(n.tools=e.tools),e.toolChoice!==void 0&&(n.tool_choice=e.toolChoice),typeof e.maxTokens=="number"&&(n.max_tokens=e.maxTokens),typeof e.temperature=="number"&&(n.temperature=e.temperature),typeof e.topP=="number"&&(n.top_p=e.topP),Object.assign(n,lt(e.reasoningEffort)),n}a(it,"buildOpChatBody");function lt(e){return e?e==="off"?{thinking:{type:"disabled"}}:{thinking:{type:"enabled"},reasoning_effort:e}:{}}a(lt,"opChatReasoningFields");function ct(e){let{continuation:t,images:n,...o}=e,r=n?.length?[...typeof e.content=="string"&&e.content.trim()?[{type:"text",text:e.content}]:[],...n.map(s=>({type:"image_url",image_url:{url:s.url,...s.detail?{detail:s.detail}:{}}}))]:e.content;return e.role==="assistant"&&t?.kind==="chat_completions_reasoning"?{...o,...r!==void 0?{content:r}:{},reasoning_content:t.reasoningContent}:{...o,...r!==void 0?{content:r}:{}}}a(ct,"opChatMessage");function le(e,t){let n=e.trim().replace(/\/+$/,"");if(!n)throw new Error("OpenPond OpChat API base URL is required.");return`${n}/${t}`}a(le,"opChatEndpointUrl");function ce(e,t,n){let o=e.trim();if(!o)throw new Error("OpenPond API key is required for OpChat.");let r=new Headers;r.set("Authorization",`Bearer ${o}`),r.set("Content-Type","application/json"),r.set("Accept",t),r.set("x-openpond-client","openpond-app");let s=n||Ve();return r.set("x-openpond-request-id",s),r.set("x-request-id",s),r}a(ce,"opChatHeaders");async function ue(e){let t=await e.text().catch(()=>"");if(!t)return e.statusText||`HTTP ${e.status}`;try{return Ie(JSON.parse(t))}catch{return t}}a(ue,"readOpChatError");function Ie(e){if(!e||typeof e!="object")return String(e||"unknown_error");let t=e,n=t.error;if(n&&typeof n=="object"){let o=n;return[z(o.code),z(o.type),z(o.message)].filter(Boolean).join(": ")}return[z(t.error),z(t.message)].filter(Boolean).join(": ")||JSON.stringify(e)}a(Ie,"errorMessageFromPayload");function ut(e){if(!e||typeof e!="object")return null;let t=e.usage;return!t||typeof t!="object"?null:t}a(ut,"parseUsage");function z(e){return typeof e=="string"&&e.trim()?e:null}a(z,"stringValue");function ve(e){return typeof e=="string"&&e.length>0?e:null}a(ve,"streamTextValue");import{readFileSync as dt}from"node:fs";var G;function pt(){if(G!==void 0)return G??"openpond-code bundled";try{let e=new URL("../package.json",import.meta.resolve("openpond")),t=JSON.parse(dt(e,"utf8"));G=typeof t.version=="string"?`openpond-code@${t.version}`:null}catch{G=null}return G??"openpond-code bundled"}a(pt,"getBundledRuntimeVersion");function ft(e,t){let n="",o=a(r=>{r.startsWith(e)&&t(JSON.parse(r.slice(e.length)))},"processLine");return{push(r){for(n+=r;;){let s=mt(n);if(s<0)return;let i=n.slice(0,s).replace(/\r$/,""),c=n[s]==="\r"&&n[s+1]===`
|
|
5
|
-
`?2:1;n=n.slice(s+c),o(i)}},flush(){let r=n.trimEnd();n="",r&&o(r)}}}a(ft,"createReadyLineParser");function mt(e){let t=e.indexOf(`
|
|
6
|
-
`),n=e.indexOf("\r");return t<0?n:n<0?t:Math.min(t,n)}a(mt,"nextLineEnd");var dn="OPENPOND_STORAGE_PROGRESS ";import{spawn as ht}from"node:child_process";function Re(e,t=process.platform){return t==="darwin"?{command:"open",args:[e]}:t==="win32"?{command:"rundll32.exe",args:["url.dll,FileProtocolHandler",e]}:{command:"xdg-open",args:[e]}}a(Re,"resolveSystemBrowserCommand");async function yt(e,t={}){let n=t.command??Re(e),o=t.handoffTimeoutMs??1500;return new Promise(r=>{let s=!1,i=null,c=a(g=>{s||(s=!0,i&&clearTimeout(i),r(g))},"finish"),m=ht(n.command,n.args,{detached:!1,shell:!1,stdio:"ignore",windowsHide:!0});m.once("error",g=>{let f=g.code;c({opened:!1,error:f?`browser launcher ${n.command} failed (${f})`:`browser launcher ${n.command} failed`})}),m.once("close",(g,f)=>{if(g===0){c({opened:!0});return}let w=f?`signal ${f}`:`code ${g??"unknown"}`;c({opened:!1,error:`browser launcher ${n.command} exited with ${w}`})}),i=setTimeout(()=>{m.unref(),c({opened:!0})},o),i.unref()})}a(yt,"openUrlWithSystemBrowser");import{createHash as At}from"node:crypto";function de(e){return At("sha256").update(JSON.stringify([e.accountState.activeProfile,e.apiBaseUrl,e.chatApiBaseUrl,e.token])).digest("hex")}a(de,"authorityKey");var W=null,F=null;async function gt(e){let t=de(e);if(W?.key===t&&W.expiresAt>Date.now())return W.response;if(F?.key===t)return F.promise;W=null;let n={key:t,promise:D(e.apiBaseUrl,e.token)};F=n;try{let o=await n.promise;return F===n&&o.account?.id&&(W={key:t,response:o,expiresAt:Date.now()+5e3}),o}finally{F===n&&(F=null)}}a(gt,"authenticate");async function Pt(){let e=await u();if(!e.token)return e;let t=await gt(e),n=await u();if(de(n)!==de(e))throw new Error("openpond_account_authority_changed");if(!t.account?.id)throw new Error("openpond_authenticated_owner_unavailable");return{...n,accountState:H({...n,accountResponse:t})}}a(Pt,"loadAuthenticatedOpenPondAccountContext");function wt(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id:null,o=typeof t.name=="string"?t.name:n;if(!n||!o)return null;let r=t.latestDeployment&&typeof t.latestDeployment=="object"?t.latestDeployment:null,s=xe.safeParse(t.sandboxActionRegistry);return{id:n,name:o,description:typeof t.description=="string"?t.description:null,visibility:typeof t.visibility=="string"?t.visibility:null,gitOwner:typeof t.gitOwner=="string"?t.gitOwner:null,gitRepo:typeof t.gitRepo=="string"?t.gitRepo:null,gitHost:typeof t.gitHost=="string"?t.gitHost:null,defaultBranch:typeof t.defaultBranch=="string"?t.defaultBranch:null,sandbox:t.sandbox===!0,sandboxActionRegistry:s.success?s.data:null,sandboxManifestHash:typeof t.sandboxManifestHash=="string"?t.sandboxManifestHash:null,sandboxManifestPath:typeof t.sandboxManifestPath=="string"?t.sandboxManifestPath:null,sandboxManifestSyncedAt:typeof t.sandboxManifestSyncedAt=="string"?t.sandboxManifestSyncedAt:t.sandboxManifestSyncedAt instanceof Date?t.sandboxManifestSyncedAt.toISOString():null,sandboxManifestError:typeof t.sandboxManifestError=="string"?t.sandboxManifestError:null,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:null,latestDeployment:r?{id:typeof r.id=="string"?r.id:void 0,status:typeof r.status=="string"?r.status:void 0,deploymentDomain:typeof r.deploymentDomain=="string"?r.deploymentDomain:null,createdAt:typeof r.createdAt=="string"?r.createdAt:void 0,isProduction:typeof r.isProduction=="boolean"?r.isProduction:null,gitBranch:typeof r.gitBranch=="string"?r.gitBranch:null}:null,scheduleSummary:xt(t.scheduleSummary)}}a(wt,"normalizeApp");function S(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}a(S,"normalizeDateString");function Ot(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id:null,o=typeof t.name=="string"?t.name:n,r=typeof t.deploymentId=="string"?t.deploymentId:null;return!n||!o||!r?null:{id:n,name:o,description:typeof t.description=="string"?t.description:null,scheduleType:typeof t.scheduleType=="string"?t.scheduleType:"cron",scheduleExpression:typeof t.scheduleExpression=="string"?t.scheduleExpression:"",enabled:!!t.enabled,rawEnabled:typeof t.rawEnabled=="boolean"?t.rawEnabled:void 0,syncStatus:typeof t.syncStatus=="string"?t.syncStatus:null,syncError:typeof t.syncError=="string"?t.syncError:null,startAt:S(t.startAt),endAt:S(t.endAt),maxRuns:typeof t.maxRuns=="number"?t.maxRuns:null,executionCount:typeof t.executionCount=="number"?t.executionCount:null,lifecycleStatus:typeof t.lifecycleStatus=="string"?t.lifecycleStatus:null,lifecycleReason:typeof t.lifecycleReason=="string"?t.lifecycleReason:null,lastExecutionAt:S(t.lastExecutionAt),lastExecutionStatus:typeof t.lastExecutionStatus=="string"?t.lastExecutionStatus:null,lastRunNowAt:S(t.lastRunNowAt),lastRunNowStatus:typeof t.lastRunNowStatus=="string"?t.lastRunNowStatus:null,updatedAt:S(t.updatedAt)??new Date().toISOString(),deploymentId:r,isProduction:typeof t.isProduction=="boolean"?t.isProduction:void 0,payload:t.payload}}a(Ot,"normalizeSchedule");function xt(e){if(!e||typeof e!="object")return null;let t=e,n=Array.isArray(t.schedules)?t.schedules.map(Ot).filter(i=>!!i):[],o=typeof t.total=="number"?t.total:n.length,r=typeof t.active=="number"?t.active:n.filter(i=>i.enabled).length,s=typeof t.paused=="number"?t.paused:Math.max(0,o-r);return{total:o,active:r,paused:s,enabled:typeof t.enabled=="number"?t.enabled:r,disabled:typeof t.disabled=="number"?t.disabled:s,nextRunAt:S(t.nextRunAt),lastRunAt:S(t.lastRunAt),schedules:n,truncated:typeof t.truncated=="boolean"?t.truncated:void 0}}a(xt,"normalizeScheduleSummary");async function bt(e){let t=Array.isArray(e.config.accounts)?e.config.accounts:[],n=await Promise.all(t.map(async o=>{let r=q(o.handle,o.baseUrl),s=Z(o);if(!s)return[r,{response:null,authFailed:!1,error:null}];try{return[r,{response:await D(Y(o,e.config),s),authFailed:!1,error:null}]}catch(i){return[r,{response:null,authFailed:!0,error:M(i)}]}}));return Object.fromEntries(n)}a(bt,"loadAccountProfileLookups");async function Te(e){let t=await bt(e),n=e.account?t[q(e.account.handle,e.account.baseUrl)]??null:null,o=n?.response??null,r=e.token&&n?.authFailed?n.error||"OpenPond account authentication failed.":null;return{account:H({...e,accountResponse:o,accountProfiles:t,authFailed:!!r,error:r})}}a(Te,"loadOpenPondAccountStateForContext");async function Ut(){return Te(await u())}a(Ut,"loadOpenPondAccountState");async function Ne(e={}){let t=await u(),n=Te(t);if(!t.token)return{...await n,apps:[],error:"No OpenPond API key or session token is configured."};let[o,r]=await Promise.allSettled([n,he(t.apiBaseUrl,t.token,{handle:t.account?.handle,limit:e.limit??20,offset:e.offset??0,includeScheduled:e.includeScheduled??!0})]);if(o.status==="rejected")throw o.reason;return{account:o.value.account,apps:r.status==="fulfilled"?r.value.map(wt).filter(s=>!!s):[],error:r.status==="rejected"?M(r.reason):null}}a(Ne,"loadOpenPondApps");async function kt(e){let t=await u();if(!t.token)throw new Error("No OpenPond API key or session token is configured.");return{account:t,response:await ye(t.apiBaseUrl,t.token,e)}}a(kt,"createOpenPondRepoApp");import{createHash as Et}from"node:crypto";function Bt(e){return`account-${Et("sha256").update(e).digest("hex").slice(0,8)}`}a(Bt,"fallbackHandleForApiKey");function te(e){let t=e?.trim();return t?t.replace(/^@/,""):null}a(te,"normalizeDerivedHandle");async function _t(e,t){let n=te(e.handle);if(n)return n;try{let r=(await D(t,e.apiKey)).account,s=te(r.handle)??te(r.email?.split("@")[0])??te(r.id);if(s)return s}catch{}return Bt(e.apiKey)}a(_t,"deriveHandleForApiKey");async function vt(e){let t=e.baseUrl??N,n=l(e.apiBaseUrl)??X(t)??E,o=l(e.chatApiBaseUrl),r=await _t(e,n);return await Oe({handle:r,apiKey:e.apiKey,baseUrl:t,apiBaseUrl:n,chatApiBaseUrl:o,environment:e.environment??"production",setActive:e.setActive}),u(r,t)}a(vt,"saveOpenPondAccount");function St(e,t,n){let o=l(n),r=e.findIndex(i=>P(i.handle,t)&&b(i.baseUrl,o));if(r!==-1)return r;let s=e.map((i,c)=>({account:i,index:c})).filter(({account:i})=>P(i.handle,t));if(s.length===1)return s[0].index;if(s.length>1)throw new Error(`Multiple OpenPond accounts match ${t}; select one with its base URL.`);return-1}a(St,"findAccountIndex");async function Ct(e){let t=e.handle.trim();if(!t)throw new Error("OpenPond account handle is required.");return await L(n=>{let o=(n.accounts??[]).map(m=>({...m})),r=St(o,t,e.baseUrl);if(r===-1)throw new Error(`OpenPond account not found: ${t}`);let s=o[r],i=A(n.activeProfile),c=!!(i&&U(s,i));o.splice(r,1),n.accounts=o,(c||!i||!o.some(m=>U(m,i)))&&(o[0]?n.activeProfile=v(o[0]):delete n.activeProfile)}),u()}a(Ct,"removeOpenPondAccount");async function It(){let e;return await L(t=>{let n=A(t.activeProfile),o=(t.accounts??[]).map(s=>({...s})),r=n?o.findIndex(s=>U(s,n)):0;if(r<0||!o[r])throw new Error("No active OpenPond account to log out.");e={...o[r]},delete e.apiKey,delete e.session,o[r]=e,t.accounts=o}),u(e.handle,e.baseUrl)}a(It,"signOutOpenPondAccount");function Rt(e,t,n){let o=l(n),r=e.findIndex(i=>P(i.handle,t)&&b(i.baseUrl,o));if(r!==-1)return r;let s=e.map((i,c)=>({account:i,index:c})).filter(({account:i})=>P(i.handle,t));if(s.length===1)return s[0].index;if(s.length>1)throw new Error(`Multiple OpenPond accounts match ${t}; select one with its current base URL.`);return-1}a(Rt,"findAccountIndex");function pe(e,t,n){if(n===void 0)return;let o=l(n);if(o){e[t]=o;return}(n===null||n.trim()==="")&&delete e[t]}a(pe,"applyOptionalUrl");async function Tt(e){let t=e.handle.trim();if(!t)throw new Error("OpenPond account handle is required.");let n;return await L(o=>{let r=(o.accounts??[]).map(f=>({...f})),s=Rt(r,t,e.currentBaseUrl);if(s===-1)throw new Error(`OpenPond account not found: ${t}`);let i=r[s];if(n={...i},e.apiKey!==void 0){let f=e.apiKey.trim();if(!f)throw new Error("OpenPond API key cannot be empty.");n.apiKey=f,delete n.session,delete n.token}if(pe(n,"baseUrl",e.baseUrl),pe(n,"apiBaseUrl",e.apiBaseUrl),pe(n,"chatApiBaseUrl",e.chatApiBaseUrl),e.environment===null?delete n.environment:typeof e.environment=="string"&&e.environment.trim()&&(n.environment=e.environment.trim()),r.findIndex((f,w)=>w!==s&&P(f.handle,n.handle)&&b(f.baseUrl,n.baseUrl))!==-1)throw new Error("Another OpenPond account already uses that handle and base URL.");let m=A(o.activeProfile),g=!!(m&&U(i,m));r[s]=n,o.accounts=r,o.activeProfile=e.setActive||g?v(n):o.activeProfile}),u(n.handle,n.baseUrl)}a(Tt,"updateOpenPondAccountConfig");async function Nt(e){let t=await u();if(!t.token)throw new Error("OpenPond is signed out. Add an account before reading app config.");return Ae(t.apiBaseUrl,t.token,e.appId)}a(Nt,"getOpenPondAppEnvironment");export{u as a,We as b,Pt as c,Ut as d,Ne as e,kt as f,Qe as g,Ze as h,et as i,Ce as j,vt as k,Ct as l,It as m,Tt as n,Nt as o,pt as p,ft as q,dn as r,yt as s};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as b}from"./chunk-CLFYRN46.js";import{b as P}from"./chunk-ELYRVTTG.js";import{b as _}from"./chunk-Q324ZA5M.js";import{g as h}from"./chunk-FJ3HMHT6.js";import{r as x}from"./chunk-D5ADDBS5.js";import{h as T}from"./chunk-CN5OXQ7A.js";import{h as E,j as I,k as y}from"./chunk-UWHIU24L.js";import{F as w}from"./chunk-6DCXAXVD.js";import{a as l}from"./chunk-FTQLQJQV.js";function L(e){let a=e.result.proposal,d=a?.edits.find(t=>t.target!=="harness.json")??a?.edits[0]??null,c=e.result.outcome.metadata.routed===!0,n=a?e.result.applyReceipt?.decision==="applied"?"applied":"retained":c?"routed":"no_action",r=a?.baseHarnessRelease??e.trigger.harnessRelease,o=n==="applied"?e.result.advanceReceipt?.nextRelease??r:null;return{schemaVersion:"openpond.localHarnessRefinerActivityDisplay.v1",visibility:C(e.session)?"always":"material_only",state:"completed",workspaceId:e.result.workspace.id,result:n,decision:a?"propose":c?"route":"no_action",route:a?.route??g(e.result.outcome.metadata.route),operation:d?.operation??null,target:d?.target??null,summary:d?.summary??g(e.result.outcome.metadata.summary)??U(n,a?.route??g(e.result.outcome.metadata.route)),expectedOutcome:a?.expectedOutcome??g(e.result.outcome.metadata.expectedOutcome),reason:e.result.outcome.reason,evidenceBasis:B(e.result),critiqueStatus:a?"passed":"not_applicable",validationStatus:W(e.result),validationReceipts:e.result.validations.map(t=>({id:t.id,contentHash:t.contentHash,status:t.status,summary:t.summary})),edits:a?.edits.map(t=>({id:t.id,operation:t.operation,target:t.target,summary:t.summary,content:t.content}))??[],trigger:{id:e.trigger.id,contentHash:e.trigger.contentHash},outcome:{id:e.result.outcome.id,contentHash:e.result.outcome.contentHash},proposal:a?{id:a.id,contentHash:a.contentHash}:null,applyReceipt:e.result.applyReceipt?{id:e.result.applyReceipt.id,contentHash:e.result.applyReceipt.contentHash}:null,advanceReceipt:e.result.advanceReceipt?{id:e.result.advanceReceipt.id,contentHash:e.result.advanceReceipt.contentHash}:null,inputHarness:r,outputHarness:o}}l(L,"localHarnessRefinerActivityDisplay");function B(e){let a=e.proposal?.metadata.evidenceBasis??e.outcome.metadata.evidenceBasis,d=E.safeParse(a);return d.success?d.data:null}l(B,"evidenceBasisFromResult");function W(e){if(!e.proposal)return"not_applicable";let a=new Map(e.validations.map(c=>[c.validationId,c])),d=e.proposal.validationPlan.filter(c=>c.required);return d.some(c=>!a.has(c.id))?"pending":d.every(c=>a.get(c.id)?.status==="passed")?"passed":"failed"}l(W,"proposalValidationStatus");function C(e){return e.metadata?.automatedTasksetWorkAttempt===!0||typeof e.metadata?.tasksetId=="string"||typeof e.metadata?.benchmarkRuntime=="string"}l(C,"isEvaluationSession");function g(e){return typeof e=="string"&&e.trim()?e.trim():null}l(g,"stringMetadata");function U(e,a){return e==="no_action"?"No reusable change":e==="routed"?a?`${k(a)} issue routed`:"Issue routed":e==="applied"?a?`${k(a)} change`:"Harness change":a?`${k(a)} change`:"Harness change"}l(U,"resultSummary");function k(e){return e.length>0?`${e[0].toUpperCase()}${e.slice(1)}`:e}l(k,"titleCase");function G(e){let a=new Set,d=l((async function(n){if(q(n.session))return;let r=await b({store:e.store,...n});if(!r)return;let o=r.trigger;if(o.decision==="route_deterministically"&&o.deterministicRoute){let t=T({schemaVersion:"openpond.improvementRouteDecision.v1",id:`route-${o.contentHash.slice(0,24)}`,trigger:{id:o.id,contentHash:o.contentHash},route:o.deterministicRoute,authority:"runtime_service",automatic:!0,reason:o.reason,createdAt:o.createdAt,metadata:{}});await e.store.saveHarnessImprovementArtifact(n.turn.harnessSnapshot.workspaceId,"route_decision",t);return}o.decision==="queue_refiner"&&await c(n,o,!1)}),"processLocalHarnessImprovementBoundary");async function c(n,r,o){if(r.decision!=="queue_refiner")throw new Error("Only queued Harness Refiner triggers can be enqueued.");if(a.has(r.contentHash))return;a.add(r.contentHash);let t=Date.now();try{await e.appendRuntimeEvent(h({sessionId:n.session.id,turnId:n.turn.id,name:"harness.refiner.queued",source:"server",appId:n.session.appId,status:"pending",output:r.reason,data:{triggerId:r.id,timeoutMs:I,maxOutputTokens:y,execution:"public_package",recoveredAfterRestart:o,activity:{schemaVersion:"openpond.localHarnessRefinerActivityDisplay.v1",visibility:D(n.session),state:"running",summary:"Reviewing this Work for a reusable improvement"}}}))}catch(f){throw a.delete(r.contentHash),f}e.queue.enqueue({label:"Refine the Local Harness from a recovered execution detour",metadata:{key:r.contentHash,sessionId:n.session.id,turnId:n.turn.id,triggerId:r.id,recoveredAfterRestart:o}},async()=>{let f=0,p=Date.now(),u=null,i=null;try{await e.appendRuntimeEvent(h({sessionId:n.session.id,turnId:n.turn.id,name:"harness.refiner.started",source:"server",appId:n.session.appId,status:"started",data:{triggerId:r.id,queueWaitMs:Math.max(0,p-t),timeoutMs:I,maxOutputTokens:y,execution:"public_package",recoveredAfterRestart:o,activity:{schemaVersion:"openpond.localHarnessRefinerActivityDisplay.v1",visibility:D(n.session),state:"running",summary:"Reviewing this Work for a reusable improvement"}}})),await e.prepareReview?.(r);let s=await P({store:e.store,storeDir:e.storeDir,loadActiveRefinerRelease:e.loadActiveRefinerRelease,trigger:r,signal:new AbortController().signal,stream:l(async function*({messages:O,signal:S}){u===null&&(u=Date.now());let M=f++,A=`harness-refiner:${r.id}:${M}`,v=await _({session:n.session,turn:n.turn,provider:"openpond",model:w,requestId:A,requestOrdinal:M,requestKind:"harness_refiner",upsert:e.upsertModelUsageRecord});try{for await(let m of e.streamOpenPondHostedChatTurn({model:w,messages:O,requestId:A,reasoningEffort:"low",maxTokens:y,signal:S}))m.type==="text_delta"&&m.text?(v.observeDelta({text:m.text}),yield{text:m.text}):m.type==="reasoning_delta"&&m.text?v.observeDelta({reasoningText:m.text}):m.type==="usage"&&v.observeDelta({usage:m.usage});await v.complete(),i=Date.now()}catch(m){throw i=Date.now(),await v.fail(m,S.aborted?"interrupted":"failed"),m}},"stream")}),R=Date.now(),H=L({session:n.session,trigger:r,result:s});await e.appendRuntimeEvent(h({sessionId:n.session.id,turnId:n.turn.id,name:"harness.refiner.completed",source:"server",appId:n.session.appId,status:"completed",output:s.outcome.reason,data:{recoveredAfterRestart:o,trigger:{id:r.id,contentHash:r.contentHash},outcome:{id:s.outcome.id,contentHash:s.outcome.contentHash,decision:s.outcome.decision,routed:s.outcome.metadata.routed===!0,route:typeof s.outcome.metadata.route=="string"?s.outcome.metadata.route:null},proposal:s.proposal?{id:s.proposal.id,contentHash:s.proposal.contentHash}:null,workspaceAdvance:s.advanceReceipt?.decision??null,activity:H,timing:{queueWaitMs:Math.max(0,p-t),modelDurationMs:u===null||i===null?null:Math.max(0,i-u),materializationDurationMs:i===null?null:Math.max(0,R-i),totalJobDurationMs:Math.max(0,R-p)}}}))}catch(s){let R=Date.now();throw await e.appendRuntimeEvent(h({sessionId:n.session.id,turnId:n.turn.id,name:"harness.refiner.failed",source:"server",appId:n.session.appId,status:"failed",output:s instanceof Error?s.message:String(s),data:{triggerId:r.id,recoveredAfterRestart:o,activity:{schemaVersion:"openpond.localHarnessRefinerActivityDisplay.v1",visibility:D(n.session),state:"failed",summary:"Refiner review failed",reason:s instanceof Error?s.message:String(s)},timing:{queueWaitMs:Math.max(0,p-t),modelDurationMs:u===null||i===null?null:Math.max(0,i-u),totalJobDurationMs:Math.max(0,R-p)}}})).catch(()=>{}),s}finally{a.delete(r.contentHash)}})}return l(c,"enqueueTrigger"),d.reconcilePending=async()=>{let n=await e.store.listPendingHarnessRefinerTriggers(),r=0;for(let{workspaceId:o,trigger:t}of n){let[f,p]=await Promise.all([e.store.getSession(t.runRef),e.store.getTurn(t.turnId)]);if(!f||!p||p.sessionId!==f.id)throw new Error(`Pending Harness Refiner trigger ${t.id} references an unavailable session or turn.`);if(q(f))continue;let u=p;if(!u.harnessSnapshot){let[i,s]=await Promise.all([e.store.getHarnessWorkspace(o),e.store.getHarnessRunOverlay(t.runRef)]),R=!!(i&&s&&t.overlay&&s.id===t.overlay.id&&s.revision===t.overlay.revision&&s.contentHash===t.overlay.contentHash&&s.workspace.workspaceId===o&&s.workspace.revision===i.revision&&s.workspace.sourceRevision===i.sourceRevision&&s.workspace.channelRevision===i.currentChannel.revision&&s.baseHarnessRelease.id===t.harnessRelease.id&&s.baseHarnessRelease.contentHash===t.harnessRelease.contentHash);if(!i||!s||!t.overlay||!R)throw new Error(`Pending Harness Refiner trigger ${t.id} cannot reconstruct its missing Harness snapshot.`);u=await e.store.updateTurn(u.id,H=>x.parse({...H,harnessSnapshot:{schemaVersion:"openpond.harnessTurnSnapshot.v1",workspaceId:o,workspaceRevision:s.workspace.revision,sourceRevision:s.workspace.sourceRevision,channelName:i.currentChannel.name,channelRevision:s.workspace.channelRevision,harnessRelease:t.harnessRelease,overlay:t.overlay}}))??u}if(u.harnessSnapshot?.workspaceId!==o)throw new Error(`Pending Harness Refiner trigger ${t.id} no longer matches its Harness workspace.`);await c({session:f,turn:u},t,!0),r+=1}return r},d}l(G,"createLocalHarnessImprovementRuntime");function q(e){return e.metadata?.source==="experiment-improvement"&&typeof e.metadata.refinementCandidate=="object"?!0:e.metadata?.automatedTasksetWorkAttempt===!0&&typeof e.metadata.parentModelRunId=="string"&&e.metadata.parentModelRunId.trim().length>0}l(q,"parentModelRunOwnsRefinement");function D(e){return e.metadata?.automatedTasksetWorkAttempt===!0||typeof e.metadata?.tasksetId=="string"||typeof e.metadata?.benchmarkRuntime=="string"?"always":"material_only"}l(D,"refinerActivityVisibility");export{G as a};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{d as t,e as s}from"./chunk-YR5ID2SS.js";import{a as e}from"./chunk-FTQLQJQV.js";function p(n){let r=n.trim().replace(/\/$/,"");if(!r)throw new Error("sandbox API URL must be non-empty");let i=new URL(r),o=i.pathname.replace(/\/$/,"");return o.endsWith("/v1/sandboxes")||o.endsWith("/api/sandboxes")?`${i.origin}${o}`:o.endsWith("/v1")?`${i.origin}${o}/sandboxes`:a(i.hostname)?`${i.origin}${o}/v1/sandboxes`:i.origin===t?`${s}/v1/sandboxes`:`${i.origin}${o}/api/sandboxes`}e(p,"normalizeSandboxApiUrl");function u(n){let r="/sandboxes";if(!n.endsWith(r))throw new Error("sandbox API URL must end with /sandboxes");return n.slice(0,-r.length)}e(u,"apiRootUrlFromSandboxApiUrl");function a(n){return n==="api.openpond.ai"||n==="staging-api.openpond.ai"||n.startsWith("api")&&n.endsWith(".openpond.ai")}e(a,"isOpenPondHostedApiHost");export{p as a,u as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i as a,j as b,k as c}from"./chunk-P4XM7LUT.js";import"./chunk-BWY4D3BN.js";import"./chunk-T4LLJC5N.js";import"./chunk-HIYQPZ7C.js";import"./chunk-I3W27VK4.js";import"./chunk-BDCTN4PU.js";import"./chunk-R4PDSOB4.js";import"./chunk-TTN63EAM.js";import"./chunk-TH6Y4K5Z.js";import"./chunk-MHYI7ATG.js";import"./chunk-5MTN6KXV.js";import"./chunk-3DVWJCOA.js";import"./chunk-ZBBVRYU3.js";import"./chunk-FJ3HMHT6.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-4LZLO4OW.js";import"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-UBCLPZSQ.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-LNRFRAV5.js";import"./chunk-2ITZW2CN.js";import"./chunk-CQF6QZEL.js";import"./chunk-D5ADDBS5.js";import"./chunk-QRJPLZF7.js";import"./chunk-PWK5Z5S3.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-OZ6LRNRE.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-TMMFF6DO.js";import"./chunk-BQUWZRWU.js";import"./chunk-BFKYRQMA.js";import"./chunk-SGK4GR44.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-CM5USMXN.js";import"./chunk-WFVOG5PU.js";import"./chunk-XGY4OQLC.js";import"./chunk-VWJ5IYQP.js";import"./chunk-E67M5WGY.js";import"./chunk-PCB65K4G.js";import"./chunk-4N3UF3U5.js";import"./chunk-HZLV773Y.js";import"./chunk-M4ZRCRJM.js";import"./chunk-VNJAAYNQ.js";import"./chunk-XK7SPL63.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-6FA3GG5B.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as resolveWebLaunchMessages,c as runOpenPondAppServerCli,b as runOpenPondServerCli};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-DW3GJRY3.js";import"./chunk-ZBBVRYU3.js";import"./chunk-UBCLPZSQ.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-LNRFRAV5.js";import"./chunk-2ITZW2CN.js";import"./chunk-CQF6QZEL.js";import"./chunk-D5ADDBS5.js";import"./chunk-QRJPLZF7.js";import"./chunk-PWK5Z5S3.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-OZ6LRNRE.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-TMMFF6DO.js";import"./chunk-BQUWZRWU.js";import"./chunk-BFKYRQMA.js";import"./chunk-SGK4GR44.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-CM5USMXN.js";import"./chunk-WFVOG5PU.js";import"./chunk-XGY4OQLC.js";import"./chunk-VWJ5IYQP.js";import"./chunk-E67M5WGY.js";import"./chunk-PCB65K4G.js";import"./chunk-4N3UF3U5.js";import"./chunk-HZLV773Y.js";import"./chunk-M4ZRCRJM.js";import"./chunk-VNJAAYNQ.js";import"./chunk-XK7SPL63.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-FWIPHEVA.js";import"./chunk-ZZWAQBA2.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-6FA3GG5B.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as DEFAULT_CONNECTED_APP_TOOL_PATH,b as createCloudConnectedAppToolExecutor,c as resolveCloudConnectedAppToolTarget};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as p,b as u}from"./chunk-QDBYLJGH.js";import"./chunk-Q66LWQGF.js";import"./chunk-TNHDD3LO.js";import"./chunk-KC7I6E6W.js";import"./chunk-HN2ZK6EV.js";import"./chunk-UJBEWIR3.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c}from"./chunk-3M53YXEI.js";import"./chunk-TYHCBVQT.js";import{p as w}from"./chunk-VSUHJ46L.js";import"./chunk-FWIPHEVA.js";import"./chunk-BT5YNE5U.js";import"./chunk-OJFDI7VM.js";import"./chunk-QCSLEMZF.js";import"./chunk-4RHM4WN2.js";import"./chunk-BLKTUFGB.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-YBNKGA5C.js";import"./chunk-ZZWAQBA2.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import{A as l}from"./chunk-PF56N7ZY.js";import{a as n}from"./chunk-FTQLQJQV.js";async function g(r,d){let[o,s]=d;if(!o||d.length>2)throw new Error("usage: connected-evidence <list|collection|recorded-list|recorded|import-receipt|capture-assets|retain-assets|starting-assets|summary|case|unmapped|capture|selection|publish|prepare-recorded|upload-part|preview|commit|set-collection> [id] --team <id> [--input-file <path>]");if(c(r,"project")&&!["list","recorded-list"].includes(o))throw new Error("--project filters list commands; other operations retain their exact Project in --input-file.");if(r.local===!0||r.local==="true")throw new Error("Connected evidence is retained by its hosted source owner; select --api-base-url for that owner.");if(s&&!["recorded","import-receipt","starting-assets"].includes(o))throw new Error("This operation does not accept a resource id.");let a=new w(await u(r)),t=AbortSignal.timeout(6e4),m={...c(r,"project")?{projectId:c(r,"project")}:{},...c(r,"cursor")?{cursor:c(r,"cursor")}:{},limit:Number(c(r,"limit")||20)},i=n(async()=>p(r),"input"),e;switch(o){case"list":e=await a.list(m,t);break;case"recorded-list":e=await a.listRecordedExecutions(m,t);break;case"collection":e=await a.collection(t);break;case"recorded":if(!s)throw new Error("Select a recorded execution id.");e=await a.recordedExecution(s,t);break;case"import-receipt":if(!s)throw new Error("Select the original import operation id.");e=await a.readImport(s,t);break;case"retain-assets":e=await a.retainStartingAssets(await p(r,15*1024*1024),t);break;case"capture-assets":e=await(await import("./connected-starting-assets-OXLT7S4O.js")).captureConnectedStartingAssets(r,a,t);break;case"starting-assets":if(!s)throw new Error("Select a retained starting assets id.");e=await a.startingAssets(s,t);break;case"summary":e=await a.homeSummary(await i(),t);break;case"case":e=await a.read(await i(),t);break;case"unmapped":e=await a.unmappedEvents(await i(),t);break;case"capture":e=await a.capture(await i(),t);break;case"selection":e=await a.createSelection(await i(),t);break;case"publish":e=await a.publishDataset(await i(),t);break;case"prepare-recorded":e=await a.prepareRecorded(await i(),t);break;case"upload-part":e=await a.uploadPart(await i(),t);break;case"preview":e=await a.preview(await i(),t);break;case"commit":e=await a.commit(await i(),t);break;case"set-collection":e=await a.setCollection(l.object({paused:l.boolean()}).strict().parse(await i()).paused,t);break;default:throw new Error("Unknown connected evidence operation.")}console.log(JSON.stringify(e,null,2))}n(g,"runConnectedEvidenceCommand");export{g as runConnectedEvidenceCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-VBW2X42G.js";import"./chunk-Q66LWQGF.js";import"./chunk-TNHDD3LO.js";import"./chunk-HN2ZK6EV.js";import"./chunk-UJBEWIR3.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-TYHCBVQT.js";import"./chunk-VSUHJ46L.js";import"./chunk-FWIPHEVA.js";import"./chunk-BT5YNE5U.js";import"./chunk-OJFDI7VM.js";import"./chunk-QCSLEMZF.js";import"./chunk-4RHM4WN2.js";import"./chunk-BLKTUFGB.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-YBNKGA5C.js";import"./chunk-ZZWAQBA2.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-YR5ID2SS.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{m as resolveGitBranch,f as runAccount,j as runBacktestRun,p as runCheckUpdate,k as runDeployWatch,g as runHealth,d as runLogin,o as runOpentool,e as runProfiles,l as runRepoCreate,n as runRepoPush,b as runTemplateBranches,a as runTemplateStatus,c as runTemplateUpdate,h as runToolList,i as runToolRun};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as w,b}from"./chunk-ZISYLRH6.js";import{a as m}from"./chunk-L3GA2CQI.js";import"./chunk-UBCLPZSQ.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-LNRFRAV5.js";import"./chunk-2ITZW2CN.js";import"./chunk-CQF6QZEL.js";import"./chunk-D5ADDBS5.js";import"./chunk-QRJPLZF7.js";import"./chunk-PWK5Z5S3.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-OZ6LRNRE.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-TMMFF6DO.js";import"./chunk-BQUWZRWU.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-CM5USMXN.js";import"./chunk-WFVOG5PU.js";import"./chunk-XGY4OQLC.js";import{c as h}from"./chunk-VWJ5IYQP.js";import"./chunk-E67M5WGY.js";import"./chunk-PCB65K4G.js";import"./chunk-4N3UF3U5.js";import"./chunk-HZLV773Y.js";import"./chunk-M4ZRCRJM.js";import"./chunk-VNJAAYNQ.js";import"./chunk-XK7SPL63.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-6FA3GG5B.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as f}from"./chunk-FTQLQJQV.js";import{constants as g}from"node:fs";import{open as y,realpath as D}from"node:fs/promises";import k from"node:path";async function x(i){if(i.length!==1||!k.isAbsolute(i[0]))throw new Error("Dataset preparation requires one absolute private request-file path.");let o=i[0];if(await D(o)!==o)throw new Error("Dataset preparation request path must not contain symbolic links.");let s=await y(o,g.O_RDONLY|g.O_NOFOLLOW),n=4*1024*1024,l;try{let r=await s.stat();if(!r.isFile()||r.size>n||(r.mode&63)!==0||process.getuid&&r.uid!==process.getuid())throw new Error("Dataset preparation request is not a bounded private file.");let a=Buffer.alloc(n+1),e=0;for(;e<a.length;){let d=await s.read(a,e,a.length-e,e);if(d.bytesRead===0)break;e+=d.bytesRead}if(e>n)throw new Error("Dataset preparation request changed beyond its byte limit.");l=a.subarray(0,e)}finally{await s.close()}let t=h.parse(JSON.parse(new TextDecoder("utf8",{fatal:!0}).decode(l))),c=await m(),p;try{p=t.action==="messages"?{messages:w({id:t.id,evidence:t.evidence,skillText:c.bundle,buildIntent:"verifiable_reward",buildSpecification:t.buildSpecification,methodHint:"grpo",instruction:t.instruction,currentProposal:t.currentProposal}),skillHash:c.contentHash}:{proposal:b(t.content,t.evidence),skillHash:c.contentHash}}catch(r){if(t.action!=="validate")throw r;process.stdout.write(`${JSON.stringify({error:{code:"dataset_preparation_authoring_proposal_invalid"}})}
|
|
3
|
-
`),process.exitCode=2;return}let u=JSON.stringify(p);if(Buffer.byteLength(u)>4*1024*1024)throw new Error("Dataset preparation authoring response exceeds its byte limit.");process.stdout.write(`${u}
|
|
4
|
-
`)}f(x,"runDatasetPreparationAuthoringCli");export{x as runDatasetPreparationAuthoringCli};
|