openpond 0.2.65 → 0.2.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.d.ts +23 -0
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-PHMBLRCV.js → acp-NASAJV5E.js} +1 -1
- package/dist/chunks/{acp-agent-A7GK2VSH.js → acp-agent-C3CRF6DT.js} +1 -1
- package/dist/chunks/{actions-command-VLKMHCMI.js → actions-command-BYPLSGZL.js} +1 -1
- package/dist/chunks/{app-layer-J66CQ2QN.js → app-layer-XIEZ6ALX.js} +1 -1
- package/dist/chunks/{app-server-evaluations-V6LRWDUF.js → app-server-evaluations-5YZUFXQ2.js} +1 -1
- package/dist/chunks/{app-server-harness-services-6ZRLA3YD.js → app-server-harness-services-N5F5QVZI.js} +1 -1
- package/dist/chunks/{app-server-runtime-OMR2VE6L.js → app-server-runtime-HJ2N57DL.js} +1 -1
- package/dist/chunks/{apps-IHUFERZO.js → apps-WJTW64NW.js} +1 -1
- package/dist/chunks/{chunk-ZWW227M3.js → chunk-263WS3TB.js} +1 -1
- package/dist/chunks/{chunk-HX6GXMDK.js → chunk-26ID6A5C.js} +1 -1
- package/dist/chunks/{chunk-DSJZS77R.js → chunk-2RSGVLZT.js} +4 -4
- package/dist/chunks/{chunk-L4EJ5R3B.js → chunk-2UZHLO2V.js} +1 -1
- package/dist/chunks/{chunk-QYQZQVVN.js → chunk-375PADDM.js} +1 -1
- package/dist/chunks/{chunk-FUFI4THX.js → chunk-43QYVOYA.js} +1 -1
- package/dist/chunks/{chunk-H5ML7735.js → chunk-46RMTR2Z.js} +1 -1
- package/dist/chunks/{chunk-Z2TOBS3P.js → chunk-4B7EGNYX.js} +1 -1
- package/dist/chunks/{chunk-2GJD23CM.js → chunk-4EZI4KCT.js} +1 -1
- package/dist/chunks/{chunk-DMO3UIS7.js → chunk-4JJ4RYIB.js} +1 -1
- package/dist/chunks/{chunk-UM6EQOT2.js → chunk-4NN5OLKW.js} +2 -2
- package/dist/chunks/{chunk-66HFW4OU.js → chunk-4VZJQRQI.js} +1 -1
- package/dist/chunks/{chunk-7PKTCMZ6.js → chunk-543QHE3D.js} +1 -1
- package/dist/chunks/{chunk-TVDZXDQW.js → chunk-5QOFUGYQ.js} +1 -1
- package/dist/chunks/{chunk-6S2MWJVD.js → chunk-5TPYBXWM.js} +1 -1
- package/dist/chunks/{chunk-WLZJOCLA.js → chunk-5ZNE43XC.js} +1 -1
- package/dist/chunks/{chunk-KOKBDIGR.js → chunk-6HQUIKC5.js} +1 -1
- package/dist/chunks/{chunk-3BJ7LPE3.js → chunk-6IS5OLI5.js} +1 -1
- package/dist/chunks/{chunk-VS3AMJEK.js → chunk-6LFTQBXP.js} +1 -1
- package/dist/chunks/{chunk-VD2TQCMH.js → chunk-7HAGSE7L.js} +1 -1
- package/dist/chunks/{chunk-NTM3KQ25.js → chunk-ADOCQA4D.js} +1 -1
- package/dist/chunks/{chunk-4D3CICBG.js → chunk-ATFV2NA4.js} +1 -1
- package/dist/chunks/{chunk-YU4JYWCA.js → chunk-AXO6OHJB.js} +1 -1
- package/dist/chunks/{chunk-5KJMFK65.js → chunk-AXYAEWWA.js} +1 -1
- package/dist/chunks/{chunk-Q4AXZY2P.js → chunk-B2K5WQZE.js} +1 -1
- package/dist/chunks/{chunk-ANG2YMMD.js → chunk-B7XJBP4U.js} +1 -1
- package/dist/chunks/{chunk-E2S2EMYQ.js → chunk-BBIA24GD.js} +6 -6
- package/dist/chunks/{chunk-CYQLXS2U.js → chunk-BUZ7CBJC.js} +1 -1
- package/dist/chunks/{chunk-MVPKU72J.js → chunk-CJDGLPNX.js} +1 -1
- package/dist/chunks/{chunk-ZU3YBRXS.js → chunk-CSU7RDA5.js} +1 -1
- package/dist/chunks/{chunk-JLW5BQVO.js → chunk-CWAQOFLP.js} +1 -1
- package/dist/chunks/{chunk-WKHGXLJD.js → chunk-CX7HKSQ4.js} +2 -2
- package/dist/chunks/{chunk-M5QPL5NO.js → chunk-D5OFN47Z.js} +1 -1
- package/dist/chunks/{chunk-QCJY6FTC.js → chunk-FCXDPVGJ.js} +1 -1
- package/dist/chunks/{chunk-FEQ7HNJR.js → chunk-FE2ENE3U.js} +1 -1
- package/dist/chunks/{chunk-6TRVEA3T.js → chunk-FVK4W27G.js} +1 -1
- package/dist/chunks/{chunk-7FBWUVX7.js → chunk-GC6RJBRZ.js} +1 -1
- package/dist/chunks/{chunk-5Z3AU5CL.js → chunk-H2XG5N7D.js} +1 -1
- package/dist/chunks/chunk-H6EUFJJK.js +2 -0
- package/dist/chunks/{chunk-V3S2B6WU.js → chunk-IDILAYCW.js} +1 -1
- package/dist/chunks/{chunk-KGUPAPGR.js → chunk-IF5A3XWP.js} +1 -1
- package/dist/chunks/chunk-IHAEZ73V.js +2 -0
- package/dist/chunks/{chunk-GDJ4X2ZN.js → chunk-IR2Y2VQY.js} +1 -1
- package/dist/chunks/{chunk-WBO6FQHR.js → chunk-IXZ5ZGIL.js} +1 -1
- package/dist/chunks/{chunk-67HXM6AL.js → chunk-K3LS5SK7.js} +1 -1
- package/dist/chunks/{chunk-4MQHIFZL.js → chunk-K6DB5QWG.js} +1 -1
- package/dist/chunks/{chunk-QJJNHKLT.js → chunk-KQD36SBJ.js} +1 -1
- package/dist/chunks/{chunk-LXZLLTYQ.js → chunk-LI56PPCN.js} +1 -1
- package/dist/chunks/{chunk-KAWXVMHI.js → chunk-MX7KV5DA.js} +1 -1
- package/dist/chunks/{chunk-LARJARMS.js → chunk-N54CPLVD.js} +1 -1
- package/dist/chunks/{chunk-JRGECNP3.js → chunk-OE2OOWEQ.js} +1 -1
- package/dist/chunks/{chunk-B32CW3NT.js → chunk-OY4B7Y3T.js} +1 -1
- package/dist/chunks/chunk-OYIFH2OM.js +2 -0
- package/dist/chunks/{chunk-C5B3FMV3.js → chunk-P6NQYXN6.js} +1 -1
- package/dist/chunks/{chunk-D7R2AAX2.js → chunk-QFL2VQKX.js} +1 -1
- package/dist/chunks/{chunk-Y3B6ZUE6.js → chunk-QOUOU7FE.js} +1 -1
- package/dist/chunks/{chunk-GIU3Z45P.js → chunk-QQLS5FB7.js} +1 -1
- package/dist/chunks/chunk-R5GRESW3.js +2 -0
- package/dist/chunks/{chunk-6ZTP6CUJ.js → chunk-R6MMWEH4.js} +1 -1
- package/dist/chunks/{chunk-XHBMK6LC.js → chunk-R6VI7MX5.js} +1 -1
- package/dist/chunks/{chunk-GFAI2MCJ.js → chunk-RS526BG7.js} +1 -1
- package/dist/chunks/{chunk-EVQISX7M.js → chunk-RWRKUO5D.js} +1 -1
- package/dist/chunks/{chunk-DXA2UHBE.js → chunk-SD2XDZQW.js} +1 -1
- package/dist/chunks/{chunk-S6UCVXBC.js → chunk-SODAOLAP.js} +1 -1
- package/dist/chunks/{chunk-UK5LGSGT.js → chunk-SVNEPXU3.js} +1 -1
- package/dist/chunks/{chunk-5WPMI6QX.js → chunk-TERKCK4I.js} +1 -1
- package/dist/chunks/{chunk-OKEC2EIE.js → chunk-TS5HNRZB.js} +1 -1
- package/dist/chunks/{chunk-5KWKSR4P.js → chunk-TSQ2I6XV.js} +1 -1
- package/dist/chunks/{chunk-YRDPVTEI.js → chunk-TV2LE2BD.js} +1 -1
- package/dist/chunks/chunk-U3MVH2YT.js +2 -0
- package/dist/chunks/{chunk-FS2VKOT7.js → chunk-UBTP3QWI.js} +1 -1
- package/dist/chunks/{chunk-7XOUM6RK.js → chunk-UKSSFB4Q.js} +1 -1
- package/dist/chunks/{chunk-W7NXFRHN.js → chunk-UNE52L3Y.js} +1 -1
- package/dist/chunks/{chunk-ZUT4EM64.js → chunk-UXO33ST5.js} +1 -1
- package/dist/chunks/{chunk-FHLSLOKH.js → chunk-V3ILZQER.js} +1 -1
- package/dist/chunks/chunk-V3T2OJBZ.js +33 -0
- package/dist/chunks/{chunk-QAEZNFAM.js → chunk-V5AOM5MZ.js} +1 -1
- package/dist/chunks/{chunk-LI3FTPAH.js → chunk-VEXJV5H5.js} +1 -1
- package/dist/chunks/{chunk-AF3AVDPP.js → chunk-VPAEFG7X.js} +1 -1
- package/dist/chunks/{chunk-FGOTSCSE.js → chunk-W3ZILZUL.js} +1 -1
- package/dist/chunks/{chunk-U2BD545L.js → chunk-WD6ANOLL.js} +1 -1
- package/dist/chunks/{chunk-OTUS7NTQ.js → chunk-WDKZMXIU.js} +1 -1
- package/dist/chunks/chunk-WGISITX6.js +4 -0
- package/dist/chunks/{chunk-55Q64WWF.js → chunk-XD4ZIQZ2.js} +1 -1
- package/dist/chunks/{chunk-W22KWKF6.js → chunk-XDFXKRTI.js} +1 -1
- package/dist/chunks/{chunk-GRLQHYAU.js → chunk-XEU4J4GJ.js} +1 -1
- package/dist/chunks/{chunk-IEVJLG3V.js → chunk-XGJG2ZKE.js} +1 -1
- package/dist/chunks/chunk-XHU4BZQY.js +13 -0
- package/dist/chunks/{chunk-DIDQHTAX.js → chunk-XKZ4PFMQ.js} +1 -1
- package/dist/chunks/{chunk-B666Z2NS.js → chunk-XT5WUQGT.js} +1 -1
- package/dist/chunks/{chunk-N2AV7PHV.js → chunk-YKTJPCYZ.js} +3 -3
- package/dist/chunks/{chunk-5AU5Y6KS.js → chunk-YMCF5GR2.js} +1 -1
- package/dist/chunks/{chunk-LYVHYT3L.js → chunk-YONDU5TN.js} +1 -1
- package/dist/chunks/{chunk-BTJACFU3.js → chunk-YQBL5P6R.js} +1 -1
- package/dist/chunks/{chunk-SAZTOGX6.js → chunk-YR5URT73.js} +1 -1
- package/dist/chunks/{chunk-OXRVILDW.js → chunk-ZVMQLIRA.js} +1 -1
- package/dist/chunks/{chunk-MHPCVQOE.js → chunk-ZWEY66RT.js} +1 -1
- package/dist/chunks/cli-HV32F7HD.js +2 -0
- package/dist/chunks/command-NWOZXU57.js +58 -0
- package/dist/chunks/{configuration-command-465ODYTC.js → configuration-command-ZEIBQKB3.js} +1 -1
- package/dist/chunks/{connected-app-executor-7DYMZCD7.js → connected-app-executor-DFHWNMRM.js} +1 -1
- package/dist/chunks/{connected-evidence-XPAZQRFQ.js → connected-evidence-WOM6N5HO.js} +1 -1
- package/dist/chunks/{connected-starting-assets-2YX3QVDB.js → connected-starting-assets-66Y46ZPM.js} +1 -1
- package/dist/chunks/{continual-HQCFY7GN.js → continual-TNPTWTKK.js} +1 -1
- package/dist/chunks/{core-commands-PJOGRBHJ.js → core-commands-GWRHH53F.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-KWRTMKN6.js → dataset-preparation-authoring-WJ2XEUO7.js} +1 -1
- package/dist/chunks/{datasets-OTE2I4VT.js → datasets-XIMF54QN.js} +1 -1
- package/dist/chunks/{desktop-test-Q6REQJ7K.js → desktop-test-HF42V2EP.js} +1 -1
- package/dist/chunks/dist-T6ES2TSM.js +2 -0
- package/dist/chunks/{evaluation-coordination-KRCY2H4C.js → evaluation-coordination-WZT6FDMS.js} +1 -1
- package/dist/chunks/{experiment-improvements-7MI2VYBR.js → experiment-improvements-H35VS6XZ.js} +1 -1
- package/dist/chunks/{experiments-CNUQKJZE.js → experiments-F54C32EE.js} +1 -1
- package/dist/chunks/{experiments-signal-4N344D4Y.js → experiments-signal-ONIGTGYR.js} +1 -1
- package/dist/chunks/{help-ZUKVY6RO.js → help-O53DTZGN.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +2 -0
- package/dist/chunks/{host-profile-external-dataset-YRKG2GL5.js → host-profile-external-dataset-4HOXANWK.js} +1 -1
- package/dist/chunks/{hosted-app-server-composition-DWSU6ASL.js → hosted-app-server-composition-Y64A2A2B.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-NZTPZTDH.js → hosted-experiment-improvement-B2V2WIUI.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-3CAT3XBI.js → hosted-profile-candidate-CXPVEEYQ.js} +1 -1
- package/dist/chunks/{hosted-profile-compiler-RXU626Q6.js → hosted-profile-compiler-FGCI2VRW.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-control-CBDRKJ5J.js → hosted-profile-evaluation-control-INNUYMBD.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-CHYKDYUQ.js → hosted-profile-evaluation-inspection-UPTBRYMS.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-H5S7JZMD.js → hosted-profile-evaluation-preparation-TIQSVKLQ.js} +1 -1
- package/dist/chunks/{hosted-tasksets-AMGDDB2R.js → hosted-tasksets-7VMYOTIO.js} +1 -1
- package/dist/chunks/{human-review-HOBGC6RC.js → human-review-7XC77NQP.js} +1 -1
- package/dist/chunks/{import-Q3YRFVY7.js → import-OBAKUJPM.js} +1 -1
- package/dist/chunks/javascript-isolate-process-source-YAT3GPW4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-LGRP74W4.js +2 -0
- package/dist/chunks/learning-3XDGIYUL.js +2 -0
- package/dist/chunks/{learning-XTY5VOTK.js → learning-CRR6NRPN.js} +1 -1
- package/dist/chunks/{local-harness-improvement-runtime-XEA73RGS.js → local-harness-improvement-runtime-UIKQSAMM.js} +1 -1
- package/dist/chunks/{local-harness-taskset-review-SW35G4DM.js → local-harness-taskset-review-6KJN3EQL.js} +1 -1
- package/dist/chunks/{model-projects-GHWCKDON.js → model-projects-HP4DELCP.js} +1 -1
- package/dist/chunks/{opchat-2LLDIWEJ.js → opchat-NWYWWIA7.js} +1 -1
- package/dist/chunks/{opchat-bounded-chat-FLDS36LU.js → opchat-bounded-chat-ICURZM6R.js} +1 -1
- package/dist/chunks/{organizations-VIFSOY6P.js → organizations-7DBQGCCV.js} +1 -1
- package/dist/chunks/{profile-KIHMW2WB.js → profile-3WZJ65CT.js} +1 -1
- package/dist/chunks/{project-action-payload-2G57RL74.js → project-action-payload-7DRABTHY.js} +1 -1
- package/dist/chunks/{project-agent-TJLQNMLA.js → project-agent-AXJOWXRU.js} +1 -1
- package/dist/chunks/{published-experiment-source-D3C2AWQD.js → published-experiment-source-YBBPLNF2.js} +1 -1
- package/dist/chunks/{refiner-profile-service-PPGGNVOV.js → refiner-profile-service-ATEFPF5O.js} +1 -1
- package/dist/chunks/{runtime-VSOOPNYN.js → runtime-XP4DEGR3.js} +1 -1
- package/dist/chunks/{sandbox-command-CQO6BEMQ.js → sandbox-command-CF2PJCFX.js} +1 -1
- package/dist/chunks/{sandbox-template-MU33IILL.js → sandbox-template-YFMHEMUQ.js} +1 -1
- package/dist/chunks/{saved-work-LAVTNKPT.js → saved-work-3OAVRBH3.js} +1 -1
- package/dist/chunks/setup-RHIMFI2Y.js +2 -0
- package/dist/chunks/{src-662QOKNP.js → src-GQPWOPYA.js} +1 -1
- package/dist/chunks/{src-CHQVWHV7.js → src-V236S6MV.js} +112 -112
- package/dist/chunks/{standalone-experiment-turn-owner-KKYIGGPF.js → standalone-experiment-turn-owner-CDRMGLWW.js} +1 -1
- package/dist/chunks/{store-chat-resources-ZWDYMDJF.js → store-chat-resources-P4EKCLSY.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-7PDLGRWF.js → store-continual-support-reviews-VVRQO2JK.js} +1 -1
- package/dist/chunks/{store-conversation-serving-WRT4N7N2.js → store-conversation-serving-YFEZYQD3.js} +1 -1
- package/dist/chunks/{store-create-improve-G46KIUVT.js → store-create-improve-2XI36AET.js} +1 -1
- package/dist/chunks/{store-datasets-O67F75BL.js → store-datasets-UFY422NG.js} +1 -1
- package/dist/chunks/{store-evaluation-results-BEPR4LVD.js → store-evaluation-results-VBH4R2U7.js} +1 -1
- package/dist/chunks/{store-harness-workspaces-PJJQ74G6.js → store-harness-workspaces-SGUEYDO2.js} +1 -1
- package/dist/chunks/{store-human-review-HJ3D7ZFA.js → store-human-review-RFCVZ3HP.js} +1 -1
- package/dist/chunks/{store-learned-preference-migration-validation-EXNRDHCO.js → store-learned-preference-migration-validation-FNBGGZU6.js} +1 -1
- package/dist/chunks/{store-learning-6P6IS7GH.js → store-learning-BFOT4QVT.js} +1 -1
- package/dist/chunks/{store-learning-credentials-EGJ2WTZI.js → store-learning-credentials-DYTMWQTC.js} +1 -1
- package/dist/chunks/{store-local-experiments-CBJA56X2.js → store-local-experiments-XPXGYXNM.js} +1 -1
- package/dist/chunks/{store-model-batch-review-YIVD7T2T.js → store-model-batch-review-J2L5JQV2.js} +1 -1
- package/dist/chunks/{store-model-configuration-T6XJJDAB.js → store-model-configuration-NJFWSYSA.js} +1 -1
- package/dist/chunks/{store-model-project-preparation-WWU5CJTV.js → store-model-project-preparation-OCLIFKI2.js} +1 -1
- package/dist/chunks/{store-preference-comparison-XQFTLMGH.js → store-preference-comparison-MZAYONCK.js} +1 -1
- package/dist/chunks/{store-task-inbox-VVXZUJIO.js → store-task-inbox-3BREANOX.js} +1 -1
- package/dist/chunks/{store-task-inventory-MQX44AI6.js → store-task-inventory-5HRZCDUT.js} +1 -1
- package/dist/chunks/{store-taskset-drafts-G3WFVN4M.js → store-taskset-drafts-BNKUVHPA.js} +1 -1
- package/dist/chunks/{store-training-DUVIDYK5.js → store-training-S3FXWLT6.js} +1 -1
- package/dist/chunks/{store-training-jobs-HHFH3V5O.js → store-training-jobs-2LCXPA7G.js} +1 -1
- package/dist/chunks/{store-training-models-C7UUZDTO.js → store-training-models-7AMKS7ZW.js} +1 -1
- package/dist/chunks/{taskset-7FQCJ55X.js → taskset-PLKWRT4X.js} +1 -1
- package/dist/chunks/{taskset-packages-NRRPON7B.js → taskset-packages-SXBLYHSP.js} +1 -1
- package/dist/chunks/{taskset-packages-RW4SFGDU.js → taskset-packages-V5T4V7YN.js} +1 -1
- package/dist/chunks/{teams-bot-D3LWA4S5.js → teams-bot-VQXUA7U4.js} +1 -1
- package/dist/chunks/{tool-learning-NGO7QHYK.js → tool-learning-47XQKELE.js} +1 -1
- package/dist/chunks/{training-XFM3OOPN.js → training-7VQNCOGH.js} +1 -1
- package/dist/chunks/{training-XILDD5RG.js → training-VKLPNCMC.js} +1 -1
- package/dist/chunks/{training-hosted-6BX2IASC.js → training-hosted-NNE6BP6S.js} +1 -1
- package/dist/chunks/training-hosted-checkpoint-evaluation-2X7RSOLC.js +2 -0
- package/dist/chunks/{training-hosted-learning-YN5VD3PW.js → training-hosted-learning-WQ2IP5FP.js} +1 -1
- package/dist/chunks/training-hosted-report-T633TNJG.js +2 -0
- package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +2 -0
- package/dist/chunks/training-hosted-workers-Y2PO5IOA.js +2 -0
- package/dist/chunks/{training-model-start-E5MP3URL.js → training-model-start-G7YDZ7ZG.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/skills/manifest.json +1 -1
- package/dist/web/assets/App-DmEA-Lia.js +53 -0
- package/dist/web/assets/{AppDialog-BILEK4np.js → AppDialog-BvskhHE9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +2 -0
- package/dist/web/assets/{AppToastContext-C-FsCKXW.js → AppToastContext-D2788RqX.js} +1 -1
- package/dist/web/assets/AppsView-B1uNg9IQ.js +1 -0
- package/dist/web/assets/{AppsView-DNHWzJb2.css → AppsView-D3vVesNd.css} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-Bh7Ft_UL.js → AttachmentTypeIcon-DVluUHuc.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BG2MLJ9I.js → BrowserSidebar-DfVQoJHn.js} +1 -1
- package/dist/web/assets/{CartesianChart-CS6ES_XT.js → CartesianChart-DdBZ69lI.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-Dr5X_XyN.js → ChatTimelineEntry-Bbc6HRks.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-CPJ2w67F.js → CollaborationTabs-ba6WupeJ.js} +1 -1
- package/dist/web/assets/{CommandMenu-Fe1V7NJd.js → CommandMenu-D7wTaEgl.js} +1 -1
- package/dist/web/assets/{CommunityView-DHTcmOnI.js → CommunityView-mO58f2B0.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-Ck9VWD6o.js → ComposerAttachments-aO90qXYz.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-yiXO7cf8.js → ComposerCreateImproveStrip-BPUJBSyS.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-_VLzUnHQ.js → ConversationImportsSettings-Bo836wKJ.js} +1 -1
- package/dist/web/assets/{FilePagePreview-BpcM1DfE.js → FilePagePreview-C6wIp6uX.js} +2 -2
- package/dist/web/assets/{GetStartedView-BH-WJ-rW.js → GetStartedView-CxMv8q-h.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-CdQfj7RA.js → GettingStartedDialog-CEb0cS-o.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-C3GsOlu9.js → HostedModelLearningReview-BQIS7hkd.js} +1 -1
- package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +1 -0
- package/dist/web/assets/{HtmlVisual-CH0tb3fv.js → HtmlVisual-CCuUkYT8.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-J2t9yILv.js → LabModelVersionDetailPage-BkHeVbAx.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-DdDYvfj2.js → LabSkillSidebar-CFROlATQ.js} +1 -1
- package/dist/web/assets/LabsRoute-YA9YckKj.js +101 -0
- package/dist/web/assets/MainChatThread-DpyPgGKW.js +2 -0
- package/dist/web/assets/{MainPane-Dje-hfUM.css → MainPane-BOWkynGB.css} +1 -1
- package/dist/web/assets/MainPane-WOeodByM.js +10 -0
- package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-DPYavzau.js → NativeSkillSidebar-MAJWS4mL.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-BtmvE9Sp.js → NewProjectDialog-MQiUBVx3.js} +1 -1
- package/dist/web/assets/{OutputsPage-BMRY7RK2.js → OutputsPage-DpF-aRTu.js} +1 -1
- package/dist/web/assets/{PageChrome-5VRxH6Rp.js → PageChrome-8gH2hyDb.js} +1 -1
- package/dist/web/assets/{ProjectsPage-1LHqxOMo.js → ProjectsPage-BQ98oGyu.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-D_7KgExz.js → RightChatPanelStack-Bs7A4dLs.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-Dtz4zJ0T.js → ScheduledWorkPage-CGCqZz_H.js} +1 -1
- package/dist/web/assets/{SettingsView-BeDYNPcD.js → SettingsView-CqpMFLxy.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-CcvKO3YA.js → TasksetDraftEditorPrimitives-DJvIvzBb.js} +1 -1
- package/dist/web/assets/{TeamChatView-DaXxOkTe.js → TeamChatView-DjmIaLO1.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-CF8uB4qA.js → TerminalOverlay-D--M876l.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-DmMO7x5T.js → TrainingCreationPanel-DDUoHQHU.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DCHbXjSx.js → TrainingDraftPanel-CwLXn3Z7.js} +1 -1
- package/dist/web/assets/{TrainingRunLineage-CwisTWs_.js → TrainingRunLineage-CtYe1KGX.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-Drt7gwRb.js → UsageSettingsSection-CGwPregx.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-Dmbrg0-y.js → WorkspaceDiffPanel-JDOUmrC-.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-KEZm1gdb.js → WorkspaceEnvironmentMenu-sfL5LZeB.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-ChbOKrPO.js → WorkspaceFileLocation-D-ctFM4d.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BS2JQKNQ.js → WorkspaceGitDialogs-CQ28j3R7.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-CN1hE_C4.js → WorkspaceMonacoEditor-BrZs6-EW.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-Clb4m0le.js → WorkspacePdfPreview-CU6PSjjN.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-CwQsdvAR.js → WorkspacePresentationPreview-IjXVXpIy.js} +1 -1
- package/dist/web/assets/{app-models-Cz3yxq4x.js → app-models-CKXrDTEU.js} +1 -1
- package/dist/web/assets/{bot-BNFltD5O.js → bot-Cd761lRF.js} +1 -1
- package/dist/web/assets/{browser-sidebar-links-ZyYiYBBd.js → browser-sidebar-links-D9v2cyJa.js} +1 -1
- package/dist/web/assets/chat-resources-BUDXdoG0.js +1 -0
- package/dist/web/assets/{chevron-down-BnnT0tnM.js → chevron-down-DEbd6Ek-.js} +1 -1
- package/dist/web/assets/chevron-right-DLYNg_Oq.js +1 -0
- package/dist/web/assets/{chevron-up-BAnwJJN3.js → chevron-up-DFJJccDl.js} +1 -1
- package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +9 -0
- package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +1 -0
- package/dist/web/assets/chunk-H3JZ3P5T-CzpTARDY.js +2 -0
- package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +1 -0
- package/dist/web/assets/chunk-TLSP5JKG-BrrVo5rJ.js +1 -0
- package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +1 -0
- package/dist/web/assets/client-BNjO4Xi8.js +1 -0
- package/dist/web/assets/{client-choice-storage-Iuzoszas.js → client-choice-storage-DUWsS4X0.js} +1 -1
- package/dist/web/assets/{cloud-upload-CdSXJ7ms.js → cloud-upload-CoM1FGeB.js} +1 -1
- package/dist/web/assets/{common-BMjyKlX-.js → common-CFsO2ppZ.js} +1 -1
- package/dist/web/assets/{copy-CBFg6m0d.js → copy-BGOhV6Pk.js} +1 -1
- package/dist/web/assets/{create-pipeline-CyUZrbbO.js → create-pipeline-DRR0Qeec.js} +1 -1
- package/dist/web/assets/{createLucideIcon-DF2VR6WA.js → createLucideIcon-Bv-_eGcE.js} +1 -1
- package/dist/web/assets/{cssMode-BSQUZhUO.js → cssMode-SclUkqPt.js} +1 -1
- package/dist/web/assets/{external-link-Cql9bKdv.js → external-link-CVXsNeO3.js} +1 -1
- package/dist/web/assets/{folder-open-BXdVB5J1.js → folder-open-MnOmh19D.js} +1 -1
- package/dist/web/assets/{folder-plus-Cma2HulC.js → folder-plus-BRddLBtO.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-eF--16ps.js → git-commit-horizontal-Bm4rkXug.js} +1 -1
- package/dist/web/assets/{htmlMode-aLPlQtyU.js → htmlMode-X3mQtOeh.js} +1 -1
- package/dist/web/assets/icons-CZxmQtZs.js +1 -0
- package/dist/web/assets/{image-CqKPwnBn.js → image-BViGUAiq.js} +1 -1
- package/dist/web/assets/{index-CM0IRu1U.js → index-LXNhSUEL.js} +2 -2
- package/dist/web/assets/{info-CqeYEqG0.js → info-DYPIbKKD.js} +1 -1
- package/dist/web/assets/intake-contracts-wCkD2ErR.js +1 -0
- package/dist/web/assets/{jsonMode-fu7bEcHB.js → jsonMode-BoKiIdHd.js} +1 -1
- package/dist/web/assets/loader-circle-JFgFNsP5.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DraXQA4w.js → lspLanguageFeatures-CO2mzpy1.js} +1 -1
- package/dist/web/assets/{maximize-2-yMp8X9ts.js → maximize-2-DXZCQO0b.js} +1 -1
- package/dist/web/assets/{message-square-DbIMQqfj.js → message-square-cOCAL8J1.js} +1 -1
- package/dist/web/assets/{monaco.contribution-BQhp1CJs.js → monaco.contribution-C7CAQIKF.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Bd8EqYGR.js → monaco.contribution-CVe3mWSY.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CYWKnVxQ.js → monaco.contribution-hrusiaZi.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CmbWO0tB.js → monaco.contribution-wacA5FjV.js} +2 -2
- package/dist/web/assets/{monitor-DFE2fTkT.js → monitor-B35XSAvn.js} +1 -1
- package/dist/web/assets/{paperclip-D_qsKbVs.js → paperclip-CKgDxioG.js} +1 -1
- package/dist/web/assets/{pdf-DkQRsi4n.js → pdf-Ct3M2mVw.js} +1 -1
- package/dist/web/assets/play-DzqLr7fM.js +1 -0
- package/dist/web/assets/plus-Ddp1vXnw.js +1 -0
- package/dist/web/assets/{ponder-desktop-Dm7tOkKo.js → ponder-desktop-D-zB6X4L.js} +1 -1
- package/dist/web/assets/{presentation-BN_kIBPL.js → presentation-B0S9v7ib.js} +1 -1
- package/dist/web/assets/{profile-ref-DSNkG6Ol.js → profile-ref-CCxrOCio.js} +1 -1
- package/dist/web/assets/{python-DB9pj5Hr.js → python-C0-pUUAU.js} +1 -1
- package/dist/web/assets/{refresh-cw-B27ohHfn.js → refresh-cw-D45mW-vs.js} +1 -1
- package/dist/web/assets/{requests-BCbaFiqV.js → requests-DjSt-duM.js} +1 -1
- package/dist/web/assets/{reward-checks-Bcq9ETCA.js → reward-checks-D139zwha.js} +2 -2
- package/dist/web/assets/{save-D-rwjKop.js → save-Gu4R_82E.js} +1 -1
- package/dist/web/assets/schemas-C9IwV7NS.js +64 -0
- package/dist/web/assets/{settings-D7C-Auyi.js → settings-DdonLCIN.js} +1 -1
- package/dist/web/assets/settings-lists-CFHFtO0D.js +5 -0
- package/dist/web/assets/square-Dqduqyyu.js +1 -0
- package/dist/web/assets/{square-terminal-CeoK51wH.js → square-terminal-DS3zwi6X.js} +1 -1
- package/dist/web/assets/{submit-issue-command-DZNW7Evj.js → submit-issue-command-Gk3RKrY-.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-Bs8L1gx0.js → toggleHighContrast-BnYUBgZB.js} +1 -1
- package/dist/web/assets/training-QBuGBGJd.js +2 -0
- package/dist/web/assets/{training-model-data-wHvE7xL1.js → training-model-data-CxR3xpmK.js} +1 -1
- package/dist/web/assets/{tsMode-C7EqshxC.js → tsMode-BVNyOY8h.js} +1 -1
- package/dist/web/assets/{upload-BWgjC2Jf.js → upload-ABSJxuUM.js} +1 -1
- package/dist/web/assets/{useAccountSettings-Dva1MpsJ.js → useAccountSettings-4_XfwJQi.js} +1 -1
- package/dist/web/assets/{useAgentInventory-CrjIOmvb.js → useAgentInventory-CVuamyT3.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-P-UaUKMb.js → useLocalAgentSchedules-CmwN4ohy.js} +1 -1
- package/dist/web/assets/{useQuery-Bn3KqR4r.js → useQuery-CCjwL8VI.js} +1 -1
- package/dist/web/assets/{wifi-off--mKrSPFc.js → wifi-off-DGJH7Pke.js} +1 -1
- package/dist/web/assets/{work-outputs-CK0nHe4g.js → work-outputs-CnbRtTLg.js} +1 -1
- package/dist/web/assets/{workers-p0Kn2KMK.js → workers-CjtQ2aBD.js} +1 -1
- package/dist/web/assets/x-B-_zJVOZ.js +1 -0
- package/dist/web/assets/{yaml-BeIdC4tu.js → yaml-N1KUjBZ8.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +7 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-3MVKXAH7.js +0 -2
- package/dist/chunks/chunk-G4E3WGLM.js +0 -13
- package/dist/chunks/chunk-I3NYYOSS.js +0 -2
- package/dist/chunks/chunk-JBFPTEVE.js +0 -2
- package/dist/chunks/chunk-LOIYNRBC.js +0 -33
- package/dist/chunks/chunk-MMJU6PZV.js +0 -2
- package/dist/chunks/chunk-OW3EOC5Q.js +0 -4
- package/dist/chunks/chunk-YBKDEEEH.js +0 -2
- package/dist/chunks/cli-TE7RP5H7.js +0 -2
- package/dist/chunks/command-NDHFZAKA.js +0 -13
- package/dist/chunks/dist-J4KHAVO3.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +0 -2
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +0 -2
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +0 -2
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +0 -2
- package/dist/chunks/learning-NJLTGZFQ.js +0 -2
- package/dist/chunks/setup-HSRCZ3WR.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +0 -2
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +0 -2
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +0 -2
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +0 -2
- package/dist/web/assets/App-BZuSv1XM.js +0 -53
- package/dist/web/assets/AppTerminalPanel-BvxZ8bwD.js +0 -2
- package/dist/web/assets/AppsView-BMaq5oxx.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-SSMst6dl.js +0 -1
- package/dist/web/assets/LabsRoute-MJwIjSKg.js +0 -101
- package/dist/web/assets/MainChatThread-BcwtaTDZ.js +0 -2
- package/dist/web/assets/MainPane-DDO6diPt.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-BPSUFpRm.js +0 -2
- package/dist/web/assets/RightSidebarHomePanel-iznJwDMf.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-BrIIRtGW.js +0 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +0 -1
- package/dist/web/assets/chevron-right-C8K5PZj7.js +0 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +0 -9
- package/dist/web/assets/chunk-H3JZ3P5T-B0SCoPw4.js +0 -2
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +0 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +0 -1
- package/dist/web/assets/icons-c3vt7y6n.js +0 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +0 -1
- package/dist/web/assets/loader-circle-pxp89T5x.js +0 -1
- package/dist/web/assets/play-BtlX2stU.js +0 -1
- package/dist/web/assets/plus-DbASL_gy.js +0 -1
- package/dist/web/assets/schemas-lO3MoWQr.js +0 -64
- package/dist/web/assets/settings-lists-DgSaJQA4.js +0 -5
- package/dist/web/assets/square-C2caJ3NG.js +0 -1
- package/dist/web/assets/training-DCdoHJ0Y.js +0 -2
- package/dist/web/assets/x-D9GTV9ke.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{$ as aa,$a as ab,$b as ac,A as B,Aa as Ba,Ab as Bb,B as C,Ba as Ca,Bb as Cb,C as D,Ca as Da,Cb as Db,D as E,Da as Ea,Db as Eb,E as F,Ea as Fa,Eb as Fb,F as G,Fa as Ga,Fb as Gb,G as H,Ga as Ha,Gb as Hb,H as I,Ha as Ia,Hb as Ib,I as J,Ia as Ja,Ib as Jb,J as K,Ja as Ka,Jb as Kb,K as L,Ka as La,Kb as Lb,L as M,La as Ma,Lb as Mb,M as N,Ma as Na,Mb as Nb,N as O,Na as Oa,Nb as Ob,O as P,Oa as Pa,Ob as Pb,P as Q,Pa as Qa,Pb as Qb,Q as R,Qa as Ra,Qb as Rb,R as S,Ra as Sa,Rb as Sb,S as T,Sa as Ta,Sb as Tb,T as U,Ta as Ua,Tb as Ub,U as V,Ua as Va,Ub as Vb,V as W,Va as Wa,Vb as Wb,W as X,Wa as Xa,Wb as Xb,X as Y,Xa as Ya,Xb as Yb,Y as Z,Ya as Za,Yb as Zb,Z as _,Za as _a,Zb as _b,_ as $,_a as $a,_b as $b,a,aa as ba,ab as bb,ac as bc,b as c,ba as ca,bb as cb,bc as cc,c as d,ca as da,cb as db,cc as dc,d as e,da as ea,db as eb,dc as ec,e as f,ea as fa,eb as fb,ec as fc,f as g,fa as ga,fb as gb,fc as gc,g as h,ga as ha,gb as hb,gc as hc,h as i,ha as ia,hb as ib,hc as ic,i as j,ia as ja,ib as jb,ic as jc,j as k,ja as ka,jb as kb,jc as kc,k as l,ka as la,kb as lb,kc as lc,l as m,la as ma,lb as mb,lc as mc,m as n,ma as na,mb as nb,mc as nc,n as o,na as oa,nb as ob,nc as oc,o as p,oa as pa,ob as pb,oc as pc,p as q,pa as qa,pb as qb,pc as qc,q as r,qa as ra,qb as rb,qc as rc,r as s,ra as sa,rb as sb,rc as sc,s as t,sa as ta,sb as tb,sc as tc,t as u,ta as ua,tb as ub,tc as uc,u as v,ua as va,ub as vb,uc as vc,v as w,va as wa,vb as wb,vc as wc,w as x,wa as xa,wb as xb,wc as xc,x as y,xa as ya,xb as yb,y as z,ya as za,yb as zb,z as A,za as Aa,zb as Ab}from"./chunk-XHU4BZQY.js";import{Aa as b}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-FTQLQJQV.js";export{jc as AcceptanceAttemptSchema,bc as AcceptanceCheckSchema,hc as AcceptanceGroupManifestContentSchema,ic as AcceptanceGroupManifestSchema,kc as AcceptanceGroupSnapshotContentSchema,lc as AcceptanceGroupSnapshotSchema,fc as AcceptanceMeasurementSchema,cc as AcceptancePlanContentSchema,dc as AcceptancePlanSchema,Ea as ApplyTaskCorrectionCommandSchema,La as ArchiveAuthoringDraftCommandSchema,pa as AuthoringDraftContentSchema,ra as AuthoringDraftFinalizationSchema,oa as AuthoringDraftInputSchema,qa as AuthoringDraftSchema,na as AuthoringTargetKindSchema,d as BoundJudgeResponseSchema,Ra as CancelLearningIterationCommandSchema,Qa as CancelLearningIterationReservationCommandSchema,Na as CancelRewardCheckCommandSchema,Ja as CancelTaskGradeCommandSchema,ma as CombinedRewardAuthoringFieldsSchema,wc as CorrectionMetricObservationSchema,xc as CorrectionMetricSummarySchema,vc as CorrectionOpportunitySchema,sc as CorrectionVerificationCheckSchema,tc as CorrectionVerificationPlanContentSchema,uc as CorrectionVerificationPlanSchema,$a as DEFAULT_REWARD_VERIFIER_SOURCE,za as ImportTaskIntakeCommandSchema,f as JudgeCallReservationSchema,G as LearningAcceptedParentSchema,_b as LearningCandidateDecisionObservationSchema,fa as LearningChainSchema,Db as LearningCommandRequestSchema,Ta as LearningCommandSchema,ob as LearningConflictError,ha as LearningConsumptionSchema,a as LearningContinuationModeOverrideSchema,b as LearningDomainError,ga as LearningEligibilityCountsSchema,Va as LearningIterationAdmissionSchema,Xa as LearningIterationDispatchSchema,Ya as LearningIterationObservationSchema,ia as LearningIterationReservationSchema,I as LearningIterationSchema,H as LearningIterationStatusSchema,Wa as LearningIterationSubmissionDeferralSchema,Ua as LearningIterationSubmissionSchema,ea as LearningIterationTriggerSchema,l as LearningJsonObjectSchema,n as LearningJsonPointerSchema,Gb as LearningOperationResultSchema,E as LearningPolicyContentSchema,wb as LearningPolicyInspectionResultSchema,F as LearningPolicySchema,Eb as LearningReadRequestSchema,nb as LearningResourceKindSchema,K as LearningResourceSchema,r as LearningReviewOriginSchema,m as LearningRevisionRefSchema,_a as LearningScheduleFireSchema,Za as LearningScheduleSchema,s as LearningSourceContentSchema,t as LearningSourceSchema,Ab as LearningTaskQueueInspectionSchema,P as LearningTextAssetContentSchema,Q as LearningTextAssetSchema,Rb as MAX_REWARD_CALIBRATION_CLOSURE_BYTES,i as NightlyScheduleSchema,Oa as PublishCheckedRewardCommandSchema,Aa as PublishLearningResourceCommandSchema,Ba as PublishLearningResourcesCommandSchema,Ma as QueueRewardCheckCommandSchema,Ga as QueueTaskGradeCommandSchema,Pa as ReserveLearningIterationCommandSchema,Fa as ResolveTaskFeedbackCommandSchema,Sa as RetryLearningIterationDispatchCommandSchema,Ha as ReviewTaskEvidenceCommandSchema,ka as RewardAuthoringFieldsSchema,Sb as RewardCalibrationClosureSchema,hb as RewardCheckRunSchema,fb as RewardCheckRuntimeSchema,ja as RewardFixtureAuthoringFieldsSchema,gb as RewardFixtureCheckResultSchema,eb as RewardFixtureSchema,Ka as SaveAuthoringDraftCommandSchema,Ia as SealTaskBatchCommandSchema,Ca as SubmitTaskExampleCommandSchema,Da as SubmitTaskFeedbackCommandSchema,sa as TASK_INTAKE_LIMITS,A as TaskAdmissionDecisionContentSchema,B as TaskAdmissionDecisionSchema,C as TaskBatchContentSchema,ba as TaskBatchPackageMetadataSchema,D as TaskBatchSchema,o as TaskDefinitionContentSchema,p as TaskDefinitionSchema,v as TaskEvidenceContentSchema,Fb as TaskEvidenceInspectionResultSchema,w as TaskEvidenceSchema,u as TaskExampleSubmissionSchema,z as TaskFeedbackSchema,y as TaskFeedbackSubmissionSchema,la as TaskFormatAuthoringFieldsSchema,J as TaskGradeRunSchema,ua as TaskIntakeFileSchema,ta as TaskIntakeFormatSchema,wa as TaskIntakePreviewSchema,va as TaskIntakeRecordSchema,x as TaskRatingSchema,q as TaskSourceMappingSchema,c as TrainingHandoffOriginSchema,rc as acceptanceGroupVerdict,qc as assertAcceptanceBaselineReuse,oc as assertAcceptanceGroupSnapshot,pc as assertAcceptanceGroupUpdate,Z as assertAdmissionDecision,_ as assertGradeIdentity,O as assertLearningContentHash,Cb as assertLearningRequestJson,zb as assertRewardCalibration,db as authoringNumber,k as coalesceNightlyOccurrences,ab as compileRewardAuthoring,jb as compileRewardCheck,ib as compileRewardFixtures,ca as compileTaskBatch,mc as createAcceptanceGroupManifest,nc as createAcceptanceGroupSnapshot,ec as createAcceptancePlan,e as createBoundModelJudgeRunner,h as createBudgetedJudgeExecutor,Qb as createBudgetedRewardFixtureExecutor,Kb as createBuiltinTaskGradeExecutor,Pb as createIsolatedRewardFixtureExecutor,Zb as createLearningIterationWorker,ac as createLearningScheduleWorker,Jb as createLearningService,R as createLearningTextAsset,Ub as createRewardCalibrationClosure,Nb as createRewardCheckJudgeBudgetStore,Xb as createRewardCheckWorker,Ob as createTaskGradeJudgeBudgetStore,Lb as createTaskGradeWorker,Hb as decodeTaskIntakeText,Yb as deferLearningIterationSubmission,gc as evaluateAcceptancePlan,kb as executeRewardFixture,Vb as exportRewardCalibrationClosure,xb as inspectLearningPolicy,Bb as inspectLearningTaskQueue,T as inspectTaskEvidence,ya as intakeDate,xa as intakeId,g as judgeCommittedSpend,rb as learningEvidenceId,sb as learningOperationId,L as learningRef,mb as learningResourceSchemas,ub as learningScheduleId,V as mapTaskSourceRecord,lb as matchRewardFixture,j as nextNightlyOccurrence,cb as parseRewardAuthoringObject,Ib as previewTaskIntake,yb as qualifyRewardCheck,W as readTaskJsonPointer,$b as reconcileLearningCandidateDecision,qb as requireLearningRelease,pb as requireLearningResource,tb as resolveLearningTrainingParent,bb as rewardAuthoringFields,Wb as rewardCalibrationClosureAsset,Mb as rewardFixtureFromRating,M as sameLearningRef,N as sealLearningContent,aa as sealTaskBatch,vb as synchronizeLearningSchedule,Y as taskAttemptEvidence,da as taskBatchPackageMetadata,$ as taskFamilyReservations,X as taskRecordFromEvidence,U as validateSourceSubmission,S as verifyLearningTextAsset,Tb as verifyRewardCalibrationClosure};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as p}from"./chunk-IOSBGCRT.js";import"./chunk-V3KEG6MI.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as t}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import{a as f,b as w}from"./chunk-
|
|
2
|
+
import{a as p}from"./chunk-IOSBGCRT.js";import"./chunk-V3KEG6MI.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as t}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import{a as f,b as w}from"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-UNE52L3Y.js";import"./chunk-GLUWATL5.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import{Bb as h,Sa as m,mb as d}from"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import{readFile as I}from"node:fs/promises";async function N(e,u){let[r,g,a]=u;if(!r||!["get","list","command","publish-batch"].includes(r)||u.length>3)throw new Error("Use learning <get|list> <kind> [id] or learning <command|publish-batch> --input-file <path>, with --team-id.");let{context:b,baseUrl:S,teamId:L}=await p(e),o=new w({baseUrl:S,apiKey:b.token,scope:L,fetch:l((i,n)=>fetch(i,{...n,signal:n?.signal?AbortSignal.any([n.signal,AbortSignal.timeout(6e4)]):AbortSignal.timeout(6e4)}),"fetch")}),s;if(r==="get"||r==="list"){let i=d.parse(g);if(r==="get"){if(!a)throw new Error("Select a learning resource ID.");let n=t(e,"revision");s=await o.get(i,a,n?Number(n):void 0)}else{if(a)throw new Error("List accepts a resource kind, with --after-id for pagination.");s=await o.list(i,{limit:Number(t(e,"limit")||"30"),...t(e,"afterId")?{afterId:t(e,"afterId")}:{},...t(e,"parentId")?{parentId:t(e,"parentId")}:{},...t(e,"status")?{status:t(e,"status")}:{}})}}else{if(g||a)throw new Error("This action takes --input-file rather than positional resource identifiers.");let i=t(e,"inputFile");if(!i)throw new Error("Select --input-file <absolute-json-path>.");let n=await I(i);if(n.byteLength>16777216)throw new Error("Learning input exceeds 16 MiB.");let c=JSON.parse(n.toString("utf8"));h(c),s=r==="command"?await o.command(m.parse(c)):await o.publishBatch(f.parse(c))}console.log(JSON.stringify(s,null,2))}l(N,"runLearningCommand");export{N as runLearningCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-XT5WUQGT.js";import"./chunk-WLQEONBF.js";import"./chunk-AXO6OHJB.js";import"./chunk-FE2ENE3U.js";import"./chunk-IZ6DLEVY.js";import"./chunk-KQD36SBJ.js";import"./chunk-CSU7RDA5.js";import"./chunk-JD76ANPN.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import"./chunk-4TTXNVCE.js";import"./chunk-BJXPQIVD.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-GUG2SWRZ.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-O6ZYDHEJ.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import"./chunk-FTQLQJQV.js";export{a as createLocalHarnessImprovementRuntime};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i as a,j as b}from"./chunk-
|
|
2
|
+
import{i as a,j as b}from"./chunk-XEU4J4GJ.js";import"./chunk-VEXJV5H5.js";import"./chunk-ATFV2NA4.js";import"./chunk-S7A2OGL2.js";import"./chunk-WGISITX6.js";import"./chunk-FEAKTSRS.js";import"./chunk-XVDFJ3ZF.js";import"./chunk-R5GRESW3.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-K3LS5SK7.js";import"./chunk-CWAQOFLP.js";import"./chunk-B7XJBP4U.js";import"./chunk-H6EUFJJK.js";import"./chunk-FVK4W27G.js";import"./chunk-YONDU5TN.js";import"./chunk-QFL2VQKX.js";import"./chunk-4VZJQRQI.js";import"./chunk-AN525SPP.js";import"./chunk-SYUKES6H.js";import"./chunk-6I5AUTVO.js";import"./chunk-IZ6DLEVY.js";import"./chunk-MCBRB5D6.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import"./chunk-4TTXNVCE.js";import"./chunk-HNDAGZCF.js";import"./chunk-YU3C6U5V.js";import"./chunk-KVTBX2UP.js";import"./chunk-BJXPQIVD.js";import"./chunk-L3KS6MOV.js";import"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-O6ZYDHEJ.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import"./chunk-FTQLQJQV.js";export{a as createLocalHarnessTasksetReviewControl,b as runLocalHarnessEvaluationBaseline};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-7J2NMUTK.js";import{A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,b as a,f as b,g as c,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-
|
|
2
|
+
import"./chunk-7J2NMUTK.js";import{A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,b as a,f as b,g as c,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-263WS3TB.js";import{a as d}from"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-FTQLQJQV.js";export{A as HostedModelProjectDetailSchema,n as HostedModelProjectLinkSchema,y as HostedModelProjectSummarySchema,x as HostedModelProjectSyncSchema,m as HostedModelProjectTrainingSetupSchema,c as MODEL_PROJECT_API_RESPONSE_MAX_BYTES,b as MODEL_PROJECT_SYNC_MAX_BYTES,d as ModelInitialLearningSchema,k as ModelProfileEvaluationSelectionSchema,j as ModelProfileSourceSelectionSchema,B as ModelProjectApiErrorSchema,t as ModelProjectBaseModelCandidateSchema,g as ModelProjectBaseModelSchema,s as ModelProjectConfigurationCheckSchema,q as ModelProjectEditableSchema,e as ModelProjectImmutableRefSchema,i as ModelProjectRecipeDocumentSchema,z as ModelProjectResourceSummarySchema,r as ModelProjectSaveRequestSchema,p as ModelProjectSchema,o as ModelProjectTasksetSyncSchema,h as ModelProjectTrainingMethodSchema,l as ModelProjectTrainingSetupSchema,f as ModelProjectVersionedRefSchema,a as OPENPOND_MODEL_PROJECT_MEDIA_TYPE,C as OpenPondModelProjectApiError,w as createModelProjectSaveRequest,D as createModelProjectsClient,u as modelProjectConfigurationHash,v as parseModelProjectSaveRequest};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-T4QXKU5Y.js";import"./chunk-7P5SH3CI.js";import{c as h}from"./chunk-TGULVWPV.js";import"./chunk-
|
|
2
|
+
import"./chunk-T4QXKU5Y.js";import"./chunk-7P5SH3CI.js";import{c as h}from"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import{c as u,d as m,f as g}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{f as p}from"./chunk-3M53YXEI.js";import{a as k}from"./chunk-Q34IF4PW.js";import{a as d,c as w,d as B}from"./chunk-6XSSM4WT.js";import"./chunk-CRDKBFRN.js";import"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import{d as f}from"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";import{randomUUID as U}from"node:crypto";async function T(t,r){let e=r[0]||"smoke";if(e==="chat"){if(r.length!==1)throw new Error("opchat chat accepts options, not positional arguments.");await(await import("./opchat-bounded-chat-ICURZM6R.js")).runBoundedOpChat(t);return}let o=await f(),s=await h(o,g(o)),l=C(o,t);if(e==="provider-catalog"||e==="providers-catalog"||e==="catalog"){let n=await y({apiBaseUrl:l,token:s});console.log(JSON.stringify(n,null,2));return}if(e==="models"||e==="model-list"){let n=await w({apiBaseUrl:l,token:s});console.log(JSON.stringify(n,null,2));return}if(e==="model"||e==="model-get"){let n=r[1]||a(t,"model");if(!n)throw new Error("usage: opchat model <model>");let c=await B({apiBaseUrl:l,token:s,model:n});console.log(JSON.stringify(c,null,2));return}if(e==="smoke"){let n=await k({apiBaseUrl:l,token:s,defaultModel:a(t,"model")||void 0,compatibilityModel:a(t,"compatibilityModel")||a(t,"compatModel")||void 0,skipStream:p(t.skipStream),skipTool:p(t.skipTool),log:i(c=>console.log(c),"log")});p(t.json)&&console.log(JSON.stringify(n,null,2));return}throw new Error(`usage: opchat <provider-catalog|models|model|smoke> [--opchat-api-base-url <url>]
|
|
3
3
|
opchat chat --model <id> --message <text> --team-id <id> --max-output-tokens <n> --request-id <id> --timeout-sec <1..600> --max-spend <usd> [--stream] (one bounded request; JSON receipt after completion)`)}i(T,"runOpChatCommand");async function y(t){let r=t.apiBaseUrl.trim().replace(/\/+$/,"");if(!r)throw new Error("OpChat API base URL is required.");let e=t.token.trim();if(!e)throw new Error("OpenPond API key is required.");let o=await fetch(`${r}/provider-catalog`,{method:"GET",headers:{Authorization:`Bearer ${e}`,Accept:"application/json","Content-Type":"application/json","x-openpond-client":"openpond-cli","x-openpond-request-id":U()}});if(!o.ok)throw new Error(`Hosted provider catalog failed: ${o.status} ${await A(o)}`);return o.json()}i(y,"getOpChatProviderCatalog");async function A(t){let r=await t.text().catch(()=>"");if(!r)return t.statusText||`HTTP ${t.status}`;try{let e=JSON.parse(r);if(typeof e.message=="string")return e.message;if(typeof e.error=="string")return e.error;if(e.error&&typeof e.error=="object"&&!Array.isArray(e.error)){let o=e.error;return[o.code,o.message].filter(Boolean).join(": ")||r}return r}catch{return r}}i(A,"readResponseError");function C(t,r){let e=a(r,"opchatApiBaseUrl")||a(r,"opchatApiBaseurl")||a(r,"opChatApiBaseUrl")||a(r,"opChatApiBaseurl")||a(r,"opchatApiUrl")||a(r,"opChatApiUrl");return e?d({opChatApiBaseUrl:e}):d({apiBaseUrl:u(r)||t.apiBaseUrl,chatApiBaseUrl:m(r)||t.chatApiBaseUrl})}i(C,"resolveOpChatCliBaseUrl");function a(t,r){let e=t[r];return typeof e=="string"?e.trim():""}i(a,"optionString");export{T as runOpChatCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-T4QXKU5Y.js";import"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import{a as j}from"./chunk-V3KEG6MI.js";import{a as Z}from"./chunk-AZ7BL5FL.js";import"./chunk-
|
|
2
|
+
import"./chunk-T4QXKU5Y.js";import"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import{a as j}from"./chunk-V3KEG6MI.js";import{a as Z}from"./chunk-AZ7BL5FL.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import{c as $,d as z}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as A,f as H}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import{a as D,d as X,i as J,j as Y}from"./chunk-6XSSM4WT.js";import"./chunk-CRDKBFRN.js";import"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import{M as L}from"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as s}from"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as p}from"./chunk-FTQLQJQV.js";import{createHash as ne}from"node:crypto";var ee=new Set(["Error","TypeError","SyntaxError","AbortError","TimeoutError","SocketError","HeadersTimeoutError","BodyTimeoutError","ConnectTimeoutError"]),te=new Set(["UND_ERR_SOCKET","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT","UND_ERR_ABORTED","UND_ERR_DESTROYED","UND_ERR_CLOSED","UND_ERR_RESPONSE_STATUS_CODE","ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ABORT_ERR"]);function K(n){let o=[],e=new Set,a=n;for(;a&&typeof a=="object"&&o.length<3&&!e.has(a);){e.add(a);let d=a;o.push({name:typeof d.name=="string"&&ee.has(d.name)?d.name:"unrecognized",code:d.code===void 0?null:typeof d.code=="string"&&te.has(d.code)?d.code:"unrecognized"}),a=d.cause}return o}p(K,"boundedTransportError");function V(){let n=null,o=null,e=null,a=null,d=null,M=null,l=0,y=0,m=0,S=0,c=0,i=0,E=null;return{observe:p(t=>{t.type==="request"&&(n=performance.now()-t.elapsedMs),t.type==="headers"&&(o=t),t.type==="bytes"&&(l=Math.max(l,t.elapsedMs-(a??o?.elapsedMs??0)),e??=t.elapsedMs,a=t.elapsedMs,y=Math.min(Number.MAX_SAFE_INTEGER,y+t.byteLength),m=Math.min(Number.MAX_SAFE_INTEGER,m+1)),t.type==="data"&&(S=Math.min(Number.MAX_SAFE_INTEGER,S+1),d=t.elapsedMs,t.errorFrame&&(i=Math.min(Number.MAX_SAFE_INTEGER,i+1))),t.type==="comment"&&(c=Math.min(Number.MAX_SAFE_INTEGER,c+1),M=t.elapsedMs),t.type==="done"&&(E=t.elapsedMs)},"observe"),snapshot:p(()=>{let t=n===null?null:Math.round(performance.now()-n);return{phase:n===null?"not_started":o?E!==null?"done":i>0?"error_frame":"response_body":"before_headers",elapsedMs:t,response:o===null?null:{status:o.status,headersAtMs:o.elapsedMs,eventStream:o.eventStream,noCache:o.noCache,noTransform:o.noTransform,bufferingDisabled:o.bufferingDisabled},bytes:y,readChunks:m,dataFrames:S,commentFrames:c,errorFrames:i,firstByteAtMs:e,lastByteAtMs:a,lastDataAtMs:d,lastCommentAtMs:M,doneAtMs:E,maxByteGapMs:l,silentForMs:t===null||o===null?null:Math.max(0,t-(a??o.elapsedMs))}},"snapshot")}}p(V,"createStreamDiagnostics");var O=s.coerce.number().int().positive().safe(),oe=s.object({model:s.string().trim().min(1).max(512),message:s.string().trim().min(1).max(131072),teamId:s.string().regex(/^[A-Za-z0-9_-]{3,191}$/),requestId:s.string().regex(/^[A-Za-z0-9._:-]{1,200}$/),maxOutputTokens:O,timeoutSec:O.max(600),maxSpend:s.coerce.number().finite().positive()}),q=s.number().finite().nonnegative(),re=s.object({id:s.string(),context_window:O,output_limit:O,metadata:s.object({billing:s.object({pricing:s.object({version:s.string().trim().min(1),source:s.string().trim().min(1),effectiveAt:s.string().refine(n=>Number.isFinite(Date.parse(n))),inputUsdPerMillionTokens:q,cachedInputUsdPerMillionTokens:q,outputUsdPerMillionTokens:q}).passthrough()})})});async function ge(n,o={}){let e=oe.parse({...n,message:A(n,"message")||A(n,"prompt")}),a=H(n.stream),d=n.effort===void 0?void 0:L.parse(n.effort),M=o.emit??(u=>console.log(JSON.stringify(u,null,2))),l=new AbortController,y=new Date().toISOString(),m=!1,S=null,c=null,i=null,E="",_=null,C=null,t=V(),x=null,B=p(u=>l.abort(new Error(`OpChat cancelled by ${u}.`)),"abort"),P=p(()=>B("SIGINT"),"interrupt"),v=p(()=>B("SIGTERM"),"terminate"),W=setTimeout(()=>l.abort(new DOMException("OpChat deadline reached.","TimeoutError")),e.timeoutSec*1e3);process.once("SIGINT",P),process.once("SIGTERM",v);let F=p((u,r)=>{let b=u==="completed"&&i&&i.estimated!==!0&&[i.prompt_tokens??i.input_tokens,i.completion_tokens??i.output_tokens].every(w=>typeof w=="number"&&Number.isSafeInteger(w)&&w>=0);return{schemaVersion:"openpond.boundedOpChatReceipt.v1",status:u,requestId:e.requestId,model:e.model,teamId:e.teamId,automaticRetry:!1,transport:a?"sse":"json",...a?{streamDiagnostics:t.snapshot()}:{},...x?{errorCauses:x}:{},startedAt:y,completedAt:new Date().toISOString(),apiOrigin:C,maxOutputTokens:e.maxOutputTokens,timeoutSec:e.timeoutSec,maximumSpendUsd:e.maxSpend,quote:S,dispatchAttempted:m,completion:c,usage:i,text:E,finishReason:_,accounting:{state:m?b?"usage_recorded":"unknown":"not_dispatched",chargedUsd:m?null:0,requiresLedgerReconciliation:m,cleanupConfirmed:!m},...r?{error:r}:{}}},"receipt");try{let u=await(o.account??j)(A(n,"account"));if(!u.token)throw new Error("Sign in to an OpenPond account before using OpChat.");let r=new URL(D({opChatApiBaseUrl:u.chatApiBaseUrl,env:{}})),b=[A(n,"opchatApiBaseUrl"),A(n,"opchatApiUrl"),z(n),$(n)].filter(g=>!!g);for(let g of b){let f=new URL(g);if(f.origin!==r.origin||f.username||f.password||f.search||f.hash)throw new Error("The OpChat API URL must match the signed-in account's chat origin.")}if(r.username||r.password||r.search||r.hash)throw new Error("The signed-in account has an invalid OpChat URL.");let w=D({opChatApiBaseUrl:b[0]??r.href,env:{}});C=r.origin,l.signal.throwIfAborted();let U=await X({apiBaseUrl:w,token:u.token,teamId:e.teamId,model:e.model,signal:AbortSignal.any([l.signal,AbortSignal.timeout(3e4)])}),Q=new Date().toISOString(),R=re.parse(U);if(R.id!==e.model)throw new Error("The catalog returned a different model identity.");if(e.maxOutputTokens>R.output_limit)throw new Error("The requested output limit exceeds the model's current limit.");let I=R.metadata.billing.pricing,N=Math.ceil(R.context_window*Math.max(I.inputUsdPerMillionTokens,I.cachedInputUsdPerMillionTokens)+e.maxOutputTokens*I.outputUsdPerMillionTokens);if(!Number.isSafeInteger(N)||N<=0)throw new Error("The model does not publish an enforceable positive request ceiling.");let k=N/1e6;if(S={kind:"worst_case_request_reservation",observedAt:Q,contextWindow:R.context_window,outputLimit:R.output_limit,pricing:I,maximumRequestCostUsd:k,predictedSpend:!1,catalog:U,catalogSha256:ne("sha256").update(JSON.stringify(U)).digest("hex")},k>e.maxSpend)throw new Error(`The current worst-case request reservation $${k} exceeds --max-spend $${e.maxSpend}.`);l.signal.throwIfAborted();let G={apiBaseUrl:w,token:u.token,teamId:e.teamId,model:e.model,requestId:e.requestId,reasoningEffort:d,maxTokens:e.maxOutputTokens,signal:l.signal,messages:[{role:"user",content:e.message}],...a?{onStreamDiagnostic:t.observe}:{}};if(m=!0,a){let g=null,f;for await(let h of Y(G)){l.signal.throwIfAborted();let T=h.raw&&typeof h.raw=="object"?h.raw:{};if(typeof T.id!="string"||!T.id||T.model!==e.model||T.request_id!==e.requestId||g!==null&&T.id!==g)throw new Error("The stream does not match the admitted completion, model and request identity.");if(g=T.id,typeof T.created=="number"&&(f=T.created),h.type==="text_delta"&&(E+=h.text),h.type==="usage"&&(i=h.usage),h.type==="finish"&&(_=h.finishReason),h.type==="tool_call_delta")throw new Error("The bounded OpChat request did not admit tool calls.")}if(!g||!_)throw new Error("The stream ended without a terminal completion receipt.");c={id:g,model:e.model,request_id:e.requestId,object:"chat.completion",assembledFromStream:!0,...f===void 0?{}:{created:f},choices:[{index:0,message:{role:"assistant",content:E},finish_reason:_}],...i===null?{}:{usage:i}}}else c=await J(G),i=c.usage??null,E=c.choices?.[0]?.message?.content??"",_=c.choices?.[0]?.finish_reason??null;if(!c.id||c.model!==e.model||c.request_id!==e.requestId)throw new Error("The completion does not match the admitted model and request identity.");if(l.signal.throwIfAborted(),!_)throw new Error("The response ended without a terminal completion receipt.");M(F("completed"))}catch(u){let r=l.signal.aborted?l.signal.reason:u;x=K(r);let b=r instanceof Error?r.message:String(r),w=l.signal.aborted?r instanceof Error&&r.name==="TimeoutError"?"timed_out":"cancelled":m?"failed":"rejected";throw M(F(w,b)),new Z(b)}finally{clearTimeout(W),process.removeListener("SIGINT",P),process.removeListener("SIGTERM",v)}}p(ge,"runBoundedOpChat");export{ge as runBoundedOpChat};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{m as M}from"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import{b as x}from"./chunk-V3KEG6MI.js";import"./chunk-FGOTSCSE.js";import"./chunk-E2S2EMYQ.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as _,f as O,h as k,i as S}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-CRDKBFRN.js";import"./chunk-DMO3UIS7.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-L4EJ5R3B.js";import"./chunk-6ZTP6CUJ.js";import"./chunk-TBODQT4W.js";import"./chunk-YRDPVTEI.js";import"./chunk-JRGECNP3.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-5WPMI6QX.js";import"./chunk-W7NXFRHN.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-G4E3WGLM.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as j,randomBytes as L}from"node:crypto";import{createServer as B}from"node:http";function D(e){return[e.slug,`team=${e.teamId}`,`role=${e.role}`,`status=${e.status}`,e.displayName].join(" ")}i(D,"formatOrganizationLine");function H(e){return[e.email??e.userId,`user=${e.userId}`,`role=${e.role}`,e.createdAt].join(" ")}i(H,"formatOrganizationMemberLine");function W(e){return e?[e.slug,`team=${e.teamId}`,`status=${e.status}`,`tools=${e.toolset.join(",")||"-"}`,e.resourceUrl].join(" "):"no mcp server configured"}i(W,"formatOrganizationMcpServerLine");var F=["estimate.read","estimate.write","estimate.execute","artifacts.read","artifacts.write"];function b(e){let t=e.trim().replace(/\/$/,"");if(!t)throw new Error("MCP resource URL must be non-empty");return new URL(t).toString().replace(/\/$/,"")}i(b,"normalizeMcpResourceUrl");function R(e,t){let r=typeof t.resourceUrl=="string"&&t.resourceUrl.trim()?t.resourceUrl.trim():typeof t.url=="string"&&t.url.trim()?t.url.trim():"";if(r)return b(r);if(!e?.resourceUrl)throw new Error("organization does not have an MCP server; run organizations mcp-generate first");return b(e.resourceUrl)}i(R,"resolveMcpProbeResourceUrl");function v(e,t){let r=typeof t.origin=="string"&&t.origin.trim()?t.origin.trim():"";return r?b(r):new URL(e).origin}i(v,"resolveMcpProbeOrigin");function U(e=32){return L(e).toString("base64url")}i(U,"randomOauthToken");function G(e){return j("sha256").update(e).digest("base64url")}i(G,"buildMcpOauthPkceChallenge");function V(e){let t=typeof e.scope=="string"&&e.scope.trim()?e.scope:typeof e.scopes=="string"&&e.scopes.trim()?e.scopes:"";if(!t)return[...F];let r=t.split(/[,\s]+/g).map(o=>o.trim()).filter(Boolean);if(r.length===0)throw new Error("scope must include at least one OAuth scope");return r}i(V,"parseMcpOAuthScopes");function q(e){let t=typeof e.clientId=="string"&&e.clientId.trim()?e.clientId.trim():"openpond-code-mcp-proof";if(t==="true")throw new Error("client-id must be a non-empty value");return t}i(q,"resolveMcpOAuthClientId");function Y(e){let t=k(e.timeoutSeconds,"timeout-seconds")??k(e.timeout,"timeout")??180;if(t<=0)throw new Error("timeout must be greater than zero");return t*1e3}i(Y,"resolveMcpOAuthTimeoutMs");function Z(e){let t=k(e.callbackPort,"callback-port")??0;if(t<0||t>65535)throw new Error("callback-port must be between 0 and 65535");return t}i(Z,"resolveMcpOAuthCallbackPort");function E(e){return new Promise((t,r)=>{e.close(o=>{o?r(o):t()})})}i(E,"closeServer");async function K(e){let t=!1,r=null,o=null,s=null,n=new Promise((u,l)=>{o=u,s=l}),a=i((u,l,g,m,p)=>{if(t){u.writeHead(204).end();return}t=!0,u.writeHead(l,{"cache-control":"no-store","content-type":"text/html; charset=utf-8"}),u.end(g),r&&clearTimeout(r),m?o?.(m):s?.(p??new Error("oauth_callback_failed"))},"settle"),c=B((u,l)=>{let g=u.headers.host??"127.0.0.1",m=new URL(u.url??"/",`http://${g}`);if(m.pathname!=="/callback"){l.writeHead(404,{"content-type":"text/plain; charset=utf-8"}),l.end("Not found");return}let p=m.searchParams.get("state")??"",f=m.searchParams.get("error")??"",w=m.searchParams.get("code")??"";if(p!==e.expectedState){a(l,400,"<!doctype html><title>OpenPond OAuth failed</title><p>State mismatch. Return to the terminal and retry.</p>",void 0,new Error("oauth_state_mismatch"));return}if(f){a(l,400,"<!doctype html><title>OpenPond OAuth denied</title><p>Authorization was not completed. Return to the terminal.</p>",void 0,new Error(`oauth_authorization_failed:${f}`));return}if(!w){a(l,400,"<!doctype html><title>OpenPond OAuth failed</title><p>Missing authorization code. Return to the terminal and retry.</p>",void 0,new Error("oauth_code_missing"));return}a(l,200,"<!doctype html><title>OpenPond OAuth complete</title><p>Authorization complete. You can return to the terminal.</p>",{code:w,state:p})});await new Promise((u,l)=>{let g=i(p=>{c.off("listening",m),l(p)},"onError"),m=i(()=>{c.off("error",g),u()},"onListening");c.once("error",g),c.once("listening",m),c.listen(e.port,"127.0.0.1")});let d=c.address();if(!d||typeof d.port!="number")throw await E(c),new Error("oauth_callback_listener_failed");return r=setTimeout(()=>{t||(t=!0,s?.(new Error("oauth_callback_timeout")))},e.timeoutMs),{close:i(async()=>{r&&clearTimeout(r),await E(c).catch(()=>{})},"close"),redirectUri:`http://127.0.0.1:${d.port}/callback`,waitForCallback:i(()=>n,"waitForCallback")}}i(K,"startMcpOAuthCallbackListener");function Q(e){x(e)}i(Q,"openUrlWithSystemBrowser");function X(e){let t=new URL(e.authorizationEndpoint);return t.searchParams.set("response_type","code"),t.searchParams.set("client_id",e.clientId),t.searchParams.set("redirect_uri",e.redirectUri),t.searchParams.set("code_challenge",e.codeChallenge),t.searchParams.set("code_challenge_method","S256"),t.searchParams.set("resource",e.resourceUrl),t.searchParams.set("scope",e.scopes.join(" ")),t.searchParams.set("state",e.state),t.toString()}i(X,"buildMcpOAuthAuthorizeUrl");async function ee(e){let t=new URLSearchParams;t.set("grant_type","authorization_code"),t.set("client_id",e.clientId),t.set("redirect_uri",e.redirectUri),t.set("code",e.code),t.set("code_verifier",e.codeVerifier);let r=await fetch(`${e.origin}/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:t}),o=await N(r);if(!r.ok)throw new Error(`oauth_token_exchange_failed:${r.status}:${JSON.stringify(o)}`);if(!o||typeof o!="object"||Array.isArray(o))throw new Error("oauth_token_exchange_invalid_response");let s=o;if(typeof s.access_token!="string"||!s.access_token.trim())throw new Error("oauth_token_exchange_missing_access_token");return{access_token:s.access_token,...typeof s.expires_in=="number"?{expires_in:s.expires_in}:{},...typeof s.refresh_token=="string"?{refresh_token:s.refresh_token}:{},...typeof s.scope=="string"?{scope:s.scope}:{},...typeof s.token_type=="string"?{token_type:s.token_type}:{}}}i(ee,"exchangeMcpOAuthAuthorizationCode");async function N(e){let t=await e.text().catch(()=>"");if(!t)return null;let r=t.trim();if((e.headers.get("content-type")??"").toLowerCase().includes("application/json")||r.startsWith("{")||r.startsWith("["))try{return JSON.parse(r)}catch{return t}return t}i(N,"readMcpProbeBody");async function P(e,t={}){let r=await fetch(e,t);return{url:e,status:r.status,ok:r.ok,headers:{contentType:r.headers.get("content-type"),location:r.headers.get("location"),wwwAuthenticate:r.headers.get("www-authenticate")},body:await N(r)}}i(P,"fetchMcpProbe");function te(e,t,r){return r?{jsonrpc:"2.0",id:e,method:t,params:r}:{jsonrpc:"2.0",id:e,method:t}}i(te,"buildMcpJsonRpcRequest");function T(e){let t=typeof e.arguments=="string"&&e.arguments.trim()?e.arguments:typeof e.args=="string"&&e.args.trim()?e.args:"";if(!t)return{};let r=_(t,"arguments");if(!r||typeof r!="object"||Array.isArray(r))throw new Error("arguments must be a JSON object");return r}i(T,"parseMcpToolArguments");async function z(e){let t={"content-type":"application/json"};return e.accessToken&&(t.authorization=`Bearer ${e.accessToken}`),P(e.resourceUrl,{method:"POST",headers:t,body:JSON.stringify(te(e.id,e.method,e.params))})}i(z,"postMcpJsonRpcProbe");async function A(e){let t=b(e.resourceUrl),r=b(e.origin),o=`${t}/.well-known/oauth-protected-resource`,s=`${r}/.well-known/oauth-authorization-server`,[n,a,c,d,u,l,g]=await Promise.all([P(o),P(s),P(t),z({resourceUrl:t,id:1,method:"initialize"}),z({resourceUrl:t,id:2,method:"tools/list"}),z({resourceUrl:t,id:3,method:"tools/call",params:{name:e.toolName,arguments:e.toolArguments}}),e.accessToken?z({resourceUrl:t,id:4,method:"tools/call",params:{name:e.toolName,arguments:e.toolArguments},accessToken:e.accessToken}):Promise.resolve(null)]);return{resourceUrl:t,origin:r,protectedResource:n,authorizationServer:a,directGetChallenge:c,initialize:d,toolsList:u,unauthenticatedToolCall:l,...g?{authenticatedToolCall:g}:{}}}i(A,"probeOrganizationMcp");function re(e){let t=typeof e=="string"?e.trim():"";if(t==="owner"||t==="admin"||t==="member")return t;throw new Error("role must be owner, admin, or member")}i(re,"parseOrganizationRole");function ne(e){let t=typeof e.displayName=="string"&&e.displayName.trim()?e.displayName.trim():typeof e.name=="string"&&e.name.trim()?e.name.trim():"";if(!t)throw new Error("usage: organizations create --name <name> [--slug <slug>]");return{displayName:t,...typeof e.slug=="string"&&e.slug.trim()?{slug:e.slug.trim()}:{},...typeof e.primaryContactEmail=="string"&&e.primaryContactEmail.trim()?{primaryContactEmail:e.primaryContactEmail.trim()}:{},...typeof e.customDomain=="string"&&e.customDomain.trim()?{customDomain:e.customDomain.trim()}:{}}}i(ne,"buildOrganizationCreateInput");function oe(e){let t={},r=typeof e.displayName=="string"&&e.displayName.trim()?e.displayName.trim():typeof e.name=="string"&&e.name.trim()?e.name.trim():"";if(r&&(t.displayName=r),typeof e.slug=="string"&&e.slug.trim()&&(t.slug=e.slug.trim()),typeof e.primaryContactEmail=="string"&&(t.primaryContactEmail=e.primaryContactEmail.trim()||null),typeof e.customDomain=="string"&&(t.customDomain=e.customDomain.trim()||null),typeof e.status=="string"&&e.status.trim()){let o=e.status.trim();if(o!=="active"&&o!=="disabled"&&o!=="archived")throw new Error("status must be active, disabled, or archived");t.status=o}if(Object.keys(t).length===0)throw new Error("organizations update requires at least one changed field");return t}i(oe,"buildOrganizationUpdateInput");function ie(e){let t=typeof e.email=="string"?e.email.trim():"";if(!t)throw new Error("usage: organizations member-upsert <slug> --email <email> --role <role>");return{email:t,role:re(e.role)}}i(ie,"buildOrganizationMemberInput");function ae(e){return{...typeof e.origin=="string"&&e.origin.trim()?{origin:e.origin.trim()}:{},...typeof e.toolset=="string"&&e.toolset.trim()?{toolset:S(e.toolset)}:{}}}i(ae,"buildOrganizationMcpGenerateInput");async function ge(e,t){let r=t[0]||"list",o=await M(e),s=O(e.json);if(r==="list"){let n=await o.listOrganizations();if(s){console.log(JSON.stringify({organizations:n},null,2));return}if(n.length===0){console.log("no organizations found");return}for(let a of n)console.log(D(a));return}if(r==="create"){let n=await o.createOrganization(ne(e));console.log(JSON.stringify({organization:n},null,2));return}if(r==="get"){let n=t[1];if(!n)throw new Error("usage: organizations get <slug>");let a=await o.getOrganization(n);console.log(JSON.stringify({organization:a},null,2));return}if(r==="update"){let n=t[1];if(!n)throw new Error("usage: organizations update <slug> [--name <name>]");let a=await o.updateOrganization(n,oe(e));console.log(JSON.stringify({organization:a},null,2));return}if(r==="members"||r==="member-list"){let n=t[1];if(!n)throw new Error("usage: organizations members <slug>");let a=await o.listOrganizationMembers(n);if(s){console.log(JSON.stringify({members:a},null,2));return}if(a.length===0){console.log("no organization members found");return}for(let c of a)console.log(H(c));return}if(r==="member-upsert"||r==="member-add"){let n=t[1];if(!n)throw new Error("usage: organizations member-upsert <slug> --email <email> --role <role>");let a=await o.upsertOrganizationMember(n,ie(e));console.log(JSON.stringify({member:a},null,2));return}if(r==="mcp-get"||r==="mcp-server"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-get <slug>");let a=await o.getOrganizationMcpServer(n);if(s){console.log(JSON.stringify({mcpServer:a},null,2));return}console.log(W(a));return}if(r==="mcp-generate"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-generate <slug> [--origin <url>]");let a=await o.generateOrganizationMcpServer(n,ae(e));console.log(JSON.stringify({mcpServer:a},null,2));return}if(r==="mcp-probe"||r==="mcp-inspect"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-probe <slug> [--origin <url>] [--tool <name>] [--arguments <json>] [--access-token <token>]");let a=await o.getOrganizationMcpServer(n),c=R(a,e),d=v(c,e),u=typeof e.tool=="string"&&e.tool.trim()?e.tool.trim():typeof e.toolName=="string"&&e.toolName.trim()?e.toolName.trim():"estimate_search_history",l=T(e),g=typeof e.accessToken=="string"&&e.accessToken.trim()?e.accessToken.trim():"",m=await A({resourceUrl:c,origin:d,toolName:u,toolArguments:l,...g?{accessToken:g}:{}});console.log(JSON.stringify({mcpServer:a,probe:m},null,2));return}if(r==="mcp-authorize"||r==="mcp-oauth"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-authorize <slug> [--origin <url>] [--scope <csv|space>] [--tool <name>] [--arguments <json>] [--open]");let a=await o.getOrganizationMcpServer(n),c=R(a,e),d=v(c,e),u=q(e),l=V(e),g=U(18),m=U(48),p=G(m),f=await K({expectedState:g,port:Z(e),timeoutMs:Y(e)}),w=X({authorizationEndpoint:`${d}/oauth/authorize`,clientId:u,codeChallenge:p,redirectUri:f.redirectUri,resourceUrl:c,scopes:l,state:g});if(console.error("Open this URL to authorize the organization MCP connection:"),console.error(w),console.error(`Waiting for OAuth callback on ${f.redirectUri}`),O(e.open))try{Q(w)}catch(y){console.error(`Unable to open a browser automatically: ${y instanceof Error?y.message:String(y)}`)}try{let y=await f.waitForCallback(),h=await ee({clientId:u,code:y.code,codeVerifier:m,origin:d,redirectUri:f.redirectUri}),C=typeof e.tool=="string"&&e.tool.trim()?e.tool.trim():typeof e.toolName=="string"&&e.toolName.trim()?e.toolName.trim():"estimate_search_history",I=T(e),$=await A({accessToken:h.access_token,origin:d,resourceUrl:c,toolArguments:I,toolName:C}),J=O(e.printToken);console.log(JSON.stringify({mcpServer:a,oauth:{accessTokenReceived:!0,clientId:u,expiresIn:h.expires_in??null,refreshTokenReceived:!!h.refresh_token,scope:h.scope??l.join(" "),tokenType:h.token_type??"Bearer",...J?{accessToken:h.access_token,refreshToken:h.refresh_token??null}:{}},probe:$},null,2))}finally{await f.close()}return}if(r==="mcp-rotate"||r==="mcp-disable"||r==="mcp-enable"){let n=t[1];if(!n)throw new Error(`usage: organizations ${r} <slug>`);let a=r==="mcp-rotate"?await o.rotateOrganizationMcpServer(n):r==="mcp-disable"?await o.disableOrganizationMcpServer(n):await o.enableOrganizationMcpServer(n);console.log(JSON.stringify({mcpServer:a},null,2));return}throw new Error("usage: organizations <list|create|get|update|members|member-upsert|mcp-get|mcp-generate|mcp-probe|mcp-authorize|mcp-rotate|mcp-disable|mcp-enable> [args]")}i(ge,"runOrganizationsCommand");export{F as DEFAULT_MCP_AUTHORIZE_SCOPES,te as buildMcpJsonRpcRequest,X as buildMcpOAuthAuthorizeUrl,G as buildMcpOauthPkceChallenge,ne as buildOrganizationCreateInput,ae as buildOrganizationMcpGenerateInput,ie as buildOrganizationMemberInput,oe as buildOrganizationUpdateInput,E as closeServer,ee as exchangeMcpOAuthAuthorizationCode,P as fetchMcpProbe,D as formatOrganizationLine,W as formatOrganizationMcpServerLine,H as formatOrganizationMemberLine,b as normalizeMcpResourceUrl,Q as openUrlWithSystemBrowser,V as parseMcpOAuthScopes,T as parseMcpToolArguments,re as parseOrganizationRole,z as postMcpJsonRpcProbe,A as probeOrganizationMcp,U as randomOauthToken,N as readMcpProbeBody,Z as resolveMcpOAuthCallbackPort,q as resolveMcpOAuthClientId,Y as resolveMcpOAuthTimeoutMs,v as resolveMcpProbeOrigin,R as resolveMcpProbeResourceUrl,ge as runOrganizationsCommand,K as startMcpOAuthCallbackListener};
|
|
2
|
+
import{m as M}from"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import{b as x}from"./chunk-V3KEG6MI.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{a as _,f as O,h as k,i as S}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-CRDKBFRN.js";import"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as j,randomBytes as L}from"node:crypto";import{createServer as B}from"node:http";function D(e){return[e.slug,`team=${e.teamId}`,`role=${e.role}`,`status=${e.status}`,e.displayName].join(" ")}i(D,"formatOrganizationLine");function H(e){return[e.email??e.userId,`user=${e.userId}`,`role=${e.role}`,e.createdAt].join(" ")}i(H,"formatOrganizationMemberLine");function W(e){return e?[e.slug,`team=${e.teamId}`,`status=${e.status}`,`tools=${e.toolset.join(",")||"-"}`,e.resourceUrl].join(" "):"no mcp server configured"}i(W,"formatOrganizationMcpServerLine");var F=["estimate.read","estimate.write","estimate.execute","artifacts.read","artifacts.write"];function b(e){let t=e.trim().replace(/\/$/,"");if(!t)throw new Error("MCP resource URL must be non-empty");return new URL(t).toString().replace(/\/$/,"")}i(b,"normalizeMcpResourceUrl");function R(e,t){let r=typeof t.resourceUrl=="string"&&t.resourceUrl.trim()?t.resourceUrl.trim():typeof t.url=="string"&&t.url.trim()?t.url.trim():"";if(r)return b(r);if(!e?.resourceUrl)throw new Error("organization does not have an MCP server; run organizations mcp-generate first");return b(e.resourceUrl)}i(R,"resolveMcpProbeResourceUrl");function v(e,t){let r=typeof t.origin=="string"&&t.origin.trim()?t.origin.trim():"";return r?b(r):new URL(e).origin}i(v,"resolveMcpProbeOrigin");function U(e=32){return L(e).toString("base64url")}i(U,"randomOauthToken");function G(e){return j("sha256").update(e).digest("base64url")}i(G,"buildMcpOauthPkceChallenge");function V(e){let t=typeof e.scope=="string"&&e.scope.trim()?e.scope:typeof e.scopes=="string"&&e.scopes.trim()?e.scopes:"";if(!t)return[...F];let r=t.split(/[,\s]+/g).map(o=>o.trim()).filter(Boolean);if(r.length===0)throw new Error("scope must include at least one OAuth scope");return r}i(V,"parseMcpOAuthScopes");function q(e){let t=typeof e.clientId=="string"&&e.clientId.trim()?e.clientId.trim():"openpond-code-mcp-proof";if(t==="true")throw new Error("client-id must be a non-empty value");return t}i(q,"resolveMcpOAuthClientId");function Y(e){let t=k(e.timeoutSeconds,"timeout-seconds")??k(e.timeout,"timeout")??180;if(t<=0)throw new Error("timeout must be greater than zero");return t*1e3}i(Y,"resolveMcpOAuthTimeoutMs");function Z(e){let t=k(e.callbackPort,"callback-port")??0;if(t<0||t>65535)throw new Error("callback-port must be between 0 and 65535");return t}i(Z,"resolveMcpOAuthCallbackPort");function E(e){return new Promise((t,r)=>{e.close(o=>{o?r(o):t()})})}i(E,"closeServer");async function K(e){let t=!1,r=null,o=null,s=null,n=new Promise((u,l)=>{o=u,s=l}),a=i((u,l,g,m,p)=>{if(t){u.writeHead(204).end();return}t=!0,u.writeHead(l,{"cache-control":"no-store","content-type":"text/html; charset=utf-8"}),u.end(g),r&&clearTimeout(r),m?o?.(m):s?.(p??new Error("oauth_callback_failed"))},"settle"),c=B((u,l)=>{let g=u.headers.host??"127.0.0.1",m=new URL(u.url??"/",`http://${g}`);if(m.pathname!=="/callback"){l.writeHead(404,{"content-type":"text/plain; charset=utf-8"}),l.end("Not found");return}let p=m.searchParams.get("state")??"",f=m.searchParams.get("error")??"",w=m.searchParams.get("code")??"";if(p!==e.expectedState){a(l,400,"<!doctype html><title>OpenPond OAuth failed</title><p>State mismatch. Return to the terminal and retry.</p>",void 0,new Error("oauth_state_mismatch"));return}if(f){a(l,400,"<!doctype html><title>OpenPond OAuth denied</title><p>Authorization was not completed. Return to the terminal.</p>",void 0,new Error(`oauth_authorization_failed:${f}`));return}if(!w){a(l,400,"<!doctype html><title>OpenPond OAuth failed</title><p>Missing authorization code. Return to the terminal and retry.</p>",void 0,new Error("oauth_code_missing"));return}a(l,200,"<!doctype html><title>OpenPond OAuth complete</title><p>Authorization complete. You can return to the terminal.</p>",{code:w,state:p})});await new Promise((u,l)=>{let g=i(p=>{c.off("listening",m),l(p)},"onError"),m=i(()=>{c.off("error",g),u()},"onListening");c.once("error",g),c.once("listening",m),c.listen(e.port,"127.0.0.1")});let d=c.address();if(!d||typeof d.port!="number")throw await E(c),new Error("oauth_callback_listener_failed");return r=setTimeout(()=>{t||(t=!0,s?.(new Error("oauth_callback_timeout")))},e.timeoutMs),{close:i(async()=>{r&&clearTimeout(r),await E(c).catch(()=>{})},"close"),redirectUri:`http://127.0.0.1:${d.port}/callback`,waitForCallback:i(()=>n,"waitForCallback")}}i(K,"startMcpOAuthCallbackListener");function Q(e){x(e)}i(Q,"openUrlWithSystemBrowser");function X(e){let t=new URL(e.authorizationEndpoint);return t.searchParams.set("response_type","code"),t.searchParams.set("client_id",e.clientId),t.searchParams.set("redirect_uri",e.redirectUri),t.searchParams.set("code_challenge",e.codeChallenge),t.searchParams.set("code_challenge_method","S256"),t.searchParams.set("resource",e.resourceUrl),t.searchParams.set("scope",e.scopes.join(" ")),t.searchParams.set("state",e.state),t.toString()}i(X,"buildMcpOAuthAuthorizeUrl");async function ee(e){let t=new URLSearchParams;t.set("grant_type","authorization_code"),t.set("client_id",e.clientId),t.set("redirect_uri",e.redirectUri),t.set("code",e.code),t.set("code_verifier",e.codeVerifier);let r=await fetch(`${e.origin}/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:t}),o=await N(r);if(!r.ok)throw new Error(`oauth_token_exchange_failed:${r.status}:${JSON.stringify(o)}`);if(!o||typeof o!="object"||Array.isArray(o))throw new Error("oauth_token_exchange_invalid_response");let s=o;if(typeof s.access_token!="string"||!s.access_token.trim())throw new Error("oauth_token_exchange_missing_access_token");return{access_token:s.access_token,...typeof s.expires_in=="number"?{expires_in:s.expires_in}:{},...typeof s.refresh_token=="string"?{refresh_token:s.refresh_token}:{},...typeof s.scope=="string"?{scope:s.scope}:{},...typeof s.token_type=="string"?{token_type:s.token_type}:{}}}i(ee,"exchangeMcpOAuthAuthorizationCode");async function N(e){let t=await e.text().catch(()=>"");if(!t)return null;let r=t.trim();if((e.headers.get("content-type")??"").toLowerCase().includes("application/json")||r.startsWith("{")||r.startsWith("["))try{return JSON.parse(r)}catch{return t}return t}i(N,"readMcpProbeBody");async function P(e,t={}){let r=await fetch(e,t);return{url:e,status:r.status,ok:r.ok,headers:{contentType:r.headers.get("content-type"),location:r.headers.get("location"),wwwAuthenticate:r.headers.get("www-authenticate")},body:await N(r)}}i(P,"fetchMcpProbe");function te(e,t,r){return r?{jsonrpc:"2.0",id:e,method:t,params:r}:{jsonrpc:"2.0",id:e,method:t}}i(te,"buildMcpJsonRpcRequest");function T(e){let t=typeof e.arguments=="string"&&e.arguments.trim()?e.arguments:typeof e.args=="string"&&e.args.trim()?e.args:"";if(!t)return{};let r=_(t,"arguments");if(!r||typeof r!="object"||Array.isArray(r))throw new Error("arguments must be a JSON object");return r}i(T,"parseMcpToolArguments");async function z(e){let t={"content-type":"application/json"};return e.accessToken&&(t.authorization=`Bearer ${e.accessToken}`),P(e.resourceUrl,{method:"POST",headers:t,body:JSON.stringify(te(e.id,e.method,e.params))})}i(z,"postMcpJsonRpcProbe");async function A(e){let t=b(e.resourceUrl),r=b(e.origin),o=`${t}/.well-known/oauth-protected-resource`,s=`${r}/.well-known/oauth-authorization-server`,[n,a,c,d,u,l,g]=await Promise.all([P(o),P(s),P(t),z({resourceUrl:t,id:1,method:"initialize"}),z({resourceUrl:t,id:2,method:"tools/list"}),z({resourceUrl:t,id:3,method:"tools/call",params:{name:e.toolName,arguments:e.toolArguments}}),e.accessToken?z({resourceUrl:t,id:4,method:"tools/call",params:{name:e.toolName,arguments:e.toolArguments},accessToken:e.accessToken}):Promise.resolve(null)]);return{resourceUrl:t,origin:r,protectedResource:n,authorizationServer:a,directGetChallenge:c,initialize:d,toolsList:u,unauthenticatedToolCall:l,...g?{authenticatedToolCall:g}:{}}}i(A,"probeOrganizationMcp");function re(e){let t=typeof e=="string"?e.trim():"";if(t==="owner"||t==="admin"||t==="member")return t;throw new Error("role must be owner, admin, or member")}i(re,"parseOrganizationRole");function ne(e){let t=typeof e.displayName=="string"&&e.displayName.trim()?e.displayName.trim():typeof e.name=="string"&&e.name.trim()?e.name.trim():"";if(!t)throw new Error("usage: organizations create --name <name> [--slug <slug>]");return{displayName:t,...typeof e.slug=="string"&&e.slug.trim()?{slug:e.slug.trim()}:{},...typeof e.primaryContactEmail=="string"&&e.primaryContactEmail.trim()?{primaryContactEmail:e.primaryContactEmail.trim()}:{},...typeof e.customDomain=="string"&&e.customDomain.trim()?{customDomain:e.customDomain.trim()}:{}}}i(ne,"buildOrganizationCreateInput");function oe(e){let t={},r=typeof e.displayName=="string"&&e.displayName.trim()?e.displayName.trim():typeof e.name=="string"&&e.name.trim()?e.name.trim():"";if(r&&(t.displayName=r),typeof e.slug=="string"&&e.slug.trim()&&(t.slug=e.slug.trim()),typeof e.primaryContactEmail=="string"&&(t.primaryContactEmail=e.primaryContactEmail.trim()||null),typeof e.customDomain=="string"&&(t.customDomain=e.customDomain.trim()||null),typeof e.status=="string"&&e.status.trim()){let o=e.status.trim();if(o!=="active"&&o!=="disabled"&&o!=="archived")throw new Error("status must be active, disabled, or archived");t.status=o}if(Object.keys(t).length===0)throw new Error("organizations update requires at least one changed field");return t}i(oe,"buildOrganizationUpdateInput");function ie(e){let t=typeof e.email=="string"?e.email.trim():"";if(!t)throw new Error("usage: organizations member-upsert <slug> --email <email> --role <role>");return{email:t,role:re(e.role)}}i(ie,"buildOrganizationMemberInput");function ae(e){return{...typeof e.origin=="string"&&e.origin.trim()?{origin:e.origin.trim()}:{},...typeof e.toolset=="string"&&e.toolset.trim()?{toolset:S(e.toolset)}:{}}}i(ae,"buildOrganizationMcpGenerateInput");async function ge(e,t){let r=t[0]||"list",o=await M(e),s=O(e.json);if(r==="list"){let n=await o.listOrganizations();if(s){console.log(JSON.stringify({organizations:n},null,2));return}if(n.length===0){console.log("no organizations found");return}for(let a of n)console.log(D(a));return}if(r==="create"){let n=await o.createOrganization(ne(e));console.log(JSON.stringify({organization:n},null,2));return}if(r==="get"){let n=t[1];if(!n)throw new Error("usage: organizations get <slug>");let a=await o.getOrganization(n);console.log(JSON.stringify({organization:a},null,2));return}if(r==="update"){let n=t[1];if(!n)throw new Error("usage: organizations update <slug> [--name <name>]");let a=await o.updateOrganization(n,oe(e));console.log(JSON.stringify({organization:a},null,2));return}if(r==="members"||r==="member-list"){let n=t[1];if(!n)throw new Error("usage: organizations members <slug>");let a=await o.listOrganizationMembers(n);if(s){console.log(JSON.stringify({members:a},null,2));return}if(a.length===0){console.log("no organization members found");return}for(let c of a)console.log(H(c));return}if(r==="member-upsert"||r==="member-add"){let n=t[1];if(!n)throw new Error("usage: organizations member-upsert <slug> --email <email> --role <role>");let a=await o.upsertOrganizationMember(n,ie(e));console.log(JSON.stringify({member:a},null,2));return}if(r==="mcp-get"||r==="mcp-server"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-get <slug>");let a=await o.getOrganizationMcpServer(n);if(s){console.log(JSON.stringify({mcpServer:a},null,2));return}console.log(W(a));return}if(r==="mcp-generate"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-generate <slug> [--origin <url>]");let a=await o.generateOrganizationMcpServer(n,ae(e));console.log(JSON.stringify({mcpServer:a},null,2));return}if(r==="mcp-probe"||r==="mcp-inspect"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-probe <slug> [--origin <url>] [--tool <name>] [--arguments <json>] [--access-token <token>]");let a=await o.getOrganizationMcpServer(n),c=R(a,e),d=v(c,e),u=typeof e.tool=="string"&&e.tool.trim()?e.tool.trim():typeof e.toolName=="string"&&e.toolName.trim()?e.toolName.trim():"estimate_search_history",l=T(e),g=typeof e.accessToken=="string"&&e.accessToken.trim()?e.accessToken.trim():"",m=await A({resourceUrl:c,origin:d,toolName:u,toolArguments:l,...g?{accessToken:g}:{}});console.log(JSON.stringify({mcpServer:a,probe:m},null,2));return}if(r==="mcp-authorize"||r==="mcp-oauth"){let n=t[1];if(!n)throw new Error("usage: organizations mcp-authorize <slug> [--origin <url>] [--scope <csv|space>] [--tool <name>] [--arguments <json>] [--open]");let a=await o.getOrganizationMcpServer(n),c=R(a,e),d=v(c,e),u=q(e),l=V(e),g=U(18),m=U(48),p=G(m),f=await K({expectedState:g,port:Z(e),timeoutMs:Y(e)}),w=X({authorizationEndpoint:`${d}/oauth/authorize`,clientId:u,codeChallenge:p,redirectUri:f.redirectUri,resourceUrl:c,scopes:l,state:g});if(console.error("Open this URL to authorize the organization MCP connection:"),console.error(w),console.error(`Waiting for OAuth callback on ${f.redirectUri}`),O(e.open))try{Q(w)}catch(y){console.error(`Unable to open a browser automatically: ${y instanceof Error?y.message:String(y)}`)}try{let y=await f.waitForCallback(),h=await ee({clientId:u,code:y.code,codeVerifier:m,origin:d,redirectUri:f.redirectUri}),C=typeof e.tool=="string"&&e.tool.trim()?e.tool.trim():typeof e.toolName=="string"&&e.toolName.trim()?e.toolName.trim():"estimate_search_history",I=T(e),$=await A({accessToken:h.access_token,origin:d,resourceUrl:c,toolArguments:I,toolName:C}),J=O(e.printToken);console.log(JSON.stringify({mcpServer:a,oauth:{accessTokenReceived:!0,clientId:u,expiresIn:h.expires_in??null,refreshTokenReceived:!!h.refresh_token,scope:h.scope??l.join(" "),tokenType:h.token_type??"Bearer",...J?{accessToken:h.access_token,refreshToken:h.refresh_token??null}:{}},probe:$},null,2))}finally{await f.close()}return}if(r==="mcp-rotate"||r==="mcp-disable"||r==="mcp-enable"){let n=t[1];if(!n)throw new Error(`usage: organizations ${r} <slug>`);let a=r==="mcp-rotate"?await o.rotateOrganizationMcpServer(n):r==="mcp-disable"?await o.disableOrganizationMcpServer(n):await o.enableOrganizationMcpServer(n);console.log(JSON.stringify({mcpServer:a},null,2));return}throw new Error("usage: organizations <list|create|get|update|members|member-upsert|mcp-get|mcp-generate|mcp-probe|mcp-authorize|mcp-rotate|mcp-disable|mcp-enable> [args]")}i(ge,"runOrganizationsCommand");export{F as DEFAULT_MCP_AUTHORIZE_SCOPES,te as buildMcpJsonRpcRequest,X as buildMcpOAuthAuthorizeUrl,G as buildMcpOauthPkceChallenge,ne as buildOrganizationCreateInput,ae as buildOrganizationMcpGenerateInput,ie as buildOrganizationMemberInput,oe as buildOrganizationUpdateInput,E as closeServer,ee as exchangeMcpOAuthAuthorizationCode,P as fetchMcpProbe,D as formatOrganizationLine,W as formatOrganizationMcpServerLine,H as formatOrganizationMemberLine,b as normalizeMcpResourceUrl,Q as openUrlWithSystemBrowser,V as parseMcpOAuthScopes,T as parseMcpToolArguments,re as parseOrganizationRole,z as postMcpJsonRpcProbe,A as probeOrganizationMcp,U as randomOauthToken,N as readMcpProbeBody,Z as resolveMcpOAuthCallbackPort,q as resolveMcpOAuthClientId,Y as resolveMcpOAuthTimeoutMs,v as resolveMcpProbeOrigin,R as resolveMcpProbeResourceUrl,ge as runOrganizationsCommand,K as startMcpOAuthCallbackListener};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i as Ie,j as K,k as W,r as $e,s as Re}from"./chunk-36FNNR5N.js";import{m as G}from"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-FGOTSCSE.js";import"./chunk-E2S2EMYQ.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as f,d as B,f as S}from"./chunk-3M53YXEI.js";import{e as ie}from"./chunk-LZPCA6DH.js";import{a as ue}from"./chunk-L3KS6MOV.js";import"./chunk-SFR32TMJ.js";import"./chunk-5KJMFK65.js";import"./chunk-Y3B6ZUE6.js";import{ja as fe}from"./chunk-WLZJOCLA.js";import"./chunk-HIQPGYVH.js";import"./chunk-ZWW227M3.js";import"./chunk-DXA2UHBE.js";import"./chunk-MTP3B2SU.js";import"./chunk-X37KMV27.js";import{G as Pe,I as ke,J as ye,K as R,e as Q,f as he,g as X,h as ge,i as me,j as pe,q as ee,s as Se,t as we,x}from"./chunk-EBOTNBUS.js";import"./chunk-PWKJ5KLZ.js";import"./chunk-CRDKBFRN.js";import"./chunk-DMO3UIS7.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-L4EJ5R3B.js";import"./chunk-6ZTP6CUJ.js";import"./chunk-TBODQT4W.js";import"./chunk-YRDPVTEI.js";import"./chunk-JRGECNP3.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-5WPMI6QX.js";import"./chunk-W7NXFRHN.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-JFZ6USNQ.js";import"./chunk-6FA3GG5B.js";import"./chunk-G4E3WGLM.js";import{c as ae,sa as le,ta as ce,wa as de}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";import{readFile as qe}from"node:fs/promises";import L from"node:path";import{promises as A}from"node:fs";import b from"node:path";async function oe(e,t){let o=b.join(e,t),n=await A.lstat(o).catch(l=>{if(l.code==="ENOENT")return null;throw l});if(!n)return[];if(!n.isDirectory()||n.isSymbolicLink())throw new Error(`Profile source directory is not a regular directory: ${t}`);let a=[];for(let l of await A.readdir(o,{withFileTypes:!0})){let h=b.join(o,l.name),d=b.relative(e,h).split(b.sep).join("/");if(l.isSymbolicLink())throw new Error(`Profile source contains a symlink: ${d}`);if(l.isDirectory())a.push(...await oe(e,d));else if(l.isFile())a.push(d);else throw new Error(`Profile source contains a non-regular file: ${d}`)}return a.sort()}i(oe,"sourceFiles");async function Ce(e,t=new Set){let{skills:o,skillCatalog:n}=await ue(e);if(n.error)throw new Error(`Profile Skills: ${n.error}`);for(let s of o)if(s.validationStatus!=="valid")throw new Error(`Profile Skill ${s.name}: ${s.validationMessages.join(" ")}`);let a=new Set(o.map(s=>s.path)),l=[...await oe(e,"workflows"),...await oe(e,"evals")].sort(),h=l.filter(s=>s.startsWith("workflows/")),d=h.some(s=>/^workflows\/[^/]+\/(PROMPT\.md|ACTION\.json)$/.test(s)),u=h.includes("workflows/catalog.json");if(d&&u)throw new Error("Workflow packages and legacy workflows/catalog.json cannot coexist.");let y=d?ie({files:new Map(await Promise.all(h.map(async s=>[s,await A.readFile(b.join(e,s),"utf8")]))),skillPaths:a,actionIds:t}).catalog:u?ae({catalog:JSON.parse(await A.readFile(b.join(e,"workflows/catalog.json"),"utf8")),sourcePaths:a,actionIds:t}):{workflows:[]},$=new Set(y.workflows.map(s=>s.id)),C=l.filter(s=>/^workflows\/[^/]+\/evals\/[^/]+\.json$/.test(s)||/^evals\/definitions\/[^/]+\.json$/.test(s)),w=l.filter(s=>/^evals\/suites\/[^/]+\.json$/.test(s));if(l.includes("evals/catalog.json")&&(C.length||w.length))throw new Error("Evaluation packages and legacy evals/catalog.json cannot coexist.");let j=await Promise.all(C.map(async s=>{let r=le.parse(JSON.parse(await A.readFile(b.join(e,s),"utf8"))),m=/^workflows\/([^/]+)\/evals\//.exec(s)?.[1];if(m&&(r.target.kind!=="workflow"||r.target.workflowId!==m))throw new Error(`Evaluation ${r.id} must target its containing Workflow ${m}.`);return r})),N=await Promise.all(w.map(async s=>ce.parse(JSON.parse(await A.readFile(b.join(e,s),"utf8"))))),_=l.includes("evals/catalog.json")?JSON.parse(await A.readFile(b.join(e,"evals/catalog.json"),"utf8")):{schemaVersion:"openpond.profileEvaluations.v1",definitions:j,suites:N},P=de({catalog:_,workflowIds:$,skillPaths:a,actionIds:t}).catalog,g=l.filter(s=>/^evals\/tasksets\/[^/]+\.json$/.test(s)),O=new Map;for(let s of g){let r=fe(JSON.parse(await A.readFile(b.join(e,s),"utf8"))).taskset;if(s!==`evals/tasksets/${r.contentHash}.json`)throw new Error(`Frozen Taskset file name differs from its content hash: ${s}.`);O.set(r.contentHash,r)}for(let s of P.definitions){let r=s.tasksetRelease.contentHash,m=`evals/tasksets/${r}.json`,H=O.get(r);if(!H)throw new Error(`Evaluation ${s.id} is missing Taskset ${m}.`);if(H.id!==s.tasksetRelease.id||H.contentHash!==r)throw new Error(`Evaluation ${s.id} references a different frozen Taskset.`);let E=new Set(H.tasks.filter(k=>k.split===s.split).map(k=>k.id));for(let k of s.taskIds)if(!E.has(k))throw new Error(`Evaluation ${s.id} references missing Taskset case ${k} in split ${s.split}.`)}return{workflows:y.workflows.length,skills:o.length,evaluations:P.definitions.length,tasksets:O.size}}i(Ce,"checkLocalProfileSource");import te from"node:path";async function Ae(e){if(!e.state.sourcePath)throw new Error("Active OpenPond profile is missing a source path.");let t=e.state.agents.find(s=>s.id===e.agentId);if(!t)throw new Error(`Profile agent not found for hosted materialization: ${e.agentId}`);if(!t.enabled)throw new Error(`Profile agent is disabled: ${e.agentId}`);let o=xe(e.state.sourcePath,t.path),n=await Ie(o),a=await K(o,n.entries),l=W(n,a.entries),h=await Me({client:e.client,teamId:e.teamId,projectId:e.projectId??null,profileProjectId:e.profileProjectId,profileName:e.profileName,agentId:e.agentId,localHead:e.localHead,hostedHead:e.hostedHead}),d=await e.client.projects.uploadSource(h.id,{teamId:e.teamId,entries:l.entries,branch:e.sourceRef,commitMessage:`Materialize OpenPond profile agent ${e.agentId}`}),u=await e.client.projects.sync(d.id,{teamId:e.teamId}),y=be(u)??be(d),$=je(u)??je(d)??e.sourceRef,C=`openpond-profile-agent:${e.profileProjectId}:${e.profileName}:${e.agentId}`,w=(await e.client.agents.list({teamId:e.teamId})).find(s=>s.externalId===C),j=await e.client.agents.upsert({teamId:e.teamId,projectId:u.id,name:t.name||e.agentId,slug:_e(e.profileName,e.agentId),selectedEntrypoint:Ne(e.state,e.agentId),triggerType:"manual",runtimeSource:{mode:"latest_source",...$?{sourceRef:$}:{},...y?{sourceCommitSha:y}:{}},metadata:{...w?.metadata??{},source:"openpond_profile_agent_materialization",profileProjectId:e.profileProjectId,profileName:e.profileName,profileAgentId:e.agentId,profileSourcePath:t.path,localHead:e.localHead,hostedHead:e.hostedHead},externalId:C}),N=v(a.uploadMetadata),_=v(N?.commands),P=v(N?.dependencySetup),g=Ue(P?.commands),O=[I(_?.validate),I(_?.eval)].filter(s=>!!s);return{status:"uploaded",agentId:e.agentId,runtimeAgentId:j.id,projectId:u.id,sourceRoot:o,sourceRef:$,sourceCommitSha:y??null,manifestHash:u.sandboxManifestHash??null,manifestPath:u.sandboxManifestPath??null,manifestSyncedAt:u.sandboxManifestSyncedAt??null,fileCount:l.fileCount,totalBytes:l.totalBytes,generatedManifestPath:a.generatedManifestPath,synthesizedOpenPondYaml:a.synthesizedOpenPondYaml,uploadMetadataPath:a.uploadMetadataPath,setupCommands:g,validationCommands:O,materializedAt:new Date().toISOString()}}i(Ae,"materializeHostedProfileAgentSource");async function Me(e){if(e.projectId)try{return await e.client.projects.get(e.projectId,{teamId:e.teamId})}catch{}return e.client.projects.upsert({teamId:e.teamId,name:`OpenPond profile ${e.profileName} ${e.agentId}`,sourceType:"manual",externalId:`openpond-profile:${e.profileProjectId}:${e.profileName}:${e.agentId}`,description:`Materialized OpenPond profile agent ${e.agentId} for hosted Team execution.`,metadata:{source:"openpond_profile_agent_materialization",profileProjectId:e.profileProjectId,profileName:e.profileName,profileAgentId:e.agentId,localHead:e.localHead,hostedHead:e.hostedHead}})}i(Me,"getOrCreateHostedSourceProject");function xe(e,t){let o=t.replace(/\\/g,"/"),n=te.resolve(e,o),a=te.relative(e,n);if(a.startsWith("..")||te.isAbsolute(a))throw new Error(`Profile agent path escapes profile source: ${t}`);return o==="agent/agent.ts"||o.endsWith("/agent.ts")?e:n}i(xe,"resolveProfileAgentSourceRoot");function Ne(e,t){let o=e.actionCatalog.find(n=>n.agentId===t&&(n.sourceActionId==="chat"||n.name==="chat"))??e.actionCatalog.find(n=>n.agentId===t);return{scope:"action",name:typeof o?.sourceActionId=="string"&&o.sourceActionId||typeof o?.name=="string"&&o.name||"chat"}}i(Ne,"hostedEntrypointForProfileAgent");function _e(e,t){return`openpond-profile-${e}-${t}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"openpond-profile-agent"}i(_e,"hostedRuntimeAgentSlug");function be(e){let t=v(e),o=v(t?.sourceConfig),n=v(t?.metadata);return I(o?.sourceCommitSha)??I(o?.commitSha)??I(o?.remoteSha)??I(n?.projectSourceUploadCommitSha)??I(n?.sourceCommitSha)??I(t?.templateRemoteSha)}i(be,"sandboxProjectSourceCommitSha");function je(e){let t=v(e),o=v(t?.sourceConfig);return I(o?.sourceRef)??I(o?.branch)??I(t?.gitBranch)??I(t?.defaultBranch)}i(je,"sandboxProjectSourceRef");function v(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}i(v,"record");function I(e){return typeof e=="string"&&e.trim()?e.trim():null}i(I,"text");function Ue(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}i(Ue,"stringArray");import{createHash as Fe,randomUUID as Le}from"node:crypto";function ve(e){let t=e.explicitKey?.trim();if(t)return t;let o=e.sourceHead?.trim()||"unknown-source",n=e.targetProjectId?.trim()||"no-target-project",a=Te(e.input).slice(0,16),l=`profile-push-run:${e.localHead}:${o}:${e.runtimeAgentId}:${n}:${a}`;return e.retry?`${l}:retry:${(e.randomId??Le)()}`:l}i(ve,"buildHostedRunIdempotencyKey");function Te(e){return Fe("sha256").update(ne(e)).digest("hex")}i(Te,"hashStableJson");function ne(e){return e===void 0?"undefined":e===null||typeof e!="object"?JSON.stringify(e)??"null":Array.isArray(e)?`[${e.map(t=>ne(t)).join(",")}]`:`{${Object.entries(e).sort(([t],[o])=>t.localeCompare(o)).map(([t,o])=>`${JSON.stringify(t)}:${ne(o)}`).join(",")}}`}i(ne,"stableJsonStringify");async function zo(e){let t=await Se({repoPath:f(e,"path")||ee(),profile:f(e,"profile")||"default",template:f(e,"template")||"blank-agent",force:S(e.force)});if(S(e.json)){console.log(JSON.stringify(t,null,2));return}console.log(`Initialized OpenPond profile ${t.activeProfile} at ${t.repoPath}`),console.log(`Profile source: ${t.sourcePath}`)}i(zo,"runOpenPondInitCommand");async function Mo(e,t){let o=t[0]??"current";if(o==="load"){let n=f(e,"path")||t[1];if(!n)throw new Error("usage: openpond profile load --path <dir> [--profile <name>]");let a=await we(n,f(e,"profile")||void 0);if(S(e.json)){console.log(JSON.stringify(a,null,2));return}console.log(`Loaded OpenPond profile ${a.activeProfile} from ${a.repoPath}`);return}if(o==="current"||o==="status"){let n=await x();if(S(e.json)){console.log(JSON.stringify(n,null,2));return}re(n);return}if(o==="diff"){let n=await x();if(S(e.json)){console.log(JSON.stringify({diff:n.diff,profile:n},null,2));return}to(n);return}if(o==="catalog"){let n=await x();if(S(e.json)){console.log(JSON.stringify({catalog:n.catalog,actions:n.actionCatalog,profile:n},null,2));return}no(n);return}if(o==="commit"){await Je(e,t.slice(1));return}if(o==="push"){await De(e);return}if(o==="check"){let n=f(e,"kind")||t[1]||"all";if(!["all","inspect","build","validate","eval"].includes(n))throw new Error("check kind must be one of inspect, build, validate, eval, all");if(n==="all"||n==="validate"){let a=await x();if(!a.sourcePath)throw new Error("No active Profile source to validate.");let l=await Ce(a.sourcePath,new Set(a.actionCatalog.map(h=>h.id)));console.log(`Profile source valid: ${l.workflows} Workflows, ${l.skills} Skills, ${l.evaluations} evaluations, ${l.tasksets} frozen Tasksets.`)}await ke(n);return}if(o==="ensure-hosted"){await He(e);return}if(o==="hosted"){let n=t[1]??"status";if(n==="ensure"){await He(e);return}if(n==="status"||n==="current"){await eo(e);return}throw new Error("usage: openpond profile hosted [status|ensure] --team-id <id> [--json]")}if(o==="agents"){if((t[1]??"list")!=="list")throw new Error("usage: openpond profile agents list [--json]");await oo(e,["list"]);return}throw new Error("usage: openpond profile <status|diff|catalog|commit|push|load|check|agents|hosted|ensure-hosted> [args]")}i(Mo,"runOpenPondProfileCommand");async function Je(e,t){let o=f(e,"message")||f(e,"commitMessage")||t.join(" ").trim()||void 0,n=await ye(o);if(S(e.json)){console.log(JSON.stringify(n,null,2));return}if(!n.committed){console.log("No profile changes to commit."),re(n.state);return}console.log("Committed OpenPond profile changes."),n.stdout.trim()&&console.log(n.stdout.trim()),re(n.state)}i(Je,"runProfileCommitCommand");async function De(e){let t=B(e,"usage: openpond profile push"),o=await x();if(o.error)throw new Error(o.error);if(!o.repoPath||!o.sourcePath||!o.manifestPath)throw new Error("No active OpenPond profile. Run `openpond init`.");if(!o.git?.isRepo)throw new Error("Active OpenPond profile source is not Git-backed. Run `openpond init` or reload a Git-backed profile.");if(!o.git.head)throw new Error("Profile source must have a committed Git head before push. Run `openpond profile commit` first.");if(o.git.dirty)throw new Error("Profile source has uncommitted changes. Run `openpond profile commit` before push.");let n=await G(e),a=S(e.ensureHosted)?await n.profile.ensureHosted({teamId:t}):await n.profile.get({teamId:t});if(!a)throw new Error("No hosted OpenPond profile repo found. Run `openpond profile ensure-hosted --team-id <id>` first, or pass `--ensure-hosted` to push.");let l=S(e.force),h=a.sourceUpload?.sourceCommitSha??null,d=o.hosted?.sourceCommitSha??null;if(d&&h!==d&&!l)throw new Error(["Hosted profile source changed since the last local push.",`Last pushed hosted head: ${d}`,`Current hosted head: ${h??"none"}`,"Inspect hosted changes before pushing, or rerun with --force to overwrite explicitly."].join(`
|
|
2
|
+
import{i as Ie,j as K,k as W,r as $e,s as Re}from"./chunk-36FNNR5N.js";import{m as G}from"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as f,d as B,f as S}from"./chunk-3M53YXEI.js";import{e as ie}from"./chunk-LZPCA6DH.js";import{a as ue}from"./chunk-L3KS6MOV.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import{ja as fe}from"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-X37KMV27.js";import{G as Pe,I as ke,J as ye,K as R,e as Q,f as he,g as X,h as ge,i as me,j as pe,q as ee,s as Se,t as we,x}from"./chunk-EBOTNBUS.js";import"./chunk-PWKJ5KLZ.js";import"./chunk-CRDKBFRN.js";import"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-JFZ6USNQ.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import{c as ae,sa as le,ta as ce,wa as de}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";import{readFile as qe}from"node:fs/promises";import L from"node:path";import{promises as A}from"node:fs";import b from"node:path";async function oe(e,t){let o=b.join(e,t),n=await A.lstat(o).catch(l=>{if(l.code==="ENOENT")return null;throw l});if(!n)return[];if(!n.isDirectory()||n.isSymbolicLink())throw new Error(`Profile source directory is not a regular directory: ${t}`);let a=[];for(let l of await A.readdir(o,{withFileTypes:!0})){let h=b.join(o,l.name),d=b.relative(e,h).split(b.sep).join("/");if(l.isSymbolicLink())throw new Error(`Profile source contains a symlink: ${d}`);if(l.isDirectory())a.push(...await oe(e,d));else if(l.isFile())a.push(d);else throw new Error(`Profile source contains a non-regular file: ${d}`)}return a.sort()}i(oe,"sourceFiles");async function Ce(e,t=new Set){let{skills:o,skillCatalog:n}=await ue(e);if(n.error)throw new Error(`Profile Skills: ${n.error}`);for(let s of o)if(s.validationStatus!=="valid")throw new Error(`Profile Skill ${s.name}: ${s.validationMessages.join(" ")}`);let a=new Set(o.map(s=>s.path)),l=[...await oe(e,"workflows"),...await oe(e,"evals")].sort(),h=l.filter(s=>s.startsWith("workflows/")),d=h.some(s=>/^workflows\/[^/]+\/(PROMPT\.md|ACTION\.json)$/.test(s)),u=h.includes("workflows/catalog.json");if(d&&u)throw new Error("Workflow packages and legacy workflows/catalog.json cannot coexist.");let y=d?ie({files:new Map(await Promise.all(h.map(async s=>[s,await A.readFile(b.join(e,s),"utf8")]))),skillPaths:a,actionIds:t}).catalog:u?ae({catalog:JSON.parse(await A.readFile(b.join(e,"workflows/catalog.json"),"utf8")),sourcePaths:a,actionIds:t}):{workflows:[]},$=new Set(y.workflows.map(s=>s.id)),C=l.filter(s=>/^workflows\/[^/]+\/evals\/[^/]+\.json$/.test(s)||/^evals\/definitions\/[^/]+\.json$/.test(s)),w=l.filter(s=>/^evals\/suites\/[^/]+\.json$/.test(s));if(l.includes("evals/catalog.json")&&(C.length||w.length))throw new Error("Evaluation packages and legacy evals/catalog.json cannot coexist.");let j=await Promise.all(C.map(async s=>{let r=le.parse(JSON.parse(await A.readFile(b.join(e,s),"utf8"))),m=/^workflows\/([^/]+)\/evals\//.exec(s)?.[1];if(m&&(r.target.kind!=="workflow"||r.target.workflowId!==m))throw new Error(`Evaluation ${r.id} must target its containing Workflow ${m}.`);return r})),N=await Promise.all(w.map(async s=>ce.parse(JSON.parse(await A.readFile(b.join(e,s),"utf8"))))),_=l.includes("evals/catalog.json")?JSON.parse(await A.readFile(b.join(e,"evals/catalog.json"),"utf8")):{schemaVersion:"openpond.profileEvaluations.v1",definitions:j,suites:N},P=de({catalog:_,workflowIds:$,skillPaths:a,actionIds:t}).catalog,g=l.filter(s=>/^evals\/tasksets\/[^/]+\.json$/.test(s)),O=new Map;for(let s of g){let r=fe(JSON.parse(await A.readFile(b.join(e,s),"utf8"))).taskset;if(s!==`evals/tasksets/${r.contentHash}.json`)throw new Error(`Frozen Taskset file name differs from its content hash: ${s}.`);O.set(r.contentHash,r)}for(let s of P.definitions){let r=s.tasksetRelease.contentHash,m=`evals/tasksets/${r}.json`,H=O.get(r);if(!H)throw new Error(`Evaluation ${s.id} is missing Taskset ${m}.`);if(H.id!==s.tasksetRelease.id||H.contentHash!==r)throw new Error(`Evaluation ${s.id} references a different frozen Taskset.`);let E=new Set(H.tasks.filter(k=>k.split===s.split).map(k=>k.id));for(let k of s.taskIds)if(!E.has(k))throw new Error(`Evaluation ${s.id} references missing Taskset case ${k} in split ${s.split}.`)}return{workflows:y.workflows.length,skills:o.length,evaluations:P.definitions.length,tasksets:O.size}}i(Ce,"checkLocalProfileSource");import te from"node:path";async function Ae(e){if(!e.state.sourcePath)throw new Error("Active OpenPond profile is missing a source path.");let t=e.state.agents.find(s=>s.id===e.agentId);if(!t)throw new Error(`Profile agent not found for hosted materialization: ${e.agentId}`);if(!t.enabled)throw new Error(`Profile agent is disabled: ${e.agentId}`);let o=xe(e.state.sourcePath,t.path),n=await Ie(o),a=await K(o,n.entries),l=W(n,a.entries),h=await Me({client:e.client,teamId:e.teamId,projectId:e.projectId??null,profileProjectId:e.profileProjectId,profileName:e.profileName,agentId:e.agentId,localHead:e.localHead,hostedHead:e.hostedHead}),d=await e.client.projects.uploadSource(h.id,{teamId:e.teamId,entries:l.entries,branch:e.sourceRef,commitMessage:`Materialize OpenPond profile agent ${e.agentId}`}),u=await e.client.projects.sync(d.id,{teamId:e.teamId}),y=be(u)??be(d),$=je(u)??je(d)??e.sourceRef,C=`openpond-profile-agent:${e.profileProjectId}:${e.profileName}:${e.agentId}`,w=(await e.client.agents.list({teamId:e.teamId})).find(s=>s.externalId===C),j=await e.client.agents.upsert({teamId:e.teamId,projectId:u.id,name:t.name||e.agentId,slug:_e(e.profileName,e.agentId),selectedEntrypoint:Ne(e.state,e.agentId),triggerType:"manual",runtimeSource:{mode:"latest_source",...$?{sourceRef:$}:{},...y?{sourceCommitSha:y}:{}},metadata:{...w?.metadata??{},source:"openpond_profile_agent_materialization",profileProjectId:e.profileProjectId,profileName:e.profileName,profileAgentId:e.agentId,profileSourcePath:t.path,localHead:e.localHead,hostedHead:e.hostedHead},externalId:C}),N=v(a.uploadMetadata),_=v(N?.commands),P=v(N?.dependencySetup),g=Ue(P?.commands),O=[I(_?.validate),I(_?.eval)].filter(s=>!!s);return{status:"uploaded",agentId:e.agentId,runtimeAgentId:j.id,projectId:u.id,sourceRoot:o,sourceRef:$,sourceCommitSha:y??null,manifestHash:u.sandboxManifestHash??null,manifestPath:u.sandboxManifestPath??null,manifestSyncedAt:u.sandboxManifestSyncedAt??null,fileCount:l.fileCount,totalBytes:l.totalBytes,generatedManifestPath:a.generatedManifestPath,synthesizedOpenPondYaml:a.synthesizedOpenPondYaml,uploadMetadataPath:a.uploadMetadataPath,setupCommands:g,validationCommands:O,materializedAt:new Date().toISOString()}}i(Ae,"materializeHostedProfileAgentSource");async function Me(e){if(e.projectId)try{return await e.client.projects.get(e.projectId,{teamId:e.teamId})}catch{}return e.client.projects.upsert({teamId:e.teamId,name:`OpenPond profile ${e.profileName} ${e.agentId}`,sourceType:"manual",externalId:`openpond-profile:${e.profileProjectId}:${e.profileName}:${e.agentId}`,description:`Materialized OpenPond profile agent ${e.agentId} for hosted Team execution.`,metadata:{source:"openpond_profile_agent_materialization",profileProjectId:e.profileProjectId,profileName:e.profileName,profileAgentId:e.agentId,localHead:e.localHead,hostedHead:e.hostedHead}})}i(Me,"getOrCreateHostedSourceProject");function xe(e,t){let o=t.replace(/\\/g,"/"),n=te.resolve(e,o),a=te.relative(e,n);if(a.startsWith("..")||te.isAbsolute(a))throw new Error(`Profile agent path escapes profile source: ${t}`);return o==="agent/agent.ts"||o.endsWith("/agent.ts")?e:n}i(xe,"resolveProfileAgentSourceRoot");function Ne(e,t){let o=e.actionCatalog.find(n=>n.agentId===t&&(n.sourceActionId==="chat"||n.name==="chat"))??e.actionCatalog.find(n=>n.agentId===t);return{scope:"action",name:typeof o?.sourceActionId=="string"&&o.sourceActionId||typeof o?.name=="string"&&o.name||"chat"}}i(Ne,"hostedEntrypointForProfileAgent");function _e(e,t){return`openpond-profile-${e}-${t}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"openpond-profile-agent"}i(_e,"hostedRuntimeAgentSlug");function be(e){let t=v(e),o=v(t?.sourceConfig),n=v(t?.metadata);return I(o?.sourceCommitSha)??I(o?.commitSha)??I(o?.remoteSha)??I(n?.projectSourceUploadCommitSha)??I(n?.sourceCommitSha)??I(t?.templateRemoteSha)}i(be,"sandboxProjectSourceCommitSha");function je(e){let t=v(e),o=v(t?.sourceConfig);return I(o?.sourceRef)??I(o?.branch)??I(t?.gitBranch)??I(t?.defaultBranch)}i(je,"sandboxProjectSourceRef");function v(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}i(v,"record");function I(e){return typeof e=="string"&&e.trim()?e.trim():null}i(I,"text");function Ue(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}i(Ue,"stringArray");import{createHash as Fe,randomUUID as Le}from"node:crypto";function ve(e){let t=e.explicitKey?.trim();if(t)return t;let o=e.sourceHead?.trim()||"unknown-source",n=e.targetProjectId?.trim()||"no-target-project",a=Te(e.input).slice(0,16),l=`profile-push-run:${e.localHead}:${o}:${e.runtimeAgentId}:${n}:${a}`;return e.retry?`${l}:retry:${(e.randomId??Le)()}`:l}i(ve,"buildHostedRunIdempotencyKey");function Te(e){return Fe("sha256").update(ne(e)).digest("hex")}i(Te,"hashStableJson");function ne(e){return e===void 0?"undefined":e===null||typeof e!="object"?JSON.stringify(e)??"null":Array.isArray(e)?`[${e.map(t=>ne(t)).join(",")}]`:`{${Object.entries(e).sort(([t],[o])=>t.localeCompare(o)).map(([t,o])=>`${JSON.stringify(t)}:${ne(o)}`).join(",")}}`}i(ne,"stableJsonStringify");async function zo(e){let t=await Se({repoPath:f(e,"path")||ee(),profile:f(e,"profile")||"default",template:f(e,"template")||"blank-agent",force:S(e.force)});if(S(e.json)){console.log(JSON.stringify(t,null,2));return}console.log(`Initialized OpenPond profile ${t.activeProfile} at ${t.repoPath}`),console.log(`Profile source: ${t.sourcePath}`)}i(zo,"runOpenPondInitCommand");async function Mo(e,t){let o=t[0]??"current";if(o==="load"){let n=f(e,"path")||t[1];if(!n)throw new Error("usage: openpond profile load --path <dir> [--profile <name>]");let a=await we(n,f(e,"profile")||void 0);if(S(e.json)){console.log(JSON.stringify(a,null,2));return}console.log(`Loaded OpenPond profile ${a.activeProfile} from ${a.repoPath}`);return}if(o==="current"||o==="status"){let n=await x();if(S(e.json)){console.log(JSON.stringify(n,null,2));return}re(n);return}if(o==="diff"){let n=await x();if(S(e.json)){console.log(JSON.stringify({diff:n.diff,profile:n},null,2));return}to(n);return}if(o==="catalog"){let n=await x();if(S(e.json)){console.log(JSON.stringify({catalog:n.catalog,actions:n.actionCatalog,profile:n},null,2));return}no(n);return}if(o==="commit"){await Je(e,t.slice(1));return}if(o==="push"){await De(e);return}if(o==="check"){let n=f(e,"kind")||t[1]||"all";if(!["all","inspect","build","validate","eval"].includes(n))throw new Error("check kind must be one of inspect, build, validate, eval, all");if(n==="all"||n==="validate"){let a=await x();if(!a.sourcePath)throw new Error("No active Profile source to validate.");let l=await Ce(a.sourcePath,new Set(a.actionCatalog.map(h=>h.id)));console.log(`Profile source valid: ${l.workflows} Workflows, ${l.skills} Skills, ${l.evaluations} evaluations, ${l.tasksets} frozen Tasksets.`)}await ke(n);return}if(o==="ensure-hosted"){await He(e);return}if(o==="hosted"){let n=t[1]??"status";if(n==="ensure"){await He(e);return}if(n==="status"||n==="current"){await eo(e);return}throw new Error("usage: openpond profile hosted [status|ensure] --team-id <id> [--json]")}if(o==="agents"){if((t[1]??"list")!=="list")throw new Error("usage: openpond profile agents list [--json]");await oo(e,["list"]);return}throw new Error("usage: openpond profile <status|diff|catalog|commit|push|load|check|agents|hosted|ensure-hosted> [args]")}i(Mo,"runOpenPondProfileCommand");async function Je(e,t){let o=f(e,"message")||f(e,"commitMessage")||t.join(" ").trim()||void 0,n=await ye(o);if(S(e.json)){console.log(JSON.stringify(n,null,2));return}if(!n.committed){console.log("No profile changes to commit."),re(n.state);return}console.log("Committed OpenPond profile changes."),n.stdout.trim()&&console.log(n.stdout.trim()),re(n.state)}i(Je,"runProfileCommitCommand");async function De(e){let t=B(e,"usage: openpond profile push"),o=await x();if(o.error)throw new Error(o.error);if(!o.repoPath||!o.sourcePath||!o.manifestPath)throw new Error("No active OpenPond profile. Run `openpond init`.");if(!o.git?.isRepo)throw new Error("Active OpenPond profile source is not Git-backed. Run `openpond init` or reload a Git-backed profile.");if(!o.git.head)throw new Error("Profile source must have a committed Git head before push. Run `openpond profile commit` first.");if(o.git.dirty)throw new Error("Profile source has uncommitted changes. Run `openpond profile commit` before push.");let n=await G(e),a=S(e.ensureHosted)?await n.profile.ensureHosted({teamId:t}):await n.profile.get({teamId:t});if(!a)throw new Error("No hosted OpenPond profile repo found. Run `openpond profile ensure-hosted --team-id <id>` first, or pass `--ensure-hosted` to push.");let l=S(e.force),h=a.sourceUpload?.sourceCommitSha??null,d=o.hosted?.sourceCommitSha??null;if(d&&h!==d&&!l)throw new Error(["Hosted profile source changed since the last local push.",`Last pushed hosted head: ${d}`,`Current hosted head: ${h??"none"}`,"Inspect hosted changes before pushing, or rerun with --force to overwrite explicitly."].join(`
|
|
3
3
|
`));let u=f(e,"hostedSourceAgentId"),y=S(e.hostedSourceChecks),$=S(e.publishHostedSource),C=f(e,"hostedRunAgentId"),w=u||(y||$?C:null),j=JSON.parse(await qe(o.manifestPath,"utf8")),N=Ge(j),_=j.profiles[o.activeProfile??j.defaultProfile]?.path??"profiles/default",P=await Ke({state:o,hostedSourceAgentId:w}),g=await n.profile.push({teamId:t,entries:P.entries,branch:o.git.branch??"main",commitMessage:f(e,"commitMessage")||f(e,"message")||`Push OpenPond profile ${o.activeProfile??"default"} at ${o.git.shortHead??o.git.head}`,expectedSourceCommitSha:h,localHeadSha:o.git.head,manifest:N,sourcePath:_,agents:o.agents.map(c=>({id:c.id,path:c.path,enabled:c.enabled}))}),O=new Date().toISOString(),s=o.hosted?.lastPushedLocalHead===o.git.head&&o.hosted?.sourceCommitSha===g.sourceUpload.sourceCommitSha,r={status:"pushed",promotionStatus:s?o.hosted?.promotionStatus??"uploaded":"uploaded",hostedRunStatus:s?o.hosted?.hostedRunStatus??"not_started":"not_started",pushedAt:O,teamId:t,projectId:g.profile.project.id,localHead:o.git.head,hostedHead:g.sourceUpload.sourceCommitSha,sourceRef:g.sourceUpload.sourceRef,hostedRunAgentId:s?o.hosted?.hostedRunAgentId??null:null,hostedRunId:s?o.hosted?.hostedRunId??null:null,hostedRunAt:s?o.hosted?.hostedRunAt??null:null,hostedSourceMaterialization:s?o.hosted?.hostedSourceMaterialization??null:null,hostedSourceCheck:s?o.hosted?.hostedSourceCheck??null:null,hostedPublish:s?o.hosted?.hostedPublish??null:null,hostedRun:s?o.hosted?.hostedRun??null:null};await R(r);let m=w??Ve(o,C),H=Re(e.hostedSourceDispatch,"hosted-source-dispatch")??"coding_core",E=null,k=null,Z=null;if(w&&(y||$||u))try{let c=await Ae({client:n,teamId:t,profileProjectId:g.profile.project.id,profileName:o.activeProfile??j.defaultProfile,state:o,agentId:w,sourceRef:g.sourceUpload.sourceRef??o.git.branch??"main",localHead:o.git.head,hostedHead:g.sourceUpload.sourceCommitSha,projectId:f(e,"hostedSourceProjectId")||(o.hosted?.hostedSourceMaterialization?.agentId===w?o.hosted.hostedSourceMaterialization.projectId:null)});r={...r,promotionStatus:"hosted_source_materialized",hostedSourceMaterialization:c},m=c.runtimeAgentId??w,await R(r)}catch(c){let p=c instanceof Error?c.message:String(c);throw r={...r,promotionStatus:"hosted_source_materialize_failed",hostedSourceMaterialization:{status:"failed",agentId:w,projectId:f(e,"hostedSourceProjectId")??null,error:p},error:p},await R(r),new Error(`Hosted source materialization failed after push: ${p}`)}if(y||$){if(!w)throw new Error("--hosted-source-agent-id or --hosted-run-agent-id is required for hosted source checks or publish.");if(!m)throw new Error("Unable to resolve the hosted runtime agent for source checks.");try{if(E=await n.agents.sourceDeployPlan(m,{teamId:t}),y){let c=r.hostedSourceMaterialization?.sourceRef??g.sourceUpload.sourceRef,p=r.hostedSourceMaterialization?.sourceCommitSha??g.sourceUpload.sourceCommitSha;if(k=await n.agents.requestSourceChecks(m,{teamId:t,...c?{sourceRef:c}:{},...p?{baseSha:p}:{},checkKind:$e(f(e,"hostedCheckKind")||f(e,"checkKind"))??"all",dispatch:H,metadata:{source:"openpond_profile_push_checks",localHead:o.git.head,hostedHead:g.sourceUpload.sourceCommitSha,materializedProjectId:r.hostedSourceMaterialization?.projectId??null,materializedSourceCommitSha:r.hostedSourceMaterialization?.sourceCommitSha??null,sourceRef:c,dispatch:H}}),k.dispatchResult?.status==="failed")throw new Error(k.dispatchResult.error??"hosted_source_check_dispatch_failed");if(k.dispatchResult?.status==="completed"){let J=Y(k.sourceCheckStatus);Ze(J)&&(await Ye({client:n,teamId:t,runtimeAgentId:m,sourceRef:c,sourceCommitSha:p,validatedAt:new Date().toISOString()}),E=await n.agents.sourceDeployPlan(m,{teamId:t}))}}r={...r,promotionStatus:y?"hosted_source_check_pending":r.promotionStatus,hostedSourceCheck:X({agentId:m,status:y?"requested":"deploy_plan_ready",deployPlan:E,checkResult:k})},await R(r)}catch(c){let p=c instanceof Error?c.message:String(c);throw r={...r,promotionStatus:"hosted_source_check_failed",hostedSourceCheck:X({agentId:m,status:"failed",deployPlan:E,checkedAt:new Date().toISOString(),error:p}),error:p},await R(r),new Error(`Hosted source check failed after push: ${p}`)}}if($){if(!w)throw new Error("--hosted-source-agent-id or --hosted-run-agent-id is required for hosted source publish.");if(!m)throw new Error("Unable to resolve the hosted runtime agent for source publish.");try{let c=f(e,"expectedManifestHash")||r.hostedSourceCheck?.manifestHash||E?.source.manifestHash||void 0;Z=await n.agents.publishSource(m,{teamId:t,...c?{expectedManifestHash:c}:{},...r.hostedSourceMaterialization?.sourceCommitSha??g.sourceUpload.sourceCommitSha?{expectedSourceCommitSha:r.hostedSourceMaterialization?.sourceCommitSha??g.sourceUpload.sourceCommitSha}:{}}),r={...r,promotionStatus:"hosted_source_published",hostedPublish:ge({agentId:m,publishResult:Z})},await R(r)}catch(c){let p=c instanceof Error?c.message:String(c);throw r={...r,promotionStatus:"hosted_source_publish_failed",hostedPublish:{status:"failed",agentId:m,error:p},error:p},await R(r),new Error(`Hosted source publish failed after push: ${p}`)}}let z=null;if(C){let c=m||C,p=new Date().toISOString(),J=so(e,"hostedRunInput")??{prompt:"hello",channel:"openpond_chat"},D=f(e,"hostedRunConversationId")||f(e,"conversationId"),U=f(e,"hostedRunTargetProjectId"),se=ve({explicitKey:f(e,"hostedRunIdempotencyKey"),retry:S(e.hostedRunRetry),localHead:o.git.head,sourceHead:r.hostedSourceMaterialization?.sourceCommitSha??g.sourceUpload.sourceCommitSha,runtimeAgentId:c,targetProjectId:U,input:J});await R({...r,promotionStatus:"hosted_run_pending",hostedRunStatus:"running",hostedRunAgentId:c,hostedRunAt:p});try{z=await n.agents.run(c,{teamId:t,...D?{conversationId:D}:{},...U?{targetProjectId:U}:{},...U?{targetProject:{id:U}}:{},idempotencyKey:se,input:J,metadata:{source:"openpond_profile_push_run",...D?{conversationId:D}:{},targetProjectId:U||null,localHead:o.git.head,hostedHead:g.sourceUpload.sourceCommitSha,hostedRunIdempotencyKey:se,hostedRunRetry:S(e.hostedRunRetry),materializedProjectId:r.hostedSourceMaterialization?.projectId??null,materializedSourceCommitSha:r.hostedSourceMaterialization?.sourceCommitSha??null,sourceRef:r.hostedSourceMaterialization?.sourceRef??g.sourceUpload.sourceRef,publishedSnapshotId:r.hostedPublish?.snapshotId??null,manifestHash:r.hostedPublish?.manifestHash??r.hostedSourceCheck?.manifestHash??null},runtimeSourcePolicy:$?{requirePublishedSnapshot:!0,source:"diagnostic"}:{allowLatestSource:!0,source:"diagnostic"}});let F=me({agentId:c,runResult:z}),M=pe(F);await R({...r,promotionStatus:M==="passed"?"hosted_run_passed":M==="failed"?"hosted_run_failed":"hosted_run_pending",hostedRunStatus:M,hostedRunAgentId:c,hostedRunId:z.run.id,hostedRunAt:z.run.createdAt??p,hostedRun:F})}catch(F){let M=F instanceof Error?F.message:String(F);throw await R({...r,promotionStatus:"hosted_run_failed",hostedRunStatus:"failed",hostedRunAgentId:c,hostedRunAt:new Date().toISOString(),hostedRun:{status:"failed",agentId:c,error:M},error:M}),new Error(`Hosted invocation failed to start after push: ${M}`)}}if(S(e.json)){console.log(JSON.stringify({...g,uploaded:Be(P),hostedSourceMaterialization:r.hostedSourceMaterialization??null,hostedSourceChecks:k,hostedSourcePublish:Z,hostedRun:z},null,2));return}console.log(`Pushed OpenPond profile ${o.activeProfile??"default"} to hosted profile repo.`),console.log(`Project id: ${g.profile.project.id}`),console.log(`Local head: ${o.git.head}`),console.log(`Hosted source commit: ${g.sourceUpload.sourceCommitSha??"unknown"}`),console.log(`Uploaded ${P.fileCount} file(s), ${P.totalBytes} byte(s) via ${P.transport.mode} (limits: ${P.limits.maxFiles} files, ${P.limits.maxFileBytes} bytes/file, ${P.limits.maxTotalBytes} bytes total).`),console.log(z?`Hosted invocation: running ${z.run.id}`:"Hosted invocation: not started"),r.hostedSourceMaterialization&&console.log(`Hosted materialized: ${r.hostedSourceMaterialization.status}`+(r.hostedSourceMaterialization.projectId?` ${r.hostedSourceMaterialization.projectId}`:"")+(r.hostedSourceMaterialization.sourceCommitSha?` ${r.hostedSourceMaterialization.sourceCommitSha}`:"")),r.hostedSourceCheck&&console.log(`Hosted source checks: ${r.hostedSourceCheck.status}`),r.hostedPublish&&console.log(`Hosted publish: ${r.hostedPublish.status}`+(r.hostedPublish.snapshotId?` ${r.hostedPublish.snapshotId}`:"")),console.log(`Uploaded files: ${P.fileCount}`)}i(De,"runProfilePushCommand");function Be(e){return{fileCount:e.fileCount,totalBytes:e.totalBytes,limits:e.limits,transport:e.transport}}i(Be,"summarizeProfileSourceUpload");function Ge(e){return{...e,profiles:Object.fromEntries(Object.entries(e.profiles).map(([t,o])=>[t,{path:o.path,defaultAgent:o.defaultAgent??"default",enabledAgents:o.enabledAgents??[]}]))}}i(Ge,"normalizeHostedProfileManifest");async function Ke(e){let t=e.state.repoPath;if(!t)throw new Error("Active OpenPond profile is missing a repository path.");let o=await he(t);if(!e.hostedSourceAgentId)return o;if(!e.state.sourcePath)throw new Error("Active OpenPond profile is missing a source path.");let n=e.state.agents.find(d=>d.id===e.hostedSourceAgentId);if(!n)throw new Error(`Profile agent not found for hosted source upload: ${e.hostedSourceAgentId}`);let a=We(e.state.sourcePath,n.path),l=L.relative(t,a).replace(/\\/g,"/");if(l.startsWith("..")||L.isAbsolute(l))throw new Error(`Profile agent path escapes profile repo: ${n.path}`);let h=await K(a,[]);return h.entries.length===0?o:W(o,h.entries.map(d=>({...d,path:l?`${l}/${d.path}`:d.path})))}i(Ke,"collectProfileSourceUploadForPush");function We(e,t){let o=t.replace(/\\/g,"/"),n=L.resolve(e,o),a=L.relative(e,n);if(a.startsWith("..")||L.isAbsolute(a))throw new Error(`Profile agent path escapes profile source: ${t}`);return o==="agent/agent.ts"||o.endsWith("/agent.ts")?e:n}i(We,"resolveProfileAgentSourceRoot");function Y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}i(Y,"record");function T(e){return typeof e=="string"&&e.trim()?e.trim():null}i(T,"text");function Ve(e,t){if(!t)return null;let o=e.hosted?.hostedSourceMaterialization;return o?.agentId===t&&o.runtimeAgentId?o.runtimeAgentId:t}i(Ve,"resolveHostedRuntimeAgentIdForRun");async function Ye(e){!e.sourceRef||!e.sourceCommitSha||await e.client.agents.update(e.runtimeAgentId,{teamId:e.teamId,runtimeSource:{mode:"latest_source",sourceRef:e.sourceRef,sourceCommitSha:e.sourceCommitSha,buildStatus:"succeeded",validationStatus:"passed",validatedAt:e.validatedAt}})}i(Ye,"bindValidatedHostedRuntimeSource");function Ze(e){if(!e)return!1;let t=T(e.finalResultState)?.toLowerCase();if(t&&t!=="completed"&&!Ee(t))return!1;let o=Array.isArray(e.checkRuns)?e.checkRuns.map(Y).filter(u=>!!u):[];if(o.some(Qe))return!1;let n=o.some(u=>V(u).includes("build")&&q(u)),a=q(Y(e.validation))||o.some(u=>V(u).includes("validate")&&q(u)),l=Y(e.eval),d=!((T(e.requestedCheckKind)??"all")==="all"||(T(e.requestedCheckKind)??"")==="eval"||!!l||o.some(u=>V(u).includes("eval")))||q(l)||o.some(u=>V(u).includes("eval")&&q(u));return n&&a&&d}i(Ze,"sourceCheckStatusPassed");function V(e){return(T(e.command)??"").toLowerCase()}i(V,"checkRunCommand");function Qe(e){let t=e.passed;if(typeof t=="boolean")return!t;let o=e.exitCode;if(typeof o=="number"&&o!==0)return!0;let n=T(e.status)?.toLowerCase();return!!(n&&Xe(n))}i(Qe,"checkRunFailed");function q(e){if(!e)return!1;if(typeof e.passed=="boolean")return e.passed;let t=Oe(e.failed)??Oe(e.failedCount);if(t!==null&&t>0)return!1;let o=e.exitCode;if(typeof o=="number")return o===0;let n=T(e.status)?.toLowerCase();return!!(n&&Ee(n))}i(q,"checkEvidencePassed");function Oe(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()){let t=Number(e);return Number.isFinite(t)?t:null}return null}i(Oe,"numericEvidence");function Ee(e){return e==="passed"||e==="succeeded"||e==="success"}i(Ee,"passingStatus");function Xe(e){return e==="failed"||e==="failure"||e==="cancelled"}i(Xe,"failingStatus");async function eo(e){let t=B(e,"usage: openpond profile hosted status"),n=await(await G(e)).profile.get({teamId:t});if(S(e.json)){console.log(JSON.stringify({profile:n},null,2));return}if(!n){console.log("No hosted OpenPond profile repo found."),console.log("Run `openpond profile ensure-hosted --team-id <id>` to create one.");return}ze(n)}i(eo,"runHostedProfileStatusCommand");async function He(e){let t=B(e,"usage: openpond profile ensure-hosted"),n=await(await G(e)).profile.ensureHosted({teamId:t});if(S(e.json)){console.log(JSON.stringify({profile:n},null,2));return}ze(n)}i(He,"runHostedProfileEnsureCommand");async function oo(e,t){if((t[0]??"list")!=="list")throw new Error("usage: openpond agents list [--json]");let n=await x();if(n.error)throw new Error(n.error);if(S(e.json)){console.log(JSON.stringify({agents:n.agents,profile:n},null,2));return}if(n.mode==="none"){console.log("No active OpenPond profile. Run `openpond init`.");return}if(n.agents.length===0){console.log(`No agents found in ${n.activeProfile}.`);return}for(let a of n.agents)console.log(`${a.id} ${a.enabled?"enabled":"disabled"} ${a.path}`)}i(oo,"runOpenPondAgentsCommand");async function xo(e,t,o){let n=f(t,"cwd"),a=[...o,...ro(t,new Set(["cwd","account","profile","handle","baseUrl"]))];await Pe({command:e,cwd:n?L.resolve(n):void 0,args:a,inherit:!0})}i(xo,"runOpenPondProfileSdkAlias");function re(e){if(e.mode==="none"){console.log("No active OpenPond profile."),console.log(`Default location: ${ee()}`);return}if(console.log(`Mode: ${e.mode}`),console.log(`Repo: ${e.repoPath}`),console.log(`Profile: ${e.activeProfile}`),console.log(`Source: ${e.sourcePath??"missing"}`),console.log(`State: ${e.summary.message}`),e.git&&(console.log(`Git: ${e.git.branch??"detached"} ${e.git.shortHead??"no-head"}${e.git.dirty?" dirty":" clean"}`),e.git.upstream&&console.log(`Upstream: ${e.git.upstream} ahead ${e.git.ahead??"?"} behind ${e.git.behind??"?"}`)),(e.hosted?.projectId||e.hosted?.sourceCommitSha)&&(console.log(`Hosted: ${e.hosted.projectId??"unbound"} ${e.hosted.sourceCommitSha??"no-source-head"}`),e.hosted.hostedSourceMaterialization&&console.log(`Hosted materialized: ${e.hosted.hostedSourceMaterialization.status}`+(e.hosted.hostedSourceMaterialization.agentId?` ${e.hosted.hostedSourceMaterialization.agentId}`:"")+(e.hosted.hostedSourceMaterialization.sourceCommitSha?` ${e.hosted.hostedSourceMaterialization.sourceCommitSha}`:"")),e.hosted.hostedSourceCheck&&console.log(`Hosted checks: ${e.hosted.hostedSourceCheck.status}`+(e.hosted.hostedSourceCheck.sandboxId?` sandbox ${e.hosted.hostedSourceCheck.sandboxId}`:"")),e.hosted.hostedPublish&&console.log(`Hosted publish: ${e.hosted.hostedPublish.status}`+(e.hosted.hostedPublish.snapshotId?` ${e.hosted.hostedPublish.snapshotId}`:"")),e.hosted.hostedRun&&console.log(`Hosted run: ${e.hosted.hostedRun.status}`+(e.hosted.hostedRun.runId?` ${e.hosted.hostedRun.runId}`:"")+(e.hosted.hostedRun.runtimeId?` runtime ${e.hosted.hostedRun.runtimeId}`:""))),console.log(`Catalog: ${e.catalog.actionCount} action(s)${e.catalog.stale?" stale":""}`),console.log(`Setup gate: ${e.setupGate.status} (${e.setupGate.blockingCount} blocking, ${e.setupGate.optionalMissingCount} optional missing)`),e.summary.defaultAction&&console.log(`Default action: ${e.summary.defaultAction}`),e.setupGate.blockingRequirements.length>0){console.log("Blocking setup:");for(let t of e.setupGate.blockingRequirements.slice(0,10))console.log(` ${Q(t)}`);e.setupGate.blockingRequirements.length>10&&console.log(` ... ${e.setupGate.blockingRequirements.length-10} more`)}if(!e.summary.checkFresh&&e.summary.checkStaleReason?console.log(`Checks: stale - ${e.summary.checkStaleReason}`):e.summary.checkFresh&&console.log("Checks: fresh"),e.lastCheck&&console.log(`Last check: ${e.lastCheck.command} ${e.lastCheck.status} at ${e.lastCheck.checkedAt}`),e.error&&console.log(`Error: ${e.error}`),e.agents.length>0){console.log("Agents:");for(let t of e.agents)console.log(` ${t.id} (${t.enabled?"enabled":"disabled"}) ${t.path}`)}if(e.skills.length>0){console.log("Skills:");for(let t of e.skills){let o=t.validationStatus==="valid"?"valid":t.validationStatus;console.log(` ${t.name} (${o}) ${t.path}`)}}}i(re,"printProfileState");function to(e){if(e.mode==="none"){console.log("No active OpenPond profile.");return}console.log(`Profile: ${e.activeProfile}`),console.log(`State: ${e.summary.message}`);let t=[["Changed agents",e.diff.changedAgents],["New agents",e.diff.newAgents],["Deleted agents",e.diff.deletedAgents],["Changed skills",e.diff.changedSkills],["Changed actions",e.diff.changedActions],["Changed extensions",e.diff.changedExtensions],["Setup changes",e.diff.setupChanges],["Env requirement changes",e.diff.envRequirementChanges]];for(let[o,n]of t)n.length!==0&&console.log(`${o}: ${n.join(", ")}`);if(e.diff.files.length===0){console.log("No source changes.");return}console.log("Files:");for(let o of e.diff.files)console.log(` ${o.status.padEnd(2)} ${o.path}`)}i(to,"printProfileDiff");function no(e){if(e.mode==="none"){console.log("No active OpenPond profile.");return}if(console.log(`Profile: ${e.activeProfile}`),console.log(`Catalog: ${e.catalog.actionCount} action(s)${e.catalog.stale?" stale":""}`),console.log(`Setup gate: ${e.setupGate.status} (${e.setupGate.blockingCount} blocking, ${e.setupGate.optionalMissingCount} optional missing)`),e.catalog.generatedAt&&console.log(`Generated at: ${e.catalog.generatedAt}`),e.catalog.error&&console.log(`Catalog error: ${e.catalog.error}`),e.actionCatalog.length===0){console.log("No catalog actions found. Run `openpond inspect` or `openpond build`.");return}for(let o of e.actionCatalog){let n=o.label??o.name??o.id,a=o.visibility??"default",l=e.setupGate.blockingRequirements.filter(d=>d.actionId===o.id),h=l.length?`setup_required:${l.map(d=>d.label).join(",")}`:"setup_ready";console.log(`${o.id} ${a} ${h} ${n}`)}let t=e.setupGate.blockingRequirements.filter(o=>o.actionId===null);if(t.length>0){console.log("Source setup blockers:");for(let o of t)console.log(` ${Q(o)}`)}}i(no,"printProfileCatalog");function ze(e){if(console.log(`Hosted profile repo: ${e.project.name}`),console.log(`Project id: ${e.project.id}`),console.log(`Role: ${e.project.role??"profile"}`),console.log(`Default profile: ${e.defaultProfile}`),console.log(`Source path: ${e.sourcePath}`),console.log(`Seed status: ${e.seedStatus}`),e.sourceUpload?.sourceRef&&console.log(`Source ref: ${e.sourceUpload.sourceRef}`),e.sourceUpload?.sourceCommitSha&&console.log(`Source commit: ${e.sourceUpload.sourceCommitSha}`),e.seededAt&&console.log(`Seeded at: ${e.seededAt}`),e.agents.length>0){console.log("Agents:");for(let t of e.agents)console.log(` ${t.id} (${t.enabled?"enabled":"disabled"}) ${t.path}`)}}i(ze,"printHostedProfileSummary");function ro(e,t){let o=[],n=new Set(["force","json"]);for(let[a,l]of Object.entries(e)){if(t.has(a))continue;let h=`--${a.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`)}`;if(l===!0||n.has(a)&&l==="true")o.push(h);else{if(n.has(a)&&l==="false")continue;typeof l=="string"&&o.push(h,l)}}return o}i(ro,"optionArgs");function so(e,t){let o=f(e,t);if(!o)return null;let n=JSON.parse(o);if(!n||typeof n!="object"||Array.isArray(n))throw new Error(`--${t} must be a JSON object`);return n}i(so,"parseJsonObjectOption");export{Ke as collectProfileSourceUploadForPush,oo as runOpenPondAgentsCommand,zo as runOpenPondInitCommand,Mo as runOpenPondProfileCommand,xo as runOpenPondProfileSdkAlias};
|
package/dist/chunks/{project-action-payload-2G57RL74.js → project-action-payload-7DRABTHY.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{w as a}from"./chunk-
|
|
2
|
+
import{w as a}from"./chunk-SODAOLAP.js";import"./chunk-DRMOHADV.js";import"./chunk-IXZ5ZGIL.js";import"./chunk-46RMTR2Z.js";import"./chunk-SYUKES6H.js";import"./chunk-UKSSFB4Q.js";import"./chunk-7HAGSE7L.js";import"./chunk-MCBRB5D6.js";import"./chunk-YU3C6U5V.js";import"./chunk-BJXPQIVD.js";import"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-BUZ7CBJC.js";import"./chunk-O6ZYDHEJ.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import"./chunk-FTQLQJQV.js";export{a as createProjectActionRunPayload};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as b,b as Y,c as F,d as H,e as W,f as z,g as X,h as E,i as y,j as v,k as C,l as Z,m as ee,n as A,o as te,p as _,q as j,r as re,s as ne,t as x,u as M,v as R,w as J,x as N,y as U,z as T}from"./chunk-36FNNR5N.js";import{m as h,n as I,v as P}from"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-FGOTSCSE.js";import"./chunk-E2S2EMYQ.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as u,d,e as w,f as S}from"./chunk-3M53YXEI.js";import"./chunk-PWKJ5KLZ.js";import"./chunk-CRDKBFRN.js";import"./chunk-DMO3UIS7.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-L4EJ5R3B.js";import"./chunk-6ZTP6CUJ.js";import"./chunk-TBODQT4W.js";import"./chunk-YRDPVTEI.js";import"./chunk-JRGECNP3.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-5WPMI6QX.js";import"./chunk-W7NXFRHN.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-JFZ6USNQ.js";import"./chunk-6FA3GG5B.js";import"./chunk-G4E3WGLM.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as g}from"./chunk-FTQLQJQV.js";function k(e){let o=e.gitRepo?`${e.gitOwner??"_"}/${e.gitRepo}`:e.internalRepoPath??e.templateRepoUrl??e.normalizedSourceIdentity;return[e.id,e.status,e.sourceType,e.name,o].join(" ")}g(k,"formatProjectLine");function L(e){let o=e.selectedEntrypoint.name?`${e.selectedEntrypoint.scope}:${e.selectedEntrypoint.name}`:e.selectedEntrypoint.scope,i=e.runtimeSource?[e.runtimeSource.mode,e.runtimeSource.publishedSnapshotName??e.runtimeSource.publishedSnapshotId??e.runtimeSource.sourceRef].filter(a=>!!a).join(":"):"latest_source";return[e.id,e.status,e.triggerType,e.defaultWorkflowMode,i,o,e.name].join(" ")}g(L,"formatAgentLine");async function B(e,o,i){let a=i[1]?.trim(),t=i[2]?.trim(),n="usage: agent source <deploy-plan|checks|manifest-snapshots|setup|publish> <agent-id> --team-id <id>",r=d(o,n);if(!a||!t)throw new Error(n);if(a==="deploy-plan"){let s=await e.agents.sourceDeployPlan(t,{teamId:r});console.log(JSON.stringify({deployPlan:s},null,2));return}if(a==="manifest-snapshots"){let s=await e.agents.manifestSnapshots(t,{teamId:r,limit:x(o.limit)});console.log(JSON.stringify({manifestSnapshots:s},null,2));return}if(a==="checks"){let s=await e.agents.requestSourceChecks(t,M(r,o));console.log(JSON.stringify(s,null,2));return}if(a==="setup"){let s=typeof o.provider=="string"?o.provider.trim():"",l=typeof o.allowedActions=="string"?o.allowedActions.split(",").map(c=>c.trim()).filter(Boolean):[];if(!s||l.length===0)throw new Error(`${n}; setup requires --provider and --allowed-actions`);let p=await e.agents.configureSourceSetup(t,{teamId:r,integrationBindings:[{provider:s,mode:"connected",connectionMode:"member_connection",grantPolicy:"read_only",allowedActions:l,enabled:!0}]});console.log(JSON.stringify(p,null,2));return}if(a==="publish"){let s=await e.agents.publishSource(t,R(r,o));console.log(JSON.stringify(s,null,2));return}throw new Error(n)}g(B,"runAgentSourceWorkflow");import G from"node:path";var Q=new Set(["inspect","build","validate","eval","traces"]);function $(e,o){return Q.has(e)?!0:e==="run"&&!u(o,"teamId")}g($,"shouldDelegateLocalAgentSdkCommand");async function q(e,o){let i=o[0]||"inspect",a=G.resolve(u(e,"cwd")||u(e,"path")||"."),t=[i,...o.slice(1),"--cwd",a];S(e.json)&&t.push("--json"),D(t,e,"input","input"),D(t,e,"inputFile","input-file");let n=b(a),r=await P(n.command,[...n.args,...t],{cwd:a,inherit:!0});r.code!==0&&(process.exitCode=r.code??1)}g(q,"runLocalAgentSdkCommand");function D(e,o,i,a){let t=u(o,i);t&&e.push(`--${a}`,t)}g(D,"appendForwardedOption");async function Oe(e,o){let i=o[0]||"list";if($(i,e)){await q(e,o);return}let a=await h(e);if(i==="list"){let t=d(e,"usage: agent list"),n=await a.agents.list({teamId:t});if(S(e.json)){console.log(JSON.stringify({agents:n},null,2));return}if(n.length===0){console.log("no sandbox agents found");return}for(let r of n)console.log(L(r));return}if(i==="create"||i==="upsert"){let t=await a.agents.upsert(U(e));console.log(JSON.stringify({agent:t},null,2));return}if(i==="get"){let t=o[1]?.trim(),n=d(e,"usage: agent get <agentId>");if(!t)throw new Error("usage: agent get <agentId> --team-id <id>");let r=await a.agents.get(t,{teamId:n});console.log(JSON.stringify({agent:r},null,2));return}if(i==="run"){let t=o[1]?.trim(),n=d(e,"usage: agent run <agentId>");if(!t)throw new Error("usage: agent run <agentId> --team-id <id>");let r=u(e,"idempotencyKey"),s=u(e,"conversationId"),l=u(e,"targetProjectId"),p=A(e.triggerType),c=I(e.workflowMode),m=w(e,"input","input"),f=w(e,"metadata","metadata"),O=j(e),K=await a.agents.run(t,{teamId:n,...s?{conversationId:s}:{},...r?{idempotencyKey:r}:{},...l?{targetProjectId:l}:{},...l?{targetProject:{id:l}}:{},...p?{triggerType:p}:{},...c?{workflowMode:c}:{},...m?{input:m}:{},...f?{metadata:f}:{},...O?{runtimeSourcePolicy:O}:{}});console.log(JSON.stringify(K,null,2));return}if(i==="bind-runtime-source"||i==="bind-source"){let t=o[1]?.trim(),n=d(e,"usage: agent bind-source <agentId>");if(!t)throw new Error("usage: agent bind-source <agentId> --team-id <id> --source-mode latest_source|published_snapshot|auto");let r=_(e);if(!r?.mode)throw new Error("usage: agent bind-source <agentId> --team-id <id> --source-mode latest_source|published_snapshot|auto");let s=await a.agents.update(t,{teamId:n,runtimeSource:r});console.log(JSON.stringify({agent:s,agentSource:s.runtimeSource},null,2));return}if(i==="run-test"){let t=o[1]?.trim(),n=d(e,"usage: agent run-test <agentId>");if(!t)throw new Error("usage: agent run-test <agentId> --team-id <id>");let r=u(e,"idempotencyKey"),s=u(e,"conversationId"),l=u(e,"targetProjectId"),p=w(e,"input","input"),c=w(e,"metadata","metadata"),m=I(e.workflowMode),f=await a.agents.run(t,{teamId:n,...s?{conversationId:s}:{},...r?{idempotencyKey:r}:{},...l?{targetProjectId:l}:{},...l?{targetProject:{id:l}}:{},...m?{workflowMode:m}:{},...p?{input:p}:{},metadata:{...c??{},source:"agent_run_test"},runtimeSourcePolicy:j(e,"diagnostic")});console.log(JSON.stringify({resolvedRuntimeSource:f.run.runtimeSource,agent:f.agent,run:f.run,sandbox:f.sandbox??null},null,2));return}if(i==="source"){await B(a,e,o);return}if(i==="update"){let t=o[1]?.trim(),n=d(e,"usage: agent update <agentId>");if(!t)throw new Error("usage: agent update <agentId> --team-id <id>");let r=await a.agents.update(t,T(n,e));console.log(JSON.stringify({agent:r},null,2));return}if(i==="archive"){let t=o[1]?.trim(),n=d(e,"usage: agent archive <agentId>");if(!t)throw new Error("usage: agent archive <agentId> --team-id <id>");let r=await a.agents.archive(t,{teamId:n});console.log(JSON.stringify({agent:r},null,2));return}throw new Error("usage: agent <inspect|build|validate|eval|traces|list|create|upsert|get|update|run|run-test|bind-source|source|edit|archive> [--team-id <id>] [--project-id <id>] [--name <name>]")}g(Oe,"runAgentCommand");import V from"node:path";async function xe(e,o){let i=o[0]||"list",a=await h(e);if(i==="list"){let t=d(e,"usage: project list"),n=await a.projects.list({teamId:t});if(S(e.json)){console.log(JSON.stringify({projects:n},null,2));return}if(n.length===0){console.log("no sandbox projects found");return}for(let r of n)console.log(k(r));return}if(i==="create"||i==="upsert"){let t=await a.projects.upsert(J(e));console.log(JSON.stringify({project:t},null,2));return}if(i==="get"){let t=o[1]?.trim(),n=d(e,"usage: project get <projectId>");if(!t)throw new Error("usage: project get <projectId> --team-id <id>");let r=await a.projects.get(t,{teamId:n});console.log(JSON.stringify({project:r},null,2));return}if(i==="update"){let t=o[1]?.trim(),n=d(e,"usage: project update <projectId>");if(!t)throw new Error("usage: project update <projectId> --team-id <id>");let r=await a.projects.update(t,N(n,e));console.log(JSON.stringify({project:r},null,2));return}if(i==="sync"){let t=o[1]?.trim(),n=d(e,"usage: project sync <projectId>");if(!t)throw new Error("usage: project sync <projectId> --team-id <id>");let r=await a.projects.sync(t,{teamId:n});console.log(JSON.stringify({project:r},null,2));return}if(i==="source-upload"||i==="upload-source"){let t=o[1]?.trim(),n=d(e,"usage: project source-upload <projectId>");if(!t)throw new Error("usage: project source-upload <projectId> --team-id <id> [--path <dir>]");let r=V.resolve(u(e,"path")||"."),s=await E(r,e),l=u(e,"commitMessage")||u(e,"commit-message")||"Upload OpenPond project source",p=await y(r),c=await v(r,p.entries),m=C(p,c.entries),f=await a.projects.uploadSource(t,{teamId:n,entries:m.entries,...s?{branch:s}:{},commitMessage:l});console.log(JSON.stringify({project:f,uploaded:{path:r,branch:s,fileCount:m.fileCount,totalBytes:m.totalBytes,limits:m.limits,transport:m.transport,...c.generatedManifestPath?{agentSdk:{generatedManifestPath:c.generatedManifestPath,generatedEntryCount:c.entries.length,synthesizedOpenPondYaml:c.synthesizedOpenPondYaml,uploadMetadataPath:c.uploadMetadataPath,uploadMetadataHash:c.uploadMetadataHash,commands:c.uploadMetadata?.commands,dependencySetup:c.uploadMetadata?.dependencySetup,packageManager:c.uploadMetadata?.packageManager,sourceTreeMode:c.uploadMetadata?.sourceTreeMode,artifactHashes:c.uploadMetadata?.artifactHashes}}:{}}},null,2));return}if(i==="archive"){let t=o[1]?.trim(),n=d(e,"usage: project archive <projectId>");if(!t)throw new Error("usage: project archive <projectId> --team-id <id>");let r=await a.projects.archive(t,{teamId:n});console.log(JSON.stringify({project:r},null,2));return}throw new Error("usage: project <list|create|upsert|get|update|sync|source-upload|archive> [--team-id <id>] [--name <name>]")}g(xe,"runProjectCommand");export{W as PROJECT_SOURCE_UPLOAD_CONCURRENCY,z as PROJECT_SOURCE_UPLOAD_LIMITS,H as PROJECT_SOURCE_UPLOAD_MAX_BYTES,Y as PROJECT_SOURCE_UPLOAD_MAX_FILES,F as PROJECT_SOURCE_UPLOAD_MAX_FILE_BYTES,X as PROJECT_SOURCE_UPLOAD_TRANSPORT,M as buildAgentSourceChecksInput,_ as buildAgentSourceConfig,j as buildAgentSourcePolicy,R as buildAgentSourcePublishInput,T as buildAgentUpdateInput,U as buildAgentUpsertInput,N as buildProjectUpdateInput,J as buildProjectUpsertInput,y as collectProjectSourceUploadEntries,L as formatAgentLine,k as formatProjectLine,ee as parseAgentEntrypointScope,ne as parseAgentSourceCheckDispatch,re as parseAgentSourceCheckKind,te as parseAgentSourceMode,A as parseAgentTriggerType,x as parsePositiveLimit,Z as parseProjectSourceType,b as resolveLocalAgentSdkCommand,Oe as runAgentCommand,B as runAgentSourceWorkflow,xe as runProjectCommand};
|
|
2
|
+
import{a as b,b as Y,c as F,d as H,e as W,f as z,g as X,h as E,i as y,j as v,k as C,l as Z,m as ee,n as A,o as te,p as _,q as j,r as re,s as ne,t as x,u as M,v as R,w as J,x as N,y as U,z as T}from"./chunk-36FNNR5N.js";import{m as h,n as I,v as P}from"./chunk-7P5SH3CI.js";import"./chunk-TGULVWPV.js";import"./chunk-W3ZILZUL.js";import"./chunk-BBIA24GD.js";import"./chunk-XRKFTPHD.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as u,d,e as w,f as S}from"./chunk-3M53YXEI.js";import"./chunk-PWKJ5KLZ.js";import"./chunk-CRDKBFRN.js";import"./chunk-4JJ4RYIB.js";import"./chunk-27JGS3KB.js";import"./chunk-BT5YNE5U.js";import"./chunk-3WJQ4IGK.js";import"./chunk-KTIBXRWQ.js";import"./chunk-2UZHLO2V.js";import"./chunk-R6MMWEH4.js";import"./chunk-TBODQT4W.js";import"./chunk-TV2LE2BD.js";import"./chunk-OE2OOWEQ.js";import"./chunk-RRWL5BHZ.js";import"./chunk-NXN7GJOH.js";import"./chunk-TERKCK4I.js";import"./chunk-UNE52L3Y.js";import"./chunk-5HPZGLOL.js";import"./chunk-GLUWATL5.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-JFZ6USNQ.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import{a as g}from"./chunk-FTQLQJQV.js";function k(e){let o=e.gitRepo?`${e.gitOwner??"_"}/${e.gitRepo}`:e.internalRepoPath??e.templateRepoUrl??e.normalizedSourceIdentity;return[e.id,e.status,e.sourceType,e.name,o].join(" ")}g(k,"formatProjectLine");function L(e){let o=e.selectedEntrypoint.name?`${e.selectedEntrypoint.scope}:${e.selectedEntrypoint.name}`:e.selectedEntrypoint.scope,i=e.runtimeSource?[e.runtimeSource.mode,e.runtimeSource.publishedSnapshotName??e.runtimeSource.publishedSnapshotId??e.runtimeSource.sourceRef].filter(a=>!!a).join(":"):"latest_source";return[e.id,e.status,e.triggerType,e.defaultWorkflowMode,i,o,e.name].join(" ")}g(L,"formatAgentLine");async function B(e,o,i){let a=i[1]?.trim(),t=i[2]?.trim(),n="usage: agent source <deploy-plan|checks|manifest-snapshots|setup|publish> <agent-id> --team-id <id>",r=d(o,n);if(!a||!t)throw new Error(n);if(a==="deploy-plan"){let s=await e.agents.sourceDeployPlan(t,{teamId:r});console.log(JSON.stringify({deployPlan:s},null,2));return}if(a==="manifest-snapshots"){let s=await e.agents.manifestSnapshots(t,{teamId:r,limit:x(o.limit)});console.log(JSON.stringify({manifestSnapshots:s},null,2));return}if(a==="checks"){let s=await e.agents.requestSourceChecks(t,M(r,o));console.log(JSON.stringify(s,null,2));return}if(a==="setup"){let s=typeof o.provider=="string"?o.provider.trim():"",l=typeof o.allowedActions=="string"?o.allowedActions.split(",").map(c=>c.trim()).filter(Boolean):[];if(!s||l.length===0)throw new Error(`${n}; setup requires --provider and --allowed-actions`);let p=await e.agents.configureSourceSetup(t,{teamId:r,integrationBindings:[{provider:s,mode:"connected",connectionMode:"member_connection",grantPolicy:"read_only",allowedActions:l,enabled:!0}]});console.log(JSON.stringify(p,null,2));return}if(a==="publish"){let s=await e.agents.publishSource(t,R(r,o));console.log(JSON.stringify(s,null,2));return}throw new Error(n)}g(B,"runAgentSourceWorkflow");import G from"node:path";var Q=new Set(["inspect","build","validate","eval","traces"]);function $(e,o){return Q.has(e)?!0:e==="run"&&!u(o,"teamId")}g($,"shouldDelegateLocalAgentSdkCommand");async function q(e,o){let i=o[0]||"inspect",a=G.resolve(u(e,"cwd")||u(e,"path")||"."),t=[i,...o.slice(1),"--cwd",a];S(e.json)&&t.push("--json"),D(t,e,"input","input"),D(t,e,"inputFile","input-file");let n=b(a),r=await P(n.command,[...n.args,...t],{cwd:a,inherit:!0});r.code!==0&&(process.exitCode=r.code??1)}g(q,"runLocalAgentSdkCommand");function D(e,o,i,a){let t=u(o,i);t&&e.push(`--${a}`,t)}g(D,"appendForwardedOption");async function Oe(e,o){let i=o[0]||"list";if($(i,e)){await q(e,o);return}let a=await h(e);if(i==="list"){let t=d(e,"usage: agent list"),n=await a.agents.list({teamId:t});if(S(e.json)){console.log(JSON.stringify({agents:n},null,2));return}if(n.length===0){console.log("no sandbox agents found");return}for(let r of n)console.log(L(r));return}if(i==="create"||i==="upsert"){let t=await a.agents.upsert(U(e));console.log(JSON.stringify({agent:t},null,2));return}if(i==="get"){let t=o[1]?.trim(),n=d(e,"usage: agent get <agentId>");if(!t)throw new Error("usage: agent get <agentId> --team-id <id>");let r=await a.agents.get(t,{teamId:n});console.log(JSON.stringify({agent:r},null,2));return}if(i==="run"){let t=o[1]?.trim(),n=d(e,"usage: agent run <agentId>");if(!t)throw new Error("usage: agent run <agentId> --team-id <id>");let r=u(e,"idempotencyKey"),s=u(e,"conversationId"),l=u(e,"targetProjectId"),p=A(e.triggerType),c=I(e.workflowMode),m=w(e,"input","input"),f=w(e,"metadata","metadata"),O=j(e),K=await a.agents.run(t,{teamId:n,...s?{conversationId:s}:{},...r?{idempotencyKey:r}:{},...l?{targetProjectId:l}:{},...l?{targetProject:{id:l}}:{},...p?{triggerType:p}:{},...c?{workflowMode:c}:{},...m?{input:m}:{},...f?{metadata:f}:{},...O?{runtimeSourcePolicy:O}:{}});console.log(JSON.stringify(K,null,2));return}if(i==="bind-runtime-source"||i==="bind-source"){let t=o[1]?.trim(),n=d(e,"usage: agent bind-source <agentId>");if(!t)throw new Error("usage: agent bind-source <agentId> --team-id <id> --source-mode latest_source|published_snapshot|auto");let r=_(e);if(!r?.mode)throw new Error("usage: agent bind-source <agentId> --team-id <id> --source-mode latest_source|published_snapshot|auto");let s=await a.agents.update(t,{teamId:n,runtimeSource:r});console.log(JSON.stringify({agent:s,agentSource:s.runtimeSource},null,2));return}if(i==="run-test"){let t=o[1]?.trim(),n=d(e,"usage: agent run-test <agentId>");if(!t)throw new Error("usage: agent run-test <agentId> --team-id <id>");let r=u(e,"idempotencyKey"),s=u(e,"conversationId"),l=u(e,"targetProjectId"),p=w(e,"input","input"),c=w(e,"metadata","metadata"),m=I(e.workflowMode),f=await a.agents.run(t,{teamId:n,...s?{conversationId:s}:{},...r?{idempotencyKey:r}:{},...l?{targetProjectId:l}:{},...l?{targetProject:{id:l}}:{},...m?{workflowMode:m}:{},...p?{input:p}:{},metadata:{...c??{},source:"agent_run_test"},runtimeSourcePolicy:j(e,"diagnostic")});console.log(JSON.stringify({resolvedRuntimeSource:f.run.runtimeSource,agent:f.agent,run:f.run,sandbox:f.sandbox??null},null,2));return}if(i==="source"){await B(a,e,o);return}if(i==="update"){let t=o[1]?.trim(),n=d(e,"usage: agent update <agentId>");if(!t)throw new Error("usage: agent update <agentId> --team-id <id>");let r=await a.agents.update(t,T(n,e));console.log(JSON.stringify({agent:r},null,2));return}if(i==="archive"){let t=o[1]?.trim(),n=d(e,"usage: agent archive <agentId>");if(!t)throw new Error("usage: agent archive <agentId> --team-id <id>");let r=await a.agents.archive(t,{teamId:n});console.log(JSON.stringify({agent:r},null,2));return}throw new Error("usage: agent <inspect|build|validate|eval|traces|list|create|upsert|get|update|run|run-test|bind-source|source|edit|archive> [--team-id <id>] [--project-id <id>] [--name <name>]")}g(Oe,"runAgentCommand");import V from"node:path";async function xe(e,o){let i=o[0]||"list",a=await h(e);if(i==="list"){let t=d(e,"usage: project list"),n=await a.projects.list({teamId:t});if(S(e.json)){console.log(JSON.stringify({projects:n},null,2));return}if(n.length===0){console.log("no sandbox projects found");return}for(let r of n)console.log(k(r));return}if(i==="create"||i==="upsert"){let t=await a.projects.upsert(J(e));console.log(JSON.stringify({project:t},null,2));return}if(i==="get"){let t=o[1]?.trim(),n=d(e,"usage: project get <projectId>");if(!t)throw new Error("usage: project get <projectId> --team-id <id>");let r=await a.projects.get(t,{teamId:n});console.log(JSON.stringify({project:r},null,2));return}if(i==="update"){let t=o[1]?.trim(),n=d(e,"usage: project update <projectId>");if(!t)throw new Error("usage: project update <projectId> --team-id <id>");let r=await a.projects.update(t,N(n,e));console.log(JSON.stringify({project:r},null,2));return}if(i==="sync"){let t=o[1]?.trim(),n=d(e,"usage: project sync <projectId>");if(!t)throw new Error("usage: project sync <projectId> --team-id <id>");let r=await a.projects.sync(t,{teamId:n});console.log(JSON.stringify({project:r},null,2));return}if(i==="source-upload"||i==="upload-source"){let t=o[1]?.trim(),n=d(e,"usage: project source-upload <projectId>");if(!t)throw new Error("usage: project source-upload <projectId> --team-id <id> [--path <dir>]");let r=V.resolve(u(e,"path")||"."),s=await E(r,e),l=u(e,"commitMessage")||u(e,"commit-message")||"Upload OpenPond project source",p=await y(r),c=await v(r,p.entries),m=C(p,c.entries),f=await a.projects.uploadSource(t,{teamId:n,entries:m.entries,...s?{branch:s}:{},commitMessage:l});console.log(JSON.stringify({project:f,uploaded:{path:r,branch:s,fileCount:m.fileCount,totalBytes:m.totalBytes,limits:m.limits,transport:m.transport,...c.generatedManifestPath?{agentSdk:{generatedManifestPath:c.generatedManifestPath,generatedEntryCount:c.entries.length,synthesizedOpenPondYaml:c.synthesizedOpenPondYaml,uploadMetadataPath:c.uploadMetadataPath,uploadMetadataHash:c.uploadMetadataHash,commands:c.uploadMetadata?.commands,dependencySetup:c.uploadMetadata?.dependencySetup,packageManager:c.uploadMetadata?.packageManager,sourceTreeMode:c.uploadMetadata?.sourceTreeMode,artifactHashes:c.uploadMetadata?.artifactHashes}}:{}}},null,2));return}if(i==="archive"){let t=o[1]?.trim(),n=d(e,"usage: project archive <projectId>");if(!t)throw new Error("usage: project archive <projectId> --team-id <id>");let r=await a.projects.archive(t,{teamId:n});console.log(JSON.stringify({project:r},null,2));return}throw new Error("usage: project <list|create|upsert|get|update|sync|source-upload|archive> [--team-id <id>] [--name <name>]")}g(xe,"runProjectCommand");export{W as PROJECT_SOURCE_UPLOAD_CONCURRENCY,z as PROJECT_SOURCE_UPLOAD_LIMITS,H as PROJECT_SOURCE_UPLOAD_MAX_BYTES,Y as PROJECT_SOURCE_UPLOAD_MAX_FILES,F as PROJECT_SOURCE_UPLOAD_MAX_FILE_BYTES,X as PROJECT_SOURCE_UPLOAD_TRANSPORT,M as buildAgentSourceChecksInput,_ as buildAgentSourceConfig,j as buildAgentSourcePolicy,R as buildAgentSourcePublishInput,T as buildAgentUpdateInput,U as buildAgentUpsertInput,N as buildProjectUpdateInput,J as buildProjectUpsertInput,y as collectProjectSourceUploadEntries,L as formatAgentLine,k as formatProjectLine,ee as parseAgentEntrypointScope,ne as parseAgentSourceCheckDispatch,re as parseAgentSourceCheckKind,te as parseAgentSourceMode,A as parseAgentTriggerType,x as parsePositiveLimit,Z as parseProjectSourceType,b as resolveLocalAgentSdkCommand,Oe as runAgentCommand,B as runAgentSourceWorkflow,xe as runProjectCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as b}from"./chunk-UOFDKMRU.js";import{a as x}from"./chunk-G4747MOW.js";import"./chunk-
|
|
2
|
+
import{a as b}from"./chunk-UOFDKMRU.js";import{a as x}from"./chunk-G4747MOW.js";import"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import{a as H}from"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-WJSJXK2N.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import{fb as k}from"./chunk-ZY32SZ2P.js";import{v as E,w as R}from"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{l as S,m as g,n}from"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import{a as p}from"./chunk-FTQLQJQV.js";import{randomUUID as v}from"node:crypto";import{promises as t}from"node:fs";import i from"node:path";async function J(r){let o=k.parse(r.reference),e=E(r.sourcePackage,o.harnessRelease);if(e.contentHash!==o.sourcePackageHash||n(o.agentSnapshot)!==n({id:e.agentSnapshot.id,contentHash:e.agentSnapshot.contentHash}))throw new Error("Published Experiment source differs from its admitted immutable closure.");if(!r.ownerId.trim())throw new Error("Published Experiment source requires its trusted execution owner.");b(e);let c=`experiment-source-${n({ownerId:r.ownerId,reference:o})}`,a=await r.store.getHarnessReleaseRecord(o.harnessRelease.contentHash);if(a){let s=await r.store.getHarnessWorkspace(a.workspaceId);if(!s||s.id!==c||s.ownerScope.kind!=="personal"||s.ownerScope.id!==r.ownerId||s.metadata.experimentSourcePackageHash!==e.contentHash||n(a.agentSnapshot)!==n(e.agentSnapshot)||n(a.harnessRelease)!==n(e.harnessRelease))throw new Error("Published Experiment source is already retained under a different owner or immutable closure.");return await y(a.bundlePath,e),{workspace:s,release:a}}let l=i.join(r.storeDir,"library","harnesses","releases"),h=i.join(l,e.harnessRelease.contentHash),d=i.join(l,`.${e.harnessRelease.contentHash}.experiment-${v()}`);await t.mkdir(l,{recursive:!0,mode:448});try{await t.mkdir(i.join(d,"source"),{recursive:!0,mode:448});for(let[s,m]of R(e)){let w=i.join(d,"source",...s.split("/"));await t.mkdir(i.dirname(w),{recursive:!0,mode:448}),await t.writeFile(w,m,{flag:"wx",mode:384})}for(let[s,m]of[["agent-snapshot.json",e.agentSnapshot],["harness-release.json",e.harnessRelease]])await t.writeFile(i.join(d,s),S(m),{flag:"wx",mode:384});try{await t.rename(d,h)}catch(s){if(!["EEXIST","ENOTEMPTY"].includes(s.code??""))throw s}await y(h,e)}finally{await t.rm(d,{recursive:!0,force:!0})}let u=x.parse({schemaVersion:"openpond.localHarnessReleaseRecord.v1",workspaceId:c,sourceRevision:e.contentHash,agentSnapshot:e.agentSnapshot,harnessRelease:e.harnessRelease,bundlePath:h,createdAt:r.createdAt}),f=H.parse({schemaVersion:"openpond.harnessWorkspace.v1",id:c,ownerScope:{kind:"personal",id:r.ownerId},name:"Experiment source",location:"local",sourceRevision:e.contentHash,revision:0,dirty:!1,currentChannel:{name:"personal",release:o.harnessRelease,revision:1},createdAt:r.createdAt,updatedAt:r.createdAt,metadata:{selectionEligible:!1,experimentSourcePackageHash:e.contentHash}});return await r.store.createHarnessWorkspaceWithRelease({workspace:f,release:u}),{workspace:f,release:u}}p(J,"installPublishedExperimentSource");async function y(r,o){if(await t.realpath(r)!==i.resolve(r))throw new Error("Published Experiment bundle cannot be a symbolic link.");for(let[c,a]of[["agent-snapshot.json",o.agentSnapshot],["harness-release.json",o.harnessRelease]]){let l=i.join(r,c);if(!(await t.lstat(l)).isFile()||n(JSON.parse(await t.readFile(l,"utf8")))!==n(a))throw new Error("Retained published Experiment release metadata changed.")}for(let c of o.harnessRelease.files){let a=i.join(r,"source",...c.path.split("/"));if(!(await t.lstat(a)).isFile()||await t.realpath(a)!==a)throw new Error("Published Experiment source must contain regular immutable files.");let l=await t.readFile(a);if(l.byteLength!==c.sizeBytes||g(l)!==c.contentHash)throw new Error("Retained published Experiment source differs from its released bytes.")}}p(y,"verifyBundle");export{J as installPublishedExperimentSource};
|
package/dist/chunks/{refiner-profile-service-PPGGNVOV.js → refiner-profile-service-ATEFPF5O.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"./chunk-
|
|
2
|
+
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"./chunk-FE2ENE3U.js";import"./chunk-CJDGLPNX.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-FCXDPVGJ.js";import"./chunk-UTIELP6F.js";import"./chunk-5TPYBXWM.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-543QHE3D.js";import"./chunk-LI56PPCN.js";import"./chunk-GI7LTJV3.js";import"./chunk-6LFTQBXP.js";import"./chunk-XGY4OQLC.js";import"./chunk-VPAEFG7X.js";import"./chunk-SFR32TMJ.js";import"./chunk-AXYAEWWA.js";import"./chunk-QOUOU7FE.js";import"./chunk-WJSJXK2N.js";import"./chunk-TS5HNRZB.js";import"./chunk-5ZNE43XC.js";import"./chunk-HIQPGYVH.js";import"./chunk-263WS3TB.js";import"./chunk-SD2XDZQW.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-XHU4BZQY.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-UGOK7VTC.js";import"./chunk-FTQLQJQV.js";export{f as activateRefinerRelease,b as createRefinerProfileRoutePayloads,h as initializeRefinerProfile,c as inspectRefinerProfile,d as loadActiveRefinerRelease,a as refinerProfilePaths,g as rollbackRefinerRelease,e as updateRefinerProfile};
|