openpond 0.2.73 → 0.2.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-35QBGOMJ.js → acp-HGJMC75K.js} +1 -1
- package/dist/chunks/{acp-agent-4PKMX52I.js → acp-agent-CWV5NF6V.js} +1 -1
- package/dist/chunks/{app-layer-42ZKHTPN.js → app-layer-76YRQY7S.js} +1 -1
- package/dist/chunks/{app-server-evaluations-5JVNCET7.js → app-server-evaluations-PQDIMJJ7.js} +1 -1
- package/dist/chunks/{app-server-harness-services-4E236TXE.js → app-server-harness-services-5MB7CCCT.js} +1 -1
- package/dist/chunks/{app-server-runtime-CI2NTKX7.js → app-server-runtime-N3XZV35H.js} +1 -1
- package/dist/chunks/{apps-EGFRTFAJ.js → apps-DJQ2ZJKC.js} +1 -1
- package/dist/chunks/{chunk-QKGNAYSC.js → chunk-2HWSF4FS.js} +1 -1
- package/dist/chunks/{chunk-KQ7RFPG5.js → chunk-3SIZBCEO.js} +1 -1
- package/dist/chunks/{chunk-TP222CV2.js → chunk-5SBKDKGI.js} +1 -1
- package/dist/chunks/{chunk-U73T66FP.js → chunk-5VHHQZMT.js} +1 -1
- package/dist/chunks/{chunk-NDNSLCPE.js → chunk-5W2OJKJW.js} +1 -1
- package/dist/chunks/{chunk-XSDWRRZP.js → chunk-6EZHEVXS.js} +1 -1
- package/dist/chunks/{chunk-YIZE3M5S.js → chunk-7NLKMY7L.js} +1 -1
- package/dist/chunks/{chunk-MHSSPMLB.js → chunk-B7ELZHQN.js} +1 -1
- package/dist/chunks/{chunk-KE5PYRJ6.js → chunk-BZPNCSUY.js} +1 -1
- package/dist/chunks/{chunk-IXMY4EKS.js → chunk-CABXOJ3I.js} +1 -1
- package/dist/chunks/{chunk-E7SQBMYW.js → chunk-CBJ33EIB.js} +1 -1
- package/dist/chunks/{chunk-2IIVBBF5.js → chunk-CILYQK2G.js} +1 -1
- package/dist/chunks/{chunk-OBMMO5NC.js → chunk-CNVPZKJG.js} +3 -3
- package/dist/chunks/{chunk-4KG7GJ5O.js → chunk-CZ2JSEUK.js} +1 -1
- package/dist/chunks/{chunk-H5EHSILL.js → chunk-D2PEB6AJ.js} +1 -1
- package/dist/chunks/{chunk-FRQYH4QD.js → chunk-DAWHZU7L.js} +1 -1
- package/dist/chunks/{chunk-WOYBWRRV.js → chunk-DVBZBJSK.js} +1 -1
- package/dist/chunks/{chunk-MXDSB2C5.js → chunk-EOQTBH4U.js} +1 -1
- package/dist/chunks/{chunk-P7RLDDPN.js → chunk-FPW3RFZR.js} +1 -1
- package/dist/chunks/{chunk-WAWVFSIQ.js → chunk-FWYJ3MIN.js} +1 -1
- package/dist/chunks/{chunk-5VQK3CCJ.js → chunk-FXLLAAGI.js} +1 -1
- package/dist/chunks/{chunk-ODH5XGE6.js → chunk-HCQTAFTX.js} +1 -1
- package/dist/chunks/{chunk-FCC24XUI.js → chunk-HHLQG7PN.js} +1 -1
- package/dist/chunks/{chunk-TRXOE7TT.js → chunk-HRJ4EPR3.js} +1 -1
- package/dist/chunks/{chunk-O6L4NO3M.js → chunk-HYYQCBX5.js} +1 -1
- package/dist/chunks/{chunk-OFC5N6R3.js → chunk-IPH4LGK2.js} +6 -6
- package/dist/chunks/{chunk-3XNUG4FO.js → chunk-JBIAEQHI.js} +1 -1
- package/dist/chunks/{chunk-XN5BXPAT.js → chunk-JQDZYC72.js} +1 -1
- package/dist/chunks/{chunk-3BIB6KKL.js → chunk-JRW6MFV6.js} +1 -1
- package/dist/chunks/{chunk-EAW5FHU4.js → chunk-JSJB3PR2.js} +2 -2
- package/dist/chunks/{chunk-O4YHISU2.js → chunk-KAW26NGC.js} +1 -1
- package/dist/chunks/{chunk-HIPKU57Y.js → chunk-LK7TJYEP.js} +1 -1
- package/dist/chunks/{chunk-2IECLXB2.js → chunk-LRGMGXL2.js} +1 -1
- package/dist/chunks/{chunk-G2P2PYEO.js → chunk-NACSY3HS.js} +1 -1
- package/dist/chunks/{chunk-E5HDJCKK.js → chunk-NGTNI3YX.js} +1 -1
- package/dist/chunks/{chunk-ONR2AKRI.js → chunk-O5FYAVDK.js} +4 -4
- package/dist/chunks/{chunk-LWF5MQJ4.js → chunk-OJEIYU7D.js} +1 -1
- package/dist/chunks/{chunk-AWUSAHXG.js → chunk-OOSF2SPF.js} +1 -1
- package/dist/chunks/{chunk-JG6JA7YT.js → chunk-P4SXDU55.js} +1 -1
- package/dist/chunks/{chunk-DUR32LJG.js → chunk-PQGR2MTX.js} +1 -1
- package/dist/chunks/{chunk-6IKIGVJF.js → chunk-QSITPC3X.js} +1 -1
- package/dist/chunks/chunk-RGSMU6N4.js +2 -0
- package/dist/chunks/{chunk-CBD554GZ.js → chunk-RORT6K3Y.js} +1 -1
- package/dist/chunks/{chunk-OXUS4QOT.js → chunk-SFLL3TKE.js} +1 -1
- package/dist/chunks/chunk-SYFJVLEL.js +2 -0
- package/dist/chunks/{chunk-6KKWSUEW.js → chunk-THLBUON5.js} +1 -1
- package/dist/chunks/{chunk-X4CN3FIN.js → chunk-VU6S2S3O.js} +1 -1
- package/dist/chunks/{chunk-H2YQ4AA2.js → chunk-W5FL7EH2.js} +1 -1
- package/dist/chunks/{chunk-WBV6A6NS.js → chunk-WHI4XNBI.js} +1 -1
- package/dist/chunks/{chunk-FA3GXQYA.js → chunk-WOA6XFQU.js} +1 -1
- package/dist/chunks/{chunk-SUILNZQJ.js → chunk-WOER246B.js} +1 -1
- package/dist/chunks/{chunk-645T6LH7.js → chunk-XJP7RIHL.js} +1 -1
- package/dist/chunks/{chunk-KOLVSUOS.js → chunk-Z3OW37CO.js} +1 -1
- package/dist/chunks/{chunk-OUOOKEU3.js → chunk-ZACCHQWK.js} +1 -1
- package/dist/chunks/{chunk-3V2XAYYA.js → chunk-ZKH4Z3EQ.js} +1 -1
- package/dist/chunks/{chunk-OXRN2257.js → chunk-ZLYQR44C.js} +1 -1
- package/dist/chunks/chunk-ZQOJLPWD.js +2 -0
- package/dist/chunks/{chunk-EZ435RGA.js → chunk-ZYJHMX4T.js} +1 -1
- package/dist/chunks/{cli-NHRYN2G3.js → cli-B6JFFXMI.js} +1 -1
- package/dist/chunks/{command-54MMVWS2.js → command-GZ3Z37WJ.js} +3 -3
- package/dist/chunks/{configuration-command-XMXTU2FQ.js → configuration-command-OHW7RPSC.js} +1 -1
- package/dist/chunks/{connected-app-executor-WJEDXUA4.js → connected-app-executor-P35Y6B5Y.js} +1 -1
- package/dist/chunks/{connected-evidence-NFQPO5E3.js → connected-evidence-I4I7DQRX.js} +1 -1
- package/dist/chunks/{connected-starting-assets-M54PSOEP.js → connected-starting-assets-Q7CYZT25.js} +1 -1
- package/dist/chunks/{continual-C2YWPEJZ.js → continual-3OIKJ3PG.js} +1 -1
- package/dist/chunks/{core-commands-SY4I5FHE.js → core-commands-BWDKP6AI.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-CH6Z4NE6.js → dataset-preparation-authoring-RPYFOFBV.js} +1 -1
- package/dist/chunks/{datasets-2OQDMF7E.js → datasets-2W4JPKSP.js} +1 -1
- package/dist/chunks/{desktop-test-VNMR5H4I.js → desktop-test-EUBEZJDU.js} +1 -1
- package/dist/chunks/{evaluation-coordination-GULGPATI.js → evaluation-coordination-IYNDZB6X.js} +1 -1
- package/dist/chunks/{experiment-improvements-XNXTU6ZA.js → experiment-improvements-D3DHZ7QI.js} +1 -1
- package/dist/chunks/{experiments-DZX6ZU6F.js → experiments-7OXSDLJG.js} +1 -1
- package/dist/chunks/{experiments-signal-QDVPO3M5.js → experiments-signal-6SWD3TSR.js} +1 -1
- package/dist/chunks/{help-UCN67FN7.js → help-XVZ4RRAB.js} +1 -1
- package/dist/chunks/{host-profile-evaluation-tools-XMGGHVH3.js → host-profile-evaluation-tools-I7ESCZH7.js} +1 -1
- package/dist/chunks/{host-profile-external-dataset-C6ZPMTX6.js → host-profile-external-dataset-MD4X7BCL.js} +1 -1
- package/dist/chunks/{hosted-app-server-composition-U7WGMN5B.js → hosted-app-server-composition-PYKNSE3O.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-VQN6PJKR.js → hosted-experiment-improvement-5L3Z7IV6.js} +1 -1
- package/dist/chunks/{hosted-harness-runtime-O6E5LCGN.js → hosted-harness-runtime-XDCLEP3C.js} +1 -1
- package/dist/chunks/{hosted-profile-candidate-HQ544PNP.js → hosted-profile-candidate-6Q3GOLII.js} +1 -1
- package/dist/chunks/{hosted-profile-compiler-K4OACT7S.js → hosted-profile-compiler-FYBOGHZF.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-control-TKYM73YY.js → hosted-profile-evaluation-control-MXXZR6XA.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-HFCFUYQ4.js → hosted-profile-evaluation-inspection-4J7LAVY2.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-OJ6AR5P5.js → hosted-profile-evaluation-preparation-EF43QUMG.js} +1 -1
- package/dist/chunks/{human-review-DNVIVJRK.js → human-review-6WAUW3BG.js} +1 -1
- package/dist/chunks/{import-QT5AKEA3.js → import-333V3CGC.js} +1 -1
- package/dist/chunks/{local-harness-improvement-runtime-BWZBMOGL.js → local-harness-improvement-runtime-HC42DG74.js} +1 -1
- package/dist/chunks/{local-harness-taskset-review-JL2XNXML.js → local-harness-taskset-review-CUL73U4A.js} +1 -1
- package/dist/chunks/{opchat-7PWUXQSY.js → opchat-R7FBOSCD.js} +1 -1
- package/dist/chunks/{opchat-bounded-chat-B3GOCGWY.js → opchat-bounded-chat-IOV6FYBH.js} +1 -1
- package/dist/chunks/{organizations-TWBMN7KF.js → organizations-EG5BSG26.js} +1 -1
- package/dist/chunks/{profile-RVARQYG4.js → profile-VLGYQXEP.js} +1 -1
- package/dist/chunks/{project-action-payload-65MTQMQW.js → project-action-payload-5PL65D3W.js} +1 -1
- package/dist/chunks/{project-agent-ZC33YRZE.js → project-agent-XT47W7MT.js} +1 -1
- package/dist/chunks/{published-experiment-source-L7BER6AE.js → published-experiment-source-7TDPGSOJ.js} +1 -1
- package/dist/chunks/{refiner-profile-service-56776J7B.js → refiner-profile-service-4RRRB33P.js} +1 -1
- package/dist/chunks/{runtime-GN2H2R7L.js → runtime-K3BUZ3ZQ.js} +1 -1
- package/dist/chunks/{sandbox-command-HWIAH6JA.js → sandbox-command-D7T2GKQA.js} +1 -1
- package/dist/chunks/{sandbox-template-MNZ6OXQQ.js → sandbox-template-WTIQRKE6.js} +1 -1
- package/dist/chunks/{saved-work-OMBDT3ZR.js → saved-work-GQEYG77G.js} +1 -1
- package/dist/chunks/{setup-C6673TJK.js → setup-5MZKOZY2.js} +1 -1
- package/dist/chunks/{src-UHNSXT34.js → src-PEOADF2P.js} +2 -2
- package/dist/chunks/{src-HHFJIPL5.js → src-ZUOZOCQ2.js} +1 -1
- package/dist/chunks/{standalone-experiment-turn-owner-UYPA6XHW.js → standalone-experiment-turn-owner-N7PEBGW3.js} +1 -1
- package/dist/chunks/{store-chat-resources-TYR7D2UP.js → store-chat-resources-7JEZFCC2.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-63YCKG3P.js → store-continual-support-reviews-RJ5OQZTC.js} +1 -1
- package/dist/chunks/{store-conversation-serving-PDSBGL3E.js → store-conversation-serving-D3HJ5OZK.js} +1 -1
- package/dist/chunks/{store-create-improve-RYASTT56.js → store-create-improve-ERPWR2LH.js} +1 -1
- package/dist/chunks/{store-datasets-PELTRO4A.js → store-datasets-R6P5KBAH.js} +1 -1
- package/dist/chunks/{store-evaluation-results-OUTNEMAY.js → store-evaluation-results-ZCABU3X5.js} +1 -1
- package/dist/chunks/{store-human-review-GIMAXCJQ.js → store-human-review-2PHLILEI.js} +1 -1
- package/dist/chunks/{store-learned-preference-migration-validation-DHOSHA6C.js → store-learned-preference-migration-validation-OGFFAM3Q.js} +1 -1
- package/dist/chunks/{store-local-experiments-AH4Z6RWX.js → store-local-experiments-ZG4NWB63.js} +1 -1
- package/dist/chunks/{store-model-batch-review-UUW6ZLDH.js → store-model-batch-review-LQAM7FQJ.js} +1 -1
- package/dist/chunks/{store-model-configuration-4U5A6DU7.js → store-model-configuration-3S74O2IQ.js} +1 -1
- package/dist/chunks/{store-model-project-preparation-MYHO43VH.js → store-model-project-preparation-ARDV4U77.js} +1 -1
- package/dist/chunks/{store-modification-recordings-OZBLFYCT.js → store-modification-recordings-BHJTHW3A.js} +1 -1
- package/dist/chunks/{store-task-inbox-M7YZNCRF.js → store-task-inbox-YRN2UDW3.js} +1 -1
- package/dist/chunks/{store-task-inventory-TTJQAM3T.js → store-task-inventory-6V4UX5BY.js} +1 -1
- package/dist/chunks/{store-taskset-drafts-4GVHDLJJ.js → store-taskset-drafts-H2O4CRIF.js} +1 -1
- package/dist/chunks/{store-training-MGGTGTV2.js → store-training-MQGXXKTX.js} +1 -1
- package/dist/chunks/{store-training-jobs-XKDUX4SV.js → store-training-jobs-YASPKBB3.js} +1 -1
- package/dist/chunks/{store-training-models-4S4ZT3BL.js → store-training-models-HAJCN3IS.js} +1 -1
- package/dist/chunks/{taskset-SLQSCYJI.js → taskset-65BR2KOE.js} +1 -1
- package/dist/chunks/{teams-bot-7U6JOV6T.js → teams-bot-VMG23AFI.js} +1 -1
- package/dist/chunks/{tool-learning-25Z2JOBS.js → tool-learning-YSYQEASN.js} +1 -1
- package/dist/chunks/training-5V53RWI7.js +2 -0
- package/dist/chunks/training-U6OPNRP4.js +2 -0
- package/dist/chunks/{training-2LUQ2IZM.js → training-YUWQXGJX.js} +1 -1
- package/dist/chunks/{training-hosted-NLXMISNL.js → training-hosted-KO4SCSLZ.js} +1 -1
- package/dist/chunks/{training-hosted-alphaedit-WGMJ3L2D.js → training-hosted-alphaedit-HQTKGEZU.js} +1 -1
- package/dist/chunks/{training-hosted-decision-66EUMUIW.js → training-hosted-decision-LN7MQGBF.js} +1 -1
- package/dist/chunks/{training-hosted-engram-QDXSJ77I.js → training-hosted-engram-7UAVQFBA.js} +1 -1
- package/dist/chunks/{training-hosted-modification-comparison-2MH5FZMZ.js → training-hosted-modification-comparison-ZOYOSVHI.js} +1 -1
- package/dist/chunks/{training-hosted-neuron-training-3QXKIEKT.js → training-hosted-neuron-training-37Y6WJH5.js} +1 -1
- package/dist/chunks/{training-hosted-serving-report-ZG75ACZK.js → training-hosted-serving-report-EXJ5X7GB.js} +1 -1
- package/dist/chunks/{training-hosted-steering-KFMTKCTX.js → training-hosted-steering-EAFICV6I.js} +1 -1
- package/dist/chunks/{training-model-start-NMQ55UHZ.js → training-model-start-5QB7A5TD.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/skills/manifest.json +1 -1
- package/dist/web/assets/{App-CV1p0_Zy.js → App-CqqK4NLa.js} +4 -4
- package/dist/web/assets/{AppDialog-DdGt7aU1.js → AppDialog-wmL4BlOJ.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-BHFgtq4f.js +2 -0
- package/dist/web/assets/{AppToastContext-D7z0w1PS.js → AppToastContext-DyaZYQXu.js} +1 -1
- package/dist/web/assets/{AppsView-B-Ts-M_V.js → AppsView-C6u5q5ro.js} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-BJ5i12im.js → AttachmentTypeIcon-AqiS2gzg.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BVHthjXU.js → BrowserSidebar-nNTQ1E4K.js} +1 -1
- package/dist/web/assets/{CartesianChart-BuJ1wFS7.js → CartesianChart-C5ptcXRG.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-CfiiTrK4.js → ChatTimelineEntry-DH0-itET.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-1t9zAhDC.js → CollaborationTabs-C22BMWJ4.js} +1 -1
- package/dist/web/assets/{CommandMenu-DTB6xjGG.js → CommandMenu-CKtBVjuO.js} +1 -1
- package/dist/web/assets/{CommunityView-BjeZ56id.js → CommunityView-Baq8HqVm.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-C_K_05H9.js → ComposerAttachments-BOyEXVhV.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-A38jnNGd.js → ComposerCreateImproveStrip-EbNwu1gE.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-jwaoKQZt.js → ConversationImportsSettings-Cqg66Lcb.js} +1 -1
- package/dist/web/assets/{DatasetReviewImport-DZA1s3XG.js → DatasetReviewImport--FgZ3Zk-.js} +1 -1
- package/dist/web/assets/{ExperimentTrainingDataWorkspace-DowPuAXk.js → ExperimentTrainingDataWorkspace-B04Cg7Hc.js} +2 -2
- package/dist/web/assets/{FilePagePreview-11ZNRtdT.js → FilePagePreview-CeZF-oOW.js} +2 -2
- package/dist/web/assets/{GetStartedView-bLVKmjqg.js → GetStartedView-DOpCgmrC.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-BeimFLZh.js → GettingStartedDialog-tB38Q6JA.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-DiFVb3WK.js → HostedModelLearningReview-CQ0bI6Np.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-DtUF5ejq.js → HostedModelLearningSettings-DEdV2dXx.js} +1 -1
- package/dist/web/assets/{HtmlVisual-CgVTWr64.js → HtmlVisual-krrlNGFX.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-BvinwnBN.js → LabModelVersionDetailPage-DeVfdS7p.js} +1 -1
- package/dist/web/assets/{LabModelWorkspace-Q5DG2mLP.js → LabModelWorkspace-Di_yTjzH.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-cmhZzr4f.js → LabSkillSidebar-CNjUmnfC.js} +1 -1
- package/dist/web/assets/{LabsRoute-DS_mlprv.js → LabsRoute-Gznx60Cp.js} +4 -4
- package/dist/web/assets/{LearningBatchesPage-Cm-btgWc.js → LearningBatchesPage-CpZ0UTX3.js} +1 -1
- package/dist/web/assets/{MainChatThread-DbTn4Bag.js → MainChatThread-Dr2DipCD.js} +2 -2
- package/dist/web/assets/{MainPane-BtzUF6O_.js → MainPane-aEELnEKb.js} +7 -7
- package/dist/web/assets/{ModelProjectPageHeader-C4mgVJGx.js → ModelProjectPageHeader-BVwW-R0w.js} +1 -1
- package/dist/web/assets/{NativeSetupTerminal-bJpDkKk1.js → NativeSetupTerminal-BXvrxj-m.js} +2 -2
- package/dist/web/assets/{NativeSkillSidebar-BuToZvK-.js → NativeSkillSidebar-CYsBopsX.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-F0BPQy0S.js → NewProjectDialog-BR5DChE9.js} +1 -1
- package/dist/web/assets/{OutputsPage-DC4g59_8.js → OutputsPage-CR8pWUj0.js} +1 -1
- package/dist/web/assets/{PageChrome-ufq2jePD.js → PageChrome-BXMG877B.js} +1 -1
- package/dist/web/assets/{ProjectsPage-7mbOvMfO.js → ProjectsPage-CwCes2kZ.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-sR9xN3RP.js → RightChatPanelStack-BvApbQCc.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-Dm6hhkKw.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-s9CN6nR_.js → ScheduledWorkPage-nJJH1fwV.js} +1 -1
- package/dist/web/assets/{SettingsView-CZNWYK-D.js → SettingsView-CBZ6rqak.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BnMqzE-T.js → TasksetDraftEditorPrimitives-Bcw6T4Lf.js} +1 -1
- package/dist/web/assets/{TeamChatView-XthM6n4S.js → TeamChatView-CIwlZFqB.js} +1 -1
- package/dist/web/assets/{TerminalOverlay--HCFZaQW.js → TerminalOverlay-Dhgy0NC3.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-D2F6kPg_.js → TrainingCreationPanel-yLiEL2tM.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-BurWPp9F.js → TrainingDraftPanel-Dng3C-zU.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-D7jdscDm.js → UsageSettingsSection-CTa7T7tS.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-BEIDC3vx.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-CPaCC1_p.js → WorkspaceDiffPanel-DnZlUEbx.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-BZxu6mUS.js → WorkspaceEnvironmentMenu-D-w36AYB.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-C4K_D_yh.js → WorkspaceFileLocation-D2kiU_FJ.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-C0Yf29V0.js → WorkspaceGitDialogs-CylEGfzD.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BRPLaFZS.js → WorkspaceMonacoEditor-ChBjvgxE.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-9wypyV6H.js → WorkspacePdfPreview-CBS6GjeP.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-C-Cn-9pj.js → WorkspacePresentationPreview-DhltPUL4.js} +1 -1
- package/dist/web/assets/{bot-BuaAVlz6.js → bot-C0e4zzW4.js} +1 -1
- package/dist/web/assets/{chat-resources-DMPHClhQ.js → chat-resources-BFT0vtdv.js} +1 -1
- package/dist/web/assets/chevron-down-C4LIbeSz.js +1 -0
- package/dist/web/assets/chevron-right-BKelERU6.js +1 -0
- package/dist/web/assets/chevron-up-Dj1vY1ME.js +1 -0
- package/dist/web/assets/{chunk-C3TS766N-BXUEjt7d.js → chunk-C3TS766N-bHAuW3qR.js} +1 -1
- package/dist/web/assets/chunk-GS5HEE4M-DTj6NX5d.js +1 -0
- package/dist/web/assets/{client-C-ZuakZR.js → client-BO8YuI8Z.js} +1 -1
- package/dist/web/assets/{client-choice-storage-DWIA0Vou.js → client-choice-storage-D_6dVX8O.js} +1 -1
- package/dist/web/assets/{cloud-upload-B5LqiNCG.js → cloud-upload-U0f9MSd8.js} +1 -1
- package/dist/web/assets/{copy-BYIypHbq.js → copy-B0gWkglr.js} +1 -1
- package/dist/web/assets/{cssMode-ByypIqUN.js → cssMode-BkR1YcfF.js} +1 -1
- package/dist/web/assets/{dataset-workspaces-BTPi71mz.js → dataset-workspaces-DM2zGcAK.js} +1 -1
- package/dist/web/assets/{external-link-Cv7TDVPT.js → external-link-DymjzX8a.js} +1 -1
- package/dist/web/assets/{folder-open-DlIP3g5o.js → folder-open-BPA5YifJ.js} +1 -1
- package/dist/web/assets/{folder-plus-CXwFJqcY.js → folder-plus-BCcE8Q4i.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-DMh_-WxU.js → git-commit-horizontal-DbTJXbet.js} +1 -1
- package/dist/web/assets/{htmlMode-CQGeb-h5.js → htmlMode-z1rCf6pX.js} +1 -1
- package/dist/web/assets/{icons-CYvTltSH.js → icons-nr5d1kC-.js} +1 -1
- package/dist/web/assets/{image-Ci1JxTQX.js → image-Us0M7Xxi.js} +1 -1
- package/dist/web/assets/{index-CDtTBysF.js → index-DG0kf1wK.js} +2 -2
- package/dist/web/assets/{info-EjyMkVzV.js → info-M5kOSB9T.js} +1 -1
- package/dist/web/assets/{jsonMode-Dm6YK6Dw.js → jsonMode-AMfP-lcX.js} +1 -1
- package/dist/web/assets/loader-circle-C1-u7BUs.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-BjtOz-Ln.js → lspLanguageFeatures-C6uY6TKM.js} +1 -1
- package/dist/web/assets/{maximize-2-CvvoALtI.js → maximize-2-B2pi1o5S.js} +1 -1
- package/dist/web/assets/{message-square-CPtIPRtf.js → message-square-CPvsC3Wv.js} +1 -1
- package/dist/web/assets/{monaco.contribution-ClH8Tmjq.js → monaco.contribution-5F6IVWCS.js} +2 -2
- package/dist/web/assets/{monaco.contribution-wpC0-Kxw.js → monaco.contribution-BUi28toA.js} +2 -2
- package/dist/web/assets/{monaco.contribution-VSFFgrfZ.js → monaco.contribution-CfQvs13S.js} +2 -2
- package/dist/web/assets/{monaco.contribution-e5DNaEix.js → monaco.contribution-DySvt1jU.js} +2 -2
- package/dist/web/assets/{monitor-BroZpIvk.js → monitor-1YJYctCB.js} +1 -1
- package/dist/web/assets/{paperclip-DYZEL_Gi.js → paperclip-CNTReC0m.js} +1 -1
- package/dist/web/assets/{pdf-DkU37Bi0.js → pdf-DaNAfjLW.js} +1 -1
- package/dist/web/assets/play-DF5h_-8T.js +1 -0
- package/dist/web/assets/plus-D6oFNFQ0.js +1 -0
- package/dist/web/assets/{presentation-CddfsTzp.js → presentation-DbkiE2BE.js} +1 -1
- package/dist/web/assets/{python-CMdyfF2B.js → python-CDlD-992.js} +1 -1
- package/dist/web/assets/{refresh-cw-Cx_7Zlbl.js → refresh-cw-avBifyns.js} +1 -1
- package/dist/web/assets/{save-BaeHeBBw.js → save-DBayPmp_.js} +1 -1
- package/dist/web/assets/{settings-lists-CVg9h-5z.js → settings-lists-Cca729es.js} +1 -1
- package/dist/web/assets/square-CJccmW-i.js +1 -0
- package/dist/web/assets/{square-terminal-CBlQtWQw.js → square-terminal-D7snuW2g.js} +1 -1
- package/dist/web/assets/{submit-issue-command-L5--gt9i.js → submit-issue-command-wDL6xK3b.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-hftC_Rxs.js → toggleHighContrast-CP0qM8JR.js} +1 -1
- package/dist/web/assets/training-KYW8yE6p.js +1 -0
- package/dist/web/assets/{training-model-data-vvvphDlO.js → training-model-data-CilS0W2N.js} +1 -1
- package/dist/web/assets/{tsMode-B0sZU1HD.js → tsMode-DxR6CkQb.js} +1 -1
- package/dist/web/assets/{upload-Bzt1ooBz.js → upload-DEtkeTGw.js} +1 -1
- package/dist/web/assets/{useAccountSettings-BnxwetkP.js → useAccountSettings-BTy8zF0n.js} +1 -1
- package/dist/web/assets/{useAgentInventory-D_qS4ols.js → useAgentInventory-8MWE3pbH.js} +1 -1
- package/dist/web/assets/{useChatContextSelection-D8aSVtCm.js → useChatContextSelection-CBVI5IYj.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-CUQ1MW4l.js → useLocalAgentSchedules-B09iSkPy.js} +1 -1
- package/dist/web/assets/{useQuery-9SCnxwmR.js → useQuery-CKHqHSr0.js} +1 -1
- package/dist/web/assets/{wifi-off-DWtVm7W7.js → wifi-off-C-GF_rPd.js} +1 -1
- package/dist/web/assets/{workers-B3jA6AOv.js → workers-CmqH-dTr.js} +1 -1
- package/dist/web/assets/x-CQ0pGF6Q.js +1 -0
- package/dist/web/assets/{yaml-BEUL30-5.js → yaml-J_HdACeF.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +1 -0
- package/package.json +1 -1
- package/dist/chunks/chunk-5AV2EWFX.js +0 -2
- package/dist/chunks/chunk-64EDQ7UV.js +0 -2
- package/dist/chunks/chunk-DLOJG7LP.js +0 -2
- package/dist/chunks/training-JA5ZQABE.js +0 -2
- package/dist/chunks/training-NL5GYZKU.js +0 -2
- package/dist/web/assets/AppTerminalPanel-B2p_tYh5.js +0 -2
- package/dist/web/assets/RightSidebarHomePanel-joZavyR9.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-CmdXCmrZ.js +0 -1
- package/dist/web/assets/chevron-down-CkifKd_O.js +0 -1
- package/dist/web/assets/chevron-right-LsMXJ5SB.js +0 -1
- package/dist/web/assets/chevron-up-Dt5T2Sf5.js +0 -1
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +0 -1
- package/dist/web/assets/loader-circle-AjP2mDJA.js +0 -1
- package/dist/web/assets/play-BrvX67t1.js +0 -1
- package/dist/web/assets/plus-DFjCZeRE.js +0 -1
- package/dist/web/assets/square-Di5JBnVr.js +0 -1
- package/dist/web/assets/training-CGYukv2L.js +0 -1
- package/dist/web/assets/x-EG07vYCF.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as _}from"./chunk-
|
|
2
|
+
import{c as _}from"./chunk-FWYJ3MIN.js";import{a as J}from"./chunk-CILYQK2G.js";import{b as U}from"./chunk-RHMULF56.js";import{I as z,K as V,ja as M,na as G,v as O}from"./chunk-HHLQG7PN.js";import{aa as N}from"./chunk-BYVE4TMU.js";import{Pb as F,Rb as q,v as C,z as A}from"./chunk-D6L6UNUQ.js";import{d as H,e as b,ga as x,ja as j}from"./chunk-ZY32SZ2P.js";import{f as T}from"./chunk-HNQPEOJD.js";import{c as I,d as S,e as W,j as $,m as L,n as c}from"./chunk-RCT3O3HQ.js";import{A as P}from"./chunk-X2J2P5ZT.js";import{a as h}from"./chunk-FTQLQJQV.js";import Y from"node:path";import{constants as K}from"node:fs";import{open as ae,realpath as X}from"node:fs/promises";async function Q(e){let i=e.attempt.profileNative,p=P.array($).max(16).parse(e.attempt.artifactRefs??[]);if(!p.length)return[];if(!i||!e.storeDir)throw new Error("The actual retained artifact owner is unavailable.");await e.authorize();let t=await e.events(i.turnId);if(c(t)!==i.traceHash||t.some(r=>r.sessionId!==i.sessionId||r.turnId!==i.turnId))throw new Error("The saved artifacts differ from their actual retained case trace.");let o=[],l=0;for(let r of p){let f=t.filter(d=>(d.action==="work_output_save"||d.action==="sandbox_save_output")&&d.status==="completed").flatMap(d=>{let k=P.object({outputRef:M}).passthrough().safeParse(d.data);return k.success?[k.data.outputRef]:[]}).filter(d=>`${i.sessionId}/${d.id}/${d.revision}/${d.title}`===r.id&&d.sourceTaskId===i.sessionId&&d.sourceTurnId===i.turnId&&d.sha256===r.contentHash&&d.sizeBytes===r.sizeBytes&&d.contentType===r.mediaType);if(f.length!==1)throw new Error("The selected artifact has no unique actual saved output.");let s=f[0];if(s.location.kind!=="local"&&(s.location.kind!=="managed"||!e.readManaged)||s.sizeBytes>G)throw new Error("The retained artifact has no supported local byte owner.");if((l+=s.sizeBytes)>2e7)throw new Error("The retained artifacts exceed their aggregate grading byte limit.");await e.authorize(),e.signal?.throwIfAborted();let a;if(s.location.kind==="managed")a=await e.readManaged(s,e.signal);else if(s.location.kind==="local"){let d=await X(Y.join(e.storeDir,"work","outputs")),k=await X(s.location.path);if(!k.startsWith(`${d}${Y.sep}`))throw new Error("The artifact escaped canonical output storage.");let w=await ae(k,K.O_RDONLY|K.O_NOFOLLOW);try{let g=await w.stat();if(!g.isFile()||g.size!==s.sizeBytes)throw new Error("The artifact bytes changed.");a=await w.readFile()}finally{await w.close()}}else throw new Error("The saved artifact has no admitted byte owner.");if(a.length!==s.sizeBytes||L(a)!==s.sha256)throw new Error("The artifact bytes differ from their sealed receipt.");await e.authorize(),o.push({reference:r,title:s.title,contentType:s.contentType,base64:a.toString("base64"),...s.contentType.startsWith("text/")||s.contentType==="application/json"?{text:new TextDecoder("utf8",{fatal:!0}).decode(a)}:{}})}return await e.authorize(),o}h(Q,"readLocalProfileArtifacts");import oe from"node:path";async function Z(e,i){if(e.limits.maximumSpendUsd===null)return;let p=process.env.OPENPOND_API_KEY?.trim(),t=process.env.OPENPOND_OPCHAT_API_URL?.trim();if(!p||!t)throw new Error("Profile evaluation requires an admitted hosted spend ceiling.");let o=new URL(`${t.replace(/\/+$/,"")}/experiment-budget`);if(o.protocol!=="https:"||o.username||o.password||o.search||o.hash)throw new Error("Profile evaluation spend authority URL is invalid.");o.searchParams.set("runId",e.id),o.searchParams.set("manifestHash",e.contentHash);let l=await fetch(o,{headers:{Authorization:`Bearer ${p}`},signal:i});if(!l.ok)throw new Error("The exact Profile evaluation spend ceiling is unavailable.");let r=P.object({runId:P.string(),manifestHash:P.string(),maximumCostUsd:P.number().positive()}).strict().parse(await l.json());if(r.runId!==e.id||r.manifestHash!==e.contentHash||r.maximumCostUsd!==e.limits.maximumSpendUsd)throw new Error("Profile evaluation spend authority differs from its admitted manifest.")}h(Z,"assertProfileEvaluationSpendAuthority");async function ee(e){e.signal?.throwIfAborted();let i,p,t=h(()=>{},"rejectCancellation"),o=new Promise((s,a)=>{t=a}),l=h((s,a)=>{p||(p=new Error(s),e.onInterrupt?.(a),e.interrupt?(i=e.interrupt(s),i.catch(()=>{})):t(p))},"cancel"),r=h(()=>l("Profile evaluation run cancelled.","cancelled"),"aborted"),f=setTimeout(()=>l(`Profile evaluation case exceeded its ${e.timeoutMs}ms timeout.`,"timed_out"),e.timeoutMs);e.signal?.addEventListener("abort",r,{once:!0});try{e.signal?.aborted&&r();let s=await Promise.race([e.send(),o]);if(i){let a=await i;if(a.status==="in_progress"||!a.completedAt)throw new Error("Profile evaluation cleanup remains unconfirmed.")}if(s.status==="in_progress"||!s.completedAt)throw new Error("Workflow evaluation turn did not settle.");return s}catch(s){if(i){let a=await i;if(a.status==="in_progress"||!a.completedAt)throw new Error("Profile evaluation cleanup remains unconfirmed.",{cause:s})}throw s}finally{clearTimeout(f),e.signal?.removeEventListener("abort",r)}}h(ee,"awaitProfileEvaluationTurn");function te(e){let i=e.manifest.profileEvaluation,p=e.manifest.policy;if(!i||p.kind!=="model"||e.manifest.execution.kind!=="harness")throw new Error("Profile evaluation requires a released source and model policy.");if(i.profileId!==e.profileRef.profileId||i.profileId!==e.binding.profileId||i.sourceRevision!==e.binding.sourceRevision||i.harnessRelease.id!==e.binding.harnessRelease.id||i.harnessRelease.contentHash!==e.binding.harnessRelease.contentHash||(e.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?i.target.kind!=="workflow"||i.target.workflowId!==e.binding.workflowId:i.target.kind==="workflow"||c(i.target)!==c(e.binding.target)))throw new Error("Profile evaluation binding differs from its admitted source.");if(p.model.provider!==e.modelRef.providerId||p.model.model!==e.modelRef.modelId||p.configurationHash!==e.modelConfigurationHash)throw new Error("Workflow evaluation model differs from its admitted configuration.");return async t=>{if(c(t.source)!==c(i))throw new Error("Workflow evaluation case differs from its admitted Profile source.");t.signal?.throwIfAborted(),await(e.assertSpendAuthority??Z)(e.manifest,t.signal);let o=!!(e.attachments?.length||e.requiredOutputs?.length),l=o&&!e.ownedSessionMetadata?.localProfileExperiment&&e.profileRef.source==="local"&&(e.modelRef.providerId==="codex"||U(e.modelRef.providerId)),r=await e.createSession({...o?{experience:"work"}:{},provider:e.modelRef.providerId,modelRef:e.modelRef,currentProfile:e.profileRef,...e.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?{profileWorkflowBinding:e.binding}:{profileComponentBinding:e.binding},hiddenFromDefaultSidebar:!0,metadata:{profileEvaluationRun:{id:e.manifest.id,contentHash:e.manifest.contentHash},taskId:t.task.id,seed:t.seed,...o&&e.profileRef.source==="local"?{workspaceTarget:"local"}:{},...o?{profileEvaluationOutputs:e.requiredOutputs??[]}:{},...e.ownedSessionMetadata}}),f=[...o?[l?`This is a local evaluation run. Complete the requested task using its public inputs. Save these required files at their declared paths relative to the current task workspace: ${JSON.stringify(e.requiredOutputs??[])}. The app preserves those declared files automatically when the turn finishes; work_save_output is not a shell command and is not needed here. For headless tools that write user preferences, use writable configuration, cache and profile directories within this task workspace and a bounded command timeout. Send the requested final response to finish the case. Private grading runs afterward; do not wait for grader feedback.`:"This is an evaluation run. Complete the requested task using its public inputs. work_exec starts in writable Work storage; inputs are ../inputs and released policy source is ../harness. When work_finish is available, create every declared output in Work and call work_finish with the path of your complete working response file, then send a short final answer. Otherwise save each required output with work_save_output and send your final response. Private grading runs after your final response; do not wait for grader feedback."]:[],typeof t.task.input=="string"?t.task.input:JSON.stringify(t.task.input),...Object.keys(t.task.policyVisibleContext).length?[`Policy-visible task context:
|
|
3
3
|
${JSON.stringify(t.task.policyVisibleContext)}`]:[]].join(`
|
|
4
4
|
|
|
5
5
|
`)||" ";await e.admitSession?.(r);try{let s=!1,a=await ee({signal:t.signal,timeoutMs:e.manifest.limits.timeoutMs,onInterrupt:h(n=>{s=n==="timed_out",e.onInterrupt?.(n)},"onInterrupt"),...e.interruptSessionTurn?{interrupt:h(n=>e.interruptSessionTurn(r.id,n),"interrupt")}:{},send:h(()=>{let n={prompt:f,...e.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?{workflowInput:{}}:e.binding.target.kind==="agent_action"?{workflowInput:t.task.input}:{},modelRef:e.modelRef,approvalPolicy:"on-request",...o?{sandbox:"workspace-write",codexPermissionMode:"default"}:{},...e.attachments?.length?{attachments:e.attachments}:{}};return e.modelRef.providerId==="codex"?e.sendTurn(r.id,n,{nativeTimeoutMs:e.manifest.limits.timeoutMs}):e.sendTurn(r.id,n)},"send")});if(a.status==="in_progress"||!a.completedAt)throw new Error("Workflow evaluation turn did not settle.");if(await e.validateTerminalTurn?.(r,a),!a.harnessSnapshot||a.harnessSnapshot.harnessRelease.id!==i.harnessRelease.id||a.harnessSnapshot.harnessRelease.contentHash!==i.harnessRelease.contentHash)throw new Error("Workflow evaluation turn executed a different Harness release.");if(!a.modelRef||c(a.modelRef)!==c(e.modelRef))throw new Error("Workflow evaluation turn executed a different model.");let d=await e.runtimeEventsForTurn(a.id),k=d.filter(n=>n.name==="workspace_action_result"&&(n.action==="sandbox_save_output"||n.action==="work_output_save")&&n.status==="completed"&&n.turnId===a.id).flatMap(n=>D(n.data)).filter(n=>n.sourceTaskId===r.id&&n.sourceTurnId===a.id&&n.location.kind!=="external"),g=(e.requiredOutputs??[]).flatMap(n=>{let y=[...k].reverse().find(B=>B.title===n.path&&B.contentType===n.mediaType&&(n.maxBytes===null||B.sizeBytes<=n.maxBytes));return y?[y]:[]}).map(n=>({id:`${r.id}/${n.id}/${n.revision}/${n.title}`,contentHash:n.sha256,mediaType:n.contentType,sizeBytes:n.sizeBytes})),v=-1;for(let n=d.length-1;n>=0;n-=1)if(d[n]?.name.endsWith(".delta")){v=n;break}let R=d.flatMap((n,y)=>n.name.endsWith(".delta")&&y!==v?[]:[n.id]);if(R.length+g.length>1e4)throw new Error("Profile evaluation produced more than 10,000 substantive evidence references.");let u=J(d,i.target.kind,a.status),m=Math.min(e.manifest.limits.maxOutputBytes,e.maximumOutputBytes??e.manifest.limits.maxOutputBytes);if(!Number.isSafeInteger(m)||m<1)throw new Error("Profile evaluation requires a positive bounded output limit.");let E=Buffer.byteLength(u,"utf8")>m;if(E&&!e.retainOutputLimitEvidence)throw new Error(`Profile evaluation case exceeded its ${m}-byte output limit.`);return E&&e.onOutputLimit?.(c(u)),{evidence:{output:{text:E?"":u},runtimeEventRefs:R,artifactRefs:g.map(n=>n.id),...E?{infrastructureError:`Profile evaluation case exceeded its ${m}-byte output limit.`}:a.status!=="completed"?{infrastructureError:a.error??`Workflow evaluation turn ${a.status}.`}:{}},traceHash:c(d),retainedEvidenceRef:{sessionId:r.id,turnId:a.id},artifactRefs:g,startedAt:a.startedAt,completedAt:a.completedAt,latencyMs:Math.max(0,Date.parse(a.completedAt)-Date.parse(a.startedAt)),costUsd:null,terminal:a.status==="completed"&&!E,failureClass:a.status==="completed"&&!E?null:a.status==="interrupted"?s?"timeout":"cancelled":"infrastructure_failure"}}finally{await e.settleSession?.(r.id)}}}h(te,"createProfileWorkflowEvaluationExecutor");function D(e,i=0){if(e==null||i>8)return[];let p=M.safeParse(e);return p.success?[p.data]:Array.isArray(e)?e.flatMap(t=>D(t,i+1)):typeof e!="object"?[]:Object.values(e).flatMap(t=>D(t,i+1))}h(D,"findFileOutputs");var re=P.object({manifest:C,taskset:x,profileRef:O,binding:P.union([H,b]),modelRef:T,modelConfigurationHash:S,taskId:I,seed:P.string().trim().min(1).max(500)}).strict();function De(e){return async(i,p)=>{let t=re.parse(i),o=await e.selectedProfile();if(!o||c(o.ref)!==c(t.profileRef)||o.sourceRevision!==t.binding.sourceRevision)throw new Error("Evaluation Profile differs from the app-server's authorized selection.");let l=await e.loadCatalog({ref:o.ref,sourceRevision:o.sourceRevision,harnessRelease:t.binding.harnessRelease}),r=t.manifest.profileEvaluation,f=await _({manifest:t.manifest,taskset:t.taskset,selected:{profileRef:o.ref,sourceRevision:o.sourceRevision,harnessRelease:t.binding.harnessRelease},loadCatalog:e.loadCatalog,resolveExternalDataset:e.resolveExternalDataset}),s=f?.definition??l.definitions.find(u=>u.id===r?.definitionId);if(A(t.manifest,t.taskset,f?.catalog??{schemaVersion:"openpond.profileEvaluations.v1",definitions:l.definitions,suites:l.suites}),!r||!s||(f?c(f.catalog):l.catalogHash)!==r.catalogHash||c(s)!==r.definitionHash||c(s.target)!==c(r.target)||s.tasksetRelease.id!==t.manifest.tasksetRelease.id||s.tasksetRelease.contentHash!==t.manifest.tasksetRelease.contentHash||!s.taskIds.includes(t.taskId)||!s.seeds.includes(t.seed)||t.manifest.population.filter(u=>u.taskId===t.taskId&&u.seed===t.seed).length!==1)throw new Error("Evaluation case differs from its released definition or admitted population.");let a=t.taskset.tasks.find(u=>u.id===t.taskId),d=j(a);if(d.artifactRefs.length!==a.artifactRefs.length||d.artifactRefs.length>z.maxAttachments)throw new Error("Evaluation case has an unauthorized task attachment.");if(d.artifactRefs.length&&!e.storeDir)throw new Error("Evaluation case attachment storage is unavailable.");let k=f?.packageValue??(d.artifactRefs.length||a.requiredOutputs?.length?await e.loadTasksetPackage(s,o.ref.profileId,t.binding.harnessRelease):null);if(k&&(k.contentHash!==t.manifest.packageHash||k.taskset.contentHash!==t.taskset.contentHash))throw new Error("Evaluation case Taskset differs from its frozen package or admitted manifest.");let w=d.artifactRefs.map(u=>{if(u.mediaType!=="application/pdf"||u.sizeBytes>z.maxAttachmentBytes)throw new Error(`Evaluation case attachment ${u.id} is not an admitted PDF.`);let m=k?.files.find(E=>E.asset.id===u.id);if(!m||c(m.asset)!==c(u))throw new Error(`Evaluation case attachment ${u.id} differs from its frozen Taskset file.`);return N(m),V.parse({id:u.id,name:oe.basename(u.path),kind:"file",mediaType:u.mediaType,sizeBytes:u.sizeBytes,contentsBase64:m.base64})}),g=te({manifest:t.manifest,profileRef:o.ref,binding:t.binding,modelRef:t.modelRef,modelConfigurationHash:t.modelConfigurationHash,createSession:e.createSession,sendTurn:e.sendTurn,...e.admitSession?{admitSession:h(u=>e.admitSession(u,t.manifest,t.taskId,t.seed,w),"admitSession")}:{},...e.settleSession?{settleSession:e.settleSession}:{},interruptSessionTurn:e.interruptSessionTurn,runtimeEventsForTurn:h(u=>e.store.runtimeEventsForTurn(u),"runtimeEventsForTurn"),attachments:w,requiredOutputs:a.requiredOutputs??[]});f&&await f.authorize(),p?.throwIfAborted();let v=await g({task:d,seed:t.seed,source:r,...p?{signal:p}:{}}),R=await Q({storeDir:e.storeDir,readManaged:e.readManagedArtifact,attempt:{artifactRefs:v.artifactRefs,profileNative:v.retainedEvidenceRef?.sessionId&&v.retainedEvidenceRef.turnId?{sessionId:v.retainedEvidenceRef.sessionId,turnId:v.retainedEvidenceRef.turnId,traceHash:v.traceHash}:null},events:h(u=>e.store.runtimeEventsForTurn(u),"events"),signal:p,authorize:h(async()=>{p?.throwIfAborted();let u=await e.selectedProfile();if(!u||c(u)!==c(o))throw new Error("The current artifact Profile authority changed.");f&&await f.authorize()},"authorize")});return{...v,evidence:{...v.evidence,artifacts:R,caseOwner:{...v.retainedEvidenceRef,traceHash:v.traceHash}}}}}h(De,"createProfileEvaluationCaseService");var ie=P.object({manifest:C,taskset:x,profileRef:O,binding:P.union([H,b]),modelRef:T,modelConfigurationHash:S}).strict();function Ve(e){let i=new Map,p=h(async(t,o)=>{let l=await e.selectedProfile();if(!l||c(l.ref)!==c(t.profileRef)||l.sourceRevision!==t.binding.sourceRevision)throw new Error("Evaluation Profile differs from the app-server's authorized selection.");let r=await e.loadCatalog({ref:l.ref,sourceRevision:l.sourceRevision,harnessRelease:t.binding.harnessRelease}),f=await _({manifest:t.manifest,taskset:t.taskset,selected:{profileRef:l.ref,sourceRevision:l.sourceRevision,harnessRelease:t.binding.harnessRelease},loadCatalog:e.loadCatalog,resolveExternalDataset:e.resolveExternalDataset}),s=f?.catalog??{schemaVersion:"openpond.profileEvaluations.v1",definitions:r.definitions,suites:r.suites};if(A(t.manifest,t.taskset,s),!e.privateGrading&&(t.taskset.graders.some(m=>m.kind==="model_judge"||m.kind==="custom_verifier")||t.taskset.metrics?.aggregation==="custom"))throw new Error("Profile evaluation cannot run this Taskset's model judge, custom verifier, or custom metric in the current app-server runtime.");let a=t.manifest.profileEvaluation,d=t.manifest.policy;if(a.profileId!==l.ref.profileId||a.sourceRevision!==t.binding.sourceRevision||a.harnessRelease.id!==t.binding.harnessRelease.id||a.harnessRelease.contentHash!==t.binding.harnessRelease.contentHash||(t.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?a.target.kind!=="workflow"||a.target.workflowId!==t.binding.workflowId:a.target.kind==="workflow"||c(a.target)!==c(t.binding.target))||d.kind!=="model"||d.model.provider!==t.modelRef.providerId||d.model.model!==t.modelRef.modelId||d.configurationHash!==t.modelConfigurationHash)throw new Error("Evaluation request differs from its admitted Profile workflow or model configuration.");let k=s.definitions.find(m=>m.id===a.definitionId),w=e.privateGrading?f?.packageValue??await(e.loadTasksetPackage?e.loadTasksetPackage(k,l.ref.profileId,a.harnessRelease):Promise.reject(new Error("The current private Taskset owner is unavailable."))):null,g=w?await e.privateGrading?.(t.manifest,w,o):void 0;await g?.authorize();let v=await e.store.getProfileEvaluationRun(t.manifest.id);if(v){if(v.manifest.contentHash!==t.manifest.contentHash||c(v.profileRef)!==c(l.ref))throw new Error(`Profile evaluation run ${t.manifest.id} already exists with another manifest.`);return v}f&&await f.authorize(),o?.throwIfAborted();let R=await q({manifest:t.manifest,taskset:t.taskset,catalog:s,...g?{customVerifier:g.customVerifier,modelJudge:g.modelJudge,metricSource:g.metricSource,metricExecutor:g.metricExecutor}:{},execute:h(({task:m,seed:E,signal:n})=>e.executeCase({...t,taskId:m.id,seed:E},n),"execute"),...o?{signal:o}:{},saveGrade:h(async m=>(await e.store.saveProfileEvaluationGrade(m),{id:m.contentHash,contentHash:m.contentHash,mediaType:"application/json",sizeBytes:null}),"saveGrade"),saveReceipt:h(async m=>{await e.store.saveProfileEvaluationReceipt(m)},"saveReceipt"),loadCompletedMember:h(async({receiptId:m})=>{let E=await e.store.getProfileEvaluationReceipt(m);if(!E)return null;let n=E.graderEvidenceRefs[0],y=n&&await e.store.getProfileEvaluationGrade(n.contentHash);if(!y)throw new Error(`Retained Profile evaluation receipt ${m} is missing its grade.`);return{receipt:E,grade:y}},"loadCompletedMember")});await g?.authorize(),f&&await f.authorize();let u={profileRef:l.ref,manifest:t.manifest,metric:R.metric,gradeRefs:R.grades.map(m=>({id:m.contentHash,contentHash:m.contentHash})),receiptRefs:R.receipts.map(m=>({id:m.id,contentHash:m.contentHash})),passRate:R.passRate,passed:R.passed,completedAt:new Date().toISOString()};return e.store.saveProfileEvaluationRun({...u,contentHash:c(u)})},"run");return(t,o)=>{let l=ie.parse(t),r=i.get(l.manifest.id);if(r){if(r.manifestHash!==l.manifest.contentHash)throw new Error(`Profile evaluation run ${l.manifest.id} is already running with another manifest.`);return r.promise}let f=p(l,o);return i.set(l.manifest.id,{manifestHash:l.manifest.contentHash,promise:f}),f.finally(()=>{i.get(l.manifest.id)?.promise===f&&i.delete(l.manifest.id)}).catch(()=>{}),f}}h(Ve,"createProfileEvaluationRunService");var se=P.object({id:I,suiteId:I,createdAt:W,modelRef:T,hostModelConfigurationHash:S.optional()}).strict();function Xe(e){let i=new Map,p=h(async t=>{let o=await e.selectedWorkflows(),l=await e.loadCatalog({ref:o.profileRef,sourceRevision:o.sourceRevision,harnessRelease:o.harnessRelease}),r={schemaVersion:"openpond.profileEvaluations.v1",definitions:l.definitions,suites:l.suites},f=r.suites.find(w=>w.id===t.suiteId);if(!f)throw new Error(`Profile evaluation suite ${t.suiteId} is absent from the selected release.`);let s=[];for(let w of f.definitionIds)s.push(await e.prepareRun({id:`suite-${c([t.id,w]).slice(0,32)}`,createdAt:t.createdAt,definitionId:w,modelRef:t.modelRef,...t.hostModelConfigurationHash?{hostModelConfigurationHash:t.hostModelConfigurationHash}:{}}));let a=await e.store.getProfileEvaluationSuiteRun(t.id);if(a){if(a.suiteId!==f.id||a.catalogHash!==c(r)||a.profileId!==o.profileRef.profileId||a.sourceRevision!==o.sourceRevision||a.harnessRelease.id!==o.harnessRelease.id||a.harnessRelease.contentHash!==o.harnessRelease.contentHash||a.createdAt!==t.createdAt)throw new Error(`Profile evaluation suite run ${t.id} already exists with another request.`);for(let[w,g]of a.members.entries()){let v=await e.store.getProfileEvaluationRun(g.runManifest.id);if(!v||v.contentHash!==g.runHash||v.manifest.contentHash!==g.runManifest.contentHash||v.manifest.contentHash!==s[w]?.manifest.contentHash)throw new Error("Retained Profile evaluation suite is missing member evidence.");let R=v.manifest.policy;if(R.kind!=="model"||R.model.provider!==t.modelRef.providerId||R.model.model!==t.modelRef.modelId)throw new Error(`Profile evaluation suite run ${t.id} already exists with another model.`)}return a}let d=[];for(let[w,g]of f.definitionIds.entries()){let v=s[w],R=await e.executeRun(v);d.push({definitionId:g,manifest:R.manifest,runHash:R.contentHash,passed:R.passed,score:R.metric.value})}let k=F({id:t.id,suiteId:f.id,catalog:r,members:d,createdAt:t.createdAt,completedAt:new Date().toISOString()});return e.store.saveProfileEvaluationSuiteRun(o.profileRef,r,k)},"run");return t=>{let o=se.parse(t),l=c(o),r=i.get(o.id);if(r){if(r.requestHash!==l)throw new Error(`Profile evaluation suite run ${o.id} is already running with another request.`);return r.promise}let f=p(o);return i.set(o.id,{requestHash:l,promise:f}),f.finally(()=>{i.get(o.id)?.promise===f&&i.delete(o.id)}).catch(()=>{}),f}}h(Xe,"createProfileEvaluationSuiteService");export{Q as a,te as b,De as c,Ve as d,Xe as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as oe}from"./chunk-YG3HITOU.js";import{b as be}from"./chunk-F64TR23C.js";import{f as J}from"./chunk-64EDQ7UV.js";import{m as L}from"./chunk-HIQPGYVH.js";import{o as ye}from"./chunk-3VT2PPKW.js";import{l as W}from"./chunk-ZEOYNUHL.js";import{v as B}from"./chunk-ZY32SZ2P.js";import{I as Ee,K as Te}from"./chunk-SV7ZBEK2.js";import{c as M,d as z,e as Ie,n as y}from"./chunk-RCT3O3HQ.js";import{f as ve}from"./chunk-UGOK7VTC.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as u}from"./chunk-FTQLQJQV.js";var c=Object.freeze({eventBytes:65536,actionBytes:16384,resultBytes:8192,stateBytes:8192,eventsPerAppend:32,eventsPerEpisode:256,episodeBytes:2097152,assetBytes:1048576,assetsPerEpisode:16,queueBytes:52428800,queueEvents:5e3,queueAgeSeconds:86400,capabilities:32,consultationRounds:3,consultationBytes:65536,manifestSeconds:300}),s=M,g=z,w=Ie,K=e.enum(["codex","claude_code","opencode","openpond"]),h=e.object({id:M,contentHash:z}).strict(),C=e.object({teamId:M,projectId:M}).strict();function T(n,t){return e.preprocess((o,i)=>{try{B(o,t)}catch{return i.addIssue({code:"custom",message:"Tool learning data exceeds its JSON boundary."}),e.NEVER}return o},n)}u(T,"boundedToolLearningSchema");function x(n){return e.string().max(n).refine(t=>new TextEncoder().encode(t).byteLength<=n,"Tool learning text exceeds its UTF-8 byte limit.")}u(x,"toolLearningText");var ze=T(e.record(e.string().min(1).max(120),e.union([x(2e3),e.number().finite(),e.boolean(),e.null()])).refine(n=>Object.keys(n).length<=32,"Use at most 32 explicit state fields."),c.stateBytes),j=e.object({application:e.string().trim().min(1).max(200),version:e.string().trim().min(1).max(200),state:ze,fingerprint:z}).strict(),Y=e.object({id:M,contentHash:z,mediaType:e.enum(["text/plain","application/json","text/x-python","text/x-diff"]),sizeBytes:e.number().int().nonnegative().max(c.assetBytes),purpose:e.enum(["action","result","state","verification"])}).strict(),Le=e.object({policyRevision:e.number().int().positive(),policyHash:z,redactedFields:e.number().int().nonnegative().max(1e4),omittedFields:e.number().int().nonnegative().max(1e4),truncated:e.boolean()}).strict();function E(n,t=c.eventBytes){return B(n,t),y(n)}u(E,"toolLearningContentHash");var Q=x(c.actionBytes),xe=e.string().min(1).max(1e3).refine(n=>!n.startsWith("/")&&!n.includes("\\")&&!/^[A-Za-z]:/u.test(n)&&n.split("/").every(t=>t!==""&&t!=="."&&t!==".."),"Use a workspace-relative artifact path."),P=T(e.discriminatedUnion("kind",[e.object({kind:e.literal("python"),code:Q}).strict(),e.object({kind:e.literal("shell"),command:Q,shell:e.string().min(1).max(120)}).strict(),e.object({kind:e.literal("tool_arguments"),arguments:e.record(e.string().min(1).max(200),e.json())}).strict(),e.object({kind:e.literal("edit"),patch:Q,baseFiles:e.array(e.object({path:xe,contentHash:g.nullable()}).strict()).min(1).max(32)}).strict()]),c.actionBytes),yt=e.discriminatedUnion("kind",[e.object({kind:e.literal("replacement"),expectedActionHash:g,environmentFingerprint:g,action:P}).strict(),e.object({kind:e.literal("patch"),expectedActionHash:g,environmentFingerprint:g,files:e.array(e.object({path:xe,expectedContentHash:g,patch:Q}).strict()).min(1).max(16)}).strict()]);var Ve=e.object({intent:x(2e3),tool:e.object({name:e.string().min(1).max(200),version:e.string().max(200).nullable(),server:e.string().max(200).nullable()}).strict(),action:P,actionHash:g,environment:j,contextAssets:e.array(Y).max(c.assetsPerEpisode),selection:e.discriminatedUnion("kind",[e.object({kind:e.literal("eligible_attempt")}).strict(),e.object({kind:e.literal("unchanged_control"),numerator:e.number().int().positive(),denominator:e.number().int().positive(),policyHash:g}).strict()])}).strict().superRefine((n,t)=>{E(n.action)!==n.actionHash&&t.addIssue({code:"custom",path:["actionHash"],message:"Action bytes differ from their hash."}),n.selection.kind==="unchanged_control"&&n.selection.numerator>n.selection.denominator&&t.addIssue({code:"custom",path:["selection"],message:"Sampling probability cannot exceed one."})}),Ke=e.enum(["validation_failure","execution_failure","process_failure","timeout","cancelled","infrastructure_failure","authorization_denied","outcome_failure","unknown_failure"]),ie={attempt:h,actionHash:g,execution:e.enum(["not_executed","executed","unknown"]),sideEffects:e.enum(["none","possible","observed","unknown"]),resultExcerpt:x(c.resultBytes),resultHash:g.nullable(),assets:e.array(Y).max(c.assetsPerEpisode)},$e=e.discriminatedUnion("outcome",[e.object({...ie,outcome:e.literal("succeeded"),exitCode:e.literal(0).nullable()}).strict(),e.object({...ie,outcome:e.literal("failed"),classification:Ke,errorCode:e.string().min(1).max(200),message:x(2e3),exitCode:e.number().int().min(-255).max(255).nullable()}).strict(),e.object({...ie,outcome:e.literal("incomplete"),reason:e.enum(["completion_not_observed","observer_restarted","transport_interrupted","coverage_gap"])}).strict()]).superRefine((n,t)=>{n.execution==="not_executed"&&n.sideEffects!=="none"&&t.addIssue({code:"custom",path:["sideEffects"],message:"An unexecuted action cannot claim tool effects."}),n.outcome==="succeeded"&&n.execution!=="executed"&&t.addIssue({code:"custom",path:["execution"],message:"Successful execution requires an observed execution."}),n.outcome==="failed"&&(n.classification==="validation_failure"&&n.execution!=="not_executed"&&t.addIssue({code:"custom",path:["execution"],message:"Pre-execution validation failure must be unexecuted."}),n.classification==="process_failure"&&(n.execution!=="executed"||n.exitCode===null||n.exitCode===0)&&t.addIssue({code:"custom",path:["exitCode"],message:"Process failure requires a nonzero observed exit."}))}),Xe=e.object({failedAttempt:h,failedObservation:h,replacementAttempt:h,goalId:s,basis:e.enum(["explicit_relation","artifact_lineage","unverified"]),attributionEvidence:e.array(h).max(16)}).strict().superRefine((n,t)=>{n.failedAttempt.id===n.replacementAttempt.id&&t.addIssue({code:"custom",message:"A recovery must reference a different attempt."}),n.basis!=="unverified"&&n.attributionEvidence.length===0&&t.addIssue({code:"custom",path:["attributionEvidence"],message:"Recovery attribution needs retained evidence."})}),Ge=e.object({attempt:h,actionHash:g,outcome:e.enum(["passed","failed","unknown"]),verifierRelease:h.nullable(),verifierReceipt:h.nullable(),environmentFingerprint:g,resetStateHash:g.nullable(),outputArtifacts:e.array(Y).max(c.assetsPerEpisode),reason:x(2e3)}).strict().superRefine((n,t)=>{n.outcome!=="unknown"&&(!n.verifierRelease||!n.verifierReceipt)&&t.addIssue({code:"custom",message:"A verification outcome requires an exact verifier and execution receipt."})}),$=e.object({schemaVersion:e.literal("openpond.toolEpisodeEvent.v1"),operationId:s,installationId:s,episodeId:s,eventId:s,sessionId:s,parentSessionId:s.nullable(),turnId:s.nullable(),callId:s,occurredAt:w,sequence:e.number().int().nonnegative(),adapterVersion:e.string().min(1).max(200),sanitization:Le,contentHash:g}).strict(),R=T(e.discriminatedUnion("eventKind",[$.extend({eventKind:e.literal("attempt"),payload:Ve}).strict(),$.extend({eventKind:e.literal("observation"),payload:$e}).strict(),$.extend({eventKind:e.literal("recovery_link"),payload:Xe}).strict(),$.extend({eventKind:e.literal("verification"),payload:Ge}).strict(),$.extend({eventKind:e.literal("lineage"),payload:e.object({relation:e.enum(["fork","split","reopen"]),parentEpisode:h,parentSessionId:s,reason:x(1e3)}).strict()}).strict()]).superRefine((n,t)=>{let{contentHash:o,...i}=n;E(i)!==o&&t.addIssue({code:"custom",path:["contentHash"],message:"Episode event content hash mismatch."})}),c.eventBytes);function ae(n){let t=E(n);if(!n||typeof n!="object"||Array.isArray(n)||Object.hasOwn(n,"contentHash"))throw new Error("tool_episode_unsigned_envelope_required");return R.parse({...n,contentHash:t})}u(ae,"sealToolEpisodeEvent");var Se=T(e.object({schemaVersion:e.literal("openpond.toolEpisodeAppend.v1"),operationId:s,installationId:s,events:e.array(R).min(1).max(c.eventsPerAppend)}).strict().superRefine((n,t)=>{n.events.some(o=>o.installationId!==n.installationId)&&t.addIssue({code:"custom",path:["events"],message:"Append events must belong to the exact installation."}),new Set(n.events.map(o=>o.eventId)).size!==n.events.length&&t.addIssue({code:"custom",path:["events"],message:"Append event IDs must be unique."})}),c.eventBytes*c.eventsPerAppend),Re=e.object({schemaVersion:e.literal("openpond.toolEpisodeAppendReceipt.v1"),operationId:s,requestHash:g,installationId:s,teamId:s,projectId:s,receivedAt:w,events:e.array(e.object({eventId:s,contentHash:g,state:e.enum(["retained","already_retained","privacy_rejected"]),receiptId:s,reason:e.string().max(200).nullable()}).strict()).min(1).max(c.eventsPerAppend),learningEnrollment:e.literal(!1)}).strict();var V=e.object({revision:e.number().int().positive(),permittedTools:e.array(e.string().min(1).max(200)).min(1).max(100),workspaceRootHashes:e.array(g).min(1).max(32),permittedFields:e.array(e.enum(["action","intent","state","result_excerpt","artifact_reference"])).min(1).max(5),unchangedControls:e.object({numerator:e.number().int().nonnegative(),denominator:e.number().int().positive()}).strict(),maximumEventBytes:e.number().int().positive().max(c.eventBytes),maximumEpisodeBytes:e.number().int().positive().max(c.episodeBytes),maximumEpisodeEvents:e.number().int().positive().max(c.eventsPerEpisode),maximumQueueBytes:e.number().int().positive().max(c.queueBytes),maximumQueueEvents:e.number().int().positive().max(c.queueEvents),maximumQueueAgeSeconds:e.number().int().positive().max(c.queueAgeSeconds),rawRetentionDays:e.number().int().min(1).max(30),purposes:e.array(e.enum(["capture","consultation"])).min(1).max(2),modelUpdates:e.literal("requires_separate_review"),variantGeneration:e.literal("disabled")}).strict().superRefine((n,t)=>{n.unchangedControls.numerator>n.unchangedControls.denominator&&t.addIssue({code:"custom",path:["unchangedControls"],message:"Sampling probability cannot exceed one."});for(let o of["permittedTools","workspaceRootHashes","permittedFields","purposes"])new Set(n[o]).size!==n[o].length&&t.addIssue({code:"custom",path:[o],message:"Policy entries must be unique."});(n.maximumEpisodeBytes<n.maximumEventBytes||n.maximumQueueBytes<n.maximumEventBytes)&&t.addIssue({code:"custom",message:"Episode and queue capacities must fit one permitted event."})}),We=e.object({receipt:h.nullable(),start:e.enum(["observed","documented","unsupported","unqualified"]),resume:e.enum(["observed","documented","unsupported","unqualified"]),compaction:e.enum(["observed","documented","unsupported","unqualified"]),executionFailure:e.enum(["observed","documented","unsupported","unqualified"]),processFailure:e.enum(["observed","documented","unsupported","unqualified"]),validationFailure:e.enum(["observed","documented","unsupported","unqualified"]),nestedCalls:e.enum(["observed","documented","unsupported","unqualified"]),contextRefresh:e.enum(["session_start","start_resume","start_resume_compaction","revision_aware_turn","unqualified"]),gaps:e.array(e.string().min(1).max(500)).max(32)}).strict().superRefine((n,t)=>{Object.values(n).includes("observed")&&!n.receipt&&t.addIssue({code:"custom",path:["receipt"],message:"Observed coverage requires a qualification receipt."})}),we=T(e.object({schemaVersion:e.literal("openpond.toolLearningRegistration.v1"),operationId:s,installationId:s,projectId:s,machineSourceId:s,client:K,clientVersion:e.string().min(1).max(200),adapterRelease:h,collectionPolicy:V}).strict(),c.eventBytes),H=e.object({schemaVersion:e.literal("openpond.toolLearningInstallation.v1"),id:s,revision:e.number().int().positive(),scope:C,ownerUserId:s,machineSourceId:s,client:K,clientVersion:e.string().min(1).max(200),adapterRelease:h,state:e.enum(["pending_client_trust","enabled","disabled","revoked"]),collectionPolicy:V,collectionPolicyHash:g,coverage:We,credential:e.object({id:s,expiresAt:w,revokedAt:w.nullable(),capabilities:e.array(e.enum(["episode_append","manifest_read","consultation_submit","consultation_read"])).min(1).max(4)}).strict().nullable(),createdAt:w,updatedAt:w}).strict(),Ne=e.object({operationId:s,expectedRevision:e.number().int().positive(),state:e.enum(["enabled","disabled","revoked"])}).strict(),Ct=e.object({schemaVersion:e.literal("openpond.toolEpisodeOrigin.v1"),installationId:s,projectId:s,ownerUserId:s,episode:h,event:h,appendReceipt:h,purpose:e.literal("private_dataset_evidence"),trainingConsent:e.literal("not_granted")}).strict();import{DatabaseSync as Qe}from"node:sqlite";import{chmodSync as Ce,closeSync as Ze,existsSync as je,lstatSync as ce,mkdirSync as et,openSync as tt}from"node:fs";import{join as He}from"node:path";var Z=e.object({id:s,application:e.string().min(1).max(200),versions:e.array(e.string().min(1).max(200)).min(1).max(32),tools:e.array(e.string().min(1).max(200)).min(1).max(32),mode:e.literal("recovery"),routingInstruction:x(2e3),qualification:e.discriminatedUnion("kind",[e.object({kind:e.literal("integration"),receipt:h}).strict(),e.object({kind:e.literal("learned"),receipt:h,trainingRun:h,adapter:h,evaluation:h,activation:h}).strict()])}).strict(),Je=e.object({schemaVersion:e.literal("openpond.toolLearningManifest.v1"),installationId:s,scope:C,revision:e.number().int().positive(),contentHash:g,issuedAt:w,expiresAt:w,modelRelease:h,responseSchema:e.literal("openpond.toolLearningDecision.v1"),capabilities:e.array(Z).max(c.capabilities)}).strict().superRefine((n,t)=>{let{contentHash:o,...i}=n;E(i)!==o&&t.addIssue({code:"custom",path:["contentHash"],message:"Manifest content hash mismatch."});let a=Date.parse(n.expiresAt)-Date.parse(n.issuedAt);(a<=0||a>c.manifestSeconds*1e3)&&t.addIssue({code:"custom",path:["expiresAt"],message:"Manifest expiry exceeds the supported lifetime."}),new Set(n.capabilities.map(l=>l.id)).size!==n.capabilities.length&&t.addIssue({code:"custom",path:["capabilities"],message:"Capability IDs must be unique."})}),Oe=T(Je,c.consultationBytes),O=T(e.object({schemaVersion:e.literal("openpond.toolLearningConsultation.v1"),operationId:s,installationId:s,scope:C,sessionId:s,callId:s,capabilityId:s,manifestHash:g,modelRelease:h,mode:e.literal("recovery"),intent:x(2e3),action:P,actionHash:g,environment:j,contextHash:g,failure:e.object({message:x(c.resultBytes),observation:h}).strict(),round:e.number().int().min(1).max(c.consultationRounds)}).strict().superRefine((n,t)=>{E(n.action)!==n.actionHash&&t.addIssue({code:"custom",path:["actionHash"],message:"Consultation action hash mismatch."}),E({intent:n.intent,environment:n.environment,failure:n.failure})!==n.contextHash&&t.addIssue({code:"custom",path:["contextHash"],message:"Consultation context hash mismatch."})}),c.consultationBytes),se=e.discriminatedUnion("decision",[e.object({decision:e.literal("proceed")}).strict(),e.object({decision:e.literal("revise"),issues:e.array(e.object({category:e.string().min(1).max(120),feedback:x(2e3)}).strict()).min(1).max(8)}).strict(),e.object({decision:e.literal("needs_context"),missing:e.array(e.object({field:e.string().min(1).max(120),reason:x(500)}).strict()).min(1).max(8)}).strict()]),Ae={operationId:s,installationId:s,capabilityId:s,manifestHash:g,modelRelease:h,actionHash:g,contextHash:g},Ye=T(e.discriminatedUnion("state",[e.object({schemaVersion:e.literal("openpond.toolLearningDecision.v1"),...Ae,state:e.literal("completed"),decision:se,usageReceipt:h,completedAt:w}).strict(),e.object({schemaVersion:e.literal("openpond.toolLearningDecision.v1"),...Ae,state:e.literal("unavailable"),reason:e.enum(["disabled","revoked","expired_manifest","unsupported_scope","budget_exhausted","timeout","invalid_output","cancelled","dispatch_uncertain"]),usageReceipt:h.nullable()}).strict()]),c.consultationBytes);function re(n,t){let o=O.parse(n),i=Ye.parse(t);for(let a of["operationId","installationId","capabilityId","manifestHash","actionHash","contextHash"])if(o[a]!==i[a])throw new Error(`tool_learning_consultation_${a}_mismatch`);if(o.modelRelease.id!==i.modelRelease.id||o.modelRelease.contentHash!==i.modelRelease.contentHash)throw new Error("tool_learning_consultation_model_mismatch");return i}u(re,"assertToolLearningConsultationResponse");function le(n,t){let o=R.parse(n),i=V.parse(t);if(!i.purposes.includes("capture"))throw new Error("tool_learning_capture_not_enabled");if(o.sanitization.policyRevision!==i.revision||o.sanitization.policyHash!==E(i))throw new Error("tool_learning_capture_policy_changed");if(new TextEncoder().encode(JSON.stringify(o)).byteLength>i.maximumEventBytes)throw new Error("tool_learning_event_policy_limit");let a=u(l=>i.permittedFields.includes(l),"permits");if(o.eventKind==="attempt"){if(!i.permittedTools.includes(o.payload.tool.name))throw new Error("tool_learning_tool_outside_collection_policy");if(!a("action")||!a("intent")&&o.payload.intent!==""||!a("state")&&Object.keys(o.payload.environment.state).length>0||!a("artifact_reference")&&o.payload.contextAssets.length>0)throw new Error("tool_learning_attempt_field_outside_collection_policy")}if(o.eventKind==="observation"&&(!a("result_excerpt")&&(o.payload.resultExcerpt!==""||o.payload.outcome==="failed"&&o.payload.message!=="")||!a("artifact_reference")&&o.payload.assets.length>0))throw new Error("tool_learning_result_field_outside_collection_policy");if(o.eventKind==="verification"&&(!a("result_excerpt")&&o.payload.reason!==""||!a("artifact_reference")&&o.payload.outputArtifacts.length>0))throw new Error("tool_learning_verification_field_outside_collection_policy");if(o.eventKind==="lineage"&&!a("intent")&&o.payload.reason!=="")throw new Error("tool_learning_lineage_field_outside_collection_policy")}u(le,"assertToolEpisodeCapturePolicy");var de=e.object({schemaVersion:e.literal("openpond.localToolLearningInstallation.v1"),id:s,teamId:s,projectId:s,client:K,workspaceRoot:e.string().min(1).max(4e3),enabled:e.boolean(),policy:V,createdAt:e.iso.datetime({offset:!0})}).strict(),X=class{static{u(this,"ToolLearningLocalStore")}db;constructor(n){let t=He(n,"tool-learning");if(je(t)&&ce(t).isSymbolicLink())throw new Error("tool_learning_directory_symlink_forbidden");et(t,{recursive:!0,mode:448}),Ce(t,448);let o=He(t,"queue.sqlite");if(je(o)){if(!ce(o).isFile()||ce(o).isSymbolicLink())throw new Error("tool_learning_queue_file_invalid")}else Ze(tt(o,"wx",384));Ce(o,384),this.db=new Qe(o),this.db.exec("PRAGMA busy_timeout = 3000; PRAGMA journal_mode = WAL; PRAGMA synchronous = FULL;"),this.db.exec(`
|
|
2
|
+
import{b as oe}from"./chunk-YG3HITOU.js";import{b as be}from"./chunk-F64TR23C.js";import{f as J}from"./chunk-RGSMU6N4.js";import{m as L}from"./chunk-HIQPGYVH.js";import{o as ye}from"./chunk-3VT2PPKW.js";import{l as W}from"./chunk-ZEOYNUHL.js";import{v as B}from"./chunk-ZY32SZ2P.js";import{I as Ee,K as Te}from"./chunk-SV7ZBEK2.js";import{c as M,d as z,e as Ie,n as y}from"./chunk-RCT3O3HQ.js";import{f as ve}from"./chunk-UGOK7VTC.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as u}from"./chunk-FTQLQJQV.js";var c=Object.freeze({eventBytes:65536,actionBytes:16384,resultBytes:8192,stateBytes:8192,eventsPerAppend:32,eventsPerEpisode:256,episodeBytes:2097152,assetBytes:1048576,assetsPerEpisode:16,queueBytes:52428800,queueEvents:5e3,queueAgeSeconds:86400,capabilities:32,consultationRounds:3,consultationBytes:65536,manifestSeconds:300}),s=M,g=z,w=Ie,K=e.enum(["codex","claude_code","opencode","openpond"]),h=e.object({id:M,contentHash:z}).strict(),C=e.object({teamId:M,projectId:M}).strict();function T(n,t){return e.preprocess((o,i)=>{try{B(o,t)}catch{return i.addIssue({code:"custom",message:"Tool learning data exceeds its JSON boundary."}),e.NEVER}return o},n)}u(T,"boundedToolLearningSchema");function x(n){return e.string().max(n).refine(t=>new TextEncoder().encode(t).byteLength<=n,"Tool learning text exceeds its UTF-8 byte limit.")}u(x,"toolLearningText");var ze=T(e.record(e.string().min(1).max(120),e.union([x(2e3),e.number().finite(),e.boolean(),e.null()])).refine(n=>Object.keys(n).length<=32,"Use at most 32 explicit state fields."),c.stateBytes),j=e.object({application:e.string().trim().min(1).max(200),version:e.string().trim().min(1).max(200),state:ze,fingerprint:z}).strict(),Y=e.object({id:M,contentHash:z,mediaType:e.enum(["text/plain","application/json","text/x-python","text/x-diff"]),sizeBytes:e.number().int().nonnegative().max(c.assetBytes),purpose:e.enum(["action","result","state","verification"])}).strict(),Le=e.object({policyRevision:e.number().int().positive(),policyHash:z,redactedFields:e.number().int().nonnegative().max(1e4),omittedFields:e.number().int().nonnegative().max(1e4),truncated:e.boolean()}).strict();function E(n,t=c.eventBytes){return B(n,t),y(n)}u(E,"toolLearningContentHash");var Q=x(c.actionBytes),xe=e.string().min(1).max(1e3).refine(n=>!n.startsWith("/")&&!n.includes("\\")&&!/^[A-Za-z]:/u.test(n)&&n.split("/").every(t=>t!==""&&t!=="."&&t!==".."),"Use a workspace-relative artifact path."),P=T(e.discriminatedUnion("kind",[e.object({kind:e.literal("python"),code:Q}).strict(),e.object({kind:e.literal("shell"),command:Q,shell:e.string().min(1).max(120)}).strict(),e.object({kind:e.literal("tool_arguments"),arguments:e.record(e.string().min(1).max(200),e.json())}).strict(),e.object({kind:e.literal("edit"),patch:Q,baseFiles:e.array(e.object({path:xe,contentHash:g.nullable()}).strict()).min(1).max(32)}).strict()]),c.actionBytes),yt=e.discriminatedUnion("kind",[e.object({kind:e.literal("replacement"),expectedActionHash:g,environmentFingerprint:g,action:P}).strict(),e.object({kind:e.literal("patch"),expectedActionHash:g,environmentFingerprint:g,files:e.array(e.object({path:xe,expectedContentHash:g,patch:Q}).strict()).min(1).max(16)}).strict()]);var Ve=e.object({intent:x(2e3),tool:e.object({name:e.string().min(1).max(200),version:e.string().max(200).nullable(),server:e.string().max(200).nullable()}).strict(),action:P,actionHash:g,environment:j,contextAssets:e.array(Y).max(c.assetsPerEpisode),selection:e.discriminatedUnion("kind",[e.object({kind:e.literal("eligible_attempt")}).strict(),e.object({kind:e.literal("unchanged_control"),numerator:e.number().int().positive(),denominator:e.number().int().positive(),policyHash:g}).strict()])}).strict().superRefine((n,t)=>{E(n.action)!==n.actionHash&&t.addIssue({code:"custom",path:["actionHash"],message:"Action bytes differ from their hash."}),n.selection.kind==="unchanged_control"&&n.selection.numerator>n.selection.denominator&&t.addIssue({code:"custom",path:["selection"],message:"Sampling probability cannot exceed one."})}),Ke=e.enum(["validation_failure","execution_failure","process_failure","timeout","cancelled","infrastructure_failure","authorization_denied","outcome_failure","unknown_failure"]),ie={attempt:h,actionHash:g,execution:e.enum(["not_executed","executed","unknown"]),sideEffects:e.enum(["none","possible","observed","unknown"]),resultExcerpt:x(c.resultBytes),resultHash:g.nullable(),assets:e.array(Y).max(c.assetsPerEpisode)},$e=e.discriminatedUnion("outcome",[e.object({...ie,outcome:e.literal("succeeded"),exitCode:e.literal(0).nullable()}).strict(),e.object({...ie,outcome:e.literal("failed"),classification:Ke,errorCode:e.string().min(1).max(200),message:x(2e3),exitCode:e.number().int().min(-255).max(255).nullable()}).strict(),e.object({...ie,outcome:e.literal("incomplete"),reason:e.enum(["completion_not_observed","observer_restarted","transport_interrupted","coverage_gap"])}).strict()]).superRefine((n,t)=>{n.execution==="not_executed"&&n.sideEffects!=="none"&&t.addIssue({code:"custom",path:["sideEffects"],message:"An unexecuted action cannot claim tool effects."}),n.outcome==="succeeded"&&n.execution!=="executed"&&t.addIssue({code:"custom",path:["execution"],message:"Successful execution requires an observed execution."}),n.outcome==="failed"&&(n.classification==="validation_failure"&&n.execution!=="not_executed"&&t.addIssue({code:"custom",path:["execution"],message:"Pre-execution validation failure must be unexecuted."}),n.classification==="process_failure"&&(n.execution!=="executed"||n.exitCode===null||n.exitCode===0)&&t.addIssue({code:"custom",path:["exitCode"],message:"Process failure requires a nonzero observed exit."}))}),Xe=e.object({failedAttempt:h,failedObservation:h,replacementAttempt:h,goalId:s,basis:e.enum(["explicit_relation","artifact_lineage","unverified"]),attributionEvidence:e.array(h).max(16)}).strict().superRefine((n,t)=>{n.failedAttempt.id===n.replacementAttempt.id&&t.addIssue({code:"custom",message:"A recovery must reference a different attempt."}),n.basis!=="unverified"&&n.attributionEvidence.length===0&&t.addIssue({code:"custom",path:["attributionEvidence"],message:"Recovery attribution needs retained evidence."})}),Ge=e.object({attempt:h,actionHash:g,outcome:e.enum(["passed","failed","unknown"]),verifierRelease:h.nullable(),verifierReceipt:h.nullable(),environmentFingerprint:g,resetStateHash:g.nullable(),outputArtifacts:e.array(Y).max(c.assetsPerEpisode),reason:x(2e3)}).strict().superRefine((n,t)=>{n.outcome!=="unknown"&&(!n.verifierRelease||!n.verifierReceipt)&&t.addIssue({code:"custom",message:"A verification outcome requires an exact verifier and execution receipt."})}),$=e.object({schemaVersion:e.literal("openpond.toolEpisodeEvent.v1"),operationId:s,installationId:s,episodeId:s,eventId:s,sessionId:s,parentSessionId:s.nullable(),turnId:s.nullable(),callId:s,occurredAt:w,sequence:e.number().int().nonnegative(),adapterVersion:e.string().min(1).max(200),sanitization:Le,contentHash:g}).strict(),R=T(e.discriminatedUnion("eventKind",[$.extend({eventKind:e.literal("attempt"),payload:Ve}).strict(),$.extend({eventKind:e.literal("observation"),payload:$e}).strict(),$.extend({eventKind:e.literal("recovery_link"),payload:Xe}).strict(),$.extend({eventKind:e.literal("verification"),payload:Ge}).strict(),$.extend({eventKind:e.literal("lineage"),payload:e.object({relation:e.enum(["fork","split","reopen"]),parentEpisode:h,parentSessionId:s,reason:x(1e3)}).strict()}).strict()]).superRefine((n,t)=>{let{contentHash:o,...i}=n;E(i)!==o&&t.addIssue({code:"custom",path:["contentHash"],message:"Episode event content hash mismatch."})}),c.eventBytes);function ae(n){let t=E(n);if(!n||typeof n!="object"||Array.isArray(n)||Object.hasOwn(n,"contentHash"))throw new Error("tool_episode_unsigned_envelope_required");return R.parse({...n,contentHash:t})}u(ae,"sealToolEpisodeEvent");var Se=T(e.object({schemaVersion:e.literal("openpond.toolEpisodeAppend.v1"),operationId:s,installationId:s,events:e.array(R).min(1).max(c.eventsPerAppend)}).strict().superRefine((n,t)=>{n.events.some(o=>o.installationId!==n.installationId)&&t.addIssue({code:"custom",path:["events"],message:"Append events must belong to the exact installation."}),new Set(n.events.map(o=>o.eventId)).size!==n.events.length&&t.addIssue({code:"custom",path:["events"],message:"Append event IDs must be unique."})}),c.eventBytes*c.eventsPerAppend),Re=e.object({schemaVersion:e.literal("openpond.toolEpisodeAppendReceipt.v1"),operationId:s,requestHash:g,installationId:s,teamId:s,projectId:s,receivedAt:w,events:e.array(e.object({eventId:s,contentHash:g,state:e.enum(["retained","already_retained","privacy_rejected"]),receiptId:s,reason:e.string().max(200).nullable()}).strict()).min(1).max(c.eventsPerAppend),learningEnrollment:e.literal(!1)}).strict();var V=e.object({revision:e.number().int().positive(),permittedTools:e.array(e.string().min(1).max(200)).min(1).max(100),workspaceRootHashes:e.array(g).min(1).max(32),permittedFields:e.array(e.enum(["action","intent","state","result_excerpt","artifact_reference"])).min(1).max(5),unchangedControls:e.object({numerator:e.number().int().nonnegative(),denominator:e.number().int().positive()}).strict(),maximumEventBytes:e.number().int().positive().max(c.eventBytes),maximumEpisodeBytes:e.number().int().positive().max(c.episodeBytes),maximumEpisodeEvents:e.number().int().positive().max(c.eventsPerEpisode),maximumQueueBytes:e.number().int().positive().max(c.queueBytes),maximumQueueEvents:e.number().int().positive().max(c.queueEvents),maximumQueueAgeSeconds:e.number().int().positive().max(c.queueAgeSeconds),rawRetentionDays:e.number().int().min(1).max(30),purposes:e.array(e.enum(["capture","consultation"])).min(1).max(2),modelUpdates:e.literal("requires_separate_review"),variantGeneration:e.literal("disabled")}).strict().superRefine((n,t)=>{n.unchangedControls.numerator>n.unchangedControls.denominator&&t.addIssue({code:"custom",path:["unchangedControls"],message:"Sampling probability cannot exceed one."});for(let o of["permittedTools","workspaceRootHashes","permittedFields","purposes"])new Set(n[o]).size!==n[o].length&&t.addIssue({code:"custom",path:[o],message:"Policy entries must be unique."});(n.maximumEpisodeBytes<n.maximumEventBytes||n.maximumQueueBytes<n.maximumEventBytes)&&t.addIssue({code:"custom",message:"Episode and queue capacities must fit one permitted event."})}),We=e.object({receipt:h.nullable(),start:e.enum(["observed","documented","unsupported","unqualified"]),resume:e.enum(["observed","documented","unsupported","unqualified"]),compaction:e.enum(["observed","documented","unsupported","unqualified"]),executionFailure:e.enum(["observed","documented","unsupported","unqualified"]),processFailure:e.enum(["observed","documented","unsupported","unqualified"]),validationFailure:e.enum(["observed","documented","unsupported","unqualified"]),nestedCalls:e.enum(["observed","documented","unsupported","unqualified"]),contextRefresh:e.enum(["session_start","start_resume","start_resume_compaction","revision_aware_turn","unqualified"]),gaps:e.array(e.string().min(1).max(500)).max(32)}).strict().superRefine((n,t)=>{Object.values(n).includes("observed")&&!n.receipt&&t.addIssue({code:"custom",path:["receipt"],message:"Observed coverage requires a qualification receipt."})}),we=T(e.object({schemaVersion:e.literal("openpond.toolLearningRegistration.v1"),operationId:s,installationId:s,projectId:s,machineSourceId:s,client:K,clientVersion:e.string().min(1).max(200),adapterRelease:h,collectionPolicy:V}).strict(),c.eventBytes),H=e.object({schemaVersion:e.literal("openpond.toolLearningInstallation.v1"),id:s,revision:e.number().int().positive(),scope:C,ownerUserId:s,machineSourceId:s,client:K,clientVersion:e.string().min(1).max(200),adapterRelease:h,state:e.enum(["pending_client_trust","enabled","disabled","revoked"]),collectionPolicy:V,collectionPolicyHash:g,coverage:We,credential:e.object({id:s,expiresAt:w,revokedAt:w.nullable(),capabilities:e.array(e.enum(["episode_append","manifest_read","consultation_submit","consultation_read"])).min(1).max(4)}).strict().nullable(),createdAt:w,updatedAt:w}).strict(),Ne=e.object({operationId:s,expectedRevision:e.number().int().positive(),state:e.enum(["enabled","disabled","revoked"])}).strict(),Ct=e.object({schemaVersion:e.literal("openpond.toolEpisodeOrigin.v1"),installationId:s,projectId:s,ownerUserId:s,episode:h,event:h,appendReceipt:h,purpose:e.literal("private_dataset_evidence"),trainingConsent:e.literal("not_granted")}).strict();import{DatabaseSync as Qe}from"node:sqlite";import{chmodSync as Ce,closeSync as Ze,existsSync as je,lstatSync as ce,mkdirSync as et,openSync as tt}from"node:fs";import{join as He}from"node:path";var Z=e.object({id:s,application:e.string().min(1).max(200),versions:e.array(e.string().min(1).max(200)).min(1).max(32),tools:e.array(e.string().min(1).max(200)).min(1).max(32),mode:e.literal("recovery"),routingInstruction:x(2e3),qualification:e.discriminatedUnion("kind",[e.object({kind:e.literal("integration"),receipt:h}).strict(),e.object({kind:e.literal("learned"),receipt:h,trainingRun:h,adapter:h,evaluation:h,activation:h}).strict()])}).strict(),Je=e.object({schemaVersion:e.literal("openpond.toolLearningManifest.v1"),installationId:s,scope:C,revision:e.number().int().positive(),contentHash:g,issuedAt:w,expiresAt:w,modelRelease:h,responseSchema:e.literal("openpond.toolLearningDecision.v1"),capabilities:e.array(Z).max(c.capabilities)}).strict().superRefine((n,t)=>{let{contentHash:o,...i}=n;E(i)!==o&&t.addIssue({code:"custom",path:["contentHash"],message:"Manifest content hash mismatch."});let a=Date.parse(n.expiresAt)-Date.parse(n.issuedAt);(a<=0||a>c.manifestSeconds*1e3)&&t.addIssue({code:"custom",path:["expiresAt"],message:"Manifest expiry exceeds the supported lifetime."}),new Set(n.capabilities.map(l=>l.id)).size!==n.capabilities.length&&t.addIssue({code:"custom",path:["capabilities"],message:"Capability IDs must be unique."})}),Oe=T(Je,c.consultationBytes),O=T(e.object({schemaVersion:e.literal("openpond.toolLearningConsultation.v1"),operationId:s,installationId:s,scope:C,sessionId:s,callId:s,capabilityId:s,manifestHash:g,modelRelease:h,mode:e.literal("recovery"),intent:x(2e3),action:P,actionHash:g,environment:j,contextHash:g,failure:e.object({message:x(c.resultBytes),observation:h}).strict(),round:e.number().int().min(1).max(c.consultationRounds)}).strict().superRefine((n,t)=>{E(n.action)!==n.actionHash&&t.addIssue({code:"custom",path:["actionHash"],message:"Consultation action hash mismatch."}),E({intent:n.intent,environment:n.environment,failure:n.failure})!==n.contextHash&&t.addIssue({code:"custom",path:["contextHash"],message:"Consultation context hash mismatch."})}),c.consultationBytes),se=e.discriminatedUnion("decision",[e.object({decision:e.literal("proceed")}).strict(),e.object({decision:e.literal("revise"),issues:e.array(e.object({category:e.string().min(1).max(120),feedback:x(2e3)}).strict()).min(1).max(8)}).strict(),e.object({decision:e.literal("needs_context"),missing:e.array(e.object({field:e.string().min(1).max(120),reason:x(500)}).strict()).min(1).max(8)}).strict()]),Ae={operationId:s,installationId:s,capabilityId:s,manifestHash:g,modelRelease:h,actionHash:g,contextHash:g},Ye=T(e.discriminatedUnion("state",[e.object({schemaVersion:e.literal("openpond.toolLearningDecision.v1"),...Ae,state:e.literal("completed"),decision:se,usageReceipt:h,completedAt:w}).strict(),e.object({schemaVersion:e.literal("openpond.toolLearningDecision.v1"),...Ae,state:e.literal("unavailable"),reason:e.enum(["disabled","revoked","expired_manifest","unsupported_scope","budget_exhausted","timeout","invalid_output","cancelled","dispatch_uncertain"]),usageReceipt:h.nullable()}).strict()]),c.consultationBytes);function re(n,t){let o=O.parse(n),i=Ye.parse(t);for(let a of["operationId","installationId","capabilityId","manifestHash","actionHash","contextHash"])if(o[a]!==i[a])throw new Error(`tool_learning_consultation_${a}_mismatch`);if(o.modelRelease.id!==i.modelRelease.id||o.modelRelease.contentHash!==i.modelRelease.contentHash)throw new Error("tool_learning_consultation_model_mismatch");return i}u(re,"assertToolLearningConsultationResponse");function le(n,t){let o=R.parse(n),i=V.parse(t);if(!i.purposes.includes("capture"))throw new Error("tool_learning_capture_not_enabled");if(o.sanitization.policyRevision!==i.revision||o.sanitization.policyHash!==E(i))throw new Error("tool_learning_capture_policy_changed");if(new TextEncoder().encode(JSON.stringify(o)).byteLength>i.maximumEventBytes)throw new Error("tool_learning_event_policy_limit");let a=u(l=>i.permittedFields.includes(l),"permits");if(o.eventKind==="attempt"){if(!i.permittedTools.includes(o.payload.tool.name))throw new Error("tool_learning_tool_outside_collection_policy");if(!a("action")||!a("intent")&&o.payload.intent!==""||!a("state")&&Object.keys(o.payload.environment.state).length>0||!a("artifact_reference")&&o.payload.contextAssets.length>0)throw new Error("tool_learning_attempt_field_outside_collection_policy")}if(o.eventKind==="observation"&&(!a("result_excerpt")&&(o.payload.resultExcerpt!==""||o.payload.outcome==="failed"&&o.payload.message!=="")||!a("artifact_reference")&&o.payload.assets.length>0))throw new Error("tool_learning_result_field_outside_collection_policy");if(o.eventKind==="verification"&&(!a("result_excerpt")&&o.payload.reason!==""||!a("artifact_reference")&&o.payload.outputArtifacts.length>0))throw new Error("tool_learning_verification_field_outside_collection_policy");if(o.eventKind==="lineage"&&!a("intent")&&o.payload.reason!=="")throw new Error("tool_learning_lineage_field_outside_collection_policy")}u(le,"assertToolEpisodeCapturePolicy");var de=e.object({schemaVersion:e.literal("openpond.localToolLearningInstallation.v1"),id:s,teamId:s,projectId:s,client:K,workspaceRoot:e.string().min(1).max(4e3),enabled:e.boolean(),policy:V,createdAt:e.iso.datetime({offset:!0})}).strict(),X=class{static{u(this,"ToolLearningLocalStore")}db;constructor(n){let t=He(n,"tool-learning");if(je(t)&&ce(t).isSymbolicLink())throw new Error("tool_learning_directory_symlink_forbidden");et(t,{recursive:!0,mode:448}),Ce(t,448);let o=He(t,"queue.sqlite");if(je(o)){if(!ce(o).isFile()||ce(o).isSymbolicLink())throw new Error("tool_learning_queue_file_invalid")}else Ze(tt(o,"wx",384));Ce(o,384),this.db=new Qe(o),this.db.exec("PRAGMA busy_timeout = 3000; PRAGMA journal_mode = WAL; PRAGMA synchronous = FULL;"),this.db.exec(`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS installations (id TEXT PRIMARY KEY, payload TEXT NOT NULL);
|
|
4
4
|
CREATE TABLE IF NOT EXISTS events (
|
|
5
5
|
id TEXT PRIMARY KEY, installation_id TEXT NOT NULL, episode_id TEXT NOT NULL,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{Jg as l,Mg as h,Ng as E,Og as w,Ug as f,aa as d,he as u,ra as p}from"./chunk-ZQOJLPWD.js";import{c as i,f as m,h as g}from"./chunk-3M53YXEI.js";import{a as c}from"./chunk-FTQLQJQV.js";var M=new Set(["hosted-engram-capability","hosted-compile-engram","hosted-prepare-engram","hosted-start-engram","hosted-cancel-engram","hosted-engram-execution","hosted-engram-executions","hosted-save-engram-model","hosted-control-engram-serving"]);async function k(x){let{action:r,target:s,teamId:n,options:o,client:t,readInput:y}=x;if(r==="hosted-engram-execution"){if(!s)throw new Error("Supply the original Engram execution ID.");return t.getEngramExecution(n,s)}if(r==="hosted-engram-executions"){if(s)throw new Error("List Engram executions using filters.");let e=f.parse(Object.fromEntries(Object.entries({id:i(o,"id")||void 0,projectId:i(o,"projectId")||void 0,phase:i(o,"phase")||void 0,cursor:i(o,"cursor")||void 0,limit:g(o.limit,"--limit")}).filter(([,I])=>I!==void 0)));return t.listEngramExecutions(n,e)}let a=await y();if(r==="hosted-control-engram-serving"){let e=p.parse(a);if(e.request.teamId!==n)throw new Error("Use the Model's original workspace.");if(e.request.action==="activate"&&!m(o.yes))throw new Error("Activating billed serving capacity requires --yes.");return t.controlEngramModelServing(e.modelProjectId,e.request)}if(r==="hosted-engram-capability"){let e=u.parse(a);if(e.teamId!==n)throw new Error("Use this input's original workspace.");return t.engramExecutionCapability(e)}if(r==="hosted-compile-engram"){let e=l.parse(a);if(e.teamId!==n)throw new Error("Use this input's original workspace.");return t.compileEngramExecution(e)}if(r==="hosted-prepare-engram"){let e=h.parse(a);if(e.teamId!==n)throw new Error("Use this input's original workspace.");return t.prepareEngramExecution(e)}if(r==="hosted-start-engram"){let e=E.parse(a);if(e.teamId!==n)throw new Error("Use this execution's original workspace.");if(!m(o.yes))throw new Error("Starting paid Engram training requires --yes.");return t.startEngramExecution(e)}if(r==="hosted-cancel-engram"){let e=w.parse(a);if(e.teamId!==n)throw new Error("Use this execution's original workspace.");return t.cancelEngramExecution(e)}if(r==="hosted-save-engram-model"){let e=d.parse(a);if(e.teamId!==n)throw new Error("Use this result's original workspace.");return t.saveEngramResultModel(e)}throw new Error("Unsupported Engram command.")}c(k,"runHostedEngramCommand");export{M as a,k as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as bt,c as at}from"./chunk-GF55VEMR.js";import{I as At,L as ne,b as Y,fa as st,ob as Pt,pb as Rt,qb as oe,ub as re,vb as se,xb as ae}from"./chunk-
|
|
2
|
+
import{a as bt,c as at}from"./chunk-GF55VEMR.js";import{I as At,L as ne,b as Y,fa as st,ob as Pt,pb as Rt,qb as oe,ub as re,vb as se,xb as ae}from"./chunk-HHLQG7PN.js";import{S as mt,T as ee,U as vt,e as qt}from"./chunk-SV7ZBEK2.js";import{I as te}from"./chunk-2MEOUS24.js";import{e as Zt,f as Qt}from"./chunk-HNQPEOJD.js";import{A as y}from"./chunk-X2J2P5ZT.js";import{a as s}from"./chunk-FTQLQJQV.js";var Ko=y.object({id:y.string(),location:y.literal("local"),sessionId:y.string().nullable(),modelRef:Qt.nullable(),revision:y.number().int().positive(),remoteAccessEnabled:y.literal(!1),hostedSandboxesEnabled:y.boolean(),hostedActivation:y.literal("inactive")}),Vo=y.object({sessionId:y.string(),coordinatorId:y.string(),coordinatorSessionId:y.string(),owner:y.enum(["ponder","user"]),revision:y.number().int().positive(),assignment:y.string(),creationKey:y.string(),createdAt:y.string(),updatedAt:y.string()}),Jo="You are Pal (Ponder Assisted Learning), the user's persistent desktop coordinator. Delegate bounded assignments to real local agents through openpond_start_agent. Use the exact inputId returned by delegation or follow-up when waiting for completion. Inspect real transcripts/results before synthesizing. Never claim acceptance means completion. Workers are persistent sessions. A user-controlled worker remains observable but you must not send it instructions until the user explicitly returns control. Never launch paid compute, deploy, or expand access without user authority. Local history stays on this desktop. Hosted capabilities are unavailable unless explicitly enabled and authorized. Discover configured models and projects before selecting a worker; do not invent provider availability or paths. Native workers own their context and compaction.";var kt="This native agent is controlled by its parent conversation. You can inspect its transcript; send further instructions through the parent conversation.";function qo(t){if(t.metadata?.nativeWorker===!0&&t.metadata.nativeWorkerCanResume===!1)throw new Error(kt)}s(qo,"assertNativeWorkerDirectInput");import{promises as Ht}from"node:fs";import{createHash as rn}from"node:crypto";import Dt from"node:path";import en from"node:os";import ie from"node:path";function Mt(t){let e=t.trim();return e.startsWith("# AGENTS.md instructions for ")||e.startsWith("<environment_context>")||e.startsWith("<summary>")||e.startsWith("<user_info>")||/^<external_codex_apps_open_page>[\s\S]*<\/external_codex_apps_open_page>$/.test(e)}s(Mt,"isCodexInjectedUserMessage");function pt(t){let e=t.trim(),n=/^<(goal_context|turn_aborted)>\s*([\s\S]*?)\s*<\/\1>$/.exec(e);if(n){let o=n[1];return{kind:o,text:n[2]?.trim()||Et(o)}}return e==="<turn_aborted>"?{kind:"turn_aborted",text:Et("turn_aborted")}:e==="<goal_context>"?{kind:"goal_context",text:Et("goal_context")}:null}s(pt,"codexControlMessage");function Z(t,e){return t.length<=e?t:`${t.slice(0,e)}
|
|
3
3
|
|
|
4
4
|
[truncated ${t.length-e} characters from Codex history]`}s(Z,"truncateText");function it(t){return t.replace(/\s+/g," ").trim()}s(it,"normalizeTitleText");function de(t){if(!t.trim())return null;try{return JSON.parse(t)}catch{return null}}s(de,"parseMaybeJson");function tt(t){if(!t.trim())return null;try{return JSON.parse(t)}catch{return null}}s(tt,"parseJson");function _(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}s(_,"asRecord");function l(t){return typeof t=="string"&&t.trim()?t.trim():null}s(l,"stringValue");function j(t){return typeof t=="number"&&Number.isFinite(t)?t:null}s(j,"numberValue");function ce(t){let e=new Map;if(!t)return e;for(let[n,o]of Object.entries(t))typeof o=="string"&&o.trim()&&e.set(n,o.trim());return e}s(ce,"stringMap");function k(t){return t.replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,96)||"item"}s(k,"safeId");function Nt(t){let e=0;for(let n of t)typeof n=="number"&&n>e&&(e=n);return e}s(Nt,"latestMillis");function et(t){let e=Nt(t.map(E));return new Date(e||Date.now()).toISOString()}s(et,"latestIso");function E(t){if(!t)return 0;let e=Date.parse(t);return Number.isFinite(e)?e:0}s(E,"millisFromIso");function J(t){if(typeof t!="string"||!t.trim())return null;let e=t.trim().replace(/(\.\d{3})\d+(Z)$/i,"$1$2"),n=Date.parse(e);return Number.isFinite(n)?new Date(n).toISOString():null}s(J,"isoTimestamp");function le(t){if(t===null)return null;let e=t*1e3;return Number.isFinite(e)?new Date(e).toISOString():null}s(le,"isoFromEpochSeconds");function ue(t){let e=/rollout-(\d{4}-\d{2}-\d{2})T(\d{2})-(\d{2})-(\d{2})-/.exec(ie.basename(t));return e?J(`${e[1]}T${e[2]}:${e[3]}:${e[4]}.000Z`):null}s(ue,"isoFromFileName");function nt(){return process.env.CODEX_HOME?.trim()||ie.join(en.homedir(),".codex")}s(nt,"codexHomePath");function Et(t){return t==="turn_aborted"?"The previous turn was interrupted.":"Goal context updated."}s(Et,"defaultCodexControlText");import{createReadStream as nn}from"node:fs";import{createInterface as on}from"node:readline";async function Q(t,e){let n=nn(t,{encoding:"utf8"}),o=on({input:n,crlfDelay:1/0});for await(let r of o){if(!r.trim())continue;let a=tt(r);a&&e(a)}}s(Q,"readJsonlRecords");function $t(t,e=!1){let n=new Map;async function o(r){let a=await Ht.stat(r),i=e?rn("sha256").update(await Ht.readFile(r)).digest("hex"):"";return`${a.dev}:${a.ino}:${a.size}:${a.mtimeMs}:${a.ctimeMs}:${i}`}return s(o,"signature"),async r=>{let a;try{a=await o(r)}catch{return n.delete(r),t(r)}let i=n.get(r);if(i?.signature===a)return i.value;let d=t(r).then(async c=>(await o(r).catch(()=>null)!==a&&n.get(r)?.value===d&&n.delete(r),c)).catch(c=>{throw n.get(r)?.value===d&&n.delete(r),c});return n.set(r,{signature:a,value:d}),n.size>4&&n.delete(n.keys().next().value),d}}s($t,"cachedFileReader");var sn=$t(cn),an=$t(ln,!0),dn=$t(un,!0),me=s(t=>sn(Dt.join(t,"history.jsonl")),"readPromptHistory"),pe=s(t=>an(Dt.join(t,"session_index.jsonl")),"readSessionIndex"),ge=s(t=>dn(Dt.join(t,".codex-global-state.json")),"readGlobalState");async function cn(t){let e=new Map;return await Q(t,n=>{let o=_(n),r=l(o?.session_id),a=l(o?.text)??"",i=le(j(o?.ts));if(!r||!/\S/.test(a)||!i)return;let d=e.get(r)??{firstPrompt:null,latestPrompt:null,firstAt:null,latestAt:null};(!d.firstAt||E(i)<E(d.firstAt))&&(d.firstAt=i,d.firstPrompt=it(a).slice(0,160)),(!d.latestAt||E(i)>E(d.latestAt))&&(d.latestAt=i),e.set(r,d)}).catch(()=>{}),e}s(cn,"parsePromptHistory");async function ln(t){let e=new Map;return await Q(t,n=>{let o=_(n),r=l(o?.id);r&&e.set(r,{id:r,threadName:it(l(o?.thread_name)??"")||null,updatedAt:J(l(o?.updated_at))})}).catch(()=>{}),e}s(ln,"parseSessionIndex");async function un(t){let e;try{e=JSON.parse(await Ht.readFile(t,"utf8"))}catch{e=null}let n=_(e);return{workspaceRootHints:ce(_(n?.["thread-workspace-root-hints"]))}}s(un,"parseGlobalState");import{createReadStream as On,existsSync as Pe,mkdirSync as Fn,promises as Ln,readFileSync as jn,statSync as Gt,writeFileSync as Bn}from"node:fs";import xt from"node:os";import M from"node:path";import{createInterface as zn}from"node:readline";import{promises as gt}from"node:fs";import O from"node:path";var mn=12e4,pn=15*1024*1024,dt=2*1024*1024,fe=new Map([[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".png","image/png"],[".webp","image/webp"]]),gn=new Set(fe.values()),fn=new Set(["application/javascript","application/json","application/ld+json","application/sql","application/toml","application/typescript","application/x-httpd-php","application/x-javascript","application/x-sh","application/x-yaml","application/xml","application/yaml"]),hn=new Set([".c",".cc",".cpp",".css",".csv",".go",".h",".html",".java",".js",".json",".jsx",".log",".md",".mdx",".php",".py",".rb",".rs",".sh",".sql",".toml",".ts",".tsx",".txt",".xml",".yaml",".yml"]);async function _r(t){let e=t.attachments??[];if(e.length===0)return[];let n=O.join(t.attachmentRootDir,A(t.sessionId),A(t.turnId)),o=new Set,r=[];for(let[a,i]of e.entries()){let c={...he(i),...i.text?{text:i.text}:{}};if(i.contentsBase64){await gt.mkdir(n,{recursive:!0});let m=_n(i.relativePath||i.name,o,a+1),u=O.join(n,m);await gt.mkdir(O.dirname(u),{recursive:!0});let f=Buffer.from(i.contentsBase64,"base64"),p=await mt(t.storageHome,{owner:{domain:"chat_attachment",id:JSON.stringify([t.sessionId,t.turnId,m])},displayName:i.name,mediaType:i.mediaType,bytes:f});await qt(u,f),c.localPath=p.path,c.storageName=m}r.push(c)}return r}s(_r,"materializeChatAttachments");function Tr(t,e){let n=new Map(e?.materialized.map(o=>[o.id,o])??[]);return(t??[]).map(o=>{let r=he(o),a=n.get(o.id),i=K(o.mediaType,a?.storageName??o.name);return e&&r.kind==="image"&&a?.localPath&&a.storageName&&i?{...r,imagePreview:{sessionId:e.sessionId,turnId:e.turnId,attachmentId:o.id,storageName:a.storageName,contentType:i}}:e&&a?.localPath&&a.storageName&&o.sizeBytes<=dt&&ct(o.mediaType,a.storageName)?{...r,filePreview:{sessionId:e.sessionId,turnId:e.turnId,attachmentId:o.id,storageName:a.storageName,contentType:o.mediaType}}:r})}s(Tr,"chatAttachmentSummaries");function Cr(t){if(!t||t.length===0)return"";let e=["<attachments>",`The user attached ${t.length} file${t.length===1?"":"s"} with this message.`],n=mn;for(let[o,r]of t.entries()){let a=r.localPath?` Saved locally at: ${r.localPath}`:"";e.push(`${o+1}. ${r.name} (${r.mediaType}, ${Tn(r.sizeBytes)}, ${r.kind}).${a}`);let i=r.text?.trim();if(i&&n>0){let d=i.length>n?`${i.slice(0,Math.max(0,n-34))}
|
|
5
5
|
[attachment text truncated]`:i;e.push("Text content:"),e.push("~~~text"),e.push(d),e.push("~~~"),n-=d.length}}return e.push("</attachments>"),e.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as Ne,d as qe,e as De}from"./chunk-
|
|
2
|
+
import{a as Ne,d as qe,e as De}from"./chunk-NGTNI3YX.js";import{a as te}from"./chunk-OIIE5GUK.js";import{b as Ee,c as ke,h as Ue}from"./chunk-PKJHN666.js";import{b as ee}from"./chunk-PYNW5OFA.js";import{Z as b,ba as Me}from"./chunk-6I5AUTVO.js";import{j as Ae,p as Oe,r as _e,s as He}from"./chunk-2ACX7IW5.js";import{e as Ce}from"./chunk-FDYWGE2Y.js";import{Mb as H,Qb as W,Rb as xe,a as $,w as F,x as N}from"./chunk-HHLQG7PN.js";import{h as _,i as Pe}from"./chunk-6ESBAHWK.js";import{a as Q,b as Te}from"./chunk-F64TR23C.js";import{v as Ie}from"./chunk-OTDDXEQ6.js";import{X as he,Y as ve,_ as Z,b as le,ba as we,c as ue,ea as be,fa as V,ja as Se,la as ye,ma as Re,p as ce,r as pe,s as de,t as me,u as ge,w as fe}from"./chunk-SV7ZBEK2.js";import{z as M}from"./chunk-2MEOUS24.js";import{c as ie,d as B,f as ae,h as U}from"./chunk-UGOK7VTC.js";import{A as o}from"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as ne}from"node:fs";import mt from"node:os";import gt from"node:path";import{createServer as ft}from"node:http";import{randomBytes as ht}from"node:crypto";var it=o.discriminatedUnion("op",[o.strictObject({op:o.literal("set"),path:o.array(o.string().min(1)).min(1),value:o.unknown()}),o.strictObject({op:o.literal("unset"),path:o.array(o.string().min(1)).min(1)})]),at=o.discriminatedUnion("action",[o.strictObject({action:o.literal("patch"),expectedRevision:o.string(),operations:o.array(it).max(100)}),o.strictObject({action:o.literal("replace"),expectedRevision:o.string(),text:o.string().max(1048576)}),o.strictObject({action:o.literal("validate"),text:o.string().max(1048576)}),o.strictObject({action:o.literal("restore"),expectedRevision:o.string(),revision:o.string()}),o.strictObject({action:o.literal("trust"),root:o.string(),accountId:o.string(),trusted:o.boolean()}),o.strictObject({action:o.literal("client-state"),owner:o.string(),patch:Se,importOnly:o.boolean().optional()})]);function Be(n,e){let t=null;async function r(i,a){let c=U(n).config,p=null,u=null,m=null;try{p=await ue(c),m=await V(n,{projectRoot:i,accountId:a}),i||(t=m)}catch(I){u=B(I,c)}let w=m??(i?null:t);return{path:c,text:p,rawRevision:le(p),issue:u,effective:w,usingLastValid:!m&&!!w,applies:"next_turn",recoverableRevisions:await pe(n),clientState:u?null:await ye(n)}}l(r,"status");async function s(i){let a=at.parse(i);if(a.action==="validate")return{valid:!0,document:ce(a.text,U(n).config)};if(a.action==="client-state")return Re(n,a.owner,a.patch,a.importOnly);let c=l(async()=>{a.action==="patch"&&await fe(n,a.expectedRevision,a.operations),a.action==="replace"&&await de(n,a.expectedRevision,a.text),a.action==="restore"&&await me(n,a.revision,a.expectedRevision),a.action==="trust"&&await be(n,a.root,a.accountId,a.trusted)},"mutation");return e?await e(c):await c(),r()}return l(s,"mutate"),{status:r,mutate:s,schema:ge}}l(Be,"createConfigurationPayloads");import{Buffer as Fe}from"node:buffer";var G={"Access-Control-Allow-Headers":"authorization, content-type, x-openpond-team-id, idempotency-key","Access-Control-Allow-Methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS"},lt=25*1024*1024,j=class extends Error{constructor(t,r,s){super(s);this.status=t;this.code=r;this.name="HttpBodyError"}status;code;static{l(this,"HttpBodyError")}};function Le(n,e,t={}){for(let[s,i]of Object.entries(G))e.setHeader(s,i);let r=$e(n.headers.origin);return r?(e.setHeader("Vary",dt(e.getHeader("Vary"))),ut(r,t)?(e.setHeader("Access-Control-Allow-Origin",r),{allowed:!0,origin:r}):{allowed:!1,origin:r}):{allowed:!0,origin:null}}l(Le,"applyCorsHeaders");function ut(n,e={}){if(n==="null")return!0;let t=je(n);return t?pt(t)?!0:new Set((e.allowedOrigins??[]).map(s=>s?je(s):null).filter(s=>!!s)).has(t):!1}l(ut,"isAllowedCorsOrigin");function x(n,e,t){n.writeHead(e,{"Content-Type":"application/json",...G}),n.end(JSON.stringify(t))}l(x,"sendJson");function Yt(n,e,t){n.writeHead(e,{"Content-Type":"text/plain; charset=utf-8",...G}),n.end(t)}l(Yt,"sendText");function Xt(n,e,t,r){n.writeHead(e,{"Content-Type":r,"Content-Length":String(t.byteLength),"Cache-Control":"no-store","X-Content-Type-Options":"nosniff",...G}),n.end(t)}l(Xt,"sendBinary");async function re(n,e={}){let t=e.maxBytes??lt,r=$e(n.headers["content-type"]),s=[],i=0;for await(let c of n){let p=Fe.from(c);if(i+=p.byteLength,i>t)throw new j(413,"request_body_too_large",`JSON request body exceeds ${t} bytes.`);s.push(p)}let a=Fe.concat(s).toString("utf8").trim();if(!a)return{};if(!ct(r))throw new j(415,"unsupported_media_type","JSON request body requires Content-Type: application/json.");try{return JSON.parse(a)}catch{throw new j(400,"invalid_json","Request body is not valid JSON.")}}l(re,"readJson");function Ve(n,e,t){let r=n.headers.authorization;return(typeof r=="string"&&r.startsWith("Bearer ")?r.slice(7):null)===t}l(Ve,"hasAuth");function $e(n){return Array.isArray(n)?n[0]??null:n??null}l($e,"headerValue");function ct(n){if(!n)return!1;let e=n.split(";")[0]?.trim().toLowerCase();return e==="application/json"||!!e?.endsWith("+json")}l(ct,"isJsonContentType");function je(n){try{let e=new URL(n);return e.protocol!=="http:"&&e.protocol!=="https:"?null:e.origin}catch{return null}}l(je,"normalizeOrigin");function pt(n){let e=new URL(n);return e.hostname==="localhost"||e.hostname==="127.0.0.1"||e.hostname==="::1"||e.hostname==="[::1]"}l(pt,"isLoopbackOrigin");function dt(n){let t=(Array.isArray(n)?n.join(", "):n?String(n):"").split(",").map(r=>r.trim()).filter(Boolean);return t.some(r=>r.toLowerCase()==="origin")||t.push("Origin"),t.join(", ")}l(dt,"appendVaryOrigin");function We(n){return`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>OpenPond recovery</title>
|
|
3
3
|
<style nonce="${n}">body{font:16px system-ui;background:#171819;color:#eee;max-width:850px;margin:6vh auto;padding:24px}textarea{box-sizing:border-box;width:100%;min-height:280px;background:#222;color:#eee;padding:14px;border:1px solid #777;border-radius:8px;font:14px monospace}button,input,select{font:inherit;margin:6px;padding:8px}pre{white-space:pre-wrap}code{overflow-wrap:anywhere}button{cursor:pointer}p{line-height:1.5}</style>
|
|
4
4
|
<h1>OpenPond needs a storage repair</h1><p id="issue" role="alert">Loading recovery details\u2026</p><p><code id="file"></code></p>
|
|
5
5
|
<p id="action"></p><p>Migration backups and the source installation remain available. Execution services are stopped while recovery is open.</p>
|