openpond 0.2.66 → 0.2.68
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/app-server.d.ts +691 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/{account-context-TIJOM22A.js → account-context-MWB6HN6I.js} +1 -1
- package/dist/chunks/{acp-YYZ3ZO3Q.js → acp-2OIXATRY.js} +1 -1
- package/dist/chunks/{acp-agent-T26S7TU2.js → acp-agent-PAGX2B47.js} +1 -1
- package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
- package/dist/chunks/{app-layer-5XUMNHDO.js → app-layer-YNEUEOEP.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js} +1 -1
- package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
- package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
- package/dist/chunks/app-server-runtime-GBX65JJ7.js +2 -0
- package/dist/chunks/apps-RSFEJOQN.js +2 -0
- package/dist/chunks/chunk-2PXKSAG6.js +2 -0
- package/dist/chunks/{chunk-GRLQHYAU.js → chunk-2TGHZXJE.js} +2 -2
- package/dist/chunks/{chunk-YU4JYWCA.js → chunk-3A2Y7UK3.js} +1 -1
- package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
- package/dist/chunks/chunk-4BUM6JEC.js +33 -0
- package/dist/chunks/chunk-4G3GTEVS.js +23 -0
- package/dist/chunks/{chunk-FUFI4THX.js → chunk-4KNPCJR4.js} +1 -1
- package/dist/chunks/chunk-4KTGYHCE.js +2 -0
- package/dist/chunks/chunk-4PUOWSDE.js +13 -0
- package/dist/chunks/chunk-55YD4UTW.js +2 -0
- package/dist/chunks/chunk-5G7BQAUA.js +2 -0
- package/dist/chunks/chunk-65FJWWXG.js +2 -0
- package/dist/chunks/{chunk-2GJD23CM.js → chunk-65WRWLUD.js} +1 -1
- package/dist/chunks/chunk-6D3FI2XT.js +2 -0
- package/dist/chunks/chunk-73TW6BKK.js +6 -0
- package/dist/chunks/{chunk-6S2MWJVD.js → chunk-7NCM6GBN.js} +1 -1
- package/dist/chunks/chunk-7OFD6TFD.js +2 -0
- package/dist/chunks/chunk-7OKZCJHS.js +3 -0
- package/dist/chunks/{chunk-NTM3KQ25.js → chunk-7PKDJHT6.js} +1 -1
- package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
- package/dist/chunks/{chunk-SAZTOGX6.js → chunk-7RSQOC5M.js} +3 -3
- package/dist/chunks/{chunk-6TRVEA3T.js → chunk-AFH462DO.js} +1 -1
- package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
- package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
- package/dist/chunks/chunk-APKXXAUF.js +2 -0
- package/dist/chunks/chunk-AQUZCWM3.js +2 -0
- package/dist/chunks/chunk-AUO5DCEU.js +2 -0
- package/dist/chunks/chunk-AYOMVI7J.js +2 -0
- package/dist/chunks/{chunk-EVQISX7M.js → chunk-B66QCXH2.js} +1 -1
- package/dist/chunks/{chunk-S6UCVXBC.js → chunk-BHKXPWFB.js} +1 -1
- package/dist/chunks/chunk-BU6MW65V.js +10 -0
- package/dist/chunks/{chunk-C5B3FMV3.js → chunk-CCZ276IA.js} +1 -1
- package/dist/chunks/{chunk-LYVHYT3L.js → chunk-CIZI6Z7D.js} +1 -1
- package/dist/chunks/{chunk-4D3CICBG.js → chunk-CO23RRN7.js} +1 -1
- package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
- package/dist/chunks/chunk-DDOIPTOM.js +2 -0
- package/dist/chunks/{chunk-ZU3YBRXS.js → chunk-DKOVZ6R2.js} +3 -3
- package/dist/chunks/chunk-DRLP7GIU.js +2 -0
- package/dist/chunks/{chunk-DAEUVT2I.js → chunk-DRTHKWHK.js} +1 -1
- package/dist/chunks/{chunk-W22KWKF6.js → chunk-DWF3FCY4.js} +1 -1
- package/dist/chunks/{chunk-NABPZ7AK.js → chunk-DWM5G7BU.js} +1 -1
- package/dist/chunks/chunk-DXJC3QW7.js +2 -0
- package/dist/chunks/{chunk-V3S2B6WU.js → chunk-E2JB5OCO.js} +1 -1
- package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
- package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
- package/dist/chunks/{chunk-WKHGXLJD.js → chunk-EGP6DF34.js} +2 -2
- package/dist/chunks/{chunk-M5QPL5NO.js → chunk-ESYPMD7Q.js} +1 -1
- package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
- package/dist/chunks/{chunk-XHBMK6LC.js → chunk-EYTTZ5H4.js} +1 -1
- package/dist/chunks/chunk-FKUWCJ73.js +161 -0
- package/dist/chunks/{chunk-U2BD545L.js → chunk-FNGZ4UDZ.js} +1 -1
- package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
- package/dist/chunks/{chunk-36FNNR5N.js → chunk-GEYZVOGD.js} +1 -1
- package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
- package/dist/chunks/{chunk-JLW5BQVO.js → chunk-GYYJ47GX.js} +1 -1
- package/dist/chunks/chunk-HG2YFMVU.js +4 -0
- package/dist/chunks/{chunk-BTJACFU3.js → chunk-HKVFU3B3.js} +1 -1
- package/dist/chunks/chunk-IHAEZ73V.js +2 -0
- package/dist/chunks/{chunk-LI3FTPAH.js → chunk-IIT66347.js} +4 -4
- package/dist/chunks/{chunk-Q4AXZY2P.js → chunk-IO5DZUKL.js} +1 -1
- package/dist/chunks/chunk-J256AEEE.js +2 -0
- package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
- package/dist/chunks/{chunk-7P5SH3CI.js → chunk-JPUSTFZC.js} +1 -1
- package/dist/chunks/{chunk-5AU5Y6KS.js → chunk-JQOVC35K.js} +1 -1
- package/dist/chunks/{chunk-VS3AMJEK.js → chunk-JT5YQ52I.js} +1 -1
- package/dist/chunks/chunk-JVMSN7LH.js +2 -0
- package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
- package/dist/chunks/{chunk-OTUS7NTQ.js → chunk-K7KBFM2T.js} +1 -1
- package/dist/chunks/{chunk-FS2VKOT7.js → chunk-KCLMA2IH.js} +1 -1
- package/dist/chunks/chunk-KDER7R45.js +2 -0
- package/dist/chunks/{chunk-WBO6FQHR.js → chunk-KOC3YJEU.js} +2 -2
- package/dist/chunks/{chunk-6ZTP6CUJ.js → chunk-KP2MYTP5.js} +1 -1
- package/dist/chunks/{chunk-YRDPVTEI.js → chunk-KU4TPDPH.js} +2 -2
- package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
- package/dist/chunks/chunk-LVXL7T5O.js +2 -0
- package/dist/chunks/{chunk-5KWKSR4P.js → chunk-M4A7G4S5.js} +2 -2
- package/dist/chunks/{chunk-KAWXVMHI.js → chunk-M4ZHFDRJ.js} +1 -1
- package/dist/chunks/{chunk-HX6GXMDK.js → chunk-MEJLWNRS.js} +1 -1
- package/dist/chunks/{chunk-B666Z2NS.js → chunk-MIFVX5PK.js} +1 -1
- package/dist/chunks/{chunk-66HFW4OU.js → chunk-MOXIGLN2.js} +1 -1
- package/dist/chunks/{chunk-7XOUM6RK.js → chunk-N5EAVX4G.js} +1 -1
- package/dist/chunks/{chunk-Z2TOBS3P.js → chunk-NMMHXYDJ.js} +1 -1
- package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
- package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
- package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
- package/dist/chunks/chunk-OIH2LPIT.js +2 -0
- package/dist/chunks/chunk-OUJ63LMU.js +2 -0
- package/dist/chunks/{chunk-DXA2UHBE.js → chunk-P4QM63L3.js} +1 -1
- package/dist/chunks/chunk-PACLKDTN.js +2 -0
- package/dist/chunks/{chunk-AF3AVDPP.js → chunk-PAYFJHPO.js} +1 -1
- package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
- package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
- package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
- package/dist/chunks/{chunk-W7NXFRHN.js → chunk-PNPV2LDE.js} +1 -1
- package/dist/chunks/{chunk-DSJZS77R.js → chunk-PSY6IRJE.js} +8 -8
- package/dist/chunks/{chunk-UK5LGSGT.js → chunk-Q73RKX7I.js} +1 -1
- package/dist/chunks/{chunk-PLVWARB7.js → chunk-Q7FBVLLB.js} +1 -1
- package/dist/chunks/{chunk-QAEZNFAM.js → chunk-Q7P34B2O.js} +1 -1
- package/dist/chunks/{chunk-QYQZQVVN.js → chunk-QLGP2OAQ.js} +1 -1
- package/dist/chunks/{chunk-GIU3Z45P.js → chunk-QUNQM2E3.js} +1 -1
- package/dist/chunks/chunk-R2FYCJL6.js +2 -0
- package/dist/chunks/{chunk-KOKBDIGR.js → chunk-R4EEGWXB.js} +1 -1
- package/dist/chunks/chunk-RBTDSI4L.js +11 -0
- package/dist/chunks/chunk-RCQYEHHD.js +2 -0
- package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
- package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
- package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
- package/dist/chunks/{chunk-67HXM6AL.js → chunk-SDHG6CKU.js} +1 -1
- package/dist/chunks/{chunk-DIDQHTAX.js → chunk-SO4GMSNP.js} +1 -1
- package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
- package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
- package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
- package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
- package/dist/chunks/{chunk-LARJARMS.js → chunk-UANH7U3Y.js} +1 -1
- package/dist/chunks/{chunk-CYQLXS2U.js → chunk-UGFSAG4U.js} +1 -1
- package/dist/chunks/chunk-ULTV6INR.js +2 -0
- package/dist/chunks/{chunk-FHLSLOKH.js → chunk-UMAVVMXL.js} +7 -7
- package/dist/chunks/chunk-V24VHT76.js +2 -0
- package/dist/chunks/chunk-VEBW7NKD.js +2 -0
- package/dist/chunks/chunk-VJR2GNRY.js +2 -0
- package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
- package/dist/chunks/{chunk-5Z3AU5CL.js → chunk-VWWKWYSQ.js} +1 -1
- package/dist/chunks/chunk-WCNPGKST.js +2 -0
- package/dist/chunks/chunk-WD4KAKEX.js +2 -0
- package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
- package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
- package/dist/chunks/{chunk-GFAI2MCJ.js → chunk-WZ35ICTE.js} +3 -3
- package/dist/chunks/chunk-XHACK2KR.js +2 -0
- package/dist/chunks/chunk-XOPHFUUY.js +2 -0
- package/dist/chunks/{chunk-UXPO3ZV7.js → chunk-XQAUHXL4.js} +4 -4
- package/dist/chunks/{chunk-OXRVILDW.js → chunk-XT4CSKHM.js} +1 -1
- package/dist/chunks/{chunk-QJJNHKLT.js → chunk-XY7HFXLH.js} +1 -1
- package/dist/chunks/{chunk-ZUT4EM64.js → chunk-XYZV3FKD.js} +1 -1
- package/dist/chunks/{chunk-7FBWUVX7.js → chunk-Y2WNZWT2.js} +1 -1
- package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
- package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
- package/dist/chunks/chunk-YI6ME6PU.js +22 -0
- package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
- package/dist/chunks/{chunk-D7R2AAX2.js → chunk-Z33RVGP6.js} +1 -1
- package/dist/chunks/{chunk-B32CW3NT.js → chunk-ZDEIVUUI.js} +1 -1
- package/dist/chunks/{chunk-IEVJLG3V.js → chunk-ZIQJDTQB.js} +1 -1
- package/dist/chunks/{chunk-GDJ4X2ZN.js → chunk-ZYLLPRPU.js} +1 -1
- package/dist/chunks/cli-R7TAP6Z2.js +2 -0
- package/dist/chunks/command-LNOVZQSK.js +58 -0
- package/dist/chunks/{configuration-command-4WTS2MZS.js → configuration-command-CNITTZRP.js} +1 -1
- package/dist/chunks/connected-app-executor-FGWCLOJO.js +2 -0
- package/dist/chunks/connected-evidence-5VZBYNWN.js +2 -0
- package/dist/chunks/{connected-starting-assets-4LDXQVLN.js → connected-starting-assets-KWOFEIE4.js} +1 -1
- package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
- package/dist/chunks/{continual-HQCFY7GN.js → continual-FVOLGGOE.js} +1 -1
- package/dist/chunks/core-commands-BPYXVT7O.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
- package/dist/chunks/datasets-E5TXSVIY.js +2 -0
- package/dist/chunks/desktop-test-FX7DTY4N.js +3 -0
- package/dist/chunks/dist-2MKJC6HN.js +2 -0
- package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
- package/dist/chunks/evaluation-coordination-KUTZEEPB.js +2 -0
- package/dist/chunks/experiment-improvements-PQNR5YHN.js +2 -0
- package/dist/chunks/experiments-Z4BJWT3Y.js +2 -0
- package/dist/chunks/experiments-signal-3GCLKUWZ.js +2 -0
- package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
- package/dist/chunks/{help-JQA3YMCX.js → help-K6YLZ3KL.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
- package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
- package/dist/chunks/hosted-app-server-composition-LA3BZ4SE.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
- package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
- package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
- package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
- package/dist/chunks/hosted-tasksets-NXVF4AQA.js +2 -0
- package/dist/chunks/human-review-2ZOB7CJZ.js +2 -0
- package/dist/chunks/{import-CLWTKDG6.js → import-YHYKZ6JN.js} +2 -2
- package/dist/chunks/javascript-isolate-process-source-YAT3GPW4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-LGRP74W4.js +2 -0
- package/dist/chunks/{learning-XTY5VOTK.js → learning-LAXMGWSQ.js} +1 -1
- package/dist/chunks/learning-Y3UKNUGE.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
- package/dist/chunks/{model-projects-GHWCKDON.js → model-projects-6YWVD2TS.js} +1 -1
- package/dist/chunks/opchat-XXI2ZM53.js +3 -0
- package/dist/chunks/opchat-bounded-chat-3MZGCRLY.js +2 -0
- package/dist/chunks/organizations-W7HI2JA4.js +2 -0
- package/dist/chunks/{profile-RIDNU2I5.js → profile-P2SJPBOJ.js} +1 -1
- package/dist/chunks/project-action-payload-LTIQBX77.js +2 -0
- package/dist/chunks/project-agent-XRIXMXQK.js +2 -0
- package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
- package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
- package/dist/chunks/{runtime-VSOOPNYN.js → runtime-Q7JUJO4D.js} +2 -2
- package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
- package/dist/chunks/{sandbox-template-NN3XQI7M.js → sandbox-template-U536EEWY.js} +1 -1
- package/dist/chunks/saved-work-KSIQPXC2.js +2 -0
- package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
- package/dist/chunks/setup-RMZ2BHLM.js +2 -0
- package/dist/chunks/{src-662QOKNP.js → src-C3ZUESMK.js} +1 -1
- package/dist/chunks/src-SGQYVBNQ.js +424 -0
- package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
- package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-7PDLGRWF.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
- package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
- package/dist/chunks/{store-create-improve-G46KIUVT.js → store-create-improve-UTCLBXF2.js} +1 -1
- package/dist/chunks/{store-datasets-O67F75BL.js → store-datasets-4AQOVAQY.js} +1 -1
- package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
- package/dist/chunks/{store-harness-workspaces-PJJQ74G6.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
- package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
- package/dist/chunks/{store-learning-6P6IS7GH.js → store-learning-SIUQIY5C.js} +1 -1
- package/dist/chunks/{store-learning-credentials-EGJ2WTZI.js → store-learning-credentials-BUHR7SN6.js} +1 -1
- package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
- package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
- package/dist/chunks/{store-model-configuration-T6XJJDAB.js → store-model-configuration-6L3OYXF4.js} +1 -1
- package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
- package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
- package/dist/chunks/{store-preference-comparison-XQFTLMGH.js → store-preference-comparison-5YVIQNVB.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
- package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
- package/dist/chunks/{store-task-inbox-VVXZUJIO.js → store-task-inbox-L6IQTY26.js} +1 -1
- package/dist/chunks/{store-task-inventory-MQX44AI6.js → store-task-inventory-QWS2C656.js} +1 -1
- package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
- package/dist/chunks/{store-training-DUVIDYK5.js → store-training-FYXZU2FE.js} +1 -1
- package/dist/chunks/{store-training-jobs-HHFH3V5O.js → store-training-jobs-3N3VKPIY.js} +1 -1
- package/dist/chunks/{store-training-models-C7UUZDTO.js → store-training-models-VOFVGPZR.js} +1 -1
- package/dist/chunks/{taskset-7FQCJ55X.js → taskset-UDDLFYKV.js} +1 -1
- package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
- package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
- package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
- package/dist/chunks/{teams-bot-FXMCOCPP.js → teams-bot-MPWL2PP4.js} +1 -1
- package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
- package/dist/chunks/training-5NT2YB2L.js +2 -0
- package/dist/chunks/training-5UMT45UL.js +2 -0
- package/dist/chunks/training-UY6KRG4M.js +2 -0
- package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
- package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
- package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
- package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-2X7RSOLC.js +2 -0
- package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
- package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
- package/dist/chunks/{training-hosted-learning-YN5VD3PW.js → training-hosted-learning-E2N32YU5.js} +1 -1
- package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
- package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
- package/dist/chunks/training-hosted-report-T633TNJG.js +2 -0
- package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
- package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
- package/dist/chunks/training-hosted-workers-Y2PO5IOA.js +2 -0
- package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
- package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
- package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/types/billing.d.ts +87 -6
- package/dist/sandbox/types/io.d.ts +3 -0
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
- package/dist/web/assets/App-CCuh99JW.js +54 -0
- package/dist/web/assets/{AppDialog-DuSd0wk6.js → AppDialog-CxjDHVk9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
- package/dist/web/assets/{AppToastContext-Dklk6CaG.js → AppToastContext-EpiT1dHs.js} +1 -1
- package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
- package/dist/web/assets/{AppsView-DNHWzJb2.css → AppsView-D3vVesNd.css} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DipNT6Tj.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
- package/dist/web/assets/{CartesianChart-UU1sdoUO.js → CartesianChart-brqLBqnF.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
- package/dist/web/assets/{CollaborationTabs-BWYRQ1PE.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
- package/dist/web/assets/{CommandMenu-B08F9x5g.js → CommandMenu-DkWpXR55.js} +1 -1
- package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
- package/dist/web/assets/{ComposerAttachments-srWBKvCv.js → ComposerAttachments-BdJGCYzI.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DqTpU5cO.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-2KC-KQvu.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
- package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
- package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
- package/dist/web/assets/{FilePagePreview-B-iUVPhh.js → FilePagePreview-BRhhz99q.js} +2 -2
- package/dist/web/assets/{GetStartedView-5v0vBWXy.js → GetStartedView-CLVD-qEi.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-Bn4072K-.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
- package/dist/web/assets/{HtmlVisual-C2WsMj90.js → HtmlVisual-D5y2WG9L.js} +10 -10
- package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
- package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
- package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-C50P74LI.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
- package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
- package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
- package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
- package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
- package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
- package/dist/web/assets/{MainPane-Dje-hfUM.css → MainPane-BZlNLfTM.css} +1 -1
- package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
- package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
- package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-Clv0IWyn.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-Cw_F5Eaa.js → NewProjectDialog-DcnGzEd9.js} +1 -1
- package/dist/web/assets/{OutputsPage-Btyiie4B.js → OutputsPage-Cmk15Vt_.js} +1 -1
- package/dist/web/assets/{PageChrome-BLLw_cEA.js → PageChrome-Cz_fCqtn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BpSHWQgj.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-WytWGQgw.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
- package/dist/web/assets/{SettingsView-BJq5zNkv.js → SettingsView-DvQXGw3_.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BxFEWI9W.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
- package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
- package/dist/web/assets/{TerminalOverlay-C7OM2F0-.js → TerminalOverlay-DlaM9d8F.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-KH5GFacT.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DzOw13Md.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-nZHno_4P.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
- package/dist/web/assets/{WorkspaceFileLocation-1U8DDj1J.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BO1EUA3G.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-Rqq_sKW_.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-zmmMp09R.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DNbhGjkE.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
- package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
- package/dist/web/assets/{app-models-Cz3yxq4x.js → app-models-BUdzQbXo.js} +1 -1
- package/dist/web/assets/bot-Doyx3T4j.js +1 -0
- package/dist/web/assets/{browser-sidebar-links-ZyYiYBBd.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
- package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
- package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
- package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
- package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
- package/dist/web/assets/chunk-3BYFS4RO-ztZjcMmt.js +1 -0
- package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
- package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
- package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
- package/dist/web/assets/chunk-H3JZ3P5T-DolwEJXo.js +2 -0
- package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
- package/dist/web/assets/client-DwZ92xtu.js +1 -0
- package/dist/web/assets/{client-choice-storage-CXlWJW5g.js → client-choice-storage-DitqKiIT.js} +1 -1
- package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
- package/dist/web/assets/common-BWVSBnpX.js +1 -0
- package/dist/web/assets/copy-DTQhoBNg.js +1 -0
- package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
- package/dist/web/assets/{cssMode-Cps-05f3.js → cssMode-BRTtfXxU.js} +1 -1
- package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
- package/dist/web/assets/external-link-H1629UU6.js +1 -0
- package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
- package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
- package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
- package/dist/web/assets/{htmlMode-Do72TyNy.js → htmlMode-BVaCcL76.js} +1 -1
- package/dist/web/assets/icons-Bk2b68aC.js +1 -0
- package/dist/web/assets/image-0DPVY6Ev.js +1 -0
- package/dist/web/assets/{index-D7igQSAg.js → index-B6XX_0h3.js} +2 -2
- package/dist/web/assets/info-C8b_tafZ.js +1 -0
- package/dist/web/assets/intake-contracts-B8JZKYwb.js +1 -0
- package/dist/web/assets/{jsonMode-B2N7W15Y.js → jsonMode-BCKKQmmV.js} +1 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DPmyOFVA.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
- package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
- package/dist/web/assets/message-square-C889vRqm.js +1 -0
- package/dist/web/assets/{monaco.contribution-DqqJBDzF.js → monaco.contribution-B9q6qbbo.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BfOxF9PJ.js → monaco.contribution-BITdsRbn.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DNONXznc.js → monaco.contribution-BqA-XZ44.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CRdTg0FH.js → monaco.contribution-DxAV1oS5.js} +2 -2
- package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
- package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
- package/dist/web/assets/{pdf-BCq2Oosd.js → pdf-perlzwEB.js} +1 -1
- package/dist/web/assets/play-CHXXdkuO.js +1 -0
- package/dist/web/assets/plus-DFFWjhPw.js +1 -0
- package/dist/web/assets/{ponder-desktop-Dm7tOkKo.js → ponder-desktop-Ca-9KggQ.js} +1 -1
- package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
- package/dist/web/assets/{profile-ref-DSNkG6Ol.js → profile-ref-D8lxL7dW.js} +1 -1
- package/dist/web/assets/{python-DuGMr666.js → python-B9hOnkOI.js} +1 -1
- package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
- package/dist/web/assets/{requests-BCbaFiqV.js → requests-DmeUYik4.js} +1 -1
- package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
- package/dist/web/assets/save-iEMNZoPe.js +1 -0
- package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
- package/dist/web/assets/settings-BC-bzgk6.js +21 -0
- package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
- package/dist/web/assets/square-BE_4JMR3.js +1 -0
- package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
- package/dist/web/assets/{submit-issue-command-wfngGS6Y.js → submit-issue-command-HfKzyxg5.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-cl0cw2QK.js → toggleHighContrast-ClsXu39R.js} +1 -1
- package/dist/web/assets/training-DWfghwfZ.js +1 -0
- package/dist/web/assets/{training-model-data-CWnu1bz9.js → training-model-data-CIysl8wH.js} +4 -4
- package/dist/web/assets/{tsMode-DLEc0PYL.js → tsMode-nbmaMc-D.js} +1 -1
- package/dist/web/assets/upload-C6ug8RD-.js +1 -0
- package/dist/web/assets/{useAccountSettings-ByxjI9BG.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-Df64T07n.js → useAgentInventory-ByCk2JAv.js} +1 -1
- package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-DNh_x9gQ.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
- package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
- package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
- package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
- package/dist/web/assets/{workers-CnqrOtic.js → workers-DKvM2NdM.js} +1 -1
- package/dist/web/assets/x-Jx2jlP9u.js +1 -0
- package/dist/web/assets/{yaml-C9vtYV4w.js → yaml-C02vq4ar.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +100 -4
- package/package.json +1 -1
- package/dist/chunks/actions-command-VLKMHCMI.js +0 -2
- package/dist/chunks/app-server-evaluations-V6LRWDUF.js +0 -2
- package/dist/chunks/app-server-harness-services-6ZRLA3YD.js +0 -2
- package/dist/chunks/app-server-runtime-TH56EG2Z.js +0 -2
- package/dist/chunks/apps-MNT3KXIY.js +0 -2
- package/dist/chunks/chunk-2W22IXHB.js +0 -2
- package/dist/chunks/chunk-2ZNW6GUU.js +0 -2
- package/dist/chunks/chunk-3BJ7LPE3.js +0 -2
- package/dist/chunks/chunk-3MVKXAH7.js +0 -2
- package/dist/chunks/chunk-4MQHIFZL.js +0 -2
- package/dist/chunks/chunk-55Q64WWF.js +0 -2
- package/dist/chunks/chunk-5KJMFK65.js +0 -2
- package/dist/chunks/chunk-5WPMI6QX.js +0 -2
- package/dist/chunks/chunk-7PKTCMZ6.js +0 -2
- package/dist/chunks/chunk-ANG2YMMD.js +0 -2
- package/dist/chunks/chunk-BQVB2SPF.js +0 -10
- package/dist/chunks/chunk-DMO3UIS7.js +0 -6
- package/dist/chunks/chunk-FEQ7HNJR.js +0 -2
- package/dist/chunks/chunk-G4E3WGLM.js +0 -13
- package/dist/chunks/chunk-H5ML7735.js +0 -2
- package/dist/chunks/chunk-I3NYYOSS.js +0 -2
- package/dist/chunks/chunk-IOSBGCRT.js +0 -2
- package/dist/chunks/chunk-JBFPTEVE.js +0 -2
- package/dist/chunks/chunk-JKI53ED7.js +0 -161
- package/dist/chunks/chunk-JRGECNP3.js +0 -2
- package/dist/chunks/chunk-L4EJ5R3B.js +0 -23
- package/dist/chunks/chunk-LXZLLTYQ.js +0 -2
- package/dist/chunks/chunk-MHPCVQOE.js +0 -2
- package/dist/chunks/chunk-MVPKU72J.js +0 -4
- package/dist/chunks/chunk-OKEC2EIE.js +0 -2
- package/dist/chunks/chunk-OW3EOC5Q.js +0 -4
- package/dist/chunks/chunk-QCJY6FTC.js +0 -3
- package/dist/chunks/chunk-SBQ6KLXB.js +0 -33
- package/dist/chunks/chunk-TVDZXDQW.js +0 -2
- package/dist/chunks/chunk-V3KEG6MI.js +0 -2
- package/dist/chunks/chunk-VD2TQCMH.js +0 -2
- package/dist/chunks/chunk-WLZJOCLA.js +0 -10
- package/dist/chunks/chunk-Y3B6ZUE6.js +0 -22
- package/dist/chunks/chunk-YBKDEEEH.js +0 -2
- package/dist/chunks/chunk-ZWW227M3.js +0 -2
- package/dist/chunks/cli-TE7RP5H7.js +0 -2
- package/dist/chunks/command-NW6BGKOM.js +0 -13
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +0 -2
- package/dist/chunks/connected-evidence-D7C45HYD.js +0 -2
- package/dist/chunks/core-commands-RXPXOYOP.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +0 -4
- package/dist/chunks/datasets-LBLEKLCS.js +0 -2
- package/dist/chunks/desktop-test-INJPZ5VP.js +0 -3
- package/dist/chunks/dist-J4KHAVO3.js +0 -2
- package/dist/chunks/evaluation-coordination-3ARLJAFH.js +0 -2
- package/dist/chunks/experiment-improvements-UB4C5CSP.js +0 -2
- package/dist/chunks/experiments-AHHKFJD6.js +0 -2
- package/dist/chunks/experiments-signal-MTR475QV.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +0 -2
- package/dist/chunks/host-profile-external-dataset-YRKG2GL5.js +0 -2
- package/dist/chunks/hosted-app-server-composition-GPXH3BOG.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NZTPZTDH.js +0 -3
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +0 -2
- package/dist/chunks/hosted-profile-candidate-3CAT3XBI.js +0 -3
- package/dist/chunks/hosted-profile-compiler-RXU626Q6.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-CBDRKJ5J.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-CHYKDYUQ.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-H5S7JZMD.js +0 -3
- package/dist/chunks/hosted-tasksets-AMGDDB2R.js +0 -2
- package/dist/chunks/human-review-DVHVJXBA.js +0 -2
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +0 -2
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +0 -2
- package/dist/chunks/learning-NJLTGZFQ.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-XEA73RGS.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SW35G4DM.js +0 -2
- package/dist/chunks/opchat-LMKH3OWR.js +0 -3
- package/dist/chunks/opchat-bounded-chat-PPOWO7H4.js +0 -2
- package/dist/chunks/organizations-T6ZUSHNJ.js +0 -2
- package/dist/chunks/project-action-payload-2G57RL74.js +0 -2
- package/dist/chunks/project-agent-GBMVDJY3.js +0 -2
- package/dist/chunks/published-experiment-source-D3C2AWQD.js +0 -2
- package/dist/chunks/refiner-profile-service-PPGGNVOV.js +0 -2
- package/dist/chunks/sandbox-command-L5VQ2T6C.js +0 -2
- package/dist/chunks/saved-work-LAVTNKPT.js +0 -2
- package/dist/chunks/setup-TXEM2QSG.js +0 -2
- package/dist/chunks/src-HJHIBDFX.js +0 -424
- package/dist/chunks/standalone-experiment-turn-owner-KKYIGGPF.js +0 -2
- package/dist/chunks/store-chat-resources-ZWDYMDJF.js +0 -2
- package/dist/chunks/store-conversation-serving-WRT4N7N2.js +0 -2
- package/dist/chunks/store-evaluation-results-BEPR4LVD.js +0 -7
- package/dist/chunks/store-human-review-HJ3D7ZFA.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-EXNRDHCO.js +0 -2
- package/dist/chunks/store-local-experiments-CBJA56X2.js +0 -97
- package/dist/chunks/store-model-batch-review-YIVD7T2T.js +0 -2
- package/dist/chunks/store-model-project-preparation-WWU5CJTV.js +0 -2
- package/dist/chunks/store-taskset-drafts-G3WFVN4M.js +0 -9
- package/dist/chunks/taskset-packages-NRRPON7B.js +0 -2
- package/dist/chunks/taskset-packages-RW4SFGDU.js +0 -2
- package/dist/chunks/tool-learning-O7QTTEDB.js +0 -2
- package/dist/chunks/training-XFM3OOPN.js +0 -2
- package/dist/chunks/training-XILDD5RG.js +0 -2
- package/dist/chunks/training-hosted-6BX2IASC.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +0 -2
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +0 -2
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +0 -2
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +0 -2
- package/dist/chunks/training-model-start-E5MP3URL.js +0 -2
- package/dist/chunks/web-search-56QRZGPR.js +0 -2
- package/dist/web/assets/App-CNQi3RlI.js +0 -53
- package/dist/web/assets/AppTerminalPanel-DLz34eSs.js +0 -2
- package/dist/web/assets/AppsView-DkCMr67-.js +0 -1
- package/dist/web/assets/BrowserSidebar-BBaaanMS.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-Ct59FKw1.js +0 -8
- package/dist/web/assets/CommunityView-BLTlSxyb.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-DWF6WPao.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BYl-2j7B.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CQz29DwD.js +0 -1
- package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
- package/dist/web/assets/LabsRoute-DJRgF1kQ.js +0 -101
- package/dist/web/assets/MainChatThread-gwmhe1Nw.js +0 -2
- package/dist/web/assets/MainPane-CqtgV9rU.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-DrQldDsG.js +0 -2
- package/dist/web/assets/RightChatPanelStack-xW5rKbp0.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-BDmIxvIm.js +0 -1
- package/dist/web/assets/TeamChatView-BisSMAXy.js +0 -1
- package/dist/web/assets/TrainingRunLineage-B2WBOchk.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-D3Ub_jVj.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-CyTa8Cjs.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-CtZzxQ1e.js +0 -35
- package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
- package/dist/web/assets/bot-D-eTQib6.js +0 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +0 -1
- package/dist/web/assets/chevron-down-75im8nFF.js +0 -1
- package/dist/web/assets/chevron-right-CpbCIUFo.js +0 -1
- package/dist/web/assets/chevron-up-BD8jg0bQ.js +0 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +0 -9
- package/dist/web/assets/chunk-H3JZ3P5T-B0SCoPw4.js +0 -2
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +0 -1
- package/dist/web/assets/cloud-upload-4lP-5zmp.js +0 -1
- package/dist/web/assets/common-BMjyKlX-.js +0 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +0 -1
- package/dist/web/assets/copy-DRnATDDY.js +0 -1
- package/dist/web/assets/create-pipeline-CyUZrbbO.js +0 -1
- package/dist/web/assets/createLucideIcon-CmkSm39S.js +0 -1
- package/dist/web/assets/external-link-D_nBEDFO.js +0 -1
- package/dist/web/assets/folder-open-tD5Lle1M.js +0 -1
- package/dist/web/assets/folder-plus-DlZ4hM48.js +0 -1
- package/dist/web/assets/git-commit-horizontal-g8KBhvfr.js +0 -1
- package/dist/web/assets/icons-B8_Rkg-l.js +0 -1
- package/dist/web/assets/image-CUZMnZYi.js +0 -1
- package/dist/web/assets/info-SmuBZiE5.js +0 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +0 -1
- package/dist/web/assets/loader-circle-D_KVxLLz.js +0 -1
- package/dist/web/assets/maximize-2-B8HN3jsA.js +0 -1
- package/dist/web/assets/message-square-CrDvzn66.js +0 -1
- package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
- package/dist/web/assets/monitor-CW-M_aaj.js +0 -1
- package/dist/web/assets/paperclip-DL449Io5.js +0 -1
- package/dist/web/assets/play-DYLqBrwg.js +0 -1
- package/dist/web/assets/plus-DXZIpQuY.js +0 -1
- package/dist/web/assets/presentation-CupIXaYv.js +0 -1
- package/dist/web/assets/refresh-cw-CzVf5_oo.js +0 -1
- package/dist/web/assets/reward-checks-Bcq9ETCA.js +0 -7
- package/dist/web/assets/save-DatjrYPV.js +0 -1
- package/dist/web/assets/schemas-lO3MoWQr.js +0 -64
- package/dist/web/assets/settings-D7C-Auyi.js +0 -21
- package/dist/web/assets/settings-lists-D2ol3uNK.js +0 -5
- package/dist/web/assets/square-BWB1nbZF.js +0 -1
- package/dist/web/assets/square-terminal-Buj-s-fz.js +0 -1
- package/dist/web/assets/training-DCdoHJ0Y.js +0 -2
- package/dist/web/assets/upload-DaFVH6R1.js +0 -1
- package/dist/web/assets/useQuery-yUz7Ui8g.js +0 -1
- package/dist/web/assets/wifi-off-CtNwnIJc.js +0 -1
- package/dist/web/assets/work-outputs-CK0nHe4g.js +0 -1
- package/dist/web/assets/x-Bhl-4Zlt.js +0 -1
- /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as g}from"./chunk-
|
|
2
|
+
import{b as g}from"./chunk-PAYFJHPO.js";import{A as p}from"./chunk-X2J2P5ZT.js";import{a as o}from"./chunk-FTQLQJQV.js";var x=p.object({schemaVersion:p.literal("openpond.taskAuthoringDecision.v1"),proposal:g}),T=10*6e4;function S(e){return b(e)}o(S,"createTaskAuthoringMessages");function A(e,n){let r=f(e);if(!r)throw new Error("Task authoring returned invalid structured output.");let i=h(r.proposal),s=m(i,n);if(s)throw new Error(`Task authoring returned an incompatible proposal: ${s}`);return i}o(A,"parseTaskAuthoringDecision");async function P(e){let n=w(e.signal,e.timeoutMs??T);try{let r=b(e),i=await y(e.stream({model:e.model,reasoningEffort:e.reasoningEffort,messages:r,signal:n.signal})),s=f(i),d=s?h(s.proposal):null,t=d?m(d,e.evidence):null;if(d&&!t)return{proposal:d,repairHistory:[]};let l=s?`The prior proposal is incompatible with the current Taskset materializer: ${t} Redesign it without changing the selected evidence.`:`The prior response was invalid. Return only valid JSON matching openpond.taskAuthoringDecision.v1. Invalid response:
|
|
3
3
|
${i.slice(0,2e4)}`,u=await y(e.stream({model:e.model,reasoningEffort:e.reasoningEffort,signal:n.signal,messages:[...r,{role:"user",content:l}]})),c=f(u);if(!c)throw new Error("Task authoring model returned invalid structured output after one repair attempt.");let a=h(c.proposal),v=m(a,e.evidence);if(v)throw new Error(`Task authoring model returned an incompatible proposal after one repair attempt: ${v}`);return{proposal:a,repairHistory:[{attempt:1,summary:"Repaired invalid or method-incompatible TaskDesignProposal output.",createdAt:new Date().toISOString()}]}}catch(r){throw n.signal.aborted&&!e.signal.aborted?new Error(`Task authoring timed out after ${n.timeoutMs}ms.`):r}finally{n.cleanup()}}o(P,"authorTaskDesignWithModel");function b(e){return[{role:"system",content:["You are OpenPond Taskset Authoring.","Use only the consented evidence supplied below.","Diagnose the work before designing a task. Repetition alone is not evidence that weights are the right intervention.","Produce one provider-neutral capability diagnosis and, only when justified, one task design. Separate policy-visible input from privileged outcomes.","The diagnosis must identify stableBehavior, changingKnowledge, requiredContext, requiredTools, the recommended intervention, whether training is eligible, and an evidence-backed rationale.","Use intervention=no_training when the behavior is already reliable or lacks a coherent repeated job. Use prompting when instructions or application logic are sufficient. Use retrieval when the primary value is changing facts or documents.","Prefer deterministic graders. Model judges must be calibrated and cannot silently become reward.","Do not fabricate expert approval, preferences, corrections, or rewards.","A methodHint is a user preference, not permission to misclassify the evidence. Explain a different recommendation when the hint is unsuitable.","A buildIntent is the learning signal the user wants to construct, not permission to invent unsupported demonstrations, preferences, rewards, or labels.","Historical assistant messages are candidate outcomes, not automatically approved truth. Exclude stale, contradictory, speculative, context-incomplete, or unsuccessful answers.","Explicitly selected local chats may supply extracted candidate examples when the assistant output is complete, internally consistent, and supports the stated objective. Do not require a separate historical expert-approval field; final approval occurs when the user creates the Taskset.","For each usable example, populate proposedExamples with its exact input and expected output, source and turn provenance, split, origin, and rationale.","Use origin=extracted only when inputPrompt and expectedOutputText exactly match the selected user/assistant pair. Label any repaired or newly generated text corrected or synthetic.","Keep every source cluster wholly within one data split. Evaluation examples should come from independent conversations when available.","For no_training, prompting, or retrieval recommendations, set trainingEligible=false, proposedMethod to none or retrieval as appropriate, and leave proposedExamples, graders, fixtures, and generated files empty.","Recommend provider-neutral methods from the evidence. A versioned executable environment with deterministic reward variance may justify GRPO even when the current local destination can execute only a separately labeled SFT trajectory bootstrap.","For Cross-System Operations traces, preserve the four required tools, the shared tool-contract hash, structured tool messages, split-isolated worlds, and the exact trajectory verifier. Never relabel the primary GRPO recommendation as SFT because local GPU execution is unavailable.","Generated verifier paths and custom-verifier modules must start with graders/. Fixture files must start with fixtures/ and environment files with environment/.","Return JSON only: {schemaVersion:'openpond.taskAuthoringDecision.v1', proposal: TaskDesignProposal}.",`TaskDesignProposal JSON schema:
|
|
4
4
|
${JSON.stringify(p.toJSONSchema(g),null,2)}`,"Follow the bundled Taskset Authoring skill below:",e.skillText].join(`
|
|
5
5
|
`)},{role:"user",content:JSON.stringify({proposalId:e.id,buildIntent:e.buildIntent,buildSpecification:e.buildSpecification,methodHint:e.methodHint??null,instruction:e.instruction??null,currentProposal:e.currentProposal??null,evidence:e.evidence},null,2)}]}o(b,"taskAuthoringMessages");function m(e,n){if(new Set(["no_training","prompting","retrieval"]).has(e.diagnosis.intervention)&&e.diagnosis.trainingEligible)return`${e.diagnosis.intervention} cannot be trainingEligible.`;if(e.diagnosis.intervention==="retrieval"&&e.proposedMethod!=="retrieval")return"Retrieval diagnoses must set proposedMethod=retrieval.";if((e.diagnosis.intervention==="no_training"||e.diagnosis.intervention==="prompting")&&e.proposedMethod!=="none")return`${e.diagnosis.intervention} diagnoses must set proposedMethod=none.`;if(!e.diagnosis.trainingEligible&&(e.proposedExamples.length||e.proposedGraders.length||e.graderFixtures.length||e.generatedFiles.length))return"Non-training diagnoses must not package training examples, graders, fixtures, or generated files.";if(e.diagnosis.trainingEligible&&e.diagnosis.stableBehavior.length===0)return"Training-eligible diagnoses must identify at least one stable behavior.";let i=new Set(n.map(t=>t.source.id));if(e.sourceIds.some(t=>!i.has(t)))return"proposal sourceIds must stay within the selected evidence.";for(let t of e.proposedExamples){if(!i.has(t.sourceId))return`Example ${t.id} references unselected source ${t.sourceId}.`;if(t.origin!=="extracted")continue;if(!t.sourceTurnId)return`Extracted example ${t.id} must declare sourceTurnId.`;let l=n.find(a=>a.source.id===t.sourceId),u=l?.excerpts.find(a=>a.role==="user"&&a.turnId===t.sourceTurnId),c=l?.excerpts.find(a=>a.role==="assistant"&&a.turnId===t.sourceTurnId);if(!u||u.text!==t.inputPrompt||!c||c.text!==t.expectedOutputText)return`Extracted example ${t.id} must exactly match its selected user/assistant pair.`}if(!e.diagnosis.trainingEligible)return null;if(!e.policy.policyVisibleFields.includes("input.prompt"))return"policyVisibleFields must include input.prompt.";if(!e.policy.privilegedFields.includes("expectedOutput.text"))return"privilegedFields must include expectedOutput.text.";if(e.proposedGraders.length===0)return"Training-eligible proposals must include an evaluation grader.";let s={verifier:"graders/",fixture:"fixtures/",environment:"environment/"};for(let t of e.generatedFiles)if(!t.path.replaceAll("\\","/").startsWith(s[t.role]))return`${t.role} file ${t.path} must start with ${s[t.role]}.`;let d=new Set(e.generatedFiles.map(t=>t.path.replaceAll("\\","/")));for(let t of e.proposedGraders){if(t.kind!=="custom_verifier")continue;let l=t.module.replaceAll("\\","/");if(!l.startsWith("graders/"))return`custom verifier ${t.id} module must start with graders/.`;if(!d.has(l))return`custom verifier ${t.id} module ${l} must have a matching generated file.`}return null}o(m,"proposalCompatibilityIssue");function h(e){return e.diagnosis.trainingEligible?g.parse({...e,policy:{...e.policy,policyVisibleFields:[...new Set([...e.policy.policyVisibleFields,"input.prompt"])],privilegedFields:[...new Set([...e.policy.privilegedFields,"expectedOutput.text"])]}}):e}o(h,"normalizePolicyBoundary");function w(e,n){let r=new AbortController,i=o(()=>r.abort(e.reason),"abortFromParent");e.aborted?i():e.addEventListener("abort",i,{once:!0});let s=setTimeout(()=>r.abort(new Error(`Task authoring timed out after ${n}ms.`)),n);return s.unref?.(),{signal:r.signal,timeoutMs:n,cleanup:o(()=>{clearTimeout(s),e.removeEventListener("abort",i)},"cleanup")}}o(w,"authoringTimeoutSignal");function f(e){let n=[e,e.replace(/^```(?:json)?\s*/i,"").replace(/```\s*$/,"")];for(let r of n)try{let i=x.safeParse(JSON.parse(r));if(i.success)return i.data}catch{}return null}o(f,"parseEnvelope");async function y(e){let n="";for await(let r of e)r.text&&(n+=r.text);return n}o(y,"collect");export{S as a,A as b,P as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{Ea as p,Wk as m,pl as u,rl as g}from"./chunk-6D3FI2XT.js";import{c as a,f as c,h}from"./chunk-3M53YXEI.js";import{a as l}from"./chunk-FTQLQJQV.js";var b=new Set(["hosted-saved-model-serving","hosted-control-steering-serving","hosted-import-calibration","hosted-calibration","hosted-calibrations","hosted-archive-calibration"]);async function S(w){let{action:r,target:s,teamId:t,options:i,client:o,readInput:n}=w;if(r==="hosted-calibration"){if(!s)throw new Error("Supply the original calibration ID.");return o.getNeuronCalibration(t,s)}if(r==="hosted-calibrations"){if(s)throw new Error("Use filters to list calibration history.");return o.listNeuronCalibrations(t,{projectId:a(i,"projectId")||void 0,modelHash:a(i,"modelHash")||void 0,archived:c(i.archived),cursor:a(i,"cursor")||void 0,limit:h(i.limit,"--limit")})}if(r==="hosted-saved-model-serving"){let e=p.parse(await n());return o.savedModelServing(e.modelProjectId,{teamId:t,versionHash:e.versionHash})}if(r==="hosted-control-steering-serving"){let e=m.parse(await n());if(e.request.teamId!==t)throw new Error("Use the Model's original workspace.");if(e.request.action==="activate"&&!c(i.yes))throw new Error("Activating billed serving capacity requires --yes.");return o.controlSteeringModelServing(e.modelProjectId,e.request)}if(r==="hosted-import-calibration"){let e=u.parse(await n());if(e.teamId!==t)throw new Error("Use the calibration's original workspace.");return o.importNeuronCalibration(e)}if(r==="hosted-archive-calibration"){let e=await n();if(!e||typeof e!="object"||!("id"in e)||typeof e.id!="string"||!("request"in e))throw new Error("Supply the calibration ID and original archive request.");let d=g.parse(e.request);if(d.teamId!==t)throw new Error("Use the calibration's original workspace.");return o.archiveNeuronCalibration(e.id,d)}throw new Error("Unsupported steering command.")}l(S,"runHostedSteeringCommand");export{b as a,S as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as N}from"./chunk-BSHAIAXY.js";import{c as u,f as E,g as M,h as S}from"./chunk-3M53YXEI.js";import{f as H,i as O,j as U}from"./chunk-5WPMI6QX.js";import{f as L,h as _}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import{readFile as x}from"node:fs/promises";import{request as J}from"node:http";import{randomUUID as V}from"node:crypto";import{createInterface as z}from"node:readline/promises";var F="http://127.0.0.1:17874",Y=128*1024*1024,W=new Set(["cancelled","completed","failed","succeeded"]);async function we(e,n,r={}){let t=n[0];if(t==="estimate"){await(await import("./training-hosted-6BX2IASC.js")).runHostedTrainingCommand(e,["hosted-estimate-model",...n.slice(1)]);return}if(t==="start"&&u(e,"teamId")){await(await import("./training-hosted-6BX2IASC.js")).runHostedTrainingCommand(e,["hosted-start-model",...n.slice(1)]);return}if(t?.startsWith("hosted-")){await(await import("./training-hosted-6BX2IASC.js")).runHostedTrainingCommand(e,n);return}let o=n[1];if(!t||!["start","status","watch","logs","cancel","resume","artifacts","benchmark","create-project","prepare-project","pull-project","projects","inspect-project"].includes(t)||!o&&t!=="projects")throw new Error("usage: training <projects|inspect-project|create-project|prepare-project|pull-project|start|status|watch|logs|cancel|resume|artifacts|benchmark> [identifier]");if(n.length>2)throw new Error(`training ${t} accepts exactly one identifier`);if(t==="projects"&&o)throw new Error("training projects does not accept an identifier; use inspect-project <id>.");let s=t==="pull-project"?u(e,"profile"):null;if(t==="pull-project"&&!s)throw new Error("training pull-project requires --profile <local-profile-id>.");let a=N(e)??process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/,"")??F;if(["pull-project","projects","inspect-project","prepare-project"].includes(t)){let c=new URL(a);if(c.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(c.hostname)||c.username||c.password||c.search||c.hash||c.pathname!=="/")throw new Error(`training ${t} uses the local app's HTTP loopback API; the app resolves its signed-in hosted account.`)}let i=new q({baseUrl:a,request:r.request??await K(a,{maximumResponseBytes:Y,timeoutMs:t==="pull-project"?3e5:6e4})}),d=E(e.json);if(t==="projects"||t==="inspect-project"){b(await i.inspectProjects(t==="inspect-project"?o:void 0,u(e,"profile")??void 0),d);return}if(!o)throw new Error(`training ${t} requires an identifier.`);if(t==="pull-project"){let c=u(e,"snapshotFile"),g=c?await x(c):null;if(g&&g.byteLength>64*1024*1024)throw new Error("Model pull snapshot exceeds 64 MiB.");let P=g?JSON.parse(g.toString("utf8")):void 0;b(await i.pullHostedProject(o,s,P),d);return}if(t==="create-project"){let c=await Z({client:i,options:e,tasksetId:o});b(c,d);return}if(t==="prepare-project"){await(await import("./training-project-preparation-XWGRY5ME.js")).runProjectPreparation(i,o,e);return}if(t==="benchmark"){await Q({client:i,modelId:o,options:e,json:d,sleep:r.sleep});return}if(t==="resume"){let c=await i.modelRun(o,"resume","POST");b(c,d),await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}if(t==="start"){await re({client:i,dependencies:r,json:d,modelRunId:o,options:e});return}if(t==="watch"){await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}let w=t==="status"?"status":t==="logs"?"logs":t==="artifacts"?"artifacts":"cancel",y=await i.modelRun(o,w,t==="cancel"?"POST":"GET");b(y,d)}l(we,"runTrainingCommand");async function K(e,n={}){let r=new URL(e);if(r.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(r.hostname))return fetch;let t=(await x(_(L()).token,"utf8")).trim();if(!t)throw new Error("OpenPond local capability token is empty.");let o=n.maximumResponseBytes??8388608,s=n.timeoutMs??6e4;if(!Number.isSafeInteger(s)||s<1||s>864e5)throw new Error("Local request timeout must be between one millisecond and one day.");return(async(a,i={})=>{let d=a instanceof Request?new URL(a.url):new URL(String(a));if(d.origin!==r.origin||d.username||d.password)throw new Error("Local capability requests must remain on the selected server origin.");let w=new Headers(i.headers);w.set("authorization",`Bearer ${t}`);let y={};w.forEach((g,P)=>{y[P]=g});let c=i.signal?AbortSignal.any([i.signal,AbortSignal.timeout(s)]):AbortSignal.timeout(s);return new Promise((g,P)=>{let R=!1,h=J(d,{method:i.method??"GET",headers:y},m=>{let T=[],v=0;m.on("data",f=>{if(v+=f.byteLength,v>o){m.destroy(new Error(`Local response exceeds ${o} bytes.`));return}T.push(f)}),m.once("error",k),m.once("end",()=>{if(R)return;R=!0;let f=new Headers;for(let[j,I]of Object.entries(m.headers))if(Array.isArray(I))for(let G of I)f.append(j,G);else I!==void 0&&f.set(j,I);g(new Response(new Uint8Array(Buffer.concat(T)),{status:m.statusCode??500,statusText:m.statusMessage,headers:f}))})}),k=l(m=>{R||(R=!0,P(m))},"rejectOnce");if(h.once("error",k),c){let m=l(()=>h.destroy(c.reason instanceof Error?c.reason:new Error("Training API request aborted.")),"abort");c.aborted?m():c.addEventListener("abort",m,{once:!0})}if(i.body!==void 0&&i.body!==null){if(typeof i.body!="string"&&!(i.body instanceof Uint8Array)){h.destroy(new Error("Local Training API supports string or byte request bodies."));return}h.write(i.body)}h.end()})})}l(K,"createLocalAuthenticatedRequest");var q=class{static{l(this,"TrainingApiClient")}baseUrl;request;constructor(n){this.baseUrl=n.baseUrl.replace(/\/$/,""),this.request=n.request??fetch}async modelRun(n,r,t,o){let s=await this.json(`/v1/training/model-runs/${encodeURIComponent(n)}/${r}`,t,o);return await this.attachTraining({modelRunId:n}),s}prepareModelProject(n,r){return this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/prepare`,"POST",r)}async startModelProject(n,r){let t=await this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/start`,"POST",r),o=t&&typeof t=="object"&&"job"in t?t.job:null;return o&&typeof o=="object"&&"id"in o&&typeof o.id=="string"&&await this.attachTraining({jobId:o.id}),t}async attachTraining(n){let r=process.env.OPENPOND_CHAT_INVOCATION;if(r)try{await this.json("/v1/chat-experiments","POST",{action:"attach_training",payload:n,invocationToken:r})}catch(t){console.error(`Training operation succeeded, but chat attachment failed: ${t instanceof Error?t.message:String(t)}. Inspect the saved job to retry attachment; do not submit it again.`)}}trainingState(n){let r=n?`?profileId=${encodeURIComponent(n)}`:"";return this.json(`/v1/training${r}`,"GET")}inspectProjects(n,r){let t=r?`?profileId=${encodeURIComponent(r)}`:"";return this.json(`/v1/training/model-projects${n?`/${encodeURIComponent(n)}`:""}${t}`,"GET")}pullHostedProject(n,r,t){return this.json(`/v1/training/hosted-model-projects/${encodeURIComponent(n)}/pull`,"POST",{profileId:r,...t!==void 0?{snapshot:t}:{}})}startHarnessRefinerBenchmark(n,r){return this.json(`/v1/training/models/${encodeURIComponent(n)}/harness-refiner-benchmark`,"POST",r)}importTasksetDraftPackage(n){return this.json("/v1/training/taskset-drafts/import","POST",n)}publishTasksetDraft(n,r){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}/publish`,"POST",r?{modelId:r}:{})}tasksetReadiness(n){return this.json("/v1/training/readiness","POST",{tasksetId:n})}deleteTasksetDraft(n){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}`,"DELETE")}saveModelProject(n){return this.json("/v1/training/models","PUT",n)}prepareLocalModelProject(n,r){return this.json(`/v1/training/model-project-preparations/${r?"apply":"prepare"}`,"POST",n)}async json(n,r,t){let o=await this.request(`${this.baseUrl}${n}`,{method:r,headers:t===void 0?{Accept:"application/json"}:{Accept:"application/json","Content-Type":"application/json"},body:t===void 0?void 0:JSON.stringify(t)}),s=await o.text(),a=null;if(s)try{a=JSON.parse(s)}catch{a=s}if(!o.ok){let i=a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:`${o.status} ${o.statusText}`.trim();throw new Error(`Training API request failed: ${i}`)}return a}};async function Q(e){let n=await e.client.trainingState(u(e.options,"profile")),r=X(n,e.modelId),t=u(e.options,"provider")||"openpond",o=u(e.options,"model")||"openpond-chat",s=u(e.options,"reasoningEffort")||"high",a=M(e.options.maxSpend,"max-spend")??10;if(a<=0)throw new Error("max-spend must be greater than zero");if(E(e.options.detach))throw new Error("Harness Refiner benchmark runs must be watched to terminal state.");let i=await e.client.startHarnessRefinerBenchmark(e.modelId,{profileId:r.profileId,model:{providerId:t,modelId:o},reasoningEffort:s==="none"?"none":s,maximumSpendUsd:a});b(i,e.json);let d=p(i,"id");if(!d)throw new Error("Benchmark start did not return a Model Run id.");await A({client:e.client,runId:d,json:e.json,intervalMs:S(e.options.intervalMs,"interval-ms")??2e3,sleep:e.sleep})}l(Q,"startHarnessRefinerBenchmark");function X(e,n){if(!e||typeof e!="object"||!("modelProjects"in e))throw new Error("Training state did not include Models.");let t=(Array.isArray(e.modelProjects)?e.modelProjects:[]).find(s=>s&&typeof s=="object"&&"id"in s&&s.id===n),o=t&&typeof t=="object"?p(t,"profileId"):null;if(!o)throw new Error(`Model ${n} was not found.`);return{profileId:o}}l(X,"modelProject");function p(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="string"&&r?r:null}l(p,"objectString");async function Z(e){let n=u(e.options,"recipe");if(!n)throw new Error("training create-project requires --recipe <versioned-recipe.json>");let r=await te(n,"Training recipe"),t=u(e.options,"profile"),o=await e.client.trainingState(t),s=ne(o,"tasksets",e.tasksetId,"Taskset"),a=t||p(s,"profileId");if(!a)throw new Error(`The Taskset has no Profile id (received ${typeof s.profileId}: ${String(s.profileId)}).`);let i=p(s,"profileId");if(i!==a)throw new Error(`Taskset ${e.tasksetId} belongs to Profile ${i??"unknown"}, not ${a}.`);let d=u(e.options,"projectId")||`model_${V()}`,w=t?o:await e.client.trainingState(a),c=D(w,"modelProjects").find(j=>p(j,"id")===d),g=C(e.options,"rolloutPlacement",["local","remote"],"local"),P=C(e.options,"gpuPlacementObjective",["fast","balanced","economical"],"balanced"),R=C(e.options,"runPreset",["small","standard","custom","small_experiment"],"custom"),h=M(e.options.maxSpend,"max-spend")??null;if(h!==null&&h<0)throw new Error("max-spend must be non-negative");let k=S(e.options.retentionDays,"retention-days")??null;if(k!==null&&k<0)throw new Error("retention-days must be non-negative");let m=p(s,"contentHash"),T=B(s,"revision");if(!m||!T||T<1)throw new Error("The Taskset does not have an immutable published revision.");let v=p(r,"method");if(!v)throw new Error("Training recipe must declare its method.");let f=ee(r);if(c){let j=$(c,"trainingSetup"),I=$(j,"tasksetRef");if(p(I,"id")!==e.tasksetId||p(c,"profileId")!==a)throw new Error(`Model Project ${d} already exists for a different Profile or Taskset.`);if($(j,"baseModel"))throw new Error(`Model Project ${d} already exists.`);return e.client.saveModelProject(await U(O.parse({...O.strip().parse(c),defaultBaseModel:f,trainingSetup:{...j,baseModel:f,recipe:r}}),B(c,"revision")??1))}return e.client.saveModelProject(await U(O.parse({id:d,profileId:a,name:u(e.options,"name")||p(s,"name")||"Managed Model",objective:u(e.options,"objective")||p(s,"objective"),defaultBaseModel:f,defaultDestinationId:u(e.options,"destination")||"openpond_managed",trainingSetup:{tasksetRef:{id:e.tasksetId,revision:T,contentHash:m},tasksetRelease:null,harnessRelease:null,baseModel:f,method:v,destinationId:u(e.options,"destination")||"openpond_managed",managedRolloutPlacement:g,managedGpuPlacementObjective:P,managedGpuRequirement:"any",runPreset:R,recipe:r,preferredMaximumSpendUsd:h,preferredRetentionDays:k}}),0))}l(Z,"createManagedModelProject");function ee(e){let n=$(e,"baseModel"),r=p(n,"id"),t=p(n,"revision"),o=p(n,"tokenizerRevision"),s=p(n,"chatTemplateHash");if(!r||!t||!o||!s)throw new Error("Managed GRPO recipe must pin baseModel id, revision, tokenizerRevision, and chatTemplateHash.");return H.parse({schemaVersion:"openpond.baseModelPreference.v1",modelId:r,revision:t,tokenizerRevision:o,chatTemplateHash:s,modelAssetId:null,source:"managed"})}l(ee,"managedBasePreferenceFromRecipe");function ne(e,n,r,t){let o=D(e,n).find(s=>p(s,"id")===r);if(!o)throw new Error(`${t} ${r} was not found.`);return o}l(ne,"trainingStateRecord");function D(e,n){if(!e||typeof e!="object"||!(n in e))return[];let r=e[n];return Array.isArray(r)?r.filter(t=>!!t&&typeof t=="object"&&!Array.isArray(t)):[]}l(D,"trainingStateRecords");function B(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="number"&&Number.isFinite(r)?r:null}l(B,"objectNumber");function $(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return r&&typeof r=="object"&&!Array.isArray(r)?r:null}l($,"objectRecord");function C(e,n,r,t){let o=u(e,n)||t;if(!r.includes(o))throw new Error(`${n} must be one of ${r.join(", ")}`);return o}l(C,"enumOption");async function te(e,n){let r;try{r=JSON.parse(await x(e,"utf8"))}catch(t){throw new Error(`Could not read ${n} ${e}: ${t instanceof Error?t.message:String(t)}`)}if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${n} must be a JSON object.`);return r}l(te,"readJsonObject");async function re(e){let n=M(e.options.maxSpend,"max-spend")??null;if(n!==null&&n<0)throw new Error("max-spend must be non-negative");let r=S(e.options.retentionDays,"retention-days")??null;if(r!==null&&r<=0)throw new Error("retention-days must be a positive integer");let t=u(e.options,"manifest"),o=t?await oe(t):void 0,s=u(e.options,"comparisonSeriesEntry")||null,a={maximumSpendUsd:n,retentionDays:r},i=await e.client.prepareModelProject(e.modelRunId,a);if(e.json||(console.log("Preparation:"),console.log(JSON.stringify(i,null,2))),!(E(e.options.yes)||await se(e.dependencies.confirm)))throw new Error("Training start cancelled.");let w=await e.client.startModelProject(e.modelRunId,{...a,exportApproved:E(e.options.exportApproved),manifest:o,comparisonSeriesEntryId:s});if(b(w,e.json),E(e.options.detach))return;let y=ie(w)??e.modelRunId;await A({client:e.client,runId:y,json:e.json,intervalMs:2e3,sleep:e.dependencies.sleep})}l(re,"startTraining");async function A(e){if(e.intervalMs<250)throw new Error("interval-ms must be at least 250");let n=e.sleep??(t=>new Promise(o=>setTimeout(o,t))),r="";for(;;){let t=await e.client.modelRun(e.runId,"status","GET"),o=JSON.stringify(t);if((e.json||o!==r)&&(b(t,e.json),r=o),W.has(ae(t)))return;await n(e.intervalMs)}}l(A,"watchTraining");async function oe(e){let n;try{n=JSON.parse(await x(e,"utf8"))}catch(r){throw new Error(`Could not read Harness Run Manifest ${e}: ${r instanceof Error?r.message:String(r)}`)}if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Harness Run Manifest must be a JSON object.");return n}l(oe,"readManifest");async function se(e){let n="Start this exact prepared training run? Downloads, provisioning, or spend may begin.";if(e)return e(n);if(!process.stdin.isTTY||!process.stdout.isTTY)throw new Error("training start requires --yes when standard input is not interactive");let r=z({input:process.stdin,output:process.stdout});try{let t=await r.question(`${n} [y/N] `);return t.trim().toLowerCase()==="y"||t.trim().toLowerCase()==="yes"}finally{r.close()}}l(se,"confirmStart");function ie(e){if(!e||typeof e!="object")return null;let n="job"in e?e.job:null;return!n||typeof n!="object"||!("id"in n)?null:typeof n.id=="string"?n.id:null}l(ie,"readRunId");function ae(e){return!e||typeof e!="object"?"":"state"in e&&typeof e.state=="string"?e.state:"status"in e&&typeof e.status=="string"?e.status:""}l(ae,"readStatus");function b(e,n){if(n){console.log(JSON.stringify(e));return}console.log(JSON.stringify(e,null,2))}l(b,"printResult");export{F as a,Y as b,we as c,K as d,q as e};
|
|
2
|
+
import{j as H,n as O,p as U}from"./chunk-AFYYIJ6K.js";import{c as N}from"./chunk-BSHAIAXY.js";import{c as u,f as E,g as M,h as S}from"./chunk-3M53YXEI.js";import{f as L,h as _}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import{readFile as x}from"node:fs/promises";import{request as J}from"node:http";import{randomUUID as V}from"node:crypto";import{createInterface as z}from"node:readline/promises";var F="http://127.0.0.1:17874",Y=128*1024*1024,W=new Set(["cancelled","completed","failed","succeeded"]);async function we(e,n,r={}){let t=n[0];if(t==="estimate"){await(await import("./training-hosted-CKSDRVL6.js")).runHostedTrainingCommand(e,["hosted-estimate-model",...n.slice(1)]);return}if(t==="start"&&u(e,"teamId")){await(await import("./training-hosted-CKSDRVL6.js")).runHostedTrainingCommand(e,["hosted-start-model",...n.slice(1)]);return}if(t?.startsWith("hosted-")){await(await import("./training-hosted-CKSDRVL6.js")).runHostedTrainingCommand(e,n);return}let o=n[1];if(!t||!["start","status","watch","logs","cancel","resume","artifacts","benchmark","create-project","prepare-project","pull-project","projects","inspect-project"].includes(t)||!o&&t!=="projects")throw new Error("usage: training <projects|inspect-project|create-project|prepare-project|pull-project|start|status|watch|logs|cancel|resume|artifacts|benchmark> [identifier]");if(n.length>2)throw new Error(`training ${t} accepts exactly one identifier`);if(t==="projects"&&o)throw new Error("training projects does not accept an identifier; use inspect-project <id>.");let s=t==="pull-project"?u(e,"profile"):null;if(t==="pull-project"&&!s)throw new Error("training pull-project requires --profile <local-profile-id>.");let a=N(e)??process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/,"")??F;if(["pull-project","projects","inspect-project","prepare-project"].includes(t)){let c=new URL(a);if(c.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(c.hostname)||c.username||c.password||c.search||c.hash||c.pathname!=="/")throw new Error(`training ${t} uses the local app's HTTP loopback API; the app resolves its signed-in hosted account.`)}let i=new q({baseUrl:a,request:r.request??await K(a,{maximumResponseBytes:Y,timeoutMs:t==="pull-project"?3e5:6e4})}),d=E(e.json);if(t==="projects"||t==="inspect-project"){b(await i.inspectProjects(t==="inspect-project"?o:void 0,u(e,"profile")??void 0),d);return}if(!o)throw new Error(`training ${t} requires an identifier.`);if(t==="pull-project"){let c=u(e,"snapshotFile"),g=c?await x(c):null;if(g&&g.byteLength>64*1024*1024)throw new Error("Model pull snapshot exceeds 64 MiB.");let P=g?JSON.parse(g.toString("utf8")):void 0;b(await i.pullHostedProject(o,s,P),d);return}if(t==="create-project"){let c=await Z({client:i,options:e,tasksetId:o});b(c,d);return}if(t==="prepare-project"){await(await import("./training-project-preparation-XWGRY5ME.js")).runProjectPreparation(i,o,e);return}if(t==="benchmark"){await Q({client:i,modelId:o,options:e,json:d,sleep:r.sleep});return}if(t==="resume"){let c=await i.modelRun(o,"resume","POST");b(c,d),await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}if(t==="start"){await re({client:i,dependencies:r,json:d,modelRunId:o,options:e});return}if(t==="watch"){await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}let w=t==="status"?"status":t==="logs"?"logs":t==="artifacts"?"artifacts":"cancel",y=await i.modelRun(o,w,t==="cancel"?"POST":"GET");b(y,d)}l(we,"runTrainingCommand");async function K(e,n={}){let r=new URL(e);if(r.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(r.hostname))return fetch;let t=(await x(_(L()).token,"utf8")).trim();if(!t)throw new Error("OpenPond local capability token is empty.");let o=n.maximumResponseBytes??8388608,s=n.timeoutMs??6e4;if(!Number.isSafeInteger(s)||s<1||s>864e5)throw new Error("Local request timeout must be between one millisecond and one day.");return(async(a,i={})=>{let d=a instanceof Request?new URL(a.url):new URL(String(a));if(d.origin!==r.origin||d.username||d.password)throw new Error("Local capability requests must remain on the selected server origin.");let w=new Headers(i.headers);w.set("authorization",`Bearer ${t}`);let y={};w.forEach((g,P)=>{y[P]=g});let c=i.signal?AbortSignal.any([i.signal,AbortSignal.timeout(s)]):AbortSignal.timeout(s);return new Promise((g,P)=>{let R=!1,h=J(d,{method:i.method??"GET",headers:y},m=>{let T=[],v=0;m.on("data",f=>{if(v+=f.byteLength,v>o){m.destroy(new Error(`Local response exceeds ${o} bytes.`));return}T.push(f)}),m.once("error",k),m.once("end",()=>{if(R)return;R=!0;let f=new Headers;for(let[j,I]of Object.entries(m.headers))if(Array.isArray(I))for(let G of I)f.append(j,G);else I!==void 0&&f.set(j,I);g(new Response(new Uint8Array(Buffer.concat(T)),{status:m.statusCode??500,statusText:m.statusMessage,headers:f}))})}),k=l(m=>{R||(R=!0,P(m))},"rejectOnce");if(h.once("error",k),c){let m=l(()=>h.destroy(c.reason instanceof Error?c.reason:new Error("Training API request aborted.")),"abort");c.aborted?m():c.addEventListener("abort",m,{once:!0})}if(i.body!==void 0&&i.body!==null){if(typeof i.body!="string"&&!(i.body instanceof Uint8Array)){h.destroy(new Error("Local Training API supports string or byte request bodies."));return}h.write(i.body)}h.end()})})}l(K,"createLocalAuthenticatedRequest");var q=class{static{l(this,"TrainingApiClient")}baseUrl;request;constructor(n){this.baseUrl=n.baseUrl.replace(/\/$/,""),this.request=n.request??fetch}async modelRun(n,r,t,o){let s=await this.json(`/v1/training/model-runs/${encodeURIComponent(n)}/${r}`,t,o);return await this.attachTraining({modelRunId:n}),s}prepareModelProject(n,r){return this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/prepare`,"POST",r)}async startModelProject(n,r){let t=await this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/start`,"POST",r),o=t&&typeof t=="object"&&"job"in t?t.job:null;return o&&typeof o=="object"&&"id"in o&&typeof o.id=="string"&&await this.attachTraining({jobId:o.id}),t}async attachTraining(n){let r=process.env.OPENPOND_CHAT_INVOCATION;if(r)try{await this.json("/v1/chat-experiments","POST",{action:"attach_training",payload:n,invocationToken:r})}catch(t){console.error(`Training operation succeeded, but chat attachment failed: ${t instanceof Error?t.message:String(t)}. Inspect the saved job to retry attachment; do not submit it again.`)}}trainingState(n){let r=n?`?profileId=${encodeURIComponent(n)}`:"";return this.json(`/v1/training${r}`,"GET")}inspectProjects(n,r){let t=r?`?profileId=${encodeURIComponent(r)}`:"";return this.json(`/v1/training/model-projects${n?`/${encodeURIComponent(n)}`:""}${t}`,"GET")}pullHostedProject(n,r,t){return this.json(`/v1/training/hosted-model-projects/${encodeURIComponent(n)}/pull`,"POST",{profileId:r,...t!==void 0?{snapshot:t}:{}})}startHarnessRefinerBenchmark(n,r){return this.json(`/v1/training/models/${encodeURIComponent(n)}/harness-refiner-benchmark`,"POST",r)}importTasksetDraftPackage(n){return this.json("/v1/training/taskset-drafts/import","POST",n)}publishTasksetDraft(n,r){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}/publish`,"POST",r?{modelId:r}:{})}tasksetReadiness(n){return this.json("/v1/training/readiness","POST",{tasksetId:n})}deleteTasksetDraft(n){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}`,"DELETE")}saveModelProject(n){return this.json("/v1/training/models","PUT",n)}prepareLocalModelProject(n,r){return this.json(`/v1/training/model-project-preparations/${r?"apply":"prepare"}`,"POST",n)}async json(n,r,t){let o=await this.request(`${this.baseUrl}${n}`,{method:r,headers:t===void 0?{Accept:"application/json"}:{Accept:"application/json","Content-Type":"application/json"},body:t===void 0?void 0:JSON.stringify(t)}),s=await o.text(),a=null;if(s)try{a=JSON.parse(s)}catch{a=s}if(!o.ok){let i=a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:`${o.status} ${o.statusText}`.trim();throw new Error(`Training API request failed: ${i}`)}return a}};async function Q(e){let n=await e.client.trainingState(u(e.options,"profile")),r=X(n,e.modelId),t=u(e.options,"provider")||"openpond",o=u(e.options,"model")||"openpond-chat",s=u(e.options,"reasoningEffort")||"high",a=M(e.options.maxSpend,"max-spend")??10;if(a<=0)throw new Error("max-spend must be greater than zero");if(E(e.options.detach))throw new Error("Harness Refiner benchmark runs must be watched to terminal state.");let i=await e.client.startHarnessRefinerBenchmark(e.modelId,{profileId:r.profileId,model:{providerId:t,modelId:o},reasoningEffort:s==="none"?"none":s,maximumSpendUsd:a});b(i,e.json);let d=p(i,"id");if(!d)throw new Error("Benchmark start did not return a Model Run id.");await A({client:e.client,runId:d,json:e.json,intervalMs:S(e.options.intervalMs,"interval-ms")??2e3,sleep:e.sleep})}l(Q,"startHarnessRefinerBenchmark");function X(e,n){if(!e||typeof e!="object"||!("modelProjects"in e))throw new Error("Training state did not include Models.");let t=(Array.isArray(e.modelProjects)?e.modelProjects:[]).find(s=>s&&typeof s=="object"&&"id"in s&&s.id===n),o=t&&typeof t=="object"?p(t,"profileId"):null;if(!o)throw new Error(`Model ${n} was not found.`);return{profileId:o}}l(X,"modelProject");function p(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="string"&&r?r:null}l(p,"objectString");async function Z(e){let n=u(e.options,"recipe");if(!n)throw new Error("training create-project requires --recipe <versioned-recipe.json>");let r=await te(n,"Training recipe"),t=u(e.options,"profile"),o=await e.client.trainingState(t),s=ne(o,"tasksets",e.tasksetId,"Taskset"),a=t||p(s,"profileId");if(!a)throw new Error(`The Taskset has no Profile id (received ${typeof s.profileId}: ${String(s.profileId)}).`);let i=p(s,"profileId");if(i!==a)throw new Error(`Taskset ${e.tasksetId} belongs to Profile ${i??"unknown"}, not ${a}.`);let d=u(e.options,"projectId")||`model_${V()}`,w=t?o:await e.client.trainingState(a),c=D(w,"modelProjects").find(j=>p(j,"id")===d),g=C(e.options,"rolloutPlacement",["local","remote"],"local"),P=C(e.options,"gpuPlacementObjective",["fast","balanced","economical"],"balanced"),R=C(e.options,"runPreset",["small","standard","custom","small_experiment"],"custom"),h=M(e.options.maxSpend,"max-spend")??null;if(h!==null&&h<0)throw new Error("max-spend must be non-negative");let k=S(e.options.retentionDays,"retention-days")??null;if(k!==null&&k<0)throw new Error("retention-days must be non-negative");let m=p(s,"contentHash"),T=B(s,"revision");if(!m||!T||T<1)throw new Error("The Taskset does not have an immutable published revision.");let v=p(r,"method");if(!v)throw new Error("Training recipe must declare its method.");let f=ee(r);if(c){let j=$(c,"trainingSetup"),I=$(j,"tasksetRef");if(p(I,"id")!==e.tasksetId||p(c,"profileId")!==a)throw new Error(`Model Project ${d} already exists for a different Profile or Taskset.`);if($(j,"baseModel"))throw new Error(`Model Project ${d} already exists.`);return e.client.saveModelProject(await U(O.parse({...O.strip().parse(c),defaultBaseModel:f,trainingSetup:{...j,baseModel:f,recipe:r}}),B(c,"revision")??1))}return e.client.saveModelProject(await U(O.parse({id:d,profileId:a,name:u(e.options,"name")||p(s,"name")||"Managed Model",objective:u(e.options,"objective")||p(s,"objective"),defaultBaseModel:f,defaultDestinationId:u(e.options,"destination")||"openpond_managed",trainingSetup:{tasksetRef:{id:e.tasksetId,revision:T,contentHash:m},tasksetRelease:null,harnessRelease:null,baseModel:f,method:v,destinationId:u(e.options,"destination")||"openpond_managed",managedRolloutPlacement:g,managedGpuPlacementObjective:P,managedGpuRequirement:"any",runPreset:R,recipe:r,preferredMaximumSpendUsd:h,preferredRetentionDays:k}}),0))}l(Z,"createManagedModelProject");function ee(e){let n=$(e,"baseModel"),r=p(n,"id"),t=p(n,"revision"),o=p(n,"tokenizerRevision"),s=p(n,"chatTemplateHash");if(!r||!t||!o||!s)throw new Error("Managed GRPO recipe must pin baseModel id, revision, tokenizerRevision, and chatTemplateHash.");return H.parse({schemaVersion:"openpond.baseModelPreference.v1",modelId:r,revision:t,tokenizerRevision:o,chatTemplateHash:s,modelAssetId:null,source:"managed"})}l(ee,"managedBasePreferenceFromRecipe");function ne(e,n,r,t){let o=D(e,n).find(s=>p(s,"id")===r);if(!o)throw new Error(`${t} ${r} was not found.`);return o}l(ne,"trainingStateRecord");function D(e,n){if(!e||typeof e!="object"||!(n in e))return[];let r=e[n];return Array.isArray(r)?r.filter(t=>!!t&&typeof t=="object"&&!Array.isArray(t)):[]}l(D,"trainingStateRecords");function B(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="number"&&Number.isFinite(r)?r:null}l(B,"objectNumber");function $(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return r&&typeof r=="object"&&!Array.isArray(r)?r:null}l($,"objectRecord");function C(e,n,r,t){let o=u(e,n)||t;if(!r.includes(o))throw new Error(`${n} must be one of ${r.join(", ")}`);return o}l(C,"enumOption");async function te(e,n){let r;try{r=JSON.parse(await x(e,"utf8"))}catch(t){throw new Error(`Could not read ${n} ${e}: ${t instanceof Error?t.message:String(t)}`)}if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${n} must be a JSON object.`);return r}l(te,"readJsonObject");async function re(e){let n=M(e.options.maxSpend,"max-spend")??null;if(n!==null&&n<0)throw new Error("max-spend must be non-negative");let r=S(e.options.retentionDays,"retention-days")??null;if(r!==null&&r<=0)throw new Error("retention-days must be a positive integer");let t=u(e.options,"manifest"),o=t?await oe(t):void 0,s=u(e.options,"comparisonSeriesEntry")||null,a={maximumSpendUsd:n,retentionDays:r},i=await e.client.prepareModelProject(e.modelRunId,a);if(e.json||(console.log("Preparation:"),console.log(JSON.stringify(i,null,2))),!(E(e.options.yes)||await se(e.dependencies.confirm)))throw new Error("Training start cancelled.");let w=await e.client.startModelProject(e.modelRunId,{...a,exportApproved:E(e.options.exportApproved),manifest:o,comparisonSeriesEntryId:s});if(b(w,e.json),E(e.options.detach))return;let y=ie(w)??e.modelRunId;await A({client:e.client,runId:y,json:e.json,intervalMs:2e3,sleep:e.dependencies.sleep})}l(re,"startTraining");async function A(e){if(e.intervalMs<250)throw new Error("interval-ms must be at least 250");let n=e.sleep??(t=>new Promise(o=>setTimeout(o,t))),r="";for(;;){let t=await e.client.modelRun(e.runId,"status","GET"),o=JSON.stringify(t);if((e.json||o!==r)&&(b(t,e.json),r=o),W.has(ae(t)))return;await n(e.intervalMs)}}l(A,"watchTraining");async function oe(e){let n;try{n=JSON.parse(await x(e,"utf8"))}catch(r){throw new Error(`Could not read Harness Run Manifest ${e}: ${r instanceof Error?r.message:String(r)}`)}if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Harness Run Manifest must be a JSON object.");return n}l(oe,"readManifest");async function se(e){let n="Start this exact prepared training run? Downloads, provisioning, or spend may begin.";if(e)return e(n);if(!process.stdin.isTTY||!process.stdout.isTTY)throw new Error("training start requires --yes when standard input is not interactive");let r=z({input:process.stdin,output:process.stdout});try{let t=await r.question(`${n} [y/N] `);return t.trim().toLowerCase()==="y"||t.trim().toLowerCase()==="yes"}finally{r.close()}}l(se,"confirmStart");function ie(e){if(!e||typeof e!="object")return null;let n="job"in e?e.job:null;return!n||typeof n!="object"||!("id"in n)?null:typeof n.id=="string"?n.id:null}l(ie,"readRunId");function ae(e){return!e||typeof e!="object"?"":"state"in e&&typeof e.state=="string"?e.state:"status"in e&&typeof e.status=="string"?e.status:""}l(ae,"readStatus");function b(e,n){if(n){console.log(JSON.stringify(e));return}console.log(JSON.stringify(e,null,2))}l(b,"printResult");export{F as a,Y as b,we as c,K as d,q as e};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as x}from"./chunk-XRKFTPHD.js";import{f as C}from"./chunk-3M53YXEI.js";import{a as t}from"./chunk-FTQLQJQV.js";var S={name:"training",usage:"openpond training <projects|inspect-project|create-project|prepare-project|pull-project|estimate|start|status|watch|logs|cancel|resume|artifacts|benchmark> [identifier]",usages:["openpond training estimate <hosted-model-project-id> --team-id <id> [--batch-id <id>] [--gpu-type <type> --availability-id <id> | --gpu-placement-objective <objective>] [--gpu-count <1|2>] [--api-base-url <url>] [--json]","openpond training hosted-estimate <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-funding <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-funding-handoff <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training prepare-project <input.json> [--dry-run] [--output <receipt.json>] [--json]","openpond training prepare-project <reviewed-receipt.json> --apply [--output <saved.json>] [--json]","openpond training pull-project <hosted-model-project-id> --profile <local-profile-id> [--snapshot-file <verified-package-and-projection.json>] [--json]","openpond training projects [--profile <local-profile-id>] [--json]","openpond training inspect-project <local-model-project-id> [--profile <local-profile-id>] [--json]","openpond training create-project <taskset-id> --recipe <path> [--project-id <id>] [--profile <id>] [--name <name>] [--objective <text>] [--destination <id>] [--rollout-placement <local|remote>] [--gpu-placement-objective <fast|balanced|economical>] [--run-preset <preset>] [--max-spend <usd>] [--retention-days <days>] [--json]","openpond training start <hosted-model-project-id> --team-id <id> --batch-id <id> [--max-spend <usd>] [--gpu-type <type> --availability-id <id> | --gpu-placement-objective <objective>] [--gpu-count <1|2>] [--yes] [--detach] [--json]","openpond training start <model-project-id> [--comparison-series-entry <entry-id>] [--manifest <path>] [--yes] [--export-approved] [--max-spend <usd>] [--retention-days <days>] [--detach] [--json]","openpond training hosted-models|hosted-batches|hosted-preparations|hosted-jobs|hosted-capabilities|hosted-gpu-catalog|hosted-hardware-catalog --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-gpu-catalog [workload-query.json] --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-drafts --team-id <id> [--project-id <id>] [--search <text>] [--archived] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-modification-capabilities <input.json> --team-id <id> [--json]","openpond training hosted-draft <draft-id> --team-id <id> [--json]","openpond training hosted-save-draft <input.json> --team-id <id> [--json]","openpond training hosted-archive-draft <draft-id> --team-id <id> --operation-id <id> --expected-revision <n> [--json]","openpond training hosted-executions --team-id <id> [--project-id <id>] [--dataset-hash <sha256>] [--search <text>] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-modification-executions --team-id <id> [--id <execution-id>] [--project-id <id>] [--method <neuron_steering|inspect_activations>] [--phase <phase>] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-modification-execution <execution-id> --team-id <id> [--json]","openpond training hosted-compare-modification <execution-id> --team-id <id> --baseline <variant-id> --candidate <variant-id> [--prompt <prompt-id>] [--json]","openpond training hosted-alphaedit-capability <query.json> --team-id <id> [--json]","openpond training hosted-compile-alphaedit <input.json> --team-id <id> [--json]","openpond training hosted-prepare-alphaedit <input.json> --team-id <id> [--json]","openpond training hosted-start-alphaedit <input.json> --team-id <id> --yes [--json]","openpond training hosted-cancel-alphaedit <input.json> --team-id <id> [--json]","openpond training hosted-alphaedit-execution <execution-id> --team-id <id> [--json]","openpond training hosted-alphaedit-executions --team-id <id> [--id <execution-id>] [--project-id <id>] [--phase <phase>] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-save-alphaedit-model <input.json> --team-id <id> [--json]","openpond training hosted-alphaedit-serving <selection.json> --team-id <id> [--json]","openpond training hosted-control-alphaedit-serving <command.json> --team-id <id> [--yes] [--json]","openpond training hosted-neuron-training-capability <query.json> --team-id <id> [--json]","openpond training hosted-compile-neuron-training <input.json> --team-id <id> [--json]","openpond training hosted-prepare-neuron-training <input.json> --team-id <id> [--json]","openpond training hosted-start-neuron-training <input.json> --team-id <id> --yes [--json]","openpond training hosted-cancel-neuron-training <input.json> --team-id <id> [--json]","openpond training hosted-neuron-training-execution <execution-id> --team-id <id> [--json]","openpond training hosted-neuron-training-executions --team-id <id> [--id <execution-id>] [--project-id <id>] [--phase <phase>] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-save-neuron-training-model <input.json> --team-id <id> [--json]","openpond training hosted-neuron-training-serving <selection.json> --team-id <id> [--json]","openpond training hosted-control-neuron-training-serving <command.json> --team-id <id> [--yes] [--json]","openpond training hosted-engram-capability <query.json> --team-id <id> [--json]","openpond training hosted-compile-engram <input.json> --team-id <id> [--json]","openpond training hosted-prepare-engram <input.json> --team-id <id> [--json]","openpond training hosted-start-engram <input.json> --team-id <id> --yes [--json]","openpond training hosted-cancel-engram <input.json> --team-id <id> [--json]","openpond training hosted-engram-execution <execution-id> --team-id <id> [--json]","openpond training hosted-engram-executions --team-id <id> [--id <execution-id>] [--project-id <id>] [--phase <phase>] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-save-engram-model <input.json> --team-id <id> [--json]","openpond training hosted-decision-capability <query.json> --team-id <id> [--json]","openpond training hosted-compile-decision <input.json> --team-id <id> [--json]","openpond training hosted-prepare-decision <input.json> --team-id <id> [--json]","openpond training hosted-start-decision <input.json> --team-id <id> --yes [--json]","openpond training hosted-cancel-decision <input.json> --team-id <id> [--json]","openpond training hosted-decision-execution <execution-id> --team-id <id> [--json]","openpond training hosted-decision-executions --team-id <id> [--id <execution-id>] [--project-id <id>] [--mode <train|score>] [--phase <phase>] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-save-decision-model <input.json> --team-id <id> [--json]","openpond training hosted-score-decision <command.json> --team-id <id> --yes [--json]","openpond training hosted-decision-serving <selection.json> --team-id <id> [--json]","openpond training hosted-control-decision-serving <command.json> --team-id <id> [--yes] [--json]","openpond training hosted-compile-modification <input.json> --team-id <id> [--json]","openpond training hosted-prepare-modification <input.json> --team-id <id> [--json]","openpond training hosted-start-modification <input.json> --team-id <id> --yes [--json]","openpond training hosted-cancel-modification <input.json> --team-id <id> [--json]","openpond training hosted-preparations --team-id <id> [--project-id <id>] [--cursor <id>] [--limit <1..100>] [--json]","openpond training hosted-preparation <preparation-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-cancel-preparation <receipt.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-learning-inspect <model-project-id> --team-id <id> [--cursor <id>] [--limit <1..100>] [--api-base-url <url>] [--json]","openpond training hosted-corrections <model-project-id> --team-id <id> [--run-id <id>] [--api-base-url <url>] [--json]","openpond training hosted-workers --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-hardware --team-id <id> [--worker-id <id>] [--job-id <id>] [--limit <1..50>] [--cursor <worker-id>] [--api-base-url <url>] [--watch --interval-ms <100..60000> --timeout-ms <1000..60000>] [--json]","openpond training hosted-serving-pools --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-base-serving-prepare <base-profile.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-serving-pool-retire <pool-and-reason.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-provider|hosted-quotes --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-worker <physical-worker-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-worker-adopt <reserved-pod-and-job.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-worker-rebind <worker-and-job.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-worker-enroll|hosted-worker-verify <physical-worker-id> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-worker-stop|hosted-worker-resume|hosted-worker-retire|hosted-worker-warm-idle|hosted-worker-retain-session <control.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-tasksets [taskset-id] --team-id <id> [--project-id <id>] [--cursor <cursor>] [--limit <1..100>] [--search <text>] [--api-base-url <url>] [--json]","openpond training hosted-model <model-project-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-sync-model <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-publish-taskset <publication.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-review-dataset <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-evaluate-checkpoint <request.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-prepare|hosted-prepare-experiment|hosted-start|hosted-stage|hosted-submit <input.json> --team-id <id> [--api-base-url <url>] [--yes] [--json]","openpond training hosted-qualify <input.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-trajectory <job-id> --trajectory-id <receipt-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-feedback <job-id> --trajectory-id <receipt-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-feedback <job-id> --evaluation-id <id> --task-id <id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-save-steering-model <input.json> --team-id <id> [--json]","openpond training hosted-saved-model-serving <selection.json> --team-id <id> [--json]","openpond training hosted-control-steering-serving <command.json> --team-id <id> [--yes] [--json]","openpond training hosted-control-engram-serving <command.json> --team-id <id> [--yes] [--json]","openpond training hosted-import-calibration <input.json> --team-id <id> [--json]","openpond training hosted-calibration <calibration-id> --team-id <id> [--json]","openpond training hosted-calibrations --team-id <id> [--project-id <id>] [--model-hash <sha256>] [--archived] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-archive-calibration <command.json> --team-id <id> [--json]","openpond training hosted-steering-profiles --team-id <id> [--project-id <id>] [--model-project-id <id>] [--archived] [--cursor <cursor>] [--limit <1..100>] [--json]","openpond training hosted-steering-profile <profile-id> --team-id <id> [--json]","openpond training hosted-archive-steering-profile <input.json> --team-id <id> [--json]","openpond training hosted-model-version <model-project-id> --team-id <id> [--version-hash <sha256>] [--json]","openpond training hosted-save-model <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-saved-model <model-project-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-model-serving <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-control-model-serving <input.json> --team-id <id> [--yes] [--api-base-url <url>] [--json]","openpond training hosted-status|hosted-result|hosted-inspect|hosted-report|hosted-watch|hosted-cancel|hosted-artifacts|hosted-logs|hosted-events <job-id> --team-id <id> [--api-base-url <url>] [--interval-ms <ms>] [--json]","openpond training hosted-recover <input.json> --team-id <id> --yes [--api-base-url <url>] [--json]","openpond training hosted-stop-after-group <job-id> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-evaluation-tasks <job-id> --evaluation-id <id> --team-id <id> [--cursor <cursor>] [--limit <1..100>] [--api-base-url <url>] [--json]","openpond training hosted-watch <job-id> --team-id <id> [--deadline-at <ISO-time>] [--cleanup-reserve-ms <ms>] [--wait-for-cleanup] [--cancel-on-infrastructure-error] [--cleanup-timeout-ms <ms>] [--interval-ms <ms>] [--json]","openpond training status <run-id> [--json]","openpond training watch <run-id> [--interval-ms <ms>] [--json]","openpond training logs <run-id> [--json]","openpond training cancel <run-id> [--json]","openpond training resume <model-run-id> [--json]","openpond training artifacts <run-id> [--json]","openpond training benchmark <model-id> [--provider <id>] [--model <id>] [--reasoning-effort <level>] [--max-spend <usd>] [--json]"],optionSchema:{archived:"boolean",expectedRevision:"integer",datasetHash:"string",id:"string",mode:"string",phase:"string",versionHash:"string",search:"string",apiBaseUrl:"string",batchId:"string",operationId:"string",workerId:"string",jobId:"string",gpuType:"string",gpuCount:"string",availabilityId:"string",apply:"boolean",dryRun:"boolean",output:"string",comparisonSeriesEntry:"string",baseline:"string",candidate:"string",prompt:"string",snapshotFile:"string",teamId:"string",account:"string",detach:"boolean",destination:"string",exportApproved:"boolean",gpuPlacementObjective:"string",intervalMs:"integer",watch:"boolean",timeoutMs:"integer",deadlineAt:"string",cleanupReserveMs:"integer",waitForCleanup:"boolean",cleanupTimeoutMs:"integer",cancelOnInfrastructureError:"boolean",trajectoryId:"string",evaluationId:"string",taskId:"string",runId:"string",cursor:"string",limit:"integer",json:"boolean",manifest:"string",maxSpend:"number",model:"string",name:"string",objective:"string",profile:"string",projectId:"string",provider:"string",recipe:"string",reasoningEffort:"string",retentionDays:"integer",rolloutPlacement:"string",runPreset:"string",yes:"boolean"},handler:t(async({options:o,rest:n})=>n[0]==="hosted-hardware"?(await import("./training-hardware-UWQCRDMV.js")).runHardwareObservations(o,n):(await import("./training-5UMT45UL.js")).runTrainingCommand(o,n),"handler")};var i="boolean",l="integer",m="json",g="number",e="string",I={agent:e,approvalPolicy:e,cwd:e,json:i,maxOutputBytes:l,message:e,messageFile:e,model:e,noServerStart:i,nonInteractive:i,project:e,provider:e,resume:e,sandbox:e,server:e,stdin:i,timeoutSec:l,yes:i},k={access:e,agentId:e,all:i,artifactPaths:e,async:i,authHeader:e,authHeaderValue:e,authToken:e,autoStart:i,baseRef:e,branch:e,budget:g,budgetUsd:g,cleanup:i,cols:l,command:e,content:e,contentBase64:e,contents:e,contentsBase64:e,cpu:g,create:i,description:e,diskGb:g,dockerBuildArgs:m,dockerRegistrySecretRefs:e,dockerfile:e,dockerfileContext:e,dockerfileTarget:e,domain:e,env:e,environment:e,envLiteral:e,envName:e,envRef:e,expectedMppMode:e,expectedVersion:l,failOnUnpreservedChanges:i,ffOnly:i,forceWithLease:i,fork:i,fromPath:e,idempotencyKey:e,idleTimeoutSeconds:l,image:e,imageDigest:e,input:e,inputBase64:e,integrationCapabilities:e,integrationConnection:e,integrationScopes:e,intervalMs:l,json:i,keep:i,label:e,leaseId:e,lifecycleHint:m,manifestPath:e,maxDurationSeconds:l,maxEntries:g,maxResults:g,offsetBytes:l,maxBytes:l,memoryGb:g,message:e,name:e,noPreview:i,overwrite:i,params:m,path:e,paths:e,payload:m,port:l,preview:i,projectId:e,publish:i,q:e,query:e,rebase:i,recursive:i,registrySecretRef:e,remote:e,replayState:e,repo:e,respondAsync:i,rows:l,runtimeAgentId:e,runtimeBaseBranch:e,runtimeBaseSha:e,runtimeId:e,runtimeProfileId:e,runtimeProjectId:e,runtimePromotionPolicy:e,runtimeWorkspaceRoot:e,sandboxId:e,scope:e,since:l,snapshot:i,snapshotId:e,sourceProjectId:e,sourceRepoUrl:e,sourceSandboxId:e,startPoint:e,status:e,stdin:i,summary:i,tag:e,tags:e,targetId:e,targetType:e,teamId:e,templateName:e,templateVersion:e,templateVisibility:e,timeoutSeconds:l,toPath:e,type:e,useCase:e,validationCommand:e,value:e,version:e,volumeDeleteOnSandboxDelete:i,volumeMountPath:e,volumeName:e,volumeStorageGb:g,workflowMode:e},O={action:e,agentId:e,budget:g,budgetUsd:g,build:e,branch:e,commit:i,commitMessage:e,description:e,dir:e,disableSchedule:e,disableSchedules:e,enableSchedule:e,enableSchedules:e,entrypoint:e,env:m,envRef:e,file:e,force:i,idleTimeoutSeconds:l,inherit:i,input:m,inputFile:e,inputFiles:e,inputJson:m,inputs:m,json:i,keepTokenRemote:i,manifest:e,maxDurationSeconds:l,name:e,noPush:i,noWrite:i,out:e,outDir:e,output:e,outputDir:e,params:m,path:e,plan:e,projectId:e,repo:e,runtimeAgentId:e,runtimeBaseBranch:e,runtimeBaseSha:e,runtimeId:e,runtimeProjectId:e,runtimePromotionPolicy:e,scheduleMode:e,scheduleOverride:m,scheduleOverrides:m,schedules:e,service:e,setRemoteToken:i,setupTimeoutSeconds:l,target:e,teamId:e,timeoutSeconds:l,token:e,workflowMode:e,yes:i},P={branch:e,commitMessage:e,defaultBranch:e,description:e,gitOwner:e,gitRepo:e,internalRepoPath:e,json:i,name:e,path:e,projectId:e,repo:e,sourceCheckDispatch:e,sourceType:e,teamId:e,templateRepoUrl:e},A={agentId:e,agentEdit:m,allowLatestSource:i,allowedActions:e,attachmentsJson:m,baseSha:e,chatMode:e,checkKind:e,conversationId:e,cwd:e,dispatch:e,entrypointName:e,entrypointScope:e,expectedManifestHash:e,evalStatus:e,expectedSourceCommitSha:e,idempotencyKey:e,input:m,inputFile:e,json:i,limit:l,message:e,metadata:m,name:e,path:e,payload:m,projectId:e,prompt:e,provider:e,publishedSnapshotId:e,ref:e,requirePublishedSnapshot:i,requiredEnv:e,requiredIntegrations:e,runtimePromotionPolicy:e,runtimeSourceMode:e,sourceCheckDispatch:e,sourceMode:e,sourceRef:e,status:e,targetProjectId:e,teamId:e,triggerType:e,workflowMode:e};var b={account:"string",apiBaseUrl:"string",apiBaseurl:"string",baseUrl:"string",baseurl:"string",chatApiBaseUrl:"string",chatApiBaseurl:"string",checkUpdate:"boolean",cwd:"string",help:"boolean",home:"string",json:"boolean",profile:"string",sandboxApiUrl:"string",sandboxApiurl:"string",tui:"boolean",version:"boolean"},Q={C:"cwd",f:"force",h:"help",j:"json",v:"version",y:"yes"},_={cwd:"string",input:"json",inputFile:"string",json:"boolean",path:"string"},y=[{name:"learning",usage:`openpond learning <get|list> <kind> [id] --team-id <id> [--revision <n>] [--after-id <id>]
|
|
3
|
+
openpond learning <command|publish-batch> --input-file <absolute-path> --team-id <id>`,optionSchema:{inputFile:"string",teamId:"string",revision:"integer",afterId:"string",parentId:"string",status:"string",limit:"integer"},handler:t(async({options:o,rest:n})=>(await import("./learning-LAXMGWSQ.js")).runLearningCommand(o,n),"handler")},{name:"tool-learning",usage:"openpond tool-learning <setup|run|register|install|doctor|status|routing|configure|append|flush|episodes|episode|project|disable|enable|revoke|purge|uninstall> [installation-id] [episode-id] [--input-file <absolute-path>] [--team-id <id>] [--workspace <absolute-path>] [--client claude_code|opencode|codex|openpond] [--prompt <codex-task>] [--model <codex-model>] [--sandbox read-only|workspace-write]",optionSchema:{prompt:"string",model:"string",sandbox:"string",client:"string",tools:"string",allowUpload:"boolean",inputFile:"string",teamId:"string",projectId:"string",workspace:"string",environmentFile:"string",expiresAt:"string",after:"string",timeoutSec:"integer"},handler:t(async({options:o,rest:n})=>(await import("./command-LNOVZQSK.js")).runToolLearningCommand(o,n),"handler")},{name:"import",usage:"openpond import <connect|reconnect|discover|status|conversations|coverage|sync|schedule|cancel|pause|resume|disconnect|branches|branch|service> [id] [--source <name>] [--source-path <path>] [--range day|week|all] [--upload] [--selection-file <path>] [--query <text>] [--offset <number>] [--until <ISO-cutoff>] [--team <id>] [--project <id>] [--session <native-id>] [--leaf <uuid>] [--revision <hash>] [--continual [--daily|--weekly|--hourly|--cron <expression>] [--at HH:MM] [--on sun|mon|tue|wed|thu|fri|sat]] [--off] [--yes]",optionSchema:{source:"string",sourcePath:"string",range:"string",upload:"boolean",selectionFile:"string",query:"string",offset:"string",until:"string",team:"string",project:"string",session:"string",leaf:"string",revision:"string",continual:"boolean",daily:"boolean",weekly:"boolean",hourly:"boolean",cron:"string",at:"string",on:"string",off:"boolean",scheduled:"boolean",yes:"boolean",connection:"string",collectorDir:"string",json:"boolean"},handler:t(async({options:o,rest:n})=>(await import("./import-YHYKZ6JN.js")).runImportCommand(o,n),"handler")},{name:"datasets",usage:`openpond datasets <context|select|select-model|select-destination|new-experiment|select-experiment|rename-experiment|schema|list|read|create|save|file|validate|check-graders|check-sources|package|import|inspect-source|import-source|list-graders|read-grader|save-grader|test-grader|upload|publish|sync|pause-sync|disconnect-sync|related-chats> [id] --local [--server-url <loopback-origin>] [--input-file <path>] [--operation-id <id>] [--expected-revision <n>] [--json]
|
|
4
|
+
openpond datasets <upload|save|read|list|validate|publish|preparation> [folder|id] --team <id> --api-base-url <origin> [--operation-id <id>] [--expected-revision <n>] [--publish] [--project <id>] [--dataset-id <id>] [--input-file <path>]
|
|
5
|
+
openpond datasets preparation <grant-create|grant-read|create|read|list|candidates|operation|start|pause|resume|cancel|resolve|release> <dataset-id> [run-or-grant-id] --team <id> --api-base-url <origin> [--input-file <path>] [--operation-id <id>] [--expected-revision <n>] [--cursor <id>]`,optionSchema:{team:"string",operationId:"string",expectedRevision:"integer",publish:"boolean",project:"string",datasetId:"string",graderId:"string",limit:"integer",offset:"integer",cursor:"string",workspaceHash:"string",packageHash:"string",inputFile:"string",json:"boolean",local:"boolean",serverUrl:"string"},handler:t(async({options:o,rest:n})=>(await import("./datasets-E5TXSVIY.js")).runDatasetsCommand(o,n),"handler")},{name:"connected-evidence",usage:"openpond connected-evidence <list|collection|recorded-list|recorded|import-receipt|capture-assets|retain-assets|starting-assets|summary|case|unmapped|capture|selection|publish|prepare-recorded|upload-part|preview|commit|set-collection> [id] --team <id> [--input-file <path>] [--project <id>] [--cursor <id>] [--limit <n>]",optionSchema:{team:"string",inputFile:"string",project:"string",cursor:"string",limit:"integer"},handler:t(async({options:o,rest:n})=>(await import("./connected-evidence-5VZBYNWN.js")).runConnectedEvidenceCommand(o,n),"handler")},{name:"improve",usage:"openpond improve <list|read|instructions|request> [id] --team <id> --actor <owner-id> [--input-file <path>] [--cursor <id>] [--limit <n>] [--local --server-url <loopback-origin>]",optionSchema:{team:"string",actor:"string",inputFile:"string",cursor:"string",limit:"integer",local:"boolean",serverUrl:"string"},handler:t(async({options:o,rest:n})=>(await import("./experiment-improvements-PQNR5YHN.js")).runExperimentImprovementsCommand(o,n),"handler")},{name:"evaluation-schedules",usage:"openpond evaluation-schedules <list|read|request> [id] --team <id> --actor <id> --local [--server-url <loopback-origin>] [--project <id>] [--input-file <path>] [--cursor <id>] [--limit <n>]",optionSchema:{team:"string",actor:"string",local:"boolean",serverUrl:"string",project:"string",inputFile:"string",cursor:"string",limit:"integer"},handler:t(async({options:o,rest:n})=>(await import("./evaluation-coordination-KUTZEEPB.js")).runEvaluationCoordinationCommand("schedule",o,n),"handler")},{name:"evaluate-refiner",usage:"openpond evaluate-refiner <list|read|cancel|resume|request> [id] --team <id> --actor <id> --local [--server-url <loopback-origin>] [--project <id>] [--input-file <path>]",optionSchema:{team:"string",actor:"string",local:"boolean",serverUrl:"string",project:"string",inputFile:"string"},handler:t(async({options:o,rest:n})=>(await import("./evaluation-coordination-KUTZEEPB.js")).runEvaluationCoordinationCommand("refiner",o,n),"handler")},{name:"human-review",usage:"openpond human-review <read|inbox|inspect|results|request> [id] --team <id> [--input-file <path>] [--view <mine|team|approval>] [--status <active|history>] [--project <id>] [--revision <n>] [--slot <0|1>] [--after-id <id>] [--limit <n>] [--local --server-url <loopback-origin>]",optionSchema:{team:"string",inputFile:"string",view:"string",status:"string",project:"string",revision:"integer",slot:"integer",afterId:"string",limit:"integer",local:"boolean",serverUrl:"string"},handler:t(async({options:o,rest:n})=>(await import("./human-review-2ZOB7CJZ.js")).runHumanReviewCommand(o,n),"handler")},{name:"experiments",usage:`openpond experiments <signal-plan|signal-report> --input-file <path> [--json]
|
|
6
|
+
openpond experiments <models|run|run-cloud|list|read|status|cancel|result|compare|case> [id] [candidate-id] --local [--server-url <loopback-origin>] [--input-file <path>] [--receipt-id <id>] [--json]
|
|
7
|
+
openpond experiments <record-modification|modification|modifications> [id] --local --team <id> [--input-file <command.json>] [--project <id>] [--search <text>] [--cursor <opaque>] [--limit <1..100>] [--json]
|
|
8
|
+
openpond experiments <profile-catalog|prepare-profile|run-profile|inspect-profile> --local [--server-url <loopback-origin>] [--input-file <path>] [--json]
|
|
9
|
+
openpond experiments <prepare-harness|run|read|list|status|diagnostics|cancel|duplicate|score|passes|pass|cancel-pass|pass-result|result|compare|case> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--local --server-url <loopback-origin>] [--receipt-id <id>] [--json]`,usages:["Local activation observations: record-modification retains a verified {schemaVersion: openpond.modificationRecordingRequest.v1, teamId, operationId, name, projectId, method, request, result} command of at most 8 MiB. Reuse the exact command/operationId after a lost reply. modification reads one immutable record; modifications lists owner-scoped metadata. Measurements remain externally supplied, ungraded and on this device; these commands never start hosted execution.","Case inspection: experiments case <run-id> --local --receipt-id <retained-receipt-id> [--after-sequence <nonnegative-integer>] [--limit <1..500>] --json. Only compare accepts a second positional run id; a task id is not a receipt id.","Find retained receipt IDs with experiments result <run-id> --local --json (independent saved Dataset runs: evidence.cases[].receiptId; workspace runs: cases[].receiptId). Case inspection reads retained output/grading/trace and never executes inference or grading.",'Independent saved Dataset input (use --local without --team): {"datasetId":"<saved-id>","revision":3,"operationId":"reviewed-evaluation-1","maximumCostUsd":1,"taskLimit":10,"seed":0,"maxOutputTokens":1024,"models":[{"providerId":"openpond","modelId":"<exact catalog id>"}]}',"Resolve models with experiments models --local --json; use each entry's providerId and id as modelId. Supported providers: openpond, custom-openai-compatible, claude-code, codex. Select 1\u20138 distinct models.","Input bounds: positive saved revision; operationId 1\u2013120 characters; taskLimit 1\u2013100 (default 10, first saved tasks); seed 0\u20132147483647 (default 0); maxOutputTokens 1\u2013262144 (default 1024, capped by the selected model). Dataset revision pins its graders; no configuration/request wrapper is accepted here.","maximumCostUsd is a positive total ceiling up to 10000, divided across selected models and covering metered inference/grading. Use the authorized ceiling; the example is illustrative. It may be omitted only when every model is codex and the Dataset has no model-judge grader; subscription dollar cost remains unknown.","Prepare only: read datasets context/read/check-graders and experiments models, then write and review the input file. There is no independent Dataset prepare/dry-run command. experiments run --local --input-file <path> executes; reuse operationId only for the exact same input after reconciling status.","--team uses the workspace configuration contract instead. prepare-harness and prepare-profile prepare their released Harness/Profile workflows, not independent saved Dataset inputs."],optionSchema:{cursor:"string",team:"string",inputFile:"string",operationId:"string",project:"string",datasetHash:"string",search:"string",status:"string",afterId:"string",afterCallId:"string",limit:"integer",json:"boolean",local:"boolean",serverUrl:"string",receiptId:"string",afterSequence:"integer",revision:"integer",contentHash:"string"},handler:t(async({options:o,rest:n})=>(await import("./experiments-Z4BJWT3Y.js")).runExperimentsCommand(o,n),"handler")},{name:"home",usage:"openpond home [--home <directory>]",optionSchema:{},handler:t(async()=>console.log((await import("./dist-DKE7RJZN.js")).resolveOpenPondHome()),"handler")},{name:"config",usage:"openpond config <get|set|unset|path|validate|schema|doctor|migrate|recover|restart-migration|revisions|replace|effective|trust|untrust|export|backup|restore|collect-orphans|clear-cache> [key] [value] [--home <directory>] [--json]",optionSchema:{keyPath:"json",value:"string",file:"string",project:"boolean",revision:"string",expectedRevision:"string",sourceAppHome:"string",sourceConfig:"string",sourceBrowserState:"string",dryRun:"boolean"},handler:t(async({options:o,rest:n})=>(await import("./configuration-command-CNITTZRP.js")).runConfigurationCommand(o,n),"handler")},{name:"help",usage:"openpond help",optionSchema:{},handler:t(async()=>(await import("./help-K6YLZ3KL.js")).printHelp(),"handler")},{name:"version",usage:"openpond version",optionSchema:{},handler:t(()=>console.log(x()),"handler")},{name:"check-update",usage:"openpond check-update",optionSchema:{},handler:t(async()=>(await import("./core-commands-BPYXVT7O.js")).runCheckUpdate(),"handler")},{name:"login",usage:"openpond login [--base-url <url>]",optionSchema:b,handler:t(async({options:o})=>(await import("./core-commands-BPYXVT7O.js")).runLogin(o),"handler")},{name:"init",usage:"openpond init [--path <dir>] [--profile <name>] [--template <name>] [--force] [--json]",optionSchema:{...b,force:"boolean",path:"string",template:"string"},handler:t(async({options:o})=>(await import("./profile-P2SJPBOJ.js")).runOpenPondInitCommand(o),"handler")},{name:"profile",usage:"openpond profile <current|init|load|check|push|commit|diff|catalog>",optionSchema:{checkKind:"string",conversationId:"string",ensureHosted:"boolean",expectedManifestHash:"string",force:"boolean",hostedCheckKind:"string",hostedRunAgentId:"string",hostedRunConversationId:"string",hostedRunIdempotencyKey:"string",hostedRunInput:"json",hostedRunRetry:"boolean",hostedRunTargetProjectId:"string",hostedSourceDispatch:"string",hostedSourceAgentId:"string",hostedSourceChecks:"boolean",hostedSourceProjectId:"string",json:"boolean",kind:"string",path:"string",publishHostedSource:"boolean",teamId:"string"},handler:t(async({options:o,rest:n})=>(await import("./profile-P2SJPBOJ.js")).runOpenPondProfileCommand(o,n),"handler")},{name:"agents",usage:"openpond agents [--json]",optionSchema:{json:"boolean"},handler:t(async({options:o,rest:n})=>(await import("./profile-P2SJPBOJ.js")).runOpenPondAgentsCommand(o,n),"handler")},{name:"actions",usage:"openpond actions <check|build|run|dev|publish> [action-id] [--cwd DIR] [--input JSON|--input-file PATH]",optionSchema:{apiKey:"string",baseUrl:"string",cwd:"string",input:"string",inputFile:"string",json:"boolean",outputDirectory:"string",sourceDirectory:"string",sourceCommitSha:"string",sourceRef:"string",projectId:"string",teamId:"string",timeoutMs:"integer"},handler:t(async({options:o,rest:n})=>(await import("./actions-command-2VE6YI4W.js")).runProjectActionsCommand(o,n),"handler")},...U(),{name:"extension",usage:"openpond extension <add|preview|list|inspect|update|remove> [owner/repo]",usages:["openpond extension add <owner/repo> [--ref <branch|tag|sha>] [--json]","openpond extension update <owner/repo> [--ref <branch|tag|sha>] [--json]","openpond extension update --all [--json]","openpond extension remove <owner/repo> [--json]"],optionSchema:{all:"boolean",json:"boolean",ref:"string"},handler:t(async({options:o,rest:n})=>(await import("./extension-3EKIT6BB.js")).runOpenPondExtensionCommand(o,n),"handler")},{name:"profiles",usage:"openpond profiles [args]",optionSchema:{json:"boolean"},handler:t(async({options:o,rest:n})=>(await import("./core-commands-BPYXVT7O.js")).runProfiles(o,n),"handler")},{name:"account",usage:"openpond account",usages:["openpond account context [--account <handle>] [--base-url <url>] [--api-base-url <url>] [--json]"],optionSchema:{json:"boolean"},handler:t(async({options:o,rest:n})=>{if(n[0]==="context"&&n.length===1)return(await import("./account-context-MWB6HN6I.js")).runAccountContext(o);if(n.length)throw new Error("usage: account [context]");return(await import("./core-commands-BPYXVT7O.js")).runAccount()},"handler")},{name:"health",usage:"openpond health",optionSchema:{json:"boolean"},handler:t(async({options:o})=>(await import("./core-commands-BPYXVT7O.js")).runHealth(o),"handler")},{name:"acp",usage:"openpond acp [--home DIR] [--model ID] [--login]",optionSchema:{home:"string",model:"string",login:"boolean",apiKey:"string"},handler:t(async({options:o,rest:n})=>(await import("./acp-2OIXATRY.js")).runAcpCommand(o,n),"handler")},{name:"app-server",usage:"openpond app-server [--home DIR]",optionSchema:{home:"string"},handler:t(async({options:o,rest:n})=>(await import("./app-layer-YNEUEOEP.js")).runOpenPondServerCommand("app-server",o,n),"handler")},{name:"serve",usage:"openpond serve [args]",optionSchema:{host:"string",hostname:"string",listen:"string",port:"integer"},handler:t(async({options:o,rest:n})=>(await import("./app-layer-YNEUEOEP.js")).runOpenPondServerCommand("serve",o,n),"handler")},{name:"ui",usage:"openpond ui [--no-open] [--hostname HOST] [--port PORT]",optionSchema:{host:"string",hostname:"string",listen:"string",noOpen:"boolean",port:"integer",webRoot:"string"},handler:t(async({options:o,rest:n})=>(await import("./app-layer-YNEUEOEP.js")).runOpenPondServerCommand("web",o,n),"handler")},{name:"tui",aliases:["interactive"],usage:"openpond tui [--provider <id>] [--model <id>] [--project <id>]",optionSchema:{cwd:"string",model:"string",noServerStart:"boolean",project:"string",provider:"string",server:"string"},handler:t(async({options:o,rest:n})=>(await import("./app-layer-YNEUEOEP.js")).runOpenPondTerminalCommand(o,n),"handler")},{name:"chat",usage:"openpond chat (--message-file <path>|--message <text>|--stdin) --non-interactive [--provider <id>] [--model <id>] [--agent <id>] [--project <id>] [--resume <session-id>] [--yes] [--approval-policy <policy>] [--json] [--timeout-sec <n>] [--max-output-bytes <n>] [--sandbox <mode>]",optionSchema:I,handler:t(async({options:o,rest:n})=>(await import("./app-layer-YNEUEOEP.js")).runOpenPondTerminalCommand(o,n),"handler")},{name:"tool",usage:"openpond tool <list|run> <handle>/<repo> [args]",optionSchema:{body:"json",json:"boolean"},handler:q},{name:"backtest",usage:"openpond backtest <run|events|get> <handle>/<repo> [args]",optionSchema:{body:"json",branch:"string",deploymentId:"string",limit:"integer",runId:"string"},handler:L},{name:"deploy",usage:"openpond deploy watch <handle>/<repo> [--branch <branch>]",optionSchema:{branch:"string"},handler:F},{name:"template",usage:"openpond template <status|branches|update> <handle>/<repo> [--env preview|production]",optionSchema:{env:"string"},handler:K},{name:"sandbox-template",usage:"openpond sandbox-template <command> [args]",optionSchema:O,handler:t(async({options:o,rest:n})=>(await import("./sandbox-template-U536EEWY.js")).runSandboxTemplateCommand(o,n),"handler")},{name:"repo",usage:"openpond repo <create|push> [--name <name>] [--path <dir>] [--branch <branch>]",optionSchema:{branch:"string",name:"string",path:"string"},handler:G},{name:"organizations",aliases:["organization"],usage:"openpond organizations <login|list|use|logout|whoami> [args]",optionSchema:{accessToken:"string",arguments:"json",callbackPort:"integer",clientId:"string",customDomain:"string",displayName:"string",email:"string",env:"string",environment:"string",json:"boolean",name:"string",open:"boolean",origin:"string",primaryContactEmail:"string",printToken:"boolean",resourceUrl:"string",role:"string",scope:"string",scopes:"string",slug:"string",status:"string",timeout:"integer",timeoutSeconds:"integer",tool:"string",toolName:"string",toolset:"string",url:"string"},handler:t(async({options:o,rest:n})=>(await import("./organizations-W7HI2JA4.js")).runOrganizationsCommand(o,n),"handler")},{name:"project",usage:"openpond project <list|create|upsert|get|update|sync|source-upload|archive> [args]",optionSchema:P,handler:t(async({options:o,rest:n})=>(await import("./project-agent-XRIXMXQK.js")).runProjectCommand(o,n),"handler")},{name:"agent",usage:"openpond agent <inspect|build|validate|eval|traces|list|create|upsert|get|update|run|run-test|bind-source|source|archive> [args]",usages:["openpond agent run <action> [--cwd <project>] [--input <json>]","openpond agent run <agentId> --team-id <id> [--conversation-id <id>] [--target-project-id <projectId>] [--input <json>]","openpond agent source checks <agentId> --team-id <id> [--check-kind <kind>]","openpond agent source publish <agentId> --team-id <id> [--expected-manifest-hash <hash>]"],optionSchema:A,handler:t(async({options:o,rest:n})=>(await import("./project-agent-XRIXMXQK.js")).runAgentCommand(o,n),"handler")},{name:"desktop-test",usage:"openpond desktop-test <run|attach> <scenario...> [--isolated|--attach|--packaged|--none] [--app <path>] [--artifacts-dir <path>] [--json <path>]",optionSchema:{artifactsDir:"string",attach:"boolean",cwd:"string",devtoolsPort:"integer",grep:"string",isolated:"boolean",json:"string",jsonPath:"string",keepHome:"boolean",none:"boolean",server:"string",timeoutMs:"integer",token:"string",tokenFile:"string"},handler:t(async({options:o,rest:n})=>(await import("./desktop-test-FX7DTY4N.js")).runDesktopTestCommand(o,n),"handler")},{name:"sandbox",usage:"openpond sandbox <command> [args]",optionSchema:k,handler:t(async({options:o,rest:n})=>(await import("./sandbox-command-HVA5FJU4.js")).runSandboxCommand(o,n),"handler")},{name:"continual",usage:"openpond continual <init|validate|run|report> [manifest-or-series-id]",usages:["openpond continual init --from <tasks.jsonl> [--output <continual-support.yaml>] [--non-interactive]","openpond continual validate <continual-support.yaml> [--json]","openpond continual run <continual-support.yaml> [--api-base-url <url>] [--json]","openpond continual report <comparison-series-id> [--output <report.json>] [--json]"],optionSchema:{apiBaseUrl:"string",commit:"string",correctionCasesPerFamily:"integer",correctionSelection:"string",description:"string",from:"string",grader:"string",id:"string",json:"boolean",license:"string",name:"string",nonInteractive:"boolean",output:"string",repository:"string",seed:"string",semanticSimilarityThreshold:"number"},handler:t(async({options:o,rest:n})=>(await import("./continual-FVOLGGOE.js")).runContinualCommand(o,n),"handler")},S,{name:"taskset",usage:"openpond taskset <import|publish|readiness|delete-draft> <package-path|draft-id|taskset-id> [--profile <id>] [--model <id>] [--json]",usages:["openpond taskset import <package-directory|taskset.json> [--profile <id>] [--json]","openpond taskset publish <draft-id> [--model <id>] [--json]","openpond taskset readiness <taskset-id> [--json]","openpond taskset delete-draft <draft-id> [--json]"],optionSchema:{apiBaseUrl:"string",json:"boolean",model:"string",profile:"string"},handler:t(async({options:o,rest:n})=>(await import("./taskset-UDDLFYKV.js")).runTasksetCommand(o,n),"handler")},{name:"opchat",usage:`openpond opchat <provider-catalog|models|model|smoke> [args]
|
|
10
|
+
openpond opchat chat --model <id> --message <text> --team-id <id> --max-output-tokens <n> --request-id <id> --timeout-sec <1..600> --max-spend <usd> [--stream] (one bounded request; JSON receipt after completion)`,optionSchema:{compatModel:"string",compatibilityModel:"string",env:"string",environment:"string",effort:"string",json:"boolean",message:"string",teamId:"string",maxOutputTokens:"integer",maxSpend:"number",requestId:"string",timeoutSec:"integer",model:"string",opchatApiBaseUrl:"string",opchatApiUrl:"string",prompt:"string",skipStream:"boolean",skipTool:"boolean",stream:"boolean"},handler:t(async({options:o,rest:n})=>(await import("./opchat-XXI2ZM53.js")).runOpChatCommand(o,n),"handler")},{name:"teams-bot",usage:"openpond teams-bot <command> [args]",optionSchema:{json:"boolean",teamId:"string"},handler:t(async({options:o,rest:n})=>(await import("./teams-bot-MPWL2PP4.js")).runTeamsBotCommand(o,n),"handler")},{name:"apps",usage:"openpond apps <list|code-visibility|tools|deploy|env get|env set|performance|summary|assistant|agent create> [args]",optionSchema:{appId:"string",body:"json",env:"json",json:"boolean",limit:"integer",refresh:"boolean",teamId:"string",watch:"boolean"},handler:$},{name:"opentool",usage:"openpond opentool <init|validate|build> [args]",optionSchema:{},handler:t(async({rest:o})=>(await import("./core-commands-BPYXVT7O.js")).runOpentool(o),"handler")}],f=new Map;for(let o of y){f.set(o.name,o);for(let n of o.aliases??[])f.set(n,o)}function ee(){return y}t(ee,"listCliCommandDefinitions");function v(o){return f.get(o)??null}t(v,"getCliCommandDefinition");function ne(o,n){return v(o||"ui")?.optionSchema[n]??b[n]}t(ne,"getCliOptionKind");function oe(o){let n=b[o];if(n)return n;for(let s of y){let a=s.optionSchema[o];if(a)return a}}t(oe,"getAnyCliOptionKind");async function te(o){let n=v(o.command);return n?C(o.options.help)?(H(n),!0):(await n.handler(o),!0):!1}t(te,"runCliCommand");function N(o){let n=["Usage:",` ${o.usage}`,...(o.usages??[]).map(a=>` ${a}`)];o.aliases?.length&&n.push("","Aliases:",` ${o.aliases.join(", ")}`);let s=Object.entries(o.optionSchema).sort(([a],[d])=>a.localeCompare(d));if(s.length>0){n.push("","Options:");for(let[a,d]of s){let p=B(a);n.push(d==="boolean"?` --${p}`:` --${p} <${d}>`)}}return n.join(`
|
|
11
|
+
`)}t(N,"formatCliCommandUsage");function H(o){console.log(N(o))}t(H,"printCliCommandUsage");function B(o){return o.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}t(B,"cliOptionName");function U(){return["inspect","build","validate","eval","run"].map(n=>({name:n,usage:`openpond ${n} [args]`,optionSchema:_,handler:t(async({options:s,rest:a})=>(await import("./profile-P2SJPBOJ.js")).runOpenPondProfileSdkAlias(n,s,a),"handler")}))}t(U,"profileSdkAliasDefinitions");async function q({options:o,rest:n}){let{runToolList:s,runToolRun:a}=await import("./core-commands-BPYXVT7O.js"),d=n[0];if(d==="list"){let p=n[1];if(!p)throw new Error("usage: tool list <handle>/<repo>");await s(o,p);return}if(d==="run"){let p=n[1],c=n[2];if(!p||!c)throw new Error("usage: tool run <handle>/<repo> <tool> [--body <json>]");await a(o,p,c);return}throw new Error("usage: tool <list|run> <handle>/<repo> [args]")}t(q,"runToolCommand");async function L({options:o,rest:n}){let{runBacktestRun:s}=await import("./core-commands-BPYXVT7O.js"),{runBacktestEvents:a,runBacktestGet:d}=await import("./apps-RSFEJOQN.js"),p=n[0]||"run";if(p==="run"){let c=n[1],j=n[2];if(!c||!j)throw new Error("usage: backtest run <handle>/<repo> <tool> [--body <json>] [--branch <branch>] [--deployment-id <id>]");await s(o,c,j);return}if(p==="events"){let c=n[1];if(!c)throw new Error("usage: backtest events <handle>/<repo> [--run-id <id>] [--limit <n>]");await a(o,c);return}if(p==="get"){let c=n[1];if(!c)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");await d(o,c);return}throw new Error("usage: backtest <run|events|get> <handle>/<repo> [args]")}t(L,"runBacktestCommand");async function F({options:o,rest:n}){let{runDeployWatch:s}=await import("./core-commands-BPYXVT7O.js");if((n[0]||"watch")!=="watch")throw new Error("usage: deploy watch <handle>/<repo> [--branch <branch>]");let d=n[1];if(!d)throw new Error("usage: deploy watch <handle>/<repo> [--branch <branch>]");await s(o,d)}t(F,"runDeployCommand");async function K({options:o,rest:n}){let{runTemplateBranches:s,runTemplateStatus:a,runTemplateUpdate:d}=await import("./core-commands-BPYXVT7O.js"),p=n[0]||"status",c=n[1];if(!c)throw new Error("usage: template <status|branches|update> <handle>/<repo> [--env preview|production]");if(p==="status"){await a(o,c);return}if(p==="branches"){await s(o,c);return}if(p==="update"){await d(o,c);return}throw new Error("usage: template <status|branches|update> <handle>/<repo> [--env preview|production]")}t(K,"runTemplateCommand");async function G({options:o,rest:n}){let{runRepoCreate:s,runRepoPush:a}=await import("./core-commands-BPYXVT7O.js"),d=n[0]||"create";if(d==="create"){await s(o,n.slice(1));return}if(d==="push"){await a(o);return}throw new Error("usage: repo <create|push> [--name <name>] [--path <dir>] [--branch <branch>]")}t(G,"runRepoCommand");async function $({options:o,rest:n}){let{runAppsAgentCreate:s,runAppsAssistant:a,runAppsCodeVisibility:d,runAppsDeploy:p,runAppsEnvGet:c,runAppsEnvSet:j,runAppsList:T,runAppsPerformance:E,runAppsSummary:R,runAppsTools:D,runAppsToolsExecute:M}=await import("./apps-RSFEJOQN.js"),u=n[0];if(u==="list"){await T(o);return}if(u==="code-visibility"){let r=n[1];if(!r)throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");await d(o,r);return}if(u==="tools"){if(n[1]==="execute"){let r=n[2],h=n[3],w=n[4];if(!r||!h||!w)throw new Error("usage: apps tools execute <appId> <deploymentId> <tool> [--body <json>]");await M(o,r,h,w);return}await D();return}if(u==="deploy"){let r=n[1];if(!r)throw new Error("usage: apps deploy <handle>/<repo> [--env preview|production] [--watch]");await p(o,r);return}if(u==="env"&&n[1]==="get"){let r=n[2];if(!r)throw new Error("usage: apps env get <handle>/<repo>");await c(o,r);return}if(u==="env"&&n[1]==="set"){let r=n[2];if(!r)throw new Error("usage: apps env set <handle>/<repo> --env <json>");await j(o,r);return}if(u==="performance"){await E(o);return}if(u==="summary"){let r=n[1];if(!r)throw new Error("usage: apps summary <handle>/<repo>");await R(o,r);return}if(u==="assistant"){let r=n[1],h=n[2];if(r!=="plan"&&r!=="performance"||!h)throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");await a(o,r,h,n.slice(3));return}if(u==="agent"&&n[1]==="create"){await s(o,n.slice(2));return}throw new Error("usage: apps <list|code-visibility|tools|deploy|env get|env set|performance|summary|assistant|agent create> [args]")}t($,"runAppsCommand");export{b as a,Q as b,ee as c,v as d,ne as e,oe as f,te as g,N as h};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{c as D}from"./chunk-IR3YJWPW.js";import{Wb as G}from"./chunk-HG2YFMVU.js";import{b as $,c as z,d as H,e as V,f as R,g as U}from"./chunk-I6VMRQF4.js";import{Q as P,S as Q}from"./chunk-4PUOWSDE.js";import{fb as q,v,x as T}from"./chunk-ZY32SZ2P.js";import{n as E}from"./chunk-RCT3O3HQ.js";import{A as n}from"./chunk-X2J2P5ZT.js";import{a}from"./chunk-FTQLQJQV.js";async function K(e){let t=F(await e),[o,c,{QuickJSWASMModule:w}]=await Promise.all([t.importModuleLoader().then(F),t.importFFI(),import("./module-ES6BEMUI-ZVL3F6NW.js").then(F)]),l=await o();l.type="sync";let s=new c(l);return new w(l,s)}a(K,"newQuickJSWASMModuleFromVariant");function F(e){return e&&"default"in e&&e.default?e.default&&"default"in e.default&&e.default.default?e.default.default:e.default:e}a(F,"smartUnwrap");var k=class extends Error{static{a(this,"JavaScriptIsolateExecutionError")}constructor(t){super(t),this.name="JavaScriptIsolateExecutionError"}};async function O(e,t){te(e),e.signal?.throwIfAborted();let o=a(s=>new Error(`${e.errorPrefix}_${s}`),"error"),c=Date.now()+e.timeoutMs,{default:w}=await import("./dist-SKYG5LZO.js");e.signal?.throwIfAborted();let l=await K(w);e.signal?.throwIfAborted();try{return D.withScope(s=>{let m=s.manage(l.newRuntime());m.setMemoryLimit(33554432),m.setMaxStackSize(262144),m.setInterruptHandler(()=>Date.now()>=c||e.signal?.aborted===!0);let i=s.manage(m.newContext());t&&(c=Date.now()+e.timeoutMs,t.onExecutionReady()),e.deterministic&&s.manage(i.unwrapResult(i.evalCode("globalThis.Date = undefined; Math.random = () => { throw new Error('environment_random_requires_explicit_seed'); };")));let r=s.manage(i.unwrapResult(i.evalCode("JSON.stringify"))),p=s.manage(i.unwrapResult(i.evalCode(`JSON.parse(${JSON.stringify(JSON.stringify(e.value))})`))),S=s.manage(i.unwrapResult(i.evalCode(e.source,`${e.errorPrefix}.mjs`,{type:"module"}))),M=s.manage(X(i,S,c,e.signal,o)),g=s.manage(i.getProp(M,e.exportName));if(i.typeof(g)!=="function")throw o("function_export_missing");let b=s.manage(i.unwrapResult(i.callFunction(g,i.undefined,p))),d=s.manage(X(i,b,c,e.signal,o)),h=s.manage(i.unwrapResult(i.callFunction(r,i.undefined,d)));if(i.typeof(h)!=="string")throw o("result_not_json");let y=i.getString(h);if(new TextEncoder().encode(y).byteLength>e.maxResultBytes)throw o("result_too_large");if(e.signal?.throwIfAborted(),Date.now()>=c)throw o("timeout");let f=JSON.parse(y);return v(f,e.maxResultBytes),f})}catch(s){throw e.signal?.throwIfAborted(),new k(s instanceof Error?s.message:"JavaScript execution failed.")}}a(O,"executeJavaScriptIsolate");function te(e){if(!Number.isInteger(e.timeoutMs)||e.timeoutMs<1||e.timeoutMs>3e5)throw new Error(`${e.errorPrefix}_timeout_invalid`);if(!Number.isInteger(e.maxResultBytes)||e.maxResultBytes<1||e.maxResultBytes>4194304)throw new Error(`${e.errorPrefix}_result_limit_invalid`);if(new TextEncoder().encode(e.source).byteLength>524288)throw new Error(`${e.errorPrefix}_source_too_large`);v(e.value,4194304)}a(te,"validateJavaScriptIsolateInput");function X(e,t,o,c,w){for(;;){if(c?.throwIfAborted(),Date.now()>=o)throw w("timeout");let l=e.getPromiseState(t);if(l.type==="fulfilled")return l.notAPromise?l.value.dup():l.value;if(l.type==="rejected")return e.unwrapResult(l);if(e.runtime.executePendingJobs(1).unwrap()===0)throw w("unresolved_promise")}}a(X,"settle");function I(e,t){let o=t.scope==="arguments"?e.action?.arguments:e[t.scope];for(let c of t.path){if(!o||typeof o!="object"||!Object.hasOwn(o,c))throw new Error("environment_service_reference_missing");o=o[c]}return o}a(I,"resolveValue");async function Y(e,t){if(!e.executionServices?.length)return t.controller(e);if(!Number.isSafeInteger(e.timeoutMs)||e.timeoutMs<1||e.timeoutMs>3e4)throw new Error("environment_timeout_invalid");v(e.value,4194304);let o=e.executionServices.map(m=>z.parse(m));if(o.length>16)throw new Error("environment_service_limit");if(new Set(o.map(m=>m.id)).size!==o.length)throw new Error("environment_service_identity_collision");let c=Date.now(),w=new AbortController,l=e.signal?AbortSignal.any([e.signal,w.signal]):w.signal,s=setTimeout(()=>w.abort(new Error("environment_timeout")),e.timeoutMs);try{let m=Object.create(null);for(let r of o){if(l.throwIfAborted(),r.operation!==e.operation||r.operation==="step"&&r.toolName!==e.value.action?.name)throw new Error("environment_service_operation_mismatch");let p=Math.min(r.timeoutMs,e.timeoutMs-(Date.now()-c));if(p<1)throw new Error("environment_timeout");let S=new AbortController,M=AbortSignal.any([l,S.signal]),g=setTimeout(()=>S.abort(new Error("environment_service_timeout")),p),b=Date.now();try{if(r.kind==="sqlite.v1"){if(!t.sql)throw new Error("environment_sql_executor_required");let d=I(e.value,r.sql);if(typeof d!="string"||!d.length||new TextEncoder().encode(d).byteLength>65536||d.includes("\0")){m[r.id]={status:"rejected",code:"invalid_submission"};continue}let h=$({schemaVersion:"openpond.sqlExecution.v1",snapshot:I(e.value,r.snapshot),sql:d,maxRows:r.maxRows,maxResultBytes:r.maxResultBytes});m[r.id]=await t.sql({request:h,timeoutMs:e.timeoutMs,signal:M})}else{let d=I(e.value,r.source),h=I(e.value,r.cases);if(typeof d!="string"||new TextEncoder().encode(d).byteLength>524288){m[r.id]={status:"rejected",code:"invalid_submission"};continue}if(!Array.isArray(h)||!h.length||h.length>r.maxCases||h.some(f=>!f||typeof f!="object"||!Object.hasOwn(f,"input")))throw new Error("environment_service_cases_invalid");let y=[];for(let f of h){let u=p-(Date.now()-b);if(u<1&&(S.abort(new Error("environment_service_timeout")),M.throwIfAborted()),y.push(await t.candidate({source:d,exportName:r.exportName,value:structuredClone(f.input),timeoutMs:Math.max(1,u),maxResultBytes:r.maxResultBytes,deterministic:!0,errorPrefix:"candidate",signal:M})),new TextEncoder().encode(JSON.stringify({status:"completed",cases:y})).byteLength>r.maxResultBytes)throw new k("candidate_result_too_large")}m[r.id]={status:"completed",cases:y}}}catch(d){if(l.throwIfAborted(),S.signal.aborted)m[r.id]={status:"rejected",code:"timeout"};else if(d instanceof k)m[r.id]={status:"rejected",code:"execution_failed"};else throw d}finally{clearTimeout(g)}}l.throwIfAborted();let i=e.timeoutMs-(Date.now()-c);if(i<1)throw new Error("environment_timeout");return await t.controller({...e,executionServices:void 0,value:{...e.value,services:m},timeoutMs:i,signal:l})}finally{clearTimeout(s)}}a(Y,"executeEnvironmentWithServices");async function re(e){let t=V.parse(e.operation);return Y(e,{candidate:O,controller:a(async o=>R.parse(await O({...o,exportName:t,maxResultBytes:1572864,deterministic:!0,errorPrefix:"environment"})),"controller")})}a(re,"executeJavaScriptEnvironment");var J=class extends Error{static{a(this,"JavaScriptEnvironmentActionError")}code;constructor(t){super(`environment_${t}`),this.code=t,this.name="JavaScriptEnvironmentActionError"}};async function Qe(e){let t=U(e.definition),o=Q(e.asset,t.module);if(!Number.isSafeInteger(e.seed))throw new Error("environment_seed_invalid");let c=e.seed;v(e.input,1048576),v(e.initialState,t.maxStateBytes);let w=structuredClone(e.input),l=structuredClone(e.initialState),s=e.execute??re,m=new AbortController,i=e.signal?AbortSignal.any([e.signal,m.signal]):m.signal,r={},p=0,S=!1,M=!1,g=null,b=[],d=null;async function h(f,u){if(S||M)throw new Error("environment_closed");if(g)throw new Error("environment_operation_in_progress");i.throwIfAborted(),u&&(v(u,262144),u=structuredClone(u));let L=E(r),_=u?t.tools.find(x=>x.name===u.name):null;if(f==="step"){if(p>=t.maxSteps)throw new J("step_budget_exhausted");p++}let j=a((x,C)=>b.push({sequence:b.length,operation:f,toolName:u?.name??null,arguments:u?structuredClone(u.arguments):null,observation:x,beforeStateHash:L,afterStateHash:E(r),error:C}),"record");try{if(u&&!_)throw new J("unknown_tool");if(u&&_&&!T(_.inputSchema,u.arguments).valid)throw new J("invalid_arguments");let x=t.executionServices?.filter(N=>N.operation===f&&(f!=="step"||N.toolName===u?.name)),C=s({source:o,operation:f,value:{input:w,initialState:l,seed:c,state:structuredClone(r),sequence:p,action:u?structuredClone(u):null},timeoutMs:Math.min(t.operationTimeoutMs,_?.timeoutMs??t.operationTimeoutMs),signal:i,...x?.length?{executionServices:x}:{}});g=C;let A=R.parse(await C);if(i.throwIfAborted(),v(A.state,t.maxStateBytes),v(A.observation,t.maxObservationBytes),(f==="collect"||_?.sideEffect==="read")&&E(A.state)!==L)throw new Error("environment_read_changed_state");r=structuredClone(A.state);let B=structuredClone(A.observation);return j(B,null),{state:structuredClone(r),observation:B}}catch(x){throw j(null,x instanceof Error?x.message:"environment_execution_failed"),x}finally{g=null}}a(h,"invoke");async function y(){return d||(M=!0,m.abort(new Error("environment_destroyed")),d=(async()=>{try{try{await g}catch{}await s({source:o,operation:"destroy",value:{input:w,initialState:l,seed:c,state:structuredClone(r),sequence:p,action:null},timeoutMs:t.operationTimeoutMs})}finally{r={},S=!0}})(),d)}a(y,"destroy");try{await h("create");let f=await h("reset"),u=E(r),L=a(()=>{if(S)throw new Error("environment_closed");return{definition:{id:t.id,revision:t.revision,contentHash:t.contentHash},inputHash:E(w),seed:c,initialStateHash:u,finalStateHash:E(r),state:structuredClone(r),events:structuredClone(b)}},"snapshot");return{definition:structuredClone(t),observation:f.observation,async step(_){return(await h("step",_)).observation},async collect(){let _=await h("collect");return{...L(),observation:_.observation}},snapshot:L,destroy:y}}catch(f){try{await y()}catch{}throw f}}a(Qe,"createJavaScriptEnvironmentSession");var ne=n.string().trim().min(1).max(500),oe=n.string().regex(/^[a-f0-9]{64}$/),W=n.object({kind:n.literal("model"),id:n.string().trim().min(1).max(191),taskId:ne,admissionHash:oe,model:G,instructions:n.string().max(262144),harness:q.optional(),input:n.record(n.string(),n.unknown()),policyVisibleContext:n.record(n.string(),n.unknown()),timeoutMs:n.number().int().positive().max(36e5),environment:n.discriminatedUnion("kind",[n.object({kind:n.literal("text")}).strict(),n.object({kind:n.literal("javascript"),definition:H,asset:P,initialState:n.record(n.string(),n.unknown()),seed:n.number().int().safe()}).strict()])}).strict(),Ye=n.discriminatedUnion("kind",[W,n.object({kind:n.literal("profile"),request:n.unknown()}).strict()]);var Z=n.string().trim().min(1).max(200),mt=n.object({receiptId:Z,taskId:Z,seed:n.string(),request:W}).strict(),ee=class extends Error{constructor(o,c,w=409){super(c);this.code=o;this.status=w}code;status;static{a(this,"LocalExperimentError")}};export{k as a,te as b,Y as c,J as d,Qe as e,W as f,Ye as g,ee as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i as s}from"./chunk-
|
|
2
|
+
import{i as s}from"./chunk-RPM4FDRX.js";import{a as i}from"./chunk-GLUWATL5.js";import{a as n}from"./chunk-FTQLQJQV.js";import{stdin as a,stdout as c}from"node:process";import{createInterface as l}from"node:readline/promises";var p=`${i}/console/services/identity-access/api-keys`;function u(e){let t=process.env.OPENPOND_API_KEY?.trim();if(t)return t;let r=e.apiKey?.trim();if(r)return r;let o=e.token?.trim();return o&&o.startsWith("opk_")?o:null}n(u,"resolveApiKey");async function P(){if(!a.isTTY||!c.isTTY)throw new Error("OpenPond API key is required in non-interactive mode. Set OPENPOND_API_KEY or run `openpond login` in a terminal.");console.log("Open the OpenPond UI to create an API key:"),console.log(p);let e=l({input:a,output:c});try{let t=(await e.question("Paste your OpenPond API key: ")).trim();if(!t)throw new Error("API key is required");return t.startsWith("opk_")||console.log("warning: API keys usually start with opk_."),t}finally{e.close()}}n(P,"promptForApiKey");async function A(e,t){let r=u(e);if(r)return r;let o=await P();return await s({apiKey:o,baseUrl:t,activeProfile:e.activeProfile}),console.log("Saved account credentials to the encrypted OpenPond credential store."),o}n(A,"ensureApiKey");export{u as a,P as b,A as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{P as H,Q as L,_ as S}from"./chunk-SH7POUVX.js";import{f as A,h as O}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import Q from"node:path";var U="default",z=["apiKey","baseUrl","apiBaseUrl","chatApiBaseUrl","token","appId","conversationId"];function re(){return V()}l(re,"getConfigPath");function V(){return O(A()).config}l(V,"getGlobalConfigPath");function m(n,e){return Object.prototype.hasOwnProperty.call(n,e)}l(m,"hasOwn");function h(n){if(typeof n!="string")return null;let e=n.trim();return e.length>0?e:null}l(h,"normalizeHandle");function d(n){if(typeof n!="string")return null;let e=n.trim();return e?e.replace(/\/$/,""):null}l(d,"normalizeBaseUrl");function q(n){let e=h(n);if(!e)throw new Error("profile handle must be non-empty");return e}l(q,"requireHandle");function W(n){if(typeof n!="string")throw new Error("apiKey must be a non-empty string");let e=n.trim();if(!e)throw new Error("apiKey must be a non-empty string");return e}l(W,"requireApiKey");function b(n,e){let t=h(n),s=h(e);return!!(t&&s&&t.toLowerCase()===s.toLowerCase())}l(b,"handleEquals");function v(n,e,t){let s=d(t);return n.findIndex(i=>b(i.handle,e)?s?d(i.baseUrl)===s:!0:!1)}l(v,"findAccountIndex");function P(n){let e=h(n.handle)??U,t=d(n.baseUrl);return t?{handle:e,baseUrl:t}:{handle:e}}l(P,"selectorFromAccount");function y(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=h(typeof e.handle=="string"?e.handle:void 0);if(!t)return null;let s=d(typeof e.baseUrl=="string"?e.baseUrl:void 0);return s?{handle:t,baseUrl:s}:{handle:t}}l(y,"sanitizeActiveProfile");function B(n){if(!n||typeof n!="object"||Array.isArray(n))return;let e=n,t=typeof e.repoPath=="string"?e.repoPath.trim():"",s=typeof e.profile=="string"&&e.profile.trim()?e.profile.trim():"default";if(!t)return;let i={repoPath:t,profile:s,mode:"local"};if(e.lastCheck&&typeof e.lastCheck=="object"&&!Array.isArray(e.lastCheck)){let o=e.lastCheck,a=o.command,u=o.status,c=o.checkedAt;(a==="inspect"||a==="build"||a==="validate"||a==="eval"||a==="run")&&(u==="passed"||u==="failed")&&typeof c=="string"&&(i.lastCheck={command:a,status:u,checkedAt:c,...typeof o.exitCode=="number"||o.exitCode===null?{exitCode:o.exitCode}:{},...typeof o.sourceHead=="string"||o.sourceHead===null?{sourceHead:o.sourceHead}:{}})}if(e.lastPush&&typeof e.lastPush=="object"&&!Array.isArray(e.lastPush)){let o=e.lastPush,a=o.status,u=o.pushedAt;(a==="pushed"||a==="failed")&&typeof u=="string"&&(i.lastPush={status:a,pushedAt:u,...typeof o.teamId=="string"||o.teamId===null?{teamId:o.teamId}:{},...typeof o.projectId=="string"||o.projectId===null?{projectId:o.projectId}:{},...typeof o.localHead=="string"||o.localHead===null?{localHead:o.localHead}:{},...typeof o.hostedHead=="string"||o.hostedHead===null?{hostedHead:o.hostedHead}:{},...typeof o.sourceRef=="string"||o.sourceRef===null?{sourceRef:o.sourceRef}:{},...o.promotionStatus==="uploaded"||o.promotionStatus==="hosted_source_materialized"||o.promotionStatus==="hosted_source_materialize_failed"||o.promotionStatus==="hosted_source_check_pending"||o.promotionStatus==="hosted_source_check_failed"||o.promotionStatus==="hosted_source_published"||o.promotionStatus==="hosted_source_publish_failed"||o.promotionStatus==="hosted_run_pending"||o.promotionStatus==="hosted_run_passed"||o.promotionStatus==="hosted_run_failed"||o.promotionStatus===null?{promotionStatus:o.promotionStatus}:{},...o.hostedRunStatus==="not_started"||o.hostedRunStatus==="running"||o.hostedRunStatus==="passed"||o.hostedRunStatus==="failed"||o.hostedRunStatus===null?{hostedRunStatus:o.hostedRunStatus}:{},...typeof o.hostedRunAgentId=="string"||o.hostedRunAgentId===null?{hostedRunAgentId:o.hostedRunAgentId}:{},...typeof o.hostedRunId=="string"||o.hostedRunId===null?{hostedRunId:o.hostedRunId}:{},...typeof o.hostedRunAt=="string"||o.hostedRunAt===null?{hostedRunAt:o.hostedRunAt}:{},...w(o.hostedSourceMaterialization)?{hostedSourceMaterialization:w(o.hostedSourceMaterialization)}:{},...E(o.hostedSourceCheck)?{hostedSourceCheck:E(o.hostedSourceCheck)}:{},...K(o.hostedPublish)?{hostedPublish:K(o.hostedPublish)}:{},...M(o.hostedRun)?{hostedRun:M(o.hostedRun)}:{},...typeof o.error=="string"||o.error===null?{error:o.error}:{}})}if(Array.isArray(e.profiles)){let o=e.profiles.flatMap(a=>{let u=B(a);if(!u)return[];let c=a,p=c.source==="github"||c.source==="openpond_git"?c.source:"local",C=typeof c.repositoryId=="string"&&c.repositoryId.trim()?c.repositoryId.trim():Q.resolve(u.repoPath);return[{source:p,repositoryId:C,repoPath:u.repoPath,profile:u.profile,...u.lastCheck?{lastCheck:u.lastCheck}:{},...u.lastPush?{lastPush:u.lastPush}:{}}]});o.length>0&&(i.profiles=o)}return i}l(B,"sanitizeLocalOpenPondProfile");function w(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"runtimeAgentId"),...r(e,"projectId"),...r(e,"sourceRoot"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...r(e,"manifestSyncedAt"),...T(e,"fileCount"),...T(e,"totalBytes"),...r(e,"generatedManifestPath"),...k(e,"synthesizedOpenPondYaml"),...r(e,"uploadMetadataPath"),...f(e,"setupCommands"),...f(e,"validationCommands"),...r(e,"materializedAt"),...r(e,"error")}:null}l(w,"sanitizeHostedMaterializationStatus");function E(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"deployPlanStatus"),...k(e,"canRun"),...k(e,"canDeploy"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...f(e,"setupCommands"),...f(e,"validationCommands"),...f(e,"requiredChecks"),...f(e,"evalNames"),...f(e,"blockedReasons"),...f(e,"staleReasons"),...r(e,"runtimeId"),...r(e,"sandboxId"),...f(e,"traceArtifactRefs"),...f(e,"evalResultArtifactRefs"),...f(e,"validatorArtifactRefs"),...r(e,"checkedAt"),...r(e,"error")}:null}l(E,"sanitizeHostedSourceCheckStatus");function K(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"snapshotId"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...r(e,"buildStatus"),...r(e,"validationStatus"),...r(e,"evalStatus"),...r(e,"publishedAt"),...r(e,"error")}:null}l(K,"sanitizeHostedPublishStatus");function M(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"runId"),...r(e,"runtimeId"),...r(e,"sandboxId"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"setupGateStatus"),...f(e,"setupRequirementRefs"),...f(e,"artifactRefs"),...f(e,"traceArtifactRefs"),...f(e,"evalArtifactRefs"),...r(e,"startedAt"),...r(e,"completedAt"),...r(e,"error")}:null}l(M,"sanitizeHostedRunSummary");function r(n,e){let t=n[e];return typeof t=="string"||t===null?{[e]:t}:{}}l(r,"nullableStringProp");function k(n,e){let t=n[e];return typeof t=="boolean"||t===null?{[e]:t}:{}}l(k,"nullableBooleanProp");function T(n,e){let t=n[e];return typeof t=="number"||t===null?{[e]:t}:{}}l(T,"nullableNumberProp");function f(n,e){let t=n[e];if(!Array.isArray(t))return{};let s=t.filter(i=>typeof i=="string");return{[e]:s}}l(f,"stringArrayProp");function R(n){return typeof n=="string"&&n.trim()?n.trim():null}l(R,"stringField");function D(n,e){if(!b(n.handle,e.handle))return!1;let t=d(e.baseUrl);return t?d(n.baseUrl)===t:!d(n.baseUrl)}l(D,"accountMatchesSelector");function I(n,e,t={}){let s=d(e.baseUrl);if(s)return v(n,e.handle,s);let i=n.findIndex(a=>D(a,e));if(i!==-1)return i;let o=n.map((a,u)=>({account:a,index:u})).filter(({account:a})=>b(a.handle,e.handle));if(o.length>1&&t.requireUnambiguous)throw new Error(`multiple profiles found for ${e.handle}; pass --base-url to select one`);return o[0]?.index??-1}l(I,"findAccountIndexForSelector");function X(n){if(!n||typeof n!="object"||Array.isArray(n))return;let e=n,t={};return typeof e.token=="string"&&(t.token=e.token),(typeof e.appId=="string"||e.appId===null)&&(t.appId=e.appId),(typeof e.conversationId=="string"||e.conversationId===null)&&(t.conversationId=e.conversationId),Object.keys(t).length>0?t:void 0}l(X,"sanitizeSession");function Z(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=h(typeof e.handle=="string"?e.handle:void 0);if(!t)return null;let s={handle:t};typeof e.apiKey=="string"&&(s.apiKey=e.apiKey),typeof e.baseUrl=="string"&&(s.baseUrl=e.baseUrl),typeof e.apiBaseUrl=="string"&&(s.apiBaseUrl=e.apiBaseUrl),typeof e.chatApiBaseUrl=="string"&&(s.chatApiBaseUrl=e.chatApiBaseUrl),typeof e.environment=="string"&&(s.environment=e.environment);let i=X(e.session);return i&&(s.session=i),s}l(Z,"sanitizeAccount");function ee(n){let e={};return typeof n.token=="string"&&(e.token=n.token),(typeof n.appId=="string"||n.appId===null)&&(e.appId=n.appId),(typeof n.conversationId=="string"||n.conversationId===null)&&(e.conversationId=n.conversationId),Object.keys(e).length>0?e:void 0}l(ee,"extractLegacySession");function ne(n,e){let t={handle:e};typeof n.apiKey=="string"&&(t.apiKey=n.apiKey),typeof n.baseUrl=="string"&&(t.baseUrl=n.baseUrl),typeof n.apiBaseUrl=="string"&&(t.apiBaseUrl=n.apiBaseUrl),typeof n.chatApiBaseUrl=="string"&&(t.chatApiBaseUrl=n.chatApiBaseUrl);let s=ee(n);return s&&(t.session=s),t}l(ne,"extractLegacyAccount");function x(n){let e={};typeof n.lspEnabled=="boolean"&&(e.lspEnabled=n.lspEnabled),(n.executionMode==="local"||n.executionMode==="hosted")&&(e.executionMode=n.executionMode),(n.mode==="general"||n.mode==="builder")&&(e.mode=n.mode);let t=B(n.openpondProfile);t&&(e.openpondProfile=t);let s=[],i=Array.isArray(n.accounts)?n.accounts:[];for(let c of i){let p=Z(c);p&&v(s,p.handle,p.baseUrl)===-1&&s.push(p)}if(s.length===0){let c=y(n.activeProfile)?.handle||U;s.push(ne(n,c))}let o=y(n.activeProfile),a=o?I(s,o):-1,u=s[a===-1?0:a];return e.accounts=s,e.activeProfile=P(u),e}l(x,"normalizeGlobalConfig");function N(n,e,t){let s=n.accounts??[],i=d(t??process.env.OPENPOND_BASE_URL),o=h(e);if(o)return i?{handle:o,baseUrl:i}:{handle:o};let a=h(process.env.OPENPOND_ACCOUNT);if(a)return i?{handle:a,baseUrl:i}:{handle:a};let u=y(n.activeProfile);return u?i?{handle:u.handle,baseUrl:i}:u:s[0]?P(s[0]):{handle:U}}l(N,"resolveRequestedProfile");function G(n,e,t){let s=d(t);if(s){let o=v(n,e,s);if(o!==-1)return n[o]}else{let o=n.filter(a=>b(a.handle,e));if(o.length>1)throw new Error(`multiple profiles found for ${e}; pass --base-url to select one`);if(o.length===1)return o[0]}let i={handle:e};return s&&(i.baseUrl=s),n.push(i),i}l(G,"ensureAccount");function j(n){n.session&&Object.keys(n.session).length===0&&delete n.session}l(j,"cleanupAccount");function te(n,e,t,s){let i=t===null||t===void 0&&s.undefinedDeletes;switch(e){case"apiKey":{if(i){delete n.apiKey;return}typeof t=="string"&&(n.apiKey=t);return}case"baseUrl":{if(i){delete n.baseUrl;return}typeof t=="string"&&(n.baseUrl=t);return}case"apiBaseUrl":{if(i){delete n.apiBaseUrl;return}typeof t=="string"&&(n.apiBaseUrl=t);return}case"chatApiBaseUrl":{if(i){delete n.chatApiBaseUrl;return}typeof t=="string"&&(n.chatApiBaseUrl=t);return}case"token":case"appId":case"conversationId":{if(n.session||(n.session={}),i){delete n.session[e],j(n);return}(typeof t=="string"||t===null)&&(n.session[e]=t),j(n);return}}}l(te,"applyScopedKey");function $(n,e,t){if(!z.some(c=>m(e,c)))return!1;let i=n.accounts??[],o=y(e.activeProfile)??N(n),a=d(m(e,"baseUrl")?e.baseUrl??null:o.baseUrl??process.env.OPENPOND_BASE_URL),u=G(i,o.handle,a);for(let c of z)m(e,c)&&te(u,c,e[c],t);return n.accounts=i,n.activeProfile=P(u),!0}l($,"applyAccountPatch");function F(n,e){if(m(e,"lspEnabled")&&(typeof e.lspEnabled=="boolean"?n.lspEnabled=e.lspEnabled:e.lspEnabled===null&&delete n.lspEnabled),m(e,"executionMode")&&(e.executionMode==="local"||e.executionMode==="hosted"?n.executionMode=e.executionMode:e.executionMode===null&&delete n.executionMode),m(e,"mode")&&(e.mode==="general"||e.mode==="builder"?n.mode=e.mode:e.mode===null&&delete n.mode),m(e,"activeProfile")){let t=y(e.activeProfile);if(t){let s=I(n.accounts??[],t);n.activeProfile=s===-1?t:P((n.accounts??[])[s])}else e.activeProfile===null&&delete n.activeProfile}if(m(e,"openpondProfile")){let t=B(e.openpondProfile);t?n.openpondProfile=t:e.openpondProfile===null&&delete n.openpondProfile}}l(F,"applyTopLevelPatch");async function oe(n){let e=A();await S(e),await L(e,()=>n)}l(oe,"writeGlobalConfig");async function _(n){let e=A();return await S(e),await L(e,t=>{let s=x(t);return n(s),s})}l(_,"updateGlobalConfig");async function Y(){let n=A();return await S(n),x(await H(n))}l(Y,"loadGlobalConfig");async function le(n={}){let e=await Y(),t=e.accounts??[],s=N(e,n.account,n.baseUrl),i=I(t,s,{requireUnambiguous:!0}),o=i===-1?null:t[i],a=o?.session;return{...e,activeProfile:o?P(o):s,apiKey:o?.apiKey,baseUrl:o?.baseUrl,apiBaseUrl:o?.apiBaseUrl,chatApiBaseUrl:o?.chatApiBaseUrl,token:a?.token,appId:a?.appId,conversationId:a?.conversationId}}l(le,"loadConfig");async function J(){let n=await Y(),e=y(n.activeProfile);return(n.accounts??[]).map(t=>{let s=h(t.handle)??U;return{handle:s,baseUrl:d(t.baseUrl),apiBaseUrl:d(t.apiBaseUrl),chatApiBaseUrl:d(t.chatApiBaseUrl),environment:t.environment?.trim()||null,isActive:!!(e&&D({...t,handle:s},e)),hasApiKey:!!t.apiKey?.trim(),hasSessionToken:!!t.session?.token?.trim(),sessionAppId:t.session?.appId??null,sessionConversationId:t.session?.conversationId??null}})}l(J,"listConfiguredProfiles");async function ae(n,e={}){let t=q(n),s=d(e.baseUrl),i=-1;await _(a=>{let u=a.accounts??[];if(i=I(u,s?{handle:t,baseUrl:s}:{handle:t},{requireUnambiguous:!0}),i===-1)throw new Error(`profile not found: ${t}`);a.activeProfile=P(u[i])});let o=await J();return o.find(a=>a.isActive)??o[i]}l(ae,"setActiveProfile");async function ue(n){let e=q(n.handle),t=W(n.apiKey),s=d(n.baseUrl),i=d(n.apiBaseUrl),o=d(n.chatApiBaseUrl),a={handle:e};await _(p=>{let C=p.accounts??[],g=G(C,e,s);g.apiKey=t,s&&(g.baseUrl=s),i?g.apiBaseUrl=i:n.apiBaseUrl===null&&delete g.apiBaseUrl,o?g.chatApiBaseUrl=o:n.chatApiBaseUrl===null&&delete g.chatApiBaseUrl,n.environment===null?delete g.environment:typeof n.environment=="string"&&n.environment.trim()&&(g.environment=n.environment.trim()),p.accounts=C,a=P(g),n.setActive!==!1&&(p.activeProfile=a)});let c=(await J()).find(p=>b(p.handle,a.handle)?s?d(p.baseUrl)===s:!0:!1);if(!c)throw new Error(`failed to save profile: ${e}`);return c}l(ue,"saveProfileApiKey");async function ce(n){let e=x(n);F(e,n),$(e,n,{undefinedDeletes:!0}),await oe(e)}l(ce,"saveConfig");async function de(n){await _(e=>{F(e,n),$(e,n,{undefinedDeletes:!1})})}l(de,"saveGlobalConfig");export{re as a,_ as b,Y as c,le as d,J as e,ae as f,ue as g,ce as h,de as i};
|
|
2
|
+
import{P as H,Q as L,_ as S}from"./chunk-SV7ZBEK2.js";import{f as A,h as O}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import Q from"node:path";var U="default",z=["apiKey","baseUrl","apiBaseUrl","chatApiBaseUrl","token","appId","conversationId"];function re(){return V()}l(re,"getConfigPath");function V(){return O(A()).config}l(V,"getGlobalConfigPath");function m(n,e){return Object.prototype.hasOwnProperty.call(n,e)}l(m,"hasOwn");function h(n){if(typeof n!="string")return null;let e=n.trim();return e.length>0?e:null}l(h,"normalizeHandle");function d(n){if(typeof n!="string")return null;let e=n.trim();return e?e.replace(/\/$/,""):null}l(d,"normalizeBaseUrl");function q(n){let e=h(n);if(!e)throw new Error("profile handle must be non-empty");return e}l(q,"requireHandle");function W(n){if(typeof n!="string")throw new Error("apiKey must be a non-empty string");let e=n.trim();if(!e)throw new Error("apiKey must be a non-empty string");return e}l(W,"requireApiKey");function b(n,e){let t=h(n),s=h(e);return!!(t&&s&&t.toLowerCase()===s.toLowerCase())}l(b,"handleEquals");function v(n,e,t){let s=d(t);return n.findIndex(i=>b(i.handle,e)?s?d(i.baseUrl)===s:!0:!1)}l(v,"findAccountIndex");function P(n){let e=h(n.handle)??U,t=d(n.baseUrl);return t?{handle:e,baseUrl:t}:{handle:e}}l(P,"selectorFromAccount");function y(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=h(typeof e.handle=="string"?e.handle:void 0);if(!t)return null;let s=d(typeof e.baseUrl=="string"?e.baseUrl:void 0);return s?{handle:t,baseUrl:s}:{handle:t}}l(y,"sanitizeActiveProfile");function B(n){if(!n||typeof n!="object"||Array.isArray(n))return;let e=n,t=typeof e.repoPath=="string"?e.repoPath.trim():"",s=typeof e.profile=="string"&&e.profile.trim()?e.profile.trim():"default";if(!t)return;let i={repoPath:t,profile:s,mode:"local"};if(e.lastCheck&&typeof e.lastCheck=="object"&&!Array.isArray(e.lastCheck)){let o=e.lastCheck,a=o.command,u=o.status,c=o.checkedAt;(a==="inspect"||a==="build"||a==="validate"||a==="eval"||a==="run")&&(u==="passed"||u==="failed")&&typeof c=="string"&&(i.lastCheck={command:a,status:u,checkedAt:c,...typeof o.exitCode=="number"||o.exitCode===null?{exitCode:o.exitCode}:{},...typeof o.sourceHead=="string"||o.sourceHead===null?{sourceHead:o.sourceHead}:{}})}if(e.lastPush&&typeof e.lastPush=="object"&&!Array.isArray(e.lastPush)){let o=e.lastPush,a=o.status,u=o.pushedAt;(a==="pushed"||a==="failed")&&typeof u=="string"&&(i.lastPush={status:a,pushedAt:u,...typeof o.teamId=="string"||o.teamId===null?{teamId:o.teamId}:{},...typeof o.projectId=="string"||o.projectId===null?{projectId:o.projectId}:{},...typeof o.localHead=="string"||o.localHead===null?{localHead:o.localHead}:{},...typeof o.hostedHead=="string"||o.hostedHead===null?{hostedHead:o.hostedHead}:{},...typeof o.sourceRef=="string"||o.sourceRef===null?{sourceRef:o.sourceRef}:{},...o.promotionStatus==="uploaded"||o.promotionStatus==="hosted_source_materialized"||o.promotionStatus==="hosted_source_materialize_failed"||o.promotionStatus==="hosted_source_check_pending"||o.promotionStatus==="hosted_source_check_failed"||o.promotionStatus==="hosted_source_published"||o.promotionStatus==="hosted_source_publish_failed"||o.promotionStatus==="hosted_run_pending"||o.promotionStatus==="hosted_run_passed"||o.promotionStatus==="hosted_run_failed"||o.promotionStatus===null?{promotionStatus:o.promotionStatus}:{},...o.hostedRunStatus==="not_started"||o.hostedRunStatus==="running"||o.hostedRunStatus==="passed"||o.hostedRunStatus==="failed"||o.hostedRunStatus===null?{hostedRunStatus:o.hostedRunStatus}:{},...typeof o.hostedRunAgentId=="string"||o.hostedRunAgentId===null?{hostedRunAgentId:o.hostedRunAgentId}:{},...typeof o.hostedRunId=="string"||o.hostedRunId===null?{hostedRunId:o.hostedRunId}:{},...typeof o.hostedRunAt=="string"||o.hostedRunAt===null?{hostedRunAt:o.hostedRunAt}:{},...w(o.hostedSourceMaterialization)?{hostedSourceMaterialization:w(o.hostedSourceMaterialization)}:{},...E(o.hostedSourceCheck)?{hostedSourceCheck:E(o.hostedSourceCheck)}:{},...K(o.hostedPublish)?{hostedPublish:K(o.hostedPublish)}:{},...M(o.hostedRun)?{hostedRun:M(o.hostedRun)}:{},...typeof o.error=="string"||o.error===null?{error:o.error}:{}})}if(Array.isArray(e.profiles)){let o=e.profiles.flatMap(a=>{let u=B(a);if(!u)return[];let c=a,p=c.source==="github"||c.source==="openpond_git"?c.source:"local",C=typeof c.repositoryId=="string"&&c.repositoryId.trim()?c.repositoryId.trim():Q.resolve(u.repoPath);return[{source:p,repositoryId:C,repoPath:u.repoPath,profile:u.profile,...u.lastCheck?{lastCheck:u.lastCheck}:{},...u.lastPush?{lastPush:u.lastPush}:{}}]});o.length>0&&(i.profiles=o)}return i}l(B,"sanitizeLocalOpenPondProfile");function w(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"runtimeAgentId"),...r(e,"projectId"),...r(e,"sourceRoot"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...r(e,"manifestSyncedAt"),...T(e,"fileCount"),...T(e,"totalBytes"),...r(e,"generatedManifestPath"),...k(e,"synthesizedOpenPondYaml"),...r(e,"uploadMetadataPath"),...f(e,"setupCommands"),...f(e,"validationCommands"),...r(e,"materializedAt"),...r(e,"error")}:null}l(w,"sanitizeHostedMaterializationStatus");function E(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"deployPlanStatus"),...k(e,"canRun"),...k(e,"canDeploy"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...f(e,"setupCommands"),...f(e,"validationCommands"),...f(e,"requiredChecks"),...f(e,"evalNames"),...f(e,"blockedReasons"),...f(e,"staleReasons"),...r(e,"runtimeId"),...r(e,"sandboxId"),...f(e,"traceArtifactRefs"),...f(e,"evalResultArtifactRefs"),...f(e,"validatorArtifactRefs"),...r(e,"checkedAt"),...r(e,"error")}:null}l(E,"sanitizeHostedSourceCheckStatus");function K(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"snapshotId"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...r(e,"buildStatus"),...r(e,"validationStatus"),...r(e,"evalStatus"),...r(e,"publishedAt"),...r(e,"error")}:null}l(K,"sanitizeHostedPublishStatus");function M(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"runId"),...r(e,"runtimeId"),...r(e,"sandboxId"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"setupGateStatus"),...f(e,"setupRequirementRefs"),...f(e,"artifactRefs"),...f(e,"traceArtifactRefs"),...f(e,"evalArtifactRefs"),...r(e,"startedAt"),...r(e,"completedAt"),...r(e,"error")}:null}l(M,"sanitizeHostedRunSummary");function r(n,e){let t=n[e];return typeof t=="string"||t===null?{[e]:t}:{}}l(r,"nullableStringProp");function k(n,e){let t=n[e];return typeof t=="boolean"||t===null?{[e]:t}:{}}l(k,"nullableBooleanProp");function T(n,e){let t=n[e];return typeof t=="number"||t===null?{[e]:t}:{}}l(T,"nullableNumberProp");function f(n,e){let t=n[e];if(!Array.isArray(t))return{};let s=t.filter(i=>typeof i=="string");return{[e]:s}}l(f,"stringArrayProp");function R(n){return typeof n=="string"&&n.trim()?n.trim():null}l(R,"stringField");function D(n,e){if(!b(n.handle,e.handle))return!1;let t=d(e.baseUrl);return t?d(n.baseUrl)===t:!d(n.baseUrl)}l(D,"accountMatchesSelector");function I(n,e,t={}){let s=d(e.baseUrl);if(s)return v(n,e.handle,s);let i=n.findIndex(a=>D(a,e));if(i!==-1)return i;let o=n.map((a,u)=>({account:a,index:u})).filter(({account:a})=>b(a.handle,e.handle));if(o.length>1&&t.requireUnambiguous)throw new Error(`multiple profiles found for ${e.handle}; pass --base-url to select one`);return o[0]?.index??-1}l(I,"findAccountIndexForSelector");function X(n){if(!n||typeof n!="object"||Array.isArray(n))return;let e=n,t={};return typeof e.token=="string"&&(t.token=e.token),(typeof e.appId=="string"||e.appId===null)&&(t.appId=e.appId),(typeof e.conversationId=="string"||e.conversationId===null)&&(t.conversationId=e.conversationId),Object.keys(t).length>0?t:void 0}l(X,"sanitizeSession");function Z(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=h(typeof e.handle=="string"?e.handle:void 0);if(!t)return null;let s={handle:t};typeof e.apiKey=="string"&&(s.apiKey=e.apiKey),typeof e.baseUrl=="string"&&(s.baseUrl=e.baseUrl),typeof e.apiBaseUrl=="string"&&(s.apiBaseUrl=e.apiBaseUrl),typeof e.chatApiBaseUrl=="string"&&(s.chatApiBaseUrl=e.chatApiBaseUrl),typeof e.environment=="string"&&(s.environment=e.environment);let i=X(e.session);return i&&(s.session=i),s}l(Z,"sanitizeAccount");function ee(n){let e={};return typeof n.token=="string"&&(e.token=n.token),(typeof n.appId=="string"||n.appId===null)&&(e.appId=n.appId),(typeof n.conversationId=="string"||n.conversationId===null)&&(e.conversationId=n.conversationId),Object.keys(e).length>0?e:void 0}l(ee,"extractLegacySession");function ne(n,e){let t={handle:e};typeof n.apiKey=="string"&&(t.apiKey=n.apiKey),typeof n.baseUrl=="string"&&(t.baseUrl=n.baseUrl),typeof n.apiBaseUrl=="string"&&(t.apiBaseUrl=n.apiBaseUrl),typeof n.chatApiBaseUrl=="string"&&(t.chatApiBaseUrl=n.chatApiBaseUrl);let s=ee(n);return s&&(t.session=s),t}l(ne,"extractLegacyAccount");function x(n){let e={};typeof n.lspEnabled=="boolean"&&(e.lspEnabled=n.lspEnabled),(n.executionMode==="local"||n.executionMode==="hosted")&&(e.executionMode=n.executionMode),(n.mode==="general"||n.mode==="builder")&&(e.mode=n.mode);let t=B(n.openpondProfile);t&&(e.openpondProfile=t);let s=[],i=Array.isArray(n.accounts)?n.accounts:[];for(let c of i){let p=Z(c);p&&v(s,p.handle,p.baseUrl)===-1&&s.push(p)}if(s.length===0){let c=y(n.activeProfile)?.handle||U;s.push(ne(n,c))}let o=y(n.activeProfile),a=o?I(s,o):-1,u=s[a===-1?0:a];return e.accounts=s,e.activeProfile=P(u),e}l(x,"normalizeGlobalConfig");function N(n,e,t){let s=n.accounts??[],i=d(t??process.env.OPENPOND_BASE_URL),o=h(e);if(o)return i?{handle:o,baseUrl:i}:{handle:o};let a=h(process.env.OPENPOND_ACCOUNT);if(a)return i?{handle:a,baseUrl:i}:{handle:a};let u=y(n.activeProfile);return u?i?{handle:u.handle,baseUrl:i}:u:s[0]?P(s[0]):{handle:U}}l(N,"resolveRequestedProfile");function G(n,e,t){let s=d(t);if(s){let o=v(n,e,s);if(o!==-1)return n[o]}else{let o=n.filter(a=>b(a.handle,e));if(o.length>1)throw new Error(`multiple profiles found for ${e}; pass --base-url to select one`);if(o.length===1)return o[0]}let i={handle:e};return s&&(i.baseUrl=s),n.push(i),i}l(G,"ensureAccount");function j(n){n.session&&Object.keys(n.session).length===0&&delete n.session}l(j,"cleanupAccount");function te(n,e,t,s){let i=t===null||t===void 0&&s.undefinedDeletes;switch(e){case"apiKey":{if(i){delete n.apiKey;return}typeof t=="string"&&(n.apiKey=t);return}case"baseUrl":{if(i){delete n.baseUrl;return}typeof t=="string"&&(n.baseUrl=t);return}case"apiBaseUrl":{if(i){delete n.apiBaseUrl;return}typeof t=="string"&&(n.apiBaseUrl=t);return}case"chatApiBaseUrl":{if(i){delete n.chatApiBaseUrl;return}typeof t=="string"&&(n.chatApiBaseUrl=t);return}case"token":case"appId":case"conversationId":{if(n.session||(n.session={}),i){delete n.session[e],j(n);return}(typeof t=="string"||t===null)&&(n.session[e]=t),j(n);return}}}l(te,"applyScopedKey");function $(n,e,t){if(!z.some(c=>m(e,c)))return!1;let i=n.accounts??[],o=y(e.activeProfile)??N(n),a=d(m(e,"baseUrl")?e.baseUrl??null:o.baseUrl??process.env.OPENPOND_BASE_URL),u=G(i,o.handle,a);for(let c of z)m(e,c)&&te(u,c,e[c],t);return n.accounts=i,n.activeProfile=P(u),!0}l($,"applyAccountPatch");function F(n,e){if(m(e,"lspEnabled")&&(typeof e.lspEnabled=="boolean"?n.lspEnabled=e.lspEnabled:e.lspEnabled===null&&delete n.lspEnabled),m(e,"executionMode")&&(e.executionMode==="local"||e.executionMode==="hosted"?n.executionMode=e.executionMode:e.executionMode===null&&delete n.executionMode),m(e,"mode")&&(e.mode==="general"||e.mode==="builder"?n.mode=e.mode:e.mode===null&&delete n.mode),m(e,"activeProfile")){let t=y(e.activeProfile);if(t){let s=I(n.accounts??[],t);n.activeProfile=s===-1?t:P((n.accounts??[])[s])}else e.activeProfile===null&&delete n.activeProfile}if(m(e,"openpondProfile")){let t=B(e.openpondProfile);t?n.openpondProfile=t:e.openpondProfile===null&&delete n.openpondProfile}}l(F,"applyTopLevelPatch");async function oe(n){let e=A();await S(e),await L(e,()=>n)}l(oe,"writeGlobalConfig");async function _(n){let e=A();return await S(e),await L(e,t=>{let s=x(t);return n(s),s})}l(_,"updateGlobalConfig");async function Y(){let n=A();return await S(n),x(await H(n))}l(Y,"loadGlobalConfig");async function le(n={}){let e=await Y(),t=e.accounts??[],s=N(e,n.account,n.baseUrl),i=I(t,s,{requireUnambiguous:!0}),o=i===-1?null:t[i],a=o?.session;return{...e,activeProfile:o?P(o):s,apiKey:o?.apiKey,baseUrl:o?.baseUrl,apiBaseUrl:o?.apiBaseUrl,chatApiBaseUrl:o?.chatApiBaseUrl,token:a?.token,appId:a?.appId,conversationId:a?.conversationId}}l(le,"loadConfig");async function J(){let n=await Y(),e=y(n.activeProfile);return(n.accounts??[]).map(t=>{let s=h(t.handle)??U;return{handle:s,baseUrl:d(t.baseUrl),apiBaseUrl:d(t.apiBaseUrl),chatApiBaseUrl:d(t.chatApiBaseUrl),environment:t.environment?.trim()||null,isActive:!!(e&&D({...t,handle:s},e)),hasApiKey:!!t.apiKey?.trim(),hasSessionToken:!!t.session?.token?.trim(),sessionAppId:t.session?.appId??null,sessionConversationId:t.session?.conversationId??null}})}l(J,"listConfiguredProfiles");async function ae(n,e={}){let t=q(n),s=d(e.baseUrl),i=-1;await _(a=>{let u=a.accounts??[];if(i=I(u,s?{handle:t,baseUrl:s}:{handle:t},{requireUnambiguous:!0}),i===-1)throw new Error(`profile not found: ${t}`);a.activeProfile=P(u[i])});let o=await J();return o.find(a=>a.isActive)??o[i]}l(ae,"setActiveProfile");async function ue(n){let e=q(n.handle),t=W(n.apiKey),s=d(n.baseUrl),i=d(n.apiBaseUrl),o=d(n.chatApiBaseUrl),a={handle:e};await _(p=>{let C=p.accounts??[],g=G(C,e,s);g.apiKey=t,s&&(g.baseUrl=s),i?g.apiBaseUrl=i:n.apiBaseUrl===null&&delete g.apiBaseUrl,o?g.chatApiBaseUrl=o:n.chatApiBaseUrl===null&&delete g.chatApiBaseUrl,n.environment===null?delete g.environment:typeof n.environment=="string"&&n.environment.trim()&&(g.environment=n.environment.trim()),p.accounts=C,a=P(g),n.setActive!==!1&&(p.activeProfile=a)});let c=(await J()).find(p=>b(p.handle,a.handle)?s?d(p.baseUrl)===s:!0:!1);if(!c)throw new Error(`failed to save profile: ${e}`);return c}l(ue,"saveProfileApiKey");async function ce(n){let e=x(n);F(e,n),$(e,n,{undefinedDeletes:!0}),await oe(e)}l(ce,"saveConfig");async function de(n){await _(e=>{F(e,n),$(e,n,{undefinedDeletes:!1})})}l(de,"saveGlobalConfig");export{re as a,_ as b,Y as c,le as d,J as e,ae as f,ue as g,ce as h,de as i};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as he,b as ye,d as Ae,e as D}from"./chunk-4N4EH3RJ.js";import{a as L,b as ge,c as Pe,d as we,e as Oe}from"./chunk-ULJZ7NUF.js";import{j as xe}from"./chunk-WJSJXK2N.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 me}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;let i=o.filter(c=>P(c.handle,r.handle));return i.length===1?i[0]??null:null}return o[0]?o[0]:null}a(Ue,"findActiveAccount");function ke(e){let t=Array.isArray(e.accounts)?e.accounts:[],n=A(e.activeProfile)??(t[0]?v(t[0]):null);return ie(t.map(o=>({handle:o.handle,baseUrl:l(o.baseUrl),apiBaseUrl:l(o.apiBaseUrl),chatApiBaseUrl:l(o.chatApiBaseUrl),environment:$(o.environment),isActive:n?U(o,n):!1,hasApiKey:!!o.apiKey?.trim(),hasSessionToken:!!(o.session?.token?.trim()||o.token?.trim()),sessionAppId:o.session?.appId??null,sessionConversationId:o.session?.conversationId??null})))}a(ke,"fallbackProfilesFromConfig");function ie(e){let t=new Map;for(let n of e){let o=l(n.baseUrl),r=`${n.handle.toLowerCase()}|${o??"default"}`,s={...n,baseUrl:o,apiBaseUrl:l(n.apiBaseUrl),chatApiBaseUrl:l(n.chatApiBaseUrl),environment:$(n.environment),isActive:n.isActive},i=t.get(r);(!i||s.isActive&&!i.isActive||s.hasApiKey&&!i.hasApiKey)&&t.set(r,s)}return Array.from(t.values())}a(ie,"normalizeProfiles");function Ee(e){return e.hasApiKey||e.hasSessionToken?"signed_in":"signed_out"}a(Ee,"profileAuthHealth");function ze(e,t){return e?{reachable:e.reachable,authenticated:e.authenticated,apiBase:e.apiBase||t,latencyMs:e.latencyMs,status:e.status,service:e.service,checkedAt:e.checkedAt,error:e.error??null}:null}a(ze,"normalizeHealth");function Be(e){let t=e?.account;return t?{id:t.id??null,email:t.email??null,name:t.name??null,handle:t.handle??null,image:t.image??null,timezone:t.timezone??null,isAdmin:t.isAdmin??null,isVerified:t.isVerified??null,dailyAgentAppId:t.dailyAgentAppId??null,dailyAgentDeploymentId:t.dailyAgentDeploymentId??null,credits:t.credits??null}:null}a(Be,"normalizeProfile");function Fe(e){return(e??[]).map(t=>({...t,id:t.id||t.userProductId||t.openPondProductId||t.name,name:t.name,type:t.type,status:t.status,isActive:t.isActive??null,price:t.price??null,currency:t.currency??null,credits:t.credits??null}))}a(Fe,"normalizeProducts");function je(e){return e.handle.trim().toLowerCase()==="default"&&!l(e.baseUrl)&&!e.hasApiKey&&!e.hasSessionToken}a(je,"isEmptyDefaultProfile");function Ke(e){let t=e?.trim();return t?t.length>=12?`\u2022\u2022\u2022\u2022\u2022\u2022${t.slice(-6)}`:"\u2022\u2022\u2022\u2022\u2022\u2022":null}a(Ke,"apiKeyHint");function qe(e){return e?.auth?.authType!=="openpond-api-key"||!e.auth.keyAccess?null:{ownerType:e.auth.keyAccess.ownerType,teamId:e.auth.keyAccess.teamId,scopes:e.auth.scopes}}a(qe,"apiKeyAccess");function H(e){let{config:t,profiles:n,account:o,token:r,apiBaseUrl:s,accountResponse:i,accountProfiles:c,health:m,authFailed:g,error:f}=e,w=Q(o,t,s),h=Be(i??null),C=A(t.activeProfile),_=(o?v(o):null)??C,O=h?.handle||o?.handle||_?.handle||null,I=(_?n.find(p=>se(p,_)):null)??n.find(p=>p.isActive)??null,y=g?"auth_error":r?"signed_in":"signed_out",d=h?.name||h?.handle||h?.email||O||"Signed out",R=l(I?.baseUrl||o?.baseUrl||N),k=$(I?.environment||o?.environment),x=A(_)??(O?A({handle:O,baseUrl:I?.baseUrl??o?.baseUrl}):null),j=(n.length>0?n:O?[{handle:O,baseUrl:ee(x)??l(o?.baseUrl),apiBaseUrl:s,chatApiBaseUrl:w,environment:k,isActive:!0,hasApiKey:!!r,hasSessionToken:!1,sessionAppId:null,sessionConversationId:null}]:[]).filter(p=>!je(p));return{state:y,activeProfile:x,label:d,email:h?.email??null,avatarUrl:h?.image??null,environment:k,baseUrl:R,apiBaseUrl:s,chatApiBaseUrl:w,creditsLabel:h?.credits??null,profile:h,products:Fe(i?.products),apiHealth:ze(m??null,s),accounts:j.map(p=>{let T=l(p.baseUrl),De=t.accounts?.find(fe=>P(fe.handle,p.handle)&&b(fe.baseUrl,T)),oe=c?.[q(p.handle,T)]??null,K=Be(oe?.response??null);return{handle:p.handle,baseUrl:T,apiBaseUrl:l(p.apiBaseUrl),chatApiBaseUrl:l(p.chatApiBaseUrl),environment:$(p.environment),isActive:x?se(p,x):!1,authHealth:oe?.authFailed?"auth_error":Ee(p),displayLabel:K?.name||K?.handle||K?.email||p.handle,email:K?.email??null,avatarUrl:K?.image??null,apiKeyHint:Ke(De?.apiKey),apiKeyAccess:qe(oe?.response??null)}}),error:f??m?.error??null}}a(H,"toAccountState");async function Ge(e){try{return ie(await Pe())}catch{return ke(e)}}a(Ge,"loadProfiles");async function u(e,t){let n=await ge(),o=await Ge(n),r=Ue(n,e,t),s=Z(r),i=Y(r,n),c=Q(r,n,i);return{config:n,profiles:o,account:r,token:s,apiBaseUrl:i,chatApiBaseUrl:c,accountState:H({config:n,profiles:o,account:r,token:s,apiBaseUrl:i})}}a(u,"loadOpenPondAccountContext");async function We(e){let t=l(e.baseUrl);return await we(e.handle,{baseUrl:t}),u(e.handle,t)}a(We,"switchOpenPondAccount");import{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"&&me.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
|
-
`);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"),
|
|
4
|
-
`);h=d.pop()??"";for(let R of d)for(let k of
|
|
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(`
|
|
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
|
+
`);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(`
|
|
6
|
-
`),n=e.indexOf("\r");return t<0?n:n<0?t:Math.min(t,n)}a(At,"nextLineEnd");var An="OPENPOND_STORAGE_PROGRESS ";import{spawn as gt}from"node:child_process";function Re(e,t=process.platform){return t==="darwin"?{command:"open",args:[e]}:t==="win32"?{command:"rundll32.exe",args:["url.dll,FileProtocolHandler",e]}:{command:"xdg-open",args:[e]}}a(Re,"resolveSystemBrowserCommand");async function Pt(e,t={}){let n=t.command??Re(e),o=t.handoffTimeoutMs??1500;return new Promise(r=>{let s=!1,i=null,c=a(g=>{s||(s=!0,i&&clearTimeout(i),r(g))},"finish"),m=gt(n.command,n.args,{detached:!1,shell:!1,stdio:"ignore",windowsHide:!0});m.once("error",g=>{let f=g.code;c({opened:!1,error:f?`browser launcher ${n.command} failed (${f})`:`browser launcher ${n.command} failed`})}),m.once("close",(g,f)=>{if(g===0){c({opened:!0});return}let w=f?`signal ${f}`:`code ${g??"unknown"}`;c({opened:!1,error:`browser launcher ${n.command} exited with ${w}`})}),i=setTimeout(()=>{m.unref(),c({opened:!0})},o),i.unref()})}a(Pt,"openUrlWithSystemBrowser");function wt(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id:null,o=typeof t.name=="string"?t.name:n;if(!n||!o)return null;let r=t.latestDeployment&&typeof t.latestDeployment=="object"?t.latestDeployment:null,s=xe.safeParse(t.sandboxActionRegistry);return{id:n,name:o,description:typeof t.description=="string"?t.description:null,visibility:typeof t.visibility=="string"?t.visibility:null,gitOwner:typeof t.gitOwner=="string"?t.gitOwner:null,gitRepo:typeof t.gitRepo=="string"?t.gitRepo:null,gitHost:typeof t.gitHost=="string"?t.gitHost:null,defaultBranch:typeof t.defaultBranch=="string"?t.defaultBranch:null,sandbox:t.sandbox===!0,sandboxActionRegistry:s.success?s.data:null,sandboxManifestHash:typeof t.sandboxManifestHash=="string"?t.sandboxManifestHash:null,sandboxManifestPath:typeof t.sandboxManifestPath=="string"?t.sandboxManifestPath:null,sandboxManifestSyncedAt:typeof t.sandboxManifestSyncedAt=="string"?t.sandboxManifestSyncedAt:t.sandboxManifestSyncedAt instanceof Date?t.sandboxManifestSyncedAt.toISOString():null,sandboxManifestError:typeof t.sandboxManifestError=="string"?t.sandboxManifestError:null,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:null,latestDeployment:r?{id:typeof r.id=="string"?r.id:void 0,status:typeof r.status=="string"?r.status:void 0,deploymentDomain:typeof r.deploymentDomain=="string"?r.deploymentDomain:null,createdAt:typeof r.createdAt=="string"?r.createdAt:void 0,isProduction:typeof r.isProduction=="boolean"?r.isProduction:null,gitBranch:typeof r.gitBranch=="string"?r.gitBranch:null}:null,scheduleSummary:xt(t.scheduleSummary)}}a(wt,"normalizeApp");function S(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}a(S,"normalizeDateString");function Ot(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id:null,o=typeof t.name=="string"?t.name:n,r=typeof t.deploymentId=="string"?t.deploymentId:null;return!n||!o||!r?null:{id:n,name:o,description:typeof t.description=="string"?t.description:null,scheduleType:typeof t.scheduleType=="string"?t.scheduleType:"cron",scheduleExpression:typeof t.scheduleExpression=="string"?t.scheduleExpression:"",enabled:!!t.enabled,rawEnabled:typeof t.rawEnabled=="boolean"?t.rawEnabled:void 0,syncStatus:typeof t.syncStatus=="string"?t.syncStatus:null,syncError:typeof t.syncError=="string"?t.syncError:null,startAt:S(t.startAt),endAt:S(t.endAt),maxRuns:typeof t.maxRuns=="number"?t.maxRuns:null,executionCount:typeof t.executionCount=="number"?t.executionCount:null,lifecycleStatus:typeof t.lifecycleStatus=="string"?t.lifecycleStatus:null,lifecycleReason:typeof t.lifecycleReason=="string"?t.lifecycleReason:null,lastExecutionAt:S(t.lastExecutionAt),lastExecutionStatus:typeof t.lastExecutionStatus=="string"?t.lastExecutionStatus:null,lastRunNowAt:S(t.lastRunNowAt),lastRunNowStatus:typeof t.lastRunNowStatus=="string"?t.lastRunNowStatus:null,updatedAt:S(t.updatedAt)??new Date().toISOString(),deploymentId:r,isProduction:typeof t.isProduction=="boolean"?t.isProduction:void 0,payload:t.payload}}a(Ot,"normalizeSchedule");function xt(e){if(!e||typeof e!="object")return null;let t=e,n=Array.isArray(t.schedules)?t.schedules.map(Ot).filter(i=>!!i):[],o=typeof t.total=="number"?t.total:n.length,r=typeof t.active=="number"?t.active:n.filter(i=>i.enabled).length,s=typeof t.paused=="number"?t.paused:Math.max(0,o-r);return{total:o,active:r,paused:s,enabled:typeof t.enabled=="number"?t.enabled:r,disabled:typeof t.disabled=="number"?t.disabled:s,nextRunAt:S(t.nextRunAt),lastRunAt:S(t.lastRunAt),schedules:n,truncated:typeof t.truncated=="boolean"?t.truncated:void 0}}a(xt,"normalizeScheduleSummary");async function bt(e){let t=Array.isArray(e.config.accounts)?e.config.accounts:[],n=await Promise.all(t.map(async o=>{let r=q(o.handle,o.baseUrl),s=Z(o);if(!s)return[r,{response:null,authFailed:!1,error:null}];try{return[r,{response:await D(Y(o,e.config),s),authFailed:!1,error:null}]}catch(i){return[r,{response:null,authFailed:!0,error:z(i)}]}}));return Object.fromEntries(n)}a(bt,"loadAccountProfileLookups");async function Te(e){let t=await bt(e),n=e.account?t[q(e.account.handle,e.account.baseUrl)]??null:null,o=n?.response??null,r=e.token&&n?.authFailed?n.error||"OpenPond account authentication failed.":null;return{account:H({...e,accountResponse:o,accountProfiles:t,authFailed:!!r,error:r})}}a(Te,"loadOpenPondAccountStateForContext");async function Ut(){return Te(await u())}a(Ut,"loadOpenPondAccountState");async function Ne(e={}){let t=await u(),n=Te(t);if(!t.token)return{...await n,apps:[],error:"No OpenPond API key or session token is configured."};let[o,r]=await Promise.allSettled([n,
|
|
6
|
+
`),n=e.indexOf("\r");return t<0?n:n<0?t:Math.min(t,n)}a(At,"nextLineEnd");var An="OPENPOND_STORAGE_PROGRESS ";import{spawn as gt}from"node:child_process";function Re(e,t=process.platform){return t==="darwin"?{command:"open",args:[e]}:t==="win32"?{command:"rundll32.exe",args:["url.dll,FileProtocolHandler",e]}:{command:"xdg-open",args:[e]}}a(Re,"resolveSystemBrowserCommand");async function Pt(e,t={}){let n=t.command??Re(e),o=t.handoffTimeoutMs??1500;return new Promise(r=>{let s=!1,i=null,c=a(g=>{s||(s=!0,i&&clearTimeout(i),r(g))},"finish"),m=gt(n.command,n.args,{detached:!1,shell:!1,stdio:"ignore",windowsHide:!0});m.once("error",g=>{let f=g.code;c({opened:!1,error:f?`browser launcher ${n.command} failed (${f})`:`browser launcher ${n.command} failed`})}),m.once("close",(g,f)=>{if(g===0){c({opened:!0});return}let w=f?`signal ${f}`:`code ${g??"unknown"}`;c({opened:!1,error:`browser launcher ${n.command} exited with ${w}`})}),i=setTimeout(()=>{m.unref(),c({opened:!0})},o),i.unref()})}a(Pt,"openUrlWithSystemBrowser");function wt(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id:null,o=typeof t.name=="string"?t.name:n;if(!n||!o)return null;let r=t.latestDeployment&&typeof t.latestDeployment=="object"?t.latestDeployment:null,s=xe.safeParse(t.sandboxActionRegistry);return{id:n,name:o,description:typeof t.description=="string"?t.description:null,visibility:typeof t.visibility=="string"?t.visibility:null,gitOwner:typeof t.gitOwner=="string"?t.gitOwner:null,gitRepo:typeof t.gitRepo=="string"?t.gitRepo:null,gitHost:typeof t.gitHost=="string"?t.gitHost:null,defaultBranch:typeof t.defaultBranch=="string"?t.defaultBranch:null,sandbox:t.sandbox===!0,sandboxActionRegistry:s.success?s.data:null,sandboxManifestHash:typeof t.sandboxManifestHash=="string"?t.sandboxManifestHash:null,sandboxManifestPath:typeof t.sandboxManifestPath=="string"?t.sandboxManifestPath:null,sandboxManifestSyncedAt:typeof t.sandboxManifestSyncedAt=="string"?t.sandboxManifestSyncedAt:t.sandboxManifestSyncedAt instanceof Date?t.sandboxManifestSyncedAt.toISOString():null,sandboxManifestError:typeof t.sandboxManifestError=="string"?t.sandboxManifestError:null,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:null,latestDeployment:r?{id:typeof r.id=="string"?r.id:void 0,status:typeof r.status=="string"?r.status:void 0,deploymentDomain:typeof r.deploymentDomain=="string"?r.deploymentDomain:null,createdAt:typeof r.createdAt=="string"?r.createdAt:void 0,isProduction:typeof r.isProduction=="boolean"?r.isProduction:null,gitBranch:typeof r.gitBranch=="string"?r.gitBranch:null}:null,scheduleSummary:xt(t.scheduleSummary)}}a(wt,"normalizeApp");function S(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}a(S,"normalizeDateString");function Ot(e){if(!e||typeof e!="object")return null;let t=e,n=typeof t.id=="string"?t.id:null,o=typeof t.name=="string"?t.name:n,r=typeof t.deploymentId=="string"?t.deploymentId:null;return!n||!o||!r?null:{id:n,name:o,description:typeof t.description=="string"?t.description:null,scheduleType:typeof t.scheduleType=="string"?t.scheduleType:"cron",scheduleExpression:typeof t.scheduleExpression=="string"?t.scheduleExpression:"",enabled:!!t.enabled,rawEnabled:typeof t.rawEnabled=="boolean"?t.rawEnabled:void 0,syncStatus:typeof t.syncStatus=="string"?t.syncStatus:null,syncError:typeof t.syncError=="string"?t.syncError:null,startAt:S(t.startAt),endAt:S(t.endAt),maxRuns:typeof t.maxRuns=="number"?t.maxRuns:null,executionCount:typeof t.executionCount=="number"?t.executionCount:null,lifecycleStatus:typeof t.lifecycleStatus=="string"?t.lifecycleStatus:null,lifecycleReason:typeof t.lifecycleReason=="string"?t.lifecycleReason:null,lastExecutionAt:S(t.lastExecutionAt),lastExecutionStatus:typeof t.lastExecutionStatus=="string"?t.lastExecutionStatus:null,lastRunNowAt:S(t.lastRunNowAt),lastRunNowStatus:typeof t.lastRunNowStatus=="string"?t.lastRunNowStatus:null,updatedAt:S(t.updatedAt)??new Date().toISOString(),deploymentId:r,isProduction:typeof t.isProduction=="boolean"?t.isProduction:void 0,payload:t.payload}}a(Ot,"normalizeSchedule");function xt(e){if(!e||typeof e!="object")return null;let t=e,n=Array.isArray(t.schedules)?t.schedules.map(Ot).filter(i=>!!i):[],o=typeof t.total=="number"?t.total:n.length,r=typeof t.active=="number"?t.active:n.filter(i=>i.enabled).length,s=typeof t.paused=="number"?t.paused:Math.max(0,o-r);return{total:o,active:r,paused:s,enabled:typeof t.enabled=="number"?t.enabled:r,disabled:typeof t.disabled=="number"?t.disabled:s,nextRunAt:S(t.nextRunAt),lastRunAt:S(t.lastRunAt),schedules:n,truncated:typeof t.truncated=="boolean"?t.truncated:void 0}}a(xt,"normalizeScheduleSummary");async function bt(e){let t=Array.isArray(e.config.accounts)?e.config.accounts:[],n=await Promise.all(t.map(async o=>{let r=q(o.handle,o.baseUrl),s=Z(o);if(!s)return[r,{response:null,authFailed:!1,error:null}];try{return[r,{response:await D(Y(o,e.config),s),authFailed:!1,error:null}]}catch(i){return[r,{response:null,authFailed:!0,error:z(i)}]}}));return Object.fromEntries(n)}a(bt,"loadAccountProfileLookups");async function Te(e){let t=await bt(e),n=e.account?t[q(e.account.handle,e.account.baseUrl)]??null:null,o=n?.response??null,r=e.token&&n?.authFailed?n.error||"OpenPond account authentication failed.":null;return{account:H({...e,accountResponse:o,accountProfiles:t,authFailed:!!r,error:r})}}a(Te,"loadOpenPondAccountStateForContext");async function Ut(){return Te(await u())}a(Ut,"loadOpenPondAccountState");async function Ne(e={}){let t=await u(),n=Te(t);if(!t.token)return{...await n,apps:[],error:"No OpenPond API key or session token is configured."};let[o,r]=await Promise.allSettled([n,me(t.apiBaseUrl,t.token,{handle:t.account?.handle,limit:e.limit??20,offset:e.offset??0,includeScheduled:e.includeScheduled??!0})]);if(o.status==="rejected")throw o.reason;return{account:o.value.account,apps:r.status==="fulfilled"?r.value.map(wt).filter(s=>!!s):[],error:r.status==="rejected"?z(r.reason):null}}a(Ne,"loadOpenPondApps");async function kt(e){let t=await u();if(!t.token)throw new Error("No OpenPond API key or session token is configured.");return{account:t,response:await he(t.apiBaseUrl,t.token,e)}}a(kt,"createOpenPondRepoApp");import{createHash as Et}from"node:crypto";function _t(e){return`account-${Et("sha256").update(e).digest("hex").slice(0,8)}`}a(_t,"fallbackHandleForApiKey");function te(e){let t=e?.trim();return t?t.replace(/^@/,""):null}a(te,"normalizeDerivedHandle");async function Bt(e,t){let n=te(e.handle);if(n)return n;try{let r=(await D(t,e.apiKey)).account,s=te(r.handle)??te(r.email?.split("@")[0])??te(r.id);if(s)return s}catch{}return _t(e.apiKey)}a(Bt,"deriveHandleForApiKey");async function vt(e){let t=e.baseUrl??N,n=l(e.apiBaseUrl)??X(t)??E,o=l(e.chatApiBaseUrl),r=await Bt(e,n);return await Oe({handle:r,apiKey:e.apiKey,baseUrl:t,apiBaseUrl:n,chatApiBaseUrl:o,environment:e.environment??"production",setActive:e.setActive}),u(r,t)}a(vt,"saveOpenPondAccount");function St(e,t,n){let o=l(n),r=e.findIndex(i=>P(i.handle,t)&&b(i.baseUrl,o));if(r!==-1)return r;let s=e.map((i,c)=>({account:i,index:c})).filter(({account:i})=>P(i.handle,t));if(s.length===1)return s[0].index;if(s.length>1)throw new Error(`Multiple OpenPond accounts match ${t}; select one with its base URL.`);return-1}a(St,"findAccountIndex");async function Ct(e){let t=e.handle.trim();if(!t)throw new Error("OpenPond account handle is required.");return await L(n=>{let o=(n.accounts??[]).map(m=>({...m})),r=St(o,t,e.baseUrl);if(r===-1)throw new Error(`OpenPond account not found: ${t}`);let s=o[r],i=A(n.activeProfile),c=!!(i&&U(s,i));o.splice(r,1),n.accounts=o,(c||!i||!o.some(m=>U(m,i)))&&(o[0]?n.activeProfile=v(o[0]):delete n.activeProfile)}),u()}a(Ct,"removeOpenPondAccount");async function It(){let e;return await L(t=>{let n=A(t.activeProfile),o=(t.accounts??[]).map(s=>({...s})),r=n?o.findIndex(s=>U(s,n)):0;if(r<0||!o[r])throw new Error("No active OpenPond account to log out.");e={...o[r]},delete e.apiKey,delete e.session,o[r]=e,t.accounts=o}),u(e.handle,e.baseUrl)}a(It,"signOutOpenPondAccount");function Rt(e,t,n){let o=l(n),r=e.findIndex(i=>P(i.handle,t)&&b(i.baseUrl,o));if(r!==-1)return r;let s=e.map((i,c)=>({account:i,index:c})).filter(({account:i})=>P(i.handle,t));if(s.length===1)return s[0].index;if(s.length>1)throw new Error(`Multiple OpenPond accounts match ${t}; select one with its current base URL.`);return-1}a(Rt,"findAccountIndex");function pe(e,t,n){if(n===void 0)return;let o=l(n);if(o){e[t]=o;return}(n===null||n.trim()==="")&&delete e[t]}a(pe,"applyOptionalUrl");async function Tt(e){let t=e.handle.trim();if(!t)throw new Error("OpenPond account handle is required.");let n;return await L(o=>{let r=(o.accounts??[]).map(f=>({...f})),s=Rt(r,t,e.currentBaseUrl);if(s===-1)throw new Error(`OpenPond account not found: ${t}`);let i=r[s];if(n={...i},e.apiKey!==void 0){let f=e.apiKey.trim();if(!f)throw new Error("OpenPond API key cannot be empty.");n.apiKey=f,delete n.session,delete n.token}if(pe(n,"baseUrl",e.baseUrl),pe(n,"apiBaseUrl",e.apiBaseUrl),pe(n,"chatApiBaseUrl",e.chatApiBaseUrl),e.environment===null?delete n.environment:typeof e.environment=="string"&&e.environment.trim()&&(n.environment=e.environment.trim()),r.findIndex((f,w)=>w!==s&&P(f.handle,n.handle)&&b(f.baseUrl,n.baseUrl))!==-1)throw new Error("Another OpenPond account already uses that handle and base URL.");let m=A(o.activeProfile),g=!!(m&&U(i,m));r[s]=n,o.accounts=r,o.activeProfile=e.setActive||g?v(n):o.activeProfile}),u(n.handle,n.baseUrl)}a(Tt,"updateOpenPondAccountConfig");async function Nt(e){let t=await u();if(!t.token)throw new Error("OpenPond is signed out. Add an account before reading app config.");return ye(t.apiBaseUrl,t.token,e.appId)}a(Nt,"getOpenPondAppEnvironment");export{u as a,We as b,Xe as c,Ut as d,Ne as e,kt as f,tt as g,nt as h,ot as i,Ce as j,vt as k,Ct as l,It as m,Tt as n,Nt as o,ht as p,yt as q,An as r,Pt as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{g as m}from"./chunk-
|
|
2
|
+
import{g as m}from"./chunk-WCNPGKST.js";import{c as d}from"./chunk-JVMSN7LH.js";import{n as f}from"./chunk-RCT3O3HQ.js";import{a as n}from"./chunk-FTQLQJQV.js";import h from"node:path";function p(r){let o=r.environment.metadata.runtimeSourceTasksetId,s=o===void 0?r.id:o;if(typeof s!="string"||!s||s==="."||s===".."||h.basename(s)!==s||s.includes("\\"))throw new Error(`Taskset ${r.id} has an invalid package directory identity.`);return s}n(p,"tasksetPackageDirectoryId");import R from"node:path";async function D(r){let{taskset:o}=r,{taskset:s,modelResources:k,learningResources:u}=r.content,l=new Set([...k?.assets??[],...u?.assets??[]].map(e=>e.id)),c=new Map,i=n((e,a=e.path)=>{if(l.has(e.id))return;let t=c.get(e.id);if(t&&(f(t.asset)!==f(e)||t.sourcePath!==a))throw new Error(`Conflicting local Taskset file reference: ${e.id}.`);c.set(e.id,{asset:e,sourcePath:a})},"add");for(let e of d.parse(o.metadata.portableFileInventory??[]))i(e.asset,e.sourcePath);for(let e of s.tasks){let a=o.tasks.find(t=>t.id===e.id);for(let t of e.artifactRefs)i(t,a?.assets?.find(g=>g.id===t.id)?.artifactRef??t.path);for(let t of e.requiredOutputs??[])t.schemaRef&&i(t.schemaRef)}for(let e of s.graders){let a=o.graders.find(t=>t.id===e.id);"verifierRef"in e&&i(e.verifierRef,a?.kind==="custom_verifier"?a.module:e.verifierRef.path),"rubricRef"in e&&i(e.rubricRef)}return m({root:R.join(r.storeDir,"training","tasksets",p(o)),content:r.content,sources:[...c.values()]})}n(D,"captureAuthoredModelTasksetPackage");export{p as a,D as b};
|