openpond 0.2.61 → 0.2.62
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 +3264 -18
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-FUAWCKBH.js → acp-DYRBDJRU.js} +1 -1
- package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-UTLP7C3I.js} +1 -1
- package/dist/chunks/{actions-command-LOHNQUWP.js → actions-command-6LF4Z4WK.js} +1 -1
- package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-N2H3RBEN.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-Q2VWWJNX.js → app-server-connected-apps-3T546FE7.js} +1 -1
- package/dist/chunks/app-server-evaluations-TXD747QA.js +2 -0
- package/dist/chunks/{app-server-harness-services-2PSZBT7U.js → app-server-harness-services-BBCDV5P3.js} +1 -1
- package/dist/chunks/app-server-runtime-VEJPDAFP.js +2 -0
- package/dist/chunks/{apps-7PIBF32Q.js → apps-CTT2XYRR.js} +1 -1
- package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
- package/dist/chunks/{chunk-5VPU7OS7.js → chunk-2IIBCCOK.js} +1 -1
- package/dist/chunks/{chunk-ZISYLRH6.js → chunk-2UDAKLJ4.js} +1 -1
- package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
- package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-3R4MSE2S.js} +1 -1
- package/dist/chunks/{chunk-OFVUN4KI.js → chunk-47AXSBPV.js} +1 -1
- package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
- package/dist/chunks/chunk-4PZWGNX4.js +86 -0
- package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-4RZBGKT7.js} +1 -1
- package/dist/chunks/{chunk-VBW2X42G.js → chunk-4TM75R7V.js} +1 -1
- package/dist/chunks/chunk-4U2FNXQW.js +2 -0
- package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
- package/dist/chunks/{chunk-VWJ5IYQP.js → chunk-547AUVKN.js} +1 -1
- package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-557XSPVS.js} +1 -1
- package/dist/chunks/{chunk-ZHFH2TZN.js → chunk-557YG77L.js} +1 -1
- package/dist/chunks/{chunk-MF35MALN.js → chunk-5A6ER3M2.js} +1 -1
- package/dist/chunks/{chunk-U4HZD2GM.js → chunk-5OSM75X5.js} +1 -1
- package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-6SH4B7DV.js} +1 -1
- package/dist/chunks/chunk-6XSSM4WT.js +3 -0
- package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-7JBB4PXS.js} +1 -1
- package/dist/chunks/{chunk-SID4X3YN.js → chunk-7JXZNCBC.js} +1 -1
- package/dist/chunks/chunk-7KTARW23.js +2 -0
- package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
- package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-AKZPMKWP.js} +1 -1
- package/dist/chunks/{chunk-SIV5P6JO.js → chunk-AMO5DVKM.js} +2 -2
- package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
- package/dist/chunks/{chunk-4RHM4WN2.js → chunk-B42QQUZY.js} +1 -1
- package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
- package/dist/chunks/{chunk-CQF6QZEL.js → chunk-BEI4YULC.js} +1 -1
- package/dist/chunks/chunk-BKEDG3A4.js +22 -0
- package/dist/chunks/{chunk-GEXKTGLY.js → chunk-C7M2WBWZ.js} +14 -14
- package/dist/chunks/{chunk-ELYRVTTG.js → chunk-CJUVHE4U.js} +1 -1
- package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-EIX2V2KU.js} +1 -1
- package/dist/chunks/{chunk-AWPYTDH4.js → chunk-EWOTDVDJ.js} +1 -1
- package/dist/chunks/{chunk-B47JMAVW.js → chunk-F4TJ7WQV.js} +1 -1
- package/dist/chunks/{chunk-TXBIZDXG.js → chunk-F7D4BMTO.js} +1 -1
- package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FFWOTZQM.js} +1 -1
- package/dist/chunks/{chunk-6RVF2J47.js → chunk-FUSCTBJI.js} +1 -1
- package/dist/chunks/{chunk-BN5AVRUG.js → chunk-GAQLXFOT.js} +1 -1
- package/dist/chunks/{chunk-LHENAWLH.js → chunk-GEKORCMN.js} +1 -1
- package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-GNCEZ3UP.js} +1 -1
- package/dist/chunks/{chunk-WRQEYW3V.js → chunk-GOIKLFXK.js} +1 -1
- package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GQGLPKU4.js} +1 -1
- package/dist/chunks/{chunk-LBBXVOVR.js → chunk-GSWBNJGZ.js} +1 -1
- package/dist/chunks/{chunk-7EAWLYYB.js → chunk-GV3LFSMI.js} +1 -1
- package/dist/chunks/{chunk-GQUS7MCH.js → chunk-GW5SE3FM.js} +1 -1
- package/dist/chunks/{chunk-I3W27VK4.js → chunk-HBLN4OLY.js} +1 -1
- package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
- package/dist/chunks/{chunk-4P3X2RXA.js → chunk-HKV7RX5E.js} +1 -1
- package/dist/chunks/{chunk-QDBYLJGH.js → chunk-HXZXDDKW.js} +1 -1
- package/dist/chunks/{chunk-LNRFRAV5.js → chunk-INO67SEN.js} +1 -1
- package/dist/chunks/{chunk-E67M5WGY.js → chunk-IWK3RTLR.js} +1 -1
- package/dist/chunks/{chunk-U447MS3Y.js → chunk-J3B2GM4A.js} +1 -1
- package/dist/chunks/chunk-JCLTFDVW.js +2 -0
- package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
- package/dist/chunks/{chunk-D4JZALZ4.js → chunk-JIFUGA3U.js} +1 -1
- package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
- package/dist/chunks/{chunk-FWIPHEVA.js → chunk-JX6OX6XE.js} +1 -1
- package/dist/chunks/{chunk-D5ADDBS5.js → chunk-JY3YSI54.js} +1 -1
- package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
- package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
- package/dist/chunks/chunk-LILXHGIA.js +2 -0
- package/dist/chunks/{chunk-MCIIGQT7.js → chunk-LJDBR3RN.js} +1 -1
- package/dist/chunks/{chunk-3TYCIYW6.js → chunk-LJPO3TEL.js} +1 -1
- package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LRRBYIGH.js} +2 -2
- package/dist/chunks/{chunk-P4XM7LUT.js → chunk-M5IX6VUA.js} +1 -1
- package/dist/chunks/chunk-MEK7DLX3.js +2 -0
- package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
- package/dist/chunks/{chunk-ZBBVRYU3.js → chunk-MNFW5WLD.js} +1 -1
- package/dist/chunks/{chunk-2VXL6AU3.js → chunk-MNXNZDDW.js} +1 -1
- package/dist/chunks/chunk-N5GPINVP.js +2 -0
- package/dist/chunks/{chunk-TSAW2QVU.js → chunk-NBE74GLF.js} +1 -1
- package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-NE4ESZPT.js} +1 -1
- package/dist/chunks/{chunk-CO3OJFPU.js → chunk-NKZNPTLA.js} +1 -1
- package/dist/chunks/{chunk-WFVOG5PU.js → chunk-NLQ2UPN2.js} +1 -1
- package/dist/chunks/chunk-NOSBNHGC.js +18 -0
- package/dist/chunks/{chunk-TTN63EAM.js → chunk-NWOK6NLE.js} +1 -1
- package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
- package/dist/chunks/chunk-O3MHHGC5.js +151 -0
- package/dist/chunks/{chunk-IUGK6BBY.js → chunk-OCC43RSJ.js} +1 -1
- package/dist/chunks/{chunk-BQUWZRWU.js → chunk-P74RR2GB.js} +1 -1
- package/dist/chunks/{chunk-PAZDQRYU.js → chunk-PAE3PQEC.js} +1 -1
- package/dist/chunks/{chunk-M4ZRCRJM.js → chunk-PGO4FRHU.js} +2 -2
- package/dist/chunks/chunk-Q34IF4PW.js +2 -0
- package/dist/chunks/{chunk-Q324ZA5M.js → chunk-QAVQJZCM.js} +1 -1
- package/dist/chunks/{chunk-EIIGTADO.js → chunk-RBDUMASL.js} +1 -1
- package/dist/chunks/{chunk-TMMFF6DO.js → chunk-RH43WLBX.js} +1 -1
- package/dist/chunks/{chunk-RPOD6I64.js → chunk-RTJCELRR.js} +1 -1
- package/dist/chunks/{chunk-L3GA2CQI.js → chunk-SD64CLJX.js} +1 -1
- package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
- package/dist/chunks/{chunk-MLTKB5G3.js → chunk-SZKFNKWO.js} +1 -1
- package/dist/chunks/chunk-T4QXKU5Y.js +1 -0
- package/dist/chunks/{chunk-PE7UKJXK.js → chunk-T6C5BNXK.js} +1 -1
- package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
- package/dist/chunks/{chunk-OQUKSRU3.js → chunk-TGEGXTPR.js} +1 -1
- package/dist/chunks/chunk-TM4VEMNN.js +2 -0
- package/dist/chunks/chunk-TUCKED4T.js +4 -0
- package/dist/chunks/chunk-TVTFEGTU.js +2 -0
- package/dist/chunks/{chunk-HZLV773Y.js → chunk-TW3SRBLU.js} +1 -1
- package/dist/chunks/{chunk-BNZTJPK7.js → chunk-U456UP3N.js} +1 -1
- package/dist/chunks/chunk-UC3FXTDL.js +9 -0
- package/dist/chunks/{chunk-XLULTQLZ.js → chunk-UT6F6AIB.js} +1 -1
- package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
- package/dist/chunks/{chunk-DW3GJRY3.js → chunk-VAJSRUAB.js} +1 -1
- package/dist/chunks/chunk-VE6ZIGUQ.js +2 -0
- package/dist/chunks/{chunk-GLVR74PX.js → chunk-VI32G77S.js} +1 -1
- package/dist/chunks/{chunk-ROE24PN5.js → chunk-VK4TPZTA.js} +1 -1
- package/dist/chunks/{chunk-Q66LWQGF.js → chunk-VSQXDS6H.js} +1 -1
- package/dist/chunks/{chunk-4GZ2FPB5.js → chunk-VWRTE64Y.js} +1 -1
- package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
- package/dist/chunks/{chunk-57RY3LSR.js → chunk-WGLVSGFA.js} +1 -1
- package/dist/chunks/{chunk-I7JCARVH.js → chunk-WQMXEZVE.js} +3 -3
- package/dist/chunks/chunk-X4ZT22SG.js +2 -0
- package/dist/chunks/{chunk-DGPGOBYZ.js → chunk-XSB3T4JZ.js} +1 -1
- package/dist/chunks/{chunk-ZZWAQBA2.js → chunk-XWDFXM3S.js} +1 -1
- package/dist/chunks/{chunk-4LZLO4OW.js → chunk-Y2KPHVZK.js} +1 -1
- package/dist/chunks/chunk-ZQHPGEYT.js +2 -0
- package/dist/chunks/{chunk-T4LLJC5N.js → chunk-ZXT7V64X.js} +1 -1
- package/dist/chunks/cli-GCSO2OAI.js +2 -0
- package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-BU2RPG33.js} +1 -1
- package/dist/chunks/connected-app-executor-UDE7U4KG.js +2 -0
- package/dist/chunks/{connected-evidence-4J3YXU4O.js → connected-evidence-GXIY2L7C.js} +1 -1
- package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-V5QXRK5Q.js} +1 -1
- package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
- package/dist/chunks/{continual-CJUZM5ZQ.js → continual-FLW6DAJK.js} +1 -1
- package/dist/chunks/{core-commands-JGXU6B4C.js → core-commands-NJ6TGND4.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-DFGJBMVF.js → dataset-preparation-authoring-IUXUQK3L.js} +1 -1
- package/dist/chunks/{datasets-MNHZAZIB.js → datasets-AH56DKLZ.js} +1 -1
- package/dist/chunks/{desktop-test-P23MHAIG.js → desktop-test-PYUTEOWO.js} +1 -1
- package/dist/chunks/{dist-IIFTZWNR.js → dist-5267UT3V.js} +1 -1
- package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
- package/dist/chunks/{evaluation-coordination-6NQEH5WU.js → evaluation-coordination-3AUICOC5.js} +1 -1
- package/dist/chunks/{experiment-improvements-M27Z5OF4.js → experiment-improvements-YS7GGPDW.js} +1 -1
- package/dist/chunks/experiments-EJZK7FPT.js +2 -0
- package/dist/chunks/{experiments-signal-R3NNH7WR.js → experiments-signal-NKUIJCIY.js} +1 -1
- package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
- package/dist/chunks/{help-M2VQGPVC.js → help-PXUUREHZ.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-CTC5JQPD.js +2 -0
- package/dist/chunks/host-profile-external-dataset-GJWDY3YT.js +2 -0
- package/dist/chunks/hosted-app-server-composition-TLJSKMJT.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-TIVXXRPG.js +3 -0
- package/dist/chunks/hosted-harness-runtime-SFLJEZFI.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-37ZFY2LH.js → hosted-profile-candidate-DKEMVIYG.js} +1 -1
- package/dist/chunks/hosted-profile-compiler-V6YR6EHO.js +2 -0
- package/dist/chunks/{hosted-profile-evaluation-control-UQBMML6K.js → hosted-profile-evaluation-control-ERCXAPZD.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-YASS4T6L.js → hosted-profile-evaluation-inspection-Q3AIIIB6.js} +1 -1
- package/dist/chunks/hosted-profile-evaluation-preparation-ELLGH44Z.js +3 -0
- package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-X2YCFYEJ.js} +1 -1
- package/dist/chunks/{human-review-IJETDOWB.js → human-review-5WM6MSON.js} +1 -1
- package/dist/chunks/{import-WLLUIDS6.js → import-JWZSZCE4.js} +1 -1
- package/dist/chunks/local-harness-improvement-runtime-IGIKM6GJ.js +2 -0
- package/dist/chunks/local-harness-taskset-review-DR2ZIDOH.js +2 -0
- package/dist/chunks/{model-projects-AVBQDNYG.js → model-projects-H22KENI4.js} +1 -1
- package/dist/chunks/opchat-3S6TSDZO.js +3 -0
- package/dist/chunks/opchat-bounded-chat-B7LPCD4U.js +2 -0
- package/dist/chunks/{organizations-DJRJWC5I.js → organizations-62YNTZTO.js} +1 -1
- package/dist/chunks/{profile-JRS3JNRC.js → profile-ELE2D7HU.js} +1 -1
- package/dist/chunks/project-action-payload-32F4X2BB.js +2 -0
- package/dist/chunks/{project-agent-2KNJFNZI.js → project-agent-O4REKO6T.js} +1 -1
- package/dist/chunks/{published-experiment-source-LFYHKFAO.js → published-experiment-source-DAOTJLIN.js} +1 -1
- package/dist/chunks/refiner-profile-service-DYMZ7J3X.js +2 -0
- package/dist/chunks/{runtime-CBJF5GMB.js → runtime-776NUSE7.js} +2 -2
- package/dist/chunks/{sandbox-command-IIGTPYN3.js → sandbox-command-UQ26NDIX.js} +1 -1
- package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-WP6YCGBK.js} +1 -1
- package/dist/chunks/saved-work-PG52WCRQ.js +2 -0
- package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-RPB65PME.js} +1 -1
- package/dist/chunks/{src-4YZF6L6H.js → src-2R4CMCJ5.js} +1 -1
- package/dist/chunks/src-AU6LG7E6.js +421 -0
- package/dist/chunks/standalone-experiment-turn-owner-SD3SUTKX.js +2 -0
- package/dist/chunks/{store-chat-resources-CGW7PDCG.js → store-chat-resources-T4LR7K25.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-R62D2HD6.js} +1 -1
- package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-25O7BAR2.js} +1 -1
- package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-T5E2GUKK.js} +1 -1
- package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-5Y4U5L3R.js} +1 -1
- package/dist/chunks/{store-evaluation-results-V5J6L4NV.js → store-evaluation-results-WUVJWCFU.js} +1 -1
- package/dist/chunks/{store-harness-workspaces-HHMM6GNK.js → store-harness-workspaces-IFEFY5CK.js} +1 -1
- package/dist/chunks/{store-human-review-V5H4QDHR.js → store-human-review-ZQNLZRGG.js} +1 -1
- package/dist/chunks/store-learned-preference-migration-validation-UH6MJQSH.js +2 -0
- package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-LOH4F4TF.js} +1 -1
- package/dist/chunks/{store-model-batch-review-KMYPYWJR.js → store-model-batch-review-QO4VVKWC.js} +1 -1
- package/dist/chunks/{store-model-configuration-UXNC4PGY.js → store-model-configuration-C3HSOFD5.js} +1 -1
- package/dist/chunks/store-model-project-preparation-RQ2YTC2Y.js +2 -0
- package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-RNIFLJRW.js} +1 -1
- package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-DVQ2PP4F.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-LXWFFYCZ.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-4HH7LX6N.js} +1 -1
- package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-JLW4GD4Q.js} +1 -1
- package/dist/chunks/{store-task-inbox-LNDCZOYE.js → store-task-inbox-DL5RYFPO.js} +1 -1
- package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-NJXRXFLC.js} +1 -1
- package/dist/chunks/store-taskset-drafts-UFGN4SGF.js +9 -0
- package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-VRLU6NFX.js} +1 -1
- package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-3ZHG4LGI.js} +1 -1
- package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-KWQD5PRP.js} +1 -1
- package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-ZRS3ILF2.js} +1 -1
- package/dist/chunks/{taskset-NYLUYX6K.js → taskset-QDMCQQDJ.js} +1 -1
- package/dist/chunks/{taskset-packages-I7I5KBFP.js → taskset-packages-CBLJFWDQ.js} +1 -1
- package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-GF272RGC.js} +1 -1
- package/dist/chunks/{training-UBX6E7SK.js → training-DF5UEPY3.js} +1 -1
- package/dist/chunks/{training-error-AYOGHHL2.js → training-error-L5V5IBX3.js} +1 -1
- package/dist/chunks/training-hosted-I2NDBYGS.js +2 -0
- package/dist/chunks/training-hosted-report-4F25RZZ4.js +2 -0
- package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
- package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
- package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-5RUXYIOF.js} +1 -1
- package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-JRY2IE7H.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/hosted-chat.d.ts +28 -0
- package/dist/index.js +1 -1
- package/dist/skills/openpond-cli/SKILL.md +15 -2
- package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
- package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
- package/dist/skills/openpond-cli/references/experiments-and-training.md +155 -10
- package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
- package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
- package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
- package/dist/web/assets/App-DHJVXTI2.js +54 -0
- package/dist/web/assets/App-DpFKLxuA.css +1 -0
- package/dist/web/assets/AppDialog-BurL61qE.js +1 -0
- package/dist/web/assets/AppTerminalPanel-RjFlF-a4.js +2 -0
- package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-DZLErwj0.js} +1 -1
- package/dist/web/assets/AppsView-ttlr9ckQ.js +1 -0
- package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-CpMSfHCK.js} +1 -1
- package/dist/web/assets/BrowserSidebar-Cp2l0kg0.js +1 -0
- package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-CEbM980A.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-IKzZsHoI.js → ChatTimelineEntry-BITv20Ze.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-DrKJmJZK.js} +1 -1
- package/dist/web/assets/{CommandMenu-CBY2AJxV.js → CommandMenu-6oj8FUr6.js} +1 -1
- package/dist/web/assets/CommunityView-BzpIq1lD.js +1 -0
- package/dist/web/assets/ComposerAttachments-6en7m_ov.js +2 -0
- package/dist/web/assets/ComposerCreateImproveStrip-ChplO9YP.js +1 -0
- package/dist/web/assets/ConversationImportsSettings-DRHgc7j_.js +1 -0
- package/dist/web/assets/FilePagePreview-CW4J_1u7.js +2 -0
- package/dist/web/assets/GetStartedView-CaBk_mX6.js +1 -0
- package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
- package/dist/web/assets/GettingStartedDialog-JtFLyU3F.js +1 -0
- package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-hhcjDifK.js} +1 -1
- package/dist/web/assets/HostedModelLearningSettings-CY8198Y1.js +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-f0tHT-Sn.js +1 -0
- package/dist/web/assets/LabSkillSidebar-HibUEEko.js +1 -0
- package/dist/web/assets/{LabsRoute-DOnw39du.js → LabsRoute-B61l1b8P.js} +8 -8
- package/dist/web/assets/MainChatThread-egKi0gLk.js +2 -0
- package/dist/web/assets/MainPane-2dj6Dg4l.js +95 -0
- package/dist/web/assets/{MainPane-CuBUBA9F.css → MainPane-BwHw3UYp.css} +1 -1
- package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
- package/dist/web/assets/NativeSetupTerminal-CNHTByLo.js +2 -0
- package/dist/web/assets/NativeSkillSidebar-DCdMbSfe.js +1 -0
- package/dist/web/assets/NewProjectDialog-t9Imnb__.js +1 -0
- package/dist/web/assets/OutputsPage-CeGq_F1S.js +1 -0
- package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-VHME5V8j.js} +1 -1
- package/dist/web/assets/ProjectsPage-2TMZoEPB.js +1 -0
- package/dist/web/assets/RightChatPanelStack-B3mBViGC.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-CxDYSyyx.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-Dh47iH11.js +1 -0
- package/dist/web/assets/SettingsView-D2bu3tK_.js +5 -0
- package/dist/web/assets/TeamChatView-CN17AsgA.js +1 -0
- package/dist/web/assets/TerminalOverlay-DlhRpi-X.js +16 -0
- package/dist/web/assets/TrainingCreationPanel-DJKzaNFj.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-BhhZPPuY.js} +1 -1
- package/dist/web/assets/{TrainingMetricWorkbench-BmzHLwIP.js → TrainingMetricWorkbench-DBy8F1xp.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-DTZslBeW.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-Ds-eTQLs.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-D_iyg2D4.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-Fn-NlfMQ.js +35 -0
- package/dist/web/assets/WorkspaceFileLocation-ChEeZffU.js +1 -0
- package/dist/web/assets/WorkspaceGitDialogs-D_RUXhTi.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-BJxaiDrj.js} +3 -3
- package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-A28Poeca.js} +1 -1
- package/dist/web/assets/{chat-resources-CItQ4mZD.js → chat-resources-3SvnVeKv.js} +1 -1
- package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-dYn0pd4Q.js} +1 -1
- package/dist/web/assets/chevron-right-sFx2xRvT.js +1 -0
- package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-BYNVSWIQ-DWh9SmdB.js} +1 -1
- package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ZFYI4P6C-BmsNtSkR.js} +1 -1
- package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-DTTLbrYt.js} +1 -1
- package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-CRMPCFnq.js} +1 -1
- package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
- package/dist/web/assets/copy-DR4ielPn.js +1 -0
- package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-DmttVQ_a.js} +1 -1
- package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-d-2GuNvW.js} +1 -1
- package/dist/web/assets/external-link-B4rPiZEp.js +1 -0
- package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-BrIUcUk_.js} +1 -1
- package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-DwImGEt-.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-Ds1mkrlW.js} +1 -1
- package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-s15GR0Fn.js} +1 -1
- package/dist/web/assets/icons-CK5-nxVC.js +1 -0
- package/dist/web/assets/{image-C7HVlg3X.js → image-CY-sHbfQ.js} +1 -1
- package/dist/web/assets/{index-BsPUniZy.js → index-DYrLeSyY.js} +2 -2
- package/dist/web/assets/index-Dezj4Z2p.css +1 -0
- package/dist/web/assets/{info-BLWDShaz.js → info-aSvM8YlJ.js} +1 -1
- package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-vos9H2hz.js} +1 -1
- package/dist/web/assets/loader-circle-cyf35w3i.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-pQmEaoMt.js} +1 -1
- package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-DgF6ZVOM.js} +1 -1
- package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-BPwsKvRB.js} +2 -2
- package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-BbMpa0_-.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-CJlccVX3.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-pWurLXbm.js} +2 -2
- package/dist/web/assets/{monitor-B6OuAu13.js → monitor-DlEV241C.js} +1 -1
- package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-fnRZSIRc.js} +1 -1
- package/dist/web/assets/{pdf-RXlFwNte.js → pdf-CT3zVKCE.js} +1 -1
- package/dist/web/assets/play-wI_3FLr4.js +1 -0
- package/dist/web/assets/plus-DoJe4fLj.js +1 -0
- package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-Bb8ecExR.js} +1 -1
- package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
- package/dist/web/assets/{python-BQXo7wMt.js → python-DXA1xp0A.js} +1 -1
- package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-B53QjxMO.js} +1 -1
- package/dist/web/assets/{save-BxXc21N6.js → save-V1Q4Fcqa.js} +1 -1
- package/dist/web/assets/settings-lists-CtH1A57b.js +5 -0
- package/dist/web/assets/square-BqSK-hv9.js +1 -0
- package/dist/web/assets/square-terminal-Dmgkm5zY.js +1 -0
- package/dist/web/assets/submit-issue-command-DRgUboVW.js +3 -0
- package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-B-BD2K2Q.js} +1 -1
- package/dist/web/assets/{training-managed-adapter-81RrdT1k.js → training-managed-adapter-BXNwgd3P.js} +1 -1
- package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-14942K_Z.js} +5 -5
- package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-DdgIcxK3.js} +1 -1
- package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
- package/dist/web/assets/{upload-NXasN1wU.js → upload-82Y6RjLi.js} +1 -1
- package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-BgHXNpq_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-BV4CUWzJ.js → useAgentInventory-B-LNn3up.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CsKv22Hs.js} +1 -1
- package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-CPC2wsWm.js} +1 -1
- package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-DXOoDN9l.js} +1 -1
- package/dist/web/assets/{workers-u92Boudu.js → workers-Clf4hKt5.js} +1 -1
- package/dist/web/assets/x-IPhrr4ju.js +1 -0
- package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-I1tf8Uxx.js} +1 -1
- package/dist/web/index.html +12 -3
- package/docs/command-reference.md +28 -2
- package/package.json +2 -1
- package/dist/chunks/app-server-evaluations-HAAYVEXB.js +0 -2
- package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
- package/dist/chunks/chunk-4N3UF3U5.js +0 -2
- package/dist/chunks/chunk-6DCXAXVD.js +0 -22
- package/dist/chunks/chunk-BLKTUFGB.js +0 -2
- package/dist/chunks/chunk-E3EKBPCB.js +0 -2
- package/dist/chunks/chunk-F5JDBDYL.js +0 -2
- package/dist/chunks/chunk-JEVA7YQL.js +0 -3
- package/dist/chunks/chunk-KC7I6E6W.js +0 -2
- package/dist/chunks/chunk-OJSK4NSW.js +0 -151
- package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
- package/dist/chunks/chunk-UJBEWIR3.js +0 -8
- package/dist/chunks/chunk-V67IFV26.js +0 -86
- package/dist/chunks/chunk-VSUHJ46L.js +0 -18
- package/dist/chunks/chunk-X3WEQL3O.js +0 -2
- package/dist/chunks/chunk-XK7SPL63.js +0 -2
- package/dist/chunks/chunk-YR5ID2SS.js +0 -2
- package/dist/chunks/cli-WC45SI7E.js +0 -2
- package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
- package/dist/chunks/experiments-IWSCFDBB.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
- package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
- package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
- package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
- package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-preparation-ZAOGDQXO.js +0 -3
- package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
- package/dist/chunks/opchat-KSOJEL4W.js +0 -3
- package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
- package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
- package/dist/chunks/saved-work-QA46KCME.js +0 -2
- package/dist/chunks/src-E7NWAN5B.js +0 -420
- package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
- package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
- package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
- package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
- package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
- package/dist/web/assets/App-Df7uYQGj.css +0 -1
- package/dist/web/assets/App-Yy3l2sdD.js +0 -56
- package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
- package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
- package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
- package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
- package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
- package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
- package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
- package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
- package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
- package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
- package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
- package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
- package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
- package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
- package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
- package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
- package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
- package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
- package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
- package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
- package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
- package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
- package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
- package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
- package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
- package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
- package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
- package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
- package/dist/web/assets/icons-kaq6k88m.js +0 -1
- package/dist/web/assets/index-DUMDOdB2.css +0 -1
- package/dist/web/assets/play-BPPQoqMl.js +0 -1
- package/dist/web/assets/plus-D18vYzHF.js +0 -1
- package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
- package/dist/web/assets/square-Da8RuqW4.js +0 -1
- package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-KCJVFLBB.js";import"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-KCJVFLBB.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import{fa as O}from"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import{d as R,e as S,f as k,g as L}from"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import{D as I}from"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as f}from"./chunk-VVNV4NNW.js";import{A as h}from"./chunk-PF56N7ZY.js";import{a as y}from"./chunk-FTQLQJQV.js";var A=h.object({scope:h.string(),key:h.string(),ordinal:h.number().int().nonnegative()}).strict(),g=`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS task_inventory_sources (source_key TEXT NOT NULL, profile_id TEXT NOT NULL, source_hash TEXT NOT NULL, metadata TEXT NOT NULL, PRIMARY KEY(profile_id, source_key));
|
|
4
4
|
CREATE TABLE IF NOT EXISTS task_inventory_rows (profile_id TEXT NOT NULL, source_key TEXT NOT NULL, source_hash TEXT NOT NULL, task_id TEXT NOT NULL, ordinal INTEGER NOT NULL, title TEXT NOT NULL, description TEXT NOT NULL, split TEXT NOT NULL, payload TEXT NOT NULL, PRIMARY KEY(profile_id, source_key, source_hash, ordinal));
|
|
5
5
|
CREATE UNIQUE INDEX IF NOT EXISTS task_inventory_task_identity ON task_inventory_rows(profile_id, source_key, source_hash, task_id);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import"./chunk-W45RKGM6.js";import{a as ke}from"./chunk-F7D4BMTO.js";import{a as N,d as L}from"./chunk-X4ZT22SG.js";import{d as x,e as Te,g as ye}from"./chunk-MEK7DLX3.js";import{b as ue,f as we,g as Ee}from"./chunk-XSB3T4JZ.js";import"./chunk-GLDYJM7O.js";import"./chunk-LILXHGIA.js";import{b as C,c as D,d as ge}from"./chunk-ZQHPGEYT.js";import{a as M,b as g,c as q}from"./chunk-GW5SE3FM.js";import{a as me}from"./chunk-KCJVFLBB.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import{d as ce,e as fe,f as U,o as le,p as pe}from"./chunk-N5GPINVP.js";import{A as de,j as re,k as ie,m as oe,n as ne}from"./chunk-TW3SRBLU.js";import{Jb as F,Q as se,Qb as he,_ as A,b as X,c as Z,e as $,i as ee,la as y,ta as T,za as H}from"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import{n as te,x as S,y as ae}from"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import{e as J,f as Y}from"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import{N as B,O as I}from"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as m}from"./chunk-VVNV4NNW.js";import{A as u}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";import{randomUUID as et}from"node:crypto";import{cp as tt,mkdir as at,readdir as st,rename as G,rm as Ne,stat as rt}from"node:fs/promises";import O from"node:path";function ve(o,t,e,a){let s=t.modelScope;if(!s)return;let i=o.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[s.modelId,t.profileId]);if(!i)throw new Error("Taskset draft Model was not found in this Profile.");let r=S.parse(JSON.parse(i.payload)),n={id:e.id,revision:e.revision,contentHash:e.contentHash},f=e.metadata.rewardBinding===void 0?null:te.parse(e.metadata.rewardBinding),p=s.source?.authoringGraph==="bound"&&f&&r.trainingSetup.rewardBindingRef&&I(f,r.trainingSetup.rewardBindingRef);return we(o,{schemaVersion:"openpond.modelProjectSave.v1",operationId:`draft-publication:${m({draftId:t.id,revision:t.revision,scope:s,tasksetRef:n})}`,expectedRevision:s.expectedModelRevision,project:ae.strip().parse({...r,trainingSetup:{...r.trainingSetup,tasksetRef:n,rewardBindingRef:f,tasksetRelease:null,recipe:p?r.trainingSetup.recipe:null,...r.trainingSetup.evaluationTasksetRef&&r.trainingSetup.tasksetRef&&I(r.trainingSetup.evaluationTasksetRef,r.trainingSetup.tasksetRef)?{evaluationTasksetRef:n}:{}}})},null,a?.modelResources?{...a.modelResources,taskset:a.taskset,executionResources:{environment:a.environment,verifierSet:a.verifierSet}}:a??void 0)}h(ve,"selectTasksetDraftModel");import{createHash as je,randomUUID as Je}from"node:crypto";import{lstat as Se,mkdir as Pe,readdir as Be,readFile as $e,rename as qe,rm as Ue,writeFile as Ve}from"node:fs/promises";import R from"node:path";var b=le.extend({workspaceHash:u.string().regex(/^[a-f0-9]{64}$/).nullable()}).strict();async function De(o){let{db:t,profileId:e}=o,a=Z.parse(o.request),s=h(()=>{let w=t.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[a.modelId,e]);if(!w)throw new Error("Taskset draft Model was not found in this Profile.");return S.parse(JSON.parse(w.payload))},"requireModel"),i=s(),r=m(a),n=t.get("SELECT request_hash, state, payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[e,a.operationId]);if(n){if(n.request_hash!==r)throw new Error("Taskset draft operation was reused with different input.");if(n.state==="deleted")throw new Error("This Taskset draft was deleted.");return b.parse(JSON.parse(n.payload))}if(!o.source)return null;if(i.revision!==a.expectedModelRevision)throw new Error("Model changed before draft initialization. Refresh before editing.");let f=i.trainingSetup.tasksetRef,p=f?t.get("SELECT payload FROM taskset_revisions WHERE taskset_id = ? AND revision = ? AND profile_id = ?",[f.id,f.revision,e]):null,d=p?T.parse(JSON.parse(p.payload)):null;if(!d||!f||d.contentHash!==f.contentHash)throw new Error("The selected source Taskset is unavailable.");let l=o.source,c=i.hosted?.apiOrigin?i.hosted.tasksets.find(w=>w.localTasksetId===d.id&&w.localTasksetHash===d.contentHash&&w.packageHash===l.contentHash&&w.releaseId===l.taskset.id&&w.releaseRevision===l.taskset.revision&&w.releaseHash===l.taskset.contentHash):null,k=typeof d.metadata.importedPackageHash=="string"?d.metadata.importedPackageHash:c?.packageHash;if(k?k!==l.contentHash:!I(B(F({taskset:d,adapterId:x(d)}).tasksetRelease),B(l.taskset)))throw new Error("Taskset draft package differs from its selected source.");let P=l.modelResources?se.safeParse(l.taskset.metadata.modelTasksetDerivation):X.safeParse(l.taskset.metadata.modelTasksetAuthoring),_=c&&P.success&&P.data.owner.modelId===i.id?P.data.owner:{scopeId:e,modelId:i.id},Ce=ce({request:a,owner:_,source:l}),ze=pe({sourceDraft:de(d),source:l,preparation:Ce,expectedModelRevision:a.expectedModelRevision});await C(o.home,l);let K=b.parse({...ze,workspaceHash:null}),We=K.draft;t.exec("BEGIN IMMEDIATE");try{let w=t.get("SELECT request_hash FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[e,a.operationId]);if(w&&w.request_hash!==r)throw new Error("Taskset draft operation was reused with different input.");if(!w&&s().revision!==a.expectedModelRevision)throw new Error("Model changed during draft initialization. Refresh before editing.");t.run("INSERT INTO model_taskset_draft_operations (profile_id, operation_id, request_hash, draft_id, state, payload) VALUES (?, ?, ?, ?, 'prepared', ?) ON CONFLICT(profile_id, operation_id) DO NOTHING",[e,a.operationId,r,We.id,JSON.stringify(K)]),t.exec("COMMIT")}catch(w){throw t.exec("ROLLBACK"),w}let j=t.get("SELECT request_hash, payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[e,a.operationId]);if(!j||j.request_hash!==r)throw new Error("Taskset draft operation was reused with different input.");return b.parse(JSON.parse(j.payload))}h(De,"prepareDraftInitialization");async function Re(o){let{initialized:t,workspacePath:e}=o;if(o.completed())return;if(t.workspaceHash)try{if(await Se(e),o.completed())return;if(await V(e),await g(e)!==t.workspaceHash)throw new Error("Prepared Taskset draft files changed before initialization completed.");return}catch(s){if(s.code!=="ENOENT")throw s}let a=`${e}.initializing-${Je()}`;await Pe(R.dirname(e),{recursive:!0});try{let s=t.draft.modelScope?.source;if(!s)throw new Error("Taskset draft lost its source preparation.");let i=await D(o.home,s.sourcePackageHash),r=new Map;for(let f of t.filePaths){let p=i.files.find(d=>d.asset.id===f.assetId);if(!p)throw new Error("Taskset draft source asset is missing.");for(let d of f.paths){if(d.includes("\\")||R.posix.isAbsolute(d)||d.split("/").some(k=>!k||k==="."||k===".."||k.startsWith(".env")))throw new Error("Taskset draft source path is invalid.");let l=r.get(d);if(l&&l!==p.asset.contentHash)throw new Error("Taskset draft source paths conflict.");if(l)continue;let c=R.join(a,d);await Pe(R.dirname(c),{recursive:!0}),await Ve(c,A(p),{flag:"wx"}),r.set(d,p.asset.contentHash)}}await M(t.draft,a);for(let[f,p]of r)if(je("sha256").update(await $e(R.join(a,f))).digest("hex")!==p)throw new Error(`Taskset draft source asset conflicts with authoring file ${f}.`);let n=await g(a);if(o.retainHash({...t,workspaceHash:n}),o.completed())return;try{await qe(a,e)}catch(f){if(!["EEXIST","ENOTEMPTY"].includes(f.code??""))throw f;if(o.completed())return;if(await V(e),await g(e)!==n)throw new Error("Prepared Taskset draft files changed before initialization completed.")}}finally{await Ue(a,{recursive:!0,force:!0})}}h(Re,"materializeDraftInitialization");async function V(o){let t=await Se(o);if(!t.isDirectory()||t.isSymbolicLink())throw new Error("Taskset draft source must be a regular directory.");for(let e of await Be(o,{withFileTypes:!0})){if(e.name.startsWith(".env")||e.isSymbolicLink())throw new Error("Taskset draft source contains a prohibited file.");if(e.isDirectory())await V(R.join(o,e.name));else if(!e.isFile())throw new Error("Taskset draft source must contain regular files.")}}h(V,"assertRegularTree");import Qe from"node:path";async function be(o){let t=F({taskset:o.taskset,adapterId:x(o.taskset)}),e=await ye({root:o.directory,content:{schemaVersion:"openpond.tasksetPackage.v1",taskset:t.tasksetRelease,environment:t.environmentRelease,verifierSet:t.verifierSetRelease},sources:U.parse(o.taskset.metadata.portableFileInventory??[])}),a=o.preparation.authoringGraph==="bound"?await D(o.home,o.preparation.sourcePackageHash):void 0,s=fe({preparation:o.preparation,edited:e,source:a});if(s.modelResources){let c=he({package:s,profileId:o.taskset.profileId,name:o.taskset.name,createdAt:o.taskset.createdAt}),k=ue(c.taskset,o.taskset),P=T.parse({...k,authoringProvenance:o.taskset.authoringProvenance,metadata:{...k.metadata,sourcePackageHash:o.taskset.metadata.sourcePackageHash}}),_=T.parse({...P,contentHash:H(P)});return await ge({home:o.home,...c,taskset:_}),{taskset:_,directory:Qe.join(o.home,"training","tasksets",String(_.environment.metadata.runtimeSourceTasksetId))}}let i=U.parse(o.taskset.metadata.portableFileInventory??[]),r=s.files.map(c=>({asset:c.asset,sourcePath:i.find(k=>k.asset.id===c.asset.id)?.sourcePath??c.asset.path})),n=s.taskset.environment.entrypoint==="openpond.javascript-environment.v1"?s.files.find(c=>c.asset.path==="environment/execution.json"):void 0,f=`model-draft-${m({packageHash:s.contentHash,taskset:o.taskset})}`,p=T.parse({...o.taskset,id:s.taskset.id,revision:s.taskset.revision,metadata:{...o.taskset.metadata,portableFileInventory:r,importedPackageHash:s.contentHash,derivedPortableMetadata:s.taskset.metadata},environment:{...o.taskset.environment,metadata:{...o.taskset.environment.metadata,runtimeSourceTasksetId:f,portableExecutionResources:{environment:s.environment,verifierSet:s.verifierSet}}}}),d=T.parse({...p,contentHash:H(p)}),l=await N(o.home,{taskset:d,generatedFiles:n?[{path:n.asset.path,role:"environment",content:new TextDecoder("utf-8",{fatal:!0}).decode(A(n))}]:[]},f,{source:{directory:o.directory,packageHash:await g(o.directory)},verify:h(c=>L(c,d),"verify")});return await C(o.home,s),{directory:l,taskset:d}}h(be,"materializeModelTasksetDraftPublication");import{constants as Q}from"node:fs";import{createHash as Ge}from"node:crypto";import{lstat as Ie,mkdir as Ke,open as Ye,readdir as Xe,rm as _e}from"node:fs/promises";import z from"node:path";var v=h((o,t)=>Y(z.join(o,"state","taskset-draft-writes"),t),"withTasksetDraftLock"),He=ie,Ze=h(o=>Ge("sha256").update(o).digest("hex"),"digest");async function W(o,t,e=!1){$.parse(t);let a=o;for(let s of["",...t.split("/").slice(0,-1)]){s&&(a=z.join(a,s)),e&&await Ke(a,{recursive:!1}).catch(r=>{if(r.code!=="EEXIST")throw r});let i=await Ie(a);if(!i.isDirectory()||i.isSymbolicLink())throw new Error("Taskset draft paths must use regular directories.")}return z.join(o,t)}h(W,"regularPath");async function Me(o,t){let e=await W(o,t),a=await Ye(e,Q.O_RDONLY|Q.O_NOFOLLOW|Q.O_NONBLOCK);try{let s=await a.stat();if(!s.isFile()||s.size>re)throw new Error("Taskset draft file must be a regular file within the 6 MB editing limit.");let i=Buffer.alloc(s.size),r=0;for(;r<i.length;){let n=await a.read(i,r,i.length-r,r);if(!n.bytesRead)throw new Error("Taskset draft file changed during reading.");r+=n.bytesRead}if((await a.read(Buffer.alloc(1),0,1,r)).bytesRead)throw new Error("Taskset draft file changed during reading.");return i}finally{await a.close()}}h(Me,"readBytes");async function Oe(o,t){let e=await Me(o,t);return oe(t,e)}h(Oe,"readTasksetDraftFile");async function Ae(o){let t=[];async function e(a=""){for(let s of await Xe(z.join(o,a),{withFileTypes:!0})){let i=a?`${a}/${s.name}`:s.name;if($.parse(i),s.isSymbolicLink())throw new Error("Taskset draft files cannot contain symbolic links.");if(s.isDirectory()){await e(i);continue}if(!s.isFile())throw new Error("Taskset draft files must be regular files.");if(t.length>=1e4)throw new Error("Taskset draft file inventory exceeds its limit.");let r=await Ie(await W(o,i));if(!r.isFile()||r.isSymbolicLink())throw new Error("Taskset draft files must be regular files.");t.push({path:i,sizeBytes:r.size,writable:He(i)})}}return h(e,"visit"),await W(o,"taskset.json"),await e(),t.sort((a,s)=>a.path.localeCompare(s.path))}h(Ae,"listTasksetDraftFiles");async function Fe(o,t,e){if(!He(t.path))throw new Error("This file is managed by the Taskset forms or retained source history.");let a=null;try{a=await Me(o,t.path)}catch(r){if(r.code!=="ENOENT")throw r}if((a?Ze(a):null)!==t.expectedFileHash)throw new Error("Taskset draft file changed. Reload it before saving.");if(!a&&t.content===null)throw new Error("Taskset draft file does not exist.");let s=t.content?ne(t.content):null,i=await W(o,t.path,!0);s?await J(i,s):await _e(i);try{return await e()}catch(r){throw a?await J(i,a):await _e(i,{force:!0}),r}}h(Fe,"mutateTasksetDraftFile");var E=u.object({schemaVersion:u.literal("openpond.tasksetDraftPointer.v1"),id:u.string().trim().min(1),profileId:u.string().trim().min(1),modelScope:y.shape.modelScope,status:u.enum(["draft","validating","needs_review","published"]),revision:u.number().int().positive(),workspacePath:u.string().trim().min(1),packageHash:u.string().regex(/^[a-f0-9]{64}$/),publishedTasksetRef:u.object({id:u.string().trim().min(1),revision:u.number().int().positive(),contentHash:u.string().trim().min(8)}).nullable(),createdAt:u.string().trim().min(1),updatedAt:u.string().trim().min(1)}),xe=class extends me{static{h(this,"SqliteTasksetDraftStore")}async initializeModelTasksetDraft(t,e,a){await this.ready;let s=this.writeQueue.then(()=>v(this.home,async()=>{let i=this.database,r=await De({db:i,home:this.home,profileId:t,request:e,source:a});if(!r)return null;let n=h(()=>{let d=i.get("SELECT state FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[t,e.operationId]);if(d?.state==="deleted")throw new Error("This Taskset draft was deleted.");let l=i.get("SELECT payload FROM taskset_drafts WHERE id = ?",[r.draft.id]);if(!l){if(d?.state==="ready")throw new Error("The initialized Taskset draft is unavailable.");return!1}let c=E.parse(JSON.parse(l.payload));if(c.profileId!==t||c.modelScope?.source?.requestHash!==r.draft.modelScope?.source?.requestHash)throw new Error("Taskset draft identity conflicts with its initialization.");return!0},"completed"),f=this.workspacePath(r.draft.id);await Re({home:this.home,initialized:r,workspacePath:f,completed:n,retainHash:h(d=>{let l=i.get("SELECT payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[t,e.operationId]),c=b.parse(JSON.parse(l.payload));if(c.workspaceHash&&c.workspaceHash!==d.workspaceHash)throw new Error("Taskset draft initialization produced different files on retry.");i.run("UPDATE model_taskset_draft_operations SET payload = ? WHERE profile_id = ? AND operation_id = ? AND state = 'prepared'",[JSON.stringify(d),t,e.operationId])},"retainHash")}),i.exec("BEGIN IMMEDIATE");try{if(!n()){let d=i.get("SELECT payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[t,e.operationId]),l=b.parse(JSON.parse(d.payload)),c=l.draft,k=E.parse({schemaVersion:"openpond.tasksetDraftPointer.v1",id:c.id,profileId:t,modelScope:c.modelScope,status:c.status,revision:c.revision,workspacePath:f,packageHash:l.workspaceHash,publishedTasksetRef:c.publishedTasksetRef,createdAt:c.createdAt,updatedAt:c.updatedAt});i.run("INSERT INTO taskset_drafts (id, profile_id, status, revision, payload, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)",[c.id,t,c.status,c.revision,JSON.stringify(k),c.createdAt,c.updatedAt]),i.run("UPDATE model_taskset_draft_operations SET state = 'ready' WHERE profile_id = ? AND operation_id = ?",[t,e.operationId])}i.exec("COMMIT")}catch(d){throw i.exec("ROLLBACK"),d}let p=i.get("SELECT payload FROM taskset_drafts WHERE id = ?",[r.draft.id]);return this.draftFromStoredPayload(JSON.parse(p.payload))}));return this.writeQueue=s.then(()=>{},()=>{}),s}async saveTasksetDraft(t,e,a={}){let s=y.parse(t);await this.ready;let i=this.writeQueue.then(()=>v(this.home,async()=>{let r=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ?",[s.id]),n=r?E.safeParse(JSON.parse(r.payload)):null;if(n?.success){if(n.data.profileId!==s.profileId)throw new Error("Taskset draft profile cannot change.");if(m(n.data.modelScope?{...n.data.modelScope,expectedModelRevision:0}:null)!==m(s.modelScope?{...s.modelScope,expectedModelRevision:0}:null)||!a.refreshModelRevision&&m(n.data.modelScope)!==m(s.modelScope))throw new Error("Taskset draft Model ownership cannot change.");if(n.data.status==="published")throw new Error("Published Taskset drafts are immutable. Initialize a new draft to revise the Taskset.");if(s.revision<n.data.revision||e!==void 0&&n.data.revision!==e)throw new Error("Taskset draft changed before saving. Refresh before saving.")}else if(e!==void 0)throw new Error("Taskset draft is unavailable for saving.");if((!n?.success||a.refreshModelRevision)&&s.modelScope){let c=this.database.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[s.modelScope.modelId,s.profileId]);if(!c)throw new Error("Taskset draft Model was not found in this Profile.");if(S.parse(JSON.parse(c.payload)).revision!==s.modelScope.expectedModelRevision)throw new Error("Taskset draft Model changed. Refresh before editing.")}let f=this.workspacePath(s.id),d=(await M(s,f)).draft,l=E.parse({schemaVersion:"openpond.tasksetDraftPointer.v1",id:d.id,profileId:d.profileId,modelScope:d.modelScope,status:d.status,revision:d.revision,workspacePath:f,packageHash:await g(f),publishedTasksetRef:d.publishedTasksetRef,createdAt:d.createdAt,updatedAt:d.updatedAt});return await this.savePointer(l,!0),d}));return this.writeQueue=i.then(()=>{},()=>{}),i}async importTasksetDraftPackage(t){let e=O.resolve(t.packagePath),s=(await rt(e)).isDirectory()?e:O.dirname(e);await Le(s);let i=await g(s),r=await q(s),n=await this.getTasksetDraft(r.id);if(n){let c=n.metadata.importedTasksetPackage;if(c&&typeof c=="object"&&!Array.isArray(c)&&c.packageHash===i&&n.profileId===t.profileId)return n;throw new Error(`Taskset draft ${r.id} already exists. Import a package with a distinct Taskset id.`)}let f=y.parse({...r,profileId:t.profileId,modelScope:null,status:"draft",revision:1,publishedTasksetRef:null,metadata:{...r.metadata,importedTasksetPackage:{packageHash:i,importedAt:new Date().toISOString()}},updatedAt:new Date().toISOString()}),p=this.workspacePath(f.id),d=`${p}.import-${process.pid}-${Date.now()}`;await at(O.dirname(p),{recursive:!0});try{await tt(s,d,{recursive:!0,errorOnExist:!0,force:!1,preserveTimestamps:!0}),await M(f,d),await G(d,p)}catch(c){throw await Ne(d,{recursive:!0,force:!0}),c}let l=E.parse({schemaVersion:"openpond.tasksetDraftPointer.v1",id:f.id,profileId:f.profileId,status:f.status,revision:f.revision,workspacePath:p,packageHash:await g(p),publishedTasksetRef:f.publishedTasksetRef,createdAt:f.createdAt,updatedAt:f.updatedAt});return await this.savePointer(l),this.draftFromStoredPayload(l)}async materializePublishedTasksetPackage(t){let e=await this.getTasksetDraftWorkspace(t.draftId);if(!e)throw new Error(`Taskset draft ${t.draftId} workspace was not found.`);if(t.taskset.metadata.sourcePackageHash!==void 0&&t.taskset.metadata.sourcePackageHash!==e.packageHash)throw new Error("Taskset draft files changed before publication. Refresh before publishing.");let a=`draft-${m({taskset:t.taskset,packageHash:e.packageHash})}`,s=await Te(t.taskset,e.workspacePath),i=T.parse({...s.taskset,metadata:{...s.taskset.metadata,sourcePackageHash:e.packageHash},environment:{...s.taskset.environment,metadata:{...s.taskset.environment.metadata,runtimeSourceTasksetId:a}}}),r=T.parse({...i,contentHash:H(i)}),n=await N(this.home,{taskset:r,generatedFiles:s.generatedFiles},a,{source:{directory:e.workspacePath,packageHash:e.packageHash},verify:h(p=>L(p,r),"verify")}),f=await this.getTasksetDraft(t.draftId);return f?.modelScope?.source?be({home:this.home,directory:n,taskset:r,preparation:f.modelScope.source}):{directory:n,taskset:r}}async finalizeTasksetDraftPublication(t){await this.ready;let e=y.parse(t.draft),a=T.parse(t.taskset),s=e.modelScope?.source?.authoringGraph==="bound"&&typeof a.metadata.importedPackageHash=="string"?await D(this.home,a.metadata.importedPackageHash):null,i=this.writeQueue.then(()=>v(this.home,async()=>{let r=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ?",[e.id]);if(!r)throw new Error("Taskset draft was deleted before publication.");let n=E.parse(JSON.parse(r.payload));if(n.profileId!==e.profileId||a.profileId!==e.profileId)throw new Error("Taskset publication belongs to another Profile.");if(m(n.modelScope)!==m(e.modelScope))throw new Error("Taskset draft Model ownership cannot change.");if(n.status==="published"&&n.publishedTasksetRef){let c=n.publishedTasksetRef,k=this.database.get("SELECT payload FROM taskset_revisions WHERE taskset_id = ? AND revision = ? AND content_hash = ?",[c.id,c.revision,c.contentHash]);if(!k)throw new Error("Published draft lost its immutable Taskset revision.");return{draft:y.parse({...e,status:n.status,revision:n.revision,publishedTasksetRef:c,updatedAt:n.updatedAt}),taskset:T.parse(JSON.parse(k.payload))}}if(n.revision!==e.revision||a.metadata.sourcePackageHash!==t.packageHash)throw new Error("Taskset draft changed before publication. Refresh before publishing.");let f=n.modelScope?.source,p=f?.authoringGraph==="bound"&&a.metadata.modelTasksetDerivation&&typeof a.metadata.modelTasksetDerivation=="object"?{...a.metadata.modelTasksetDerivation,schemaVersion:f.lineage.schemaVersion}:a.metadata.modelTasksetAuthoring;if(f&&(a.id!==f.tasksetId||a.revision!==f.tasksetRevision||m(p)!==m(f.lineage)))throw new Error("Taskset publication differs from its retained source preparation.");let d=y.parse({...e,status:"published",revision:e.revision+1,publishedTasksetRef:{id:a.id,revision:a.revision,contentHash:a.contentHash},updatedAt:new Date().toISOString()}),l=E.parse({...n,status:d.status,revision:d.revision,publishedTasksetRef:d.publishedTasksetRef,updatedAt:d.updatedAt});return ke(this.database,a,()=>{if(s&&Ee(this.database,{package:s,taskset:a,generatedFiles:[]}),ve(this.database,e,a,s),this.database.get("SELECT revision FROM taskset_drafts WHERE id = ?",[e.id])?.revision!==e.revision)throw new Error("Taskset draft changed during publication.");this.database.run("UPDATE taskset_drafts SET status = ?, revision = ?, payload = ?, updated_at = ? WHERE id = ?",[l.status,l.revision,JSON.stringify(l),l.updatedAt,e.id])}),{draft:d,taskset:a}}));return this.writeQueue=i.then(()=>{},()=>{}),i}async getTasksetDraft(t){let e=await this.getParsedPayload("SELECT payload FROM taskset_drafts WHERE id = ?",[t],a=>a);return e===null?null:this.draftFromStoredPayload(e)}async listTasksetDrafts(t){await this.ready,await this.writeQueue;let e=await this.all(t?"SELECT payload FROM taskset_drafts WHERE profile_id = ? ORDER BY updated_at DESC":"SELECT payload FROM taskset_drafts ORDER BY updated_at DESC",t?[t]:[]);return Promise.all(e.map(a=>this.draftFromStoredPayload(JSON.parse(a.payload))))}async readHumanPublishedTasksetDraft(t,e){let a=(await this.listTasksetDrafts(t)).filter(r=>r.status==="published"&&r.modelScope===null&&m(r.publishedTasksetRef)===m(e));if(a.length!==1)return null;let s=a[0],i=await this.getTasksetDraftWorkspace(s.id);return i?{draft:s,workspace:i}:null}async getTasksetDraftWorkspace(t){let e=await this.getParsedPayload("SELECT payload FROM taskset_drafts WHERE id = ?",[t],s=>s);if(e===null)return null;let a=await this.pointerFromStoredPayload(e);return{draftId:a.id,workspacePath:a.workspacePath,packageHash:await g(a.workspacePath)}}async deleteTasksetDraft(t){await this.ready;let e=this.writeQueue.then(()=>v(this.home,async()=>{let a=this.workspacePath(t),s=`${a}.delete-${et()}`,i=!1;try{await G(a,s),i=!0}catch(r){if(r.code!=="ENOENT")throw r}try{this.database.exec("BEGIN IMMEDIATE");try{this.database.run("DELETE FROM taskset_drafts WHERE id = ?",[t]),this.database.run("UPDATE model_taskset_draft_operations SET state = 'deleted' WHERE draft_id = ?",[t]),this.database.exec("COMMIT")}catch(r){throw this.database.exec("ROLLBACK"),r}}catch(r){throw i&&await G(s,a).catch(()=>{}),r}i&&await Ne(s,{recursive:!0,force:!0})}));this.writeQueue=e.catch(()=>{}),await e}async tasksetDraftFiles(t,e,a){return await this.ready,v(this.home,async()=>{let s=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ? AND profile_id = ?",[e,t]);if(!s)throw new Error("Taskset draft was not found in this Profile.");let i=E.parse(JSON.parse(s.payload));if(a!==void 0){let n=await Oe(i.workspacePath,a);return{draftRevision:i.revision,file:{...n,writable:n.writable&&i.status!=="published"}}}let r=await Ae(i.workspacePath);return{draftRevision:i.revision,files:r.map(n=>({...n,writable:n.writable&&i.status!=="published"}))}})}async saveTasksetDraftFile(t,e){let a=ee.parse(e);await this.ready;let s=this.writeQueue.then(()=>v(this.home,async()=>{let i=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ? AND profile_id = ?",[a.draftId,t]);if(!i)throw new Error("Taskset draft was not found in this Profile.");let r=E.parse(JSON.parse(i.payload));if(r.status==="published")throw new Error("Published Taskset drafts are immutable.");if(r.revision!==a.expectedDraftRevision)throw new Error("Taskset draft changed. Reload before saving a file.");return Fe(r.workspacePath,a,async()=>{let n=E.parse({...r,revision:r.revision+1,packageHash:await g(r.workspacePath),updatedAt:new Date().toISOString()}),f=await this.draftFromStoredPayload(n);this.database.exec("BEGIN IMMEDIATE");try{if(this.database.get("SELECT revision FROM taskset_drafts WHERE id = ? AND profile_id = ?",[a.draftId,t])?.revision!==r.revision)throw new Error("Taskset draft changed during file saving.");this.database.run("UPDATE taskset_drafts SET revision = ?, payload = ?, updated_at = ? WHERE id = ?",[n.revision,JSON.stringify(n),n.updatedAt,n.id]),this.database.exec("COMMIT")}catch(p){throw this.database.exec("ROLLBACK"),p}return f})}));return this.writeQueue=s.then(()=>{},()=>{}),s}workspacePath(t){let e=m(t).slice(0,24);return O.join(this.home,"workspaces","tasksets",`taskset-${e}`)}async draftFromStoredPayload(t){let e=await this.pointerFromStoredPayload(t),a=await q(e.workspacePath);return y.parse({...a,id:e.id,profileId:e.profileId,modelScope:e.modelScope,status:e.status,revision:e.revision,publishedTasksetRef:e.publishedTasksetRef,createdAt:e.createdAt,updatedAt:e.updatedAt})}async pointerFromStoredPayload(t){let e=E.safeParse(t);if(e.success)return e.data;let a=y.parse(t);await this.saveTasksetDraft(a);let s=await this.getParsedPayload("SELECT payload FROM taskset_drafts WHERE id = ?",[a.id],E.parse);if(!s)throw new Error(`Taskset draft ${a.id} migration failed.`);return s}async savePointer(t,e=!1){await(e?this.run.bind(this):this.upsertPayload.bind(this))(`INSERT INTO taskset_drafts (id, profile_id, status, revision, payload, created_at, updated_at)
|
|
3
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
4
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
5
|
+
profile_id = excluded.profile_id,
|
|
6
|
+
status = excluded.status,
|
|
7
|
+
revision = excluded.revision,
|
|
8
|
+
payload = excluded.payload,
|
|
9
|
+
updated_at = excluded.updated_at`,[t.id,t.profileId,t.status,t.revision,JSON.stringify(t),t.createdAt,t.updatedAt])}};async function Le(o){let t=await st(o,{withFileTypes:!0});for(let e of t){let a=O.join(o,e.name);if(e.isSymbolicLink())throw new Error(`Taskset packages cannot contain symbolic links: ${a}`);if(e.isDirectory()){await Le(a);continue}if(!e.isFile())throw new Error(`Taskset packages may contain only files and directories: ${a}`)}}h(Le,"assertRegularPackageTree");export{xe as SqliteTasksetDraftStore};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as A}from"./chunk-
|
|
2
|
+
import{a as A}from"./chunk-F7D4BMTO.js";import{a as M}from"./chunk-GNCEZ3UP.js";import{d as N}from"./chunk-557XSPVS.js";import"./chunk-DMFUEUAZ.js";import{a as L}from"./chunk-KCJVFLBB.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import{h as l,i as C,l as _}from"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-KOKX7PBS.js";import{f as k,g as T,h as O,i as w,n as g,o as f}from"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import{b as I}from"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import{ra as S,ta as m,z as p}from"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as o}from"./chunk-FTQLQJQV.js";function h(s,t,a,e,n,r,d){return{schemaVersion:"openpond.trainingChatSearchResult.v1",query:s,offset:t,limit:a,total:e,hasMore:t+n.length<e,indexedChats:r,totalChats:d,indexing:r<d,entries:n.map(i=>({sessionId:i.session_id,title:i.title,updatedAt:i.updated_at,snippet:i.snippet?.trim()||null}))}}o(h,"trainingChatSearchResult");function P(s){let t=s.normalize("NFKC").match(/[\p{L}\p{N}_]+/gu)?.slice(0,24)??[];return t.length?t.map(a=>`"${a.replaceAll('"','""')}"*`).join(" AND "):null}o(P,"trainingChatFtsQuery");function D(s,t,a){let e=s.get(t)??[];e.push(a),s.set(t,e)}o(D,"appendTrainingChatSearchText");var F=class extends L{static{o(this,"SqliteTrainingStore")}async trainingChatSearchSignatures(t){await this.ready,await this.writeQueue;let a=await this.all("SELECT session_id, signature FROM training_chat_search_documents WHERE source = ?",[t]);return new Map(a.map(e=>[e.session_id,e.signature]))}async openPondTrainingChatSearchEvidence(t){await this.ready,await this.writeQueue;let a=[...new Set(t)].slice(0,500);if(!a.length)return[];let e=a.map(()=>"?").join(", "),[n,r,d]=await Promise.all([this.all(`SELECT payload FROM projection_session_shells WHERE id IN (${e})`,a),this.all(`SELECT session_id, payload FROM turns WHERE session_id IN (${e}) ORDER BY sort_index ASC`,a),this.all(`SELECT session_id, payload FROM events
|
|
3
3
|
WHERE name = 'assistant.delta' AND session_id IN (${e})
|
|
4
4
|
ORDER BY sequence ASC`,a)]),i=new Map;for(let u of r){let c=JSON.parse(u.payload);c.prompt.trim()&&D(i,u.session_id,c.prompt)}for(let u of d){let c=JSON.parse(u.payload);c.output?.trim()&&D(i,u.session_id,c.output)}return n.map(u=>{let c=M(JSON.parse(u.payload));return{session:c,body:i.get(c.id)?.join(`
|
|
5
5
|
`)??""}})}async syncTrainingChatSearchDocuments(t,a){await this.ready;let e=this.writeQueue.then(async()=>{let n=await this.all("SELECT session_id, signature FROM training_chat_search_documents WHERE source = ?",[t]),r=new Map(n.map(i=>[i.session_id,i.signature])),d=new Set(a.map(i=>i.sessionId));await this.exec("BEGIN IMMEDIATE");try{for(let i of r.keys())d.has(i)||(await this.run("DELETE FROM training_chat_search_fts WHERE session_id = ?",[i]),await this.run("DELETE FROM training_chat_search_documents WHERE session_id = ?",[i]));for(let i of a)r.get(i.sessionId)!==i.signature&&(await this.run("DELETE FROM training_chat_search_fts WHERE session_id = ?",[i.sessionId]),await this.run(`INSERT INTO training_chat_search_documents (session_id, source, signature, title, updated_at, eligible, body_indexed)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as u}from"./chunk-AGVOGPAZ.js";import{a as S}from"./chunk-KCJVFLBB.js";import"./chunk-
|
|
2
|
+
import{a as u}from"./chunk-AGVOGPAZ.js";import{a as S}from"./chunk-KCJVFLBB.js";import"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import{J as f,fa as E,ga as c,ha as o,ka as _,ma as s,na as T,ta as p,ua as g}from"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as d}from"./chunk-FTQLQJQV.js";var l="('openpond_managed')",P=class extends S{static{d(this,"SqliteTrainingJobsStore")}async saveModelProject(t){let a=E.parse(t);return await this.upsertPayload(`INSERT INTO model_projects (id, profile_id, payload, created_at, updated_at) VALUES (?, ?, ?, ?, ?)
|
|
3
3
|
ON CONFLICT(id) DO UPDATE SET profile_id = excluded.profile_id, payload = excluded.payload, updated_at = excluded.updated_at`,[a.id,a.profileId,JSON.stringify(a),a.createdAt,a.updatedAt]),a}async getModelProject(t){return this.getParsedPayload("SELECT payload FROM model_projects WHERE id = ?",[t],h)}async listModelProjects(t){return this.listParsedPayloads(t?"SELECT payload FROM model_projects WHERE profile_id = ? ORDER BY updated_at DESC":"SELECT payload FROM model_projects ORDER BY updated_at DESC",t?[t]:[],h)}async saveTrainingPlan(t){let a=c.parse(t),e=await this.getTrainingPlan(a.id);if(e&&e.contentHash!==a.contentHash)throw new Error(`Training Plan ${a.id} is immutable and already has different content.`);return await this.upsertPayload(`INSERT INTO training_plans (id, taskset_id, destination_id, payload, created_at) VALUES (?, ?, ?, ?, ?)
|
|
4
4
|
ON CONFLICT(id) DO UPDATE SET taskset_id = excluded.taskset_id, destination_id = excluded.destination_id, payload = excluded.payload`,[a.id,a.tasksetId,a.destinationId,JSON.stringify(a),a.createdAt]),a}async listTrainingPlans(t){return this.listParsedPayloads(t?`SELECT payload FROM training_plans WHERE taskset_id = ? AND destination_id IN ${l} ORDER BY created_at DESC`:`SELECT payload FROM training_plans WHERE destination_id IN ${l} ORDER BY created_at DESC`,t?[t]:[],c.parse)}async getTrainingPlan(t){return this.getParsedPayload(`SELECT payload FROM training_plans WHERE id = ? AND destination_id IN ${l}`,[t],c.parse)}async saveTrainingBundle(t){let a=o.parse(t);return await this.upsertPayload(`INSERT INTO training_bundles (id, plan_id, content_hash, payload, created_at) VALUES (?, ?, ?, ?, ?)
|
|
5
5
|
ON CONFLICT(id) DO UPDATE SET plan_id = excluded.plan_id, content_hash = excluded.content_hash, payload = excluded.payload`,[a.id,a.planId,a.contentHash,JSON.stringify(a),a.createdAt]),a}async getTrainingBundle(t){return this.getParsedPayload("SELECT payload FROM training_bundles WHERE id = ?",[t],o.parse)}async listTrainingBundles(t){return this.listParsedPayloads(t?"SELECT payload FROM training_bundles WHERE plan_id = ? ORDER BY created_at DESC":"SELECT payload FROM training_bundles ORDER BY created_at DESC",t?[t]:[],o.parse)}async findTrainingBundleByPlanAndHash(t,a){return this.getParsedPayload("SELECT payload FROM training_bundles WHERE plan_id = ? AND content_hash = ?",[t,a],o.parse)}async saveTrainingJob(t){let a=s.parse(t),e=await this.getTrainingJob(a.id),n=e?.metadata.activityAuthority,r=a.metadata.activityAuthority;if(n!==void 0){let A=u.parse(n);if(r!==void 0&&JSON.stringify(u.parse(r))!==JSON.stringify(A))throw new Error("Training activity ownership cannot change during reconciliation.");a={...a,metadata:{...a.metadata,activityAuthority:A}}}else if(r!==void 0){if(e)throw new Error("Historical training activity cannot be assigned a guessed owner.");a={...a,metadata:{...a.metadata,activityAuthority:u.parse(r)}}}await this.upsertPayload(`INSERT INTO training_jobs (id, plan_id, destination_id, status, payload, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as O}from"./chunk-
|
|
2
|
+
import{a as O}from"./chunk-EIX2V2KU.js";import{a as P}from"./chunk-KCJVFLBB.js";import{Pa as C}from"./chunk-TUCKED4T.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import{A as m,C as _,_ as S,ma as M,n as c,s as p,u as E,v as y,wa as u,x as R}from"./chunk-INO67SEN.js";import"./chunk-2ITZW2CN.js";import"./chunk-BEI4YULC.js";import"./chunk-CN5OXQ7A.js";import"./chunk-NR5VASQB.js";import"./chunk-JY3YSI54.js";import"./chunk-W5W4IODW.js";import"./chunk-OZ6LRNRE.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-RH43WLBX.js";import"./chunk-P74RR2GB.js";import"./chunk-KOKX7PBS.js";import"./chunk-NLQ2UPN2.js";import"./chunk-XGY4OQLC.js";import"./chunk-547AUVKN.js";import"./chunk-IWK3RTLR.js";import"./chunk-IDOGNIMV.js";import"./chunk-PCB65K4G.js";import"./chunk-N5GPINVP.js";import"./chunk-TW3SRBLU.js";import"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";function w(r,t,e){let a=C.safeParse(e.metadata.portableExecutionRef);return r.kind!=="training"||r.status!=="failed"||r.receipt!==null||t.status!=="succeeded"||t.receipt?.schemaVersion!=="openpond.modelRunReceipt.v1"||t.failure!==null||e.status!=="failed"||e.metadata.phase!=="artifact_collection_failed"||e.metadata.modelRunId!==r.id||!a.success||t.receipt.providerRunId!==(a.data.providerJobId??a.data.runId)||t.receipt.assignmentHash!==e.metadata.harnessRunManifestHash?!1:JSON.stringify({...r,status:t.status,receipt:t.receipt,adapterArtifactLineageId:t.adapterArtifactLineageId,failure:null,completedAt:t.completedAt,updatedAt:t.updatedAt})===JSON.stringify(t)}l(w,"isArtifactCollectionRecoveryTransition");function g(r,t){if(r.kind!=="evaluation"||!["failed","cancelled"].includes(r.status)||t.status!=="running"||t.receipt!==null||t.failure!==null||t.completedAt!==null||!r.evaluation)return!1;let e=r.evaluation.attemptPlan.filter(d=>d.stage==="baseline"||d.stage==="adaptation").reduce((d,n)=>d+n.attemptCount,0),a=r.evaluation.attemptPlan.reduce((d,n)=>d+n.attemptCount,0),i=r.evaluation.attemptPlan.find(d=>d.stage==="candidate_adaptation"),o=e+(i?.attemptCount??0);return!(r.evaluationProgress?.stage==="refiner"&&r.evaluationProgress.completedAttempts===e||r.evaluationProgress?.stage==="candidate_adaptation"&&r.evaluationProgress.completedAttempts>=e&&r.evaluationProgress.completedAttempts<=o||["candidate_adaptation","candidate","comparison"].includes(r.evaluationProgress?.stage??"")&&r.evaluationProgress?.completedAttempts===a)||!r.evaluationProgress?.accounting?!1:JSON.stringify({...r,status:"running",receipt:null,failure:null,completedAt:null,updatedAt:t.updatedAt})===JSON.stringify(t)}l(g,"isCheckpointResumeTransition");var T=class extends P{static{l(this,"SqliteTrainingModelStore")}async saveModelCurrencySnapshot(t){let e=_.parse(t),a=await this.getModelCurrencySnapshot(e.id);if(a){if(a.contentHash===e.contentHash&&JSON.stringify(a)===JSON.stringify(e))return a;throw new Error("An immutable Model Currency Snapshot cannot be replaced.")}return await this.upsertPayload(`INSERT INTO model_currency_snapshots
|
|
3
3
|
(id, series_id, entry_id, evidence_state, content_hash, payload, created_at)
|
|
4
4
|
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e.id,e.seriesId,e.entryId,e.evidenceState,e.contentHash,JSON.stringify(e),e.projectedAt]),e}async getModelCurrencySnapshot(t){return this.getParsedPayload("SELECT payload FROM model_currency_snapshots WHERE id = ?",[t],_.parse)}async listModelCurrencySnapshots(t={}){return t.entryId?this.listParsedPayloads("SELECT payload FROM model_currency_snapshots WHERE entry_id = ? ORDER BY created_at DESC",[t.entryId],_.parse):t.seriesId?this.listParsedPayloads("SELECT payload FROM model_currency_snapshots WHERE series_id = ? ORDER BY created_at DESC",[t.seriesId],_.parse):this.listParsedPayloads("SELECT payload FROM model_currency_snapshots ORDER BY created_at DESC",[],_.parse)}async saveModelComparisonSeries(t){let e=c.parse(t),a=await this.getModelComparisonSeries(e.id);if(a&&(a.profileId!==e.profileId||a.modelProjectId!==e.modelProjectId||a.createdAt!==e.createdAt))throw new Error("A Model Comparison Series cannot change its immutable ownership.");if(a&&e.revision!==a.revision+1){if(JSON.stringify(a)===JSON.stringify(e))return a;throw new Error("A Model Comparison Series update requires the next revision.")}if(a?.scheduleSealedAt&&!v(a,e))throw new Error("A sealed Model Comparison Series definition is immutable.");return await this.upsertPayload(`INSERT INTO model_comparison_series
|
|
5
5
|
(id, profile_id, model_project_id, status, payload, created_at, updated_at)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i as r,j as c,l as _}from"./chunk-
|
|
2
|
+
import{i as r,j as c,l as _}from"./chunk-4ZBOYWQ3.js";import"./chunk-DMFUEUAZ.js";import{a as u}from"./chunk-KCJVFLBB.js";import{b as l}from"./chunk-W5W4IODW.js";import{O as a}from"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as d}from"./chunk-FTQLQJQV.js";var m=class extends u{static{d(this,"SqliteUsageStore")}async upsertModelUsageRecord(e){await this.ready;let t=l.parse(e),s=this.writeQueue.then(async()=>{await this.run(`INSERT INTO model_usage_records (
|
|
3
3
|
id,
|
|
4
4
|
request_id,
|
|
5
5
|
request_ordinal,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m,b as g,d as h,e as k}from"./chunk-
|
|
2
|
+
import{a as m,b as g,d as h,e as k}from"./chunk-4U2FNXQW.js";import{c as f}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as n,f as u}from"./chunk-3M53YXEI.js";import"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import T from"node:path";async function I(r,l,w={}){let[t,e]=l;if(!t||!e||l.length!==2||!["import","publish","readiness","delete-draft"].includes(t))throw new Error("usage: taskset <import|publish|readiness|delete-draft> <package-path|draft-id|taskset-id> [--profile <id>] [--model <id>] [--json]");let i=f(r)??process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/,"")??m,d=new URL(i);if(d.protocol!=="http:"||!["127.0.0.1","localhost","::1"].includes(d.hostname))throw new Error("Taskset package import is available only through the local OpenPond app API.");let a=new k({baseUrl:i,request:w.request??await h(i,{maximumResponseBytes:g})}),s=t==="import"?await a.importTasksetDraftPackage({packagePath:T.resolve(e),profileId:n(r,"profile")||"default"}):t==="publish"?await a.publishTasksetDraft(e,n(r,"model")||null):t==="readiness"?await a.tasksetReadiness(e):await a.deleteTasksetDraft(e);if(u(r.json)){console.log(JSON.stringify(s,null,2));return}let o=s&&typeof s=="object"?s:{};if(t==="import"){console.log(`Imported Taskset draft ${String(o.name??o.id??e)}.`),console.log("Open it in Models \u2192 Tasksets to review it, or publish it with the OpenPond CLI.");return}if(t==="publish"){let p=o.taskset&&typeof o.taskset=="object"?o.taskset:{};console.log(`Published Taskset ${String(p.name??p.id??e)}.`);return}if(t==="readiness"){console.log(`Checked Taskset ${e} readiness.`),console.log(JSON.stringify(s,null,2));return}console.log(`Deleted unpublished Taskset draft ${e}.`)}c(I,"runTasksetCommand");export{I as runTasksetCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-PCB65K4G.js";import{a as G,b as H,c as I,d as P,e as Q,f as R,g as S,h as T,j as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $}from"./chunk-
|
|
2
|
+
import"./chunk-PCB65K4G.js";import{a as G,b as H,c as I,d as P,e as Q,f as R,g as S,h as T,j as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $}from"./chunk-N5GPINVP.js";import{c as z,d as A,e as B,f as C,g as D,h as E,i as F}from"./chunk-TW3SRBLU.js";import{$ as q,Ib as J,Jb as K,Kb as L,Lb as M,Mb as N,Nb as O,Ob as aa,Pb as ba,Qb as ca,Rb as da,V as k,W as l,X as m,Y as n,Z as o,_ as p,a as b,aa as r,b as c,c as d,d as e,da as s,e as f,ea as t,f as g,fa as u,g as h,ga as v,h as i,ha as w,i as j,ia as x,ja as y}from"./chunk-PGO4FRHU.js";import"./chunk-VNJAAYNQ.js";import"./chunk-TVTFEGTU.js";import"./chunk-NVHZRKXB.js";import"./chunk-MTP3B2SU.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import{t as a}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{R as AuthoredTasksetFileInventorySchema,n as MAX_TASKSET_PACKAGE_BYTES,a as ModelBatchReviewError,G as ModelBatchReviewInspectionSchema,I as ModelBatchReviewReceiptSchema,H as ModelBatchReviewRequestSchema,b as ModelTasksetAuthoringOwnerSchema,c as ModelTasksetAuthoringSchema,e as ModelTasksetDraftPreparationSchema,d as ModelTasksetDraftRequestSchema,F as OpenPondTasksetPackageClient,E as OpenPondTasksetPackageError,h as TasksetDraftFileContentSchema,g as TasksetDraftFileInfoSchema,j as TasksetDraftFileMutationSchema,f as TasksetDraftFilePathSchema,i as TasksetDraftFileSchema,Z as TasksetDraftSourceInitializationSchema,s as TasksetPackageContentSchema,o as TasksetPackageFileSchema,k as TasksetPackageLearningResourcesSchema,z as TasksetPackageModelConfigurationSchema,A as TasksetPackagePublicationSchema,C as TasksetPackageReadbackSchema,B as TasksetPackageReceiptSchema,t as TasksetPackageSchema,D as TasksetReleasePackageReadbackSchema,Y as beginModelBatchReview,V as bindOrdinaryModelTasksetReward,U as compileModelTasksetDraftWorkspace,x as createTasksetPackage,r as createTasksetPackageExecutionFile,p as decodeTasksetPackageFile,X as findModelBatchReview,W as inspectModelBatchPackage,S as isGeneratedTasksetPublicationFilePath,l as learningPackageContextFiles,ba as learningVerifierModule,K as materializePortableTasksetRelease,$ as materializeTasksetDraftWorkspace,M as portableTasksetEnvironment,N as portableTasksetTools,T as prepareAuthoredTasksetSource,ca as prepareImportedTasksetPackage,P as prepareModelTasksetDraft,_ as prepareTasksetDraftSource,aa as projectLearningBatchGraders,O as projectPortableTaskRecord,L as projectPreferenceComparisonRelease,Q as publishModelTasksetDraftPackage,J as resolvePortableTasksetRewardExecution,q as resolveTasksetPackageExecution,v as resolveTasksetPackageInstructions,y as resolveTasksetWorkOutputs,u as tasksetPackageRewardBinding,da as tasksetPackageSourceId,m as validateTasksetLearningResources,w as validateTasksetPackage};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{m as f}from"./chunk-
|
|
2
|
+
import{m as f}from"./chunk-VSQXDS6H.js";import"./chunk-SXMR6E2W.js";import"./chunk-7JBB4PXS.js";import"./chunk-UC3FXTDL.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as g,c as a,d}from"./chunk-3M53YXEI.js";import"./chunk-MILEWROZ.js";import"./chunk-NOSBNHGC.js";import"./chunk-JX6OX6XE.js";import"./chunk-BT5YNE5U.js";import"./chunk-UTNGEMW5.js";import"./chunk-QCSLEMZF.js";import"./chunk-B42QQUZY.js";import"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-OSVGNONV.js";import"./chunk-XWDFXM3S.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as s}from"./chunk-FTQLQJQV.js";function c(){return["usage: teams-bot <overview|bind|rebind|diagnostics|diagnostic-run>"," teams-bot overview --team-id <id>"," teams-bot bind --team-id <id> --token <token> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot rebind <bindingId> --team-id <id> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot diagnostics <bindingId> --team-id <id>"," teams-bot diagnostic-run <bindingId> --team-id <id> --prompt <text> [--attachments-json <json-array>] [--action-input-json <json-object>]"].join(`
|
|
3
3
|
`)}s(c,"usage");function u(n,o){if(!(o in n))return;let t=a(n,o);return!t||t==="null"||t==="none"?null:t}s(u,"nullableOption");function b(n){let o=d(n,"usage: teams-bot rebind <bindingId>"),t=u(n,"sandboxId"),r=u(n,"projectId"),i=u(n,"agentId"),e=u(n,"microsoftConnectionId");return{teamId:o,...t!==void 0?{sandboxId:t}:{},...r!==void 0?{projectId:r}:{},...i!==void 0?{agentId:i}:{},...e!==void 0?{microsoftConnectionId:e}:{}}}s(b,"bindingTargetInput");function l(n){let o=a(n,"attachmentsJson");if(!o)return;let t=g(o,"attachments-json");if(!Array.isArray(t))throw new Error("attachments-json must be a JSON array");for(let r of t)if(!r||typeof r!="object"||Array.isArray(r))throw new Error("attachments-json entries must be JSON objects");return t}s(l,"attachmentsInput");function w(n){let o=a(n,"actionInputJson");if(!o)return;let t=g(o,"action-input-json");if(!t||typeof t!="object"||Array.isArray(t))throw new Error("action-input-json must be a JSON object");return t}s(w,"actionInput");async function j(n,o){let t=o[0]||"overview",r=await f(n);if(t==="overview"){let i=d(n,"usage: teams-bot overview");console.log(JSON.stringify(await r.getMicrosoftTeamsBotOverview({teamId:i}),null,2));return}if(t==="bind"){let i=a(n,"token");if(!i)throw new Error(c());let e=await r.bindMicrosoftTeamsBotConversation({...b(n),token:i});console.log(JSON.stringify(e,null,2));return}if(t==="rebind"){let i=o[1]?.trim();if(!i)throw new Error(c());let e=await r.rebindMicrosoftTeamsBotConversation(i,b(n));console.log(JSON.stringify(e,null,2));return}if(t==="diagnostics"){let i=o[1]?.trim(),e=d(n,"usage: teams-bot diagnostics <bindingId>");if(!i)throw new Error(c());console.log(JSON.stringify(await r.sendMicrosoftTeamsBotDiagnostic({teamId:e,bindingId:i}),null,2));return}if(t==="diagnostic-run"){let i=o[1]?.trim(),e=d(n,"usage: teams-bot diagnostic-run <bindingId>"),m=a(n,"prompt");if(!i||!m)throw new Error(c());console.log(JSON.stringify(await r.sendMicrosoftTeamsBotDiagnosticRun({teamId:e,bindingId:i,prompt:m,attachments:l(n),actionInput:w(n)}),null,2));return}throw new Error(c())}s(j,"runTeamsBotCommand");export{j as runTeamsBotCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-4U2FNXQW.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as DEFAULT_LOCAL_TRAINING_API_URL,b as LOCAL_TRAINING_RESPONSE_LIMIT,e as TrainingApiClient,d as createLocalAuthenticatedRequest,c as runTrainingCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{p as e}from"./chunk-
|
|
2
|
+
import{p as e}from"./chunk-B42QQUZY.js";import"./chunk-7KTARW23.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as t}from"./chunk-FTQLQJQV.js";function i(n){return n instanceof e?{code:n.code,message:n.message,status:n.status,retryable:n.retryable,requestId:n.requestId}:null}t(i,"trainingCliError");export{i as trainingCliError};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as J}from"./chunk-NWQL6FNF.js";import{c as x}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as E,f as v,h as A}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import{a as S}from"./chunk-QCSLEMZF.js";import{l as _,m as M,n as P,o as C,p as H,q as R}from"./chunk-B42QQUZY.js";import{m as j,o as T}from"./chunk-7KTARW23.js";import"./chunk-GLUWATL5.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-4M3YW3EQ.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";async function U(n,s={}){let t=process.env.OPENPOND_CHAT_INVOCATION;if(t)try{let e=process.env.OPENPOND_LOCAL_API_URL;if(!e)throw new Error("The chat executor did not supply its local API URL.");let i=new URL(e);if(i.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(i.hostname)||i.username||i.password)throw new Error("Chat attachment requires the app's loopback API origin.");let u=await(s.request??await(await import("./training-DF5UEPY3.js")).createLocalAuthenticatedRequest(e,{timeoutMs:15e3}))(new URL("/v1/chat-experiments",i),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"attach_training",invocationToken:t,payload:{location:"cloud",...n}}),signal:AbortSignal.timeout(15e3),redirect:"error"});if(!u.ok)throw new Error(`Chat attachment returned HTTP ${u.status}.`)}catch(e){(s.warn??console.error)(`Hosted operation succeeded, but chat attachment failed: ${e instanceof Error?e.message:String(e)}. Inspect the saved job to retry attachment; do not submit it again.`)}}h(U,"attachHostedTrainingToChat");import{readFile as W}from"node:fs/promises";var O=new Set(["succeeded","failed","cancelled"]);function $(n){let s=A(n.intervalMs,"interval-ms")??1e4,t=A(n.cleanupTimeoutMs,"cleanup-timeout-ms")??18e4,e=A(n.cleanupReserveMs,"cleanup-reserve-ms")??18e4;if([s,t,e].some(u=>!Number.isSafeInteger(u)||u>2147483647))throw new Error("Watch intervals and cleanup bounds must fit a positive 32-bit millisecond timer.");if(s<250)throw new Error("--interval-ms must be at least 250.");if(t<1e3||e<1e3)throw new Error("Cleanup timeout and reserve must be at least 1000 ms.");let i=E(n,"deadlineAt");if(!i&&n.cleanupReserveMs!==void 0)throw new Error("--cleanup-reserve-ms requires --deadline-at.");let c=i?Date.parse(i):null;if(i&&(!/T.*(?:Z|[+-]\d{2}:\d{2})$/.test(i)||!Number.isFinite(c)))throw new Error("--deadline-at requires an ISO timestamp with an explicit timezone.");if(c!==null&&c-e<=Date.now())throw new Error("--deadline-at must leave time for execution and the cleanup reserve.");return{intervalMs:s,deadlineAt:c,cancelAt:c===null?null:c-e,waitForCleanup:c!==null||v(n.waitForCleanup)||v(n.cancelOnInfrastructureError),cleanupTimeoutMs:t,cancelOnInfrastructureError:v(n.cancelOnInfrastructureError)}}h($,"parseHostedWatchOptions");async function q(n,s,t){for(let e=0;e<4;e++){let i=await n.getJob(s);if(k(i,s,t),O.has(i.state)||i.state==="cancelling")return i;try{let c=await n.cancelJob(s,i.version);return k(c,s,t,i.submissionHash),c}catch(c){if(!(c instanceof H)||c.status!==409||c.code!=="stale_version"||e===3)throw c}}throw new Error("Hosted cancellation could not reconcile the current Job version.")}h(q,"cancelHostedTrainingJob");async function B(n){let{client:s,options:t,jobId:e,teamId:i}=n,c=null,u,p=!1;for(;;){let w=Math.min(t.deadlineAt??1/0,c??1/0);if(n.requestBound.deadlineAt=Number.isFinite(w)?w:null,Date.now()>=w)throw D(e);try{let o=t.cancelAt!==null&&Date.now()>=t.cancelAt&&!p?await q(s,e,i):await s.getJob(e);if(k(o,e,i,u),u=o.submissionHash,t.cancelOnInfrastructureError&&!p&&!O.has(o.state)&&o.state!=="cancelling"){let d=await s.events(e);if(d.some(m=>m.jobId!==e))throw new Error("Hosted event does not match the watched Job.");let f=d.find(m=>m.type==="rollout_metric"&&m.data.terminalClass==="infrastructure"&&m.data.rewardEligible===!1);f&&(n.print({jobId:e,event:"hosted_watch_infrastructure_failure",trajectoryEventId:f.id,data:f.data}),o=await q(s,e,i),k(o,e,i,u),c??=Date.now()+t.cleanupTimeoutMs)}if(p||=o.state==="cancelling"||O.has(o.state),n.print(o),O.has(o.state)){let d=o.executionMode==="qualification"&&o.state==="succeeded";if(!t.waitForCleanup&&!d)return;c??=Date.now()+t.cleanupTimeoutMs,n.requestBound.deadlineAt=Math.min(t.deadlineAt??1/0,c);let{receipt:f,outputs:m}=await s.outputs(e);if(f){if(f.jobId!==e||f.teamId!==i||f.submissionHash!==u)throw new Error("Hosted cleanup receipt does not match the watched Job and submission.");if(f.cleanupComplete){d&&await C(f,{submissionHash:u,outputs:m}),n.print({jobId:e,cleanup:{scope:"job",complete:!0,receipt:f}});return}}}}catch(o){if(n.requestBound.deadlineAt!==null&&Date.now()>=n.requestBound.deadlineAt)throw D(e);if(t.deadlineAt===null&&c===null||!N(o))throw o;console.error(JSON.stringify({jobId:e,event:"hosted_watch_retry",code:o instanceof H?o.code:"transport_unavailable"}))}let g=Math.min(n.requestBound.deadlineAt??1/0,!p&&t.cancelAt!==null&&Date.now()<t.cancelAt?t.cancelAt:1/0);await new Promise(o=>setTimeout(o,Math.max(0,Math.min(t.intervalMs,g-Date.now()))))}}h(B,"watchHostedTrainingJob");function k(n,s,t,e){if(n.id!==s||n.teamId!==t||e!==void 0&&n.submissionHash!==e)throw new Error("Hosted response does not match the requested Job, workspace, and submission.")}h(k,"assertJobIdentity");function N(n){return n instanceof H?n.status===429||n.status>=500:n instanceof TypeError||n instanceof Error&&["TimeoutError","AbortError"].includes(n.name)}h(N,"isTransient");function D(n){return new Error(`Hosted watch deadline reached for ${n}; completed job cleanup is unverified. Inspect hosted-status, hosted-artifacts, and provider retirement before treating resources as released.`)}h(D,"cleanupDeadlineError");var l=h(n=>console.log(JSON.stringify(n,null,2)),"print");async function st(n,s){let t=s[0],e=s[1],i=t==="hosted-watch"?$(n):null,c={deadlineAt:i?.deadlineAt??null},u=await z(n);if(!u.token)throw new Error("Sign in to an OpenPond account before using hosted training.");let p=x(n)??u.apiBaseUrl;if(new URL(p).origin!==new URL(u.apiBaseUrl).origin)throw new Error("The hosted API URL must match the signed-in account\u2019s API origin.");let w=E(n,"teamId");if(!w)throw new Error("Hosted training requires --team-id <workspace-id>.");let g=new Headers({"x-openpond-team-id":w});u.token.startsWith("opk_")?(g.set("Authorization",`ApiKey ${u.token}`),g.set("openpond-api-key",u.token)):g.set("Authorization",`Bearer ${u.token}`);let o=h((r,a)=>{let b=c.deadlineAt===null?1/0:c.deadlineAt-Date.now();if(b<=0)throw new DOMException("Hosted watch deadline reached","TimeoutError");let y=AbortSignal.timeout(Math.max(1,Math.min(i?1e4:18e4,b)));return fetch(r,{...a,redirect:"error",signal:a?.signal?AbortSignal.any([a.signal,y]):y})},"request"),d=R({baseUrl:p,headers:g,fetch:o}),f=h(r=>U({jobId:r,teamId:w,apiOrigin:new URL(p).origin}),"attach"),m=h(async(r,a)=>{l(r),await f(a)},"printAttached"),I=h(async()=>{if(!e)throw new Error(`${t} requires an input JSON file.`);let r=await W(e);if(r.byteLength>64*1024*1024)throw new Error("Hosted training input exceeds 64 MiB.");return JSON.parse(r.toString("utf8"))},"readInput");if(s.length>2)throw new Error(`${t} accepts at most one identifier or input file.`);if(["hosted-serving-pools","hosted-base-serving-prepare","hosted-serving-pool-retire"].includes(t??"")){l(await(await import("./training-hosted-serving-QAV7ZGGV.js")).runHostedServingCommand({action:t,target:e,baseUrl:p,headers:g,request:o,readInput:I,confirmed:v(n.yes)}));return}if(t==="hosted-provider"||t==="hosted-quotes"){if(e)throw new Error(`${t} does not accept an identifier.`);let r=t==="hosted-provider"?"/v1/managed-rl/provider-inventory":"/v1/managed-rl/quotes",a=await o(new URL(r,p),{headers:g}),b=await a.json();if(!a.ok)throw new Error(`Hosted capacity read failed (${a.status}).`);l(b);return}if(t==="hosted-workers"||t==="hosted-worker"||t?.startsWith("hosted-worker-")){l(await(await import("./training-hosted-workers-KI767T4Y.js")).runHostedWorkerCommand({action:t,target:e,baseUrl:p,headers:g,request:o,readInput:I,confirmed:v(n.yes)}));return}if(t==="hosted-models"){l(await T({baseUrl:p,headers:g,fetch:o}).list());return}if(t==="hosted-model"){if(!e)throw new Error("hosted-model requires a Model Project ID.");l(await T({baseUrl:p,headers:g,fetch:o}).get(e));return}if(t==="hosted-sync-model"){let r=j.parse(await I());l(await T({baseUrl:p,headers:g,fetch:o}).upsert(r));return}if(t==="hosted-capabilities"){l(await d.capabilities());return}if(t==="hosted-batches"){let r=new S({baseUrl:p,apiKey:u.token,scope:w,fetch:o});l(await r.list("batch",{limit:100}));return}if(t==="hosted-preparations"){l(await d.listPreparations(w));return}if(t==="hosted-jobs"){l(await d.listJobs({limit:100}));return}if(t==="hosted-prepare"){let r=_.parse(await I());if(r.teamId!==w)throw new Error("Preparation input belongs to a different workspace.");l(await d.prepareRun(r));return}if(t==="hosted-start"){let r=await M(await I());if(r.plan.request.teamId!==w)throw new Error("Preparation belongs to a different workspace.");if(!v(n.yes))throw new Error("Starting paid hosted training requires --yes.");let a=await d.startPreparation(r.plan.id,{teamId:w,planHash:r.plan.contentHash,expectedRevision:r.revision});l(a),a.jobId&&await f(a.jobId);return}if(t==="hosted-stage"){l(await d.stageArtifact(await I()));return}if(t==="hosted-submit"||t==="hosted-qualify"){let r=await P(await I());if(t==="hosted-qualify"&&(r.job.kind!=="policy_optimize"||r.job.executionMode!=="qualification"))throw new Error("hosted-qualify requires an immutable policy_optimize submission with executionMode=qualification.");if(!v(n.yes))throw new Error("Submitting paid hosted training requires --yes.");if(r.job.kind==="policy_optimize"&&r.job.executionMode==="qualification"&&!(await d.capabilities()).executionModes?.includes("qualification"))throw new Error("This hosted runtime does not advertise original-learner qualification support.");let a=await d.createJob(r);if(a.teamId!==w||a.submissionHash!==r.contentHash||a.kind!==r.job.kind||r.job.kind==="policy_optimize"&&a.executionMode!==r.job.executionMode)throw new Error(`Hosted submission response identity or execution mode mismatch; inspect hosted-status ${a.id} before attempting another submission.`);await m(a,a.id);return}if(!e)throw new Error(`${t} requires a hosted job ID.`);if(t==="hosted-status"){await m(await d.getJob(e),e);return}if(t==="hosted-report"){let r=await d.getJob(e),[a,b]=await Promise.all([d.events(e),d.outputs(e)]),y=await d.getJob(e);if(y.id!==e||y.teamId!==w||r.id!==e||r.teamId!==w)throw new Error("Hosted report status identity mismatch.");let{buildHostedTrainingReport:L}=await import("./training-hosted-report-4F25RZZ4.js");await m(L({job:y,events:a,outputs:b,versionBeforeRead:r.version,generatedAt:new Date().toISOString()}),e);return}if(t==="hosted-evaluation-tasks"){let r=E(n,"evaluationId");if(!r)throw new Error("hosted-evaluation-tasks requires --evaluation-id from hosted-artifacts.");let b=(await d.outputs(e)).outputs.find(y=>y.kind==="evaluation"&&y.id===r);if(!b)throw new Error("Evaluation does not belong to this job's retained outputs.");l(await d.evaluationTasks(e,{id:b.id,contentHash:b.contentHash},{cursor:E(n,"cursor")||void 0}));return}if(t==="hosted-trajectory"){let r=E(n,"trajectoryId");if(!r)throw new Error("hosted-trajectory requires --trajectory-id <receipt-id> from hosted-inspect.");let a=await o(new URL(`/v1/managed-rl/jobs/${encodeURIComponent(e)}/trajectories/${encodeURIComponent(r)}`,p),{headers:g});if(!a.ok)throw new Error(`Hosted trajectory read failed (${a.status}).`);l(await a.json());return}if(t==="hosted-inspect"){let r=await o(new URL(`/v1/managed-rl/jobs/${encodeURIComponent(e)}`,p),{headers:g});if(!r.ok)throw new Error(`Hosted job inspection failed (${r.status}).`);l(await r.json());return}if(t==="hosted-cancel"){await m(await q(d,e,w),e);return}if(t==="hosted-artifacts"){await m(await d.outputs(e),e);return}if(t==="hosted-logs"){await m(await d.logs(e),e);return}if(t==="hosted-events"){await m(await d.events(e),e);return}if(t==="hosted-watch"&&i){await f(e),await B({client:d,jobId:e,teamId:w,options:i,print:l,requestBound:c});return}throw new Error(`Unknown hosted training command: ${t}`)}h(st,"runHostedTrainingCommand");async function z(n){for(let s=0;;s++)try{return await J(E(n,"account"))}catch(t){if(t.issue?.code!=="STORAGE_BUSY"||s>=29)throw t;await new Promise(i=>setTimeout(i,1e3))}}h(z,"accountContext");export{st as runHostedTrainingCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as c}from"./chunk-FTQLQJQV.js";function h(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)?n:{}}c(h,"record");function b(n){return typeof n=="number"&&Number.isFinite(n)?n:null}c(b,"finite");function l(n){let t=b(n);return t!==null&&t>=0?t:null}c(l,"nonnegative");function s(n){let t=n.filter(i=>i!==null).sort((i,a)=>i-a),o=t.length?t.reduce((i,a)=>i+a,0):null,d=c(i=>t.length?t[Math.max(0,Math.ceil(t.length*i)-1)]:null,"quantile");return{observations:t.length,missing:n.length-t.length,total:o,mean:o===null?null:o/t.length,min:t[0]??null,max:t.at(-1)??null,p50:d(.5),p95:d(.95)}}c(s,"statistics");function R(n,t){return Object.fromEntries(t.map(o=>[o,s(n.map(d=>l(d[o])))]))}c(R,"timingStatistics");function x(n,t){return Object.fromEntries(t.map(o=>{let{total:d,...i}=s(n.map(a=>l(a[o])));return[o,i]}))}c(x,"distributionStatistics");function B(n){if(!n.length)return null;let t=n.reduce((o,d)=>o+d,0)/n.length;return Math.sqrt(n.reduce((o,d)=>o+(d-t)**2,0)/n.length)}c(B,"populationStd");function g(n){return typeof n=="string"&&/^[a-zA-Z0-9_.:-]{1,200}$/.test(n)?n:null}c(g,"code");function w(n){let t=new Map;for(let o of n)o!==null&&t.set(o,(t.get(o)??0)+1);return Object.fromEntries([...t].sort(([o],[d])=>o.localeCompare(d)))}c(w,"counts");var D=["commandTotalSeconds","requestPreparationSeconds","vllmRequestSeconds","vllmQueueSeconds","vllmPrefillSeconds","vllmDecodeSeconds","vllmTimeToFirstTokenSeconds","vllmInferenceSeconds","tokenizationSeconds","workerQueueSeconds","workerBatchWaitSeconds"],L=["inputPreparationSeconds","parameterHashSeconds","residentLoadSeconds","oldAndReferenceForwardSeconds","optimizerForwardBackwardSeconds","postUpdateForwardSeconds","checkpointSaveSeconds","adapterSerializationSeconds","adapterCompositionSeconds","serializedAdapterVerificationSeconds","optimizerStateSerializationSeconds","deferredDiagnosticsSerializationSeconds","totalTrainStepSeconds"];function $(n){let{job:t,outputs:o}=n;if(n.events.length>1e5)throw new Error("Hosted report exceeds 100,000 events.");if(n.events.some(e=>e.jobId!==t.id)||o.outputs.some(e=>e.jobId!==t.id)||o.receipt&&(o.receipt.jobId!==t.id||o.receipt.teamId!==t.teamId))throw new Error("Hosted report evidence belongs to a different job or workspace.");let d=new Map;for(let e of n.events){let r=d.get(e.id);if(r&&r.sequence===e.sequence&&JSON.stringify(r)!==JSON.stringify(e))throw new Error("Hosted report contains conflicting event snapshots.");(!r||e.sequence>=r.sequence)&&d.set(e.id,e)}let i=[...d.values()],a=i.filter(e=>e.data.metricKind==="rollout_trajectory"),m=a.filter(e=>e.data.rewardEligible===!0),y=a.filter(e=>e.data.rewardEligible===!1),v=m.filter(e=>b(e.data.reward)!==null),T=i.filter(e=>e.data.metricKind==="inference_command"),f=i.filter(e=>e.data.metricKind==="policy_optimization"),k=i.filter(e=>e.type==="optimizer_skipped_no_signal"),F=i.filter(e=>e.data.metricKind==="gpu_allocation"),J=i.filter(e=>e.data.metricKind==="physical_gpu_worker"),U=[],p=c((e,r)=>U.push({code:e,message:r}),"add"),M=n.versionBeforeRead===t.version;M||p("job_changed_during_read","The job changed during these reads; rerun for a stable snapshot."),a.length||p("no_recorded_trajectories","No trajectory evidence is present; this report cannot assess model quality or learning."),y.length&&p("ineligible_trajectories","Infrastructure-ineligible trajectories are excluded from reward statistics."),m.length!==v.length&&p("eligible_rewards_pending","Some eligible trajectories have no finite grade yet."),k.length&&p("no_signal_groups","Recorded groups produced zero standardized advantage and skipped optimization; inspect reward/task quality before increasing the budget.");let I=t.executionMode==="qualification";I&&p("qualification_only","This run collects original-model evidence; optimizer updates were not requested."),t.terminalReason&&p("terminal_reason_present","The job has a terminal reason; inspect official status/logs for its details."),o.receipt||p("execution_receipt_unavailable","No final execution receipt is available; cleanup and reconciled execution evidence remain unverified here."),o.receipt&&!o.receipt.cleanupComplete&&p("cleanup_incomplete","The execution receipt does not attest completed cleanup.");let A=new Map;for(let e of m){let r=g(e.data.rolloutGroupId);if(!r)continue;let u=A.get(r)??[];u.push(e),A.set(r,u)}let G=[...A].map(([e,r])=>{let u=r.map(_=>b(_.data.reward)).filter(_=>_!==null),O=B(u);return{groupId:e,recordedEligible:r.length,recordedScored:u.length,rewardMean:s(u).mean,rewardStd:O,allRecordedRewardsEqual:u.length>=2&&O===0,optimizerSkippedNoSignal:k.some(_=>_.data.rolloutGroupId===e)}}),E=new Set(v.flatMap(e=>Object.entries(h(e.data.rewardComponents)).filter(([r,u])=>g(r)&&b(u)!==null).map(([r])=>r))),H=Object.fromEntries([...E].sort().map(e=>[e,s(v.map(r=>b(h(r.data.rewardComponents)[e])))]));v.length&&![...E].some(e=>e!=="reward")?p("per_grader_reward_breakdown_unavailable","Eligible aggregate rewards are recorded, but no separate finite numeric component fields are present. Per-grader coverage and scores are unavailable; missing breakdowns are not zero grades."):E.size&&p("reward_component_binding_unverified","Reward components summarize finite numeric event fields only. The reward field is aggregate; other fields are not established as individual grader scores without matching the frozen grader binding.");let z=T.map(e=>h(e.data.timings)),W=f.map(e=>h(e.data.timings));T.length&&z.some(e=>l(e.vllmRequestSeconds)===null)&&p("inference_timing_incomplete","Some inference commands lack request timing; missing measurements are not zero durations."),f.length<t.rolloutProgress.optimizerUpdatesApplied&&p("optimizer_event_coverage_incomplete","Fewer optimizer events were returned than applied updates; report evidence may be incomplete."),k.length<t.rolloutProgress.optimizerUpdatesSkipped&&p("no_signal_event_coverage_incomplete","Fewer no-signal events were returned than skipped updates; group details may be incomplete.");let C=Date.parse(t.completedAt??n.generatedAt);if(!Number.isFinite(C)||!Number.isFinite(Date.parse(n.generatedAt)))throw new Error("Hosted report timestamp is invalid.");let S=Math.max(0,(C-Date.parse(t.createdAt))/1e3),j=c(e=>S>0?e*3600/S:null,"hourlyRate"),P=s(a.map(e=>l(e.data.outputTokens))),q=new Map;for(let e of F.sort((r,u)=>r.sequence-u.sequence)){let r=g(e.data.allocationId);r&&q.set(r,e)}let N=new Map;for(let e of J.sort((r,u)=>r.sequence-u.sequence)){let r=g(e.data.physicalWorkerId);r&&N.set(r,e)}let K=t.completedAt!==null;return{schemaVersion:"openpond.trainingRunReport.v1",generatedAt:n.generatedAt,job:{id:t.id,teamId:t.teamId,submissionHash:t.submissionHash,kind:t.kind,executionMode:I?"qualification":"training",state:t.state,phase:t.phase,version:t.version,terminalReasonPresent:t.terminalReason!==null,createdAt:t.createdAt,completedAt:t.completedAt},evidence:{jobRevisionStableDuringRead:M,versionBeforeRead:n.versionBeforeRead,versionAfterRead:t.version,readModel:"independent_authenticated_reads_not_an_atomic_snapshot",returnedEvents:n.events.length,uniqueEvents:i.length,scope:"returned_public_event_snapshot",terminal:K,completeness:"Only recorded events are summarized; absent instrumentation is not proof of no work."},progress:t.rolloutProgress,wall:{elapsedSeconds:S,inferenceCommands:T.length,optimizerEvents:f.length},throughput:{recordedTrajectoriesPerWallHour:j(a.length),recordedEligibleTrajectoriesPerWallHour:j(m.length),appliedUpdatesPerWallHour:j(t.rolloutProgress.optimizerUpdatesApplied),recordedOutputTokensPerWallSecond:S>0&&P.total!==null?P.total/S:null,note:"Whole-job throughput includes startup, waits and cleanup; this is not engine decode tokens/second."},trajectories:{recorded:a.length,eligible:m.length,ineligible:y.length,eligibilityUnknown:a.length-m.length-y.length,scoredEligible:v.length,pendingEligibleGrades:m.length-v.length,inputTokens:s(a.map(e=>l(e.data.inputTokens))),outputTokens:P,eligibleRewards:s(m.map(e=>b(e.data.reward))),rewardComponents:H,terminalClasses:w(a.map(e=>g(e.data.terminalClass))),ineligibleTerminalClasses:w(y.map(e=>g(e.data.terminalClass))),groups:G,groupCoverageNote:"Within-group statistics cover recorded eligible scores only; equal partial scores do not establish a completed no-signal group."},failures:{commandErrorCodes:w(i.map(e=>g(e.data.errorCode))),outboxErrorCodes:w(i.map(e=>g(e.data.lastErrorCode))),providerFailureCodes:w([...N.values()].map(e=>g(e.data.failureCode)))},learning:{noSignalGroupsRecorded:k.length,samplingLogprobMae:s(f.map(e=>l(e.data.samplingLogprobMae))),entropy:s(f.map(e=>l(e.data.entropy))),gradientNorm:s(f.map(e=>l(e.data.gradientNorm))),behaviorPolicyKlPreUpdate:s(f.map(e=>l(e.data.behaviorPolicyKlPreUpdate))),baseOrReferenceKl:s(f.map(e=>l(e.data.kl)))},timings:{environmentSeconds:R(a.map(e=>h(e.data.executionTiming)),["initializationSeconds","policySeconds","environmentSeconds","cleanupSeconds","totalRolloutSeconds"]),toolCalls:s(a.map(e=>l(h(e.data.executionTiming).toolCalls))),toolFailures:s(a.map(e=>l(h(e.data.executionTiming).toolFailures))),inferenceSeconds:R(z,D),optimizerSeconds:R(W,L),cachedPromptTokens:s(z.map(e=>l(e.vllmCachedPromptTokens))),note:"Totals are sums of recorded work. Nested timings and concurrent requests overlap; do not sum these into wall time or infer idle time from them."},gpuActivity:{inference:x(z,["gpuActivitySampleCount","gpuUtilizationMeanPercent","gpuUtilizationMaxPercent","gpuMemoryBusUtilizationMeanPercent","gpuActivityWindowSeconds","gpuActivityObservedSpanSeconds","gpuInterRequestGapSeconds","gpuInterRequestSampleCount","gpuInterRequestUtilizationMeanPercent"]),optimizer:x(f.map(e=>h(e.data.hardware)),["gpuActivitySampleCount","gpuUtilizationMeanPercent","gpuUtilizationMaxPercent","gpuMemoryBusUtilizationMeanPercent","gpuActivityWindowSeconds","gpuActivityObservedSpanSeconds"]),note:"Device-wide one-second samples can include other co-resident work. Between-request activity is worker-wide, not attributed tool or idle time. Per-window statistics are not time-weighted whole-job utilization; short windows may have no samples."},costs:{accountingBasis:"job_accrued_meter_not_final_provider_invoice",jobAccruedSpendUsd:t.accruedSpendUsd,executionReceiptSpendUsd:o.receipt?.spendUsd??null,perRecordedEligibleTrajectoryUsd:m.length?t.accruedSpendUsd/m.length:null,perAppliedUpdateUsd:t.rolloutProgress.optimizerUpdatesApplied?t.accruedSpendUsd/t.rolloutProgress.optimizerUpdatesApplied:null,allocationGpuUsd:s([...q.values()].map(e=>l(e.data.accruedGpuUsd))),allocationGpuSeconds:s([...q.values()].map(e=>l(e.data.accruedGpuSeconds))),physicalInvoiceTotalUsd:null,note:"Job, receipt and allocation amounts are overlapping accounting views, not additive charges. Physical startup/idle/storage and provider settlement are not established by this report."},cleanup:{executionReceiptAvailable:o.receipt!==null,complete:o.receipt?.cleanupComplete??null},findings:U}}c($,"buildHostedTrainingReport");export{$ as buildHostedTrainingReport};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{A as e}from"./chunk-PF56N7ZY.js";import{a as g}from"./chunk-FTQLQJQV.js";var m=e.object({baseProfileId:e.string().trim().min(1).max(191)}).strict(),h=e.object({poolId:e.string().trim().min(1).max(191),reason:e.string().trim().min(3).max(512)}).strict(),l=e.object({id:e.string().min(1),baseProfileId:e.string().min(1),provider:e.string().min(1),state:e.string().min(1),workersMin:e.number().int().nonnegative(),workersMax:e.number().int().nonnegative()}).passthrough();async function b(r){let d="/v1/model-adapters/serving-pools",n,t,s;if(r.action==="hosted-serving-pools"){if(r.target)throw new Error("hosted-serving-pools does not accept an identifier.")}else if(r.action==="hosted-base-serving-prepare"){if(!r.confirmed)throw new Error("Preparing serving capacity requires --yes. Inference is a separate operation.");let o=m.parse(await r.readInput());s=o.baseProfileId,n=JSON.stringify(o)}else if(r.action==="hosted-serving-pool-retire"){if(!r.confirmed)throw new Error("Retiring serving capacity requires --yes.");let{poolId:o,reason:f}=h.parse(await r.readInput());t=o,d+=`/${encodeURIComponent(o)}/retire`,n=JSON.stringify({reason:f})}else throw new Error(`Unknown serving operation: ${r.action}`);let i=new Headers(r.headers);i.set("accept","application/json"),n&&i.set("content-type","application/json");let a=await r.request(new URL(d,r.baseUrl),{method:n?"POST":"GET",headers:i,body:n});if(!a.ok)throw new Error(`Hosted serving request failed (${a.status}). Inspect hosted-serving-pools before retrying a capacity change.`);let p=await a.json();if(!n)return e.object({pools:e.array(l)}).parse(p);let c=e.object({pool:l}).parse(p);if(t&&c.pool.id!==t||s&&c.pool.baseProfileId!==s)throw new Error("Serving response identity mismatch. Inspect hosted-serving-pools before retrying.");return c}g(b,"runHostedServingCommand");export{b as runHostedServingCommand};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{c as l,f as i}from"./chunk-3M53YXEI.js";import{a as p}from"./chunk-FTQLQJQV.js";import{readFile as d,stat as u,writeFile as m}from"node:fs/promises";import c from"node:path";async function h(f,a,r){let o=i(r.apply);if(o&&i(r.dryRun))throw new Error("Choose --apply or --dry-run.");let s=await u(a);if(!s.isFile()||s.size>64*1024*1024)throw new Error("Provide a project preparation JSON file of at most 64 MiB.");let g=JSON.parse(await d(a,"utf8")),e=await f.prepareLocalModelProject(g,o),t=l(r,"output");if(t&&await m(c.resolve(t),`${JSON.stringify(e,null,2)}
|
|
3
|
+
`,{flag:"wx",mode:384}),i(r.json))console.log(JSON.stringify(e,null,2));else{let n=e;console.log(o?`Saved Model Project ${n.project?.id} from preparation ${n.preparationHash}.`:`Prepared project receipt ${n.contentHash}. No project or resources were saved. Training readiness and execution remain separate.`),t?console.log(`Wrote ${c.resolve(t)}.`):o||console.log(JSON.stringify(e,null,2))}}p(h,"runProjectPreparation");export{h as runProjectPreparation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-AKZPMKWP.js";import"./chunk-MNFW5WLD.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as createHostedWebSearchExecutor,b as createWebSearchExecutorFromEnv,d as normalizeSearchApiUrl,e as normalizeWebSearchRequest,c as resolveWebSearchEndpoint};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as F,b as G,c as H,d as I,e as J,f as K,g as L,h as M,i as N,j as O,k as P,l as Q,m as R,n as S,o as T}from"./chunk-
|
|
2
|
+
import{a as F,b as G,c as H,d as I,e as J,f as K,g as L,h as M,i as N,j as O,k as P,l as Q,m as R,n as S,o as T}from"./chunk-VK4TPZTA.js";import{A,B,C,D,E,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-YU3C6U5V.js";import"./chunk-557XSPVS.js";import"./chunk-FTQLQJQV.js";export{a as MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,C as appWorkspacePaths,B as assertSafeBranchName,d as checkWorkspaceGitAvailability,S as checkoutBranch,T as checkoutBranchAtPath,G as clearWorkspaceDiffCacheForTests,D as cloneWorkspace,Q as createAndCheckoutBranch,R as createAndCheckoutBranchAtPath,A as expectedRemoteUrl,t as isGeneratedWorkspacePath,i as isGitRepo,c as isMacOSGitDeveloperToolsMissing,u as isVisibleGitWorkspaceFile,r as isWorkspaceDirectory,E as lastFetchAt,z as listPlainWorkspaceFiles,J as loadGitCommitDiffAtPath,H as loadWorkspaceDiff,I as loadWorkspaceDiffAtPath,K as loadWorkspaceFile,N as loadWorkspaceFileAtPath,L as loadWorkspaceImageFile,M as loadWorkspaceImageFileAtPath,O as loadWorkspaceState,P as loadWorkspaceStateAtPath,n as localVideoContentType,F as mapWorkspaceDiffEntriesWithConcurrency,s as normalizeWorkspaceFilePath,w as parseBranchStatusLine,x as parseNumstat,v as parseStatusLine,h as pathExists,p as readLocalImageFile,q as readLocalVideoFile,l as readWorkspaceDocumentPreview,k as readWorkspaceFile,o as readWorkspaceImageFile,g as redactRemoteUrl,b as runWorkspaceCommand,f as sourceFromRemote,e as startMacOSCommandLineToolsInstall,j as truncatePatch,y as uniqueSortedPaths,m as workspaceImageContentType};
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
3
|
-
import{
|
|
3
|
+
import{a as d}from"./chunks/chunk-AZ7BL5FL.js";import{b as f}from"./chunks/chunk-7JBB4PXS.js";import{g as u}from"./chunks/chunk-UC3FXTDL.js";import{a as c}from"./chunks/chunk-XRKFTPHD.js";import{a as m,b as l}from"./chunks/chunk-BSHAIAXY.js";import"./chunks/chunk-XWPC3AN4.js";import{f as a}from"./chunks/chunk-3M53YXEI.js";import"./chunks/chunk-GLUWATL5.js";import{a as s}from"./chunks/chunk-FTQLQJQV.js";function C(e){return!e.command&&a(e.options.version)?"version":a(e.options.checkUpdate)?"check-update":!e.command&&a(e.options.help)?"help":!e.command&&a(e.options.tui)?"tui":e.command?"command":"ui"}s(C,"resolveCliTopLevelAction");async function w(e=process.argv.slice(2)){if(await P(e))return;let{command:i,options:o,rest:t}=f(e);typeof o.home=="string"&&(process.env.OPENPOND_HOME=(await import("./chunks/dist-HSC43RG4.js")).resolveOpenPondHome({home:o.home}));let r=C({command:i,options:o});if(r==="version"){console.log(c());return}if(r==="check-update"){await(await import("./chunks/core-commands-NJ6TGND4.js")).runCheckUpdate();return}if(r==="help"){(await import("./chunks/help-PXUUREHZ.js")).printHelp();return}let n=m(o),p=l(o);if(n&&(process.env.OPENPOND_ACCOUNT=n),p&&(process.env.OPENPOND_BASE_URL=p),r==="tui"){await(await import("./chunks/app-layer-N2H3RBEN.js")).runOpenPondTerminalCommand(o,t);return}if(r==="ui"){await(await import("./chunks/app-layer-N2H3RBEN.js")).runOpenPondServerCommand("web",o,t);return}await u({command:i,options:o,rest:t})||((await import("./chunks/help-PXUUREHZ.js")).printHelp(),process.exit(1))}s(w,"runOpenPondCli");async function P(e){if(e[0]==="__dataset-preparation-authoring")return await(await import("./chunks/dataset-preparation-authoring-IUXUQK3L.js")).runDatasetPreparationAuthoringCli(e.slice(1)),!0;if(e[0]==="__inspect-hosted-profile-evaluation")return await(await import("./chunks/hosted-profile-compiler-V6YR6EHO.js")).runHostedProfileInspectionCli(e.slice(1)),!0;if(e[0]==="__prepare-hosted-profile-evaluation")return await(await import("./chunks/hosted-profile-compiler-V6YR6EHO.js")).runHostedProfileEvaluationCli(e.slice(1)),!0;if(e[0]==="__hosted-experiment-improvement")return await(await import("./chunks/hosted-experiment-improvement-TIVXXRPG.js")).runHostedExperimentImprovementCli(e.slice(1)),!0;if(e[0]==="__compile-hosted-profile-candidate")return await(await import("./chunks/hosted-profile-candidate-DKEMVIYG.js")).runHostedProfileCandidateCli(e.slice(1)),!0;if(e[0]==="__compile-hosted-profile")return await(await import("./chunks/hosted-profile-compiler-V6YR6EHO.js")).runHostedProfileCompilerCli(e.slice(1)),!0;if(e[0]==="__app-server"){process.argv=[process.execPath,"openpond-app-server",...e.slice(1)];let[{createOpenPondAppServer:i},{runOpenPondAppServerCli:o}]=await Promise.all([import("./chunks/app-server-runtime-VEJPDAFP.js"),import("./chunks/cli-GCSO2OAI.js")]);return await o(i),!0}if(e[0]==="__server"){process.argv=[process.execPath,"openpond-server",...e.slice(1)];let[{createOpenPondServer:i},{runOpenPondServerCli:o}]=await Promise.all([import("./chunks/src-AU6LG7E6.js"),import("./chunks/cli-GCSO2OAI.js")]),{createOpenPondAppServer:t}=await import("./chunks/app-server-runtime-VEJPDAFP.js");return await o({createOpenPondServer:i,createOpenPondAppServer:t}),!0}return e[0]==="__terminal"?(await(await import("./chunks/src-2R4CMCJ5.js")).runOpenPondTerminalCli(e.slice(1)),!0):!1}s(P,"runEmbeddedCompanion");w().catch(async e=>{if(e instanceof d){process.exitCode=e.exitCode;return}let i=e instanceof Error?e.message:String(e),o=e.issue,t=(await import("./chunks/training-error-L5V5IBX3.js")).trainingCliError(e);if(process.argv.includes("--json")&&!(e instanceof Error&&e.name==="OpenPondChildProcessExitError"))console.log(JSON.stringify({error:o??t??{code:"CLI_ERROR",message:i}}));else if(o&&typeof o=="object"){let n=o;console.error(`${n.code}: ${n.message}
|
|
4
4
|
${n.path}
|
|
5
|
-
${n.action}`)}else console.error(t?`${t.code}: ${i}`:i);let r=typeof e.exitCode=="number"?e.exitCode:1;process.exit(r)});export{
|
|
5
|
+
${n.action}`)}else console.error(t?`${t.code}: ${i}`:i);let r=typeof e.exitCode=="number"?e.exitCode:1;process.exit(r)});export{w as runOpenPondCli};
|
package/dist/hosted-chat.d.ts
CHANGED
|
@@ -138,9 +138,34 @@ export type HostedChatStreamDelta = {
|
|
|
138
138
|
finishReason: string | null;
|
|
139
139
|
raw: unknown;
|
|
140
140
|
};
|
|
141
|
+
/** Transport metadata only: never headers, SSE contents or request credentials. */
|
|
142
|
+
type HostedChatStreamDiagnosticDetails = {
|
|
143
|
+
type: "request";
|
|
144
|
+
} | {
|
|
145
|
+
type: "headers";
|
|
146
|
+
status: number;
|
|
147
|
+
eventStream: boolean;
|
|
148
|
+
noCache: boolean;
|
|
149
|
+
noTransform: boolean;
|
|
150
|
+
bufferingDisabled: boolean;
|
|
151
|
+
} | {
|
|
152
|
+
type: "bytes";
|
|
153
|
+
byteLength: number;
|
|
154
|
+
} | {
|
|
155
|
+
type: "comment";
|
|
156
|
+
} | {
|
|
157
|
+
type: "data";
|
|
158
|
+
errorFrame: boolean;
|
|
159
|
+
} | {
|
|
160
|
+
type: "done";
|
|
161
|
+
};
|
|
162
|
+
export type HostedChatStreamDiagnostic = HostedChatStreamDiagnosticDetails & {
|
|
163
|
+
elapsedMs: number;
|
|
164
|
+
};
|
|
141
165
|
export type HostedChatRequestOptions = {
|
|
142
166
|
apiBaseUrl: string;
|
|
143
167
|
token: string;
|
|
168
|
+
teamId?: string;
|
|
144
169
|
model: string;
|
|
145
170
|
messages: HostedChatMessage[];
|
|
146
171
|
requestId?: string;
|
|
@@ -152,10 +177,12 @@ export type HostedChatRequestOptions = {
|
|
|
152
177
|
toolChoice?: HostedChatToolChoice;
|
|
153
178
|
tool_choice?: HostedChatToolChoice;
|
|
154
179
|
metadata?: Record<string, unknown>;
|
|
180
|
+
onStreamDiagnostic?: (event: HostedChatStreamDiagnostic) => void;
|
|
155
181
|
};
|
|
156
182
|
export type HostedModelsRequestOptions = {
|
|
157
183
|
apiBaseUrl: string;
|
|
158
184
|
token: string;
|
|
185
|
+
teamId?: string;
|
|
159
186
|
signal?: AbortSignal;
|
|
160
187
|
};
|
|
161
188
|
export type HostedModelRequestOptions = HostedModelsRequestOptions & {
|
|
@@ -181,3 +208,4 @@ export declare function getOpChatProvider(options: HostedProviderRequestOptions)
|
|
|
181
208
|
export declare const listHostedProviders: typeof listOpChatProviders;
|
|
182
209
|
export declare function sendHostedChatTurn(options: HostedChatRequestOptions): Promise<HostedChatCompletion>;
|
|
183
210
|
export declare function streamHostedChatTurn(options: HostedChatRequestOptions): AsyncGenerator<HostedChatStreamDelta, void, unknown>;
|
|
211
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as ze,b as de,c as Je}from"./chunks/chunk-22UARBPW.js";import{a as fe,b as $e,c as ge,d as ye,e as Ve,f as Re,g as Ae,h as Ye,i as Ce,j as Oe,k as Qe}from"./chunks/chunk-JEVA7YQL.js";import"./chunks/chunk-X37KMV27.js";import{A as zt,B as Jt,C as $t,D as Vt,E as Yt,F as Qt,G as Xt,H as Zt,I as en,J as tn,K as nn,L as on,b as Ot,c as St,d as Tt,e as Pt,f as wt,g as Et,h as xt,i as bt,j as Lt,k as Bt,l as Dt,m as It,n as vt,o as Ut,p as Mt,q as _t,r as Ht,s as Nt,t as qt,u as kt,v as Kt,w as Ft,x as Gt,y as jt,z as Wt}from"./chunks/chunk-OMICIPPY.js";import"./chunks/chunk-25RDE7DV.js";import{$ as Ct,A as z,B as J,C as $,D as V,E as Y,F as Q,G as X,H as Z,I as ee,J as te,K as ne,L as oe,M as se,N as re,O as ae,P as je,Q as le,U as We,V as pe,W as ie,X as ce,Y as ue,Z as me,_ as he,a as qe,b as ke,c as E,d as x,e as b,f as L,g as B,h as D,i as I,j as v,k as Ke,l as U,n as Fe,o as M,p as _,q as H,r as N,s as q,t as Ge,u as k,v as K,w as F,x as G,y as j,z as W}from"./chunks/chunk-TYHCBVQT.js";import"./chunks/chunk-VSUHJ46L.js";import{a as Rt,b as At}from"./chunks/chunk-FWIPHEVA.js";import"./chunks/chunk-BT5YNE5U.js";import{a as be,b as Le,c as Be,d as De,e as Ie,f as ve,g as Ue,h as Me,i as _e}from"./chunks/chunk-OJFDI7VM.js";import"./chunks/chunk-QCSLEMZF.js";import"./chunks/chunk-4RHM4WN2.js";import"./chunks/chunk-BLKTUFGB.js";import{a as P,b as w,c as He,d as Ne}from"./chunks/chunk-GLUWATL5.js";import"./chunks/chunk-OSVGNONV.js";import"./chunks/chunk-YBNKGA5C.js";import{a as yt}from"./chunks/chunk-ZZWAQBA2.js";import"./chunks/chunk-LAOLJDVB.js";import"./chunks/chunk-UWHIU24L.js";import"./chunks/chunk-LV3CQ72P.js";import"./chunks/chunk-YR5ID2SS.js";import"./chunks/chunk-M6JRS5PA.js";import"./chunks/chunk-KCV5VN4X.js";import"./chunks/chunk-RV7PUSI2.js";import"./chunks/chunk-3A7HZJNE.js";import{a as sn,b as rn,c as an,d as ln,e as pn,f as cn,g as un,h as mn,i as hn,j as dn,k as fn,l as gn,m as yn,n as Rn,o as An,p as Cn,q as On,r as Sn,s as Tn,t as Pn,u as wn}from"./chunks/chunk-ERJV5BMC.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-KK626T3Z.js";import"./chunks/chunk-6DCXAXVD.js";import"./chunks/chunk-OE22TAXP.js";import"./chunks/chunk-UGOK7VTC.js";import"./chunks/chunk-4M3YW3EQ.js";import"./chunks/chunk-PBZCXPPC.js";import"./chunks/chunk-NJLULBTM.js";import"./chunks/chunk-VVNV4NNW.js";import"./chunks/chunk-PF56N7ZY.js";import{a as s}from"./chunks/chunk-FTQLQJQV.js";function Xe(t,e=14){if(t.length<e+1)return null;let r=0,o=0;for(let l=1;l<=e;l+=1){let m=t[l]-t[l-1];m>=0?r+=m:o-=m}let a=r/e,i=o/e;for(let l=e+1;l<t.length;l+=1){let m=t[l]-t[l-1],d=m>0?m:0,n=m<0?-m:0;a=(a*(e-1)+d)/e,i=(i*(e-1)+n)/e}return i===0?100:100-100/(1+a/i)}s(Xe,"computeRsi");function T(t,e){if(t.length<e)return[];let r=[],o=0;for(let a=0;a<t.length;a+=1)o+=t[a],a>=e&&(o-=t[a-e]),a>=e-1&&r.push(o/e);return r}s(T,"computeSmaSeries");function Ze(t,e){let r=T(t,e);return r.length>0?r[r.length-1]:null}s(Ze,"computeSma");function A(t,e){if(t.length<e)return[];let r=2/(e+1),a=t.slice(0,e).reduce((p,l)=>p+l,0)/e,i=[a];for(let p=e;p<t.length;p+=1)a=t[p]*r+a*(1-r),i.push(a);return i}s(A,"computeEmaSeries");function et(t,e){let r=A(t,e);return r.length>0?r[r.length-1]:null}s(et,"computeEma");function tt(t){let e=A(t,12),r=A(t,26);if(e.length===0||r.length===0)return null;let o=e.length-r.length,a=r.map((m,d)=>e[d+o]-m),i=A(a,9);if(i.length===0)return null;let p=a[a.length-1],l=i[i.length-1];return{macd:p,signalLine:l,histogram:p-l}}s(tt,"computeMacd");function nt(t,e,r,o){if(t.length<o)return null;let a=e==="ema"?A(t,r):T(t,r),i=e==="ema"?A(t,o):T(t,o);if(a.length===0||i.length===0)return null;let p=a.length-i.length;if(p<0)return null;let l=i.length-1,m=a[l+p],d=i[l],n=l-1,c=n>=0?a[n+p]:null,u=n>=0?i[n]:null,h="neutral";return c!=null&&u!=null?c<=u&&m>d?h="bullish-cross":c>=u&&m<d?h="bearish-cross":m>d?h="bullish":m<d&&(h="bearish"):m>d?h="bullish":m<d&&(h="bearish"),{fast:m,slow:d,signal:h}}s(nt,"computeMaCross");function ot(t,e=20,r=2){if(t.length<e)return null;let o=t.slice(-e),a=o.reduce((l,m)=>l+m,0)/e,i=o.reduce((l,m)=>l+Math.pow(m-a,2),0)/e,p=Math.sqrt(i);return{middle:a,upper:a+r*p,lower:a-r*p}}s(ot,"computeBollinger");function st(t,e=24){if(t.length<2)return null;let r=t[t.length-1],o=Math.max(0,t.length-1-e),a=t[o];if(a===0)return null;let i=(r-a)/a*100;return{previous:a,percent:i}}s(st,"computePriceChange");function rt(t,e=14){if(t.length<e+1)return null;let r=[];for(let i=1;i<t.length;i+=1){let p=t[i],l=t[i-1],m=p.high-p.low,d=Math.abs(p.high-l.close),n=Math.abs(p.low-l.close);r.push(Math.max(m,d,n))}return r.length<e?null:r.slice(-e).reduce((i,p)=>i+p,0)/e}s(rt,"computeAtr");function Te(t){return t.replace(/\/$/,"")}s(Te,"resolveUrl");function at(t){let e=process.env.OPENPOND_BASE_URL,r=t.baseUrl||e||P;return Te(r.trim())}s(at,"resolveBaseUrl");function lt(t){let e=process.env.OPENPOND_API_URL,r=t.apiUrl||e||w;return Te(r.trim())}s(lt,"resolveApiUrl");function pt(t,e){return fe({apiBaseUrl:e,opChatApiBaseUrl:t.opChatApiUrl,chatApiBaseUrl:t.chatApiUrl})}s(pt,"resolveChatApiUrl");function it(t,e){let r=process.env.OPENPOND_TOOL_URL,o=t.toolUrl||r||e;return Te(o.trim())}s(it,"resolveToolUrl");function ct(t){let e=t.apiKey?.trim();if(e)return e;let r=process.env.OPENPOND_API_KEY?.trim();if(r)return r;throw new Error("OPENPOND_API_KEY is required")}s(ct,"resolveApiKey");function ut(t){let e=t.split("/").filter(Boolean);if(e.length!==2)throw new Error("expected <handle>/<repo>");return{handle:e[0],repo:e[1]}}s(ut,"parseHandleRepo");function Pe(t){return(t||"").trim().toLowerCase()}s(Pe,"normalizeRepoName");function mt(t){if(!t||typeof t!="object")return{name:"unknown",raw:t};let e=t,r=e.profile||e.function,o=typeof e.name=="string"?e.name:typeof r?.name=="string"?r.name:"unknown",a=typeof e.description=="string"?e.description:typeof r?.description=="string"?r.description:void 0;return{name:o,description:a,raw:t}}s(mt,"normalizeToolSummary");function ht(t){if(!t)return[];if(Array.isArray(t.toolsJson))return t.toolsJson;if(t.metadataJson&&typeof t.metadataJson=="object"){let e=t.metadataJson.tools;if(Array.isArray(e))return e}return[]}s(ht,"extractDeploymentTools");async function O(t){let{handle:e,repo:r}=ut(t.target),o=await Se({apiBase:t.apiBase,apiKey:t.apiKey,useCache:t.useCache,cacheTtlMs:t.cacheTtlMs,forceRefresh:t.forceRefresh}),a=Pe(r),i=o.find(p=>p.handle&&p.handle!==e?!1:[p.repo,p.gitRepo,p.id].map(Pe).includes(a));if(!i)throw new Error(`app not found for ${e}/${r}`);return{app:i,handle:e,repo:r}}s(O,"resolveAppTarget");async function Se(t){if(t.useCache&&!t.forceRefresh){let r=await ce({apiBase:t.apiBase,apiKey:t.apiKey,ttlMs:t.cacheTtlMs});if(r)return r}let e=await v(t.apiBase,t.apiKey);return t.useCache&&await ue({apiBase:t.apiBase,apiKey:t.apiKey,apps:e}),e}s(Se,"fetchAppsWithCache");async function we(t){if(t.useCache&&!t.forceRefresh){let o=await me({apiBase:t.apiBase,apiKey:t.apiKey,ttlMs:t.cacheTtlMs});if(o)return o}let e=await k(t.apiBase,t.apiKey),r=Array.isArray(e.tools)?e.tools:[];return t.useCache&&await he({apiBase:t.apiBase,apiKey:t.apiKey,tools:r}),r}s(we,"fetchToolsWithCache");function dt(t){if(!t)return"POST";let e=t.toUpperCase();switch(e){case"GET":case"POST":case"PUT":case"DELETE":return e;default:throw new Error("method must be GET, POST, PUT, or DELETE")}}s(dt,"normalizeMethod");async function ft(t,e){let r,o,a;return await de(t,{...e,onConversationId:s(i=>{r=i,e?.onConversationId?.(i)},"onConversationId"),onItems:s(i=>{for(let p of i){let l=p;!o&&typeof l.appId=="string"&&(o=l.appId,e?.onAppId?.(l.appId)),!a&&typeof l.deploymentId=="string"&&(a=l.deploymentId,e?.onDeploymentId?.(l.deploymentId))}e?.onItems?.(i)},"onItems")}),{conversationId:r,appId:o,deploymentId:a}}s(ft,"consumeAgentCreateStream");function vn(t){let e=ct(t),r=at(t),o=lt(t),a=pt(t,o),i=it(t,r),p=t.cacheTtlMs??ie,l=t.useCache!==!1,m=s(async()=>{l&&await Promise.all([Se({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:!0}),we({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:!0})])},"refreshCache"),d=s(async(n,c)=>(await D(o,e,n,{branch:c}))?.id??null,"resolveLatestDeploymentId");return{baseUrl:r,apiUrl:o,chatApiUrl:a,toolUrl:i,apiKey:e,account:{get:s(async()=>se(o,e),"get"),health:s(async()=>re(o,e),"health")},chat:{providers:s(async()=>Re({apiBaseUrl:a,token:e}),"providers"),provider:s(async n=>Ae({apiBaseUrl:a,token:e,provider:n}),"provider"),models:s(async()=>ge({apiBaseUrl:a,token:e}),"models"),model:s(async n=>ye({apiBaseUrl:a,token:e,model:n}),"model"),send:s(async n=>Ce({...n,apiBaseUrl:a,token:e}),"send"),stream:s(n=>Oe({...n,apiBaseUrl:a,token:e}),"stream")},tool:{list:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh}),h=c?.deploymentId||await d(u.id,c?.branch);if(!h)return{app:u,deploymentId:null,tools:[]};let g=await I(o,e,h),y=ht(g).map(mt);return{app:u,deploymentId:h,tools:y}},"list"),run:s(async(n,c,u)=>{let{app:h}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:u?.forceRefresh}),g=u?.deploymentId||await d(h.id,u?.branch);if(!g)throw new Error("no deployments found");let f=dt(u?.method);return pe(i,e,{appId:h.id,deploymentId:g,toolName:c,method:f,body:u?.body,headers:u?.headers})},"run")},deploy:{watch:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh}),h=c?.deploymentId||await d(u.id,c?.branch);if(!h)throw new Error("no deployments found");let g=c?.intervalMs??5e3,f=c?.timeoutMs??240*1e3,y=[],S=new Set,Ee=Date.now(),R=null;for(;Date.now()-Ee<f;){let xe=await L(o,e,h);for(let C of xe)S.has(C.id)||(S.add(C.id),y.push(C),c?.onLog?.(C));if(R=(await B(o,e,h)).status??null,c?.onStatus?.(R),R==="failed")return{deploymentId:h,status:R,logs:y};if(R==="running"||R==="deployed")return{deploymentId:h,status:R,logs:y};await new Promise(C=>setTimeout(C,g))}return{deploymentId:h,status:"timeout",logs:y}},"watch")},template:{status:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh});return M(o,e,u.id)},"status"),branches:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh});return _(o,e,u.id)},"branches"),update:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh}),h=c?.environment==="preview"?"preview":"production";return H(o,e,u.id,{environment:h})},"update")},opentool:{recipesList:s(async(n={})=>F(o,e,n),"recipesList"),recipesSearch:s(async n=>G(o,e,n),"recipesSearch"),recipeGet:s(async n=>j(o,e,n),"recipeGet"),rulesGet:s(async n=>W(o,e,n),"rulesGet")},apps:{list:s(async n=>{let c=await Se({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:n?.forceRefresh});return n?.handle?c.filter(u=>u.handle===n.handle):c},"list"),tools:s(async n=>we({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:n?.forceRefresh}),"tools"),performance:s(async n=>ne(o,e,{appId:n?.appId}),"performance"),summary:s(async n=>oe(o,e,n.appId),"summary"),schedules:s(async n=>K(o,e,n.appId),"schedules"),schedulesStart:s(async n=>{let{appId:c,...u}=n;return z(o,e,c,u)},"schedulesStart"),schedulesStop:s(async n=>J(o,e,n.appId),"schedulesStop"),schedulesStopCurrent:s(async()=>$(o,e),"schedulesStopCurrent"),scheduleRunNow:s(async n=>V(o,e,n),"scheduleRunNow"),scheduleDelete:s(async n=>Y(o,e,n.appId,n.scheduleId),"scheduleDelete"),scheduleExecutionLogs:s(async n=>Q(o,e,n.scheduleId,{limit:n.limit}),"scheduleExecutionLogs"),scheduleExecutionLog:s(async n=>Z(o,e,n.runId),"scheduleExecutionLog"),deploymentScheduleExecutionLogs:s(async n=>X(o,e,n.deploymentId,{limit:n.limit}),"deploymentScheduleExecutionLogs"),executionTimeline:s(async n=>ee(o,e,n.appId,{limit:n.limit}),"executionTimeline"),assistantRun:s(async n=>ae(o,e,n),"assistantRun"),agentCreate:s(async(n,c)=>{let{refreshCache:u,...h}=n,g={...h,streamDeployLogs:h.streamDeployLogs??!0},f=await te(o,e,g);if(!f.ok){let S=await f.text().catch(()=>"");throw new Error(`agent create failed: ${f.status} ${S}`)}let y=await ft(f,c);if(l&&u!==!1)try{await m()}catch{}return y},"agentCreate"),toolsExecute:s(async n=>le(o,e,n),"toolsExecute"),deploy:s(async n=>E(o,e,n.appId,{environment:n.environment,commitSha:n.commitSha,branch:n.branch}),"deploy"),startApp:s(async n=>{let{appId:c,...u}=n;return b(o,e,c,u)},"startApp"),promotePreview:s(async n=>{let{appId:c,...u}=n;return x(o,e,c,u)},"promotePreview"),envGet:s(async n=>q(o,e,n.appId),"envGet"),envSet:s(async n=>N(o,e,n.appId,{envVars:n.envVars}),"envSet")},repo:{create:s(async n=>{let{refreshCache:c,...u}=n,h=await U(o,e,u);if(l&&c!==!1)try{await m()}catch{}return h},"create")},cache:{refresh:m}}}s(vn,"createClient");export{ie as DEFAULT_CACHE_TTL_MS,It as DEFAULT_LOCAL_PROFILE,w as DEFAULT_OPENPOND_API_BASE_URL,Ne as DEFAULT_OPENPOND_CHAT_API_BASE_URL,He as DEFAULT_OPENPOND_OPCHAT_API_BASE_URL,P as DEFAULT_OPENPOND_WEB_BASE_URL,vt as DEFAULT_PROFILE_AGENT,an as OPENPOND_MANIFEST_FILE_NAME,Ot as OpenPondProfileSetupRequiredError,Rt as OpenPondSandboxClient,Dt as PROFILE_MANIFEST,Bt as PROFILE_REPO_MANIFEST,Ct as SANDBOX_RUNTIME_PROFILE_IDS,ln as SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,pn as SANDBOX_TEMPLATE_BUILD_PLAN_KIND,rn as SANDBOX_TEMPLATE_PREVIEW_PORT_MAX,sn as SANDBOX_TEMPLATE_PREVIEW_PORT_MIN,cn as SandboxTemplateManifestSchema,un as SandboxTemplateValidationDiagnosticSchema,qe as apiFetch,Tt as assertOpenPondProfileActionReady,St as buildOpenPondProfileSetupGate,re as checkOpenPondApiHealth,wt as collectProfileSourceUploadEntries,tn as commitActiveProfileChanges,ke as commitFiles,rt as computeAtr,ot as computeBollinger,et as computeEma,A as computeEmaSeries,nt as computeMaCross,tt as computeMacd,st as computePriceChange,Xe as computeRsi,Ze as computeSma,T as computeSmaSeries,ft as consumeAgentCreateStream,de as consumeStream,te as createAgentFromPrompt,vn as createClient,Fe as createHeadlessApps,Ke as createLocalProject,At as createOpenPondSandboxClient,U as createRepo,_t as defaultLocalProfileRepoPath,gn as defineSandboxTemplate,Y as deleteOrArchiveSchedule,E as deployApp,H as deployLatestTemplate,Ht as emptyProfileState,pe as executeHostedTool,le as executeUserTool,Ge as fetchToolManifest,Pt as formatOpenPondProfileSetupRequirement,fn as formatSandboxTemplateDiagnostics,Je as formatStreamItem,q as getAppEnvironment,ee as getAppExecutionTimeline,oe as getAppRuntimeSummary,ce as getCachedApps,me as getCachedTools,be as getConfigPath,I as getDeploymentDetail,L as getDeploymentLogs,B as getDeploymentStatus,D as getLatestDeploymentForApp,ye as getOpChatModel,Ae as getOpChatProvider,se as getOpenPondAccount,j as getOpenToolRecipe,W as getOpenToolRules,Z as getScheduleExecutionLog,M as getTemplateStatus,ne as getUserPerformance,xt as hostedPublishStatusFromPayload,Lt as hostedRunStatusFromRunSummary,bt as hostedRunSummaryFromPayload,Et as hostedSourceCheckStatusFromPayload,Nt as initLocalProfileRepo,Vt as inspectOpenPondProfileSource,Ft as installAgentPackageIntoActiveProfile,K as listAppSchedules,v as listApps,Ie as listConfiguredProfiles,X as listDeploymentScheduleExecutionLogs,Ve as listHostedModels,Ye as listHostedProviders,ge as listOpChatModels,Re as listOpChatProviders,F as listOpenToolRecipes,Q as listScheduleExecutionLogs,_ as listTemplateBranches,k as listUserTools,De as loadConfig,Be as loadGlobalConfig,qt as loadLocalProfileRepo,Wt as loadOpenPondProfileLibrary,Gt as loadOpenPondProfileState,zt as loadOpenPondProfileStateForRef,Yt as loadOpenPondProfileStateFromSource,Mt as mergeActiveLocalProfileConfig,Ut as mergeProfileRepoManifestEntry,ze as normalizeDataFrames,yt as normalizeSandboxApiUrl,jt as openPondProfileRef,dn as parseSandboxTemplateYaml,je as postAgentDigest,on as prepareAgentSdkRuntimePackage,x as promotePreviewToProduction,kt as registerLocalProfileRepo,$t as removeOpenPondProfile,Kt as renameActiveProfileAgent,Qt as requireActiveLocalProfile,$e as resolveHostedChatApiBaseUrl,fe as resolveOpChatApiBaseUrl,We as resolveWorkerBaseUrl,Zt as runAgentSdkProjectCommand,ae as runAssistantMode,Qe as runOpChatSmoke,en as runProfileCheck,Xt as runProfileSdkCommand,V as runScheduleNow,Sn as sandboxTemplateBuildMetadata,Tn as sandboxTemplateBuildPlan,Rn as sandboxTemplateDurableVolume,On as sandboxTemplateExecutableEntries,Cn as sandboxTemplateFileInput,wn as sandboxTemplateJsonSchema,An as sandboxTemplatePreviewPort,yn as sandboxTemplateResources,Pn as sandboxTemplateScaffoldFiles,Me as saveConfig,_e as saveGlobalConfig,Ue as saveProfileApiKey,nn as saveProfilePushStatus,G as searchOpenToolRecipes,Jt as selectOpenPondProfile,Ce as sendHostedChatTurn,ve as setActiveProfile,ue as setCachedApps,he as setCachedTools,b as startAppLifecycle,z as startAppSchedules,J as stopAppSchedules,$ as stopCurrentAppSchedules,Oe as streamHostedChatTurn,N as updateAppEnvironment,Le as updateGlobalConfig,hn as validateSandboxTemplateManifest,mn as validateSandboxTemplateYaml};
|
|
2
|
+
import{a as Qe}from"./chunks/chunk-Q34IF4PW.js";import{a as fe,b as $e,c as ge,d as ye,e as Ve,f as Re,g as Ae,h as Ye,i as Ce,j as Oe}from"./chunks/chunk-6XSSM4WT.js";import{a as ze,b as de,c as Je}from"./chunks/chunk-22UARBPW.js";import"./chunks/chunk-X37KMV27.js";import{A as zt,B as Jt,C as $t,D as Vt,E as Yt,F as Qt,G as Xt,H as Zt,I as en,J as tn,K as nn,L as on,b as Ot,c as St,d as Tt,e as Pt,f as wt,g as Et,h as xt,i as bt,j as Lt,k as Bt,l as Dt,m as It,n as vt,o as Ut,p as Mt,q as _t,r as Ht,s as Nt,t as qt,u as kt,v as Kt,w as Ft,x as Gt,y as jt,z as Wt}from"./chunks/chunk-T6JN4PND.js";import"./chunks/chunk-JEISPWWM.js";import{$ as Ct,A as z,B as J,C as $,D as V,E as Y,F as Q,G as X,H as Z,I as ee,J as te,K as ne,L as oe,M as se,N as re,O as ae,P as je,Q as le,U as We,V as pe,W as ie,X as ce,Y as ue,Z as me,_ as he,a as qe,b as ke,c as E,d as x,e as b,f as L,g as B,h as D,i as I,j as v,k as Ke,l as U,n as Fe,o as M,p as _,q as H,r as N,s as q,t as Ge,u as k,v as K,w as F,x as G,y as j,z as W}from"./chunks/chunk-MILEWROZ.js";import"./chunks/chunk-NOSBNHGC.js";import{a as Rt,b as At}from"./chunks/chunk-JX6OX6XE.js";import"./chunks/chunk-BT5YNE5U.js";import{a as be,b as Le,c as Be,d as De,e as Ie,f as ve,g as Ue,h as Me,i as _e}from"./chunks/chunk-UTNGEMW5.js";import"./chunks/chunk-QCSLEMZF.js";import"./chunks/chunk-B42QQUZY.js";import"./chunks/chunk-7KTARW23.js";import{a as P,b as w,c as He,d as Ne}from"./chunks/chunk-GLUWATL5.js";import"./chunks/chunk-OSVGNONV.js";import{a as yt}from"./chunks/chunk-XWDFXM3S.js";import"./chunks/chunk-YBNKGA5C.js";import"./chunks/chunk-LAOLJDVB.js";import"./chunks/chunk-UWHIU24L.js";import"./chunks/chunk-LV3CQ72P.js";import"./chunks/chunk-JCLTFDVW.js";import"./chunks/chunk-ABF3W2MO.js";import"./chunks/chunk-RV7PUSI2.js";import"./chunks/chunk-KCV5VN4X.js";import"./chunks/chunk-3A7HZJNE.js";import{a as sn,b as rn,c as an,d as ln,e as pn,f as cn,g as un,h as mn,i as hn,j as dn,k as fn,l as gn,m as yn,n as Rn,o as An,p as Cn,q as On,r as Sn,s as Tn,t as Pn,u as wn}from"./chunks/chunk-ERJV5BMC.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-2EPR4HLF.js";import"./chunks/chunk-BKEDG3A4.js";import"./chunks/chunk-OE22TAXP.js";import"./chunks/chunk-UGOK7VTC.js";import"./chunks/chunk-4M3YW3EQ.js";import"./chunks/chunk-PBZCXPPC.js";import"./chunks/chunk-NJLULBTM.js";import"./chunks/chunk-VVNV4NNW.js";import"./chunks/chunk-PF56N7ZY.js";import{a as s}from"./chunks/chunk-FTQLQJQV.js";function Xe(t,e=14){if(t.length<e+1)return null;let r=0,o=0;for(let l=1;l<=e;l+=1){let m=t[l]-t[l-1];m>=0?r+=m:o-=m}let a=r/e,i=o/e;for(let l=e+1;l<t.length;l+=1){let m=t[l]-t[l-1],d=m>0?m:0,n=m<0?-m:0;a=(a*(e-1)+d)/e,i=(i*(e-1)+n)/e}return i===0?100:100-100/(1+a/i)}s(Xe,"computeRsi");function T(t,e){if(t.length<e)return[];let r=[],o=0;for(let a=0;a<t.length;a+=1)o+=t[a],a>=e&&(o-=t[a-e]),a>=e-1&&r.push(o/e);return r}s(T,"computeSmaSeries");function Ze(t,e){let r=T(t,e);return r.length>0?r[r.length-1]:null}s(Ze,"computeSma");function A(t,e){if(t.length<e)return[];let r=2/(e+1),a=t.slice(0,e).reduce((p,l)=>p+l,0)/e,i=[a];for(let p=e;p<t.length;p+=1)a=t[p]*r+a*(1-r),i.push(a);return i}s(A,"computeEmaSeries");function et(t,e){let r=A(t,e);return r.length>0?r[r.length-1]:null}s(et,"computeEma");function tt(t){let e=A(t,12),r=A(t,26);if(e.length===0||r.length===0)return null;let o=e.length-r.length,a=r.map((m,d)=>e[d+o]-m),i=A(a,9);if(i.length===0)return null;let p=a[a.length-1],l=i[i.length-1];return{macd:p,signalLine:l,histogram:p-l}}s(tt,"computeMacd");function nt(t,e,r,o){if(t.length<o)return null;let a=e==="ema"?A(t,r):T(t,r),i=e==="ema"?A(t,o):T(t,o);if(a.length===0||i.length===0)return null;let p=a.length-i.length;if(p<0)return null;let l=i.length-1,m=a[l+p],d=i[l],n=l-1,c=n>=0?a[n+p]:null,u=n>=0?i[n]:null,h="neutral";return c!=null&&u!=null?c<=u&&m>d?h="bullish-cross":c>=u&&m<d?h="bearish-cross":m>d?h="bullish":m<d&&(h="bearish"):m>d?h="bullish":m<d&&(h="bearish"),{fast:m,slow:d,signal:h}}s(nt,"computeMaCross");function ot(t,e=20,r=2){if(t.length<e)return null;let o=t.slice(-e),a=o.reduce((l,m)=>l+m,0)/e,i=o.reduce((l,m)=>l+Math.pow(m-a,2),0)/e,p=Math.sqrt(i);return{middle:a,upper:a+r*p,lower:a-r*p}}s(ot,"computeBollinger");function st(t,e=24){if(t.length<2)return null;let r=t[t.length-1],o=Math.max(0,t.length-1-e),a=t[o];if(a===0)return null;let i=(r-a)/a*100;return{previous:a,percent:i}}s(st,"computePriceChange");function rt(t,e=14){if(t.length<e+1)return null;let r=[];for(let i=1;i<t.length;i+=1){let p=t[i],l=t[i-1],m=p.high-p.low,d=Math.abs(p.high-l.close),n=Math.abs(p.low-l.close);r.push(Math.max(m,d,n))}return r.length<e?null:r.slice(-e).reduce((i,p)=>i+p,0)/e}s(rt,"computeAtr");function Te(t){return t.replace(/\/$/,"")}s(Te,"resolveUrl");function at(t){let e=process.env.OPENPOND_BASE_URL,r=t.baseUrl||e||P;return Te(r.trim())}s(at,"resolveBaseUrl");function lt(t){let e=process.env.OPENPOND_API_URL,r=t.apiUrl||e||w;return Te(r.trim())}s(lt,"resolveApiUrl");function pt(t,e){return fe({apiBaseUrl:e,opChatApiBaseUrl:t.opChatApiUrl,chatApiBaseUrl:t.chatApiUrl})}s(pt,"resolveChatApiUrl");function it(t,e){let r=process.env.OPENPOND_TOOL_URL,o=t.toolUrl||r||e;return Te(o.trim())}s(it,"resolveToolUrl");function ct(t){let e=t.apiKey?.trim();if(e)return e;let r=process.env.OPENPOND_API_KEY?.trim();if(r)return r;throw new Error("OPENPOND_API_KEY is required")}s(ct,"resolveApiKey");function ut(t){let e=t.split("/").filter(Boolean);if(e.length!==2)throw new Error("expected <handle>/<repo>");return{handle:e[0],repo:e[1]}}s(ut,"parseHandleRepo");function Pe(t){return(t||"").trim().toLowerCase()}s(Pe,"normalizeRepoName");function mt(t){if(!t||typeof t!="object")return{name:"unknown",raw:t};let e=t,r=e.profile||e.function,o=typeof e.name=="string"?e.name:typeof r?.name=="string"?r.name:"unknown",a=typeof e.description=="string"?e.description:typeof r?.description=="string"?r.description:void 0;return{name:o,description:a,raw:t}}s(mt,"normalizeToolSummary");function ht(t){if(!t)return[];if(Array.isArray(t.toolsJson))return t.toolsJson;if(t.metadataJson&&typeof t.metadataJson=="object"){let e=t.metadataJson.tools;if(Array.isArray(e))return e}return[]}s(ht,"extractDeploymentTools");async function O(t){let{handle:e,repo:r}=ut(t.target),o=await Se({apiBase:t.apiBase,apiKey:t.apiKey,useCache:t.useCache,cacheTtlMs:t.cacheTtlMs,forceRefresh:t.forceRefresh}),a=Pe(r),i=o.find(p=>p.handle&&p.handle!==e?!1:[p.repo,p.gitRepo,p.id].map(Pe).includes(a));if(!i)throw new Error(`app not found for ${e}/${r}`);return{app:i,handle:e,repo:r}}s(O,"resolveAppTarget");async function Se(t){if(t.useCache&&!t.forceRefresh){let r=await ce({apiBase:t.apiBase,apiKey:t.apiKey,ttlMs:t.cacheTtlMs});if(r)return r}let e=await v(t.apiBase,t.apiKey);return t.useCache&&await ue({apiBase:t.apiBase,apiKey:t.apiKey,apps:e}),e}s(Se,"fetchAppsWithCache");async function we(t){if(t.useCache&&!t.forceRefresh){let o=await me({apiBase:t.apiBase,apiKey:t.apiKey,ttlMs:t.cacheTtlMs});if(o)return o}let e=await k(t.apiBase,t.apiKey),r=Array.isArray(e.tools)?e.tools:[];return t.useCache&&await he({apiBase:t.apiBase,apiKey:t.apiKey,tools:r}),r}s(we,"fetchToolsWithCache");function dt(t){if(!t)return"POST";let e=t.toUpperCase();switch(e){case"GET":case"POST":case"PUT":case"DELETE":return e;default:throw new Error("method must be GET, POST, PUT, or DELETE")}}s(dt,"normalizeMethod");async function ft(t,e){let r,o,a;return await de(t,{...e,onConversationId:s(i=>{r=i,e?.onConversationId?.(i)},"onConversationId"),onItems:s(i=>{for(let p of i){let l=p;!o&&typeof l.appId=="string"&&(o=l.appId,e?.onAppId?.(l.appId)),!a&&typeof l.deploymentId=="string"&&(a=l.deploymentId,e?.onDeploymentId?.(l.deploymentId))}e?.onItems?.(i)},"onItems")}),{conversationId:r,appId:o,deploymentId:a}}s(ft,"consumeAgentCreateStream");function vn(t){let e=ct(t),r=at(t),o=lt(t),a=pt(t,o),i=it(t,r),p=t.cacheTtlMs??ie,l=t.useCache!==!1,m=s(async()=>{l&&await Promise.all([Se({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:!0}),we({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:!0})])},"refreshCache"),d=s(async(n,c)=>(await D(o,e,n,{branch:c}))?.id??null,"resolveLatestDeploymentId");return{baseUrl:r,apiUrl:o,chatApiUrl:a,toolUrl:i,apiKey:e,account:{get:s(async()=>se(o,e),"get"),health:s(async()=>re(o,e),"health")},chat:{providers:s(async()=>Re({apiBaseUrl:a,token:e}),"providers"),provider:s(async n=>Ae({apiBaseUrl:a,token:e,provider:n}),"provider"),models:s(async()=>ge({apiBaseUrl:a,token:e}),"models"),model:s(async n=>ye({apiBaseUrl:a,token:e,model:n}),"model"),send:s(async n=>Ce({...n,apiBaseUrl:a,token:e}),"send"),stream:s(n=>Oe({...n,apiBaseUrl:a,token:e}),"stream")},tool:{list:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh}),h=c?.deploymentId||await d(u.id,c?.branch);if(!h)return{app:u,deploymentId:null,tools:[]};let g=await I(o,e,h),y=ht(g).map(mt);return{app:u,deploymentId:h,tools:y}},"list"),run:s(async(n,c,u)=>{let{app:h}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:u?.forceRefresh}),g=u?.deploymentId||await d(h.id,u?.branch);if(!g)throw new Error("no deployments found");let f=dt(u?.method);return pe(i,e,{appId:h.id,deploymentId:g,toolName:c,method:f,body:u?.body,headers:u?.headers})},"run")},deploy:{watch:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh}),h=c?.deploymentId||await d(u.id,c?.branch);if(!h)throw new Error("no deployments found");let g=c?.intervalMs??5e3,f=c?.timeoutMs??240*1e3,y=[],S=new Set,Ee=Date.now(),R=null;for(;Date.now()-Ee<f;){let xe=await L(o,e,h);for(let C of xe)S.has(C.id)||(S.add(C.id),y.push(C),c?.onLog?.(C));if(R=(await B(o,e,h)).status??null,c?.onStatus?.(R),R==="failed")return{deploymentId:h,status:R,logs:y};if(R==="running"||R==="deployed")return{deploymentId:h,status:R,logs:y};await new Promise(C=>setTimeout(C,g))}return{deploymentId:h,status:"timeout",logs:y}},"watch")},template:{status:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh});return M(o,e,u.id)},"status"),branches:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh});return _(o,e,u.id)},"branches"),update:s(async(n,c)=>{let{app:u}=await O({apiBase:o,apiKey:e,target:n,useCache:l,cacheTtlMs:p,forceRefresh:c?.forceRefresh}),h=c?.environment==="preview"?"preview":"production";return H(o,e,u.id,{environment:h})},"update")},opentool:{recipesList:s(async(n={})=>F(o,e,n),"recipesList"),recipesSearch:s(async n=>G(o,e,n),"recipesSearch"),recipeGet:s(async n=>j(o,e,n),"recipeGet"),rulesGet:s(async n=>W(o,e,n),"rulesGet")},apps:{list:s(async n=>{let c=await Se({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:n?.forceRefresh});return n?.handle?c.filter(u=>u.handle===n.handle):c},"list"),tools:s(async n=>we({apiBase:o,apiKey:e,useCache:l,cacheTtlMs:p,forceRefresh:n?.forceRefresh}),"tools"),performance:s(async n=>ne(o,e,{appId:n?.appId}),"performance"),summary:s(async n=>oe(o,e,n.appId),"summary"),schedules:s(async n=>K(o,e,n.appId),"schedules"),schedulesStart:s(async n=>{let{appId:c,...u}=n;return z(o,e,c,u)},"schedulesStart"),schedulesStop:s(async n=>J(o,e,n.appId),"schedulesStop"),schedulesStopCurrent:s(async()=>$(o,e),"schedulesStopCurrent"),scheduleRunNow:s(async n=>V(o,e,n),"scheduleRunNow"),scheduleDelete:s(async n=>Y(o,e,n.appId,n.scheduleId),"scheduleDelete"),scheduleExecutionLogs:s(async n=>Q(o,e,n.scheduleId,{limit:n.limit}),"scheduleExecutionLogs"),scheduleExecutionLog:s(async n=>Z(o,e,n.runId),"scheduleExecutionLog"),deploymentScheduleExecutionLogs:s(async n=>X(o,e,n.deploymentId,{limit:n.limit}),"deploymentScheduleExecutionLogs"),executionTimeline:s(async n=>ee(o,e,n.appId,{limit:n.limit}),"executionTimeline"),assistantRun:s(async n=>ae(o,e,n),"assistantRun"),agentCreate:s(async(n,c)=>{let{refreshCache:u,...h}=n,g={...h,streamDeployLogs:h.streamDeployLogs??!0},f=await te(o,e,g);if(!f.ok){let S=await f.text().catch(()=>"");throw new Error(`agent create failed: ${f.status} ${S}`)}let y=await ft(f,c);if(l&&u!==!1)try{await m()}catch{}return y},"agentCreate"),toolsExecute:s(async n=>le(o,e,n),"toolsExecute"),deploy:s(async n=>E(o,e,n.appId,{environment:n.environment,commitSha:n.commitSha,branch:n.branch}),"deploy"),startApp:s(async n=>{let{appId:c,...u}=n;return b(o,e,c,u)},"startApp"),promotePreview:s(async n=>{let{appId:c,...u}=n;return x(o,e,c,u)},"promotePreview"),envGet:s(async n=>q(o,e,n.appId),"envGet"),envSet:s(async n=>N(o,e,n.appId,{envVars:n.envVars}),"envSet")},repo:{create:s(async n=>{let{refreshCache:c,...u}=n,h=await U(o,e,u);if(l&&c!==!1)try{await m()}catch{}return h},"create")},cache:{refresh:m}}}s(vn,"createClient");export{ie as DEFAULT_CACHE_TTL_MS,It as DEFAULT_LOCAL_PROFILE,w as DEFAULT_OPENPOND_API_BASE_URL,Ne as DEFAULT_OPENPOND_CHAT_API_BASE_URL,He as DEFAULT_OPENPOND_OPCHAT_API_BASE_URL,P as DEFAULT_OPENPOND_WEB_BASE_URL,vt as DEFAULT_PROFILE_AGENT,an as OPENPOND_MANIFEST_FILE_NAME,Ot as OpenPondProfileSetupRequiredError,Rt as OpenPondSandboxClient,Dt as PROFILE_MANIFEST,Bt as PROFILE_REPO_MANIFEST,Ct as SANDBOX_RUNTIME_PROFILE_IDS,ln as SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,pn as SANDBOX_TEMPLATE_BUILD_PLAN_KIND,rn as SANDBOX_TEMPLATE_PREVIEW_PORT_MAX,sn as SANDBOX_TEMPLATE_PREVIEW_PORT_MIN,cn as SandboxTemplateManifestSchema,un as SandboxTemplateValidationDiagnosticSchema,qe as apiFetch,Tt as assertOpenPondProfileActionReady,St as buildOpenPondProfileSetupGate,re as checkOpenPondApiHealth,wt as collectProfileSourceUploadEntries,tn as commitActiveProfileChanges,ke as commitFiles,rt as computeAtr,ot as computeBollinger,et as computeEma,A as computeEmaSeries,nt as computeMaCross,tt as computeMacd,st as computePriceChange,Xe as computeRsi,Ze as computeSma,T as computeSmaSeries,ft as consumeAgentCreateStream,de as consumeStream,te as createAgentFromPrompt,vn as createClient,Fe as createHeadlessApps,Ke as createLocalProject,At as createOpenPondSandboxClient,U as createRepo,_t as defaultLocalProfileRepoPath,gn as defineSandboxTemplate,Y as deleteOrArchiveSchedule,E as deployApp,H as deployLatestTemplate,Ht as emptyProfileState,pe as executeHostedTool,le as executeUserTool,Ge as fetchToolManifest,Pt as formatOpenPondProfileSetupRequirement,fn as formatSandboxTemplateDiagnostics,Je as formatStreamItem,q as getAppEnvironment,ee as getAppExecutionTimeline,oe as getAppRuntimeSummary,ce as getCachedApps,me as getCachedTools,be as getConfigPath,I as getDeploymentDetail,L as getDeploymentLogs,B as getDeploymentStatus,D as getLatestDeploymentForApp,ye as getOpChatModel,Ae as getOpChatProvider,se as getOpenPondAccount,j as getOpenToolRecipe,W as getOpenToolRules,Z as getScheduleExecutionLog,M as getTemplateStatus,ne as getUserPerformance,xt as hostedPublishStatusFromPayload,Lt as hostedRunStatusFromRunSummary,bt as hostedRunSummaryFromPayload,Et as hostedSourceCheckStatusFromPayload,Nt as initLocalProfileRepo,Vt as inspectOpenPondProfileSource,Ft as installAgentPackageIntoActiveProfile,K as listAppSchedules,v as listApps,Ie as listConfiguredProfiles,X as listDeploymentScheduleExecutionLogs,Ve as listHostedModels,Ye as listHostedProviders,ge as listOpChatModels,Re as listOpChatProviders,F as listOpenToolRecipes,Q as listScheduleExecutionLogs,_ as listTemplateBranches,k as listUserTools,De as loadConfig,Be as loadGlobalConfig,qt as loadLocalProfileRepo,Wt as loadOpenPondProfileLibrary,Gt as loadOpenPondProfileState,zt as loadOpenPondProfileStateForRef,Yt as loadOpenPondProfileStateFromSource,Mt as mergeActiveLocalProfileConfig,Ut as mergeProfileRepoManifestEntry,ze as normalizeDataFrames,yt as normalizeSandboxApiUrl,jt as openPondProfileRef,dn as parseSandboxTemplateYaml,je as postAgentDigest,on as prepareAgentSdkRuntimePackage,x as promotePreviewToProduction,kt as registerLocalProfileRepo,$t as removeOpenPondProfile,Kt as renameActiveProfileAgent,Qt as requireActiveLocalProfile,$e as resolveHostedChatApiBaseUrl,fe as resolveOpChatApiBaseUrl,We as resolveWorkerBaseUrl,Zt as runAgentSdkProjectCommand,ae as runAssistantMode,Qe as runOpChatSmoke,en as runProfileCheck,Xt as runProfileSdkCommand,V as runScheduleNow,Sn as sandboxTemplateBuildMetadata,Tn as sandboxTemplateBuildPlan,Rn as sandboxTemplateDurableVolume,On as sandboxTemplateExecutableEntries,Cn as sandboxTemplateFileInput,wn as sandboxTemplateJsonSchema,An as sandboxTemplatePreviewPort,yn as sandboxTemplateResources,Pn as sandboxTemplateScaffoldFiles,Me as saveConfig,_e as saveGlobalConfig,Ue as saveProfileApiKey,nn as saveProfilePushStatus,G as searchOpenToolRecipes,Jt as selectOpenPondProfile,Ce as sendHostedChatTurn,ve as setActiveProfile,ue as setCachedApps,he as setCachedTools,b as startAppLifecycle,z as startAppSchedules,J as stopAppSchedules,$ as stopCurrentAppSchedules,Oe as streamHostedChatTurn,N as updateAppEnvironment,Le as updateGlobalConfig,hn as validateSandboxTemplateManifest,mn as validateSandboxTemplateYaml};
|
|
@@ -9,9 +9,22 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
Use the official CLI for supported OpenPond operations, reusing its authentication and domain services. Check the installed command help before unfamiliar operations; use structured `--json` output and `--input-file` where supported.
|
|
11
11
|
|
|
12
|
-
For dataset, grader, experiment, training, or learning-from-logs requests, read [Experiments and training](references/experiments-and-training.md). This guidance owns the conversational flow and useful inline presentation; the app supplies resource attachment and the
|
|
12
|
+
For dataset, grader, experiment, training, or learning-from-logs requests, read [Experiments and training](references/experiments-and-training.md). This guidance owns the conversational flow and useful inline presentation; the app supplies resource attachment and the Training picker and resource sidebar.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## App-scoped execution
|
|
15
|
+
|
|
16
|
+
In OpenPond chat, use the supplied scoped command executor and bundled prefix
|
|
17
|
+
`"$OPENPOND_CLI_NODE" "$OPENPOND_CLI_ENTRY"`. The app supplies its home,
|
|
18
|
+
authentication and resource association. Do not install another CLI, ask for a
|
|
19
|
+
login, or use the provider shell before trying this path. The answering assistant,
|
|
20
|
+
the evaluated model and the training base/checkpoint are separate selections.
|
|
21
|
+
|
|
22
|
+
## Standalone setup
|
|
23
|
+
|
|
24
|
+
For a terminal outside the app, first check whether the running desktop already
|
|
25
|
+
has an account. Use its home with `--home` (development normally uses
|
|
26
|
+
`~/.openpond/openpond-app-dev`) before diagnosing missing authentication. The
|
|
27
|
+
following setup is for a new installation:
|
|
15
28
|
|
|
16
29
|
- Install: `npm i -g openpond` (or `npx --package openpond openpond <cmd>`)
|
|
17
30
|
- Auth: run `openpond login` or set `OPENPOND_API_KEY`
|