@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,201 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
//#region src/browser/automations/schema.ts
|
|
3
|
-
const ExpectationSchema = z.object({
|
|
4
|
-
urlIncludes: z.string().optional(),
|
|
5
|
-
titleIncludes: z.string().optional(),
|
|
6
|
-
textIncludes: z.string().optional(),
|
|
7
|
-
ref: z.string().optional(),
|
|
8
|
-
state: z.enum(["visible", "hidden"]).optional()
|
|
9
|
-
}).strict();
|
|
10
|
-
const TargetSchema = z.object({
|
|
11
|
-
role: z.string().min(1),
|
|
12
|
-
name: z.string().min(1).optional(),
|
|
13
|
-
nameIncludes: z.string().min(1).optional(),
|
|
14
|
-
testId: z.string().min(1).optional(),
|
|
15
|
-
scope: z.object({
|
|
16
|
-
role: z.string().min(1),
|
|
17
|
-
name: z.string().min(1)
|
|
18
|
-
}).strict().optional()
|
|
19
|
-
}).strict().superRefine((target, ctx) => {
|
|
20
|
-
if (target.name && target.nameIncludes) ctx.addIssue({
|
|
21
|
-
code: "custom",
|
|
22
|
-
message: "Use name or nameIncludes, not both."
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
const StepSchema = z.discriminatedUnion("action", [
|
|
26
|
-
z.object({
|
|
27
|
-
action: z.literal("navigate"),
|
|
28
|
-
url: z.string().min(1),
|
|
29
|
-
expect: ExpectationSchema.optional()
|
|
30
|
-
}).strict(),
|
|
31
|
-
z.object({
|
|
32
|
-
action: z.literal("click"),
|
|
33
|
-
target: TargetSchema,
|
|
34
|
-
expect: ExpectationSchema.optional()
|
|
35
|
-
}).strict(),
|
|
36
|
-
z.object({
|
|
37
|
-
action: z.literal("fill"),
|
|
38
|
-
target: TargetSchema,
|
|
39
|
-
value: z.string(),
|
|
40
|
-
submit: z.boolean().optional(),
|
|
41
|
-
expect: ExpectationSchema.optional()
|
|
42
|
-
}).strict(),
|
|
43
|
-
z.object({
|
|
44
|
-
action: z.literal("select"),
|
|
45
|
-
target: TargetSchema,
|
|
46
|
-
value: z.string(),
|
|
47
|
-
expect: ExpectationSchema.optional()
|
|
48
|
-
}).strict(),
|
|
49
|
-
z.object({
|
|
50
|
-
action: z.literal("check"),
|
|
51
|
-
target: TargetSchema,
|
|
52
|
-
checked: z.boolean()
|
|
53
|
-
}).strict(),
|
|
54
|
-
z.object({
|
|
55
|
-
action: z.literal("press"),
|
|
56
|
-
target: TargetSchema.optional(),
|
|
57
|
-
key: z.string().min(1),
|
|
58
|
-
expect: ExpectationSchema.optional()
|
|
59
|
-
}).strict(),
|
|
60
|
-
z.object({
|
|
61
|
-
action: z.literal("scroll"),
|
|
62
|
-
target: TargetSchema.optional(),
|
|
63
|
-
deltaY: z.number(),
|
|
64
|
-
expect: ExpectationSchema.optional()
|
|
65
|
-
}).strict(),
|
|
66
|
-
z.object({
|
|
67
|
-
action: z.literal("wait"),
|
|
68
|
-
condition: z.enum([
|
|
69
|
-
"page_idle",
|
|
70
|
-
"text",
|
|
71
|
-
"visible",
|
|
72
|
-
"hidden"
|
|
73
|
-
]),
|
|
74
|
-
value: z.string().optional(),
|
|
75
|
-
target: TargetSchema.optional(),
|
|
76
|
-
timeoutMs: z.number().int().min(100).max(12e4).optional()
|
|
77
|
-
}).strict()
|
|
78
|
-
]);
|
|
79
|
-
const InputSchema = z.object({
|
|
80
|
-
type: z.enum([
|
|
81
|
-
"string",
|
|
82
|
-
"number",
|
|
83
|
-
"boolean"
|
|
84
|
-
]),
|
|
85
|
-
required: z.boolean().optional(),
|
|
86
|
-
default: z.union([
|
|
87
|
-
z.string(),
|
|
88
|
-
z.number(),
|
|
89
|
-
z.boolean()
|
|
90
|
-
]).optional(),
|
|
91
|
-
description: z.string().min(1).max(200).optional(),
|
|
92
|
-
choices: z.array(z.union([
|
|
93
|
-
z.string(),
|
|
94
|
-
z.number(),
|
|
95
|
-
z.boolean()
|
|
96
|
-
])).min(1).max(50).optional()
|
|
97
|
-
}).strict().superRefine((input, ctx) => {
|
|
98
|
-
if (input.default !== void 0 && typeof input.default !== input.type) ctx.addIssue({
|
|
99
|
-
code: "custom",
|
|
100
|
-
message: `Default must be ${input.type}.`
|
|
101
|
-
});
|
|
102
|
-
if (input.choices?.some((choice) => typeof choice !== input.type)) ctx.addIssue({
|
|
103
|
-
code: "custom",
|
|
104
|
-
message: `Every choice must be ${input.type}.`
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
const DomainSchema = z.string().min(1).refine((value) => {
|
|
108
|
-
if (value !== value.toLowerCase() || value.includes("/") || value.includes(":")) return false;
|
|
109
|
-
try {
|
|
110
|
-
return new URL(`https://${value}`).hostname === value;
|
|
111
|
-
} catch {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
}, "Domain must be one exact lowercase hostname.");
|
|
115
|
-
const BrowserAutomationDefinitionSchema = z.object({
|
|
116
|
-
id: z.string().regex(/^[a-z][a-z0-9-]{1,63}$/),
|
|
117
|
-
name: z.string().min(1).max(120),
|
|
118
|
-
description: z.string().max(500).optional(),
|
|
119
|
-
allowedDomains: z.array(DomainSchema).min(1),
|
|
120
|
-
risk: z.enum([
|
|
121
|
-
"read",
|
|
122
|
-
"draft",
|
|
123
|
-
"external_effect",
|
|
124
|
-
"destructive",
|
|
125
|
-
"sensitive"
|
|
126
|
-
]),
|
|
127
|
-
inputs: z.record(z.string(), InputSchema).default({}),
|
|
128
|
-
steps: z.array(StepSchema).min(1).max(100),
|
|
129
|
-
successCriteria: z.array(z.object({
|
|
130
|
-
target: TargetSchema.optional(),
|
|
131
|
-
field: z.enum([
|
|
132
|
-
"text",
|
|
133
|
-
"value",
|
|
134
|
-
"url",
|
|
135
|
-
"title",
|
|
136
|
-
"checked"
|
|
137
|
-
]),
|
|
138
|
-
equals: z.union([z.string(), z.boolean()]).optional(),
|
|
139
|
-
includes: z.string().optional()
|
|
140
|
-
}).strict().superRefine((assertion, ctx) => {
|
|
141
|
-
if (assertion.equals === void 0 === (assertion.includes === void 0)) ctx.addIssue({
|
|
142
|
-
code: "custom",
|
|
143
|
-
message: "Specify exactly one comparison."
|
|
144
|
-
});
|
|
145
|
-
if (assertion.field === "checked" && typeof assertion.equals !== "boolean") ctx.addIssue({
|
|
146
|
-
code: "custom",
|
|
147
|
-
message: "Checked assertions require a boolean comparison."
|
|
148
|
-
});
|
|
149
|
-
if (assertion.field !== "checked" && typeof assertion.equals === "boolean") ctx.addIssue({
|
|
150
|
-
code: "custom",
|
|
151
|
-
message: "Text assertions require a string comparison."
|
|
152
|
-
});
|
|
153
|
-
if (!["url", "title"].includes(assertion.field) && !assertion.target) ctx.addIssue({
|
|
154
|
-
code: "custom",
|
|
155
|
-
message: "Element assertions require a target."
|
|
156
|
-
});
|
|
157
|
-
})).max(20).optional(),
|
|
158
|
-
outputs: z.record(z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), z.object({
|
|
159
|
-
target: TargetSchema.optional(),
|
|
160
|
-
field: z.enum([
|
|
161
|
-
"text",
|
|
162
|
-
"value",
|
|
163
|
-
"url",
|
|
164
|
-
"title",
|
|
165
|
-
"href"
|
|
166
|
-
])
|
|
167
|
-
}).strict().superRefine((output, ctx) => {
|
|
168
|
-
if (!["url", "title"].includes(output.field) && !output.target) ctx.addIssue({
|
|
169
|
-
code: "custom",
|
|
170
|
-
message: "Element outputs require a target."
|
|
171
|
-
});
|
|
172
|
-
})).optional()
|
|
173
|
-
}).strict().superRefine((definition, ctx) => {
|
|
174
|
-
if (new Set(definition.allowedDomains).size !== definition.allowedDomains.length) ctx.addIssue({
|
|
175
|
-
code: "custom",
|
|
176
|
-
path: ["allowedDomains"],
|
|
177
|
-
message: "Domains must be unique."
|
|
178
|
-
});
|
|
179
|
-
for (const spec of Object.values(definition.inputs)) if (spec.default !== void 0 && spec.choices && !spec.choices.includes(spec.default)) ctx.addIssue({
|
|
180
|
-
code: "custom",
|
|
181
|
-
message: "Default must be an allowed choice."
|
|
182
|
-
});
|
|
183
|
-
for (const [index, step] of definition.steps.entries()) {
|
|
184
|
-
const values = step.action === "navigate" ? [step.url] : step.action === "fill" || step.action === "select" ? [step.value] : step.action === "press" ? [step.key] : step.action === "wait" && step.value ? [step.value] : [];
|
|
185
|
-
for (const value of values) for (const match of value.matchAll(/\$\{input\.([a-zA-Z][a-zA-Z0-9_]*)\}/g)) if (!definition.inputs[match[1]]) ctx.addIssue({
|
|
186
|
-
code: "custom",
|
|
187
|
-
path: ["steps", index],
|
|
188
|
-
message: `Unknown input template: ${match[1]}.`
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
for (const [index, assertion] of (definition.successCriteria ?? []).entries()) for (const value of [assertion.equals, assertion.includes]) {
|
|
192
|
-
if (typeof value !== "string") continue;
|
|
193
|
-
for (const match of value.matchAll(/\$\{input\.([a-zA-Z][a-zA-Z0-9_]*)\}/g)) if (!definition.inputs[match[1]]) ctx.addIssue({
|
|
194
|
-
code: "custom",
|
|
195
|
-
path: ["successCriteria", index],
|
|
196
|
-
message: `Unknown input template: ${match[1]}.`
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
//#endregion
|
|
201
|
-
export { BrowserAutomationDefinitionSchema };
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import type { BrowserAutomation, BrowserAutomationDefinition, BrowserAutomationRun, BrowserAutomationStatus } from './types.js';
|
|
2
|
-
export type BrowserAutomationExecutor = (input: {
|
|
3
|
-
definition: BrowserAutomationDefinition;
|
|
4
|
-
inputs: Record<string, unknown>;
|
|
5
|
-
signal: AbortSignal;
|
|
6
|
-
onStep: (event: unknown) => void;
|
|
7
|
-
runId: string;
|
|
8
|
-
}) => Promise<{
|
|
9
|
-
ok: boolean;
|
|
10
|
-
result?: unknown;
|
|
11
|
-
error?: string;
|
|
12
|
-
businessOutcome?: BrowserAutomationRun['businessOutcome'];
|
|
13
|
-
}>;
|
|
14
|
-
export declare class BrowserAutomationService {
|
|
15
|
-
private readonly executor;
|
|
16
|
-
private readonly emit?;
|
|
17
|
-
private activeRuns;
|
|
18
|
-
private executions;
|
|
19
|
-
private waiters;
|
|
20
|
-
constructor(executor: BrowserAutomationExecutor, emit?: (type: string, payload: unknown) => void);
|
|
21
|
-
list(): BrowserAutomation[];
|
|
22
|
-
get(id: string): BrowserAutomation;
|
|
23
|
-
versions(id: string): BrowserAutomation[];
|
|
24
|
-
listRuns(automationId?: string): BrowserAutomationRun[];
|
|
25
|
-
getRun(id: string): BrowserAutomationRun;
|
|
26
|
-
listRunEvents(id: string): import("./types.js").BrowserAutomationRunEvent[];
|
|
27
|
-
validate(definition: unknown): import("zod/index.cjs").ZodSafeParseResult<{
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
allowedDomains: string[];
|
|
31
|
-
risk: "read" | "draft" | "destructive" | "sensitive" | "external_effect";
|
|
32
|
-
inputs: Record<string, {
|
|
33
|
-
type: "string" | "number" | "boolean";
|
|
34
|
-
required?: boolean;
|
|
35
|
-
default?: string | number | boolean;
|
|
36
|
-
description?: string;
|
|
37
|
-
choices?: (string | number | boolean)[];
|
|
38
|
-
}>;
|
|
39
|
-
steps: ({
|
|
40
|
-
action: "navigate";
|
|
41
|
-
url: string;
|
|
42
|
-
expect?: {
|
|
43
|
-
urlIncludes?: string;
|
|
44
|
-
titleIncludes?: string;
|
|
45
|
-
textIncludes?: string;
|
|
46
|
-
ref?: string;
|
|
47
|
-
state?: "hidden" | "visible";
|
|
48
|
-
};
|
|
49
|
-
} | {
|
|
50
|
-
action: "click";
|
|
51
|
-
target: {
|
|
52
|
-
role: string;
|
|
53
|
-
name?: string;
|
|
54
|
-
nameIncludes?: string;
|
|
55
|
-
testId?: string;
|
|
56
|
-
scope?: {
|
|
57
|
-
role: string;
|
|
58
|
-
name: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
expect?: {
|
|
62
|
-
urlIncludes?: string;
|
|
63
|
-
titleIncludes?: string;
|
|
64
|
-
textIncludes?: string;
|
|
65
|
-
ref?: string;
|
|
66
|
-
state?: "hidden" | "visible";
|
|
67
|
-
};
|
|
68
|
-
} | {
|
|
69
|
-
action: "fill";
|
|
70
|
-
target: {
|
|
71
|
-
role: string;
|
|
72
|
-
name?: string;
|
|
73
|
-
nameIncludes?: string;
|
|
74
|
-
testId?: string;
|
|
75
|
-
scope?: {
|
|
76
|
-
role: string;
|
|
77
|
-
name: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
value: string;
|
|
81
|
-
submit?: boolean;
|
|
82
|
-
expect?: {
|
|
83
|
-
urlIncludes?: string;
|
|
84
|
-
titleIncludes?: string;
|
|
85
|
-
textIncludes?: string;
|
|
86
|
-
ref?: string;
|
|
87
|
-
state?: "hidden" | "visible";
|
|
88
|
-
};
|
|
89
|
-
} | {
|
|
90
|
-
action: "select";
|
|
91
|
-
target: {
|
|
92
|
-
role: string;
|
|
93
|
-
name?: string;
|
|
94
|
-
nameIncludes?: string;
|
|
95
|
-
testId?: string;
|
|
96
|
-
scope?: {
|
|
97
|
-
role: string;
|
|
98
|
-
name: string;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
value: string;
|
|
102
|
-
expect?: {
|
|
103
|
-
urlIncludes?: string;
|
|
104
|
-
titleIncludes?: string;
|
|
105
|
-
textIncludes?: string;
|
|
106
|
-
ref?: string;
|
|
107
|
-
state?: "hidden" | "visible";
|
|
108
|
-
};
|
|
109
|
-
} | {
|
|
110
|
-
action: "check";
|
|
111
|
-
target: {
|
|
112
|
-
role: string;
|
|
113
|
-
name?: string;
|
|
114
|
-
nameIncludes?: string;
|
|
115
|
-
testId?: string;
|
|
116
|
-
scope?: {
|
|
117
|
-
role: string;
|
|
118
|
-
name: string;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
checked: boolean;
|
|
122
|
-
} | {
|
|
123
|
-
action: "press";
|
|
124
|
-
key: string;
|
|
125
|
-
target?: {
|
|
126
|
-
role: string;
|
|
127
|
-
name?: string;
|
|
128
|
-
nameIncludes?: string;
|
|
129
|
-
testId?: string;
|
|
130
|
-
scope?: {
|
|
131
|
-
role: string;
|
|
132
|
-
name: string;
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
expect?: {
|
|
136
|
-
urlIncludes?: string;
|
|
137
|
-
titleIncludes?: string;
|
|
138
|
-
textIncludes?: string;
|
|
139
|
-
ref?: string;
|
|
140
|
-
state?: "hidden" | "visible";
|
|
141
|
-
};
|
|
142
|
-
} | {
|
|
143
|
-
action: "scroll";
|
|
144
|
-
deltaY: number;
|
|
145
|
-
target?: {
|
|
146
|
-
role: string;
|
|
147
|
-
name?: string;
|
|
148
|
-
nameIncludes?: string;
|
|
149
|
-
testId?: string;
|
|
150
|
-
scope?: {
|
|
151
|
-
role: string;
|
|
152
|
-
name: string;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
expect?: {
|
|
156
|
-
urlIncludes?: string;
|
|
157
|
-
titleIncludes?: string;
|
|
158
|
-
textIncludes?: string;
|
|
159
|
-
ref?: string;
|
|
160
|
-
state?: "hidden" | "visible";
|
|
161
|
-
};
|
|
162
|
-
} | {
|
|
163
|
-
action: "wait";
|
|
164
|
-
condition: "text" | "hidden" | "visible" | "page_idle";
|
|
165
|
-
value?: string;
|
|
166
|
-
target?: {
|
|
167
|
-
role: string;
|
|
168
|
-
name?: string;
|
|
169
|
-
nameIncludes?: string;
|
|
170
|
-
testId?: string;
|
|
171
|
-
scope?: {
|
|
172
|
-
role: string;
|
|
173
|
-
name: string;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
timeoutMs?: number;
|
|
177
|
-
})[];
|
|
178
|
-
description?: string;
|
|
179
|
-
successCriteria?: {
|
|
180
|
-
field: "value" | "text" | "url" | "title" | "checked";
|
|
181
|
-
target?: {
|
|
182
|
-
role: string;
|
|
183
|
-
name?: string;
|
|
184
|
-
nameIncludes?: string;
|
|
185
|
-
testId?: string;
|
|
186
|
-
scope?: {
|
|
187
|
-
role: string;
|
|
188
|
-
name: string;
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
equals?: string | boolean;
|
|
192
|
-
includes?: string;
|
|
193
|
-
}[];
|
|
194
|
-
outputs?: Record<string, {
|
|
195
|
-
field: "value" | "text" | "url" | "title" | "href";
|
|
196
|
-
target?: {
|
|
197
|
-
role: string;
|
|
198
|
-
name?: string;
|
|
199
|
-
nameIncludes?: string;
|
|
200
|
-
testId?: string;
|
|
201
|
-
scope?: {
|
|
202
|
-
role: string;
|
|
203
|
-
name: string;
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
}>;
|
|
207
|
-
}>;
|
|
208
|
-
save(input: {
|
|
209
|
-
definition: unknown;
|
|
210
|
-
status?: BrowserAutomationStatus;
|
|
211
|
-
expectedId?: string;
|
|
212
|
-
expectedRevision?: number;
|
|
213
|
-
}): BrowserAutomation;
|
|
214
|
-
remove(id: string): boolean;
|
|
215
|
-
startRun(automationId: string, inputs: Record<string, unknown>, context?: BrowserAutomationExecutionContext): BrowserAutomationRun;
|
|
216
|
-
cancel(runId: string): boolean;
|
|
217
|
-
shutdown(): Promise<void>;
|
|
218
|
-
runAndWait(automationId: string, inputs: Record<string, unknown>, signal?: AbortSignal, context?: BrowserAutomationExecutionContext): Promise<BrowserAutomationRun>;
|
|
219
|
-
private addEvent;
|
|
220
|
-
private execute;
|
|
221
|
-
}
|
|
222
|
-
export interface BrowserAutomationExecutionContext {
|
|
223
|
-
revision?: number;
|
|
224
|
-
clientRequestId?: string;
|
|
225
|
-
triggerEvent?: {
|
|
226
|
-
type: string;
|
|
227
|
-
source?: string;
|
|
228
|
-
payload?: Record<string, unknown>;
|
|
229
|
-
occurredAtMs?: number;
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
export declare function mergeBrowserAutomationTriggerInputs(definition: BrowserAutomationDefinition, inputs: Record<string, unknown>, context?: BrowserAutomationExecutionContext): Record<string, unknown>;
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { BrowserAutomationDefinitionSchema } from "./schema.js";
|
|
2
|
-
import { resolveBrowserAutomationInputs } from "./runner.js";
|
|
3
|
-
import { appendBrowserAutomationRunEvent, deleteBrowserAutomation, findBrowserAutomationRunByRequest, getBrowserAutomation, getBrowserAutomationRun, getBrowserAutomationVersion, hasActiveBrowserAutomationRuns, listActiveBrowserAutomationRuns, listBrowserAutomationRunEvents, listBrowserAutomationRuns, listBrowserAutomationVersions, listBrowserAutomations, nextBrowserAutomationRunEventSeq, saveBrowserAutomation, saveBrowserAutomationRun, verifyBrowserAutomationRun } from "./repository.js";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
//#region src/browser/automations/service.ts
|
|
6
|
-
var BrowserAutomationService = class {
|
|
7
|
-
activeRuns = /* @__PURE__ */ new Map();
|
|
8
|
-
executions = /* @__PURE__ */ new Map();
|
|
9
|
-
waiters = /* @__PURE__ */ new Map();
|
|
10
|
-
constructor(executor, emit) {
|
|
11
|
-
this.executor = executor;
|
|
12
|
-
this.emit = emit;
|
|
13
|
-
for (const run of listActiveBrowserAutomationRuns()) {
|
|
14
|
-
const endedAtMs = Date.now();
|
|
15
|
-
saveBrowserAutomationRun({
|
|
16
|
-
...run,
|
|
17
|
-
status: "failed",
|
|
18
|
-
businessOutcome: "unknown",
|
|
19
|
-
error: "Gateway stopped before the run completed. Check the business result before running again.",
|
|
20
|
-
endedAtMs,
|
|
21
|
-
durationMs: run.startedAtMs ? endedAtMs - run.startedAtMs : void 0
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
list() {
|
|
26
|
-
return listBrowserAutomations();
|
|
27
|
-
}
|
|
28
|
-
get(id) {
|
|
29
|
-
return getBrowserAutomation(id);
|
|
30
|
-
}
|
|
31
|
-
versions(id) {
|
|
32
|
-
return listBrowserAutomationVersions(id);
|
|
33
|
-
}
|
|
34
|
-
listRuns(automationId) {
|
|
35
|
-
return listBrowserAutomationRuns(automationId);
|
|
36
|
-
}
|
|
37
|
-
getRun(id) {
|
|
38
|
-
return getBrowserAutomationRun(id);
|
|
39
|
-
}
|
|
40
|
-
listRunEvents(id) {
|
|
41
|
-
return listBrowserAutomationRunEvents(id);
|
|
42
|
-
}
|
|
43
|
-
validate(definition) {
|
|
44
|
-
return BrowserAutomationDefinitionSchema.safeParse(definition);
|
|
45
|
-
}
|
|
46
|
-
save(input) {
|
|
47
|
-
const parsed = BrowserAutomationDefinitionSchema.parse(input.definition);
|
|
48
|
-
if (input.expectedId && parsed.id !== input.expectedId) throw new Error("Browser automation id cannot change.");
|
|
49
|
-
const existing = getBrowserAutomation(parsed.id);
|
|
50
|
-
if (input.expectedRevision !== void 0 && existing?.revision !== input.expectedRevision) throw new Error("Browser automation revision changed. Reload before saving.");
|
|
51
|
-
const changed = !existing || canonical(existing.definition) !== canonical(parsed);
|
|
52
|
-
const now = Date.now();
|
|
53
|
-
const automation = {
|
|
54
|
-
id: parsed.id,
|
|
55
|
-
verified: !changed && !!existing?.verified,
|
|
56
|
-
revision: (existing?.revision ?? 0) + (changed ? 1 : 0),
|
|
57
|
-
status: input.status ?? existing?.status ?? "enabled",
|
|
58
|
-
definition: parsed,
|
|
59
|
-
createdAtMs: existing?.createdAtMs ?? now,
|
|
60
|
-
updatedAtMs: now
|
|
61
|
-
};
|
|
62
|
-
saveBrowserAutomation(automation);
|
|
63
|
-
return automation;
|
|
64
|
-
}
|
|
65
|
-
remove(id) {
|
|
66
|
-
if (hasActiveBrowserAutomationRuns(id)) throw new Error("Cannot delete a running browser automation.");
|
|
67
|
-
return deleteBrowserAutomation(id);
|
|
68
|
-
}
|
|
69
|
-
startRun(automationId, inputs, context) {
|
|
70
|
-
const requestId = context?.clientRequestId;
|
|
71
|
-
if (requestId) {
|
|
72
|
-
const previous = findBrowserAutomationRunByRequest(requestId);
|
|
73
|
-
if (previous) {
|
|
74
|
-
const contextualInputs = mergeBrowserAutomationTriggerInputs(previous.definition, inputs, context);
|
|
75
|
-
if (previous.automationId !== automationId || context?.revision !== void 0 && context.revision !== previous.automationRevision || canonical(previous.inputs) !== canonical(resolveBrowserAutomationInputs(previous.definition, contextualInputs))) throw new Error("Run request id was reused with a different automation, revision or inputs.");
|
|
76
|
-
return previous;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const automation = context?.revision !== void 0 ? getBrowserAutomationVersion(automationId, context.revision) : getBrowserAutomation(automationId);
|
|
80
|
-
if (!automation) throw new Error("Browser automation not found.");
|
|
81
|
-
if (automation.status !== "enabled") throw new Error("Browser automation is disabled.");
|
|
82
|
-
const contextualInputs = mergeBrowserAutomationTriggerInputs(automation.definition, inputs, context);
|
|
83
|
-
const resolvedInputs = resolveBrowserAutomationInputs(automation.definition, contextualInputs);
|
|
84
|
-
const run = {
|
|
85
|
-
clientRequestId: requestId,
|
|
86
|
-
id: randomUUID(),
|
|
87
|
-
automationId,
|
|
88
|
-
automationRevision: automation.revision,
|
|
89
|
-
definition: automation.definition,
|
|
90
|
-
status: "queued",
|
|
91
|
-
inputs: resolvedInputs,
|
|
92
|
-
createdAtMs: Date.now()
|
|
93
|
-
};
|
|
94
|
-
saveBrowserAutomationRun(run);
|
|
95
|
-
this.addEvent(run.id, "run.queued", { automationId });
|
|
96
|
-
const execution = this.execute(run);
|
|
97
|
-
this.executions.set(run.id, execution);
|
|
98
|
-
execution.finally(() => this.executions.delete(run.id)).catch(() => void 0);
|
|
99
|
-
return run;
|
|
100
|
-
}
|
|
101
|
-
cancel(runId) {
|
|
102
|
-
const active = this.activeRuns.get(runId);
|
|
103
|
-
if (!active) return false;
|
|
104
|
-
active.abort();
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
async shutdown() {
|
|
108
|
-
for (const active of this.activeRuns.values()) active.abort();
|
|
109
|
-
await Promise.allSettled(this.executions.values());
|
|
110
|
-
}
|
|
111
|
-
async runAndWait(automationId, inputs, signal, context) {
|
|
112
|
-
const run = this.startRun(automationId, inputs, context);
|
|
113
|
-
const terminal = this.getRun(run.id);
|
|
114
|
-
if (terminal && !["queued", "running"].includes(terminal.status)) return terminal;
|
|
115
|
-
return new Promise((resolve) => {
|
|
116
|
-
const complete = (value) => {
|
|
117
|
-
signal?.removeEventListener("abort", onAbort);
|
|
118
|
-
resolve(value);
|
|
119
|
-
};
|
|
120
|
-
const onAbort = () => this.cancel(run.id);
|
|
121
|
-
const set = this.waiters.get(run.id) ?? /* @__PURE__ */ new Set();
|
|
122
|
-
set.add(complete);
|
|
123
|
-
this.waiters.set(run.id, set);
|
|
124
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
125
|
-
if (signal?.aborted) onAbort();
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
addEvent(runId, type, data) {
|
|
129
|
-
const event = {
|
|
130
|
-
id: randomUUID(),
|
|
131
|
-
runId,
|
|
132
|
-
seq: nextBrowserAutomationRunEventSeq(runId),
|
|
133
|
-
type,
|
|
134
|
-
data,
|
|
135
|
-
createdAtMs: Date.now()
|
|
136
|
-
};
|
|
137
|
-
appendBrowserAutomationRunEvent(event);
|
|
138
|
-
this.emit?.(`browser.automation.${type}`, event);
|
|
139
|
-
}
|
|
140
|
-
async execute(run) {
|
|
141
|
-
const controller = new AbortController();
|
|
142
|
-
this.activeRuns.set(run.id, controller);
|
|
143
|
-
const startedAtMs = Date.now();
|
|
144
|
-
let current = {
|
|
145
|
-
...run,
|
|
146
|
-
status: "running",
|
|
147
|
-
startedAtMs
|
|
148
|
-
};
|
|
149
|
-
saveBrowserAutomationRun(current);
|
|
150
|
-
this.addEvent(run.id, "run.started");
|
|
151
|
-
try {
|
|
152
|
-
const outcome = await this.executor({
|
|
153
|
-
runId: run.id,
|
|
154
|
-
definition: run.definition,
|
|
155
|
-
inputs: run.inputs,
|
|
156
|
-
signal: controller.signal,
|
|
157
|
-
onStep: (event) => this.addEvent(run.id, "step", event)
|
|
158
|
-
});
|
|
159
|
-
const endedAtMs = Date.now();
|
|
160
|
-
current = {
|
|
161
|
-
...current,
|
|
162
|
-
status: controller.signal.aborted ? "cancelled" : outcome.ok ? "succeeded" : "failed",
|
|
163
|
-
result: outcome.result,
|
|
164
|
-
error: outcome.error,
|
|
165
|
-
businessOutcome: outcome.businessOutcome ?? (!outcome.ok && run.definition.steps.some((step) => [
|
|
166
|
-
"click",
|
|
167
|
-
"press",
|
|
168
|
-
"fill",
|
|
169
|
-
"select",
|
|
170
|
-
"check"
|
|
171
|
-
].includes(step.action)) ? "unknown" : "completed"),
|
|
172
|
-
endedAtMs,
|
|
173
|
-
durationMs: endedAtMs - startedAtMs
|
|
174
|
-
};
|
|
175
|
-
} catch (error) {
|
|
176
|
-
const endedAtMs = Date.now();
|
|
177
|
-
current = {
|
|
178
|
-
...current,
|
|
179
|
-
status: controller.signal.aborted ? "cancelled" : "failed",
|
|
180
|
-
businessOutcome: "unknown",
|
|
181
|
-
error: error instanceof Error ? error.message : String(error),
|
|
182
|
-
endedAtMs,
|
|
183
|
-
durationMs: endedAtMs - startedAtMs
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
saveBrowserAutomationRun(current);
|
|
187
|
-
verifyBrowserAutomationRun(current);
|
|
188
|
-
this.addEvent(run.id, "run.completed", {
|
|
189
|
-
status: current.status,
|
|
190
|
-
error: current.error
|
|
191
|
-
});
|
|
192
|
-
this.activeRuns.delete(run.id);
|
|
193
|
-
for (const waiter of this.waiters.get(run.id) ?? []) waiter(current);
|
|
194
|
-
this.waiters.delete(run.id);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
function mergeBrowserAutomationTriggerInputs(definition, inputs, context) {
|
|
198
|
-
const event = context?.triggerEvent;
|
|
199
|
-
if (!event) return inputs;
|
|
200
|
-
const candidates = {
|
|
201
|
-
...event.payload ?? {},
|
|
202
|
-
eventType: event.type,
|
|
203
|
-
...event.source ? { eventSource: event.source } : {},
|
|
204
|
-
...event.occurredAtMs !== void 0 ? { occurredAtMs: event.occurredAtMs } : {}
|
|
205
|
-
};
|
|
206
|
-
const merged = { ...inputs };
|
|
207
|
-
for (const name of Object.keys(definition.inputs)) if (merged[name] === void 0 && candidates[name] !== void 0) merged[name] = candidates[name];
|
|
208
|
-
return merged;
|
|
209
|
-
}
|
|
210
|
-
function canonical(value) {
|
|
211
|
-
return JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.entries(item).sort(([a], [b]) => a.localeCompare(b))) : item);
|
|
212
|
-
}
|
|
213
|
-
//#endregion
|
|
214
|
-
export { BrowserAutomationService, mergeBrowserAutomationTriggerInputs };
|