@xopcai/xopc 0.0.441 → 0.0.442
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/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-Chneosh4.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-CAqwtADW.js → agents-DKfOY5z9.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-CewiIx4v.js → agents-admin-api-DPLtjJtX.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CE6gdBWx.js → api-CEzBruRJ.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DRyQFk9q.js → api-ClZ7BrD4.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-CBLj-m2k.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-DLg-LYCm.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-D3Cb5vfR.js → automations-page-CYngiwxI.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-zyhyqSdH.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-BpYi2fQO.js +1 -0
- package/dist/gateway/static/root/assets/{capabilities-DG0ckPuF.js → capabilities-oWWLfwf3.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-Dlgwv1dI.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CslXPIs8.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-P-xOLYBz.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-Cen4dGHa.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CEaFlZEs.js → chat-terminal-dock-DTQL2DBu.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-B1GFVFK_.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-sULM6YyQ.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-DN9BOiFk.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-D2Dhtu6H.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-DTwDBQQ9.js → extension-iframe-host-Dra7k_6o.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-Dd16lQg-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-D-Fa5PU-.js → extension-provider-C4WwnCxf.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-ycMuOpv3.js → extension-settings-page-BHwQ2ipj.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-D-gy9LlQ.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-CqQZfWRQ.js +11 -0
- package/dist/gateway/static/root/assets/index-D7Noveui.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-Drbzz4Lm.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-BQdgpm0s.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-IefutMyg.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-DDmLslYG.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-DkrDSJqk.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-COU6H_jO.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-DaQhXcev.js → product-preview-modal-Ct5q4tv6.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-BHLOHrat.js → project-detail-page-CQj7nm6I.js} +1 -1
- 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-sWxQJrFS.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-CDQtPdgq.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-Czu9GpZX.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-DgXRw0_8.js → sessions-page-CGkbbrz-.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-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/{settings-page-SQwLKlTr.js → settings-page-zGjDXdHY.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-Bs3VjTGj.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-BseSozxm.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/{system-settings-panel-a4mBz4J2.js → system-settings-panel-BltKPJdb.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-B9akf3i8.js → task-detail-page-CwMpmFVS.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-evidence-DFiu5SlL.js → task-result-evidence-BNhYqUAa.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-CMtFem_g.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-BO2OFCoA.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-DA6SxZPQ.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-g4SwMHbx.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-DG5ZMfaY.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-B5_01fi_.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-Cc92OabY.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-fKmmIslV.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-C_0lUEsm.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-BQrTy-8o.js → workspace-open-location-menu-BznuSmFZ.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 +95 -98
- 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/src/agent/agent-manager.d.ts +0 -1
- package/dist/src/agent/agent-manager.js +0 -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/tools/factory.d.ts +0 -2
- package/dist/src/agent/tools/factory.js +0 -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/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 +0 -12
- 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 +0 -24
- package/dist/src/automations/domain/validation.js +0 -7
- package/dist/src/automations/draft/automation-draft-validator.d.ts +0 -6
- 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/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +3 -3
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/update.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/gateway/hono/app.js +1 -1
- package/dist/src/gateway/hono/middleware/auth.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/desktop-host.js +1 -1
- package/dist/src/gateway/hono/routes/exposure.js +1 -1
- package/dist/src/gateway/hono/routes/files.js +2 -2
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -16
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/logs.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -5
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +5 -5
- package/dist/src/gateway/hono/routes/status.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/tunnel.js +2 -2
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/index.js +2 -2
- package/dist/src/gateway/provider-model-setup.js +1 -1
- package/dist/src/gateway/run-loop.js +2 -2
- package/dist/src/gateway/security/audit.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +0 -2
- package/dist/src/gateway/security/index.js +2 -2
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +2 -2
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.d.ts +0 -3
- package/dist/src/gateway/service.js +31 -46
- package/dist/src/gateway/side-chat/run-service.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/notifications/service.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 +10 -0
- package/dist/src/phone/stream-gateway.js +1 -1
- 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/providers/setup/voice.js +1 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/share/site-share-router.js +2 -2
- package/dist/src/storage/sqlite/schema.sql +0 -81
- package/dist/src/tasks/home-query-service.js +0 -1
- package/dist/src/tui/backends/embedded-backend.js +3 -3
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/dist/src/work-discovery/index.js +2 -2
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/service.js +3 -3
- package/package.json +9 -9
- 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/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/star-BUWJqJ5c.js +0 -1
- 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,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 };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import type { BrowserExpectation, BrowserRiskLevel } from '@xopcai/browser-control-contract';
|
|
2
|
-
import type { BrowserSemanticTarget } from '@xopcai/browser-control-contract';
|
|
3
|
-
export type { BrowserSemanticTarget } from '@xopcai/browser-control-contract';
|
|
4
|
-
export type BrowserAutomationStatus = 'enabled' | 'disabled';
|
|
5
|
-
export type BrowserAutomationRunStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
6
|
-
export interface BrowserAutomationInputDefinition {
|
|
7
|
-
type: 'string' | 'number' | 'boolean';
|
|
8
|
-
required?: boolean;
|
|
9
|
-
default?: string | number | boolean;
|
|
10
|
-
description?: string;
|
|
11
|
-
choices?: Array<string | number | boolean>;
|
|
12
|
-
}
|
|
13
|
-
export interface BrowserAutomationAssertion {
|
|
14
|
-
target?: BrowserSemanticTarget;
|
|
15
|
-
field: 'text' | 'value' | 'url' | 'title' | 'checked';
|
|
16
|
-
equals?: string | boolean;
|
|
17
|
-
includes?: string;
|
|
18
|
-
}
|
|
19
|
-
export type BrowserAutomationStep = {
|
|
20
|
-
action: 'navigate';
|
|
21
|
-
url: string;
|
|
22
|
-
expect?: BrowserExpectation;
|
|
23
|
-
} | {
|
|
24
|
-
action: 'click';
|
|
25
|
-
target: BrowserSemanticTarget;
|
|
26
|
-
expect?: BrowserExpectation;
|
|
27
|
-
} | {
|
|
28
|
-
action: 'fill';
|
|
29
|
-
target: BrowserSemanticTarget;
|
|
30
|
-
value: string;
|
|
31
|
-
submit?: boolean;
|
|
32
|
-
expect?: BrowserExpectation;
|
|
33
|
-
} | {
|
|
34
|
-
action: 'select';
|
|
35
|
-
target: BrowserSemanticTarget;
|
|
36
|
-
value: string;
|
|
37
|
-
expect?: BrowserExpectation;
|
|
38
|
-
} | {
|
|
39
|
-
action: 'check';
|
|
40
|
-
target: BrowserSemanticTarget;
|
|
41
|
-
checked: boolean;
|
|
42
|
-
} | {
|
|
43
|
-
action: 'press';
|
|
44
|
-
target?: BrowserSemanticTarget;
|
|
45
|
-
key: string;
|
|
46
|
-
expect?: BrowserExpectation;
|
|
47
|
-
} | {
|
|
48
|
-
action: 'scroll';
|
|
49
|
-
target?: BrowserSemanticTarget;
|
|
50
|
-
deltaY: number;
|
|
51
|
-
expect?: BrowserExpectation;
|
|
52
|
-
} | {
|
|
53
|
-
action: 'wait';
|
|
54
|
-
condition: 'page_idle' | 'text' | 'visible' | 'hidden';
|
|
55
|
-
value?: string;
|
|
56
|
-
target?: BrowserSemanticTarget;
|
|
57
|
-
timeoutMs?: number;
|
|
58
|
-
};
|
|
59
|
-
export interface BrowserAutomationDefinition {
|
|
60
|
-
id: string;
|
|
61
|
-
name: string;
|
|
62
|
-
description?: string;
|
|
63
|
-
allowedDomains: string[];
|
|
64
|
-
risk: BrowserRiskLevel;
|
|
65
|
-
inputs: Record<string, BrowserAutomationInputDefinition>;
|
|
66
|
-
steps: BrowserAutomationStep[];
|
|
67
|
-
successCriteria?: BrowserAutomationAssertion[];
|
|
68
|
-
outputs?: Record<string, {
|
|
69
|
-
target?: BrowserSemanticTarget;
|
|
70
|
-
field: 'text' | 'value' | 'url' | 'title' | 'href';
|
|
71
|
-
}>;
|
|
72
|
-
}
|
|
73
|
-
export interface BrowserAutomation {
|
|
74
|
-
id: string;
|
|
75
|
-
revision: number;
|
|
76
|
-
verified: boolean;
|
|
77
|
-
status: BrowserAutomationStatus;
|
|
78
|
-
definition: BrowserAutomationDefinition;
|
|
79
|
-
createdAtMs: number;
|
|
80
|
-
updatedAtMs: number;
|
|
81
|
-
}
|
|
82
|
-
export interface BrowserAutomationRun {
|
|
83
|
-
id: string;
|
|
84
|
-
automationId: string;
|
|
85
|
-
automationRevision: number;
|
|
86
|
-
clientRequestId?: string;
|
|
87
|
-
businessOutcome?: 'completed' | 'verified' | 'unknown';
|
|
88
|
-
definition: BrowserAutomationDefinition;
|
|
89
|
-
status: BrowserAutomationRunStatus;
|
|
90
|
-
inputs: Record<string, unknown>;
|
|
91
|
-
result?: unknown;
|
|
92
|
-
error?: string;
|
|
93
|
-
createdAtMs: number;
|
|
94
|
-
startedAtMs?: number;
|
|
95
|
-
endedAtMs?: number;
|
|
96
|
-
durationMs?: number;
|
|
97
|
-
}
|
|
98
|
-
export interface BrowserAutomationRunEvent {
|
|
99
|
-
id: string;
|
|
100
|
-
runId: string;
|
|
101
|
-
seq: number;
|
|
102
|
-
type: string;
|
|
103
|
-
data?: unknown;
|
|
104
|
-
createdAtMs: number;
|
|
105
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { BrowserRecordingEvent } from '@xopcai/browser-control-contract';
|
|
2
|
-
import type { BrowserAutomationService, BrowserAutomationDefinition } from '../automations/index.js';
|
|
3
|
-
type RecordingRow = {
|
|
4
|
-
recording_id: string;
|
|
5
|
-
principal_id: string;
|
|
6
|
-
state: string;
|
|
7
|
-
ack_seq: number;
|
|
8
|
-
final_seq: number | null;
|
|
9
|
-
automation_id: string | null;
|
|
10
|
-
error: string | null;
|
|
11
|
-
};
|
|
12
|
-
export declare class BrowserRecordingService {
|
|
13
|
-
private readonly automations;
|
|
14
|
-
constructor(automations: BrowserAutomationService);
|
|
15
|
-
get(id: string, principalId: string): RecordingRow | null;
|
|
16
|
-
append(id: string, principalId: string, payload: unknown): {
|
|
17
|
-
ackThrough: number;
|
|
18
|
-
};
|
|
19
|
-
finish(id: string, principalId: string, finalSeq: number): import("../automations/types.js").BrowserAutomation;
|
|
20
|
-
}
|
|
21
|
-
export declare function compileRecording(id: string, events: BrowserRecordingEvent[]): BrowserAutomationDefinition;
|
|
22
|
-
export {};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
-
import "../../storage/sqlite/index.js";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/browser/recordings/service.ts
|
|
5
|
-
const Target = z.object({
|
|
6
|
-
role: z.string().min(1),
|
|
7
|
-
name: z.string().max(240).optional(),
|
|
8
|
-
nameIncludes: z.string().max(240).optional(),
|
|
9
|
-
testId: z.string().max(240).optional(),
|
|
10
|
-
scope: z.object({
|
|
11
|
-
role: z.string(),
|
|
12
|
-
name: z.string().max(240)
|
|
13
|
-
}).strict().optional()
|
|
14
|
-
}).strict();
|
|
15
|
-
const Event = z.object({
|
|
16
|
-
id: z.string().uuid(),
|
|
17
|
-
seq: z.number().int().positive(),
|
|
18
|
-
documentId: z.string().max(200),
|
|
19
|
-
sourceSeq: z.number().int().positive(),
|
|
20
|
-
url: z.string().url().max(4096),
|
|
21
|
-
action: z.enum([
|
|
22
|
-
"navigate",
|
|
23
|
-
"click",
|
|
24
|
-
"fill",
|
|
25
|
-
"select",
|
|
26
|
-
"check",
|
|
27
|
-
"press",
|
|
28
|
-
"checkpoint",
|
|
29
|
-
"unsupported"
|
|
30
|
-
]),
|
|
31
|
-
target: Target.optional(),
|
|
32
|
-
value: z.string().max(4096).optional(),
|
|
33
|
-
checked: z.boolean().optional(),
|
|
34
|
-
key: z.enum(["Enter", "Escape"]).optional()
|
|
35
|
-
}).strict();
|
|
36
|
-
const Batch = z.array(Event).min(1).max(100);
|
|
37
|
-
var BrowserRecordingService = class {
|
|
38
|
-
constructor(automations) {
|
|
39
|
-
this.automations = automations;
|
|
40
|
-
}
|
|
41
|
-
get(id, principalId) {
|
|
42
|
-
return getSqliteDatabase().prepare("SELECT * FROM browser_recordings WHERE recording_id=? AND principal_id=?").get(id, principalId) ?? null;
|
|
43
|
-
}
|
|
44
|
-
append(id, principalId, payload) {
|
|
45
|
-
z.string().uuid().parse(id);
|
|
46
|
-
const events = Batch.parse(payload);
|
|
47
|
-
return runSqliteWriteTransaction((db) => {
|
|
48
|
-
const now = Date.now();
|
|
49
|
-
db.prepare("INSERT OR IGNORE INTO browser_recordings (recording_id, principal_id, state, created_at_ms, updated_at_ms) VALUES (?, ?, 'recording', ?, ?)").run(id, principalId, now, now);
|
|
50
|
-
const row = this.get(id, principalId);
|
|
51
|
-
if (!row) throw new Error("Recording belongs to another device.");
|
|
52
|
-
if (Math.max(row.ack_seq, events.at(-1).seq) > 1e4) throw new Error("Recording event budget exceeded.");
|
|
53
|
-
let bytes = db.prepare("SELECT COALESCE(SUM(length(CAST(payload_json AS BLOB))),0) AS bytes FROM browser_recording_events WHERE recording_id=?").get(id).bytes;
|
|
54
|
-
for (const event of events) {
|
|
55
|
-
const prior = db.prepare("SELECT payload_json FROM browser_recording_events WHERE recording_id=? AND seq=?").get(id, event.seq);
|
|
56
|
-
const serialized = JSON.stringify(event);
|
|
57
|
-
if (prior) {
|
|
58
|
-
if (prior.payload_json !== serialized) throw new Error("Recording event conflict.");
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
bytes += Buffer.byteLength(serialized);
|
|
62
|
-
if (bytes > 20 * 1024 * 1024) throw new Error("Recording storage budget exceeded.");
|
|
63
|
-
if (row.state === "saved") throw new Error("Recording is already finished.");
|
|
64
|
-
if (event.seq !== this.get(id, principalId).ack_seq + 1) throw new Error("Recording event sequence has a gap.");
|
|
65
|
-
if (!["http:", "https:"].includes(new URL(event.url).protocol)) throw new Error("Only HTTP pages can be recorded.");
|
|
66
|
-
db.prepare("INSERT INTO browser_recording_events (recording_id, seq, event_id, payload_json) VALUES (?, ?, ?, ?)").run(id, event.seq, event.id, serialized);
|
|
67
|
-
db.prepare("UPDATE browser_recordings SET ack_seq=?, updated_at_ms=? WHERE recording_id=?").run(event.seq, now, id);
|
|
68
|
-
}
|
|
69
|
-
return { ackThrough: this.get(id, principalId).ack_seq };
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
finish(id, principalId, finalSeq) {
|
|
73
|
-
z.number().int().min(1).max(1e4).parse(finalSeq);
|
|
74
|
-
const row = this.get(id, principalId);
|
|
75
|
-
if (!row) throw new Error("Recording not found.");
|
|
76
|
-
if (row.state === "saved") {
|
|
77
|
-
if (row.final_seq !== finalSeq) throw new Error("Recording final sequence conflicts with the saved recording.");
|
|
78
|
-
return this.automations.get(row.automation_id);
|
|
79
|
-
}
|
|
80
|
-
if (row.ack_seq !== finalSeq) throw new Error("Recording is incomplete. Waiting for all events.");
|
|
81
|
-
const events = getSqliteDatabase().prepare("SELECT payload_json FROM browser_recording_events WHERE recording_id=? ORDER BY seq").all(id).map((item) => JSON.parse(item.payload_json));
|
|
82
|
-
const sources = /* @__PURE__ */ new Map();
|
|
83
|
-
for (const event of events) {
|
|
84
|
-
if (event.sourceSeq !== (sources.get(event.documentId) ?? 0) + 1) throw new Error("Recording is incomplete: document events are missing.");
|
|
85
|
-
sources.set(event.documentId, event.sourceSeq);
|
|
86
|
-
}
|
|
87
|
-
for (const documentId of sources.keys()) if (events.filter((event) => event.documentId === documentId).at(-1)?.action !== "checkpoint") throw new Error("Recording is incomplete: a document did not confirm its final events.");
|
|
88
|
-
const definition = compileRecording(id, events);
|
|
89
|
-
return runSqliteWriteTransaction((db) => {
|
|
90
|
-
const automation = this.automations.save({ definition });
|
|
91
|
-
db.prepare("UPDATE browser_recordings SET state='saved', final_seq=?, automation_id=?, updated_at_ms=? WHERE recording_id=?").run(finalSeq, automation.id, Date.now(), id);
|
|
92
|
-
return automation;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
function compileRecording(id, events) {
|
|
97
|
-
const steps = [];
|
|
98
|
-
const inputs = {};
|
|
99
|
-
for (const event of events) {
|
|
100
|
-
if (event.action === "checkpoint") continue;
|
|
101
|
-
if (event.action === "unsupported") throw new Error(event.value || "Recording contains an unsupported action.");
|
|
102
|
-
if (event.action === "navigate") {
|
|
103
|
-
if (steps.length && ["click", "press"].includes(steps.at(-1).action)) steps.push({
|
|
104
|
-
action: "wait",
|
|
105
|
-
condition: "page_idle"
|
|
106
|
-
});
|
|
107
|
-
else if (!steps.length || steps.at(-1)?.action !== "wait") steps.push({
|
|
108
|
-
action: "navigate",
|
|
109
|
-
url: event.url
|
|
110
|
-
});
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
if (!event.target) throw new Error("Recording contains an unsupported target.");
|
|
114
|
-
if (event.action === "fill" || event.action === "select") {
|
|
115
|
-
const key = `value${Object.keys(inputs).length + 1}`;
|
|
116
|
-
inputs[key] = {
|
|
117
|
-
type: "string",
|
|
118
|
-
default: event.value ?? "",
|
|
119
|
-
description: event.target.name || key
|
|
120
|
-
};
|
|
121
|
-
steps.push({
|
|
122
|
-
action: event.action,
|
|
123
|
-
target: event.target,
|
|
124
|
-
value: `\${input.${key}}`
|
|
125
|
-
});
|
|
126
|
-
} else if (event.action === "check") {
|
|
127
|
-
if (event.checked === void 0) throw new Error("Recording checkbox state is missing.");
|
|
128
|
-
steps.push({
|
|
129
|
-
action: "check",
|
|
130
|
-
target: event.target,
|
|
131
|
-
checked: event.checked
|
|
132
|
-
});
|
|
133
|
-
} else if (event.action === "press") {
|
|
134
|
-
if (!event.key) throw new Error("Recording key is missing.");
|
|
135
|
-
steps.push({
|
|
136
|
-
action: "press",
|
|
137
|
-
target: event.target,
|
|
138
|
-
key: event.key
|
|
139
|
-
});
|
|
140
|
-
} else steps.push({
|
|
141
|
-
action: "click",
|
|
142
|
-
target: event.target
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
if (!steps.length || steps.length > 100) throw new Error("Recording must contain between 1 and 100 executable steps.");
|
|
146
|
-
const first = events[0];
|
|
147
|
-
return {
|
|
148
|
-
id: `recording-${id}`,
|
|
149
|
-
name: events.find((event) => event.target?.name)?.target?.name || new URL(first.url).hostname,
|
|
150
|
-
description: "Recorded browser workflow",
|
|
151
|
-
allowedDomains: [...new Set(events.map((event) => new URL(event.url).hostname))],
|
|
152
|
-
risk: steps.some((step) => ["click", "press"].includes(step.action)) ? "external_effect" : "draft",
|
|
153
|
-
inputs,
|
|
154
|
-
steps,
|
|
155
|
-
outputs: { url: { field: "url" } }
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
//#endregion
|
|
159
|
-
export { BrowserRecordingService, compileRecording };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
2
|
-
//#region src/gateway/hono/routes/browser-automations.ts
|
|
3
|
-
function presentRun(run) {
|
|
4
|
-
return {
|
|
5
|
-
id: run.id,
|
|
6
|
-
automationId: run.automationId,
|
|
7
|
-
automationRevision: run.automationRevision,
|
|
8
|
-
businessOutcome: run.businessOutcome,
|
|
9
|
-
status: run.status,
|
|
10
|
-
inputs: run.inputs,
|
|
11
|
-
result: run.result,
|
|
12
|
-
error: run.error,
|
|
13
|
-
createdAtMs: run.createdAtMs,
|
|
14
|
-
startedAtMs: run.startedAtMs,
|
|
15
|
-
endedAtMs: run.endedAtMs,
|
|
16
|
-
durationMs: run.durationMs
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function parseStatus(value) {
|
|
20
|
-
if (value === void 0) return void 0;
|
|
21
|
-
if (value === "enabled" || value === "disabled") return value;
|
|
22
|
-
throw new Error("status must be enabled or disabled.");
|
|
23
|
-
}
|
|
24
|
-
function registerBrowserAutomationRoutes(authenticated, deps) {
|
|
25
|
-
const service = deps.service.browserAutomations;
|
|
26
|
-
authenticated.get("/api/browser/automations", (c) => c.json({ automations: service.list() }));
|
|
27
|
-
authenticated.post("/api/browser/automations/validate", async (c) => {
|
|
28
|
-
const parsed = service.validate((await c.req.json()).definition);
|
|
29
|
-
return c.json({
|
|
30
|
-
valid: parsed.success,
|
|
31
|
-
issues: parsed.success ? [] : parsed.error.issues
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
authenticated.get("/api/browser/automations/:id/versions", (c) => c.json({ versions: service.versions(c.req.param("id")) }));
|
|
35
|
-
authenticated.post("/api/browser/automations", deps.strictRateLimitMiddleware, async (c) => {
|
|
36
|
-
try {
|
|
37
|
-
const body = await c.req.json();
|
|
38
|
-
return c.json({ automation: service.save({
|
|
39
|
-
definition: body.definition,
|
|
40
|
-
status: parseStatus(body.status)
|
|
41
|
-
}) }, 201);
|
|
42
|
-
} catch (error) {
|
|
43
|
-
return c.json({ error: error instanceof Error ? error.message : String(error) }, /revision changed|reused/.test(String(error)) ? 409 : 400);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
authenticated.get("/api/browser/automations/:id", (c) => {
|
|
47
|
-
const automation = service.get(c.req.param("id"));
|
|
48
|
-
return automation ? c.json({ automation }) : c.json({ error: "Browser automation not found." }, 404);
|
|
49
|
-
});
|
|
50
|
-
authenticated.patch("/api/browser/automations/:id", deps.strictRateLimitMiddleware, async (c) => {
|
|
51
|
-
try {
|
|
52
|
-
const current = service.get(c.req.param("id"));
|
|
53
|
-
if (!current) return c.json({ error: "Browser automation not found." }, 404);
|
|
54
|
-
const body = await c.req.json();
|
|
55
|
-
return c.json({ automation: service.save({
|
|
56
|
-
definition: body.definition ?? current.definition,
|
|
57
|
-
status: parseStatus(body.status) ?? current.status,
|
|
58
|
-
expectedId: current.id,
|
|
59
|
-
expectedRevision: body.expectedRevision
|
|
60
|
-
}) });
|
|
61
|
-
} catch (error) {
|
|
62
|
-
return c.json({ error: error instanceof Error ? error.message : String(error) }, /revision changed|reused/.test(String(error)) ? 409 : 400);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
authenticated.delete("/api/browser/automations/:id", deps.strictRateLimitMiddleware, (c) => {
|
|
66
|
-
try {
|
|
67
|
-
return c.json({ removed: service.remove(c.req.param("id")) });
|
|
68
|
-
} catch (error) {
|
|
69
|
-
return c.json({ error: error instanceof Error ? error.message : String(error) }, 409);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
authenticated.post("/api/browser/automations/:id/:operation{run|test}", deps.strictRateLimitMiddleware, async (c) => {
|
|
73
|
-
try {
|
|
74
|
-
const body = await c.req.json().catch(() => ({}));
|
|
75
|
-
const inputs = body.inputs ?? {};
|
|
76
|
-
if (!inputs || typeof inputs !== "object" || Array.isArray(inputs)) return c.json({ error: "inputs must be an object." }, 400);
|
|
77
|
-
return c.json({ run: presentRun(service.startRun(c.req.param("id"), inputs, {
|
|
78
|
-
revision: body.revision,
|
|
79
|
-
clientRequestId: typeof body.clientRequestId === "string" ? `${getGatewayPrincipal(c).kind === "device" ? getGatewayPrincipal(c).deviceId : "owner"}:${body.clientRequestId}` : void 0
|
|
80
|
-
})) }, 202);
|
|
81
|
-
} catch (error) {
|
|
82
|
-
return c.json({ error: error instanceof Error ? error.message : String(error) }, /revision changed|reused/.test(String(error)) ? 409 : 400);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
authenticated.get("/api/browser/automation-runs", (c) => c.json({ runs: service.listRuns(c.req.query("automationId")).map(presentRun) }));
|
|
86
|
-
authenticated.get("/api/browser/automation-runs/:id", (c) => {
|
|
87
|
-
const run = service.getRun(c.req.param("id"));
|
|
88
|
-
return run ? c.json({ run: presentRun(run) }) : c.json({ error: "Run not found." }, 404);
|
|
89
|
-
});
|
|
90
|
-
authenticated.post("/api/browser/automation-runs/:id/cancel", deps.strictRateLimitMiddleware, (c) => c.json({ cancelled: service.cancel(c.req.param("id")) }));
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
export { registerBrowserAutomationRoutes };
|