@xopcai/xopc 0.0.382 → 0.0.384
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/browser-ext/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/browser-ext/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/browser-ext/dist/assets/{sidepanel-Ccl0eSa1.css → sidepanel-CQeQB5vW.css} +3 -0
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +16690 -3
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/gateway/static/root/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/gateway/static/root/assets/{activity-store-CKTm4K1I.js → activity-store-CB2X4Gmu.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-60ztIsyO.js → agent-avatar-dicebear-BSel9yf8.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DgHMyhuY.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-D0h_GOzZ.js → agent-plugin-dialog-BosuN4dO.js} +1 -1
- package/dist/gateway/static/root/assets/agents-B-pw5RKI.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-6aesahV-.js → agents-admin-api-BkULgC6Q.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D7OQP_Q4.js → app-management-settings-panel-DuOqKkfH.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CY44NMTV.js → appearance-settings-8JF9rXFr.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CfrhlDw1.js → apps-page-Cuclpk0A.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-D5ouupwE.js → archive-plugin-De0ND0oA.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BTyga78U.js → automations-page-D7NwNy2I.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CSxW4wX0.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-sYO6MAV6.js → binary-plugins-Do535ZGW.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BdOTO0Yo.css → block-editor-Cvy3D_4T.css} +1 -1
- package/dist/gateway/static/root/assets/block-editor-Dnb7CH_l.js +160 -0
- package/dist/gateway/static/root/assets/{browser-automation-inputs-BmILL059.js → browser-automation-inputs-B9M1RYTm.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-GBgDe21o.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-B2FXaO3n.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-DFR31Yhq.js → capabilities-2Do3eKMM.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BFuas9nS.js → capabilities-XFwwUNU3.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-f2-MquJn.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-ByLA8WMF.js → capabilities-settings-panel-D9F0mw16.js} +6 -6
- package/dist/gateway/static/root/assets/{capability-header-actions-DBwN3Sxo.js → capability-header-actions-DVRxJPQP.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-hokrjIdA.js → channels-CnDm5T1t.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BBNBN1KZ.js → chat-terminal-dock-BxSCDbK7.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BWLBPHzl.js → computer-settings-page-DVAB-kQw.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-Bm5JwIw8.js → connector-service-page-D2EeLXei.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DK9n4hgZ.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-BhtD9xGl.js → date-picker-Cl9KfFj8.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BZ7Xnjqt.js → dependency-picker-Ei6aX5WM.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CFPxAY1g.js → desktop-pet-4Evl4RKX.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-HHN0SYzH.js → desktop-pet-settings-DAD_OWcX.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BA21epMn.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DQm9XjdO.js → directory-picker-path-field-B_Zb5nNR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BrwNSqhz.js → extension-debug-page-DtHNy4TE.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CpDc5gDd.js → extension-page-8gWSThWP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DF9qV04X.js → extension-provider-nbgU7xBS.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BLXL1IUp.js → extension-settings-page-CunUbB09.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-JL5hZ0k-.js → fallback-models-BSAfzXby.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-iceAEoJZ.js → gateway-config-swr-D0tBjSgj.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DMpsQXjn.js → gateway-realtime-BnHraJ3O.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BVriF6Zj.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CN-2229W.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BS6l0_QM.js → gateway-startup-retry-C1DQsIH3.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-BQJ5YRxv.js → highlighted-body-KQOG7T2V-DktBCtHF.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CUJcNW3H.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-F2lG3T2E.js → image-generation-api-DodU6GNC.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CsMEvde8.js → imports-page-DQm1MNNC.js} +1 -1
- package/dist/gateway/static/root/assets/index-BPNL54bv.js +260 -0
- package/dist/gateway/static/root/assets/index-yseLAt9D.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CeYVir-Q.js → keyboard-shortcuts-settings-DaC5YjuJ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Chj0R32r.js → local-app-workbench-page-DwQyyo7a.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-sTmfe7AL.js → local-apps-page-CpZhivpf.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DdLyLxCp.js → local-session-drafts-D_tYFy7d.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-AAPVaavy.js → locale-store-uRu_DsWm.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CpR_hGcR.js → logs-page-Db43nh1M.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-B_rVRdFW.js → management-settings-DrKejBEZ.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-Ct4sKkUf.css +1 -0
- package/dist/gateway/static/root/assets/markdown-view-DHfQAvZQ.js +324 -0
- package/dist/gateway/static/root/assets/{media-plugins-Op_dDK0E.js → media-plugins-BombFqsX.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-C4VzqE9z.js +1 -0
- package/dist/gateway/static/root/assets/messages-DTqbfje6.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-Ct6X5zmB.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-a8NSwmmW.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-1TYlEpD2.js → notes-api-nqN2wKYc.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-BKRke43F.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-BYqWMp-X.js → page-context-capture-button-DUaMkmxv.js} +1 -1
- package/dist/gateway/static/root/assets/page-tabs-HLrKIjXH.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-BqF-HHw1.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BRBzKP2h.js → product-open-page-GrhtTQIz.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-BapT1QoP.js → product-preview-content-zdP7gN0y.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-9Vd_AqDW.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-BMN9evTF.js → projects-page-DGunhjoM.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-BPFXyHk8.js → registry-api-CYqA7bfl.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BoRsF3Lx.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-Cu0MRsAb.js → runtime-tools-api-zzoxjSuR.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CJF3NeTn.js → runtime-tools-settings-panel-W0HDm--J.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-D_BBF04t.js → scenes-page-CYsFOfVJ.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-CAmizvOH.js → schema-form-CBxEbBQq.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-G334tGIw.js → send-session-input-BCAF-Ikt.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-DYl61CUz.js → session-api-CzVTrG8n.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-J3r-UiPc.js → session-manager-_yy4bxhT.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-Dthfx_vc.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-O_0Lk38S.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-B635QEij.js → settings-page-CFs-WP_2.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D2-9fXYL.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-Bht78zB4.js → share-link-dialog-C47Xgzta.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-epHeT5lh.js → share-preview-page-nJ2FWAEP.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-k1DyfoGP.js → shares-api-B0HlMAzi.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DTb88RHD.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-CLmxc6fX.js → skill-api-DJ8UBsxq.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DZGoQACj.js → skill-reload-api-CEJx5rPd.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-clfZlVOG.js → skills-page-DjbBOikT.js} +1 -1
- package/dist/gateway/static/root/assets/specialists-4bkS5rZ4.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-DHjH7-OW.js → system-settings-panel-Dt5GkLhM.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BcYnm1sO.js → task-detail-page-88EShcbs.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-OTHBryoz.js → task-expandable-content-CF6Bj-Qa.js} +1 -1
- package/dist/gateway/static/root/assets/tasks-DJIeIk9C.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-C2WOFv9Y.js → theme-store-BUfzeDvL.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-CnPpysvy.js → tracing-settings-page-C2q5B3Kp.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-C3bUe4Nc.js → tunnel-api-JHttXi63.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Dgl7sh2E.js → usage-page-B3rUa0fW.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BXZr6Rm9.js → use-autosave-DgbCgsao.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-C7M9p0kf.js → use-composer-attachments-BFP3k6oC.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CleMXYWu.js → use-file-preview-expanded-B1BiTQNS.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-Cq1VSsZw.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BeF8AHPT.js → voice-api-key-field-4AIkbm9R.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CBORJPD_.js → voice-config-api-Kw1pYlLN.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-3egLlB1M.js → work-discovery-overlay-BAtG_JHv.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BhYnheW-.js → workflow-run-setup-panel-Cw12NFgx.js} +2 -2
- package/dist/gateway/static/root/assets/{workflows-page-C9dLtlfP.js → workflows-page-kR5ouOuM.js} +3 -3
- package/dist/gateway/static/root/assets/{workspace-api-DdkViIn3.js → workspace-api-Xr3wz8T3.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-4KUvnfnh.js → xopc-cloud-account-card-BTBVKpSg.js} +1 -1
- package/dist/gateway/static/root/index.html +30 -29
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/index.js +4 -0
- package/dist/packages/gateway-contract/src/next-turn-suggestions.js +40 -0
- package/dist/packages/gateway-contract/src/specialists.js +48 -0
- package/dist/packages/gateway-contract/src/task-lifecycle.js +3 -0
- package/dist/packages/gateway-contract/src/tasks.js +41 -10
- package/dist/src/agent/agent-manager.d.ts +6 -0
- package/dist/src/agent/agent-manager.js +7 -3
- package/dist/src/agent/child-agent-factory.d.ts +9 -0
- package/dist/src/agent/child-agent-factory.js +83 -46
- package/dist/src/agent/context/execution-scope.js +1 -1
- package/dist/src/agent/context/project-context.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +11 -0
- package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
- package/dist/src/agent/orchestration/agent-turn-policy.d.ts +4 -0
- package/dist/src/agent/orchestration/delegation-budget.d.ts +60 -0
- package/dist/src/agent/orchestration/delegation-budget.js +154 -0
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +2 -2
- package/dist/src/agent/service.d.ts +6 -0
- package/dist/src/agent/service.js +4 -1
- package/dist/src/agent/starter-agents.d.ts +2 -0
- package/dist/src/agent/starter-agents.js +114 -5
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +17 -3
- package/dist/src/agent/tools/error-pattern-matcher.js +1 -1
- package/dist/src/agent/tools/exec-command.js +3 -1
- package/dist/src/agent/tools/factory.d.ts +7 -0
- package/dist/src/agent/tools/factory.js +21 -2
- package/dist/src/agent/tools/personal-attention-tool.d.ts +2 -0
- package/dist/src/agent/tools/personal-attention-tool.js +51 -17
- package/dist/src/agent/tools/personal-read-tool.js +16 -6
- package/dist/src/agent/tools/personal-request-tool.js +64 -10
- package/dist/src/agent/tools/personal-result-budget.d.ts +2 -0
- package/dist/src/agent/tools/personal-result-budget.js +57 -0
- package/dist/src/agent/tools/personal-task-tool.d.ts +23 -11
- package/dist/src/agent/tools/personal-task-tool.js +394 -69
- package/dist/src/agent/tools/xopc-use-tool.d.ts +2 -0
- package/dist/src/agent/tools/xopc-use-tool.js +22 -9
- package/dist/src/agent-config/resolver.js +4 -0
- package/dist/src/agent-config/schema.d.ts +36 -2
- package/dist/src/agent-config/schema.js +9 -2
- package/dist/src/agent-matching/delegation-service.d.ts +17 -0
- package/dist/src/agent-matching/delegation-service.js +87 -0
- package/dist/src/agent-matching/schema.d.ts +2 -0
- package/dist/src/agent-matching/schema.js +6 -0
- package/dist/src/agent-matching/selection-repository.d.ts +54 -0
- package/dist/src/agent-matching/selection-repository.js +83 -0
- package/dist/src/agent-matching/service.d.ts +85 -0
- package/dist/src/agent-matching/service.js +192 -0
- package/dist/src/automations/capabilities/write.d.ts +6 -2
- package/dist/src/automations/domain/validation.d.ts +12 -4
- package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.d.ts +4 -0
- package/dist/src/gateway/agents-admin.js +5 -2
- package/dist/src/gateway/hono/routes/agents.js +18 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/next-turn-suggestions.d.ts +3 -0
- package/dist/src/gateway/hono/routes/next-turn-suggestions.js +39 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -1
- package/dist/src/gateway/next-turn-suggestions/generator.d.ts +3 -0
- package/dist/src/gateway/next-turn-suggestions/generator.js +50 -0
- package/dist/src/gateway/next-turn-suggestions/service.d.ts +23 -0
- package/dist/src/gateway/next-turn-suggestions/service.js +125 -0
- package/dist/src/gateway/next-turn-suggestions/snapshot.d.ts +15 -0
- package/dist/src/gateway/next-turn-suggestions/snapshot.js +67 -0
- package/dist/src/gateway/service/agent-runner.d.ts +2 -0
- package/dist/src/gateway/service/agent-runner.js +13 -1
- package/dist/src/gateway/service/session-input-coordinator.js +1 -1
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +18 -4
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/personal-agent/capability-service.d.ts +2 -0
- package/dist/src/personal-agent/capability-service.js +29 -16
- package/dist/src/personal-agent/policy.js +2 -7
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompt-context.d.ts +1 -4
- package/dist/src/personal-agent/prompt-context.js +5 -35
- package/dist/src/personal-agent/prompts.js +32 -8
- package/dist/src/personal-agent/reply-composer.js +1 -1
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-repository.d.ts +3 -2
- package/dist/src/personal-agent/request-repository.js +4 -4
- package/dist/src/personal-agent/request-service.d.ts +2 -1
- package/dist/src/personal-agent/request-service.js +161 -13
- package/dist/src/personal-agent/specialist-capabilities.js +6 -0
- package/dist/src/personal-agent/task-cancel.d.ts +7 -0
- package/dist/src/personal-agent/task-cancel.js +76 -0
- package/dist/src/session/client-history.js +1 -1
- package/dist/src/session/index.js +1 -1
- package/dist/src/storage/sqlite/migrations/247_agent_selection_records.sql +32 -0
- package/dist/src/storage/sqlite/migrations/248_next_turn_suggestions.sql +20 -0
- package/dist/src/storage/sqlite/migrations/249_task_allocations.sql +17 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/next-turn-suggestion-repository.d.ts +4 -0
- package/dist/src/storage/sqlite/next-turn-suggestion-repository.js +30 -0
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/capabilities/read.js +1 -1
- package/dist/src/tasks/capabilities/relations.d.ts +38 -2
- package/dist/src/tasks/capabilities/write.d.ts +42 -0
- package/dist/src/tasks/capabilities/write.js +9 -7
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tasks/task-allocation-repository.d.ts +25 -0
- package/dist/src/tasks/task-allocation-repository.js +82 -0
- package/dist/src/tasks/task-allocation-service.d.ts +39 -0
- package/dist/src/tasks/task-allocation-service.js +310 -0
- package/dist/src/tasks/task-application-service.js +44 -1
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-main-update-delivery.js +2 -0
- package/dist/src/tasks/task-origin-repository.d.ts +2 -1
- package/dist/src/tasks/task-origin-repository.js +9 -5
- package/dist/src/tasks/task-read-model-projector.d.ts +2 -1
- package/dist/src/tasks/task-read-model-projector.js +21 -8
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +9 -1
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +5 -4
- package/package.json +6 -5
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CzriaMLA.js +0 -1
- package/dist/gateway/static/root/assets/agents-Dwjb-Pmc.js +0 -66
- package/dist/gateway/static/root/assets/automations-workspace-DGZAGTNe.js +0 -6
- package/dist/gateway/static/root/assets/block-editor-CeytAoXT.js +0 -159
- package/dist/gateway/static/root/assets/browser-automations-page-Ko-r320n.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-DPICvQED.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-Crb7Oeay.js +0 -2
- package/dist/gateway/static/root/assets/connectors-page-ok0F1o0p.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C00mHAYU.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-U3lzqE82.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Bc9HD3uV.js +0 -1
- package/dist/gateway/static/root/assets/home-page-hHgcCF-P.js +0 -2
- package/dist/gateway/static/root/assets/index-BnHaXfFv.css +0 -1
- package/dist/gateway/static/root/assets/index-odJjleQM.js +0 -255
- package/dist/gateway/static/root/assets/markdown-view-ByJbFign.css +0 -1
- package/dist/gateway/static/root/assets/markdown-view-roJ1FcXL.js +0 -66
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-BUSGX-3o.js +0 -1
- package/dist/gateway/static/root/assets/messages-DwOSR5ue.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-BFSZUHQI.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-D2qf-sDw.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-DNvVJasv.js +0 -8
- package/dist/gateway/static/root/assets/page-tabs-BLGO2VIm.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-Bd4xN8C7.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-DJC5iE_A.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-sJTykTVP.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-B-wgtLR4.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CA6YH-tX.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CUmMrn5b.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BSQLmRXu.js +0 -1
- package/dist/gateway/static/root/assets/tasks-DwKXgZ-I.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BQBsKpmh.js +0 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { runWithActivityContext } from "../../activity/context.js";
|
|
2
2
|
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
3
|
+
import { normalizeSpecialistRequirements } from "../../../packages/gateway-contract/src/specialists.js";
|
|
3
4
|
import { TaskCommandSchema, TaskContextInputSchema } from "../../../packages/gateway-contract/src/tasks.js";
|
|
4
5
|
import { ChatPreviewCreateInputSchema, ChatPreviewReviseInputSchema } from "../../../packages/gateway-contract/src/chat-previews.js";
|
|
5
6
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
@@ -13,8 +14,10 @@ import "../../activity/index.js";
|
|
|
13
14
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
14
15
|
import "../../capabilities/runtime/dispatcher.js";
|
|
15
16
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
16
|
-
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
17
17
|
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
18
|
+
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
19
|
+
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
20
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
18
21
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
19
22
|
import "../../projects/index.js";
|
|
20
23
|
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
@@ -27,7 +30,6 @@ import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
|
27
30
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
28
31
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
29
32
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
30
|
-
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
31
33
|
import "../../tasks/index.js";
|
|
32
34
|
import { randomUUID } from "node:crypto";
|
|
33
35
|
import { Type } from "@sinclair/typebox";
|
|
@@ -76,6 +78,7 @@ const TASK_PRIORITIES = new Set([
|
|
|
76
78
|
"critical"
|
|
77
79
|
]);
|
|
78
80
|
const TASK_COMMANDS = new Set([
|
|
81
|
+
"retry_allocation",
|
|
79
82
|
"mark_ready",
|
|
80
83
|
"start",
|
|
81
84
|
"request_review",
|
|
@@ -85,7 +88,11 @@ const TASK_COMMANDS = new Set([
|
|
|
85
88
|
"resolve_wait",
|
|
86
89
|
"revise_contract"
|
|
87
90
|
]);
|
|
88
|
-
const TASK_CREATE_MODES = new Set([
|
|
91
|
+
const TASK_CREATE_MODES = new Set([
|
|
92
|
+
"capture",
|
|
93
|
+
"start",
|
|
94
|
+
"allocate"
|
|
95
|
+
]);
|
|
89
96
|
function okText(details) {
|
|
90
97
|
return {
|
|
91
98
|
content: [{
|
|
@@ -1202,7 +1209,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1202
1209
|
};
|
|
1203
1210
|
return {
|
|
1204
1211
|
ok: true,
|
|
1205
|
-
...new TaskOriginRepository().list(conversationId, finiteNumber(args.limit) ?? 20)
|
|
1212
|
+
...new TaskOriginRepository().list(conversationId, finiteNumber(args.limit) ?? 20, { offset: finiteNumber(args.offset) ?? 0 })
|
|
1206
1213
|
};
|
|
1207
1214
|
}
|
|
1208
1215
|
if (command === "collaboration" || command === "collaboration_post") {
|
|
@@ -1379,7 +1386,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1379
1386
|
ok: false,
|
|
1380
1387
|
error: "Invalid createMode"
|
|
1381
1388
|
};
|
|
1382
|
-
if (createMode
|
|
1389
|
+
if (createMode !== "capture" && !deps.dispatchTaskRuns) return {
|
|
1383
1390
|
ok: false,
|
|
1384
1391
|
error: "Task execution service is unavailable"
|
|
1385
1392
|
};
|
|
@@ -1472,7 +1479,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1472
1479
|
priority: priority ?? "normal",
|
|
1473
1480
|
...dueAt === void 0 ? {} : { dueAt },
|
|
1474
1481
|
...projectId ? { projectId } : {},
|
|
1475
|
-
delegateAgentId: agentId,
|
|
1482
|
+
...createMode !== "allocate" ? { delegateAgentId: agentId } : {},
|
|
1476
1483
|
...originConversationId ? { originConversationId } : {},
|
|
1477
1484
|
locale: taskLocale,
|
|
1478
1485
|
contract: {
|
|
@@ -1490,7 +1497,10 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1490
1497
|
metadata: {}
|
|
1491
1498
|
}] : [],
|
|
1492
1499
|
authorityGrants: [],
|
|
1493
|
-
activation: createMode === "
|
|
1500
|
+
activation: createMode === "allocate" ? {
|
|
1501
|
+
mode: "allocate",
|
|
1502
|
+
requirements: normalizeSpecialistRequirements(args.requirements)
|
|
1503
|
+
} : createMode === "capture" ? {
|
|
1494
1504
|
mode: "capture",
|
|
1495
1505
|
phase: "backlog"
|
|
1496
1506
|
} : {
|
|
@@ -1530,11 +1540,13 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1530
1540
|
error: created.reason,
|
|
1531
1541
|
...created
|
|
1532
1542
|
};
|
|
1543
|
+
const currentModel = createMode === "allocate" ? new TaskReadModelProjector().get(created.model.task.id) ?? created.model : created.model;
|
|
1533
1544
|
return {
|
|
1534
1545
|
ok: true,
|
|
1535
|
-
task:
|
|
1536
|
-
operationalState:
|
|
1546
|
+
task: currentModel.task,
|
|
1547
|
+
operationalState: currentModel.operationalState,
|
|
1537
1548
|
createMode,
|
|
1549
|
+
allocation: currentModel.allocation,
|
|
1538
1550
|
...created.runId ? { runId: created.runId } : {}
|
|
1539
1551
|
};
|
|
1540
1552
|
}
|
|
@@ -1883,6 +1895,7 @@ async function handleChatPreview(command, args, deps, dryRun) {
|
|
|
1883
1895
|
}
|
|
1884
1896
|
function createXopcUseTool(deps) {
|
|
1885
1897
|
const capabilities = createProductDispatcher(deps.getNotesService, {
|
|
1898
|
+
createTask: deps.createTask,
|
|
1886
1899
|
getConfig: deps.getConfig,
|
|
1887
1900
|
getProjects: deps.getProjectService,
|
|
1888
1901
|
getWorkDiscovery: deps.getWorkDiscovery,
|
|
@@ -94,7 +94,9 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
94
94
|
if (agent.runtime) markObjectSources(agent.runtime, "agent", "runtime", sources);
|
|
95
95
|
const workspace = agent.workspace ?? params.defaultWorkspace?.(agent.id) ?? `~/.xopc/workspace/${agent.id}`;
|
|
96
96
|
sources.workspace = agent.workspace ? "agent" : "system";
|
|
97
|
+
if (agent.purpose) sources.purpose = "agent";
|
|
97
98
|
if (agent.profile) markObjectSources(agent.profile, "agent", "profile", sources);
|
|
99
|
+
if (agent.specialistProfile) markObjectSources(agent.specialistProfile, "agent", "specialistProfile", sources);
|
|
98
100
|
if (agent.toolAllowlist) sources.toolAllowlist = "agent";
|
|
99
101
|
return {
|
|
100
102
|
config: EffectiveAgentConfigSchema.parse({
|
|
@@ -102,6 +104,8 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
102
104
|
enabled: agent.enabled,
|
|
103
105
|
workspace,
|
|
104
106
|
...agent.profile ? { profile: structuredClone(agent.profile) } : {},
|
|
107
|
+
...agent.purpose ? { purpose: agent.purpose } : {},
|
|
108
|
+
...agent.specialistProfile ? { specialistProfile: structuredClone(agent.specialistProfile) } : {},
|
|
105
109
|
models,
|
|
106
110
|
skills,
|
|
107
111
|
tools,
|
|
@@ -2,8 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const DEFAULT_AGENT_MODEL_REF = "xopc-cloud/auto";
|
|
3
3
|
export declare const DEFAULT_CORE_SKILLS: readonly ["doc-coauthoring", "define-task", "find-skills", "summarize"];
|
|
4
4
|
export declare const DEFAULT_SKILL_POLICY: {
|
|
5
|
-
mode: "
|
|
6
|
-
|
|
5
|
+
mode: "all-enabled";
|
|
6
|
+
exclude: any[];
|
|
7
7
|
};
|
|
8
8
|
export declare const AgentIdSchema: z.ZodString;
|
|
9
9
|
export declare const ModelRefSchema: z.ZodString;
|
|
@@ -402,6 +402,23 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
402
402
|
}, z.core.$strict>>;
|
|
403
403
|
instructions: z.ZodOptional<z.ZodString>;
|
|
404
404
|
}, z.core.$strict>>;
|
|
405
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
406
|
+
specialist: "specialist";
|
|
407
|
+
task_dispatcher: "task_dispatcher";
|
|
408
|
+
}>>;
|
|
409
|
+
specialistProfile: z.ZodOptional<z.ZodObject<{
|
|
410
|
+
version: z.ZodLiteral<1>;
|
|
411
|
+
domains: z.ZodArray<z.ZodString>;
|
|
412
|
+
taskTypes: z.ZodArray<z.ZodString>;
|
|
413
|
+
inputKinds: z.ZodArray<z.ZodString>;
|
|
414
|
+
outputKinds: z.ZodArray<z.ZodString>;
|
|
415
|
+
specialties: z.ZodArray<z.ZodString>;
|
|
416
|
+
examples: z.ZodArray<z.ZodObject<{
|
|
417
|
+
request: z.ZodString;
|
|
418
|
+
deliverable: z.ZodString;
|
|
419
|
+
}, z.core.$strict>>;
|
|
420
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
421
|
+
}, z.core.$strict>>;
|
|
405
422
|
models: z.ZodOptional<z.ZodObject<{
|
|
406
423
|
chat: z.ZodOptional<z.ZodObject<{
|
|
407
424
|
primary: z.ZodString;
|
|
@@ -551,6 +568,23 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
551
568
|
}, z.core.$strict>>;
|
|
552
569
|
instructions: z.ZodOptional<z.ZodString>;
|
|
553
570
|
}, z.core.$strict>>;
|
|
571
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
572
|
+
specialist: "specialist";
|
|
573
|
+
task_dispatcher: "task_dispatcher";
|
|
574
|
+
}>>;
|
|
575
|
+
specialistProfile: z.ZodOptional<z.ZodObject<{
|
|
576
|
+
version: z.ZodLiteral<1>;
|
|
577
|
+
domains: z.ZodArray<z.ZodString>;
|
|
578
|
+
taskTypes: z.ZodArray<z.ZodString>;
|
|
579
|
+
inputKinds: z.ZodArray<z.ZodString>;
|
|
580
|
+
outputKinds: z.ZodArray<z.ZodString>;
|
|
581
|
+
specialties: z.ZodArray<z.ZodString>;
|
|
582
|
+
examples: z.ZodArray<z.ZodObject<{
|
|
583
|
+
request: z.ZodString;
|
|
584
|
+
deliverable: z.ZodString;
|
|
585
|
+
}, z.core.$strict>>;
|
|
586
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
587
|
+
}, z.core.$strict>>;
|
|
554
588
|
models: z.ZodObject<{
|
|
555
589
|
chat: z.ZodObject<{
|
|
556
590
|
primary: z.ZodString;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { SpecialistProfileSchema } from "../../packages/gateway-contract/src/specialists.js";
|
|
3
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
2
4
|
import { z } from "zod";
|
|
3
5
|
//#region src/agent-config/schema.ts
|
|
4
6
|
var DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, AgentIdSchema, ModelRefSchema, ModelRouteSchema, ImageGenerationRouteSchema, ComputerModelRouteSchema, ModelIntentSchema, ModelIntentRoutesSchema, ModelIntentOverridesSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, ToolModeSchema, ToolPolicySchema, ToolPoliciesSchema, SkillDefaultsSchema, SkillOverrideSchema, WorkflowPolicySchema, RuntimePolicySchema, AgentDefaultsSchema, ResponsePreferencesSchema, AgentProfileSchema, AgentEntrySchema, EffectiveAgentConfigSchema;
|
|
5
7
|
var init_schema = __esmMin((() => {
|
|
8
|
+
init_src();
|
|
6
9
|
DEFAULT_AGENT_MODEL_REF = "xopc-cloud/auto";
|
|
7
10
|
DEFAULT_CORE_SKILLS = [
|
|
8
11
|
"doc-coauthoring",
|
|
@@ -11,8 +14,8 @@ var init_schema = __esmMin((() => {
|
|
|
11
14
|
"summarize"
|
|
12
15
|
];
|
|
13
16
|
DEFAULT_SKILL_POLICY = {
|
|
14
|
-
mode: "
|
|
15
|
-
|
|
17
|
+
mode: "all-enabled",
|
|
18
|
+
exclude: []
|
|
16
19
|
};
|
|
17
20
|
AgentIdSchema = z.string().regex(/^[a-z][a-z0-9_-]{0,63}$/);
|
|
18
21
|
ModelRefSchema = z.string().trim().min(1).refine((value) => {
|
|
@@ -181,6 +184,8 @@ var init_schema = __esmMin((() => {
|
|
|
181
184
|
enabled: z.boolean().default(true),
|
|
182
185
|
workspace: z.string().trim().min(1).optional(),
|
|
183
186
|
profile: AgentProfileSchema.optional(),
|
|
187
|
+
purpose: z.enum(["specialist", "task_dispatcher"]).optional(),
|
|
188
|
+
specialistProfile: SpecialistProfileSchema.optional(),
|
|
184
189
|
models: AgentModelsOverrideSchema.optional(),
|
|
185
190
|
skills: SkillOverrideSchema.optional(),
|
|
186
191
|
tools: ToolPoliciesSchema.optional(),
|
|
@@ -193,6 +198,8 @@ var init_schema = __esmMin((() => {
|
|
|
193
198
|
enabled: z.boolean(),
|
|
194
199
|
workspace: z.string().min(1),
|
|
195
200
|
profile: AgentProfileSchema.optional(),
|
|
201
|
+
purpose: z.enum(["specialist", "task_dispatcher"]).optional(),
|
|
202
|
+
specialistProfile: SpecialistProfileSchema.optional(),
|
|
196
203
|
models: AgentModelsDefaultsSchema,
|
|
197
204
|
skills: SkillDefaultsSchema,
|
|
198
205
|
tools: ToolPoliciesSchema,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ActorRef, TaskCreateRequest } from '@xopcai/gateway-contract';
|
|
2
|
+
import { type TaskApplicationResult } from '../tasks/task-application-service.js';
|
|
3
|
+
import { type SelectionRecord } from './selection-repository.js';
|
|
4
|
+
import { type MatchingContext, type SpecialistAssessment } from './service.js';
|
|
5
|
+
import type { SpecialistTaskRequirements } from './schema.js';
|
|
6
|
+
export declare function assertSpecialistEligible(assessment: SpecialistAssessment): void;
|
|
7
|
+
/** Runs inside the product capability transaction; no async work or dispatch occurs here. */
|
|
8
|
+
export declare function createSelectedTask(input: TaskCreateRequest, actor: ActorRef | undefined, selection: {
|
|
9
|
+
conversationId: string;
|
|
10
|
+
requirements: SpecialistTaskRequirements;
|
|
11
|
+
context: MatchingContext;
|
|
12
|
+
candidates?: SelectionRecord['candidates'];
|
|
13
|
+
requestHash?: string;
|
|
14
|
+
reason?: string;
|
|
15
|
+
source: SelectionRecord['selectionSource'];
|
|
16
|
+
previousSelectionId?: string;
|
|
17
|
+
}): TaskApplicationResult;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
4
|
+
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
5
|
+
import { TaskReadModelProjector } from "../tasks/task-read-model-projector.js";
|
|
6
|
+
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
7
|
+
import { assessSpecialist } from "./service.js";
|
|
8
|
+
import { AgentSelectionRepository, selectionRequestHash } from "./selection-repository.js";
|
|
9
|
+
//#region src/agent-matching/delegation-service.ts
|
|
10
|
+
init_logger();
|
|
11
|
+
init_transaction();
|
|
12
|
+
init_task_run_repository();
|
|
13
|
+
const log = createLogger("AgentMatching");
|
|
14
|
+
function assertSpecialistEligible(assessment) {
|
|
15
|
+
if (assessment.eligibility !== "eligible") {
|
|
16
|
+
const failures = assessment.checks.filter((check) => check.state === "blocked" || check.state === "unknown");
|
|
17
|
+
throw new Error(`Specialist Agent is unavailable: ${assessment.id}: ${failures.map((check) => `${check.condition} ${check.detail ?? check.reasonCode}`).join("; ")}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** Runs inside the product capability transaction; no async work or dispatch occurs here. */
|
|
21
|
+
function createSelectedTask(input, actor, selection) {
|
|
22
|
+
return runSqliteWriteTransaction(() => {
|
|
23
|
+
if (input.originConversationId !== selection.conversationId) throw new Error("Task selection origin mismatch");
|
|
24
|
+
if (input.activation.mode !== "start" || !input.delegateAgentId || input.activation.executor?.kind !== "agent" || input.activation.executor.agentId !== input.delegateAgentId) throw new Error("Selection must match the Task executor");
|
|
25
|
+
const repository = new AgentSelectionRepository();
|
|
26
|
+
const hash = selection.requestHash ?? selectionRequestHash({
|
|
27
|
+
input,
|
|
28
|
+
requirements: selection.requirements
|
|
29
|
+
});
|
|
30
|
+
const previous = repository.find(selection.conversationId, input.idempotencyKey);
|
|
31
|
+
if (previous) {
|
|
32
|
+
if (previous.requestHash !== hash) throw new Error("Idempotency key was reused with different input");
|
|
33
|
+
if (previous.taskId) {
|
|
34
|
+
const model = new TaskReadModelProjector().get(previous.taskId);
|
|
35
|
+
if (!model) throw new Error("Selected Task no longer exists");
|
|
36
|
+
const run = new TaskRunRepository().getActiveRoot(previous.taskId);
|
|
37
|
+
if (previous.status === "start_failed") return {
|
|
38
|
+
ok: false,
|
|
39
|
+
reason: "invalid_transition",
|
|
40
|
+
model
|
|
41
|
+
};
|
|
42
|
+
return previous.status === "start_blocked" ? {
|
|
43
|
+
ok: false,
|
|
44
|
+
reason: "blocked",
|
|
45
|
+
model
|
|
46
|
+
} : {
|
|
47
|
+
ok: true,
|
|
48
|
+
model,
|
|
49
|
+
...run ? { runId: run.id } : {}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
throw new Error("Previous selection attempt was rejected; use a new attempt key");
|
|
53
|
+
}
|
|
54
|
+
const assessment = assessSpecialist(input.delegateAgentId, selection.requirements, selection.context);
|
|
55
|
+
assertSpecialistEligible(assessment);
|
|
56
|
+
const record = repository.create({
|
|
57
|
+
conversationId: selection.conversationId,
|
|
58
|
+
key: input.idempotencyKey,
|
|
59
|
+
requestHash: hash,
|
|
60
|
+
requirements: selection.requirements,
|
|
61
|
+
assessment,
|
|
62
|
+
candidates: selection.candidates,
|
|
63
|
+
source: selection.source,
|
|
64
|
+
reason: selection.reason,
|
|
65
|
+
previousSelectionId: selection.previousSelectionId,
|
|
66
|
+
status: "task_linked"
|
|
67
|
+
});
|
|
68
|
+
const result = new TaskApplicationService().create(input, actor);
|
|
69
|
+
repository.link(record.id, {
|
|
70
|
+
taskId: result.model?.task.id,
|
|
71
|
+
runId: result.ok ? result.runId : void 0,
|
|
72
|
+
status: result.ok === false ? result.reason === "blocked" ? "start_blocked" : "start_failed" : "task_linked",
|
|
73
|
+
reasonCode: result.ok === false ? result.reason : void 0
|
|
74
|
+
});
|
|
75
|
+
afterSqliteCommit(() => log.info({
|
|
76
|
+
selectionId: record.id,
|
|
77
|
+
conversationId: selection.conversationId,
|
|
78
|
+
agentId: assessment.id,
|
|
79
|
+
taskId: result.model?.task.id,
|
|
80
|
+
phase: "delegate",
|
|
81
|
+
reasonCode: result.ok === false ? result.reason : "task_linked"
|
|
82
|
+
}, "Specialist selection recorded"));
|
|
83
|
+
return result;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { assertSpecialistEligible, createSelectedTask };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpecialistProfileSchema, SpecialistTaskRequirementsSchema, normalizeSpecialistRequirements } from "../../packages/gateway-contract/src/specialists.js";
|
|
2
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
+
//#region src/agent-matching/schema.ts
|
|
4
|
+
init_src();
|
|
5
|
+
//#endregion
|
|
6
|
+
export { SpecialistProfileSchema, SpecialistTaskRequirementsSchema, normalizeSpecialistRequirements };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { SpecialistAssessment } from './service.js';
|
|
2
|
+
import type { SpecialistTaskRequirements } from './schema.js';
|
|
3
|
+
export type SelectionStatus = 'pending_connection' | 'rejected' | 'task_linked' | 'start_blocked' | 'start_failed';
|
|
4
|
+
export interface SelectionRecord {
|
|
5
|
+
id: string;
|
|
6
|
+
conversationId: string;
|
|
7
|
+
taskId?: string;
|
|
8
|
+
taskRunId?: string;
|
|
9
|
+
personalRequestId?: string;
|
|
10
|
+
decisionGroupId: string;
|
|
11
|
+
previousSelectionId?: string;
|
|
12
|
+
idempotencyKey: string;
|
|
13
|
+
requestHash: string;
|
|
14
|
+
selectedAgentId: string;
|
|
15
|
+
requirements: SpecialistTaskRequirements;
|
|
16
|
+
assessment: SpecialistAssessment;
|
|
17
|
+
candidates?: Array<Pick<SpecialistAssessment, 'id' | 'revision' | 'eligibility' | 'checks' | 'matched' | 'missing'>>;
|
|
18
|
+
selectionSource: 'snapshot' | 'match' | 'explicit' | 'legacy';
|
|
19
|
+
selectionReason: string;
|
|
20
|
+
reasonSource: 'model' | 'system';
|
|
21
|
+
status: SelectionStatus;
|
|
22
|
+
reasonCode?: string;
|
|
23
|
+
createdAt: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function selectionRequestHash(value: unknown): string;
|
|
26
|
+
export declare class AgentSelectionRepository {
|
|
27
|
+
find(conversationId: string, key: string): SelectionRecord | undefined;
|
|
28
|
+
list(conversationId: string, filter?: {
|
|
29
|
+
taskId?: string;
|
|
30
|
+
requestId?: string;
|
|
31
|
+
offset?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
}): SelectionRecord[];
|
|
34
|
+
create(input: {
|
|
35
|
+
conversationId: string;
|
|
36
|
+
key: string;
|
|
37
|
+
requestHash: string;
|
|
38
|
+
requirements: SpecialistTaskRequirements;
|
|
39
|
+
assessment: SpecialistAssessment;
|
|
40
|
+
source: SelectionRecord['selectionSource'];
|
|
41
|
+
reason?: string;
|
|
42
|
+
reasonSource?: SelectionRecord['reasonSource'];
|
|
43
|
+
candidates?: SelectionRecord['candidates'];
|
|
44
|
+
previousSelectionId?: string;
|
|
45
|
+
requestId?: string;
|
|
46
|
+
status: SelectionStatus;
|
|
47
|
+
}): SelectionRecord;
|
|
48
|
+
link(id: string, result: {
|
|
49
|
+
taskId?: string;
|
|
50
|
+
runId?: string;
|
|
51
|
+
status: SelectionStatus;
|
|
52
|
+
reasonCode?: string;
|
|
53
|
+
}): void;
|
|
54
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
|
|
3
|
+
import { getSessionInputState, init_session_input_repository } from "../storage/sqlite/session-input-repository.js";
|
|
4
|
+
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
5
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
6
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
7
|
+
//#region src/agent-matching/selection-repository.ts
|
|
8
|
+
init_transaction();
|
|
9
|
+
init_sqlite();
|
|
10
|
+
init_session_input_repository();
|
|
11
|
+
init_session_instance_repository();
|
|
12
|
+
function decode(row) {
|
|
13
|
+
return {
|
|
14
|
+
id: row.id,
|
|
15
|
+
conversationId: row.conversation_id,
|
|
16
|
+
taskId: row.task_id ?? void 0,
|
|
17
|
+
taskRunId: row.task_run_id ?? void 0,
|
|
18
|
+
personalRequestId: row.personal_request_id ?? void 0,
|
|
19
|
+
decisionGroupId: row.decision_group_id,
|
|
20
|
+
previousSelectionId: row.previous_selection_id ?? void 0,
|
|
21
|
+
idempotencyKey: row.idempotency_key,
|
|
22
|
+
requestHash: row.request_hash,
|
|
23
|
+
selectedAgentId: row.selected_agent_id,
|
|
24
|
+
requirements: JSON.parse(row.requirements_json),
|
|
25
|
+
assessment: JSON.parse(row.assessment_json),
|
|
26
|
+
candidates: row.candidates_json ? JSON.parse(row.candidates_json) : void 0,
|
|
27
|
+
selectionSource: row.selection_source,
|
|
28
|
+
selectionReason: row.selection_reason,
|
|
29
|
+
reasonSource: row.reason_source,
|
|
30
|
+
status: row.status,
|
|
31
|
+
reasonCode: row.reason_code ?? void 0,
|
|
32
|
+
createdAt: row.created_at
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function selectionRequestHash(value) {
|
|
36
|
+
const normalize = (input) => Array.isArray(input) ? input.map(normalize) : input && typeof input === "object" ? Object.fromEntries(Object.entries(input).filter(([, v]) => v !== void 0).sort(([a], [b]) => a.localeCompare(b)).map(([key, item]) => [key, normalize(item)])) : input;
|
|
37
|
+
return createHash("sha256").update(JSON.stringify(normalize(value))).digest("hex");
|
|
38
|
+
}
|
|
39
|
+
var AgentSelectionRepository = class {
|
|
40
|
+
find(conversationId, key) {
|
|
41
|
+
const row = getSqliteDatabase().prepare("SELECT * FROM agent_selection_records WHERE conversation_id = ? AND idempotency_key = ?").get(conversationId, key);
|
|
42
|
+
return row && decode(row);
|
|
43
|
+
}
|
|
44
|
+
list(conversationId, filter = {}) {
|
|
45
|
+
const clauses = ["conversation_id = ?"];
|
|
46
|
+
const args = [conversationId];
|
|
47
|
+
if (filter.taskId) {
|
|
48
|
+
clauses.push("task_id = ?");
|
|
49
|
+
args.push(filter.taskId);
|
|
50
|
+
}
|
|
51
|
+
if (filter.requestId) {
|
|
52
|
+
clauses.push("personal_request_id = ?");
|
|
53
|
+
args.push(filter.requestId);
|
|
54
|
+
}
|
|
55
|
+
return getSqliteDatabase().prepare(`SELECT * FROM agent_selection_records WHERE ${clauses.join(" AND ")}
|
|
56
|
+
ORDER BY created_at DESC, id DESC LIMIT ? OFFSET ?`).all(...args, Math.min(100, Math.max(1, filter.limit ?? 20)), Math.max(0, filter.offset ?? 0)).map(decode);
|
|
57
|
+
}
|
|
58
|
+
create(input) {
|
|
59
|
+
const existing = this.find(input.conversationId, input.key);
|
|
60
|
+
if (existing) {
|
|
61
|
+
if (existing.requestHash !== input.requestHash) throw new Error("Idempotency key was reused with different input");
|
|
62
|
+
return existing;
|
|
63
|
+
}
|
|
64
|
+
const db = getSqliteDatabase();
|
|
65
|
+
if (!getSessionMetadata(input.conversationId)) throw new Error("Selection conversation not found");
|
|
66
|
+
const previous = input.previousSelectionId ? db.prepare("SELECT * FROM agent_selection_records WHERE id = ? AND conversation_id = ?").get(input.previousSelectionId, input.conversationId) : void 0;
|
|
67
|
+
if (input.previousSelectionId && !previous) throw new Error("Previous selection does not belong to this conversation");
|
|
68
|
+
const id = randomUUID();
|
|
69
|
+
const now = Date.now();
|
|
70
|
+
db.prepare(`INSERT INTO agent_selection_records(id, conversation_id, transcript_id, input_id,
|
|
71
|
+
personal_request_id, decision_group_id, previous_selection_id, idempotency_key, request_hash,
|
|
72
|
+
selected_agent_id, selected_agent_revision, matcher_version, catalog_revision, requirements_json,
|
|
73
|
+
selected_profile_json, assessment_json, candidates_json, selection_source, reason_source, selection_reason, status, reason_code, created_at, updated_at)
|
|
74
|
+
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`).run(id, input.conversationId, readCurrentTranscriptId(db, input.conversationId) ?? null, getSessionInputState(input.conversationId).activeInputId ?? null, input.requestId ?? null, previous?.decision_group_id ?? id, previous?.id ?? null, input.key, input.requestHash, input.assessment.id, input.assessment.revision ?? null, input.assessment.matcherVersion, input.assessment.catalogRevision, JSON.stringify(input.requirements), input.assessment.specialistProfile ? JSON.stringify(input.assessment.specialistProfile) : null, JSON.stringify(input.assessment), input.candidates ? JSON.stringify(input.candidates.slice(0, 10)) : null, input.source, input.reasonSource ?? (input.reason ? "model" : "system"), (input.reason ?? "Legacy delegation; selected Agent revalidated").slice(0, 500), input.status, input.status === "rejected" ? input.assessment.checks.find((check) => check.state === "blocked" || check.state === "unknown")?.reasonCode ?? "unavailable" : null, now, now);
|
|
75
|
+
return this.find(input.conversationId, input.key);
|
|
76
|
+
}
|
|
77
|
+
link(id, result) {
|
|
78
|
+
getSqliteDatabase().prepare(`UPDATE agent_selection_records SET task_id = COALESCE(?, task_id),
|
|
79
|
+
task_run_id = COALESCE(?, task_run_id), status = ?, reason_code = ?, updated_at = ? WHERE id = ?`).run(result.taskId ?? null, result.runId ?? null, result.status, result.reasonCode ?? null, Date.now(), id);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { AgentSelectionRepository, selectionRequestHash };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type EffectiveAgentConfig } from '../agent-config/index.js';
|
|
2
|
+
import type { Config } from '../config/schema.js';
|
|
3
|
+
import { type SpecialistTaskRequirements } from './schema.js';
|
|
4
|
+
export declare const MATCHER_VERSION = 1;
|
|
5
|
+
export type Eligibility = 'eligible' | 'needs_verification' | 'blocked';
|
|
6
|
+
export interface AvailabilityCheck {
|
|
7
|
+
condition: string;
|
|
8
|
+
state: 'verified' | 'configured' | 'unknown' | 'blocked';
|
|
9
|
+
reasonCode: string;
|
|
10
|
+
detail?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MatchingContext {
|
|
13
|
+
ownAgentId: string;
|
|
14
|
+
getConfig?: () => Config | undefined;
|
|
15
|
+
getAgentSkillAvailability?: (agentId: string) => {
|
|
16
|
+
skills: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
availableForCurrentAgent: boolean;
|
|
19
|
+
unavailableReason?: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
legacyToolPolicyOnly?: boolean;
|
|
23
|
+
getAgentToolAvailability?: (agentId: string, tool: string) => AvailabilityCheck;
|
|
24
|
+
checkConnector?: (agentId: string, connector: NonNullable<SpecialistTaskRequirements['connector']>) => AvailabilityCheck;
|
|
25
|
+
}
|
|
26
|
+
export interface SpecialistAssessment {
|
|
27
|
+
id: string;
|
|
28
|
+
revision?: number;
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
profileSource: 'declared' | 'legacy';
|
|
32
|
+
specialistProfile?: EffectiveAgentConfig['specialistProfile'];
|
|
33
|
+
availableTools: string[];
|
|
34
|
+
model: {
|
|
35
|
+
available: boolean;
|
|
36
|
+
reason?: string;
|
|
37
|
+
};
|
|
38
|
+
verifiedSkills: string[];
|
|
39
|
+
eligibility: Eligibility;
|
|
40
|
+
checks: AvailabilityCheck[];
|
|
41
|
+
matched: string[];
|
|
42
|
+
missing: string[];
|
|
43
|
+
catalogRevision: number;
|
|
44
|
+
checkedAt: number;
|
|
45
|
+
matcherVersion: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function assessSpecialist(agentId: string, input: SpecialistTaskRequirements, context: MatchingContext): SpecialistAssessment;
|
|
48
|
+
export declare function matchSpecialists(input: SpecialistTaskRequirements, context: MatchingContext, options?: {
|
|
49
|
+
cursor?: string;
|
|
50
|
+
limit?: number;
|
|
51
|
+
}): {
|
|
52
|
+
nextCursor?: string;
|
|
53
|
+
matcherVersion: number;
|
|
54
|
+
catalogRevision: number;
|
|
55
|
+
checkedAt: number;
|
|
56
|
+
total: number;
|
|
57
|
+
candidates: SpecialistAssessment[];
|
|
58
|
+
};
|
|
59
|
+
export declare function listSpecialistSummaries(context: MatchingContext): {
|
|
60
|
+
nextCursor?: string;
|
|
61
|
+
matcherVersion: number;
|
|
62
|
+
catalogRevision: number;
|
|
63
|
+
checkedAt: number;
|
|
64
|
+
total: number;
|
|
65
|
+
candidates: SpecialistAssessment[];
|
|
66
|
+
};
|
|
67
|
+
/** Cheap snapshot projection; configuration is not proof of runtime tool readiness. */
|
|
68
|
+
export declare function summarizeSpecialist(config: EffectiveAgentConfig, context: Pick<MatchingContext, 'getConfig'>): {
|
|
69
|
+
domains: string[];
|
|
70
|
+
taskTypes: string[];
|
|
71
|
+
outputKinds: string[];
|
|
72
|
+
specialties: string[];
|
|
73
|
+
id: string;
|
|
74
|
+
role: string;
|
|
75
|
+
tools: string[];
|
|
76
|
+
available: boolean;
|
|
77
|
+
toolEvidence: string;
|
|
78
|
+
} | {
|
|
79
|
+
profileSource: string;
|
|
80
|
+
id: string;
|
|
81
|
+
role: string;
|
|
82
|
+
tools: string[];
|
|
83
|
+
available: boolean;
|
|
84
|
+
toolEvidence: string;
|
|
85
|
+
};
|