openpond 0.2.66 → 0.2.67
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 +23 -0
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-YYZ3ZO3Q.js → acp-NASAJV5E.js} +1 -1
- package/dist/chunks/{acp-agent-T26S7TU2.js → acp-agent-C3CRF6DT.js} +1 -1
- package/dist/chunks/{actions-command-VLKMHCMI.js → actions-command-BYPLSGZL.js} +1 -1
- package/dist/chunks/{app-layer-5XUMNHDO.js → app-layer-XIEZ6ALX.js} +1 -1
- package/dist/chunks/{app-server-evaluations-V6LRWDUF.js → app-server-evaluations-5YZUFXQ2.js} +1 -1
- package/dist/chunks/{app-server-harness-services-6ZRLA3YD.js → app-server-harness-services-N5F5QVZI.js} +1 -1
- package/dist/chunks/{app-server-runtime-TH56EG2Z.js → app-server-runtime-HJ2N57DL.js} +1 -1
- package/dist/chunks/{apps-MNT3KXIY.js → apps-WJTW64NW.js} +1 -1
- package/dist/chunks/{chunk-ZWW227M3.js → chunk-263WS3TB.js} +1 -1
- package/dist/chunks/{chunk-HX6GXMDK.js → chunk-26ID6A5C.js} +1 -1
- package/dist/chunks/{chunk-DSJZS77R.js → chunk-2RSGVLZT.js} +4 -4
- package/dist/chunks/{chunk-L4EJ5R3B.js → chunk-2UZHLO2V.js} +1 -1
- package/dist/chunks/{chunk-QYQZQVVN.js → chunk-375PADDM.js} +1 -1
- package/dist/chunks/{chunk-FUFI4THX.js → chunk-43QYVOYA.js} +1 -1
- package/dist/chunks/{chunk-H5ML7735.js → chunk-46RMTR2Z.js} +1 -1
- package/dist/chunks/{chunk-Z2TOBS3P.js → chunk-4B7EGNYX.js} +1 -1
- package/dist/chunks/{chunk-2GJD23CM.js → chunk-4EZI4KCT.js} +1 -1
- package/dist/chunks/{chunk-DMO3UIS7.js → chunk-4JJ4RYIB.js} +1 -1
- package/dist/chunks/{chunk-JKI53ED7.js → chunk-4NN5OLKW.js} +2 -2
- package/dist/chunks/{chunk-66HFW4OU.js → chunk-4VZJQRQI.js} +1 -1
- package/dist/chunks/{chunk-7PKTCMZ6.js → chunk-543QHE3D.js} +1 -1
- package/dist/chunks/{chunk-TVDZXDQW.js → chunk-5QOFUGYQ.js} +1 -1
- package/dist/chunks/{chunk-6S2MWJVD.js → chunk-5TPYBXWM.js} +1 -1
- package/dist/chunks/{chunk-WLZJOCLA.js → chunk-5ZNE43XC.js} +1 -1
- package/dist/chunks/{chunk-KOKBDIGR.js → chunk-6HQUIKC5.js} +1 -1
- package/dist/chunks/{chunk-3BJ7LPE3.js → chunk-6IS5OLI5.js} +1 -1
- package/dist/chunks/{chunk-VS3AMJEK.js → chunk-6LFTQBXP.js} +1 -1
- package/dist/chunks/{chunk-VD2TQCMH.js → chunk-7HAGSE7L.js} +1 -1
- package/dist/chunks/{chunk-NTM3KQ25.js → chunk-ADOCQA4D.js} +1 -1
- package/dist/chunks/{chunk-4D3CICBG.js → chunk-ATFV2NA4.js} +1 -1
- package/dist/chunks/{chunk-YU4JYWCA.js → chunk-AXO6OHJB.js} +1 -1
- package/dist/chunks/{chunk-5KJMFK65.js → chunk-AXYAEWWA.js} +1 -1
- package/dist/chunks/{chunk-Q4AXZY2P.js → chunk-B2K5WQZE.js} +1 -1
- package/dist/chunks/{chunk-ANG2YMMD.js → chunk-B7XJBP4U.js} +1 -1
- package/dist/chunks/{chunk-BQVB2SPF.js → chunk-BBIA24GD.js} +6 -6
- package/dist/chunks/{chunk-CYQLXS2U.js → chunk-BUZ7CBJC.js} +1 -1
- package/dist/chunks/{chunk-MVPKU72J.js → chunk-CJDGLPNX.js} +1 -1
- package/dist/chunks/{chunk-ZU3YBRXS.js → chunk-CSU7RDA5.js} +1 -1
- package/dist/chunks/{chunk-JLW5BQVO.js → chunk-CWAQOFLP.js} +1 -1
- package/dist/chunks/{chunk-WKHGXLJD.js → chunk-CX7HKSQ4.js} +2 -2
- package/dist/chunks/{chunk-M5QPL5NO.js → chunk-D5OFN47Z.js} +1 -1
- package/dist/chunks/{chunk-QCJY6FTC.js → chunk-FCXDPVGJ.js} +1 -1
- package/dist/chunks/{chunk-FEQ7HNJR.js → chunk-FE2ENE3U.js} +1 -1
- package/dist/chunks/{chunk-6TRVEA3T.js → chunk-FVK4W27G.js} +1 -1
- package/dist/chunks/{chunk-7FBWUVX7.js → chunk-GC6RJBRZ.js} +1 -1
- package/dist/chunks/{chunk-5Z3AU5CL.js → chunk-H2XG5N7D.js} +1 -1
- package/dist/chunks/chunk-H6EUFJJK.js +2 -0
- package/dist/chunks/{chunk-V3S2B6WU.js → chunk-IDILAYCW.js} +1 -1
- package/dist/chunks/{chunk-PLVWARB7.js → chunk-IF5A3XWP.js} +1 -1
- package/dist/chunks/chunk-IHAEZ73V.js +2 -0
- package/dist/chunks/{chunk-GDJ4X2ZN.js → chunk-IR2Y2VQY.js} +1 -1
- package/dist/chunks/{chunk-WBO6FQHR.js → chunk-IXZ5ZGIL.js} +1 -1
- package/dist/chunks/{chunk-67HXM6AL.js → chunk-K3LS5SK7.js} +1 -1
- package/dist/chunks/{chunk-4MQHIFZL.js → chunk-K6DB5QWG.js} +1 -1
- package/dist/chunks/{chunk-QJJNHKLT.js → chunk-KQD36SBJ.js} +1 -1
- package/dist/chunks/{chunk-LXZLLTYQ.js → chunk-LI56PPCN.js} +1 -1
- package/dist/chunks/{chunk-KAWXVMHI.js → chunk-MX7KV5DA.js} +1 -1
- package/dist/chunks/{chunk-LARJARMS.js → chunk-N54CPLVD.js} +1 -1
- package/dist/chunks/{chunk-JRGECNP3.js → chunk-OE2OOWEQ.js} +1 -1
- package/dist/chunks/{chunk-B32CW3NT.js → chunk-OY4B7Y3T.js} +1 -1
- package/dist/chunks/chunk-OYIFH2OM.js +2 -0
- package/dist/chunks/{chunk-C5B3FMV3.js → chunk-P6NQYXN6.js} +1 -1
- package/dist/chunks/{chunk-D7R2AAX2.js → chunk-QFL2VQKX.js} +1 -1
- package/dist/chunks/{chunk-Y3B6ZUE6.js → chunk-QOUOU7FE.js} +1 -1
- package/dist/chunks/{chunk-GIU3Z45P.js → chunk-QQLS5FB7.js} +1 -1
- package/dist/chunks/chunk-R5GRESW3.js +2 -0
- package/dist/chunks/{chunk-6ZTP6CUJ.js → chunk-R6MMWEH4.js} +1 -1
- package/dist/chunks/{chunk-XHBMK6LC.js → chunk-R6VI7MX5.js} +1 -1
- package/dist/chunks/{chunk-GFAI2MCJ.js → chunk-RS526BG7.js} +1 -1
- package/dist/chunks/{chunk-EVQISX7M.js → chunk-RWRKUO5D.js} +1 -1
- package/dist/chunks/{chunk-DXA2UHBE.js → chunk-SD2XDZQW.js} +1 -1
- package/dist/chunks/{chunk-S6UCVXBC.js → chunk-SODAOLAP.js} +1 -1
- package/dist/chunks/{chunk-UK5LGSGT.js → chunk-SVNEPXU3.js} +1 -1
- package/dist/chunks/{chunk-5WPMI6QX.js → chunk-TERKCK4I.js} +1 -1
- package/dist/chunks/{chunk-OKEC2EIE.js → chunk-TS5HNRZB.js} +1 -1
- package/dist/chunks/{chunk-5KWKSR4P.js → chunk-TSQ2I6XV.js} +1 -1
- package/dist/chunks/{chunk-YRDPVTEI.js → chunk-TV2LE2BD.js} +1 -1
- package/dist/chunks/chunk-U3MVH2YT.js +2 -0
- package/dist/chunks/{chunk-FS2VKOT7.js → chunk-UBTP3QWI.js} +1 -1
- package/dist/chunks/{chunk-7XOUM6RK.js → chunk-UKSSFB4Q.js} +1 -1
- package/dist/chunks/{chunk-W7NXFRHN.js → chunk-UNE52L3Y.js} +1 -1
- package/dist/chunks/{chunk-ZUT4EM64.js → chunk-UXO33ST5.js} +1 -1
- package/dist/chunks/{chunk-FHLSLOKH.js → chunk-V3ILZQER.js} +1 -1
- package/dist/chunks/chunk-V3T2OJBZ.js +33 -0
- package/dist/chunks/{chunk-QAEZNFAM.js → chunk-V5AOM5MZ.js} +1 -1
- package/dist/chunks/{chunk-LI3FTPAH.js → chunk-VEXJV5H5.js} +1 -1
- package/dist/chunks/{chunk-AF3AVDPP.js → chunk-VPAEFG7X.js} +1 -1
- package/dist/chunks/{chunk-NABPZ7AK.js → chunk-W3ZILZUL.js} +1 -1
- package/dist/chunks/{chunk-U2BD545L.js → chunk-WD6ANOLL.js} +1 -1
- package/dist/chunks/{chunk-OTUS7NTQ.js → chunk-WDKZMXIU.js} +1 -1
- package/dist/chunks/chunk-WGISITX6.js +4 -0
- package/dist/chunks/{chunk-55Q64WWF.js → chunk-XD4ZIQZ2.js} +1 -1
- package/dist/chunks/{chunk-W22KWKF6.js → chunk-XDFXKRTI.js} +1 -1
- package/dist/chunks/{chunk-GRLQHYAU.js → chunk-XEU4J4GJ.js} +1 -1
- package/dist/chunks/{chunk-IEVJLG3V.js → chunk-XGJG2ZKE.js} +1 -1
- package/dist/chunks/chunk-XHU4BZQY.js +13 -0
- package/dist/chunks/{chunk-DIDQHTAX.js → chunk-XKZ4PFMQ.js} +1 -1
- package/dist/chunks/{chunk-B666Z2NS.js → chunk-XT5WUQGT.js} +1 -1
- package/dist/chunks/{chunk-UXPO3ZV7.js → chunk-YKTJPCYZ.js} +3 -3
- package/dist/chunks/{chunk-5AU5Y6KS.js → chunk-YMCF5GR2.js} +1 -1
- package/dist/chunks/{chunk-LYVHYT3L.js → chunk-YONDU5TN.js} +1 -1
- package/dist/chunks/{chunk-BTJACFU3.js → chunk-YQBL5P6R.js} +1 -1
- package/dist/chunks/{chunk-SAZTOGX6.js → chunk-YR5URT73.js} +1 -1
- package/dist/chunks/{chunk-OXRVILDW.js → chunk-ZVMQLIRA.js} +1 -1
- package/dist/chunks/{chunk-MHPCVQOE.js → chunk-ZWEY66RT.js} +1 -1
- package/dist/chunks/cli-HV32F7HD.js +2 -0
- package/dist/chunks/command-NWOZXU57.js +58 -0
- package/dist/chunks/{configuration-command-4WTS2MZS.js → configuration-command-ZEIBQKB3.js} +1 -1
- package/dist/chunks/{connected-app-executor-7DYMZCD7.js → connected-app-executor-DFHWNMRM.js} +1 -1
- package/dist/chunks/{connected-evidence-D7C45HYD.js → connected-evidence-WOM6N5HO.js} +1 -1
- package/dist/chunks/{connected-starting-assets-4LDXQVLN.js → connected-starting-assets-66Y46ZPM.js} +1 -1
- package/dist/chunks/{continual-HQCFY7GN.js → continual-TNPTWTKK.js} +1 -1
- package/dist/chunks/{core-commands-RXPXOYOP.js → core-commands-GWRHH53F.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-KWRTMKN6.js → dataset-preparation-authoring-WJ2XEUO7.js} +1 -1
- package/dist/chunks/{datasets-LBLEKLCS.js → datasets-XIMF54QN.js} +1 -1
- package/dist/chunks/{desktop-test-INJPZ5VP.js → desktop-test-HF42V2EP.js} +1 -1
- package/dist/chunks/dist-T6ES2TSM.js +2 -0
- package/dist/chunks/{evaluation-coordination-3ARLJAFH.js → evaluation-coordination-WZT6FDMS.js} +1 -1
- package/dist/chunks/{experiment-improvements-UB4C5CSP.js → experiment-improvements-H35VS6XZ.js} +1 -1
- package/dist/chunks/{experiments-AHHKFJD6.js → experiments-F54C32EE.js} +1 -1
- package/dist/chunks/{experiments-signal-MTR475QV.js → experiments-signal-ONIGTGYR.js} +1 -1
- package/dist/chunks/{help-JQA3YMCX.js → help-O53DTZGN.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +2 -0
- package/dist/chunks/{host-profile-external-dataset-YRKG2GL5.js → host-profile-external-dataset-4HOXANWK.js} +1 -1
- package/dist/chunks/{hosted-app-server-composition-GPXH3BOG.js → hosted-app-server-composition-Y64A2A2B.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-NZTPZTDH.js → hosted-experiment-improvement-B2V2WIUI.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-3CAT3XBI.js → hosted-profile-candidate-CXPVEEYQ.js} +1 -1
- package/dist/chunks/{hosted-profile-compiler-RXU626Q6.js → hosted-profile-compiler-FGCI2VRW.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-control-CBDRKJ5J.js → hosted-profile-evaluation-control-INNUYMBD.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-CHYKDYUQ.js → hosted-profile-evaluation-inspection-UPTBRYMS.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-H5S7JZMD.js → hosted-profile-evaluation-preparation-TIQSVKLQ.js} +1 -1
- package/dist/chunks/{hosted-tasksets-AMGDDB2R.js → hosted-tasksets-7VMYOTIO.js} +1 -1
- package/dist/chunks/{human-review-DVHVJXBA.js → human-review-7XC77NQP.js} +1 -1
- package/dist/chunks/{import-CLWTKDG6.js → import-OBAKUJPM.js} +1 -1
- package/dist/chunks/javascript-isolate-process-source-YAT3GPW4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-LGRP74W4.js +2 -0
- package/dist/chunks/learning-3XDGIYUL.js +2 -0
- package/dist/chunks/{learning-XTY5VOTK.js → learning-CRR6NRPN.js} +1 -1
- package/dist/chunks/{local-harness-improvement-runtime-XEA73RGS.js → local-harness-improvement-runtime-UIKQSAMM.js} +1 -1
- package/dist/chunks/{local-harness-taskset-review-SW35G4DM.js → local-harness-taskset-review-6KJN3EQL.js} +1 -1
- package/dist/chunks/{model-projects-GHWCKDON.js → model-projects-HP4DELCP.js} +1 -1
- package/dist/chunks/{opchat-LMKH3OWR.js → opchat-NWYWWIA7.js} +1 -1
- package/dist/chunks/{opchat-bounded-chat-PPOWO7H4.js → opchat-bounded-chat-ICURZM6R.js} +1 -1
- package/dist/chunks/{organizations-T6ZUSHNJ.js → organizations-7DBQGCCV.js} +1 -1
- package/dist/chunks/{profile-RIDNU2I5.js → profile-3WZJ65CT.js} +1 -1
- package/dist/chunks/{project-action-payload-2G57RL74.js → project-action-payload-7DRABTHY.js} +1 -1
- package/dist/chunks/{project-agent-GBMVDJY3.js → project-agent-AXJOWXRU.js} +1 -1
- package/dist/chunks/{published-experiment-source-D3C2AWQD.js → published-experiment-source-YBBPLNF2.js} +1 -1
- package/dist/chunks/{refiner-profile-service-PPGGNVOV.js → refiner-profile-service-ATEFPF5O.js} +1 -1
- package/dist/chunks/{runtime-VSOOPNYN.js → runtime-XP4DEGR3.js} +1 -1
- package/dist/chunks/{sandbox-command-L5VQ2T6C.js → sandbox-command-CF2PJCFX.js} +1 -1
- package/dist/chunks/{sandbox-template-NN3XQI7M.js → sandbox-template-YFMHEMUQ.js} +1 -1
- package/dist/chunks/{saved-work-LAVTNKPT.js → saved-work-3OAVRBH3.js} +1 -1
- package/dist/chunks/setup-RHIMFI2Y.js +2 -0
- package/dist/chunks/{src-662QOKNP.js → src-GQPWOPYA.js} +1 -1
- package/dist/chunks/{src-HJHIBDFX.js → src-V236S6MV.js} +112 -112
- package/dist/chunks/{standalone-experiment-turn-owner-KKYIGGPF.js → standalone-experiment-turn-owner-CDRMGLWW.js} +1 -1
- package/dist/chunks/{store-chat-resources-ZWDYMDJF.js → store-chat-resources-P4EKCLSY.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-7PDLGRWF.js → store-continual-support-reviews-VVRQO2JK.js} +1 -1
- package/dist/chunks/{store-conversation-serving-WRT4N7N2.js → store-conversation-serving-YFEZYQD3.js} +1 -1
- package/dist/chunks/{store-create-improve-G46KIUVT.js → store-create-improve-2XI36AET.js} +1 -1
- package/dist/chunks/{store-datasets-O67F75BL.js → store-datasets-UFY422NG.js} +1 -1
- package/dist/chunks/{store-evaluation-results-BEPR4LVD.js → store-evaluation-results-VBH4R2U7.js} +1 -1
- package/dist/chunks/{store-harness-workspaces-PJJQ74G6.js → store-harness-workspaces-SGUEYDO2.js} +1 -1
- package/dist/chunks/{store-human-review-HJ3D7ZFA.js → store-human-review-RFCVZ3HP.js} +1 -1
- package/dist/chunks/{store-learned-preference-migration-validation-EXNRDHCO.js → store-learned-preference-migration-validation-FNBGGZU6.js} +1 -1
- package/dist/chunks/{store-learning-6P6IS7GH.js → store-learning-BFOT4QVT.js} +1 -1
- package/dist/chunks/{store-learning-credentials-EGJ2WTZI.js → store-learning-credentials-DYTMWQTC.js} +1 -1
- package/dist/chunks/{store-local-experiments-CBJA56X2.js → store-local-experiments-XPXGYXNM.js} +1 -1
- package/dist/chunks/{store-model-batch-review-YIVD7T2T.js → store-model-batch-review-J2L5JQV2.js} +1 -1
- package/dist/chunks/{store-model-configuration-T6XJJDAB.js → store-model-configuration-NJFWSYSA.js} +1 -1
- package/dist/chunks/{store-model-project-preparation-WWU5CJTV.js → store-model-project-preparation-OCLIFKI2.js} +1 -1
- package/dist/chunks/{store-preference-comparison-XQFTLMGH.js → store-preference-comparison-MZAYONCK.js} +1 -1
- package/dist/chunks/{store-task-inbox-VVXZUJIO.js → store-task-inbox-3BREANOX.js} +1 -1
- package/dist/chunks/{store-task-inventory-MQX44AI6.js → store-task-inventory-5HRZCDUT.js} +1 -1
- package/dist/chunks/{store-taskset-drafts-G3WFVN4M.js → store-taskset-drafts-BNKUVHPA.js} +1 -1
- package/dist/chunks/{store-training-DUVIDYK5.js → store-training-S3FXWLT6.js} +1 -1
- package/dist/chunks/{store-training-jobs-HHFH3V5O.js → store-training-jobs-2LCXPA7G.js} +1 -1
- package/dist/chunks/{store-training-models-C7UUZDTO.js → store-training-models-7AMKS7ZW.js} +1 -1
- package/dist/chunks/{taskset-7FQCJ55X.js → taskset-PLKWRT4X.js} +1 -1
- package/dist/chunks/{taskset-packages-NRRPON7B.js → taskset-packages-SXBLYHSP.js} +1 -1
- package/dist/chunks/{taskset-packages-RW4SFGDU.js → taskset-packages-V5T4V7YN.js} +1 -1
- package/dist/chunks/{teams-bot-FXMCOCPP.js → teams-bot-VQXUA7U4.js} +1 -1
- package/dist/chunks/{tool-learning-O7QTTEDB.js → tool-learning-47XQKELE.js} +1 -1
- package/dist/chunks/{training-XFM3OOPN.js → training-7VQNCOGH.js} +1 -1
- package/dist/chunks/{training-XILDD5RG.js → training-VKLPNCMC.js} +1 -1
- package/dist/chunks/{training-hosted-6BX2IASC.js → training-hosted-NNE6BP6S.js} +1 -1
- package/dist/chunks/training-hosted-checkpoint-evaluation-2X7RSOLC.js +2 -0
- package/dist/chunks/{training-hosted-learning-YN5VD3PW.js → training-hosted-learning-WQ2IP5FP.js} +1 -1
- package/dist/chunks/training-hosted-report-T633TNJG.js +2 -0
- package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +2 -0
- package/dist/chunks/training-hosted-workers-Y2PO5IOA.js +2 -0
- package/dist/chunks/{training-model-start-E5MP3URL.js → training-model-start-G7YDZ7ZG.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/skills/manifest.json +1 -1
- package/dist/web/assets/App-DmEA-Lia.js +53 -0
- package/dist/web/assets/{AppDialog-DuSd0wk6.js → AppDialog-BvskhHE9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +2 -0
- package/dist/web/assets/{AppToastContext-Dklk6CaG.js → AppToastContext-D2788RqX.js} +1 -1
- package/dist/web/assets/AppsView-B1uNg9IQ.js +1 -0
- package/dist/web/assets/{AppsView-DNHWzJb2.css → AppsView-D3vVesNd.css} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DipNT6Tj.js → AttachmentTypeIcon-DVluUHuc.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BBaaanMS.js → BrowserSidebar-DfVQoJHn.js} +1 -1
- package/dist/web/assets/{CartesianChart-UU1sdoUO.js → CartesianChart-DdBZ69lI.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-Ct59FKw1.js → ChatTimelineEntry-Bbc6HRks.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-BWYRQ1PE.js → CollaborationTabs-ba6WupeJ.js} +1 -1
- package/dist/web/assets/{CommandMenu-B08F9x5g.js → CommandMenu-D7wTaEgl.js} +1 -1
- package/dist/web/assets/{CommunityView-BLTlSxyb.js → CommunityView-mO58f2B0.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-srWBKvCv.js → ComposerAttachments-aO90qXYz.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DqTpU5cO.js → ComposerCreateImproveStrip-BPUJBSyS.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-2KC-KQvu.js → ConversationImportsSettings-Bo836wKJ.js} +1 -1
- package/dist/web/assets/{FilePagePreview-B-iUVPhh.js → FilePagePreview-C6wIp6uX.js} +2 -2
- package/dist/web/assets/{GetStartedView-5v0vBWXy.js → GetStartedView-CxMv8q-h.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-Bn4072K-.js → GettingStartedDialog-CEb0cS-o.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-DWF6WPao.js → HostedModelLearningReview-BQIS7hkd.js} +1 -1
- package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +1 -0
- package/dist/web/assets/{HtmlVisual-C2WsMj90.js → HtmlVisual-CCuUkYT8.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-CQz29DwD.js → LabModelVersionDetailPage-BkHeVbAx.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-C50P74LI.js → LabSkillSidebar-CFROlATQ.js} +1 -1
- package/dist/web/assets/LabsRoute-YA9YckKj.js +101 -0
- package/dist/web/assets/MainChatThread-DpyPgGKW.js +2 -0
- package/dist/web/assets/{MainPane-Dje-hfUM.css → MainPane-BOWkynGB.css} +1 -1
- package/dist/web/assets/MainPane-WOeodByM.js +10 -0
- package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-Clv0IWyn.js → NativeSkillSidebar-MAJWS4mL.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-Cw_F5Eaa.js → NewProjectDialog-MQiUBVx3.js} +1 -1
- package/dist/web/assets/{OutputsPage-Btyiie4B.js → OutputsPage-DpF-aRTu.js} +1 -1
- package/dist/web/assets/{PageChrome-BLLw_cEA.js → PageChrome-8gH2hyDb.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BpSHWQgj.js → ProjectsPage-BQ98oGyu.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-xW5rKbp0.js → RightChatPanelStack-Bs7A4dLs.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-WytWGQgw.js → ScheduledWorkPage-CGCqZz_H.js} +1 -1
- package/dist/web/assets/{SettingsView-BJq5zNkv.js → SettingsView-CqpMFLxy.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BxFEWI9W.js → TasksetDraftEditorPrimitives-DJvIvzBb.js} +1 -1
- package/dist/web/assets/{TeamChatView-BisSMAXy.js → TeamChatView-DjmIaLO1.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-C7OM2F0-.js → TerminalOverlay-D--M876l.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-KH5GFacT.js → TrainingCreationPanel-DDUoHQHU.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DzOw13Md.js → TrainingDraftPanel-CwLXn3Z7.js} +1 -1
- package/dist/web/assets/{TrainingRunLineage-B2WBOchk.js → TrainingRunLineage-CtYe1KGX.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-nZHno_4P.js → UsageSettingsSection-CGwPregx.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-CyTa8Cjs.js → WorkspaceDiffPanel-JDOUmrC-.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-CtZzxQ1e.js → WorkspaceEnvironmentMenu-sfL5LZeB.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-1U8DDj1J.js → WorkspaceFileLocation-D-ctFM4d.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BO1EUA3G.js → WorkspaceGitDialogs-CQ28j3R7.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-Rqq_sKW_.js → WorkspaceMonacoEditor-BrZs6-EW.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-zmmMp09R.js → WorkspacePdfPreview-CU6PSjjN.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DNbhGjkE.js → WorkspacePresentationPreview-IjXVXpIy.js} +1 -1
- package/dist/web/assets/{app-models-Cz3yxq4x.js → app-models-CKXrDTEU.js} +1 -1
- package/dist/web/assets/{bot-D-eTQib6.js → bot-Cd761lRF.js} +1 -1
- package/dist/web/assets/{browser-sidebar-links-ZyYiYBBd.js → browser-sidebar-links-D9v2cyJa.js} +1 -1
- package/dist/web/assets/chat-resources-BUDXdoG0.js +1 -0
- package/dist/web/assets/{chevron-down-75im8nFF.js → chevron-down-DEbd6Ek-.js} +1 -1
- package/dist/web/assets/chevron-right-DLYNg_Oq.js +1 -0
- package/dist/web/assets/{chevron-up-BD8jg0bQ.js → chevron-up-DFJJccDl.js} +1 -1
- package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +9 -0
- package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +1 -0
- package/dist/web/assets/chunk-H3JZ3P5T-CzpTARDY.js +2 -0
- package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +1 -0
- package/dist/web/assets/chunk-TLSP5JKG-BrrVo5rJ.js +1 -0
- package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +1 -0
- package/dist/web/assets/client-BNjO4Xi8.js +1 -0
- package/dist/web/assets/{client-choice-storage-CXlWJW5g.js → client-choice-storage-DUWsS4X0.js} +1 -1
- package/dist/web/assets/{cloud-upload-4lP-5zmp.js → cloud-upload-CoM1FGeB.js} +1 -1
- package/dist/web/assets/{common-BMjyKlX-.js → common-CFsO2ppZ.js} +1 -1
- package/dist/web/assets/{copy-DRnATDDY.js → copy-BGOhV6Pk.js} +1 -1
- package/dist/web/assets/{create-pipeline-CyUZrbbO.js → create-pipeline-DRR0Qeec.js} +1 -1
- package/dist/web/assets/{createLucideIcon-CmkSm39S.js → createLucideIcon-Bv-_eGcE.js} +1 -1
- package/dist/web/assets/{cssMode-Cps-05f3.js → cssMode-SclUkqPt.js} +1 -1
- package/dist/web/assets/{external-link-D_nBEDFO.js → external-link-CVXsNeO3.js} +1 -1
- package/dist/web/assets/{folder-open-tD5Lle1M.js → folder-open-MnOmh19D.js} +1 -1
- package/dist/web/assets/{folder-plus-DlZ4hM48.js → folder-plus-BRddLBtO.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-g8KBhvfr.js → git-commit-horizontal-Bm4rkXug.js} +1 -1
- package/dist/web/assets/{htmlMode-Do72TyNy.js → htmlMode-X3mQtOeh.js} +1 -1
- package/dist/web/assets/icons-CZxmQtZs.js +1 -0
- package/dist/web/assets/{image-CUZMnZYi.js → image-BViGUAiq.js} +1 -1
- package/dist/web/assets/{index-D7igQSAg.js → index-LXNhSUEL.js} +2 -2
- package/dist/web/assets/{info-SmuBZiE5.js → info-DYPIbKKD.js} +1 -1
- package/dist/web/assets/intake-contracts-wCkD2ErR.js +1 -0
- package/dist/web/assets/{jsonMode-B2N7W15Y.js → jsonMode-BoKiIdHd.js} +1 -1
- package/dist/web/assets/loader-circle-JFgFNsP5.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DPmyOFVA.js → lspLanguageFeatures-CO2mzpy1.js} +1 -1
- package/dist/web/assets/{maximize-2-B8HN3jsA.js → maximize-2-DXZCQO0b.js} +1 -1
- package/dist/web/assets/{message-square-CrDvzn66.js → message-square-cOCAL8J1.js} +1 -1
- package/dist/web/assets/{monaco.contribution-CRdTg0FH.js → monaco.contribution-C7CAQIKF.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BfOxF9PJ.js → monaco.contribution-CVe3mWSY.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DNONXznc.js → monaco.contribution-hrusiaZi.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DqqJBDzF.js → monaco.contribution-wacA5FjV.js} +2 -2
- package/dist/web/assets/{monitor-CW-M_aaj.js → monitor-B35XSAvn.js} +1 -1
- package/dist/web/assets/{paperclip-DL449Io5.js → paperclip-CKgDxioG.js} +1 -1
- package/dist/web/assets/{pdf-BCq2Oosd.js → pdf-Ct3M2mVw.js} +1 -1
- package/dist/web/assets/play-DzqLr7fM.js +1 -0
- package/dist/web/assets/plus-Ddp1vXnw.js +1 -0
- package/dist/web/assets/{ponder-desktop-Dm7tOkKo.js → ponder-desktop-D-zB6X4L.js} +1 -1
- package/dist/web/assets/{presentation-CupIXaYv.js → presentation-B0S9v7ib.js} +1 -1
- package/dist/web/assets/{profile-ref-DSNkG6Ol.js → profile-ref-CCxrOCio.js} +1 -1
- package/dist/web/assets/{python-DuGMr666.js → python-C0-pUUAU.js} +1 -1
- package/dist/web/assets/{refresh-cw-CzVf5_oo.js → refresh-cw-D45mW-vs.js} +1 -1
- package/dist/web/assets/{requests-BCbaFiqV.js → requests-DjSt-duM.js} +1 -1
- package/dist/web/assets/{reward-checks-Bcq9ETCA.js → reward-checks-D139zwha.js} +2 -2
- package/dist/web/assets/{save-DatjrYPV.js → save-Gu4R_82E.js} +1 -1
- package/dist/web/assets/schemas-C9IwV7NS.js +64 -0
- package/dist/web/assets/{settings-D7C-Auyi.js → settings-DdonLCIN.js} +1 -1
- package/dist/web/assets/settings-lists-CFHFtO0D.js +5 -0
- package/dist/web/assets/square-Dqduqyyu.js +1 -0
- package/dist/web/assets/{square-terminal-Buj-s-fz.js → square-terminal-DS3zwi6X.js} +1 -1
- package/dist/web/assets/{submit-issue-command-wfngGS6Y.js → submit-issue-command-Gk3RKrY-.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-cl0cw2QK.js → toggleHighContrast-BnYUBgZB.js} +1 -1
- package/dist/web/assets/training-QBuGBGJd.js +2 -0
- package/dist/web/assets/{training-model-data-CWnu1bz9.js → training-model-data-CxR3xpmK.js} +1 -1
- package/dist/web/assets/{tsMode-DLEc0PYL.js → tsMode-BVNyOY8h.js} +1 -1
- package/dist/web/assets/{upload-DaFVH6R1.js → upload-ABSJxuUM.js} +1 -1
- package/dist/web/assets/{useAccountSettings-ByxjI9BG.js → useAccountSettings-4_XfwJQi.js} +1 -1
- package/dist/web/assets/{useAgentInventory-Df64T07n.js → useAgentInventory-CVuamyT3.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-DNh_x9gQ.js → useLocalAgentSchedules-CmwN4ohy.js} +1 -1
- package/dist/web/assets/{useQuery-yUz7Ui8g.js → useQuery-CCjwL8VI.js} +1 -1
- package/dist/web/assets/{wifi-off-CtNwnIJc.js → wifi-off-DGJH7Pke.js} +1 -1
- package/dist/web/assets/{work-outputs-CK0nHe4g.js → work-outputs-CnbRtTLg.js} +1 -1
- package/dist/web/assets/{workers-CnqrOtic.js → workers-CjtQ2aBD.js} +1 -1
- package/dist/web/assets/x-B-_zJVOZ.js +1 -0
- package/dist/web/assets/{yaml-C9vtYV4w.js → yaml-N1KUjBZ8.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +7 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-2ZNW6GUU.js +0 -2
- package/dist/chunks/chunk-3MVKXAH7.js +0 -2
- package/dist/chunks/chunk-G4E3WGLM.js +0 -13
- package/dist/chunks/chunk-I3NYYOSS.js +0 -2
- package/dist/chunks/chunk-JBFPTEVE.js +0 -2
- package/dist/chunks/chunk-OW3EOC5Q.js +0 -4
- package/dist/chunks/chunk-SBQ6KLXB.js +0 -33
- package/dist/chunks/chunk-YBKDEEEH.js +0 -2
- package/dist/chunks/cli-TE7RP5H7.js +0 -2
- package/dist/chunks/command-NW6BGKOM.js +0 -13
- package/dist/chunks/dist-J4KHAVO3.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +0 -2
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +0 -2
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +0 -2
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +0 -2
- package/dist/chunks/learning-NJLTGZFQ.js +0 -2
- package/dist/chunks/setup-TXEM2QSG.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +0 -2
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +0 -2
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +0 -2
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +0 -2
- package/dist/web/assets/App-CNQi3RlI.js +0 -53
- package/dist/web/assets/AppTerminalPanel-DLz34eSs.js +0 -2
- package/dist/web/assets/AppsView-DkCMr67-.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BYl-2j7B.js +0 -1
- package/dist/web/assets/LabsRoute-DJRgF1kQ.js +0 -101
- package/dist/web/assets/MainChatThread-gwmhe1Nw.js +0 -2
- package/dist/web/assets/MainPane-CqtgV9rU.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-DrQldDsG.js +0 -2
- package/dist/web/assets/RightSidebarHomePanel-BDmIxvIm.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-D3Ub_jVj.js +0 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +0 -1
- package/dist/web/assets/chevron-right-CpbCIUFo.js +0 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +0 -9
- package/dist/web/assets/chunk-H3JZ3P5T-B0SCoPw4.js +0 -2
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +0 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +0 -1
- package/dist/web/assets/icons-B8_Rkg-l.js +0 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +0 -1
- package/dist/web/assets/loader-circle-D_KVxLLz.js +0 -1
- package/dist/web/assets/play-DYLqBrwg.js +0 -1
- package/dist/web/assets/plus-DXZIpQuY.js +0 -1
- package/dist/web/assets/schemas-lO3MoWQr.js +0 -64
- package/dist/web/assets/settings-lists-D2ol3uNK.js +0 -5
- package/dist/web/assets/square-BWB1nbZF.js +0 -1
- package/dist/web/assets/training-DCdoHJ0Y.js +0 -2
- package/dist/web/assets/x-Bhl-4Zlt.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{$ as Hf,$a as uh,$b as ui,A as ff,Aa as Vg,Ab as Vh,Ac as Vi,B as gf,Ba as Wg,Bb as Wh,Bc as Wi,C as hf,Ca as Xg,Cb as Xh,Cc as Xi,D as jf,Da as Yg,Db as Yh,Dc as Yi,E as kf,Ea as Zg,Eb as Zh,Ec as Zi,F as lf,Fa as _g,Fb as _h,Fc as _i,G as mf,Ga as $g,Gb as $h,Gc as $i,H as nf,Ha as ah,Hb as ai,Hc as aj,I as of,Ia as bh,Ib as bi,Ic as bj,J as pf,Ja as ch,Jb as ci,Jc as cj,K as qf,Ka as dh,Kb as di,Kc as dj,L as rf,La as eh,Lb as ei,Lc as ej,M as sf,Ma as fh,Mb as fi,N as tf,Na as gh,Nb as gi,O as uf,Oa as hh,Ob as hi,P as vf,Pa as ih,Pb as ii,Q as wf,Qa as jh,Qb as ji,R as xf,Ra as kh,Rb as ki,S as yf,Sa as lh,Sb as li,T as zf,Ta as mh,Tb as mi,U as Af,Ua as nh,Ub as ni,V as Bf,Va as oh,Vb as oi,W as Cf,Wa as ph,Wb as pi,X as Df,Xa as qh,Xb as qi,Y as Ef,Ya as rh,Yb as ri,Z as Ff,Za as sh,Zb as si,_ as Gf,_a as th,_b as ti,a as He,aa as If,ab as vh,ac as vi,b as Ie,ba as Jf,bb as wh,bc as wi,c as Je,ca as Kf,cb as xh,cc as xi,d as Ke,da as Lf,db as yh,dc as yi,e as Le,ea as Mf,eb as zh,ec as zi,f as Me,fa as Nf,fb as Ah,fc as Ai,g as Ne,ga as Of,gb as Bh,gc as Bi,h as Oe,ha as Cg,hb as Ch,hc as Ci,i as Pe,ia as Dg,ib as Dh,ic as Di,j as Qe,ja as Eg,jb as Eh,jc as Ei,k as Re,ka as Fg,kb as Fh,kc as Fi,l as Se,la as Gg,lb as Gh,lc as Gi,m as Te,ma as Hg,mb as Hh,mc as Hi,n as Ue,na as Ig,nb as Ih,nc as Ii,o as Ve,oa as Jg,ob as Jh,oc as Ji,p as We,pa as Kg,pb as Kh,pc as Ki,q as Xe,qa as Lg,qb as Lh,qc as Li,r as Ye,ra as Mg,rb as Mh,rc as Mi,s as Ze,sa as Ng,sb as Nh,sc as Ni,t as _e,ta as Og,tb as Oh,tc as Oi,u as $e,ua as Pg,ub as Ph,uc as Pi,v as af,va as Qg,vb as Qh,vc as Qi,w as bf,wa as Rg,wb as Rh,wc as Ri,x as cf,xa as Sg,xb as Sh,xc as Si,y as df,ya as Tg,yb as Th,yc as Ti,z as ef,za as Ug,zb as Uh,zc as Ui}from"./chunk-QAFXQHHG.js";import{A as ng,B as og,C as pg,D as qg,E as rg,F as sg,G as tg,H as ug,I as vg,J as wg,K as xg,L as yg,M as zg,N as Ag,O as Bg,a as Pf,b as Qf,c as Rf,d as Sf,e as Tf,f as Uf,g as Vf,h as Wf,i as Xf,j as Yf,k as Zf,l as _f,m as $f,n as ag,o as bg,p as cg,q as dg,r as eg,s as fg,t as gg,u as hg,v as ig,w as jg,x as kg,y as lg,z as mg}from"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import{$ as jc,$a as jd,$b as je,A as Kb,Aa as Kc,Ab as Kd,B as Lb,Ba as Lc,Bb as Ld,C as Mb,Ca as Mc,Cb as Md,D as Nb,Da as Nc,Db as Nd,E as Ob,Ea as Oc,Eb as Od,F as Pb,Fa as Pc,Fb as Pd,G as Qb,Ga as Qc,Gb as Qd,H as Rb,Ha as Rc,Hb as Rd,I as Sb,Ia as Sc,Ib as Sd,J as Tb,Ja as Tc,Jb as Td,K as Ub,Ka as Uc,Kb as Ud,L as Vb,La as Vc,Lb as Vd,M as Wb,Ma as Wc,Mb as Wd,N as Xb,Na as Xc,Nb as Xd,O as Yb,Oa as Yc,Ob as Yd,P as Zb,Pa as Zc,Pb as Zd,Q as _b,Qa as _c,Qb as _d,R as $b,Ra as $c,Rb as $d,S as ac,Sa as ad,Sb as ae,T as bc,Ta as bd,Tb as be,U as cc,Ua as cd,Ub as ce,V as dc,Va as dd,Vb as de,W as ec,Wa as ed,Wb as ee,X as fc,Xa as fd,Xb as fe,Y as gc,Ya as gd,Yb as ge,Z as hc,Za as hd,Zb as he,_ as ic,_a as id,_b as ie,a as p,aa as kc,ab as kd,ac as ke,b as lb,ba as lc,bb as ld,bc as le,c as mb,ca as mc,cb as md,cc as me,d as nb,da as nc,db as nd,dc as ne,e as ob,ea as oc,eb as od,ec as oe,f as pb,fa as pc,fb as pd,fc as pe,g as qb,ga as qc,gb as qd,gc as qe,h as rb,ha as rc,hb as rd,hc as re,i as sb,ia as sc,ib as sd,ic as se,j as tb,ja as tc,jb as td,jc as te,k as ub,ka as uc,kb as ud,kc as ue,l as vb,la as vc,lb as vd,lc as ve,m as wb,ma as wc,mb as wd,mc as we,n as xb,na as xc,nb as xd,nc as xe,o as yb,oa as yc,ob as yd,oc as ye,p as zb,pa as zc,pb as zd,pc as ze,q as Ab,qa as Ac,qb as Ad,qc as Ae,r as Bb,ra as Bc,rb as Bd,rc as Be,s as Cb,sa as Cc,sb as Cd,sc as Ce,t as Db,ta as Dc,tb as Dd,tc as De,u as Eb,ua as Ec,ub as Ed,uc as Ee,v as Fb,va as Fc,vb as Fd,vc as Fe,w as Gb,wa as Gc,wb as Gd,wc as Ge,x as Hb,xa as Hc,xb as Hd,y as Ib,ya as Ic,yb as Id,z as Jb,za as Jc,zb as Jd}from"./chunk-XHU4BZQY.js";import{$ as G,$a as Ga,Aa as fa,Ab as fb,Ba as ga,Bb as gb,Ca as ha,Cb as hb,Da as ia,Db as ib,Ea as ja,Eb as jb,Fa as ka,Fb as kb,Ga as la,Ha as ma,Ia as na,Ja as oa,Ka as pa,La as qa,Ma as ra,Na as sa,Oa as ta,Pa as ua,Qa as va,Ra as wa,Sa as xa,Ta as ya,Ua as za,Va as Aa,W as B,Wa as Ba,X as C,Xa as Ca,Y as D,Ya as Da,Z as E,Za as Ea,_ as F,_a as Fa,aa as H,ab as Ha,ba as I,bb as Ia,ca as J,cb as Ja,da as K,db as Ka,ea as L,eb as La,fa as M,fb as Ma,ga as N,gb as Na,ha as O,hb as Oa,i as q,ia as P,ib as Pa,j as r,ja as Q,jb as Qa,k as s,ka as R,kb as Ra,l as t,la as S,lb as Sa,m as u,ma as T,mb as Ta,na as U,nb as Ua,oa as V,ob as Va,pa as W,pb as Wa,qa as X,qb as Xa,ra as Y,rb as Ya,s as v,sa as Z,sb as Za,t as w,ta as _,tb as _a,u as x,ua as $,ub as $a,v as y,va as aa,vb as ab,w as z,wa as ba,wb as bb,x as A,xa as ca,xb as cb,ya as da,yb as db,za as ea,zb as eb}from"./chunk-ZY32SZ2P.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-FTQLQJQV.js";export{se as AcceptanceAttemptSchema,ke as AcceptanceCheckSchema,qe as AcceptanceGroupManifestContentSchema,re as AcceptanceGroupManifestSchema,te as AcceptanceGroupSnapshotContentSchema,ue as AcceptanceGroupSnapshotSchema,oe as AcceptanceMeasurementSchema,le as AcceptancePlanContentSchema,me as AcceptancePlanSchema,d as AgentSnapshotContentSchema,e as AgentSnapshotSchema,Nc as ApplyTaskCorrectionCommandSchema,Uc as ArchiveAuthoringDraftCommandSchema,rf as ArtifactCollectionStatusSchema,uf as ArtifactManifestContentSchema,tf as ArtifactManifestEntrySchema,vf as ArtifactManifestSchema,sf as ArtifactValidationStatusSchema,of as AttemptOutcomeClassSchema,Le as AttemptReceiptContentSchema,Me as AttemptReceiptSchema,yc as AuthoringDraftContentSchema,Ac as AuthoringDraftFinalizationSchema,xc as AuthoringDraftInputSchema,zc as AuthoringDraftSchema,wc as AuthoringTargetKindSchema,gf as BenchmarkComparisonContentSchema,hf as BenchmarkComparisonSchema,cf as BenchmarkDefinitionSchema,$e as BenchmarkMetricSchema,bf as BenchmarkProtocolSchema,af as BenchmarkRunPhaseSchema,df as BenchmarkRunRequestSchema,ef as BenchmarkRunSummaryContentSchema,ff as BenchmarkRunSummarySchema,mb as BoundJudgeResponseSchema,Ca as BoundRewardResultSchema,Ji as CORE_METRIC_CATALOG,_c as CancelLearningIterationCommandSchema,Zc as CancelLearningIterationReservationCommandSchema,Wc as CancelRewardCheckCommandSchema,Sc as CancelTaskGradeCommandSchema,oi as CanonicalRolloutRecordSchema,b as CapabilityRequirementSchema,vc as CombinedRewardAuthoringFieldsSchema,ah as ComparisonAssignmentContentSchema,bh as ComparisonAssignmentSchema,Fe as CorrectionMetricObservationSchema,Ge as CorrectionMetricSummarySchema,Ee as CorrectionOpportunitySchema,Be as CorrectionVerificationCheckSchema,Ce as CorrectionVerificationPlanContentSchema,De as CorrectionVerificationPlanSchema,I as CustomVerifierGraderSpecSchema,H as CustomVerifierRuntimeSchema,id as DEFAULT_REWARD_VERIFIER_SOURCE,F as DeterministicGraderSpecSchema,E as EnvironmentContractSchema,ni as EnvironmentExecutionEvidenceSchema,pf as EnvironmentReleaseContentSchema,qf as EnvironmentReleaseSchema,Ne as EvaluationResultContentSchema,Oe as EvaluationResultSchema,Vf as EvidenceArtifactIdSchema,Wf as EvidenceArtifactRefSchema,Qi as EvidenceCompletenessSchema,Pi as EvidenceReferenceSchema,Za as ExperimentCaseIdentitySchema,eb as ExperimentCaseResultSchema,Ya as ExperimentEvaluatorSchema,cb as ExperimentFeedbackSchema,ab as ExperimentManifestContentSchema,bb as ExperimentManifestSchema,fb as ExperimentResultContentSchema,gb as ExperimentResultSchema,Xa as ExperimentTargetSchema,db as ExperimentUsageSchema,nf as FailureOwnerSchema,sa as FeedbackKeySchema,ka as GraderEvidenceContentSchema,la as GraderEvidenceSchema,g as GraderInterfaceContractSchema,K as GraderSpecSchema,Pe as HarnessCompatibilityReceiptContentSchema,Qe as HarnessCompatibilityReceiptSchema,n as HarnessLifecycleEventSchema,h as HarnessReleaseContentSchema,i as HarnessReleaseSchema,o as HarnessTraceSchema,J as HumanGraderSpecSchema,Ic as ImportTaskIntakeCommandSchema,ob as JudgeCallReservationSchema,Pb as LearningAcceptedParentSchema,he as LearningCandidateDecisionObservationSchema,oc as LearningChainSchema,Md as LearningCommandRequestSchema,ad as LearningCommandSchema,xd as LearningConflictError,qc as LearningConsumptionSchema,p as LearningContinuationModeOverrideSchema,fa as LearningDomainError,pc as LearningEligibilityCountsSchema,cd as LearningIterationAdmissionSchema,ed as LearningIterationDispatchSchema,fd as LearningIterationObservationSchema,rc as LearningIterationReservationSchema,Rb as LearningIterationSchema,Qb as LearningIterationStatusSchema,dd as LearningIterationSubmissionDeferralSchema,bd as LearningIterationSubmissionSchema,nc as LearningIterationTriggerSchema,ub as LearningJsonObjectSchema,wb as LearningJsonPointerSchema,Pd as LearningOperationResultSchema,Nb as LearningPolicyContentSchema,Fd as LearningPolicyInspectionResultSchema,Ob as LearningPolicySchema,Nd as LearningReadRequestSchema,wd as LearningResourceKindSchema,Tb as LearningResourceSchema,Ab as LearningReviewOriginSchema,vb as LearningRevisionRefSchema,hd as LearningScheduleFireSchema,gd as LearningScheduleSchema,Bb as LearningSourceContentSchema,Cb as LearningSourceSchema,Jd as LearningTaskQueueInspectionSchema,Yb as LearningTextAssetContentSchema,Zb as LearningTextAssetSchema,f as LifecycleContractSchema,_d as MAX_REWARD_CALIBRATION_CLOSURE_BYTES,vi as METRIC_DEFINITION_SCHEMA_VERSION,wi as METRIC_OBSERVATION_SCHEMA_VERSION,Fi as MetricAggregationSchema,Ni as MetricCatalogSchema,Gi as MetricDefinitionSchema,Ei as MetricDirectionSchema,Hi as MetricObservationSchema,Ri as MetricSeriesPointSchema,Di as MetricUnitSchema,Ci as MetricValueTypeSchema,j as ModelActionSchema,Vh as ModelImprovementDecisionSchema,Xh as ModelImprovementQualificationReceiptContentSchema,Yh as ModelImprovementQualificationReceiptSchema,Wh as ModelImprovementSignalSchema,G as ModelJudgeGraderSpecSchema,ja as ModelJudgeReceiptSchema,ia as ModelJudgeTransportPolicySchema,Ta as NativeHarnessExperimentAttemptContentSchema,Ua as NativeHarnessExperimentAttemptSchema,Sa as NativeHarnessExperimentEvidenceSchema,rb as NightlyScheduleSchema,mi as OptimizerTrainingSampleSchema,D as PolicyBoundarySchema,c as PortabilityReportSchema,eh as PreferenceAggregationReceiptContentSchema,fh as PreferenceAggregationReceiptSchema,gh as PreferenceCalibrationReportContentSchema,hh as PreferenceCalibrationReportSchema,Wg as PreferenceComparisonPurposeSchema,_g as PreferenceComparisonReleaseContentSchema,$g as PreferenceComparisonReleaseSchema,yh as PreferenceDatasetReleaseContentSchema,zh as PreferenceDatasetReleaseSchema,wh as PreferenceEvidenceAuthoritySchema,ch as PreferenceReceiptContentSchema,dh as PreferenceReceiptSchema,Zg as PreferenceRendererSchema,Xg as PreferenceReviewerKindSchema,Yg as PreferenceRewardScopeSchema,$ as ProfileEvaluationCatalogSchema,$h as ProfileEvaluationComparisonContentSchema,ai as ProfileEvaluationComparisonSchema,Z as ProfileEvaluationDefinitionSchema,ji as ProfileEvaluationEvidenceRefSchema,ci as ProfileEvaluationReportContentSchema,di as ProfileEvaluationReportSchema,aa as ProfileEvaluationRunSourceSchema,gi as ProfileEvaluationSuiteRunContentSchema,hi as ProfileEvaluationSuiteRunSchema,_ as ProfileEvaluationSuiteSchema,S as ProfileEvaluationTargetSchema,U as ProfileExternalDatasetBindingContentSchema,V as ProfileExternalDatasetBindingSchema,T as ProfileExternalFieldMappingsSchema,q as ProfileSourceCandidateSchema,Xc as PublishCheckedRewardCommandSchema,Jc as PublishLearningResourceCommandSchema,Kc as PublishLearningResourcesCommandSchema,Vc as QueueRewardCheckCommandSchema,Pc as QueueTaskGradeCommandSchema,ui as RUN_TELEMETRY_SCHEMA_VERSION,C as RequiredOutputContractSchema,Yc as ReserveLearningIterationCommandSchema,Oc as ResolveTaskFeedbackCommandSchema,$c as RetryLearningIterationDispatchCommandSchema,Qc as ReviewTaskEvidenceCommandSchema,tc as RewardAuthoringFieldsSchema,Aa as RewardBindingContentSchema,Ba as RewardBindingSchema,za as RewardBindingSourceSchema,$d as RewardCalibrationClosureSchema,qd as RewardCheckRunSchema,od as RewardCheckRuntimeSchema,yf as RewardComponentReceiptSchema,Da as RewardCompositionContentSchema,Ea as RewardCompositionSchema,sc as RewardFixtureAuthoringFieldsSchema,pd as RewardFixtureCheckResultSchema,nd as RewardFixtureSchema,ua as RewardImplementationSchema,xh as RewardModelQualificationKindSchema,Ah as RewardModelQualificationReportContentSchema,Bh as RewardModelQualificationReportSchema,ya as RewardNormalizationSchema,zf as RewardReceiptContentSchema,Af as RewardReceiptSchema,va as RewardReleaseContentSchema,xa as RewardReleaseRefSchema,wa as RewardReleaseSchema,pi as RolloutQualificationSchema,Ie as RunLimitsSchema,Je as RunManifestContentSchema,Ke as RunManifestSchema,Si as RunMetricSummarySchema,Ii as RunTelemetryBatchSchema,Bi as RunTelemetryEventSchema,Ai as RunTelemetryLineageSchema,He as RuntimeTargetBindingSchema,Na as STANDALONE_EXPERIMENT_MAX_POLICY_CALLS,Pa as STANDALONE_EXPERIMENT_READ_TOOLS,Tc as SaveAuthoringDraftCommandSchema,mf as ScoringStatusSchema,Rc as SealTaskBatchCommandSchema,Ma as StandaloneHarnessExperimentSourceSchema,Lc as SubmitTaskExampleCommandSchema,Mc as SubmitTaskFeedbackCommandSchema,Bc as TASK_INTAKE_LIMITS,v as TASK_JSON_SCHEMA_DIALECT,x as TASK_SCHEMA_MAX_BYTES,w as TASK_VALUE_MAX_BYTES,Jb as TaskAdmissionDecisionContentSchema,Kb as TaskAdmissionDecisionSchema,Lb as TaskBatchContentSchema,kc as TaskBatchPackageMetadataSchema,Mb as TaskBatchSchema,xb as TaskDefinitionContentSchema,yb as TaskDefinitionSchema,Eb as TaskEvidenceContentSchema,Od as TaskEvidenceInspectionResultSchema,Fb as TaskEvidenceSchema,Db as TaskExampleSubmissionSchema,Ib as TaskFeedbackSchema,Hb as TaskFeedbackSubmissionSchema,uc as TaskFormatAuthoringFieldsSchema,Sb as TaskGradeRunSchema,pa as TaskGradeSchema,Dc as TaskIntakeFileSchema,Cc as TaskIntakeFormatSchema,Fc as TaskIntakePreviewSchema,Ec as TaskIntakeRecordSchema,Gb as TaskRatingSchema,L as TaskRecordSchema,zb as TaskSourceMappingSchema,B as TaskSplitSchema,r as TasksetMetricPolicySchema,s as TasksetMetricResultContentSchema,t as TasksetMetricResultSchema,M as TasksetReleaseContentSchema,N as TasksetReleaseSchema,Ih as TasksetRunExecutionSchema,Kh as TasksetRunManifestContentSchema,Lh as TasksetRunManifestSchema,Jh as TasksetRunMemberSchema,Hh as TasksetRunPolicySchema,Oi as TelemetryCohortSchema,zi as TelemetryEventTypeSchema,aj as TelemetryExportBundleContentSchema,bj as TelemetryExportBundleSchema,yi as TelemetrySourceSchema,xi as TelemetryVisibilitySchema,a as ToolDeclarationSchema,k as ToolObservationSchema,lb as TrainingHandoffOriginSchema,wf as VerifierSetReleaseContentSchema,xf as VerifierSetReleaseSchema,Sf as WORK_EVIDENCE_ELIGIBILITY_SCHEMA_VERSION,Pf as WORK_EVIDENCE_SCHEMA_VERSION,Rf as WORK_FEEDBACK_SCHEMA_VERSION,Qf as WORK_PROCESS_TRACE_SCHEMA_VERSION,Lg as WorkEvidenceAuthoringInputSchema,Eg as WorkEvidenceBlockerCodeSchema,Fg as WorkEvidenceDecisionSchema,Gg as WorkEvidenceEligibilityContentSchema,Hg as WorkEvidenceEligibilitySchema,Cg as WorkEvidencePolicyStateSchema,kg as WorkEvidenceReceiptContentSchema,lg as WorkEvidenceReceiptSchema,Dg as WorkEvidenceUseSchema,ig as WorkFailureClassSchema,ng as WorkFeedbackReasonCodeSchema,og as WorkFeedbackReceiptContentSchema,pg as WorkFeedbackReceiptSchema,mg as WorkFeedbackVerdictSchema,cg as WorkInterventionOutcomeSchema,Zf as WorkProcessActionSchema,dg as WorkProcessErrorClassSchema,Yf as WorkProcessLayerSchema,Xf as WorkProcessStepKindSchema,fg as WorkProcessStepSchema,_f as WorkProcessStepStatusSchema,gg as WorkProcessTraceContentSchema,hg as WorkProcessTraceSchema,Tf as WorkSourceOpaqueRefSchema,jg as WorkTerminalSchema,$f as WorkToolCategorySchema,eg as WorkTraceIncompleteReasonSchema,bg as WorkTransitionStateSchema,ag as WorkValidationKindSchema,Uf as WorkWorkspaceOpaqueRefSchema,Ae as acceptanceGroupVerdict,Pg as acceptedWorkFeedbackFixture,Rg as activeWorkEvidenceEligibilityFixture,Ue as aggregateEvaluationReceipts,oa as aggregateGraderScores,qh as aggregatePreferenceReceipts,Th as aggregateTasksetEvaluationReceipts,Rh as aggregateTasksetRunReceipts,ze as assertAcceptanceBaselineReuse,xe as assertAcceptanceGroupSnapshot,ye as assertAcceptanceGroupUpdate,gc as assertAdmissionDecision,y as assertBoundedTaskJson,We as assertComparableRunManifests,Bg as assertFeedbackTargetsEvidence,hc as assertGradeIdentity,Xb as assertLearningContentHash,Ld as assertLearningRequestJson,fi as assertProfileEvaluationReport,Ph as assertProfileEvaluationRunAdmission,Id as assertRewardCalibration,La as assertRewardHash,u as assertTasksetMetricResult,Sh as assertTasksetMetricSource,P as assertTasksetRelease,Oh as assertTasksetRunRelease,md as authoringNumber,Ef as bindTasksetExecutionReleases,Nf as buildArtifactManifest,Ff as classifyAttemptOutcome,Ig as classifyWorkEvidence,tb as coalesceNightlyOccurrences,lf as compareBenchmarkRuns,kb as compareExperiments,Ia as compileBoundGraders,jd as compileRewardAuthoring,sd as compileRewardCheck,rd as compileRewardFixtures,lc as compileTaskBatch,Og as completeWorkEvidenceFixture,Ng as completeWorkProcessTraceFixture,Ka as composeBoundRewards,ve as createAcceptanceGroupManifest,we as createAcceptanceGroupSnapshot,ne as createAcceptancePlan,l as createAgentSnapshot,Cf as createArtifactManifest,Se as createAttemptReceipt,jf as createBenchmarkDefinition,kf as createBenchmarkRunSummary,nb as createBoundModelJudgeRunner,qb as createBudgetedJudgeExecutor,Zd as createBudgetedRewardFixtureExecutor,Td as createBuiltinTaskGradeExecutor,qi as createCanonicalRolloutRecord,kh as createComparisonAssignment,Bf as createEnvironmentRelease,hb as createExperimentManifest,ib as createExperimentResult,Ve as createHarnessCompatibilityReceipt,m as createHarnessRelease,Yd as createIsolatedRewardFixtureExecutor,ge as createLearningIterationWorker,je as createLearningScheduleWorker,Sd as createLearningService,_b as createLearningTextAsset,Ui as createMetricObservation,Zh as createModelImprovementQualificationReceipt,Va as createNativeHarnessExperimentAttempt,sh as createPreferenceCalibrationReport,ih as createPreferenceComparisonRelease,Ch as createPreferenceDatasetRelease,nh as createPreferenceReceipt,vh as createPreferenceRewardComponents,bi as createProfileEvaluationComparison,ei as createProfileEvaluationReport,ii as createProfileEvaluationSuiteRun,X as createProfileExternalDatasetBinding,Ga as createRewardBinding,be as createRewardCalibrationClosure,Wd as createRewardCheckJudgeBudgetStore,ee as createRewardCheckWorker,Fh as createRewardModelQualificationReport,Gf as createRewardReceipt,Fa as createRewardRelease,Re as createRunManifest,Ti as createRunTelemetryEvent,oh as createSyntheticFixturePreferenceReceipt,Xd as createTaskGradeJudgeBudgetStore,Ud as createTaskGradeWorker,Mh as createTasksetRunManifest,cj as createTelemetryExportBundle,Ye as createVerifiedHarnessCompatibilityReceipt,Df as createVerifierSetRelease,vg as createWorkEvidenceReceipt,wg as createWorkFeedbackReceipt,ug as createWorkProcessTrace,Qd as decodeTaskIntakeText,fe as deferLearningIterationSubmission,Yi as deriveEvidenceCompleteness,Kg as eligibleEvidenceUses,pe as evaluateAcceptancePlan,ga as evaluateDeterministicGrader,qg as evidenceArtifactId,tg as evidenceArtifactRef,ki as executeProfileEvaluationRun,Ja as executeRewardBinding,td as executeRewardFixture,Vg as executeRuntimeProtocol,Uh as executeTasksetMetric,_a as experimentCaseKey,ce as exportRewardCalibrationClosure,Y as externalDatasetDefinitionId,ta as feedbackKeyForReward,Xi as filterTelemetryCohort,Ki as getCoreMetricDefinition,na as gradeEvidence,qa as gradeTaskEvidence,ma as gradersForTask,li as harnessEvaluationReviewConformance,Ra as harnessExperimentReadToolDeclarations,Oa as harnessExperimentSourceRequiresProfile,_e as harnessRefinerBenchmarkAssets,Ze as harnessRefinerBenchmarkRelease,$a as humanProjectionViewId,Qg as incompleteWorkProcessTraceFixture,Gd as inspectLearningPolicy,Kd as inspectLearningTaskQueue,ac as inspectTaskEvidence,Hc as intakeDate,Gc as intakeId,Tg as invalidRawEvidenceFixture,Mf as isScorableOutcome,pb as judgeCommittedSpend,Ad as learningEvidenceId,Bd as learningOperationId,Ub as learningRef,vd as learningResourceSchemas,Dd as learningScheduleId,da as loadReleasedProfileEvaluationCatalog,ea as loadReleasedProfileEvaluationCatalogAssets,cc as mapTaskSourceRecord,ud as matchRewardFixture,Dh as materializePreferenceDatasetRelease,Wi as mergeTelemetryItems,sb as nextNightlyOccurrence,si as optimizerEligibleRollouts,Qh as orderTasksetRunReceipts,ld as parseRewardAuthoringObject,Q as policyTaskView,ha as portableDeterministicCheck,Rd as previewTaskIntake,uh as projectPairwiseWinFraction,Hd as qualifyRewardCheck,ti as qualifyRolloutBatch,dc as readTaskJsonPointer,ie as reconcileLearningCandidateDecision,$i as redactTelemetryAttributes,_i as redactTelemetryEvent,ej as redactTelemetryExportBundle,Hf as regradeRewardReceipt,zd as requireLearningRelease,yd as requireLearningResource,Ha as resolveBoundRewards,Cd as resolveLearningTrainingParent,ca as resolveProfileEvaluationRunSource,Sg as revokedWorkEvidenceEligibilityFixture,kd as rewardAuthoringFields,de as rewardCalibrationClosureAsset,Xe as rewardEligibleReceipts,Vd as rewardFixtureFromRating,Vb as sameLearningRef,Wb as sealLearningContent,jc as sealTaskBatch,Qa as standaloneHarnessExperimentTools,Zi as summarizeMetric,Ed as synchronizeLearningSchedule,fc as taskAttemptEvidence,mc as taskBatchPackageMetadata,ic as taskFamilyReservations,ec as taskRecordFromEvidence,Nh as tasksetRunMetricPolicy,Vi as telemetryIdempotencyKey,Mg as toWorkEvidenceAuthoringInput,R as trainingPolicyTaskViews,mh as validateComparisonAssignment,Li as validateCoreMetricObservation,Mi as validateMetricObservation,ba as validateProfileEvaluationCatalog,bc as validateSourceSubmission,z as validateTaskSchema,A as validateTaskValue,O as validateTasksetRelease,Jf as verifyArtifactManifest,Te as verifyAttemptReceipt,ri as verifyCanonicalRolloutRecord,lh as verifyComparisonAssignment,If as verifyEnvironmentRelease,jb as verifyExperimentEvidence,$b as verifyLearningTextAsset,_h as verifyModelImprovementQualificationReceipt,Wa as verifyNativeHarnessExperimentAttempt,rh as verifyPreferenceAggregationReceipt,th as verifyPreferenceCalibrationReport,jh as verifyPreferenceComparisonRelease,Eh as verifyPreferenceDatasetRelease,ph as verifyPreferenceReceipt,W as verifyProfileExternalDatasetBinding,Of as verifyRequiredOutputs,ae as verifyRewardCalibrationClosure,Gh as verifyRewardModelQualificationReport,Lf as verifyRewardReceipt,ra as verifyTaskGrade,dj as verifyTelemetryExportBundle,Kf as verifyVerifierSetRelease,Jg as verifyWorkEvidenceEligibility,yg as verifyWorkEvidenceReceipt,zg as verifyWorkFeedbackReceipt,xg as verifyWorkProcessTrace,Ug as workEvidenceConformance,Ag as workEvidenceReceiptRef,rg as workSourceOpaqueRef,sg as workWorkspaceOpaqueRef};
|
package/dist/chunks/{evaluation-coordination-3ARLJAFH.js → evaluation-coordination-WZT6FDMS.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as p,b as v}from"./chunk-
|
|
2
|
+
import{a as p,b as v}from"./chunk-ZVMQLIRA.js";import"./chunk-6HQUIKC5.js";import"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as r}from"./chunk-3M53YXEI.js";import"./chunk-CRDKBFRN.js";import{s as d,t as s,u as h,v as w}from"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as m}from"./chunk-FTQLQJQV.js";async function b(t,e,n){let[a,o]=n,i=r(e,"actor");if(!i||!a||n.length>2)throw new Error("Select --actor, --team and an evaluation command.");if(e.local!==!0&&e.local!=="true")throw new Error("These evaluation owners currently run through the authenticated native bridge. Select --local --server-url with its loopback origin.");let c={...await v(e),actorId:i,projectId:r(e,"project")||null},l=a==="request"?await p(e):a==="list"?t==="schedule"?{operation:a,...r(e,"cursor")?{cursor:r(e,"cursor")}:{},limit:Number(r(e,"limit")||50)}:{operation:a}:{operation:a,id:o};if((a==="request"||a==="list")&&o)throw new Error("This operation does not accept an additional resource id.");let u=AbortSignal.timeout(6e4),f=t==="schedule"?await new s(c).command(d.parse(l),u):await new w(c).command(h.parse(l),u);console.log(JSON.stringify(f,null,2))}m(b,"runEvaluationCoordinationCommand");export{b as runEvaluationCoordinationCommand};
|
package/dist/chunks/{experiment-improvements-UB4C5CSP.js → experiment-improvements-H35VS6XZ.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as s,b as l}from"./chunk-
|
|
2
|
+
import{a as s,b as l}from"./chunk-ZVMQLIRA.js";import"./chunk-6HQUIKC5.js";import"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as e}from"./chunk-3M53YXEI.js";import"./chunk-CRDKBFRN.js";import{q as m,r as c}from"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a}from"./chunk-FTQLQJQV.js";async function f(t,i){let[r,o]=i,n=e(t,"actor");if(!n||!r||i.length>2)throw new Error("usage: improve <list|read|instructions|request> [id] --team <id> --actor <owner-id> [--input-file <path>] [--local --server-url <loopback-origin>]");let u=m.parse(r==="request"?await s(t):r==="list"?{operation:r,limit:Number(e(t,"limit")||30),...e(t,"cursor")?{cursor:e(t,"cursor")}:{}}:{operation:r,id:o});if(r==="request"&&o||r==="list"&&o)throw new Error("This operation does not accept a candidate id.");let d=new c({...await l(t),actorId:n});console.log(JSON.stringify(await d.command(u,AbortSignal.timeout(6e4)),null,2))}a(f,"runExperimentImprovementsCommand");export{f as runExperimentImprovementsCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as W,b as C,d as Q}from"./chunk-TVDZXDQW.js";import{a as k,d as A}from"./chunk-KOKBDIGR.js";import"./chunk-7P5SH3CI.js";import{c as M}from"./chunk-TGULVWPV.js";import"./chunk-NABPZ7AK.js";import"./chunk-BQVB2SPF.js";import"./chunk-XRKFTPHD.js";import{c as D,f as F}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as n,f as q}from"./chunk-3M53YXEI.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-7PKTCMZ6.js";import"./chunk-LXZLLTYQ.js";import"./chunk-AF3AVDPP.js";import"./chunk-SFR32TMJ.js";import"./chunk-5KJMFK65.js";import{s as P}from"./chunk-Y3B6ZUE6.js";import"./chunk-OKEC2EIE.js";import{Sb as V}from"./chunk-WLZJOCLA.js";import"./chunk-HIQPGYVH.js";import"./chunk-ZWW227M3.js";import"./chunk-DXA2UHBE.js";import"./chunk-MTP3B2SU.js";import"./chunk-CRDKBFRN.js";import{n as K,o as G}from"./chunk-DMO3UIS7.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import{d as B}from"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-L4EJ5R3B.js";import"./chunk-6ZTP6CUJ.js";import"./chunk-TBODQT4W.js";import"./chunk-YRDPVTEI.js";import{m as z,q as J}from"./chunk-JRGECNP3.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-5WPMI6QX.js";import"./chunk-W7NXFRHN.js";import"./chunk-5HPZGLOL.js";import{b as $}from"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-G4E3WGLM.js";import{Fb as U}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{h as _,n as T}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as e}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as w}from"./chunk-FTQLQJQV.js";import{readFile as j,stat as O}from"node:fs/promises";var E=e.string().trim().min(1).max(500),X=e.string().regex(/^[a-f0-9]{64}$/),ne=e.object({schemaVersion:e.literal("openpond.experimentCaseInspection.v1"),teamId:E,executionId:E,manifestHash:X,receiptId:E,taskId:E,seed:e.string().min(1),input:e.record(e.string(),e.unknown()).nullable(),output:e.unknown().nullable(),error:e.string().nullable(),events:e.array(e.record(e.string(),e.unknown())).max(25),nextEventCursor:E.nullable(),eventCount:e.number().int().nonnegative()}).strict(),ie=ne.extend({contentHash:X}).strict(),L=class{constructor(s){this.options=s;let a=new URL(s.baseUrl);if(!["http:","https:"].includes(a.protocol)||a.username||a.password||a.search||a.hash||!s.apiKey.trim()||!s.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=a.toString().replace(/\/+$/,"")}options;static{w(this,"OpenPondExperimentInspectionClient")}baseUrl;async case(s,a,t={}){let c=new URLSearchParams(t.afterId?{afterId:E.parse(t.afterId)}:{}),h=await(this.options.fetch??fetch)(`${this.baseUrl}/v1/experiments/${encodeURIComponent(E.parse(s))}/cases/${encodeURIComponent(E.parse(a))}?${c}`,{signal:t.signal,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,Accept:"application/json"}}),b=await h.json();if(!h.ok)throw new Error(e.object({message:e.string()}).parse(b).message);let d=ie.parse(b),{contentHash:i,...o}=d;if(T(o)!==i||d.teamId!==this.options.teamId||d.executionId!==s||d.receiptId!==a||t.manifestHash&&d.manifestHash!==t.manifestHash||d.events.length>d.eventCount)throw new Error("Case inspection differs from its requested workspace, execution or retained content.");return d}};import{readFile as me,stat as ae}from"node:fs/promises";var y=e.string().trim().min(1).max(240),oe=e.object({location:e.literal("local").default("local"),jobId:y,modelRunId:y,modelId:y,modelVersionId:y.nullable(),adapterArtifactLineageId:y.nullable(),owner:e.object({teamId:y,actorId:y}).strict(),taskset:_,state:e.enum(["prepared","running","succeeded","failed","cancelled"]),executionState:e.enum(["queued","starting","running","cancelling","cancelled","succeeded","failed","reconciling"]),updatedAt:e.iso.datetime()}).strict(),se=e.object({location:e.literal("cloud"),jobId:y,owner:e.object({teamId:y,actorId:y}).strict(),apiOrigin:e.url(),job:V,updatedAt:e.iso.datetime()}).strict().refine(r=>r.jobId===r.job.id&&r.owner.teamId===r.job.teamId&&r.updatedAt===r.job.updatedAt,"Hosted training attachment must match its canonical job."),Y=e.union([oe,se]);var u=e.string().trim().min(1).max(240),x=e.string().regex(/^[a-f0-9]{64}$/),ce=e.object({kind:e.enum(["structure","graders"]),revision:e.number().int().positive(),workspaceHash:x,status:e.enum(["passed","failed","unavailable"]),checkedAt:e.iso.datetime(),checked:e.number().int().nonnegative(),total:e.number().int().nonnegative(),issues:e.array(e.object({code:e.string(),message:e.string(),taskId:u.optional(),graderId:u.optional()})).max(1e4),scopes:e.array(e.object({graderId:u,checked:e.number().int().nonnegative(),total:e.number().int().nonnegative(),status:e.enum(["passed","failed","unavailable"])}).strict()).max(1e3).optional()}).strict(),le=e.object({apiOrigin:e.url(),actorId:u,teamId:u,datasetId:u,remoteRevision:e.number().int().nonnegative(),acknowledgedHash:x.nullable(),remoteHash:x.nullable(),pendingLocalHash:x.nullable(),paused:e.boolean(),status:e.enum(["pending","syncing","synced","retry","conflict","paused"]),error:e.string().nullable(),operationId:u.nullable(),pendingWorkspace:P.nullable(),beginVersionOperationId:u.nullable().optional(),publicationIntent:e.object({operationId:u,expectedRevision:e.number().int().positive(),workspaceHash:x,packageHash:x,localHash:x}).strict().nullable().optional()}).strict(),Pe=e.object({schemaVersion:e.literal("openpond.localDataset.v1"),ownerId:u,projectId:u.nullable(),workspace:P,checks:e.array(ce).max(2),packageHash:x.nullable(),sync:le.nullable()}).strict(),v=e.object({kind:e.enum(["dataset","grader","experiment"]),id:u,revision:e.number().int().positive(),name:e.string().max(500),state:e.string().max(100),datasetId:u.optional(),datasetRevision:e.number().int().positive().optional(),taskCount:e.number().int().nonnegative().optional(),graderCount:e.number().int().nonnegative().optional(),checkState:e.string().optional(),syncState:e.string().optional(),model:e.string().optional(),evaluationHash:x.optional(),graderId:u.optional(),graderType:e.string().optional(),description:e.string().optional(),location:e.enum(["local","cloud"]).optional(),scoreLabel:e.string().optional(),owner:e.object({teamId:u,actorId:u}).strict().optional(),contentHash:x.optional(),profileRef:W.optional(),score:e.number().nullable().optional(),costUsd:e.number().nonnegative().nullable().optional(),evaluatedCount:e.number().int().nonnegative().optional(),failedCount:e.number().int().nonnegative().optional(),qualityFailureCount:e.number().int().nonnegative().optional(),executionFailureCount:e.number().int().nonnegative().optional(),ungradedCount:e.number().int().nonnegative().optional(),rows:e.array(e.object({id:u,label:e.string(),detail:e.string(),score:e.number().nullable().optional()})).max(10)}).strict(),Z=e.object({id:u,ordinal:e.number().int().positive(),name:e.string().trim().min(1).max(500),dataset:v.nullable(),evaluationModel:e.string().min(1).max(500).optional(),executionLocation:e.enum(["local","cloud"]).optional(),graders:e.array(v),selectedGraderId:u.nullable(),runs:e.array(v),selectedRunId:u.nullable(),training:e.array(Y).optional(),selectedTrainingKey:e.string().max(4e3).nullable().optional(),selectedTrainingJobId:u.nullable().optional(),turnIds:e.array(u),operationId:u,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).strict(),de=Z.extend({ordinal:e.null()}),He=e.object({datasetFocus:de.optional(),scopes:e.array(Z),activeScopeId:u.nullable(),selectionVersion:e.number().int().nonnegative(),selectedAt:e.iso.datetime().nullable(),selectionOperations:e.record(e.string(),e.object({hash:x,version:e.number().int().nonnegative(),visualPublicationId:e.string().optional(),resource:v.optional()}).strict()).default({})}).strict();var Ne=e.object({action:e.enum(["schema","list","read","create","save","file","validate","check_graders","check_sources","package","import","inspect_source","import_source","upload","sync","pause_sync","disconnect_sync","related_chats","list_graders","read_grader","save_grader","test_grader","publish"]),id:u.optional(),operationId:u.optional(),expectedRevision:e.number().int().nonnegative().optional(),payload:e.record(e.string(),e.unknown()).default({})}).strict(),qe=e.object({contentHash:x,scope:e.string(),graders:e.unknown(),cases:e.array(e.object({id:u,taskId:u,seed:e.string(),status:e.string(),output:e.string().nullable(),error:e.string().nullable(),score:e.number().nullable()}).strict()).max(1e4)}).strict();function ee(r){let s=r&&typeof r=="object"?r:{},a=[s.summary,...Array.isArray(s.summaries)?s.summaries:[]].flatMap(t=>{let c=v.safeParse(t);return c.success?[c.data]:[]});if(a.length){for(let t of a)console.log(`${t.name} \xB7 ${t.state}`),console.log(`${t.id} \xB7 ${t.location??"local"} \xB7 Dataset ${t.datasetId} version ${t.datasetRevision} \xB7 ${t.model}`),console.log(`${t.scoreLabel??"Mean task score"}: ${t.score==null?"Unavailable":(t.score*100).toFixed(1)+"%"} \xB7 Graded: ${t.evaluatedCount??0}/${t.taskCount??0} \xB7 Cost: ${t.costUsd==null?"Unavailable":"$"+t.costUsd.toFixed(4)}`),console.log(`Quality failures: ${t.qualityFailureCount??0} \xB7 Execution failures: ${t.executionFailureCount??0} \xB7 Ungraded: ${t.ungradedCount??t.taskCount??0}`),t.rows.length&&console.table(t.rows.map(c=>({Task:c.label,Outcome:c.detail,Score:c.score==null?"Unavailable":(c.score*100).toFixed(1)+"%"}))),console.log(`Results: openpond experiments result ${t.id} --local`);Array.isArray(s.items)&&console.table(s.items.flatMap(t=>{let c=C.safeParse(t);return c.success?[{ID:c.data.id,Name:c.data.configuration.request.name,Model:c.data.model.modelId,Status:c.data.status}]:[]}));for(let t of Array.isArray(s.errors)?s.errors:[])console.log(`Admission failed: ${t.modelId} \xB7 ${t.message}`);return}if(Array.isArray(s.models)){console.table(s.models);return}if(Array.isArray(s.items)){console.table(s.items.flatMap(t=>{let c=C.safeParse(t);return c.success?[{ID:c.data.id,Name:c.data.configuration.request.name,Model:c.data.model.modelId,Status:c.data.status}]:[]}));return}console.log(JSON.stringify(r,null,2))}w(ee,"printLocalExperimentResult");import{readFile as ue,stat as pe}from"node:fs/promises";var H={"profile-catalog":"/v1/profile/evaluations","prepare-profile":"/v1/profile/evaluations/prepare","run-profile":"/v1/profile/evaluations/run","inspect-profile":"/v1/profile/evaluations/discover"};async function te(r,s){let a=s[0];if(!a||!Object.hasOwn(H,a))return!1;if(s.length!==1||r.team||r.revision||r.contentHash)throw new Error("Profile experiments accept one action and exact selection in --input-file; ownership is resolved by the running installation.");let t=new URL(n(r,"serverUrl")||process.env.OPENPOND_LOCAL_API_URL||k);if(t.protocol!=="http:"||!["localhost","127.0.0.1"].includes(t.hostname)||t.username||t.password||t.search||t.hash||t.pathname!=="/")throw new Error("Local Profile experiments require an HTTP loopback server origin.");let c=n(r,"inputFile"),h;if(c){let l=await pe(c);if(!l.isFile()||l.size>1048576)throw new Error("Profile selection input must be a file within one MiB.");let S=JSON.parse(await ue(c,"utf8"));if(!S||typeof S!="object"||Array.isArray(S))throw new Error("Profile selection input must be an object.");h=S}else if(a!=="profile-catalog")throw new Error(`${a} requires --input-file with the exact Profile or run selection.`);let b=a==="profile-catalog"&&h?H["inspect-profile"]:H[a],i=await(await A(t.origin,{maximumResponseBytes:32*1024*1024,timeoutMs:a==="run-profile"||a==="prepare-profile"?12e5:6e4}))(new URL(b,t),{method:h?"POST":"GET",...h?{headers:{"content-type":"application/json"},body:JSON.stringify({...h,...["prepare-profile","run-profile","inspect-profile"].includes(a)&&process.env.OPENPOND_CHAT_INVOCATION?{invocationToken:process.env.OPENPOND_CHAT_INVOCATION}:{}})}:{}}),o=await i.json();if(!i.ok){let l=o&&typeof o=="object"&&"error"in o?o.error:void 0;throw new Error(typeof l=="string"?l:`Local Profile experiment request failed (${i.status}).`)}return console.log(JSON.stringify(o,null,2)),!0}w(te,"runLocalProfileExperimentCommand");async function re(r,s){if(await te(r,s))return;let[a,t,c]=s,h=n(r,"team"),b=n(r,"receiptId");if(a==="case"&&(!t||s.length!==2||!b))throw new Error("Usage: experiments case <run-id> --local --receipt-id <retained-receipt-id> [--after-sequence <n>] [--limit <1..500>] --json. A task id is not a receipt id; find receiptId in experiments result <run-id> --local --json (independent runs: evidence.cases[].receiptId).");if(r.revision!==void 0)throw new Error("A local Experiment is one immutable run; read it by id rather than a saved configuration revision.");if(a!=="read"&&r.contentHash!==void 0)throw new Error("An exact configuration hash requires the local read action.");if(!a||s.length>(a==="compare"?3:2))throw new Error("Local Experiments require an action; use --server-url for an existing local server.");let d=n(r,"serverUrl")||process.env.OPENPOND_LOCAL_API_URL||k,i=new URL(d);if(i.protocol!=="http:"||!["localhost","127.0.0.1"].includes(i.hostname)||i.username||i.password||i.search||i.hash||i.pathname!=="/")throw new Error("Local Experiments require an HTTP loopback server origin.");let o=await A(i.origin,{timeoutMs:["prepare-harness","run"].includes(a)?12e5:6e4});async function l(f,g){let p=await o(new URL(h?"/v1/local-experiments":"/v1/chat-experiments",i),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...h?{teamId:h}:{},...process.env.OPENPOND_CHAT_INVOCATION?{invocationToken:process.env.OPENPOND_CHAT_INVOCATION}:{},action:f,payload:g})}),I=await p.json();if(!p.ok)throw new Error(typeof I.error=="string"?I.error:`Local Experiment request failed (${p.status}).`);return I}w(l,"command");async function S(){let f=n(r,"inputFile");if(!f||!(await ae(f)).isFile()||(await ae(f)).size>67108864)throw new Error("Provide a bounded --input-file with exact local configuration and retained package bytes.");return JSON.parse(await me(f,"utf8"))}w(S,"input");let m;if(!h){if(a==="models")m=await l("models",{});else if(a==="run"||a==="run-cloud")m=await l(a.replaceAll("-","_"),await S());else if(a==="list"){let f=n(r,"afterId"),g=n(r,"limit");m=await l("list",{...f?{afterId:f}:{},...g?{limit:Number(g)}:{}})}else if(a==="compare"&&t&&c)m=await l("compare",{baselineId:t,candidateId:c});else if(a==="case"&&t&&b){let f=n(r,"afterSequence"),g=n(r,"limit");m=await l("case",{id:t,receiptId:b,...f?{afterSequence:Number(f)}:{},...g?{limit:Number(g)}:{}})}else if(t&&["read","status","cancel","result"].includes(a))m=await l(a,{id:t});else throw new Error("Independent local Experiments support models/run/list/read/status/cancel/result/compare/case. Workspace operations require --team.");q(r.json)?console.log(JSON.stringify(m,null,2)):ee(m);return}if(a==="prepare-harness"){if(t)throw new Error("Local Profile preparation accepts --input-file rather than an id.");m=await l("prepareHarness",await S())}else if(a==="run"){if(t)throw new Error("Local Run accepts reviewed configuration through --input-file rather than an id.");let f=await S();m=await l(f.package?"run":"runFromRelease",f)}else if(a==="list"){if(t)throw new Error("Local List does not accept an id.");let f=n(r,"status"),g=n(r,"limit"),p=n(r,"project"),I=n(r,"afterId"),R=n(r,"datasetHash"),N=n(r,"search");m=await l("list",{...f?{status:f}:{},...p?{projectId:p}:{},...R?{datasetHash:R}:{},...N?{search:N}:{},...I?{afterId:I}:{},...g?{limit:Number(g)}:{}})}else{if(!t)throw new Error(`${a} requires a local Experiment or scoring pass id.`);let f=n(r,"afterId"),g=n(r,"limit");if(a==="duplicate"){let p=n(r,"operationId");if(!p)throw new Error("Duplicate requires --operation-id for safe replay.");let I=C.parse(await l("read",{id:t})),R=J.parse({...I.configuration,operationId:p,request:{...I.configuration.request,operationId:p},sourceExperimentId:I.id});m=await l("runFromRelease",{configuration:R,expectedPackageHash:I.packageHash})}else if(a==="passes")m=await l("passes",{executionId:t,...f?{afterId:f}:{},...g?{limit:Number(g)}:{}});else if(a==="case"){let p=n(r,"afterSequence");m=await l("case",{id:t,receiptId:b,...p?{afterSequence:Number(p)}:{},...g?{limit:Number(g)}:{}})}else if(a==="score"){let p=await S();if(p.execution?.id!==t)throw new Error("Local scoring input belongs to a different retained execution.");m=await l("score",p)}else if(a==="compare"){if(!c)throw new Error("Local Compare requires baseline and candidate execution ids.");let p=Q.parse(await l("compare",{baselineId:t,candidateId:c}));m={...p,comparison:U(p.baseline,p.candidate)}}else if(a==="read"){let p=n(r,"contentHash");m=await l("read",{id:t,...p?{configurationHash:p}:{}})}else if(["status","cancel","result","pass"].includes(a))m=await l(a,{id:t});else if(a==="cancel-pass")m=await l("cancel",{id:t});else if(a==="pass-result")m=await l("result",{id:t});else throw new Error(`Local Experiment action is unavailable: ${a}`)}console.log(JSON.stringify(m,null,2))}w(re,"runLocalExperimentsCommand");async function lt(r,s){if(s[0]==="signal-plan"||s[0]==="signal-report")return(await import("./experiments-signal-MTR475QV.js")).runExperimentsSignalCommand(r,s);if(r.local===!0||r.local==="true")return re(r,s);if(r.revision!==void 0||r.contentHash!==void 0)throw new Error("Experiments retain their immutable configuration on the run; definition revisions are not selectable.");let[a,t]=s,c=n(r,"team");if(!c||!a||s.length>(a==="compare"?3:2))throw new Error("usage: experiments <defaults|create-comparison|comparison-budget|prepare-harness|run|read|list|status|diagnostics|cancel|duplicate|score|passes|pass|cancel-pass|pass-result|result|compare|case> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>]");let h=await B(),b={teamId:c,apiKey:await M(h,F(h)),baseUrl:D(r)??h.apiBaseUrl??$},d=new G(b),i;if(a==="defaults"){if(t)throw new Error("Defaults does not accept an id.");i=await d.defaults()}else if(a==="create-comparison"){let o=n(r,"inputFile");if(!o||t||(await O(o)).size>1048576)throw new Error("Create comparison requires a bounded input file with an id, fresh operationIds and optional maximumSpendUsd.");i=await d.createComparisonBudget(JSON.parse(await j(o,"utf8")))}else if(a==="comparison-budget"){if(!t)throw new Error("Comparison budget requires an id.");i=await d.comparisonBudget(t)}else if(a==="prepare-harness"){let o=n(r,"inputFile");if(!o||t||(await O(o)).size>1048576)throw new Error("Harness preparation requires a bounded --input-file with its released target, model and optional ceiling.");i=await d.prepareHarness(JSON.parse(await j(o,"utf8")))}else if(a==="run"){let o=n(r,"inputFile");if(!o||t)throw new Error("Run requires --input-file with the reviewed configuration and stable operationId.");if((await O(o)).size>1048576)throw new Error("Experiment input exceeds one MiB.");i=await d.run(JSON.parse(await j(o,"utf8")))}else if(a==="list"){if(t)throw new Error("List does not accept an Experiment id.");let o=n(r,"limit");i=await d.list(z.parse({projectId:n(r,"project")||void 0,datasetHash:n(r,"datasetHash")||void 0,search:n(r,"search")||void 0,status:n(r,"status")||void 0,afterId:n(r,"afterId")||void 0,...o?{limit:Number(o)}:{}}))}else{if(!t)throw new Error(`${a} requires an id.`);if(a==="read")i=await d.get(t);else if(a==="status")i=await d.get(t);else if(a==="diagnostics"){let o=await d.get(t),l=n(r,"afterSequence");i=await d.diagnostics(t,{manifestHash:o.manifest.contentHash,...l?{afterSequence:Number(l)}:{},afterCallId:n(r,"afterCallId")||void 0})}else if(a==="cancel")i=await d.cancel(t);else if(a==="duplicate"){let o=n(r,"operationId");if(!o)throw new Error("Duplicate requires a stable --operation-id for the new Experiment.");i=await d.duplicate(t,o)}else if(a==="score"){let o=n(r,"inputFile");if(!o||(await O(o)).size>1048576)throw new Error("Score requires --input-file containing an exact execution reference, grader releases and explicit ceiling, within one MiB.");let l=K.parse(JSON.parse(await j(o,"utf8")));if(l.execution.id!==t)throw new Error("Scoring input belongs to a different execution.");i=await d.score(l)}else if(a==="passes")i=await d.scoringPasses(t,{afterId:n(r,"afterId")||void 0});else if(a==="pass")i=await d.scoringPass(t);else if(a==="cancel-pass")i=await d.cancelScoringPass(t);else if(a==="pass-result")i=await d.scoringResult(t);else if(a==="result")i=await d.result(t);else if(a==="case"){let o=n(r,"receiptId");if(!o)throw new Error("Case inspection requires --receipt-id from the retained Experiment.");let l=await d.get(t);i=await new L(b).case(t,o,{manifestHash:l.manifest.contentHash,afterId:n(r,"afterId")||void 0})}else if(a==="compare"){if(!s[2])throw new Error("Compare requires a baseline and candidate execution id.");i=await d.compare(t,s[2])}else throw new Error(`Unknown Experiment action: ${a}`)}console.log(JSON.stringify(i,null,2))}w(lt,"runExperimentsCommand");export{lt as runExperimentsCommand};
|
|
2
|
+
import{a as W,b as C,d as Q}from"./chunk-5QOFUGYQ.js";import{a as k,d as A}from"./chunk-6HQUIKC5.js";import"./chunk-7P5SH3CI.js";import{c as M}from"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import{c as D,f as F}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as n,f as q}from"./chunk-3M53YXEI.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import{s as P}from"./chunk-QOUOU7FE.js";import"./chunk-TS5HNRZB.js";import{Sb as V}from"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-CRDKBFRN.js";import{n as K,o as G}from"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import{d as B}from"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import{m as z,q as J}from"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import{b as $}from"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-XHU4BZQY.js";import{Fb as U}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{h as _,n as T}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as e}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as w}from"./chunk-FTQLQJQV.js";import{readFile as j,stat as O}from"node:fs/promises";var E=e.string().trim().min(1).max(500),X=e.string().regex(/^[a-f0-9]{64}$/),ne=e.object({schemaVersion:e.literal("openpond.experimentCaseInspection.v1"),teamId:E,executionId:E,manifestHash:X,receiptId:E,taskId:E,seed:e.string().min(1),input:e.record(e.string(),e.unknown()).nullable(),output:e.unknown().nullable(),error:e.string().nullable(),events:e.array(e.record(e.string(),e.unknown())).max(25),nextEventCursor:E.nullable(),eventCount:e.number().int().nonnegative()}).strict(),ie=ne.extend({contentHash:X}).strict(),L=class{constructor(s){this.options=s;let a=new URL(s.baseUrl);if(!["http:","https:"].includes(a.protocol)||a.username||a.password||a.search||a.hash||!s.apiKey.trim()||!s.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=a.toString().replace(/\/+$/,"")}options;static{w(this,"OpenPondExperimentInspectionClient")}baseUrl;async case(s,a,t={}){let c=new URLSearchParams(t.afterId?{afterId:E.parse(t.afterId)}:{}),h=await(this.options.fetch??fetch)(`${this.baseUrl}/v1/experiments/${encodeURIComponent(E.parse(s))}/cases/${encodeURIComponent(E.parse(a))}?${c}`,{signal:t.signal,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,Accept:"application/json"}}),b=await h.json();if(!h.ok)throw new Error(e.object({message:e.string()}).parse(b).message);let d=ie.parse(b),{contentHash:i,...o}=d;if(T(o)!==i||d.teamId!==this.options.teamId||d.executionId!==s||d.receiptId!==a||t.manifestHash&&d.manifestHash!==t.manifestHash||d.events.length>d.eventCount)throw new Error("Case inspection differs from its requested workspace, execution or retained content.");return d}};import{readFile as me,stat as ae}from"node:fs/promises";var y=e.string().trim().min(1).max(240),oe=e.object({location:e.literal("local").default("local"),jobId:y,modelRunId:y,modelId:y,modelVersionId:y.nullable(),adapterArtifactLineageId:y.nullable(),owner:e.object({teamId:y,actorId:y}).strict(),taskset:_,state:e.enum(["prepared","running","succeeded","failed","cancelled"]),executionState:e.enum(["queued","starting","running","cancelling","cancelled","succeeded","failed","reconciling"]),updatedAt:e.iso.datetime()}).strict(),se=e.object({location:e.literal("cloud"),jobId:y,owner:e.object({teamId:y,actorId:y}).strict(),apiOrigin:e.url(),job:V,updatedAt:e.iso.datetime()}).strict().refine(r=>r.jobId===r.job.id&&r.owner.teamId===r.job.teamId&&r.updatedAt===r.job.updatedAt,"Hosted training attachment must match its canonical job."),Y=e.union([oe,se]);var u=e.string().trim().min(1).max(240),x=e.string().regex(/^[a-f0-9]{64}$/),ce=e.object({kind:e.enum(["structure","graders"]),revision:e.number().int().positive(),workspaceHash:x,status:e.enum(["passed","failed","unavailable"]),checkedAt:e.iso.datetime(),checked:e.number().int().nonnegative(),total:e.number().int().nonnegative(),issues:e.array(e.object({code:e.string(),message:e.string(),taskId:u.optional(),graderId:u.optional()})).max(1e4),scopes:e.array(e.object({graderId:u,checked:e.number().int().nonnegative(),total:e.number().int().nonnegative(),status:e.enum(["passed","failed","unavailable"])}).strict()).max(1e3).optional()}).strict(),le=e.object({apiOrigin:e.url(),actorId:u,teamId:u,datasetId:u,remoteRevision:e.number().int().nonnegative(),acknowledgedHash:x.nullable(),remoteHash:x.nullable(),pendingLocalHash:x.nullable(),paused:e.boolean(),status:e.enum(["pending","syncing","synced","retry","conflict","paused"]),error:e.string().nullable(),operationId:u.nullable(),pendingWorkspace:P.nullable(),beginVersionOperationId:u.nullable().optional(),publicationIntent:e.object({operationId:u,expectedRevision:e.number().int().positive(),workspaceHash:x,packageHash:x,localHash:x}).strict().nullable().optional()}).strict(),Pe=e.object({schemaVersion:e.literal("openpond.localDataset.v1"),ownerId:u,projectId:u.nullable(),workspace:P,checks:e.array(ce).max(2),packageHash:x.nullable(),sync:le.nullable()}).strict(),v=e.object({kind:e.enum(["dataset","grader","experiment"]),id:u,revision:e.number().int().positive(),name:e.string().max(500),state:e.string().max(100),datasetId:u.optional(),datasetRevision:e.number().int().positive().optional(),taskCount:e.number().int().nonnegative().optional(),graderCount:e.number().int().nonnegative().optional(),checkState:e.string().optional(),syncState:e.string().optional(),model:e.string().optional(),evaluationHash:x.optional(),graderId:u.optional(),graderType:e.string().optional(),description:e.string().optional(),location:e.enum(["local","cloud"]).optional(),scoreLabel:e.string().optional(),owner:e.object({teamId:u,actorId:u}).strict().optional(),contentHash:x.optional(),profileRef:W.optional(),score:e.number().nullable().optional(),costUsd:e.number().nonnegative().nullable().optional(),evaluatedCount:e.number().int().nonnegative().optional(),failedCount:e.number().int().nonnegative().optional(),qualityFailureCount:e.number().int().nonnegative().optional(),executionFailureCount:e.number().int().nonnegative().optional(),ungradedCount:e.number().int().nonnegative().optional(),rows:e.array(e.object({id:u,label:e.string(),detail:e.string(),score:e.number().nullable().optional()})).max(10)}).strict(),Z=e.object({id:u,ordinal:e.number().int().positive(),name:e.string().trim().min(1).max(500),dataset:v.nullable(),evaluationModel:e.string().min(1).max(500).optional(),executionLocation:e.enum(["local","cloud"]).optional(),graders:e.array(v),selectedGraderId:u.nullable(),runs:e.array(v),selectedRunId:u.nullable(),training:e.array(Y).optional(),selectedTrainingKey:e.string().max(4e3).nullable().optional(),selectedTrainingJobId:u.nullable().optional(),turnIds:e.array(u),operationId:u,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).strict(),de=Z.extend({ordinal:e.null()}),He=e.object({datasetFocus:de.optional(),scopes:e.array(Z),activeScopeId:u.nullable(),selectionVersion:e.number().int().nonnegative(),selectedAt:e.iso.datetime().nullable(),selectionOperations:e.record(e.string(),e.object({hash:x,version:e.number().int().nonnegative(),visualPublicationId:e.string().optional(),resource:v.optional()}).strict()).default({})}).strict();var Ne=e.object({action:e.enum(["schema","list","read","create","save","file","validate","check_graders","check_sources","package","import","inspect_source","import_source","upload","sync","pause_sync","disconnect_sync","related_chats","list_graders","read_grader","save_grader","test_grader","publish"]),id:u.optional(),operationId:u.optional(),expectedRevision:e.number().int().nonnegative().optional(),payload:e.record(e.string(),e.unknown()).default({})}).strict(),qe=e.object({contentHash:x,scope:e.string(),graders:e.unknown(),cases:e.array(e.object({id:u,taskId:u,seed:e.string(),status:e.string(),output:e.string().nullable(),error:e.string().nullable(),score:e.number().nullable()}).strict()).max(1e4)}).strict();function ee(r){let s=r&&typeof r=="object"?r:{},a=[s.summary,...Array.isArray(s.summaries)?s.summaries:[]].flatMap(t=>{let c=v.safeParse(t);return c.success?[c.data]:[]});if(a.length){for(let t of a)console.log(`${t.name} \xB7 ${t.state}`),console.log(`${t.id} \xB7 ${t.location??"local"} \xB7 Dataset ${t.datasetId} version ${t.datasetRevision} \xB7 ${t.model}`),console.log(`${t.scoreLabel??"Mean task score"}: ${t.score==null?"Unavailable":(t.score*100).toFixed(1)+"%"} \xB7 Graded: ${t.evaluatedCount??0}/${t.taskCount??0} \xB7 Cost: ${t.costUsd==null?"Unavailable":"$"+t.costUsd.toFixed(4)}`),console.log(`Quality failures: ${t.qualityFailureCount??0} \xB7 Execution failures: ${t.executionFailureCount??0} \xB7 Ungraded: ${t.ungradedCount??t.taskCount??0}`),t.rows.length&&console.table(t.rows.map(c=>({Task:c.label,Outcome:c.detail,Score:c.score==null?"Unavailable":(c.score*100).toFixed(1)+"%"}))),console.log(`Results: openpond experiments result ${t.id} --local`);Array.isArray(s.items)&&console.table(s.items.flatMap(t=>{let c=C.safeParse(t);return c.success?[{ID:c.data.id,Name:c.data.configuration.request.name,Model:c.data.model.modelId,Status:c.data.status}]:[]}));for(let t of Array.isArray(s.errors)?s.errors:[])console.log(`Admission failed: ${t.modelId} \xB7 ${t.message}`);return}if(Array.isArray(s.models)){console.table(s.models);return}if(Array.isArray(s.items)){console.table(s.items.flatMap(t=>{let c=C.safeParse(t);return c.success?[{ID:c.data.id,Name:c.data.configuration.request.name,Model:c.data.model.modelId,Status:c.data.status}]:[]}));return}console.log(JSON.stringify(r,null,2))}w(ee,"printLocalExperimentResult");import{readFile as ue,stat as pe}from"node:fs/promises";var H={"profile-catalog":"/v1/profile/evaluations","prepare-profile":"/v1/profile/evaluations/prepare","run-profile":"/v1/profile/evaluations/run","inspect-profile":"/v1/profile/evaluations/discover"};async function te(r,s){let a=s[0];if(!a||!Object.hasOwn(H,a))return!1;if(s.length!==1||r.team||r.revision||r.contentHash)throw new Error("Profile experiments accept one action and exact selection in --input-file; ownership is resolved by the running installation.");let t=new URL(n(r,"serverUrl")||process.env.OPENPOND_LOCAL_API_URL||k);if(t.protocol!=="http:"||!["localhost","127.0.0.1"].includes(t.hostname)||t.username||t.password||t.search||t.hash||t.pathname!=="/")throw new Error("Local Profile experiments require an HTTP loopback server origin.");let c=n(r,"inputFile"),h;if(c){let l=await pe(c);if(!l.isFile()||l.size>1048576)throw new Error("Profile selection input must be a file within one MiB.");let S=JSON.parse(await ue(c,"utf8"));if(!S||typeof S!="object"||Array.isArray(S))throw new Error("Profile selection input must be an object.");h=S}else if(a!=="profile-catalog")throw new Error(`${a} requires --input-file with the exact Profile or run selection.`);let b=a==="profile-catalog"&&h?H["inspect-profile"]:H[a],i=await(await A(t.origin,{maximumResponseBytes:32*1024*1024,timeoutMs:a==="run-profile"||a==="prepare-profile"?12e5:6e4}))(new URL(b,t),{method:h?"POST":"GET",...h?{headers:{"content-type":"application/json"},body:JSON.stringify({...h,...["prepare-profile","run-profile","inspect-profile"].includes(a)&&process.env.OPENPOND_CHAT_INVOCATION?{invocationToken:process.env.OPENPOND_CHAT_INVOCATION}:{}})}:{}}),o=await i.json();if(!i.ok){let l=o&&typeof o=="object"&&"error"in o?o.error:void 0;throw new Error(typeof l=="string"?l:`Local Profile experiment request failed (${i.status}).`)}return console.log(JSON.stringify(o,null,2)),!0}w(te,"runLocalProfileExperimentCommand");async function re(r,s){if(await te(r,s))return;let[a,t,c]=s,h=n(r,"team"),b=n(r,"receiptId");if(a==="case"&&(!t||s.length!==2||!b))throw new Error("Usage: experiments case <run-id> --local --receipt-id <retained-receipt-id> [--after-sequence <n>] [--limit <1..500>] --json. A task id is not a receipt id; find receiptId in experiments result <run-id> --local --json (independent runs: evidence.cases[].receiptId).");if(r.revision!==void 0)throw new Error("A local Experiment is one immutable run; read it by id rather than a saved configuration revision.");if(a!=="read"&&r.contentHash!==void 0)throw new Error("An exact configuration hash requires the local read action.");if(!a||s.length>(a==="compare"?3:2))throw new Error("Local Experiments require an action; use --server-url for an existing local server.");let d=n(r,"serverUrl")||process.env.OPENPOND_LOCAL_API_URL||k,i=new URL(d);if(i.protocol!=="http:"||!["localhost","127.0.0.1"].includes(i.hostname)||i.username||i.password||i.search||i.hash||i.pathname!=="/")throw new Error("Local Experiments require an HTTP loopback server origin.");let o=await A(i.origin,{timeoutMs:["prepare-harness","run"].includes(a)?12e5:6e4});async function l(f,g){let p=await o(new URL(h?"/v1/local-experiments":"/v1/chat-experiments",i),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...h?{teamId:h}:{},...process.env.OPENPOND_CHAT_INVOCATION?{invocationToken:process.env.OPENPOND_CHAT_INVOCATION}:{},action:f,payload:g})}),I=await p.json();if(!p.ok)throw new Error(typeof I.error=="string"?I.error:`Local Experiment request failed (${p.status}).`);return I}w(l,"command");async function S(){let f=n(r,"inputFile");if(!f||!(await ae(f)).isFile()||(await ae(f)).size>67108864)throw new Error("Provide a bounded --input-file with exact local configuration and retained package bytes.");return JSON.parse(await me(f,"utf8"))}w(S,"input");let m;if(!h){if(a==="models")m=await l("models",{});else if(a==="run"||a==="run-cloud")m=await l(a.replaceAll("-","_"),await S());else if(a==="list"){let f=n(r,"afterId"),g=n(r,"limit");m=await l("list",{...f?{afterId:f}:{},...g?{limit:Number(g)}:{}})}else if(a==="compare"&&t&&c)m=await l("compare",{baselineId:t,candidateId:c});else if(a==="case"&&t&&b){let f=n(r,"afterSequence"),g=n(r,"limit");m=await l("case",{id:t,receiptId:b,...f?{afterSequence:Number(f)}:{},...g?{limit:Number(g)}:{}})}else if(t&&["read","status","cancel","result"].includes(a))m=await l(a,{id:t});else throw new Error("Independent local Experiments support models/run/list/read/status/cancel/result/compare/case. Workspace operations require --team.");q(r.json)?console.log(JSON.stringify(m,null,2)):ee(m);return}if(a==="prepare-harness"){if(t)throw new Error("Local Profile preparation accepts --input-file rather than an id.");m=await l("prepareHarness",await S())}else if(a==="run"){if(t)throw new Error("Local Run accepts reviewed configuration through --input-file rather than an id.");let f=await S();m=await l(f.package?"run":"runFromRelease",f)}else if(a==="list"){if(t)throw new Error("Local List does not accept an id.");let f=n(r,"status"),g=n(r,"limit"),p=n(r,"project"),I=n(r,"afterId"),R=n(r,"datasetHash"),N=n(r,"search");m=await l("list",{...f?{status:f}:{},...p?{projectId:p}:{},...R?{datasetHash:R}:{},...N?{search:N}:{},...I?{afterId:I}:{},...g?{limit:Number(g)}:{}})}else{if(!t)throw new Error(`${a} requires a local Experiment or scoring pass id.`);let f=n(r,"afterId"),g=n(r,"limit");if(a==="duplicate"){let p=n(r,"operationId");if(!p)throw new Error("Duplicate requires --operation-id for safe replay.");let I=C.parse(await l("read",{id:t})),R=J.parse({...I.configuration,operationId:p,request:{...I.configuration.request,operationId:p},sourceExperimentId:I.id});m=await l("runFromRelease",{configuration:R,expectedPackageHash:I.packageHash})}else if(a==="passes")m=await l("passes",{executionId:t,...f?{afterId:f}:{},...g?{limit:Number(g)}:{}});else if(a==="case"){let p=n(r,"afterSequence");m=await l("case",{id:t,receiptId:b,...p?{afterSequence:Number(p)}:{},...g?{limit:Number(g)}:{}})}else if(a==="score"){let p=await S();if(p.execution?.id!==t)throw new Error("Local scoring input belongs to a different retained execution.");m=await l("score",p)}else if(a==="compare"){if(!c)throw new Error("Local Compare requires baseline and candidate execution ids.");let p=Q.parse(await l("compare",{baselineId:t,candidateId:c}));m={...p,comparison:U(p.baseline,p.candidate)}}else if(a==="read"){let p=n(r,"contentHash");m=await l("read",{id:t,...p?{configurationHash:p}:{}})}else if(["status","cancel","result","pass"].includes(a))m=await l(a,{id:t});else if(a==="cancel-pass")m=await l("cancel",{id:t});else if(a==="pass-result")m=await l("result",{id:t});else throw new Error(`Local Experiment action is unavailable: ${a}`)}console.log(JSON.stringify(m,null,2))}w(re,"runLocalExperimentsCommand");async function lt(r,s){if(s[0]==="signal-plan"||s[0]==="signal-report")return(await import("./experiments-signal-ONIGTGYR.js")).runExperimentsSignalCommand(r,s);if(r.local===!0||r.local==="true")return re(r,s);if(r.revision!==void 0||r.contentHash!==void 0)throw new Error("Experiments retain their immutable configuration on the run; definition revisions are not selectable.");let[a,t]=s,c=n(r,"team");if(!c||!a||s.length>(a==="compare"?3:2))throw new Error("usage: experiments <defaults|create-comparison|comparison-budget|prepare-harness|run|read|list|status|diagnostics|cancel|duplicate|score|passes|pass|cancel-pass|pass-result|result|compare|case> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>]");let h=await B(),b={teamId:c,apiKey:await M(h,F(h)),baseUrl:D(r)??h.apiBaseUrl??$},d=new G(b),i;if(a==="defaults"){if(t)throw new Error("Defaults does not accept an id.");i=await d.defaults()}else if(a==="create-comparison"){let o=n(r,"inputFile");if(!o||t||(await O(o)).size>1048576)throw new Error("Create comparison requires a bounded input file with an id, fresh operationIds and optional maximumSpendUsd.");i=await d.createComparisonBudget(JSON.parse(await j(o,"utf8")))}else if(a==="comparison-budget"){if(!t)throw new Error("Comparison budget requires an id.");i=await d.comparisonBudget(t)}else if(a==="prepare-harness"){let o=n(r,"inputFile");if(!o||t||(await O(o)).size>1048576)throw new Error("Harness preparation requires a bounded --input-file with its released target, model and optional ceiling.");i=await d.prepareHarness(JSON.parse(await j(o,"utf8")))}else if(a==="run"){let o=n(r,"inputFile");if(!o||t)throw new Error("Run requires --input-file with the reviewed configuration and stable operationId.");if((await O(o)).size>1048576)throw new Error("Experiment input exceeds one MiB.");i=await d.run(JSON.parse(await j(o,"utf8")))}else if(a==="list"){if(t)throw new Error("List does not accept an Experiment id.");let o=n(r,"limit");i=await d.list(z.parse({projectId:n(r,"project")||void 0,datasetHash:n(r,"datasetHash")||void 0,search:n(r,"search")||void 0,status:n(r,"status")||void 0,afterId:n(r,"afterId")||void 0,...o?{limit:Number(o)}:{}}))}else{if(!t)throw new Error(`${a} requires an id.`);if(a==="read")i=await d.get(t);else if(a==="status")i=await d.get(t);else if(a==="diagnostics"){let o=await d.get(t),l=n(r,"afterSequence");i=await d.diagnostics(t,{manifestHash:o.manifest.contentHash,...l?{afterSequence:Number(l)}:{},afterCallId:n(r,"afterCallId")||void 0})}else if(a==="cancel")i=await d.cancel(t);else if(a==="duplicate"){let o=n(r,"operationId");if(!o)throw new Error("Duplicate requires a stable --operation-id for the new Experiment.");i=await d.duplicate(t,o)}else if(a==="score"){let o=n(r,"inputFile");if(!o||(await O(o)).size>1048576)throw new Error("Score requires --input-file containing an exact execution reference, grader releases and explicit ceiling, within one MiB.");let l=K.parse(JSON.parse(await j(o,"utf8")));if(l.execution.id!==t)throw new Error("Scoring input belongs to a different execution.");i=await d.score(l)}else if(a==="passes")i=await d.scoringPasses(t,{afterId:n(r,"afterId")||void 0});else if(a==="pass")i=await d.scoringPass(t);else if(a==="cancel-pass")i=await d.cancelScoringPass(t);else if(a==="pass-result")i=await d.scoringResult(t);else if(a==="result")i=await d.result(t);else if(a==="case"){let o=n(r,"receiptId");if(!o)throw new Error("Case inspection requires --receipt-id from the retained Experiment.");let l=await d.get(t);i=await new L(b).case(t,o,{manifestHash:l.manifest.contentHash,afterId:n(r,"afterId")||void 0})}else if(a==="compare"){if(!s[2])throw new Error("Compare requires a baseline and candidate execution id.");i=await d.compare(t,s[2])}else throw new Error(`Unknown Experiment action: ${a}`)}console.log(JSON.stringify(i,null,2))}w(lt,"runExperimentsCommand");export{lt as runExperimentsCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as N,c as A}from"./chunk-TVDZXDQW.js";import"./chunk-I3NYYOSS.js";import"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-NABPZ7AK.js";import"./chunk-BQVB2SPF.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as C}from"./chunk-3M53YXEI.js";import"./chunk-W45RKGM6.js";import"./chunk-7PKTCMZ6.js";import"./chunk-LXZLLTYQ.js";import"./chunk-SFR32TMJ.js";import"./chunk-5KJMFK65.js";import"./chunk-Y3B6ZUE6.js";import"./chunk-WLZJOCLA.js";import"./chunk-HIQPGYVH.js";import"./chunk-ZWW227M3.js";import"./chunk-DXA2UHBE.js";import"./chunk-MTP3B2SU.js";import"./chunk-CRDKBFRN.js";import"./chunk-DMO3UIS7.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-L4EJ5R3B.js";import"./chunk-6ZTP6CUJ.js";import"./chunk-TBODQT4W.js";import{O}from"./chunk-YRDPVTEI.js";import{p as F}from"./chunk-JRGECNP3.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-5WPMI6QX.js";import"./chunk-W7NXFRHN.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-G4E3WGLM.js";import{Ja as z,da as M}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{n as i,o as _}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as c}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as x}from"./chunk-FTQLQJQV.js";import{readFile as $,stat as G}from"node:fs/promises";import{dirname as L,resolve as b}from"node:path";var H=c.string().regex(/^[a-f0-9]{64}$/),P=c.object({groupSize:c.number().int().min(2).max(100),minimumFamilies:c.number().int().min(2).max(1e3),minimumInformativeFamilies:c.number().int().min(2).max(1e3),minimumSpread:c.number().positive().max(1),minimumScoredFraction:c.number().positive().max(1)}).strict().refine(s=>s.minimumInformativeFamilies<=s.minimumFamilies,"Informative family requirement cannot exceed the minimum family population."),D=c.object({schemaVersion:c.literal("openpond.experimentSignalPlan.v1"),createdAt:c.iso.datetime(),preparation:F,packageHash:H,graders:c.array(M).min(1).max(100),tasks:c.array(c.object({id:c.string(),family:c.string(),taskHash:H,inputHash:H,contextHash:H}).strict()).min(1).max(1e4),thresholds:P}).strict(),j=D.extend({contentHash:H}).strict();function R(s){let n=j.parse(s),{contentHash:a,...p}=n;if(i(p)!==a)throw new Error("Signal plan content changed.");let{request:t,manifest:r,graders:m}=n.preparation;_(r,"Signal preparation manifest");let o=t.policy;if(o.kind!=="hosted_harness"||r.execution.kind!=="harness"||r.policy.kind!=="model"||r.runtimeTarget.placement!=="local"||r.gradingRole!=="evaluation"||i(r.profileEvaluation??null)!==i(o.source)||i(r.execution.harnessRelease)!==i(o.source.harnessRelease)||r.packageHash!==o.packageHash||r.policy.configurationHash!==o.modelConfigurationHash||r.policy.model.provider!=="openpond"||r.policy.model.model!==o.modelId||r.policy.model.revision!==null||r.policy.model.artifactHash!==(o.candidate?.contentHash??null)||r.policy.model.tokenizerRevision!==null||r.policy.model.chatTemplateHash!==null||r.tasksetRelease.id!==t.taskset.id||r.tasksetRelease.contentHash!==t.taskset.contentHash||i(r.population)!==i(t.population)||r.limits.maximumSpendUsd!==n.preparation.maximumCostUsd||r.metadata.profileRepositoryId!==void 0&&r.metadata.profileRepositoryId!==o.profileRepositoryId)throw new Error("Signal preparation differs from its native local source, package, model, budget or population.");for(let d of r.population){let g=o.source.externalDatasetBinding?[r.id,d.taskId,d.seed,d.fixtureId]:[r.id,d.taskId,d.seed];if(d.receiptId!==`evaluation-${i(g).slice(0,32)}`)throw new Error("Signal preparation receipt identity changed.")}if(t.policy.kind!=="hosted_harness"||t.policy.localRuntime||t.policy.packageHash!==n.packageHash)throw new Error("Signal plan requires the exact hosted-chat Harness package.");if(new Set(n.tasks.map(d=>d.id)).size!==n.tasks.length||new Set(m.map(d=>d.id)).size!==m.length||n.graders.length!==m.length)throw new Error("Signal plan contains duplicate or missing tasks/graders.");for(let[d,g]of n.graders.entries()){let f=m[d];if(f.id!==g.id||f.version!==g.version||f.contentHash!==i(g)||g.hardGate||!g.rewardEligible||g.weight<=0||g.taskIds||f.mappings?.length)throw new Error("Signal requires exact positive-weight reward graders, no hard gates, field mappings or task-specific grader subsets.")}let S=new Map;for(let d of t.population)S.set(d.taskId,(S.get(d.taskId)??0)+1);if(S.size!==n.tasks.length||n.tasks.some(d=>S.get(d.id)!==n.thresholds.groupSize))throw new Error("Every planned prompt must have exactly groupSize distinct seeded attempts.");if(new Set(n.tasks.map(d=>d.family)).size<n.thresholds.minimumFamilies)throw new Error("Signal population has too few independent source families.");return n}x(R,"verifySignalPlan");function T(s){let n=O(s.package),a=F.parse(s.preparation),p=new Set(a.request.population.map(o=>o.taskId)),t=n.taskset.tasks.filter(o=>p.has(o.id));if(t.length!==p.size||t.some(o=>o.split!=="train"))throw new Error("Signal probes require existing training tasks; validation/test/frozen holdouts cannot be reused.");if(a.request.taskset.id!==n.taskset.id||a.request.taskset.contentHash!==n.taskset.contentHash)throw new Error("Prepared taskset differs from the supplied package.");let r=a.graders.map(o=>{let S=n.taskset.graders.find(d=>d.id===o.id&&i(d)===o.contentHash);if(!S)throw new Error(`Selected grader is absent from the exact package: ${o.id}`);return S}),m=D.parse({schemaVersion:"openpond.experimentSignalPlan.v1",createdAt:s.createdAt??new Date().toISOString(),preparation:a,packageHash:n.contentHash,graders:r,tasks:t.map(o=>({id:o.id,family:o.clusterKey,taskHash:i(o),inputHash:i(o.input),contextHash:i(o.policyVisibleContext)})),thresholds:s.thresholds});return R({...m,contentHash:i(m)})}x(T,"createSignalPlan");function U(s){if(!s.length)return{count:0,min:null,max:null,mean:null,standardDeviation:null,spread:null};let n=s.reduce((a,p)=>a+p,0)/s.length;return{count:s.length,min:Math.min(...s),max:Math.max(...s),mean:n,standardDeviation:Math.sqrt(s.reduce((a,p)=>a+(p-n)**2,0)/s.length),spread:Math.max(...s)-Math.min(...s)}}x(U,"scoreDistribution");function V(s,n){let a=R(s),p=A.parse(n),t=N.parse(p.execution);if(i({execution:p.execution,cases:p.cases})!==p.contentHash)throw new Error("Signal result content changed.");if(t.packageHash!==a.packageHash||i(t.configuration.request)!==i(a.preparation.request)||i(t.graders)!==i(a.preparation.graders)||t.maximumCostUsd!==a.preparation.maximumCostUsd)throw new Error("Signal result differs from the frozen request, package, graders or budget.");if(Date.parse(t.createdAt)<Date.parse(a.createdAt))throw new Error("Signal plan must precede the execution.");let r=a.preparation.request.policy;if(r.kind!=="hosted_harness"||t.model.providerId!=="openpond"||t.model.modelId!==r.modelId||t.model.maxOutputTokens!==(r.maxOutputTokens??4096)||t.model.temperature!==(r.temperature??0)||t.model.topP!==(r.topP??1))throw new Error("Signal execution model or sampling differs from the frozen policy.");for(let e of["pending","running","completed","failed","cancelled","unknown"])if(t.counts[e]!==p.cases.filter(w=>w.status===e).length)throw new Error("Signal execution counts differ from its cases.");let m=new Map(a.preparation.request.population.map(e=>[e.receiptId,e]));if(p.cases.length!==m.size||new Set(p.cases.map(e=>e.receiptId)).size!==m.size)throw new Error("Signal result omits or duplicates planned attempts.");let o=new Map(a.tasks.map(e=>[e.id,e])),S=i(a.preparation.graders);for(let e of p.cases){let w=m.get(e.receiptId),k=o.get(e.taskId);if(!w||!k||w.taskId!==e.taskId||w.seed!==e.seed||i(e.input)!==k.inputHash||i(e.policyVisibleContext)!==k.contextHash)throw new Error("Signal case differs from its frozen prompt, context or seed.");if(e.status==="completed"&&(!e.profileNative||e.output===null||e.profileNative.modelConfigurationHash!==t.model.configurationHash||i(e.profileNative.source)!==i(r.source)||e.profileNative.outputHash!==i(e.output)))throw new Error("Signal case lacks matching native source, model or output evidence.");if(!e.grade)continue;if(e.grade.selectionHash!==S)throw new Error("Signal grade uses different selected graders.");if(e.grade.grades.some(u=>u.taskHash!==k.taskHash)||new Set(e.grade.grades.map(u=>u.evidenceHash)).size!==1)throw new Error("Signal criterion belongs to another prompt or inconsistent attempt evidence.");let y=e.grade.grades.flatMap(u=>u.components),E=z({graders:a.graders,components:y});for(let u of["score","passed","rewardEligible","gradingStatus","failureClass"])if(e.grade[u]!==E[u])throw new Error("Signal score differs from retained components and frozen weights.");for(let u of e.grade.grades){let l=a.graders.find(h=>h.id===u.components[0]?.graderId);if(u.graderSetHash!==i([l]))throw new Error("Signal criterion specification changed.");let I=z({graders:[l],components:u.components});for(let h of["score","passed","rewardEligible","gradingStatus","failureClass"])if(u[h]!==I[h])throw new Error("Signal criterion summary differs from its evidence.")}}let d=a.tasks.map(e=>{let w=p.cases.filter(l=>l.taskId===e.id),k=w.filter(l=>l.status==="completed"&&l.grade?.gradingStatus==="scored"&&l.grade.rewardEligible&&l.grade.score!==null),y=U(k.map(l=>l.grade.score)),E=k.length/w.length,u=a.graders.map(l=>({id:l.id,weight:l.weight,distribution:U(k.flatMap(I=>I.grade.grades.flatMap(h=>h.components).filter(h=>h.graderId===l.id&&h.rewardEligible&&h.score!==null).map(h=>h.score)))}));return{taskId:e.id,family:e.family,attempts:w.length,eligible:k.length,scoredFraction:E,combined:y,components:u,constant:y.spread!==null&&y.spread<=Number.EPSILON,uniqueOutputs:new Set(w.filter(l=>l.output!==null).map(l=>i(l.output))).size,informative:E>=a.thresholds.minimumScoredFraction&&(y.spread??0)>=a.thresholds.minimumSpread,outcomes:w.map(l=>({receiptId:l.receiptId,seed:l.seed,status:l.status,gradingStatus:l.grade?.gradingStatus??null,failureClass:l.grade?.failureClass??null,rewardEligible:l.grade?.rewardEligible??!1,score:l.grade?.score??null}))}}),g=[...new Set(d.filter(e=>e.informative).map(e=>e.family))],f=[];(t.status!=="completed"||!t.cleanupComplete)&&f.push("execution_or_local_cleanup_incomplete"),(t.usage.uncertainRequests||t.usage.costUsd===null||t.usage.heldUsd)&&f.push("cost_or_reservations_unsettled"),d.some(e=>e.scoredFraction<a.thresholds.minimumScoredFraction)&&f.push("insufficient_scored_coverage"),g.length<a.thresholds.minimumInformativeFamilies&&f.push("insufficient_within_prompt_signal");let q={schemaVersion:"openpond.experimentSignalReport.v1",planHash:a.contentHash,resultHash:p.contentHash,executionId:t.id,model:t.model,thresholds:a.thresholds,groups:d,informativeFamilies:g,usage:t.usage,cleanupComplete:t.cleanupComplete,blockers:f,signalObserved:f.length===0,trainingAuthorized:!1,runtimeParityVerified:!1,limitations:["Offline hashes bind supplied evidence; they do not authenticate it or prove source-family independence. Full grade evidence hashes require the retained trace/artifacts to independently reconstruct.","Local signal does not prove learner identity, GPU runtime/tokenizer parity, no-update behavior or provider deletion.","Review rates, private gold, fixture calibration, family exposure and the unchanged-parent noise control before training."]};return{...q,contentHash:i(q)}}x(V,"createSignalReport");async function v(s,n=64*1024*1024){if((await G(s)).size>n)throw new Error(`Signal input exceeds ${n} bytes: ${s}`);return JSON.parse(await $(s,"utf8"))}x(v,"readJson");async function pe(s,n){let a=C(s,"inputFile");if(!a||n.length!==1)throw new Error("usage: experiments <signal-plan|signal-report> --input-file <path>");let p=await v(a,1048576),t=L(b(a)),r;if(n[0]==="signal-plan"){let m=c.object({packageFile:c.string().min(1),preparationFile:c.string().min(1),thresholds:P}).strict().parse(p);r=T({package:await v(b(t,m.packageFile)),preparation:await v(b(t,m.preparationFile)),thresholds:m.thresholds})}else{let m=c.object({planFile:c.string().min(1),resultFile:c.string().min(1)}).strict().parse(p);r=V(await v(b(t,m.planFile)),await v(b(t,m.resultFile)))}console.log(JSON.stringify(r,null,2))}x(pe,"runExperimentsSignalCommand");export{pe as runExperimentsSignalCommand};
|
|
2
|
+
import{b as N,c as A}from"./chunk-5QOFUGYQ.js";import"./chunk-OYIFH2OM.js";import"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as C}from"./chunk-3M53YXEI.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-CRDKBFRN.js";import"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import{O}from"./chunk-TV2LE2BD.js";import{p as F}from"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-XHU4BZQY.js";import{Ja as z,da as M}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{n as i,o as _}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as c}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as x}from"./chunk-FTQLQJQV.js";import{readFile as $,stat as G}from"node:fs/promises";import{dirname as L,resolve as b}from"node:path";var H=c.string().regex(/^[a-f0-9]{64}$/),P=c.object({groupSize:c.number().int().min(2).max(100),minimumFamilies:c.number().int().min(2).max(1e3),minimumInformativeFamilies:c.number().int().min(2).max(1e3),minimumSpread:c.number().positive().max(1),minimumScoredFraction:c.number().positive().max(1)}).strict().refine(s=>s.minimumInformativeFamilies<=s.minimumFamilies,"Informative family requirement cannot exceed the minimum family population."),D=c.object({schemaVersion:c.literal("openpond.experimentSignalPlan.v1"),createdAt:c.iso.datetime(),preparation:F,packageHash:H,graders:c.array(M).min(1).max(100),tasks:c.array(c.object({id:c.string(),family:c.string(),taskHash:H,inputHash:H,contextHash:H}).strict()).min(1).max(1e4),thresholds:P}).strict(),j=D.extend({contentHash:H}).strict();function R(s){let n=j.parse(s),{contentHash:a,...p}=n;if(i(p)!==a)throw new Error("Signal plan content changed.");let{request:t,manifest:r,graders:m}=n.preparation;_(r,"Signal preparation manifest");let o=t.policy;if(o.kind!=="hosted_harness"||r.execution.kind!=="harness"||r.policy.kind!=="model"||r.runtimeTarget.placement!=="local"||r.gradingRole!=="evaluation"||i(r.profileEvaluation??null)!==i(o.source)||i(r.execution.harnessRelease)!==i(o.source.harnessRelease)||r.packageHash!==o.packageHash||r.policy.configurationHash!==o.modelConfigurationHash||r.policy.model.provider!=="openpond"||r.policy.model.model!==o.modelId||r.policy.model.revision!==null||r.policy.model.artifactHash!==(o.candidate?.contentHash??null)||r.policy.model.tokenizerRevision!==null||r.policy.model.chatTemplateHash!==null||r.tasksetRelease.id!==t.taskset.id||r.tasksetRelease.contentHash!==t.taskset.contentHash||i(r.population)!==i(t.population)||r.limits.maximumSpendUsd!==n.preparation.maximumCostUsd||r.metadata.profileRepositoryId!==void 0&&r.metadata.profileRepositoryId!==o.profileRepositoryId)throw new Error("Signal preparation differs from its native local source, package, model, budget or population.");for(let d of r.population){let g=o.source.externalDatasetBinding?[r.id,d.taskId,d.seed,d.fixtureId]:[r.id,d.taskId,d.seed];if(d.receiptId!==`evaluation-${i(g).slice(0,32)}`)throw new Error("Signal preparation receipt identity changed.")}if(t.policy.kind!=="hosted_harness"||t.policy.localRuntime||t.policy.packageHash!==n.packageHash)throw new Error("Signal plan requires the exact hosted-chat Harness package.");if(new Set(n.tasks.map(d=>d.id)).size!==n.tasks.length||new Set(m.map(d=>d.id)).size!==m.length||n.graders.length!==m.length)throw new Error("Signal plan contains duplicate or missing tasks/graders.");for(let[d,g]of n.graders.entries()){let f=m[d];if(f.id!==g.id||f.version!==g.version||f.contentHash!==i(g)||g.hardGate||!g.rewardEligible||g.weight<=0||g.taskIds||f.mappings?.length)throw new Error("Signal requires exact positive-weight reward graders, no hard gates, field mappings or task-specific grader subsets.")}let S=new Map;for(let d of t.population)S.set(d.taskId,(S.get(d.taskId)??0)+1);if(S.size!==n.tasks.length||n.tasks.some(d=>S.get(d.id)!==n.thresholds.groupSize))throw new Error("Every planned prompt must have exactly groupSize distinct seeded attempts.");if(new Set(n.tasks.map(d=>d.family)).size<n.thresholds.minimumFamilies)throw new Error("Signal population has too few independent source families.");return n}x(R,"verifySignalPlan");function T(s){let n=O(s.package),a=F.parse(s.preparation),p=new Set(a.request.population.map(o=>o.taskId)),t=n.taskset.tasks.filter(o=>p.has(o.id));if(t.length!==p.size||t.some(o=>o.split!=="train"))throw new Error("Signal probes require existing training tasks; validation/test/frozen holdouts cannot be reused.");if(a.request.taskset.id!==n.taskset.id||a.request.taskset.contentHash!==n.taskset.contentHash)throw new Error("Prepared taskset differs from the supplied package.");let r=a.graders.map(o=>{let S=n.taskset.graders.find(d=>d.id===o.id&&i(d)===o.contentHash);if(!S)throw new Error(`Selected grader is absent from the exact package: ${o.id}`);return S}),m=D.parse({schemaVersion:"openpond.experimentSignalPlan.v1",createdAt:s.createdAt??new Date().toISOString(),preparation:a,packageHash:n.contentHash,graders:r,tasks:t.map(o=>({id:o.id,family:o.clusterKey,taskHash:i(o),inputHash:i(o.input),contextHash:i(o.policyVisibleContext)})),thresholds:s.thresholds});return R({...m,contentHash:i(m)})}x(T,"createSignalPlan");function U(s){if(!s.length)return{count:0,min:null,max:null,mean:null,standardDeviation:null,spread:null};let n=s.reduce((a,p)=>a+p,0)/s.length;return{count:s.length,min:Math.min(...s),max:Math.max(...s),mean:n,standardDeviation:Math.sqrt(s.reduce((a,p)=>a+(p-n)**2,0)/s.length),spread:Math.max(...s)-Math.min(...s)}}x(U,"scoreDistribution");function V(s,n){let a=R(s),p=A.parse(n),t=N.parse(p.execution);if(i({execution:p.execution,cases:p.cases})!==p.contentHash)throw new Error("Signal result content changed.");if(t.packageHash!==a.packageHash||i(t.configuration.request)!==i(a.preparation.request)||i(t.graders)!==i(a.preparation.graders)||t.maximumCostUsd!==a.preparation.maximumCostUsd)throw new Error("Signal result differs from the frozen request, package, graders or budget.");if(Date.parse(t.createdAt)<Date.parse(a.createdAt))throw new Error("Signal plan must precede the execution.");let r=a.preparation.request.policy;if(r.kind!=="hosted_harness"||t.model.providerId!=="openpond"||t.model.modelId!==r.modelId||t.model.maxOutputTokens!==(r.maxOutputTokens??4096)||t.model.temperature!==(r.temperature??0)||t.model.topP!==(r.topP??1))throw new Error("Signal execution model or sampling differs from the frozen policy.");for(let e of["pending","running","completed","failed","cancelled","unknown"])if(t.counts[e]!==p.cases.filter(w=>w.status===e).length)throw new Error("Signal execution counts differ from its cases.");let m=new Map(a.preparation.request.population.map(e=>[e.receiptId,e]));if(p.cases.length!==m.size||new Set(p.cases.map(e=>e.receiptId)).size!==m.size)throw new Error("Signal result omits or duplicates planned attempts.");let o=new Map(a.tasks.map(e=>[e.id,e])),S=i(a.preparation.graders);for(let e of p.cases){let w=m.get(e.receiptId),k=o.get(e.taskId);if(!w||!k||w.taskId!==e.taskId||w.seed!==e.seed||i(e.input)!==k.inputHash||i(e.policyVisibleContext)!==k.contextHash)throw new Error("Signal case differs from its frozen prompt, context or seed.");if(e.status==="completed"&&(!e.profileNative||e.output===null||e.profileNative.modelConfigurationHash!==t.model.configurationHash||i(e.profileNative.source)!==i(r.source)||e.profileNative.outputHash!==i(e.output)))throw new Error("Signal case lacks matching native source, model or output evidence.");if(!e.grade)continue;if(e.grade.selectionHash!==S)throw new Error("Signal grade uses different selected graders.");if(e.grade.grades.some(u=>u.taskHash!==k.taskHash)||new Set(e.grade.grades.map(u=>u.evidenceHash)).size!==1)throw new Error("Signal criterion belongs to another prompt or inconsistent attempt evidence.");let y=e.grade.grades.flatMap(u=>u.components),E=z({graders:a.graders,components:y});for(let u of["score","passed","rewardEligible","gradingStatus","failureClass"])if(e.grade[u]!==E[u])throw new Error("Signal score differs from retained components and frozen weights.");for(let u of e.grade.grades){let l=a.graders.find(h=>h.id===u.components[0]?.graderId);if(u.graderSetHash!==i([l]))throw new Error("Signal criterion specification changed.");let I=z({graders:[l],components:u.components});for(let h of["score","passed","rewardEligible","gradingStatus","failureClass"])if(u[h]!==I[h])throw new Error("Signal criterion summary differs from its evidence.")}}let d=a.tasks.map(e=>{let w=p.cases.filter(l=>l.taskId===e.id),k=w.filter(l=>l.status==="completed"&&l.grade?.gradingStatus==="scored"&&l.grade.rewardEligible&&l.grade.score!==null),y=U(k.map(l=>l.grade.score)),E=k.length/w.length,u=a.graders.map(l=>({id:l.id,weight:l.weight,distribution:U(k.flatMap(I=>I.grade.grades.flatMap(h=>h.components).filter(h=>h.graderId===l.id&&h.rewardEligible&&h.score!==null).map(h=>h.score)))}));return{taskId:e.id,family:e.family,attempts:w.length,eligible:k.length,scoredFraction:E,combined:y,components:u,constant:y.spread!==null&&y.spread<=Number.EPSILON,uniqueOutputs:new Set(w.filter(l=>l.output!==null).map(l=>i(l.output))).size,informative:E>=a.thresholds.minimumScoredFraction&&(y.spread??0)>=a.thresholds.minimumSpread,outcomes:w.map(l=>({receiptId:l.receiptId,seed:l.seed,status:l.status,gradingStatus:l.grade?.gradingStatus??null,failureClass:l.grade?.failureClass??null,rewardEligible:l.grade?.rewardEligible??!1,score:l.grade?.score??null}))}}),g=[...new Set(d.filter(e=>e.informative).map(e=>e.family))],f=[];(t.status!=="completed"||!t.cleanupComplete)&&f.push("execution_or_local_cleanup_incomplete"),(t.usage.uncertainRequests||t.usage.costUsd===null||t.usage.heldUsd)&&f.push("cost_or_reservations_unsettled"),d.some(e=>e.scoredFraction<a.thresholds.minimumScoredFraction)&&f.push("insufficient_scored_coverage"),g.length<a.thresholds.minimumInformativeFamilies&&f.push("insufficient_within_prompt_signal");let q={schemaVersion:"openpond.experimentSignalReport.v1",planHash:a.contentHash,resultHash:p.contentHash,executionId:t.id,model:t.model,thresholds:a.thresholds,groups:d,informativeFamilies:g,usage:t.usage,cleanupComplete:t.cleanupComplete,blockers:f,signalObserved:f.length===0,trainingAuthorized:!1,runtimeParityVerified:!1,limitations:["Offline hashes bind supplied evidence; they do not authenticate it or prove source-family independence. Full grade evidence hashes require the retained trace/artifacts to independently reconstruct.","Local signal does not prove learner identity, GPU runtime/tokenizer parity, no-update behavior or provider deletion.","Review rates, private gold, fixture calibration, family exposure and the unchanged-parent noise control before training."]};return{...q,contentHash:i(q)}}x(V,"createSignalReport");async function v(s,n=64*1024*1024){if((await G(s)).size>n)throw new Error(`Signal input exceeds ${n} bytes: ${s}`);return JSON.parse(await $(s,"utf8"))}x(v,"readJson");async function pe(s,n){let a=C(s,"inputFile");if(!a||n.length!==1)throw new Error("usage: experiments <signal-plan|signal-report> --input-file <path>");let p=await v(a,1048576),t=L(b(a)),r;if(n[0]==="signal-plan"){let m=c.object({packageFile:c.string().min(1),preparationFile:c.string().min(1),thresholds:P}).strict().parse(p);r=T({package:await v(b(t,m.packageFile)),preparation:await v(b(t,m.preparationFile)),thresholds:m.thresholds})}else{let m=c.object({planFile:c.string().min(1),resultFile:c.string().min(1)}).strict().parse(p);r=V(await v(b(t,m.planFile)),await v(b(t,m.resultFile)))}console.log(JSON.stringify(r,null,2))}x(pe,"runExperimentsSignalCommand");export{pe as runExperimentsSignalCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as r,c as i,h as p}from"./chunk-
|
|
2
|
+
import{a as r,c as i,h as p}from"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-3M53YXEI.js";import{a as t}from"./chunk-FTQLQJQV.js";function d(){console.log(m())}t(d,"printHelp");function m(){let n=["OpenPond CLI","","Usage:"," openpond [--no-open] [--hostname HOST] [--port PORT]"," openpond <command> [options] [-- passthrough...]"," openpond --version","","Commands:"];for(let o of i()){let s=o.aliases?.length?` (aliases: ${o.aliases.join(", ")})`:"";n.push(` ${o.usage}${s}`);for(let e of o.usages??[])n.push(` ${e}`)}n.push("","Global options:");for(let[o,s]of Object.entries(r).sort(([e],[a])=>e.localeCompare(a))){let e=o.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`);n.push(s==="boolean"?` --${e}`:` --${e} <${s}>`)}return n.push("","Run `openpond <command> --help` for the selected command schema.","Arguments after `--` are passed through without option parsing."),n.join(`
|
|
3
3
|
`)}t(m,"formatCliHelp");function l(){return["# OpenPond CLI command reference","","<!-- Generated by `pnpm --dir apps/cli docs:commands`; do not edit by hand. -->","","Parsing, aliases, command help, and this reference use the same authoritative registry.","",...i().map(o=>`## ${o.name}
|
|
4
4
|
|
|
5
5
|
\`\`\`text
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as a}from"./chunk-TSQ2I6XV.js";import"./chunk-Q3WXB465.js";import"./chunk-YMCF5GR2.js";import"./chunk-FEAKTSRS.js";import"./chunk-L3KS6MOV.js";import"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-WJSJXK2N.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-FTQLQJQV.js";export{a as createHostProfileEvaluationTools};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-SVNEPXU3.js";import"./chunk-TPOAAJKA.js";import"./chunk-CSU7RDA5.js";import"./chunk-4TTXNVCE.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-GUG2SWRZ.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import"./chunk-BL3CZWWD.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-XGY4OQLC.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-ULJZ7NUF.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import"./chunk-FTQLQJQV.js";export{b as createHostProfileExternalDataset,a as readHostProfileExternalDataset};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as lt,c as se,e as St}from"./chunk-U2BD545L.js";import{c as mt,d as pt,e as ft}from"./chunk-5Z3AU5CL.js";import{b as ct,p as dt,q as yt,r as Rt}from"./chunk-MHPCVQOE.js";import{a as ht,b as gt}from"./chunk-4JYTFEND.js";import{b as wt,c as vt}from"./chunk-55Q64WWF.js";import{b as ut}from"./chunk-IEVJLG3V.js";import"./chunk-S7A2OGL2.js";import{b as nt}from"./chunk-OW3EOC5Q.js";import"./chunk-EICS777E.js";import{a as ot,b as at}from"./chunk-5KWKSR4P.js";import"./chunk-Q3WXB465.js";import"./chunk-5AU5Y6KS.js";import"./chunk-FEAKTSRS.js";import{b as it}from"./chunk-UK5LGSGT.js";import"./chunk-TPOAAJKA.js";import{a as re,b as O,c as W}from"./chunk-GDJ4X2ZN.js";import{a as Pt}from"./chunk-B666Z2NS.js";import"./chunk-WLQEONBF.js";import"./chunk-YU4JYWCA.js";import"./chunk-3MVKXAH7.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{a as te}from"./chunk-4MQHIFZL.js";import"./chunk-3BJ7LPE3.js";import"./chunk-W45RKGM6.js";import"./chunk-LARJARMS.js";import"./chunk-67HXM6AL.js";import"./chunk-ANG2YMMD.js";import"./chunk-6TRVEA3T.js";import"./chunk-FEQ7HNJR.js";import"./chunk-LYVHYT3L.js";import{d as Fe,e as We,j as Ge,k as Qe,na as Ye,oa as et,pa as tt,v as Je,w as ee,y as Ze}from"./chunk-JKI53ED7.js";import{g as Xe}from"./chunk-EVQISX7M.js";import{a as Ue}from"./chunk-PYNW5OFA.js";import"./chunk-66HFW4OU.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import"./chunk-AN525SPP.js";import"./chunk-WBO6FQHR.js";import"./chunk-H5ML7735.js";import"./chunk-SYUKES6H.js";import"./chunk-UOFDKMRU.js";import"./chunk-XHBMK6LC.js";import{$ as z,W as rt,Z as h,aa as st}from"./chunk-6I5AUTVO.js";import"./chunk-IZ6DLEVY.js";import"./chunk-QJJNHKLT.js";import{g as Ve,m as Le}from"./chunk-ZU3YBRXS.js";import"./chunk-7XOUM6RK.js";import"./chunk-VD2TQCMH.js";import"./chunk-N73MU2C3.js";import"./chunk-FAKDGLZQ.js";import{a as $e,b as Ke}from"./chunk-GW766ZSO.js";import{p as Ne}from"./chunk-MCBRB5D6.js";import"./chunk-JD76ANPN.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import"./chunk-4TTXNVCE.js";import"./chunk-HNDAGZCF.js";import"./chunk-YU3C6U5V.js";import"./chunk-OPTJYDZN.js";import"./chunk-KVTBX2UP.js";import"./chunk-BJXPQIVD.js";import"./chunk-GFAI2MCJ.js";import"./chunk-DMFUEUAZ.js";import"./chunk-GF55VEMR.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import{a as ge}from"./chunk-GUG2SWRZ.js";import{a as he}from"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import{C as De,D as Me,M as ze,P as X,a as fe,g as qe,ja as je,v as F,w as Be,x as U}from"./chunk-MVPKU72J.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-QCJY6FTC.js";import"./chunk-UTIELP6F.js";import"./chunk-6S2MWJVD.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import{b as xe}from"./chunk-4V73I4OL.js";import{a as ce,h as Te,n as ke,p as Ae}from"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-7PKTCMZ6.js";import"./chunk-LXZLLTYQ.js";import"./chunk-GI7LTJV3.js";import"./chunk-VS3AMJEK.js";import"./chunk-XGY4OQLC.js";import"./chunk-AF3AVDPP.js";import"./chunk-SFR32TMJ.js";import"./chunk-5KJMFK65.js";import"./chunk-Y3B6ZUE6.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-SBQ6KLXB.js";import"./chunk-CYQLXS2U.js";import{b as _e}from"./chunk-O6ZYDHEJ.js";import"./chunk-OKEC2EIE.js";import"./chunk-WLZJOCLA.js";import"./chunk-HIQPGYVH.js";import"./chunk-ZWW227M3.js";import"./chunk-DXA2UHBE.js";import"./chunk-MTP3B2SU.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import{c as Ie}from"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import{Hb as Z,Ob as Y,f as pe,m as Oe}from"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-G4E3WGLM.js";import{Ka as de}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import{V as me,X as Ce}from"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{m as B,n as g,o as M}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as n}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as r}from"./chunk-FTQLQJQV.js";import{randomUUID as Vt}from"node:crypto";import{promises as _}from"node:fs";import I from"node:path";function Ht(l){let e=new Map,t=new Map;async function o(s,d){let m=(t.get(s)??Promise.resolve()).catch(()=>{}).then(d);t.set(s,m);try{return await m}finally{t.get(s)===m&&t.delete(s)}}r(o,"serial");let a=r((s,d=18e4)=>l.request(z.parse({contractVersion:h,requestId:Vt(),operation:"profile-evaluations/sandbox",params:s}),d),"request");async function c(s,d,m,f){let S=B(f),y=`${d}/${m}/${S}`,b=e.get(s.sessionId)??new Set;if(!b.has(y)){if(f.length>1e7)throw new Error("The public case file exceeds its admitted bound.");for(let P=0;P===0||P<f.length;P+=98304)s.signal.throwIfAborted(),await a({sessionId:s.sessionId,turnId:s.turnId,action:"upload",area:d,path:m,sha256:S,sizeBytes:f.length,offset:P,contentsBase64:f.subarray(P,P+98304).toString("base64")},3e5);b.add(y),e.set(s.sessionId,b)}}r(c,"upload");async function u(s,d=""){let m=[];for(let f of await _.readdir(I.join(s,d),{withFileTypes:!0})){let S=I.posix.join(d,f.name);if(f.isSymbolicLink()){let y=await _.realpath(I.join(s,S));if(!y.startsWith(`${await _.realpath(s)}${I.sep}`)||(await _.stat(y)).isDirectory())throw new Error("The public Agent runtime symlink escapes its file closure.");m.push(S);continue}if(f.isDirectory()?m.push(...await u(s,S)):f.isFile()&&m.push(S),m.length>8192)throw new Error("The public Agent runtime exceeds the file limit.")}return m}return r(u,"runtimeFiles"),{execute:r(s=>o(s.sessionId,async()=>{s.signal.throwIfAborted();for(let[f,S]of Object.entries(s.publicHashes)){let y=await _.realpath(I.join(s.sourceRoot,f)),b=await _.realpath(s.sourceRoot);if(!y.startsWith(`${b}${I.sep}`))throw new Error("The public case file escaped its source root.");let P=await _.readFile(y);if(B(P)!==S)throw new Error("The public case file changed before upload.");await c(s,"policy",f,P)}if(s.runtimeRoot)for(let f of await u(s.runtimeRoot))await c(s,"runtime",f,await _.readFile(I.join(s.runtimeRoot,f)));let d=I.relative(s.sourceRoot,s.cwd??s.sourceRoot);if(d.startsWith("..")||I.isAbsolute(d))throw new Error("The command cwd escaped the admitted case.");let m=n.object({code:n.number().int().nullable(),stdout:n.string().max(75e4),stderr:n.string().max(75e4),timedOut:n.boolean(),stdoutTruncated:n.boolean(),stderrTruncated:n.boolean()}).parse(await a({sessionId:s.sessionId,turnId:s.turnId,action:"exec",command:s.command,stdin:s.stdin,cwd:d.split(I.sep).join("/"),timeoutMs:s.timeoutMs},s.timeoutMs+15e3));return s.signal.throwIfAborted(),m}),"execute"),readOutput:r(s=>o(s.sessionId,async()=>{let d=ot(s.path),m=[],f=null,S=null;for(let b=0;f===null||b<f;b+=98304){s.signal.throwIfAborted();let P=n.object({sizeBytes:n.number().int().min(1).max(1e7),sha256:n.string().regex(/^[a-f0-9]{64}$/),contentsBase64:n.string().max(131072)}).parse(await a({sessionId:s.sessionId,turnId:s.turnId,action:"read",path:d,offset:b},6e4));f??=P.sizeBytes,S??=P.sha256;let p=Buffer.from(P.contentsBase64,"base64");if(P.sizeBytes!==f||P.sha256!==S||p.length!==Math.min(98304,f-b)||p.toString("base64")!==P.contentsBase64)throw new Error("The confined output changed during readback.");m.push(p)}let y=Buffer.concat(m);if(B(y)!==S)throw new Error("The confined output differs from its saved byte identity.");return s.signal.throwIfAborted(),{bytes:y,title:d.split("/").at(-1)}}),"readOutput"),settle:r((s,d)=>o(s,async()=>{try{await a({sessionId:s,turnId:d,action:"stop"},6e4)}finally{e.delete(s)}}),"settle")}}r(Ht,"createHostedProfileCommandOwner");import{randomUUID as Lt}from"node:crypto";var j=98304;function Et(l){let e=r((t,o)=>l.request(z.parse({contractVersion:h,requestId:Lt(),operation:t,params:o})),"request");return{persistence:{sourceTurnStartedAt:r(async()=>{throw new Error("The case owner must supply its actual turn start time.")},"sourceTurnStartedAt"),saveSandboxFile:r(async()=>{throw new Error("Isolated Profile outputs must be read by the confined case owner.")},"saveSandboxFile"),save:r(async({sessionId:t,turnId:o,identity:a,bytes:c})=>{let u=n.object({uploadId:n.string().min(1),maxChunkBytes:n.literal(j)}).parse(await e("output/begin",{sessionId:t,turnId:o,output:a}));for(let d=0;d<c.length;d+=j){let m=c.subarray(d,d+j);await e("output/chunk",{uploadId:u.uploadId,index:d/j,offset:d,sha256:B(m),contentsBase64:m.toString("base64")})}let{outputRef:s}=n.object({outputRef:je}).parse(await e("output/complete",{uploadId:u.uploadId}));if(s.location.kind!=="managed"||s.sha256!==a.sha256||s.sizeBytes!==c.length||s.sourceTaskId!==t||s.sourceTurnId!==o||s.id!==a.id||s.revision!==a.revision)throw new Error("The durable case output differs from its saved identity.");return{outputRef:s,artifact:{artifactRef:s.location.fileId,path:s.location.downloadPath,title:s.title,contentType:s.contentType,sizeBytes:s.sizeBytes}}},"save")},read:r(async(t,o)=>{if(t.location.kind!=="managed"||t.sizeBytes>1e7)throw new Error("Select a bounded managed case output.");let a=[];for(let u=0;u<t.sizeBytes;u+=j){o?.throwIfAborted();let s=n.object({offset:n.number().int(),contentsBase64:n.string().max(131072),sha256:n.string(),sizeBytes:n.number().int()}).parse(await e("output/readBytes",{sessionId:t.sourceTaskId,turnId:t.sourceTurnId,fileId:t.location.fileId,revision:t.revision,sha256:t.sha256,sizeBytes:t.sizeBytes,offset:u})),d=Buffer.from(s.contentsBase64,"base64");if(s.offset!==u||s.sha256!==t.sha256||s.sizeBytes!==t.sizeBytes||d.length!==Math.min(j,t.sizeBytes-u)||d.toString("base64")!==s.contentsBase64)throw new Error("The durable workbook byte range changed.");a.push(d)}o?.throwIfAborted();let c=Buffer.concat(a);if(B(c)!==t.sha256)throw new Error("The durable workbook differs from its sealed hash.");return c},"read")}}r(Et,"createHostedProfileArtifactOwner");import{randomUUID as Gt}from"node:crypto";var $t=n.object({createdAt:n.string().datetime(),id:n.string().min(1)}).strict(),Kt=n.object({entries:n.array(n.unknown()).max(100),nextBefore:$t.nullable()}).strict(),oe=class{constructor(e){this.client=e}client;static{r(this,"HostedProfileEvaluationStorage")}execute(e){return this.client.request({contractVersion:h,requestId:Gt(),operation:"profile-evaluations/execute",params:e})}async get(e,t,o){let a=await this.execute({action:"get",kind:e,id:t});if(a===null)return null;let c=o.parse(a);return M(c,`Hosted Profile evaluation ${e}`),c}async put(e,t,o,a,c){let u=o.parse(t);M(u,`Hosted Profile evaluation ${e}`);let s=o.parse(await this.execute({action:"put",kind:e,payload:u,profileKey:a,createdAt:c}));if(s.contentHash!==u.contentHash||g(s)!==g(u))throw new Error("Hosted Profile evaluation write returned different evidence.");return s}async page(e,t,o){let a=[],c=null;do{let u=Kt.parse(await this.execute({action:"page",kind:e,profileKey:g(F.parse(t)),before:c,limit:100}));if(u.nextBefore&&(u.entries.length===0||c&&(u.nextBefore.createdAt>c.createdAt||u.nextBefore.createdAt===c.createdAt&&u.nextBefore.id>=c.id)))throw new Error("Hosted Profile evaluation cursor did not advance.");for(let s of u.entries){let d=o.parse(s);M(d,`Hosted Profile evaluation ${e}`),a.push(d)}if(a.length>1e4)throw new Error("Hosted Profile evaluation history exceeds the bounded catalog limit.");c=u.nextBefore}while(c);return a}getProfileEvaluationGrade(e){return this.get("grade",e,de)}saveProfileEvaluationGrade(e){return this.put("grade",e,de,null,new Date().toISOString())}getProfileEvaluationReceipt(e){return this.get("receipt",e,pe)}saveProfileEvaluationReceipt(e){if(!Oe(e))throw new Error("Hosted Profile evaluation receipt is invalid.");return this.put("receipt",e,pe,null,e.completedAt)}getProfileEvaluationRun(e){return this.get("run",e,te)}saveProfileEvaluationRun(e){return this.put("run",e,te,g(F.parse(e.profileRef)),e.completedAt)}listProfileEvaluationRuns(e){return this.page("run",e,te)}getProfileEvaluationComparison(e){return this.get("comparison",e,Z)}saveProfileEvaluationComparison(e,t){return this.put("comparison",t,Z,g(F.parse(e)),t.createdAt)}listProfileEvaluationComparisons(e){return this.page("comparison",e,Z)}getProfileEvaluationSuiteRun(e){return this.get("suite",e,Y)}saveProfileEvaluationSuiteRun(e,t,o){if(g(t)!==o.catalogHash)throw new Error("Hosted Profile evaluation suite differs from its catalog.");return this.put("suite",o,Y,g(F.parse(e)),o.createdAt)}listProfileEvaluationSuiteRuns(e){return this.page("suite",e,Y)}};async function bt(l){let e=l.release;if(!e.hostExecution)throw new Error("Hosted evaluation requires explicit host execution attribution.");let t={hostConversationId:e.hostExecution.conversationId,hostTurnId:e.hostExecution.turnId},o={source:"openpond_git",profileId:e.profileId,repositoryId:e.repositoryId},a=r(async()=>({ref:o,sourceRevision:e.sourceRevision}),"selectedProfile"),c=r(()=>se(l.client,e),"selectedWorkflows"),u=new oe(l.client),s=r(async p=>{if(g(p)!==g(e.harnessRelease))throw new Error("Evaluation requires the admitted Profile release.");let H=await O(l.client,p);if(!H)throw new Error("Admitted evaluation Profile is unavailable.");return H},"loadRuntime"),d=r(async p=>{if(g(p.ref)!==g(o)||p.sourceRevision!==e.sourceRevision)throw new Error("Evaluation requires the admitted Profile source.");return ut({...p,runtime:await s(p.harnessRelease)})},"loadCatalog"),m=l.externalDataset?await it({value:l.externalDataset,release:(await s(e.harnessRelease)).release,sourceRevision:e.sourceRevision,client:l.client}):null,f=r(async(p,H,x)=>{if(H!==e.profileId)throw new Error("Evaluation Taskset Profile differs from its admitted source.");let E=await ct({definition:p,harnessRelease:x,runtime:await s(x)});if(!E)throw new Error("Evaluation Taskset is absent from the admitted Profile release.");return E},"loadTasksetPackage"),S=mt({resolveExternalDataset:m?.resolveExternalDataset,store:{runtimeEventsForTurn:r(p=>l.core.runtimeEventsForTurn(p),"runtimeEventsForTurn")},storeDir:l.storeDir,readManagedArtifact:l.readManagedArtifact,admitSession:l.admitSession,settleSession:l.settleSession,loadCatalog:d,loadTasksetPackage:f,selectedProfile:a,createSession:r(p=>{let H=ze.parse(p);return l.createSession({...H,metadata:{...H.metadata,...t}})},"createSession"),sendTurn:r((p,H)=>{let x=X.parse(H);return l.sendTurn(p,{...x,metadata:{...x.metadata,...t}})},"sendTurn"),interruptSessionTurn:l.interruptSessionTurn}),y=dt({resolveExternalDataset:m?.resolveExternalDataset,sourceCandidate:m?.sourceCandidate,privateGradingPreflight:r(p=>yt(p,!1),"privateGradingPreflight"),loadCatalog:d,selectedWorkflows:c,loadTasksetPackage:f,placement:"remote",boundedWorkComputeAvailable:!0,modelConfigurationHash:r(async(p,H)=>{if(p.providerId!=="openpond"||!H.hostModelConfigurationHash)throw new Error("Hosted evaluation requires a host-admitted model configuration receipt.");return H.hostModelConfigurationHash},"modelConfigurationHash")}),b=pt({resolveExternalDataset:m?.resolveExternalDataset,store:u,loadCatalog:d,loadTasksetPackage:f,selectedProfile:a,executeCase:S,privateGrading:r((p,H,x)=>Rt({manifest:p,packageValue:H,signal:x,executeSandboxVerifier:nt(l.client),authorize:r(async()=>{let E=p.profileEvaluation;if(!E||E.profileId!==e.profileId||E.sourceRevision!==e.sourceRevision)throw new Error("The hosted private grading source changed.");if(E.externalDatasetBinding){if(!m)throw new Error("The frozen Dataset owner is unavailable.");await m.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:p.contentHash})}let D=await d({ref:o,sourceRevision:e.sourceRevision,harnessRelease:E.harnessRelease});if(!E.externalDatasetBinding&&D.catalogHash!==E.catalogHash)throw new Error("The hosted private grading catalog changed.")},"authorize")}),"privateGrading")}),P={getProfileEvaluationRun:u.getProfileEvaluationRun.bind(u),getProfileEvaluationReceipt:u.getProfileEvaluationReceipt.bind(u),getProfileEvaluationGrade:u.getProfileEvaluationGrade.bind(u),getSession:l.core.getSession.bind(l.core),getTurn:l.core.getTurn.bind(l.core),runtimeEventsForTurn:l.core.runtimeEventsForTurn.bind(l.core),listModelUsageRecords:l.core.listModelUsageRecords.bind(l.core)};return{prepareProfileEvaluationRun:y,executeProfileEvaluationCase:S,executeProfileEvaluationRun:b,runPreparedProfileEvaluation:r(async p=>b(await y(p,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:ft({store:u,loadCatalog:d,selectedWorkflows:c,prepareRun:y,executeRun:b}),compareProfileEvaluationRuns:ht({store:u,selectedProfile:a}),buildProfileEvaluationReport:r(p=>gt({store:u,profileRef:o,request:p}),"buildProfileEvaluationReport"),listProfileEvaluations:r(async p=>{if(p&&typeof p=="object"&&"runId"in p)return vt({store:P,profileRef:o,...wt.parse(p)});let[H,x,E,D]=await Promise.all([d({ref:o,sourceRevision:e.sourceRevision,harnessRelease:e.harnessRelease}),u.listProfileEvaluationRuns(o),u.listProfileEvaluationComparisons(o),u.listProfileEvaluationSuiteRuns(o)]);return{...H,runs:x,comparisons:E,suiteRuns:D}},"listProfileEvaluations")}}r(bt,"createHostedProfileEvaluationRuntime");import{mkdir as lr}from"node:fs/promises";import{randomUUID as Mt}from"node:crypto";import V from"node:path";import{randomUUID as Tt}from"node:crypto";var Qt=n.object({revision:n.number().int().nonnegative(),payload:n.record(n.string(),n.unknown()).nullable()}).strict(),Jt=n.object({entries:n.array(n.unknown()).max(100),nextAfterId:n.string().min(1).nullable()}).strict(),ae=class{constructor(e){this.client=e}client;static{r(this,"HostedHarnessStateStorage")}async getPreference(e,t){return Qt.parse(await this.client.request({contractVersion:h,requestId:Tt(),operation:"harness/state/read",params:{workspaceId:e,kind:t,afterId:null,limit:1}}))}async listCandidates(e){return(await this.readAll(e,"candidates")).map(t=>ke.parse(t))}async listCrossRunRequests(e){return(await this.readAll(e,"cross_run_requests")).map(t=>Ae.parse(t))}async readAll(e,t){let o=[],a=null;do{let c=Jt.parse(await this.client.request({contractVersion:h,requestId:Tt(),operation:"harness/state/read",params:{workspaceId:e,kind:t,afterId:a,limit:Math.min(100,1001-o.length)}}));if(c.nextAfterId&&(c.entries.length===0||c.nextAfterId===a))throw new Error("Hosted Harness state cursor did not advance.");if(o.push(...c.entries),o.length>1e3)throw new Error("Hosted Harness state exceeds 1,000 entries.");a=c.nextAfterId}while(a);return o}};import{randomUUID as Zt}from"node:crypto";import{cp as Yt,mkdir as Xt,rm as er}from"node:fs/promises";import tr from"node:path";var we=n.object({schemaVersion:n.literal("openpond.harnessMemoryEntry.v1"),id:n.string(),workspaceId:n.string(),key:n.string(),content:n.string(),tags:n.array(n.string()),revision:n.number().int().positive(),status:n.enum(["active","deleted"]),sourceRunId:n.string().nullable(),sourceProposal:n.object({id:n.string(),contentHash:n.string()}).nullable(),createdAt:n.string().datetime(),updatedAt:n.string().datetime(),contentHash:n.string().regex(/^[a-f0-9]{64}$/)}).strict(),rr=n.object({createdAt:n.string().datetime(),id:n.string()}).strict(),xt=n.object({entries:n.array(n.unknown()).max(100),nextBefore:rr.nullable()}).strict(),ve=n.object({workspace:ce,receipt:Te}).strict(),ne=class{constructor(e,t){this.client=e;this.storeDir=t;this.usage=new St(e),this.overlay=new re({request:r(async o=>o.operation==="harness/overlay/get"?this.request({action:"overlay_get",...o.params}):o.operation==="harness/overlay/freezeProposal"?this.request({action:"overlay_freeze",...o.params},o.requestId):e.request(o),"request")})}client;storeDir;static{r(this,"HostedHarnessReviewStorage")}harnessStoragePlacement="hosted";reviewSessionId=null;overlay;usage;request(e,t=Zt()){return this.client.request({contractVersion:h,requestId:t,operation:"harness/review/execute",params:e},e.action==="release_put"?6e4:15e3)}sessionId(){if(!this.reviewSessionId)throw new Error("Hosted review memory requires an admitted review session.");return this.reviewSessionId}async prepareReview(e){let t=await this.getSession(e.runRef);if(!t)throw new Error("Hosted review session is unavailable.");this.reviewSessionId=t.id;let o=await this.getHarnessRunOverlay(t.id);if(!o)throw new Error("Hosted review overlay is unavailable.");let a=await this.getHarnessWorkspace(o.workspace.workspaceId);if(!a?.currentChannel.release)throw new Error("Hosted review workspace release is unavailable.");let c=await this.getHarnessReleaseRecord(a.currentChannel.release.contentHash);if(!c||c.sourceRevision!==a.sourceRevision)throw new Error("Hosted review source binding changed.");let u=Ve(this.storeDir,a.id);await Xt(u.root,{recursive:!0,mode:448}),await er(u.source,{recursive:!0,force:!0}),await Yt(tr.join(c.bundlePath,"source"),u.source,{recursive:!0,force:!1,errorOnExist:!0});let s=await Le({workspaceId:a.id,sourceDir:u.source});if(s.sourceRevision!==a.sourceRevision||s.harnessRelease.contentHash!==c.harnessRelease.contentHash)throw new Error("Hosted review source cache differs from its immutable release.")}getHarnessWorkspace=r(async e=>ce.nullable().parse(await this.request({action:"workspace_get",workspaceId:e})),"getHarnessWorkspace");getHarnessReleaseRecord=r(async e=>he.nullable().parse(await this.request({action:"release_get",contentHash:e})),"getHarnessReleaseRecord");saveHarnessReleaseRecord=r(async e=>he.parse(await this.request({action:"release_put",record:e},`review-release:${e.harnessRelease.contentHash}`)),"saveHarnessReleaseRecord");getHarnessRunOverlay=r(e=>this.overlay.getHarnessRunOverlay(e),"getHarnessRunOverlay");createHarnessRunOverlay=r(e=>this.overlay.createHarnessRunOverlay(e),"createHarnessRunOverlay");freezeHarnessRunOverlayWithProposalAtomically=r(e=>this.overlay.freezeHarnessRunOverlayWithProposalAtomically(e),"freezeHarnessRunOverlayWithProposalAtomically");getHarnessBackgroundReviewSettings=r(async e=>n.object({enabled:n.boolean(),updatedAt:n.string().datetime().nullable()}).strict().parse(await this.request({action:"background_get",workspaceId:e})),"getHarnessBackgroundReviewSettings");getHarnessMemory=r(async(e,t)=>we.nullable().parse(await this.request({action:"memory_get",workspaceId:e,sessionId:this.sessionId(),key:t})),"getHarnessMemory");listHarnessMemories=r(async(e,t={})=>{let o=n.object({entries:n.array(we).max(20),nextBefore:n.object({updatedAt:n.string().datetime(),key:n.string()}).nullable()}),a=[],c=null;do{let u=o.parse(await this.request({action:"memory_page",workspaceId:e,sessionId:this.sessionId(),before:c,limit:20,includeDeleted:t.includeDeleted??!1}));if(a.push(...u.entries),u.nextBefore&&(!u.entries.length||g(u.nextBefore)===g(c)))throw new Error("Hosted memory cursor did not advance.");c=u.nextBefore}while(c&&a.length<1e3);if(c)throw new Error("Hosted review memory exceeds its bounded window.");return a},"listHarnessMemories");writeHarnessMemory=r(async e=>we.parse(await this.request({action:"memory_write",sessionId:this.sessionId(),input:e},`review-memory:${g(e)}`)),"writeHarnessMemory");saveHarnessImprovementArtifact=r(async(e,t,o)=>{let a={action:"artifact_put",workspaceId:e,kind:t,artifact:o},c=(await import("./dist-O7HXZUBW.js")).HarnessReviewStorageParamsSchema.parse(a);return ge[t].parse(await this.request(c,`review-artifact:${t}:${o.contentHash}`))},"saveHarnessImprovementArtifact");listHarnessImprovementArtifacts=r(async(e,t,o=100)=>{let a=[],c=null,u=Math.min(Math.max(1,Math.trunc(o)),1e3);do{let s=(await import("./dist-O7HXZUBW.js")).HarnessReviewStorageParamsSchema.parse({action:"artifact_page",workspaceId:e,kind:t,before:c,limit:Math.min(100,u-a.length)}),d=xt.parse(await this.request(s));if(a.push(...d.entries),d.nextBefore&&(!d.entries.length||g(d.nextBefore)===g(c)))throw new Error("Hosted artifact cursor did not advance.");c=d.nextBefore}while(c&&a.length<u);return a.map(s=>ge[t].parse(s))},"listHarnessImprovementArtifacts");listPendingHarnessRefinerTriggers=r(async()=>{let e=await import("./hosted-harness-runtime-3AJGEIFD.js").then(a=>a.loadHostedHarnessRuntime(this.client));if(!e)return[];let t=[],o=null;do{let a=xt.parse(await this.request({action:"pending_page",workspaceId:e.workspace.id,before:o,limit:100}));if(t.push(...a.entries.map(c=>({workspaceId:e.workspace.id,trigger:xe.parse(c)}))),a.nextBefore&&(!a.entries.length||g(a.nextBefore)===g(o)))throw new Error("Hosted pending-review cursor did not advance.");o=a.nextBefore}while(o&&t.length<1e3);if(o)throw new Error("Hosted pending reviews exceed the bounded recovery window.");return t},"listPendingHarnessRefinerTriggers");advanceHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"advance",...e}})),"advanceHarnessWorkspaceAtomically");advanceReviewedHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"reviewedAdvance",...e}})),"advanceReviewedHarnessWorkspaceAtomically");rollbackHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"rollback",...e}})),"rollbackHarnessWorkspaceAtomically");getSession=r(async e=>Be.nullable().parse(await this.request({action:"session_get",sessionId:e})),"getSession");getTurn=r(async e=>U.nullable().parse(await this.request({action:"turn_get",turnId:e})),"getTurn");updateTurn=r(async(e,t)=>{let o=await this.getTurn(e);if(!o)return null;let a=U.parse(t(o)),{harnessSnapshot:c,...u}=o,{harnessSnapshot:s,...d}=a;if(!s||g(u)!==g(d))throw new Error("Hosted review may only restore a missing Harness snapshot.");return U.parse(await this.request({action:"snapshot_restore",turnId:e,expectedHash:g(o),snapshot:s}))},"updateTurn");turnsForSession=r(async(e,t=1e3)=>{let o=n.object({entries:n.array(U).max(100),nextBefore:n.number().int().positive().nullable()}),a=[],c=null,u=Math.min(Math.max(1,Math.trunc(t)),1e3);do{let s=o.parse(await this.request({action:"turn_page",sessionId:e,before:c,limit:Math.min(100,u-a.length)}));if(a.push(...s.entries),s.nextBefore&&(!s.entries.length||c!==null&&s.nextBefore>=c))throw new Error("Hosted review turn cursor did not advance.");c=s.nextBefore}while(c&&a.length<u);return a.reverse()},"turnsForSession");runtimeEventsForTurn=r(async(e,t={})=>{let o=n.object({entries:n.array(fe).max(100),nextAfterSequence:n.number().int().positive().nullable()}),a=[],c=0,u=Math.min(t.limit??1e4,1e4);do{let s=o.parse(await this.request({action:"event_page",turnId:e,afterSequence:c,names:[...t.names??[]],limit:Math.min(100,u-a.length)}));if(a.push(...s.entries),!s.nextAfterSequence)return a;if(!s.entries.length||s.nextAfterSequence<=c)throw new Error("Hosted review event cursor did not advance.");c=s.nextAfterSequence}while(a.length<u);return a},"runtimeEventsForTurn");listModelUsageRecords=r(e=>this.usage.listModelUsageRecords(e),"listModelUsageRecords");async appendRuntimeEvent(e){return fe.parse(await this.request({action:"event_append",event:e},`review-event:${e.id}`))}async upsertModelUsageRecord(e){await this.request({action:"usage_put",record:e},`review-usage:${g(e)}`)}};import{randomUUID as sr}from"node:crypto";async function It(l,e){let t=Ie.parse(await l.request({contractVersion:h,requestId:sr(),operation:"refiner/execute",params:{action:{action:"active_release",workspaceId:e}}}));return M(t,"Hosted Refiner active release"),t}r(It,"loadHostedRefinerRelease");import{randomUUID as or}from"node:crypto";var ar=n.object({personalizationSoul:n.string().max(8e3).optional(),userInstructions:n.string().max(64e3).optional(),preferences:me.optional()}).strict(),nr=n.object({revision:n.number().int().positive(),settings:ar}).strict();async function ye(l){let e=await l.request({contractVersion:h,requestId:or(),operation:"settings/get",params:{}}),t=e===null?null:nr.parse(e);return{revision:t?.revision??null,personalizationSoul:t?.settings.personalizationSoul??Ce[0].content,userInstructions:t?.settings.userInstructions??"",preferences:t?.settings.preferences??me.parse({})}}r(ye,"loadHostedRuntimeSettings");import{randomUUID as kt}from"node:crypto";function At(l){async function e(t){let o=await W(l,t);if(!o)throw new Error("No hosted Harness is selected for this run.");return o.workspace.id}return r(e,"workspaceId"),[{name:"memory_search",description:"Search bounded active memory for this selected Harness or Profile. Returns keys, revisions and short excerpts.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1,maxLength:500},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},execute:r(async t=>{let o=t.args.query;if(typeof o!="string"||!o.trim()||o.length>500)throw new Error("Memory query is invalid.");let a=t.args.limit===void 0?8:t.args.limit;if(typeof a!="number"||!Number.isInteger(a)||a<1||a>20)throw new Error("Memory search limit is invalid.");let c=await l.request({contractVersion:h,requestId:kt(),operation:"harness/memory/search",params:{workspaceId:await e(t.session),query:o,limit:a}});return{toolCallId:t.callId,name:"memory_search",ok:!0,contentText:JSON.stringify(c),data:c}},"execute")},{name:"memory_inspect",description:"Read one exact active memory entry returned by memory_search.",parameters:{type:"object",additionalProperties:!1,properties:{key:{type:"string",minLength:1,maxLength:120}},required:["key"]},execute:r(async t=>{let o=t.args.key;if(typeof o!="string"||!/^[a-z0-9][a-z0-9-]{0,119}$/.test(o))throw new Error("Memory key is invalid.");let a=await l.request({contractVersion:h,requestId:kt(),operation:"harness/memory/get",params:{workspaceId:await e(t.session),key:o}});if(!a||typeof a!="object"||Array.isArray(a)||a.status!=="active")throw new Error(`Harness memory does not exist: ${o}.`);return{toolCallId:t.callId,name:"memory_inspect",ok:!0,contentText:JSON.stringify(a),data:a}},"execute")}]}r(At,"createHostedHarnessMemoryTools");import{randomUUID as Ct}from"node:crypto";function Ot(l){return[{name:"work_list_outputs",description:"List this conversation's published outputs from completed turns without starting sandbox compute. Use this before reading a previously saved file; returns exact file IDs and revisions. New workspace files are published after the current turn ends. Inspect those with workspace tools and finish the turn instead of polling this list.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:r(async e=>{let t=await l.request({contractVersion:h,requestId:Ct(),operation:"output/list",params:{}});return{toolCallId:e.callId,name:"work_list_outputs",ok:!0,contentText:JSON.stringify(t),data:t}},"execute")},{name:"work_read_output",description:"Read the actual saved text/Markdown or PDF text of a file returned by work_list_outputs, without starting sandbox compute. Prefer this for questions about saved outputs. Use workspace tools for edits, execution and unsaved files. PDF text extraction does not inspect images or page appearance.",parameters:{type:"object",additionalProperties:!1,properties:{fileId:{type:"string",minLength:1,maxLength:191},revision:{type:"integer",minimum:1},offset:{type:"integer",minimum:0,maximum:1e7},maxChars:{type:"integer",minimum:1,maximum:1e5},firstPage:{type:"integer",minimum:1,maximum:1e3},pageCount:{type:"integer",minimum:1,maximum:10}},required:["fileId","revision"]},execute:r(async e=>{let t=await l.request(z.parse({contractVersion:h,requestId:Ct(),operation:"output/read",params:e.args}),6e4);return{toolCallId:e.callId,name:"work_read_output",ok:!0,contentText:JSON.stringify(t),data:t}},"execute")}]}r(Ot,"createHostedWorkOutputTools");import{randomUUID as _t}from"node:crypto";function qt(l,e){return{allowedTools:e,authorizeTool:r(async t=>{let o=await l.request({contractVersion:h,requestId:_t(),operation:"embedding/authorize",params:{sessionId:t.session.id,turnId:t.turnId,name:t.name}});if(!o||typeof o!="object"||Array.isArray(o)||o.allowed!==!0)throw new Error("Hosted tool authorization denied.")},"authorizeTool")}}r(qt,"createHostedEmbeddingAdapter");function Bt(l){return async e=>{let t=rt.parse(e);return l.request({contractVersion:h,requestId:_t(),operation:"sandbox/request",params:{action:t}},e.type==="create"?3e5:e.type==="exec"?18e4:6e4)}}r(Bt,"createHostedSandboxRequest");var ir=["sandbox/request","embedding/authorize","output/begin","output/chunk","output/complete","output/saveSandboxFile","output/list","output/read","settings/get","harness/get","harness/overlay/get","harness/overlay/put","harness/memory/get","harness/memory/list","harness/memory/search","harness/memory/write","harness/state/read","task-inbox/execute","create-improve/execute","approval/get","approval/upsert","usage/getByRequestId","usage/upsert","usage/page","session/count","session/get","session/page","session/put","turn/count","turn/wakeCount","turn/get","turn/put","turn/latest","turn/page","thread/turnPage","event/append","events/page","events/latestAssistantText"];function Dt(l){if(ir.some(e=>!l.operations.includes(e)))throw new Error("Hosted Postgres runtime capabilities are incomplete.");if(l.maxRequestBytes<256e3||l.maxInFlight<32||l.maxPageSize<200)throw new Error("Hosted Postgres runtime transport limits are incompatible.")}r(Dt,"assertHostedWorkCapabilities");var v=r(async()=>{throw new Error("This hosted control is not available until its Postgres repository is activated.")},"unavailable"),ur=De(),cr=Me();async function _o(l){let e=l.runtimeStorage,t=l.hostStorageClient;if(e.kind!=="hosted_postgres"||!t||e.client!==t)throw new Error("Hosted storage selection mismatch.");if(l.embedding||l.sandboxRequest)throw new Error("Hosted Postgres tool and sandbox authority must come from the host transport.");if(!l.streamOpenPondHostedChatTurn)throw new Error("Hosted Postgres runtime requires a host-admitted model stream.");if(l.profileSource||l.harness)throw new Error("Hosted Postgres runtime accepts only host-admitted immutable sources.");if(l.services&&Object.values(l.services).some(i=>i!==!1&&i!==void 0))throw new Error("Hosted service adapters must be admitted by the Postgres composition.");let o=st.parse(await t.request({contractVersion:h,requestId:Mt(),operation:"capabilities",params:{}}));Dt(o);let a=qt(t,o.allowedTools),c=Bt(t),u=V.resolve(l.storeDir??process.cwd()),s=V.resolve(l.workspaceDir??process.cwd());await lr(s,{recursive:!0});let d=We({channel:"app-server",logDir:V.join(u,"logs"),metadata:{version:l.version??_e,runtimeVersion:Ne(),placement:"hosted_work"}}),m=e.core,f=new ne(t,u),S=e.admittedProfileRelease?await lt(t,e.admittedProfileRelease):{profile:cr,profileLibrary:ur},{appendRuntimeEvent:y,closeEventSubscribers:b,subscribeRuntimeEvents:P}=Ze({logger:d,assistantDeltaFlushMs:250,store:{appendRuntimeEvent:r(i=>["harness.refiner.queued","harness.refiner.started","harness.refiner.completed","harness.refiner.failed"].includes(i.name)?f.appendRuntimeEvent(i):m.appendRuntimeEvent(i),"appendRuntimeEvent"),runtimeEventPageRows:r(i=>m.runtimeEventPageRows(i),"runtimeEventPageRows")}}),p=ee({queueId:"turn-follow-up",logger:d}),H=ee({queueId:"subagent",logger:d}),x=Ke(l.streamOpenPondHostedChatTurn,{enabled:$e()}),E=ee({queueId:"harness-refiner",logger:d,concurrency:1}),D=Pt({store:f,storeDir:u,queue:E,streamOpenPondHostedChatTurn:x,appendRuntimeEvent:y,upsertModelUsageRecord:r(i=>f.upsertModelUsageRecord(i),"upsertModelUsageRecord"),prepareReview:r(i=>f.prepareReview(i),"prepareReview"),loadActiveRefinerRelease:r(async()=>{let i=await O(t);if(!i)throw new Error("Hosted review has no admitted Harness workspace.");return It(t,i.workspace.id)},"loadActiveRefinerRelease")}),Re=r(async()=>(await ye(t)).preferences,"preferences"),{createSession:ie,getSession:q,updateSession:L,completeTurn:zt,failTurn:jt,interruptTurn:Nt}=et({store:m,defaultSessionCwd:r(()=>s,"defaultSessionCwd"),appendRuntimeEvent:y,loadAppPreferences:Re,loadLastUsedProfile:r(async()=>S.profileLibrary.lastUsed,"loadLastUsedProfile")}),le=Je({workspaceDir:s,logger:d,getSession:q,updateSession:L,appendRuntimeEvent:y,sandboxRequest:c,sandboxCreationMode:"hosted_worker"}),G=Ge({appendRuntimeEvent:y,findLocalProject:r(async()=>null,"findLocalProject"),onRepositoryInstructionDiagnostic:r((i,w)=>d.warn("repository instruction file skipped",{diagnostic:i,sessionId:w.id}),"onRepositoryInstructionDiagnostic")}),Se=new re(t),$=new ae(t),Pe=Et(t),ue=Ht(t),K=e.admittedProfileRelease?.hostExecution?await O(t,e.admittedProfileRelease.harnessRelease):null;if(e.admittedProfileRelease?.hostExecution&&(!K||!o.operations.includes("output/readBytes")||!o.operations.includes("profile-evaluations/sandbox")||!o.operations.includes("profile-evaluations/grade")))throw new Error("Hosted evaluation requires its admitted release, managed artifact owner and private sandbox grader.");let Ft=Fe({deviceId:"hosted-evaluation",storeDir:u,runtimeEventsForSession:r(i=>m.runtimeEventsForSession(i),"runtimeEventsForSession"),managedPersistence:{...Pe.persistence,sourceTurnStartedAt:r(async(i,w)=>{let R=await m.getTurn(w);if(!R||R.sessionId!==i||!R.startedAt)throw new Error("The managed output has no actual started case turn.");return R.startedAt},"sourceTurnStartedAt")}}),k=K?at({readOutput:ue.readOutput,executeCommand:ue.execute,settleRemote:ue.settle,runtimeNode:"node",runtimeAgentRoot:"/workspace/runtime",storeDir:u,release:K.release,getSession:q,getTurn:r(i=>m.getTurn(i),"getTurn"),saveOutput:Ft.saveOwnedOutputBytes,recordOutput:r(async(i,w,R)=>{await y({id:Mt(),timestamp:new Date().toISOString(),name:"workspace_action_result",source:"server",sessionId:i,turnId:w,action:"work_output_save",status:"completed",data:R})},"recordOutput"),authorize:r(async()=>{let i=await O(t,e.admittedProfileRelease.harnessRelease);if(!i||i.release.harnessRelease.contentHash!==K.release.harnessRelease.contentHash)throw new Error("The hosted isolated evaluation source authority changed.")},"authorize")}):null,Ut=tt(a,async(i,w)=>{let R=await m.getTurn(i);if(!R)throw new Error("Embedded turn is unavailable.");let C=await q(R.sessionId),Q=C.metadata?.embeddingToolBindings,N=[...w].sort((J,Wt)=>J.name.localeCompare(Wt.name));if(Q!==void 0&&g(Q)!==g(N))throw new Error("Embedded tool bindings changed; start a new thread.");await L(C.id,{metadata:{...C.metadata,embeddingToolBindings:N}}),await m.updateTurn(i,J=>({...J,metadata:{...J.metadata,toolBindings:N}}))}),T=Ye({executionHost:"embedded",workInputsForSession:l.workInputsForSession,attachmentRootDir:V.join(u,"attachments"),isolatedProfileEvaluationForTurn:k?async i=>{if(i.metadata?.profileEvaluationRun===void 0)return!1;if(!k.ownsSession(i.id))throw new Error("The hosted evaluation has no actual isolated case owner.");return!0}:void 0,executeProfileEvaluationAction:k?.executeAction,resolveModelTools:r(async i=>{let w=k?.ownsSession(i.session.id)?await k.resolveTools(i):await Ut(i);return l.resolveModelTools?l.resolveModelTools({...i,tools:w}):w},"resolveModelTools"),hostedToolFlags:{toolMode:"native",nativeToolTransport:!0,nativeToolProviderDenylist:[],textToolFallback:!1},store:m,inboxStore:e.inbox,createSession:ie,getSession:q,updateSession:L,completeTurn:zt,failTurn:jt,interruptTurn:Nt,upsertApproval:r(i=>m.upsertApproval(i),"upsertApproval"),defaultSessionCwd:r(()=>s,"defaultSessionCwd"),findOpenPondApp:r(async i=>({id:i||qe(s),name:V.basename(s)||"Workspace",description:null,visibility:"private",sandbox:!0}),"findOpenPondApp"),resolveSessionWorkspaceCwd:r(async i=>i.cwd?.trim()||s,"resolveSessionWorkspaceCwd"),ensureCodexRuntime:r(async()=>{throw new Error("Codex process hosting is unavailable.")},"ensureCodexRuntime"),appendWorkspaceDiffEvent:le.appendWorkspaceDiffEvent,workspaceDiffBaseline:le.workspaceDiffBaseline,appendRuntimeEvent:y,executeWorkspaceTool:le.executeWorkspaceTool,executeOpenPondCommand:r(async()=>{throw new Error("Hosted commands require durable authorization.")},"executeOpenPondCommand"),loadOpenPondProfileState:r(async()=>S.profile,"loadOpenPondProfileState"),loadOpenPondProfileLibrary:r(async()=>S.profileLibrary,"loadOpenPondProfileLibrary"),readOpenPondProfileSkill:v,loadSelectedHarnessRuntime:r(i=>{if(i.currentProfile&&(!e.admittedProfileRelease||i.currentProfile.repositoryId!==e.admittedProfileRelease.repositoryId||i.currentProfile.profileId!==e.admittedProfileRelease.profileId))throw new Error("Hosted Profile session lacks admitted immutable source.");return W(t,i)},"loadSelectedHarnessRuntime"),ensureHarnessRunOverlay:r(i=>Se.ensureHarnessRunOverlay(i),"ensureHarnessRunOverlay"),processHarnessImprovementBoundary:D,harnessModelTools:[...At(t),...Ot(t)],loadBuiltInOpenPondSkills:r(async()=>[],"loadBuiltInOpenPondSkills"),readBuiltInOpenPondSkill:v,loadPersonalizationSoul:r(async()=>(await ye(t)).personalizationSoul,"loadPersonalizationSoul"),loadAppPreferences:Re,maybeCreateScaffoldForTurn:G.maybeCreateScaffoldForTurn,hostedSystemPrompt:G.hostedSystemPrompt,appendAssistantText:G.appendAssistantText,appendHostedContextUsage:G.appendHostedContextUsage,streamOpenPondHostedChatTurn:x,turnFollowUpQueue:p,subagentQueue:H,maxHostedWorkspaceToolRounds:Xe(l.maxHostedWorkspaceToolRounds),maxRepeatedInvalidToolRequests:3});await T.recoverPendingSubagentCompletions(),await T.recoverTaskInbox();let He=!1,Ee=r(async(i,w)=>{if(X.parse(w).attachments?.length&&!k?.ownsSession(i))throw new Error("Hosted attachments require managed-file admission.");let R=await q(i);if(R.currentProfile&&(!e.admittedProfileRelease||R.currentProfile.repositoryId!==e.admittedProfileRelease.repositoryId||R.currentProfile.profileId!==e.admittedProfileRelease.profileId))throw new Error("Hosted Profile session lacks admitted immutable source.");return He||(await D.reconcilePending(),await E.drain(),He=!0),T.sendTurn(i,w)},"sendTurn");if(l.profileExternalDataset&&!e.admittedProfileRelease?.hostExecution)throw new Error("External Dataset requires its admitted hosted evaluation.");let A=e.admittedProfileRelease?.hostExecution?await bt({client:t,core:m,release:e.admittedProfileRelease,storeDir:u,...l.profileExternalDataset?{externalDataset:l.profileExternalDataset}:{},readManagedArtifact:Pe.read,admitSession:k.admitSession,settleSession:k.settleSession,createSession:ie,sendTurn:Ee,interruptSessionTurn:T.interruptSessionTurn}):null,be=!1;return{...Ue({ports:Qe({bindHome:!1,placement:"hosted_work",connectedAppProviders:[],featureOverrides:{profileWorkflows:!!e.admittedProfileRelease,profileEvaluations:!!A,harnessProposalReview:!1,harnessEvaluationReview:!1,harnessEvaluationReviewAcceptance:!1,harnessEvaluationTasksetMaterialization:!1,harnessEvaluationBaseline:!1,harnessBackgroundReview:!1,harnessDiff:!1,harnessRollback:!1,harnessReview:!1,refinerProfiles:!1,immutableRefinerAdmission:!1},createSession:ie,getSession:q,turnsForSession:r(i=>m.turnsForSession(i,1e3),"turnsForSession"),runtimeEventsForSession:r(i=>m.runtimeEventsForSession(i,{excludeReasoningDeltas:!0}),"runtimeEventsForSession"),sendTurn:Ee,steerSessionTurn:T.steerSessionTurn,readTaskInbox:T.readTaskInbox,queueTaskInput:T.queueTaskInput,updateTaskInput:T.updateTaskInput,isSessionTurnActive:T.isSessionTurnActive,waitForSessionTurnSettlement:T.waitForSessionTurnSettlement,interruptSessionTurn:T.interruptSessionTurn,resolveApproval:r(async(i,w)=>{let R=await T.resolveCreateImproveApproval(i,w);if(R)return R;let C=await T.resolveSubagentPatchApplyApproval(i,w);if(C)return C;throw new Error(`Approval not found: ${i}`)},"resolveApproval"),listProfileWorkflows:e.admittedProfileRelease?()=>se(t,e.admittedProfileRelease):v,listProfileEvaluations:A?.listProfileEvaluations??v,loadProfileTrainingSource:v,prepareProfileEvaluationRun:A?.prepareProfileEvaluationRun??v,runPreparedProfileEvaluation:A?.runPreparedProfileEvaluation??v,runProfileEvaluationSuite:A?.runProfileEvaluationSuite??v,executeProfileEvaluationCase:A?.executeProfileEvaluationCase??v,executeProfileEvaluationRun:A?.executeProfileEvaluationRun??v,compareProfileEvaluationRuns:A?.compareProfileEvaluationRuns??v,buildProfileEvaluationReport:A?.buildProfileEvaluationReport??v,inspectHarness:r(async()=>{let i=await O(t);if(!i)return null;let w=i.workspace.id,[R,C,Q,N]=await Promise.all([$.getPreference(w,"workspace_settings"),$.getPreference(w,"evaluation_review_settings"),$.listCandidates(w),$.listCrossRunRequests(w)]);return{workspace:i.workspace,release:i.release,backgroundReview:R,evaluationReview:C,refinementCandidates:Q,crossRunRequests:N}},"inspectHarness"),reviewHarnessProposal:v,reviewHarness:v,acceptHarnessEvaluationReview:v,materializeHarnessEvaluationTaskset:v,runHarnessEvaluationBaseline:v,validateHarness:r(async()=>{let i=await O(t);return i?{valid:!0,workspaceId:i.workspace.id,harnessRelease:i.release.harnessRelease,agentSnapshot:i.release.agentSnapshot}:{valid:!1,reason:"No admitted hosted Harness release."}},"validateHarness"),updateHarnessBackgroundReview:v,diffHarness:v,rollbackHarness:v,inspectRefiner:v,updateRefiner:v,activateRefiner:v,rollbackRefiner:v,subscribeRuntimeEvents:P,observeRuntimeOperation:r(i=>d.info("agent runtime operation",i),"observeRuntimeOperation")}),close:r(async()=>{be||(be=!0,k?.close(),await T.close(),await Promise.all([p.drain(),H.drain(),E.drain()]),await b(),await d.flush())},"close")}),updateSession:L,storePath:"hosted-postgres",workspaceDir:s,pinSessionHarness:r(async i=>{let w=await W(t,await q(i));if(!w)return null;let R={id:w.release.harnessRelease.id,contentHash:w.release.harnessRelease.contentHash};return await Se.ensureHarnessRunOverlay({runId:i,workspace:w.workspace,harnessRelease:R,admittedAt:new Date().toISOString()}),R},"pinSessionHarness"),composition:["runtime_event_bus","session_store","hosted_provider","workspace_tools","command_approvals","harness","agent_runtime","jsonl_transport"]}}r(_o,"createHostedOwnedAppServer");export{_o as createHostedOwnedAppServer};
|
|
2
|
+
import{b as lt,c as se,e as St}from"./chunk-WD6ANOLL.js";import{c as mt,d as pt,e as ft}from"./chunk-H2XG5N7D.js";import{b as ct,p as dt,q as yt,r as Rt}from"./chunk-ZWEY66RT.js";import{a as ht,b as gt}from"./chunk-4JYTFEND.js";import{b as wt,c as vt}from"./chunk-XD4ZIQZ2.js";import{b as ut}from"./chunk-XGJG2ZKE.js";import"./chunk-S7A2OGL2.js";import{b as nt}from"./chunk-WGISITX6.js";import"./chunk-EICS777E.js";import{a as ot,b as at}from"./chunk-TSQ2I6XV.js";import"./chunk-Q3WXB465.js";import"./chunk-YMCF5GR2.js";import"./chunk-FEAKTSRS.js";import{b as it}from"./chunk-SVNEPXU3.js";import"./chunk-TPOAAJKA.js";import{a as re,b as O,c as W}from"./chunk-IR2Y2VQY.js";import{a as Pt}from"./chunk-XT5WUQGT.js";import"./chunk-WLQEONBF.js";import"./chunk-AXO6OHJB.js";import"./chunk-R5GRESW3.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{a as te}from"./chunk-K6DB5QWG.js";import"./chunk-6IS5OLI5.js";import"./chunk-W45RKGM6.js";import"./chunk-N54CPLVD.js";import"./chunk-K3LS5SK7.js";import"./chunk-B7XJBP4U.js";import"./chunk-FVK4W27G.js";import"./chunk-FE2ENE3U.js";import"./chunk-YONDU5TN.js";import{d as Fe,e as We,j as Ge,k as Qe,na as Ye,oa as et,pa as tt,v as Je,w as ee,y as Ze}from"./chunk-4NN5OLKW.js";import{g as Xe}from"./chunk-RWRKUO5D.js";import{a as Ue}from"./chunk-PYNW5OFA.js";import"./chunk-4VZJQRQI.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import"./chunk-AN525SPP.js";import"./chunk-IXZ5ZGIL.js";import"./chunk-46RMTR2Z.js";import"./chunk-SYUKES6H.js";import"./chunk-UOFDKMRU.js";import"./chunk-R6VI7MX5.js";import{$ as z,W as rt,Z as h,aa as st}from"./chunk-6I5AUTVO.js";import"./chunk-IZ6DLEVY.js";import"./chunk-KQD36SBJ.js";import{g as Ve,m as Le}from"./chunk-CSU7RDA5.js";import"./chunk-UKSSFB4Q.js";import"./chunk-7HAGSE7L.js";import"./chunk-N73MU2C3.js";import"./chunk-FAKDGLZQ.js";import{a as $e,b as Ke}from"./chunk-GW766ZSO.js";import{p as Ne}from"./chunk-MCBRB5D6.js";import"./chunk-JD76ANPN.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import"./chunk-4TTXNVCE.js";import"./chunk-HNDAGZCF.js";import"./chunk-YU3C6U5V.js";import"./chunk-OPTJYDZN.js";import"./chunk-KVTBX2UP.js";import"./chunk-BJXPQIVD.js";import"./chunk-RS526BG7.js";import"./chunk-DMFUEUAZ.js";import"./chunk-GF55VEMR.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import{a as ge}from"./chunk-GUG2SWRZ.js";import{a as he}from"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import{C as De,D as Me,M as ze,P as X,a as fe,g as qe,ja as je,v as F,w as Be,x as U}from"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import{b as xe}from"./chunk-4V73I4OL.js";import{a as ce,h as Te,n as ke,p as Ae}from"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-V3T2OJBZ.js";import"./chunk-BUZ7CBJC.js";import{b as _e}from"./chunk-O6ZYDHEJ.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import{c as Ie}from"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import{Hb as Z,Ob as Y,f as pe,m as Oe}from"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import{Ka as de}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import{V as me,X as Ce}from"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{m as B,n as g,o as M}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as n}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as r}from"./chunk-FTQLQJQV.js";import{randomUUID as Vt}from"node:crypto";import{promises as _}from"node:fs";import I from"node:path";function Ht(l){let e=new Map,t=new Map;async function o(s,d){let m=(t.get(s)??Promise.resolve()).catch(()=>{}).then(d);t.set(s,m);try{return await m}finally{t.get(s)===m&&t.delete(s)}}r(o,"serial");let a=r((s,d=18e4)=>l.request(z.parse({contractVersion:h,requestId:Vt(),operation:"profile-evaluations/sandbox",params:s}),d),"request");async function c(s,d,m,f){let S=B(f),y=`${d}/${m}/${S}`,b=e.get(s.sessionId)??new Set;if(!b.has(y)){if(f.length>1e7)throw new Error("The public case file exceeds its admitted bound.");for(let P=0;P===0||P<f.length;P+=98304)s.signal.throwIfAborted(),await a({sessionId:s.sessionId,turnId:s.turnId,action:"upload",area:d,path:m,sha256:S,sizeBytes:f.length,offset:P,contentsBase64:f.subarray(P,P+98304).toString("base64")},3e5);b.add(y),e.set(s.sessionId,b)}}r(c,"upload");async function u(s,d=""){let m=[];for(let f of await _.readdir(I.join(s,d),{withFileTypes:!0})){let S=I.posix.join(d,f.name);if(f.isSymbolicLink()){let y=await _.realpath(I.join(s,S));if(!y.startsWith(`${await _.realpath(s)}${I.sep}`)||(await _.stat(y)).isDirectory())throw new Error("The public Agent runtime symlink escapes its file closure.");m.push(S);continue}if(f.isDirectory()?m.push(...await u(s,S)):f.isFile()&&m.push(S),m.length>8192)throw new Error("The public Agent runtime exceeds the file limit.")}return m}return r(u,"runtimeFiles"),{execute:r(s=>o(s.sessionId,async()=>{s.signal.throwIfAborted();for(let[f,S]of Object.entries(s.publicHashes)){let y=await _.realpath(I.join(s.sourceRoot,f)),b=await _.realpath(s.sourceRoot);if(!y.startsWith(`${b}${I.sep}`))throw new Error("The public case file escaped its source root.");let P=await _.readFile(y);if(B(P)!==S)throw new Error("The public case file changed before upload.");await c(s,"policy",f,P)}if(s.runtimeRoot)for(let f of await u(s.runtimeRoot))await c(s,"runtime",f,await _.readFile(I.join(s.runtimeRoot,f)));let d=I.relative(s.sourceRoot,s.cwd??s.sourceRoot);if(d.startsWith("..")||I.isAbsolute(d))throw new Error("The command cwd escaped the admitted case.");let m=n.object({code:n.number().int().nullable(),stdout:n.string().max(75e4),stderr:n.string().max(75e4),timedOut:n.boolean(),stdoutTruncated:n.boolean(),stderrTruncated:n.boolean()}).parse(await a({sessionId:s.sessionId,turnId:s.turnId,action:"exec",command:s.command,stdin:s.stdin,cwd:d.split(I.sep).join("/"),timeoutMs:s.timeoutMs},s.timeoutMs+15e3));return s.signal.throwIfAborted(),m}),"execute"),readOutput:r(s=>o(s.sessionId,async()=>{let d=ot(s.path),m=[],f=null,S=null;for(let b=0;f===null||b<f;b+=98304){s.signal.throwIfAborted();let P=n.object({sizeBytes:n.number().int().min(1).max(1e7),sha256:n.string().regex(/^[a-f0-9]{64}$/),contentsBase64:n.string().max(131072)}).parse(await a({sessionId:s.sessionId,turnId:s.turnId,action:"read",path:d,offset:b},6e4));f??=P.sizeBytes,S??=P.sha256;let p=Buffer.from(P.contentsBase64,"base64");if(P.sizeBytes!==f||P.sha256!==S||p.length!==Math.min(98304,f-b)||p.toString("base64")!==P.contentsBase64)throw new Error("The confined output changed during readback.");m.push(p)}let y=Buffer.concat(m);if(B(y)!==S)throw new Error("The confined output differs from its saved byte identity.");return s.signal.throwIfAborted(),{bytes:y,title:d.split("/").at(-1)}}),"readOutput"),settle:r((s,d)=>o(s,async()=>{try{await a({sessionId:s,turnId:d,action:"stop"},6e4)}finally{e.delete(s)}}),"settle")}}r(Ht,"createHostedProfileCommandOwner");import{randomUUID as Lt}from"node:crypto";var j=98304;function Et(l){let e=r((t,o)=>l.request(z.parse({contractVersion:h,requestId:Lt(),operation:t,params:o})),"request");return{persistence:{sourceTurnStartedAt:r(async()=>{throw new Error("The case owner must supply its actual turn start time.")},"sourceTurnStartedAt"),saveSandboxFile:r(async()=>{throw new Error("Isolated Profile outputs must be read by the confined case owner.")},"saveSandboxFile"),save:r(async({sessionId:t,turnId:o,identity:a,bytes:c})=>{let u=n.object({uploadId:n.string().min(1),maxChunkBytes:n.literal(j)}).parse(await e("output/begin",{sessionId:t,turnId:o,output:a}));for(let d=0;d<c.length;d+=j){let m=c.subarray(d,d+j);await e("output/chunk",{uploadId:u.uploadId,index:d/j,offset:d,sha256:B(m),contentsBase64:m.toString("base64")})}let{outputRef:s}=n.object({outputRef:je}).parse(await e("output/complete",{uploadId:u.uploadId}));if(s.location.kind!=="managed"||s.sha256!==a.sha256||s.sizeBytes!==c.length||s.sourceTaskId!==t||s.sourceTurnId!==o||s.id!==a.id||s.revision!==a.revision)throw new Error("The durable case output differs from its saved identity.");return{outputRef:s,artifact:{artifactRef:s.location.fileId,path:s.location.downloadPath,title:s.title,contentType:s.contentType,sizeBytes:s.sizeBytes}}},"save")},read:r(async(t,o)=>{if(t.location.kind!=="managed"||t.sizeBytes>1e7)throw new Error("Select a bounded managed case output.");let a=[];for(let u=0;u<t.sizeBytes;u+=j){o?.throwIfAborted();let s=n.object({offset:n.number().int(),contentsBase64:n.string().max(131072),sha256:n.string(),sizeBytes:n.number().int()}).parse(await e("output/readBytes",{sessionId:t.sourceTaskId,turnId:t.sourceTurnId,fileId:t.location.fileId,revision:t.revision,sha256:t.sha256,sizeBytes:t.sizeBytes,offset:u})),d=Buffer.from(s.contentsBase64,"base64");if(s.offset!==u||s.sha256!==t.sha256||s.sizeBytes!==t.sizeBytes||d.length!==Math.min(j,t.sizeBytes-u)||d.toString("base64")!==s.contentsBase64)throw new Error("The durable workbook byte range changed.");a.push(d)}o?.throwIfAborted();let c=Buffer.concat(a);if(B(c)!==t.sha256)throw new Error("The durable workbook differs from its sealed hash.");return c},"read")}}r(Et,"createHostedProfileArtifactOwner");import{randomUUID as Gt}from"node:crypto";var $t=n.object({createdAt:n.string().datetime(),id:n.string().min(1)}).strict(),Kt=n.object({entries:n.array(n.unknown()).max(100),nextBefore:$t.nullable()}).strict(),oe=class{constructor(e){this.client=e}client;static{r(this,"HostedProfileEvaluationStorage")}execute(e){return this.client.request({contractVersion:h,requestId:Gt(),operation:"profile-evaluations/execute",params:e})}async get(e,t,o){let a=await this.execute({action:"get",kind:e,id:t});if(a===null)return null;let c=o.parse(a);return M(c,`Hosted Profile evaluation ${e}`),c}async put(e,t,o,a,c){let u=o.parse(t);M(u,`Hosted Profile evaluation ${e}`);let s=o.parse(await this.execute({action:"put",kind:e,payload:u,profileKey:a,createdAt:c}));if(s.contentHash!==u.contentHash||g(s)!==g(u))throw new Error("Hosted Profile evaluation write returned different evidence.");return s}async page(e,t,o){let a=[],c=null;do{let u=Kt.parse(await this.execute({action:"page",kind:e,profileKey:g(F.parse(t)),before:c,limit:100}));if(u.nextBefore&&(u.entries.length===0||c&&(u.nextBefore.createdAt>c.createdAt||u.nextBefore.createdAt===c.createdAt&&u.nextBefore.id>=c.id)))throw new Error("Hosted Profile evaluation cursor did not advance.");for(let s of u.entries){let d=o.parse(s);M(d,`Hosted Profile evaluation ${e}`),a.push(d)}if(a.length>1e4)throw new Error("Hosted Profile evaluation history exceeds the bounded catalog limit.");c=u.nextBefore}while(c);return a}getProfileEvaluationGrade(e){return this.get("grade",e,de)}saveProfileEvaluationGrade(e){return this.put("grade",e,de,null,new Date().toISOString())}getProfileEvaluationReceipt(e){return this.get("receipt",e,pe)}saveProfileEvaluationReceipt(e){if(!Oe(e))throw new Error("Hosted Profile evaluation receipt is invalid.");return this.put("receipt",e,pe,null,e.completedAt)}getProfileEvaluationRun(e){return this.get("run",e,te)}saveProfileEvaluationRun(e){return this.put("run",e,te,g(F.parse(e.profileRef)),e.completedAt)}listProfileEvaluationRuns(e){return this.page("run",e,te)}getProfileEvaluationComparison(e){return this.get("comparison",e,Z)}saveProfileEvaluationComparison(e,t){return this.put("comparison",t,Z,g(F.parse(e)),t.createdAt)}listProfileEvaluationComparisons(e){return this.page("comparison",e,Z)}getProfileEvaluationSuiteRun(e){return this.get("suite",e,Y)}saveProfileEvaluationSuiteRun(e,t,o){if(g(t)!==o.catalogHash)throw new Error("Hosted Profile evaluation suite differs from its catalog.");return this.put("suite",o,Y,g(F.parse(e)),o.createdAt)}listProfileEvaluationSuiteRuns(e){return this.page("suite",e,Y)}};async function bt(l){let e=l.release;if(!e.hostExecution)throw new Error("Hosted evaluation requires explicit host execution attribution.");let t={hostConversationId:e.hostExecution.conversationId,hostTurnId:e.hostExecution.turnId},o={source:"openpond_git",profileId:e.profileId,repositoryId:e.repositoryId},a=r(async()=>({ref:o,sourceRevision:e.sourceRevision}),"selectedProfile"),c=r(()=>se(l.client,e),"selectedWorkflows"),u=new oe(l.client),s=r(async p=>{if(g(p)!==g(e.harnessRelease))throw new Error("Evaluation requires the admitted Profile release.");let H=await O(l.client,p);if(!H)throw new Error("Admitted evaluation Profile is unavailable.");return H},"loadRuntime"),d=r(async p=>{if(g(p.ref)!==g(o)||p.sourceRevision!==e.sourceRevision)throw new Error("Evaluation requires the admitted Profile source.");return ut({...p,runtime:await s(p.harnessRelease)})},"loadCatalog"),m=l.externalDataset?await it({value:l.externalDataset,release:(await s(e.harnessRelease)).release,sourceRevision:e.sourceRevision,client:l.client}):null,f=r(async(p,H,x)=>{if(H!==e.profileId)throw new Error("Evaluation Taskset Profile differs from its admitted source.");let E=await ct({definition:p,harnessRelease:x,runtime:await s(x)});if(!E)throw new Error("Evaluation Taskset is absent from the admitted Profile release.");return E},"loadTasksetPackage"),S=mt({resolveExternalDataset:m?.resolveExternalDataset,store:{runtimeEventsForTurn:r(p=>l.core.runtimeEventsForTurn(p),"runtimeEventsForTurn")},storeDir:l.storeDir,readManagedArtifact:l.readManagedArtifact,admitSession:l.admitSession,settleSession:l.settleSession,loadCatalog:d,loadTasksetPackage:f,selectedProfile:a,createSession:r(p=>{let H=ze.parse(p);return l.createSession({...H,metadata:{...H.metadata,...t}})},"createSession"),sendTurn:r((p,H)=>{let x=X.parse(H);return l.sendTurn(p,{...x,metadata:{...x.metadata,...t}})},"sendTurn"),interruptSessionTurn:l.interruptSessionTurn}),y=dt({resolveExternalDataset:m?.resolveExternalDataset,sourceCandidate:m?.sourceCandidate,privateGradingPreflight:r(p=>yt(p,!1),"privateGradingPreflight"),loadCatalog:d,selectedWorkflows:c,loadTasksetPackage:f,placement:"remote",boundedWorkComputeAvailable:!0,modelConfigurationHash:r(async(p,H)=>{if(p.providerId!=="openpond"||!H.hostModelConfigurationHash)throw new Error("Hosted evaluation requires a host-admitted model configuration receipt.");return H.hostModelConfigurationHash},"modelConfigurationHash")}),b=pt({resolveExternalDataset:m?.resolveExternalDataset,store:u,loadCatalog:d,loadTasksetPackage:f,selectedProfile:a,executeCase:S,privateGrading:r((p,H,x)=>Rt({manifest:p,packageValue:H,signal:x,executeSandboxVerifier:nt(l.client),authorize:r(async()=>{let E=p.profileEvaluation;if(!E||E.profileId!==e.profileId||E.sourceRevision!==e.sourceRevision)throw new Error("The hosted private grading source changed.");if(E.externalDatasetBinding){if(!m)throw new Error("The frozen Dataset owner is unavailable.");await m.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:p.contentHash})}let D=await d({ref:o,sourceRevision:e.sourceRevision,harnessRelease:E.harnessRelease});if(!E.externalDatasetBinding&&D.catalogHash!==E.catalogHash)throw new Error("The hosted private grading catalog changed.")},"authorize")}),"privateGrading")}),P={getProfileEvaluationRun:u.getProfileEvaluationRun.bind(u),getProfileEvaluationReceipt:u.getProfileEvaluationReceipt.bind(u),getProfileEvaluationGrade:u.getProfileEvaluationGrade.bind(u),getSession:l.core.getSession.bind(l.core),getTurn:l.core.getTurn.bind(l.core),runtimeEventsForTurn:l.core.runtimeEventsForTurn.bind(l.core),listModelUsageRecords:l.core.listModelUsageRecords.bind(l.core)};return{prepareProfileEvaluationRun:y,executeProfileEvaluationCase:S,executeProfileEvaluationRun:b,runPreparedProfileEvaluation:r(async p=>b(await y(p,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:ft({store:u,loadCatalog:d,selectedWorkflows:c,prepareRun:y,executeRun:b}),compareProfileEvaluationRuns:ht({store:u,selectedProfile:a}),buildProfileEvaluationReport:r(p=>gt({store:u,profileRef:o,request:p}),"buildProfileEvaluationReport"),listProfileEvaluations:r(async p=>{if(p&&typeof p=="object"&&"runId"in p)return vt({store:P,profileRef:o,...wt.parse(p)});let[H,x,E,D]=await Promise.all([d({ref:o,sourceRevision:e.sourceRevision,harnessRelease:e.harnessRelease}),u.listProfileEvaluationRuns(o),u.listProfileEvaluationComparisons(o),u.listProfileEvaluationSuiteRuns(o)]);return{...H,runs:x,comparisons:E,suiteRuns:D}},"listProfileEvaluations")}}r(bt,"createHostedProfileEvaluationRuntime");import{mkdir as lr}from"node:fs/promises";import{randomUUID as Mt}from"node:crypto";import V from"node:path";import{randomUUID as Tt}from"node:crypto";var Qt=n.object({revision:n.number().int().nonnegative(),payload:n.record(n.string(),n.unknown()).nullable()}).strict(),Jt=n.object({entries:n.array(n.unknown()).max(100),nextAfterId:n.string().min(1).nullable()}).strict(),ae=class{constructor(e){this.client=e}client;static{r(this,"HostedHarnessStateStorage")}async getPreference(e,t){return Qt.parse(await this.client.request({contractVersion:h,requestId:Tt(),operation:"harness/state/read",params:{workspaceId:e,kind:t,afterId:null,limit:1}}))}async listCandidates(e){return(await this.readAll(e,"candidates")).map(t=>ke.parse(t))}async listCrossRunRequests(e){return(await this.readAll(e,"cross_run_requests")).map(t=>Ae.parse(t))}async readAll(e,t){let o=[],a=null;do{let c=Jt.parse(await this.client.request({contractVersion:h,requestId:Tt(),operation:"harness/state/read",params:{workspaceId:e,kind:t,afterId:a,limit:Math.min(100,1001-o.length)}}));if(c.nextAfterId&&(c.entries.length===0||c.nextAfterId===a))throw new Error("Hosted Harness state cursor did not advance.");if(o.push(...c.entries),o.length>1e3)throw new Error("Hosted Harness state exceeds 1,000 entries.");a=c.nextAfterId}while(a);return o}};import{randomUUID as Zt}from"node:crypto";import{cp as Yt,mkdir as Xt,rm as er}from"node:fs/promises";import tr from"node:path";var we=n.object({schemaVersion:n.literal("openpond.harnessMemoryEntry.v1"),id:n.string(),workspaceId:n.string(),key:n.string(),content:n.string(),tags:n.array(n.string()),revision:n.number().int().positive(),status:n.enum(["active","deleted"]),sourceRunId:n.string().nullable(),sourceProposal:n.object({id:n.string(),contentHash:n.string()}).nullable(),createdAt:n.string().datetime(),updatedAt:n.string().datetime(),contentHash:n.string().regex(/^[a-f0-9]{64}$/)}).strict(),rr=n.object({createdAt:n.string().datetime(),id:n.string()}).strict(),xt=n.object({entries:n.array(n.unknown()).max(100),nextBefore:rr.nullable()}).strict(),ve=n.object({workspace:ce,receipt:Te}).strict(),ne=class{constructor(e,t){this.client=e;this.storeDir=t;this.usage=new St(e),this.overlay=new re({request:r(async o=>o.operation==="harness/overlay/get"?this.request({action:"overlay_get",...o.params}):o.operation==="harness/overlay/freezeProposal"?this.request({action:"overlay_freeze",...o.params},o.requestId):e.request(o),"request")})}client;storeDir;static{r(this,"HostedHarnessReviewStorage")}harnessStoragePlacement="hosted";reviewSessionId=null;overlay;usage;request(e,t=Zt()){return this.client.request({contractVersion:h,requestId:t,operation:"harness/review/execute",params:e},e.action==="release_put"?6e4:15e3)}sessionId(){if(!this.reviewSessionId)throw new Error("Hosted review memory requires an admitted review session.");return this.reviewSessionId}async prepareReview(e){let t=await this.getSession(e.runRef);if(!t)throw new Error("Hosted review session is unavailable.");this.reviewSessionId=t.id;let o=await this.getHarnessRunOverlay(t.id);if(!o)throw new Error("Hosted review overlay is unavailable.");let a=await this.getHarnessWorkspace(o.workspace.workspaceId);if(!a?.currentChannel.release)throw new Error("Hosted review workspace release is unavailable.");let c=await this.getHarnessReleaseRecord(a.currentChannel.release.contentHash);if(!c||c.sourceRevision!==a.sourceRevision)throw new Error("Hosted review source binding changed.");let u=Ve(this.storeDir,a.id);await Xt(u.root,{recursive:!0,mode:448}),await er(u.source,{recursive:!0,force:!0}),await Yt(tr.join(c.bundlePath,"source"),u.source,{recursive:!0,force:!1,errorOnExist:!0});let s=await Le({workspaceId:a.id,sourceDir:u.source});if(s.sourceRevision!==a.sourceRevision||s.harnessRelease.contentHash!==c.harnessRelease.contentHash)throw new Error("Hosted review source cache differs from its immutable release.")}getHarnessWorkspace=r(async e=>ce.nullable().parse(await this.request({action:"workspace_get",workspaceId:e})),"getHarnessWorkspace");getHarnessReleaseRecord=r(async e=>he.nullable().parse(await this.request({action:"release_get",contentHash:e})),"getHarnessReleaseRecord");saveHarnessReleaseRecord=r(async e=>he.parse(await this.request({action:"release_put",record:e},`review-release:${e.harnessRelease.contentHash}`)),"saveHarnessReleaseRecord");getHarnessRunOverlay=r(e=>this.overlay.getHarnessRunOverlay(e),"getHarnessRunOverlay");createHarnessRunOverlay=r(e=>this.overlay.createHarnessRunOverlay(e),"createHarnessRunOverlay");freezeHarnessRunOverlayWithProposalAtomically=r(e=>this.overlay.freezeHarnessRunOverlayWithProposalAtomically(e),"freezeHarnessRunOverlayWithProposalAtomically");getHarnessBackgroundReviewSettings=r(async e=>n.object({enabled:n.boolean(),updatedAt:n.string().datetime().nullable()}).strict().parse(await this.request({action:"background_get",workspaceId:e})),"getHarnessBackgroundReviewSettings");getHarnessMemory=r(async(e,t)=>we.nullable().parse(await this.request({action:"memory_get",workspaceId:e,sessionId:this.sessionId(),key:t})),"getHarnessMemory");listHarnessMemories=r(async(e,t={})=>{let o=n.object({entries:n.array(we).max(20),nextBefore:n.object({updatedAt:n.string().datetime(),key:n.string()}).nullable()}),a=[],c=null;do{let u=o.parse(await this.request({action:"memory_page",workspaceId:e,sessionId:this.sessionId(),before:c,limit:20,includeDeleted:t.includeDeleted??!1}));if(a.push(...u.entries),u.nextBefore&&(!u.entries.length||g(u.nextBefore)===g(c)))throw new Error("Hosted memory cursor did not advance.");c=u.nextBefore}while(c&&a.length<1e3);if(c)throw new Error("Hosted review memory exceeds its bounded window.");return a},"listHarnessMemories");writeHarnessMemory=r(async e=>we.parse(await this.request({action:"memory_write",sessionId:this.sessionId(),input:e},`review-memory:${g(e)}`)),"writeHarnessMemory");saveHarnessImprovementArtifact=r(async(e,t,o)=>{let a={action:"artifact_put",workspaceId:e,kind:t,artifact:o},c=(await import("./dist-O7HXZUBW.js")).HarnessReviewStorageParamsSchema.parse(a);return ge[t].parse(await this.request(c,`review-artifact:${t}:${o.contentHash}`))},"saveHarnessImprovementArtifact");listHarnessImprovementArtifacts=r(async(e,t,o=100)=>{let a=[],c=null,u=Math.min(Math.max(1,Math.trunc(o)),1e3);do{let s=(await import("./dist-O7HXZUBW.js")).HarnessReviewStorageParamsSchema.parse({action:"artifact_page",workspaceId:e,kind:t,before:c,limit:Math.min(100,u-a.length)}),d=xt.parse(await this.request(s));if(a.push(...d.entries),d.nextBefore&&(!d.entries.length||g(d.nextBefore)===g(c)))throw new Error("Hosted artifact cursor did not advance.");c=d.nextBefore}while(c&&a.length<u);return a.map(s=>ge[t].parse(s))},"listHarnessImprovementArtifacts");listPendingHarnessRefinerTriggers=r(async()=>{let e=await import("./hosted-harness-runtime-C7I4KSDK.js").then(a=>a.loadHostedHarnessRuntime(this.client));if(!e)return[];let t=[],o=null;do{let a=xt.parse(await this.request({action:"pending_page",workspaceId:e.workspace.id,before:o,limit:100}));if(t.push(...a.entries.map(c=>({workspaceId:e.workspace.id,trigger:xe.parse(c)}))),a.nextBefore&&(!a.entries.length||g(a.nextBefore)===g(o)))throw new Error("Hosted pending-review cursor did not advance.");o=a.nextBefore}while(o&&t.length<1e3);if(o)throw new Error("Hosted pending reviews exceed the bounded recovery window.");return t},"listPendingHarnessRefinerTriggers");advanceHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"advance",...e}})),"advanceHarnessWorkspaceAtomically");advanceReviewedHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"reviewedAdvance",...e}})),"advanceReviewedHarnessWorkspaceAtomically");rollbackHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"rollback",...e}})),"rollbackHarnessWorkspaceAtomically");getSession=r(async e=>Be.nullable().parse(await this.request({action:"session_get",sessionId:e})),"getSession");getTurn=r(async e=>U.nullable().parse(await this.request({action:"turn_get",turnId:e})),"getTurn");updateTurn=r(async(e,t)=>{let o=await this.getTurn(e);if(!o)return null;let a=U.parse(t(o)),{harnessSnapshot:c,...u}=o,{harnessSnapshot:s,...d}=a;if(!s||g(u)!==g(d))throw new Error("Hosted review may only restore a missing Harness snapshot.");return U.parse(await this.request({action:"snapshot_restore",turnId:e,expectedHash:g(o),snapshot:s}))},"updateTurn");turnsForSession=r(async(e,t=1e3)=>{let o=n.object({entries:n.array(U).max(100),nextBefore:n.number().int().positive().nullable()}),a=[],c=null,u=Math.min(Math.max(1,Math.trunc(t)),1e3);do{let s=o.parse(await this.request({action:"turn_page",sessionId:e,before:c,limit:Math.min(100,u-a.length)}));if(a.push(...s.entries),s.nextBefore&&(!s.entries.length||c!==null&&s.nextBefore>=c))throw new Error("Hosted review turn cursor did not advance.");c=s.nextBefore}while(c&&a.length<u);return a.reverse()},"turnsForSession");runtimeEventsForTurn=r(async(e,t={})=>{let o=n.object({entries:n.array(fe).max(100),nextAfterSequence:n.number().int().positive().nullable()}),a=[],c=0,u=Math.min(t.limit??1e4,1e4);do{let s=o.parse(await this.request({action:"event_page",turnId:e,afterSequence:c,names:[...t.names??[]],limit:Math.min(100,u-a.length)}));if(a.push(...s.entries),!s.nextAfterSequence)return a;if(!s.entries.length||s.nextAfterSequence<=c)throw new Error("Hosted review event cursor did not advance.");c=s.nextAfterSequence}while(a.length<u);return a},"runtimeEventsForTurn");listModelUsageRecords=r(e=>this.usage.listModelUsageRecords(e),"listModelUsageRecords");async appendRuntimeEvent(e){return fe.parse(await this.request({action:"event_append",event:e},`review-event:${e.id}`))}async upsertModelUsageRecord(e){await this.request({action:"usage_put",record:e},`review-usage:${g(e)}`)}};import{randomUUID as sr}from"node:crypto";async function It(l,e){let t=Ie.parse(await l.request({contractVersion:h,requestId:sr(),operation:"refiner/execute",params:{action:{action:"active_release",workspaceId:e}}}));return M(t,"Hosted Refiner active release"),t}r(It,"loadHostedRefinerRelease");import{randomUUID as or}from"node:crypto";var ar=n.object({personalizationSoul:n.string().max(8e3).optional(),userInstructions:n.string().max(64e3).optional(),preferences:me.optional()}).strict(),nr=n.object({revision:n.number().int().positive(),settings:ar}).strict();async function ye(l){let e=await l.request({contractVersion:h,requestId:or(),operation:"settings/get",params:{}}),t=e===null?null:nr.parse(e);return{revision:t?.revision??null,personalizationSoul:t?.settings.personalizationSoul??Ce[0].content,userInstructions:t?.settings.userInstructions??"",preferences:t?.settings.preferences??me.parse({})}}r(ye,"loadHostedRuntimeSettings");import{randomUUID as kt}from"node:crypto";function At(l){async function e(t){let o=await W(l,t);if(!o)throw new Error("No hosted Harness is selected for this run.");return o.workspace.id}return r(e,"workspaceId"),[{name:"memory_search",description:"Search bounded active memory for this selected Harness or Profile. Returns keys, revisions and short excerpts.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1,maxLength:500},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},execute:r(async t=>{let o=t.args.query;if(typeof o!="string"||!o.trim()||o.length>500)throw new Error("Memory query is invalid.");let a=t.args.limit===void 0?8:t.args.limit;if(typeof a!="number"||!Number.isInteger(a)||a<1||a>20)throw new Error("Memory search limit is invalid.");let c=await l.request({contractVersion:h,requestId:kt(),operation:"harness/memory/search",params:{workspaceId:await e(t.session),query:o,limit:a}});return{toolCallId:t.callId,name:"memory_search",ok:!0,contentText:JSON.stringify(c),data:c}},"execute")},{name:"memory_inspect",description:"Read one exact active memory entry returned by memory_search.",parameters:{type:"object",additionalProperties:!1,properties:{key:{type:"string",minLength:1,maxLength:120}},required:["key"]},execute:r(async t=>{let o=t.args.key;if(typeof o!="string"||!/^[a-z0-9][a-z0-9-]{0,119}$/.test(o))throw new Error("Memory key is invalid.");let a=await l.request({contractVersion:h,requestId:kt(),operation:"harness/memory/get",params:{workspaceId:await e(t.session),key:o}});if(!a||typeof a!="object"||Array.isArray(a)||a.status!=="active")throw new Error(`Harness memory does not exist: ${o}.`);return{toolCallId:t.callId,name:"memory_inspect",ok:!0,contentText:JSON.stringify(a),data:a}},"execute")}]}r(At,"createHostedHarnessMemoryTools");import{randomUUID as Ct}from"node:crypto";function Ot(l){return[{name:"work_list_outputs",description:"List this conversation's published outputs from completed turns without starting sandbox compute. Use this before reading a previously saved file; returns exact file IDs and revisions. New workspace files are published after the current turn ends. Inspect those with workspace tools and finish the turn instead of polling this list.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:r(async e=>{let t=await l.request({contractVersion:h,requestId:Ct(),operation:"output/list",params:{}});return{toolCallId:e.callId,name:"work_list_outputs",ok:!0,contentText:JSON.stringify(t),data:t}},"execute")},{name:"work_read_output",description:"Read the actual saved text/Markdown or PDF text of a file returned by work_list_outputs, without starting sandbox compute. Prefer this for questions about saved outputs. Use workspace tools for edits, execution and unsaved files. PDF text extraction does not inspect images or page appearance.",parameters:{type:"object",additionalProperties:!1,properties:{fileId:{type:"string",minLength:1,maxLength:191},revision:{type:"integer",minimum:1},offset:{type:"integer",minimum:0,maximum:1e7},maxChars:{type:"integer",minimum:1,maximum:1e5},firstPage:{type:"integer",minimum:1,maximum:1e3},pageCount:{type:"integer",minimum:1,maximum:10}},required:["fileId","revision"]},execute:r(async e=>{let t=await l.request(z.parse({contractVersion:h,requestId:Ct(),operation:"output/read",params:e.args}),6e4);return{toolCallId:e.callId,name:"work_read_output",ok:!0,contentText:JSON.stringify(t),data:t}},"execute")}]}r(Ot,"createHostedWorkOutputTools");import{randomUUID as _t}from"node:crypto";function qt(l,e){return{allowedTools:e,authorizeTool:r(async t=>{let o=await l.request({contractVersion:h,requestId:_t(),operation:"embedding/authorize",params:{sessionId:t.session.id,turnId:t.turnId,name:t.name}});if(!o||typeof o!="object"||Array.isArray(o)||o.allowed!==!0)throw new Error("Hosted tool authorization denied.")},"authorizeTool")}}r(qt,"createHostedEmbeddingAdapter");function Bt(l){return async e=>{let t=rt.parse(e);return l.request({contractVersion:h,requestId:_t(),operation:"sandbox/request",params:{action:t}},e.type==="create"?3e5:e.type==="exec"?18e4:6e4)}}r(Bt,"createHostedSandboxRequest");var ir=["sandbox/request","embedding/authorize","output/begin","output/chunk","output/complete","output/saveSandboxFile","output/list","output/read","settings/get","harness/get","harness/overlay/get","harness/overlay/put","harness/memory/get","harness/memory/list","harness/memory/search","harness/memory/write","harness/state/read","task-inbox/execute","create-improve/execute","approval/get","approval/upsert","usage/getByRequestId","usage/upsert","usage/page","session/count","session/get","session/page","session/put","turn/count","turn/wakeCount","turn/get","turn/put","turn/latest","turn/page","thread/turnPage","event/append","events/page","events/latestAssistantText"];function Dt(l){if(ir.some(e=>!l.operations.includes(e)))throw new Error("Hosted Postgres runtime capabilities are incomplete.");if(l.maxRequestBytes<256e3||l.maxInFlight<32||l.maxPageSize<200)throw new Error("Hosted Postgres runtime transport limits are incompatible.")}r(Dt,"assertHostedWorkCapabilities");var v=r(async()=>{throw new Error("This hosted control is not available until its Postgres repository is activated.")},"unavailable"),ur=De(),cr=Me();async function _o(l){let e=l.runtimeStorage,t=l.hostStorageClient;if(e.kind!=="hosted_postgres"||!t||e.client!==t)throw new Error("Hosted storage selection mismatch.");if(l.embedding||l.sandboxRequest)throw new Error("Hosted Postgres tool and sandbox authority must come from the host transport.");if(!l.streamOpenPondHostedChatTurn)throw new Error("Hosted Postgres runtime requires a host-admitted model stream.");if(l.profileSource||l.harness)throw new Error("Hosted Postgres runtime accepts only host-admitted immutable sources.");if(l.services&&Object.values(l.services).some(i=>i!==!1&&i!==void 0))throw new Error("Hosted service adapters must be admitted by the Postgres composition.");let o=st.parse(await t.request({contractVersion:h,requestId:Mt(),operation:"capabilities",params:{}}));Dt(o);let a=qt(t,o.allowedTools),c=Bt(t),u=V.resolve(l.storeDir??process.cwd()),s=V.resolve(l.workspaceDir??process.cwd());await lr(s,{recursive:!0});let d=We({channel:"app-server",logDir:V.join(u,"logs"),metadata:{version:l.version??_e,runtimeVersion:Ne(),placement:"hosted_work"}}),m=e.core,f=new ne(t,u),S=e.admittedProfileRelease?await lt(t,e.admittedProfileRelease):{profile:cr,profileLibrary:ur},{appendRuntimeEvent:y,closeEventSubscribers:b,subscribeRuntimeEvents:P}=Ze({logger:d,assistantDeltaFlushMs:250,store:{appendRuntimeEvent:r(i=>["harness.refiner.queued","harness.refiner.started","harness.refiner.completed","harness.refiner.failed"].includes(i.name)?f.appendRuntimeEvent(i):m.appendRuntimeEvent(i),"appendRuntimeEvent"),runtimeEventPageRows:r(i=>m.runtimeEventPageRows(i),"runtimeEventPageRows")}}),p=ee({queueId:"turn-follow-up",logger:d}),H=ee({queueId:"subagent",logger:d}),x=Ke(l.streamOpenPondHostedChatTurn,{enabled:$e()}),E=ee({queueId:"harness-refiner",logger:d,concurrency:1}),D=Pt({store:f,storeDir:u,queue:E,streamOpenPondHostedChatTurn:x,appendRuntimeEvent:y,upsertModelUsageRecord:r(i=>f.upsertModelUsageRecord(i),"upsertModelUsageRecord"),prepareReview:r(i=>f.prepareReview(i),"prepareReview"),loadActiveRefinerRelease:r(async()=>{let i=await O(t);if(!i)throw new Error("Hosted review has no admitted Harness workspace.");return It(t,i.workspace.id)},"loadActiveRefinerRelease")}),Re=r(async()=>(await ye(t)).preferences,"preferences"),{createSession:ie,getSession:q,updateSession:L,completeTurn:zt,failTurn:jt,interruptTurn:Nt}=et({store:m,defaultSessionCwd:r(()=>s,"defaultSessionCwd"),appendRuntimeEvent:y,loadAppPreferences:Re,loadLastUsedProfile:r(async()=>S.profileLibrary.lastUsed,"loadLastUsedProfile")}),le=Je({workspaceDir:s,logger:d,getSession:q,updateSession:L,appendRuntimeEvent:y,sandboxRequest:c,sandboxCreationMode:"hosted_worker"}),G=Ge({appendRuntimeEvent:y,findLocalProject:r(async()=>null,"findLocalProject"),onRepositoryInstructionDiagnostic:r((i,w)=>d.warn("repository instruction file skipped",{diagnostic:i,sessionId:w.id}),"onRepositoryInstructionDiagnostic")}),Se=new re(t),$=new ae(t),Pe=Et(t),ue=Ht(t),K=e.admittedProfileRelease?.hostExecution?await O(t,e.admittedProfileRelease.harnessRelease):null;if(e.admittedProfileRelease?.hostExecution&&(!K||!o.operations.includes("output/readBytes")||!o.operations.includes("profile-evaluations/sandbox")||!o.operations.includes("profile-evaluations/grade")))throw new Error("Hosted evaluation requires its admitted release, managed artifact owner and private sandbox grader.");let Ft=Fe({deviceId:"hosted-evaluation",storeDir:u,runtimeEventsForSession:r(i=>m.runtimeEventsForSession(i),"runtimeEventsForSession"),managedPersistence:{...Pe.persistence,sourceTurnStartedAt:r(async(i,w)=>{let R=await m.getTurn(w);if(!R||R.sessionId!==i||!R.startedAt)throw new Error("The managed output has no actual started case turn.");return R.startedAt},"sourceTurnStartedAt")}}),k=K?at({readOutput:ue.readOutput,executeCommand:ue.execute,settleRemote:ue.settle,runtimeNode:"node",runtimeAgentRoot:"/workspace/runtime",storeDir:u,release:K.release,getSession:q,getTurn:r(i=>m.getTurn(i),"getTurn"),saveOutput:Ft.saveOwnedOutputBytes,recordOutput:r(async(i,w,R)=>{await y({id:Mt(),timestamp:new Date().toISOString(),name:"workspace_action_result",source:"server",sessionId:i,turnId:w,action:"work_output_save",status:"completed",data:R})},"recordOutput"),authorize:r(async()=>{let i=await O(t,e.admittedProfileRelease.harnessRelease);if(!i||i.release.harnessRelease.contentHash!==K.release.harnessRelease.contentHash)throw new Error("The hosted isolated evaluation source authority changed.")},"authorize")}):null,Ut=tt(a,async(i,w)=>{let R=await m.getTurn(i);if(!R)throw new Error("Embedded turn is unavailable.");let C=await q(R.sessionId),Q=C.metadata?.embeddingToolBindings,N=[...w].sort((J,Wt)=>J.name.localeCompare(Wt.name));if(Q!==void 0&&g(Q)!==g(N))throw new Error("Embedded tool bindings changed; start a new thread.");await L(C.id,{metadata:{...C.metadata,embeddingToolBindings:N}}),await m.updateTurn(i,J=>({...J,metadata:{...J.metadata,toolBindings:N}}))}),T=Ye({executionHost:"embedded",workInputsForSession:l.workInputsForSession,attachmentRootDir:V.join(u,"attachments"),isolatedProfileEvaluationForTurn:k?async i=>{if(i.metadata?.profileEvaluationRun===void 0)return!1;if(!k.ownsSession(i.id))throw new Error("The hosted evaluation has no actual isolated case owner.");return!0}:void 0,executeProfileEvaluationAction:k?.executeAction,resolveModelTools:r(async i=>{let w=k?.ownsSession(i.session.id)?await k.resolveTools(i):await Ut(i);return l.resolveModelTools?l.resolveModelTools({...i,tools:w}):w},"resolveModelTools"),hostedToolFlags:{toolMode:"native",nativeToolTransport:!0,nativeToolProviderDenylist:[],textToolFallback:!1},store:m,inboxStore:e.inbox,createSession:ie,getSession:q,updateSession:L,completeTurn:zt,failTurn:jt,interruptTurn:Nt,upsertApproval:r(i=>m.upsertApproval(i),"upsertApproval"),defaultSessionCwd:r(()=>s,"defaultSessionCwd"),findOpenPondApp:r(async i=>({id:i||qe(s),name:V.basename(s)||"Workspace",description:null,visibility:"private",sandbox:!0}),"findOpenPondApp"),resolveSessionWorkspaceCwd:r(async i=>i.cwd?.trim()||s,"resolveSessionWorkspaceCwd"),ensureCodexRuntime:r(async()=>{throw new Error("Codex process hosting is unavailable.")},"ensureCodexRuntime"),appendWorkspaceDiffEvent:le.appendWorkspaceDiffEvent,workspaceDiffBaseline:le.workspaceDiffBaseline,appendRuntimeEvent:y,executeWorkspaceTool:le.executeWorkspaceTool,executeOpenPondCommand:r(async()=>{throw new Error("Hosted commands require durable authorization.")},"executeOpenPondCommand"),loadOpenPondProfileState:r(async()=>S.profile,"loadOpenPondProfileState"),loadOpenPondProfileLibrary:r(async()=>S.profileLibrary,"loadOpenPondProfileLibrary"),readOpenPondProfileSkill:v,loadSelectedHarnessRuntime:r(i=>{if(i.currentProfile&&(!e.admittedProfileRelease||i.currentProfile.repositoryId!==e.admittedProfileRelease.repositoryId||i.currentProfile.profileId!==e.admittedProfileRelease.profileId))throw new Error("Hosted Profile session lacks admitted immutable source.");return W(t,i)},"loadSelectedHarnessRuntime"),ensureHarnessRunOverlay:r(i=>Se.ensureHarnessRunOverlay(i),"ensureHarnessRunOverlay"),processHarnessImprovementBoundary:D,harnessModelTools:[...At(t),...Ot(t)],loadBuiltInOpenPondSkills:r(async()=>[],"loadBuiltInOpenPondSkills"),readBuiltInOpenPondSkill:v,loadPersonalizationSoul:r(async()=>(await ye(t)).personalizationSoul,"loadPersonalizationSoul"),loadAppPreferences:Re,maybeCreateScaffoldForTurn:G.maybeCreateScaffoldForTurn,hostedSystemPrompt:G.hostedSystemPrompt,appendAssistantText:G.appendAssistantText,appendHostedContextUsage:G.appendHostedContextUsage,streamOpenPondHostedChatTurn:x,turnFollowUpQueue:p,subagentQueue:H,maxHostedWorkspaceToolRounds:Xe(l.maxHostedWorkspaceToolRounds),maxRepeatedInvalidToolRequests:3});await T.recoverPendingSubagentCompletions(),await T.recoverTaskInbox();let He=!1,Ee=r(async(i,w)=>{if(X.parse(w).attachments?.length&&!k?.ownsSession(i))throw new Error("Hosted attachments require managed-file admission.");let R=await q(i);if(R.currentProfile&&(!e.admittedProfileRelease||R.currentProfile.repositoryId!==e.admittedProfileRelease.repositoryId||R.currentProfile.profileId!==e.admittedProfileRelease.profileId))throw new Error("Hosted Profile session lacks admitted immutable source.");return He||(await D.reconcilePending(),await E.drain(),He=!0),T.sendTurn(i,w)},"sendTurn");if(l.profileExternalDataset&&!e.admittedProfileRelease?.hostExecution)throw new Error("External Dataset requires its admitted hosted evaluation.");let A=e.admittedProfileRelease?.hostExecution?await bt({client:t,core:m,release:e.admittedProfileRelease,storeDir:u,...l.profileExternalDataset?{externalDataset:l.profileExternalDataset}:{},readManagedArtifact:Pe.read,admitSession:k.admitSession,settleSession:k.settleSession,createSession:ie,sendTurn:Ee,interruptSessionTurn:T.interruptSessionTurn}):null,be=!1;return{...Ue({ports:Qe({bindHome:!1,placement:"hosted_work",connectedAppProviders:[],featureOverrides:{profileWorkflows:!!e.admittedProfileRelease,profileEvaluations:!!A,harnessProposalReview:!1,harnessEvaluationReview:!1,harnessEvaluationReviewAcceptance:!1,harnessEvaluationTasksetMaterialization:!1,harnessEvaluationBaseline:!1,harnessBackgroundReview:!1,harnessDiff:!1,harnessRollback:!1,harnessReview:!1,refinerProfiles:!1,immutableRefinerAdmission:!1},createSession:ie,getSession:q,turnsForSession:r(i=>m.turnsForSession(i,1e3),"turnsForSession"),runtimeEventsForSession:r(i=>m.runtimeEventsForSession(i,{excludeReasoningDeltas:!0}),"runtimeEventsForSession"),sendTurn:Ee,steerSessionTurn:T.steerSessionTurn,readTaskInbox:T.readTaskInbox,queueTaskInput:T.queueTaskInput,updateTaskInput:T.updateTaskInput,isSessionTurnActive:T.isSessionTurnActive,waitForSessionTurnSettlement:T.waitForSessionTurnSettlement,interruptSessionTurn:T.interruptSessionTurn,resolveApproval:r(async(i,w)=>{let R=await T.resolveCreateImproveApproval(i,w);if(R)return R;let C=await T.resolveSubagentPatchApplyApproval(i,w);if(C)return C;throw new Error(`Approval not found: ${i}`)},"resolveApproval"),listProfileWorkflows:e.admittedProfileRelease?()=>se(t,e.admittedProfileRelease):v,listProfileEvaluations:A?.listProfileEvaluations??v,loadProfileTrainingSource:v,prepareProfileEvaluationRun:A?.prepareProfileEvaluationRun??v,runPreparedProfileEvaluation:A?.runPreparedProfileEvaluation??v,runProfileEvaluationSuite:A?.runProfileEvaluationSuite??v,executeProfileEvaluationCase:A?.executeProfileEvaluationCase??v,executeProfileEvaluationRun:A?.executeProfileEvaluationRun??v,compareProfileEvaluationRuns:A?.compareProfileEvaluationRuns??v,buildProfileEvaluationReport:A?.buildProfileEvaluationReport??v,inspectHarness:r(async()=>{let i=await O(t);if(!i)return null;let w=i.workspace.id,[R,C,Q,N]=await Promise.all([$.getPreference(w,"workspace_settings"),$.getPreference(w,"evaluation_review_settings"),$.listCandidates(w),$.listCrossRunRequests(w)]);return{workspace:i.workspace,release:i.release,backgroundReview:R,evaluationReview:C,refinementCandidates:Q,crossRunRequests:N}},"inspectHarness"),reviewHarnessProposal:v,reviewHarness:v,acceptHarnessEvaluationReview:v,materializeHarnessEvaluationTaskset:v,runHarnessEvaluationBaseline:v,validateHarness:r(async()=>{let i=await O(t);return i?{valid:!0,workspaceId:i.workspace.id,harnessRelease:i.release.harnessRelease,agentSnapshot:i.release.agentSnapshot}:{valid:!1,reason:"No admitted hosted Harness release."}},"validateHarness"),updateHarnessBackgroundReview:v,diffHarness:v,rollbackHarness:v,inspectRefiner:v,updateRefiner:v,activateRefiner:v,rollbackRefiner:v,subscribeRuntimeEvents:P,observeRuntimeOperation:r(i=>d.info("agent runtime operation",i),"observeRuntimeOperation")}),close:r(async()=>{be||(be=!0,k?.close(),await T.close(),await Promise.all([p.drain(),H.drain(),E.drain()]),await b(),await d.flush())},"close")}),updateSession:L,storePath:"hosted-postgres",workspaceDir:s,pinSessionHarness:r(async i=>{let w=await W(t,await q(i));if(!w)return null;let R={id:w.release.harnessRelease.id,contentHash:w.release.harnessRelease.contentHash};return await Se.ensureHarnessRunOverlay({runId:i,workspace:w.workspace,harnessRelease:R,admittedAt:new Date().toISOString()}),R},"pinSessionHarness"),composition:["runtime_event_bus","session_store","hosted_provider","workspace_tools","command_approvals","harness","agent_runtime","jsonl_transport"]}}r(_o,"createHostedOwnedAppServer");export{_o as createHostedOwnedAppServer};
|