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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as R,c as p,d as m}from"./chunk-4BJGUCHY.js";import{a as v}from"./chunk-SXMR6E2W.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import"./chunk-MTP3B2SU.js";import{w as O}from"./chunk-OTUBJV6C.js";import"./chunk-27JGS3KB.js";import{d as P}from"./chunk-UTNGEMW5.js";import"./chunk-U2K7QJCG.js";import"./chunk-WSOUMXH3.js";import"./chunk-N42HT64M.js";import"./chunk-NG2L6D7G.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-JCLTFDVW.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import{promises as $,watch as C}from"node:fs";import y from"node:path";import{execFile as J}from"node:child_process";import{promisify as k}from"node:util";var K=k(J);async function G(t,n){let e=n[0]??"check",o=y.resolve(i(t,"cwd")??process.cwd()),l=i(t,"sourceDirectory"),u=i(t,"outputDirectory"),d=b(t.json);if(e==="check"||e==="build"){let r=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u});if(d){console.log(JSON.stringify({status:"passed",actionCount:r.registry.actions.length,registry:r.registry,manifest:r.manifest,outputDirectory:r.outputDirectory},null,2));return}console.log(`${e==="check"?"Validated":"Built"} ${r.registry.actions.length} Project Action${r.registry.actions.length===1?"":"s"}.`),console.log(`Registry: ${r.registryPath}`),console.log(`Bundle: ${r.bundlePath}`);return}if(e==="run"){let r=n[1];if(!r)throw new Error("usage: openpond actions run <action-id> [--input JSON|--input-file PATH]");let a=await m({projectRoot:o,sourceDirectory:l,outputDirectory:u,build:"always"}).run({actionId:r,input:await I(t,o),timeoutMs:A(t,"timeoutMs")});console.log(JSON.stringify(a,null,2));return}if(e==="dev"){let r=n[1]??null;await _({projectRoot:o,sourceDirectory:l,outputDirectory:u,actionId:r,options:t,json:d});return}if(e==="publish"){let r=j(t,"projectId"),s=j(t,"teamId"),a=i(t,"apiKey"),w=process.env.OPENPOND_API_KEY?.trim()||null,g=a||w?null:await P({account:i(t,"account")}),h=a??w??(g?v(g):null);if(!h)throw new Error("OpenPond API key is required. Select a saved OpenPond account, set OPENPOND_API_KEY, or pass --api-key.");let N=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u}),E=i(t,"sourceCommitSha")??await D(o,["rev-parse","HEAD"]),S=i(t,"sourceRef")??await D(o,["rev-parse","--abbrev-ref","HEAD"]),f=await O({apiKey:h,baseUrl:i(t,"baseUrl")??(process.env.OPENPOND_API_URL?.trim()||g?.apiBaseUrl)}).actions.publish({projectId:r,teamId:s,sourceRef:S,sourceCommitSha:E,build:N});console.log(d?JSON.stringify({release:f},null,2):`Published Project Actions release ${f.id} from ${f.sourceCommitSha}.`);return}throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]")}c(G,"runProjectActionsCommand");async function _(t){let n=!1,e=!1,o=c(async()=>{if(n){e=!0;return}n=!0;try{let r=m({projectRoot:t.projectRoot,sourceDirectory:t.sourceDirectory,outputDirectory:t.outputDirectory,build:"always"});if(t.actionId){let s=await r.run({actionId:t.actionId,input:await I(t.options,t.projectRoot),timeoutMs:A(t.options,"timeoutMs")});console.log(JSON.stringify(s,null,2))}else{let s=await r.build(),a={status:"ready",actionCount:s.registry.actions.length,bundleHash:s.manifest.bundleHash};console.log(t.json?JSON.stringify(a):`Ready with ${a.actionCount} Project Action${a.actionCount===1?"":"s"}.`)}}catch(r){console.error(r instanceof Error?r.message:String(r))}finally{n=!1,e&&(e=!1,await o())}},"execute");await o();let l=await R(t.projectRoot),u=y.resolve(t.projectRoot,t.sourceDirectory??l.sourceDirectory??"openpond/actions");console.log(`Watching ${u}`);let d=C(u,{recursive:!0},()=>{setTimeout(()=>{o()},50)});await new Promise(r=>{let s=c(()=>{d.close(),r()},"stop");process.once("SIGINT",s),process.once("SIGTERM",s)})}c(_,"runDev");async function I(t,n){let e=i(t,"input"),o=i(t,"inputFile");if(e&&o)throw new Error("Use either --input or --input-file, not both.");return e?JSON.parse(e):o?JSON.parse(await $.readFile(y.resolve(n,o),"utf8")):{}}c(I,"actionInput");function i(t,n){let e=t[n];return typeof e=="string"&&e.trim()?e.trim():void 0}c(i,"stringOption");function j(t,n){let e=i(t,n);if(!e)throw new Error(`--${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)} is required.`);return e}c(j,"requiredOption");async function D(t,n){let{stdout:e}=await K("git",n,{cwd:t}),o=e.trim();if(!o)throw new Error(`git ${n.join(" ")} returned no value.`);return o}c(D,"gitValue");function A(t,n){let e=i(t,n);if(e===void 0)return;let o=Number(e);if(!Number.isInteger(o)||o<=0)throw new Error(`--${n} must be a positive integer.`);return o}c(A,"integerOption");export{G as runProjectActionsCommand};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{u as m}from"./chunk-
|
|
2
|
+
import{u as m}from"./chunk-GPL2Z65R.js";import"./chunk-SXMR6E2W.js";import{a as l}from"./chunk-2HAWOMZK.js";import"./chunk-SFKZITAG.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-MILEWROZ.js";import"./chunk-OTUBJV6C.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-UTNGEMW5.js";import"./chunk-U2K7QJCG.js";import"./chunk-WSOUMXH3.js";import"./chunk-N42HT64M.js";import"./chunk-NG2L6D7G.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-JCLTFDVW.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{existsSync as c}from"node:fs";import{createRequire as v}from"node:module";import s from"node:path";import{fileURLToPath as E}from"node:url";var p="24.18.0";function N(e=process.versions.node){let r=/^(\d+)\.(\d+)\.(\d+)/.exec(e),n=r?Number(r[1]):Number.NaN,o=r?Number(r[2]):Number.NaN;return n===24&&o>=18?null:[`OpenPond TUI requires Node.js ${p} or newer in the Node 24 release line; detected Node.js ${e}.`,`Switch Node versions and retry (with nvm: \`nvm install ${p} && nvm use ${p}\`).`].join(`
|
|
3
3
|
`)}i(N,"openPondTuiNodeRuntimeMessage");var u=s.dirname(E(import.meta.url)),O=class extends Error{constructor(n,o){super(n);this.exitCode=o;this.name="OpenPondChildProcessExitError"}exitCode;static{i(this,"OpenPondChildProcessExitError")}};async function F(e,r,n){let o=f(e==="app-server"?"app-server":"server"),t=[...o.args,e,...P(r),...n];e==="web"&&t.push(r.noOpen===!0||r.noOpen==="true"?"--print-access-url":"--open-browser");let a=e==="web"&&typeof r.webRoot!="string"?C():null;a&&t.push("--web-root",a),await w(o.runner,t,e==="app-server"?process.cwd():o.cwd)}i(F,"runOpenPondServerCommand");async function q(e,r){b(e);let n=N();if(n)throw new l(n);let o=f("terminal"),t=f("server"),a=[...o.args,"chat",...P(R(e)),...r];await w(o.runner,a,process.cwd(),{OPENPOND_SERVER_RUNNER:t.runner,OPENPOND_SERVER_ARGS:JSON.stringify(t.args),OPENPOND_SERVER_CWD:t.cwd})}i(q,"runOpenPondTerminalCommand");function h(){if(process.env.OPENPOND_FORCE_EMBEDDED_COMPANIONS==="1")return null;let e=[s.resolve(u,"../../../.."),s.resolve(u,"../../.."),process.cwd()];for(let r of e)if(c(s.join(r,"apps","server"))&&c(s.join(r,"apps","terminal")))return r;return null}i(h,"findWorkspaceRoot");function f(e){let r=h();if(r){let t=e==="app-server"?s.join(r,"apps","server","src","app-server-entry.ts"):s.join(r,"apps",e,"src","index.ts");if(c(t)){let d=v(s.join(r,"package.json"));return{runner:process.execPath,args:[d.resolve("tsx/cli"),t],cwd:r}}let a=e==="app-server"?s.join(r,"apps","server","dist","app-server-entry.js"):s.join(r,"apps",e,"dist","index.js");if(c(a))return{runner:process.execPath,args:[a],cwd:r}}let n=_(),o=e==="app-server"?"__app-server":e==="server"?"__server":"__terminal";if(n)return{runner:process.execPath,args:[n,o],cwd:s.dirname(s.dirname(n))};if(D())return{runner:process.execPath,args:[o],cwd:process.cwd()};throw new Error(`Could not find the installed OpenPond ${e} companion.`)}i(f,"resolveAppEntrypoint");function _(){for(let e of[s.resolve(u,"../cli.js"),s.resolve(u,"../../dist/cli.js")])if(c(e))return e;return null}i(_,"installedCliEntrypoint");function C(){if(!1){let n=s.join(s.dirname(process.execPath),"web");return c(s.join(n,"index.html"))?n:null}let e=_();if(!e)return null;let r=s.join(s.dirname(e),"web");return c(s.join(r,"index.html"))?r:null}i(C,"packagedWebRoot");function D(){if(!1)return!0;let e=process.argv[1];return!!(e&&s.resolve(e)===s.resolve(process.execPath))}i(D,"isCompiledExecutable");function P(e){let r=new Set(["account","handle","baseUrl","noOpen","tui","home"]),n=[];for(let[o,t]of Object.entries(e)){if(r.has(o))continue;let a=`--${o.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`)}`;if(t===!0||t==="true")n.push(a);else{if(t===!1||t==="false")continue;n.push(a,t)}}return n}i(P,"forwardedOptions");function R(e){let r=process.cwd(),n={...e};return typeof e.cwd=="string"&&e.cwd.trim().length>0&&(n.cwd=s.resolve(r,e.cwd)),typeof e.messageFile=="string"&&e.messageFile.trim().length>0&&(n.messageFile=s.resolve(r,e.messageFile)),n}i(R,"normalizeTerminalPaths");function b(e){if(typeof e.approvalPolicy=="string"&&!["on-request","never","on-failure","untrusted"].includes(e.approvalPolicy))throw new l("approval-policy must be on-request, never, on-failure, or untrusted");if(typeof e.sandbox=="string"&&!["read-only","workspace-write","danger-full-access"].includes(e.sandbox))throw new l("sandbox must be read-only, workspace-write, or danger-full-access")}i(b,"validateTerminalForwardingOptions");async function w(e,r,n,o){let t=await m(e,r,{cwd:n,detached:!1,env:o,inherit:!0,timeoutMs:0});if(t.code!==0||t.signal){let a=t.signal?`signal ${t.signal}`:`code ${t.code??"unknown"}`;throw new O(`${s.basename(e)} exited with ${a}`,t.code??1)}}i(w,"runChild");export{O as OpenPondChildProcessExitError,F as runOpenPondServerCommand,q as runOpenPondTerminalCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as u}from"./chunk-WWQNMC7C.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import{b as m}from"./chunk-27JGS3KB.js";import{a as d}from"./chunk-2LJCJOJ7.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";async function x(o){let n=await u(),e=process.env.OPENPOND_SANDBOX_API_KEY?.trim()||process.env.OPENPOND_API_KEY?.trim()||n.token?.trim();if(!e)throw new Error("OpenPond account API key is required to resolve connected apps.");let t=process.env.OPENPOND_SANDBOX_API_URL?.trim(),s=m({apiKey:e,...t?{sandboxApiUrl:d(t,{apiBaseUrl:t})}:{baseUrl:n.apiBaseUrl}}),l=o.status??"active";if(o.teamId?.trim())return s.integrationConnections({teamId:o.teamId.trim(),status:l});let p=await s.listOrganizations(),a=I(p);if(a.length===0)return{teamId:null,connections:[]};let c=(await Promise.all(a.map(r=>s.integrationConnections({teamId:r,status:l}).catch(()=>null)))).filter(r=>!!r);return{teamId:c.find(r=>r.connections.length>0)?.teamId??c[0]?.teamId??a[0]??null,connections:f(c)}}i(x,"listAppServerIntegrationConnections");function I(o){return Array.from(new Set(o.flatMap(n=>{if(typeof n.status=="string"&&n.status!=="active")return[];let e=n.id,t=typeof n.teamId=="string"?n.teamId:typeof e=="string"?e:"";return t.trim()?[t.trim()]:[]})))}i(I,"activeTeamIds");function f(o){let n=new Map;for(let e of o)for(let t of e.connections)n.set(t.id,t);return[...n.values()]}i(f,"mergeConnections");export{x as listAppServerIntegrationConnections};
|
package/dist/chunks/{app-server-evaluations-HAAYVEXB.js → app-server-evaluations-XGMGS67X.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as Y,b as Z}from"./chunk-OFVUN4KI.js";import"./chunk-TSAW2QVU.js";import{c as G,d as B,e as V}from"./chunk-MF35MALN.js";import{a as C,t as z,u as Q,v as X}from"./chunk-F5JDBDYL.js";import{a as $,b as U}from"./chunk-3ZWLRBYZ.js";import{b as F,c as K}from"./chunk-4GZ2FPB5.js";import{a as P}from"./chunk-SID4X3YN.js";import"./chunk-S7A2OGL2.js";import"./chunk-AWPYTDH4.js";import"./chunk-6PKXJEJM.js";import"./chunk-HIYQPZ7C.js";import"./chunk-MCIIGQT7.js";import"./chunk-SDO4FC4Q.js";import"./chunk-BN5AVRUG.js";import"./chunk-FEAKTSRS.js";import"./chunk-W45RKGM6.js";import"./chunk-IR3YJWPW.js";import"./chunk-EIIGTADO.js";import"./chunk-B47JMAVW.js";import"./chunk-E3EKBPCB.js";import"./chunk-GQUS7MCH.js";import{b as L}from"./chunk-6RVF2J47.js";import"./chunk-PAZDQRYU.js";import"./chunk-7R56WC7L.js";import"./chunk-VFH5C6D2.js";import{a as W}from"./chunk-4NXEYPPX.js";import"./chunk-TTN63EAM.js";import"./chunk-TH6Y4K5Z.js";import"./chunk-MHYI7ATG.js";import"./chunk-WRQEYW3V.js";import{Z as R}from"./chunk-5MTN6KXV.js";import{s as k,u as J}from"./chunk-3DVWJCOA.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-4LZLO4OW.js";import"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-UBCLPZSQ.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-LNRFRAV5.js";import"./chunk-2ITZW2CN.js";import"./chunk-CQF6QZEL.js";import"./chunk-D5ADDBS5.js";import"./chunk-QRJPLZF7.js";import"./chunk-PWK5Z5S3.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-OZ6LRNRE.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-TMMFF6DO.js";import"./chunk-BQUWZRWU.js";import"./chunk-SGK4GR44.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-CM5USMXN.js";import"./chunk-WFVOG5PU.js";import"./chunk-XGY4OQLC.js";import"./chunk-VWJ5IYQP.js";import"./chunk-E67M5WGY.js";import"./chunk-PCB65K4G.js";import"./chunk-4N3UF3U5.js";import"./chunk-HZLV773Y.js";import"./chunk-M4ZRCRJM.js";import"./chunk-VNJAAYNQ.js";import"./chunk-XK7SPL63.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import{p as N}from"./chunk-LV3CQ72P.js";import"./chunk-M6JRS5PA.js";import"./chunk-KCV5VN4X.js";import"./chunk-RV7PUSI2.js";import"./chunk-6FA3GG5B.js";import"./chunk-KK626T3Z.js";import"./chunk-6DCXAXVD.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import{d as j}from"./chunk-4M3YW3EQ.js";import{x as M}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as S}from"./chunk-VVNV4NNW.js";import{A as s}from"./chunk-PF56N7ZY.js";import{a as r}from"./chunk-FTQLQJQV.js";import{createHash as le}from"node:crypto";function q(v,o){if(o.environment.kind!=="javascript")throw new Error("experiment_environment_required");let{definition:t,asset:d}=o.environment,l=j(d,t.module),p=le("sha256").update(o.id).digest("hex"),x=0;return async a=>{if(a.signal?.throwIfAborted(),a.source!==l)throw new Error("experiment_environment_source_mismatch");let c=a.value.action,n=t.executionServices?.filter(y=>y.operation===a.operation&&(a.operation!=="step"||y.toolName===c?.name))??[];if(S(a.executionServices??[])!==S(n))throw new Error("experiment_environment_services_mismatch");let u=x++,h=await v.request({contractVersion:R,requestId:`environment-${p}-${u}`,operation:"experiment/environment",params:{caseId:o.id,admissionHash:o.admissionHash,definitionHash:t.contentHash,ordinal:u,operation:a.operation,value:a.value,timeoutMs:a.timeoutMs}},3e5);return a.signal?.throwIfAborted(),M(h,1572864),N.parse(h)}}r(q,"createHostExperimentEnvironment");import{createHash as pe}from"node:crypto";var ce=s.object({text:s.string().max(262144),toolCalls:s.array(s.object({id:s.string().min(1).max(200),name:s.string().min(1).max(64),arguments:s.record(s.string(),s.unknown())}).strict()).max(200)}).strict();function H(v,o){let t=0;return async({messages:d,tools:l,signal:p})=>{p.throwIfAborted();let x=t++,a=await v.request({contractVersion:R,requestId:`experiment-${pe("sha256").update(o.id).digest("hex")}-${x}`,operation:"experiment/policy",params:{caseId:o.id,admissionHash:o.admissionHash,ordinal:x,messages:d.map(c=>({...c})),tools:l.map(c=>({...c}))}},Math.min(o.timeoutMs,3e5));return p.throwIfAborted(),ce.parse(a)}}r(H,"createHostExperimentPolicy");function ee(v,o,t){let d=H(v,o);return async function*(l){let p=o.model;if(!l.signal||l.model!==p.modelId||l.maxTokens!==p.maxOutputTokens||l.temperature!==p.temperature||l.topP!==p.topP)throw new Error("Native Experiment policy request differs from its admitted model configuration.");let x=l.messages.map(n=>{if(n.images?.length||n.continuation)throw new Error("The owner policy capability does not admit multimodal or caller-supplied continuation inputs.");if(n.role==="tool")return{role:"tool",callId:s.string().min(1).max(200).parse(n.tool_call_id),name:s.string().min(1).max(64).parse(n.name),observation:ue(n.content??"")};if(n.role==="assistant")return{role:"assistant",text:n.content??"",toolCalls:(n.tool_calls??[]).map(u=>({id:s.string().min(1).max(200).parse(u.id),name:s.string().min(1).max(64).parse(u.function?.name),arguments:s.record(s.string(),s.unknown()).parse(JSON.parse(s.string().parse(u.function?.arguments)))}))};if(n.role!=="user"&&n.role!=="system")throw new Error("Native Experiment message role is not admitted.");return{role:n.role,text:n.content??""}}),a=(l.tools??[]).map(n=>{if(n.type!=="function"||!n.function)throw new Error("Native Experiment requires declared function tools.");let u=t.find(h=>h.name===n.function.name);if(!u||S(n.function.parameters)!==u.inputSchemaHash)throw new Error("Native Experiment requested an undeclared or changed tool.");return u});if(a.length!==t.length||new Set(a.map(n=>n.name)).size!==a.length)throw new Error("Native Experiment changed its admitted tool inventory.");let c=await d({messages:x,tools:a,signal:l.signal});l.signal.throwIfAborted(),c.text&&(yield{type:"text_delta",text:c.text,raw:null}),c.toolCalls.length&&(yield{type:"tool_call_delta",toolCalls:c.toolCalls.map(n=>({id:n.id,type:"function",function:{name:n.name,arguments:JSON.stringify(n.arguments)}})),raw:null}),yield{type:"finish",finishReason:c.toolCalls.length?"tool_calls":"stop",raw:null}}}r(ee,"createHostExperimentNativeStream");function ue(v){try{let o=JSON.parse(v);return o&&typeof o=="object"&&!Array.isArray(o)?o:{output:o}}catch{return{output:v}}}r(ue,"observation");function Qe(v){let{options:o,store:t,storeDir:d,explicitProfileRelease:l,externalDataset:p,isolatedProfileTools:x,selectedEvaluationProfile:a,listProfileWorkflows:c,createSessionWithAutoTitle:n,turnRunner:u,streamOpenPondHostedChatTurn:h,publishedExperimentSource:y,standaloneExperimentOwner:D}=v,w=new AbortController,oe=G({resolveExternalDataset:p?.resolveExternalDataset,admitSession:x?.admitSession,settleSession:x?.settleSession,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),store:t,storeDir:d,selectedProfile:a,createSession:n,sendTurn:r((e,i,m)=>u.sendTurn(e,i,void 0,void 0,m),"sendTurn"),interruptSessionTurn:u.interruptSessionTurn}),T=r((e,i)=>oe(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationCase"),I=z({privateGradingPreflight:r(e=>Q(e,!1),"privateGradingPreflight"),resolveExternalDataset:p?.resolveExternalDataset,sourceCandidate:p?.sourceCandidate,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),selectedWorkflows:c,loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),modelConfigurationHash:r(async(e,i)=>{if(!o.profileSource||e.providerId!=="openpond"||!i.hostModelConfigurationHash)throw new Error("Hosted Profile evaluation requires an explicit source and trusted OpenPond model configuration receipt.");return i.hostModelConfigurationHash},"modelConfigurationHash"),placement:"remote"}),te=B({loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),privateGrading:r(async(e,i,m)=>X({manifest:e,packageValue:i,signal:m,authorize:r(async()=>{let f=await a(),E=e.profileEvaluation;if(!f||!E||f.ref.profileId!==E.profileId||f.sourceRevision!==E.sourceRevision)throw new Error("The current private Profile source changed.");p&&await p.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:e.contentHash});let O=await P({ref:f.ref,sourceRevision:f.sourceRevision,harnessRelease:E.harnessRelease,store:t});if(!E.externalDatasetBinding&&O.catalogHash!==E.catalogHash)throw new Error("The current private evaluation catalog changed.")},"authorize")}),"privateGrading"),resolveExternalDataset:p?.resolveExternalDataset,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedProfile:a,executeCase:T}),A=r((e,i)=>te(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationRun"),re=V({loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedWorkflows:c,prepareRun:I,executeRun:A}),b=Y({...y&&o.experimentPolicyClient?{executeHarness:r(async(e,i)=>{if(!e.harness||!D)throw new Error("Standalone Experiment source owner is unavailable.");return(await D.execute({executionId:e.id,request:e,source:e.harness,stream:ee(o.experimentPolicyClient,e,W(y.release)),signal:i,maxOutputBytes:262144})).attempt},"executeHarness")}:{},...o.experimentPolicyClient?{resolveEnvironment:r(async e=>q(o.experimentPolicyClient,e),"resolveEnvironment")}:{},resolvePolicy:r(async e=>o.experimentPolicyClient?H(o.experimentPolicyClient,e):Z({request:e,stream:h}),"resolvePolicy"),executeProfile:r(e=>{if(o.experimentPolicyClient)throw new Error("A model-case owner cannot execute a Profile.");return T(e)},"executeProfile")});return{listProfileEvaluations:r(async e=>{if(e&&typeof e=="object"&&!Array.isArray(e)&&"runId"in e){let _=F.parse(e),g=await a();if(!g)throw new Error("Select a Profile before inspecting an evaluation run.");return K({store:t,profileRef:g.ref,..._})}if(o.profileSource&&l){let _=await P({store:t,ref:{source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId},sourceRevision:o.profileSource.sourceRevision,harnessRelease:{id:l.harnessRelease.id,contentHash:l.harnessRelease.contentHash}}),[g,ae,se]=await Promise.all([t.listProfileEvaluationRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationComparisons({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationSuiteRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId})]);return{..._,runs:g,comparisons:ae,suiteRuns:se}}let[i,m]=await Promise.all([J(),k()]);if(!i.lastUsed)throw new Error("Select a Profile before loading its evaluations.");let f=await L({store:t,storeDir:d,ref:i.lastUsed,profile:m,reloadProfile:k}),E=await P({store:t,ref:f.profileRef,sourceRevision:f.sourceRevision,harnessRelease:f.harnessRelease}),[O,ne,ie]=await Promise.all([t.listProfileEvaluationRuns(f.profileRef),t.listProfileEvaluationComparisons(f.profileRef),t.listProfileEvaluationSuiteRuns(f.profileRef)]);return{...E,runs:O,comparisons:ne,suiteRuns:ie}},"listProfileEvaluations"),executeProfileEvaluationCase:T,executeExperimentCase:b.execute,cancelExperimentCase:r(e=>Promise.resolve(b.cancel(s.object({id:s.string().min(1)}).strict().parse(e).id)),"cancelExperimentCase"),executeProfileEvaluationRun:A,prepareProfileEvaluationRun:I,runPreparedProfileEvaluation:r(async e=>A(await I(e,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:re,compareProfileEvaluationRuns:$({store:t,selectedProfile:a}),buildProfileEvaluationReport:r(async e=>{let i=await a();if(!i)throw new Error("Select a Profile before building an evaluation report.");return U({store:t,profileRef:i.ref,request:e})},"buildProfileEvaluationReport"),async close(){w.abort(new Error("Evaluation runtime closed")),await b.close()}}}r(Qe,"createAppServerEvaluations");export{Qe as createAppServerEvaluations};
|
|
2
|
+
import{a as Y,b as Z}from"./chunk-GVARQXYI.js";import"./chunk-G6OR5NB6.js";import{c as G,d as B,e as V}from"./chunk-SHJY5RLU.js";import{a as $,b as U}from"./chunk-KUPJNBWG.js";import{b as F,c as K}from"./chunk-7YLXGILH.js";import{a as C,p as z,q as Q,r as X}from"./chunk-C2AXMKK4.js";import{a as P}from"./chunk-QU4UE73E.js";import"./chunk-S7A2OGL2.js";import"./chunk-YM4PSVFW.js";import"./chunk-6PKXJEJM.js";import"./chunk-F7QTIHXX.js";import"./chunk-FEAKTSRS.js";import"./chunk-HIYQPZ7C.js";import"./chunk-F6UQ6PPK.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-NT7N6KLE.js";import"./chunk-B5R53U74.js";import"./chunk-W45RKGM6.js";import"./chunk-6EBCS57F.js";import"./chunk-KCOTDUGW.js";import"./chunk-SI5W5LBV.js";import"./chunk-RZUCVF2Q.js";import{b as L}from"./chunk-R6WMY6AH.js";import"./chunk-NZTCH6K5.js";import"./chunk-7R56WC7L.js";import"./chunk-VFH5C6D2.js";import{a as W}from"./chunk-4NXEYPPX.js";import"./chunk-AH26AQN7.js";import"./chunk-5MHYGMJG.js";import{Z as R}from"./chunk-XNOMIWEY.js";import"./chunk-LK2K3SPM.js";import"./chunk-ZG6353RM.js";import{s as k,u as J}from"./chunk-B4RKHHF7.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-M3SCON53.js";import"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import{p as N}from"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import{d as j}from"./chunk-J572ANHX.js";import{x as M}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as S}from"./chunk-VVNV4NNW.js";import{A as s}from"./chunk-PF56N7ZY.js";import{a as r}from"./chunk-FTQLQJQV.js";import{createHash as le}from"node:crypto";function q(v,o){if(o.environment.kind!=="javascript")throw new Error("experiment_environment_required");let{definition:t,asset:d}=o.environment,l=j(d,t.module),p=le("sha256").update(o.id).digest("hex"),x=0;return async a=>{if(a.signal?.throwIfAborted(),a.source!==l)throw new Error("experiment_environment_source_mismatch");let c=a.value.action,n=t.executionServices?.filter(y=>y.operation===a.operation&&(a.operation!=="step"||y.toolName===c?.name))??[];if(S(a.executionServices??[])!==S(n))throw new Error("experiment_environment_services_mismatch");let u=x++,h=await v.request({contractVersion:R,requestId:`environment-${p}-${u}`,operation:"experiment/environment",params:{caseId:o.id,admissionHash:o.admissionHash,definitionHash:t.contentHash,ordinal:u,operation:a.operation,value:a.value,timeoutMs:a.timeoutMs}},3e5);return a.signal?.throwIfAborted(),M(h,1572864),N.parse(h)}}r(q,"createHostExperimentEnvironment");import{createHash as pe}from"node:crypto";var ce=s.object({text:s.string().max(262144),toolCalls:s.array(s.object({id:s.string().min(1).max(200),name:s.string().min(1).max(64),arguments:s.record(s.string(),s.unknown())}).strict()).max(200)}).strict();function H(v,o){let t=0;return async({messages:d,tools:l,signal:p})=>{p.throwIfAborted();let x=t++,a=await v.request({contractVersion:R,requestId:`experiment-${pe("sha256").update(o.id).digest("hex")}-${x}`,operation:"experiment/policy",params:{caseId:o.id,admissionHash:o.admissionHash,ordinal:x,messages:d.map(c=>({...c})),tools:l.map(c=>({...c}))}},Math.min(o.timeoutMs,3e5));return p.throwIfAborted(),ce.parse(a)}}r(H,"createHostExperimentPolicy");function ee(v,o,t){let d=H(v,o);return async function*(l){let p=o.model;if(!l.signal||l.model!==p.modelId||l.maxTokens!==p.maxOutputTokens||l.temperature!==p.temperature||l.topP!==p.topP)throw new Error("Native Experiment policy request differs from its admitted model configuration.");let x=l.messages.map(n=>{if(n.images?.length||n.continuation)throw new Error("The owner policy capability does not admit multimodal or caller-supplied continuation inputs.");if(n.role==="tool")return{role:"tool",callId:s.string().min(1).max(200).parse(n.tool_call_id),name:s.string().min(1).max(64).parse(n.name),observation:ue(n.content??"")};if(n.role==="assistant")return{role:"assistant",text:n.content??"",toolCalls:(n.tool_calls??[]).map(u=>({id:s.string().min(1).max(200).parse(u.id),name:s.string().min(1).max(64).parse(u.function?.name),arguments:s.record(s.string(),s.unknown()).parse(JSON.parse(s.string().parse(u.function?.arguments)))}))};if(n.role!=="user"&&n.role!=="system")throw new Error("Native Experiment message role is not admitted.");return{role:n.role,text:n.content??""}}),a=(l.tools??[]).map(n=>{if(n.type!=="function"||!n.function)throw new Error("Native Experiment requires declared function tools.");let u=t.find(h=>h.name===n.function.name);if(!u||S(n.function.parameters)!==u.inputSchemaHash)throw new Error("Native Experiment requested an undeclared or changed tool.");return u});if(a.length!==t.length||new Set(a.map(n=>n.name)).size!==a.length)throw new Error("Native Experiment changed its admitted tool inventory.");let c=await d({messages:x,tools:a,signal:l.signal});l.signal.throwIfAborted(),c.text&&(yield{type:"text_delta",text:c.text,raw:null}),c.toolCalls.length&&(yield{type:"tool_call_delta",toolCalls:c.toolCalls.map(n=>({id:n.id,type:"function",function:{name:n.name,arguments:JSON.stringify(n.arguments)}})),raw:null}),yield{type:"finish",finishReason:c.toolCalls.length?"tool_calls":"stop",raw:null}}}r(ee,"createHostExperimentNativeStream");function ue(v){try{let o=JSON.parse(v);return o&&typeof o=="object"&&!Array.isArray(o)?o:{output:o}}catch{return{output:v}}}r(ue,"observation");function Qe(v){let{options:o,store:t,storeDir:d,explicitProfileRelease:l,externalDataset:p,isolatedProfileTools:x,selectedEvaluationProfile:a,listProfileWorkflows:c,createSessionWithAutoTitle:n,turnRunner:u,streamOpenPondHostedChatTurn:h,publishedExperimentSource:y,standaloneExperimentOwner:D}=v,w=new AbortController,oe=G({resolveExternalDataset:p?.resolveExternalDataset,admitSession:x?.admitSession,settleSession:x?.settleSession,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),store:t,storeDir:d,selectedProfile:a,createSession:n,sendTurn:r((e,i,m)=>u.sendTurn(e,i,void 0,void 0,m),"sendTurn"),interruptSessionTurn:u.interruptSessionTurn}),T=r((e,i)=>oe(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationCase"),I=z({privateGradingPreflight:r(e=>Q(e,!1),"privateGradingPreflight"),resolveExternalDataset:p?.resolveExternalDataset,sourceCandidate:p?.sourceCandidate,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),selectedWorkflows:c,loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),modelConfigurationHash:r(async(e,i)=>{if(!o.profileSource||e.providerId!=="openpond"||!i.hostModelConfigurationHash)throw new Error("Hosted Profile evaluation requires an explicit source and trusted OpenPond model configuration receipt.");return i.hostModelConfigurationHash},"modelConfigurationHash"),placement:"remote"}),te=B({loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),privateGrading:r(async(e,i,m)=>X({manifest:e,packageValue:i,signal:m,authorize:r(async()=>{let f=await a(),E=e.profileEvaluation;if(!f||!E||f.ref.profileId!==E.profileId||f.sourceRevision!==E.sourceRevision)throw new Error("The current private Profile source changed.");p&&await p.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:e.contentHash});let O=await P({ref:f.ref,sourceRevision:f.sourceRevision,harnessRelease:E.harnessRelease,store:t});if(!E.externalDatasetBinding&&O.catalogHash!==E.catalogHash)throw new Error("The current private evaluation catalog changed.")},"authorize")}),"privateGrading"),resolveExternalDataset:p?.resolveExternalDataset,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedProfile:a,executeCase:T}),A=r((e,i)=>te(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationRun"),re=V({loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedWorkflows:c,prepareRun:I,executeRun:A}),b=Y({...y&&o.experimentPolicyClient?{executeHarness:r(async(e,i)=>{if(!e.harness||!D)throw new Error("Standalone Experiment source owner is unavailable.");return(await D.execute({executionId:e.id,request:e,source:e.harness,stream:ee(o.experimentPolicyClient,e,W(y.release)),signal:i,maxOutputBytes:262144})).attempt},"executeHarness")}:{},...o.experimentPolicyClient?{resolveEnvironment:r(async e=>q(o.experimentPolicyClient,e),"resolveEnvironment")}:{},resolvePolicy:r(async e=>o.experimentPolicyClient?H(o.experimentPolicyClient,e):Z({request:e,stream:h}),"resolvePolicy"),executeProfile:r(e=>{if(o.experimentPolicyClient)throw new Error("A model-case owner cannot execute a Profile.");return T(e)},"executeProfile")});return{listProfileEvaluations:r(async e=>{if(e&&typeof e=="object"&&!Array.isArray(e)&&"runId"in e){let _=F.parse(e),g=await a();if(!g)throw new Error("Select a Profile before inspecting an evaluation run.");return K({store:t,profileRef:g.ref,..._})}if(o.profileSource&&l){let _=await P({store:t,ref:{source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId},sourceRevision:o.profileSource.sourceRevision,harnessRelease:{id:l.harnessRelease.id,contentHash:l.harnessRelease.contentHash}}),[g,ae,se]=await Promise.all([t.listProfileEvaluationRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationComparisons({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationSuiteRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId})]);return{..._,runs:g,comparisons:ae,suiteRuns:se}}let[i,m]=await Promise.all([J(),k()]);if(!i.lastUsed)throw new Error("Select a Profile before loading its evaluations.");let f=await L({store:t,storeDir:d,ref:i.lastUsed,profile:m,reloadProfile:k}),E=await P({store:t,ref:f.profileRef,sourceRevision:f.sourceRevision,harnessRelease:f.harnessRelease}),[O,ne,ie]=await Promise.all([t.listProfileEvaluationRuns(f.profileRef),t.listProfileEvaluationComparisons(f.profileRef),t.listProfileEvaluationSuiteRuns(f.profileRef)]);return{...E,runs:O,comparisons:ne,suiteRuns:ie}},"listProfileEvaluations"),executeProfileEvaluationCase:T,executeExperimentCase:b.execute,cancelExperimentCase:r(e=>Promise.resolve(b.cancel(s.object({id:s.string().min(1)}).strict().parse(e).id)),"cancelExperimentCase"),executeProfileEvaluationRun:A,prepareProfileEvaluationRun:I,runPreparedProfileEvaluation:r(async e=>A(await I(e,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:re,compareProfileEvaluationRuns:$({store:t,selectedProfile:a}),buildProfileEvaluationReport:r(async e=>{let i=await a();if(!i)throw new Error("Select a Profile before building an evaluation report.");return U({store:t,profileRef:i.ref,request:e})},"buildProfileEvaluationReport"),async close(){w.abort(new Error("Evaluation runtime closed")),await b.close()}}}r(Qe,"createAppServerEvaluations");export{Qe as createAppServerEvaluations};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as H,c as m,d as k}from"./chunk-BU27SLZP.js";import"./chunk-JORRZ4BB.js";import{d,f as p,g as f,h as w}from"./chunk-W2TICQ62.js";import"./chunk-NZTCH6K5.js";import"./chunk-AN525SPP.js";import"./chunk-IZ6DLEVY.js";import{c as R}from"./chunk-AH26AQN7.js";import"./chunk-5MHYGMJG.js";import"./chunk-LK2K3SPM.js";import"./chunk-B4RKHHF7.js";import"./chunk-DLANLLKH.js";import"./chunk-YU3C6U5V.js";import"./chunk-LKKMLBOH.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-M3SCON53.js";import"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as t}from"./chunk-FTQLQJQV.js";function b(i){let{store:n,storeDir:s,backgroundReview:r,harnessEvaluationEnabled:o,harnessTasksetReview:c}=i,v=new AbortController,u=t(e=>{let g=e.signal?AbortSignal.any([e.signal,v.signal]):v.signal;return i.harnessEvaluationReviewStream({...e,signal:g})},"harnessEvaluationReviewStream"),l=m({store:n,storeDir:s,evaluationReviewStream:u});return{inspectHarness:t(()=>k(n),"inspectHarness"),reviewHarnessProposal:a(r,"Harness review",l.reviewHarnessProposalPayload),reviewHarness:a(o,"Harness evaluation",e=>H({store:n,request:e,stream:u,continuation:{storeDir:s,stream:u}})),acceptHarnessEvaluationReview:a(o,"Tasksets",e=>c.acceptEvaluationReview(e)),materializeHarnessEvaluationTaskset:a(o,"Tasksets",e=>c.materializeEvaluationTaskset(e)),runHarnessEvaluationBaseline:a(o,"Tasksets",e=>c.runEvaluationBaseline(e)),validateHarness:t(async()=>{let e=await R(n);return e?{valid:!0,workspaceId:e.workspaceId,harnessRelease:e.harnessRelease,agentSnapshot:e.agentSnapshot}:{valid:!1,reason:"No app-server Harness release is selected."}},"validateHarness"),updateHarnessBackgroundReview:a(r,"Background review",l.updateHarnessBackgroundReviewPayload),diffHarness:l.harnessDiffPayload,rollbackHarness:l.rollbackHarnessPayload,inspectRefiner:a(r,"Refiner",()=>d(s)),updateRefiner:a(r,"Refiner",e=>p(s,e)),activateRefiner:a(r,"Refiner",e=>f(s,e)),rollbackRefiner:a(r,"Refiner",e=>w(s,e)),async close(){v.abort(new Error("Harness runtime closed"))}}}t(b,"createAppServerHarnessServices");function a(i,n,s){return async(...r)=>{if(!i)throw new Error(`${n} is disabled in this app-server deployment.`);return s(...r)}}t(a,"guardService");export{b as createAppServerHarnessServices};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{l as c,m as d}from"./chunk-R6VJDOQM.js";import"./chunk-FYYYECHE.js";import"./chunk-2V4LPUBH.js";import"./chunk-N4VHLJBZ.js";import"./chunk-R6WMY6AH.js";import"./chunk-NZTCH6K5.js";import"./chunk-URNMC46H.js";import"./chunk-4SZ3HKHU.js";import{b}from"./chunk-RFMME46Z.js";import"./chunk-DQI5TE6A.js";import"./chunk-7R56WC7L.js";import"./chunk-VFH5C6D2.js";import"./chunk-AN525SPP.js";import"./chunk-IZ6DLEVY.js";import"./chunk-DTTFUANI.js";import"./chunk-EZRUWIP6.js";import"./chunk-SYUKES6H.js";import"./chunk-4NXEYPPX.js";import"./chunk-AH26AQN7.js";import"./chunk-5MHYGMJG.js";import{e as a}from"./chunk-XNOMIWEY.js";import"./chunk-LK2K3SPM.js";import"./chunk-MEGKXGW3.js";import"./chunk-ZG6353RM.js";import"./chunk-7PXZ4X4P.js";import"./chunk-N73MU2C3.js";import"./chunk-ELX7VRSU.js";import"./chunk-CZ5R4JXZ.js";import"./chunk-FAKDGLZQ.js";import"./chunk-GW766ZSO.js";import"./chunk-G32BO6M5.js";import"./chunk-NLYZ5K7U.js";import"./chunk-7KWD2I6W.js";import"./chunk-WWQNMC7C.js";import"./chunk-B4RKHHF7.js";import"./chunk-DLANLLKH.js";import"./chunk-YU3C6U5V.js";import"./chunk-ZYVHOVKL.js";import"./chunk-KVTBX2UP.js";import"./chunk-LKKMLBOH.js";import"./chunk-ERL2M773.js";import"./chunk-GXCUH2VV.js";import"./chunk-4ZBOYWQ3.js";import"./chunk-DMFUEUAZ.js";import"./chunk-JHR3LF2F.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-MWXW2CA6.js";import"./chunk-L3KS6MOV.js";import"./chunk-M3SCON53.js";import"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-JFXINDOQ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-OSVGNONV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-JCLTFDVW.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as AGENT_PROTOCOL_VERSION,c as APP_SERVER_COMPOSITION,d as createOpenPondAppServer,b as runAppServerJsonl};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{f as $,g as J,h as L,i as v,j as q}from"./chunk-GPL2Z65R.js";import{c as g}from"./chunk-SXMR6E2W.js";import"./chunk-2HAWOMZK.js";import"./chunk-SFKZITAG.js";import"./chunk-XRKFTPHD.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import{J as C,K as G,L as k,O as W,Q as M,S as z,T as F,c as D,m as K,r as V,s as _}from"./chunk-MILEWROZ.js";import"./chunk-OTUBJV6C.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import{d as f}from"./chunk-UTNGEMW5.js";import"./chunk-U2K7QJCG.js";import"./chunk-WSOUMXH3.js";import"./chunk-N42HT64M.js";import"./chunk-NG2L6D7G.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-JCLTFDVW.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await f(),s=m(e),t=await g(e,s),n=y(e),r=await L({apiBase:n,apiKey:t});console.log(JSON.stringify(r,null,2))}p(ie,"runAppsTools");async function se(e){let s=await f(),t=m(s),n=y(s),r=await g(s,t),i=typeof e.handle=="string"?String(e.handle):void 0,o=i?$(i):null,c=e.refresh!==void 0?w(e.refresh):void 0,l=await J({apiBase:n,apiKey:r,forceRefresh:c}),u=o?l.filter(a=>$(a.handle||a.gitOwner)===o):l;if(u.length===0){console.log("no apps found");return}if(w(e.json)){console.log(JSON.stringify({apps:u},null,2));return}for(let a of u){let d=a.handle||a.gitOwner||"unknown",h=a.repo||a.gitRepo||a.id,B=a.latestDeployment?.status||"no-deploy",R=a.latestDeployment?.gitBranch||a.defaultBranch||"-",I=a.codeVisibility||"unknown",E=a.sandbox?"yes":"no";console.log(`${d}/${h} ${B} ${R} code=${I} sandbox=${E} ${a.id}`)}}p(se,"runAppsList");async function oe(e,s){let t=typeof e.visibility=="string"?e.visibility.trim():typeof e.codeVisibility=="string"?e.codeVisibility.trim():"";if(t!=="public"&&t!=="private")throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");let n=await f(),r=m(n),i=y(n),o=await g(n,r),{app:c,handle:l,repo:u}=await v(i,o,s),a=await K(i,o,c.id,t);console.log(`${l}/${u} code_visibility=${a.app?.codeVisibility??t} app_id=${c.id}`)}p(oe,"runAppsCodeVisibility");async function ae(e){let s=await f(),t=m(s),n=await g(s,t),r=y(s),i=typeof e.appId=="string"?String(e.appId):void 0,o=await G(r,n,{appId:i});console.log(JSON.stringify(o,null,2))}p(ae,"runAppsPerformance");async function ce(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await k(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(ce,"runAppsSummary");async function le(e,s,t,n){let r=(typeof e.prompt=="string"?e.prompt:null)||n.join(" ");if(!r.trim())throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,t),a=await W(c,l,{appId:u.id,mode:s,prompt:r.trim()});console.log(JSON.stringify(a,null,2))}p(le,"runAppsAssistant");async function de(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),o=(typeof e.prompt=="string"?e.prompt:null)||s.join(" ");if(!o.trim())throw new Error("usage: apps agent create --prompt <text> [--team-id <id>]");let c=typeof e.templateRepoUrl=="string"?e.templateRepoUrl:void 0,l=typeof e.templateBranch=="string"?e.templateBranch:void 0,u=typeof e.templateLocalPath=="string"?e.templateLocalPath:void 0,a=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0;if(u&&String(u).trim().length>0)throw new Error("templateLocalPath is not supported; use templateRepoUrl");let d=typeof e.env=="string"?S(e.env,"env"):void 0;if(d){if(typeof d!="object"||Array.isArray(d))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(d))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}let h=c||l||d?{templateRepoUrl:c,templateBranch:l,envVars:d}:void 0,B=typeof e.deployEnvironment=="string"?e.deployEnvironment==="preview"?"preview":"production":void 0,R=e.deployDisabled!==void 0?w(e.deployDisabled):void 0,I=e.streamDeployLogs!==void 0?w(e.streamDeployLogs):!0,E=await C(i,r,{prompt:o.trim(),...a?{teamId:a}:{},...h?{template:h}:{},...B?{deployEnvironment:B}:{},...R!==void 0?{deployDisabled:R}:{},streamDeployLogs:I});if(!E.ok){let b=await E.text().catch(()=>"");throw new Error(`agent create failed: ${E.status} ${b}`)}let N=null,O=null,P=null;await H(E,{onConversationId:p(b=>{N=b},"onConversationId"),onItems:p(b=>{for(let A of b){let U=Q(A);U&&console.log(U);let x=A;!O&&typeof x.appId=="string"&&(O=x.appId),!P&&typeof x.deploymentId=="string"&&(P=x.deploymentId)}},"onItems")}),N&&console.log(`conversation_id: ${N}`),O&&console.log(`app_id: ${O}`),P&&console.log(`deployment_id: ${P}`);try{await J({apiBase:i,apiKey:r,forceRefresh:!0}),await L({apiBase:i,apiKey:r,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}p(de,"runAppsAgentCreate");async function pe(e,s,t,n){let r=await f(),i=m(r),o=await g(r,i),c=y(r),l=typeof e.method=="string"?String(e.method).toUpperCase():void 0,u=l&&["GET","POST","PUT","DELETE"].includes(l)?l:void 0;if(l&&!u)throw new Error("method must be GET, POST, PUT, or DELETE");let a=typeof e.body=="string"?S(String(e.body),"body"):void 0,d=typeof e.headers=="string"?S(String(e.headers),"headers"):void 0,h=typeof e.scheduleId=="string"?String(e.scheduleId):void 0,B=w(e.notifyEmail),R=w(e.summary)||w(e.withSummary),I=await M(c,o,{appId:s,deploymentId:t,toolName:n,scheduleId:h,method:u,body:a,headers:d,notifyEmail:B||void 0});if(console.log(JSON.stringify(I,null,2)),R&&I.ok){let E=await k(c,o,s);console.log(JSON.stringify({summary:E},null,2))}}p(pe,"runAppsToolsExecute");async function ue(e,s){let t=typeof e.env=="string"?e.env:typeof e.vars=="string"?e.vars:typeof e.envVars=="string"?e.envVars:null;if(!t)throw new Error("usage: apps env set <handle>/<repo> --env <json>");let n=S(t,"env");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("env must be a JSON object");let r={};for(let[d,h]of Object.entries(n)){if(typeof h!="string")throw new Error(`env value for ${d} must be a string`);if(!d.startsWith("OPENTOOL_PUBLIC_"))throw new Error("only OPENTOOL_PUBLIC_ env vars can be set");r[d]=h}let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,s),a=await V(c,l,u.id,{envVars:r});console.log(JSON.stringify(a,null,2))}p(ue,"runAppsEnvSet");async function fe(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await _(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(fe,"runAppsEnvGet");async function ge(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o,handle:c,repo:l}=await v(r,i,s),u=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,a=j(u),d=await D(r,i,o.id,{environment:a});console.log(JSON.stringify(d,null,2)),(w(e.watch)||w(e.wait)||w(e.follow))&&await q({baseUrl:r,apiKey:i,deploymentId:d.deploymentId,prefix:`[${c}/${l}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}p(ge,"runAppsDeploy");function X(e){let s={};if(typeof e.params=="string"){let n=S(String(e.params),"params");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("params must be a JSON object");for(let[r,i]of Object.entries(n))i!==void 0&&(s[r]=typeof i=="string"?i:JSON.stringify(i))}let t=p((n,r)=>{r===void 0||r===""||(s[n]=r)},"addParam");if(t("source",typeof e.source=="string"?e.source.trim():void 0),t("symbol",typeof e.symbol=="string"?e.symbol.trim():void 0),t("cursor",typeof e.cursor=="string"?e.cursor.trim():void 0),t("status",typeof e.status=="string"?e.status.trim():void 0),t("backtestRunId",typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():void 0),t("since",T(e.since,"since")),t("until",T(e.until,"until")),typeof e.limit=="string"&&e.limit.trim().length>0){let n=Number.parseInt(e.limit,10);if(!Number.isFinite(n))throw new Error("limit must be a number");t("limit",String(n))}return Object.keys(s).length?s:void 0}p(X,"resolveBacktestEventsParams");async function me(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),{app:o}=await v(i,r,s),c={...X(e)??{},appId:o.id},l=await z(i,r,{method:"GET",query:c});console.log(JSON.stringify(l,null,2))}p(me,"runBacktestEvents");async function ye(e,s){let t=typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():"";if(!t)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");let n=await f(),r=m(n),i=await g(n,r),o=y(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{E as x,n as v}from"./chunk-GXCUH2VV.js";import{a as l,c as j}from"./chunk-JHR3LF2F.js";import{L as w,b as g,ob as p,tb as y,va as P,wc as E}from"./chunk-M3FLEZ4E.js";import{m as f}from"./chunk-5ZBLCWEJ.js";import{s as S}from"./chunk-UGOK7VTC.js";import{A as s}from"./chunk-PF56N7ZY.js";import{a as n}from"./chunk-FTQLQJQV.js";function z(e){if(e.kind==="command"||e.kind==="file_change")return!0;if(e.kind!=="permissions")return!1;try{let o=JSON.parse(e.detail);return!o.questions&&Array.isArray(o.options)&&o.options.some(r=>r.kind==="allow_once")&&o.options.some(r=>r.kind==="reject_once")}catch{return!1}}n(z,"remoteApprovalSupported");import{createHash as A}from"node:crypto";import{realpath as R,stat as O}from"node:fs/promises";var k=n(e=>A("sha256").update(g("POST","/local/ponder-project",e)).digest("hex"),"hash"),_=s.object({projectId:s.string().min(1).max(200),name:s.string().min(1).max(300),cwd:s.string().min(1).max(8192),sourceFolders:s.array(s.object({path:s.string().min(1).max(8192),realpath:s.string().min(1).max(8192)}).strict()).min(1).max(1e3),configurationHash:s.string().regex(/^[a-f0-9]{64}$/),revision:s.string().regex(/^[a-f0-9]{64}$/)}).strict();function X(e){let o=Object.values(S(e,"saved_local_projects"));if(o.length>p)throw new Error("ponder_desktop_project_sharing_limit_exceeded");return o.map(r=>f.parse(r.value))}n(X,"readPonderLocalProjects");async function Y(e){if(e.hiddenFromDefaultSidebar)throw new Error("ponder_desktop_project_unavailable");let o=[...new Set([...e.sourceFolders??[e.path],e.path,...e.repoPath?[e.repoPath]:[]])];if(!o.length||o.length>1e3)throw new Error("ponder_desktop_project_folder_limit_exceeded");let r=await R(e.workspacePath);if(!(await O(r)).isDirectory())throw new Error("ponder_desktop_project_unavailable");let t=[];for(let c of o){let i=await R(c);if(!(await O(i)).isDirectory())throw new Error("ponder_desktop_project_unavailable");t.push({path:c,realpath:i})}let a={projectId:e.id,name:e.name,cwd:r,sourceFolders:t,configurationHash:k({id:e.id,name:e.name,path:e.path,workspacePath:e.workspacePath,repoPath:e.repoPath,sourceFolders:e.sourceFolders??null,hiddenFromDefaultSidebar:e.hiddenFromDefaultSidebar??!1})};return _.parse({...a,revision:k(a)})}n(Y,"capturePonderProjectSnapshot");import{createHash as D}from"node:crypto";var I=E,m=s.object({revision:s.number().int().positive(),owner:l,authority:I,project:_,shared:s.boolean(),updatedAt:s.string().datetime()}).strict(),b=m.omit({revision:!0}),h=n(e=>D("sha256").update(JSON.stringify(l.parse(e))).digest("hex"),"ownerKey");function N(e,o,r){let t=l.parse(o),a=I.parse(r),c=e.get("SELECT payload FROM ponder_desktop_authority WHERE id = 1"),i=c?y.parse(JSON.parse(c.payload)):null;if(!i||i.state!=="attached"||Date.parse(i.leaseExpiresAt)<=Date.now()||i.authorizationRevision!==a.authorizationRevision||!Object.entries(a.scope).every(([d,u])=>i.scope[d]===u)||i.scope.installationId!==t.installationId||i.scope.profileId!==t.profileId||i.scope.ownerUserId!==t.ownerUserId||i.scope.teamId!==t.teamId)throw new Error("ponder_desktop_project_authority_changed")}n(N,"assertAuthority");function ne(e,o){let r=b.parse(o);N(e,r.owner,r.authority);let t=h(r.owner),a=e.get("SELECT payload FROM ponder_project_sharing WHERE owner_key = ? AND project_id = ?",[t,r.project.projectId]);if(!a&&(e.get("SELECT count(*) AS count FROM ponder_project_sharing WHERE owner_key = ?",[t])?.count??0)>=p)throw new Error("ponder_desktop_project_sharing_limit_exceeded");let c=a?m.parse(JSON.parse(a.payload)):null,i=c&&c.shared===r.shared&&c.project.revision===r.project.revision&&c.authority.authorizationRevision===r.authority.authorizationRevision&&Object.entries(r.authority.scope).every(([u,L])=>c.authority.scope[u]===L),d=m.parse({...r,revision:c?c.revision+(i?0:1):1});return e.run("INSERT INTO ponder_project_sharing (owner_key, project_id, payload) VALUES (?, ?, ?) ON CONFLICT(owner_key, project_id) DO UPDATE SET payload = excluded.payload",[t,r.project.projectId,JSON.stringify(d)]),d}n(ne,"setPonderProjectSharing");function ae(e,o){let r=e.all("SELECT payload FROM ponder_project_sharing WHERE owner_key = ? ORDER BY project_id LIMIT ?",[h(o),p+1]);if(r.length>p)throw new Error("ponder_desktop_project_sharing_limit_exceeded");return r.map(t=>{let a=m.parse(JSON.parse(t.payload));if(h(a.owner)!==h(o))throw new Error("ponder_desktop_project_owner_changed");return a})}n(ae,"readPonderProjectSharing");function ie(e,o){return e.shared&&e.authority.authorizationRevision===o.authorizationRevision&&Object.entries(o.scope).every(([r,t])=>e.authority.scope[r]===t)}n(ie,"projectSharingMatchesAuthority");import{createHash as F}from"node:crypto";function ue(e,o,r){let t=F("sha256").update(JSON.stringify({ownership:x(e,o),paused:r.paused,activeTurnId:r.activeTurnId})).digest("hex");return Number.parseInt(t.slice(0,13),16)}n(ue,"remoteCommandTargetRevision");function le(e,o){let r=e.get("SELECT turn_id,paused,lease_until FROM task_inbox_turns WHERE session_id=?",[o]),t=r&&r.lease_until>Date.now()&&e.get("SELECT status FROM turns WHERE id=?",[r.turn_id])?.status==="in_progress";return{paused:!!r?.paused,activeTurnId:t?r.turn_id:null}}n(le,"readRemoteCommandTargetState");function he(e,o){if(o.payload.resume!==!0)return;if(o.action!=="follow_up")throw new Error("remote_resume_action_invalid");let r=e.get("SELECT turn_id,paused,lease_until FROM task_inbox_turns WHERE session_id=?",[o.localSessionId]),t=e.get("SELECT id,status FROM turns WHERE session_id=? ORDER BY sort_index DESC LIMIT 1",[o.localSessionId]);if(!o.expectedTurnId||t?.id!==o.expectedTurnId||r?.turn_id!==o.expectedTurnId||!r.paused||r.lease_until>Date.now()||!["completed","failed","interrupted"].includes(t.status))throw new Error("remote_resume_target_changed");e.run("UPDATE task_inbox_turns SET paused=0 WHERE session_id=?",[o.localSessionId])}n(he,"resumeRemoteTaskInput");import{createHash as M}from"node:crypto";function T(e){return w.parse({provider:e.provider,cwd:e.cwd,localProjectId:e.localProjectId,workspaceId:e.workspaceId,workspaceKind:e.workspaceKind,workspaceName:e.workspaceName,...e.modelRef?{modelRef:e.modelRef}:{},currentProfile:e.currentProfile,experience:e.experience,profileWorkflowBinding:e.profileWorkflowBinding,profileComponentBinding:e.profileComponentBinding,openPondCommandAccessMode:e.openPondCommandAccessMode})}n(T,"remoteStarterPayload");function q(e){return Number.parseInt(M("sha256").update(P({payload:T(e),owner:e.metadata?.ponderLocalOwner})).digest("hex").slice(0,13),16)}n(q,"remoteStarterRevision");function H(e,o){let r=new Map;for(let t of e){if(!j(t,o)||!t.localProjectId||!t.cwd||t.archived||t.status==="closed"||t.systemKind||t.hiddenFromDefaultSidebar||t.metadata?.nativeHistoryProjection||!v(t.provider)||["sandbox","sandbox_template","sandbox_app"].includes(t.workspaceKind??""))continue;try{T(t)}catch{continue}let a=`starter:${t.id}`;r.set(a,{source:t,target:{id:a,projectId:t.localProjectId,projectLabel:t.workspaceName??"Local project",title:`New ${t.provider} task in ${t.workspaceName??"local project"}`,revision:q(t)}})}return r}n(H,"captureRemoteStarters");function Pe(e){return async o=>{let r=await e.current();if(!r)throw new Error("remote_account_unavailable");let t=[];for(let c of await e.store.sessionShells()){let i=await e.store.getSession(c.id);i&&t.push(i)}let a=H(t,r.owner).get(o.localStarterId);if(!a||a.target.revision!==o.expectedRevision||a.target.projectId!==o.payload.projectId||a.target.revision!==o.payload.starterRevision)throw new Error("remote_starter_changed");return a.source}}n(Pe,"createRemoteStarterResolver");var C=class extends Error{constructor(r,t=409){super(r);this.status=t;this.name="LocalManagedMessageError"}status;static{n(this,"LocalManagedMessageError")}};export{ue as a,le as b,he as c,T as d,q as e,H as f,Pe as g,z as h,C as i,X as j,Y as k,ne as l,ae as m,ie as n};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as $,b as C}from"./chunk-2LJCJOJ7.js";import{b as y,c as w,e as O}from"./chunk-JCLTFDVW.js";import{a as n}from"./chunk-FTQLQJQV.js";function v(r){return{list:n((e={})=>r.listSandboxRuntimes(e),"list"),create:n(e=>r.createSandboxRuntime(e),"create"),handle:n((e,t=null)=>r.sandboxRuntime(e,t),"handle"),get:n(e=>r.getSandboxRuntime(e),"get"),createSandbox:n((e,t={},o={})=>r.createSandboxRuntimeSandbox(e,t,o),"createSandbox"),updateStatus:n((e,t)=>r.updateSandboxRuntimeStatus(e,t),"updateStatus"),events:n(e=>r.listSandboxRuntimeEvents(e),"events"),event:n((e,t)=>r.emitSandboxRuntimeEvent(e,t),"event"),checkpoint:n((e,t={})=>r.checkpointSandboxRuntime(e,t),"checkpoint"),promote:n((e,t,o={})=>r.promoteSandboxRuntime(e,t,o),"promote"),preserveSource:n((e,t={},o={})=>r.preserveSandboxRuntimeSource(e,t,o),"preserveSource")}}n(v,"createSandboxRuntimeNamespace");function A(r){return{list:n((e={})=>r.list(e),"list"),create:n(e=>r.create(e),"create"),get:n(e=>r.get(e),"get"),pricing:n(()=>r.pricing(),"pricing"),costs:n((e={})=>r.costs(e),"costs")}}n(A,"createSandboxNamespace");function j(r){return{list:n(e=>r.listProjects(e),"list"),upsert:n(e=>r.upsertProject(e),"upsert"),upsertGitRemote:n(e=>r.upsertProjectGitRemote(e),"upsertGitRemote"),get:n((e,t)=>r.getProject(e,t),"get"),update:n((e,t)=>r.updateProject(e,t),"update"),sync:n((e,t)=>r.syncProject(e,t),"sync"),ensureGitRemote:n((e,t)=>r.ensureProjectGitRemote(e,t),"ensureGitRemote"),getGitRemote:n((e,t)=>r.ensureProjectGitRemote(e,t),"getGitRemote"),git:n((e,t)=>r.ensureProjectGitRemote(e,t),"git"),uploadSource:n((e,t)=>r.uploadProjectSource(e,t),"uploadSource"),archive:n((e,t)=>r.archiveProject(e,t),"archive")}}n(j,"createSandboxProjectNamespace");function T(r){return{get:n(e=>r.getHostedProfile(e),"get"),status:n(e=>r.getHostedProfile(e),"status"),ensureHosted:n(e=>r.ensureHostedProfile(e),"ensureHosted"),push:n(e=>r.pushHostedProfile(e),"push")}}n(T,"createSandboxProfileNamespace");function k(r){return{list:n(e=>r.listAgents(e),"list"),upsert:n(e=>r.upsertAgent(e),"upsert"),get:n((e,t)=>r.getAgent(e,t),"get"),update:n((e,t)=>r.updateAgent(e,t),"update"),archive:n((e,t)=>r.archiveAgent(e,t),"archive"),run:n((e,t)=>r.runAgent(e,t),"run"),sourceDeployPlan:n((e,t)=>r.getAgentSourceDeployPlan(e,t),"sourceDeployPlan"),manifestSnapshots:n((e,t)=>r.listAgentManifestSnapshots(e,t),"manifestSnapshots"),requestSourceChecks:n((e,t)=>r.requestAgentSourceChecks(e,t),"requestSourceChecks"),configureSourceSetup:n((e,t)=>r.configureAgentSourceSetup(e,t),"configureSourceSetup"),publishSource:n((e,t)=>r.publishAgentSource(e,t),"publishSource")}}n(k,"createSandboxAgentNamespace");function E(r,e,t=null){let o=n(async(a={},d={})=>{let f=await r.getSandboxRuntime(e);return f.sandboxId?r.get(f.sandboxId):r.createSandboxRuntimeSandbox(e,a,d).then(m=>m.sandbox)},"currentSandbox"),s=n(async(a={},d={})=>{let f=await r.getSandboxRuntime(e);if(!f.sandboxId)return r.createSandboxRuntimeSandbox(e,a,d).then(h=>h.sandbox);let m=await r.get(f.sandboxId);return m.state==="stopped"?r.start(m.id,d).then(h=>h.sandbox):m.state==="archived"?r.restore(m.id).then(h=>h.sandbox):m.state==="deleted"||m.state==="error"?r.createSandboxRuntimeSandbox(e,a,d).then(h=>h.sandbox):m},"resume");return{id:e,initial:t,get:n(()=>r.getSandboxRuntime(e),"get"),sandbox:o,resume:s,createSandbox:n((a={},d={})=>r.createSandboxRuntimeSandbox(e,a,d),"createSandbox"),status:n(async a=>{if(typeof a!="string")return r.updateSandboxRuntimeStatus(e,a);let d=await r.getSandboxRuntime(e);return r.updateSandboxRuntimeStatus(e,{status:a,expectedVersion:d.version})},"status"),events:n(()=>r.listSandboxRuntimeEvents(e),"events"),event:n(a=>r.emitSandboxRuntimeEvent(e,a),"event"),recordCommit:n((a,d={})=>r.emitSandboxRuntimeEvent(e,{...d,type:d.type??"git.commit",commitSha:a}),"recordCommit"),checkpointHint:n((a={})=>r.emitSandboxRuntimeEvent(e,{type:"workflow.checkpoint_hint",summary:a.summary??a.reason??"Workflow checkpoint hint",payload:{...a.payload,reason:a.reason??null},artifactRefs:a.artifactRefs,lifecycleHint:{kind:"checkpoint",reason:a.reason??null}}),"checkpointHint"),waitForUser:n(async(a={})=>{await r.emitSandboxRuntimeEvent(e,{type:"workflow.waiting_for_user",summary:a.summary??a.reason??"Waiting for user",payload:{...a.payload,reason:a.reason??null},lifecycleHint:{kind:"waiting_for_user",reason:a.reason??null}});let d=await r.getSandboxRuntime(e);return d.status==="waiting_for_user"?d:r.updateSandboxRuntimeStatus(e,{status:"waiting_for_user",expectedVersion:d.version,summary:a.summary??a.reason,metadata:{workflowWaitForUserReason:a.reason??null}})},"waitForUser"),keepAlive:n((a={})=>{let d=D(a);return r.emitSandboxRuntimeEvent(e,{type:"workflow.keepalive",summary:a.summary??a.reason??"Workflow keepalive",payload:{...a.payload,reason:a.reason??null,keepaliveUntil:d},lifecycleHint:{kind:"keepalive",reason:a.reason??null,keepaliveUntil:d}})},"keepAlive"),checkpoint:n(a=>r.checkpointSandboxRuntime(e,a),"checkpoint"),files:{write:n(async(a,d)=>r.uploadFile((await s()).id,a,d),"write"),read:n(async a=>r.downloadFile((await s()).id,a),"read"),readResponse:n(async a=>r.downloadFileResponse((await s()).id,a),"readResponse"),list:n(async(a={})=>r.listFiles((await s()).id,a),"list"),delete:n(async(a,d={})=>r.deleteFile((await s()).id,a,d),"delete"),search:n(async a=>r.searchFiles((await s()).id,a),"search"),stat:n(async a=>r.statFile((await s()).id,a),"stat"),mkdir:n(async a=>r.mkdir((await s()).id,a),"mkdir"),move:n(async a=>r.moveFile((await s()).id,a),"move")},commands:{run:n(async a=>r.exec((await s()).id,typeof a=="string"?{command:a}:a),"run")},ports:{expose:n(async a=>r.openPort((await s()).id,typeof a=="number"?{port:a}:a),"expose")},promote:n((a,d={})=>r.promoteSandboxRuntime(e,a,d),"promote"),preserveSource:n((a={},d={})=>r.preserveSandboxRuntimeSource(e,a,d),"preserveSource"),archive:n(async a=>{let d=a??(await r.getSandboxRuntime(e)).version;return r.updateSandboxRuntimeStatus(e,{status:"archived",expectedVersion:d})},"archive")}}n(E,"createSandboxRuntimeHandle");function D(r){if(r?.until instanceof Date)return r.until.toISOString();if(typeof r?.until=="string"&&r.until.trim())return new Date(r.until).toISOString();let e=typeof r?.seconds=="number"&&Number.isFinite(r.seconds)?Math.max(1,Math.trunc(r.seconds)):60;return new Date(Date.now()+e*1e3).toISOString()}n(D,"runtimeKeepaliveUntilIso");async function z(r,e={}){let t=`openpond-code-smoke-${Date.now()}`,o=`openpond-code-exec-ok:${t}`,s=`openpond-code-preview-ok:${t}`,i=`openpond-code-file-ok:${t}`,c=4173,u=null,a=null,d=!1,f=!1;try{let m=await N(r,await r.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:t,source:"openpond-code-sandbox-smoke"}},{async:!0}));u=m.id;let h=e.expectedMppMode;if(h&&m.reservation.mpp?.mode!==h)throw new Error(`expected ${h} reservation, got ${m.reservation.mpp?.mode??"none"}`);if(!h&&!m.reservation.mpp?.mode)throw new Error("expected sandbox reservation MPP metadata");let R=await r.exec(m.id,{command:[`printf '${o}\\n'`,"test -f README && printf 'repo-clone-ok\\n'","cat > server.cjs <<'EOF'","const { createServer } = require('node:http');",`createServer((_request, response) => response.end('${s}')).listen(${c}, '0.0.0.0');`,"EOF","nohup node server.cjs > server.log 2>&1 & sleep 1"].join(`
|
|
3
|
+
`),timeoutSeconds:120});if(R.command.status!=="succeeded")throw new Error(`expected command success, got ${R.command.status}`);if(!R.command.output.includes(o))throw new Error("expected exec marker");if(await r.uploadFile(m.id,"openpond-code-smoke.txt",i),await r.downloadFile(m.id,"openpond-code-smoke.txt")!==i)throw new Error("expected file roundtrip marker");let g=null;if(e.snapshot||e.fork){let S=await r.createSnapshot(m.id,{async:!0,name:`openpond-code-smoke-${t}`,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"}]}}}),p=S.snapshot??(await K(r,m.id,S.snapshotJob?.snapshotId)).snapshot;if(g=p.id,p.state!=="ready")throw new Error(`expected ready snapshot, got ${p.state}`)}if(e.fork){if(!g)throw new Error("expected snapshot id before fork");let S=await N(r,(await r.forkSnapshot(g,{budget:{maxUsd:e.budgetUsd??"0.05"},metadata:{source:"openpond-code-sandbox-smoke-fork",templateSnapshotId:g}},{async:!0})).sandbox);a=S.id;let p=await r.exec(S.id,{command:"cat openpond-code-smoke.txt",timeoutSeconds:120});if(p.command.status!=="succeeded")throw new Error(`expected fork command success, got ${p.command.status}`);if(!p.command.output.includes(i))throw new Error("expected fork snapshot marker");e.keep||(await q(r,S.id),f=!0)}let x=null;if(e.preview!==!1){let S=await r.openPort(m.id,{label:"openpond-code-smoke",port:c}),p=await fetch(S.preview.url);x=p.status;let F=await p.text();if(p.status!==200)throw new Error(`expected preview HTTP 200, got ${p.status}`);if(!F.includes(s))throw new Error("expected preview marker")}let{sandbox:M,receipts:B}=await H(r,m.id);return e.keep||(await q(r,m.id),d=!0),{deleted:d,execOutput:R.command.output.trim(),fileRoundtrip:!0,forkSandboxId:a,previewStatus:x,receiptRefs:B.map(S=>S.mpp.receiptRef??null),reservationRef:m.reservation.mpp?.reservationRef??null,runId:t,sandboxId:m.id,snapshotId:g,state:M.state}}finally{a&&!e.keep&&!f&&await L(r,a),u&&!e.keep&&!d&&await L(r,u)}}n(z,"runSandboxSmoke");async function H(r,e){try{await r.stop(e)}catch{await r.stop(e,{async:!0})}let t=await J(r,e,new Set(["stopped","deleted"]),"stop"),o=await G(r,e);if(o.length===0)throw new Error("expected receipt readback");return{sandbox:t,receipts:o}}n(H,"stopSandboxForSmoke");async function q(r,e){try{let t=await r.delete(e);if(t.state==="deleted")return t;await r.delete(e,{async:!0})}catch{await r.delete(e,{async:!0})}return J(r,e,new Set(["deleted"]),"delete")}n(q,"deleteSandboxForSmoke");async function L(r,e){try{await q(r,e)}catch{await r.delete(e,{async:!0}).catch(()=>{})}}n(L,"cleanupSandboxBestEffort");async function J(r,e,t,o){let c=Date.now()+3e5,u=await r.get(e);for(;Date.now()<c;){if(t.has(u.state))return u;if(u.state==="error")throw new Error(`sandbox ${o} failed: ${e}`);await I(3e3),u=await r.get(e)}throw new Error(`sandbox ${o} did not reach ${[...t].join("/")} before timeout: ${e} (${u.state})`)}n(J,"waitForSandboxState");async function G(r,e){let s=Date.now()+12e4,i=await r.receipts(e);for(;Date.now()<s;){if(i.length>0)return i;await I(3e3),i=await r.receipts(e)}return i}n(G,"waitForReceipts");async function N(r,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 t=12*6e4,o=3e3,s=Date.now()+t,i=e;for(;Date.now()<s;){if(await I(o),i=await r.get(e.id),i.state==="running"||i.state==="stopped")return i;if(i.state==="error")throw new Error(`sandbox create failed: ${i.id}
|
|
6
|
+
${i.logs.join(`
|
|
7
|
+
`)}`)}throw new Error(`sandbox create did not reach running state before timeout: ${i.id} (${i.state})`)}n(N,"waitForCreateReady");async function K(r,e,t){if(!t)throw new Error("snapshot job did not return snapshot id");let o=12*6e4,s=3e3,i=Date.now()+o,c=await r.get(e);for(;Date.now()<i;){let u=c.snapshots?.find(d=>d.id===t);if(u?.state==="ready")return{sandbox:c,snapshot:u};let a=c.snapshotJobs?.find(d=>d.snapshotId===t);if(a?.status==="failed")throw new Error(`snapshot job failed: ${a.error??t}`);await I(s),c=await r.get(e)}throw new Error(`snapshot did not reach ready state before timeout: ${t}`)}n(K,"waitForSnapshotReady");function I(r){return new Promise(e=>setTimeout(e,r))}n(I,"sleep");function l(r={}){return r.async||r.respondAsync?{Prefer:"respond-async"}:void 0}n(l,"asyncRequestHeaders");async function P(r){let e=await y(r.sandboxApiUrl,r.apiKey,r.path,{timeoutMs:0,maxResponseBytes:0});if(!e.body)return;let t=e.body.getReader(),o=new TextDecoder,s="";try{for(;;){let{done:i,value:c}=await t.read();if(i)break;s+=o.decode(c,{stream:!0});let u=s.indexOf(`
|
|
8
|
+
|
|
9
|
+
`);for(;u!==-1;){let a=s.slice(0,u);s=s.slice(u+2);let d=W(a);d&&process.stdout.write(d),u=s.indexOf(`
|
|
10
|
+
|
|
11
|
+
`)}}}finally{t.releaseLock()}}n(P,"streamSandboxEventOutput");function _(r){return typeof r=="string"?{dataBase64:Buffer.from(r,"utf-8").toString("base64")}:r instanceof Uint8Array?{dataBase64:Buffer.from(r).toString("base64")}:r}n(_,"normalizePtyInput");function W(r){if(!r.includes("event: output"))return null;let e=r.split(/\r?\n/).filter(t=>t.startsWith("data: ")).map(t=>t.slice(6));if(e.length===0)return null;try{let t=JSON.parse(e.join(`
|
|
12
|
+
`));return typeof t.output=="string"?t.output:null}catch{return null}}n(W,"parseProcessOutputEvent");var b=class{static{n(this,"OpenPondSandboxInstanceClient")}apiKey;apiRootUrl;sandboxApiUrl;customEndpoint;constructor(e){this.apiKey=e.apiKey,this.customEndpoint=e.customEndpoint??!1;let t=e.sandboxApiUrl??e.baseUrl??O;this.sandboxApiUrl=$(t,{apiBaseUrl:this.customEndpoint?void 0:t}),this.apiRootUrl=C(this.sandboxApiUrl)}create(e,t={}){return this.request("",{method:"POST",...this.customEndpoint?{timeoutMs:18e4}:{},headers:l(t),body:JSON.stringify(e)}).then(o=>o.sandbox)}get(e){return this.request(`/${encodeURIComponent(e)}`).then(t=>t.sandbox)}exec(e,t){return this.request(`/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify(t)})}startProcess(e,t){return this.request(`/${encodeURIComponent(e)}/processes`,{method:"POST",body:JSON.stringify(t)})}listProcesses(e){return this.request(`/${encodeURIComponent(e)}/processes`)}getProcess(e,t,o={}){let s=new URLSearchParams;return o.since!==void 0&&s.set("since",String(Math.max(0,o.since))),this.request(`/${encodeURIComponent(e)}/processes/${encodeURIComponent(t)}${s.size>0?`?${s.toString()}`:""}`)}stopProcess(e,t){return this.request(`/${encodeURIComponent(e)}/processes/${encodeURIComponent(t)}`,{method:"DELETE"})}async streamProcessOutput(e,t,o={}){let s=new URLSearchParams;o.since!==void 0&&s.set("since",String(Math.max(0,o.since))),await P({sandboxApiUrl:this.sandboxApiUrl,apiKey:this.apiKey,path:`/${encodeURIComponent(e)}/processes/${encodeURIComponent(t)}/stream${s.size>0?`?${s.toString()}`:""}`})}startPty(e,t={}){return this.request(`/${encodeURIComponent(e)}/pty`,{method:"POST",body:JSON.stringify(t)})}listPtys(e){return this.request(`/${encodeURIComponent(e)}/pty`)}getPty(e,t,o={}){let s=new URLSearchParams;return o.since!==void 0&&s.set("since",String(Math.max(0,o.since))),this.request(`/${encodeURIComponent(e)}/pty/${encodeURIComponent(t)}${s.size>0?`?${s.toString()}`:""}`)}writePtyInput(e,t,o){return this.request(`/${encodeURIComponent(e)}/pty/${encodeURIComponent(t)}/input`,{method:"POST",body:JSON.stringify(_(o))})}stopPty(e,t){return this.request(`/${encodeURIComponent(e)}/pty/${encodeURIComponent(t)}`,{method:"DELETE"})}async streamPtyOutput(e,t,o={}){let s=new URLSearchParams;o.since!==void 0&&s.set("since",String(Math.max(0,o.since))),await P({sandboxApiUrl:this.sandboxApiUrl,apiKey:this.apiKey,path:`/${encodeURIComponent(e)}/pty/${encodeURIComponent(t)}/stream${s.size>0?`?${s.toString()}`:""}`})}uploadFile(e,t,o){return this.uploadFileBase64(e,t,Buffer.from(o,"utf-8").toString("base64"))}uploadFileBase64(e,t,o){return this.request(`/${encodeURIComponent(e)}/files`,{method:"POST",body:JSON.stringify({path:t,contentsBase64:o})})}async downloadFile(e,t){let o=await this.downloadFileResponse(e,t);return Buffer.from(o.file.contentsBase64,"base64").toString("utf-8")}downloadFileResponse(e,t){let o=typeof t=="string"?{path:t}:t,s=new URLSearchParams({path:o.path});return o.offsetBytes!==void 0&&s.set("offsetBytes",String(o.offsetBytes)),o.maxBytes!==void 0&&s.set("maxBytes",String(o.maxBytes)),this.request(`/${encodeURIComponent(e)}/files?${s.toString()}`)}listFiles(e,t={}){let o=new URLSearchParams({list:"1"});return t.path&&o.set("path",t.path),t.recursive!==void 0&&o.set("recursive",String(t.recursive)),t.maxEntries!==void 0&&o.set("maxEntries",String(t.maxEntries)),this.request(`/${encodeURIComponent(e)}/files?${o.toString()}`)}deleteFile(e,t,o={}){let s=new URLSearchParams({path:t});return o.recursive!==void 0&&s.set("recursive",String(o.recursive)),this.request(`/${encodeURIComponent(e)}/files?${s.toString()}`,{method:"DELETE"})}statFile(e,t){let o=new URLSearchParams({stat:"1",path:t});return this.request(`/${encodeURIComponent(e)}/files?${o.toString()}`)}mkdir(e,t){let o=typeof t=="string"?{path:t}:t,s=new URLSearchParams({path:o.path});return o.recursive!==void 0&&s.set("recursive",String(o.recursive)),this.request(`/${encodeURIComponent(e)}/files?${s.toString()}`,{method:"PUT"})}moveFile(e,t){let o=new URLSearchParams({fromPath:t.fromPath,toPath:t.toPath});return t.overwrite!==void 0&&o.set("overwrite",String(t.overwrite)),this.request(`/${encodeURIComponent(e)}/files?${o.toString()}`,{method:"PATCH"})}searchFiles(e,t){let o=new URLSearchParams({search:"1",query:t.query});return t.path&&o.set("path",t.path),t.maxResults!==void 0&&o.set("maxResults",String(t.maxResults)),this.request(`/${encodeURIComponent(e)}/files?${o.toString()}`)}openPort(e,t){return this.request(`/${encodeURIComponent(e)}/ports`,{method:"POST",body:JSON.stringify(t)})}createSnapshot(e,t){return this.request(`/${encodeURIComponent(e)}/snapshots`,{method:"POST",body:JSON.stringify(t)})}updateSnapshot(e,t,o){return this.request(`/${encodeURIComponent(e)}/snapshots/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(o)})}validateSnapshot(e,t,o={}){return this.request(`/${encodeURIComponent(e)}/snapshots/${encodeURIComponent(t)}/validate`,{method:"POST",body:JSON.stringify(o)})}publishSnapshot(e,t){return this.request(`/${encodeURIComponent(e)}/snapshots/${encodeURIComponent(t)}/publish`,{method:"POST"})}fork(e,t={}){return this.request(`/${encodeURIComponent(e)}/fork`,{method:"POST",body:JSON.stringify(t)})}stop(e,t={}){let o=new URLSearchParams;return t.failOnUnpreservedChanges&&o.set("failOnUnpreservedChanges","true"),this.request(`/${encodeURIComponent(e)}/stop${o.size>0?`?${o.toString()}`:""}`,{method:"POST",headers:l(t)})}start(e,t={}){return this.request(`/${encodeURIComponent(e)}/start`,{method:"POST",headers:l(t)})}restore(e){return this.request(`/${encodeURIComponent(e)}/restore`,{method:"POST"})}delete(e,t={}){let o=new URLSearchParams;return t.failOnUnpreservedChanges&&o.set("failOnUnpreservedChanges","true"),this.request(`/${encodeURIComponent(e)}${o.size>0?`?${o.toString()}`:""}`,{method:"DELETE",headers:l(t)}).then(s=>s.sandbox)}receipts(e){return this.request(`/${encodeURIComponent(e)}/receipts`).then(t=>t.receipts)}logs(e){return this.request(`/${encodeURIComponent(e)}/logs`).then(t=>t.logs)}gitStatus(e){return this.request(`/${encodeURIComponent(e)}/git/status`)}gitDiff(e,t={}){return this.request(`/${encodeURIComponent(e)}/git/diff`,{method:"POST",body:JSON.stringify(t)})}gitExportPatch(e,t={}){return this.request(`/${encodeURIComponent(e)}/git/export-patch`,{method:"POST",body:JSON.stringify(t)})}gitBranch(e,t){return this.request(`/${encodeURIComponent(e)}/git/branch`,{method:"POST",body:JSON.stringify(t)})}gitCommit(e,t){return this.request(`/${encodeURIComponent(e)}/git/commit`,{method:"POST",body:JSON.stringify(t)})}gitPull(e,t={}){return this.request(`/${encodeURIComponent(e)}/git/pull`,{method:"POST",body:JSON.stringify(t)})}gitPush(e,t={}){return this.request(`/${encodeURIComponent(e)}/git/push`,{method:"POST",body:JSON.stringify(t)})}billing(e){return this.request(`/${encodeURIComponent(e)}/billing`)}pricing(){return this.request("/pricing")}costs(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.agentId&&t.set("agentId",e.agentId),this.request(`/costs${t.size>0?`?${t.toString()}`:""}`)}integrationLeases(e){return this.request(`/${encodeURIComponent(e)}/integrations`)}attachIntegrationConnection(e,t){return this.request(`/${encodeURIComponent(e)}/integrations`,{method:"POST",body:JSON.stringify(t)})}removeIntegrationLease(e,t){return this.request(`/${encodeURIComponent(e)}/integrations`,{method:"DELETE",body:JSON.stringify({leaseId:t})})}async request(e,t={}){let o=await y(this.sandboxApiUrl,this.apiKey,e,this.customEndpoint?{...t,explicitBearerAuth:!0,redirect:"error"}:t);return w(o,"Sandbox request")}async requestApiRoot(e,t={}){let o=await y(this.apiRootUrl,this.apiKey,e,this.customEndpoint?{...t,explicitBearerAuth:!0,redirect:"error"}:t);return w(o,"OpenPond API request")}};var U=class extends b{static{n(this,"OpenPondSandboxClient")}runtimes=v(this);sandboxes=A(this);profile=T(this);projects=j(this);agents=k(this);list(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.agentId&&t.set("agentId",e.agentId),this.request(t.size>0?`?${t.toString()}`:"").then(o=>o.sandboxes)}listSecrets(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),this.requestApiRoot(`/sandbox-secrets${t.size>0?`?${t.toString()}`:""}`).then(o=>o.secrets)}getSecret(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(e)}${o.size>0?`?${o.toString()}`:""}`).then(s=>s.secret)}createSecret(e){return this.requestApiRoot("/sandbox-secrets",{method:"POST",body:JSON.stringify(e)}).then(t=>t.secret)}rotateSecret(e,t){let o=new URLSearchParams;t.teamId&&o.set("teamId",t.teamId);let{teamId:s,...i}=t;return this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(e)}/rotate${o.size>0?`?${o.toString()}`:""}`,{method:"POST",body:JSON.stringify(i)}).then(c=>c.secret)}attachSecret(e,t){let o=new URLSearchParams;t.teamId&&o.set("teamId",t.teamId);let{teamId:s,...i}=t;return this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(e)}/attach${o.size>0?`?${o.toString()}`:""}`,{method:"POST",body:JSON.stringify(i)}).then(c=>c.secret)}revokeSecret(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(e)}/revoke${o.size>0?`?${o.toString()}`:""}`,{method:"POST"}).then(s=>s.secret)}deleteSecret(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),this.requestApiRoot(`/sandbox-secrets/${encodeURIComponent(e)}${o.size>0?`?${o.toString()}`:""}`,{method:"DELETE"}).then(s=>s.secret)}snapshotCatalog(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.agentId&&t.set("agentId",e.agentId),e.q&&t.set("q",e.q),e.kind&&t.set("kind",e.kind),e.replayState&&t.set("replayState",e.replayState),e.visibility&&t.set("visibility",e.visibility),e.tag&&t.set("tag",e.tag),e.useCase&&t.set("useCase",e.useCase),e.limit&&t.set("limit",String(e.limit)),this.request(`/catalog/snapshots${t.size>0?`?${t.toString()}`:""}`)}listSandboxRuntimes(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.agentId&&t.set("agentId",e.agentId),this.requestApiRoot(`/runtimes${t.size>0?`?${t.toString()}`:""}`).then(o=>o.runtimes)}listProjects(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/projects?${t.toString()}`).then(o=>o.projects)}upsertProject(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/projects?${t.toString()}`,{method:"POST",body:JSON.stringify(e)}).then(o=>o.project)}getHostedProfile(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/profile?${t.toString()}`).then(o=>o.profile)}ensureHostedProfile(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/profile/ensure?${t.toString()}`,{method:"POST"}).then(o=>{if(!o.profile)throw new Error("hosted_profile_missing");return o.profile})}pushHostedProfile(e){let t=new URLSearchParams({teamId:e.teamId}),{teamId:o,...s}=e;return this.requestApiRoot(`/profile/push?${t.toString()}`,{method:"POST",body:JSON.stringify(s)})}async upsertProjectGitRemote(e){let t=await this.upsertProject(e);return this.ensureProjectGitRemote(t.id,{teamId:e.teamId})}getProject(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(e)}?${o.toString()}`).then(s=>s.project)}syncProject(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(e)}/sync?${o.toString()}`,{method:"POST"}).then(s=>s.project)}ensureProjectGitRemote(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(e)}/git?${o.toString()}`,{method:"POST"})}uploadProjectSource(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/projects/${encodeURIComponent(e)}/source?${o.toString()}`,{method:"POST",body:JSON.stringify(i)}).then(c=>c.project)}updateProject(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/projects/${encodeURIComponent(e)}?${o.toString()}`,{method:"PATCH",body:JSON.stringify(i)}).then(c=>c.project)}archiveProject(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/projects/${encodeURIComponent(e)}?${o.toString()}`,{method:"DELETE"}).then(s=>s.project)}listAgents(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/agents?${t.toString()}`).then(o=>o.agents)}upsertAgent(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/agents?${t.toString()}`,{method:"POST",body:JSON.stringify(e)}).then(o=>o.agent)}getAgent(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/agents/${encodeURIComponent(e)}?${o.toString()}`).then(s=>s.agent)}archiveAgent(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/agents/${encodeURIComponent(e)}?${o.toString()}`,{method:"DELETE"}).then(s=>s.agent)}updateAgent(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/agents/${encodeURIComponent(e)}?${o.toString()}`,{method:"PATCH",body:JSON.stringify(i)}).then(c=>c.agent)}runAgent(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/agents/${encodeURIComponent(e)}/run?${o.toString()}`,{method:"POST",headers:{Prefer:"respond-async"},body:JSON.stringify(i)})}getAgentSourceDeployPlan(e,t){let o=new URLSearchParams({teamId:t.teamId});return this.requestApiRoot(`/agents/${encodeURIComponent(e)}/source/deploy-plan?${o.toString()}`).then(s=>s.deployPlan)}listAgentManifestSnapshots(e,t){let o=new URLSearchParams({teamId:t.teamId});return t.limit!==void 0&&o.set("limit",String(t.limit)),this.requestApiRoot(`/agents/${encodeURIComponent(e)}/source/manifest-snapshots?${o.toString()}`).then(s=>s.manifestSnapshots)}requestAgentSourceChecks(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/agents/${encodeURIComponent(e)}/source/checks?${o.toString()}`,{method:"POST",body:JSON.stringify(i),timeoutMs:900*1e3})}configureAgentSourceSetup(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/agents/${encodeURIComponent(e)}/source/setup?${o.toString()}`,{method:"POST",body:JSON.stringify(i)})}publishAgentSource(e,t){let o=new URLSearchParams({teamId:t.teamId}),{teamId:s,...i}=t;return this.requestApiRoot(`/agents/${encodeURIComponent(e)}/source/publish?${o.toString()}`,{method:"POST",body:JSON.stringify(i)})}getMicrosoftTeamsBotOverview(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/teams/bot/overview?${t.toString()}`)}bindMicrosoftTeamsBotConversation(e){return this.requestApiRoot("/teams/bot/bindings",{method:"POST",body:JSON.stringify(e)})}rebindMicrosoftTeamsBotConversation(e,t){return this.requestApiRoot(`/teams/bot/bindings/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}unlinkMicrosoftTeamsBotConversation(e){return this.requestApiRoot(`/teams/bot/bindings/${encodeURIComponent(e.bindingId)}`,{method:"DELETE",body:JSON.stringify({teamId:e.teamId})})}sendMicrosoftTeamsBotDiagnostic(e){return this.requestApiRoot("/teams/bot/diagnostics",{method:"POST",body:JSON.stringify(e)})}sendMicrosoftTeamsBotDiagnosticRun(e){return this.requestApiRoot("/teams/bot/diagnostics/run",{method:"POST",body:JSON.stringify(e)})}createSandboxRuntime(e){return this.requestApiRoot("/runtimes",{method:"POST",body:JSON.stringify(e)}).then(t=>t.runtime)}sandboxRuntime(e,t=null){return E(this,e,t)}getSandboxRuntime(e){return this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}`).then(t=>t.runtime)}createSandboxRuntimeSandbox(e,t={},o={}){return this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/sandbox`,{method:"POST",headers:l(o),body:JSON.stringify(t)})}updateSandboxRuntimeStatus(e,t){return this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/status`,{method:"PATCH",body:JSON.stringify(t)}).then(o=>o.runtime)}listSandboxRuntimeEvents(e){return this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/events`)}emitSandboxRuntimeEvent(e,t){return this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/events`,{method:"POST",body:JSON.stringify(t)})}checkpointSandboxRuntime(e,t){return this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/checkpoints`,{method:"POST",body:JSON.stringify(t)}).then(o=>o.runtime)}promoteSandboxRuntime(e,t,o={}){let s=new URLSearchParams;return o.teamId&&s.set("teamId",o.teamId),this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/promote${s.size>0?`?${s.toString()}`:""}`,{method:"POST",body:JSON.stringify(t)})}preserveSandboxRuntimeSource(e,t={},o={}){let s=new URLSearchParams;return o.teamId&&s.set("teamId",o.teamId),this.requestApiRoot(`/runtimes/${encodeURIComponent(e)}/preserve-source${s.size>0?`?${s.toString()}`:""}`,{method:"POST",body:JSON.stringify(t)})}forkSnapshot(e,t={},o={}){let s=new URLSearchParams;t.teamId&&s.set("teamId",t.teamId),t.projectId&&s.set("projectId",t.projectId),o.async&&s.set("async","1");let{teamId:i,projectId:c,...u}=t;return this.request(`/catalog/snapshots/${encodeURIComponent(e)}/fork${s.size>0?`?${s.toString()}`:""}`,{method:"POST",headers:o.async?{Prefer:"respond-async"}:void 0,body:JSON.stringify({...u,snapshotId:e})})}templates(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.q&&t.set("q",e.q),e.name&&t.set("name",e.name),e.version&&t.set("version",e.version),e.visibility&&t.set("visibility",e.visibility),e.tag&&t.set("tag",e.tag),e.useCase&&t.set("useCase",e.useCase),e.limit&&t.set("limit",String(e.limit)),this.request(`/templates${t.size>0?`?${t.toString()}`:""}`)}publishedSnapshots(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.q&&t.set("q",e.q),e.name&&t.set("name",e.name),e.version&&t.set("version",e.version),e.visibility&&t.set("visibility",e.visibility),e.tag&&t.set("tag",e.tag),e.useCase&&t.set("useCase",e.useCase),e.limit&&t.set("limit",String(e.limit)),this.request(`/published-snapshots${t.size>0?`?${t.toString()}`:""}`).then(o=>{let s=o.publishedSnapshots??o.templates;return{...o,templates:s,publishedSnapshots:s}})}launchTemplate(e){let t=new URLSearchParams;e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId);let{teamId:o,projectId:s,...i}=e;return this.request(`/templates/launch${t.size>0?`?${t.toString()}`:""}`,{method:"POST",body:JSON.stringify(i)})}runPublishedSnapshot(e){let t=new URLSearchParams;e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId);let{teamId:o,projectId:s,...i}=e;return this.request(`/published-snapshots/launch${t.size>0?`?${t.toString()}`:""}`,{method:"POST",body:JSON.stringify(i)}).then(c=>{let u=c.publishedSnapshot??c.template;return{...c,template:u,publishedSnapshot:u}})}listSchedules(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.sourceSandboxId&&t.set("sourceSandboxId",e.sourceSandboxId),this.request(`/schedules${t.size>0?`?${t.toString()}`:""}`)}createSchedule(e){let t=new URLSearchParams;e.projectId&&t.set("projectId",e.projectId);let{projectId:o,...s}=e;return this.request(`/schedules${t.size>0?`?${t.toString()}`:""}`,{method:"POST",body:JSON.stringify(s)})}getSchedule(e){return this.request(`/schedules/${encodeURIComponent(e)}`)}updateSchedule(e,t){return this.request(`/schedules/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}deleteSchedule(e){return this.request(`/schedules/${encodeURIComponent(e)}`,{method:"DELETE"})}listScheduleRuns(e,t={}){let o=new URLSearchParams;return t.limit!==void 0&&o.set("limit",String(t.limit)),this.request(`/schedules/${encodeURIComponent(e)}/runs${o.size>0?`?${o.toString()}`:""}`)}runScheduleNow(e,t={}){return this.request(`/schedules/${encodeURIComponent(e)}/run`,{method:"POST",body:JSON.stringify(t)})}listTemplateBuilds(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/sandbox-template-builds?${t.toString()}`).then(o=>o.builds)}createTemplateBuild(e){return this.requestApiRoot("/sandbox-template-builds",{method:"POST",body:JSON.stringify(e)}).then(t=>t.build)}getTemplateBuild(e){return this.requestApiRoot(`/sandbox-template-builds/${encodeURIComponent(e)}`).then(t=>t.build)}getTemplateBuildLogs(e){return this.requestApiRoot(`/sandbox-template-builds/${encodeURIComponent(e)}/logs`)}cancelTemplateBuild(e){return this.requestApiRoot(`/sandbox-template-builds/${encodeURIComponent(e)}/cancel`,{method:"POST"}).then(t=>t.build)}listPublishedSnapshotBuilds(e){let t=new URLSearchParams({teamId:e.teamId});return this.requestApiRoot(`/published-snapshot-builds?${t.toString()}`).then(o=>o.builds)}createPublishedSnapshotBuild(e){return this.requestApiRoot("/published-snapshot-builds",{method:"POST",body:JSON.stringify(e)}).then(t=>t.build)}getPublishedSnapshotBuild(e){return this.requestApiRoot(`/published-snapshot-builds/${encodeURIComponent(e)}`).then(t=>t.build)}getPublishedSnapshotBuildLogs(e){return this.requestApiRoot(`/published-snapshot-builds/${encodeURIComponent(e)}/logs`)}cancelPublishedSnapshotBuild(e){return this.requestApiRoot(`/published-snapshot-builds/${encodeURIComponent(e)}/cancel`,{method:"POST"}).then(t=>t.build)}listOrganizations(){return this.requestApiRoot("/organizations").then(e=>e.organizations??e.teams??[])}createOrganization(e){return this.requestApiRoot("/organizations",{method:"POST",body:JSON.stringify(e)}).then(t=>t.organization)}getOrganization(e){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}`).then(t=>t.organization)}updateOrganization(e,t){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)}).then(o=>o.organization)}listOrganizationMembers(e){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/members`).then(t=>t.members)}upsertOrganizationMember(e,t){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/members`,{method:"POST",body:JSON.stringify(t)}).then(o=>o.member)}getOrganizationMcpServer(e){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/mcp-server`).then(t=>t.mcpServer)}generateOrganizationMcpServer(e,t={}){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/mcp-server`,{method:"POST",body:JSON.stringify(t)}).then(o=>o.mcpServer)}rotateOrganizationMcpServer(e){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/mcp-server/rotate`,{method:"POST"}).then(t=>t.mcpServer)}disableOrganizationMcpServer(e){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/mcp-server/disable`,{method:"POST"}).then(t=>t.mcpServer)}enableOrganizationMcpServer(e){return this.requestApiRoot(`/organizations/${encodeURIComponent(e)}/mcp-server/enable`,{method:"POST"}).then(t=>t.mcpServer)}startReplay(e){let t=new URLSearchParams;e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId);let{teamId:o,projectId:s,...i}=e;return this.requestApiRoot(`/sandbox-replays${t.size>0?`?${t.toString()}`:""}`,{method:"POST",body:JSON.stringify(i)})}listReplays(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),this.requestApiRoot(`/sandbox-replays${t.size>0?`?${t.toString()}`:""}`)}getReplay(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),t.projectId&&o.set("projectId",t.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(e)}${o.size>0?`?${o.toString()}`:""}`)}getReplayLogs(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),t.projectId&&o.set("projectId",t.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(e)}/logs${o.size>0?`?${o.toString()}`:""}`)}getReplayArtifacts(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),t.projectId&&o.set("projectId",t.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(e)}/artifacts${o.size>0?`?${o.toString()}`:""}`)}cancelReplay(e,t={}){let o=new URLSearchParams;return t.teamId&&o.set("teamId",t.teamId),t.projectId&&o.set("projectId",t.projectId),this.requestApiRoot(`/sandbox-replays/${encodeURIComponent(e)}/cancel${o.size>0?`?${o.toString()}`:""}`,{method:"POST"})}integrationConnections(e={}){let t=new URLSearchParams;return e.teamId&&t.set("teamId",e.teamId),e.projectId&&t.set("projectId",e.projectId),e.agentId&&t.set("agentId",e.agentId),e.status&&t.set("status",e.status),this.requestApiRoot(`/integrations/connections${t.size>0?`?${t.toString()}`:""}`)}mcpServerConfig(){return{name:"openpond-sandboxes",transport:"streamable-http",url:`${this.sandboxApiUrl}/mcp`,headers:{"openpond-api-key":this.apiKey}}}smoke(e={}){return z(this,e)}};function Re(r){return new U(r)}n(Re,"createOpenPondSandboxClient");export{U as a,Re as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{D as Lr,H as Or,J as Pt,K as Cr,L as Nr,M as xr,V as Z,X as it,e as Tr,j as Er,q as br,r as Ar,s as Sr,t as vr,u as Ir}from"./chunk-
|
|
2
|
+
import{D as Lr,H as Or,J as Pt,K as Cr,L as Nr,M as xr,V as Z,X as it,e as Tr,j as Er,q as br,r as Ar,s as Sr,t as vr,u as Ir}from"./chunk-BKEDG3A4.js";import{d as wr}from"./chunk-OE22TAXP.js";import{c as w,d as hr,e as R,f as gr,g as _r,h as _,i as je,j as yr,k as Rt,l as me,m as D,n as kr,o as Rr,p as he,q as Pr,r as ae,t as $}from"./chunk-UGOK7VTC.js";import{A as d}from"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import{randomUUID as Dt,createHash as ho}from"node:crypto";import{promises as V,constants as Mt}from"node:fs";import Be from"node:path";var go="missing";function G(e){return e===null?go:ho("sha256").update(e).digest("hex")}c(G,"fileRevision");async function S(e){me(Be.dirname(e));try{let t=await V.lstat(e);if(!t.isFile()||t.isSymbolicLink())throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Storage must be a regular file, not a symbolic link.",action:"Use a regular file in the OpenPond home."});return await V.readFile(e,"utf8")}catch(t){if(R(t))return null;throw t}}c(S,"readOptionalFile");async function U(e){if(me(e),await V.mkdir(e,{recursive:!0,mode:448}),(await V.lstat(e)).isSymbolicLink())throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Managed storage directories cannot be symbolic links.",action:"Select a regular local storage folder."});Rt(e)}c(U,"privateDirectory");async function I(e,t,r={}){let n=Be.dirname(e);r.privateParent===!1?await V.mkdir(n,{recursive:!0,mode:448}):await U(n);let o=await V.lstat(e).catch(a=>{if(R(a))return null;throw a});if(o&&(!o.isFile()||o.isSymbolicLink()))throw new w({code:"UNSAFE_STORAGE_PATH",path:e,message:"Cannot replace a non-regular storage file.",action:"Use a regular file in the OpenPond home."});let i=Be.join(n,`.${Be.basename(e)}.${process.pid}.${Dt()}.tmp`);try{let a=await V.open(i,Mt.O_CREAT|Mt.O_EXCL|Mt.O_WRONLY,384);try{await a.writeFile(t),await a.sync()}finally{await a.close()}if(await V.rename(i,e),process.platform!=="win32"){let s=await V.open(n,"r");try{await s.sync()}finally{await s.close()}}}finally{await V.rm(i,{force:!0})}}c(I,"atomicWriteFile");async function L(e,t,r=1e4){let n=await we(e,r);try{return await t()}finally{await n()}}c(L,"withFileLock");async function _o(e,t){let r=`${e}.${process.pid}.${Dt()}.candidate`;try{let n=await V.open(r,"wx",384);try{await n.writeFile(t),await n.sync()}finally{await n.close()}await V.link(r,e)}finally{await V.rm(r,{force:!0})}}c(_o,"publishLock");async function we(e,t=1e4){await U(Be.dirname(e));let r=`${e}.lock`,n={pid:process.pid,nonce:Dt()},o=JSON.stringify(n),i=Date.now()+t;for(;;)try{await _o(r,o);break}catch(a){if(a.code!=="EEXIST")throw a;let s=await S(r);if(s){let l;try{l=JSON.parse(s).pid}catch{}if(typeof l=="number"&&Number.isInteger(l)&&l>0&&yo(l)){let p=await we(`${r}.reclaim`,Math.max(0,i-Date.now()));try{await S(r)===s&&await V.unlink(r).catch(f=>{if(!R(f))throw f})}finally{await p()}}}if(Date.now()>=i)throw new w({code:"STORAGE_BUSY",path:e,message:"Another OpenPond process is updating this storage.",action:"Wait for that process to finish, then retry. Do not delete a live process lock."});await new Promise(l=>setTimeout(l,25))}return async()=>{await S(r)===o&&await V.unlink(r)}}c(we,"acquireFileLock");function yo(e){try{return process.kill(e,0),!1}catch(t){return t.code==="ESRCH"}}c(yo,"processIsDead");async function M(e,t){let r=await S(e);if(r===null)return t();try{return JSON.parse(r)}catch(n){throw new w({code:"INVALID_STORAGE_JSON",path:e,message:"A storage file contains invalid JSON.",action:"Restore a verified backup or correct the file, then retry."},{cause:n})}}c(M,"readJsonFile");async function ba(e,t,r){return L(e,async()=>{let n=await r(await M(e,t));return await I(e,`${JSON.stringify(n,null,2)}
|
|
3
3
|
`),n})}c(ba,"updateJsonFile");var F=d.string().trim().min(1),at=d.string().trim().max(4096),st=F.max(200).refine(e=>!["__proto__","prototype","constructor"].includes(e),"Reserved identifier"),ct=F.max(2048).refine(e=>{try{let t=new URL(e);return["http:","https:"].includes(t.protocol)&&!t.username&&!t.password&&!t.hash&&![...t.searchParams.keys()].some(r=>/(?:token|secret|password|authorization|api[_-]?key|credential)/i.test(r))}catch{return!1}},"Use an HTTP endpoint without embedded credentials; configure authentication through a credential reference."),Dr=d.strictObject({provider_id:wr,model_id:F.max(300)}),Ft=d.discriminatedUnion("mode",[d.strictObject({mode:d.literal("inherit")}),d.strictObject({mode:d.literal("custom"),ref:Dr})]),Ur=d.discriminatedUnion("source",[d.strictObject({source:d.literal("secret"),id:st}),d.strictObject({source:d.literal("env"),name:F.regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(160)})]),wo=d.strictObject({handle:F,base_url:ct.optional(),api_base_url:ct.optional(),chat_api_base_url:ct.optional(),environment:F.optional(),credential:Ur.optional(),enabled:d.boolean().optional()}),To=Tr.omit({registryId:!0,version:!0,installUrl:!0,authMethodId:!0}).extend({registryId:F.max(160).optional(),version:F.max(200).optional(),installUrl:d.string().url().optional(),authMethodId:F.max(200).optional()}),Eo=d.strictObject({acp:To.optional(),enabled:d.boolean().optional(),binary_path:F.max(4096).optional(),source_home:F.max(4096).optional(),native_mode:F.max(200).optional(),native_options:d.record(d.string().max(200),d.string().max(300)).optional(),base_url:ct.optional(),default_model:F.max(300).optional(),model_overrides:d.array(F.max(300)).max(500).optional(),credential:Ur.optional()}),Ut=d.strictObject({mode:d.enum(["auto","disabled","custom"]).optional(),custom_command:at.optional()}),Mr=d.union([d.number().int().min(1).max(32),d.literal("unlimited")]),bo=d.strictObject({enabled:d.boolean().optional(),model:Ft.optional(),isolation_mode:Ar.optional(),max_concurrent_runs:d.number().int().min(1).max(16).optional(),tool_policy:Sr.optional(),background:d.boolean().optional(),peer_messages:vr.optional()}),Ao=d.strictObject({source:d.enum(["local","github","openpond_git"]),repository_id:F,profile_id:F}),jt=d.strictObject({schema_version:d.literal(1),chat:d.strictObject({model:Dr.optional(),steer_active_responses:d.boolean().optional()}).optional(),codex:d.strictObject({reasoning_effort:xr.optional()}).optional(),permissions:d.strictObject({command_access:Nr.optional(),codex_mode:Cr.optional()}).optional(),context_compaction:d.strictObject({auto_enabled:d.boolean().optional(),trigger_percent:d.number().int().min(50).max(95).optional(),summary_model:d.literal("same_model").optional()}).optional(),subagents:d.strictObject({enabled:d.boolean().optional(),delegation_mode:Ir.optional(),default_model:Ft.optional(),max_concurrent_runs:d.number().int().min(1).max(32).optional(),max_concurrent_runs_per_provider:Mr.optional(),max_concurrent_runs_per_workspace_target:Mr.optional(),roles:d.record(br,bo).refine(e=>Object.keys(e).length<=64,"At most 64 roles").optional()}).optional(),projects:d.strictObject({branch_prefix:d.string().trim().max(48).optional(),new_project_directory:at.optional()}).optional(),defaults:d.strictObject({account_id:st.optional(),team_id:F.max(191).optional(),profile_ref:Ao.optional()}).optional(),editor:d.strictObject({language_servers:d.enum(["auto","off"]).optional(),diagnostics_while_editing:d.boolean().optional(),check_on_save:d.boolean().optional(),languages:d.strictObject({typescript:Ut.optional(),python:Ut.optional(),rust:Ut.optional()}).optional()}).optional(),training:d.strictObject({default_model:Ft.optional(),creation_mode:d.enum(["defaults","customize"]).optional(),auto_approve_evidence:d.boolean().optional()}).optional(),notifications:d.strictObject({team_chat:d.enum(["all","direct_mentions","none"]).optional()}).optional(),ui:d.strictObject({advanced_workspace_controls:d.boolean().optional()}).optional(),runtime:d.strictObject({execution_mode:d.enum(["local","hosted"]).optional(),mode:d.enum(["general","builder"]).optional()}).optional(),personalization:d.strictObject({active:F.regex(/^(builtin|custom):[a-zA-Z0-9_-]+$/).optional(),mode:d.enum(["enabled","disabled"]).optional(),user_instructions:at.optional()}).optional(),storage:d.strictObject({datasets_dir:at.optional()}).optional(),accounts:d.record(st,wo).optional(),providers:d.record(st,Eo).optional()});function ne(e,t="user"){let r=jt.parse(e);if(t==="project"){let n=new Set(["schema_version","chat","codex","permissions","context_compaction","subagents","projects","editor"]);for(let o of Object.keys(r))if(!n.has(o))throw new Error(`Setting ${o} is not permitted in project configuration.`);if(r.projects?.new_project_directory!==void 0)throw new Error("projects.new_project_directory is a user-only setting.");for(let o of Object.values(r.editor?.languages??{}))if(o.custom_command!==void 0)throw new Error("Custom editor commands must be configured in user settings.");if(r.permissions?.command_access==="full-access"||r.permissions?.codex_mode==="full-access"||r.permissions?.codex_mode==="auto-review")throw new Error("Project configuration can restrict permissions but cannot grant additional access.");for(let o of Object.values(r.subagents?.roles??{}))if(o.tool_policy&&o.tool_policy!=="read_only")throw new Error("Project roles cannot grant additional tool access.")}return r}c(ne,"validateConfigDocument");import{promises as Xt}from"node:fs";import Ne from"node:path";var lt={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},So=Object.keys(lt);for(let e of So)Object.freeze(lt[e]);Object.freeze(lt);var Fr=lt;function jr(e){let t=Object.assign({},Fr);for(let r of Object.keys(e))if(Object.hasOwn(t,r)){let n=new Set(e[r]);for(let o of t[r])n.add(o);t[r]=Object.freeze(Array.from(n))}else t[r]=Object.freeze(Array.from(e[r]));return Object.freeze(t)}c(jr,"unionWith");function Te(e){return e[e.length-1]??null}c(Te,"last");function Kt(e){return e.type==="TOMLBare"?e.name:e.value}c(Kt,"toKeyName");var qr=class{static{c(this,"TOMLVerImpl")}constructor(e,t){this.major=e,this.minor=t}lt(e,t){return this.major<e||this.major===e&&this.minor<t}gte(e,t){return this.major>e||this.major===e&&this.minor>=t}},Br=new qr(1,0),Je=new qr(1,1),vo=Je,Io={"1.0":Br,"1.0.0":Br,"1.1":Je,"1.1.0":Je,latest:Je,next:Je};function Qr(e){return e&&Io[e]||vo}c(Qr,"getTOMLVer");var $r={"unterminated-string":"Unterminated string constant","unterminated-table-key":"Unterminated table-key","unterminated-array":"Unterminated array","unterminated-inline-table":"Unterminated inline table","missing-key":"Empty bare keys are not allowed","missing-newline":"Must be a newline","missing-equals-sign":"Expected equal (=) token","missing-value":"Unspecified values are invalid","missing-comma":"Expected comma (,) token","dupe-keys":"Defining a key multiple times is invalid","unexpected-char":"Unexpected character","unexpected-token":"Unexpected token","invalid-control-character":"Control characters (codes < 0x1f and 0x7f) are not allowed","invalid-comment-character":"Invalid code point {{cp}} within comments","invalid-key-value-newline":"The key, equals sign, and value must be on the same line","invalid-inline-table-newline":"No newlines are allowed between the curly braces unless they are valid within a value","invalid-underscore":"Underscores are allowed between digits","invalid-space":"Unexpected spaces","invalid-three-quotes":"Three or more quotes are not permitted","invalid-date":"Unexpected invalid date","invalid-time":"Unexpected invalid time","invalid-leading-zero":"Leading zeros are not allowed","invalid-trailing-comma-in-inline-table":"Trailing comma is not permitted in an inline table","invalid-char-in-escape-sequence":"Invalid character in escape sequence","invalid-consecutive-dots-in-key":"Consecutive dots are not permitted in keys","invalid-code-point":"Invalid code point {{cp}}","invalid-trailing-dot-in-key":"Keys cannot end with a dot","invalid-leading-dot-in-key":"Keys cannot start with a dot"};function Lo(e,t){return t?$r[e].replace(/\{\{(.*?)\}\}/gu,(r,n)=>n in t?t[n]:`{{${n}}}`):$r[e]}c(Lo,"getMessage");var Yr=class extends SyntaxError{static{c(this,"ParseError")}constructor(e,t,r,n,o){super(Lo(e,o)),this.index=t,this.lineNumber=r,this.column=n}},u={EOF:-1,NULL:0,SOH:1,BACKSPACE:8,TABULATION:9,LINE_FEED:10,FORM_FEED:12,CARRIAGE_RETURN:13,ESCAPE:27,SO:14,US:31,SPACE:32,QUOTATION_MARK:34,HASH:35,SINGLE_QUOTE:39,PLUS_SIGN:43,COMMA:44,DASH:45,DOT:46,DIGIT_0:48,DIGIT_1:49,DIGIT_2:50,DIGIT_3:51,DIGIT_7:55,DIGIT_9:57,COLON:58,EQUALS_SIGN:61,LATIN_CAPITAL_A:65,LATIN_CAPITAL_E:69,LATIN_CAPITAL_F:70,LATIN_CAPITAL_T:84,LATIN_CAPITAL_U:85,LATIN_CAPITAL_Z:90,LEFT_BRACKET:91,BACKSLASH:92,RIGHT_BRACKET:93,UNDERSCORE:95,LATIN_SMALL_A:97,LATIN_SMALL_B:98,LATIN_SMALL_E:101,LATIN_SMALL_F:102,LATIN_SMALL_I:105,LATIN_SMALL_L:108,LATIN_SMALL_N:110,LATIN_SMALL_O:111,LATIN_SMALL_R:114,LATIN_SMALL_S:115,LATIN_SMALL_T:116,LATIN_SMALL_U:117,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,LEFT_BRACE:123,RIGHT_BRACE:125,TILDE:126,DELETE:127,PAD:128,SUPERSCRIPT_TWO:178,SUPERSCRIPT_THREE:179,SUPERSCRIPT_ONE:185,VULGAR_FRACTION_ONE_QUARTER:188,VULGAR_FRACTION_THREE_QUARTERS:190,LATIN_CAPITAL_LETTER_A_WITH_GRAVE:192,LATIN_CAPITAL_LETTER_O_WITH_DIAERESIS:214,LATIN_CAPITAL_LETTER_O_WITH_STROKE:216,LATIN_SMALL_LETTER_O_WITH_DIAERESIS:246,LATIN_SMALL_LETTER_O_WITH_STROKE:248,GREEK_SMALL_REVERSED_DOTTED_LUNATE_SIGMA_SYMBOL:891,GREEK_CAPITAL_LETTER_YOT:895,CP_1FFF:8191,ZERO_WIDTH_NON_JOINER:8204,ZERO_WIDTH_JOINER:8205,UNDERTIE:8255,CHARACTER_TIE:8256,SUPERSCRIPT_ZERO:8304,CP_218F:8591,CIRCLED_DIGIT_ONE:9312,NEGATIVE_CIRCLED_DIGIT_ZERO:9471,GLAGOLITIC_CAPITAL_LETTER_AZU:11264,CP_2FEF:12271,IDEOGRAPHIC_COMMA:12289,CP_D7FF:55295,CP_E000:57344,CJK_COMPATIBILITY_IDEOGRAPH_F900:63744,ARABIC_LIGATURE_SALAAMUHU_ALAYNAA:64975,ARABIC_LIGATURE_SALLA_USED_AS_KORANIC_STOP_SIGN_ISOLATED_FORM:65008,REPLACEMENT_CHARACTER:65533,LINEAR_B_SYLLABLE_B008_A:65536,CP_EFFFF:983039,CP_10FFFF:1114111};function Oo(e){return e>=u.NULL&&e<=u.US}c(Oo,"isControl");function $e(e){return e===u.TABULATION||e===u.SPACE}c($e,"isWhitespace");function Vr(e){return e===u.LINE_FEED||e===u.CARRIAGE_RETURN}c(Vr,"isEOL");function Co(e){return e>=u.LATIN_CAPITAL_A&&e<=u.LATIN_CAPITAL_Z}c(Co,"isUpperLetter");function No(e){return e>=u.LATIN_SMALL_A&&e<=u.LATIN_SMALL_Z}c(No,"isLowerLetter");function xo(e){return No(e)||Co(e)}c(xo,"isLetter");function N(e){return e>=u.DIGIT_0&&e<=u.DIGIT_9}c(N,"isDigit");function Gr(e){return N(e)||e>=u.LATIN_SMALL_A&&e<=u.LATIN_SMALL_F||e>=u.LATIN_CAPITAL_A&&e<=u.LATIN_CAPITAL_F}c(Gr,"isHexDig");function ko(e){return e>=u.DIGIT_0&&e<=u.DIGIT_7}c(ko,"isOctalDig");function Ro(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}c(Ro,"isUnicodeScalarValue");function Po(e,t){let r=0,n=e.length;for(;r<n;){let o=r+n>>>1,i=e[o];if(i===t)return o+1;i<t?r=o+1:n=o}return r}c(Po,"sortedLastIndex");var Mo=class{static{c(this,"Locations")}constructor(){this.offsets=[]}addOffset(e){for(let t=this.offsets.length-1;t>=0;t--){let r=this.offsets[t];if(r===e)return;if(r<e)break}this.offsets.push(e)}getLocFromIndex(e){let t=Po(this.offsets,e)+1;return{line:t,column:e-(t===1?0:this.offsets[t-2])}}},Do=class{static{c(this,"CodePointIterator")}constructor(e){this.locs=new Mo,this.lastCodePoint=u.NULL,this.start=-1,this.end=0,this.text=e}next(){return this.lastCodePoint===u.EOF?u.EOF:this.lastCodePoint=this.moveAt(this.end)}getLocFromIndex(e){return this.locs.getLocFromIndex(e)}eat(e){return this.text.codePointAt(this.end)===e?(this.next(),!0):!1}moveAt(e){this.start=this.end=e;let t=this.text.codePointAt(this.start)??u.EOF;if(t===u.EOF)return this.end=this.start,t;if(this.end+=t>=65536?2:1,t===u.LINE_FEED)this.locs.addOffset(this.end);else if(t===u.CARRIAGE_RETURN)return this.text.codePointAt(this.end)===u.LINE_FEED&&(this.end++,this.locs.addOffset(this.end)),u.LINE_FEED;return t}},Uo=typeof BigInt<"u",Fo={16:"0x",10:"",8:"0o",2:"0b"},Zr={[u.QUOTATION_MARK]:u.QUOTATION_MARK,[u.BACKSLASH]:u.BACKSLASH,[u.LATIN_SMALL_B]:u.BACKSPACE,[u.LATIN_SMALL_F]:u.FORM_FEED,[u.LATIN_SMALL_N]:u.LINE_FEED,[u.LATIN_SMALL_R]:u.CARRIAGE_RETURN,[u.LATIN_SMALL_T]:u.TABULATION},jo={...Zr,[u.LATIN_SMALL_E]:u.ESCAPE},Bo=class{static{c(this,"Tokenizer")}constructor(e,t){this.backCode=!1,this.lastCodePoint=u.NULL,this.state="DATA",this.token=null,this.tokenStart=-1,this.valuesEnabled=!1,this.text=e,this.parserOptions=t||{},this.codePointIterator=new Do(e),this.tomlVersion=Qr(this.parserOptions.tomlVersion),this.ESCAPES=this.tomlVersion.gte(1,1)?jo:Zr}get start(){return this.codePointIterator.start}get end(){return this.codePointIterator.end}getLocFromIndex(e){return this.codePointIterator.getLocFromIndex(e)}reportParseError(e,t){let r=this.codePointIterator.start,n=this.codePointIterator.getLocFromIndex(r);throw new Yr(e,r,n.line,n.column,t)}nextToken(){let e=this.token;if(e!=null)return this.token=null,e;let t=this.lastCodePoint;for(;t!==u.EOF&&!this.token;){t=this.nextCode();let r=this[this.state](t);if(!r)throw new Error(`Unknown error: pre state=${this.state}`);this.state=r}return e=this.token,this.token=null,e}nextCode(){return this.lastCodePoint===u.EOF?u.EOF:this.backCode?(this.backCode=!1,this.lastCodePoint):this.lastCodePoint=this.codePointIterator.next()}eatCode(e){return this.lastCodePoint===u.EOF?!1:this.backCode?this.lastCodePoint===e?(this.backCode=!1,!0):!1:this.codePointIterator.eat(e)}moveAt(e){this.backCode&&(this.backCode=!1),this.lastCodePoint=this.codePointIterator.moveAt(e)}back(e){return this.backCode=!0,e}punctuatorToken(){this.startToken(),this.endToken("Punctuator","end")}startToken(){this.tokenStart=this.codePointIterator.start}endToken(e,t,r,n){let{tokenStart:o}=this,i=this.codePointIterator[t],a=[o,i],s={start:this.codePointIterator.getLocFromIndex(o),end:this.codePointIterator.getLocFromIndex(i)};if(e==="Block")this.token={type:e,value:this.text.slice(o+1,i),range:a,loc:s};else{let l,p=this.text.slice(o,i);if(e==="BasicString"||e==="LiteralString"||e==="MultiLineBasicString"||e==="MultiLineLiteralString")l={type:e,value:p,string:r,range:a,loc:s};else if(e==="Integer"){let f=r;l={type:e,value:p,number:parseInt(f,n),bigint:Uo?BigInt(Fo[n]+f):null,range:a,loc:s}}else e==="Float"?l={type:e,value:p,number:r,range:a,loc:s}:e==="Boolean"?l={type:e,value:p,boolean:r,range:a,loc:s}:e==="LocalDate"||e==="LocalTime"||e==="LocalDateTime"||e==="OffsetDateTime"?l={type:e,value:p,date:r,range:a,loc:s}:l={type:e,value:p,range:a,loc:s};this.token=l}}DATA(e){for(;$e(e)||Vr(e);)e=this.nextCode();if(e===u.HASH)return this.startToken(),"COMMENT";if(e===u.QUOTATION_MARK)return this.startToken(),"BASIC_STRING";if(e===u.SINGLE_QUOTE)return this.startToken(),"LITERAL_STRING";if(e===u.DOT||e===u.EQUALS_SIGN||e===u.LEFT_BRACKET||e===u.RIGHT_BRACKET||e===u.LEFT_BRACE||e===u.RIGHT_BRACE||e===u.COMMA)return this.punctuatorToken(),"DATA";if(this.valuesEnabled){if(e===u.DASH||e===u.PLUS_SIGN)return this.startToken(),"SIGN";if(e===u.LATIN_SMALL_N||e===u.LATIN_SMALL_I)return this.startToken(),this.back("NAN_OR_INF");if(N(e))return this.startToken(),this.back("NUMBER");if(e===u.LATIN_SMALL_T||e===u.LATIN_SMALL_F)return this.startToken(),this.back("BOOLEAN")}else if(Kr(e,this.tomlVersion))return this.startToken(),"BARE";return e===u.EOF?"DATA":this.reportParseError("unexpected-char")}COMMENT(e){let t=this.tomlVersion.gte(1,1)?r=>{$o(r)||this.reportParseError("invalid-comment-character",{cp:JSON.stringify(String.fromCodePoint(r)).slice(1,-1)})}:r=>{Ve(r)&&this.reportParseErrorControlChar()};for(;!Vr(e)&&e!==u.EOF;)t(e),e=this.nextCode();return this.endToken("Block","start"),"DATA"}BARE(e){for(;Kr(e,this.tomlVersion);)e=this.nextCode();return this.endToken("Bare","start"),this.back("DATA")}BASIC_STRING(e){if(e===u.QUOTATION_MARK)return e=this.nextCode(),e===u.QUOTATION_MARK?"MULTI_LINE_BASIC_STRING":(this.endToken("BasicString","start",""),this.back("DATA"));let t=[];for(;e!==u.QUOTATION_MARK&&e!==u.EOF&&e!==u.LINE_FEED;){if(Ve(e))return this.reportParseErrorControlChar();if(e===u.BACKSLASH){e=this.nextCode();let r=this.ESCAPES[e];if(r){t.push(r),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_U){let n=this.parseUnicode(4);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_CAPITAL_U){let n=this.parseUnicode(8);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_X&&this.tomlVersion.gte(1,1)){let n=this.parseUnicode(2);t.push(n),e=this.nextCode();continue}return this.reportParseError("invalid-char-in-escape-sequence")}t.push(e),e=this.nextCode()}return e!==u.QUOTATION_MARK?this.reportParseError("unterminated-string"):(this.endToken("BasicString","end",String.fromCodePoint(...t)),"DATA")}MULTI_LINE_BASIC_STRING(e){let t=[];for(e===u.LINE_FEED&&(e=this.nextCode());e!==u.EOF;){if(e!==u.LINE_FEED&&Ve(e))return this.reportParseErrorControlChar();if(e===u.QUOTATION_MARK){let r=this.codePointIterator.start;if(this.eatCode(u.QUOTATION_MARK)&&this.eatCode(u.QUOTATION_MARK))return this.eatCode(u.QUOTATION_MARK)&&(t.push(u.QUOTATION_MARK),this.eatCode(u.QUOTATION_MARK)&&(t.push(u.QUOTATION_MARK),this.eatCode(u.QUOTATION_MARK)))?(this.moveAt(r),this.reportParseError("invalid-three-quotes")):(this.endToken("MultiLineBasicString","end",String.fromCodePoint(...t)),"DATA");this.moveAt(r)}if(e===u.BACKSLASH){e=this.nextCode();let r=this.ESCAPES[e];if(r){t.push(r),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_U){let n=this.parseUnicode(4);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_CAPITAL_U){let n=this.parseUnicode(8);t.push(n),e=this.nextCode();continue}else if(e===u.LATIN_SMALL_X&&this.tomlVersion.gte(1,1)){let n=this.parseUnicode(2);t.push(n),e=this.nextCode();continue}else if(e===u.LINE_FEED){for(e=this.nextCode();$e(e)||e===u.LINE_FEED;)e=this.nextCode();continue}else if($e(e)){let n=!0,o=this.codePointIterator.start,i;for(;(i=this.nextCode())!==u.EOF&&i!==u.LINE_FEED;)if(!$e(i)){this.moveAt(o),n=!1;break}if(n){for(e=this.nextCode();$e(e)||e===u.LINE_FEED;)e=this.nextCode();continue}}return this.reportParseError("invalid-char-in-escape-sequence")}t.push(e),e=this.nextCode()}return this.reportParseError("unterminated-string")}LITERAL_STRING(e){if(e===u.SINGLE_QUOTE)return e=this.nextCode(),e===u.SINGLE_QUOTE?"MULTI_LINE_LITERAL_STRING":(this.endToken("LiteralString","start",""),this.back("DATA"));let t=[];for(;e!==u.SINGLE_QUOTE&&e!==u.EOF&&e!==u.LINE_FEED;){if(Ve(e))return this.reportParseErrorControlChar();t.push(e),e=this.nextCode()}return e!==u.SINGLE_QUOTE?this.reportParseError("unterminated-string"):(this.endToken("LiteralString","end",String.fromCodePoint(...t)),"DATA")}MULTI_LINE_LITERAL_STRING(e){let t=[];for(e===u.LINE_FEED&&(e=this.nextCode());e!==u.EOF;){if(e!==u.LINE_FEED&&Ve(e))return this.reportParseErrorControlChar();if(e===u.SINGLE_QUOTE){let r=this.codePointIterator.start;if(this.eatCode(u.SINGLE_QUOTE)&&this.eatCode(u.SINGLE_QUOTE))return this.eatCode(u.SINGLE_QUOTE)&&(t.push(u.SINGLE_QUOTE),this.eatCode(u.SINGLE_QUOTE)&&(t.push(u.SINGLE_QUOTE),this.eatCode(u.SINGLE_QUOTE)))?(this.moveAt(r),this.reportParseError("invalid-three-quotes")):(this.endToken("MultiLineLiteralString","end",String.fromCodePoint(...t)),"DATA");this.moveAt(r)}t.push(e),e=this.nextCode()}return this.reportParseError("unterminated-string")}SIGN(e){return e===u.LATIN_SMALL_N||e===u.LATIN_SMALL_I?this.back("NAN_OR_INF"):N(e)?this.back("NUMBER"):this.reportParseError("unexpected-char")}NAN_OR_INF(e){if(e===u.LATIN_SMALL_N){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_A)&&this.eatCode(u.LATIN_SMALL_N))return this.endToken("Float","end",NaN),"DATA";this.moveAt(t)}else if(e===u.LATIN_SMALL_I){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_N)&&this.eatCode(u.LATIN_SMALL_F))return this.endToken("Float","end",this.text[this.tokenStart]==="-"?-1/0:1/0),"DATA";this.moveAt(t)}return this.reportParseError("unexpected-char")}NUMBER(e){let t=this.text[this.tokenStart],r=t==="+"?u.PLUS_SIGN:t==="-"?u.DASH:u.NULL;if(e===u.DIGIT_0){if(r===u.NULL){let a=this.codePointIterator.start,s=this.nextCode();if(N(s)){let l=this.nextCode();if(l===u.COLON)return this.data={hasDate:!1,year:0,month:0,day:0,hour:Number(String.fromCodePoint(u.DIGIT_0,s)),minute:0,second:0},"TIME_MINUTE";if(N(l)){let p=this.nextCode();if(N(p)&&this.eatCode(u.DASH))return this.data={hasDate:!0,year:Number(String.fromCodePoint(u.DIGIT_0,s,l,p)),month:0,day:0,hour:0,minute:0,second:0},"DATE_MONTH"}return this.moveAt(a),this.reportParseError("invalid-leading-zero")}this.moveAt(a)}return e=this.nextCode(),e===u.LATIN_SMALL_X||e===u.LATIN_SMALL_O||e===u.LATIN_SMALL_B?r!==u.NULL?this.reportParseError("unexpected-char"):e===u.LATIN_SMALL_X?"HEX":e===u.LATIN_SMALL_O?"OCTAL":"BINARY":e===u.LATIN_SMALL_E||e===u.LATIN_CAPITAL_E?(this.data={minus:r===u.DASH,left:[u.DIGIT_0]},"EXPONENT_RIGHT"):e===u.DOT?(this.data={minus:r===u.DASH,absInt:[u.DIGIT_0]},"FRACTIONAL_RIGHT"):(this.endToken("Integer","start","0",10),this.back("DATA"))}let{out:n,nextCp:o,hasUnderscore:i}=this.parseDigits(e,N);return o===u.DASH&&r===u.NULL&&!i&&n.length===4?(this.data={hasDate:!0,year:Number(String.fromCodePoint(...n)),month:0,day:0,hour:0,minute:0,second:0},"DATE_MONTH"):o===u.COLON&&r===u.NULL&&!i&&n.length===2?(this.data={hasDate:!1,year:0,month:0,day:0,hour:Number(String.fromCodePoint(...n)),minute:0,second:0},"TIME_MINUTE"):o===u.LATIN_SMALL_E||o===u.LATIN_CAPITAL_E?(this.data={minus:r===u.DASH,left:n},"EXPONENT_RIGHT"):o===u.DOT?(this.data={minus:r===u.DASH,absInt:n},"FRACTIONAL_RIGHT"):(this.endToken("Integer","start",r===u.DASH?String.fromCodePoint(u.DASH,...n):String.fromCodePoint(...n),10),this.back("DATA"))}HEX(e){let{out:t}=this.parseDigits(e,Gr);return this.endToken("Integer","start",String.fromCodePoint(...t),16),this.back("DATA")}OCTAL(e){let{out:t}=this.parseDigits(e,ko);return this.endToken("Integer","start",String.fromCodePoint(...t),8),this.back("DATA")}BINARY(e){let{out:t}=this.parseDigits(e,r=>r===u.DIGIT_0||r===u.DIGIT_1);return this.endToken("Integer","start",String.fromCodePoint(...t),2),this.back("DATA")}FRACTIONAL_RIGHT(e){let{minus:t,absInt:r}=this.data,{out:n,nextCp:o}=this.parseDigits(e,N),i=[...r,u.DOT,...n];if(o===u.LATIN_SMALL_E||o===u.LATIN_CAPITAL_E)return this.data={minus:t,left:i},"EXPONENT_RIGHT";let a=Number(t?String.fromCodePoint(u.DASH,...i):String.fromCodePoint(...i));return this.endToken("Float","start",a),this.back("DATA")}EXPONENT_RIGHT(e){let{left:t,minus:r}=this.data,n=!1;(e===u.DASH||e===u.PLUS_SIGN)&&(n=e===u.DASH,e=this.nextCode());let{out:o}=this.parseDigits(e,N),i=o;n&&i.unshift(u.DASH);let a=Number(r?String.fromCodePoint(u.DASH,...t,u.LATIN_SMALL_E,...i):String.fromCodePoint(...t,u.LATIN_SMALL_E,...i));return this.endToken("Float","start",a),this.back("DATA")}BOOLEAN(e){if(e===u.LATIN_SMALL_T){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_R)&&this.eatCode(u.LATIN_SMALL_U)&&this.eatCode(u.LATIN_SMALL_E))return this.endToken("Boolean","end",!0),"DATA";this.moveAt(t)}else if(e===u.LATIN_SMALL_F){let t=this.codePointIterator.start;if(this.eatCode(u.LATIN_SMALL_A)&&this.eatCode(u.LATIN_SMALL_L)&&this.eatCode(u.LATIN_SMALL_S)&&this.eatCode(u.LATIN_SMALL_E))return this.endToken("Boolean","end",!1),"DATA";this.moveAt(t)}return this.reportParseError("unexpected-char")}DATE_MONTH(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),e!==u.DASH)return this.reportParseError("unexpected-char");let r=this.codePointIterator.start,n=this.data;return n.month=Number(this.text.slice(t,r)),"DATE_DAY"}DATE_DAY(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let r=this.codePointIterator.end,n=this.data;if(n.day=Number(this.text.slice(t,r)),!Go(n.year,n.month,n.day))return this.reportParseError("invalid-date");if(e=this.nextCode(),e===u.LATIN_CAPITAL_T||e===u.LATIN_SMALL_T)return"TIME_HOUR";if(e===u.SPACE){let i=this.codePointIterator.start;if(N(this.nextCode())&&N(this.nextCode()))return this.moveAt(i),"TIME_HOUR";this.moveAt(i)}let o=Ge(n,"");return this.endToken("LocalDate","start",o),this.back("DATA")}TIME_HOUR(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),e!==u.COLON)return this.reportParseError("unexpected-char");let r=this.codePointIterator.start,n=this.data;return n.hour=Number(this.text.slice(t,r)),"TIME_MINUTE"}TIME_MINUTE(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let r=this.codePointIterator.end,n=this.data;return n.minute=Number(this.text.slice(t,r)),e=this.nextCode(),e===u.COLON?"TIME_SECOND":this.tomlVersion.lt(1,1)?this.reportParseError("unexpected-char"):Bt(n.hour,n.minute,n.second)?this.processTimeEnd(e,n):this.reportParseError("invalid-time")}TIME_SECOND(e){let t=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let r=this.codePointIterator.end,n=this.data;return n.second=Number(this.text.slice(t,r)),Bt(n.hour,n.minute,n.second)?(e=this.nextCode(),e===u.DOT?"TIME_SEC_FRAC":this.processTimeEnd(e,n)):this.reportParseError("invalid-time")}TIME_SEC_FRAC(e){if(!N(e))return this.reportParseError("unexpected-char");let t=this.codePointIterator.start;for(;N(e);)e=this.nextCode();let r=this.codePointIterator.start,n=this.data;return n.frac=this.text.slice(t,r),this.processTimeEnd(e,n)}processTimeEnd(e,t){if(t.hasDate){if(e===u.DASH||e===u.PLUS_SIGN)return t.offsetSign=e,"TIME_OFFSET";if(e===u.LATIN_CAPITAL_Z||e===u.LATIN_SMALL_Z){let o=Ge(t,"Z");return this.endToken("OffsetDateTime","end",o),"DATA"}let n=Ge(t,"");return this.endToken("LocalDateTime","start",n),this.back("DATA")}let r=Ge(t,"");return this.endToken("LocalTime","start",r),this.back("DATA")}TIME_OFFSET(e){if(!N(e))return this.reportParseError("unexpected-char");let t=this.codePointIterator.start;if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),e!==u.COLON)return this.reportParseError("unexpected-char");let r=this.codePointIterator.start;e=this.nextCode();let n=this.codePointIterator.start;if(!N(e))return this.reportParseError("unexpected-char");if(e=this.nextCode(),!N(e))return this.reportParseError("unexpected-char");let o=this.codePointIterator.end,i=Number(this.text.slice(t,r)),a=Number(this.text.slice(n,o));if(!Bt(i,a,0))return this.reportParseError("invalid-time");let s=this.data,l=Ge(s,`${String.fromCodePoint(s.offsetSign)}${ge(i,2)}:${ge(a,2)}`);return this.endToken("OffsetDateTime","end",l),"DATA"}parseDigits(e,t){if(e===u.UNDERSCORE)return this.reportParseError("invalid-underscore");if(!t(e))return this.reportParseError("unexpected-char");let r=[],n=u.NULL,o=!1;for(;t(e)||e===u.UNDERSCORE;){if(e===u.UNDERSCORE){if(o=!0,n===u.UNDERSCORE)return this.reportParseError("invalid-underscore")}else r.push(e);n=e,e=this.nextCode()}return n===u.UNDERSCORE?this.reportParseError("invalid-underscore"):{out:r,nextCp:e,hasUnderscore:o}}parseUnicode(e){let t=this.codePointIterator.start,r=this.codePointIterator.end,n=0,o;for(;(o=this.nextCode())!==u.EOF;){if(!Gr(o))return this.moveAt(t),this.reportParseError("invalid-char-in-escape-sequence");if(n++,n>=e)break}let i=this.codePointIterator.end,a=this.text.slice(r,i),s=parseInt(a,16);return Ro(s)?s:this.reportParseError("invalid-code-point",{cp:a})}reportParseErrorControlChar(){return this.reportParseError("invalid-control-character")}};function Kr(e,t){return xo(e)||N(e)||e===u.UNDERSCORE||e===u.DASH?!0:(t.lt(1,1),!1)}c(Kr,"isUnquotedKeyChar");function Ve(e){return Oo(e)&&e!==u.TABULATION||e===u.DELETE}c(Ve,"isControlOtherThanTab");function $o(e){return e===u.TABULATION||u.SPACE<=e&&e<=u.TILDE||Vo(e)}c($o,"isNonEOL");function Vo(e){return u.PAD<=e&&e<=u.CP_D7FF||u.CP_E000<=e&&e<=u.CP_10FFFF}c(Vo,"isNonAscii");function Go(e,t,r){return e>=0&&t<=12&&t>=1&&r>=1?r<=(t===2?e&3||!(e%25)&&e&15?28:29:30+(t+(t>>3)&1)):!1}c(Go,"isValidDate");function Bt(e,t,r){return!(e>=24||e<0||t>59||t<0||r>60||r<0)}c(Bt,"isValidTime");function Ge(e,t){let r=ge(e.year,4),n=e.month?ge(e.month,2):"01",o=e.day?ge(e.day,2):"01",i=ge(e.hour,2),a=ge(e.minute,2),s=ge(e.second,2),l=`${r}-${n}-${o}`,p=e.frac?`.${e.frac}`:"",f=new Date(`${l}T${i}:${a}:${s}${p}${t}`);return!isNaN(f.getTime())||e.second!==60?f:new Date(`${l}T${i}:${a}:59${p}${t}`)}c(Ge,"getDateFromDateTimeData");function ge(e,t){return String(e).padStart(t,"0")}c(ge,"padStart");var Ht=Symbol("VALUE_KIND_VALUE"),Hr=Symbol("VALUE_KIND_INTERMEDIATE"),Ko=class{static{c(this,"KeysResolver")}constructor(e){this.rootKeys=new Map,this.tables=[],this.ctx=e}applyResolveKeyForTable(e){let t=this.rootKeys,r=e.key.keys.length-1;for(let a=0;a<r;a++){let s=e.key.keys[a],l=Kt(s);e.resolvedKey.push(l);let p=t.get(l);if(!p)p={node:s,keys:new Map},t.set(l,p);else if(p.table==="array"){let f=p.peekIndex;e.resolvedKey.push(f),p=p.keys.get(f)}t=p.keys}let n=e.key.keys[r],o=Kt(n);e.resolvedKey.push(o);let i=t.get(o);if(i)if(i.table)if(i.table==="array")if(e.kind==="array"){let a={node:n,keys:new Map},s=i.peekIndex+1;e.resolvedKey.push(s),i.keys.set(s,a),i.peekIndex=s,this.tables.push({node:e,keys:a.keys})}else this.ctx.reportParseError("dupe-keys",n);else this.ctx.reportParseError("dupe-keys",n);else if(e.kind==="array")this.ctx.reportParseError("dupe-keys",n);else{let a={table:e.kind,node:n,keys:i.keys};t.set(o,a),this.tables.push({node:e,keys:a.keys})}else if(e.kind==="array"){e.resolvedKey.push(0);let a={node:n,keys:new Map};t.set(o,{table:e.kind,node:n,keys:new Map([[0,a]]),peekIndex:0}),this.tables.push({node:e,keys:a.keys})}else{let a={table:e.kind,node:n,keys:new Map};t.set(o,a),this.tables.push({node:e,keys:a.keys})}}verifyDuplicateKeys(e){for(let t of e.body)t.type==="TOMLKeyValue"&&Jt(this.ctx,this.rootKeys,t);for(let{node:t,keys:r}of this.tables)for(let n of t.body)Jt(this.ctx,r,n)}};function Jt(e,t,r){let n=t,o=Te(r.key.keys);for(let i of r.key.keys){let a=Kt(i),s=n.get(a);s?((s.value===Ht||o===i||s.table)&&e.reportParseError("dupe-keys",ut(i,s.node)),s.value=Hr):(o===i?s={value:Ht,node:i,keys:new Map}:s={value:Hr,node:i,keys:new Map},n.set(a,s)),n=s.keys}r.value.type==="TOMLInlineTable"?en(e,n,r.value):r.value.type==="TOMLArray"&&tn(e,n,r.value)}c(Jt,"verifyDuplicateKeysForKeyValue");function en(e,t,r){for(let n of r.body)Jt(e,t,n)}c(en,"verifyDuplicateKeysForInlineTable");function tn(e,t,r){let n=t;for(let o=0;o<r.elements.length;o++){let i=r.elements[o],a=n.get(o);a?e.reportParseError("dupe-keys",ut(i,a.node)):(a={value:Ht,node:i,keys:new Map},t.set(o,a),i.type==="TOMLInlineTable"?en(e,a.keys,i):i.type==="TOMLArray"&&tn(e,a.keys,i))}}c(tn,"verifyDuplicateKeysForArray");function ut(e,t){return e.range[0]<=t.range[0]?t:e}c(ut,"getAfterNode");var Ho=class{static{c(this,"Context")}constructor(e){this.tokens=[],this.comments=[],this.back=null,this.stateStack=[],this.needNewLine=!1,this.needSameLine=!1,this.currToken=null,this.prevToken=null,this.valueContainerStack=[],this.tokenizer=new Bo(e.text,e.parserOptions),this.topLevelTable=e.topLevelTable,this.table=e.topLevelTable,this.keysResolver=new Ko(this)}nextToken(e){if(this.prevToken=this.currToken,this.back?(this.currToken=this.back,this.back=null):this.currToken=this._nextTokenFromTokenizer(e),(this.needNewLine||this.needSameLine||e?.needSameLine)&&this.prevToken&&this.currToken)if(this.prevToken.loc.end.line===this.currToken.loc.start.line){if(this.needNewLine)return this.reportParseError("missing-newline",this.currToken)}else{let t=this.needSameLine||e?.needSameLine;if(t)return this.reportParseError(t,this.currToken)}return this.needNewLine=!1,this.needSameLine=!1,this.currToken}_nextTokenFromTokenizer(e){let t=this.tokenizer.valuesEnabled;e?.valuesEnabled&&(this.tokenizer.valuesEnabled=e.valuesEnabled);let r=this.tokenizer.nextToken();for(;r&&r.type==="Block";)this.comments.push(r),r=this.tokenizer.nextToken();return r&&this.tokens.push(r),this.tokenizer.valuesEnabled=t,r}backToken(){if(this.back)throw new Error("Illegal state");this.back=this.currToken,this.currToken=this.prevToken}addValueContainer(e){this.valueContainerStack.push(e),this.tokenizer.valuesEnabled=!0}consumeValueContainer(){let e=this.valueContainerStack.pop();return this.tokenizer.valuesEnabled=this.valueContainerStack.length>0,e}applyResolveKeyForTable(e){this.keysResolver.applyResolveKeyForTable(e)}verifyDuplicateKeys(){this.keysResolver.verifyDuplicateKeys(this.topLevelTable)}reportParseError(e,t){let r,n,o;if(t)r=t.range[0],n=t.loc.start.line,o=t.loc.start.column;else{r=this.tokenizer.start;let i=this.tokenizer.getLocFromIndex(r);n=i.line,o=i.column}throw new Yr(e,r,n,o)}},Jr={VALUE:"missing-value"},Jo={BasicString:"basic",MultiLineBasicString:"basic",LiteralString:"literal",MultiLineLiteralString:"literal"},zo={BasicString:"basic",LiteralString:"literal"},Wo={OffsetDateTime:"offset-date-time",LocalDateTime:"local-date-time",LocalDate:"local-date",LocalTime:"local-time"},Xo=class{static{c(this,"TOMLParser")}constructor(e,t){this.text=e,this.parserOptions=t||{},this.tomlVersion=Qr(this.parserOptions.tomlVersion)}parse(){let e={type:"Program",body:[],sourceType:"module",tokens:[],comments:[],parent:null,range:[0,0],loc:{start:{line:1,column:0},end:{line:1,column:0}}},t={type:"TOMLTopLevelTable",body:[],parent:e,range:H(e.range),loc:J(e.loc)};e.body=[t];let r=new Ho({text:this.text,parserOptions:this.parserOptions,topLevelTable:t}),n=r.nextToken();if(n){for(t.range[0]=n.range[0],t.loc.start=ft(n.loc.start);n;){let s=r.stateStack.pop()||"TABLE";r.stateStack.push(...this[s](n,r)),n=r.nextToken()}let a=r.stateStack.pop()||"TABLE";if(a in Jr)return r.reportParseError(Jr[a],null);r.table.type==="TOMLTable"&&oe(r.table,Te(r.table.body)),oe(t,Te(t.body))}r.verifyDuplicateKeys(),e.tokens=r.tokens,e.comments=r.comments;let o=r.tokenizer.end,i=r.tokenizer.getLocFromIndex(o);return e.range[1]=o,e.loc.end={line:i.line,column:i.column},e}TABLE(e,t){return dt(e)||He(e)?this.processKeyValue(e,t.table,t):Vt(e)?this.processTable(e,t.topLevelTable,t):t.reportParseError("unexpected-token",e)}VALUE(e,t){return He(e)||Xr(e)?this.processStringValue(e,t):Qo(e)?this.processNumberValue(e,t):Yo(e)?this.processBooleanValue(e,t):Zo(e)?this.processDateTimeValue(e,t):Vt(e)?this.processArray(e,t):qo(e)?this.processInlineTable(e,t):t.reportParseError("unexpected-token",e)}processTable(e,t,r){let n={type:"TOMLTable",kind:"standard",key:null,resolvedKey:[],body:[],parent:t,range:H(e.range),loc:J(e.loc)};r.table.type==="TOMLTable"&&oe(r.table,Te(r.table.body)),t.body.push(n),r.table=n;let o=r.nextToken({needSameLine:"invalid-key-value-newline"});if(Vt(o)){if(e.range[1]<o.range[0])return r.reportParseError("invalid-space",o);n.kind="array",o=r.nextToken({needSameLine:"invalid-key-value-newline"})}if(Ke(o))return r.reportParseError("missing-key",o);if(!o)return r.reportParseError("unterminated-table-key",null);if(o=this.processKeyNode(o,n,r).nextToken,!Ke(o))return r.reportParseError("unterminated-table-key",o);if(n.kind==="array"){let i=o;if(o=r.nextToken({needSameLine:"invalid-key-value-newline"}),!Ke(o))return r.reportParseError("unterminated-table-key",o);if(i.range[1]<o.range[0])return r.reportParseError("invalid-space",o)}return oe(n,o),r.applyResolveKeyForTable(n),r.needNewLine=!0,[]}processKeyValue(e,t,r){let n={type:"TOMLKeyValue",key:null,value:null,parent:t,range:H(e.range),loc:J(e.loc)};t.body.push(n);let{nextToken:o}=this.processKeyNode(e,n,r);return zr(o)?(r.addValueContainer({parent:n,set:c(i=>(n.value=i,oe(n,i),r.needNewLine=!0,[]),"set")}),r.needSameLine="invalid-key-value-newline",["VALUE"]):r.reportParseError("missing-equals-sign",o)}processKeyNode(e,t,r){$t(e)&&r.reportParseError("invalid-leading-dot-in-key",e);let n={type:"TOMLKey",keys:[],parent:t,range:H(e.range),loc:J(e.loc)};t.key=n;let o=e,i=null;do{if(dt(o))this.processBareKey(o,n);else if(He(o))this.processStringKey(o,n);else break;if(i=null,o=r.nextToken({needSameLine:"invalid-key-value-newline"}),!$t(o))break;i=o,o=r.nextToken({needSameLine:"invalid-key-value-newline"})}while(o);return i&&r.reportParseError($t(o)?"invalid-consecutive-dots-in-key":"invalid-trailing-dot-in-key",i),oe(n,Te(n.keys)),{keyNode:n,nextToken:o}}processBareKey(e,t){let r={type:"TOMLBare",name:e.value,parent:t,range:H(e.range),loc:J(e.loc)};t.keys.push(r)}processStringKey(e,t){let r={type:"TOMLQuoted",kind:"string",value:e.string,style:zo[e.type],multiline:!1,parent:t,range:H(e.range),loc:J(e.loc)};t.keys.push(r)}processStringValue(e,t){let r=t.consumeValueContainer(),n={type:"TOMLValue",kind:"string",value:e.string,style:Jo[e.type],multiline:Xr(e),parent:r.parent,range:H(e.range),loc:J(e.loc)};return r.set(n)}processNumberValue(e,t){let r=t.consumeValueContainer(),n=this.text,[o,i]=e.range,a=null,s=c(()=>a??(a=n.slice(o,i).replace(/_/g,"")),"getNumberText"),l;return e.type==="Integer"?l={type:"TOMLValue",kind:"integer",value:e.number,bigint:e.bigint,get number(){return s()},parent:r.parent,range:H(e.range),loc:J(e.loc)}:l={type:"TOMLValue",kind:"float",value:e.number,get number(){return s()},parent:r.parent,range:H(e.range),loc:J(e.loc)},r.set(l)}processBooleanValue(e,t){let r=t.consumeValueContainer(),n={type:"TOMLValue",kind:"boolean",value:e.boolean,parent:r.parent,range:H(e.range),loc:J(e.loc)};return r.set(n)}processDateTimeValue(e,t){let r=t.consumeValueContainer(),n={type:"TOMLValue",kind:Wo[e.type],value:e.date,datetime:e.value,parent:r.parent,range:H(e.range),loc:J(e.loc)};return r.set(n)}processArray(e,t){let r=t.consumeValueContainer(),n={type:"TOMLArray",elements:[],parent:r.parent,range:H(e.range),loc:J(e.loc)},o=t.nextToken({valuesEnabled:!0});return Ke(o)?(oe(n,o),r.set(n)):(t.backToken(),this.processArrayValue(n,r,t))}processArrayValue(e,t,r){return r.addValueContainer({parent:e,set:c(n=>{e.elements.push(n);let o=r.nextToken({valuesEnabled:!0}),i=Wr(o);return i&&(o=r.nextToken({valuesEnabled:!0})),Ke(o)?(oe(e,o),t.set(e)):i?(r.backToken(),this.processArrayValue(e,t,r)):r.reportParseError(o?"missing-comma":"unterminated-array",o)},"set")}),["VALUE"]}processInlineTable(e,t){let r=t.consumeValueContainer(),n={type:"TOMLInlineTable",body:[],parent:r.parent,range:H(e.range),loc:J(e.loc)},o=this.tomlVersion.gte(1,1)?void 0:"invalid-inline-table-newline",i=t.nextToken({needSameLine:o});if(i){if(dt(i)||He(i))return this.processInlineTableKeyValue(i,n,r,t);if(Gt(i))return oe(n,i),r.set(n)}return t.reportParseError("unexpected-token",i)}processInlineTableKeyValue(e,t,r,n){let o={type:"TOMLKeyValue",key:null,value:null,parent:t,range:H(e.range),loc:J(e.loc)};t.body.push(o);let{nextToken:i}=this.processKeyNode(e,o,n);if(!zr(i))return n.reportParseError("missing-equals-sign",i);let a=this.tomlVersion.gte(1,1)?void 0:"invalid-inline-table-newline";return n.addValueContainer({parent:o,set:c(s=>{o.value=s,oe(o,s);let l=n.nextToken({needSameLine:a});if(Wr(l)){if(l=n.nextToken({needSameLine:a}),l&&(dt(l)||He(l)))return this.processInlineTableKeyValue(l,t,r,n);if(Gt(l)){if(this.tomlVersion.lt(1,1))return n.reportParseError("invalid-trailing-comma-in-inline-table",l)}else return n.reportParseError(l?"unexpected-token":"unterminated-inline-table",l)}return Gt(l)?(oe(t,l),r.set(t)):n.reportParseError(l?"missing-comma":"unterminated-inline-table",l)},"set")}),n.needSameLine="invalid-key-value-newline",["VALUE"]}};function $t(e){return Ee(e)&&e.value==="."}c($t,"isDot");function zr(e){return Ee(e)&&e.value==="="}c(zr,"isEq");function Vt(e){return Ee(e)&&e.value==="["}c(Vt,"isLeftBracket");function Ke(e){return Ee(e)&&e.value==="]"}c(Ke,"isRightBracket");function qo(e){return Ee(e)&&e.value==="{"}c(qo,"isLeftBrace");function Gt(e){return Ee(e)&&e.value==="}"}c(Gt,"isRightBrace");function Wr(e){return Ee(e)&&e.value===","}c(Wr,"isComma");function Ee(e){return!!(e&&e.type==="Punctuator")}c(Ee,"isPunctuator");function dt(e){return e.type==="Bare"}c(dt,"isBare");function He(e){return e.type==="BasicString"||e.type==="LiteralString"}c(He,"isString");function Xr(e){return e.type==="MultiLineBasicString"||e.type==="MultiLineLiteralString"}c(Xr,"isMultiLineString");function Qo(e){return e.type==="Integer"||e.type==="Float"}c(Qo,"isNumber");function Yo(e){return e.type==="Boolean"}c(Yo,"isBoolean");function Zo(e){return e.type==="OffsetDateTime"||e.type==="LocalDateTime"||e.type==="LocalDate"||e.type==="LocalTime"}c(Zo,"isDateTime");function oe(e,t){t&&(e.range[1]=t.range[1],e.loc.end=ft(t.loc.end))}c(oe,"applyEndLoc");function H(e){return[e[0],e[1]]}c(H,"cloneRange");function J(e){return{start:ft(e.start),end:ft(e.end)}}c(J,"cloneLoc");function ft(e){return{line:e.line,column:e.column}}c(ft,"clonePos");var ei={Program:["body"],TOMLTopLevelTable:["body"],TOMLTable:["key","body"],TOMLKeyValue:["key","value"],TOMLKey:["keys"],TOMLArray:["elements"],TOMLInlineTable:["body"],TOMLBare:[],TOMLQuoted:[],TOMLValue:[]},ti=jr(ei);function ri(e,t){return{ast:new Xo(e,t).parse(),visitorKeys:ti,services:{isTOML:!0}}}c(ri,"parseForESLint");var zt=ni(e=>e.value);function ni(e){function t(n,o){return r[n.type](n,o)}c(t,"resolveValue");let r={Program(n,o={}){return t(n.body[0],o)},TOMLTopLevelTable(n,o={}){for(let i of n.body)t(i,o);return o},TOMLKeyValue(n,o={}){let i=t(n.value);return ii(o,t(n.key),i),o},TOMLTable(n,o={}){let i=oi(o,t(n.key),n.kind==="array");for(let a of n.body)t(a,i);return o},TOMLArray(n){return n.elements.map(o=>t(o))},TOMLInlineTable(n){let o={};for(let i of n.body)t(i,o);return o},TOMLKey(n){return n.keys.map(o=>t(o))},TOMLBare(n){return n.name},TOMLQuoted(n){return n.value},TOMLValue(n){return e(n)}};return n=>t(n)}c(ni,"generateConvertTOMLValue");function oi(e,t,r){let n=e;for(let l=0;l<t.length-1;l++){let p=t[l];n=s(n,p)}let o=Te(t),i=n[o];if(i==null){let l={};return n[o]=r?[l]:l,l}if(pt(i)){let l={};return n[o]=r?[l]:l,l}if(!r){if(Array.isArray(i)){let l={};return n[o]=l,l}return i}if(Array.isArray(i)){let l={};return i.push(l),l}let a={};return n[o]=[a],a;function s(l,p){let f=l[p];if(f==null){let m={};return l[p]=m,m}if(pt(f)){let m={};return l[p]=m,m}let g=f;for(;Array.isArray(g);){let m=g.length-1,h=g[m];if(pt(h)){let y={};return g[m]=y,y}g=h}return g}c(s,"getNextTargetFromKey")}c(oi,"getTable");function ii(e,t,r){let n=e;for(let o=0;o<t.length-1;o++){let i=t[o],a=n[i];if(a==null){let s={};n[i]=s,n=s}else if(pt(a)||Array.isArray(a)){let s={};n[i]=s,n=s}else n=a}n[Te(t)]=r}c(ii,"set");function pt(e){return typeof e!="object"||e instanceof Date}c(pt,"isValue");function rn(e,t){return ri(e,t).ast}c(rn,"parseTOML");function te(e,t){try{let r=rn(e,{tomlVersion:"1.0"}),n=zt(r);return an(n),{ast:r,value:n}}catch(r){let n=r;throw new w({code:"INVALID_CONFIG",path:t,message:"Configuration contains invalid TOML or an unsupported value.",line:n.lineNumber,column:n.column===void 0?void 0:n.column+1,action:"Open config.toml, correct the indicated value, and retry."},{cause:r})}}c(te,"parseToml");function an(e){if(e instanceof Date||typeof e=="bigint"||typeof e=="number"&&(!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)))throw new Error("Unsupported TOML value");if(e&&typeof e=="object")for(let[t,r]of Object.entries(e)){if(["__proto__","prototype","constructor"].includes(t))throw new Error("Reserved key");an(r)}}c(an,"assertJsonValue");function _e(e){if(typeof e=="string")return JSON.stringify(e).replace(/\\u([0-9a-f]{4})/gi,"\\u$1");if(typeof e=="boolean"||typeof e=="number"&&Number.isFinite(e))return String(e);if(Array.isArray(e))return`[${e.map(_e).join(", ")}]`;if(se(e))return`{ ${Object.entries(e).filter(([,t])=>t!==void 0).map(([t,r])=>`${be(t)} = ${_e(r)}`).join(", ")} }`;throw new Error("Configuration cannot contain null or unsupported values.")}c(_e,"tomlValue");var be=c(e=>/^[A-Za-z0-9_-]+$/.test(e)?e:JSON.stringify(e),"tomlKey"),nn=c(e=>e.keys.map(t=>t.type==="TOMLBare"?t.name:t.value),"keyPath"),ai=c((e,t)=>e.length===t.length&&e.every((r,n)=>r===t[n]),"samePath"),mt=c((e,t)=>e.length<=t.length&&e.every((r,n)=>r===t[n]),"prefix");function se(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)}c(se,"isRecord");function ze(e,t,r){let n=e;for(let o of t)n=sn(n,o,r);return te(n,r),n.endsWith(`
|
|
4
4
|
`)?n:`${n}
|
|
5
5
|
`}c(ze,"editToml");function sn(e,t,r){if(!t.path.length||t.path.some(m=>!m||["__proto__","prototype","constructor"].includes(m)))throw new Error("Invalid configuration key path.");let{ast:n}=te(e,r),o=[],i=[];for(let m of n.body[0].body)if(m.type==="TOMLKeyValue")o.push({path:nn(m.key),node:m});else{if(i.push(m),m.kind!=="standard")continue;for(let h of m.body)o.push({path:[...m.resolvedKey.map(String),...nn(h.key)],node:h})}let a=o.find(m=>ai(m.path,t.path));if(a){let m=a.node;if(t.op==="set")return ht(e,m.value.range,on(e,n,m.value.range,_e(t.value)));let h=n.comments.filter(y=>y.range[0]>=m.range[0]&&y.range[1]<=m.range[1]).map(y=>e.slice(...y.range)).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as g,d as $,e as O,f as C}from"./chunk-
|
|
2
|
+
import{b as g,d as $,e as O,f as C}from"./chunk-SFKZITAG.js";import{a as w}from"./chunk-3M53YXEI.js";import{a as r}from"./chunk-FTQLQJQV.js";var L=Symbol("openpondCliOptionValues"),a=class extends Error{static{r(this,"CliUsageError")}exitCode=2;constructor(t){super(t),this.name="CliUsageError"}},K=new Set(["maxOutputBytes","timeoutSec"]);function k(n){let t=[...n],o="",i={},e={},u=[];for(;t.length>0;){let s=t.shift();if(s==="--"){u.push(...t);break}if(s.startsWith("--")){let f=s.indexOf("="),c=f>=0?s.slice(2,f):s.slice(2),p=N(c),d=f>=0?s.slice(f+1):P(t,p,o);h(i,e,p,d,o)}else _(s)?y(s,t,i,e):o?u.push(s):o=s}return Object.defineProperty(i,L,{value:e,enumerable:!1,configurable:!1,writable:!1}),V(o,i),{command:o,options:i,rest:u}}r(k,"parseArgs");function N(n){return n.replace(/-([a-z])/g,(t,o)=>o.toUpperCase())}r(N,"normalizeCliOptionKey");function _(n){return/^-[^-].*/.test(n)&&!S(n)}r(_,"isShortOptionToken");function y(n,t,o,i){let e=n.slice(1);if(!e)return;let u=e.indexOf("="),s=u>=0?e.slice(0,u):e,f=u>=0?e.slice(u+1):null;if(s.length!==1){for(let d of s){let m=g[d];if(!m)throw new a(`unknown short option -${d}`);if(C(m)!=="boolean")throw new a(`short option -${d} requires its own value`);h(o,i,m,"true")}return}let c=g[s];if(!c)throw new a(`unknown short option -${s}`);let p=f??P(t,c);h(o,i,c,p)}r(y,"parseShortOptionToken");function P(n,t,o){let i=I(t,o);if(i==="boolean")return n[0]&&x(n[0])?n.shift():"true";if(i){let e=n.shift();if(e===void 0||R(e)&&!S(e))throw e!==void 0&&n.unshift(e),new a(`${l(t)} must be ${b(i)}`);return e}return n[0]&&!n[0].startsWith("--")?n.shift():"true"}r(P,"readOptionValue");function h(n,t,o,i,e){T(o,i,e),n[o]=i,(t[o]??=[]).push(i)}r(h,"setParsedOption");function T(n,t,o){let i=I(n,o);if(i){if(i==="boolean"){if(!x(t))throw new a(`${l(n)} must be a boolean`);return}if(t.trim().length===0||t==="true")throw new a(`${l(n)} must be ${b(i)}`);if(i==="number"||i==="integer"){let e=Number(t);if(!Number.isFinite(e))throw new a(`${l(n)} must be ${b(i)}`);if(i==="integer"&&!Number.isInteger(e))throw new a(`${l(n)} must be an integer`);if(i==="integer"&&K.has(n)&&e<=0)throw new a(`${l(n)} must be a positive integer`);return}if(i==="json")try{w(t,l(n))}catch(e){throw new a(e instanceof Error?e.message:String(e))}}}r(T,"validateParsedOptionValue");function I(n,t){return t?O(t,n):C(n)}r(I,"typedOptionKind");function l(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}r(l,"cliOptionLabel");function E(n){return n==="json"?"JSON value":n}r(E,"optionKindLabel");function b(n){let t=E(n);return/^[aeiou]/i.test(t)?`an ${t}`:`a ${t}`}r(b,"optionKindPhrase");function x(n){return/^(true|false|1|0|yes|no)$/i.test(n)}r(x,"isBooleanLiteral");function R(n){return n.startsWith("-")&&n!=="-"}r(R,"isOptionLike");function S(n){return/^-\d+(?:\.\d+)?$/.test(n)}r(S,"isNegativeNumber");function V(n,t){let o=n?$(n):null;for(let i of Object.keys(t))if(!O(n,i)){let e=l(i),u=o?` for ${o.name}`:"";throw new a(`unknown option --${e}${u}`)}}r(V,"validateCommandOptions");export{a,k as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{d as a,e as s}from"./chunk-JCLTFDVW.js";import{a as o}from"./chunk-FTQLQJQV.js";function p(e,i={}){let t=e.trim().replace(/\/$/,"");if(!t)throw new Error("sandbox API URL must be non-empty");let n=new URL(t),r=n.pathname.replace(/\/$/,"");if(r.endsWith("/v1/sandboxes")||r.endsWith("/api/sandboxes"))return`${n.origin}${r}`;if(r.endsWith("/v1"))return`${n.origin}${r}/sandboxes`;if(n.origin===a)return`${s}/v1/sandboxes`;let d=i.apiBaseUrl?new URL(i.apiBaseUrl).origin:s;return n.origin===d?`${n.origin}${r}/v1/sandboxes`:`${n.origin}${r}/api/sandboxes`}o(p,"normalizeSandboxApiUrl");function u(e){let i="/sandboxes";if(!e.endsWith(i))throw new Error("sandbox API URL must end with /sandboxes");return e.slice(0,-i.length)}o(u,"apiRootUrlFromSandboxApiUrl");export{p as a,u as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as d,e as p,f,g,i as w,qa as P}from"./chunk-
|
|
2
|
+
import{c as d,e as p,f,g,i as w,qa as P}from"./chunk-2EPR4HLF.js";import{a as u,c as m,f as l,h as r}from"./chunk-UGOK7VTC.js";import{a as e}from"./chunk-FTQLQJQV.js";import c from"node:path";import{AsyncLocalStorage as v}from"node:async_hooks";import{promises as h}from"node:fs";var y=new v;function E(n,i=!1){let t=y.getStore();t&&(i&&(t.length=0),t.push(n))}e(E,"onStartupFailure");async function N(n,i){await P(n);let t;try{t=await g(c.join(r(n).runtime,"server-owner"),100)}catch(o){if(o instanceof m&&o.issue.code==="STORAGE_BUSY"){let a=await w(c.join(r(n).runtime,"endpoint.json"),()=>null);throw new m({code:"RUNTIME_ALREADY_RUNNING",path:n,message:"An OpenPond runtime already owns this home.",action:a?.url?`Connect to the existing runtime at ${a.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw o}let s=[];try{let o=await u(n,()=>y.run(s,i)),a=o.close.bind(o);s.length=0;let k;return{...o,close:e(()=>k??=(async()=>{try{await u(n,a)}finally{await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0}),await t()}})(),"close")}}catch(o){try{for(let a of s.reverse())await Promise.resolve().then(()=>u(n,a)).catch(()=>{});await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0})}finally{await t()}throw o}}e(N,"ownHomeRuntime");async function b(n,i,t){await p(c.join(r(n).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:i,serverId:t}))}e(b,"publishRuntimeEndpoint");import{randomBytes as x}from"node:crypto";function D(){return l()}e(D,"appDataDir");function _(n){return r(n).config}e(_,"providersConfigPath");function H(n){return r(n).credentials}e(H,"providerSecretsConfigPath");function L(n){return r(n).key}e(L,"providerSecretsKeyPath");async function U(n){let i=r(n).token;return f(i,async()=>{let t=(await d(i))?.trim(),s=process.env.OPENPOND_APP_TOKEN||t||x(32).toString("base64url");return s!==t&&await p(i,s),{token:s,tokenFile:i}})}e(U,"ensureCapabilityToken");export{E as a,N as b,b as c,D as d,_ as e,H as f,L as g,U as h};
|