@xopcai/xopc 0.0.367 → 0.0.369
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/_locales/en/messages.json +30 -1
- package/dist/browser-ext/_locales/zh_CN/messages.json +30 -1
- package/dist/browser-ext/dist/assets/{auth-beGtbLPS.js → page-context-BeworyNB.js} +1331 -1355
- package/dist/browser-ext/dist/assets/{sidepanel-BT0ojEzG.css → sidepanel-Ccl0eSa1.css} +43 -0
- package/dist/browser-ext/dist/background.js +680 -182
- package/dist/browser-ext/dist/sidepanel.html +2 -2
- package/dist/browser-ext/dist/sidepanel.js +372 -193
- package/dist/browser-ext/manifest.json +2 -8
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-Cuf3JFFJ.js → activity-store-BQ3PMp2q.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DyATPNTe.js → agent-avatar-dicebear-Stj17S9u.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CCRfvuov.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CRlzd8El.js +1 -0
- package/dist/gateway/static/root/assets/agents-_ug2LCQb.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-D842OcNo.js → agents-admin-api-HBZvVyzF.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-pJFe6M6c.js +1 -0
- package/dist/gateway/static/root/assets/{appearance-settings-DQr0o6Lm.js → appearance-settings-BrxSpBWa.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CltMV4Xp.js → apps-page-DegSl5Lh.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-DT8Nio-r.js → archive-plugin-BO3I9zRP.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BIfWS_3Y.js → automations-page-BZQ_VHjp.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BQywN6nG.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-7qs3qcW9.js → binary-plugins-gFD7vH9R.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BFPUlxJ6.js → block-editor-3XjFv3kK.js} +28 -28
- package/dist/gateway/static/root/assets/browser-automation-inputs-DxRoKFun.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-yiEuG1v7.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-ch2_bQF0.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-K0Zb_lH0.js → capabilities-B48r0DDa.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BzWFO_x_.js → capabilities-DO-vfNKI.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-BEnFt_dj.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-NckMsJ5N.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-AMn_vTNv.js → capability-header-actions-CY8KCO9j.js} +1 -1
- package/dist/gateway/static/root/assets/channels-CHOS2CGa.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-C7nAROhF.js → chat-terminal-dock-Bwknnb4c.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-B2xeFCSt.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-CTx1B8wx.js → connector-service-page-C83DnAqK.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-D6wTmWA6.js +2 -0
- package/dist/gateway/static/root/assets/{date-picker-Cx_xIKvN.js → date-picker-Bq9GR-DU.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DYm96PDu.js → dependency-picker-BTERkA9X.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D90OzgeR.js → desktop-pet-BwsbQw8V.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CmdCecjm.js → desktop-pet-settings-sL9i44pP.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DI2bqaKO.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DZpaoeNa.js → directory-picker-path-field-BFlDmsS5.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-Bv6QE8kC.js → extension-debug-page-7Z1Tp7-w.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CEsq71Cm.js → extension-page-uGqvb8QX.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CX-sK0Tw.js → extension-provider-xlSyz4Z6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-UyOHF39P.js → extension-settings-page-CKHgrjOs.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-CKv_Wqg8.js → fallback-models-BwQg0G1D.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-Cjnkle5J.js → gateway-config-swr-7RKqgU_U.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DCCLdyQD.js → gateway-realtime-DDWymi-o.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BheKaO6d.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-BAQnSEMJ.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CXKmdVzN.js → gateway-startup-retry-jiV5sbEX.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BZDjvwet.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-NLHzm4Nc.js → image-generation-api-DO4mXb6I.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-C7qvlBTQ.js → imports-page-re1_Nh64.js} +1 -1
- package/dist/gateway/static/root/assets/index-BB1z8QxA.js +106 -0
- package/dist/gateway/static/root/assets/index-D9R6tU7r.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-pkgFWJb-.js → keyboard-shortcuts-settings-B_xja9LN.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-dMDhZXAi.js → local-app-workbench-page-CErdCrPX.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-TpUAfOn2.js → local-apps-page-BPL2RXdK.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-Cvv7I0fw.js → local-session-drafts-DRPsDCj1.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-C8TMD2gn.js → locale-store-COVscAqC.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DL-BM0xq.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-BOVRHhXk.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-Dse7rkio.js → markdown-view-B_qnAcW2.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BZrnzaBM.js → media-plugins-C0Pc-wSY.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Bb2GK-Nj.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-DyPPksMP.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DJJK2yL4.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-DKiVeQKG.js → notes-api-sBgBcyLW.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-oCxO7ZTv.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-Cxzd4QPB.js → page-context-capture-button-tf77xIz3.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-DOk9gUK5.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-D4hoEWiu.js → product-open-page-Dc3Y-Y7J.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-aR38El2E.js → product-preview-content-MG_hmVA3.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-D20QH4YB.js → project-detail-page-3uAzbW4T.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-Bf3BIcT6.js → projects-page-MllfNLGA.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-AdnxowbH.js → registry-api-Bh9UBb-f.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Bs-C70el.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CBN3raz1.js → runtime-tools-settings-panel-DpJ5jNzR.js} +1 -1
- package/dist/gateway/static/root/assets/scenes-page-Dpxamkw6.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-CxrMGsT9.js → schema-form-DUeyQ1zh.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-CgOzhDZ0.js → send-session-input-Dgn4BRk_.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-_HIN8or3.js → session-api-yjpEz4pP.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-CzCto5zT.js → session-manager-LInoZ_Yi.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BCVlNHtq.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-Bz-ue9fZ.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-D8Q3H3-o.js → settings-page-DouHuBXt.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DvLMMiuS.js → setup-status-panel-B5BoZ-1y.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-Dg5os066.js → share-link-dialog-DJTabLAM.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DMvohAyr.js → share-preview-page-jw7h4t_B.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-C96IO4qJ.js → shares-api-c0dfWz6h.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BlnlzGjH.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-C10ML0CH.js → skill-api-CfyX_0zN.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DNbJzSfB.js → skill-reload-api-Ge5XymHa.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DObMKvA6.js → skills-page-DjdTeYzm.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-DWf256TE.js +1 -0
- package/dist/gateway/static/root/assets/{task-detail-page-BR2L1L8l.js → task-detail-page-DE6N1ZQe.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-DL2Q2gre.js → task-expandable-content-hYcgCEE3.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DQ6KJa4l.js → theme-store-BOfCKgl6.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-Ed8_GYUT.js → tracing-settings-page-DDWFXcST.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-D3X8jDwo.js → tunnel-api-BBm9esrY.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BqzRyyb9.js → usage-page-C93x89uW.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-CRFefpzO.js → use-autosave-CSckcjFx.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-OLrvSjn5.js → use-composer-attachments-C7Gaaai1.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CJvzfQvw.js → use-file-preview-expanded-Db2VYg1b.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-B74LkVbp.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-R9zNWYR_.js → voice-api-key-field-GEw5x2fU.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DLudE9Rc.js → voice-config-api-3yyVwXln.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DVmQrolV.js → work-discovery-overlay-Bs2MKiTv.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DEkmuD3T.js → workflow-run-setup-panel-BR_U_snV.js} +2 -2
- package/dist/gateway/static/root/assets/{workflows-page-pqCB3sh4.js → workflows-page-Crk4SxtC.js} +3 -3
- package/dist/gateway/static/root/assets/{workspace-api-CdVUhyPo.js → workspace-api-Si2o3inw.js} +2 -2
- package/dist/gateway/static/root/index.html +27 -28
- package/dist/package.js +1 -1
- package/dist/packages/browser-control-contract/src/automation.js +213 -0
- package/dist/packages/browser-control-contract/src/index.js +43 -12
- package/dist/packages/gateway-contract/src/gateway-scopes.js +3 -1
- package/dist/packages/gateway-contract/src/notifications.js +1 -0
- package/dist/packages/realtime-protocol/src/voice-catalog.js +7 -1
- package/dist/packages/realtime-protocol/src/voice.js +9 -3
- package/dist/src/agent/coding/repository-instructions.js +8 -1
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -1
- package/dist/src/agent/tool-manuals/browser.js +3 -3
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js +1 -1
- package/dist/src/agent/tools/browser/tool/schemas.d.ts +0 -13
- package/dist/src/agent/tools/browser/tool/schemas.js +0 -4
- package/dist/src/agent/tools/browser-automation-tool.d.ts +74 -1
- package/dist/src/agent/tools/browser-automation-tool.js +52 -6
- package/dist/src/agent-config/schema.d.ts +1 -1
- package/dist/src/agent-config/schema.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +2 -0
- package/dist/src/automations/domain/types.d.ts +11 -0
- package/dist/src/automations/domain/validation.d.ts +4 -0
- package/dist/src/automations/domain/validation.js +1 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -0
- package/dist/src/automations/service/action-executor.js +11 -3
- package/dist/src/automations/service/automation-service.d.ts +1 -0
- package/dist/src/automations/service/automation-service.js +13 -1
- package/dist/src/bootstrap/application-state.js +3 -1
- package/dist/src/browser/automations/repository.d.ts +4 -0
- package/dist/src/browser/automations/repository.js +27 -6
- package/dist/src/browser/automations/runner.js +101 -9
- package/dist/src/browser/automations/runtime-service.js +4 -3
- package/dist/src/browser/automations/schema.d.ts +84 -1
- package/dist/src/browser/automations/schema.js +68 -2
- package/dist/src/browser/automations/service.d.ts +78 -1
- package/dist/src/browser/automations/service.js +36 -4
- package/dist/src/browser/automations/types.d.ts +19 -4
- package/dist/src/browser/drivers/extension-driver.d.ts +5 -5
- package/dist/src/browser/drivers/extension-driver.js +10 -10
- package/dist/src/browser/drivers/playwright-driver.js +46 -0
- package/dist/src/browser/index.d.ts +1 -2
- package/dist/src/browser/index.js +2 -3
- package/dist/src/browser/policy/browser-policy.d.ts +0 -1
- package/dist/src/browser/policy/browser-policy.js +1 -4
- package/dist/src/browser/providers/index.d.ts +1 -1
- package/dist/src/browser/providers/index.js +2 -2
- package/dist/src/browser/providers/realtime-extension.d.ts +1 -1
- package/dist/src/browser/providers/realtime-extension.js +5 -1
- package/dist/src/browser/recordings/service.d.ts +22 -0
- package/dist/src/browser/recordings/service.js +160 -0
- package/dist/src/browser/runtime/browser-runtime.d.ts +1 -1
- package/dist/src/browser/runtime/browser-runtime.js +19 -56
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/computer/runtime.js +2 -2
- package/dist/src/config/schema.d.ts +12 -12
- package/dist/src/config/schema.js +12 -12
- package/dist/src/endpoint-tools/policy.js +4 -3
- package/dist/src/gateway/hono/routes/browser-automations.js +23 -7
- package/dist/src/gateway/hono/routes/browser-recordings.d.ts +3 -0
- package/dist/src/gateway/hono/routes/browser-recordings.js +78 -0
- package/dist/src/gateway/hono/routes/browser.js +1 -34
- package/dist/src/gateway/hono/routes/device-push.js +1 -0
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +35 -0
- package/dist/src/gateway/hono/routes/voice.js +5 -2
- package/dist/src/gateway/security/gateway-scopes.js +3 -1
- package/dist/src/gateway/service/agent-runner.js +1 -0
- package/dist/src/home-intelligence/generator.d.ts +2 -0
- package/dist/src/home-intelligence/generator.js +53 -4
- package/dist/src/home-intelligence/host.d.ts +2 -1
- package/dist/src/home-intelligence/host.js +23 -3
- package/dist/src/migrations/cloud-public-models.d.ts +7 -0
- package/dist/src/migrations/cloud-public-models.js +157 -0
- package/dist/src/notifications/clarification.d.ts +5 -0
- package/dist/src/notifications/clarification.js +66 -0
- package/dist/src/notifications/device-store.js +1 -0
- package/dist/src/notifications/harmony-push.d.ts +1 -0
- package/dist/src/notifications/harmony-push.js +3 -1
- package/dist/src/notifications/planner.d.ts +1 -0
- package/dist/src/notifications/service.d.ts +2 -2
- package/dist/src/notifications/service.js +20 -4
- package/dist/src/notifications/store.d.ts +2 -0
- package/dist/src/notifications/store.js +7 -1
- package/dist/src/notifications/types.d.ts +1 -0
- package/dist/src/notifications/types.js +1 -0
- package/dist/src/providers/model-catalog-persistence.js +2 -2
- package/dist/src/providers/presentation.js +1 -0
- package/dist/src/providers/xopc-cloud-model-source.js +1 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.js +1 -0
- package/dist/src/storage/sqlite/migrations/238_browser_record_replay.sql +45 -0
- package/dist/src/storage/sqlite/migrations/239_clarification_notifications.sql +26 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/home-query-service.d.ts +1 -1
- package/dist/src/tasks/home-query-service.js +6 -2
- package/dist/src/voice/dashscope/streaming-tts-stream.d.ts +2 -1
- package/dist/src/voice/dashscope/streaming-tts-stream.js +135 -79
- package/dist/src/voice/metadata/types.d.ts +1 -0
- package/dist/src/voice/platform-catalog.d.ts +4 -0
- package/dist/src/voice/platform-settings.js +1 -0
- package/dist/src/voice/realtime/agentEngine.js +78 -1
- package/dist/src/voice/realtime/speakable-segmenter.d.ts +2 -0
- package/dist/src/voice/realtime/speakable-segmenter.js +30 -0
- package/dist/src/voice/tts/providers/alibaba-speech.js +17 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +3 -2
- package/dist/src/voice/tts/speak-core.d.ts +3 -0
- package/dist/src/voice/tts/speak-core.js +21 -1
- package/dist/src/voice/tts/speech-provider-types.d.ts +8 -0
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-gT9_j4tr.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CLXCJ6JN.js +0 -1
- package/dist/gateway/static/root/assets/agents-BAUfOMsq.js +0 -66
- package/dist/gateway/static/root/assets/app-management-settings-panel-CoIFxQKH.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BCGPjsdU.js +0 -6
- package/dist/gateway/static/root/assets/browser-automation-inputs-BUAIKIX0.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CSwu1U1F.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-C1ReMNqX.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-BdTSqloI.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BUblBMZC.js +0 -8
- package/dist/gateway/static/root/assets/channels-CXCf5qO6.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-B5SuSZ3G.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DfnK1crf.js +0 -2
- package/dist/gateway/static/root/assets/device-pairing-wizard-s2ogSa4l.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-C_Th8kGg.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CZ73IpbP.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BQWq4kYi.js +0 -2
- package/dist/gateway/static/root/assets/index-BQgqzhQj.js +0 -106
- package/dist/gateway/static/root/assets/index-COB4QIJp.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-B-Y9oZLh.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-B2lzsw6X.js +0 -1
- package/dist/gateway/static/root/assets/messages-Dy26npMy.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-B1C86nRp.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DL__qP6U.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-DTBbg9Hs.js +0 -8
- package/dist/gateway/static/root/assets/oauth-api-BwpzpRwC.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CzaTnHeD.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CKxqncqW.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-Cv_5ozfX.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-DZcu6NLJ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DazqeDQ7.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CsDATuCw.js +0 -1
- package/dist/gateway/static/root/assets/system-settings-panel-Bn3khdzb.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CG6wqIKP.js +0 -2
- package/dist/src/browser/policy/approval-store.d.ts +0 -17
- package/dist/src/browser/policy/approval-store.js +0 -62
- package/dist/src/browser/providers/extension-ws-acquire.d.ts +0 -19
- package/dist/src/browser/providers/extension-ws-acquire.js +0 -78
- package/dist/src/browser/providers/extension.d.ts +0 -61
- package/dist/src/browser/providers/extension.js +0 -378
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as strictObject, t as number, d as boolean, G as string, c as array, _ as _enum, r as literal, u as object, m as discriminatedUnion, e as browserPageContextsInputSchema, H as t,
|
|
1
|
+
import { F as strictObject, t as number, d as boolean, G as string, c as array, _ as _enum, r as literal, u as object, m as discriminatedUnion, e as browserPageContextsInputSchema, H as t, p as gatewayFetch, M as MAX_BROWSER_CONTEXTS_PER_TURN, o as extensionLocale, v as openDatabase, a as RealtimeClient, R as REALTIME_PROTOCOL_VERSION, b as activeTabId, k as currentTabDescriptor, T as TAB_BINDING_PREFIX, q as getAccessProfile, y as readProfile, B as runWithTabSiteAccess, P as PENDING_CONTEXT_KEY, i as captureTabWithPermission, w as pairGateway, D as setAutoConnectEnabled, x as readPendingBrowserPairing, l as discoverLocalGateway, C as saveExtensionLocalePreference, A as revokeAndForgetProfile, f as cancelPendingBrowserPairing, s as loadExtensionLocalePreference } from './assets/page-context-BeworyNB.js';
|
|
2
2
|
|
|
3
3
|
const AppContextResourceSchema = strictObject({
|
|
4
4
|
kind: _enum(["note", "task", "project", "scene", "local_app"]),
|
|
@@ -17573,7 +17573,7 @@ var clientExports = requireClient();
|
|
|
17573
17573
|
function MicrophonePermission() {
|
|
17574
17574
|
const requesting = reactExports.useRef(false);
|
|
17575
17575
|
const [state, setState] = reactExports.useState("idle");
|
|
17576
|
-
|
|
17576
|
+
const authorize = reactExports.useCallback(async () => {
|
|
17577
17577
|
if (requesting.current) return;
|
|
17578
17578
|
requesting.current = true;
|
|
17579
17579
|
setState("pending");
|
|
@@ -17586,11 +17586,328 @@ function MicrophonePermission() {
|
|
|
17586
17586
|
} finally {
|
|
17587
17587
|
requesting.current = false;
|
|
17588
17588
|
}
|
|
17589
|
-
}
|
|
17589
|
+
}, []);
|
|
17590
|
+
reactExports.useEffect(() => {
|
|
17591
|
+
void authorize();
|
|
17592
|
+
}, [authorize]);
|
|
17590
17593
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "microphone-permission", children: [
|
|
17591
17594
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { children: t("voicePermissionOpen") }),
|
|
17592
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { role: "status", children: t(state === "granted" ? "voicePermissionGranted" : state === "denied" ? "voicePermissionFailed" : "
|
|
17593
|
-
state
|
|
17595
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { role: "status", children: t(state === "granted" ? "voicePermissionGranted" : state === "denied" ? "voicePermissionFailed" : "voiceStarting") }),
|
|
17596
|
+
state === "denied" ? /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", onClick: () => void authorize(), children: t("voicePermissionOpen") }) : null
|
|
17597
|
+
] });
|
|
17598
|
+
}
|
|
17599
|
+
|
|
17600
|
+
function IconBase({ children, ...props }) {
|
|
17601
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", ...props, children });
|
|
17602
|
+
}
|
|
17603
|
+
function ChevronDownIcon(props) {
|
|
17604
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m7 10 5 5 5-5" }) });
|
|
17605
|
+
}
|
|
17606
|
+
function ArrowDownIcon(props) {
|
|
17607
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 5v14M6 13l6 6 6-6" }) });
|
|
17608
|
+
}
|
|
17609
|
+
function PlusIcon(props) {
|
|
17610
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 5v14M5 12h14" }) });
|
|
17611
|
+
}
|
|
17612
|
+
function SearchIcon(props) {
|
|
17613
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17614
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "11", cy: "11", r: "7" }),
|
|
17615
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m20 20-4-4" })
|
|
17616
|
+
] });
|
|
17617
|
+
}
|
|
17618
|
+
function PaperclipIcon(props) {
|
|
17619
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m20.5 11.5-8.9 8.9a6 6 0 0 1-8.5-8.5l9.5-9.5a4 4 0 0 1 5.7 5.7l-9.5 9.5A2 2 0 0 1 6 14.8l8.8-8.8" }) });
|
|
17620
|
+
}
|
|
17621
|
+
function PageIcon(props) {
|
|
17622
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17623
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
|
|
17624
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2v6h6M8 13h8M8 17h5" })
|
|
17625
|
+
] });
|
|
17626
|
+
}
|
|
17627
|
+
function SelectionIcon(props) {
|
|
17628
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M8 4H5a1 1 0 0 0-1 1v3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3M8 9h8M8 13h6" }) });
|
|
17629
|
+
}
|
|
17630
|
+
function CameraIcon(props) {
|
|
17631
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17632
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14.5 4 16 7h3a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3l1.5-3Z" }),
|
|
17633
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "13", r: "3" })
|
|
17634
|
+
] });
|
|
17635
|
+
}
|
|
17636
|
+
function FileIcon(props) {
|
|
17637
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17638
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
|
|
17639
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2v6h6" })
|
|
17640
|
+
] });
|
|
17641
|
+
}
|
|
17642
|
+
function EyeIcon(props) {
|
|
17643
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17644
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z" }),
|
|
17645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "2.5" })
|
|
17646
|
+
] });
|
|
17647
|
+
}
|
|
17648
|
+
function CursorIcon(props) {
|
|
17649
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m5 3 14 9-6 2-3 6Z" }) });
|
|
17650
|
+
}
|
|
17651
|
+
function SendIcon(props) {
|
|
17652
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m5 12 7-7 7 7M12 19V5" }) });
|
|
17653
|
+
}
|
|
17654
|
+
function StopIcon(props) {
|
|
17655
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "7", y: "7", width: "10", height: "10", rx: "1.5", fill: "currentColor", stroke: "none" }) });
|
|
17656
|
+
}
|
|
17657
|
+
function CopyIcon(props) {
|
|
17658
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17659
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
17660
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3" })
|
|
17661
|
+
] });
|
|
17662
|
+
}
|
|
17663
|
+
function CheckIcon(props) {
|
|
17664
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m5 12 4 4L19 6" }) });
|
|
17665
|
+
}
|
|
17666
|
+
function CloseIcon(props) {
|
|
17667
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m6 6 12 12M18 6 6 18" }) });
|
|
17668
|
+
}
|
|
17669
|
+
function SparkleIcon(props) {
|
|
17670
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 3c.7 4.4 3.6 7.3 8 8-4.4.7-7.3 3.6-8 8-.7-4.4-3.6-7.3-8-8 4.4-.7 7.3-3.6 8-8Z" }) });
|
|
17671
|
+
}
|
|
17672
|
+
function AlertIcon(props) {
|
|
17673
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17674
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
17675
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 8v5M12 16.5h.01" })
|
|
17676
|
+
] });
|
|
17677
|
+
}
|
|
17678
|
+
function SettingsIcon(props) {
|
|
17679
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17680
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" }),
|
|
17681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.86 2.86-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21H9.55v-.1A1.7 1.7 0 0 0 8.5 19.4a1.7 1.7 0 0 0-1.88.34l-.06.06-2.86-2.86.06-.06A1.7 1.7 0 0 0 4.1 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H2V9.55h.4A1.7 1.7 0 0 0 4.1 8.5a1.7 1.7 0 0 0-.34-1.88l-.06-.06L6.56 3.7l.06.06A1.7 1.7 0 0 0 8.5 4.1a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V2h4.05v.4A1.7 1.7 0 0 0 15 4.1a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.86 2.86-.06.06A1.7 1.7 0 0 0 19.4 8.5a1.7 1.7 0 0 0 .6 1 1.7 1.7 0 0 0 1.1.4h.4v4.05h-.4A1.7 1.7 0 0 0 19.4 15Z" })
|
|
17682
|
+
] });
|
|
17683
|
+
}
|
|
17684
|
+
function SunIcon(props) {
|
|
17685
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17686
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
17687
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.66 6.34l1.41-1.41" })
|
|
17688
|
+
] });
|
|
17689
|
+
}
|
|
17690
|
+
function GlobeIcon(props) {
|
|
17691
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17692
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
17693
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18" })
|
|
17694
|
+
] });
|
|
17695
|
+
}
|
|
17696
|
+
function MicrophoneIcon(props) {
|
|
17697
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17698
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "9", y: "2", width: "6", height: "12", rx: "3" }),
|
|
17699
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M5 10v2a7 7 0 0 0 14 0v-2M12 19v3M8 22h8" })
|
|
17700
|
+
] });
|
|
17701
|
+
}
|
|
17702
|
+
|
|
17703
|
+
function recordingErrorMessage(cause) {
|
|
17704
|
+
const message = (cause instanceof Error ? cause.message : String(cause)).replace(/^(?:Error:\s*)+/, "");
|
|
17705
|
+
if (message === "RECORDING_PAGE_UNAVAILABLE") return t("recordingChooseWebsite");
|
|
17706
|
+
return message;
|
|
17707
|
+
}
|
|
17708
|
+
function RecordingPanel() {
|
|
17709
|
+
const [session, setSession] = reactExports.useState();
|
|
17710
|
+
const [pages, setPages] = reactExports.useState([]);
|
|
17711
|
+
const [selectedTab, setSelectedTab] = reactExports.useState();
|
|
17712
|
+
const [pagesLoading, setPagesLoading] = reactExports.useState(true);
|
|
17713
|
+
const [busy, setBusy] = reactExports.useState(false);
|
|
17714
|
+
const [error, setError] = reactExports.useState("");
|
|
17715
|
+
const [automation, setAutomation] = reactExports.useState();
|
|
17716
|
+
const [inputs, setInputs] = reactExports.useState({});
|
|
17717
|
+
const [run, setRun] = reactExports.useState();
|
|
17718
|
+
const api = async (path, init) => {
|
|
17719
|
+
const response = await gatewayFetch(path, init);
|
|
17720
|
+
const data = await response.json();
|
|
17721
|
+
if (!response.ok) throw new Error(typeof data.error === "string" ? data.error : data.error?.message || t("recordingRequestFailed"));
|
|
17722
|
+
return data;
|
|
17723
|
+
};
|
|
17724
|
+
const command = async (operation, tabId) => {
|
|
17725
|
+
const response = await chrome.runtime.sendMessage({ type: "browser/recording-command", operation, ...tabId !== void 0 ? { tabId } : {} });
|
|
17726
|
+
if (!response.ok) throw new Error(response.error);
|
|
17727
|
+
return response.value;
|
|
17728
|
+
};
|
|
17729
|
+
reactExports.useEffect(() => {
|
|
17730
|
+
let disposed = false;
|
|
17731
|
+
const refresh = async (followActive = false) => {
|
|
17732
|
+
try {
|
|
17733
|
+
const tabs = (await chrome.tabs.query({ currentWindow: true })).filter((tab) => tab.id !== void 0 && /^https?:\/\//.test(tab.url ?? ""));
|
|
17734
|
+
if (disposed) return;
|
|
17735
|
+
setPages(tabs);
|
|
17736
|
+
setSelectedTab((current) => followActive && tabs.find((tab) => tab.active)?.id || tabs.find((tab) => tab.id === current)?.id || tabs.find((tab) => tab.active)?.id || (tabs.length === 1 ? tabs[0].id : void 0));
|
|
17737
|
+
} catch (cause) {
|
|
17738
|
+
if (!disposed) setError(recordingErrorMessage(cause));
|
|
17739
|
+
} finally {
|
|
17740
|
+
if (!disposed) setPagesLoading(false);
|
|
17741
|
+
}
|
|
17742
|
+
};
|
|
17743
|
+
const activated = () => {
|
|
17744
|
+
void refresh(true);
|
|
17745
|
+
};
|
|
17746
|
+
const changed = () => {
|
|
17747
|
+
void refresh();
|
|
17748
|
+
};
|
|
17749
|
+
void refresh(true);
|
|
17750
|
+
chrome.tabs.onActivated.addListener(activated);
|
|
17751
|
+
chrome.tabs.onUpdated.addListener(changed);
|
|
17752
|
+
chrome.tabs.onRemoved.addListener(changed);
|
|
17753
|
+
chrome.tabs.onCreated.addListener(changed);
|
|
17754
|
+
return () => {
|
|
17755
|
+
disposed = true;
|
|
17756
|
+
chrome.tabs.onActivated.removeListener(activated);
|
|
17757
|
+
chrome.tabs.onUpdated.removeListener(changed);
|
|
17758
|
+
chrome.tabs.onRemoved.removeListener(changed);
|
|
17759
|
+
chrome.tabs.onCreated.removeListener(changed);
|
|
17760
|
+
};
|
|
17761
|
+
}, []);
|
|
17762
|
+
reactExports.useEffect(() => {
|
|
17763
|
+
let disposed = false;
|
|
17764
|
+
const refresh = () => void command("status").then((sessions) => {
|
|
17765
|
+
if (!disposed) setSession(sessions.find((item) => ["recording", "paused"].includes(item.state)) ?? sessions.at(-1));
|
|
17766
|
+
}).catch((cause) => {
|
|
17767
|
+
if (!disposed) setError(recordingErrorMessage(cause));
|
|
17768
|
+
});
|
|
17769
|
+
refresh();
|
|
17770
|
+
const timer = window.setInterval(refresh, 1500);
|
|
17771
|
+
return () => {
|
|
17772
|
+
disposed = true;
|
|
17773
|
+
window.clearInterval(timer);
|
|
17774
|
+
};
|
|
17775
|
+
}, []);
|
|
17776
|
+
reactExports.useEffect(() => {
|
|
17777
|
+
if (!session?.automationId) {
|
|
17778
|
+
setAutomation(void 0);
|
|
17779
|
+
return;
|
|
17780
|
+
}
|
|
17781
|
+
let disposed = false;
|
|
17782
|
+
void api(`/api/browser/automations/${encodeURIComponent(session.automationId)}`).then((data) => {
|
|
17783
|
+
if (disposed) return;
|
|
17784
|
+
const saved2 = data.automation;
|
|
17785
|
+
setAutomation(saved2);
|
|
17786
|
+
setInputs(Object.fromEntries(Object.entries(saved2.definition.inputs).map(([key, spec]) => [key, spec.default ?? ""])));
|
|
17787
|
+
}).catch((cause) => {
|
|
17788
|
+
if (!disposed) setError(recordingErrorMessage(cause));
|
|
17789
|
+
});
|
|
17790
|
+
return () => {
|
|
17791
|
+
disposed = true;
|
|
17792
|
+
};
|
|
17793
|
+
}, [session?.automationId]);
|
|
17794
|
+
reactExports.useEffect(() => {
|
|
17795
|
+
if (!run || !["queued", "running"].includes(run.status)) return;
|
|
17796
|
+
let disposed = false;
|
|
17797
|
+
const timer = window.setInterval(() => {
|
|
17798
|
+
void api(`/api/browser/automation-runs/${run.id}`).then((data) => {
|
|
17799
|
+
if (!disposed) setRun(data.run);
|
|
17800
|
+
}).catch((cause) => {
|
|
17801
|
+
if (!disposed) setError(recordingErrorMessage(cause));
|
|
17802
|
+
});
|
|
17803
|
+
}, 1e3);
|
|
17804
|
+
return () => {
|
|
17805
|
+
disposed = true;
|
|
17806
|
+
window.clearInterval(timer);
|
|
17807
|
+
};
|
|
17808
|
+
}, [run]);
|
|
17809
|
+
const runSaved = async () => {
|
|
17810
|
+
if (!automation) return;
|
|
17811
|
+
setBusy(true);
|
|
17812
|
+
setError("");
|
|
17813
|
+
try {
|
|
17814
|
+
const data = await api(`/api/browser/automations/${automation.id}/run`, {
|
|
17815
|
+
method: "POST",
|
|
17816
|
+
headers: { "Content-Type": "application/json" },
|
|
17817
|
+
body: JSON.stringify({ inputs, revision: automation.revision, clientRequestId: crypto.randomUUID() })
|
|
17818
|
+
});
|
|
17819
|
+
setRun(data.run);
|
|
17820
|
+
} catch (cause) {
|
|
17821
|
+
setError(recordingErrorMessage(cause));
|
|
17822
|
+
} finally {
|
|
17823
|
+
setBusy(false);
|
|
17824
|
+
}
|
|
17825
|
+
};
|
|
17826
|
+
const act = async (operation) => {
|
|
17827
|
+
setBusy(true);
|
|
17828
|
+
setError("");
|
|
17829
|
+
try {
|
|
17830
|
+
if (operation === "start") {
|
|
17831
|
+
if (selectedTab === void 0) return;
|
|
17832
|
+
await chrome.tabs.update(selectedTab, { active: true });
|
|
17833
|
+
setRun(void 0);
|
|
17834
|
+
}
|
|
17835
|
+
setSession(await command(operation, operation === "start" ? selectedTab : void 0));
|
|
17836
|
+
} catch (cause) {
|
|
17837
|
+
setError(recordingErrorMessage(cause));
|
|
17838
|
+
} finally {
|
|
17839
|
+
setBusy(false);
|
|
17840
|
+
}
|
|
17841
|
+
};
|
|
17842
|
+
const active = !!session && ["recording", "paused"].includes(session.state);
|
|
17843
|
+
const saved = !!session?.automationId;
|
|
17844
|
+
const syncing = session?.state === "stopped" && !saved;
|
|
17845
|
+
const page = pages.find((tab) => tab.id === (active || syncing ? session.tabId : selectedTab));
|
|
17846
|
+
const status = active ? session.state === "paused" ? "recordingPaused" : "recordingActive" : saved ? "recordingSavedShort" : session?.state === "stopped" ? "recordingSaving" : session?.state === "interrupted" ? "recordingInterrupted" : "recordingReady";
|
|
17847
|
+
const runStatus = run?.businessOutcome === "unknown" ? t("recordingUnknown") : run?.status === "succeeded" ? t("recordingCompleted") : run?.status === "cancelled" ? t("recordingStopped") : run?.status === "failed" ? recordingErrorMessage(run.error || t("recordingRequestFailed")) : t("recordingRunning");
|
|
17848
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "recording-panel", "data-state": active ? session.state : syncing ? "syncing" : saved ? "saved" : "ready", "aria-label": t("recordingTitle"), "aria-busy": busy, children: [
|
|
17849
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: "recording-heading", children: [
|
|
17850
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recording-icon", children: saved ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(PageIcon, {}) }),
|
|
17851
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "recording-heading-text", children: [
|
|
17852
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: saved && automation ? automation.definition.name : t("recordingTitle") }),
|
|
17853
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: active ? t("recordingActiveHelp") : saved ? t("recordingSaved") : t("recordingDescription") })
|
|
17854
|
+
] }),
|
|
17855
|
+
(active || saved || session?.state === "stopped" || session?.state === "interrupted" || selectedTab !== void 0) && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: `recording-status ${active && session.state === "recording" ? "is-recording" : saved ? "is-saved" : ""}`, role: "status", children: [
|
|
17856
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("i", {}),
|
|
17857
|
+
t(status)
|
|
17858
|
+
] })
|
|
17859
|
+
] }),
|
|
17860
|
+
!active && !syncing && (!saved || selectedTab === void 0) && (pagesLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "recording-skeleton" }) : pages.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "recording-target-label", children: [
|
|
17861
|
+
t("recordingTarget"),
|
|
17862
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("select", { className: "recording-page-select", value: selectedTab ?? "", disabled: busy, onChange: (event) => {
|
|
17863
|
+
setSelectedTab(Number(event.target.value));
|
|
17864
|
+
setError("");
|
|
17865
|
+
}, children: [
|
|
17866
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", disabled: true, children: t("recordingChoosePage") }),
|
|
17867
|
+
pages.map((tab) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: tab.id, children: tab.title || new URL(tab.url).hostname }, tab.id))
|
|
17868
|
+
] })
|
|
17869
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "recording-hint", children: t("recordingChooseWebsite") })),
|
|
17870
|
+
page && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "recording-page", children: [
|
|
17871
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(GlobeIcon, {}),
|
|
17872
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: new URL(page.url).hostname }),
|
|
17873
|
+
active && /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: page.title })
|
|
17874
|
+
] }),
|
|
17875
|
+
syncing && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "recording-sync", role: "status", children: [
|
|
17876
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recording-spinner", "aria-hidden": "true" }),
|
|
17877
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("recordingSyncing") })
|
|
17878
|
+
] }),
|
|
17879
|
+
session?.state === "interrupted" && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "recording-hint", children: t("recordingInterruptedHelp") }),
|
|
17880
|
+
automation && Object.keys(automation.definition.inputs).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("details", { className: "recording-parameters", children: [
|
|
17881
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("summary", { children: t("recordingParameters") }),
|
|
17882
|
+
Object.entries(automation.definition.inputs).map(([key, spec]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: `recording-input ${spec.type === "boolean" ? "is-checkbox" : ""}`, children: [
|
|
17883
|
+
spec.description || key,
|
|
17884
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17885
|
+
"input",
|
|
17886
|
+
{
|
|
17887
|
+
type: spec.type === "boolean" ? "checkbox" : spec.type === "number" ? "number" : "text",
|
|
17888
|
+
checked: spec.type === "boolean" ? !!inputs[key] : void 0,
|
|
17889
|
+
value: spec.type === "boolean" ? void 0 : String(inputs[key] ?? ""),
|
|
17890
|
+
onChange: (event) => setInputs((current) => ({ ...current, [key]: spec.type === "boolean" ? event.target.checked : spec.type === "number" ? Number(event.target.value) : event.target.value }))
|
|
17891
|
+
}
|
|
17892
|
+
)
|
|
17893
|
+
] }, key))
|
|
17894
|
+
] }),
|
|
17895
|
+
!syncing && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "recording-actions", children: active ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
17896
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "recording-button", disabled: busy, onClick: () => void act(session.state === "paused" ? "resume" : "pause"), children: t(session.state === "paused" ? "recordingResume" : "recordingPause") }),
|
|
17897
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "recording-button is-primary", disabled: busy, onClick: () => void act("finish"), children: [
|
|
17898
|
+
busy ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recording-spinner", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(StopIcon, {}),
|
|
17899
|
+
t("recordingFinish")
|
|
17900
|
+
] })
|
|
17901
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
17902
|
+
automation && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "recording-button is-primary", disabled: busy || !!run && ["queued", "running"].includes(run.status), onClick: () => void runSaved(), children: t("recordingRun") }),
|
|
17903
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: `recording-button ${saved ? "" : "is-primary"}`, disabled: busy || pagesLoading || selectedTab === void 0, onClick: () => void act("start"), children: [
|
|
17904
|
+
busy ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recording-spinner", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "recording-button-dot" }),
|
|
17905
|
+
t(saved ? "recordingNew" : "recordingStart")
|
|
17906
|
+
] })
|
|
17907
|
+
] }) }),
|
|
17908
|
+
run && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "recording-run-status", role: "status", children: runStatus }),
|
|
17909
|
+
run?.status === "succeeded" && /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "recording-result", children: typeof run.result === "object" && run.result !== null ? Object.entries(run.result).map(([key, value]) => `${key}: ${typeof value === "string" ? value : JSON.stringify(value)}`).join("\n") : String(run.result ?? "") }),
|
|
17910
|
+
(error || session?.error) && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "recording-error", role: "alert", children: recordingErrorMessage(error || session.error) })
|
|
17594
17911
|
] });
|
|
17595
17912
|
}
|
|
17596
17913
|
|
|
@@ -17908,109 +18225,6 @@ class PcmWavRecorder {
|
|
|
17908
18225
|
}
|
|
17909
18226
|
}
|
|
17910
18227
|
|
|
17911
|
-
function IconBase({ children, ...props }) {
|
|
17912
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", ...props, children });
|
|
17913
|
-
}
|
|
17914
|
-
function ChevronDownIcon(props) {
|
|
17915
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m7 10 5 5 5-5" }) });
|
|
17916
|
-
}
|
|
17917
|
-
function ArrowDownIcon(props) {
|
|
17918
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 5v14M6 13l6 6 6-6" }) });
|
|
17919
|
-
}
|
|
17920
|
-
function PlusIcon(props) {
|
|
17921
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 5v14M5 12h14" }) });
|
|
17922
|
-
}
|
|
17923
|
-
function SearchIcon(props) {
|
|
17924
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17925
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "11", cy: "11", r: "7" }),
|
|
17926
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m20 20-4-4" })
|
|
17927
|
-
] });
|
|
17928
|
-
}
|
|
17929
|
-
function PaperclipIcon(props) {
|
|
17930
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m20.5 11.5-8.9 8.9a6 6 0 0 1-8.5-8.5l9.5-9.5a4 4 0 0 1 5.7 5.7l-9.5 9.5A2 2 0 0 1 6 14.8l8.8-8.8" }) });
|
|
17931
|
-
}
|
|
17932
|
-
function PageIcon(props) {
|
|
17933
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17934
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
|
|
17935
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2v6h6M8 13h8M8 17h5" })
|
|
17936
|
-
] });
|
|
17937
|
-
}
|
|
17938
|
-
function SelectionIcon(props) {
|
|
17939
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M8 4H5a1 1 0 0 0-1 1v3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3M8 9h8M8 13h6" }) });
|
|
17940
|
-
}
|
|
17941
|
-
function CameraIcon(props) {
|
|
17942
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17943
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14.5 4 16 7h3a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3l1.5-3Z" }),
|
|
17944
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "13", r: "3" })
|
|
17945
|
-
] });
|
|
17946
|
-
}
|
|
17947
|
-
function FileIcon(props) {
|
|
17948
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17949
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
|
|
17950
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14 2v6h6" })
|
|
17951
|
-
] });
|
|
17952
|
-
}
|
|
17953
|
-
function EyeIcon(props) {
|
|
17954
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17955
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z" }),
|
|
17956
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "2.5" })
|
|
17957
|
-
] });
|
|
17958
|
-
}
|
|
17959
|
-
function CursorIcon(props) {
|
|
17960
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m5 3 14 9-6 2-3 6Z" }) });
|
|
17961
|
-
}
|
|
17962
|
-
function SendIcon(props) {
|
|
17963
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m5 12 7-7 7 7M12 19V5" }) });
|
|
17964
|
-
}
|
|
17965
|
-
function StopIcon(props) {
|
|
17966
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "7", y: "7", width: "10", height: "10", rx: "1.5", fill: "currentColor", stroke: "none" }) });
|
|
17967
|
-
}
|
|
17968
|
-
function CopyIcon(props) {
|
|
17969
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17970
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
17971
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3" })
|
|
17972
|
-
] });
|
|
17973
|
-
}
|
|
17974
|
-
function CheckIcon(props) {
|
|
17975
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m5 12 4 4L19 6" }) });
|
|
17976
|
-
}
|
|
17977
|
-
function CloseIcon(props) {
|
|
17978
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m6 6 12 12M18 6 6 18" }) });
|
|
17979
|
-
}
|
|
17980
|
-
function SparkleIcon(props) {
|
|
17981
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconBase, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 3c.7 4.4 3.6 7.3 8 8-4.4.7-7.3 3.6-8 8-.7-4.4-3.6-7.3-8-8 4.4-.7 7.3-3.6 8-8Z" }) });
|
|
17982
|
-
}
|
|
17983
|
-
function AlertIcon(props) {
|
|
17984
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17985
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
17986
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 8v5M12 16.5h.01" })
|
|
17987
|
-
] });
|
|
17988
|
-
}
|
|
17989
|
-
function SettingsIcon(props) {
|
|
17990
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17991
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" }),
|
|
17992
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.86 2.86-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21H9.55v-.1A1.7 1.7 0 0 0 8.5 19.4a1.7 1.7 0 0 0-1.88.34l-.06.06-2.86-2.86.06-.06A1.7 1.7 0 0 0 4.1 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H2V9.55h.4A1.7 1.7 0 0 0 4.1 8.5a1.7 1.7 0 0 0-.34-1.88l-.06-.06L6.56 3.7l.06.06A1.7 1.7 0 0 0 8.5 4.1a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V2h4.05v.4A1.7 1.7 0 0 0 15 4.1a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.86 2.86-.06.06A1.7 1.7 0 0 0 19.4 8.5a1.7 1.7 0 0 0 .6 1 1.7 1.7 0 0 0 1.1.4h.4v4.05h-.4A1.7 1.7 0 0 0 19.4 15Z" })
|
|
17993
|
-
] });
|
|
17994
|
-
}
|
|
17995
|
-
function SunIcon(props) {
|
|
17996
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
17997
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
17998
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.66 6.34l1.41-1.41" })
|
|
17999
|
-
] });
|
|
18000
|
-
}
|
|
18001
|
-
function GlobeIcon(props) {
|
|
18002
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
18003
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
18004
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18" })
|
|
18005
|
-
] });
|
|
18006
|
-
}
|
|
18007
|
-
function MicrophoneIcon(props) {
|
|
18008
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconBase, { ...props, children: [
|
|
18009
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "9", y: "2", width: "6", height: "12", rx: "3" }),
|
|
18010
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M5 10v2a7 7 0 0 0 14 0v-2M12 19v3M8 22h8" })
|
|
18011
|
-
] });
|
|
18012
|
-
}
|
|
18013
|
-
|
|
18014
18228
|
function VoiceInput({ disabled, onTranscript, onBusy }) {
|
|
18015
18229
|
const [state, setState] = reactExports.useState("idle");
|
|
18016
18230
|
const [error, setError] = reactExports.useState("");
|
|
@@ -18760,6 +18974,7 @@ class BrowserChatClient {
|
|
|
18760
18974
|
runTopic;
|
|
18761
18975
|
recoveringOutbox = false;
|
|
18762
18976
|
sendingInput = false;
|
|
18977
|
+
approvalResponses = /* @__PURE__ */ new Set();
|
|
18763
18978
|
lastOutboxRecoveryAt = 0;
|
|
18764
18979
|
sessionsRequest = 0;
|
|
18765
18980
|
defaultModelId;
|
|
@@ -18974,7 +19189,6 @@ ${endpointId}`;
|
|
|
18974
19189
|
queuedInputs: [],
|
|
18975
19190
|
clarification: void 0,
|
|
18976
19191
|
tabBinding: void 0,
|
|
18977
|
-
browserApproval: void 0,
|
|
18978
19192
|
modelConfig: void 0,
|
|
18979
19193
|
error: void 0
|
|
18980
19194
|
});
|
|
@@ -19005,7 +19219,6 @@ ${endpointId}`;
|
|
|
19005
19219
|
));
|
|
19006
19220
|
if (this.snapshot.conversationId !== conversationId) return;
|
|
19007
19221
|
if (run.payload?.active && run.payload.runId) await this.followRun(run.payload.runId);
|
|
19008
|
-
await this.reloadBrowserApproval();
|
|
19009
19222
|
if (this.snapshot.conversationId !== conversationId) return;
|
|
19010
19223
|
this.update({ pendingDelivery: Boolean(await readBrowserOutbox(await inputStorageKey(conversationId))) });
|
|
19011
19224
|
if (this.snapshot.endpointReady) await this.recoverOutbox();
|
|
@@ -19327,16 +19540,6 @@ ${endpointId}`;
|
|
|
19327
19540
|
if (binding) await chrome.storage.session.remove(`${TAB_BINDING_PREFIX}${binding.id}`);
|
|
19328
19541
|
this.update({ tabBinding: void 0 });
|
|
19329
19542
|
}
|
|
19330
|
-
async respondToBrowserApproval(decision) {
|
|
19331
|
-
const approval = this.snapshot.browserApproval;
|
|
19332
|
-
if (!approval) return;
|
|
19333
|
-
await json(await gatewayFetch("/api/browser/approvals/respond", {
|
|
19334
|
-
method: "POST",
|
|
19335
|
-
headers: { "Content-Type": "application/json" },
|
|
19336
|
-
body: JSON.stringify({ id: approval.id, decision })
|
|
19337
|
-
}));
|
|
19338
|
-
await this.reloadBrowserApproval();
|
|
19339
|
-
}
|
|
19340
19543
|
async waitForRun(conversationId, clientMessageId) {
|
|
19341
19544
|
for (let attempt = 0; attempt < 20; attempt += 1) {
|
|
19342
19545
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
@@ -19366,10 +19569,9 @@ ${endpointId}`;
|
|
|
19366
19569
|
if (event === "clarification.updated") {
|
|
19367
19570
|
const conversationId = this.snapshot.conversationId;
|
|
19368
19571
|
if (conversationId && data && typeof data === "object" && data.conversationId === conversationId) {
|
|
19369
|
-
this.
|
|
19572
|
+
await this.applyClarification(data, conversationId);
|
|
19370
19573
|
}
|
|
19371
19574
|
}
|
|
19372
|
-
if (event === "browser.approval.required") await this.reloadBrowserApproval();
|
|
19373
19575
|
return;
|
|
19374
19576
|
}
|
|
19375
19577
|
if (topic === "sessions") {
|
|
@@ -19495,6 +19697,35 @@ ${endpointId}`;
|
|
|
19495
19697
|
fixedModel: config.fixedModel === true
|
|
19496
19698
|
} });
|
|
19497
19699
|
}
|
|
19700
|
+
async applyClarification(value, conversationId) {
|
|
19701
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
19702
|
+
const clarification = mapClarification(value, conversationId);
|
|
19703
|
+
if (clarification?.kind !== "approval") {
|
|
19704
|
+
this.update({ clarification });
|
|
19705
|
+
return;
|
|
19706
|
+
}
|
|
19707
|
+
this.update({ clarification: void 0 });
|
|
19708
|
+
const key = `browser-approval:${clarification.id}:${clarification.version}`;
|
|
19709
|
+
if (this.approvalResponses.has(key)) return;
|
|
19710
|
+
this.approvalResponses.add(key);
|
|
19711
|
+
try {
|
|
19712
|
+
await json(await gatewayFetch(`/api/clarifications/${encodeURIComponent(clarification.id)}/responses`, {
|
|
19713
|
+
method: "POST",
|
|
19714
|
+
headers: { "Content-Type": "application/json" },
|
|
19715
|
+
body: JSON.stringify({
|
|
19716
|
+
action: "answer",
|
|
19717
|
+
answer: "Approved. Continue with the requested operation.",
|
|
19718
|
+
expectedVersion: clarification.version,
|
|
19719
|
+
idempotencyKey: key
|
|
19720
|
+
})
|
|
19721
|
+
}, this.profileIdentity));
|
|
19722
|
+
} catch (cause) {
|
|
19723
|
+
this.approvalResponses.delete(key);
|
|
19724
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
19725
|
+
this.update({ error: cause instanceof Error ? cause.message : String(cause) });
|
|
19726
|
+
}
|
|
19727
|
+
}
|
|
19728
|
+
}
|
|
19498
19729
|
async reloadClarification() {
|
|
19499
19730
|
const conversationId = this.snapshot.conversationId;
|
|
19500
19731
|
if (!conversationId) return;
|
|
@@ -19503,7 +19734,7 @@ ${endpointId}`;
|
|
|
19503
19734
|
`/api/sessions/${encodeURIComponent(conversationId)}/clarification`
|
|
19504
19735
|
));
|
|
19505
19736
|
if (this.snapshot.conversationId === conversationId) {
|
|
19506
|
-
this.
|
|
19737
|
+
await this.applyClarification(result.payload, conversationId);
|
|
19507
19738
|
}
|
|
19508
19739
|
}
|
|
19509
19740
|
async reloadTabBinding() {
|
|
@@ -19519,19 +19750,6 @@ ${endpointId}`;
|
|
|
19519
19750
|
await chrome.storage.session.set({ [`${TAB_BINDING_PREFIX}${result.payload.id}`]: result.payload });
|
|
19520
19751
|
this.update({ tabBinding: result.payload });
|
|
19521
19752
|
}
|
|
19522
|
-
async reloadBrowserApproval() {
|
|
19523
|
-
const conversationId = this.snapshot.conversationId;
|
|
19524
|
-
if (!conversationId || !this.snapshot.tabBinding) {
|
|
19525
|
-
this.update({ browserApproval: void 0 });
|
|
19526
|
-
return;
|
|
19527
|
-
}
|
|
19528
|
-
const result = await json(await gatewayFetch(
|
|
19529
|
-
`/api/browser/approvals?conversationId=${encodeURIComponent(conversationId)}`
|
|
19530
|
-
));
|
|
19531
|
-
if (this.snapshot.conversationId === conversationId) {
|
|
19532
|
-
this.update({ browserApproval: result.approvals.find((approval) => approval.status === "pending") });
|
|
19533
|
-
}
|
|
19534
|
-
}
|
|
19535
19753
|
async reconcileAbortedRun(runId) {
|
|
19536
19754
|
const conversationId = this.snapshot.conversationId;
|
|
19537
19755
|
if (!conversationId) return;
|
|
@@ -19645,12 +19863,7 @@ async function fileToBrowserAttachment(file) {
|
|
|
19645
19863
|
};
|
|
19646
19864
|
}
|
|
19647
19865
|
async function captureVisibleScreenshot() {
|
|
19648
|
-
const
|
|
19649
|
-
const [granted, [activeTab]] = await Promise.all([
|
|
19650
|
-
chrome.permissions.request({ origins: ["<all_urls>"] }),
|
|
19651
|
-
tabPromise
|
|
19652
|
-
]);
|
|
19653
|
-
if (!granted) throw new Error(t("errorScreenshotPermissionRequired"));
|
|
19866
|
+
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
|
19654
19867
|
if (activeTab?.id === void 0) throw new Error(t("errorNoActivePage"));
|
|
19655
19868
|
const dataUrl = await runWithTabSiteAccess(activeTab.id, async (accessibleTab) => {
|
|
19656
19869
|
const [currentTab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
|
@@ -28323,13 +28536,6 @@ function formatSessionDate(timestamp) {
|
|
|
28323
28536
|
if (date.toDateString() === now.toDateString()) return formatMessageTime(date.getTime());
|
|
28324
28537
|
return new Intl.DateTimeFormat(extensionLocale(), { month: "short", day: "numeric" }).format(date);
|
|
28325
28538
|
}
|
|
28326
|
-
const RISK_MESSAGE_KEYS = {
|
|
28327
|
-
external_effect: "riskExternalEffect",
|
|
28328
|
-
destructive: "riskDestructive",
|
|
28329
|
-
sensitive: "riskSensitive",
|
|
28330
|
-
draft: "riskDraft",
|
|
28331
|
-
read: "riskRead"
|
|
28332
|
-
};
|
|
28333
28539
|
function formatFileSize(size) {
|
|
28334
28540
|
if (typeof size !== "number" || !Number.isFinite(size) || size < 0) return "";
|
|
28335
28541
|
if (size < 1024) return `${size} B`;
|
|
@@ -28937,25 +29143,10 @@ function ChatPanel({ gatewayId, deviceId }) {
|
|
|
28937
29143
|
/* @__PURE__ */ jsxRuntimeExports.jsx(PaperclipIcon, {}),
|
|
28938
29144
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("dropFiles") })
|
|
28939
29145
|
] }) : null,
|
|
28940
|
-
snapshot.
|
|
28941
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "request-card-title", children: [
|
|
28942
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertIcon, {}),
|
|
28943
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("strong", { children: [
|
|
28944
|
-
t("browserApproval"),
|
|
28945
|
-
" · ",
|
|
28946
|
-
t(RISK_MESSAGE_KEYS[snapshot.browserApproval.risk])
|
|
28947
|
-
] })
|
|
28948
|
-
] }),
|
|
28949
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: snapshot.browserApproval.summary }),
|
|
28950
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "request-actions", children: [
|
|
28951
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "request-primary", type: "button", onClick: () => void runControlAction(() => client.respondToBrowserApproval("approved")), children: t("allowOnce") }),
|
|
28952
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", onClick: () => void runControlAction(() => client.respondToBrowserApproval("denied")), children: t("deny") })
|
|
28953
|
-
] })
|
|
28954
|
-
] }) : null,
|
|
28955
|
-
snapshot.clarification ? /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "request-card", "aria-label": t("agentQuestion"), children: [
|
|
29146
|
+
snapshot.clarification?.kind === "input" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "request-card", "aria-label": t("agentQuestion"), children: [
|
|
28956
29147
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "request-card-title", children: [
|
|
28957
29148
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SparkleIcon, {}),
|
|
28958
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children:
|
|
29149
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t("xopcNeedsInput") })
|
|
28959
29150
|
] }),
|
|
28960
29151
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: snapshot.clarification.question }),
|
|
28961
29152
|
snapshot.clarification.choices?.length ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "choice-list", children: snapshot.clarification.choices.map((choice) => /* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", disabled: clarificationSubmitting, onClick: () => void respondToClarification("answer", choice), children: choice }, choice)) }) : null,
|
|
@@ -29227,36 +29418,24 @@ ${pageContext.context.selection ?? pageContext.context.text ?? ""}` }), children
|
|
|
29227
29418
|
] }),
|
|
29228
29419
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "tools-menu-section tab-access-section", children: [
|
|
29229
29420
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "tools-menu-label", children: t("liveTabAccess") }),
|
|
29230
|
-
snapshot.tabBinding ? /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: "active-access", onClick: () => {
|
|
29421
|
+
snapshot.tabBinding?.mode === "act" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: "active-access", onClick: () => {
|
|
29231
29422
|
setToolsOpen(false);
|
|
29232
29423
|
void runControlAction(() => client.unbindActiveTab());
|
|
29233
29424
|
}, children: [
|
|
29234
|
-
|
|
29425
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CursorIcon, {}),
|
|
29235
29426
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
29236
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children:
|
|
29427
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t("controlEnabled") }),
|
|
29237
29428
|
/* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: t("stopAccess") })
|
|
29238
29429
|
] }),
|
|
29239
29430
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CloseIcon, {})
|
|
29240
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29241
|
-
|
|
29242
|
-
|
|
29243
|
-
|
|
29244
|
-
},
|
|
29245
|
-
|
|
29246
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
29247
|
-
|
|
29248
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: t("keepPageAvailable") })
|
|
29249
|
-
] })
|
|
29250
|
-
] }),
|
|
29251
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => {
|
|
29252
|
-
setToolsOpen(false);
|
|
29253
|
-
void runControlAction(() => client.bindActiveTab("act"));
|
|
29254
|
-
}, children: [
|
|
29255
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(CursorIcon, {}),
|
|
29256
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
29257
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t("controlThisTab") }),
|
|
29258
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: t("controlSafeguards") })
|
|
29259
|
-
] })
|
|
29431
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => {
|
|
29432
|
+
setToolsOpen(false);
|
|
29433
|
+
void runControlAction(() => client.bindActiveTab("act"));
|
|
29434
|
+
}, children: [
|
|
29435
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CursorIcon, {}),
|
|
29436
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
29437
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t("useThisTab") }),
|
|
29438
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: t("useThisTabHelp") })
|
|
29260
29439
|
] })
|
|
29261
29440
|
] })
|
|
29262
29441
|
] })
|
|
@@ -29317,9 +29496,6 @@ async function reconnectBrowserBridge() {
|
|
|
29317
29496
|
}
|
|
29318
29497
|
function pairingErrorMessage(cause) {
|
|
29319
29498
|
const message = cause instanceof Error ? cause.message : String(cause);
|
|
29320
|
-
if (message === "Gateway site permission was not granted") {
|
|
29321
|
-
return t("errorGatewayPermissionHelp");
|
|
29322
|
-
}
|
|
29323
29499
|
if (message === "PAIRING_EXPIRED" || message === "Pairing expired" || message === "Pairing invitation has expired") {
|
|
29324
29500
|
return t("errorInvitationExpiredHelp");
|
|
29325
29501
|
}
|
|
@@ -29560,7 +29736,10 @@ function SidePanelApp({ initialLocale, initialTheme }) {
|
|
|
29560
29736
|
invitation ? /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => void cancelPairing(), disabled: state === "pairing", children: t("cancelPairing") }) : null
|
|
29561
29737
|
] })
|
|
29562
29738
|
] }) : null
|
|
29563
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.
|
|
29739
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
29740
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RecordingPanel, {}),
|
|
29741
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChatPanel, { gatewayId: profile.gatewayId, deviceId: profile.deviceId }, JSON.stringify([profile.gatewayId, profile.gatewayUrl, profile.deviceId]))
|
|
29742
|
+
] })
|
|
29564
29743
|
] });
|
|
29565
29744
|
}
|
|
29566
29745
|
|