openpond 0.2.58 → 0.2.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/app-server.d.ts +8 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/acp-ARBNMIPT.js +2 -0
- package/dist/chunks/acp-agent-53COYDHB.js +21 -0
- package/dist/chunks/{actions-command-QU4H53OG.js → actions-command-6YSZ7EJS.js} +1 -1
- package/dist/chunks/{app-layer-NSTE5HIT.js → app-layer-TVG7KTW6.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-JHGWLBXT.js → app-server-connected-apps-K62M6LCT.js} +1 -1
- package/dist/chunks/{app-server-evaluations-K52NAQLP.js → app-server-evaluations-RM6WXX3H.js} +1 -1
- package/dist/chunks/app-server-harness-services-RLKMWOQ4.js +2 -0
- package/dist/chunks/app-server-runtime-OKMEHNEU.js +2 -0
- package/dist/chunks/apps-YWZL2H34.js +2 -0
- package/dist/chunks/{chunk-DARVPBZ4.js → chunk-23P2O7PH.js} +1 -1
- package/dist/chunks/{chunk-PF5R6CMP.js → chunk-2GICDASL.js} +1 -1
- package/dist/chunks/{chunk-6MI4KKWF.js → chunk-2ITZW2CN.js} +1 -1
- package/dist/chunks/chunk-2MMCZHKL.js +2 -0
- package/dist/chunks/{chunk-ABD5M2D2.js → chunk-2PAJCXFC.js} +1 -1
- package/dist/chunks/chunk-2RNCXDJC.js +5 -0
- package/dist/chunks/{chunk-APB2STJK.js → chunk-2SUMZ73C.js} +1 -1
- package/dist/chunks/{chunk-YOQRYNLP.js → chunk-3CWRTKHY.js} +1 -1
- package/dist/chunks/{chunk-TRQQNFMO.js → chunk-44LWH5U6.js} +1 -1
- package/dist/chunks/{chunk-HPBQ4VTW.js → chunk-52KIORRX.js} +1 -1
- package/dist/chunks/{chunk-NHQ36THU.js → chunk-5RHYSQZ5.js} +1 -1
- package/dist/chunks/{chunk-3QIB5FXI.js → chunk-5ZBLCWEJ.js} +1 -1
- package/dist/chunks/{chunk-FTEOCCPB.js → chunk-637UACKH.js} +1 -1
- package/dist/chunks/chunk-655DQ6AX.js +145 -0
- package/dist/chunks/{chunk-N4FFQPLR.js → chunk-6GWOVHIG.js} +1 -1
- package/dist/chunks/chunk-6HQB3MQO.js +2 -0
- package/dist/chunks/{chunk-UKMA4R6X.js → chunk-7LZISGTA.js} +2 -2
- package/dist/chunks/{chunk-A6USMRWK.js → chunk-7RC5WPVT.js} +1 -1
- package/dist/chunks/{chunk-H6IW2R22.js → chunk-7YTHEMWI.js} +1 -1
- package/dist/chunks/{chunk-PCSIOUHF.js → chunk-A3L74U3W.js} +1 -1
- package/dist/chunks/{chunk-25MBPJVY.js → chunk-A66CSUBJ.js} +1 -1
- package/dist/chunks/{chunk-OUVIWDL2.js → chunk-AGVOGPAZ.js} +1 -1
- package/dist/chunks/{chunk-M4JWQSV7.js → chunk-AW5Q6NXT.js} +1 -1
- package/dist/chunks/{chunk-RWWE5OXU.js → chunk-B46HZ3MX.js} +1 -1
- package/dist/chunks/{chunk-KGNCKIFP.js → chunk-BIPQCJ5V.js} +1 -1
- package/dist/chunks/{chunk-HCYX6RHP.js → chunk-BIQ33JV5.js} +1 -1
- package/dist/chunks/{chunk-JFXWI3EN.js → chunk-BK63OQRW.js} +1 -1
- package/dist/chunks/{chunk-2D4Y3HNW.js → chunk-CFSIU6CW.js} +1 -1
- package/dist/chunks/{chunk-EIEZHFIW.js → chunk-D3RRUWNN.js} +1 -1
- package/dist/chunks/{chunk-X4OSOOSU.js → chunk-D4UX2O45.js} +1 -1
- package/dist/chunks/{chunk-GJ2ZJFDD.js → chunk-DG4TYVPF.js} +1 -1
- package/dist/chunks/{chunk-QIKWJ2AA.js → chunk-DGIEXZJV.js} +1 -1
- package/dist/chunks/{chunk-PRGBLQVH.js → chunk-DIGX56JY.js} +1 -1
- package/dist/chunks/{chunk-JYKRR7E5.js → chunk-DISNCX6R.js} +1 -1
- package/dist/chunks/{chunk-773TH7FN.js → chunk-DK7IKI7O.js} +1 -1
- package/dist/chunks/{chunk-74IIXVAE.js → chunk-DX7YEUNQ.js} +1 -1
- package/dist/chunks/{chunk-523TE4BI.js → chunk-E63VWAQA.js} +1 -1
- package/dist/chunks/{chunk-5MCNZCVQ.js → chunk-EL454L26.js} +1 -1
- package/dist/chunks/{chunk-OS3LO5J3.js → chunk-ENSB6ZTM.js} +1 -1
- package/dist/chunks/{chunk-EAPFMACH.js → chunk-ERJV5BMC.js} +1 -1
- package/dist/chunks/{chunk-RNIAFXMB.js → chunk-EXJGCNRS.js} +1 -1
- package/dist/chunks/chunk-F5KCCDQM.js +2 -0
- package/dist/chunks/chunk-FSQWAANK.js +3 -0
- package/dist/chunks/{chunk-Z54O534A.js → chunk-G5B3PB5X.js} +1 -1
- package/dist/chunks/{chunk-4D7HWVWD.js → chunk-GAWGIJQG.js} +1 -1
- package/dist/chunks/{chunk-IIZ4CWBX.js → chunk-GGGF5NHJ.js} +1 -1
- package/dist/chunks/{chunk-APB4O67E.js → chunk-GOYBYYPQ.js} +1 -1
- package/dist/chunks/{chunk-XDQMGUWL.js → chunk-H3BSIAQO.js} +1 -1
- package/dist/chunks/{chunk-EYPCBBMS.js → chunk-HCEJAOIF.js} +1 -1
- package/dist/chunks/{chunk-OPNRWESL.js → chunk-IFQCOSU6.js} +1 -1
- package/dist/chunks/chunk-IJHZBHEK.js +9 -0
- package/dist/chunks/{chunk-RAXOSUSW.js → chunk-ISFIDCIH.js} +1 -1
- package/dist/chunks/{chunk-OLLLZVHF.js → chunk-ITKTILKI.js} +1 -1
- package/dist/chunks/{chunk-D74JEERO.js → chunk-IUBARBGI.js} +1 -1
- package/dist/chunks/{chunk-O72BSKSO.js → chunk-J24I74EM.js} +1 -1
- package/dist/chunks/{chunk-H4QHIHMK.js → chunk-J7QGHA7G.js} +3 -3
- package/dist/chunks/chunk-JFXINDOQ.js +3 -0
- package/dist/chunks/{chunk-HIOKCIL7.js → chunk-JGWINTT5.js} +1 -1
- package/dist/chunks/{chunk-Q2QL6UWN.js → chunk-JHEFWB6O.js} +1 -1
- package/dist/chunks/{chunk-QNG27G3T.js → chunk-JHMS2WXM.js} +2 -2
- package/dist/chunks/{chunk-PSGGOZFM.js → chunk-JHR3LF2F.js} +1 -1
- package/dist/chunks/{chunk-JE7RJZOA.js → chunk-KGLJU66U.js} +3 -3
- package/dist/chunks/{chunk-XEOEKFG6.js → chunk-KJFRCVQC.js} +1 -1
- package/dist/chunks/chunk-KNO355LC.js +2 -0
- package/dist/chunks/{chunk-ZGTOK7ZK.js → chunk-LD7PGREF.js} +2 -2
- package/dist/chunks/{chunk-I7AQMAQI.js → chunk-LHA7RQBA.js} +6 -6
- package/dist/chunks/{chunk-6QSSIT62.js → chunk-LO3O45IX.js} +1 -1
- package/dist/chunks/{chunk-G3RXYI2L.js → chunk-M2SKXY5C.js} +2 -2
- package/dist/chunks/{chunk-2IHO4GDJ.js → chunk-M3ZQDPRS.js} +1 -1
- package/dist/chunks/{chunk-JDEEWOD7.js → chunk-M4ZF44H5.js} +1 -1
- package/dist/chunks/{chunk-Y4OWBBDD.js → chunk-M55H7KVR.js} +1 -1
- package/dist/chunks/{chunk-JAJ46T5X.js → chunk-MGKMIRYG.js} +1 -1
- package/dist/chunks/{chunk-4EQA2M7K.js → chunk-MJGU2JJ2.js} +2 -2
- package/dist/chunks/{chunk-65PL62KH.js → chunk-MS37ISA4.js} +2 -2
- package/dist/chunks/{chunk-NH6UUX5S.js → chunk-NCKXI2VB.js} +11 -11
- package/dist/chunks/chunk-NHUUCNAD.js +2 -0
- package/dist/chunks/{chunk-O6ULLQJ6.js → chunk-O3VP46SE.js} +1 -1
- package/dist/chunks/chunk-O4FBOUNX.js +2 -0
- package/dist/chunks/chunk-O6IFVTZT.js +9 -0
- package/dist/chunks/{chunk-5IPFI25K.js → chunk-O7B44IYN.js} +1 -1
- package/dist/chunks/{chunk-DMVD2RFZ.js → chunk-OGMDEA3Y.js} +1 -1
- package/dist/chunks/{chunk-BLXEAZCQ.js → chunk-OKBIWRHC.js} +1 -1
- package/dist/chunks/{chunk-FFRFSDBM.js → chunk-ON2RNOCG.js} +1 -1
- package/dist/chunks/{chunk-LQQNBVEB.js → chunk-ONDCV5QC.js} +1 -1
- package/dist/chunks/{chunk-UCPGRPWY.js → chunk-OQ4VGCRG.js} +1 -1
- package/dist/chunks/{chunk-YNH3NMPF.js → chunk-OWK7HU5I.js} +1 -1
- package/dist/chunks/{chunk-DBK66CJP.js → chunk-OY5HC2P6.js} +1 -1
- package/dist/chunks/{chunk-T5AACNJI.js → chunk-P7HRF4FM.js} +1 -1
- package/dist/chunks/{chunk-7ED24PP6.js → chunk-PCNLC5H3.js} +1 -1
- package/dist/chunks/{chunk-ES2ISFJC.js → chunk-PF56N7ZY.js} +1 -1
- package/dist/chunks/{chunk-VVCKLCF3.js → chunk-PKALOVHC.js} +2 -2
- package/dist/chunks/{chunk-ZCHXGRRU.js → chunk-PR5TYTY4.js} +1 -1
- package/dist/chunks/{chunk-Q4TBTRIG.js → chunk-PWK5Z5S3.js} +1 -1
- package/dist/chunks/chunk-PXS4SVQG.js +16 -0
- package/dist/chunks/{chunk-AY64VY4E.js → chunk-QGOPYQW3.js} +1 -1
- package/dist/chunks/{chunk-7E6T7GP5.js → chunk-R7YEURUQ.js} +1 -1
- package/dist/chunks/{chunk-ACYFMLWG.js → chunk-RCA6NGVA.js} +2 -2
- package/dist/chunks/{chunk-DUURYZOI.js → chunk-RG3NH6YQ.js} +1 -1
- package/dist/chunks/{chunk-7SC46OFC.js → chunk-RJIUOLWY.js} +1 -1
- package/dist/chunks/{chunk-F4KOGISR.js → chunk-RXE3FYMJ.js} +1 -1
- package/dist/chunks/chunk-RYGWCN2R.js +2 -0
- package/dist/chunks/{chunk-VYLGI3IH.js → chunk-SFNCAPCJ.js} +1 -1
- package/dist/chunks/{chunk-Z4Z5UOZM.js → chunk-SG6JZ7HD.js} +1 -1
- package/dist/chunks/{chunk-XX6SMFDY.js → chunk-SKRNWRKV.js} +5 -5
- package/dist/chunks/{chunk-ZRDGQDZL.js → chunk-SLZH4Z6C.js} +1 -1
- package/dist/chunks/{chunk-WN3V6KDN.js → chunk-SPDSSMFD.js} +1 -1
- package/dist/chunks/chunk-STWRTNRK.js +2 -0
- package/dist/chunks/{chunk-HZEIRHEB.js → chunk-T5J7HIHR.js} +1 -1
- package/dist/chunks/{chunk-ROGF26KV.js → chunk-TBUAQWFS.js} +1 -1
- package/dist/chunks/{chunk-ZUJ3XUCP.js → chunk-TEPRCBDV.js} +1 -1
- package/dist/chunks/{chunk-HDGTHRY7.js → chunk-TOFMA2L5.js} +2 -2
- package/dist/chunks/{chunk-QOGJAQDO.js → chunk-UFHLLSCE.js} +1 -1
- package/dist/chunks/{chunk-TTVS6JMC.js → chunk-UJKQLO6B.js} +2 -2
- package/dist/chunks/{chunk-OQKJGTTO.js → chunk-UZQNFTLR.js} +1 -1
- package/dist/chunks/{chunk-F74GBN6K.js → chunk-V2HMWCT6.js} +1 -1
- package/dist/chunks/{chunk-6ZFPQYHG.js → chunk-V4KT5FCJ.js} +1 -1
- package/dist/chunks/{chunk-TVQAPBLZ.js → chunk-VHSX3JPX.js} +1 -1
- package/dist/chunks/{chunk-SDXFLO7J.js → chunk-W2SXOGTQ.js} +1 -1
- package/dist/chunks/{chunk-FUOEIDMA.js → chunk-WDEO44UN.js} +1 -1
- package/dist/chunks/{chunk-4NESNOK5.js → chunk-WEHBK3MC.js} +1 -1
- package/dist/chunks/{chunk-4EPSHPZL.js → chunk-WGX7WY4N.js} +1 -1
- package/dist/chunks/{chunk-NC27T4AB.js → chunk-WHREO7A2.js} +1 -1
- package/dist/chunks/{chunk-RNQF63ZR.js → chunk-WS2ZZBAQ.js} +4 -4
- package/dist/chunks/{chunk-DIO5CB6U.js → chunk-WYZWDMMF.js} +1 -1
- package/dist/chunks/{chunk-MQULU465.js → chunk-XO3H32KX.js} +1 -1
- package/dist/chunks/{chunk-EIRYMSEG.js → chunk-XQBIHPPX.js} +1 -1
- package/dist/chunks/chunk-XRKFTPHD.js +2 -0
- package/dist/chunks/{chunk-B7RFL4N2.js → chunk-XSCIOQYE.js} +1 -1
- package/dist/chunks/{chunk-TJ6GVTYB.js → chunk-XTWEWYK7.js} +9 -9
- package/dist/chunks/{chunk-JUHZ5S3R.js → chunk-Y3GIM6WK.js} +1 -1
- package/dist/chunks/{chunk-74ZXXBGN.js → chunk-Y54RKLOI.js} +1 -1
- package/dist/chunks/{chunk-SWUEFLOH.js → chunk-Y777GISF.js} +1 -1
- package/dist/chunks/{chunk-EKM2D7JU.js → chunk-YDU3S6UT.js} +1 -1
- package/dist/chunks/{chunk-UGL7WF3W.js → chunk-YOZIZYSC.js} +1 -1
- package/dist/chunks/{chunk-OSIO7PLX.js → chunk-YQKOB56U.js} +1 -1
- package/dist/chunks/chunk-YVNDDNMK.js +3 -0
- package/dist/chunks/chunk-ZAZKJJOT.js +86 -0
- package/dist/chunks/{chunk-QL4OIPEZ.js → chunk-ZR7LIMJS.js} +2 -2
- package/dist/chunks/{chunk-L3KCP52O.js → chunk-ZTJOOY2F.js} +1 -1
- package/dist/chunks/{chunk-GPVCOEUH.js → chunk-ZTVXRZ6D.js} +1 -1
- package/dist/chunks/cli-CNYNXKGQ.js +2 -0
- package/dist/chunks/configuration-command-5K7EE2J5.js +2 -0
- package/dist/chunks/connected-app-executor-E25XCNAS.js +2 -0
- package/dist/chunks/connected-evidence-QNSO5BTF.js +2 -0
- package/dist/chunks/connection-Y2KCMBYD.js +2 -0
- package/dist/chunks/{continual-6CQAMTTR.js → continual-SOO3QBNQ.js} +1 -1
- package/dist/chunks/core-commands-ZTWPYAFQ.js +2 -0
- package/dist/chunks/datasets-XPUMWGOC.js +2 -0
- package/dist/chunks/desktop-test-HVSW4JHY.js +3 -0
- package/dist/chunks/dist-4N6AHWNN.js +2 -0
- package/dist/chunks/{dist-OMGUJYPD.js → dist-N6R6VNFD.js} +1 -1
- package/dist/chunks/{dist-VYC5VMQB.js → dist-QN7WKZ2D.js} +1 -1
- package/dist/chunks/{enclave-QS4BUNDU.js → enclave-VURYNILU.js} +1 -1
- package/dist/chunks/evaluation-coordination-AOTFPVMS.js +2 -0
- package/dist/chunks/experiment-improvements-75CN3VI7.js +2 -0
- package/dist/chunks/experiments-AGAHM2AK.js +2 -0
- package/dist/chunks/{experiments-VFQGE4HC.js → experiments-DYSHYBGB.js} +1 -1
- package/dist/chunks/{extension-XKXXOP5N.js → extension-UT4CSDJF.js} +1 -1
- package/dist/chunks/help-KU52CFMW.js +8 -0
- package/dist/chunks/host-profile-evaluation-tools-LZDMQCMT.js +2 -0
- package/dist/chunks/host-profile-external-dataset-VK3NJHMC.js +2 -0
- package/dist/chunks/hosted-app-server-composition-P7V7K7CG.js +2 -0
- package/dist/chunks/{hosted-experiment-improvement-HVMDGS75.js → hosted-experiment-improvement-P433KDX2.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-Y4DONWPC.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-EXNN6MVN.js → hosted-profile-candidate-72MMPN6U.js} +1 -1
- package/dist/chunks/hosted-profile-compiler-RXHLK224.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-LS4DCSDO.js +2 -0
- package/dist/chunks/{hosted-profile-evaluation-inspection-ZUANDYZ6.js → hosted-profile-evaluation-inspection-3Q6EHO66.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-ORVZ6MBD.js → hosted-profile-evaluation-preparation-ZD27HNLF.js} +1 -1
- package/dist/chunks/{hosted-tasksets-ANAE2PIW.js → hosted-tasksets-V2PQZJN4.js} +1 -1
- package/dist/chunks/human-review-4FJFINQX.js +2 -0
- package/dist/chunks/import-GBHSLA3G.js +3 -0
- package/dist/chunks/{learning-ACEVFL5M.js → learning-U3FZL5YB.js} +1 -1
- package/dist/chunks/local-harness-improvement-runtime-UP2P7UT4.js +2 -0
- package/dist/chunks/local-harness-taskset-review-ZNOKSPJJ.js +2 -0
- package/dist/chunks/{local-scope-HVF2GZ5W.js → local-scope-62GWHDXS.js} +1 -1
- package/dist/chunks/{model-projects-QPO22JPA.js → model-projects-LQ4C6R3X.js} +1 -1
- package/dist/chunks/opchat-Q4PIWPYW.js +3 -0
- package/dist/chunks/organizations-TEH6HBQ3.js +2 -0
- package/dist/chunks/{profile-TFZMUEDR.js → profile-SWPVCGTR.js} +1 -1
- package/dist/chunks/{profile-training-source-6GOT7AHM.js → profile-training-source-J73ZLNSC.js} +1 -1
- package/dist/chunks/project-action-payload-OU3ZPHW7.js +2 -0
- package/dist/chunks/project-agent-J7ILCRBS.js +2 -0
- package/dist/chunks/{published-experiment-source-HVP5IGRH.js → published-experiment-source-HVHKSYDL.js} +1 -1
- package/dist/chunks/refiner-profile-service-E7YU4E3N.js +2 -0
- package/dist/chunks/{runtime-A7OZXM43.js → runtime-LIPHPKKJ.js} +2 -2
- package/dist/chunks/sandbox-command-G6KID3OP.js +2 -0
- package/dist/chunks/{sandbox-template-C4V6T36U.js → sandbox-template-MZTMAUFS.js} +1 -1
- package/dist/chunks/saved-work-LOUWLF37.js +2 -0
- package/dist/chunks/{send-turn-XTAIS2JN.js → send-turn-UEUEGY5W.js} +1 -1
- package/dist/chunks/{src-R36AGJY7.js → src-7WMZOWZZ.js} +107 -100
- package/dist/chunks/{src-DZL5T2MT.js → src-MVAK6D6Y.js} +1 -1
- package/dist/chunks/standalone-experiment-turn-owner-YRKEOEJ2.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-LJPNG4SP.js → store-continual-support-reviews-FJLLNKCY.js} +1 -1
- package/dist/chunks/{store-conversation-serving-KPC62UEY.js → store-conversation-serving-4KWR4IZY.js} +1 -1
- package/dist/chunks/{store-create-improve-SW5FTBTL.js → store-create-improve-JWBJZRAU.js} +1 -1
- package/dist/chunks/{store-datasets-WMA7AJKN.js → store-datasets-4N2M6Y3K.js} +2 -2
- package/dist/chunks/{store-evaluation-results-ZO6R653G.js → store-evaluation-results-OBM4623U.js} +1 -1
- package/dist/chunks/{store-harness-memory-VINCZ4GK.js → store-harness-memory-4HUEMRCD.js} +1 -1
- package/dist/chunks/{store-harness-refinement-candidates-EA5KFQPH.js → store-harness-refinement-candidates-NMRWMN23.js} +1 -1
- package/dist/chunks/store-harness-workspaces-BGONIQDY.js +2 -0
- package/dist/chunks/{store-human-review-7QQ7ZQ6P.js → store-human-review-J75SIZAL.js} +1 -1
- package/dist/chunks/store-learned-preference-migration-validation-VLASM4CT.js +2 -0
- package/dist/chunks/store-learning-TUCQFBLT.js +2 -0
- package/dist/chunks/{store-learning-credentials-WZQJ4HPJ.js → store-learning-credentials-S4RF57NV.js} +1 -1
- package/dist/chunks/{store-local-experiments-SAULQSBN.js → store-local-experiments-LULRLTII.js} +5 -5
- package/dist/chunks/{store-model-batch-review-VKLDYGH3.js → store-model-batch-review-SVL4MT6D.js} +1 -1
- package/dist/chunks/{store-model-configuration-BYRJUR3C.js → store-model-configuration-ZHDSM3XM.js} +2 -2
- package/dist/chunks/{store-preference-comparison-LV32MHVL.js → store-preference-comparison-YMMCKXS5.js} +1 -1
- package/dist/chunks/{store-schedules-VGTEQVKH.js → store-schedules-6Z4QS3NU.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-VB5GTLFY.js → store-sidebar-file-bookmarks-MX6EP6OB.js} +2 -2
- package/dist/chunks/{store-sidebar-preferences-GWIOG2NH.js → store-sidebar-preferences-VYREPW26.js} +1 -1
- package/dist/chunks/{store-subagents-T7R2Z6TB.js → store-subagents-WGBCRALX.js} +1 -1
- package/dist/chunks/{store-task-inbox-QPE44OSS.js → store-task-inbox-43BNZSB7.js} +6 -6
- package/dist/chunks/{store-task-inventory-I3RDRI52.js → store-task-inventory-AEW4POAJ.js} +2 -2
- package/dist/chunks/{store-taskset-drafts-2IULRV2W.js → store-taskset-drafts-DKFO2CYB.js} +1 -1
- package/dist/chunks/{store-training-B2TW2MLA.js → store-training-6PFFR6ST.js} +1 -1
- package/dist/chunks/{store-training-jobs-VBNG23RL.js → store-training-jobs-ANDEBQ67.js} +2 -2
- package/dist/chunks/{store-training-models-OMV5FIC4.js → store-training-models-OOI4ZJPX.js} +2 -2
- package/dist/chunks/{store-usage-IE2U2FD3.js → store-usage-U72RNW64.js} +1 -1
- package/dist/chunks/{store-work-evidence-QQDKM5AQ.js → store-work-evidence-NY5OBATB.js} +1 -1
- package/dist/chunks/{taskset-EQRFQBYM.js → taskset-SL3YOXW7.js} +1 -1
- package/dist/chunks/{taskset-packages-XC6HEE3K.js → taskset-packages-3PCEYYDA.js} +1 -1
- package/dist/chunks/{teams-bot-EAPGPTHZ.js → teams-bot-IDEF3BMI.js} +1 -1
- package/dist/chunks/{training-UF6RPI4T.js → training-57ISIC7U.js} +1 -1
- package/dist/chunks/web-search-222Y63QW.js +2 -0
- package/dist/chunks/{workspaces-EKKE5NAC.js → workspaces-5DF4H5EX.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/web/assets/{App-CaRMZoxo.css → App-DbYvV_W6.css} +1 -1
- package/dist/web/assets/App-nzE7JU_O.js +154 -0
- package/dist/web/assets/{AppDialog-t2Fx5tK3.js → AppDialog-VtNvqbDm.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-Dj1Y32oI.js → AppTerminalPanel-BMfKdrrN.js} +2 -2
- package/dist/web/assets/AppsView-CdWyrDEb.js +1 -0
- package/dist/web/assets/{BrowserSidebar-jhWi4rVm.js → BrowserSidebar-CtOIciOa.js} +1 -1
- package/dist/web/assets/{CartesianChart-C1DIx0Ia.js → CartesianChart-u1lvLM30.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-Bdr-HmOL.js → CollaborationTabs-CaBfDYRW.js} +1 -1
- package/dist/web/assets/{CommandMenu-Ux2yOHAc.js → CommandMenu-CFW3WJ11.js} +1 -1
- package/dist/web/assets/{CommunityView-DPEeVKFn.js → CommunityView-D2EjaeuH.js} +1 -1
- package/dist/web/assets/ComposerCreateImproveStrip-6wYSJdzv.js +1 -0
- package/dist/web/assets/ConversationImportsSettings-BJ4QhF7p.js +1 -0
- package/dist/web/assets/ConversationImportsSettings-PfUa8V7X.css +1 -0
- package/dist/web/assets/{GetStartedView-CFHP0AaI.js → GetStartedView-DBcOwIJn.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-D8BGTPVN.js → HostedModelLearningReview-BNpK6_W9.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-JS1S7vNO.js → HostedModelLearningSettings-SrsdeeoA.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-Dx5Q3xV2.js → LabModelVersionDetailPage-Cd6bRHt9.js} +1 -1
- package/dist/web/assets/LabSkillSidebar-CQfvel4w.js +1 -0
- package/dist/web/assets/{LabsRoute-CyYF8-dw.js → LabsRoute-sXLJt1KR.js} +4 -4
- package/dist/web/assets/MainChatThread-dlDDK2JM.js +2 -0
- package/dist/web/assets/MainPane-DCz38-qy.js +65 -0
- package/dist/web/assets/{MarkdownText-BR4V6lNO.js → MarkdownText-Drjq6-JM.js} +1 -1
- package/dist/web/assets/{NativeSkillSidebar-DU9IEgIO.js → NativeSkillSidebar-jncZijt-.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-mIy6FzCj.js → NewExperienceSwitcher-DXKzoMaM.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-RfTZTHxl.js → NewProjectDialog-DIyjAxJG.js} +1 -1
- package/dist/web/assets/OutputsPage-Dy1cNr3n.js +1 -0
- package/dist/web/assets/{ProjectsPage-CE6QUB-b.js → ProjectsPage-D2EeybIv.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-4wUL-W9_.js +1 -0
- package/dist/web/assets/{RightSidebarHomePanel-CK0rP3WT.js → RightSidebarHomePanel-Bd_AHUp8.js} +1 -1
- package/dist/web/assets/{ScheduledWorkPage-vOrYv8pp.js → ScheduledWorkPage-BJkSzwz2.js} +1 -1
- package/dist/web/assets/{SettingsView-DCKVrfjj.js → SettingsView-BhcP72KH.js} +4 -4
- package/dist/web/assets/SettingsView-DjjnCnlb.css +1 -0
- package/dist/web/assets/{TeamChatView-Bwrjr-vk.js → TeamChatView-CR0fdicZ.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-DhPoKZAq.js → TerminalOverlay-DGrZRZ_3.js} +10 -10
- package/dist/web/assets/TrainingCreationPanel-BsTG7aFS.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-C9cRX5qf.js → TrainingDraftPanel-ByErrht7.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CrdcSGeW.js → UsageSettingsSection-DeYTJbcM.js} +1 -1
- package/dist/web/assets/{WorkSidebarPanel-DSSikNFQ.js → WorkSidebarPanel-DcNvEEoy.js} +1 -1
- package/dist/web/assets/{WorkspaceDiffPanel-BAFo0CPN.js → WorkspaceDiffPanel-CdPRcYWN.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-BVHAhwnJ.js → WorkspaceEnvironmentMenu-xUYg-iGn.js} +18 -18
- package/dist/web/assets/{WorkspaceGitDialogs-CwVoiDQ2.js → WorkspaceGitDialogs-CBViLL3S.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-TxLyhzNp.js → WorkspaceMonacoEditor-frxie2_S.js} +3 -3
- package/dist/web/assets/agent-connections-D7ao-vbU.js +1 -0
- package/dist/web/assets/{arrow-up-right-C9aE8Mfz.js → arrow-up-right-DCWPxdbD.js} +1 -1
- package/dist/web/assets/{chunk-P3BRSSRD-DUGfuKA8.js → chunk-P3BRSSRD-B5JXa0Nh.js} +1 -1
- package/dist/web/assets/{clipboard-Dk158Qp4.js → clipboard-B-GnMVLp.js} +1 -1
- package/dist/web/assets/{cloud-upload-k9eqBsHr.js → cloud-upload-DpaGFZ9J.js} +1 -1
- package/dist/web/assets/{cssMode-CO35ARZp.js → cssMode-DJHE7R3W.js} +1 -1
- package/dist/web/assets/{folder-open-sYgceW_f.js → folder-open-B-DFLDFH.js} +1 -1
- package/dist/web/assets/{folder-plus-CS0R49m9.js → folder-plus-CPXxPvSH.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-DrGxH2h4.js → git-commit-horizontal-DCTzcivA.js} +1 -1
- package/dist/web/assets/{htmlMode-REMmzdfq.js → htmlMode-DxZVBAYd.js} +1 -1
- package/dist/web/assets/index-BojtIRzO.css +1 -0
- package/dist/web/assets/{index-C8aCGagb.js → index-Di1MU6Xr.js} +2 -2
- package/dist/web/assets/{info-DLdbiUrh.js → info-BMxsR_bn.js} +1 -1
- package/dist/web/assets/{jsonMode-KEdMfkIf.js → jsonMode-CzWoMkpp.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-5KZwEoxW.js → lspLanguageFeatures-15K7ND6Q.js} +1 -1
- package/dist/web/assets/{minimize-2-CqcI4zcM.js → minimize-2-DwUgqXoR.js} +1 -1
- package/dist/web/assets/{monaco.contribution-Cly9Wt7L.js → monaco.contribution-BBLKjER5.js} +2 -2
- package/dist/web/assets/{monaco.contribution-omszXBEj.js → monaco.contribution-DBjvSu8p.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DO10L0zW.js → monaco.contribution-DUWvjhIG.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BJGj65F9.js → monaco.contribution-w0zfkYLX.js} +2 -2
- package/dist/web/assets/{monitor-BFVCcbxp.js → monitor-Ihu5LVYx.js} +1 -1
- package/dist/web/assets/{play-C469pVZq.js → play-D_YGCdxU.js} +1 -1
- package/dist/web/assets/{python-Dw0YcVy9.js → python-Q4OuoXYc.js} +1 -1
- package/dist/web/assets/{save-CtSjPydi.js → save-DJYUOhtD.js} +1 -1
- package/dist/web/assets/{square-BuImvLhT.js → square-DXtoCBNw.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-DjCO9lIP.js → toggleHighContrast-CaNeuWVE.js} +1 -1
- package/dist/web/assets/{tsMode-BAOnxKd6.js → tsMode-CJnQ2wmM.js} +1 -1
- package/dist/web/assets/{upload-2JkFZo3h.js → upload-fCP3_OEO.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-BNqAisfS.js → useLocalAgentSchedules-BFoH_gwZ.js} +1 -1
- package/dist/web/assets/useProviderSettings-2eysgqiA.js +5 -0
- package/dist/web/assets/{useProviderSettings-CmL_BaxP.css → useProviderSettings-Cktvzinz.css} +1 -1
- package/dist/web/assets/{useSessionTurnCache-BHU2-Jmz.js → useSessionTurnCache-DLF5SPD-.js} +1 -1
- package/dist/web/assets/{wifi-off-CpOAH62M.js → wifi-off-DZoiFrRz.js} +1 -1
- package/dist/web/assets/{workers-0QvlA2T5.js → workers-D5nr74M-.js} +1 -1
- package/dist/web/assets/{yaml-BK3qxo7D.js → yaml-CwsoTJmk.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +22 -3
- package/docs/conversation-imports.md +57 -0
- package/package.json +1 -1
- package/dist/chunks/app-server-harness-services-QMUOEYOA.js +0 -2
- package/dist/chunks/app-server-runtime-ISGGLQHU.js +0 -2
- package/dist/chunks/apps-BKTOR4F7.js +0 -2
- package/dist/chunks/chunk-3VUATFZD.js +0 -2
- package/dist/chunks/chunk-3Z47M3YY.js +0 -2
- package/dist/chunks/chunk-6UDGARFC.js +0 -143
- package/dist/chunks/chunk-FV2R5RUN.js +0 -3
- package/dist/chunks/chunk-HY3GOBFJ.js +0 -58
- package/dist/chunks/chunk-I3HZKJB3.js +0 -2
- package/dist/chunks/chunk-I3VVWNUW.js +0 -5
- package/dist/chunks/chunk-KG325WTN.js +0 -2
- package/dist/chunks/chunk-Q5LEXXJG.js +0 -16
- package/dist/chunks/chunk-QDC4OW3S.js +0 -2
- package/dist/chunks/chunk-SDAUS5PY.js +0 -2
- package/dist/chunks/chunk-VRIEKBBH.js +0 -9
- package/dist/chunks/chunk-WJ43MJ3F.js +0 -2
- package/dist/chunks/chunk-X2HIHF2I.js +0 -2
- package/dist/chunks/chunk-YBT2NB32.js +0 -2
- package/dist/chunks/chunk-ZTNHW2K7.js +0 -10
- package/dist/chunks/cli-XZENDZ7Z.js +0 -2
- package/dist/chunks/configuration-command-6C5UO7GE.js +0 -2
- package/dist/chunks/connected-app-executor-LQNIU5NR.js +0 -2
- package/dist/chunks/connected-evidence-GH2ATNEX.js +0 -2
- package/dist/chunks/connection-HTF6CC7M.js +0 -2
- package/dist/chunks/core-commands-A2DGGIPS.js +0 -2
- package/dist/chunks/datasets-7BNMVJOY.js +0 -2
- package/dist/chunks/desktop-test-3CUHVLXV.js +0 -3
- package/dist/chunks/dist-ZVJPJLXR.js +0 -2
- package/dist/chunks/evaluation-coordination-XEF5L7KZ.js +0 -2
- package/dist/chunks/experiment-improvements-KRX2DP27.js +0 -2
- package/dist/chunks/experiments-DFGQYA4O.js +0 -2
- package/dist/chunks/help-S7THC6IE.js +0 -8
- package/dist/chunks/host-profile-evaluation-tools-JOFBL5OF.js +0 -2
- package/dist/chunks/host-profile-external-dataset-K3ICDHIP.js +0 -2
- package/dist/chunks/hosted-app-server-composition-T5IWGOTA.js +0 -2
- package/dist/chunks/hosted-harness-runtime-YCKB6NBI.js +0 -2
- package/dist/chunks/hosted-profile-compiler-IYLLHCRY.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-TJVER3NW.js +0 -2
- package/dist/chunks/human-review-WR777ODH.js +0 -2
- package/dist/chunks/import-MLZUHITH.js +0 -4
- package/dist/chunks/local-harness-improvement-runtime-QRFGPFRM.js +0 -2
- package/dist/chunks/local-harness-taskset-review-HR7KLY4B.js +0 -2
- package/dist/chunks/opchat-T4QTNEIY.js +0 -3
- package/dist/chunks/organizations-75L5DZDV.js +0 -2
- package/dist/chunks/project-action-payload-JDS6OQAW.js +0 -2
- package/dist/chunks/project-agent-6RRO233B.js +0 -2
- package/dist/chunks/refiner-profile-service-FDTQKY33.js +0 -2
- package/dist/chunks/sandbox-command-IU5XFTJP.js +0 -2
- package/dist/chunks/saved-work-SHEEDZ6Z.js +0 -2
- package/dist/chunks/standalone-experiment-turn-owner-JCY5LL5R.js +0 -2
- package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +0 -2
- package/dist/chunks/store-learned-preference-migration-validation-NADPXOTG.js +0 -2
- package/dist/chunks/store-learning-WLG6KFIO.js +0 -2
- package/dist/chunks/web-search-CZ3NCLPY.js +0 -2
- package/dist/web/assets/App-s-CJswyt.js +0 -154
- package/dist/web/assets/AppsView-BYE5EBDJ.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-CEgh4OtN.js +0 -1
- package/dist/web/assets/LabSkillSidebar-BxffN-pN.js +0 -1
- package/dist/web/assets/MainChatThread-DZpcFRFl.js +0 -2
- package/dist/web/assets/MainPane-5DTtwVCk.js +0 -65
- package/dist/web/assets/OutputsPage-Cr1Spf7S.js +0 -1
- package/dist/web/assets/RightChatPanelStack-T6VRWuHo.js +0 -1
- package/dist/web/assets/SettingsView-Dulr_xlq.css +0 -1
- package/dist/web/assets/TrainingCreationPanel-BXHfohNm.js +0 -1
- package/dist/web/assets/index-3iPNbbER.css +0 -1
- package/dist/web/assets/useProviderSettings-C4L4wDoh.js +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
3
|
-
import{q as vt,r as St}from"./chunk-
|
|
3
|
+
import{q as vt,r as St}from"./chunk-7LZISGTA.js";import"./chunk-BFKYRQMA.js";import"./chunk-LO3O45IX.js";import{h as yt}from"./chunk-ZR7LIMJS.js";import{i as pe,j as ht,l as me}from"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-YR5ID2SS.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-LHA7RQBA.js";import{D as He,E as ee,G as pt,I as mt,L as ft,O as gt}from"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import{f as dt,h as ct}from"./chunk-H7IWJN7L.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createInterface as oo}from"node:readline/promises";import{stdin as Fe,stdout as k}from"node:process";import{pathToFileURL as io}from"node:url";function ge(){return{text:"",cursor:0,history:[],historyIndex:null}}i(ge,"createComposer");function wt(e,t){let r=e.text.slice(0,e.cursor),n=e.text.slice(e.cursor);return{...e,text:`${r}${t}${n}`,cursor:e.cursor+t.length,historyIndex:null}}i(wt,"insertText");function fe(e,t){return{...e,text:t,cursor:t.length}}i(fe,"replaceComposerText");function Rr(e){let t=e.text.trim();return t?{state:{text:"",cursor:0,history:[...e.history.filter(r=>r!==t),t].slice(-100),historyIndex:null},action:{type:"submit",text:t}}:{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}}i(Rr,"submitComposer");function Tt(e,t){if(t==="ctrl+c")return{state:e,action:{type:"cancel-or-exit"}};if(t==="ctrl+d")return{state:e,action:e.text?{type:"none"}:{type:"exit"}};if(t==="ctrl+l")return{state:e,action:{type:"rerender"}};if(t==="enter")return Rr(e);if(t==="alt+enter")return{state:wt(e,`
|
|
4
4
|
`),action:{type:"none"}};if(t==="backspace")return e.cursor<=0?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor-1)}${e.text.slice(e.cursor)}`,cursor:e.cursor-1},action:{type:"none"}};if(t==="delete")return e.cursor>=e.text.length?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor)}${e.text.slice(e.cursor+1)}`},action:{type:"none"}};if(t==="left")return{state:{...e,cursor:Math.max(0,e.cursor-1)},action:{type:"none"}};if(t==="right")return{state:{...e,cursor:Math.min(e.text.length,e.cursor+1)},action:{type:"none"}};if(t==="home"||t==="ctrl+a")return{state:{...e,cursor:0},action:{type:"none"}};if(t==="end"||t==="ctrl+e")return{state:{...e,cursor:e.text.length},action:{type:"none"}};if(t==="ctrl+u")return{state:{...e,text:e.text.slice(e.cursor),cursor:0},action:{type:"none"}};if(t==="ctrl+k")return{state:{...e,text:e.text.slice(0,e.cursor)},action:{type:"none"}};if(t==="up"){if(e.history.length===0)return{state:e,action:{type:"none"}};let r=e.historyIndex===null?e.history.length-1:Math.max(0,e.historyIndex-1);return{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}if(t==="down"){if(e.historyIndex===null)return{state:e,action:{type:"none"}};let r=e.historyIndex+1;return r>=e.history.length?{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}:{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}return t.length>0?{state:wt(e,t),action:{type:"none"}}:{state:e,action:{type:"none"}}}i(Tt,"handleComposerKey");var bt="A turn is already running. Wait for it to finish before sending another line.";function Mr(){let e=!1;return{isRunning(){return e},tryStartSubmission(){return e?!1:(e=!0,!0)},failSubmission(){e=!1},applyRuntimeEvent(t){t.name==="turn.started"&&(e=!0),(t.name==="turn.completed"||t.name==="turn.failed"||t.name==="turn.interrupted")&&(e=!1)}}}i(Mr,"createTerminalTurnSubmissionGuard");function Pt(){return Mr()}i(Pt,"createLineModeTurnGuard");var he=[{name:"help",usage:"/help",description:"show this help"},{name:"providers",usage:"/providers",description:"list providers"},{name:"provider",usage:"/provider [id]",description:"switch provider",requiresArgument:!0},{name:"model",usage:"/model [id]",description:"list or switch model"},{name:"apps",usage:"/apps",description:"list connectable apps"},{name:"install",usage:"/install <app>",description:"open app details",requiresArgument:!0},{name:"projects",usage:"/projects",description:"list projects"},{name:"project",usage:"/project <id>",description:"switch project",requiresArgument:!0},{name:"permissions",usage:"/permissions [ask|full-access]",description:"show or change command access"},{name:"profile",usage:"/profile [status|diff|catalog|check|push]",description:"show or sync profile"},{name:"agents",usage:"/agents",description:"list agents"},{name:"agent",usage:"/agent <id>",description:"select agent",requiresArgument:!0},{name:"run",usage:"/run <action> [json]",description:"run profile action",requiresArgument:!0},{name:"settings",usage:"/settings",description:"show settings"},{name:"logs",usage:"/logs",description:"show recent events"},{name:"compact",usage:"/compact",description:"compact current session"},{name:"clear",usage:"/clear",description:"clear terminal transcript"},{name:"exit",usage:"/exit",description:"exit"},{name:"hooks",usage:"/hooks",description:"show hook status"},{name:"start",usage:"/start",description:"start a new session"}];function ze(e){if(!e.startsWith("/"))return null;let[t="",...r]=e.slice(1).trim().split(/\s+/),n=t.toLowerCase();if(!n)return null;if(n==="exit"||n==="quit")return{type:"exit"};if(n==="help")return{type:"help"};if(n==="clear")return{type:"clear"};if(n==="agents")return{type:"agents"};if(n==="apps")return{type:"apps"};if(n==="agent")return{type:"agent",id:r.join(" ").trim()};if(n==="install")return{type:"install",id:r.join(" ").trim()};if(n==="projects")return{type:"projects"};if(n==="project")return{type:"project",id:r.join(" ").trim()};if(n==="model")return{type:"model",id:r.join(" ").trim()||null};if(n==="permissions")return{type:"permissions",args:r};if(n==="profile")return{type:"profile",args:r};if(n==="logs")return{type:"logs"};if(n==="providers")return{type:"providers"};if(n==="provider")return{type:"provider",id:r.join(" ").trim()||null};if(n==="compact")return{type:"compact"};if(n==="hooks")return{type:"hooks"};if(n==="start")return{type:"start"};if(n==="run"){let o=r[0]??"",s=r.slice(1).join(" ").trim();return s?{type:"run",action:o,input:JSON.parse(s)}:{type:"run",action:o,input:void 0}}return n==="settings"?{type:"settings",args:r}:{type:"unknown",command:n}}i(ze,"parseSlashCommand");function xt(e){let t=e.trim();if(!t.startsWith("!"))return null;let r=t.slice(1).trim();return r?{command:r}:null}i(xt,"parseDirectCommandPrompt");function Ct(){let e=Math.max(...he.map(t=>t.usage.length));return["Commands:",...he.map(t=>`${t.usage.padEnd(e+2)}${t.description}`)].join(`
|
|
5
5
|
`)}i(Ct,"helpText");var ye=class{static{i(this,"RawInput")}input;onKey;previousRawMode=!1;dataHandler=null;constructor(t,r){this.input=t,this.onKey=r}start(){this.previousRawMode=this.input.isRaw??!1,this.input.setRawMode(!0),this.input.resume(),this.dataHandler=t=>{for(let r of Or(t))this.onKey(r)},this.input.on("data",this.dataHandler)}stop(){this.dataHandler&&this.input.off("data",this.dataHandler),this.dataHandler=null,this.input.setRawMode(this.previousRawMode),this.input.pause()}};function Or(e){let t=e.toString("utf8"),r=[];for(let n=0;n<t.length;n+=1){let o=t[n],s=t[n+1];if(o==="\x1B"){let a=jr(t,n);r.push(a.key),n=a.end;continue}o===""?r.push("ctrl+c"):o===""?r.push("ctrl+d"):o==="\f"?r.push("ctrl+l"):o===""?r.push("ctrl+a"):o===""?r.push("ctrl+e"):o==="\v"?r.push("ctrl+k"):o===""?r.push("ctrl+u"):o==="\x7F"||o==="\b"?r.push("backspace"):o==="\r"||o===`
|
|
6
6
|
`?r.push("enter"):(o>=" "||o&&s)&&r.push(o)}return r}i(Or,"decodeKeys");function jr(e,t){let r=e.slice(t);return r.startsWith("\x1B\r")||r.startsWith(`\x1B
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{d as a}from"./chunk-RXE3FYMJ.js";import"./chunk-DK7IKI7O.js";import"./chunk-OQ4VGCRG.js";import"./chunk-WDEO44UN.js";import"./chunk-5RHYSQZ5.js";import"./chunk-JHMS2WXM.js";import"./chunk-EXJGCNRS.js";import"./chunk-M3ZQDPRS.js";import"./chunk-KCJVFLBB.js";import"./chunk-XQBIHPPX.js";import"./chunk-LO3O45IX.js";import"./chunk-PCNLC5H3.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-DG4TYVPF.js";import"./chunk-7YTHEMWI.js";import"./chunk-L3KS6MOV.js";import"./chunk-R7YEURUQ.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-LHA7RQBA.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-H7IWJN7L.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as createStandaloneExperimentTurnOwner};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import{a as r}from"./chunk-KCJVFLBB.js";import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import{A as t,z as s}from"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as n}from"./chunk-FTQLQJQV.js";var d=class extends r{static{n(this,"SqliteContinualBenchReviewStore")}async saveContinualLearningDailyBatch(i){let e=s.parse(i),a=await this.getContinualLearningDailyBatch(e.id);if(a&&(a.seriesId!==e.seriesId||a.scheduleEntryId!==e.scheduleEntryId||a.dayOrdinal!==e.dayOrdinal||JSON.stringify(a.sourceTaskset)!==JSON.stringify(e.sourceTaskset)||e.revision!==a.revision+1)){if(JSON.stringify(a)===JSON.stringify(e))return a;throw new Error("A daily learning batch update must preserve its intake identity and use the next revision.")}return await this.upsertPayload(`INSERT INTO continual_learning_daily_batches
|
|
3
3
|
(id, series_id, schedule_entry_id, day_ordinal, status, revision, payload, created_at, updated_at)
|
|
4
4
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
5
5
|
ON CONFLICT(id) DO UPDATE SET status = excluded.status, revision = excluded.revision, payload = excluded.payload, updated_at = excluded.updated_at`,[e.id,e.seriesId,e.scheduleEntryId,e.dayOrdinal,e.status,e.revision,JSON.stringify(e),e.createdAt,e.updatedAt]),e}async getContinualLearningDailyBatch(i){return this.getParsedPayload("SELECT payload FROM continual_learning_daily_batches WHERE id = ?",[i],s.parse)}async listContinualLearningDailyBatches(i={}){return i.seriesId?this.listParsedPayloads("SELECT payload FROM continual_learning_daily_batches WHERE series_id = ? ORDER BY day_ordinal ASC",[i.seriesId],s.parse):this.listParsedPayloads("SELECT payload FROM continual_learning_daily_batches ORDER BY series_id, day_ordinal ASC",[],s.parse)}async saveContinualBenchIssueReview(i){let e=t.parse(i),a=await this.getContinualBenchIssueReview(e.id);if(a&&(a.seriesId!==e.seriesId||a.passLabel!==e.passLabel||a.packet.contentHash!==e.packet.contentHash||e.revision!==a.revision+1)){if(JSON.stringify(a)===JSON.stringify(e))return a;throw new Error("A Continual Support review update must preserve its sealed packet and use the next revision.")}return await this.upsertPayload(`INSERT INTO continual_bench_issue_reviews (id, series_id, pass_label, status, revision, payload, created_at, updated_at)
|
|
@@ -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 o}from"./chunk-
|
|
2
|
+
import{a as s,b as o}from"./chunk-3CWRTKHY.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-DDMZSZFL.js";import"./chunk-WGX7WY4N.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var T=class extends u{static{l(this,"SqliteConversationServingStore")}conversationTables=null;async ensureConversationTables(){if(await this.ready,!this.conversationTables){let e=this.writeQueue.then(async()=>{await this.exec("CREATE TABLE IF NOT EXISTS conversation_serving_grants (id TEXT PRIMARY KEY, revision INTEGER NOT NULL, payload TEXT NOT NULL)"),await this.exec("CREATE TABLE IF NOT EXISTS conversation_serving_executions (id TEXT PRIMARY KEY, grant_id TEXT NOT NULL, revision INTEGER NOT NULL, payload TEXT NOT NULL)")});this.writeQueue=e.catch(()=>{}),this.conversationTables=e}await this.conversationTables}async listConversationServingGrants(){return await this.ensureConversationTables(),await this.writeQueue,(await this.all("SELECT payload FROM conversation_serving_grants ORDER BY id",[])).map(e=>s.parse(JSON.parse(e.payload)))}async listConversationServingExecutions(e){return await this.ensureConversationTables(),await this.writeQueue,(await this.all("SELECT payload FROM conversation_serving_executions WHERE grant_id = ? ORDER BY id",[e])).map(i=>o.parse(JSON.parse(i.payload)))}async saveConversationServingGrant(e,i){let n=s.parse(e);return await this.saveConversationServingRow("conversation_serving_grants",n.id,n.revision,n,i),n}async saveConversationServingExecution(e,i){let n=o.parse(e);return await this.saveConversationServingRow("conversation_serving_executions",n.id,n.revision,n,i,n.grantId),n}async saveConversationServingRow(e,i,n,t,v,c){if(n!==v+1)throw new Error("Conversation serving revision is invalid.");await this.ensureConversationTables();let d=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{let r=await this.get(`SELECT revision, payload FROM ${e} WHERE id = ?`,[i]);if((r?.revision??0)!==v)throw new Error("Conversation serving authority changed.");if(r){let a=JSON.parse(r.payload),g=t;if((e==="conversation_serving_grants"?["id","ownerInstanceId","teamId","profileId","projectId","hostedModelId","role","roleTargetId"]:["id","grantId","jobId","artifactHash","priorBindingId","leaseId","canarySeconds","createdAt"]).some(E=>a[E]!==g[E]))throw new Error("The retained serving identity cannot be replaced.")}if(e==="conversation_serving_grants"){let a=s.parse(t);if(a.enabled&&await this.get("SELECT id FROM conversation_serving_grants WHERE id != ? AND json_extract(payload, '$.enabled') = 1 AND json_extract(payload, '$.profileId') = ? AND json_extract(payload, '$.role') = ? AND json_extract(payload, '$.roleTargetId') = ? LIMIT 1",[i,a.profileId,a.role,a.roleTargetId]))throw new Error("This native serving target already has an enabled owner grant. Revoke it before registering another.")}r?await this.run(`UPDATE ${e} SET revision = ?, payload = ? WHERE id = ?`,[n,JSON.stringify(t),i]):c?await this.run(`INSERT INTO ${e} (id, grant_id, revision, payload) VALUES (?, ?, ?, ?)`,[i,c,n,JSON.stringify(t)]):await this.run(`INSERT INTO ${e} (id, revision, payload) VALUES (?, ?, ?)`,[i,n,JSON.stringify(t)]),await this.exec("COMMIT")}catch(r){throw await this.exec("ROLLBACK").catch(()=>{}),r}});this.writeQueue=d.catch(()=>{}),await d}};export{T as SqliteConversationServingStore};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import{a as c}from"./chunk-KCJVFLBB.js";import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import{h as d}from"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as p}from"./chunk-FTQLQJQV.js";var l=class extends c{static{p(this,"SqliteCreateImproveStore")}async getCreateImproveRun(e){await this.ready,await this.writeQueue;let t=await this.get("SELECT payload FROM create_improve_runs WHERE id = ?",[e]);return t?d.parse(JSON.parse(t.payload)):null}async listCreateImproveRuns(e={}){await this.ready,await this.writeQueue;let t=[],a=[];e.profileId&&(t.push("profile_id = ?"),a.push(e.profileId)),e.conversationId&&(t.push("conversation_id = ?"),a.push(e.conversationId)),e.targetKind&&(t.push("target_kind = ?"),a.push(e.targetKind)),e.targetId&&(t.push("target_id = ?"),a.push(e.targetId));let o=Array.isArray(e.state)?e.state:e.state?[e.state]:[];o.length>0&&(t.push(`state IN (${o.map(()=>"?").join(", ")})`),a.push(...o));let s=Math.max(1,Math.min(1e3,Math.trunc(e.limit??250)));return a.push(s),(await this.all(`SELECT payload
|
|
3
3
|
FROM create_improve_runs
|
|
4
4
|
${t.length>0?`WHERE ${t.join(" AND ")}`:""}
|
|
5
5
|
ORDER BY updated_at DESC
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{a as l}from"./chunk-KCJVFLBB.js";import{d as u}from"./chunk-FSQWAANK.js";import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import{d as i}from"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import{o as r,w as o}from"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as n}from"./chunk-FTQLQJQV.js";var c=class extends l{static{n(this,"SqliteDatasetStore")}async listDatasetCatalogTasksets(e){return await this.ready,await this.writeQueue,(await this.all(`SELECT
|
|
3
3
|
id AS taskset_id,
|
|
4
4
|
CAST(json_extract(payload, '$.revision') AS INTEGER) AS taskset_revision,
|
|
5
5
|
json_extract(payload, '$.datasetArtifact.id') AS artifact_id,
|
|
@@ -43,7 +43,7 @@ import{d as l}from"./chunk-KG325WTN.js";import"./chunk-QL4OIPEZ.js";import"./chu
|
|
|
43
43
|
updated_at
|
|
44
44
|
FROM tasksets
|
|
45
45
|
WHERE profile_id = ?
|
|
46
|
-
ORDER BY updated_at DESC`,[e])).map(a=>({tasksetId:a.taskset_id,tasksetRevision:a.taskset_revision,artifactId:a.artifact_id,name:a.name,status:a.status,storageKind:a.storage_kind,rowCount:a.row_count,splitCounts:{train:a.train_count,validation:a.validation_count,test:a.test_count,frozen_eval:a.frozen_eval_count},createdAt:a.created_at,updatedAt:a.updated_at}))}async listExternalDatasetSources(e){return await this.ready,await this.writeQueue,(await this.all("SELECT payload FROM training_sources WHERE profile_id = ? AND source_kind <> 'conversation' ORDER BY updated_at DESC",[e])).map(a=>o.parse(JSON.parse(a.payload)))}async getExternalDatasetSource(e){await this.ready,await this.writeQueue;let t=await this.get("SELECT payload FROM training_sources WHERE id = ? AND source_kind <> 'conversation'",[e]);return t?o.parse(JSON.parse(t.payload)):null}async upsertExternalDatasetSource(e){let t=o.parse(e);await this.ready;let a=
|
|
46
|
+
ORDER BY updated_at DESC`,[e])).map(a=>({tasksetId:a.taskset_id,tasksetRevision:a.taskset_revision,artifactId:a.artifact_id,name:a.name,status:a.status,storageKind:a.storage_kind,rowCount:a.row_count,splitCounts:{train:a.train_count,validation:a.validation_count,test:a.test_count,frozen_eval:a.frozen_eval_count},createdAt:a.created_at,updatedAt:a.updated_at}))}async listExternalDatasetSources(e){return await this.ready,await this.writeQueue,(await this.all("SELECT payload FROM training_sources WHERE profile_id = ? AND source_kind <> 'conversation' ORDER BY updated_at DESC",[e])).map(a=>o.parse(JSON.parse(a.payload)))}async getExternalDatasetSource(e){await this.ready,await this.writeQueue;let t=await this.get("SELECT payload FROM training_sources WHERE id = ? AND source_kind <> 'conversation'",[e]);return t?o.parse(JSON.parse(t.payload)):null}async upsertExternalDatasetSource(e){let t=o.parse(e);await this.ready;let a=u(),s=t.kind==="huggingface"?t.repositoryId:null,p=t.kind==="huggingface"?t.revision:null,d=this.writeQueue.then(()=>this.run(`INSERT INTO training_sources (
|
|
47
47
|
id, profile_id, source_kind, session_id, source_hash,
|
|
48
48
|
repository_id, revision, payload, created_at, updated_at
|
|
49
49
|
)
|
package/dist/chunks/{store-evaluation-results-ZO6R653G.js → store-evaluation-results-OBM4623U.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-O3VP46SE.js";import{a as k}from"./chunk-KCJVFLBB.js";import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import{o as f}from"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import{Hb as E,Ib as O,O as v,Ob as h,Pb as C,Q as y,f as R,h as p,m as H}from"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import{H as P,N as _}from"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import{m as s,n as c}from"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as g}from"./chunk-FTQLQJQV.js";var w=class extends k{static{g(this,"SqliteEvaluationResultStore")}async saveProfileEvaluationGrade(a){let e=P.parse(a);c(e,"Profile evaluation grade");let n=await this.getProfileEvaluationGrade(e.contentHash);return n||(await this.upsertPayload("INSERT INTO profile_evaluation_grades (content_hash, payload) VALUES (?, ?) ON CONFLICT(content_hash) DO NOTHING",[e.contentHash,JSON.stringify(e)]),e)}async getProfileEvaluationGrade(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_grades WHERE content_hash = ?",[a],P.parse)}async saveProfileEvaluationReceipt(a){let e=R.parse(a);H(e);let n=await this.getProfileEvaluationReceipt(e.id);if(n){if(n.contentHash!==e.contentHash)throw new Error(`Profile evaluation receipt ${e.id} is immutable.`);return n}return await this.upsertPayload("INSERT INTO profile_evaluation_receipts (id, run_id, payload) VALUES (?, ?, ?)",[e.id,e.runManifest.id,JSON.stringify(e)]),e}async getProfileEvaluationReceipt(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_receipts WHERE id = ?",[a],R.parse)}async saveProfileEvaluationRun(a){let e=m.parse(a);c(e,"Profile evaluation run"),c(e.manifest,"Profile evaluation run manifest"),_(e.metric);let n=e.manifest.profileEvaluation;if(!n||n.profileId!==e.profileRef.profileId||e.metric.runManifest.id!==e.manifest.id||e.metric.runManifest.contentHash!==e.manifest.contentHash||s(e.receiptRefs)!==s(e.metric.receiptRefs))throw new Error("Profile evaluation run differs from its manifest or metric receipts.");if(e.receiptRefs.length!==e.manifest.population.length||e.gradeRefs.length!==e.receiptRefs.length)throw new Error("Profile evaluation run has an incomplete receipt or grade population.");for(let[t,u]of e.manifest.population.entries()){let d=e.receiptRefs[t],r=await this.getProfileEvaluationReceipt(d.id);if(!r||r.contentHash!==d.contentHash||r.runManifest.id!==e.manifest.id||r.runManifest.contentHash!==e.manifest.contentHash||r.id!==u.receiptId||r.taskId!==u.taskId||r.seed!==u.seed)throw new Error("Profile evaluation run references a missing or mismatched receipt.");let l=e.gradeRefs[t],o=await this.getProfileEvaluationGrade(l.contentHash);if(!o||o.contentHash!==l.contentHash||!r.graderEvidenceRefs.some(S=>S.id===l.id&&S.contentHash===l.contentHash))throw new Error("Profile evaluation run references a missing or mismatched grade.")}let i=await this.getProfileEvaluationRun(e.manifest.id);if(i){if(i.contentHash!==e.contentHash)throw new Error(`Profile evaluation run ${e.manifest.id} is immutable.`);return i}return await this.upsertPayload("INSERT INTO profile_evaluation_runs (id, profile_key, taskset_id, payload, created_at) VALUES (?, ?, ?, ?, ?)",[e.manifest.id,s(e.profileRef),e.manifest.tasksetRelease.id,JSON.stringify(e),e.completedAt]),e}async getProfileEvaluationRun(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_runs WHERE id = ?",[a],m.parse)}async listProfileEvaluationRuns(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_runs WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],m.parse)}async saveProfileEvaluationComparison(a,e){let n=f.parse(a),i=E.parse(e);c(i,"Profile evaluation comparison");let t=[];for(let d of i.members){let r=await this.getProfileEvaluationRun(d.runManifest.id);if(!r||s(r.profileRef)!==s(n)||r.manifest.contentHash!==d.runManifest.contentHash||r.metric.contentHash!==d.metricResultHash)throw new Error("Profile evaluation comparison references a missing or mismatched run.");t.push({manifest:r.manifest,result:r.metric})}if(O({id:i.id,members:t,createdAt:i.createdAt}).contentHash!==i.contentHash)throw new Error("Profile evaluation comparison differs from retained run evidence.");let u=await this.getProfileEvaluationComparison(i.id);if(u){if(u.contentHash!==i.contentHash)throw new Error(`Profile evaluation comparison ${i.id} is immutable.`);return u}return await this.upsertPayload("INSERT INTO profile_evaluation_comparisons (id, profile_key, payload, created_at) VALUES (?, ?, ?, ?)",[i.id,s(n),JSON.stringify(i),i.createdAt]),i}async getProfileEvaluationComparison(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_comparisons WHERE id = ?",[a],E.parse)}async listProfileEvaluationComparisons(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_comparisons WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],E.parse)}async saveProfileEvaluationSuiteRun(a,e,n){let i=f.parse(a),t=h.parse(n);c(t,"Profile evaluation suite run");let u=[];for(let l of t.members){let o=await this.getProfileEvaluationRun(l.runManifest.id);if(!o||s(o.profileRef)!==s(i)||o.manifest.contentHash!==l.runManifest.contentHash||o.contentHash!==l.runHash||o.passed!==l.passed||o.metric.value!==l.score)throw new Error("Profile evaluation suite references a missing or mismatched run.");u.push({definitionId:l.definitionId,manifest:o.manifest,runHash:o.contentHash,passed:o.passed,score:o.metric.value})}if(C({id:t.id,suiteId:t.suiteId,catalog:e,members:u,createdAt:t.createdAt,completedAt:t.completedAt}).contentHash!==t.contentHash)throw new Error("Profile evaluation suite differs from retained run evidence.");let r=await this.getProfileEvaluationSuiteRun(t.id);if(r){if(r.contentHash!==t.contentHash)throw new Error(`Profile evaluation suite run ${t.id} is immutable.`);return r}return await this.upsertPayload("INSERT INTO profile_evaluation_suite_runs (id, profile_key, payload, created_at) VALUES (?, ?, ?, ?)",[t.id,s(i),JSON.stringify(t),t.createdAt]),t}async getProfileEvaluationSuiteRun(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_suite_runs WHERE id = ?",[a],h.parse)}async listProfileEvaluationSuiteRuns(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_suite_runs WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],h.parse)}async saveBenchmarkRun(a){let e=v.parse(a.run);return c(e,"Benchmark run"),await this.upsertPayload(`INSERT INTO benchmark_runs (id, taskset_id, phase, payload, created_at)
|
|
3
3
|
VALUES (?, ?, ?, ?, ?)
|
|
4
4
|
ON CONFLICT(id) DO NOTHING`,[e.id,a.tasksetId,e.phase,JSON.stringify(e),e.createdAt]),e}async listBenchmarkRuns(a){return this.listParsedPayloads("SELECT payload FROM benchmark_runs WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",[a],v.parse)}async saveBenchmarkComparison(a){let e=y.parse(a.comparison);return c(e,"Benchmark comparison"),await this.upsertPayload(`INSERT INTO benchmark_comparisons (id, taskset_id, payload, created_at)
|
|
5
5
|
VALUES (?, ?, ?, ?)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-KCJVFLBB.js";import{m as n}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-KCJVFLBB.js";import{m as n}from"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as d}from"./chunk-FTQLQJQV.js";var w=class extends m{static{d(this,"SqliteHarnessMemoryStore")}async listHarnessMemories(e,s={}){await this.ready,await this.writeQueue;let a=(await this.all(`SELECT revisions.payload
|
|
3
3
|
FROM harness_memory_revisions revisions
|
|
4
4
|
INNER JOIN (
|
|
5
5
|
SELECT key, MAX(revision) AS revision
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as w}from"./chunk-KCJVFLBB.js";import{a as i,b as h,c as o}from"./chunk-
|
|
2
|
+
import{a as w}from"./chunk-KCJVFLBB.js";import{a as i,b as h,c as o}from"./chunk-QGOPYQW3.js";import{a as p}from"./chunk-DG4TYVPF.js";import"./chunk-Y54RKLOI.js";import"./chunk-BK63OQRW.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";var f=class extends w{static{c(this,"SqliteHarnessRefinementCandidateStore")}async listHarnessRefinementCandidates(t,e){return await this.ready,await this.writeQueue,(e?await this.all(`SELECT payload FROM harness_refinement_candidates
|
|
3
3
|
WHERE workspace_id = ? AND status = ?
|
|
4
4
|
ORDER BY updated_at DESC, candidate_id ASC`,[t,e]):await this.all(`SELECT payload FROM harness_refinement_candidates
|
|
5
5
|
WHERE workspace_id = ? ORDER BY updated_at DESC, candidate_id ASC`,[t])).map(s=>i.parse(JSON.parse(s.payload)))}async getHarnessRefinementCandidateByFingerprint(t,e){await this.ready,await this.writeQueue;let a=await this.get(`SELECT payload FROM harness_refinement_candidates
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b}from"./chunk-EXJGCNRS.js";import{a}from"./chunk-M3ZQDPRS.js";import"./chunk-KCJVFLBB.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-DG4TYVPF.js";import"./chunk-Y54RKLOI.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as LocalHarnessReleaseRecordSchema,b as SqliteHarnessWorkspaceStore};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as h,b as d,c as p,h as N}from"./chunk-
|
|
2
|
+
import{a as h,b as d,c as p,h as N}from"./chunk-Y3GIM6WK.js";import"./chunk-WHREO7A2.js";import"./chunk-OWK7HU5I.js";import"./chunk-V2HMWCT6.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{a as T}from"./chunk-KCJVFLBB.js";import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import{_ as u,h as I}from"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import{m as l}from"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";function L(o,e){let i=d(o,e.scope,e.executionId);if(i.ownerActorId!==e.actorId||!i.completedAt)throw new Error("human_local_publication_source_denied");return o.exec("CREATE TABLE IF NOT EXISTS human_local_publications(scope TEXT NOT NULL,actor_id TEXT NOT NULL,execution_id TEXT NOT NULL,operation_id TEXT NOT NULL,execution_hash TEXT NOT NULL,publication TEXT NOT NULL,PRIMARY KEY(scope,actor_id,execution_id,operation_id))"),i}c(L,"setup");function w(o,e){if(L(o,e).executionHash!==e.executionHash)throw new Error("human_local_publication_source_changed");let t=o.get("SELECT publication,execution_hash FROM human_local_publications WHERE scope=? AND actor_id=? AND execution_id=? AND operation_id=?",[e.scope,e.actorId,e.executionId,e.operationId]);if(t){if(t.execution_hash!==e.executionHash||l(JSON.parse(t.publication))!==l(e.publication))throw new Error("human_local_publication_operation_conflict");return}o.run("INSERT INTO human_local_publications VALUES(?,?,?,?,?,?)",[e.scope,e.actorId,e.executionId,e.operationId,e.executionHash,JSON.stringify(e.publication)])}c(w,"retainHumanLocalPublication");function O(o,e){let i=L(o,e);return o.all("SELECT publication,execution_hash FROM human_local_publications WHERE scope=? AND actor_id=? AND execution_id=? ORDER BY operation_id LIMIT 1001",[e.scope,e.actorId,e.executionId]).map(t=>{if(t.execution_hash!==i.executionHash)throw new Error("human_local_publication_source_changed");return JSON.parse(t.publication)})}c(O,"readHumanLocalPublications");function _(o,e){let i=d(o,e.teamId,e.executionId);if(i.ownerActorId!==e.actorId)throw new Error("live_agent_account_denied");let t=o.get("SELECT owner_id FROM local_experiment_executions WHERE team_id=? AND id=?",[e.teamId,e.executionId]),n=p(o,e.teamId,e.executionId).find(g=>g.receiptId===e.receiptId);if(!n||n.admission.request.model.providerId!=="claude-code")throw new Error("live_agent_case_denied");let a=o.get("SELECT payload FROM local_experiment_events WHERE team_id=? AND execution_id=? AND case_id=? AND type='external.start' ORDER BY sequence LIMIT 1",[e.teamId,e.executionId,e.receiptId]);if(!a||JSON.parse(a.payload).sessionId!==e.sessionId)throw new Error("live_agent_session_stale");o.exec("CREATE TABLE IF NOT EXISTS human_live_controls(team_id TEXT NOT NULL,actor_id TEXT NOT NULL,operation_id TEXT NOT NULL,request_hash TEXT NOT NULL,state TEXT NOT NULL,PRIMARY KEY(team_id,actor_id,operation_id))");let{phase:r,ownerId:R,...E}=e,m=l(E),s=o.get("SELECT request_hash,state FROM human_live_controls WHERE team_id=? AND actor_id=? AND operation_id=?",[e.teamId,e.actorId,e.operationId]);if(s&&s.request_hash!==m)throw new Error("live_agent_operation_conflict");if(e.phase==="inspect")return s?{replay:!0,state:s.state}:null;if(N(o,e.ownerId),t?.owner_id!==e.ownerId)throw new Error("live_agent_execution_lease_lost");if(e.phase==="acknowledge"){if(!s)throw new Error("live_agent_operation_missing");return s.state==="acknowledged"?{replay:!0,state:"acknowledged"}:(v(o,e,"external.control_receipt",{sessionId:e.sessionId,operationId:e.operationId,action:e.action,transport:"process_stdin",state:"acknowledged",occurredAt:new Date().toISOString()}),o.run("UPDATE human_live_controls SET state='acknowledged' WHERE team_id=? AND actor_id=? AND operation_id=?",[e.teamId,e.actorId,e.operationId]),{replay:!1,state:"acknowledged"})}if(s)return{replay:!0,state:s.state};if(o.get("SELECT c.operation_id FROM human_live_controls c JOIN local_experiment_events e ON e.team_id=c.team_id AND json_extract(e.payload,'$.actorId')=c.actor_id AND json_extract(e.payload,'$.operationId')=c.operation_id WHERE c.team_id=? AND c.actor_id=? AND c.state='prepared' AND e.execution_id=? AND e.case_id=? AND e.type='external.human_intervention' LIMIT 1",[e.teamId,e.actorId,e.executionId,e.receiptId]))throw new Error("live_agent_prior_delivery_unknown");if(n.status!=="running"||i.completedAt)throw new Error("live_agent_already_sealed");return o.run("INSERT INTO human_live_controls VALUES(?,?,?,?,'prepared')",[e.teamId,e.actorId,e.operationId,m]),v(o,e,"external.human_intervention",{...E,occurredAt:new Date().toISOString()}),{replay:!1,state:"prepared"}}c(_,"writeHumanLiveControl");function v(o,e,i,t){let n=JSON.stringify(t),a=Buffer.byteLength(n),r=o.get("SELECT event_count,byte_count FROM local_experiment_trace_budgets WHERE team_id=? AND execution_id=?",[e.teamId,e.executionId]);if(a>1048576||(r?.event_count??0)>=2e4||(r?.byte_count??0)+a>67108864)throw new Error("live_agent_control_too_large");o.run("INSERT INTO local_experiment_events(team_id,execution_id,case_id,type,payload) VALUES(?,?,?,?,?)",[e.teamId,e.executionId,e.receiptId,i,n]),o.run("INSERT INTO local_experiment_trace_budgets(team_id,execution_id,event_count,byte_count) VALUES(?,?,1,?) ON CONFLICT(team_id,execution_id) DO UPDATE SET event_count=event_count+1,byte_count=byte_count+excluded.byte_count",[e.teamId,e.executionId,a])}c(v,"appendControlEvent");var y=`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS human_review_revisions(scope TEXT NOT NULL,id TEXT NOT NULL,revision INTEGER NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id,revision));
|
|
4
4
|
CREATE TABLE IF NOT EXISTS human_reviews(scope TEXT NOT NULL,id TEXT NOT NULL,revision INTEGER NOT NULL,project_id TEXT NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id));
|
|
5
5
|
CREATE INDEX IF NOT EXISTS human_reviews_project_idx ON human_reviews(scope,project_id,id);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import{B as d}from"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as s}from"./chunk-FTQLQJQV.js";function f(e){if(Array.isArray(e)){let r=!1,n=e.map(c=>{let t=f(c);return r||=t.changed,t.value});return{value:r?n:e,changed:r}}if(!u(e))return{value:e,changed:!1};let o=!1,i={};for(let[r,n]of Object.entries(e)){if(r==="learnedPreference"&&n!==null){let t=u(n)?Object.fromEntries(Object.entries(n).filter(([l])=>l!=="qualificationKind")):n,a=d.safeParse(t);i[r]=a.success?a.data:null,o||=!a.success||t!==n;continue}let c=f(n);i[r]=c.value,o||=c.changed}return{value:o?i:e,changed:o}}s(f,"sanitizeUnverifiableLearnedPreferenceBindings");function u(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}s(u,"isRecord");export{f as sanitizeUnverifiableLearnedPreferenceBindings};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a,b,c}from"./chunk-DGIEXZJV.js";import"./chunk-KCJVFLBB.js";import"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as SqliteLearningStore,b as createLearningTransaction,c as putLearningResourceInTransaction};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-TEPRCBDV.js";import{a as s}from"./chunk-ZTVXRZ6D.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-SPDSSMFD.js";import"./chunk-PR5TYTY4.js";import"./chunk-SFNCAPCJ.js";import{h as c}from"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var p=class extends u{static{l(this,"SqliteLearningCredentialStore")}async credentialTransaction(t){await this.ready;let n=this.writeQueue.then(()=>{let e=this.database;e.exec("BEGIN IMMEDIATE");try{let r=t(e);return e.exec("COMMIT"),r}catch(r){throw e.exec("ROLLBACK"),r}});return this.writeQueue=n.then(()=>{},()=>{}),n}async createLearningSourceCredential(t,n,e){let r=s.parse(t);return this.credentialTransaction(a=>{let i=a.get("SELECT payload, request_hash FROM learning_source_credentials WHERE id = ?",[r.id]);if(i){if(i.request_hash!==e)throw new c("learning_credential_operation_conflict",409);return s.parse(JSON.parse(i.payload))}if(a.get("SELECT id FROM learning_source_credentials WHERE key_hash = ?",[n]))throw new c("learning_credential_secret_reused",409);return a.run("INSERT INTO learning_source_credentials (id, scope, source_id, key_hash, request_hash, payload) VALUES (?, ?, ?, ?, ?, ?)",[r.id,r.scope,r.sourceId,n,e,JSON.stringify(r)]),r})}async findLearningSourceCredential(t){await this.ready,await this.writeQueue;let n=this.database.get("SELECT payload FROM learning_source_credentials WHERE key_hash = ?",[t]);return n?s.parse(JSON.parse(n.payload)):null}async listLearningSourceCredentials(t,n,e,r){if(!Number.isInteger(e)||e<1||e>100)throw new Error("learning_credential_page_invalid");await this.ready,await this.writeQueue;let a=this.database.all("SELECT payload FROM learning_source_credentials WHERE scope = ? AND source_id = ? AND id > ? ORDER BY id LIMIT ?",[t,n,r??"",e+1]),i=a.slice(0,e).map(o=>s.parse(JSON.parse(o.payload)));return{items:i,nextCursor:a.length>e?i.at(-1).id:null}}async revokeLearningSourceCredential(t,n,e,r){return this.credentialTransaction(a=>{let i=a.get("SELECT payload FROM learning_source_credentials WHERE scope = ? AND source_id = ? AND id = ?",[t,n,e]);if(!i)return null;let o=s.parse(JSON.parse(i.payload));if(o.revokedAt!==null)return o;let d=s.parse({...o,revokedAt:r});return a.run("UPDATE learning_source_credentials SET payload = ? WHERE scope = ? AND source_id = ? AND id = ?",[JSON.stringify(d),t,n,e]),d})}};export{p as SqliteLearningCredentialStore};
|
package/dist/chunks/{store-local-experiments-SAULQSBN.js → store-local-experiments-LULRLTII.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as
|
|
2
|
+
import{a as D,c as j}from"./chunk-XVDFJ3ZF.js";import{a as N,b as E,c as y,d as m,e as w,f as v,g as M,h as x,i as P}from"./chunk-Y3GIM6WK.js";import{a as s}from"./chunk-WHREO7A2.js";import"./chunk-OWK7HU5I.js";import"./chunk-V2HMWCT6.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{a as F}from"./chunk-KCJVFLBB.js";import{bb as f,eb as h,hb as O,ib as W}from"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import{la as L}from"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import{h as R}from"./chunk-SFNCAPCJ.js";import"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import{m as d}from"./chunk-BIPQCJ5V.js";import{A as I}from"./chunk-PF56N7ZY.js";import{a as u}from"./chunk-FTQLQJQV.js";function J(c,e){let t=c.all(`SELECT e.id,e.payload,
|
|
3
3
|
COALESCE(json_extract(c.payload,'$.configuration.request.name'),json_extract(d.payload,'$.configuration.request.name')) AS name,
|
|
4
4
|
count(*) OVER () AS total FROM local_experiment_executions e
|
|
5
5
|
LEFT JOIN local_experiment_configurations c ON c.team_id=e.team_id AND c.execution_id=e.id
|
|
@@ -80,12 +80,12 @@ CREATE TABLE IF NOT EXISTS evaluation_operation_acknowledged_history (
|
|
|
80
80
|
scope_hash TEXT NOT NULL,action TEXT NOT NULL,intent_hash TEXT NOT NULL,
|
|
81
81
|
operation_id TEXT PRIMARY KEY,created_at TEXT NOT NULL,acknowledged_at TEXT NOT NULL,
|
|
82
82
|
payload TEXT,command TEXT,phase TEXT
|
|
83
|
-
);`;function U(c,e){let t=[e.scopeHash,e.action,e.intentHash,e.id];return c.get("SELECT i.operation_id,i.created_at,i.acknowledged_at,p.payload,p.command,p.phase FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.intent_hash=? AND i.operation_id=?",t)??c.get("SELECT operation_id,created_at,acknowledged_at,payload,command,phase FROM evaluation_operation_acknowledged_history WHERE scope_hash=? AND action=? AND intent_hash=? AND operation_id=?",t)}u(U,"retainedRow");function G(c,e,t){c.run("INSERT OR IGNORE INTO evaluation_operation_acknowledged_history(scope_hash,action,intent_hash,operation_id,created_at,acknowledged_at,payload,command,phase) SELECT i.scope_hash,i.action,i.intent_hash,i.operation_id,i.created_at,i.acknowledged_at,p.payload,p.command,p.phase FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.intent_hash=? AND i.operation_id=? AND i.acknowledged_at IS NOT NULL",[e.scopeHash,e.action,e.intentHash,t])}u(G,"archiveAcknowledged");function K(c){let e=JSON.stringify(c);if(e===void 0||Buffer.byteLength(e,"utf8")>1048576)throw new Error("Reviewed operation payload exceeds 1 MiB.");return e}u(K,"bounded");function k(c){if(!B.some(e=>e===c))throw new Error("This action does not admit recoverable reviewed payloads.")}u(k,"retainable");function V(c,e){let t=H.parse({scopeHash:e.scopeHash,action:e.action,intentHash:e.intentHash}),i;if(e.reviewedIntent!==void 0){if(k(t.action),d(e.reviewedIntent)!==t.intentHash)throw new Error("Reviewed intent changed its exact hash.");i=K(e.reviewedIntent)}let n=c.get("SELECT operation_id,created_at,acknowledged_at FROM evaluation_operation_intents WHERE scope_hash=? AND action=? AND intent_hash=?",[t.scopeHash,t.action,t.intentHash]);if((!n||n.acknowledged_at)&&B.some(r=>r===t.action)&&c.get("SELECT i.operation_id FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.acknowledged_at IS NULL AND (p.phase='dispatching' OR p.payload IS NULL) LIMIT 1",[t.scopeHash,t.action]))throw new Error("Recover the original uncertain operation before preparing another reviewed intent.");let a=n&&!n.acknowledged_at?n.operation_id:ne(),o=n&&!n.acknowledged_at?n.created_at:new Date().toISOString();if((!n||n.acknowledged_at)&&(n?.acknowledged_at&&G(c,t,n.operation_id),c.run("INSERT INTO evaluation_operation_intents(scope_hash,action,intent_hash,operation_id,created_at) VALUES(?,?,?,?,?) ON CONFLICT(scope_hash,action,intent_hash) DO UPDATE SET operation_id=excluded.operation_id,created_at=excluded.created_at,acknowledged_at=NULL",[t.scopeHash,t.action,t.intentHash,a,o]),c.run("DELETE FROM evaluation_operation_reviewed_payloads WHERE scope_hash=? AND action=? AND intent_hash=?",[t.scopeHash,t.action,t.intentHash])),i!==void 0){let r=c.get("SELECT operation_id,payload FROM evaluation_operation_reviewed_payloads WHERE scope_hash=? AND action=? AND intent_hash=?",[t.scopeHash,t.action,t.intentHash]);if(r&&(r.operation_id!==a||d(JSON.parse(r.payload))!==t.intentHash))throw new Error("The retained reviewed payload belongs to another exact operation.");r||c.run("INSERT INTO evaluation_operation_reviewed_payloads(scope_hash,action,intent_hash,operation_id,payload,phase) VALUES(?,?,?,?,?,'reviewed')",[t.scopeHash,t.action,t.intentHash,a,i])}return{id:a,createdAt:o}}u(V,"prepareEvaluationOperation");function b(c,e){k(e.action);let t=H.parse({scopeHash:e.scopeHash,action:e.action,intentHash:e.intentHash}),i=K(e.command),n=U(c,{...t,id:e.id});if(!n?.payload||d(JSON.parse(n.payload))!==t.intentHash)throw new Error("The reviewed command requires its exact retained operation.");if(n.command&&d(JSON.parse(n.command))!==d(e.command))throw new Error("The reviewed command is immutable.");if(Buffer.byteLength(n.payload,"utf8")+Buffer.byteLength(i,"utf8")>1048576)throw new Error("Reviewed intent and command exceed 1 MiB.");let a=n.phase==="dispatching"?"dispatching":e.phase;if(n.acknowledged_at){if(!n.command||n.phase!=="dispatching")throw new Error("The original reviewed command was discarded before dispatch.");return{retained:!0,phase:n.phase??a}}return c.run("UPDATE evaluation_operation_reviewed_payloads SET command=?,phase=? WHERE scope_hash=? AND action=? AND intent_hash=? AND operation_id=?",[i,a,t.scopeHash,t.action,t.intentHash,e.id]),{retained:!0,phase:a}}u(b,"retainEvaluationOperation");function Q(c,e){k(e.action);let t=C.parse(e.scopeHash),i=I.number().int().min(1).max(100).parse(e.limit??100),n=c.all("SELECT i.operation_id,i.intent_hash,i.created_at,p.payload,p.command,p.phase FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.acknowledged_at IS NULL AND i.operation_id>? ORDER BY i.operation_id LIMIT ?",[t,e.action,e.cursor??"",i]);return{items:n.map(a=>({id:a.operation_id,action:e.action,intentHash:a.intent_hash,createdAt:a.created_at,reviewedIntent:a.payload?JSON.parse(a.payload):null,command:a.command?JSON.parse(a.command):null,phase:a.phase,recoveryReady:!!(a.payload&&a.command)})),nextCursor:n.length===i?n.at(-1).operation_id:null}}u(Q,"pendingEvaluationOperations");function z(c,e){let t=U(c,e);if(!t?.payload||!t.phase)throw new Error("The original reviewed operation payload is unavailable; recover its actual canonical receipt.");let i=JSON.parse(t.payload);if(d(i)!==e.intentHash)throw new Error("Retained reviewed intent hash changed.");return{reviewedIntent:i,command:t.command?JSON.parse(t.command):null,phase:t.phase}}u(z,"readPendingEvaluationOperation");function Z(c,e){let t=H.parse({scopeHash:e.scopeHash,action:e.action,intentHash:e.intentHash}),i=U(c,{...t,id:e.id});if(!i)throw new Error("This acknowledgement does not own the retained operation intent.");if(e.expectedPhase&&i.phase!==e.expectedPhase)throw new Error("The reviewed command crossed dispatch; recover its canonical receipt before acknowledgement.");return i.acknowledged_at?{acknowledged:!0}:(c.run("UPDATE evaluation_operation_intents SET acknowledged_at=COALESCE(acknowledged_at,?) WHERE scope_hash=? AND action=? AND intent_hash=? AND operation_id=?",[new Date().toISOString(),t.scopeHash,t.action,t.intentHash,e.id]),G(c,t,e.id),{acknowledged:!0})}u(Z,"acknowledgeEvaluationOperation");function q(c,e){if(e.kind!=="target")throw new s("local_experiment_not_found","This id names a scoring pass, not an Experiment.",404);let t=c.get("SELECT payload,package_payload FROM local_experiment_configurations WHERE team_id=? AND execution_id=?",[e.teamId,e.id]);if(t){let p=O.parse(JSON.parse(t.payload)),T=L(JSON.parse(t.package_payload));if(p.packageHash!==T.contentHash||p.packageHash!==e.packageHash)throw new s("local_package_pin_conflict","The retained Experiment package differs from its admission.");return{snapshot:p,package:T}}let i=N(c,e.teamId,e.definition.id,e.definition.revision),n=i.definition,a=L(i.package),{contentHash:o,...r}=n;if(d(r)!==o)throw new s("local_configuration_pin_conflict","The retained configuration bytes differ from their sealed hash.");if(n.contentHash!==e.definition.contentHash||n.ownerActorId!==e.ownerActorId||n.teamId!==e.teamId||n.packageHash!==e.packageHash||a.contentHash!==e.packageHash)throw new s("local_configuration_pin_conflict","The retained Experiment configuration differs from its owner or immutable admission.");let _=n.configuration,g={configuration:{operationId:e.operationId,request:{..._.request,operationId:e.operationId},maximumCostUsd:_.maximumCostUsd,..._.graders?{graders:_.graders}:{}},model:n.model,packageHash:n.packageHash,graders:n.graders,availableGraders:n.availableGraders,retainedConfigurationHash:n.contentHash},l=O.parse({...g,configurationHash:d(g)});return X(c,e,l,a),{snapshot:l,package:a}}u(q,"localFlatSnapshot");function X(c,e,t,i){c.run("INSERT INTO local_experiment_configurations(team_id,execution_id,payload,package_payload) VALUES(?,?,?,?)",[e.teamId,e.id,JSON.stringify(t),JSON.stringify(i)])}u(X,"writeLocalFlatSnapshot");function S(c,e,t){let i=E(c,e,t),{snapshot:n}=q(c,i),{definition:a,...o}=i;return F.parse({...o,...n})}u(S,"localFlatRecord");var ee=class extends W{static{u(this,"SqliteLocalExperimentStore")}localTablesReady=!1;async localWrite(e){await this.ready;let t=this.writeQueue.then(()=>{let i=this.database;this.localTablesReady||(i.exec(Y),i.exec($),this.localTablesReady=!0),i.exec("BEGIN IMMEDIATE");try{let n=e(i);return i.exec("COMMIT"),n}catch(n){throw i.exec("ROLLBACK"),n}});return this.writeQueue=t.then(()=>{},()=>{}),t}async prepareEvaluationOperation(e){return this.localWrite(t=>V(t,e))}async retainEvaluationOperation(e){return this.localWrite(t=>b(t,e))}async readPendingEvaluationOperation(e){return this.localWrite(t=>z(t,e))}async pendingEvaluationOperations(e){return this.localWrite(t=>Q(t,e))}async acknowledgeEvaluationOperation(e){return this.localWrite(t=>Z(t,e))}async claimLocalExperimentOwner(e,t=process.pid){return this.localWrite(i=>P(i,e,t))}async renewLocalExperimentOwner(e){return this.localWrite(t=>j(t,e))}async releaseLocalExperimentOwner(e){return this.localWrite(t=>t.run("DELETE FROM local_experiment_owner WHERE singleton=1 AND owner_id=?",[e]))}async saveLocalExperiment(e){let t=f.parse(e.definition);return this.localWrite(i=>w(i,t.teamId,e.operationId,"save",e.intentHash,()=>{let n=i.get("SELECT MAX(revision) AS revision FROM local_experiment_definitions WHERE team_id=? AND id=?",[t.teamId,t.id]);if(n?.revision&&N(i,t.teamId,t.id).definition.ownerActorId!==t.ownerActorId)throw new s("local_resource_denied","This local resource belongs to another account.",404);if((n?.revision??0)!==e.expectedRevision||t.revision!==e.expectedRevision+1)throw new s("local_definition_revision_conflict","The Experiment changed. Reload its saved revision before editing.");return D(i,t,e.package),t}))}async readLocalExperiment(e,t,i){return this.localWrite(n=>N(n,e,t,i))}async recoverLocalExperimentOperation(e,t,i,n){return this.localWrite(a=>{let o=a.get("SELECT kind,intent_hash,receipt FROM local_experiment_operations WHERE team_id=? AND operation_id=?",[e,t]);if(!o)return null;if(o.kind!==i||o.intent_hash!==n)throw new s("local_operation_conflict","This operation already owns different immutable inputs.");return JSON.parse(o.receipt)})}async listLocalExperiments(e){return this.localWrite(t=>{let i=t.all(`SELECT d.payload FROM local_experiment_definitions d WHERE d.team_id=? AND json_extract(d.payload,'$.ownerActorId')=?
|
|
83
|
+
);`;function U(c,e){let t=[e.scopeHash,e.action,e.intentHash,e.id];return c.get("SELECT i.operation_id,i.created_at,i.acknowledged_at,p.payload,p.command,p.phase FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.intent_hash=? AND i.operation_id=?",t)??c.get("SELECT operation_id,created_at,acknowledged_at,payload,command,phase FROM evaluation_operation_acknowledged_history WHERE scope_hash=? AND action=? AND intent_hash=? AND operation_id=?",t)}u(U,"retainedRow");function G(c,e,t){c.run("INSERT OR IGNORE INTO evaluation_operation_acknowledged_history(scope_hash,action,intent_hash,operation_id,created_at,acknowledged_at,payload,command,phase) SELECT i.scope_hash,i.action,i.intent_hash,i.operation_id,i.created_at,i.acknowledged_at,p.payload,p.command,p.phase FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.intent_hash=? AND i.operation_id=? AND i.acknowledged_at IS NOT NULL",[e.scopeHash,e.action,e.intentHash,t])}u(G,"archiveAcknowledged");function K(c){let e=JSON.stringify(c);if(e===void 0||Buffer.byteLength(e,"utf8")>1048576)throw new Error("Reviewed operation payload exceeds 1 MiB.");return e}u(K,"bounded");function k(c){if(!B.some(e=>e===c))throw new Error("This action does not admit recoverable reviewed payloads.")}u(k,"retainable");function V(c,e){let t=H.parse({scopeHash:e.scopeHash,action:e.action,intentHash:e.intentHash}),i;if(e.reviewedIntent!==void 0){if(k(t.action),d(e.reviewedIntent)!==t.intentHash)throw new Error("Reviewed intent changed its exact hash.");i=K(e.reviewedIntent)}let n=c.get("SELECT operation_id,created_at,acknowledged_at FROM evaluation_operation_intents WHERE scope_hash=? AND action=? AND intent_hash=?",[t.scopeHash,t.action,t.intentHash]);if((!n||n.acknowledged_at)&&B.some(r=>r===t.action)&&c.get("SELECT i.operation_id FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.acknowledged_at IS NULL AND (p.phase='dispatching' OR p.payload IS NULL) LIMIT 1",[t.scopeHash,t.action]))throw new Error("Recover the original uncertain operation before preparing another reviewed intent.");let a=n&&!n.acknowledged_at?n.operation_id:ne(),o=n&&!n.acknowledged_at?n.created_at:new Date().toISOString();if((!n||n.acknowledged_at)&&(n?.acknowledged_at&&G(c,t,n.operation_id),c.run("INSERT INTO evaluation_operation_intents(scope_hash,action,intent_hash,operation_id,created_at) VALUES(?,?,?,?,?) ON CONFLICT(scope_hash,action,intent_hash) DO UPDATE SET operation_id=excluded.operation_id,created_at=excluded.created_at,acknowledged_at=NULL",[t.scopeHash,t.action,t.intentHash,a,o]),c.run("DELETE FROM evaluation_operation_reviewed_payloads WHERE scope_hash=? AND action=? AND intent_hash=?",[t.scopeHash,t.action,t.intentHash])),i!==void 0){let r=c.get("SELECT operation_id,payload FROM evaluation_operation_reviewed_payloads WHERE scope_hash=? AND action=? AND intent_hash=?",[t.scopeHash,t.action,t.intentHash]);if(r&&(r.operation_id!==a||d(JSON.parse(r.payload))!==t.intentHash))throw new Error("The retained reviewed payload belongs to another exact operation.");r||c.run("INSERT INTO evaluation_operation_reviewed_payloads(scope_hash,action,intent_hash,operation_id,payload,phase) VALUES(?,?,?,?,?,'reviewed')",[t.scopeHash,t.action,t.intentHash,a,i])}return{id:a,createdAt:o}}u(V,"prepareEvaluationOperation");function b(c,e){k(e.action);let t=H.parse({scopeHash:e.scopeHash,action:e.action,intentHash:e.intentHash}),i=K(e.command),n=U(c,{...t,id:e.id});if(!n?.payload||d(JSON.parse(n.payload))!==t.intentHash)throw new Error("The reviewed command requires its exact retained operation.");if(n.command&&d(JSON.parse(n.command))!==d(e.command))throw new Error("The reviewed command is immutable.");if(Buffer.byteLength(n.payload,"utf8")+Buffer.byteLength(i,"utf8")>1048576)throw new Error("Reviewed intent and command exceed 1 MiB.");let a=n.phase==="dispatching"?"dispatching":e.phase;if(n.acknowledged_at){if(!n.command||n.phase!=="dispatching")throw new Error("The original reviewed command was discarded before dispatch.");return{retained:!0,phase:n.phase??a}}return c.run("UPDATE evaluation_operation_reviewed_payloads SET command=?,phase=? WHERE scope_hash=? AND action=? AND intent_hash=? AND operation_id=?",[i,a,t.scopeHash,t.action,t.intentHash,e.id]),{retained:!0,phase:a}}u(b,"retainEvaluationOperation");function Q(c,e){k(e.action);let t=C.parse(e.scopeHash),i=I.number().int().min(1).max(100).parse(e.limit??100),n=c.all("SELECT i.operation_id,i.intent_hash,i.created_at,p.payload,p.command,p.phase FROM evaluation_operation_intents i LEFT JOIN evaluation_operation_reviewed_payloads p USING(scope_hash,action,intent_hash,operation_id) WHERE i.scope_hash=? AND i.action=? AND i.acknowledged_at IS NULL AND i.operation_id>? ORDER BY i.operation_id LIMIT ?",[t,e.action,e.cursor??"",i]);return{items:n.map(a=>({id:a.operation_id,action:e.action,intentHash:a.intent_hash,createdAt:a.created_at,reviewedIntent:a.payload?JSON.parse(a.payload):null,command:a.command?JSON.parse(a.command):null,phase:a.phase,recoveryReady:!!(a.payload&&a.command)})),nextCursor:n.length===i?n.at(-1).operation_id:null}}u(Q,"pendingEvaluationOperations");function z(c,e){let t=U(c,e);if(!t?.payload||!t.phase)throw new Error("The original reviewed operation payload is unavailable; recover its actual canonical receipt.");let i=JSON.parse(t.payload);if(d(i)!==e.intentHash)throw new Error("Retained reviewed intent hash changed.");return{reviewedIntent:i,command:t.command?JSON.parse(t.command):null,phase:t.phase}}u(z,"readPendingEvaluationOperation");function Z(c,e){let t=H.parse({scopeHash:e.scopeHash,action:e.action,intentHash:e.intentHash}),i=U(c,{...t,id:e.id});if(!i)throw new Error("This acknowledgement does not own the retained operation intent.");if(e.expectedPhase&&i.phase!==e.expectedPhase)throw new Error("The reviewed command crossed dispatch; recover its canonical receipt before acknowledgement.");return i.acknowledged_at?{acknowledged:!0}:(c.run("UPDATE evaluation_operation_intents SET acknowledged_at=COALESCE(acknowledged_at,?) WHERE scope_hash=? AND action=? AND intent_hash=? AND operation_id=?",[new Date().toISOString(),t.scopeHash,t.action,t.intentHash,e.id]),G(c,t,e.id),{acknowledged:!0})}u(Z,"acknowledgeEvaluationOperation");function q(c,e){if(e.kind!=="target")throw new s("local_experiment_not_found","This id names a scoring pass, not an Experiment.",404);let t=c.get("SELECT payload,package_payload FROM local_experiment_configurations WHERE team_id=? AND execution_id=?",[e.teamId,e.id]);if(t){let p=O.parse(JSON.parse(t.payload)),T=L(JSON.parse(t.package_payload));if(p.packageHash!==T.contentHash||p.packageHash!==e.packageHash)throw new s("local_package_pin_conflict","The retained Experiment package differs from its admission.");return{snapshot:p,package:T}}let i=N(c,e.teamId,e.definition.id,e.definition.revision),n=i.definition,a=L(i.package),{contentHash:o,...r}=n;if(d(r)!==o)throw new s("local_configuration_pin_conflict","The retained configuration bytes differ from their sealed hash.");if(n.contentHash!==e.definition.contentHash||n.ownerActorId!==e.ownerActorId||n.teamId!==e.teamId||n.packageHash!==e.packageHash||a.contentHash!==e.packageHash)throw new s("local_configuration_pin_conflict","The retained Experiment configuration differs from its owner or immutable admission.");let _=n.configuration,g={configuration:{operationId:e.operationId,request:{..._.request,operationId:e.operationId},maximumCostUsd:_.maximumCostUsd,..._.graders?{graders:_.graders}:{}},model:n.model,packageHash:n.packageHash,graders:n.graders,availableGraders:n.availableGraders,retainedConfigurationHash:n.contentHash},l=O.parse({...g,configurationHash:d(g)});return X(c,e,l,a),{snapshot:l,package:a}}u(q,"localFlatSnapshot");function X(c,e,t,i){c.run("INSERT INTO local_experiment_configurations(team_id,execution_id,payload,package_payload) VALUES(?,?,?,?)",[e.teamId,e.id,JSON.stringify(t),JSON.stringify(i)])}u(X,"writeLocalFlatSnapshot");function S(c,e,t){let i=E(c,e,t),{snapshot:n}=q(c,i),{definition:a,...o}=i;return W.parse({...o,...n})}u(S,"localFlatRecord");var ee=class extends F{static{u(this,"SqliteLocalExperimentStore")}localTablesReady=!1;async localWrite(e){await this.ready;let t=this.writeQueue.then(()=>{let i=this.database;this.localTablesReady||(i.exec(Y),i.exec($),this.localTablesReady=!0),i.exec("BEGIN IMMEDIATE");try{let n=e(i);return i.exec("COMMIT"),n}catch(n){throw i.exec("ROLLBACK"),n}});return this.writeQueue=t.then(()=>{},()=>{}),t}async prepareEvaluationOperation(e){return this.localWrite(t=>V(t,e))}async retainEvaluationOperation(e){return this.localWrite(t=>b(t,e))}async readPendingEvaluationOperation(e){return this.localWrite(t=>z(t,e))}async pendingEvaluationOperations(e){return this.localWrite(t=>Q(t,e))}async acknowledgeEvaluationOperation(e){return this.localWrite(t=>Z(t,e))}async claimLocalExperimentOwner(e,t=process.pid){return this.localWrite(i=>M(i,e,t))}async renewLocalExperimentOwner(e){return this.localWrite(t=>P(t,e))}async releaseLocalExperimentOwner(e){return this.localWrite(t=>t.run("DELETE FROM local_experiment_owner WHERE singleton=1 AND owner_id=?",[e]))}async saveLocalExperiment(e){let t=f.parse(e.definition);return this.localWrite(i=>w(i,t.teamId,e.operationId,"save",e.intentHash,()=>{let n=i.get("SELECT MAX(revision) AS revision FROM local_experiment_definitions WHERE team_id=? AND id=?",[t.teamId,t.id]);if(n?.revision&&N(i,t.teamId,t.id).definition.ownerActorId!==t.ownerActorId)throw new s("local_resource_denied","This local resource belongs to another account.",404);if((n?.revision??0)!==e.expectedRevision||t.revision!==e.expectedRevision+1)throw new s("local_definition_revision_conflict","The Experiment changed. Reload its saved revision before editing.");return v(i,t,e.package),t}))}async readLocalExperiment(e,t,i){return this.localWrite(n=>N(n,e,t,i))}async recoverLocalExperimentOperation(e,t,i,n){return this.localWrite(a=>{let o=a.get("SELECT kind,intent_hash,receipt FROM local_experiment_operations WHERE team_id=? AND operation_id=?",[e,t]);if(!o)return null;if(o.kind!==i||o.intent_hash!==n)throw new s("local_operation_conflict","This operation already owns different immutable inputs.");return JSON.parse(o.receipt)})}async listLocalExperiments(e){return this.localWrite(t=>{let i=t.all(`SELECT d.payload FROM local_experiment_definitions d WHERE d.team_id=? AND json_extract(d.payload,'$.ownerActorId')=?
|
|
84
84
|
AND d.revision=(SELECT MAX(revision) FROM local_experiment_definitions v WHERE v.team_id=d.team_id AND v.id=d.id)
|
|
85
85
|
${e.projectId?"AND d.project_id=?":""} ${e.afterId?"AND d.id>?":""} ORDER BY d.id LIMIT ?`,[e.teamId,e.ownerActorId,...e.projectId?[e.projectId]:[],...e.afterId?[e.afterId]:[],e.limit+1]),n=i.slice(0,e.limit).map(a=>f.parse(JSON.parse(a.payload)));return{items:n,nextCursor:i.length>e.limit?n.at(-1).id:null}})}async listLocalExecutionHistory(e){return this.localWrite(t=>{let i=t.all(`SELECT e.payload AS execution,d.payload AS definition,e.id FROM local_experiment_executions e
|
|
86
86
|
JOIN local_experiment_definitions d ON d.team_id=e.team_id AND d.id=e.definition_id AND d.revision=e.definition_revision
|
|
87
87
|
WHERE e.team_id=? AND json_extract(e.payload,'$.ownerActorId')=?
|
|
88
|
-
${e.projectId?"AND d.project_id=?":""} ${e.afterId?"AND e.id>?":""} ORDER BY e.id LIMIT ?`,[e.teamId,e.ownerActorId,...e.projectId?[e.projectId]:[],...e.afterId?[e.afterId]:[],e.limit+1]),n=i.slice(0,e.limit).map(a=>({execution:h.parse(JSON.parse(a.execution)),definition:f.parse(JSON.parse(a.definition))}));return{items:n,nextCursor:i.length>e.limit?n.at(-1).execution.id:null}})}async startLocalExperiment(e){return this.localWrite(t=>w(t,e.execution.teamId,e.operationId,"start",e.intentHash,()=>{x(t,e.ownerId);let i=h.parse(e.execution),n=i.definition,a=N(t,i.teamId,n.id,n.revision).definition;if(a.ownerActorId!==i.ownerActorId)throw new s("local_resource_denied","This local resource belongs to another account.",404);if(a.contentHash!==n.contentHash||a.packageHash!==i.packageHash||a.configuration.maximumCostUsd!==i.maximumCostUsd)throw new s("local_definition_pin_conflict","Execution requires its exact retained definition and package.");if(!e.admissions.length||e.admissions.length!==i.counts.pending||new Set(e.admissions.map(o=>o.receiptId)).size!==e.admissions.length)throw new s("local_population_conflict","Execution admissions must cover the exact unique population.");return t.run("INSERT INTO local_experiment_executions(team_id,id,definition_id,definition_revision,owner_id,payload) VALUES(?,?,?,?,?,?)",[i.teamId,i.id,n.id,n.revision,e.ownerId,JSON.stringify(i)]),e.admissions.forEach((o,r)=>t.run("INSERT INTO local_experiment_cases(team_id,execution_id,receipt_id,ordinal,status,admission) VALUES(?,?,?,?,?,?)",[i.teamId,i.id,o.receiptId,r,"pending",JSON.stringify(o)])),i}))}async admitLocalExperimentRun(e){let t=
|
|
88
|
+
${e.projectId?"AND d.project_id=?":""} ${e.afterId?"AND e.id>?":""} ORDER BY e.id LIMIT ?`,[e.teamId,e.ownerActorId,...e.projectId?[e.projectId]:[],...e.afterId?[e.afterId]:[],e.limit+1]),n=i.slice(0,e.limit).map(a=>({execution:h.parse(JSON.parse(a.execution)),definition:f.parse(JSON.parse(a.definition))}));return{items:n,nextCursor:i.length>e.limit?n.at(-1).execution.id:null}})}async startLocalExperiment(e){return this.localWrite(t=>w(t,e.execution.teamId,e.operationId,"start",e.intentHash,()=>{x(t,e.ownerId);let i=h.parse(e.execution),n=i.definition,a=N(t,i.teamId,n.id,n.revision).definition;if(a.ownerActorId!==i.ownerActorId)throw new s("local_resource_denied","This local resource belongs to another account.",404);if(a.contentHash!==n.contentHash||a.packageHash!==i.packageHash||a.configuration.maximumCostUsd!==i.maximumCostUsd)throw new s("local_definition_pin_conflict","Execution requires its exact retained definition and package.");if(!e.admissions.length||e.admissions.length!==i.counts.pending||new Set(e.admissions.map(o=>o.receiptId)).size!==e.admissions.length)throw new s("local_population_conflict","Execution admissions must cover the exact unique population.");return t.run("INSERT INTO local_experiment_executions(team_id,id,definition_id,definition_revision,owner_id,payload) VALUES(?,?,?,?,?,?)",[i.teamId,i.id,n.id,n.revision,e.ownerId,JSON.stringify(i)]),e.admissions.forEach((o,r)=>t.run("INSERT INTO local_experiment_cases(team_id,execution_id,receipt_id,ordinal,status,admission) VALUES(?,?,?,?,?,?)",[i.teamId,i.id,o.receiptId,r,"pending",JSON.stringify(o)])),i}))}async admitLocalExperimentRun(e){let t=D(),i=u(n=>w(n,e.execution.teamId,e.execution.operationId,"run",e.intentHash,()=>{x(n,e.ownerId);let a=h.parse(e.execution),o=f.parse(e.definition),r=O.parse(e.snapshot),_=a.definition,g=L(e.package),{contentHash:l,...p}=o,{sourceExperimentId:T,...te}=r.configuration;if(a.kind!=="target"||o.ownerActorId!==a.ownerActorId||o.teamId!==a.teamId||d(p)!==l||d({...te,expectedRevision:0})!==d(o.configuration)||o.id!==_.id||o.revision!==_.revision||o.contentHash!==_.contentHash||g.contentHash!==r.packageHash||r.packageHash!==a.packageHash||r.configuration.maximumCostUsd!==a.maximumCostUsd||r.configuration.operationId!==a.operationId||r.configuration.request.teamId!==a.teamId||d(r.model)!==d(o.model)||d(r.graders)!==d(o.graders))throw new s("local_configuration_pin_conflict","The local run requires its exact sealed configuration and owner.");if(!e.admissions.length||e.admissions.length!==a.counts.pending||new Set(e.admissions.map(A=>A.receiptId)).size!==e.admissions.length)throw new s("local_population_conflict","The run admissions must cover the exact unique population.");return v(n,o,e.package),n.run("INSERT INTO local_experiment_executions(team_id,id,definition_id,definition_revision,owner_id,payload) VALUES(?,?,?,?,?,?)",[a.teamId,a.id,_.id,_.revision,e.ownerId,JSON.stringify(a)]),X(n,a,r,e.package),e.admissions.forEach((A,ie)=>n.run("INSERT INTO local_experiment_cases(team_id,execution_id,receipt_id,ordinal,status,admission) VALUES(?,?,?,?,?,?)",[a.teamId,a.id,A.receiptId,ie,"pending",JSON.stringify(A)])),S(n,a.teamId,a.id)}),"apply");return this.localWrite(n=>{let a=n.get("SELECT receipt FROM local_experiment_operations WHERE team_id=? AND operation_id=? AND kind='run'",[e.execution.teamId,e.execution.operationId]);return t&&!a?t.withAdmission(()=>i(n)):i(n)})}async findLocalExperimentRunOperation(e,t){return this.localWrite(i=>{let n=i.get("SELECT receipt FROM local_experiment_operations WHERE team_id=? AND operation_id=? AND kind='run'",[e,t]);if(!n)return null;let a=JSON.parse(n.receipt);return S(i,e,a.id)})}async readLocalExperimentRecord(e,t){return this.localWrite(i=>S(i,e,t))}async readLocalExperimentSnapshot(e,t){return this.localWrite(i=>q(i,E(i,e,t)))}async readExecutionActivity(e){if(!e.actorId.trim()||!e.teamId.trim())throw new s("local_activity_scope_missing","Activity requires a signed-in workspace owner.",403);return this.localWrite(t=>J(t,{...e,limit:Math.min(100,Math.max(1,e.limit??100))}))}async listLocalExperimentRecords(e){return this.localWrite(t=>{let i=t.all(`SELECT e.id FROM local_experiment_executions e
|
|
89
89
|
LEFT JOIN local_experiment_configurations c ON c.team_id=e.team_id AND c.execution_id=e.id
|
|
90
90
|
JOIN local_experiment_definitions d ON d.team_id=e.team_id AND d.id=e.definition_id AND d.revision=e.definition_revision
|
|
91
91
|
WHERE e.team_id=? AND json_extract(e.payload,'$.ownerActorId')=? AND json_extract(e.payload,'$.kind')='target'
|
|
@@ -93,5 +93,5 @@ CREATE TABLE IF NOT EXISTS evaluation_operation_acknowledged_history (
|
|
|
93
93
|
${e.status?"AND json_extract(e.payload,'$.status')=?":""}
|
|
94
94
|
${e.datasetHash?"AND COALESCE(json_extract(c.payload,'$.configuration.request.taskset.contentHash'),json_extract(d.payload,'$.configuration.request.taskset.contentHash'))=?":""}
|
|
95
95
|
${e.search?"AND instr(lower(COALESCE(json_extract(c.payload,'$.configuration.request.name'),json_extract(d.payload,'$.configuration.request.name'))),lower(?))>0":""}
|
|
96
|
-
${e.afterId?"AND e.id>?":""} ORDER BY e.id LIMIT ?`,[e.teamId,e.ownerActorId,...e.projectId?[e.projectId]:[],...e.status?[e.status]:[],...e.datasetHash?[e.datasetHash]:[],...e.search?[e.search]:[],...e.afterId?[e.afterId]:[],e.limit+1]),n=i.slice(0,e.limit).map(a=>S(t,e.teamId,a.id));return{items:n,nextCursor:i.length>e.limit?n.at(-1).id:null}})}async readLocalExecution(e,t){return this.localWrite(i=>({execution:E(i,e,t),cases:
|
|
97
|
-
FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND request_id NOT IN (SELECT json_extract(value,'$.id') FROM json_each(?))`,[e.teamId,e.id,JSON.stringify(o)]).spent,_=t({maximumSpendUsd:Math.max(0,n.maximumCostUsd-r),calls:o}),g=R.array().parse(_.calls);for(let l of o){let p=g.find(T=>T.id===l.id);if(!p||p.requestHash!==l.requestHash||p.reservedUsd!==l.reservedUsd||l.status!=="reserved"&&d(l)!==d(p))throw new s("local_judge_receipt_conflict","Retained judge reservations and receipts are immutable.")}i.run("INSERT INTO local_experiment_judge_budgets(team_id,execution_id,calls) VALUES(?,?,?) ON CONFLICT(team_id,execution_id) DO UPDATE SET calls=excluded.calls",[e.teamId,e.id,JSON.stringify(g)]);for(let l of g){let p=l.status==="not_dispatched"?"released":l.response?.costUsd!==null&&l.response?.costUsd!==void 0?"settled":"unknown";i.run("INSERT INTO local_experiment_charges(team_id,execution_id,request_id,case_id,maximum_usd,cost_usd,status,usage) VALUES(?,?,?,?,?,?,?,?) ON CONFLICT(team_id,execution_id,request_id) DO UPDATE SET cost_usd=excluded.cost_usd,status=excluded.status,usage=excluded.usage",[e.teamId,e.id,l.id,e.caseId,l.reservedUsd,l.response?.costUsd??null,p,l.response?JSON.stringify(l.response):null])}return m(i,e.teamId,e.id),_.result})}async listLocalExecutions(e,t,i,n){return this.localWrite(a=>{let o=a.all(`SELECT payload FROM local_experiment_executions WHERE team_id=? AND definition_id=? AND json_extract(payload,'$.kind')='target' ${i?"AND id>?":""} ORDER BY id LIMIT ?`,[e,t,...i?[i]:[],n+1]),r=o.slice(0,n).map(_=>h.parse(JSON.parse(_.payload)));return{items:r,nextCursor:o.length>n?r.at(-1).id:null}})}async listLocalScoringPasses(e,t,i,n){return this.localWrite(a=>{let o=a.all(`SELECT e.payload FROM local_experiment_executions e JOIN local_experiment_scoring_selections s ON s.team_id=e.team_id AND s.execution_id=e.id WHERE e.team_id=? AND s.source_execution_id=? ${i?"AND e.id>?":""} ORDER BY e.id LIMIT ?`,[e,t,...i?[i]:[],n+1]),r=o.slice(0,n).map(_=>h.parse(JSON.parse(_.payload)));return{items:r,nextCursor:o.length>n?r.at(-1).id:null}})}async admitLocalCase(e,t,i,n){return this.localWrite(a=>{this.requireLocalOwner(a,e,t,n);let o=E(a,e,t);if(!["queued","running"].includes(o.status))return!1;let r=a.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e,t,i]);return!r||r.status!=="pending"?!1:(a.run("UPDATE local_experiment_cases SET status='running' WHERE team_id=? AND execution_id=? AND receipt_id=?",[e,t,i]),m(a,e,t,{status:"running"}),!0)})}async settleLocalCase(e){return this.localWrite(t=>{if(this.requireLocalOwner(t,e.teamId,e.id,e.ownerId),t.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.receiptId])?.status!=="running")throw new s("local_case_not_owned","Only the admitted case owner may seal retained output.");return t.run("UPDATE local_experiment_cases SET status=?,result=?,error=? WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.status,e.result===null?null:JSON.stringify(e.result),e.error,e.teamId,e.id,e.receiptId]),m(t,e.teamId,e.id)})}async cancelLocalExecution(e,t){return this.localWrite(i=>{let n=E(i,e,t);return["queued","running","cancelling"].includes(n.status)?(i.run("UPDATE local_experiment_cases SET status='cancelled' WHERE team_id=? AND execution_id=? AND status='pending'",[e,t]),m(i,e,t,{status:"cancelling"})):n})}async finishLocalExecution(e,t,i,n=null,a=!0){return this.localWrite(o=>{this.requireLocalOwner(o,e,t,i);let r=m(o,e,t);if(r.counts.running)throw new s("local_cleanup_pending","Wait for active case transport cleanup before sealing execution.");return r.counts.pending&&o.run("UPDATE local_experiment_cases SET status='cancelled' WHERE team_id=? AND execution_id=? AND status='pending'",[e,t]),r=m(o,e,t),m(o,e,t,{status:r.status==="cancelling"&&a?"cancelled":n||r.counts.failed||r.counts.unknown||!a?"failed":"completed",completedAt:new Date().toISOString(),cleanupComplete:a,error:n})})}async recoverLocalExperiments(e){return this.localWrite(t=>{x(t,e);let i=t.all("SELECT team_id,id FROM local_experiment_executions WHERE owner_id<>?",[e]),n=[];for(let a of i){let o=E(t,a.team_id,a.id);["queued","running","cancelling"].includes(o.status)&&(t.run("UPDATE local_experiment_cases SET status=CASE WHEN status='running' THEN 'unknown' ELSE 'cancelled' END,error='local_process_interrupted' WHERE team_id=? AND execution_id=? AND status IN ('pending','running')",[a.team_id,a.id]),t.run("UPDATE local_experiment_charges SET status='unknown' WHERE team_id=? AND execution_id=? AND status IN ('reserved','dispatched')",[a.team_id,a.id]),n.push(m(t,a.team_id,a.id,{status:"interrupted",completedAt:new Date().toISOString(),cleanupComplete:!1,error:"The previous process ended. Admitted calls and uncertain charges were retained; start a new execution explicitly."})))}return n})}async reserveLocalCharge(e){return this.localWrite(t=>{if(this.requireLocalOwner(t,e.teamId,e.id,e.ownerId),this.requireLocalChargeBounds(t,e.teamId,e.id),!Number.isFinite(e.maximumUsd)||e.maximumUsd<=0)throw new s("local_charge_bound_unknown","An enforceable positive model charge ceiling is required.",422);let i=m(t,e.teamId,e.id);if(i.status!=="running")throw new s("local_execution_not_running","The execution no longer accepts model dispatch.");if(t.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.caseId])?.status!=="running")throw new s("local_case_not_admitted","Model reservation requires an owned running case.");if(t.get("SELECT request_id FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND request_id=?",[e.teamId,e.id,e.requestId]))throw new s("local_dispatch_already_admitted","This target request was already admitted and cannot be replayed.");if(i.usage.knownCostUsd+i.usage.heldUsd+e.maximumUsd>i.maximumCostUsd+1e-12)throw new s("experiment_budget_exhausted","The local ceiling cannot cover this model's maximum accepted request charge.",422);t.run("INSERT INTO local_experiment_charges(team_id,execution_id,request_id,case_id,maximum_usd,status) VALUES(?,?,?,?,?,'reserved')",[e.teamId,e.id,e.requestId,e.caseId,e.maximumUsd]),m(t,e.teamId,e.id)})}async markLocalChargeDispatched(e,t,i,n){let a=
|
|
96
|
+
${e.afterId?"AND e.id>?":""} ORDER BY e.id LIMIT ?`,[e.teamId,e.ownerActorId,...e.projectId?[e.projectId]:[],...e.status?[e.status]:[],...e.datasetHash?[e.datasetHash]:[],...e.search?[e.search]:[],...e.afterId?[e.afterId]:[],e.limit+1]),n=i.slice(0,e.limit).map(a=>S(t,e.teamId,a.id));return{items:n,nextCursor:i.length>e.limit?n.at(-1).id:null}})}async readLocalExecution(e,t){return this.localWrite(i=>({execution:E(i,e,t),cases:y(i,e,t)}))}async readLocalExecutionCharges(e,t){return this.localWrite(i=>(E(i,e,t),i.all("SELECT request_id,case_id,status,cost_usd,usage FROM local_experiment_charges WHERE team_id=? AND execution_id=? ORDER BY request_id",[e,t]).map(n=>({requestId:n.request_id,caseId:n.case_id,status:n.status,costUsd:n.cost_usd,usage:n.usage?JSON.parse(n.usage):null}))))}async appendLocalExperimentEvent(e){return this.localWrite(t=>{this.requireLocalOwner(t,e.teamId,e.id,e.ownerId);let i=JSON.stringify(e.payload),n=Buffer.byteLength(i),a=t.get("SELECT event_count,byte_count FROM local_experiment_trace_budgets WHERE team_id=? AND execution_id=?",[e.teamId,e.id]);if(n>2097152||(a?.event_count??0)>=2e4||(a?.byte_count??0)+n>67108864)throw new s("local_trace_limit_exceeded","The execution exceeded its bounded retained trace budget.",422);if(!t.get("SELECT receipt_id FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.caseId]))throw new s("local_trace_case_conflict","Trace evidence must belong to an admitted case.");t.run("INSERT INTO local_experiment_events(team_id,execution_id,case_id,type,payload) VALUES(?,?,?,?,?)",[e.teamId,e.id,e.caseId,e.type,i]),t.run("INSERT INTO local_experiment_trace_budgets(team_id,execution_id,event_count,byte_count) VALUES(?,?,1,?) ON CONFLICT(team_id,execution_id) DO UPDATE SET event_count=event_count+1,byte_count=byte_count+excluded.byte_count",[e.teamId,e.id,n])})}async localExperimentTrace(e){return this.localWrite(t=>{if(E(t,e.teamId,e.id),!t.get("SELECT receipt_id FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.caseId]))throw new s("local_case_not_found","This retained case does not belong to the execution.",404);let n=t.all("SELECT sequence,type,payload FROM local_experiment_events WHERE team_id=? AND execution_id=? AND case_id=? AND sequence>? ORDER BY sequence LIMIT ?",[e.teamId,e.id,e.caseId,e.afterSequence??0,e.limit+1]),a=n.slice(0,e.limit).map(o=>({sequence:o.sequence,type:o.type,payload:JSON.parse(o.payload)}));return{items:a,nextCursor:n.length>e.limit?a.at(-1).sequence:null}})}async startLocalScoringPass(e){return this.localWrite(t=>w(t,e.execution.teamId,e.operationId,"score",e.intentHash,()=>{x(t,e.ownerId);let i=h.parse(e.execution),n=i.sourceExecution;if(i.kind!=="scoring"||!n)throw new s("local_scoring_source_missing","A scoring pass requires an exact original execution.");let a=E(t,i.teamId,n.id);if(a.ownerActorId!==i.ownerActorId)throw new s("local_resource_denied","This local resource belongs to another account.",404);if(a.executionHash!==n.executionHash||a.kind!=="target"||!a.completedAt||!a.cleanupComplete)throw new s("local_scoring_source_unavailable","Retained grading requires a terminal original execution with confirmed cleanup.");if(i.packageHash!==a.packageHash||d(i.definition)!==d(a.definition))throw new s("local_scoring_pin_conflict","The scoring pass changed original execution pins.");let o=y(t,i.teamId,a.id);if(d(e.admissions)!==d(o.map(r=>r.admission)))throw new s("local_scoring_population_conflict","A scoring pass must cover the complete retained original population.");return t.run("INSERT INTO local_experiment_executions(team_id,id,definition_id,definition_revision,owner_id,payload) VALUES(?,?,?,?,?,?)",[i.teamId,i.id,i.definition.id,i.definition.revision,e.ownerId,JSON.stringify(i)]),t.run("INSERT INTO local_experiment_scoring_selections(team_id,execution_id,source_execution_id,package_payload,graders) VALUES(?,?,?,?,?)",[i.teamId,i.id,a.id,JSON.stringify(e.package),JSON.stringify(e.graders)]),e.admissions.forEach((r,_)=>t.run("INSERT INTO local_experiment_cases(team_id,execution_id,receipt_id,ordinal,status,admission) VALUES(?,?,?,?,?,?)",[i.teamId,i.id,r.receiptId,_,"pending",JSON.stringify(r)])),i}))}async readLocalScoringSelection(e,t){return this.localWrite(i=>{E(i,e,t);let n=i.get("SELECT package_payload,graders,source_execution_id FROM local_experiment_scoring_selections WHERE team_id=? AND execution_id=?",[e,t]);if(!n)throw new s("local_scoring_not_found","This execution is not a scoring pass.",404);return{package:JSON.parse(n.package_payload),graders:JSON.parse(n.graders),sourceExecutionId:n.source_execution_id}})}async localJudgeBudgetTransaction(e,t){return this.localWrite(i=>{this.requireLocalOwner(i,e.teamId,e.id,e.ownerId);let n=E(i,e.teamId,e.id);if(e.intent==="dispatch"){this.requireLocalChargeBounds(i,e.teamId,e.id);let l=i.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.caseId]);if(n.status!=="running"||l?.status!=="running")throw new s("local_grading_owner_inactive","Only an admitted running grader may reserve a judge call.")}let a=i.get("SELECT calls FROM local_experiment_judge_budgets WHERE team_id=? AND execution_id=?",[e.teamId,e.id]),o=a?R.array().parse(JSON.parse(a.calls)):[],r=i.get(`SELECT COALESCE(SUM(CASE WHEN status='settled' THEN cost_usd WHEN status IN ('reserved','dispatched','unknown') THEN maximum_usd ELSE 0 END),0) AS spent
|
|
97
|
+
FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND request_id NOT IN (SELECT json_extract(value,'$.id') FROM json_each(?))`,[e.teamId,e.id,JSON.stringify(o)]).spent,_=t({maximumSpendUsd:Math.max(0,n.maximumCostUsd-r),calls:o}),g=R.array().parse(_.calls);for(let l of o){let p=g.find(T=>T.id===l.id);if(!p||p.requestHash!==l.requestHash||p.reservedUsd!==l.reservedUsd||l.status!=="reserved"&&d(l)!==d(p))throw new s("local_judge_receipt_conflict","Retained judge reservations and receipts are immutable.")}i.run("INSERT INTO local_experiment_judge_budgets(team_id,execution_id,calls) VALUES(?,?,?) ON CONFLICT(team_id,execution_id) DO UPDATE SET calls=excluded.calls",[e.teamId,e.id,JSON.stringify(g)]);for(let l of g){let p=l.status==="not_dispatched"?"released":l.response?.costUsd!==null&&l.response?.costUsd!==void 0?"settled":"unknown";i.run("INSERT INTO local_experiment_charges(team_id,execution_id,request_id,case_id,maximum_usd,cost_usd,status,usage) VALUES(?,?,?,?,?,?,?,?) ON CONFLICT(team_id,execution_id,request_id) DO UPDATE SET cost_usd=excluded.cost_usd,status=excluded.status,usage=excluded.usage",[e.teamId,e.id,l.id,e.caseId,l.reservedUsd,l.response?.costUsd??null,p,l.response?JSON.stringify(l.response):null])}return m(i,e.teamId,e.id),_.result})}async listLocalExecutions(e,t,i,n){return this.localWrite(a=>{let o=a.all(`SELECT payload FROM local_experiment_executions WHERE team_id=? AND definition_id=? AND json_extract(payload,'$.kind')='target' ${i?"AND id>?":""} ORDER BY id LIMIT ?`,[e,t,...i?[i]:[],n+1]),r=o.slice(0,n).map(_=>h.parse(JSON.parse(_.payload)));return{items:r,nextCursor:o.length>n?r.at(-1).id:null}})}async listLocalScoringPasses(e,t,i,n){return this.localWrite(a=>{let o=a.all(`SELECT e.payload FROM local_experiment_executions e JOIN local_experiment_scoring_selections s ON s.team_id=e.team_id AND s.execution_id=e.id WHERE e.team_id=? AND s.source_execution_id=? ${i?"AND e.id>?":""} ORDER BY e.id LIMIT ?`,[e,t,...i?[i]:[],n+1]),r=o.slice(0,n).map(_=>h.parse(JSON.parse(_.payload)));return{items:r,nextCursor:o.length>n?r.at(-1).id:null}})}async admitLocalCase(e,t,i,n){return this.localWrite(a=>{this.requireLocalOwner(a,e,t,n);let o=E(a,e,t);if(!["queued","running"].includes(o.status))return!1;let r=a.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e,t,i]);return!r||r.status!=="pending"?!1:(a.run("UPDATE local_experiment_cases SET status='running' WHERE team_id=? AND execution_id=? AND receipt_id=?",[e,t,i]),m(a,e,t,{status:"running"}),!0)})}async settleLocalCase(e){return this.localWrite(t=>{if(this.requireLocalOwner(t,e.teamId,e.id,e.ownerId),t.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.receiptId])?.status!=="running")throw new s("local_case_not_owned","Only the admitted case owner may seal retained output.");return t.run("UPDATE local_experiment_cases SET status=?,result=?,error=? WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.status,e.result===null?null:JSON.stringify(e.result),e.error,e.teamId,e.id,e.receiptId]),m(t,e.teamId,e.id)})}async cancelLocalExecution(e,t){return this.localWrite(i=>{let n=E(i,e,t);return["queued","running","cancelling"].includes(n.status)?(i.run("UPDATE local_experiment_cases SET status='cancelled' WHERE team_id=? AND execution_id=? AND status='pending'",[e,t]),m(i,e,t,{status:"cancelling"})):n})}async finishLocalExecution(e,t,i,n=null,a=!0){return this.localWrite(o=>{this.requireLocalOwner(o,e,t,i);let r=m(o,e,t);if(r.counts.running)throw new s("local_cleanup_pending","Wait for active case transport cleanup before sealing execution.");return r.counts.pending&&o.run("UPDATE local_experiment_cases SET status='cancelled' WHERE team_id=? AND execution_id=? AND status='pending'",[e,t]),r=m(o,e,t),m(o,e,t,{status:r.status==="cancelling"&&a?"cancelled":n||r.counts.failed||r.counts.unknown||!a?"failed":"completed",completedAt:new Date().toISOString(),cleanupComplete:a,error:n})})}async recoverLocalExperiments(e){return this.localWrite(t=>{x(t,e);let i=t.all("SELECT team_id,id FROM local_experiment_executions WHERE owner_id<>?",[e]),n=[];for(let a of i){let o=E(t,a.team_id,a.id);["queued","running","cancelling"].includes(o.status)&&(t.run("UPDATE local_experiment_cases SET status=CASE WHEN status='running' THEN 'unknown' ELSE 'cancelled' END,error='local_process_interrupted' WHERE team_id=? AND execution_id=? AND status IN ('pending','running')",[a.team_id,a.id]),t.run("UPDATE local_experiment_charges SET status='unknown' WHERE team_id=? AND execution_id=? AND status IN ('reserved','dispatched')",[a.team_id,a.id]),n.push(m(t,a.team_id,a.id,{status:"interrupted",completedAt:new Date().toISOString(),cleanupComplete:!1,error:"The previous process ended. Admitted calls and uncertain charges were retained; start a new execution explicitly."})))}return n})}async reserveLocalCharge(e){return this.localWrite(t=>{if(this.requireLocalOwner(t,e.teamId,e.id,e.ownerId),this.requireLocalChargeBounds(t,e.teamId,e.id),!Number.isFinite(e.maximumUsd)||e.maximumUsd<=0)throw new s("local_charge_bound_unknown","An enforceable positive model charge ceiling is required.",422);let i=m(t,e.teamId,e.id);if(i.status!=="running")throw new s("local_execution_not_running","The execution no longer accepts model dispatch.");if(t.get("SELECT status FROM local_experiment_cases WHERE team_id=? AND execution_id=? AND receipt_id=?",[e.teamId,e.id,e.caseId])?.status!=="running")throw new s("local_case_not_admitted","Model reservation requires an owned running case.");if(t.get("SELECT request_id FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND request_id=?",[e.teamId,e.id,e.requestId]))throw new s("local_dispatch_already_admitted","This target request was already admitted and cannot be replayed.");if(i.usage.knownCostUsd+i.usage.heldUsd+e.maximumUsd>i.maximumCostUsd+1e-12)throw new s("experiment_budget_exhausted","The local ceiling cannot cover this model's maximum accepted request charge.",422);t.run("INSERT INTO local_experiment_charges(team_id,execution_id,request_id,case_id,maximum_usd,status) VALUES(?,?,?,?,?,'reserved')",[e.teamId,e.id,e.requestId,e.caseId,e.maximumUsd]),m(t,e.teamId,e.id)})}async markLocalChargeDispatched(e,t,i,n){let a=D();return this.localWrite(o=>{if(a?.assertExecution(t),this.requireLocalOwner(o,e,t,n),o.get("SELECT status FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND request_id=?",[e,t,i])?.status!=="reserved")throw new s("local_dispatch_not_reserved","Target dispatch requires a fresh durable reservation.");o.run("UPDATE local_experiment_charges SET status='dispatched' WHERE team_id=? AND execution_id=? AND request_id=?",[e,t,i]),m(o,e,t)})}async settleLocalCharge(e){let t=await this.localWrite(i=>{this.requireLocalOwner(i,e.teamId,e.id,e.ownerId);let n=i.get("SELECT status,maximum_usd,cost_usd,usage FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND request_id=?",[e.teamId,e.id,e.requestId]);if(!n)throw new s("local_charge_not_reserved","The charge does not belong to this execution.");if(e.costUsd!==null&&(!Number.isFinite(e.costUsd)||e.costUsd<0))throw new s("local_charge_invalid","Measured charge must be finite and nonnegative.");let a=e.costUsd!==null&&e.costUsd>n.maximum_usd+1e-12,o=e.confirmedTransportNotInvoked instanceof j&&e.confirmedTransportNotInvoked.executionId===e.id&&e.confirmedTransportNotInvoked.requestId===e.requestId&&e.costUsd===null&&e.usage===null&&n.status==="dispatched",r=e.notDispatched&&n.status==="reserved"||o?"released":e.costUsd===null?"unknown":"settled";if(["released","settled"].includes(n.status)){if(n.status!==r||n.cost_usd!==e.costUsd||(n.usage?d(JSON.parse(n.usage)):null)!==(e.usage?d(e.usage):null))throw new s("local_charge_receipt_conflict","A sealed charge receipt is immutable.");return{execution:m(i,e.teamId,e.id),exceedsBound:a}}return i.run("UPDATE local_experiment_charges SET status=?,cost_usd=?,usage=? WHERE team_id=? AND execution_id=? AND request_id=?",[r,e.costUsd,e.usage===null?null:JSON.stringify(e.usage),e.teamId,e.id,e.requestId]),{execution:m(i,e.teamId,e.id),exceedsBound:a}});if(t.exceedsBound)throw new s("local_charge_outside_bound","Measured charge exceeds its authoritative reservation. Its receipt was retained; no further target dispatch is admitted.");return t.execution}requireLocalChargeBounds(e,t,i){if(e.get("SELECT request_id FROM local_experiment_charges WHERE team_id=? AND execution_id=? AND cost_usd>maximum_usd+0.000000000001 LIMIT 1",[t,i]))throw new s("local_charge_outside_bound","A retained provider receipt exceeded its authoritative reservation. Further target and judge dispatch is blocked.")}requireLocalOwner(e,t,i,n){x(e,n);let a=e.get("SELECT owner_id FROM local_experiment_executions WHERE team_id=? AND id=?",[t,i]);if(!a||a.owner_id!==n)throw new s("local_execution_owner_conflict","This process does not own the execution.")}};export{ee as SqliteLocalExperimentStore};
|
package/dist/chunks/{store-model-batch-review-VKLDYGH3.js → store-model-batch-review-SVL4MT6D.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as B}from"./chunk-
|
|
2
|
+
import{b as B}from"./chunk-DGIEXZJV.js";import{a as E}from"./chunk-KCJVFLBB.js";import"./chunk-ZR7LIMJS.js";import"./chunk-OQPJ7FJF.js";import"./chunk-PCNLC5H3.js";import"./chunk-P7HRF4FM.js";import"./chunk-UFHLLSCE.js";import"./chunk-2ITZW2CN.js";import"./chunk-HCEJAOIF.js";import"./chunk-6GWOVHIG.js";import"./chunk-QGOPYQW3.js";import"./chunk-O4FBOUNX.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-WYZWDMMF.js";import"./chunk-DG4TYVPF.js";import"./chunk-PWK5Z5S3.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-2MMCZHKL.js";import"./chunk-WGX7WY4N.js";import"./chunk-XO3H32KX.js";import"./chunk-DIGX56JY.js";import"./chunk-R7YEURUQ.js";import"./chunk-DZUAT3TP.js";import{b as k,l as v,m as y}from"./chunk-H3BSIAQO.js";import"./chunk-637UACKH.js";import{ua as M}from"./chunk-A66CSUBJ.js";import"./chunk-SPDSSMFD.js";import{x as u}from"./chunk-E63VWAQA.js";import"./chunk-PR5TYTY4.js";import"./chunk-KNO355LC.js";import"./chunk-Y54RKLOI.js";import"./chunk-2SUMZ73C.js";import"./chunk-M55H7KVR.js";import"./chunk-BK63OQRW.js";import"./chunk-V4KT5FCJ.js";import"./chunk-6FA3GG5B.js";import"./chunk-SG6JZ7HD.js";import"./chunk-ON2RNOCG.js";import{O as R,ba as g}from"./chunk-SFNCAPCJ.js";import{h as s}from"./chunk-RCA6NGVA.js";import"./chunk-VHSX3JPX.js";import{m as d}from"./chunk-BIPQCJ5V.js";import"./chunk-PF56N7ZY.js";import{a as p}from"./chunk-FTQLQJQV.js";var T=class extends E{static{p(this,"SqliteModelBatchReviewStore")}async findModelBatchReview(t,r){return this.modelBatchReviewTransaction(t,r)}async beginModelBatchReview(t,r,o){let e=await this.modelBatchReviewTransaction(t,r,o);if(!e)throw new Error("Model batch review was not created.");return e}async modelBatchReviewTransaction(t,r,o){let e=k.parse(r);await this.ready;let l=this.writeQueue.then(async()=>{let a=this.db;if(!a)throw new Error("Model review store is closed.");a.exec("BEGIN IMMEDIATE");let w=!0,h=B(a,t,()=>{if(!w)throw new Error("Model review transaction is closed.")});try{let i=a.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[e.modelId,t]);if(!i)throw new s("model_not_found",404);let n=u.parse(JSON.parse(i.payload)),m=await v(h,e);if(m||!o)return a.exec("COMMIT"),m;if(n.revision!==e.expectedModelRevision||!n.trainingSetup.tasksetRef||!R(n.trainingSetup.tasksetRef,e.tasksetRef))throw new s("model_revision_conflict",409);let f=a.get("SELECT payload FROM taskset_revisions WHERE taskset_id = ? AND revision = ? AND profile_id = ?",[e.tasksetRef.id,e.tasksetRef.revision,t]),c=f?M.parse(JSON.parse(f.payload)):null;if(!c||c.contentHash!==e.tasksetRef.contentHash||d(c.metadata.learning)!==d(g(o.taskset)))throw new s("model_review_package_mismatch",409);let _=await y(h,{scope:t,request:e,package:o,now:new Date().toISOString()});return a.exec("COMMIT"),_}catch(i){throw a.exec("ROLLBACK"),i}finally{w=!1}});return this.writeQueue=l.then(()=>{},()=>{}),l}};export{T as SqliteModelBatchReviewStore};
|