@xopcai/xopc 0.0.441 → 0.0.443
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/README.zh-CN.md +1 -2
- package/dist/browser-ext/_locales/en/messages.json +0 -28
- package/dist/browser-ext/_locales/zh_CN/messages.json +0 -28
- package/dist/browser-ext/dist/assets/{sidepanel-CQeQB5vW.css → sidepanel-lpBGVKwZ.css} +0 -42
- package/dist/browser-ext/dist/background.js +247 -647
- package/dist/browser-ext/dist/sidepanel.html +2 -2
- package/dist/browser-ext/dist/sidepanel.js +105 -346
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-t5c6XavH.js → activity-store-CuPXAoLe.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CSTtf3RI.js → agent-avatar-dicebear-D92uHOFV.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-Cm0afn_O.js → agent-avatar-display-DINzeGs0.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BMbsLf16.js → agent-defaults-settings-panel-rH1QpgiR.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-DofyWKnP.js → agent-plugin-dialog-B2vXlrDW.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-admin-api-CewiIx4v.js → agents-admin-api-DPLtjJtX.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CAqwtADW.js → agents-lvQfOQPN.js} +3 -3
- package/dist/gateway/static/root/assets/{api-CE6gdBWx.js → api-CEzBruRJ.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DRyQFk9q.js → api-snfMD8_Y.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-CdD448kS.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BZfs2ydm.js → app-management-settings-panel-CONwDpqL.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BA7spRv6.js → appearance-settings-Bu7K-_ri.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-B0qorxfq.js → apps-page-C3iDd3ZQ.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CPCI6nqQ.js → archive-plugin-CfLz9o-2.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-paBg5ie6.js → automation-api-Dl9fi8t0.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-Ds-59DdX.js → automation-result-state-BjjZCxee.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-Crw5qn_I.js → automation-run-list-9IPHu_UC.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-CKbHMLSy.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-D3Cb5vfR.js → automations-page-BDHgk3CW.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-B7D9U89Z.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CFJCUpWH.js → binary-plugins-Bv4ixxo4.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DbG2QKd0.js → block-editor-CtaJSB9U.js} +1 -1
- package/dist/gateway/static/root/assets/browser-settings-page-CmBsnx24.js +8 -0
- package/dist/gateway/static/root/assets/{capabilities-DG0ckPuF.js → capabilities-DDJJhQ40.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-DJYgOjeq.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-CBqvHAyp.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-wjezs0OE.js +8 -0
- package/dist/gateway/static/root/assets/capability-icon-CmvCZOJX.js +1 -0
- package/dist/gateway/static/root/assets/{capability-links-DeO34GIF.js → capability-links-MZdYfPKx.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-OiT-5N_6.js → channels-D4q8hiD0.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-CTL8cwNk.js → chat-agents-api-BOB3dILf.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-Z41MRuzh.js → chat-chart-block-DsaCatBN.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-CAt7FyMT.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CEaFlZEs.js → chat-terminal-dock-D9o0nUEV.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-C3G6veE2.js → command-palette-api-Cj0_7g9o.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-Ccq_KF1W.js → composer-payload-handoff-CoDWKzBm.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CTkICYyM.js → computer-settings-page-DJ9BIOHC.js} +1 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-C5-3MDIj.js +1 -0
- package/dist/gateway/static/root/assets/connection-usage-BhdQRWgQ.js +1 -0
- package/dist/gateway/static/root/assets/connection-usage-guide-bD1sKiAp.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-C6yeCQWW.js → connector-service-page-BEq3i3Vi.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-HFW1Iey5.js → connectors-api-DEExP6a7.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-QVWuoxuK.js +1 -0
- package/dist/gateway/static/root/assets/constants-CsVXarqA.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-C_tweuM0.js → date-picker-D2whl8Ci.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-ChwjpnsG.js → desktop-pet-narrative-C8zQtMcw.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BAX0ZLyq.js → desktop-pet-qnIdmNnH.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BIIsWpW9.js → desktop-pet-settings-C54b1FY4.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-D4C_zjRq.js → dev-view-store-bryv5YRw.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-ZUE6wZ1X.js → device-pairing-wizard-Du-yOxZv.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CFb2VFW-.js → directory-picker-path-field-GsMkjw59.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-Bd4r2auZ.js → discussion-annotation-sync-CrpDiC7J.js} +1 -1
- package/dist/gateway/static/root/assets/earth-C9Z4bTTG.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DXGpnxwM.js → extension-debug-page-CDZfdMAR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-DTwDBQQ9.js → extension-iframe-host-CG70QWPS.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-Q6E4x8gu.js → extension-marketplace-api-D7Av-sOf.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BVBxNzys.js → extension-page-DpJTL6-v.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-D-Fa5PU-.js → extension-provider-BZTbdvCF.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-ycMuOpv3.js → extension-settings-page-CC4rmiFC.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-D62ph0m0.js → file-preview-surface-Dtla5oAW.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BW6eBLIt.js → gateway-config-swr-B5THNdYK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-Bg4Mf7HA.js → gateway-realtime-hnEaDFaA.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-ugwtyD4q.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-BzrJNB4Q.js → gateway-restart-kwv0njYq.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BOW90CER.js → gateway-settings-CxYPJTy8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DCjREMIO.js → gateway-startup-retry-CqtCJzWJ.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-myAmGZ2_.js → global-defaults-api-BQMdHLlp.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-eXW3llb0.js → home-page-CpbsTucI.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-CLkuZdsz.js → image-generation-api-G3tQFhif.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BFsLQu7n.js → imports-page-BmEqiunH.js} +1 -1
- package/dist/gateway/static/root/assets/index-CbhkKfcy.js +11 -0
- package/dist/gateway/static/root/assets/index-DE2bG5EI.css +1 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-CVjCFdly.js → install-connector-dialog-BU4l6KJv.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DdZfxLQb.js → keyboard-shortcuts-settings-CtNI6i7K.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-xV9a7McI.js → local-app-workbench-page-CE46mHc0.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-buwr_S_-.js → local-apps-page-DqZT5hLH.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-v7v7Hb6T.js → local-session-drafts-Bt_e3A8f.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DGtk-KSF.js → locale-store-Bld7_m-Q.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-D_VBpYkM.js → logs-page-CzajqK40.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BlRCdUF3.js → management-settings-BgdAP0kf.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-JXJ3e1CB.js → markdown-view-B3cFKCfO.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-DG8DDkEA.css +1 -0
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-Vr2dpowU.js → mcp-conversation-setup-page-ZcY1nqMO.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DcN8Y0hJ.js → media-plugins-DSOplRhW.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CGO1P4mz.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-zD2x0Sn6.js → model-selector-yAKlOR3O.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-DtZG5bA_.js → models-hub-cache-8V-ZpAIa.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-CVrfF6XL.js → note-detail-panel-DWIWloib.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-BbNYW2Rw.js +1 -0
- package/dist/gateway/static/root/assets/notes-api-CVQqqmGI.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-BOCURwg6.js → notes-page-DIugUbkV.js} +3 -3
- package/dist/gateway/static/root/assets/{oauth-api-DYNQAQBx.js → oauth-api-DGa6PTuq.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-BvV6SP0k.js → oauth-provider-connect-Bc-KLH1e.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-Dor5Y5Bf.js → page-context-capture-button-B9L7V_n2.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-B8DQ5lNT.js → page-context-draft-GveHK8e2.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-YZfSLNTg.js +1 -0
- package/dist/gateway/static/root/assets/palette-CDI0VweW.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-CF6T0aTT.js → personal-avatar-Cu8lGBXZ.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-Dah3dgRQ.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-BrQ94X_A.js → personal-settings-panel-awr10jTV.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-Zvbw-N0D.js → phone-dependencies-card-CAxn3usD.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-CQ4PhhE5.js → phone-model-connection-BBG3LxRP.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-BDBtemUm.js → phone-model-picker-CfPjKpnd.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-D2KXWcg1.js → phone-settings-page-C4dJdwRW.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-BhJAeHdQ.js → phone-workspace-store-BKltFHtG.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-DpPtI0sI.js → plugin-details-dialog-BqcFfZFH.js} +1 -1
- package/dist/gateway/static/root/assets/{popover-select-CEMWIrtY.js → popover-select-CLsphyzA.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-Bx26yGRF.js → preference-select-fields-QlyIA8ve.js} +1 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-CRsfuAXl.js +7 -0
- package/dist/gateway/static/root/assets/product-navigation-Dp-adLY_.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-DSWELoz0.js → product-open-page-CQ4dk-_l.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-DJb-OtMo.js → product-preview-content-CGbqoID0.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-DaQhXcev.js → product-preview-modal-0wvIDcVr.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-BHLOHrat.js → project-detail-page-VPcXR1YD.js} +2 -2
- package/dist/gateway/static/root/assets/{project-understanding-CjhVk8l-.js → project-understanding-CU2af95r.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-sVWDuzmC.js → projects-page-BsgZb6n9.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-gWGsgOOf.js → providers-api-CspehmSU.js} +1 -1
- package/dist/gateway/static/root/assets/recording-upload-BOZAOdCI.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CRxE9kFY.js → registry-api-Bdp3UUyz.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Bw__qp-v.js → remote-access-hub-Bos3uwAT.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-BaczkGfK.js → resource-unavailable-DJR3SCy6.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-Blmi-1Iq.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-ygfM5FCT.js → runtime-tools-api-DsbahxzE.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BWEK7BZS.js → runtime-tools-settings-panel-DW9_OFi2.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-C-jw6Hid.js → schema-form-CtRM41Re.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-DrgwXSEt.js → service-recommendation-list-Bd1JDO5T.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-CpZ24vrQ.js → session-api-DjnHJ-0n.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-CZyY5Y87.js → session-manager-ChHnJOWW.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-DgXRw0_8.js → sessions-page-BM-oqd22.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DyGT3o1e.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-DmCp3OWb.js → settings-advanced-section-CM44UlF8.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-BTqvr_Fw.js → settings-loading-skeleton-CAoOV17i.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-fZ6mzf4A.js → settings-mode-store-Blc4C8aw.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-SQwLKlTr.js → settings-page-CMSYmtOu.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-4d1u-o-F.js → settings-page-header-BYFaTD8a.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-Cy9_VBag.js → settings-page-layout-CnUQSxT3.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-OFU6DKgp.js → setup-interaction-page-DqaiLQ0I.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-KKAneNTe.js → setup-status-panel-iOYgfkoK.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-Apq3cegw.js → share-link-dialog-C_uYNUlp.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-B6yMj5nG.js → share-preview-page-CFebGqyB.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-Q5x_ty6F.js → shares-api-C2GDyqxP.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-vxTYg6Hp.js → shares-settings-B-7la3QN.js} +1 -1
- package/dist/gateway/static/root/assets/skeleton-DzdOeGYz.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-CBFXDh9m.js → skill-api-BnpTSZGc.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-C8tm-XxH.js → skill-list-api-7MY9ewiu.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-B-4Yj46U.js → skill-reload-api-DkDpu3Wd.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-sL2kGqHZ.js +2 -0
- package/dist/gateway/static/root/assets/sliding-tab-list-CmcrqRzN.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-a4mBz4J2.js → system-settings-panel-BltKPJdb.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-BuP1vEuu.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-DFiu5SlL.js → task-result-evidence-B1MHhqVR.js} +1 -1
- package/dist/gateway/static/root/assets/{tasks-DRmd6sWt.js → tasks-D_xuHn6V.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-BdOlpRkY.js → terminal-panel-store-DUEJoa1M.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-D58tk8pq.js → theme-store-DsvYj7Vy.js} +1 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-DEGpbye4.js +1 -0
- package/dist/gateway/static/root/assets/{tracing-settings-page-CO0-AiCl.js → tracing-settings-page-B_Xdc2VF.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DVRX9yW6.js → tunnel-api-B6BhWTh3.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-B_-648uj.js → understanding-activity-store-B7rFXhDk.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-BXJ-kwzq.js → understanding-refresh-store-DCFASve5.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-C76JnWR8.js → usage-page-DqzosTxy.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-xytwr7Lc.js → use-autosave-DsqcLHV9.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-Brdrrzrp.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-9DED7ohY.js +2 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-BXHU0P8I.js → use-personal-profile-T2e6P5Ed.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-CiLbOQHQ.js → use-workspace-tree-Dq0qgK3N.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-Ziz55hVM.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-Dn092u0X.js → voice-api-key-field-D7NPAc1E.js} +1 -1
- package/dist/gateway/static/root/assets/voice-call-context-CJ1ZiJWR.js +1 -0
- package/dist/gateway/static/root/assets/{voice-config-api-fqUzP-ZY.js → voice-config-api-UQDTh6hh.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-D7QdPeuj.js → voice-input-shortcut-events-SD2gZVg8.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-NpNY_gsE.js → voice-transcribe-api-Bf9FaI-p.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BARpCMZl.js → work-discovery-overlay-B41GOFXh.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-p0aVb8xr.js → work-discovery-page-NNhExALx.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-7G-6icvh.js → working-directory-picker-modal-DeNWVFFK.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-BKbezgv-.js → workspace-api-DrVss2Fd.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CmSYxTmk.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-CS8-ZbVG.js → workspace-file-preview-dialog-C2egBzza.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-BQrTy-8o.js → workspace-open-location-menu-XFUtwfLY.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-Bc5rXL-E.js → xopc-cloud-account-card-BlhFT1q9.js} +1 -1
- package/dist/gateway/static/root/index.html +98 -101
- package/dist/package.js +1 -1
- package/dist/packages/browser-control-contract/src/dom.js +79 -0
- package/dist/packages/browser-control-contract/src/index.js +2 -25
- package/dist/packages/gateway-contract/src/automations.js +0 -6
- package/dist/packages/gateway-contract/src/task-research-result.js +1 -0
- package/dist/packages/gateway-contract/src/tasks.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +0 -1
- package/dist/src/agent/agent-manager.js +0 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +2 -1
- package/dist/src/agent/external-tools/index.d.ts +1 -1
- package/dist/src/agent/service.js +0 -1
- package/dist/src/agent/service.types.d.ts +0 -1
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -1
- package/dist/src/agent/tool-manuals/browser.js +0 -3
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +3 -0
- package/dist/src/agent/tools/factory.d.ts +0 -2
- package/dist/src/agent/tools/factory.js +1 -2
- package/dist/src/agent/tools/find.d.ts +1 -1
- package/dist/src/agent/tools/grep.d.ts +1 -1
- package/dist/src/agent/tools/index.d.ts +0 -1
- package/dist/src/agent/tools/index.js +1 -2
- package/dist/src/agent/tools/metadata.d.ts +1 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +2 -2
- package/dist/src/agent/tools/personal-request-tool.js +4 -1
- package/dist/src/agent/tools/personal-task-tool.d.ts +1 -0
- package/dist/src/agent/tools/personal-task-tool.js +4 -0
- package/dist/src/agent/tools/xopc-use-tool.js +10 -1
- package/dist/src/auth/oauth/anthropic.d.ts +1 -7
- package/dist/src/auth/oauth/anthropic.js +6 -83
- package/dist/src/auth/oauth/index.d.ts +0 -2
- package/dist/src/auth/oauth/index.js +2 -6
- package/dist/src/auth/oauth/kimi-coding.d.ts +1 -6
- package/dist/src/auth/oauth/kimi-coding.js +5 -79
- package/dist/src/auth/oauth/openai.js +1 -1
- package/dist/src/auth/oauth/pi-oauth-adapter.d.ts +4 -0
- package/dist/src/auth/oauth/pi-oauth-adapter.js +53 -0
- package/dist/src/auth/oauth/registry.js +0 -9
- package/dist/src/automations/capabilities/write.d.ts +6 -18
- package/dist/src/automations/domain/defaults.d.ts +0 -1
- package/dist/src/automations/domain/defaults.js +2 -3
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/types.d.ts +0 -26
- package/dist/src/automations/domain/validation.d.ts +12 -36
- package/dist/src/automations/domain/validation.js +0 -7
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -7
- package/dist/src/automations/draft/automation-draft-validator.js +0 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.d.ts +0 -1
- package/dist/src/automations/service/action-executor.js +0 -31
- package/dist/src/automations/service/automation-service.d.ts +0 -1
- package/dist/src/automations/service/automation-service.js +1 -13
- package/dist/src/browser/drivers/playwright-driver.js +1 -2
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/cli/commands/connectors.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/config/models-json.d.ts +24 -24
- package/dist/src/endpoint-tools/policy.js +3 -4
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -16
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/next-turn-suggestions/snapshot.js +11 -3
- package/dist/src/gateway/security/gateway-scopes.js +0 -2
- package/dist/src/gateway/service.d.ts +0 -3
- package/dist/src/gateway/service.js +2 -17
- package/dist/src/home-intelligence/application-service.js +1 -1
- package/dist/src/personal-agent/communication.d.ts +1 -1
- package/dist/src/personal-agent/communication.js +2 -2
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-style.d.ts +2 -2
- package/dist/src/personal-agent/reply-style.js +12 -0
- package/dist/src/personal-agent/request-delivery.js +1 -5
- package/dist/src/personal-agent/request-repository.d.ts +1 -0
- package/dist/src/personal-agent/request-service.d.ts +1 -0
- package/dist/src/personal-agent/request-service.js +12 -3
- package/dist/src/personal-agent/request-verification.d.ts +6 -0
- package/dist/src/personal-agent/request-verification.js +22 -0
- package/dist/src/providers/domestic-presets.d.ts +2 -310
- package/dist/src/providers/domestic-presets.js +2 -396
- package/dist/src/providers/env-keys.js +2 -6
- package/dist/src/providers/index.js +6 -13
- package/dist/src/providers/presentation.js +4 -6
- package/dist/src/providers/setup/profiles.js +1 -2
- package/dist/src/storage/sqlite/schema.sql +0 -81
- package/dist/src/tasks/home-query-service.js +0 -1
- package/dist/src/tasks/task-allocation-service.js +4 -2
- package/dist/src/tasks/task-application-service.js +4 -1
- package/dist/src/tasks/task-context-assembler.js +3 -1
- package/dist/src/tasks/task-contract-definition.d.ts +1 -0
- package/dist/src/tasks/task-contract-planner.js +3 -0
- package/dist/src/tasks/task-main-update-decision-service.js +7 -7
- package/dist/src/tasks/task-main-update-delivery.js +15 -2
- package/dist/src/tasks/task-repository.js +1 -1
- package/dist/src/tasks/task-research-repair.d.ts +1 -0
- package/dist/src/tasks/task-research-repair.js +3 -1
- package/dist/src/tasks/task-research-result.js +19 -1
- package/dist/src/tasks/task-run-coordinator.js +12 -9
- package/package.json +8 -8
- package/dist/gateway/static/root/assets/app-link-DRy3-k7j.js +0 -1
- package/dist/gateway/static/root/assets/arrow-up-right-T72JbQ1Q.js +0 -1
- package/dist/gateway/static/root/assets/automation-task-card-BecBULES.js +0 -3
- package/dist/gateway/static/root/assets/automations-workspace-BBSTBucV.js +0 -9
- package/dist/gateway/static/root/assets/book-open-CCGtrT3R.js +0 -1
- package/dist/gateway/static/root/assets/browser-automation-inputs-DADzEaqe.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-V7_ZTcyU.js +0 -3
- package/dist/gateway/static/root/assets/browser-control-api-Bdr2nGCE.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-irOt8KDh.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-CrAs-oqU.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-CJLVUcD4.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D8t5F998.js +0 -8
- package/dist/gateway/static/root/assets/capability-icon-DVoZxEgW.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-DBAezT9u.js +0 -72
- package/dist/gateway/static/root/assets/connected-providers-grid-CpO98SqR.js +0 -1
- package/dist/gateway/static/root/assets/connection-usage-Cm_McddI.js +0 -1
- package/dist/gateway/static/root/assets/connection-usage-guide-DOf2VWzv.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Cbn4LSpC.js +0 -1
- package/dist/gateway/static/root/assets/constants-DBtMsXdW.js +0 -1
- package/dist/gateway/static/root/assets/earth-BMhZtzcj.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-xYMxjztG.js +0 -1
- package/dist/gateway/static/root/assets/index-CKIirf4W.css +0 -1
- package/dist/gateway/static/root/assets/index-CQ570IAI.js +0 -11
- package/dist/gateway/static/root/assets/markdown-view-C-DHb3Io.css +0 -1
- package/dist/gateway/static/root/assets/messages-DYDySzn1.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-V4rmgfLB.js +0 -1
- package/dist/gateway/static/root/assets/notes-api-UXC3eyeM.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-f8XcAs9b.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-DUykELZZ.js +0 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-_K6grEOt.js +0 -7
- package/dist/gateway/static/root/assets/product-navigation-Co8pLbDP.js +0 -1
- package/dist/gateway/static/root/assets/recording-upload-CBefH7C5.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-Coy9Gjyy.js +0 -2
- package/dist/gateway/static/root/assets/settings-advanced-gate-Ch9MNvvk.js +0 -1
- package/dist/gateway/static/root/assets/skeleton-BI5TyibZ.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-Xbnh0-6I.js +0 -2
- package/dist/gateway/static/root/assets/sliding-tab-list-DuQyViqe.js +0 -1
- package/dist/gateway/static/root/assets/star-BUWJqJ5c.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-B9akf3i8.js +0 -3
- package/dist/gateway/static/root/assets/tool-friendly-title-DcCc6g7o.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-fK2PUQbB.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-ivMxmMu1.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-BzpV1hq_.js +0 -2
- package/dist/gateway/static/root/assets/video-B6V0GFss.js +0 -1
- package/dist/gateway/static/root/assets/voice-call-context-BM2A4bLz.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CODAQqJn.js +0 -1
- package/dist/packages/browser-control-contract/src/automation.js +0 -213
- package/dist/src/agent/tools/browser-automation-tool.d.ts +0 -194
- package/dist/src/agent/tools/browser-automation-tool.js +0 -243
- package/dist/src/auth/oauth/minimax-cn.d.ts +0 -11
- package/dist/src/auth/oauth/minimax-cn.js +0 -95
- package/dist/src/auth/oauth/minimax.d.ts +0 -8
- package/dist/src/auth/oauth/minimax.js +0 -95
- package/dist/src/browser/automations/index.d.ts +0 -4
- package/dist/src/browser/automations/index.js +0 -4
- package/dist/src/browser/automations/repository.d.ts +0 -17
- package/dist/src/browser/automations/repository.js +0 -81
- package/dist/src/browser/automations/runner.d.ts +0 -17
- package/dist/src/browser/automations/runner.js +0 -265
- package/dist/src/browser/automations/runtime-service.d.ts +0 -8
- package/dist/src/browser/automations/runtime-service.js +0 -38
- package/dist/src/browser/automations/schema.d.ts +0 -227
- package/dist/src/browser/automations/schema.js +0 -201
- package/dist/src/browser/automations/service.d.ts +0 -232
- package/dist/src/browser/automations/service.js +0 -214
- package/dist/src/browser/automations/types.d.ts +0 -105
- package/dist/src/browser/automations/types.js +0 -1
- package/dist/src/browser/recordings/service.d.ts +0 -22
- package/dist/src/browser/recordings/service.js +0 -159
- package/dist/src/gateway/hono/routes/browser-automations.d.ts +0 -3
- package/dist/src/gateway/hono/routes/browser-automations.js +0 -93
- package/dist/src/gateway/hono/routes/browser-recordings.d.ts +0 -3
- package/dist/src/gateway/hono/routes/browser-recordings.js +0 -78
- package/dist/browser-ext/dist/assets/{page-context-DngcqfGf.js → auth-DAIwDtVp.js} +1368 -1368
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const browserUseManual = "# Browser Tool Manual\n\n## browser_use\n\nUse one typed action per call. Start with `observe` or `navigate`. Every observation returns a `sessionId`, `revision`, and semantic element refs. Element actions must use refs from the newest revision; never invent refs.\n\nAvailable actions:\n\n- `observe`: return URL, title, interactive semantic nodes, and changes. Set `visual` to `always` only when visual evidence is needed.\n- `navigate`: open an HTTP(S) URL and optionally verify an expectation.\n- `click`, `fill`, `select`: act on a semantic ref with its observation revision.\n- `press`, `scroll`: act on an optional ref or the active page.\n- `wait`: wait for page idle, text, or a ref visibility state.\n- `upload`: attach workspace files to a file input.\n- `tabs`: list, create, activate, or close task-owned tabs.\n- `sequence`: run a short list of same-document ref actions.\n- `close`: close the task-owned browser session.\n\nThe tool does not accept CSS, XPath, JavaScript, cookie, storage, or network-inspection commands. Re-observe after navigation or a stale-observation response. Browser actions execute directly under the configured allow/deny policy. Sensitive fields expose only their semantic identity and values are redacted.\n\n
|
|
1
|
+
export declare const browserUseManual = "# Browser Tool Manual\n\n## browser_use\n\nUse one typed action per call. Start with `observe` or `navigate`. Every observation returns a `sessionId`, `revision`, and semantic element refs. Element actions must use refs from the newest revision; never invent refs.\n\nAvailable actions:\n\n- `observe`: return URL, title, interactive semantic nodes, and changes. Set `visual` to `always` only when visual evidence is needed.\n- `navigate`: open an HTTP(S) URL and optionally verify an expectation.\n- `click`, `fill`, `select`: act on a semantic ref with its observation revision.\n- `press`, `scroll`: act on an optional ref or the active page.\n- `wait`: wait for page idle, text, or a ref visibility state.\n- `upload`: attach workspace files to a file input.\n- `tabs`: list, create, activate, or close task-owned tabs.\n- `sequence`: run a short list of same-document ref actions.\n- `close`: close the task-owned browser session.\n\nThe tool does not accept CSS, XPath, JavaScript, cookie, storage, or network-inspection commands. Re-observe after navigation or a stale-observation response. Browser actions execute directly under the configured allow/deny policy. Sensitive fields expose only their semantic identity and values are redacted.\n\n";
|
|
@@ -19,9 +19,6 @@ Available actions:
|
|
|
19
19
|
|
|
20
20
|
The tool does not accept CSS, XPath, JavaScript, cookie, storage, or network-inspection commands. Re-observe after navigation or a stale-observation response. Browser actions execute directly under the configured allow/deny policy. Sensitive fields expose only their semantic identity and values are redacted.
|
|
21
21
|
|
|
22
|
-
## browser_automation
|
|
23
|
-
|
|
24
|
-
Reusable browser automations are strict JSON. They use semantic \`role\` plus \`name\` or \`nameIncludes\` targets and an exact \`allowedDomains\` list. Input templates use \`\${input.name}\`. Save a draft, validate it, then run/test that exact saved revision when the user requests execution or testing. Never repeat a write merely to verify a recording. Only successful runs with explicit successCriteria mark a revision verified; never store passwords, one-time codes, recovery codes, or payment details.
|
|
25
22
|
`;
|
|
26
23
|
//#endregion
|
|
27
24
|
export { browserUseManual };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const xopcUseManual = "# XOPC Use Tool Manual\n\n## Purpose\n\n`xopc_use` operates first-class XOPC product objects without editing SQLite or product files directly.\nLoad this manual before a non-trivial mutation. For focused configuration workflows use\n`tool_manual({tool:\"xopc_use\",topic:\"agent|settings|automation|connections\"})`.\nFor identity-only changes prefer `agent patch_profile {id,expectedRevision,patch,idempotencyKey?}`,\nwhich preserves omitted profile fields. Existing update keeps replacement semantics for profile.\n\n```json\n{\n \"mode\": \"agent | project | automation | note | task | task_run | chat_preview | local_app | settings\",\n \"command\": \"...\",\n \"args\": {},\n \"dryRun\": false\n}\n```\n\nSend one object command per call. Inspect the returned JSON `ok` field; a tool call can\ncomplete successfully while the product command returns `ok: false`.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\n| Agent definition and default Agent | `xopc_use` mode `agent` |\n| Project, milestone, project update | `xopc_use` mode `project` |\n| Automation | `xopc_use` mode `automation` |\n| Task intent and lifecycle | `xopc_use` mode `task` |\n| Task execution attempt, receipt, events and waits | `xopc_use` mode `task_run` |\n| Note | `xopc_use` mode `note` |\n| Lightweight UI preview | `xopc_use` mode `chat_preview` |\n| Local app | `xopc_use` mode `local_app` |\n| Settings jump target | `xopc_use` mode `settings` |\n| Session, memory, skill, connected app or workspace file | its dedicated tool |\n\nA Task is durable intent; a TaskRun is one execution attempt.\n\n## Agents\n\nCommands: `list`, `get`, `create`, `update`, `set_default`, `disable`,\n`delete`, and `purge`.\n\nAn Agent profile stores `name` and optional `description`, `creature`, `style`, `language`,\n`emoji`, and `avatar` identity fields. Use `instructions` for short execution rules.\nPut personality in SOUL.md and ongoing work guidance in AGENTS.md.\n\n```json\n{\n \"mode\": \"agent\",\n \"command\": \"create\",\n \"args\": {\n \"id\": \"xiaomei\",\n \"profile\": {\n \"name\": \"\u5C0F\u7F8E\",\n \"description\": \"\u5E2E\u52A9\u6574\u7406\u65E5\u5E38\u4E8B\u9879\",\n \"language\": \"zh-CN\",\n \"style\": \"\u6E29\u67D4\u3001\u4EB2\u5207\",\n \"instructions\": \"\u7ED9\u51FA\u64CD\u4F5C\u5EFA\u8BAE\u524D\u5148\u6838\u5BF9\u5173\u952E\u4E8B\u5B9E\u3002\"\n },\n \"idempotencyKey\": \"create-agent-xiaomei\"\n }\n}\n```\n\nUse `list` before creating an Agent so an existing id is updated rather than duplicated.\nMutations other than `create` require the current `expectedRevision`; `set_default` uses\nthe catalog revision returned by `list`. `delete` preserves on-disk data, while `purge`\nalso removes it. Use `dryRun: true` to validate the exact same input contract without writing.\n\n## Reliable protocol\n\n1. Use `list` then `get` when an id is unknown.\n2. Read the current `version` before a Task mutation.\n3. Use `dryRun: true` for broad Project changes or uncertain mutations.\n4. Mutate once with the exact id and current concurrency token.\n5. Verify the returned object and preserve any \u201COpen in xopc\u201D delivery link.\n6. On a conflict, read again and reconsider the operation; do not blindly retry.\n\nTimestamps are Unix epoch milliseconds. Array fields are arrays of strings. Omission\npreserves a patchable field; an empty array intentionally clears it. Prefer explicit\n`projectId`, `taskId`, `runId`, `noteId`, and `localAppId` fields over `id`.\n\n## Projects\n\nCommands: `list`, `get`, `create`, `update`, `resolve_workspace`,\n`list_milestones`, `create_milestone`, `update_milestone`, `list_updates`,\nand `create_update`.\n\nProject statuses: `planned`, `active`, `paused`, `completed`, `cancelled`,\n`archived`. Health values: `unknown`, `on_track`, `at_risk`, `off_track`.\n\nA Project defines bounded shared context for related work. Its durable planning fields are `outcome`,\n`successCriteria`, `scope`, `nonGoals`, `ownerId`, `targetAt`, and `health`.\nUse `brief` for a concise description and `instructions` for durable operating guidance.\n\n### Create\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"AI Product Research\",\n \"outcome\": \"Choose a validated product direction\",\n \"successCriteria\": [\"Ten customer interviews\", \"Decision recorded\"],\n \"scope\": { \"market\": \"developer tools\" },\n \"nonGoals\": [\"Build the production product\"],\n \"health\": \"on_track\",\n \"targetAt\": 1760000000000,\n \"workspaceRoot\": \"/path/to/repo\"\n }\n}\n```\n\n### Update\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"status\": \"active\",\n \"health\": \"at_risk\",\n \"successCriteria\": [\"Ten interviews\", \"Evidence-backed decision\"]\n }\n}\n```\n\n### Resolve a workspace\n\nUse `autoCreate: false` for lookup. Set it to true only when creating a Project is authorized.\n\n```json\n{ \"mode\": \"project\", \"command\": \"resolve_workspace\", \"args\": { \"workspacePath\": \"/path/to/repo\", \"autoCreate\": false } }\n```\n\n### Milestones\n\nMilestone statuses: `planned`, `active`, `completed`, `cancelled`.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_milestone\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"title\": \"Finish discovery\",\n \"status\": \"active\",\n \"targetAt\": 1760000000000,\n \"sortOrder\": 10\n }\n}\n```\n\nUse `list_milestones` with `projectId`. Use `update_milestone` with both\n`projectId` and `milestoneId`. Milestone deletion is intentionally not exposed.\n\n### Immutable project updates\n\nProject updates are append-only progress snapshots. They also update Project health.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"health\": \"on_track\",\n \"summary\": \"Discovery is complete\",\n \"progress\": [\"Interviewed ten users\"],\n \"risks\": [\"Pricing remains unvalidated\"],\n \"nextSteps\": [\"Run pricing tests\"]\n }\n}\n```\n\nUse `list_updates` with `projectId` and optional `limit`. Updates cannot be edited.\n\n## Automations\n\nCommands: `list`, `get`, `create`, `update`, `delete`, `run`, `pause`,\n`resume`, and `history`.\n\nAutomation `create` automatically uses the current session Project when `projectId` is\nomitted. An explicit `projectId` takes precedence and is validated before mutation. Use an\nexplicit id when creating for a Project other than the current session Project.\n\n### Create in the current Project\n\n`trigger` and `action` use the same shapes as the Automation product API.\n\n```json\n{\n \"mode\": \"automation\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"Daily project review\",\n \"trigger\": { \"kind\": \"schedule\", \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 9 * * 1-5\", \"tz\": \"Asia/Shanghai\" } },\n \"action\": { \"kind\": \"agent\", \"instruction\": \"Review the current project and summarize risks.\" }\n }\n}\n```\n\nTo override the inherited Project, add `\"projectId\": \"project_id\"` to `args`.\nThe create payload may also be nested under `args.automation`; top-level `args.projectId`\nhas precedence.\n\n### List and history\n\n`list` and unqualified `history` inherit the current session Project. Pass an explicit\n`projectId` to query another Project. Pass `automationId` to `history` for one Automation.\n\n### Update and operate\n\nUse `automationId` for `get`, `update`, `delete`, `run`, `pause`, and `resume`.\nFor `update`, patch fields may be direct args or nested under `args.patch`. Supplying a new\n`projectId` reassigns the Automation after validating the target Project.\n\n## Tasks\n\nTask locale follows the conversation response language, then the user request and profile.\nKeep every user-facing contract field (criteria, expected outputs, constraints, assumptions and risks)\nin that language, even when attached source material is English. Preserve paths, URLs and proper nouns.\nAn explicit locale must reflect the user\u2019s language choice.\n\nCommands: `list`, `get`, `create`, `delegated_tasks`, `collaboration`,\n`collaboration_post`, `update_dependencies`, `add_context`, `remove_context`,\n`command`, and `delete`.\n\nTask phases are `backlog`, `ready`, `active`, `review`, and `closed`.\nOperational state is projected separately as `idle`, `queued`, `running`, `waiting`,\n`verifying`, `succeeded`, `failed`, or `cancelled`. Never send either value as a\nfree-form status update.\n\n`task.get` returns the Task, its projected `model`, dependencies, dependents, context,\nauthority grants, TaskRuns, receipts, and waits.\nThe projected model is the correct source for current operational state and attention items.\n\n`delete` permanently removes the Task and its contracts, waits, context links, TaskRuns,\nreceipts, and Task-owned execution records. It does not delete linked Sessions, workspace files,\nor external artifacts. Cancel an active TaskRun before deletion, and use `dryRun: true` when\nthe user's intent is ambiguous.\n\n```json\n{ \"mode\": \"task\", \"command\": \"delete\", \"args\": { \"taskId\": \"task_id\" }, \"dryRun\": true }\n```\n\n### Capture or start\n\n`createMode` defaults to `capture`, which creates a backlog Task without executing it.\nUse `start` only when immediate execution is intended.\n\nFor an immediate delegated task, use the minimal call below. The objective can include the\nworker instructions and constraints; optional lists are unnecessary for a simple delegation.\n\n```json\n{ \"mode\": \"task\", \"command\": \"create\", \"args\": { \"objective\": \"Calculate the requested result and report progress\", \"createMode\": \"start\" } }\n```\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"create\",\n \"args\": {\n \"objective\": \"Complete the customer research report\",\n \"projectId\": \"project_id\",\n \"createMode\": \"capture\",\n \"priority\": \"high\",\n \"expectedOutputs\": [\"Research report\"],\n \"acceptanceCriteria\": [\"Sources are cited\"],\n \"constraints\": [\"Do not contact customers without approval\"],\n \"dependsOnTaskIds\": []\n }\n}\n```\n\n### Main Agent and worker collaboration\n\nThe user-facing Agent can call `delegated_tasks` to list Tasks created from this conversation,\nthen `collaboration` with `{ \"taskId\": \"...\", \"afterSequence\": 0 }` to read the ordered board.\nUse the Task and TaskRun receipt as the final source of execution status.\n\nUse `collaboration_post` with `taskId`, `kind`, `body`, and a stable `idempotencyKey`.\nThe main Agent may write `instruction`, `question`, or `answer`; answers include\n`causationId` of the worker's question. The worker may write `progress`, `question`,\nor `ack`; acknowledgements include `causationId` of the instruction. A worker question\npauses the active TaskRun. After posting it, stop the execution turn and wait for an answer.\nAn instruction is first recorded, then delivered to the worker conversation, and is only\nconfirmed when the worker acknowledges it. Ordinary progress does not interrupt the user.\n\n```json\n{ \"mode\": \"task\", \"command\": \"collaboration_post\", \"args\": { \"taskId\": \"task_id\", \"kind\": \"progress\", \"body\": \"Completed source review\", \"idempotencyKey\": \"stable-key\" } }\n```\n\n### Dependencies\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"update_dependencies\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"dependsOnTaskIds\": [\"dependency_task_id\"]\n }\n}\n```\n\n### Context links\n\nUse `add_context` to link a document, file, URL, session, memory, Task, artifact, or source\nas `input`, `reference`, `constraint`, `deliverable`, or `evidence` context.\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"add_context\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"targetKind\": \"file\",\n \"targetId\": \"/path/to/spec.md\",\n \"role\": \"input\",\n \"title\": \"Product specification\",\n \"pinned\": true,\n \"retrievalPolicy\": {},\n \"metadata\": {}\n }\n}\n```\n\nUse `remove_context` with `taskId` and the exact `edgeId` returned by `task.get`.\nDo not add authority grants through this tool; an Agent must not authorize itself.\n\n### Typed lifecycle commands\n\nEvery command requires `taskId`, the Task's current `expectedVersion`, a `type`, and\ntype-specific fields inside `commandArgs`.\n\nSupported command types:\n\n- `mark_ready`\n- `start`: `{ \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" } }`\n- `request_review`\n- `close`: `{ \"resolution\": \"done | cancelled | duplicate | wont_do\" }`\n- `reopen`: `{ \"phase\": \"ready | active\" }`\n- `add_wait`: `{ \"wait\": { \"kind\": \"dependency | approval | input | schedule | external | paused\", \"reason\": \"...\", \"condition\": {} } }`\n- `resolve_wait`: `{ \"waitId\": \"wait_id\", \"resolution\": {} }`\n- `delegate`: `{ \"agentId\": \"agent_id\" }`\n- `revise_contract`: `{ \"contract\": { ...complete contract... } }`\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"command\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"type\": \"start\",\n \"commandArgs\": {\n \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" }\n }\n }\n}\n```\n\nContract revision is replacement, not a patch. Read the Task and preserve all contract fields\nthe user did not ask to change. Resolve a wait through `resolve_wait`; do not directly mutate\na TaskRun or manufacture a phase transition.\n\n## TaskRuns\n\nTaskRun inspection is read-only except for explicit cancellation. Other execution state is\ncontrolled by Task commands and the runtime coordinator.\n\n### List attempts for a Task\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"list\", \"args\": { \"taskId\": \"task_id\", \"limit\": 20 } }\n```\n\nThe result contains run attempts, finalized receipts, and active waits.\n\n### Inspect one attempt\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"get\", \"args\": { \"runId\": \"run_id\" } }\n```\n\nThe result contains the TaskRun, its receipt when terminal, ordered events, and active Task waits.\n\n### Cancel an attempt\n\nRead the run first, then pass its current version. Cancellation creates a terminal receipt.\n\n```json\n{\n \"mode\": \"task_run\",\n \"command\": \"cancel\",\n \"args\": { \"runId\": \"run_id\", \"expectedVersion\": 2, \"reason\": \"User cancelled execution\" }\n}\n```\n\nDo not guess commands such as retry, force-complete, heartbeat, or transition; they are not Agent APIs.\n\n## Notes\n\nCommands: `list`, `get`, `create`, `append`, `preview_edit`, `update`, and `delete`.\nUse Notes for durable prose and reference material, not as a Task substitute. Prefer `append`\nwhen preserving user content. Use `preview_edit` before a canonical rewrite.\n\n```json\n{ \"mode\": \"note\", \"command\": \"create\", \"args\": { \"title\": \"Decision\", \"markdown\": \"...\", \"projectId\": \"project_id\" } }\n```\n\n```json\n{ \"mode\": \"note\", \"command\": \"append\", \"args\": { \"noteId\": \"note_id\", \"heading\": \"AI synthesis\", \"content\": \"...\" } }\n```\n\nUse `update` with `status: \"trashed\"` for a recoverable removal. `delete` permanently\nremoves the Note and its stored snapshots and media; use `dryRun: true` first when the\nuser's intent is ambiguous.\n\n```json\n{ \"mode\": \"note\", \"command\": \"delete\", \"args\": { \"noteId\": \"note_id\" }, \"dryRun\": true }\n```\n\n## Chat previews, local apps, and settings\n\nUse `chat_preview` by default when the user asks to design, mock up, or quickly show a UI in\nthe current conversation. It creates no Project and no Local App. Commands are `create`,\n`get`, and `revise`. Source consists of `markup`, `styles`, and optional `script`;\ndo not include a full HTML document or remote dependencies. Revision requires the exact\n`baseRevision` returned by the prior call.\n\nUse `local_app` only when the user explicitly asks for a durable, installable app or chooses\n\u201CSave as app\u201D on a chat preview. Do not create a Local App merely to render a UI draft.\n\nLocal app commands are `list`, `get`, `create`, and `validate`. Installation,\nactivation, rollback, and uninstall remain product runtime operations.\n\nSettings supports only `open` and returns an exact product jump target without changing config.\n\n## Error recovery\n\n| Result | Recovery |\n| --- | --- |\n| service unavailable | Stop retrying and report the unavailable capability. |\n| not found | Re-list in the intended scope; do not invent another id. |\n| conflict | Read the current object and reassess using its latest version. |\n| waiting | Inspect the Task projection and TaskRun waits; resolve only the real blocker. |\n| invalid command or state | Read the object and use only a documented transition. |\n| unsupported operation | Use the dedicated tool or product UI; never write storage directly. |\n\n## Deliberate boundaries\n\n- Project deletion and milestone deletion are not Agent APIs.\n- TaskRun mutation is internal to execution coordination except for optimistic cancellation.\n- Project updates are immutable.\n- Automation operations remain in their dedicated tools.\n- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.\n";
|
|
1
|
+
export declare const xopcUseManual = "# XOPC Use Tool Manual\n\n## Purpose\n\n`xopc_use` operates first-class XOPC product objects without editing SQLite or product files directly.\nLoad this manual before a non-trivial mutation. For focused configuration workflows use\n`tool_manual({tool:\"xopc_use\",topic:\"agent|settings|automation|connections\"})`.\nFor identity-only changes prefer `agent patch_profile {id,expectedRevision,patch,idempotencyKey?}`,\nwhich preserves omitted profile fields. Existing update keeps replacement semantics for profile.\n\n```json\n{\n \"mode\": \"agent | project | automation | note | task | task_run | chat_preview | local_app | settings\",\n \"command\": \"...\",\n \"args\": {},\n \"dryRun\": false\n}\n```\n\nSend one object command per call. Inspect the returned JSON `ok` field; a tool call can\ncomplete successfully while the product command returns `ok: false`.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\n| Agent definition and default Agent | `xopc_use` mode `agent` |\n| Project, milestone, project update | `xopc_use` mode `project` |\n| Automation | `xopc_use` mode `automation` |\n| Task intent and lifecycle | `xopc_use` mode `task` |\n| Task execution attempt, receipt, events and waits | `xopc_use` mode `task_run` |\n| Note | `xopc_use` mode `note` |\n| Lightweight UI preview | `xopc_use` mode `chat_preview` |\n| Local app | `xopc_use` mode `local_app` |\n| Settings jump target | `xopc_use` mode `settings` |\n| Session, memory, skill, connected app or workspace file | its dedicated tool |\n\nA Task is durable intent; a TaskRun is one execution attempt.\n\n## Agents\n\nCommands: `list`, `get`, `create`, `update`, `set_default`, `disable`,\n`delete`, and `purge`.\n\nAn Agent profile stores `name` and optional `description`, `creature`, `style`, `language`,\n`emoji`, and `avatar` identity fields. Use `instructions` for short execution rules.\nPut personality in SOUL.md and ongoing work guidance in AGENTS.md.\n\n```json\n{\n \"mode\": \"agent\",\n \"command\": \"create\",\n \"args\": {\n \"id\": \"xiaomei\",\n \"profile\": {\n \"name\": \"\u5C0F\u7F8E\",\n \"description\": \"\u5E2E\u52A9\u6574\u7406\u65E5\u5E38\u4E8B\u9879\",\n \"language\": \"zh-CN\",\n \"style\": \"\u6E29\u67D4\u3001\u4EB2\u5207\",\n \"instructions\": \"\u7ED9\u51FA\u64CD\u4F5C\u5EFA\u8BAE\u524D\u5148\u6838\u5BF9\u5173\u952E\u4E8B\u5B9E\u3002\"\n },\n \"idempotencyKey\": \"create-agent-xiaomei\"\n }\n}\n```\n\nUse `list` before creating an Agent so an existing id is updated rather than duplicated.\nMutations other than `create` require the current `expectedRevision`; `set_default` uses\nthe catalog revision returned by `list`. `delete` preserves on-disk data, while `purge`\nalso removes it. Use `dryRun: true` to validate the exact same input contract without writing.\n\n## Reliable protocol\n\n1. Use `list` then `get` when an id is unknown.\n2. Read the current `version` before a Task mutation.\n3. Use `dryRun: true` for broad Project changes or uncertain mutations.\n4. Mutate once with the exact id and current concurrency token.\n5. Verify the returned object and preserve any \u201COpen in xopc\u201D delivery link.\n6. On a conflict, read again and reconsider the operation; do not blindly retry.\n\nTimestamps are Unix epoch milliseconds. Array fields are arrays of strings. Omission\npreserves a patchable field; an empty array intentionally clears it. Prefer explicit\n`projectId`, `taskId`, `runId`, `noteId`, and `localAppId` fields over `id`.\n\n## Projects\n\nCommands: `list`, `get`, `create`, `update`, `resolve_workspace`,\n`list_milestones`, `create_milestone`, `update_milestone`, `list_updates`,\nand `create_update`.\n\nProject statuses: `planned`, `active`, `paused`, `completed`, `cancelled`,\n`archived`. Health values: `unknown`, `on_track`, `at_risk`, `off_track`.\n\nA Project defines bounded shared context for related work. Its durable planning fields are `outcome`,\n`successCriteria`, `scope`, `nonGoals`, `ownerId`, `targetAt`, and `health`.\nUse `brief` for a concise description and `instructions` for durable operating guidance.\n\n### Create\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"AI Product Research\",\n \"outcome\": \"Choose a validated product direction\",\n \"successCriteria\": [\"Ten customer interviews\", \"Decision recorded\"],\n \"scope\": { \"market\": \"developer tools\" },\n \"nonGoals\": [\"Build the production product\"],\n \"health\": \"on_track\",\n \"targetAt\": 1760000000000,\n \"workspaceRoot\": \"/path/to/repo\"\n }\n}\n```\n\n### Update\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"status\": \"active\",\n \"health\": \"at_risk\",\n \"successCriteria\": [\"Ten interviews\", \"Evidence-backed decision\"]\n }\n}\n```\n\n### Resolve a workspace\n\nUse `autoCreate: false` for lookup. Set it to true only when creating a Project is authorized.\n\n```json\n{ \"mode\": \"project\", \"command\": \"resolve_workspace\", \"args\": { \"workspacePath\": \"/path/to/repo\", \"autoCreate\": false } }\n```\n\n### Milestones\n\nMilestone statuses: `planned`, `active`, `completed`, `cancelled`.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_milestone\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"title\": \"Finish discovery\",\n \"status\": \"active\",\n \"targetAt\": 1760000000000,\n \"sortOrder\": 10\n }\n}\n```\n\nUse `list_milestones` with `projectId`. Use `update_milestone` with both\n`projectId` and `milestoneId`. Milestone deletion is intentionally not exposed.\n\n### Immutable project updates\n\nProject updates are append-only progress snapshots. They also update Project health.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"health\": \"on_track\",\n \"summary\": \"Discovery is complete\",\n \"progress\": [\"Interviewed ten users\"],\n \"risks\": [\"Pricing remains unvalidated\"],\n \"nextSteps\": [\"Run pricing tests\"]\n }\n}\n```\n\nUse `list_updates` with `projectId` and optional `limit`. Updates cannot be edited.\n\n## Automations\n\nCommands: `list`, `get`, `create`, `update`, `delete`, `run`, `pause`,\n`resume`, and `history`.\n\nAutomation `create` automatically uses the current session Project when `projectId` is\nomitted. An explicit `projectId` takes precedence and is validated before mutation. Use an\nexplicit id when creating for a Project other than the current session Project.\n\n### Create in the current Project\n\n`trigger` and `action` use the same shapes as the Automation product API.\n\n```json\n{\n \"mode\": \"automation\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"Daily project review\",\n \"trigger\": { \"kind\": \"schedule\", \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 9 * * 1-5\", \"tz\": \"Asia/Shanghai\" } },\n \"action\": { \"kind\": \"agent\", \"instruction\": \"Review the current project and summarize risks.\" }\n }\n}\n```\n\nTo override the inherited Project, add `\"projectId\": \"project_id\"` to `args`.\nThe create payload may also be nested under `args.automation`; top-level `args.projectId`\nhas precedence.\n\n### List and history\n\n`list` and unqualified `history` inherit the current session Project. Pass an explicit\n`projectId` to query another Project. Pass `automationId` to `history` for one Automation.\n\n### Update and operate\n\nUse `automationId` for `get`, `update`, `delete`, `run`, `pause`, and `resume`.\nFor `update`, patch fields may be direct args or nested under `args.patch`. Supplying a new\n`projectId` reassigns the Automation after validating the target Project.\n\n## Tasks\n\nTask locale follows the conversation response language, then the user request and profile.\nKeep every user-facing contract field (criteria, expected outputs, constraints, assumptions and risks)\nin that language, even when attached source material is English. Preserve paths, URLs and proper nouns.\nAn explicit locale must reflect the user\u2019s language choice.\n\nCommands: `list`, `get`, `create`, `delegated_tasks`, `collaboration`,\n`collaboration_post`, `update_dependencies`, `add_context`, `remove_context`,\n`command`, and `delete`.\n\nTask phases are `backlog`, `ready`, `active`, `review`, and `closed`.\nOperational state is projected separately as `idle`, `queued`, `running`, `waiting`,\n`verifying`, `succeeded`, `failed`, or `cancelled`. Never send either value as a\nfree-form status update.\n\n`task.get` returns the Task, its projected `model`, dependencies, dependents, context,\nauthority grants, TaskRuns, receipts, and waits.\nThe projected model is the correct source for current operational state and attention items.\n\n`delete` permanently removes the Task and its contracts, waits, context links, TaskRuns,\nreceipts, and Task-owned execution records. It does not delete linked Sessions, workspace files,\nor external artifacts. Cancel an active TaskRun before deletion, and use `dryRun: true` when\nthe user's intent is ambiguous.\n\n```json\n{ \"mode\": \"task\", \"command\": \"delete\", \"args\": { \"taskId\": \"task_id\" }, \"dryRun\": true }\n```\n\n### Capture or start\n\n`createMode` defaults to `capture`, which creates a backlog Task without executing it.\nUse `start` only when immediate execution is intended.\nTask acceptance defaults to `verified_auto`: verify the results and close automatically when all criteria pass.\nPass `acceptancePolicy: \"manual\"` only when the user explicitly requires human acceptance.\n\nFor an immediate delegated task, use the minimal call below. The objective can include the\nworker instructions and constraints; optional lists are unnecessary for a simple delegation.\n\n```json\n{ \"mode\": \"task\", \"command\": \"create\", \"args\": { \"objective\": \"Calculate the requested result and report progress\", \"createMode\": \"start\" } }\n```\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"create\",\n \"args\": {\n \"objective\": \"Complete the customer research report\",\n \"projectId\": \"project_id\",\n \"createMode\": \"capture\",\n \"priority\": \"high\",\n \"expectedOutputs\": [\"Research report\"],\n \"acceptanceCriteria\": [\"Sources are cited\"],\n \"acceptancePolicy\": \"verified_auto\",\n \"constraints\": [\"Do not contact customers without approval\"],\n \"dependsOnTaskIds\": []\n }\n}\n```\n\n### Main Agent and worker collaboration\n\nThe user-facing Agent can call `delegated_tasks` to list Tasks created from this conversation,\nthen `collaboration` with `{ \"taskId\": \"...\", \"afterSequence\": 0 }` to read the ordered board.\nUse the Task and TaskRun receipt as the final source of execution status.\n\nUse `collaboration_post` with `taskId`, `kind`, `body`, and a stable `idempotencyKey`.\nThe main Agent may write `instruction`, `question`, or `answer`; answers include\n`causationId` of the worker's question. The worker may write `progress`, `question`,\nor `ack`; acknowledgements include `causationId` of the instruction. A worker question\npauses the active TaskRun. After posting it, stop the execution turn and wait for an answer.\nAn instruction is first recorded, then delivered to the worker conversation, and is only\nconfirmed when the worker acknowledges it. Ordinary progress does not interrupt the user.\n\n```json\n{ \"mode\": \"task\", \"command\": \"collaboration_post\", \"args\": { \"taskId\": \"task_id\", \"kind\": \"progress\", \"body\": \"Completed source review\", \"idempotencyKey\": \"stable-key\" } }\n```\n\n### Dependencies\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"update_dependencies\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"dependsOnTaskIds\": [\"dependency_task_id\"]\n }\n}\n```\n\n### Context links\n\nUse `add_context` to link a document, file, URL, session, memory, Task, artifact, or source\nas `input`, `reference`, `constraint`, `deliverable`, or `evidence` context.\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"add_context\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"targetKind\": \"file\",\n \"targetId\": \"/path/to/spec.md\",\n \"role\": \"input\",\n \"title\": \"Product specification\",\n \"pinned\": true,\n \"retrievalPolicy\": {},\n \"metadata\": {}\n }\n}\n```\n\nUse `remove_context` with `taskId` and the exact `edgeId` returned by `task.get`.\nDo not add authority grants through this tool; an Agent must not authorize itself.\n\n### Typed lifecycle commands\n\nEvery command requires `taskId`, the Task's current `expectedVersion`, a `type`, and\ntype-specific fields inside `commandArgs`.\n\nSupported command types:\n\n- `mark_ready`\n- `start`: `{ \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" } }`\n- `request_review`\n- `close`: `{ \"resolution\": \"done | cancelled | duplicate | wont_do\" }`\n- `reopen`: `{ \"phase\": \"ready | active\" }`\n- `add_wait`: `{ \"wait\": { \"kind\": \"dependency | approval | input | schedule | external | paused\", \"reason\": \"...\", \"condition\": {} } }`\n- `resolve_wait`: `{ \"waitId\": \"wait_id\", \"resolution\": {} }`\n- `delegate`: `{ \"agentId\": \"agent_id\" }`\n- `revise_contract`: `{ \"contract\": { ...complete contract... } }`\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"command\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"type\": \"start\",\n \"commandArgs\": {\n \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" }\n }\n }\n}\n```\n\nContract revision is replacement, not a patch. Read the Task and preserve all contract fields\nthe user did not ask to change. Resolve a wait through `resolve_wait`; do not directly mutate\na TaskRun or manufacture a phase transition.\n\n## TaskRuns\n\nTaskRun inspection is read-only except for explicit cancellation. Other execution state is\ncontrolled by Task commands and the runtime coordinator.\n\n### List attempts for a Task\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"list\", \"args\": { \"taskId\": \"task_id\", \"limit\": 20 } }\n```\n\nThe result contains run attempts, finalized receipts, and active waits.\n\n### Inspect one attempt\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"get\", \"args\": { \"runId\": \"run_id\" } }\n```\n\nThe result contains the TaskRun, its receipt when terminal, ordered events, and active Task waits.\n\n### Cancel an attempt\n\nRead the run first, then pass its current version. Cancellation creates a terminal receipt.\n\n```json\n{\n \"mode\": \"task_run\",\n \"command\": \"cancel\",\n \"args\": { \"runId\": \"run_id\", \"expectedVersion\": 2, \"reason\": \"User cancelled execution\" }\n}\n```\n\nDo not guess commands such as retry, force-complete, heartbeat, or transition; they are not Agent APIs.\n\n## Notes\n\nCommands: `list`, `get`, `create`, `append`, `preview_edit`, `update`, and `delete`.\nUse Notes for durable prose and reference material, not as a Task substitute. Prefer `append`\nwhen preserving user content. Use `preview_edit` before a canonical rewrite.\n\n```json\n{ \"mode\": \"note\", \"command\": \"create\", \"args\": { \"title\": \"Decision\", \"markdown\": \"...\", \"projectId\": \"project_id\" } }\n```\n\n```json\n{ \"mode\": \"note\", \"command\": \"append\", \"args\": { \"noteId\": \"note_id\", \"heading\": \"AI synthesis\", \"content\": \"...\" } }\n```\n\nUse `update` with `status: \"trashed\"` for a recoverable removal. `delete` permanently\nremoves the Note and its stored snapshots and media; use `dryRun: true` first when the\nuser's intent is ambiguous.\n\n```json\n{ \"mode\": \"note\", \"command\": \"delete\", \"args\": { \"noteId\": \"note_id\" }, \"dryRun\": true }\n```\n\n## Chat previews, local apps, and settings\n\nUse `chat_preview` by default when the user asks to design, mock up, or quickly show a UI in\nthe current conversation. It creates no Project and no Local App. Commands are `create`,\n`get`, and `revise`. Source consists of `markup`, `styles`, and optional `script`;\ndo not include a full HTML document or remote dependencies. Revision requires the exact\n`baseRevision` returned by the prior call.\n\nUse `local_app` only when the user explicitly asks for a durable, installable app or chooses\n\u201CSave as app\u201D on a chat preview. Do not create a Local App merely to render a UI draft.\n\nLocal app commands are `list`, `get`, `create`, and `validate`. Installation,\nactivation, rollback, and uninstall remain product runtime operations.\n\nSettings supports only `open` and returns an exact product jump target without changing config.\n\n## Error recovery\n\n| Result | Recovery |\n| --- | --- |\n| service unavailable | Stop retrying and report the unavailable capability. |\n| not found | Re-list in the intended scope; do not invent another id. |\n| conflict | Read the current object and reassess using its latest version. |\n| waiting | Inspect the Task projection and TaskRun waits; resolve only the real blocker. |\n| invalid command or state | Read the object and use only a documented transition. |\n| unsupported operation | Use the dedicated tool or product UI; never write storage directly. |\n\n## Deliberate boundaries\n\n- Project deletion and milestone deletion are not Agent APIs.\n- TaskRun mutation is internal to execution coordination except for optimistic cancellation.\n- Project updates are immutable.\n- Automation operations remain in their dedicated tools.\n- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.\n";
|
|
@@ -253,6 +253,8 @@ the user's intent is ambiguous.
|
|
|
253
253
|
|
|
254
254
|
\`createMode\` defaults to \`capture\`, which creates a backlog Task without executing it.
|
|
255
255
|
Use \`start\` only when immediate execution is intended.
|
|
256
|
+
Task acceptance defaults to \`verified_auto\`: verify the results and close automatically when all criteria pass.
|
|
257
|
+
Pass \`acceptancePolicy: "manual"\` only when the user explicitly requires human acceptance.
|
|
256
258
|
|
|
257
259
|
For an immediate delegated task, use the minimal call below. The objective can include the
|
|
258
260
|
worker instructions and constraints; optional lists are unnecessary for a simple delegation.
|
|
@@ -272,6 +274,7 @@ worker instructions and constraints; optional lists are unnecessary for a simple
|
|
|
272
274
|
"priority": "high",
|
|
273
275
|
"expectedOutputs": ["Research report"],
|
|
274
276
|
"acceptanceCriteria": ["Sources are cited"],
|
|
277
|
+
"acceptancePolicy": "verified_auto",
|
|
275
278
|
"constraints": ["Do not contact customers without approval"],
|
|
276
279
|
"dependsOnTaskIds": []
|
|
277
280
|
}
|
|
@@ -19,7 +19,6 @@ import type { MemoryManager } from '../memory/manager.js';
|
|
|
19
19
|
import type { SessionStore } from '../../session/store.js';
|
|
20
20
|
import type { GatewayClarifyRequestFn } from './clarify-tool.js';
|
|
21
21
|
import type { AutomationService } from '../../automations/index.js';
|
|
22
|
-
import type { BrowserAutomationService } from '../../browser/automations/index.js';
|
|
23
22
|
import type { NotesService } from '../../notes/index.js';
|
|
24
23
|
import type { ProjectService } from '../../projects/index.js';
|
|
25
24
|
import type { LocalAppService } from '../../local-apps/index.js';
|
|
@@ -63,7 +62,6 @@ export interface ToolFactoryDeps {
|
|
|
63
62
|
getPhoneSetupService?: () => import('../../phone/setup/service.js').PhoneSetupService | undefined;
|
|
64
63
|
getBrowserSetupService?: () => import('../../browser/setup/service.js').BrowserSetupService | undefined;
|
|
65
64
|
getMcpSetupService?: () => import('../mcp/conversation-setup.js').McpConversationSetup | undefined;
|
|
66
|
-
getBrowserAutomationService?: () => BrowserAutomationService | undefined;
|
|
67
65
|
emitBrowserEvent?: (type: string, payload: unknown) => void;
|
|
68
66
|
/** Gateway: enables the `xopc_use` product-object tool. */
|
|
69
67
|
getNotesService?: () => NotesService | undefined;
|
|
@@ -62,7 +62,6 @@ import "../../browser/index.js";
|
|
|
62
62
|
import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
63
63
|
import { createDelegateTool } from "./delegate-tool.js";
|
|
64
64
|
import { createAutomationTool } from "./automation-tool.js";
|
|
65
|
-
import { createBrowserAutomationTool } from "./browser-automation-tool.js";
|
|
66
65
|
import { createSkillViewTool, createSkillsListTool } from "./skills-tools.js";
|
|
67
66
|
import { createSkillManageTool } from "./skill-manage-tool.js";
|
|
68
67
|
import { createSkillsMarketplaceSearchTool } from "./skills-marketplace-search-tool.js";
|
|
@@ -370,6 +369,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
370
369
|
} });
|
|
371
370
|
if (personalExecution || personalExecutionMarker) {
|
|
372
371
|
allowed = new Set(PERSONAL_REQUEST_TOOL_IDS.slice(0, 3).filter((name) => !allowed || allowed.has(name)));
|
|
372
|
+
allowed.add("publish_task_result");
|
|
373
373
|
allowed.add("personal_request_result");
|
|
374
374
|
allowed.add("personal_request_connection");
|
|
375
375
|
allowed.add("task_collaboration");
|
|
@@ -660,7 +660,6 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
660
660
|
canAccess: () => currentAccess().crossSessionHistory
|
|
661
661
|
})] : [],
|
|
662
662
|
...this.deps.getAutomationService ? [createAutomationTool(productToolDeps)] : [],
|
|
663
|
-
...browserEnabled && this.deps.getBrowserAutomationService ? [createBrowserAutomationTool({ getBrowserAutomationService: this.deps.getBrowserAutomationService })] : [],
|
|
664
663
|
...this.deps.getPhoneSetupService || this.deps.getBrowserSetupService || this.deps.getAutomationService || this.deps.getProjectService || this.deps.getNotesService || this.deps.getLocalAppService || this.deps.getChatPreviewService || this.deps.dispatchTaskEvents || this.deps.dispatchTaskRuns ? [
|
|
665
664
|
createXopcUseTool(productToolDeps),
|
|
666
665
|
...this.deps.getMcpSetupService ? [createMcpSetupTool(productToolDeps)] : [],
|
|
@@ -10,5 +10,5 @@ export interface FindToolDetails {
|
|
|
10
10
|
}
|
|
11
11
|
export type FindToolInput = Static<typeof findSchema>;
|
|
12
12
|
export declare function createFindTool(cwd: string): AgentTool;
|
|
13
|
-
export declare const findTool: AgentTool<
|
|
13
|
+
export declare const findTool: AgentTool<object, any>;
|
|
14
14
|
export {};
|
|
@@ -14,5 +14,5 @@ export interface GrepToolDetails {
|
|
|
14
14
|
}
|
|
15
15
|
export type GrepToolInput = Static<typeof grepSchema>;
|
|
16
16
|
export declare function createGrepTool(cwd: string): AgentTool;
|
|
17
|
-
export declare const grepTool: AgentTool<
|
|
17
|
+
export declare const grepTool: AgentTool<object, any>;
|
|
18
18
|
export {};
|
|
@@ -29,7 +29,6 @@ export { createClarifyTool, type ClarifyRequestPayload, type GatewayClarifyReque
|
|
|
29
29
|
export { BrowserRuntime, assertBrowserUrlAllowed } from '../../browser/index.js';
|
|
30
30
|
export { createDelegateTool, DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, } from './delegate-tool.js';
|
|
31
31
|
export { createAutomationTool, type AutomationToolDeps } from './automation-tool.js';
|
|
32
|
-
export { createBrowserAutomationTool } from './browser-automation-tool.js';
|
|
33
32
|
export { createXopcUseTool, type XopcUseToolDeps, type XopcUseToolInput } from './xopc-use-tool.js';
|
|
34
33
|
export { createSkillsListTool, createSkillViewTool, type SkillsToolsDeps } from './skills-tools.js';
|
|
35
34
|
export { createSkillManageTool, type SkillManageToolDeps } from './skill-manage-tool.js';
|
|
@@ -35,7 +35,6 @@ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
|
35
35
|
import "../../browser/index.js";
|
|
36
36
|
import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
|
|
37
37
|
import { createAutomationTool } from "./automation-tool.js";
|
|
38
|
-
import { createBrowserAutomationTool } from "./browser-automation-tool.js";
|
|
39
38
|
import { createSkillViewTool, createSkillsListTool } from "./skills-tools.js";
|
|
40
39
|
import { createSkillManageTool } from "./skill-manage-tool.js";
|
|
41
40
|
import { createSkillsMarketplaceSearchTool } from "./skills-marketplace-search-tool.js";
|
|
@@ -47,4 +46,4 @@ import { createImageTool } from "./image-tool.js";
|
|
|
47
46
|
import { createImageGenerateTool, resolveImageGenerationModelConfigForTool } from "./image-generate-tool.js";
|
|
48
47
|
import { createPersonalReadTool } from "./personal-read-tool.js";
|
|
49
48
|
import { createTaskCollaborationTool } from "./task-collaboration-tool.js";
|
|
50
|
-
export { BrowserRuntime, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, createApplyPatchTool, createAutomationTool,
|
|
49
|
+
export { BrowserRuntime, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, createApplyPatchTool, createAutomationTool, createClarifyTool, createCreateShareTool, createDataBatchTool, createDelegateTool, createDesktopPetTool, createExecCommandTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createKnowledgeGetTool, createKnowledgeReadTool, createKnowledgeSearchTool, createKnowledgeWriteTool, createListDirTool, createManagedJobTool, createMcpSetupTool, createMemoryMaintenanceTool, createMessageTool, createPersonalReadTool, createPublishArtifactsTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTaskCollaborationTool, createTaskResultTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createUserContextGetTool, createUserContextReadTool, createUserContextSearchTool, createUserContextUpdateTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
@@ -10,6 +10,6 @@ export interface XopcToolMetadata {
|
|
|
10
10
|
requiresExclusiveWorkspaceLock?: boolean;
|
|
11
11
|
finalGuardRelevant?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export type AgentToolWithMetadata<TParams = any, TDetails = any> = AgentTool<TParams, TDetails> & XopcToolMetadata;
|
|
13
|
+
export type AgentToolWithMetadata<TParams extends object = any, TDetails = any> = AgentTool<TParams, TDetails> & XopcToolMetadata;
|
|
14
14
|
export declare const DEFAULT_TOOL_METADATA: Required<XopcToolMetadata>;
|
|
15
15
|
export declare function getToolMetadata(tool: AgentTool<any, any>): Required<XopcToolMetadata>;
|
|
@@ -3,8 +3,8 @@ import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-ru
|
|
|
3
3
|
import { init_request_repository, personalRequestForExecution } from "../../personal-agent/request-repository.js";
|
|
4
4
|
import { assertPersonalRequestAccountAccess } from "../../personal-agent/request-access.js";
|
|
5
5
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
6
|
-
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
7
6
|
import { PersonalRequestResultSchema } from "../../personal-agent/request-result.js";
|
|
7
|
+
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/personal-request-result-tool.ts
|
|
10
10
|
init_transaction();
|
|
@@ -69,7 +69,7 @@ function createPersonalRequestResultTool(conversationId) {
|
|
|
69
69
|
return {
|
|
70
70
|
content: [{
|
|
71
71
|
type: "text",
|
|
72
|
-
text: "Result saved for delivery to the originating chat after this Task completes."
|
|
72
|
+
text: "Result saved for delivery to the originating chat after this Task completes. Now call publish_task_result with source excerpts from successful xopc_tool_execute reads and claims supporting this saved summary, items and coverage. Correct any failed checks before finishing."
|
|
73
73
|
}],
|
|
74
74
|
details: {}
|
|
75
75
|
};
|
|
@@ -59,6 +59,7 @@ const RequestSchema = Type.Object({
|
|
|
59
59
|
maxLength: 16e3,
|
|
60
60
|
description: "Complete task brief preserving all user requirements, stages, inputs, outputs and constraints. Do not replace exact specifications with a short objective or a reference to an unspecified process."
|
|
61
61
|
})),
|
|
62
|
+
acceptancePolicy: Type.Optional(Type.Union([Type.Literal("verified_auto"), Type.Literal("manual")], { description: "Default automatic verification and completion. Use manual only for an explicit user requirement for human acceptance." })),
|
|
62
63
|
objective: Type.Optional(Type.String({
|
|
63
64
|
minLength: 1,
|
|
64
65
|
maxLength: 4e3
|
|
@@ -191,13 +192,15 @@ function createPersonalRequestTools(deps) {
|
|
|
191
192
|
objective: input.objective.trim(),
|
|
192
193
|
description: input.description?.trim(),
|
|
193
194
|
timeRange: input.timeRange,
|
|
195
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
194
196
|
idempotencyKey: input.idempotencyKey ?? `personal-request-submit:${selectionRequestHash({
|
|
195
197
|
inputId: getSessionInputState(conversationId).activeInputId ?? toolCallId,
|
|
196
198
|
objective: input.objective.trim(),
|
|
197
199
|
description: input.description?.trim(),
|
|
198
200
|
connectorId: input.connectorId,
|
|
199
201
|
accountId: input.accountId,
|
|
200
|
-
timeRange: input.timeRange
|
|
202
|
+
timeRange: input.timeRange,
|
|
203
|
+
acceptancePolicy: input.acceptancePolicy
|
|
201
204
|
})}`
|
|
202
205
|
});
|
|
203
206
|
publishPersonalRequest(request);
|
|
@@ -24,6 +24,7 @@ declare const PersonalTaskModelSchema: import("@sinclair/typebox").TObject<{
|
|
|
24
24
|
objective: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25
25
|
expectedOutputs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
26
26
|
constraints: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
27
|
+
acceptancePolicy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"verified_auto">, import("@sinclair/typebox").TLiteral<"manual">]>>;
|
|
27
28
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
28
29
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
29
30
|
section: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>>;
|
|
@@ -113,6 +113,7 @@ const PersonalTaskSchema = Type.Object({
|
|
|
113
113
|
].map((value) => Type.Literal(value)))),
|
|
114
114
|
questionId: Type.Optional(Type.String({ description: "Collaboration question ID to answer." })),
|
|
115
115
|
expectedOutputs: Type.Optional(Type.Array(Type.String())),
|
|
116
|
+
acceptancePolicy: Type.Optional(Type.Union([Type.Literal("verified_auto"), Type.Literal("manual")], { description: "Defaults to automatic verification and completion. Use manual only when the user explicitly requests human acceptance." })),
|
|
116
117
|
acceptanceCriteria: Type.Optional(Type.Array(Type.String())),
|
|
117
118
|
constraints: Type.Optional(Type.Array(Type.String())),
|
|
118
119
|
requiredSkills: Type.Optional(Type.Array(Type.String({
|
|
@@ -361,6 +362,7 @@ function createPersonalTaskTool(deps) {
|
|
|
361
362
|
sourceRefs: modelInput.sourceRefs,
|
|
362
363
|
expectedOutputs: input.expectedOutputs,
|
|
363
364
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
365
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
364
366
|
constraints: input.constraints
|
|
365
367
|
});
|
|
366
368
|
command = "create";
|
|
@@ -372,6 +374,7 @@ function createPersonalTaskTool(deps) {
|
|
|
372
374
|
includeConversationContext: false,
|
|
373
375
|
expectedOutputs: input.expectedOutputs,
|
|
374
376
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
377
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
375
378
|
constraints: input.constraints,
|
|
376
379
|
idempotencyKey: `personal-submit:${conversationId}:${selectionRequestHash(submissionKey)}`
|
|
377
380
|
};
|
|
@@ -455,6 +458,7 @@ function createPersonalTaskTool(deps) {
|
|
|
455
458
|
includeConversationContext: false,
|
|
456
459
|
expectedOutputs: input.expectedOutputs,
|
|
457
460
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
461
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
458
462
|
constraints: input.constraints,
|
|
459
463
|
idempotencyKey: key
|
|
460
464
|
};
|
|
@@ -1440,6 +1440,15 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1440
1440
|
};
|
|
1441
1441
|
contract[field] = value;
|
|
1442
1442
|
}
|
|
1443
|
+
const acceptancePolicy = args.acceptancePolicy ?? "verified_auto";
|
|
1444
|
+
if (![
|
|
1445
|
+
"verified_auto",
|
|
1446
|
+
"verified_then_review",
|
|
1447
|
+
"manual"
|
|
1448
|
+
].includes(String(acceptancePolicy))) return {
|
|
1449
|
+
ok: false,
|
|
1450
|
+
error: "Invalid acceptancePolicy"
|
|
1451
|
+
};
|
|
1443
1452
|
const originConversationId = deps.getCurrentConversationId?.();
|
|
1444
1453
|
const conversationId = trimString(args.conversationId) ?? originConversationId;
|
|
1445
1454
|
const config = deps.getConfig?.();
|
|
@@ -1491,7 +1500,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1491
1500
|
locale: taskLocale,
|
|
1492
1501
|
contract: {
|
|
1493
1502
|
...contract,
|
|
1494
|
-
acceptancePolicy
|
|
1503
|
+
acceptancePolicy,
|
|
1495
1504
|
outputDestinations: []
|
|
1496
1505
|
},
|
|
1497
1506
|
dependencies: dependsOnTaskIds,
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Anthropic OAuth flow (Claude Pro/Max)
|
|
3
|
-
*/
|
|
4
|
-
import type { OAuthCredentials, OAuthProviderInterface } from './types.js';
|
|
5
|
-
export declare function loginAnthropic(onAuthUrl: (url: string) => void, onPromptCode: () => Promise<string>): Promise<OAuthCredentials>;
|
|
6
|
-
export declare function refreshAnthropicToken(refreshToken: string): Promise<OAuthCredentials>;
|
|
7
|
-
export declare const anthropicOAuthProvider: OAuthProviderInterface;
|
|
1
|
+
export declare const anthropicOAuthProvider: import("./types.js").OAuthProviderInterface;
|
|
@@ -1,89 +1,12 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { init_pi_oauth_adapter, piOAuthAdapter } from "./pi-oauth-adapter.js";
|
|
3
|
+
import { anthropicProvider } from "@earendil-works/pi-ai/providers/anthropic";
|
|
3
4
|
//#region src/auth/oauth/anthropic.ts
|
|
4
|
-
|
|
5
|
-
const { verifier, challenge } = await generatePKCE();
|
|
6
|
-
onAuthUrl(`${AUTHORIZE_URL}?${new URLSearchParams({
|
|
7
|
-
code: "true",
|
|
8
|
-
client_id: CLIENT_ID,
|
|
9
|
-
response_type: "code",
|
|
10
|
-
redirect_uri: REDIRECT_URI,
|
|
11
|
-
scope: SCOPES,
|
|
12
|
-
code_challenge: challenge,
|
|
13
|
-
code_challenge_method: "S256",
|
|
14
|
-
state: verifier
|
|
15
|
-
}).toString()}`);
|
|
16
|
-
const splits = (await onPromptCode()).split("#");
|
|
17
|
-
const code = splits[0];
|
|
18
|
-
const state = splits[1];
|
|
19
|
-
const tokenResponse = await fetch(TOKEN_URL, {
|
|
20
|
-
method: "POST",
|
|
21
|
-
headers: { "Content-Type": "application/json" },
|
|
22
|
-
body: JSON.stringify({
|
|
23
|
-
grant_type: "authorization_code",
|
|
24
|
-
client_id: CLIENT_ID,
|
|
25
|
-
code,
|
|
26
|
-
state,
|
|
27
|
-
redirect_uri: REDIRECT_URI,
|
|
28
|
-
code_verifier: verifier
|
|
29
|
-
})
|
|
30
|
-
});
|
|
31
|
-
if (!tokenResponse.ok) {
|
|
32
|
-
const error = await tokenResponse.text();
|
|
33
|
-
throw new Error(`Token exchange failed: ${error}`);
|
|
34
|
-
}
|
|
35
|
-
const tokenData = await tokenResponse.json();
|
|
36
|
-
const expiresAt = Date.now() + tokenData.expires_in * 1e3 - 300 * 1e3;
|
|
37
|
-
return {
|
|
38
|
-
refresh: tokenData.refresh_token,
|
|
39
|
-
access: tokenData.access_token,
|
|
40
|
-
expires: expiresAt
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
async function refreshAnthropicToken(refreshToken) {
|
|
44
|
-
const response = await fetch(TOKEN_URL, {
|
|
45
|
-
method: "POST",
|
|
46
|
-
headers: { "Content-Type": "application/json" },
|
|
47
|
-
body: JSON.stringify({
|
|
48
|
-
grant_type: "refresh_token",
|
|
49
|
-
client_id: CLIENT_ID,
|
|
50
|
-
refresh_token: refreshToken
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
if (!response.ok) {
|
|
54
|
-
const error = await response.text();
|
|
55
|
-
throw new Error(`Anthropic token refresh failed: ${error}`);
|
|
56
|
-
}
|
|
57
|
-
const data = await response.json();
|
|
58
|
-
return {
|
|
59
|
-
refresh: data.refresh_token,
|
|
60
|
-
access: data.access_token,
|
|
61
|
-
expires: Date.now() + data.expires_in * 1e3 - 300 * 1e3
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
var decode, CLIENT_ID, AUTHORIZE_URL, TOKEN_URL, REDIRECT_URI, SCOPES, anthropicOAuthProvider;
|
|
5
|
+
var anthropicOAuthProvider;
|
|
65
6
|
var init_anthropic = __esmMin((() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
CLIENT_ID = decode("OWQxYzI1MGEtZTYxYi00NGQ5LTg4ZWQtNTk0NGQxOTYyZjVl");
|
|
69
|
-
AUTHORIZE_URL = "https://claude.ai/oauth/authorize";
|
|
70
|
-
TOKEN_URL = "https://console.anthropic.com/v1/oauth/token";
|
|
71
|
-
REDIRECT_URI = "https://console.anthropic.com/oauth/code/callback";
|
|
72
|
-
SCOPES = "org:create_api_key user:profile user:inference";
|
|
73
|
-
anthropicOAuthProvider = {
|
|
74
|
-
id: "anthropic",
|
|
75
|
-
name: "Anthropic (Claude Pro/Max)",
|
|
76
|
-
async login(callbacks) {
|
|
77
|
-
return loginAnthropic((url) => callbacks.onAuth({ url }), () => callbacks.onPrompt({ message: "Paste the authorization code:" }));
|
|
78
|
-
},
|
|
79
|
-
async refreshToken(credentials) {
|
|
80
|
-
return refreshAnthropicToken(credentials.refresh);
|
|
81
|
-
},
|
|
82
|
-
getApiKey(credentials) {
|
|
83
|
-
return credentials.access;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
7
|
+
init_pi_oauth_adapter();
|
|
8
|
+
anthropicOAuthProvider = piOAuthAdapter("anthropic", "Anthropic (Claude Pro/Max)", () => anthropicProvider().auth.oauth);
|
|
86
9
|
}));
|
|
87
10
|
//#endregion
|
|
88
11
|
init_anthropic();
|
|
89
|
-
export { anthropicOAuthProvider, init_anthropic
|
|
12
|
+
export { anthropicOAuthProvider, init_anthropic };
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { anthropicOAuthProvider, init_anthropic
|
|
1
|
+
import { anthropicOAuthProvider, init_anthropic } from "./anthropic.js";
|
|
2
2
|
import { githubCopilotOAuthProvider, init_github_copilot } from "./github-copilot.js";
|
|
3
3
|
import { antigravityOAuthProvider, loginAntigravity, refreshAntigravityToken } from "./google-oauth/google-antigravity.js";
|
|
4
4
|
import { init_google_antigravity } from "./google-antigravity.js";
|
|
5
5
|
import { geminiCliOAuthProvider, loginGeminiCli, refreshGoogleCloudToken } from "./google-oauth/google-gemini-cli.js";
|
|
6
6
|
import { init_google_gemini_cli } from "./google-gemini-cli.js";
|
|
7
7
|
import { init_kimi_coding, kimiCodingOAuthProvider } from "./kimi-coding.js";
|
|
8
|
-
import { init_minimax_cn, minimaxCnOAuthProvider } from "./minimax-cn.js";
|
|
9
|
-
import { init_minimax, minimaxOAuthProvider } from "./minimax.js";
|
|
10
8
|
import { init_openai, openaiOAuthProvider } from "./openai.js";
|
|
11
9
|
import { init_xopc_cloud, xopcCloudOAuthProvider, xopcShareOAuthProvider, xopcTunnelOAuthProvider } from "./xopc-cloud.js";
|
|
12
10
|
import { OAUTH_PROVIDER_DEFINITIONS, getModelOAuthProviderIds, getOAuthProviderDefinition, getOAuthProviderIds, getOAuthProviderInterfaces, init_registry, isOAuthOnlyProvider } from "./registry.js";
|
|
13
11
|
//#region src/auth/oauth/index.ts
|
|
14
12
|
init_anthropic();
|
|
15
|
-
init_minimax();
|
|
16
|
-
init_minimax_cn();
|
|
17
13
|
init_kimi_coding();
|
|
18
14
|
init_github_copilot();
|
|
19
15
|
init_google_gemini_cli();
|
|
@@ -22,4 +18,4 @@ init_openai();
|
|
|
22
18
|
init_xopc_cloud();
|
|
23
19
|
init_registry();
|
|
24
20
|
//#endregion
|
|
25
|
-
export { OAUTH_PROVIDER_DEFINITIONS, anthropicOAuthProvider, getModelOAuthProviderIds, getOAuthProviderDefinition, getOAuthProviderIds, getOAuthProviderInterfaces, githubCopilotOAuthProvider, antigravityOAuthProvider as googleAntigravityOAuthProvider, geminiCliOAuthProvider as googleGeminiCliOAuthProvider, isOAuthOnlyProvider, kimiCodingOAuthProvider,
|
|
21
|
+
export { OAUTH_PROVIDER_DEFINITIONS, anthropicOAuthProvider, getModelOAuthProviderIds, getOAuthProviderDefinition, getOAuthProviderIds, getOAuthProviderInterfaces, githubCopilotOAuthProvider, antigravityOAuthProvider as googleAntigravityOAuthProvider, geminiCliOAuthProvider as googleGeminiCliOAuthProvider, isOAuthOnlyProvider, kimiCodingOAuthProvider, loginAntigravity, loginGeminiCli, openaiOAuthProvider, refreshAntigravityToken, refreshGoogleCloudToken, xopcCloudOAuthProvider, xopcShareOAuthProvider, xopcTunnelOAuthProvider };
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Kimi Coding (Moonshot AI) OAuth device code flow.
|
|
3
|
-
* @see https://auth.kimi.com
|
|
4
|
-
*/
|
|
5
|
-
import type { OAuthProviderInterface } from './types.js';
|
|
6
|
-
export declare const kimiCodingOAuthProvider: OAuthProviderInterface;
|
|
1
|
+
export declare const kimiCodingOAuthProvider: import("./types.js").OAuthProviderInterface;
|
|
@@ -1,85 +1,11 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { init_pi_oauth_adapter, piOAuthAdapter } from "./pi-oauth-adapter.js";
|
|
3
|
+
import { kimiCodingProvider } from "@earendil-works/pi-ai/providers/kimi-coding";
|
|
2
4
|
//#region src/auth/oauth/kimi-coding.ts
|
|
3
|
-
var
|
|
5
|
+
var kimiCodingOAuthProvider;
|
|
4
6
|
var init_kimi_coding = __esmMin((() => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
KIMI_OAUTH_TOKEN_URL = `${KIMI_OAUTH_BASE_URL}/api/oauth/token`;
|
|
8
|
-
KIMI_OAUTH_CLIENT_ID = "17e5f671-d194-4dfb-9706-5516cb48c098";
|
|
9
|
-
kimiCodingOAuthProvider = {
|
|
10
|
-
id: "kimi-coding",
|
|
11
|
-
name: "Kimi For Coding (月之暗面)",
|
|
12
|
-
usesCallbackServer: false,
|
|
13
|
-
async login(callbacks) {
|
|
14
|
-
const deviceResponse = await fetch(KIMI_OAUTH_DEVICE_URL, {
|
|
15
|
-
method: "POST",
|
|
16
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
17
|
-
body: new URLSearchParams({
|
|
18
|
-
client_id: KIMI_OAUTH_CLIENT_ID,
|
|
19
|
-
scope: "kimi-code"
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
if (!deviceResponse.ok) {
|
|
23
|
-
const error = await deviceResponse.text();
|
|
24
|
-
throw new Error(`Device code request failed: ${error}`);
|
|
25
|
-
}
|
|
26
|
-
const deviceData = await deviceResponse.json();
|
|
27
|
-
callbacks.onAuth({
|
|
28
|
-
url: deviceData.verification_uri_complete || deviceData.verification_uri,
|
|
29
|
-
instructions: `Please visit ${deviceData.verification_uri} and enter code: ${deviceData.user_code}`
|
|
30
|
-
});
|
|
31
|
-
const expiresAt = Date.now() + deviceData.expires_in * 1e3;
|
|
32
|
-
const pollInterval = (deviceData.interval || 5) * 1e3;
|
|
33
|
-
while (Date.now() < expiresAt) {
|
|
34
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
35
|
-
const tokenResponse = await fetch(KIMI_OAUTH_TOKEN_URL, {
|
|
36
|
-
method: "POST",
|
|
37
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
38
|
-
body: new URLSearchParams({
|
|
39
|
-
grant_type: "urn:ietf:params:oauth:grant-type:device_code",
|
|
40
|
-
client_id: KIMI_OAUTH_CLIENT_ID,
|
|
41
|
-
device_code: deviceData.device_code
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
if (tokenResponse.ok) {
|
|
45
|
-
const tokenData = await tokenResponse.json();
|
|
46
|
-
return {
|
|
47
|
-
access: tokenData.access_token,
|
|
48
|
-
refresh: tokenData.refresh_token,
|
|
49
|
-
expires: Date.now() + tokenData.expires_in * 1e3
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
if ((await tokenResponse.json()).error === "expired_token") throw new Error("Device code expired. Please try again.");
|
|
53
|
-
}
|
|
54
|
-
throw new Error("Device code expired. Please try again.");
|
|
55
|
-
},
|
|
56
|
-
async refreshToken(credentials) {
|
|
57
|
-
if (!credentials.refresh) throw new Error("Kimi OAuth refresh token missing. Re-authenticate.");
|
|
58
|
-
const response = await fetch(KIMI_OAUTH_TOKEN_URL, {
|
|
59
|
-
method: "POST",
|
|
60
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
61
|
-
body: new URLSearchParams({
|
|
62
|
-
grant_type: "refresh_token",
|
|
63
|
-
client_id: KIMI_OAUTH_CLIENT_ID,
|
|
64
|
-
refresh_token: credentials.refresh
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
if (!response.ok) {
|
|
68
|
-
const text = await response.text();
|
|
69
|
-
throw new Error(`Kimi OAuth refresh failed: ${text}`);
|
|
70
|
-
}
|
|
71
|
-
const payload = await response.json();
|
|
72
|
-
return {
|
|
73
|
-
...credentials,
|
|
74
|
-
access: payload.access_token,
|
|
75
|
-
refresh: payload.refresh_token || credentials.refresh,
|
|
76
|
-
expires: Date.now() + payload.expires_in * 1e3
|
|
77
|
-
};
|
|
78
|
-
},
|
|
79
|
-
getApiKey(credentials) {
|
|
80
|
-
return credentials.access;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
7
|
+
init_pi_oauth_adapter();
|
|
8
|
+
kimiCodingOAuthProvider = piOAuthAdapter("kimi-coding", "Kimi For Coding (月之暗面)", () => kimiCodingProvider().auth.oauth);
|
|
83
9
|
}));
|
|
84
10
|
//#endregion
|
|
85
11
|
init_kimi_coding();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
3
3
|
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
4
|
-
import { init_oauth_provider_lock, withOAuthProviderLock } from "../oauth-provider-lock.js";
|
|
5
4
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
5
|
+
import { init_oauth_provider_lock, withOAuthProviderLock } from "../oauth-provider-lock.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { OAuthAuth } from '@earendil-works/pi-ai';
|
|
2
|
+
import type { OAuthProviderInterface } from './types.js';
|
|
3
|
+
/** Translate xopc login callbacks and credentials to pi's provider-auth API. */
|
|
4
|
+
export declare function piOAuthAdapter(id: string, name: string, getOAuth: () => OAuthAuth): OAuthProviderInterface;
|