openpond 0.2.69 → 0.2.71
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/dist/api/client-context.d.ts +4 -0
- package/dist/app-server.js +1 -1
- package/dist/chunks/{account-context-V3KLSNKS.js → account-context-LEZDNYMR.js} +1 -1
- package/dist/chunks/{acp-ER6CUXG2.js → acp-VWPJ2EL4.js} +1 -1
- package/dist/chunks/{acp-agent-AYJ5RPVF.js → acp-agent-OZHZMQ6R.js} +1 -1
- package/dist/chunks/{actions-command-BBUS3HDK.js → actions-command-AXGXBU75.js} +1 -1
- package/dist/chunks/{app-layer-JCEWGUDH.js → app-layer-OHPIYEOJ.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-ILXBFD3S.js → app-server-connected-apps-NH4667QJ.js} +1 -1
- package/dist/chunks/{app-server-evaluations-RRLYWLPK.js → app-server-evaluations-Y5UEF2Y7.js} +1 -1
- package/dist/chunks/{app-server-harness-services-XXM336NU.js → app-server-harness-services-GUHAIIPS.js} +1 -1
- package/dist/chunks/app-server-runtime-CH5STRJP.js +2 -0
- package/dist/chunks/apps-DNLT6P4J.js +2 -0
- package/dist/chunks/{chunk-MOXIGLN2.js → chunk-23YW5PAQ.js} +1 -1
- package/dist/chunks/{chunk-ZDEIVUUI.js → chunk-27OJ2OLP.js} +1 -1
- package/dist/chunks/{chunk-RY46UPBO.js → chunk-2ACX7IW5.js} +1 -1
- package/dist/chunks/{chunk-NSSZ2ZIU.js → chunk-2EAZB2MW.js} +1 -1
- package/dist/chunks/{chunk-DRLP7GIU.js → chunk-2GEZ3ZY7.js} +1 -1
- package/dist/chunks/{chunk-PAYFJHPO.js → chunk-2PVW2XFF.js} +1 -1
- package/dist/chunks/{chunk-Y2WNZWT2.js → chunk-2Q6FTL4C.js} +1 -1
- package/dist/chunks/{chunk-KP2MYTP5.js → chunk-2QHB5P2K.js} +1 -1
- package/dist/chunks/{chunk-FNGZ4UDZ.js → chunk-33UVQ7DU.js} +1 -1
- package/dist/chunks/{chunk-M4ZHFDRJ.js → chunk-3JVZ7OCQ.js} +1 -1
- package/dist/chunks/{chunk-4BUM6JEC.js → chunk-3JYPUOK4.js} +1 -1
- package/dist/chunks/{chunk-DXJC3QW7.js → chunk-3VT2PPKW.js} +1 -1
- package/dist/chunks/{chunk-Z33RVGP6.js → chunk-5LKEVB2P.js} +1 -1
- package/dist/chunks/{chunk-P4QM63L3.js → chunk-5ZBDHIIE.js} +1 -1
- package/dist/chunks/{chunk-WD4KAKEX.js → chunk-64EDQ7UV.js} +1 -1
- package/dist/chunks/{chunk-UMAVVMXL.js → chunk-6BTX66SV.js} +1 -1
- package/dist/chunks/{chunk-KU4TPDPH.js → chunk-6LAGMWJE.js} +1 -1
- package/dist/chunks/{chunk-65FJWWXG.js → chunk-6YR5IYHH.js} +1 -1
- package/dist/chunks/{chunk-AUO5DCEU.js → chunk-73COPJ32.js} +1 -1
- package/dist/chunks/{chunk-KDER7R45.js → chunk-7PDF2UX2.js} +1 -1
- package/dist/chunks/{chunk-SO4GMSNP.js → chunk-7SOHV5BH.js} +1 -1
- package/dist/chunks/{chunk-XOPHFUUY.js → chunk-ASMQTMQB.js} +1 -1
- package/dist/chunks/{chunk-ESYPMD7Q.js → chunk-AT3ZYNX4.js} +1 -1
- package/dist/chunks/{chunk-NMMHXYDJ.js → chunk-AVEHWUML.js} +1 -1
- package/dist/chunks/{chunk-M4A7G4S5.js → chunk-B7SCVTE6.js} +1 -1
- package/dist/chunks/{chunk-7EQLW2KM.js → chunk-BLNEHU62.js} +1 -1
- package/dist/chunks/{chunk-DKOVZ6R2.js → chunk-BQNU4HZW.js} +1 -1
- package/dist/chunks/{chunk-UANH7U3Y.js → chunk-BTEBZYK3.js} +1 -1
- package/dist/chunks/{chunk-BU6MW65V.js → chunk-BYVE4TMU.js} +1 -1
- package/dist/chunks/{chunk-PNPV2LDE.js → chunk-BZS2PA4O.js} +1 -1
- package/dist/chunks/{chunk-AFYYIJ6K.js → chunk-C7NQPICU.js} +1 -1
- package/dist/chunks/{chunk-K7KBFM2T.js → chunk-CBD554GZ.js} +1 -1
- package/dist/chunks/{chunk-GYYJ47GX.js → chunk-CWE2N3JI.js} +1 -1
- package/dist/chunks/{chunk-ZYLLPRPU.js → chunk-CX4T7I47.js} +1 -1
- package/dist/chunks/{chunk-AQUZCWM3.js → chunk-D2V2Y3FB.js} +1 -1
- package/dist/chunks/chunk-DFZTRMTL.js +2 -0
- package/dist/chunks/{chunk-2PXKSAG6.js → chunk-DLOJG7LP.js} +1 -1
- package/dist/chunks/{chunk-5G7BQAUA.js → chunk-DNNWMOMG.js} +1 -1
- package/dist/chunks/{chunk-M5X7XKXY.js → chunk-DNRC6TPJ.js} +7 -7
- package/dist/chunks/{chunk-HKVFU3B3.js → chunk-DUR32LJG.js} +1 -1
- package/dist/chunks/{chunk-XT4CSKHM.js → chunk-E57PUTV2.js} +1 -1
- package/dist/chunks/{chunk-4N4EH3RJ.js → chunk-EJOV6Z6F.js} +1 -1
- package/dist/chunks/{chunk-OUJ63LMU.js → chunk-ER2VONWQ.js} +1 -1
- package/dist/chunks/{chunk-PSY6IRJE.js → chunk-ESOIZG2G.js} +4 -4
- package/dist/chunks/{chunk-WNXUSELC.js → chunk-EXAJ2B4I.js} +1 -1
- package/dist/chunks/{chunk-CCZ276IA.js → chunk-F2EUZG2W.js} +1 -1
- package/dist/chunks/{chunk-VJR2GNRY.js → chunk-FVMTQSVW.js} +1 -1
- package/dist/chunks/{chunk-YI6ME6PU.js → chunk-GG6PM7TB.js} +1 -1
- package/dist/chunks/{chunk-DDOIPTOM.js → chunk-GMA365GI.js} +1 -1
- package/dist/chunks/{chunk-JVMSN7LH.js → chunk-GR4MJJCE.js} +1 -1
- package/dist/chunks/{chunk-TB5P3FWM.js → chunk-GUWNSMGH.js} +1 -1
- package/dist/chunks/{chunk-AYOMVI7J.js → chunk-HIMG7S5E.js} +1 -1
- package/dist/chunks/{chunk-2LJCJOJ7.js → chunk-HLJJAOI2.js} +1 -1
- package/dist/chunks/{chunk-AFH462DO.js → chunk-HT6ILPD6.js} +1 -1
- package/dist/chunks/{chunk-3Z4VM2LF.js → chunk-HUMNLSCV.js} +1 -1
- package/dist/chunks/{chunk-NZDLL6JN.js → chunk-HYUTDZ3N.js} +1 -1
- package/dist/chunks/{chunk-XYZV3FKD.js → chunk-I6KTJ3GH.js} +1 -1
- package/dist/chunks/{chunk-WZ35ICTE.js → chunk-IFMWAOBR.js} +1 -1
- package/dist/chunks/{chunk-R2FYCJL6.js → chunk-IJJ7FYZE.js} +1 -1
- package/dist/chunks/{chunk-XHACK2KR.js → chunk-IUYGQO2K.js} +1 -1
- package/dist/chunks/{chunk-55YD4UTW.js → chunk-IV2HEX3I.js} +1 -1
- package/dist/chunks/chunk-J7X72QUY.js +2 -0
- package/dist/chunks/{chunk-U7X5ZLAL.js → chunk-JCHLDNCX.js} +1 -1
- package/dist/chunks/chunk-JF7WWLNW.js +2 -0
- package/dist/chunks/{chunk-7PKDJHT6.js → chunk-JH4RACOB.js} +1 -1
- package/dist/chunks/{chunk-65WRWLUD.js → chunk-JVEIK4RH.js} +1 -1
- package/dist/chunks/{chunk-Z5CQXPIS.js → chunk-K3WM4NEC.js} +1 -1
- package/dist/chunks/{chunk-EGP6DF34.js → chunk-KASHK2U5.js} +2 -2
- package/dist/chunks/{chunk-JEMECEQH.js → chunk-KHDCMVEJ.js} +1 -1
- package/dist/chunks/{chunk-BDZDWHBJ.js → chunk-KURL76NW.js} +1 -1
- package/dist/chunks/{chunk-7OFD6TFD.js → chunk-LMLGEOKV.js} +1 -1
- package/dist/chunks/{chunk-QUNQM2E3.js → chunk-MPEK4ZNY.js} +1 -1
- package/dist/chunks/chunk-MZKCW6CB.js +2 -0
- package/dist/chunks/{chunk-SDHG6CKU.js → chunk-NDNSLCPE.js} +1 -1
- package/dist/chunks/chunk-NK2L5HA2.js +2 -0
- package/dist/chunks/{chunk-WCNPGKST.js → chunk-O4YHISU2.js} +1 -1
- package/dist/chunks/{chunk-RCQYEHHD.js → chunk-O5ZOW474.js} +1 -1
- package/dist/chunks/{chunk-IIT66347.js → chunk-OEAKX5TS.js} +1 -1
- package/dist/chunks/{chunk-LSKMALD6.js → chunk-OFV26C2U.js} +2 -2
- package/dist/chunks/{chunk-IO5DZUKL.js → chunk-OI4DAZ4U.js} +1 -1
- package/dist/chunks/{chunk-Q73RKX7I.js → chunk-OIIE5GUK.js} +1 -1
- package/dist/chunks/{chunk-R6I623SZ.js → chunk-OKPV6MBX.js} +6 -6
- package/dist/chunks/{chunk-N5EAVX4G.js → chunk-OOKHHOIU.js} +1 -1
- package/dist/chunks/{chunk-MIFVX5PK.js → chunk-OQ4RWCYI.js} +1 -1
- package/dist/chunks/{chunk-RCRZXHAI.js → chunk-OTG77H7U.js} +1 -1
- package/dist/chunks/{chunk-7OKZCJHS.js → chunk-OXRN2257.js} +1 -1
- package/dist/chunks/{chunk-4KNPCJR4.js → chunk-PJJSQ4ZI.js} +1 -1
- package/dist/chunks/{chunk-7RSQOC5M.js → chunk-PXQZOVSV.js} +2 -2
- package/dist/chunks/chunk-QKGNAYSC.js +2 -0
- package/dist/chunks/{chunk-R4EEGWXB.js → chunk-QN4CFJQC.js} +1 -1
- package/dist/chunks/{chunk-V24VHT76.js → chunk-REGKOCDO.js} +1 -1
- package/dist/chunks/chunk-RJY4EI46.js +2 -0
- package/dist/chunks/{chunk-E2JB5OCO.js → chunk-RP4DPUN2.js} +1 -1
- package/dist/chunks/{chunk-QLGP2OAQ.js → chunk-SNBFWBJI.js} +1 -1
- package/dist/chunks/{chunk-G4FRBT7G.js → chunk-SRJTQS2D.js} +3 -3
- package/dist/chunks/{chunk-XY7HFXLH.js → chunk-SVLVIYH2.js} +1 -1
- package/dist/chunks/{chunk-NW6WGGSL.js → chunk-TCTBCAI6.js} +1 -1
- package/dist/chunks/{chunk-7NCM6GBN.js → chunk-TOWY6Y23.js} +1 -1
- package/dist/chunks/{chunk-VWWKWYSQ.js → chunk-TWLPZHH7.js} +1 -1
- package/dist/chunks/{chunk-Y4I6CFZJ.js → chunk-UGDBMRCT.js} +1 -1
- package/dist/chunks/{chunk-JQOVC35K.js → chunk-UKTPX2EE.js} +1 -1
- package/dist/chunks/{chunk-CO23RRN7.js → chunk-UMRQKE3W.js} +1 -1
- package/dist/chunks/{chunk-B66QCXH2.js → chunk-USKCFST5.js} +1 -1
- package/dist/chunks/{chunk-3A2Y7UK3.js → chunk-USTDWGR4.js} +1 -1
- package/dist/chunks/{chunk-EWDDDHJN.js → chunk-UZNRH6I3.js} +1 -1
- package/dist/chunks/{chunk-CIZI6Z7D.js → chunk-VMW23TIZ.js} +1 -1
- package/dist/chunks/{chunk-22RLEU3Q.js → chunk-VND53FAU.js} +1 -1
- package/dist/chunks/{chunk-4G3GTEVS.js → chunk-VSQPWLAG.js} +1 -1
- package/dist/chunks/{chunk-KCLMA2IH.js → chunk-VV4K5YPD.js} +1 -1
- package/dist/chunks/{chunk-7RJOCGQ6.js → chunk-WAUFXZ5B.js} +1 -1
- package/dist/chunks/{chunk-HG2YFMVU.js → chunk-WXG3G2O6.js} +1 -1
- package/dist/chunks/{chunk-PACLKDTN.js → chunk-XBAB3HMA.js} +1 -1
- package/dist/chunks/chunk-XJU47QS2.js +2 -0
- package/dist/chunks/{chunk-WGQ3FMRF.js → chunk-XKDOPNQ5.js} +1 -1
- package/dist/chunks/{chunk-EYTTZ5H4.js → chunk-XLZMSD5K.js} +1 -1
- package/dist/chunks/{chunk-Q7FBVLLB.js → chunk-XNPTLJ5Z.js} +1 -1
- package/dist/chunks/{chunk-ZIQJDTQB.js → chunk-XTT3K3TR.js} +1 -1
- package/dist/chunks/{chunk-Q7P34B2O.js → chunk-YFHQRDNQ.js} +1 -1
- package/dist/chunks/{chunk-UGFSAG4U.js → chunk-YG3HITOU.js} +1 -1
- package/dist/chunks/{chunk-DWF3FCY4.js → chunk-Z5R4OSGC.js} +1 -1
- package/dist/chunks/{chunk-JT5YQ52I.js → chunk-Z6HWSTEP.js} +1 -1
- package/dist/chunks/{chunk-4PUOWSDE.js → chunk-ZEOYNUHL.js} +1 -1
- package/dist/chunks/{chunk-2TGHZXJE.js → chunk-ZG3DBXQG.js} +1 -1
- package/dist/chunks/{chunk-4KTGYHCE.js → chunk-ZMRP2A7K.js} +1 -1
- package/dist/chunks/cli-5JARGJOD.js +2 -0
- package/dist/chunks/{command-LNOVZQSK.js → command-AI3SMEAH.js} +11 -11
- package/dist/chunks/{configuration-command-C3QBDFND.js → configuration-command-NPA46ZOT.js} +1 -1
- package/dist/chunks/connected-app-executor-DLC23O43.js +2 -0
- package/dist/chunks/connected-evidence-TVORI55Q.js +2 -0
- package/dist/chunks/{connected-starting-assets-5LAJ7CZY.js → connected-starting-assets-WGGBWH4K.js} +1 -1
- package/dist/chunks/{continual-FVOLGGOE.js → continual-UHQI2EQD.js} +1 -1
- package/dist/chunks/core-commands-QNZUBKOC.js +2 -0
- package/dist/chunks/{dataset-preparation-authoring-UUYFWWCT.js → dataset-preparation-authoring-OBMJLGA4.js} +1 -1
- package/dist/chunks/datasets-USJLJOEQ.js +2 -0
- package/dist/chunks/desktop-test-IYHAOR47.js +3 -0
- package/dist/chunks/{dist-2MKJC6HN.js → dist-C5XFRP53.js} +1 -1
- package/dist/chunks/evaluation-coordination-UJENK4WQ.js +2 -0
- package/dist/chunks/experiment-improvements-6GJMKIER.js +2 -0
- package/dist/chunks/experiments-FZHILSC6.js +2 -0
- package/dist/chunks/experiments-signal-E32CWBS4.js +2 -0
- package/dist/chunks/{help-PLQJOP4P.js → help-32DLAPJR.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-QAV2UGSB.js +2 -0
- package/dist/chunks/{host-profile-external-dataset-KSEPXY2S.js → host-profile-external-dataset-C6ZPMTX6.js} +1 -1
- package/dist/chunks/{hosted-app-server-composition-GZES7QXJ.js → hosted-app-server-composition-5DVBKNV3.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-VG2WE7XZ.js → hosted-experiment-improvement-YQ24C54D.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-KLIORGWV.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-PTGQLPZO.js → hosted-profile-candidate-RCWFLOVJ.js} +1 -1
- package/dist/chunks/{hosted-profile-compiler-FS5R6CHJ.js → hosted-profile-compiler-UDG4BCEW.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-control-UUEZEMXU.js → hosted-profile-evaluation-control-4R3L4FTK.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-4F7OEF4T.js → hosted-profile-evaluation-inspection-NA4SSY7N.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-LIJJZDHQ.js → hosted-profile-evaluation-preparation-B4BW6JTB.js} +1 -1
- package/dist/chunks/{hosted-tasksets-V24IBVJX.js → hosted-tasksets-IUK3VWSL.js} +1 -1
- package/dist/chunks/human-review-D6QCZLYN.js +2 -0
- package/dist/chunks/{import-SI24Z7EF.js → import-UCG75PN5.js} +1 -1
- package/dist/chunks/{learning-Y3UKNUGE.js → learning-3XDYMYBE.js} +1 -1
- package/dist/chunks/learning-OR4CYV4B.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-GZBMBZB2.js +2 -0
- package/dist/chunks/local-harness-taskset-review-YVP2ZQJG.js +2 -0
- package/dist/chunks/{model-projects-6YWVD2TS.js → model-projects-POZRHXTF.js} +1 -1
- package/dist/chunks/opchat-APJUUTT7.js +3 -0
- package/dist/chunks/opchat-bounded-chat-PBUSUAY2.js +2 -0
- package/dist/chunks/organizations-WK6EZ6L3.js +2 -0
- package/dist/chunks/{profile-TD5U3INY.js → profile-BQMS7ALQ.js} +1 -1
- package/dist/chunks/project-action-payload-CGV77JSA.js +2 -0
- package/dist/chunks/project-agent-XVFYTEUQ.js +2 -0
- package/dist/chunks/{published-experiment-source-SDXUVPE7.js → published-experiment-source-2CYFIRBL.js} +1 -1
- package/dist/chunks/{refiner-profile-service-56VYLZQJ.js → refiner-profile-service-OLJHA4DI.js} +1 -1
- package/dist/chunks/{runtime-Q7JUJO4D.js → runtime-32KYSVZR.js} +1 -1
- package/dist/chunks/sandbox-command-OY3VZXGG.js +2 -0
- package/dist/chunks/{sandbox-template-GOY7QQUY.js → sandbox-template-YOOSJ4FK.js} +1 -1
- package/dist/chunks/saved-work-L4KNWLZB.js +2 -0
- package/dist/chunks/setup-EU6CMRXQ.js +2 -0
- package/dist/chunks/{src-C3ZUESMK.js → src-3DJR7OAH.js} +1 -1
- package/dist/chunks/{src-MT4B43TD.js → src-HYOTHMRX.js} +111 -113
- package/dist/chunks/{standalone-experiment-turn-owner-TW5MTWIO.js → standalone-experiment-turn-owner-UYPA6XHW.js} +1 -1
- package/dist/chunks/{store-chat-resources-IRHBW2EC.js → store-chat-resources-HISLEZZM.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-3KK42L4I.js → store-continual-support-reviews-ORWHS57V.js} +1 -1
- package/dist/chunks/{store-conversation-serving-IVURK52V.js → store-conversation-serving-5UGYKEGJ.js} +1 -1
- package/dist/chunks/{store-create-improve-UTCLBXF2.js → store-create-improve-APLPTVYQ.js} +1 -1
- package/dist/chunks/{store-datasets-4AQOVAQY.js → store-datasets-HDW6IYBL.js} +1 -1
- package/dist/chunks/{store-evaluation-results-PK2P3IMH.js → store-evaluation-results-KB2UDCF3.js} +1 -1
- package/dist/chunks/{store-harness-workspaces-YEXB4IRV.js → store-harness-workspaces-TKX5PZWP.js} +1 -1
- package/dist/chunks/{store-human-review-O4BVHP25.js → store-human-review-IURNTX3C.js} +1 -1
- package/dist/chunks/{store-learned-preference-migration-validation-44SVX6YB.js → store-learned-preference-migration-validation-TH2LKQWV.js} +1 -1
- package/dist/chunks/{store-learning-SIUQIY5C.js → store-learning-WLUW2PWE.js} +1 -1
- package/dist/chunks/{store-learning-credentials-BUHR7SN6.js → store-learning-credentials-FDKCEDHK.js} +1 -1
- package/dist/chunks/{store-local-experiments-BHVTKPPE.js → store-local-experiments-M4V5RLHJ.js} +1 -1
- package/dist/chunks/{store-model-batch-review-RVAYUVK2.js → store-model-batch-review-DDZLWVTG.js} +1 -1
- package/dist/chunks/{store-model-configuration-6L3OYXF4.js → store-model-configuration-ATOFA5OH.js} +1 -1
- package/dist/chunks/{store-model-project-preparation-AAEKCF6V.js → store-model-project-preparation-ZRSCQEQR.js} +1 -1
- package/dist/chunks/{store-modification-recordings-LCPK6K2T.js → store-modification-recordings-YJIDUPVJ.js} +1 -1
- package/dist/chunks/{store-preference-comparison-5YVIQNVB.js → store-preference-comparison-JKURBESE.js} +1 -1
- package/dist/chunks/{store-task-inbox-L6IQTY26.js → store-task-inbox-L53OT6ZC.js} +1 -1
- package/dist/chunks/{store-task-inventory-QWS2C656.js → store-task-inventory-R2JJGAHW.js} +1 -1
- package/dist/chunks/{store-taskset-drafts-FRFL6ITK.js → store-taskset-drafts-FPNJPFPO.js} +1 -1
- package/dist/chunks/{store-training-FYXZU2FE.js → store-training-DIBW7OMP.js} +1 -1
- package/dist/chunks/{store-training-jobs-3N3VKPIY.js → store-training-jobs-K7I4SXWW.js} +1 -1
- package/dist/chunks/{store-training-models-VOFVGPZR.js → store-training-models-LCSB37YY.js} +1 -1
- package/dist/chunks/{taskset-UDDLFYKV.js → taskset-XI5SJBJL.js} +1 -1
- package/dist/chunks/{taskset-packages-WMG5DUBN.js → taskset-packages-FUQWNTSB.js} +1 -1
- package/dist/chunks/{taskset-packages-T6B6HYKZ.js → taskset-packages-GM6IUOTY.js} +1 -1
- package/dist/chunks/{teams-bot-YCUTDDDC.js → teams-bot-CYC5TR64.js} +1 -1
- package/dist/chunks/{tool-learning-ZQ6NSJ5K.js → tool-learning-52QZIJIR.js} +1 -1
- package/dist/chunks/{training-5UMT45UL.js → training-GDLLLXSV.js} +1 -1
- package/dist/chunks/training-RL7UUBER.js +2 -0
- package/dist/chunks/training-UJ62NOJJ.js +2 -0
- package/dist/chunks/training-hardware-MR4FUC4U.js +3 -0
- package/dist/chunks/training-hosted-V5CHG3M3.js +2 -0
- package/dist/chunks/{training-hosted-alphaedit-HSMRDJTD.js → training-hosted-alphaedit-R5PVATV4.js} +1 -1
- package/dist/chunks/{training-hosted-decision-7JALOU6O.js → training-hosted-decision-WNK5DE3M.js} +1 -1
- package/dist/chunks/{training-hosted-engram-SXO75MFG.js → training-hosted-engram-ZQDOKXAV.js} +1 -1
- package/dist/chunks/{training-hosted-learning-E2N32YU5.js → training-hosted-learning-UEBGSSNC.js} +1 -1
- package/dist/chunks/{training-hosted-modification-comparison-TXFDJFTG.js → training-hosted-modification-comparison-KKI5CKOH.js} +1 -1
- package/dist/chunks/{training-hosted-neuron-training-J42WK4EH.js → training-hosted-neuron-training-CFWEDRSR.js} +1 -1
- package/dist/chunks/{training-hosted-serving-report-BAEABGJH.js → training-hosted-serving-report-N4NF5AVW.js} +1 -1
- package/dist/chunks/{training-hosted-steering-T556BUBG.js → training-hosted-steering-4MDUQ2YV.js} +1 -1
- package/dist/chunks/{training-model-start-P3PXDWNT.js → training-model-start-NOA6TYQK.js} +1 -1
- package/dist/chunks/{web-search-ZEKJHZW4.js → web-search-FTVNZ7PH.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +19 -0
- package/dist/web/assets/App-L7RV4D0A.js +54 -0
- package/dist/web/assets/{AppDialog-CxjDHVk9.js → AppDialog-B2V84J7f.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-CKJIVpKa.js → AppTerminalPanel-DfYpUDKT.js} +2 -2
- package/dist/web/assets/{AppToastContext-EpiT1dHs.js → AppToastContext-DuiPouLz.js} +1 -1
- package/dist/web/assets/{AppsView-BsMyPX_3.js → AppsView-B20RHDCy.js} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-BXvZy5gB.js → AttachmentTypeIcon-l-GRNxaz.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BIIV4aq4.js → BrowserSidebar-Ce0ToS2O.js} +1 -1
- package/dist/web/assets/{CartesianChart-brqLBqnF.js → CartesianChart-CtfMRAfp.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-CwZbn16X.js → ChatTimelineEntry-DzcucW20.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-BU4uc4tZ.js → CollaborationTabs-BpmKjNAC.js} +1 -1
- package/dist/web/assets/{CommandMenu-DkWpXR55.js → CommandMenu-JXsoxijv.js} +1 -1
- package/dist/web/assets/{CommunityView-CsSxJZGn.js → CommunityView-ggdn8pcH.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-BdJGCYzI.js → ComposerAttachments-BMmALUs_.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-CWy0j1vv.js → ComposerCreateImproveStrip-DcM1bkfu.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-DCmiakbZ.js → ConversationImportsSettings-BKNeARHI.js} +1 -1
- package/dist/web/assets/{DatasetReviewImport-DEnF_pGu.js → DatasetReviewImport-DyFOE0Q0.js} +1 -1
- package/dist/web/assets/{ExperimentTrainingDataWorkspace-WhwQ0QBi.js → ExperimentTrainingDataWorkspace-CfOyoMrq.js} +2 -2
- package/dist/web/assets/{FilePagePreview-BRhhz99q.js → FilePagePreview-B7bWObJN.js} +2 -2
- package/dist/web/assets/{GetStartedView-CLVD-qEi.js → GetStartedView-BYbFl93M.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-CMxaAMg-.js → GettingStartedDialog-UgreDozV.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-Cn-j-rDo.js → HostedModelLearningReview-C_kng2U_.js} +1 -1
- package/dist/web/assets/HostedModelLearningSettings-aesD_ifF.js +1 -0
- package/dist/web/assets/{HtmlVisual-D5y2WG9L.js → HtmlVisual-nvl1x-jh.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-BxRmYD6h.js → LabModelVersionDetailPage-DrdoNvI-.js} +1 -1
- package/dist/web/assets/{LabModelWorkspace-u2Ulm_z4.js → LabModelWorkspace-CHlhzG3q.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-C7IceJTJ.js → LabSkillSidebar-CqHeZzoj.js} +1 -1
- package/dist/web/assets/{LabsRoute-CbztQaEf.js → LabsRoute-DzEbPpMK.js} +4 -4
- package/dist/web/assets/{LearningBatchesPage-CJqgZNvM.js → LearningBatchesPage-A2dFQW2j.js} +1 -1
- package/dist/web/assets/{MainChatThread-DNMfrrRq.js → MainChatThread-BSvKu4e5.js} +2 -2
- package/dist/web/assets/{MainPane-CQQxSDPS.js → MainPane-DiWIAxMj.js} +6 -6
- package/dist/web/assets/{ModelProjectPageHeader-Dge19aE1.js → ModelProjectPageHeader-lu6iRXHK.js} +1 -1
- package/dist/web/assets/{NativeSetupTerminal-D4JnbpyD.js → NativeSetupTerminal-kZ-nFPE8.js} +2 -2
- package/dist/web/assets/{NativeSkillSidebar-Jzx1BeKV.js → NativeSkillSidebar-DkkD1uH2.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-DcnGzEd9.js → NewProjectDialog-Dg8dMEpc.js} +1 -1
- package/dist/web/assets/{OutputsPage-Cmk15Vt_.js → OutputsPage-Dz190U9t.js} +1 -1
- package/dist/web/assets/{PageChrome-Cz_fCqtn.js → PageChrome-Bncv-ps0.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BZ3Eo3Mz.js → ProjectsPage-DVkYvLtd.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-C6H2vU9N.js → RightChatPanelStack-CP4leenI.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-C0etQXpt.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-CAkSwM0T.js → ScheduledWorkPage-DI0mgt82.js} +1 -1
- package/dist/web/assets/{SettingsView-DvQXGw3_.js → SettingsView-cCtkr089.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-JuU1k8vr.js → TasksetDraftEditorPrimitives-DCQTuswJ.js} +1 -1
- package/dist/web/assets/{TeamChatView-DmHjr8W9.js → TeamChatView-BBEomfQ7.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-DlaM9d8F.js → TerminalOverlay-Dj5NUDMp.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-ClpylNsr.js → TrainingCreationPanel-Ds4PLfsd.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-6tH2xSDj.js → TrainingDraftPanel-BAuh_BF3.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CzDqxOYM.js → UsageSettingsSection-DbzeatcW.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-BaNuXoZc.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-B4e0lyF7.js → WorkspaceDiffPanel-xk-ve1MO.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-D01ZkZZF.js → WorkspaceEnvironmentMenu-D8GSuoYz.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-C5s_njZb.js → WorkspaceFileLocation-Dl8M2ZKN.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-DjPZ6KIh.js → WorkspaceGitDialogs-9BhLjYx4.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-CC4sfOiU.js → WorkspaceMonacoEditor-DYPuC7pj.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-vszQqFa4.js → WorkspacePdfPreview-B7BI9tLR.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DQTvhaRD.js → WorkspacePresentationPreview-sP7JUT7m.js} +1 -1
- package/dist/web/assets/{bot-Doyx3T4j.js → bot-D7M8ZtE6.js} +1 -1
- package/dist/web/assets/{chat-resources-Beh5lB36.js → chat-resources-DhKAnljP.js} +1 -1
- package/dist/web/assets/chevron-down-BAEcJitl.js +1 -0
- package/dist/web/assets/chevron-right-3G9s2cQ9.js +1 -0
- package/dist/web/assets/chevron-up-DTYF52H1.js +1 -0
- package/dist/web/assets/{chunk-C3TS766N-ppRhs95p.js → chunk-C3TS766N-DENE60SE.js} +1 -1
- package/dist/web/assets/{client-choice-storage-DitqKiIT.js → client-choice-storage-DYZsrVr9.js} +1 -1
- package/dist/web/assets/{client-DwZ92xtu.js → client-gy7zrd7a.js} +1 -1
- package/dist/web/assets/{cloud-upload-HdzNTgr2.js → cloud-upload-De-XSMUr.js} +1 -1
- package/dist/web/assets/{copy-DTQhoBNg.js → copy-DEK20zbZ.js} +1 -1
- package/dist/web/assets/{cssMode-BRTtfXxU.js → cssMode-Dau-Fhqf.js} +1 -1
- package/dist/web/assets/{external-link-H1629UU6.js → external-link-DwDry0Fb.js} +1 -1
- package/dist/web/assets/{folder-open-CAGdWOrr.js → folder-open-DOb4AjV6.js} +1 -1
- package/dist/web/assets/{folder-plus-C14cs2mE.js → folder-plus-BAouDaXv.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-DFUfuVvF.js → git-commit-horizontal-DZbHXcai.js} +1 -1
- package/dist/web/assets/{htmlMode-BVaCcL76.js → htmlMode-DlNEe6hu.js} +1 -1
- package/dist/web/assets/{icons-Bk2b68aC.js → icons-OQhKVrDc.js} +1 -1
- package/dist/web/assets/{image-0DPVY6Ev.js → image-BkYJDChH.js} +1 -1
- package/dist/web/assets/{index-B6XX_0h3.js → index-M_h2Ok4V.js} +2 -2
- package/dist/web/assets/{info-C8b_tafZ.js → info-Mj5lp4Ic.js} +1 -1
- package/dist/web/assets/{jsonMode-BCKKQmmV.js → jsonMode-CyOEyonV.js} +1 -1
- package/dist/web/assets/loader-circle-DXVtGvuV.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DozmNUOx.js → lspLanguageFeatures-DAYPzatg.js} +1 -1
- package/dist/web/assets/{maximize-2-CByk9-zN.js → maximize-2-BwFXSX6b.js} +1 -1
- package/dist/web/assets/{message-square-C889vRqm.js → message-square-C2nqfNLn.js} +1 -1
- package/dist/web/assets/{monaco.contribution-BITdsRbn.js → monaco.contribution-BZcNCJER.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DxAV1oS5.js → monaco.contribution-BZkfRhss.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BqA-XZ44.js → monaco.contribution-D7_X8TXe.js} +2 -2
- package/dist/web/assets/{monaco.contribution-B9q6qbbo.js → monaco.contribution-KyLdVay7.js} +2 -2
- package/dist/web/assets/{monitor-BtxlcLuI.js → monitor-B0Qj5Wea.js} +1 -1
- package/dist/web/assets/{paperclip-BeIdaspf.js → paperclip-CmrRruxi.js} +1 -1
- package/dist/web/assets/{pdf-perlzwEB.js → pdf-BM-9_48p.js} +1 -1
- package/dist/web/assets/play-CkACZ6Zo.js +1 -0
- package/dist/web/assets/plus-CB258e62.js +1 -0
- package/dist/web/assets/{presentation-0bzvu6_u.js → presentation-BYxhoSIo.js} +1 -1
- package/dist/web/assets/{python-B9hOnkOI.js → python-B3Mj03I5.js} +1 -1
- package/dist/web/assets/{refresh-cw-D61-Ozk3.js → refresh-cw-CwEmO71D.js} +1 -1
- package/dist/web/assets/{save-iEMNZoPe.js → save-S--FOuce.js} +1 -1
- package/dist/web/assets/{settings-lists-C84qxFmP.js → settings-lists-ChqDppMP.js} +1 -1
- package/dist/web/assets/square-BmPfHjGU.js +1 -0
- package/dist/web/assets/{square-terminal-Djpzo2Qs.js → square-terminal-CawpQtCi.js} +1 -1
- package/dist/web/assets/{submit-issue-command-HfKzyxg5.js → submit-issue-command-CFitxxmO.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-ClsXu39R.js → toggleHighContrast-D-cMCvXx.js} +1 -1
- package/dist/web/assets/training-CzbWtx75.js +1 -0
- package/dist/web/assets/{training-model-data-CIysl8wH.js → training-model-data-G-D64935.js} +1 -1
- package/dist/web/assets/{tsMode-nbmaMc-D.js → tsMode-9kzS1ijG.js} +1 -1
- package/dist/web/assets/{upload-C6ug8RD-.js → upload-CtYsSYrM.js} +1 -1
- package/dist/web/assets/{useAccountSettings-Dr9h4Qz_.js → useAccountSettings-DYYa6puz.js} +1 -1
- package/dist/web/assets/{useAgentInventory-ByCk2JAv.js → useAgentInventory-c5B_Tszj.js} +1 -1
- package/dist/web/assets/{useChatContextSelection-C0eMm2g6.js → useChatContextSelection-DOISZpTz.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-Do0y_leJ.js → useLocalAgentSchedules-QJ8RsMKm.js} +1 -1
- package/dist/web/assets/{useQuery-D2MQ7e5U.js → useQuery-DuTGOe2b.js} +1 -1
- package/dist/web/assets/{wifi-off-Dr-CapyW.js → wifi-off-BOfP4Vmg.js} +1 -1
- package/dist/web/assets/{workers-DKvM2NdM.js → workers-BwGpyrdj.js} +1 -1
- package/dist/web/assets/x-5_iy6IDd.js +1 -0
- package/dist/web/assets/{yaml-C02vq4ar.js → yaml-BU4IWV_7.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +1 -0
- package/package.json +1 -1
- package/dist/chunks/app-server-runtime-43MCH5SY.js +0 -2
- package/dist/chunks/apps-VNFGMQFG.js +0 -2
- package/dist/chunks/chunk-6D3FI2XT.js +0 -2
- package/dist/chunks/chunk-APKXXAUF.js +0 -2
- package/dist/chunks/chunk-JCLTFDVW.js +0 -2
- package/dist/chunks/chunk-KTIBXRWQ.js +0 -2
- package/dist/chunks/chunk-VEBW7NKD.js +0 -2
- package/dist/chunks/chunk-YDZBX4XQ.js +0 -2
- package/dist/chunks/cli-R7TAP6Z2.js +0 -2
- package/dist/chunks/connected-app-executor-LAEAQUJS.js +0 -2
- package/dist/chunks/connected-evidence-VKY6O2JW.js +0 -2
- package/dist/chunks/core-commands-5TNBVR72.js +0 -2
- package/dist/chunks/datasets-BIDZJYDC.js +0 -2
- package/dist/chunks/desktop-test-BY2MS3UL.js +0 -3
- package/dist/chunks/evaluation-coordination-FXB4DXZA.js +0 -2
- package/dist/chunks/experiment-improvements-JPDLKZXD.js +0 -2
- package/dist/chunks/experiments-IEN7RXLX.js +0 -2
- package/dist/chunks/experiments-signal-L32D36NH.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +0 -2
- package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +0 -2
- package/dist/chunks/human-review-6V6EMNVN.js +0 -2
- package/dist/chunks/learning-LAXMGWSQ.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +0 -2
- package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +0 -2
- package/dist/chunks/opchat-SV67HVMX.js +0 -3
- package/dist/chunks/opchat-bounded-chat-KLMIYSZZ.js +0 -2
- package/dist/chunks/organizations-OZZFX7RG.js +0 -2
- package/dist/chunks/project-action-payload-TK6G4VMC.js +0 -2
- package/dist/chunks/project-agent-FFXPNXCO.js +0 -2
- package/dist/chunks/sandbox-command-4BCUDAED.js +0 -2
- package/dist/chunks/saved-work-M6PUHKCC.js +0 -2
- package/dist/chunks/setup-RMZ2BHLM.js +0 -2
- package/dist/chunks/training-5NT2YB2L.js +0 -2
- package/dist/chunks/training-UY6KRG4M.js +0 -2
- package/dist/chunks/training-hardware-UWQCRDMV.js +0 -3
- package/dist/chunks/training-hosted-CKSDRVL6.js +0 -2
- package/dist/web/assets/App-CCuh99JW.js +0 -54
- package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +0 -1
- package/dist/web/assets/chevron-down-DX1hzujj.js +0 -1
- package/dist/web/assets/chevron-right-DHN0y3KC.js +0 -1
- package/dist/web/assets/chevron-up-_QrW88NF.js +0 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +0 -1
- package/dist/web/assets/play-CHXXdkuO.js +0 -1
- package/dist/web/assets/plus-DFFWjhPw.js +0 -1
- package/dist/web/assets/square-BE_4JMR3.js +0 -1
- package/dist/web/assets/training-DWfghwfZ.js +0 -1
- package/dist/web/assets/x-Jx2jlP9u.js +0 -1
package/dist/chunks/{app-server-evaluations-RRLYWLPK.js → app-server-evaluations-Y5UEF2Y7.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-ESYPMD7Q.js";import"./chunk-CO23RRN7.js";import{c as G,d as B,e as V}from"./chunk-VWWKWYSQ.js";import{a as C,p as z,q as Q,r as X}from"./chunk-OUJ63LMU.js";import{a as $,b as U}from"./chunk-EFP75UEX.js";import{b as F,c as K}from"./chunk-PACLKDTN.js";import{a as P}from"./chunk-ZIQJDTQB.js";import"./chunk-S7A2OGL2.js";import"./chunk-3Z4VM2LF.js";import"./chunk-EICS777E.js";import"./chunk-JQOVC35K.js";import"./chunk-FEAKTSRS.js";import"./chunk-TPOAAJKA.js";import"./chunk-RCQYEHHD.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-SDHG6CKU.js";import"./chunk-XHACK2KR.js";import"./chunk-W45RKGM6.js";import"./chunk-WCNPGKST.js";import"./chunk-AFH462DO.js";import"./chunk-UANH7U3Y.js";import"./chunk-CIZI6Z7D.js";import{b as L}from"./chunk-7PKDJHT6.js";import"./chunk-65WRWLUD.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import{a as W}from"./chunk-UOFDKMRU.js";import"./chunk-EYTTZ5H4.js";import"./chunk-XY7HFXLH.js";import{Z as R}from"./chunk-6I5AUTVO.js";import"./chunk-DKOVZ6R2.js";import"./chunk-U7X5ZLAL.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import{s as k,u as M}from"./chunk-OFJPOTES.js";import"./chunk-HG2YFMVU.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-FYWQWKVS.js";import"./chunk-GD3RCUDH.js";import"./chunk-7OKZCJHS.js";import"./chunk-UTIELP6F.js";import"./chunk-7NCM6GBN.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-6ESBAHWK.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-7J2NMUTK.js";import"./chunk-VEBW7NKD.js";import"./chunk-W45RKGM6.js";import"./chunk-AUO5DCEU.js";import"./chunk-Y4I6CFZJ.js";import"./chunk-EDYCSW22.js";import"./chunk-JT5YQ52I.js";import"./chunk-XGY4OQLC.js";import"./chunk-PAYFJHPO.js";import"./chunk-WD4KAKEX.js";import"./chunk-2PXKSAG6.js";import"./chunk-ULTV6INR.js";import"./chunk-WGQ3FMRF.js";import"./chunk-JXLDEYRW.js";import"./chunk-JVMSN7LH.js";import"./chunk-YI6ME6PU.js";import"./chunk-DRLP7GIU.js";import"./chunk-BU6MW65V.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-DXJC3QW7.js";import"./chunk-P4QM63L3.js";import"./chunk-MTP3B2SU.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import{f as J}from"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import{S as N}from"./chunk-4PUOWSDE.js";import{v as j}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{n as S}from"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import{A as s}from"./chunk-X2J2P5ZT.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=N(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(),j(h,1572864),J.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([M(),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-AT3ZYNX4.js";import"./chunk-UMRQKE3W.js";import{c as G,d as B,e as V}from"./chunk-TWLPZHH7.js";import{a as C,p as z,q as Q,r as X}from"./chunk-ER2VONWQ.js";import{a as $,b as U}from"./chunk-EFP75UEX.js";import{b as F,c as K}from"./chunk-XBAB3HMA.js";import{a as P}from"./chunk-XTT3K3TR.js";import"./chunk-S7A2OGL2.js";import"./chunk-HUMNLSCV.js";import"./chunk-EICS777E.js";import"./chunk-UKTPX2EE.js";import"./chunk-FEAKTSRS.js";import"./chunk-TPOAAJKA.js";import"./chunk-O5ZOW474.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-NDNSLCPE.js";import"./chunk-IUYGQO2K.js";import"./chunk-W45RKGM6.js";import"./chunk-O4YHISU2.js";import"./chunk-HT6ILPD6.js";import"./chunk-BTEBZYK3.js";import"./chunk-VMW23TIZ.js";import{b as L}from"./chunk-JH4RACOB.js";import"./chunk-JVEIK4RH.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import{a as W}from"./chunk-UOFDKMRU.js";import"./chunk-XLZMSD5K.js";import"./chunk-SVLVIYH2.js";import{Z as R}from"./chunk-6I5AUTVO.js";import"./chunk-BQNU4HZW.js";import"./chunk-JCHLDNCX.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import{s as k,u as M}from"./chunk-OFJPOTES.js";import"./chunk-WXG3G2O6.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-FYWQWKVS.js";import"./chunk-GD3RCUDH.js";import"./chunk-OXRN2257.js";import"./chunk-UTIELP6F.js";import"./chunk-TOWY6Y23.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-6ESBAHWK.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-7J2NMUTK.js";import"./chunk-NK2L5HA2.js";import"./chunk-W45RKGM6.js";import"./chunk-73COPJ32.js";import"./chunk-UGDBMRCT.js";import"./chunk-EDYCSW22.js";import"./chunk-Z6HWSTEP.js";import"./chunk-XGY4OQLC.js";import"./chunk-2PVW2XFF.js";import"./chunk-64EDQ7UV.js";import"./chunk-DLOJG7LP.js";import"./chunk-ULTV6INR.js";import"./chunk-XKDOPNQ5.js";import"./chunk-JXLDEYRW.js";import"./chunk-GR4MJJCE.js";import"./chunk-GG6PM7TB.js";import"./chunk-2GEZ3ZY7.js";import"./chunk-BYVE4TMU.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-3VT2PPKW.js";import"./chunk-5ZBDHIIE.js";import"./chunk-MTP3B2SU.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import{f as J}from"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import{S as N}from"./chunk-ZEOYNUHL.js";import{v as j}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{n as S}from"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import{A as s}from"./chunk-X2J2P5ZT.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=N(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(),j(h,1572864),J.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([M(),k()]);if(!i.lastUsed)throw new Error("Select a Profile before loading its evaluations.");let f=await L({store:t,storeDir:d,ref:i.lastUsed,profile:m,reloadProfile:k}),E=await P({store:t,ref:f.profileRef,sourceRevision:f.sourceRevision,harnessRelease:f.harnessRelease}),[O,ne,ie]=await Promise.all([t.listProfileEvaluationRuns(f.profileRef),t.listProfileEvaluationComparisons(f.profileRef),t.listProfileEvaluationSuiteRuns(f.profileRef)]);return{...E,runs:O,comparisons:ne,suiteRuns:ie}},"listProfileEvaluations"),executeProfileEvaluationCase:T,executeExperimentCase:b.execute,cancelExperimentCase:r(e=>Promise.resolve(b.cancel(s.object({id:s.string().min(1)}).strict().parse(e).id)),"cancelExperimentCase"),executeProfileEvaluationRun:A,prepareProfileEvaluationRun:I,runPreparedProfileEvaluation:r(async e=>A(await I(e,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:re,compareProfileEvaluationRuns:$({store:t,selectedProfile:a}),buildProfileEvaluationReport:r(async e=>{let i=await a();if(!i)throw new Error("Select a Profile before building an evaluation report.");return U({store:t,profileRef:i.ref,request:e})},"buildProfileEvaluationReport"),async close(){w.abort(new Error("Evaluation runtime closed")),await b.close()}}}r(Qe,"createAppServerEvaluations");export{Qe as createAppServerEvaluations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as H,c as m,d as k}from"./chunk-
|
|
2
|
+
import{a as H,c as m,d as k}from"./chunk-VV4K5YPD.js";import"./chunk-USTDWGR4.js";import{d,f as p,g as f,h as w}from"./chunk-D2V2Y3FB.js";import"./chunk-JVEIK4RH.js";import"./chunk-AN525SPP.js";import"./chunk-IZ6DLEVY.js";import{c as R}from"./chunk-XLZMSD5K.js";import"./chunk-SVLVIYH2.js";import"./chunk-BQNU4HZW.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import"./chunk-OFJPOTES.js";import"./chunk-PLROXHG2.js";import"./chunk-YU3C6U5V.js";import"./chunk-U7D6Q744.js";import"./chunk-WXG3G2O6.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-FYWQWKVS.js";import"./chunk-GD3RCUDH.js";import"./chunk-OXRN2257.js";import"./chunk-UTIELP6F.js";import"./chunk-TOWY6Y23.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-6ESBAHWK.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-7J2NMUTK.js";import"./chunk-NK2L5HA2.js";import"./chunk-W45RKGM6.js";import"./chunk-73COPJ32.js";import"./chunk-UGDBMRCT.js";import"./chunk-SSHE6B7Z.js";import"./chunk-EDYCSW22.js";import"./chunk-Z6HWSTEP.js";import"./chunk-XGY4OQLC.js";import"./chunk-2PVW2XFF.js";import"./chunk-64EDQ7UV.js";import"./chunk-DLOJG7LP.js";import"./chunk-ULTV6INR.js";import"./chunk-XKDOPNQ5.js";import"./chunk-JXLDEYRW.js";import"./chunk-GR4MJJCE.js";import"./chunk-GG6PM7TB.js";import"./chunk-2GEZ3ZY7.js";import"./chunk-BYVE4TMU.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-3VT2PPKW.js";import"./chunk-5ZBDHIIE.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-ZEOYNUHL.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.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-SRJTQS2D.js";import"./chunk-ESOIZG2G.js";import"./chunk-PKJHN666.js";import"./chunk-5LKEVB2P.js";import"./chunk-JH4RACOB.js";import"./chunk-JVEIK4RH.js";import"./chunk-OFV26C2U.js";import"./chunk-USKCFST5.js";import{b}from"./chunk-PYNW5OFA.js";import"./chunk-23YW5PAQ.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import"./chunk-UOFDKMRU.js";import"./chunk-AN525SPP.js";import"./chunk-IZ6DLEVY.js";import"./chunk-DNRC6TPJ.js";import"./chunk-6YR5IYHH.js";import"./chunk-SYUKES6H.js";import"./chunk-XLZMSD5K.js";import"./chunk-SVLVIYH2.js";import{e as a}from"./chunk-6I5AUTVO.js";import"./chunk-BQNU4HZW.js";import"./chunk-OOKHHOIU.js";import"./chunk-JCHLDNCX.js";import"./chunk-7PXZ4X4P.js";import"./chunk-N73MU2C3.js";import"./chunk-7SOHV5BH.js";import"./chunk-AVEHWUML.js";import"./chunk-SNBFWBJI.js";import"./chunk-IFMWAOBR.js";import"./chunk-VS2LOUCT.js";import"./chunk-DMFUEUAZ.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-GF55VEMR.js";import"./chunk-FAKDGLZQ.js";import"./chunk-KCJVFLBB.js";import"./chunk-GW766ZSO.js";import"./chunk-VJYOKU3C.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import"./chunk-2ACX7IW5.js";import"./chunk-OFJPOTES.js";import"./chunk-PLROXHG2.js";import"./chunk-YU3C6U5V.js";import"./chunk-PHZZBXDO.js";import"./chunk-KVTBX2UP.js";import"./chunk-U7D6Q744.js";import"./chunk-WXG3G2O6.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-FYWQWKVS.js";import"./chunk-GD3RCUDH.js";import"./chunk-OXRN2257.js";import"./chunk-UTIELP6F.js";import"./chunk-TOWY6Y23.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-6ESBAHWK.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-7J2NMUTK.js";import"./chunk-NK2L5HA2.js";import"./chunk-W45RKGM6.js";import"./chunk-73COPJ32.js";import"./chunk-UGDBMRCT.js";import"./chunk-3JYPUOK4.js";import"./chunk-YG3HITOU.js";import"./chunk-SSHE6B7Z.js";import"./chunk-JFXINDOQ.js";import"./chunk-EDYCSW22.js";import"./chunk-Z6HWSTEP.js";import"./chunk-XGY4OQLC.js";import"./chunk-2PVW2XFF.js";import"./chunk-64EDQ7UV.js";import"./chunk-DLOJG7LP.js";import"./chunk-ULTV6INR.js";import"./chunk-XKDOPNQ5.js";import"./chunk-JXLDEYRW.js";import"./chunk-GR4MJJCE.js";import"./chunk-GG6PM7TB.js";import"./chunk-2GEZ3ZY7.js";import"./chunk-BYVE4TMU.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-3VT2PPKW.js";import"./chunk-5ZBDHIIE.js";import"./chunk-MTP3B2SU.js";import"./chunk-UN2LKLGV.js";import"./chunk-HLJJAOI2.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-ZEOYNUHL.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-EJOV6Z6F.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-MZKCW6CB.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.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-HYUTDZ3N.js";import{c as y}from"./chunk-RFQD6B44.js";import"./chunk-VND53FAU.js";import"./chunk-OKPV6MBX.js";import"./chunk-XRKFTPHD.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import{I as C,J as G,K as k,N as W,P as M,R as z,S as F,b as D,l as K,q as V,r as _}from"./chunk-KHDCMVEJ.js";import"./chunk-K3WM4NEC.js";import"./chunk-BLNEHU62.js";import"./chunk-BT5YNE5U.js";import{d as m}from"./chunk-RPM4FDRX.js";import"./chunk-DFZTRMTL.js";import"./chunk-2QHB5P2K.js";import"./chunk-BZS2PA4O.js";import"./chunk-VSQPWLAG.js";import"./chunk-6LAGMWJE.js";import"./chunk-IV2HEX3I.js";import"./chunk-C7NQPICU.js";import"./chunk-J256AEEE.js";import"./chunk-J7X72QUY.js";import"./chunk-UN2LKLGV.js";import"./chunk-HLJJAOI2.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-ZEOYNUHL.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import{f,h as g}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"./chunk-GLUWATL5.js";import"./chunk-MZKCW6CB.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-TBODQT4W.js";import"./chunk-5HPZGLOL.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await m(),s=f(e),t=await y(e,s),n=g(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 m(),t=f(s),n=g(s),r=await y(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 m(),r=f(n),i=g(n),o=await y(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 m(),t=f(s),n=await y(s,t),r=g(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 m(),n=f(t),r=g(t),i=await y(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 m(),o=f(i),c=g(i),l=await y(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 m(),n=f(t),r=await y(t,n),i=g(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 m(),i=f(r),o=await y(r,i),c=g(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 m(),o=f(i),c=g(i),l=await y(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 m(),n=f(t),r=g(t),i=await y(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 m(),n=f(t),r=g(t),i=await y(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 m(),n=f(t),r=await y(t,n),i=g(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 m(),r=f(n),i=await y(n,r),o=g(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as pt}from"./chunk-IZ6DLEVY.js";import{a as ut}from"./chunk-SYUKES6H.js";import{b as se,m as mt,s as ft,t as ie,y as gt,z as ae}from"./chunk-YU3C6U5V.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{a as dt,d as Te}from"./chunk-U7D6Q744.js";import{$ as it,Ea as ct,ha as at,pa as Ie}from"./chunk-
|
|
2
|
+
import{a as pt}from"./chunk-IZ6DLEVY.js";import{a as ut}from"./chunk-SYUKES6H.js";import{b as se,m as mt,s as ft,t as ie,y as gt,z as ae}from"./chunk-YU3C6U5V.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{a as dt,d as Te}from"./chunk-U7D6Q744.js";import{$ as it,Ea as ct,ha as at,pa as Ie}from"./chunk-WXG3G2O6.js";import{e as st}from"./chunk-OQPJ7FJF.js";import{P as oe,R as lt}from"./chunk-OXRN2257.js";import{I as _e}from"./chunk-2MEOUS24.js";import{a as i,c as Re,e as Pn}from"./chunk-FTQLQJQV.js";var kt=Re((as,yt)=>{"use strict";var Cn=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],ht=/[\n\r\u2028\u2029]/,En=/[\s#!"$&'():;<=>@\\^`|]/g;yt.exports=i(function(t){return t.map(function(n){if(n==="")return"''";if(n&&typeof n=="object"){if("op"in n&&n.op==="glob"){if(typeof n.pattern!="string")throw new TypeError("glob token requires a string `pattern`");if(ht.test(n.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return n.pattern.replace(En,"\\$&")}if("op"in n&&typeof n.op=="string"){if(Cn.indexOf(n.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(n.op));return n.op.replace(/[\s\S]/g,"\\$&")}if("comment"in n&&typeof n.comment=="string"){if(ht.test(n.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+n.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(n)&&!/'/.test(n)?"'"+n.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(n)?'"'+n.replace(/(["\\$`!])/g,"\\$1")+'"':String(n).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")},"quote")});var Tt=Re((ls,It)=>{"use strict";var _t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wt=new RegExp("^"+_t+"$"),bt="|&;()<> \\t",Mn="'([^']*?)'",Wn='"((\\\\"|[^"])*?)"',On=/^#$/,xt="'",Rt='"',ce="$",D="",qn=4294967296;for(ve=0;ve<4;ve++)D+=(qn*Math.random()).toString(16);var ve,jn=new RegExp("^"+D);function Bn(e,t){for(var n=t.lastIndex,r=[],o;o=t.exec(e);)r[r.length]=o,t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,r}i(Bn,"matchAll");function $n(e,t,n){var r=typeof e=="function"?e(n):e[n];return typeof r>"u"&&n!=""?r="":typeof r>"u"&&(r="$"),typeof r=="object"?t+D+JSON.stringify(r)+D:t+r}i($n,"getVar");function Nn(e,t,n){n||(n={});var r=n.escape||"\\",o=n.splitUnquoted===!0?`
|
|
3
3
|
`:typeof n.splitUnquoted=="string"?n.splitUnquoted:"",s="(\\"+r+`['"`+bt+`]|[^\\s'"`+bt+"])+",a=new RegExp(["("+_t+")","("+s+"|"+Wn+"|"+Mn+")+"].join("|"),"g"),d=Bn(e,a);if(d.length===0)return[];t||(t={});var c=!1;return d.map(function(l){var u=l[0];if(!u||c)return;if(wt.test(u))return{op:u};var p=!1,f=!1,m="",h=[],N=!1,R=null,V=!1,k;function tt(){k+=1;var I,X,be=u.charAt(k);if(be==="{"){if(k+=1,u.charAt(k)==="}")throw new Error("Bad substitution: "+u.slice(k-2,k+1));var re=1;for(I=k;re>0&&I<u.length;)u.charAt(I)==="{"&&u.charAt(I-1)==="$"?re+=1:u.charAt(I)==="}"&&(re-=1),I+=1;if(re!==0)throw new Error("Bad substitution: "+u.slice(k));I-=1,X=u.slice(k,I),k=I}else if(/[*@#?$!_-]/.test(be))X=be,k+=1;else{var xe=u.slice(k);I=xe.match(/[^\w\d_]/),I?(X=xe.slice(0,I.index),k+=I.index-1):(X=xe,k=u.length)}return $n(t,"",X)}i(tt,"parseEnvVar");function nt(){if(R!==null){if(R===0)m!==""&&(h[h.length]=m,m="");else{h[h.length]=m,m="";for(var I=1;I<R;I+=1)h[h.length]=""}R=null}}for(i(nt,"flushRun"),k=0;k<u.length;k++){var w=u.charAt(k);if(o&&w!==ce&&nt(),V=V||!p&&(w==="*"||w==="?"),f)m+=w,f=!1;else if(p)w===p?p=!1:p==xt?m+=w:w===r?(k+=1,w=u.charAt(k),w===Rt||w===r||w===ce?m+=w:m+=r+w):w===ce?m+=tt():m+=w;else if(w===Rt||w===xt)p=w,N=!0;else{if(wt.test(w))return{op:u};if(On.test(w)){c=!0;var rt={comment:e.slice(l.index+k+1)};return m.length?[m,rt]:[rt]}else if(w===r)f=!0;else if(w===ce){var ke=tt();if(!o)m+=ke;else for(var we=0;we<ke.length;we+=1){var W=ke.charAt(we);o.indexOf(W)<0?(nt(),m+=W):R===null?R=W===" "||W===" "||W===`
|
|
4
4
|
`?0:1:W!==" "&&W!==" "&&W!==`
|
|
5
5
|
`&&(R+=1)}}else m+=w}}if(V)return{op:"glob",pattern:m};if(o){if(R!==null&&R>0){h[h.length]=m,m="";for(var ot=1;ot<R;ot+=1)h[h.length]=""}return(m!==""||N&&h.length===0)&&(h[h.length]=m),h}return m}).reduce(function(l,u){return typeof u>"u"||[].concat(u).forEach(function(p){l[l.length]=p}),l},[])}i(Nn,"parseInternal");It.exports=i(function(t,n,r){var o=Nn(t,n,r);return typeof n!="function"?o:o.reduce(function(s,a){if(typeof a=="object")return s[s.length]=a,s;var d=a.split(RegExp("("+D+".*?"+D+")","g"));return d.length===1?(s[s.length]=d[0],s):(d.filter(Boolean).forEach(function(c){s[s.length]=jn.test(c)?JSON.parse(c.split(D)[1]):c}),s)},[])},"parse")});var vt=Re(Se=>{"use strict";Se.quote=kt();Se.parse=Tt()});var Mt=Pn(vt(),1);import{spawn as Ln}from"node:child_process";import{randomUUID as Dn}from"node:crypto";import Z from"node:path";import{mkdir as Fn}from"node:fs/promises";var Un=120,zn=3600,ue=6e4,St=2e4,Jn="Select a project to use this.";function Rs(e){let{upsertApproval:t,appendRuntimeEvent:n}=e,r=new Map,o=new Set;async function s(c){let l=c.command.trim();if(!l)return de(l,null,"Command is empty.",Pt(c.timeoutSeconds));let u=Pt(c.timeoutSeconds),p=A({session:c.session}),f=Yn({requestedCwd:c.cwd,session:c.session}),m=!f&&!c.session.workspaceKind&&!c.session.systemKind&&e.managedChatCwd;m&&(f=Z.join(m,c.session.id.replace(/[^a-zA-Z0-9_-]/g,"_")),await Fn(f,{recursive:!0}));let h=!!(c.cwd?.trim()&&Z.isAbsolute(c.cwd.trim()));if(p.target==="sandbox"||!f||p.target!=="local"&&!h&&!m)return de(l,f,Jn,u);let N=c.session.openPondCommandAccessMode??_e;if(N==="disabled")return de(l,f,"Command access is disabled for this chat.",u);let R=Hn(l);if(N==="ask"&&!o.has(At(c.session.id,R))){let k=await d({command:l,cwd:f,family:R,input:c,timeoutSeconds:u});if(k==="acceptForSession"&&o.add(At(c.session.id,R)),k!=="accept"&&k!=="acceptForSession")return de(l,f,k==="cancel"?"Command was cancelled.":"Command was not approved.",u)}let V=e.executionEnvironment?await e.executionEnvironment(c):{};return Zn({command:l,cwd:f,timeoutSeconds:u,signal:c.signal,env:V})}i(s,"executeCommand");async function a(c,l){let u=r.get(c);if(!u)return null;let p=it.parse(l);r.delete(c);let f=er(p.decision),m={...u.approval,status:f};return await t(m),await n(Te({sessionId:m.sessionId,turnId:m.turnId??void 0,name:"approval.resolved",source:"server",action:"command",status:f==="accepted"||f==="accepted_for_session"?"completed":"failed",output:m.title,data:{approvalId:c,status:f,decision:p.decision,family:u.family}})),u.resolve(p.decision),m}i(a,"resolveApproval");async function d(c){let l={id:`approval_${Dn()}`,sessionId:c.input.session.id,turnId:c.input.turnId??null,providerRequestId:c.input.providerRequestId??c.input.turnId??c.input.session.id,kind:"command",title:c.command,detail:JSON.stringify({command:c.command,cwd:c.cwd,timeoutSeconds:c.timeoutSeconds,source:c.input.source,mode:c.input.session.openPondCommandAccessMode??_e,risk:Xn(c.command),sessionApprovalFamily:{key:c.family.key,label:c.family.label,broad:c.family.broad,reason:c.family.reason}},null,2),status:"pending",createdAt:dt()},u,p=new Promise(f=>{u=f});r.set(l.id,{approval:l,family:c.family,resolve:u});try{await t(l),await n(Te({sessionId:c.input.session.id,turnId:c.input.turnId??void 0,name:"approval.requested",source:"server",action:"command",appId:c.input.session.appId,status:"pending",output:l.title,data:l}))}catch(f){throw r.delete(l.id),f}return p}return i(d,"requestCommandApproval"),{executeCommand:s,resolveApproval:a}}i(Rs,"createOpenPondCommandAccessService");function Wt(e){return JSON.stringify({ok:e.ok,action:"exec_command",output:Qn(e),data:{command:e.command,cwd:e.cwd,exitCode:e.exitCode,stdout:Et(e.stdout),stderr:Et(e.stderr),timedOut:e.timedOut,timeoutSeconds:e.timeoutSeconds,truncated:e.truncated,blockedReason:e.blockedReason}},null,2)}i(Wt,"commandResultForModel");function Hn(e){let t=Kn(e);if(!t)return le(e,"Could not safely parse shell command.");let n=Gn(t);if(n===-1)return le(e,"Could not find command executable.");if(Vn(t))return le(e,"Shell operators require exact-command session approval.");let r=t[n],o=t[n+1]??null;return r==="pwd"?Y("pwd","pwd","Allowlisted read-only command."):r==="ls"?Y("ls","ls","Allowlisted directory listing command."):r==="git"&&o==="status"?Y("git status","git status","Allowlisted git status family."):r==="docker"&&o==="system"?Y("docker system","docker system","Allowlisted Docker system inspection family."):r==="bun"&&o==="run"?Y("bun run","bun run","Allowlisted Bun script execution family."):le(e,"Command is not in the broad session-approval allowlist.")}i(Hn,"classifyCommandFamily");function Kn(e){try{let t=(0,Mt.parse)(e),n=[];for(let r of t){if(typeof r=="string"){n.push(r);continue}if(!r||typeof r!="object")return null;let o=r.op;if(typeof o=="string"){n.push(o);continue}return null}return n}catch{return null}}i(Kn,"safeShellTokens");function Gn(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(!/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(n))return t}return-1}i(Gn,"firstCommandTokenIndex");function Vn(e){return e.some(t=>/^(?:\||&&|\|\||;|&|<|>|\(|\)|\{|\})$/.test(t))}i(Vn,"hasUnsafeShellSyntax");function Y(e,t,n){return{key:e,label:t,broad:!0,reason:n}}i(Y,"broadFamily");function le(e,t){return{key:`exact:${e}`,label:e,broad:!1,reason:t}}i(le,"exactCommandFamily");function At(e,t){return`${e}:${t.key}`}i(At,"sessionFamilyKey");function Xn(e){let t=e.toLowerCase();return/\b(?:sudo|rm\s+-rf|mkfs|dd\s+if=|docker\s+(?:volume\s+rm|system\s+prune|container\s+rm)|kill(?:all)?)\b/.test(t)?"danger":/\b(?:npm|pnpm|yarn|bun)\s+(?:install|add|remove)|\bgit\s+(?:commit|push|reset|checkout|merge|rebase)|[>|]|\b(?:mv|cp|rm|touch|mkdir|docker\s+(?:run|build|compose))\b/.test(t)?"write":"read"}i(Xn,"commandRiskLabel");function Yn(e){let t=e.requestedCwd?.trim();return t?Z.isAbsolute(t)?Z.resolve(t):e.session.cwd?Z.resolve(e.session.cwd,t):null:e.session.cwd?.trim()||null}i(Yn,"resolveCommandCwd");function Pt(e){return Number.isFinite(e??NaN)?Math.max(1,Math.min(Math.floor(e),zn)):Un}i(Pt,"normalizedTimeout");function de(e,t,n,r){return{ok:!1,command:e,cwd:t,exitCode:null,stdout:"",stderr:n,timedOut:!1,timeoutSeconds:r,truncated:!1,blockedReason:n}}i(de,"blockedCommandResult");function Zn(e){return new Promise(t=>{let n=!1,r=!1,o="",s="",a=!1,d=null,c=ut(e.command),l=Ln(c.command,{cwd:e.cwd,shell:c.shell,env:{...process.env,PATH:pt(),...e.env},stdio:["ignore","pipe","pipe"],detached:process.platform!=="win32"}),u=i(h=>{n||(n=!0,clearTimeout(m),d&&clearTimeout(d),e.signal?.removeEventListener("abort",f),t(h))},"finish"),p=i((h,N)=>{let R=N.toString("utf8");h==="stdout"?o=Ae(o,R):s=Ae(s,R),o.length+s.length>=ue&&(a=!0)},"appendOutput"),f=i(()=>{Pe(l,"SIGTERM"),u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:s||"Command was interrupted.",timedOut:!1,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:"Command was interrupted."}),Ct(l)},"abort"),m=setTimeout(()=>{r=!0,Pe(l,"SIGTERM"),d=Ct(l)},e.timeoutSeconds*1e3);e.signal?.addEventListener("abort",f,{once:!0}),l.stdout?.on("data",h=>p("stdout",h)),l.stderr?.on("data",h=>p("stderr",h)),l.on("error",h=>{u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:h.message,timedOut:r,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:null})}),l.on("close",h=>{u({ok:!r&&(h??1)===0,command:e.command,cwd:e.cwd,exitCode:r?null:h??1,stdout:o,stderr:r?Ae(s,`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{e as H,j as R}from"./chunk-
|
|
2
|
+
import{e as H,j as R}from"./chunk-BQNU4HZW.js";import{v as I,z as C}from"./chunk-OFJPOTES.js";import{m as k,n as b}from"./chunk-RCT3O3HQ.js";import{a as h}from"./chunk-FTQLQJQV.js";import{promises as s}from"node:fs";import n from"node:path";import{execFile as O}from"node:child_process";import{promisify as A}from"node:util";var T=A(O);async function v(e,i,a={}){return(await T("git",["-C",e,...i],{encoding:"utf8",timeout:3e4,maxBuffer:8388608,env:{...process.env,...a}})).stdout.trim()}h(v,"candidateGit");async function j(e,i=I,a=!1){if(e.profileRef.source!=="local"&&!a)throw new Error("This Git adapter requires the actual installed local Profile owner; hosted adoption needs its published-source owner.");let r=await i(e.profileRef);if(r.error||r.mode!=="local"||r.activeProfile!==e.profileRef.profileId||!r.repoPath||!r.sourcePath)throw new Error("The original Profile owner is unavailable.");let l=await s.realpath(r.repoPath),p=await s.realpath(r.sourcePath),f=n.relative(l,p);if(f.startsWith("..")||n.isAbsolute(f))throw new Error("Profile source escapes its actual Git owner.");return{profile:r,repo:l,source:p,sourceRelative:f}}h(j,"originalCandidateProfile");async function ce(e,i,a=!0){if(!/^[a-f0-9]{40}$/.test(i)||await v(e,["rev-parse","HEAD"])!==i)throw new Error("The original Profile Git revision changed.");if(a&&await v(e,["status","--porcelain","--untracked-files=all"]))throw new Error("Commit or reconcile changes in the original Profile before this operation.")}h(ce,"assertCandidateGitHead");async function me(e,i){let a=await j(e.state,e.loadProfile,e.allowRemoteSnapshot),r=n.join(e.storeDir,"library","harnesses","profile-candidate-staging");await s.mkdir(r,{recursive:!0,mode:448});let l=await s.mkdtemp(n.join(r,"source-"));await s.rmdir(l),await v(a.repo,["worktree","add","--detach",l,e.commit]);try{let p=await C({repoPath:l,profileId:e.state.profileRef.profileId});if(p.error||!p.sourcePath)throw new Error("The staged original Profile cannot be loaded.");return await i({root:l,profile:p,repo:a.repo,source:p.sourcePath})}finally{await v(a.repo,["worktree","remove","--force",l]).catch(()=>{}),await s.rm(l,{recursive:!0,force:!0})}}h(me,"withCandidateProfileWorktree");function y(e){if(!e||n.isAbsolute(e)||e.includes("\\")||e.split("/").some(i=>!i||i==="."||i===".."))throw new Error("Original Profile patch path is not contained.");return e}h(y,"portable");async function pe(e){let i=e.base.manifest.metadata.profileSourceBindings;if(!Array.isArray(i))throw new Error("The original release needs compiler source bindings before candidate adoption.");let a=e.state.component.path,r=e.state.component,l=new Map(i.map(t=>{if(!t||typeof t!="object"||typeof t.releasedPath!="string"||typeof t.profileRelativePath!="string")throw new Error("Original Profile source binding is invalid.");return[y(t.releasedPath),y(t.profileRelativePath)]})),p=r.kind==="instruction"&&a==="instructions/system.md"&&e.base.manifest.metadata.profileInstructionSourcePath==="instructions/system.md"&&!l.has(a),f=l.get(a)??(p?"instructions/system.md":void 0),S=r.kind==="workflow"?`workflows/${r.workflowId}/`:r.kind==="agent"?a.split("/").slice(0,2).join("/")+"/":n.posix.dirname(a)+"/",w=f?n.posix.dirname(f)+"/":null;if(r.kind==="workflow"&&!f&&(w=S),r.kind==="agent"){let t=e.profile.agents.find(o=>a.startsWith(`agents/${o.id}/`));if(!t)throw new Error("The selected Agent original source is unavailable.");let c=y(t.path);w=((await s.lstat(n.join(e.source,c))).isDirectory()?c:n.posix.dirname(c))+"/"}let E=new Map(e.base.sourceFiles.map(t=>[t.path,t])),x=new Map(e.candidate.sourceFiles.map(t=>[t.path,t])),g=new Map;for(let t of new Set([...E.keys(),...x.keys()])){let c=E.get(t),m=x.get(t);if(c?.asset.contentHash===m?.asset.contentHash)continue;if(c&&c.asset.visibility!=="policy"||m&&m.asset.visibility!=="policy")throw new Error("A candidate cannot change protected Profile source.");let o=l.get(t)??(p&&t===a?f:void 0);if(!o&&t.startsWith(S)&&w&&(o=w+t.slice(S.length)),!o&&t==="workflows/catalog.json"&&[...l.keys()].some(P=>/^workflows\/[^/]+\/(PROMPT\.md|ACTION\.json)$/.test(P))||!o&&t==="dependency-lock/profile-import.json")continue;if(!o)throw new Error(`The selected component has no original Profile source mapping: ${t}`);if(o=y(o),o!==f&&!(r.kind!=="instruction"&&w&&o.startsWith(w)))throw new Error("Candidate patch changes a different original Profile component.");if(H(o))throw new Error("Candidate patch crosses the protected Profile evaluation closure.");let u=g.get(o),d=m?.bytes??null;if(u&&(u.before!==(c?.asset.contentHash??null)||b(u.bytes===null?null:Array.from(u.bytes))!==b(d===null?null:Array.from(d))))throw new Error("Public component aliases disagree on the original source edit.");g.set(o,{before:p&&t===a?null:c?.asset.contentHash??null,bytes:d})}for(let[t,c]of g){let m=n.join(e.source,...t.split("/")),o=n.dirname(m);for(;!await s.stat(o).catch(()=>null);)o=n.dirname(o);let u=n.relative(await s.realpath(e.source),await s.realpath(o));if(u.startsWith("..")||n.isAbsolute(u))throw new Error("Candidate patch escapes the staged Profile source.");let d=await s.lstat(m).catch(()=>null);if(d?.isSymbolicLink()||d&&!d.isFile())throw new Error("Original source patch needs a regular file.");let P=d?await s.readFile(m):null;if((P?k(P):null)!==c.before)throw new Error("Original source bytes differ from the exact candidate baseline.");c.bytes===null?await s.rm(m):(await s.mkdir(n.dirname(m),{recursive:!0}),await s.writeFile(m,c.bytes,{mode:d?.mode??384}))}return[...g.keys()]}h(pe,"applyCandidateProfileSource");function fe(e){let i=e.base.manifest.metadata.profileRepositoryId;return R({storeDir:e.storeDir,workspaceId:e.state.ownerWorkspaceId,name:e.base.manifest.name,profile:e.profile,sourceRevision:e.sourceRevision,...typeof i=="string"?{repositoryId:i}:{}})}h(fe,"compileOriginalCandidateProfile");export{v as a,j as b,ce as c,me as d,pe as e,fe as f};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as me,b as he,d as ye,e as D}from"./chunk-4N4EH3RJ.js";import{a as L,b as ge,c as Pe,d as we,e as Oe}from"./chunk-GY7YSD6J.js";import{j as xe}from"./chunk-KUE46HTH.js";import{d as N,e as E}from"./chunk-JCLTFDVW.js";import{E as ae,h as re}from"./chunk-2MEOUS24.js";import{d as Ae}from"./chunk-HNQPEOJD.js";import{a}from"./chunk-FTQLQJQV.js";var Le=new URL(E).hostname,be=new URL(N).hostname,$e=`${E}/opchat/v1`;function l(e){if(!e)return null;let t=e.trim();return t?t.replace(/\/+$/,""):null}a(l,"normalizeBaseUrl");function X(e){let t=l(e);if(!t)return null;try{let o=new URL(t).hostname.toLowerCase();if(o===Le)return E;if(o===be||o===`www.${be}`||o==="openpond.live"||o==="www.openpond.live")return E;if(o.startsWith("api."))return t}catch{return null}return null}a(X,"mapUiBaseToApiBase");function Y(e,t){let n=l(process.env.OPENPOND_API_URL);if(n)return n;let o=l(e?.apiBaseUrl);if(o)return o;let r=l(t.apiBaseUrl);if(r)return r;let s=X(process.env.OPENPOND_BASE_URL);return s||(X(e?.baseUrl||t.baseUrl)??E)}a(Y,"resolvePublicApiBaseUrl");function Q(e,t,n){return He(e,t,n)}a(Q,"resolveHostedChatApiBaseUrl");function He(e,t,n){let o=typeof process<"u"?process.env:{};return J(o.OPENPOND_OPCHAT_API_URL)??J(e?.chatApiBaseUrl??t.chatApiBaseUrl)??J(o.OPENPOND_CHAT_API_URL)??Me(n)}a(He,"resolveOpChatApiBaseUrl");function J(e){let t=l(e);if(!t)return null;try{let n=new URL(t),o=n.pathname.split("/").filter(Boolean),r=o.findIndex(i=>i.toLowerCase()==="opchat");return r>=0?(n.pathname=`/${[...o.slice(0,r+1),"v1"].join("/")}`,n.search="",n.hash="",l(n.toString())??null):o.findIndex(i=>i.toLowerCase()==="v1")>=0?(n.pathname="/opchat/v1",n.search="",n.hash="",l(n.toString())??null):(n.pathname=`${n.pathname.replace(/\/+$/,"")}/opchat/v1`.replace(/\/{2,}/g,"/"),n.search="",n.hash="",l(n.toString())??null)}catch{return null}}a(J,"normalizeOpChatApiBaseUrl");function Me(e){return J(e)??$e}a(Me,"opChatBaseFromPublicApiBase");function $(e){return e?.trim()?e.trim():"production"}a($,"deriveEnvironment");function Z(e,t=process.env){let n=[e?.apiKey,e?.session?.token,e?.token,t.OPENPOND_API_KEY];for(let o of n){let r=typeof o=="string"?o.trim():"";if(r)return r}return null}a(Z,"accountToken");function P(e,t){return!!(e&&t&&e.toLowerCase()===t.toLowerCase())}a(P,"handleEquals");function b(e,t){return l(e)===l(t)}a(b,"baseUrlEquals");function q(e,t){return`${e?.trim().toLowerCase()||""}|${l(t)??"default"}`}a(q,"profileKey");function ee(e){return l(e?.baseUrl)}a(ee,"selectorBaseUrl");function v(e){let t=l(e.baseUrl);return t?{handle:e.handle,baseUrl:t}:{handle:e.handle}}a(v,"selectorFromAccount");function A(e){let t=typeof e?.handle=="string"?e.handle.trim():"";if(!t)return null;let n=l(e?.baseUrl);return n?{handle:t,baseUrl:n}:{handle:t}}a(A,"normalizeActiveProfile");function U(e,t){if(!P(e.handle,t.handle))return!1;let n=ee(t);return n?b(e.baseUrl,n):!l(e.baseUrl)}a(U,"accountMatchesSelector");function se(e,t){if(!P(e.handle,t.handle))return!1;let n=ee(t);return n?b(e.baseUrl,n):!l(e.baseUrl)}a(se,"profileMatchesSelector");function Ue(e,t,n){let o=Array.isArray(e.accounts)?e.accounts:[],r=t||process.env.OPENPOND_ACCOUNT?A({handle:t||process.env.OPENPOND_ACCOUNT||"",baseUrl:n??process.env.OPENPOND_BASE_URL??null}):A(e.activeProfile);if(r){let s=o.find(c=>U(c,r));if(s)return s;if(l(n??process.env.OPENPOND_BASE_URL))return null;let i=o.filter(c=>P(c.handle,r.handle));return i.length===1?i[0]??null:null}return o[0]?o[0]:null}a(Ue,"findActiveAccount");function ke(e){let t=Array.isArray(e.accounts)?e.accounts:[],n=A(e.activeProfile)??(t[0]?v(t[0]):null);return ie(t.map(o=>({handle:o.handle,baseUrl:l(o.baseUrl),apiBaseUrl:l(o.apiBaseUrl),chatApiBaseUrl:l(o.chatApiBaseUrl),environment:$(o.environment),isActive:n?U(o,n):!1,hasApiKey:!!o.apiKey?.trim(),hasSessionToken:!!(o.session?.token?.trim()||o.token?.trim()),sessionAppId:o.session?.appId??null,sessionConversationId:o.session?.conversationId??null})))}a(ke,"fallbackProfilesFromConfig");function ie(e){let t=new Map;for(let n of e){let o=l(n.baseUrl),r=`${n.handle.toLowerCase()}|${o??"default"}`,s={...n,baseUrl:o,apiBaseUrl:l(n.apiBaseUrl),chatApiBaseUrl:l(n.chatApiBaseUrl),environment:$(n.environment),isActive:n.isActive},i=t.get(r);(!i||s.isActive&&!i.isActive||s.hasApiKey&&!i.hasApiKey)&&t.set(r,s)}return Array.from(t.values())}a(ie,"normalizeProfiles");function Ee(e){return e.hasApiKey||e.hasSessionToken?"signed_in":"signed_out"}a(Ee,"profileAuthHealth");function ze(e,t){return e?{reachable:e.reachable,authenticated:e.authenticated,apiBase:e.apiBase||t,latencyMs:e.latencyMs,status:e.status,service:e.service,checkedAt:e.checkedAt,error:e.error??null}:null}a(ze,"normalizeHealth");function _e(e){let t=e?.account;return t?{id:t.id??null,email:t.email??null,name:t.name??null,handle:t.handle??null,image:t.image??null,timezone:t.timezone??null,isAdmin:t.isAdmin??null,isVerified:t.isVerified??null,dailyAgentAppId:t.dailyAgentAppId??null,dailyAgentDeploymentId:t.dailyAgentDeploymentId??null,credits:t.credits??null}:null}a(_e,"normalizeProfile");function Fe(e){return(e??[]).map(t=>({...t,id:t.id||t.userProductId||t.openPondProductId||t.name,name:t.name,type:t.type,status:t.status,isActive:t.isActive??null,price:t.price??null,currency:t.currency??null,credits:t.credits??null}))}a(Fe,"normalizeProducts");function je(e){return e.handle.trim().toLowerCase()==="default"&&!l(e.baseUrl)&&!e.hasApiKey&&!e.hasSessionToken}a(je,"isEmptyDefaultProfile");function Ke(e){let t=e?.trim();return t?t.length>=12?`\u2022\u2022\u2022\u2022\u2022\u2022${t.slice(-6)}`:"\u2022\u2022\u2022\u2022\u2022\u2022":null}a(Ke,"apiKeyHint");function qe(e){return e?.auth?.authType!=="openpond-api-key"||!e.auth.keyAccess?null:{ownerType:e.auth.keyAccess.ownerType,teamId:e.auth.keyAccess.teamId,scopes:e.auth.scopes}}a(qe,"apiKeyAccess");function H(e){let{config:t,profiles:n,account:o,token:r,apiBaseUrl:s,accountResponse:i,accountProfiles:c,health:m,authFailed:g,error:f}=e,w=Q(o,t,s),h=_e(i??null),C=A(t.activeProfile),B=(o?v(o):null)??C,O=h?.handle||o?.handle||B?.handle||null,I=(B?n.find(p=>se(p,B)):null)??n.find(p=>p.isActive)??null,y=g?"auth_error":r?"signed_in":"signed_out",d=h?.name||h?.handle||h?.email||O||"Signed out",R=l(I?.baseUrl||o?.baseUrl||N),k=$(I?.environment||o?.environment),x=A(B)??(O?A({handle:O,baseUrl:I?.baseUrl??o?.baseUrl}):null),j=(n.length>0?n:O?[{handle:O,baseUrl:ee(x)??l(o?.baseUrl),apiBaseUrl:s,chatApiBaseUrl:w,environment:k,isActive:!0,hasApiKey:!!r,hasSessionToken:!1,sessionAppId:null,sessionConversationId:null}]:[]).filter(p=>!je(p));return{state:y,activeProfile:x,label:d,email:h?.email??null,avatarUrl:h?.image??null,environment:k,baseUrl:R,apiBaseUrl:s,chatApiBaseUrl:w,creditsLabel:h?.credits??null,profile:h,products:Fe(i?.products),apiHealth:ze(m??null,s),accounts:j.map(p=>{let T=l(p.baseUrl),De=t.accounts?.find(fe=>P(fe.handle,p.handle)&&b(fe.baseUrl,T)),oe=c?.[q(p.handle,T)]??null,K=_e(oe?.response??null);return{handle:p.handle,baseUrl:T,apiBaseUrl:l(p.apiBaseUrl),chatApiBaseUrl:l(p.chatApiBaseUrl),environment:$(p.environment),isActive:x?se(p,x):!1,authHealth:oe?.authFailed?"auth_error":Ee(p),displayLabel:K?.name||K?.handle||K?.email||p.handle,email:K?.email??null,avatarUrl:K?.image??null,apiKeyHint:Ke(De?.apiKey),apiKeyAccess:qe(oe?.response??null)}}),error:f??m?.error??null}}a(H,"toAccountState");async function Ge(e){try{return ie(await Pe())}catch{return ke(e)}}a(Ge,"loadProfiles");async function u(e,t){let n=await ge(),o=await Ge(n),r=Ue(n,e,t),s=Z(r),i=Y(r,n),c=Q(r,n,i);return{config:n,profiles:o,account:r,token:s,apiBaseUrl:i,chatApiBaseUrl:c,accountState:H({config:n,profiles:o,account:r,token:s,apiBaseUrl:i})}}a(u,"loadOpenPondAccountContext");async function We(e){let t=l(e.baseUrl);return await we(e.handle,{baseUrl:t}),u(e.handle,t)}a(We,"switchOpenPondAccount");import{createHash as Ve}from"node:crypto";function le(e){return Ve("sha256").update(JSON.stringify([e.accountState.activeProfile,e.apiBaseUrl,e.chatApiBaseUrl,e.token])).digest("hex")}a(le,"authorityKey");var G=null,M=null;async function Je(e){let t=le(e);if(G?.key===t&&G.expiresAt>Date.now())return G.response;if(M?.key===t)return M.promise;G=null;let n={key:t,promise:D(e.apiBaseUrl,e.token)};M=n;try{let o=await n.promise;return M===n&&o.account?.id&&(G={key:t,response:o,expiresAt:Date.now()+5e3}),o}finally{M===n&&(M=null)}}a(Je,"authenticate");async function Xe(){let e=await u();if(!e.token)return e;let t=await Je(e),n=await u();if(le(n)!==le(e))throw new Error("openpond_account_authority_changed");if(!t.account?.id)throw new Error("openpond_authenticated_owner_unavailable");return{...n,accountState:H({...n,accountResponse:t})}}a(Xe,"loadAuthenticatedOpenPondAccountContext");import{randomUUID as Ye}from"node:crypto";function z(e){return e instanceof Error?e.message:String(e)}a(z,"errorMessage");var Qe=15e3;function Ze(e){return e===ae?"OpenPond Chat":e==="deepseek-v4-flash"?"DeepSeek V4 Flash":e.replace(/[-_/]+/g," ")}a(Ze,"displayNameForHostedModel");function et(e){let t=typeof e.id=="string"?e.id:null;return t?{id:t,displayName:Ze(t),ownedBy:typeof e.owned_by=="string"?e.owned_by:null,streaming:!0,raw:e}:null}a(et,"normalizeHostedModel");async function tt(){let e=await u();if(!e.token)return{models:[],error:"No OpenPond API key or session token is configured."};try{return{models:(await rt({apiBaseUrl:e.chatApiBaseUrl,token:e.token})).data.map(o=>et(o)).filter(o=>!!o),error:null}}catch(t){return{models:[],error:z(t)}}}a(tt,"loadOpenPondHostedModels");async function nt(){let e=await u();if(!e.token)return{catalog:null,error:"No OpenPond API key or session token is configured."};let t=new AbortController,n=setTimeout(()=>{t.abort(new Error("OpenPond provider catalog request timed out."))},Qe);try{return{catalog:await Se({apiBaseUrl:e.chatApiBaseUrl,token:e.token,signal:t.signal}),error:null}}catch(o){return{catalog:null,error:z(o)}}finally{clearTimeout(n)}}a(nt,"loadOpenPondProviderCatalog");async function*ot(e){let t=await u();if(!t.token)throw new Error("OpenPond is signed out. Add an account in Settings before using OpenPond Chat.");yield*Ce({apiBaseUrl:t.chatApiBaseUrl,token:t.token,model:e.model||ae,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,requestId:e.requestId,reasoningEffort:e.reasoningEffort,maxTokens:e.maxTokens,temperature:e.temperature,topP:e.topP,signal:e.signal})}a(ot,"streamOpenPondHostedChatTurn");async function rt(e){let t=ce(e.apiBaseUrl,"models"),n=await fetch(t,{method:"GET",headers:ue(e.token,"application/json"),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat model list failed: ${n.status} ${await de(n)}`);return await n.json()}a(rt,"listOpChatModels");async function Se(e){let t=ce(e.apiBaseUrl,"provider-catalog"),n=await fetch(t,{method:"GET",headers:ue(e.token,"application/json"),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat provider catalog failed: ${n.status} ${await de(n)}`);let o=await n.json();return!o||typeof o!="object"||!Array.isArray(o.providers)?re.parse(o):re.parse({...o,providers:o.providers.filter(r=>r!==null&&typeof r=="object"&&Ae.safeParse(r.id).success)})}a(Se,"listOpChatProviderCatalog");async function*Ce(e){let t=ce(e.apiBaseUrl,"chat/completions"),n=await fetch(t,{method:"POST",headers:ue(e.token,"text/event-stream",e.requestId),body:JSON.stringify(ut(e,!0)),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat request failed: ${n.status} ${await de(n)}`);if(!n.body)throw new Error("OpenPond OpChat request failed: streaming response body is missing.");let o=new Map,r=!1,s=null,i={},c="",m=null,g=at(n.headers),f=n.body.getReader(),w=new TextDecoder,h="",C=[],ne=a(()=>{if(C.length===0)return[];let y=C.join(`
|
|
2
|
+
import{a as me,b as he,d as ye,e as D}from"./chunk-EJOV6Z6F.js";import{a as L,b as ge,c as Pe,d as we,e as Oe}from"./chunk-GY7YSD6J.js";import{j as xe}from"./chunk-KUE46HTH.js";import{d as N,e as E}from"./chunk-MZKCW6CB.js";import{E as ae,h as re}from"./chunk-2MEOUS24.js";import{d as Ae}from"./chunk-HNQPEOJD.js";import{a}from"./chunk-FTQLQJQV.js";var Le=new URL(E).hostname,be=new URL(N).hostname,$e=`${E}/opchat/v1`;function l(e){if(!e)return null;let t=e.trim();return t?t.replace(/\/+$/,""):null}a(l,"normalizeBaseUrl");function X(e){let t=l(e);if(!t)return null;try{let o=new URL(t).hostname.toLowerCase();if(o===Le)return E;if(o===be||o===`www.${be}`||o==="openpond.live"||o==="www.openpond.live")return E;if(o.startsWith("api."))return t}catch{return null}return null}a(X,"mapUiBaseToApiBase");function Y(e,t){let n=l(process.env.OPENPOND_API_URL);if(n)return n;let o=l(e?.apiBaseUrl);if(o)return o;let r=l(t.apiBaseUrl);if(r)return r;let s=X(process.env.OPENPOND_BASE_URL);return s||(X(e?.baseUrl||t.baseUrl)??E)}a(Y,"resolvePublicApiBaseUrl");function Q(e,t,n){return He(e,t,n)}a(Q,"resolveHostedChatApiBaseUrl");function He(e,t,n){let o=typeof process<"u"?process.env:{};return J(o.OPENPOND_OPCHAT_API_URL)??J(e?.chatApiBaseUrl??t.chatApiBaseUrl)??J(o.OPENPOND_CHAT_API_URL)??Me(n)}a(He,"resolveOpChatApiBaseUrl");function J(e){let t=l(e);if(!t)return null;try{let n=new URL(t),o=n.pathname.split("/").filter(Boolean),r=o.findIndex(i=>i.toLowerCase()==="opchat");return r>=0?(n.pathname=`/${[...o.slice(0,r+1),"v1"].join("/")}`,n.search="",n.hash="",l(n.toString())??null):o.findIndex(i=>i.toLowerCase()==="v1")>=0?(n.pathname="/opchat/v1",n.search="",n.hash="",l(n.toString())??null):(n.pathname=`${n.pathname.replace(/\/+$/,"")}/opchat/v1`.replace(/\/{2,}/g,"/"),n.search="",n.hash="",l(n.toString())??null)}catch{return null}}a(J,"normalizeOpChatApiBaseUrl");function Me(e){return J(e)??$e}a(Me,"opChatBaseFromPublicApiBase");function $(e){return e?.trim()?e.trim():"production"}a($,"deriveEnvironment");function Z(e,t=process.env){let n=[e?.apiKey,e?.session?.token,e?.token,t.OPENPOND_API_KEY];for(let o of n){let r=typeof o=="string"?o.trim():"";if(r)return r}return null}a(Z,"accountToken");function P(e,t){return!!(e&&t&&e.toLowerCase()===t.toLowerCase())}a(P,"handleEquals");function b(e,t){return l(e)===l(t)}a(b,"baseUrlEquals");function q(e,t){return`${e?.trim().toLowerCase()||""}|${l(t)??"default"}`}a(q,"profileKey");function ee(e){return l(e?.baseUrl)}a(ee,"selectorBaseUrl");function v(e){let t=l(e.baseUrl);return t?{handle:e.handle,baseUrl:t}:{handle:e.handle}}a(v,"selectorFromAccount");function A(e){let t=typeof e?.handle=="string"?e.handle.trim():"";if(!t)return null;let n=l(e?.baseUrl);return n?{handle:t,baseUrl:n}:{handle:t}}a(A,"normalizeActiveProfile");function U(e,t){if(!P(e.handle,t.handle))return!1;let n=ee(t);return n?b(e.baseUrl,n):!l(e.baseUrl)}a(U,"accountMatchesSelector");function se(e,t){if(!P(e.handle,t.handle))return!1;let n=ee(t);return n?b(e.baseUrl,n):!l(e.baseUrl)}a(se,"profileMatchesSelector");function Ue(e,t,n){let o=Array.isArray(e.accounts)?e.accounts:[],r=t||process.env.OPENPOND_ACCOUNT?A({handle:t||process.env.OPENPOND_ACCOUNT||"",baseUrl:n??process.env.OPENPOND_BASE_URL??null}):A(e.activeProfile);if(r){let s=o.find(c=>U(c,r));if(s)return s;if(l(n??process.env.OPENPOND_BASE_URL))return null;let i=o.filter(c=>P(c.handle,r.handle));return i.length===1?i[0]??null:null}return o[0]?o[0]:null}a(Ue,"findActiveAccount");function ke(e){let t=Array.isArray(e.accounts)?e.accounts:[],n=A(e.activeProfile)??(t[0]?v(t[0]):null);return ie(t.map(o=>({handle:o.handle,baseUrl:l(o.baseUrl),apiBaseUrl:l(o.apiBaseUrl),chatApiBaseUrl:l(o.chatApiBaseUrl),environment:$(o.environment),isActive:n?U(o,n):!1,hasApiKey:!!o.apiKey?.trim(),hasSessionToken:!!(o.session?.token?.trim()||o.token?.trim()),sessionAppId:o.session?.appId??null,sessionConversationId:o.session?.conversationId??null})))}a(ke,"fallbackProfilesFromConfig");function ie(e){let t=new Map;for(let n of e){let o=l(n.baseUrl),r=`${n.handle.toLowerCase()}|${o??"default"}`,s={...n,baseUrl:o,apiBaseUrl:l(n.apiBaseUrl),chatApiBaseUrl:l(n.chatApiBaseUrl),environment:$(n.environment),isActive:n.isActive},i=t.get(r);(!i||s.isActive&&!i.isActive||s.hasApiKey&&!i.hasApiKey)&&t.set(r,s)}return Array.from(t.values())}a(ie,"normalizeProfiles");function Ee(e){return e.hasApiKey||e.hasSessionToken?"signed_in":"signed_out"}a(Ee,"profileAuthHealth");function ze(e,t){return e?{reachable:e.reachable,authenticated:e.authenticated,apiBase:e.apiBase||t,latencyMs:e.latencyMs,status:e.status,service:e.service,checkedAt:e.checkedAt,error:e.error??null}:null}a(ze,"normalizeHealth");function _e(e){let t=e?.account;return t?{id:t.id??null,email:t.email??null,name:t.name??null,handle:t.handle??null,image:t.image??null,timezone:t.timezone??null,isAdmin:t.isAdmin??null,isVerified:t.isVerified??null,dailyAgentAppId:t.dailyAgentAppId??null,dailyAgentDeploymentId:t.dailyAgentDeploymentId??null,credits:t.credits??null}:null}a(_e,"normalizeProfile");function Fe(e){return(e??[]).map(t=>({...t,id:t.id||t.userProductId||t.openPondProductId||t.name,name:t.name,type:t.type,status:t.status,isActive:t.isActive??null,price:t.price??null,currency:t.currency??null,credits:t.credits??null}))}a(Fe,"normalizeProducts");function je(e){return e.handle.trim().toLowerCase()==="default"&&!l(e.baseUrl)&&!e.hasApiKey&&!e.hasSessionToken}a(je,"isEmptyDefaultProfile");function Ke(e){let t=e?.trim();return t?t.length>=12?`\u2022\u2022\u2022\u2022\u2022\u2022${t.slice(-6)}`:"\u2022\u2022\u2022\u2022\u2022\u2022":null}a(Ke,"apiKeyHint");function qe(e){return e?.auth?.authType!=="openpond-api-key"||!e.auth.keyAccess?null:{ownerType:e.auth.keyAccess.ownerType,teamId:e.auth.keyAccess.teamId,scopes:e.auth.scopes}}a(qe,"apiKeyAccess");function H(e){let{config:t,profiles:n,account:o,token:r,apiBaseUrl:s,accountResponse:i,accountProfiles:c,health:m,authFailed:g,error:f}=e,w=Q(o,t,s),h=_e(i??null),C=A(t.activeProfile),B=(o?v(o):null)??C,O=h?.handle||o?.handle||B?.handle||null,I=(B?n.find(p=>se(p,B)):null)??n.find(p=>p.isActive)??null,y=g?"auth_error":r?"signed_in":"signed_out",d=h?.name||h?.handle||h?.email||O||"Signed out",R=l(I?.baseUrl||o?.baseUrl||N),k=$(I?.environment||o?.environment),x=A(B)??(O?A({handle:O,baseUrl:I?.baseUrl??o?.baseUrl}):null),j=(n.length>0?n:O?[{handle:O,baseUrl:ee(x)??l(o?.baseUrl),apiBaseUrl:s,chatApiBaseUrl:w,environment:k,isActive:!0,hasApiKey:!!r,hasSessionToken:!1,sessionAppId:null,sessionConversationId:null}]:[]).filter(p=>!je(p));return{state:y,activeProfile:x,label:d,email:h?.email??null,avatarUrl:h?.image??null,environment:k,baseUrl:R,apiBaseUrl:s,chatApiBaseUrl:w,creditsLabel:h?.credits??null,profile:h,products:Fe(i?.products),apiHealth:ze(m??null,s),accounts:j.map(p=>{let T=l(p.baseUrl),De=t.accounts?.find(fe=>P(fe.handle,p.handle)&&b(fe.baseUrl,T)),oe=c?.[q(p.handle,T)]??null,K=_e(oe?.response??null);return{handle:p.handle,baseUrl:T,apiBaseUrl:l(p.apiBaseUrl),chatApiBaseUrl:l(p.chatApiBaseUrl),environment:$(p.environment),isActive:x?se(p,x):!1,authHealth:oe?.authFailed?"auth_error":Ee(p),displayLabel:K?.name||K?.handle||K?.email||p.handle,email:K?.email??null,avatarUrl:K?.image??null,apiKeyHint:Ke(De?.apiKey),apiKeyAccess:qe(oe?.response??null)}}),error:f??m?.error??null}}a(H,"toAccountState");async function Ge(e){try{return ie(await Pe())}catch{return ke(e)}}a(Ge,"loadProfiles");async function u(e,t){let n=await ge(),o=await Ge(n),r=Ue(n,e,t),s=Z(r),i=Y(r,n),c=Q(r,n,i);return{config:n,profiles:o,account:r,token:s,apiBaseUrl:i,chatApiBaseUrl:c,accountState:H({config:n,profiles:o,account:r,token:s,apiBaseUrl:i})}}a(u,"loadOpenPondAccountContext");async function We(e){let t=l(e.baseUrl);return await we(e.handle,{baseUrl:t}),u(e.handle,t)}a(We,"switchOpenPondAccount");import{createHash as Ve}from"node:crypto";function le(e){return Ve("sha256").update(JSON.stringify([e.accountState.activeProfile,e.apiBaseUrl,e.chatApiBaseUrl,e.token])).digest("hex")}a(le,"authorityKey");var G=null,M=null;async function Je(e){let t=le(e);if(G?.key===t&&G.expiresAt>Date.now())return G.response;if(M?.key===t)return M.promise;G=null;let n={key:t,promise:D(e.apiBaseUrl,e.token)};M=n;try{let o=await n.promise;return M===n&&o.account?.id&&(G={key:t,response:o,expiresAt:Date.now()+5e3}),o}finally{M===n&&(M=null)}}a(Je,"authenticate");async function Xe(){let e=await u();if(!e.token)return e;let t=await Je(e),n=await u();if(le(n)!==le(e))throw new Error("openpond_account_authority_changed");if(!t.account?.id)throw new Error("openpond_authenticated_owner_unavailable");return{...n,accountState:H({...n,accountResponse:t})}}a(Xe,"loadAuthenticatedOpenPondAccountContext");import{randomUUID as Ye}from"node:crypto";function z(e){return e instanceof Error?e.message:String(e)}a(z,"errorMessage");var Qe=15e3;function Ze(e){return e===ae?"OpenPond Chat":e==="deepseek-v4-flash"?"DeepSeek V4 Flash":e.replace(/[-_/]+/g," ")}a(Ze,"displayNameForHostedModel");function et(e){let t=typeof e.id=="string"?e.id:null;return t?{id:t,displayName:Ze(t),ownedBy:typeof e.owned_by=="string"?e.owned_by:null,streaming:!0,raw:e}:null}a(et,"normalizeHostedModel");async function tt(){let e=await u();if(!e.token)return{models:[],error:"No OpenPond API key or session token is configured."};try{return{models:(await rt({apiBaseUrl:e.chatApiBaseUrl,token:e.token})).data.map(o=>et(o)).filter(o=>!!o),error:null}}catch(t){return{models:[],error:z(t)}}}a(tt,"loadOpenPondHostedModels");async function nt(){let e=await u();if(!e.token)return{catalog:null,error:"No OpenPond API key or session token is configured."};let t=new AbortController,n=setTimeout(()=>{t.abort(new Error("OpenPond provider catalog request timed out."))},Qe);try{return{catalog:await Se({apiBaseUrl:e.chatApiBaseUrl,token:e.token,signal:t.signal}),error:null}}catch(o){return{catalog:null,error:z(o)}}finally{clearTimeout(n)}}a(nt,"loadOpenPondProviderCatalog");async function*ot(e){let t=await u();if(!t.token)throw new Error("OpenPond is signed out. Add an account in Settings before using OpenPond Chat.");yield*Ce({apiBaseUrl:t.chatApiBaseUrl,token:t.token,model:e.model||ae,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,requestId:e.requestId,reasoningEffort:e.reasoningEffort,maxTokens:e.maxTokens,temperature:e.temperature,topP:e.topP,signal:e.signal})}a(ot,"streamOpenPondHostedChatTurn");async function rt(e){let t=ce(e.apiBaseUrl,"models"),n=await fetch(t,{method:"GET",headers:ue(e.token,"application/json"),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat model list failed: ${n.status} ${await de(n)}`);return await n.json()}a(rt,"listOpChatModels");async function Se(e){let t=ce(e.apiBaseUrl,"provider-catalog"),n=await fetch(t,{method:"GET",headers:ue(e.token,"application/json"),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat provider catalog failed: ${n.status} ${await de(n)}`);let o=await n.json();return!o||typeof o!="object"||!Array.isArray(o.providers)?re.parse(o):re.parse({...o,providers:o.providers.filter(r=>r!==null&&typeof r=="object"&&Ae.safeParse(r.id).success)})}a(Se,"listOpChatProviderCatalog");async function*Ce(e){let t=ce(e.apiBaseUrl,"chat/completions"),n=await fetch(t,{method:"POST",headers:ue(e.token,"text/event-stream",e.requestId),body:JSON.stringify(ut(e,!0)),signal:e.signal});if(!n.ok)throw new Error(`OpenPond OpChat request failed: ${n.status} ${await de(n)}`);if(!n.body)throw new Error("OpenPond OpChat request failed: streaming response body is missing.");let o=new Map,r=!1,s=null,i={},c="",m=null,g=at(n.headers),f=n.body.getReader(),w=new TextDecoder,h="",C=[],ne=a(()=>{if(C.length===0)return[];let y=C.join(`
|
|
3
3
|
`);if(C=[],y==="[DONE]")return r=!0,[];let d;try{d=JSON.parse(y)}catch{throw new Error("OpenPond OpChat request failed: malformed streaming event.")}if(d&&typeof d=="object"&&"error"in d)throw new Error(`OpenPond OpChat request failed: ${Ie(d)}`);i=d;let R=d&&typeof d=="object"?d:{},k=Array.isArray(R.choices)?R.choices:[],x=k[0]&&typeof k[0]=="object"?k[0]:{},V=x.delta&&typeof x.delta=="object"?x.delta:{},j=[],p=ve(V.reasoning_content);p&&(c+=p,j.push({type:"reasoning_delta",text:p,raw:d}));let T=ve(V.content);return T&&j.push({type:"text_delta",text:T,raw:d}),lt(o,V.tool_calls),s=F(x.finish_reason)??s,m=ft(d)??m,j},"consumeEvent"),B=a(y=>{let d=y.endsWith("\r")?y.slice(0,-1):y;return d?d.startsWith(":")?[]:(d.startsWith("data:")&&C.push(d.slice(5).trimStart()),[]):ne()},"consumeLine");try{for(;;){let y=await f.read();if(y.done)break;h+=w.decode(y.value,{stream:!0});let d=h.split(`
|
|
4
4
|
`);h=d.pop()??"";for(let R of d)for(let k of B(R))yield k}if(h+=w.decode(),h)for(let y of B(h))yield y;for(let y of ne())yield y}finally{f.releaseLock()}if(!r)throw new Error("OpenPond OpChat request failed: stream ended before [DONE].");let O=ct(o);O.length>0&&(yield{type:"tool_call_delta",toolCalls:O,raw:i}),O.length>0&&c&&(yield{type:"continuation",continuation:{kind:"chat_completions_reasoning",reasoningContent:c},raw:i});let I=st(m,g);I&&(yield{type:"usage",usage:I,raw:i}),yield{type:"finish",finishReason:s,raw:i}}a(Ce,"streamOpChatChatCompletion");function at(e){let t=Be(e,["fireworks-prompt-tokens","prompt-tokens"]),n=Be(e,["fireworks-cached-prompt-tokens","cached-prompt-tokens"]);return n===null?null:{...t===null?{}:{prompt_tokens:t},cached_input_tokens:n,cache_telemetry_source:"provider_response_headers"}}a(at,"cacheUsageFromResponseHeaders");function Be(e,t){for(let n of t){let o=e.get(n);if(o===null||!/^\d+$/.test(o.trim()))continue;let r=Number(o);if(Number.isSafeInteger(r)&&r>=0)return r}return null}a(Be,"firstHeaderTokenCount");function st(e,t){if(!t||it(e))return e;let n={...e??{},cached_input_tokens:t.cached_input_tokens,cache_telemetry_source:"provider_response_headers"};return _(e?.prompt_tokens)===null&&t.prompt_tokens!==void 0&&(n.prompt_tokens=t.prompt_tokens),n}a(st,"usageWithResponseHeaderCache");function it(e){return e?_(e.cached_input_tokens)!==null||_(e.cache_read_input_tokens)!==null||_(e.cache_creation_input_tokens)!==null||_(e.prompt_cache_hit_tokens)!==null||_(e.prompt_cache_miss_tokens)!==null?!0:_(e.prompt_tokens_details?.cached_tokens)!==null||_(e.input_tokens_details?.cached_tokens)!==null:!1}a(it,"usageHasCacheTelemetry");function _(e){if(typeof e=="number"&&Number.isSafeInteger(e)&&e>=0)return e;if(typeof e!="string"||!/^\d+$/.test(e.trim()))return null;let t=Number(e);return Number.isSafeInteger(t)?t:null}a(_,"usageTokenCount");function lt(e,t){Array.isArray(t)&&t.forEach((n,o)=>{if(!n||typeof n!="object")return;let r=n,s=typeof r.index=="number"&&Number.isInteger(r.index)?r.index:o,i=e.get(s)??{arguments:""};typeof r.id=="string"&&(i.id=r.id);let c=r.function&&typeof r.function=="object"?r.function:{};typeof c.name=="string"&&(i.name=`${i.name??""}${c.name}`),typeof c.arguments=="string"&&(i.arguments+=c.arguments),e.set(s,i)})}a(lt,"mergeOpChatToolCallDeltas");function ct(e){return[...e.entries()].sort(([t],[n])=>t-n).flatMap(([,t])=>t.id&&t.name?[{id:t.id,type:"function",function:{name:t.name,arguments:t.arguments}}]:[])}a(ct,"completedOpChatToolCalls");function ut(e,t){let n={model:e.model,messages:e.messages.map(pt),stream:t};return e.tools&&(n.tools=e.tools),e.toolChoice!==void 0&&(n.tool_choice=e.toolChoice),typeof e.maxTokens=="number"&&(n.max_tokens=e.maxTokens),typeof e.temperature=="number"&&(n.temperature=e.temperature),typeof e.topP=="number"&&(n.top_p=e.topP),Object.assign(n,dt(e.reasoningEffort)),n}a(ut,"buildOpChatBody");function dt(e){return e?e==="off"?{thinking:{type:"disabled"}}:{thinking:{type:"enabled"},reasoning_effort:e}:{}}a(dt,"opChatReasoningFields");function pt(e){let{continuation:t,images:n,...o}=e,r=n?.length?[...typeof e.content=="string"&&e.content.trim()?[{type:"text",text:e.content}]:[],...n.map(s=>({type:"image_url",image_url:{url:s.url,...s.detail?{detail:s.detail}:{}}}))]:e.content;return e.role==="assistant"&&t?.kind==="chat_completions_reasoning"?{...o,...r!==void 0?{content:r}:{},reasoning_content:t.reasoningContent}:{...o,...r!==void 0?{content:r}:{}}}a(pt,"opChatMessage");function ce(e,t){let n=e.trim().replace(/\/+$/,"");if(!n)throw new Error("OpenPond OpChat API base URL is required.");return`${n}/${t}`}a(ce,"opChatEndpointUrl");function ue(e,t,n){let o=e.trim();if(!o)throw new Error("OpenPond API key is required for OpChat.");let r=new Headers;r.set("Authorization",`Bearer ${o}`),r.set("Content-Type","application/json"),r.set("Accept",t),r.set("x-openpond-client","openpond-app");let s=n||Ye();return r.set("x-openpond-request-id",s),r.set("x-request-id",s),r}a(ue,"opChatHeaders");async function de(e){let t=await e.text().catch(()=>"");if(!t)return e.statusText||`HTTP ${e.status}`;try{return Ie(JSON.parse(t))}catch{return t}}a(de,"readOpChatError");function Ie(e){if(!e||typeof e!="object")return String(e||"unknown_error");let t=e,n=t.error;if(n&&typeof n=="object"){let o=n;return[F(o.code),F(o.type),F(o.message)].filter(Boolean).join(": ")}return[F(t.error),F(t.message)].filter(Boolean).join(": ")||JSON.stringify(e)}a(Ie,"errorMessageFromPayload");function ft(e){if(!e||typeof e!="object")return null;let t=e.usage;return!t||typeof t!="object"?null:t}a(ft,"parseUsage");function F(e){return typeof e=="string"&&e.trim()?e:null}a(F,"stringValue");function ve(e){return typeof e=="string"&&e.length>0?e:null}a(ve,"streamTextValue");import{readFileSync as mt}from"node:fs";var W;function ht(){if(W!==void 0)return W??"openpond-code bundled";try{let e=new URL("../package.json",import.meta.resolve("openpond")),t=JSON.parse(mt(e,"utf8"));W=typeof t.version=="string"?`openpond-code@${t.version}`:null}catch{W=null}return W??"openpond-code bundled"}a(ht,"getBundledRuntimeVersion");function yt(e,t){let n="",o=a(r=>{r.startsWith(e)&&t(JSON.parse(r.slice(e.length)))},"processLine");return{push(r){for(n+=r;;){let s=At(n);if(s<0)return;let i=n.slice(0,s).replace(/\r$/,""),c=n[s]==="\r"&&n[s+1]===`
|
|
5
5
|
`?2:1;n=n.slice(s+c),o(i)}},flush(){let r=n.trimEnd();n="",r&&o(r)}}}a(yt,"createReadyLineParser");function At(e){let t=e.indexOf(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{j as m}from"./chunk-C7NQPICU.js";import{j as l}from"./chunk-5HPZGLOL.js";import{A as t}from"./chunk-X2J2P5ZT.js";import{a as o}from"./chunk-FTQLQJQV.js";var v="evaluation-source.json",u=t.object({id:t.string().trim().min(1),clusterKey:t.string().trim().min(1),split:t.enum(["train","validation","frozen_eval"])}).passthrough(),h=t.object({schemaVersion:t.literal("openpond.trainingEvaluationSource.v1"),taskset:m,tasks:t.array(u).min(1).max(1e4),assets:t.array(t.object({path:t.string().trim().min(1).max(2e3),sha256:t.string().regex(/^[a-f0-9]{64}$/),sizeBytes:t.number().int().nonnegative(),encoding:t.literal("base64"),content:t.string().max(32*1024*1024)}).strict()).max(1e4)}).strict().superRefine((s,n)=>{let i=new Set;s.tasks.forEach((r,e)=>{r.split==="train"&&n.addIssue({code:"custom",path:["tasks",e,"split"],message:"Evaluation sources require held-out tasks."}),i.has(r.id)&&n.addIssue({code:"custom",path:["tasks",e,"id"],message:"Evaluation task identities must be unique."}),i.add(r.id)})});function k(s,n){let i=t.array(u).min(1).max(1e4).parse(s),r=t.array(u).min(1).max(1e4).parse(n),e=new Set,c=new Set;for(let a of i){if(a.split!=="train")throw new Error("The training population contains a held-out task.");if(e.has(a.id))throw new Error("Training task identities must be unique.");e.add(a.id),c.add(a.clusterKey)}let d=new Set;for(let a of r){if(a.split==="train")throw new Error("The evaluation population contains a training task.");if(d.has(a.id))throw new Error("Evaluation task identities must be unique.");if(e.has(a.id)||c.has(a.clusterKey))throw new Error("Training and evaluation tasks or families overlap.");d.add(a.id)}}o(k,"assertTrainingEvaluationIsolation");async function w(s){let n=h.parse(s),i=await l(n);return{taskset:n.taskset,dataset:{id:`training-evaluation-${i.slice(0,32)}`,contentHash:i}}}o(w,"trainingEvaluationSourceRef");export{v as a,h as b,k as c,w as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{B as T,k as c,l as i,o as f,t as S,w,z as x}from"./chunk-
|
|
2
|
+
import{B as T,k as c,l as i,o as f,t as S,w,z as x}from"./chunk-ZEOYNUHL.js";import{Wa as R}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as v}from"./chunk-FTQLQJQV.js";var p=e.string().trim().min(1).max(500),j=e.string().regex(/^[a-f0-9]{64}$/),y=e.object({id:p,revision:e.number().int().positive(),contentHash:j}).strict(),b=e.object({schemaVersion:e.literal("openpond.hostedTasksetSummary.v1"),id:p,teamId:p,release:y,name:e.string().min(1).max(500),description:e.string().max(2e4),taskCount:e.number().int().nonnegative(),buildIntent:e.string().min(1).max(100),methodHint:e.string().min(1).max(100).nullable(),packageBytes:e.number().int().nonnegative().nullable(),storedBytes:e.number().int().nonnegative().nullable(),createdAt:e.string().datetime({offset:!0})}).strict(),_=e.object({afterId:e.string().trim().min(1).max(2e3).optional(),limit:e.number().int().min(1).max(100).default(30),modelProjectId:p.optional(),projectId:p.optional(),search:e.string().trim().max(100).optional(),sort:e.enum(["id","name","updated"]).default("id")}).strict(),q=e.object({items:e.array(b).max(100),nextCursor:e.string().trim().min(1).max(2e3).nullable()}).strict(),B=e.object({code:e.string().min(1),message:e.string().min(1)}).strict(),l=class extends Error{static{v(this,"OpenPondTasksetCatalogError")}constructor(s,r,t){super(t),this.status=s,this.code=r,this.name="OpenPondTasksetCatalogError"}status;code},P=class{static{v(this,"OpenPondTasksetCatalogClient")}#e;constructor(s){if(!s.apiKey.trim()||!s.teamId.trim())throw new Error("Taskset API key and workspace are required.");let r=new URL(s.baseUrl);if(!["http:","https:"].includes(r.protocol)||r.username||r.password||r.search||r.hash)throw new Error("Taskset base URL must be an HTTP(S) endpoint without credentials, query, or fragment.");this.#e={...s,baseUrl:r.toString().replace(/\/+$/,"")}}async list(s={},r={}){let t=_.parse(s),a=new URLSearchParams({limit:String(t.limit)});t.afterId&&a.set("afterId",t.afterId),t.modelProjectId&&a.set("modelProjectId",t.modelProjectId),t.projectId&&a.set("projectId",t.projectId),t.search!==void 0&&a.set("search",t.search),a.set("sort",t.sort);let n=q.parse(await this.#t(`?${a}`,r.signal));if(n.items.length>t.limit||new Set(n.items.map(m=>m.id)).size!==n.items.length||n.items.some(m=>m.teamId!==this.#e.teamId))throw new l(502,"catalog_scope_mismatch","Taskset inventory did not match the requested workspace or page size.");return n}async get(s,r={}){let t=p.parse(s),a=b.parse(await this.#t(`/${encodeURIComponent(t)}`,r.signal));if(a.id!==t||a.teamId!==this.#e.teamId)throw new l(502,"catalog_identity_mismatch","Taskset metadata did not match the requested identity.");return a}async resolve(s,r={}){let t=y.parse(s),a=b.parse(await this.#t(`/releases/${encodeURIComponent(t.id)}/${t.revision}/${t.contentHash}`,r.signal));if(a.teamId!==this.#e.teamId||a.release.id!==t.id||a.release.revision!==t.revision||a.release.contentHash!==t.contentHash)throw new l(502,"catalog_release_mismatch","Taskset metadata did not match the requested immutable release.");return a}async#t(s,r){let t=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/taskset-catalog${s}`,{headers:{Authorization:`Bearer ${this.#e.apiKey}`,"X-OpenPond-Team-Id":this.#e.teamId,Accept:"application/json"},signal:r,redirect:"error"}),a=t.body?.getReader();if(!a)throw new l(t.status,"empty_response","Taskset catalog response was empty.");let n=new TextDecoder,m=0,g="";try{for(;;){let o=await a.read();if(o.done)break;if(m+=o.value.byteLength,m>4194304)throw new l(t.status,"response_too_large","Taskset catalog response exceeded 4 MiB.");g+=n.decode(o.value,{stream:!0})}g+=n.decode()}finally{await a.cancel(),a.releaseLock()}let I=JSON.parse(g);if(!t.ok){let o=B.safeParse(I);throw new l(t.status,o.success?o.data.code:"invalid_error_response",o.success?o.data.message:`Taskset catalog request failed (${t.status}).`)}return I}};var u=i.shape.id,V=e.object({schemaVersion:e.literal("openpond.modelBatchReviewInspection.v1"),packageHash:e.string().regex(/^[a-f0-9]{64}$/),definition:f,binding:R,evidence:e.array(w).min(1).max(1e4),decisions:e.array(T).min(1).max(1e4)}).strict(),k=e.object({schemaVersion:e.literal("openpond.modelBatchReviewRequest.v1"),operationId:u,modelId:u,expectedModelRevision:e.number().int().positive(),tasksetRef:i,rewardBindingRef:i.nullable(),definition:e.object({name:e.string().trim().min(1).max(500).optional(),instructions:e.string().trim().min(1).max(2e4).optional(),inputSchema:c.optional(),outputSchema:c.optional(),requiredOutputs:f.shape.requiredOutputs}).strict(),examples:e.array(e.object({evidence:i,input:c.optional(),expected:c.nullable().optional(),evaluatorContext:c.nullable().optional(),proposedTarget:c.nullable().optional()}).strict()).max(1e4)}).strict(),A=e.object({schemaVersion:e.literal("openpond.modelBatchReviewReceipt.v1"),operationId:u,modelId:u,source:S,evidence:e.array(w).min(1).max(1e4),proposals:e.array(x).max(1e4)}).strict();var d=i.shape.id,h=e.string().regex(/^[a-f0-9]{64}$/),F=e.object({schemaVersion:e.literal("openpond.datasetTrainingReviewRequest.v1"),teamId:d,operationId:d,dataset:i,packageHash:h,taskIds:e.array(d).min(1).max(1e4).nullable().default(null),purpose:e.enum(["supervised_training","reward_training"]),rewardBindingRef:i.nullable().default(null),definition:k.shape.definition.default({}),targetSource:e.enum(["none","expected_output","approved_parent"]).default("none"),shareWithWorkspace:e.literal(!0)}).strict().superRefine((s,r)=>{s.taskIds&&new Set(s.taskIds).size!==s.taskIds.length&&r.addIssue({code:"custom",path:["taskIds"],message:"Select each Dataset task once."}),s.purpose!=="supervised_training"&&s.targetSource!=="none"&&r.addIssue({code:"custom",path:["targetSource"],message:"Target proposals require a supervised review."})}),N=e.object({schemaVersion:e.literal("openpond.datasetTrainingReviewSource.v1"),dataset:i,packageHash:h,taskCount:e.number().int().nonnegative(),definition:k.shape.definition,rewardBinding:i.nullable(),hasParentTargets:e.boolean()}).strict(),C=e.object({schemaVersion:e.literal("openpond.datasetTrainingReviewReceipt.v1"),id:d,teamId:d,actorId:d,operationId:d,requestHash:h,dataset:i,packageHash:h,purpose:e.enum(["supervised_training","reward_training"]),shareWithWorkspace:e.literal(!0),source:i,definition:i,evidence:e.array(i).min(1).max(1e4),proposals:e.array(i.pick({id:!0,revision:!0})).max(1e4),createdAt:e.string().datetime({offset:!0})}).strict(),Q=C.extend({contentHash:h}).strict();export{y as a,P as b,V as c,k as d,A as e,F as f,N as g,C as h,Q as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{A as h,C as I,D as f,G as u,H as S,I as k,f as R,h as y,ma as w,oa as n,qa as P,ra as g,sa as T,ua as v}from"./chunk-
|
|
2
|
+
import{A as h,C as I,D as f,G as u,H as S,I as k,f as R,h as y,ma as w,oa as n,qa as P,ra as g,sa as T,ua as v}from"./chunk-BYVE4TMU.js";import{l as p}from"./chunk-ZEOYNUHL.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";var c=e.string().trim().min(1).max(240),o=e.string().trim().min(1).max(5e3),E=e.enum(["no_training","prompting","retrieval","sft","preference","grpo_rft","sdft_opsd","sdpo","agentic_rl"]),C=e.object({id:c,taskIndex:e.number().int().nonnegative(),label:k,output:e.record(e.string(),e.unknown()),infrastructureError:e.string().trim().min(1).max(1e4).nullable(),expectedPassed:e.boolean(),expectedRewardEligible:e.boolean(),metadata:e.record(e.string(),e.unknown()).default({})}),j=e.object({schemaVersion:e.literal("openpond.capabilityDiagnosis.v1"),summary:e.string().trim().min(1).max(1e4),stableBehavior:e.array(o).max(100).default([]),changingKnowledge:e.array(o).max(100).default([]),requiredContext:e.array(o).max(100).default([]),requiredTools:e.array(c).max(100).default([]),intervention:E,trainingEligible:e.boolean(),rationale:e.array(o).min(1).max(100),confidence:e.number().min(0).max(1)}),F=e.object({id:c,sourceId:c,sourceTurnId:c.nullable(),split:h,origin:e.enum(["extracted","corrected","synthetic","expert_authored"]),inputPrompt:e.string().trim().min(1).max(1e5),expectedOutputText:e.string().trim().min(1).max(2e5).nullable(),rationale:o}),D=e.object({schemaVersion:e.literal("openpond.taskDesignProposal.v1"),id:c,name:e.string().trim().min(1).max(500),objective:e.string().trim().min(1).max(2e4),diagnosis:j.default({schemaVersion:"openpond.capabilityDiagnosis.v1",summary:"Reproduce the selected approved behavior.",stableBehavior:[],changingKnowledge:[],requiredContext:[],requiredTools:[],intervention:"sft",trainingEligible:!0,rationale:["The selected examples were supplied as demonstrations."],confidence:.5}),taskKind:u.shape.taskKind,sourceIds:e.array(c).min(1).max(1e5),assumptions:e.array(o).max(1e3),successCriteria:e.array(o).min(1).max(1e3),proposedGraders:e.array(S).max(1e3).default([]),graderFixtures:e.array(C).max(1e5).default([]),generatedFiles:e.array(g).max(1e3).default([]),proposedExamples:e.array(F).max(1e5).default([]),proposedMethod:v.shape.recommendedMethod,trainingPath:T.nullable().default(null),policy:f,warnings:e.array(e.string().trim().min(1)).default([]),createdAt:e.string().trim().min(1)});var q=e.string().min(1).max(240),_=e.string().regex(/^[a-f0-9]{64}$/),H=e.array(e.object({source:I,excerpts:e.array(e.object({role:e.enum(["user","assistant"]),text:e.string().max(2e5),turnId:q}).strict()).max(200)}).strict()).min(1).max(20),Ht=e.discriminatedUnion("action",[e.object({action:e.literal("messages"),id:q,evidence:H,instruction:e.string().max(2*1024*1024),buildSpecification:P,currentProposal:D.nullable().default(null)}).strict(),e.object({action:e.literal("validate"),evidence:H,content:e.string().max(2*1024*1024)}).strict()]),qt=e.object({messages:e.array(e.object({role:e.enum(["system","user"]),content:e.string()}).strict()).min(1).max(20),skillHash:_}).strict(),_t=e.object({proposal:D,skillHash:_}).strict(),r=n.shape.id,s=e.number().int().positive(),d=e.string().regex(/^[a-f0-9]{64}$/),m={teamId:r,modelId:r},At=e.object({schemaVersion:e.literal("openpond.tasksetDraftCreate.v1"),operationId:r,modelId:r,expectedModelRevision:s,name:n.shape.name}).strict(),Lt=e.object({schemaVersion:e.literal("openpond.tasksetDraftSourceDescriptor.v1"),...m,expectedModelRevision:s,sourcePackageHash:d}).strict(),Ut=e.object({schemaVersion:e.literal("openpond.tasksetDraftReadback.v1"),...m,draft:n,workspaceHash:d,projectEtag:d}).strict().refine(t=>t.draft.profileId===t.teamId&&t.draft.modelScope?.modelId===t.modelId,"The hosted draft must belong to its declared workspace and Model."),A=e.object({id:r,revision:s,name:n.shape.name,status:w,updatedAt:n.shape.updatedAt,sourceTasksetRef:p.nullable()}).strict(),Ot=e.object({schemaVersion:e.literal("openpond.tasksetDraftList.v1"),...m,drafts:e.array(A).max(100),nextCursor:e.string().min(1).max(2e3).nullable()}).strict(),Gt=e.object({expectedDraftRevision:s,draft:n}).strict(),Vt=e.object({expectedDraftRevision:s,expectedModelRevision:s}).strict(),L=e.object({expectedDraftRevision:s,expectedWorkspaceHash:d}).strict(),Bt=e.object({schemaVersion:e.literal("openpond.tasksetDraftValidation.v1"),...m,draftId:r,draftRevision:s,workspaceHash:d,valid:e.boolean(),issues:e.array(e.object({code:e.string().min(1),severity:e.enum(["warning","error"]),message:e.string(),path:e.string().nullable()}).strict()),packageHash:d.nullable(),tasksetRef:p.nullable()}).strict().refine(t=>t.valid?t.packageHash!==null&&t.tasksetRef!==null&&t.issues.every(a=>a.severity!=="error"):t.packageHash===null&&t.tasksetRef===null&&t.issues.some(a=>a.severity==="error"),"Validation must retain either a compiled package or publication errors."),zt=L.extend({operationId:r,expectedPackageHash:d,expectedTasksetRef:p}).strict(),Kt=e.object({schemaVersion:e.literal("openpond.tasksetDraftFileList.v1"),...m,draftId:r,draftRevision:s,files:e.array(R).max(10020)}).strict(),Wt=e.object({schemaVersion:e.literal("openpond.tasksetDraftFileReadback.v1"),...m,draftId:r,draftRevision:s,file:y}).strict(),Nt=e.object({schemaVersion:e.literal("openpond.tasksetDraftDeletion.v1"),...m,draftId:r,revision:s,deleted:e.literal(!0)}).strict(),Xt=n.shape.id,Yt=e.number().int().positive();var i=e.string().trim().min(1).max(500),Zt=e.object({projectId:i.optional(),tasksetId:i.optional(),draftId:i.optional(),taskId:i.optional(),query:e.string().trim().max(1e3).default(""),split:e.enum(["train","validation","test","frozen_eval"]).optional(),after:e.string().min(1).max(2e3).optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),U=e.object({id:i,method:e.enum(["code","judge","human"]),required:e.boolean()}),O=e.object({tasksetId:i,tasksetName:e.string(),tasksetRevision:e.number().int().positive(),tasksetHash:e.string(),taskId:i,ordinal:e.number().int().nonnegative(),title:e.string(),description:e.string(),split:e.string(),scoring:e.array(U),configuration:e.enum(["configured","needs_reward","needs_checks"]),draftId:i.nullable().default(null),modelId:i.nullable().default(null)}),ea=e.object({items:e.array(O).max(100),nextCursor:e.string().nullable()});function ta(t,a){let $=[t.instruction,t.prompt,t.request,t.question,t.message].find(b=>typeof b=="string"&&b.trim().length>0),M=typeof t.title=="string"?t.title.trim():"",x=$?.trim()??"";return{title:(M||x||a).slice(0,180),description:x.slice(0,2e3)}}l(ta,"describeTaskInput");function aa(t){return t.map(a=>({id:a.id,method:a.kind==="model_judge"?"judge":a.kind==="human"?"human":"code",required:a.hardGate}))}l(aa,"summarizeTaskScoring");function sa(t){return t.some(a=>a.kind!=="human")?t.some(a=>a.kind==="model_judge"&&a.calibrationStatus!=="passed")?"needs_checks":"configured":"needs_reward"}l(sa,"taskConfiguration");export{E as a,D as b,Ht as c,Zt as d,O as e,ea as f,ta as g,aa as h,sa as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{wa as n}from"./chunk-
|
|
2
|
+
import{wa as n}from"./chunk-BYVE4TMU.js";import{a}from"./chunk-FTQLQJQV.js";function l(i,e,s){i.exec("BEGIN IMMEDIATE");try{let o=i.get("SELECT content_hash, profile_id FROM taskset_revisions WHERE taskset_id = ? AND revision = ?",[e.id,e.revision]);if(o&&o.content_hash!==e.contentHash)throw new Error(`Taskset ${e.id}@${e.revision} is immutable and already has another content hash.`);let t=i.get("SELECT payload FROM tasksets WHERE id = ?",[e.id]),d=t?n.parse(JSON.parse(t.payload)):null;if(o&&o.profile_id!==e.profileId||d&&d.profileId!==e.profileId)throw new Error(`Taskset ${e.id} belongs to another Profile.`);let r=JSON.stringify(e);i.run(`INSERT INTO taskset_revisions (taskset_id, revision, content_hash, profile_id, status, payload, created_at, updated_at)
|
|
3
3
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
4
4
|
ON CONFLICT(taskset_id, revision) DO UPDATE SET status = excluded.status, payload = excluded.payload, updated_at = excluded.updated_at`,[e.id,e.revision,e.contentHash,e.profileId,e.status,r,e.createdAt,e.updatedAt]),(!d||d.revision<=e.revision)&&i.run(`INSERT INTO tasksets (id, profile_id, status, payload, created_at, updated_at)
|
|
5
5
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as b,c as p,d as S,e as _,f as O,g as x}from"./chunk-
|
|
2
|
+
import{a as b,c as p,d as S,e as _,f as O,g as x}from"./chunk-BZS2PA4O.js";import{Ab as y,Cb as f,Db as w,Eb as c,Fb as R,Gb as q,M as m,mb as g,wb as L}from"./chunk-ZEOYNUHL.js";import{v as h}from"./chunk-ZY32SZ2P.js";import{a}from"./chunk-TBODQT4W.js";import{A as i}from"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";var C=i.object({batchId:i.string().trim().min(1).max(500),modelProjectId:i.string().trim().min(1).max(500)}).strict(),k=i.object({batchId:i.string().min(1),projectId:i.string().min(1),tasksetId:i.string().min(1),releaseId:i.string().min(1),revision:i.number().int().positive(),contentHash:i.string().regex(/^[a-f0-9]{64}$/)}).strict(),P=class{static{l(this,"OpenPondLearningClient")}#e;constructor(e){if(!e.apiKey.trim()||!e.scope.trim())throw new Error("Learning API key and scope are required.");let t=new URL(e.baseUrl);if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.search||t.hash)throw new Error("Learning base URL must be an HTTP(S) endpoint without credentials, query, or fragment.");this.#e={...e,baseUrl:t.toString().replace(/\/+$/,"")}}async command(e,t={}){f(e);let s=w.parse({scope:this.#e.scope,command:e}),n=q.parse(await this.#t("commands",s,t));if(n.operationId!==e.operationId)throw new a(502,"operation_identity_mismatch","Learning response did not match the submitted operation.",null);return n}submitExample(e,t={}){return this.command({action:"submit_example",operationId:e.idempotencyKey,example:e},t)}submitFeedback(e,t={}){return this.command({action:"submit_feedback",operationId:e.idempotencyKey,feedback:e},t)}async get(e,t,s,n={}){let r=c.parse({action:"get",scope:this.#e.scope,kind:e,id:t,...s===void 0?{}:{revision:s}});return g[e].parse(await this.#t("read",r,n))}async inspectEvidence(e,t={}){let s=c.parse({action:"inspect_evidence",scope:this.#e.scope,evidence:e}),n=R.parse(await this.#t("read",s,t));if(!m(n.evidence,e))throw new a(502,"evidence_identity_mismatch","Inspection did not match the requested evidence release.",null);return n}async inspectTaskQueue(e=null,t={}){let s=c.parse({action:"inspect_task_queue",scope:this.#e.scope,modelProjectId:e}),n=y.parse(await this.#t("read",s,t));if(n.modelProjectId!==e)throw new a(502,"model_identity_mismatch","Task queue did not match the requested Model.",null);return n}async inspectPolicy(e,t={}){let s=c.parse({action:"inspect_policy",scope:this.#e.scope,policy:e}),n=L.parse(await this.#t("read",s,t));if(!m(n.policy,e))throw new a(502,"policy_identity_mismatch","Inspection did not match the requested policy release.",null);return n}async createSourceCredential(e,t={}){let s=p.parse({...e,action:"create",scope:this.#e.scope}),n=S.parse(await this.#t("credentials",s,t));if(this.#n(n.credential,e.sourceId),n.apiKey!==e.apiKey||!e.apiKey.startsWith(`${n.credential.keyPrefix}_`))throw new a(502,"credential_identity_mismatch","Credential response did not match the prepared credential.",null);return n}async listSourceCredentials(e,t={},s={}){let n=p.parse({...t,action:"list",scope:this.#e.scope,sourceId:e}),r=_.parse(await this.#t("credentials",n,s));if(r.items.length>(t.limit??30))throw new a(502,"credential_page_invalid","Credential response exceeded the requested page size.",null);for(let o of r.items)this.#n(o,e);return r}async revokeSourceCredential(e,t,s={}){let n=p.parse({action:"revoke",scope:this.#e.scope,sourceId:e,id:t}),r=b.parse(await this.#t("credentials",n,s));if(this.#n(r,e),r.id!==t||r.revokedAt===null)throw new a(502,"credential_revocation_mismatch","Credential revocation did not match the requested credential.",null);return r}async sourceConfiguration(e,t={}){let s=O.parse({scope:this.#e.scope,sourceId:e}),n=x.parse(await this.#t("source-config",s,t));if(n.scope!==this.#e.scope||n.source.id!==e)throw new a(502,"source_identity_mismatch","Source configuration did not match the requested source.",null);return n}#n(e,t){if(e.scope!==this.#e.scope||e.sourceId!==t)throw new a(502,"credential_scope_mismatch","Credential response did not match the requested source.",null)}async list(e,t={},s={}){let n=c.parse({action:"list",scope:this.#e.scope,kind:e,...t});return i.object({items:i.array(g[e]).max(100),nextCursor:i.string().nullable()}).strict().parse(await this.#t("read",n,s))}async publishBatch(e,t={}){let s=C.parse(e),n=k.parse(await this.#t("publish-batch",{...s,scope:this.#e.scope},t));if(n.batchId!==s.batchId)throw new a(502,"batch_identity_mismatch","Published batch response did not match the requested batch.",null);return n}async#t(e,t,s){h(t,16777216);let n=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/learning/${e}`,{method:"POST",headers:{Authorization:`Bearer ${this.#e.apiKey}`,"Content-Type":"application/json",Accept:"application/json","X-OpenPond-Team-Id":this.#e.scope},body:JSON.stringify(t),signal:s.signal,redirect:"error"}),r=await I(n);if(!n.ok){let o=i.object({code:i.string().optional(),error:i.string().optional()}).passthrough().safeParse(r);throw new a(n.status,o.success?o.data.code??"learning_request_failed":"learning_request_failed",o.success?o.data.error??`Learning request failed (${n.status}).`:`Learning request failed (${n.status}).`,r)}return r}};async function I(u){let t=u.body?.getReader();if(!t)throw new a(u.status,"empty_response","Learning response was empty.",null);let s=new TextDecoder,n=0,r="";try{for(;;){let d=await t.read();if(d.done)break;if(n+=d.value.byteLength,n>16777216)throw new a(u.status,"response_too_large","Learning response exceeded 16 MiB; request a smaller page.",null);r+=s.decode(d.value,{stream:!0})}r+=s.decode();let o=JSON.parse(r);return h(o,16777216),o}finally{await t.cancel(),t.releaseLock()}}l(I,"readBoundedLearningResponse");export{C as a,P as b,I as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as f}from"./chunk-
|
|
2
|
+
import{b as f}from"./chunk-CX4T7I47.js";import{Z as c}from"./chunk-6I5AUTVO.js";import{C as w,D as I,z as g}from"./chunk-WXG3G2O6.js";import{b as m}from"./chunk-FYWQWKVS.js";import{f as R}from"./chunk-ZY32SZ2P.js";import{A as r}from"./chunk-X2J2P5ZT.js";import{a as d}from"./chunk-FTQLQJQV.js";import n from"node:path";import{readFile as y}from"node:fs/promises";var A=r.object({profileId:r.string().min(1),sourceRevision:r.string().min(1),repositoryId:r.string().min(1),harnessRelease:r.object({id:r.string().min(1),contentHash:r.string().regex(/^[a-f0-9]{64}$/)}).strict(),hostExecution:r.object({conversationId:r.string().min(1),turnId:r.string().min(1)}).strict().optional(),workspaceId:r.string().min(1),assetsPath:r.string().min(1).refine(n.isAbsolute)}).strict();async function _(p,e){let t=A.parse(e),s=await f(p,t.harnessRelease);if(!s||n.resolve(s.release.bundlePath)!==n.resolve(t.assetsPath))throw new Error("Hosted Profile release changed after admission.");let o=s.release.harnessRelease.metadata.profile;if(!o||typeof o!="object"||o.id!==t.profileId||o.sourceRevision!==t.sourceRevision||o.repositoryId!==void 0&&o.repositoryId!==t.repositoryId)throw new Error("Hosted Profile provenance differs from admitted release.");return{profile:I(),profileLibrary:w()}}d(_,"loadHostedProfileStateAndLibrary");async function B(p,e){let t=A.parse(e),s=await f(p,t.harnessRelease);if(!s||n.resolve(s.release.bundlePath)!==n.resolve(t.assetsPath))throw new Error("Hosted Profile workflow release is unavailable.");let o=s.release.harnessRelease.metadata.profile;if(o?.id!==t.profileId||o.sourceRevision!==t.sourceRevision||o.repositoryId!==void 0&&o.repositoryId!==t.repositoryId)throw new Error("Hosted Profile workflow provenance changed.");let a=t.harnessRelease,l={source:"openpond_git",repositoryId:t.repositoryId,profileId:t.profileId};if(!s.release.harnessRelease.files.some(u=>u.path==="workflows/catalog.json"))return{profileRef:l,sourceRevision:t.sourceRevision,harnessRelease:a,workflows:[]};let i=n.join(s.release.bundlePath,"source","workflows"),v=R({agentSnapshot:s.release.agentSnapshot,harnessRelease:s.release.harnessRelease,catalogBytes:await y(n.join(i,"catalog.json")),actionBytes:await y(n.join(i,"actions.json"))});return{profileRef:l,sourceRevision:t.sourceRevision,harnessRelease:a,workflows:v.catalog.workflows.map(u=>({workflow:u,binding:{schemaVersion:"openpond.profileWorkflowBinding.v1",profileId:t.profileId,sourceRevision:t.sourceRevision,harnessRelease:a,catalogHash:v.catalogHash,workflowId:u.id}}))}}d(B,"listHostedProfileWorkflows");import{createHash as U,randomUUID as h}from"node:crypto";var b=r.object({approval:g,revision:r.number().int().positive()}).strict(),P=r.object({record:m}).strict(),x=r.object({startedAt:r.string().min(1),requestOrdinal:r.number().int().nonnegative(),id:r.string().min(1)}).strict(),k=r.object({records:r.array(m).max(200),nextBefore:x.nullable()}).strict(),H=1e4,S=class{constructor(e){this.client=e}client;static{d(this,"HostedApprovalStorage")}async readApproval(e){let t=await this.client.request({contractVersion:c,requestId:h(),operation:"approval/get",params:{approvalId:e}});return t===null?null:b.parse(t)}async getApproval(e){return(await this.readApproval(e))?.approval??null}async putApproval(e){let t=g.parse(e.approval);if(!e.requestId.trim())throw new Error("Approval mutation requires a stable request ID.");return b.parse(await this.client.request({contractVersion:c,requestId:e.requestId,operation:"approval/upsert",params:{approval:t,expectedRevision:e.expectedRevision}}))}},M=class{constructor(e){this.client=e}client;static{d(this,"HostedModelUsageStorage")}async upsertModelUsageRecord(e){let t=m.parse(e),s=U("sha256").update(JSON.stringify(t)).digest("hex"),o=await this.client.request({contractVersion:c,requestId:`usage:${s}`,operation:"usage/upsert",params:{record:t}}),a=P.parse(o).record;if(a.requestId!==t.requestId)throw new Error("Host usage upsert changed request identity.");return a}async getModelUsageRecordByRequestId(e){let t=await this.client.request({contractVersion:c,requestId:h(),operation:"usage/getByRequestId",params:{requestId:e}});return t===null?null:P.parse(t).record}async listModelUsageRecords(e={}){let t=e.limit===void 0||e.limit>=H,s=e.limit===void 0?H:Math.max(1,Math.min(1e4,Math.trunc(e.limit))),o={...e.sessionId?{sessionId:e.sessionId}:{},...e.turnId?{turnId:e.turnId}:{},...e.provider?{provider:e.provider}:{},...e.model?{model:e.model}:{},...e.startedAtFrom?{startedAtFrom:e.startedAtFrom}:{},...e.startedAtTo?{startedAtTo:e.startedAtTo}:{},...e.visibility&&e.visibility!=="all"?{visibility:e.visibility}:{},...e.status&&e.status!=="all"?{status:e.status}:{}},a=[],l=null;for(;a.length<s+(t?1:0);){let i=k.parse(await this.client.request({contractVersion:c,requestId:h(),operation:"usage/page",params:{query:o,before:l,limit:Math.min(200,s+(t?1:0)-a.length)}}));if(a.push(...i.records),a.length>s)throw new Error(`Hosted usage query exceeds ${s} rows; narrow its filters or use a streamed aggregation.`);if(i.nextBefore===null)break;if(i.records.length===0||JSON.stringify(i.nextBefore)===JSON.stringify(l))throw new Error("Host usage cursor did not advance.");l=i.nextBefore}return a}async listModelUsageRecordsComplete(e={}){return this.listModelUsageRecords(e)}};export{A as a,_ as b,B as c,S as d,M as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{h as a}from"./chunk-
|
|
2
|
+
import{h as a}from"./chunk-O5ZOW474.js";import{Xb as d,_b as p}from"./chunk-WXG3G2O6.js";import{a as o}from"./chunk-FTQLQJQV.js";function g(n,e,t,i){let s=n.get(`SELECT payload,package_payload FROM local_experiment_definitions WHERE team_id=? AND id=? ${i===void 0?"ORDER BY revision DESC LIMIT 1":"AND revision=?"}`,i===void 0?[e,t]:[e,t,i]);if(!s)throw new a("local_definition_not_found","Local Experiment definition is unavailable in this workspace.",404);return{definition:d.parse(JSON.parse(s.payload)),package:JSON.parse(s.package_payload)}}o(g,"localDefinition");function _(n,e,t){let i=n.get("SELECT payload FROM local_experiment_executions WHERE team_id=? AND id=?",[e,t]);if(!i)throw new a("local_execution_not_found","Local Experiment execution is unavailable in this workspace.",404);return p.parse(JSON.parse(i.payload))}o(_,"localExecution");function f(n,e,t){return n.all("SELECT receipt_id,status,admission,result,error FROM local_experiment_cases WHERE team_id=? AND execution_id=? ORDER BY ordinal",[e,t]).map(i=>({receiptId:i.receipt_id,status:i.status,admission:JSON.parse(i.admission),result:i.result?JSON.parse(i.result):null,error:i.error}))}o(f,"localCases");function L(n,e,t,i={}){let s=_(n,e,t),c={pending:0,running:0,completed:0,failed:0,cancelled:0,unknown:0};for(let u of n.all("SELECT status,COUNT(*) AS count FROM local_experiment_cases WHERE team_id=? AND execution_id=? GROUP BY status",[e,t]))c[u.status]=u.count;let r=n.get(`SELECT COALESCE(SUM(CASE WHEN status='settled' THEN cost_usd ELSE 0 END),0) AS spent,
|
|
3
3
|
COALESCE(SUM(CASE WHEN status IN ('reserved','dispatched','unknown') THEN maximum_usd ELSE 0 END),0) AS held,
|
|
4
4
|
COALESCE(SUM(CASE WHEN status IN ('dispatched','unknown') THEN 1 ELSE 0 END),0) AS uncertain FROM local_experiment_charges WHERE team_id=? AND execution_id=?`,[e,t]),l=p.parse({...s,...i,counts:c,usage:{knownCostUsd:r.spent,costUsd:r.uncertain?null:r.spent,heldUsd:r.held,uncertainRequests:r.uncertain}});return n.run("UPDATE local_experiment_executions SET payload=? WHERE team_id=? AND id=?",[JSON.stringify(l),e,t]),l}o(L,"refreshLocalExecution");function O(n,e,t,i,s,c){let r=n.get("SELECT kind,intent_hash,receipt FROM local_experiment_operations WHERE team_id=? AND operation_id=?",[e,t]);if(r){if(r.kind!==i||r.intent_hash!==s)throw new a("local_operation_conflict","This operation already owns different immutable inputs.");return JSON.parse(r.receipt)}let l=c();return n.run("INSERT INTO local_experiment_operations(team_id,operation_id,kind,intent_hash,receipt) VALUES(?,?,?,?,?)",[e,t,i,s,JSON.stringify(l)]),l}o(O,"localOperation");function w(n,e,t){n.run("INSERT INTO local_experiment_definitions(team_id,id,revision,content_hash,project_id,payload,package_payload) VALUES(?,?,?,?,?,?,?)",[e.teamId,e.id,e.revision,e.contentHash,e.configuration.request.project?.id??null,JSON.stringify(e),JSON.stringify(t)])}o(w,"writeLocalDefinition");var E=15e3;function T(n,e,t){let i=n.get("SELECT owner_id,pid,lease_until FROM local_experiment_owner WHERE singleton=1");if(i&&i.owner_id!==e&&S(i.pid))throw new a("local_runtime_already_owned","Another live local server owns Experiment execution in this installation.");n.run("INSERT INTO local_experiment_owner(singleton,owner_id,pid,lease_until) VALUES(1,?,?,?) ON CONFLICT(singleton) DO UPDATE SET owner_id=excluded.owner_id,pid=excluded.pid,lease_until=excluded.lease_until",[e,t,Date.now()+E])}o(T,"claimLocalExperimentOwner");function m(n,e){let t=n.get("SELECT owner_id,pid FROM local_experiment_owner WHERE singleton=1");if(!t||t.owner_id!==e||t.pid!==process.pid)throw new a("local_runtime_lease_lost","This process no longer owns local Experiment execution.")}o(m,"requireLocalRuntimeOwner");function R(n,e){m(n,e),n.run("UPDATE local_experiment_owner SET lease_until=? WHERE singleton=1 AND owner_id=?",[Date.now()+E,e])}o(R,"renewLocalExperimentOwner");function S(n){if(!Number.isSafeInteger(n)||n<=0)return!0;try{return process.kill(n,0),!0}catch(e){return!(e instanceof Error&&"code"in e&&e.code==="ESRCH")}}o(S,"alive");export{g as a,_ as b,f as c,L as d,O as e,w as f,T as g,m as h,R as i};
|