@xopcai/xopc 0.0.250 → 0.0.252
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 +8 -5
- package/README.zh-CN.md +8 -5
- package/dist/browser-ext/dist/background.js +358 -768
- package/dist/browser-ext/manifest.json +1 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DfBjTSo9.js → activity-store-w3eq3YpP.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BN6FJXkJ.js → agent-avatar-dicebear-k039rbUz.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-C7rZH1A2.js → agent-defaults-settings-panel-D4J4oq8p.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CgGaoo4z.js → agents-Bmth_bSQ.js} +1 -1
- package/dist/gateway/static/root/assets/{api-zxpcJfgj.js → api-2joIfbrH.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D2gMshuS.js → app-management-settings-panel-ByJ4kiD0.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-wMu0jSKx.js → appearance-settings-BK2Jga-B.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-B3ky7cWU.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-u6EE3JV8.js → archive-plugin-DMDKtYpi.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DbJurnv-.js → attachment-load-B764Ql3Z.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Ew_e5HDn.js → automations-page-D-sO8CZe.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-Ds5-_-9z.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DtDFNfPM.js → binary-plugins-fxtzYRpv.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CnAwmabq.js → block-editor-Bcjtvckh.js} +50 -50
- package/dist/gateway/static/root/assets/browser-automation-inputs-BSmnusjD.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-DC_OQIBk.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-C1FojyG6.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Bs59UCut.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-CM9vNmoo.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-CX-yWwLD.js → channels-status-swr-BuWjIG_a.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CryTDNdD.js → chat-terminal-dock-5SevEo_I.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-BPZ44D-V.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-ji5aWrjG.js → cron-expression-DtsfalBM.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Dro_w3eX.js → date-picker-tDEQV5TP.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Ce19KKnX.js → dependency-picker-HhNwg0Y2.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DsSi-3uZ.js → desktop-pet-acU4Li-C.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-8WQ4woJy.js → desktop-pet-settings-R84AR0Pe.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CgvEBfLZ.js → extension-debug-page-CrLlRkSN.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DkznBbMj.js → extension-page-BH5lmZXE.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BOjhchK2.js → extension-settings-page-BscjNAd1.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CMNbl0FZ.js → gateway-config-swr-9HidFZUd.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-BxLcW6ij.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CR7Xg8As.js → gateway-startup-retry-DRCPXONr.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-K5Zhl2rx.js +1 -0
- package/dist/gateway/static/root/assets/home-page-CZAg9RBv.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-C5mn73ca.js → image-generation-api-CR6Kle8H.js} +1 -1
- package/dist/gateway/static/root/assets/index-D4Ykja-U.js +72 -0
- package/dist/gateway/static/root/assets/index-zIJ3AXgR.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BYhfzsqe.js → keyboard-shortcuts-settings-B1QR49-7.js} +1 -1
- package/dist/gateway/static/root/assets/languages-5WaOu0Lf.js +2 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-wicoV-ti.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-vBlknU7C.js → local-apps-page-C74It-T8.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CF4erhjB.js → locale-store-BfZGZKSs.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-xX-7S49A.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-Dnx6mSNe.js → management-settings-1kNnYL97.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-editor-BjMTIM-m.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-CQvzsE24.js → markdown-view-DjiwT28p.js} +2 -2
- package/dist/gateway/static/root/assets/{media-plugins-DrMYeHe7.js → media-plugins-B5c0AoS1.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DaIwVWar.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-AKgGy3Kx.js → mobile-pairing-wizard-CsIZqK51.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CfWxopl4.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-CYN-LCHJ.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-CX9T71by.js → page-tabs-CqJN6Ljz.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DvEHoimN.js → preview-open-alternatives-DqRIGxf4.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-COcr_NUJ.js → product-open-page-DE2nPE_K.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-B5G3LzDq.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CuVK2mKu.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-BsRBlji7.js → registry-api-Bpy8XX-5.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Dnd73xWt.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CQ13P-mS.js → runtime-tools-settings-panel-Bb4b74-P.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-BUVyTpZj.js → schema-form-DoPU5j3J.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-XL4LyKZe.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-0ForzDSS.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DVY-8_B9.js → settings-form-section-Ci-9WajJ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CdiVYyTl.js → settings-page-CL_2F95D.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DVws6XZc.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-C88YLKm4.js → share-preview-page-XUA3oKQX.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BwDvcacF.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BJjrATqE.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DLir1nM0.js → skills-page-sXXAZDc9.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-BMZAfS3G.js → skills-page.utils-DD79Bl1I.js} +1 -1
- package/dist/gateway/static/root/assets/source-workspace-editor-CVWzt0oT.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BM8ivYan.js → system-settings-panel-BEH64qBV.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-0jxMi75O.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-BOgkc_9D.js → theme-store-CISSxU1c.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DemxChjo.js → tunnel-api-DrKDhnJm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-CV3Ui5hu.js → use-autosave-CPYePL-Q.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-B6zLDfDl.js +2 -0
- package/dist/gateway/static/root/assets/{vendor-codemirror--gTq3YAI.js → vendor-codemirror-Qdcjid65.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CUoCi4Sq.js → voice-api-key-field-DKqzrCXx.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-C-ryeIxj.js → voice-config-api-e9xWjwBX.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BhDlkCMB.js → work-discovery-overlay-kTQug6bq.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D8CcPc_C.js → workflow-run-setup-panel-m9SKj_GT.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Bcd1XqP7.js +5 -0
- package/dist/gateway/static/root/index.html +10 -10
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/new-session.js +9 -0
- package/dist/src/agent/agent-manager.d.ts +2 -1
- package/dist/src/agent/agent-manager.js +2 -1
- package/dist/src/agent/coding/repository-instructions.js +2 -2
- package/dist/src/agent/coding/workspace-revision.js +2 -2
- package/dist/src/agent/commands/command-isolation.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.d.ts +1 -0
- package/dist/src/agent/external-tools/composio-provider.js +64 -34
- package/dist/src/agent/external-tools/search-error.js +5 -3
- package/dist/src/agent/service.js +2 -1
- package/dist/src/agent/service.types.d.ts +2 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +4 -0
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -1
- package/dist/src/agent/tool-manuals/browser.js +15 -226
- package/dist/src/agent/tools/browser/tool/browser-use-tool.d.ts +4 -21
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js +48 -165
- package/dist/src/agent/tools/browser/tool/schemas.d.ts +203 -16
- package/dist/src/agent/tools/browser/tool/schemas.js +146 -16
- package/dist/src/agent/tools/browser-automation-tool.d.ts +121 -0
- package/dist/src/agent/tools/browser-automation-tool.js +197 -0
- package/dist/src/agent/tools/factory.d.ts +6 -9
- package/dist/src/agent/tools/factory.js +28 -55
- package/dist/src/agent/tools/index.d.ts +2 -2
- package/dist/src/agent/tools/index.js +3 -3
- package/dist/src/agent/tools/review-workspace.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +3 -1
- package/dist/src/automations/domain/defaults.js +1 -1
- package/dist/src/automations/domain/types.d.ts +5 -5
- package/dist/src/automations/domain/validation.d.ts +12 -12
- package/dist/src/automations/domain/validation.js +3 -3
- package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -3
- package/dist/src/automations/draft/automation-draft-validator.js +1 -1
- package/dist/src/automations/service/action-executor.d.ts +1 -1
- package/dist/src/automations/service/action-executor.js +7 -7
- package/dist/src/browser/{recipes → automations}/index.d.ts +1 -0
- package/dist/src/browser/automations/index.js +4 -0
- package/dist/src/browser/automations/repository.d.ts +13 -0
- package/dist/src/browser/automations/repository.js +60 -0
- package/dist/src/browser/automations/runner.d.ts +17 -0
- package/dist/src/browser/automations/runner.js +173 -0
- package/dist/src/browser/automations/runtime-service.d.ts +6 -0
- package/dist/src/browser/automations/runtime-service.js +37 -0
- package/dist/src/browser/automations/schema.d.ts +144 -0
- package/dist/src/browser/automations/schema.js +135 -0
- package/dist/src/browser/automations/service.d.ts +146 -0
- package/dist/src/browser/automations/service.js +168 -0
- package/dist/src/browser/automations/types.d.ts +90 -0
- package/dist/src/browser/cache-dir-policy.d.ts +1 -1
- package/dist/src/browser/cache-dir-policy.js +1 -4
- package/dist/src/browser/drivers/browser-driver.d.ts +17 -0
- package/dist/src/browser/drivers/create-driver.d.ts +3 -0
- package/dist/src/browser/drivers/create-driver.js +84 -0
- package/dist/src/browser/drivers/extension-driver.d.ts +20 -0
- package/dist/src/browser/drivers/extension-driver.js +47 -0
- package/dist/src/browser/drivers/playwright-driver.d.ts +38 -0
- package/dist/src/browser/drivers/playwright-driver.js +406 -0
- package/dist/src/browser/index.d.ts +10 -15
- package/dist/src/browser/index.js +10 -15
- package/dist/src/browser/install-lock.d.ts +1 -2
- package/dist/src/browser/install-lock.js +3 -9
- package/dist/src/browser/install-progress.d.ts +1 -1
- package/dist/src/browser/observation/format.d.ts +2 -0
- package/dist/src/browser/observation/format.js +26 -0
- package/dist/src/browser/policy/approval-store.d.ts +17 -0
- package/dist/src/browser/policy/approval-store.js +62 -0
- package/dist/src/browser/policy/browser-policy.d.ts +3 -0
- package/dist/src/browser/policy/browser-policy.js +27 -0
- package/dist/src/browser/providers/browser-ext-install.d.ts +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +3 -5
- package/dist/src/browser/providers/browser-use.js +1 -1
- package/dist/src/browser/providers/browserbase.js +1 -1
- package/dist/src/browser/providers/extension-ws-acquire.d.ts +1 -4
- package/dist/src/browser/providers/extension-ws-acquire.js +1 -13
- package/dist/src/browser/providers/extension.d.ts +3 -22
- package/dist/src/browser/providers/extension.js +7 -15
- package/dist/src/browser/providers/index.d.ts +2 -2
- package/dist/src/browser/providers/index.js +3 -3
- package/dist/src/browser/providers/types.d.ts +0 -94
- package/dist/src/browser/readiness.d.ts +4 -22
- package/dist/src/browser/readiness.js +55 -118
- package/dist/src/browser/runtime/browser-runtime.d.ts +30 -0
- package/dist/src/browser/runtime/browser-runtime.js +362 -0
- package/dist/src/browser/url-policy.d.ts +3 -3
- package/dist/src/browser/url-policy.js +7 -6
- package/dist/src/browser/verification/expectation.d.ts +2 -0
- package/dist/src/browser/verification/expectation.js +17 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +5 -1
- package/dist/src/cli/commands/browser-cli-helpers.d.ts +0 -6
- package/dist/src/cli/commands/browser-cli-helpers.js +11 -144
- package/dist/src/cli/commands/browser.d.ts +0 -5
- package/dist/src/cli/commands/browser.js +11 -152
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/node-version.js +25 -9
- package/dist/src/cli/commands/platform.d.ts +1 -0
- package/dist/src/cli/commands/platform.js +111 -0
- package/dist/src/config/loader.js +9 -3
- package/dist/src/config/schema.d.ts +131 -84
- package/dist/src/config/schema.js +112 -59
- package/dist/src/connectors/composio-sessions.js +1 -3
- package/dist/src/extensions/marketplace.js +4 -0
- package/dist/src/files/file-service.js +139 -14
- package/dist/src/gateway/hono/lib/config-payload.d.ts +12 -26
- package/dist/src/gateway/hono/lib/config-payload.js +10 -39
- package/dist/src/gateway/hono/routes/browser-automations.d.ts +3 -0
- package/dist/src/gateway/hono/routes/browser-automations.js +77 -0
- package/dist/src/gateway/hono/routes/browser-install.js +0 -32
- package/dist/src/gateway/hono/routes/browser.d.ts +0 -17
- package/dist/src/gateway/hono/routes/browser.js +46 -568
- package/dist/src/gateway/hono/routes/config-patch/misc.js +8 -1
- package/dist/src/gateway/hono/routes/config.js +0 -11
- package/dist/src/gateway/hono/routes/lazy-bundles.js +5 -5
- package/dist/src/gateway/service.d.ts +4 -6
- package/dist/src/gateway/service.js +20 -23
- package/dist/src/platform/client.d.ts +121 -0
- package/dist/src/platform/client.js +108 -0
- package/dist/src/platform/contracts.d.ts +194 -0
- package/dist/src/platform/contracts.js +150 -0
- package/dist/src/platform/index.d.ts +4 -0
- package/dist/src/platform/index.js +9 -0
- package/dist/src/platform/resolution.d.ts +4 -0
- package/dist/src/platform/resolution.js +16 -0
- package/dist/src/platform/worker.d.ts +6 -0
- package/dist/src/platform/worker.js +75 -0
- package/dist/src/providers/xopc-cloud-config.js +3 -1
- package/dist/src/session/session-context-for-llm.js +41 -1
- package/dist/src/share/hosted-session-share.js +3 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/storage/sqlite/migrations/153_browser_control_v2.sql +45 -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/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +16 -20
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tunnel/env.js +3 -1
- package/dist/src/voice/realtime/agentEngine.js +0 -1
- package/package.json +7 -7
- package/dist/gateway/static/root/assets/apps-page-KF1Gnv36.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Ch-ldu35.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DtVhsHJW.js +0 -8
- package/dist/gateway/static/root/assets/browser-workflow-inputs-BX1-uM9L.js +0 -1
- package/dist/gateway/static/root/assets/browser-workflows-page-CcbUOWDF.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel--sXeylhe.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-AXSBDujZ.js +0 -1
- package/dist/gateway/static/root/assets/code-editor-D4_k-6QN.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-HBHUWohz.js +0 -2
- package/dist/gateway/static/root/assets/gateway-config-api-OEruhhX3.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BgH3A0LO.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-C97naDkO.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BBKKme4G.js +0 -1
- package/dist/gateway/static/root/assets/html-workspace-editor-C3DKAkMc.js +0 -1
- package/dist/gateway/static/root/assets/index-BcaF-dgQ.js +0 -72
- package/dist/gateway/static/root/assets/index-DAryGvZ7.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-DNncc2tn.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CizZInrT.js +0 -2
- package/dist/gateway/static/root/assets/markdown-editor-nDLmA_LF.js +0 -2
- package/dist/gateway/static/root/assets/markdown-split-DtBtcHWi.js +0 -1
- package/dist/gateway/static/root/assets/messages-Cf5hpZE6.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-Bw3jD9Jf.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-Dpqq7Z-J.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-BuT6MCTs.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-DXWMxOjf.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-7rBCUWzZ.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-gmEOYNb4.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DYYoJcl7.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BhenBnUj.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Dq7xIj0_.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-MDI9Lz6z.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-P0_RldWv.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CxfnoRVn.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Bxn2Dc16.js +0 -5
- package/dist/src/agent/tools/browser-recipe-tool.d.ts +0 -12
- package/dist/src/agent/tools/browser-recipe-tool.js +0 -113
- package/dist/src/browser/actions/extension-registry-bridge.d.ts +0 -5
- package/dist/src/browser/actions/extension-registry-bridge.js +0 -312
- package/dist/src/browser/actions/registry.d.ts +0 -5
- package/dist/src/browser/actions/registry.js +0 -741
- package/dist/src/browser/actions/types.d.ts +0 -65
- package/dist/src/browser/backend-from-config.d.ts +0 -22
- package/dist/src/browser/backend-from-config.js +0 -99
- package/dist/src/browser/browser-command-timeout.d.ts +0 -2
- package/dist/src/browser/browser-command-timeout.js +0 -11
- package/dist/src/browser/cdp-local-launcher.d.ts +0 -35
- package/dist/src/browser/cdp-local-launcher.js +0 -154
- package/dist/src/browser/cdp-supervisor.d.ts +0 -58
- package/dist/src/browser/cdp-supervisor.js +0 -133
- package/dist/src/browser/humanize.d.ts +0 -80
- package/dist/src/browser/humanize.js +0 -363
- package/dist/src/browser/manager.d.ts +0 -50
- package/dist/src/browser/manager.js +0 -251
- package/dist/src/browser/pipeline/output.d.ts +0 -35
- package/dist/src/browser/pipeline/output.js +0 -74
- package/dist/src/browser/pipeline/runner.d.ts +0 -27
- package/dist/src/browser/pipeline/runner.js +0 -453
- package/dist/src/browser/pipeline/schema.d.ts +0 -42
- package/dist/src/browser/pipeline/schema.js +0 -116
- package/dist/src/browser/pipeline/template.d.ts +0 -30
- package/dist/src/browser/pipeline/template.js +0 -112
- package/dist/src/browser/providers/cloakbrowser.d.ts +0 -83
- package/dist/src/browser/providers/cloakbrowser.js +0 -612
- package/dist/src/browser/recipes/index.js +0 -3
- package/dist/src/browser/recipes/repository.d.ts +0 -13
- package/dist/src/browser/recipes/repository.js +0 -81
- package/dist/src/browser/recipes/runtime-service.d.ts +0 -6
- package/dist/src/browser/recipes/runtime-service.js +0 -30
- package/dist/src/browser/recipes/service.d.ts +0 -36
- package/dist/src/browser/recipes/service.js +0 -186
- package/dist/src/browser/recipes/types.d.ts +0 -36
- package/dist/src/browser/schemas.d.ts +0 -53
- package/dist/src/browser/schemas.js +0 -68
- package/dist/src/browser/session-lifecycle.d.ts +0 -40
- package/dist/src/browser/session-lifecycle.js +0 -136
- package/dist/src/browser/snapshot-helpers.d.ts +0 -24
- package/dist/src/browser/snapshot-helpers.js +0 -70
- package/dist/src/browser/stealth.d.ts +0 -46
- package/dist/src/browser/stealth.js +0 -163
- package/dist/src/gateway/hono/routes/browser-workflows.d.ts +0 -3
- package/dist/src/gateway/hono/routes/browser-workflows.js +0 -78
- /package/dist/src/browser/{actions → automations}/types.js +0 -0
- /package/dist/src/browser/{recipes/types.js → drivers/browser-driver.js} +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-D4Ykja-U.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-DaIwVWar.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-BfZGZKSs.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/schemas-BHS7bo06.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-CV4pDOtG.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-DjiwT28p.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/dist-DLmwHyAh.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
<link rel="modulepreload" crossorigin href="/assets/files-BArWTfr7.js">
|
|
49
49
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-R8V9l6nk.js">
|
|
50
50
|
<link rel="modulepreload" crossorigin href="/assets/button-CtTvuElV.js">
|
|
51
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
52
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-DRCPXONr.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-Bpy8XX-5.js">
|
|
53
53
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
54
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-9HidFZUd.js">
|
|
55
55
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-DH5wF8X8.js">
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-w3eq3YpP.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-CISSxU1c.js">
|
|
58
58
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
59
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
59
|
+
<link rel="stylesheet" crossorigin href="/assets/index-zIJ3AXgR.css">
|
|
60
60
|
</head>
|
|
61
61
|
<body>
|
|
62
62
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -11,6 +11,7 @@ function createDefaultNewSessionPreferences() {
|
|
|
11
11
|
return {
|
|
12
12
|
version: 1,
|
|
13
13
|
modelByAgent: {},
|
|
14
|
+
executionModeByProject: {},
|
|
14
15
|
lastChatScope: noProjectScope()
|
|
15
16
|
};
|
|
16
17
|
}
|
|
@@ -43,6 +44,13 @@ function parseModelPreferences(value) {
|
|
|
43
44
|
}
|
|
44
45
|
return result;
|
|
45
46
|
}
|
|
47
|
+
function parseExecutionModePreferences(value) {
|
|
48
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
49
|
+
return Object.fromEntries(Object.entries(value).flatMap(([rawProjectId, rawMode]) => {
|
|
50
|
+
const projectId = normalized(rawProjectId);
|
|
51
|
+
return projectId && (rawMode === "local_checkout" || rawMode === "managed_worktree") ? [[projectId, rawMode]] : [];
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
46
54
|
function parseNewSessionPreferences(value) {
|
|
47
55
|
const fallback = createDefaultNewSessionPreferences();
|
|
48
56
|
if (!value || typeof value !== "object" || Array.isArray(value)) return fallback;
|
|
@@ -53,6 +61,7 @@ function parseNewSessionPreferences(value) {
|
|
|
53
61
|
version: 1,
|
|
54
62
|
...selectedAgentId ? { selectedAgentId } : {},
|
|
55
63
|
modelByAgent: parseModelPreferences(record.modelByAgent),
|
|
64
|
+
executionModeByProject: parseExecutionModePreferences(record.executionModeByProject),
|
|
56
65
|
lastChatScope: parseProjectScope(record.lastChatScope) ?? noProjectScope()
|
|
57
66
|
};
|
|
58
67
|
}
|
|
@@ -94,7 +94,8 @@ export interface AgentManagerConfig {
|
|
|
94
94
|
};
|
|
95
95
|
/** Gateway: exposes AutomationService for the `automation` tool. */
|
|
96
96
|
getAutomationService?: () => AutomationService | undefined;
|
|
97
|
-
|
|
97
|
+
getBrowserAutomationService?: () => import('../browser/automations/index.js').BrowserAutomationService | undefined;
|
|
98
|
+
emitBrowserEvent?: (type: string, payload: unknown) => void;
|
|
98
99
|
/** Gateway: exposes first-class xopc product objects for the `xopc_use` tool. */
|
|
99
100
|
getNotesService?: () => NotesService | undefined;
|
|
100
101
|
getProjectService?: () => ProjectService | undefined;
|
|
@@ -245,7 +245,8 @@ var AgentManager = class {
|
|
|
245
245
|
getSessionStore: this.config.getSessionStore,
|
|
246
246
|
gatewayClarify: this.config.gatewayClarify,
|
|
247
247
|
getAutomationService: this.config.getAutomationService,
|
|
248
|
-
|
|
248
|
+
getBrowserAutomationService: this.config.getBrowserAutomationService,
|
|
249
|
+
emitBrowserEvent: this.config.emitBrowserEvent,
|
|
249
250
|
getNotesService: this.config.getNotesService,
|
|
250
251
|
getProjectService: this.config.getProjectService,
|
|
251
252
|
getLocalAppService: this.config.getLocalAppService,
|
|
@@ -3,7 +3,7 @@ import { execFile } from "node:child_process";
|
|
|
3
3
|
import { readFile, realpath, stat } from "node:fs/promises";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
//#region src/agent/coding/repository-instructions.ts
|
|
6
|
-
const exec
|
|
6
|
+
const exec = promisify(execFile);
|
|
7
7
|
function inside(root, path) {
|
|
8
8
|
const rel = relative(root, path);
|
|
9
9
|
return rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
@@ -27,7 +27,7 @@ var RepositoryInstructions = class RepositoryInstructions {
|
|
|
27
27
|
} catch {}
|
|
28
28
|
const canonicalWorkspace = root;
|
|
29
29
|
try {
|
|
30
|
-
root = await realpath((await exec
|
|
30
|
+
root = await realpath((await exec("git", ["rev-parse", "--show-toplevel"], {
|
|
31
31
|
cwd: root,
|
|
32
32
|
timeout: 5e3
|
|
33
33
|
})).stdout.trim());
|
|
@@ -4,11 +4,11 @@ import { createHash } from "node:crypto";
|
|
|
4
4
|
import { lstat, readFile, readlink, realpath } from "node:fs/promises";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
6
|
//#region src/agent/coding/workspace-revision.ts
|
|
7
|
-
const exec
|
|
7
|
+
const exec = promisify(execFile);
|
|
8
8
|
/** A content fingerprint, including user changes and untracked files, without changing Git state. */
|
|
9
9
|
async function readWorkspaceRevision(workspace) {
|
|
10
10
|
let cwd = workspace;
|
|
11
|
-
const git = async (args) => (await exec
|
|
11
|
+
const git = async (args) => (await exec("git", [
|
|
12
12
|
"-c",
|
|
13
13
|
"core.fsmonitor=false",
|
|
14
14
|
...args
|
|
@@ -3,7 +3,7 @@ import { execFile } from "node:child_process";
|
|
|
3
3
|
import { realpath } from "node:fs/promises";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
//#region src/agent/commands/command-isolation.ts
|
|
6
|
-
const exec
|
|
6
|
+
const exec = promisify(execFile);
|
|
7
7
|
/** Docker is opt-in and never falls back to host execution or pulls an image implicitly. */
|
|
8
8
|
async function isolatedCommand(input) {
|
|
9
9
|
if (!input.isolation || input.isolation.mode === "host") return {
|
|
@@ -59,7 +59,7 @@ async function isolatedCommand(input) {
|
|
|
59
59
|
}
|
|
60
60
|
async function removeCommandContainer(name) {
|
|
61
61
|
if (!/^xopc-command-[a-f0-9-]{36}$/.test(name)) throw new Error("Invalid command container name");
|
|
62
|
-
await exec
|
|
62
|
+
await exec("docker", [
|
|
63
63
|
"rm",
|
|
64
64
|
"--force",
|
|
65
65
|
name
|
|
@@ -19,6 +19,7 @@ export declare class ComposioToolProvider implements ExternalToolProvider {
|
|
|
19
19
|
private readonly deps;
|
|
20
20
|
readonly source: "composio";
|
|
21
21
|
private readonly adapter;
|
|
22
|
+
private readonly unavailableToolkits;
|
|
22
23
|
constructor(deps: ComposioToolProviderDeps);
|
|
23
24
|
search(query: string): Promise<ExternalToolSearchHit[]>;
|
|
24
25
|
describe(toolRef: string): Promise<ExternalToolDescriptor | undefined>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createLogger } from "../../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../../utils/logger.js";
|
|
1
3
|
import { connectionBinding, connectionBindings, publishConnectionWait, requireSessionConnection } from "../../storage/sqlite/connection-wait-repository.js";
|
|
2
4
|
import { consumeConnectorApproval, createConnectorApproval, getConnectorApproval, getConnectorInstallation, listConnectorActionMetadata, listConnectorConnections, listConnectorInstallations, upsertConnectorActionMetadata, upsertConnectorInstallation } from "../../storage/sqlite/connector-repository.js";
|
|
3
5
|
import "../../storage/sqlite/index.js";
|
|
@@ -10,7 +12,9 @@ import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
|
10
12
|
import { ExternalToolSearchError } from "./search-error.js";
|
|
11
13
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
12
14
|
//#region src/agent/external-tools/composio-provider.ts
|
|
15
|
+
init_logger();
|
|
13
16
|
const CONNECTION_ARGUMENT = "xopcConnectionId";
|
|
17
|
+
const log = createLogger("ComposioToolProvider");
|
|
14
18
|
function textResult(value) {
|
|
15
19
|
return {
|
|
16
20
|
content: [{
|
|
@@ -108,47 +112,73 @@ function actionInputSchema(action) {
|
|
|
108
112
|
var ComposioToolProvider = class {
|
|
109
113
|
source = "composio";
|
|
110
114
|
adapter;
|
|
115
|
+
unavailableToolkits = /* @__PURE__ */ new Set();
|
|
111
116
|
constructor(deps) {
|
|
112
117
|
this.deps = deps;
|
|
113
118
|
this.adapter = deps.adapter ?? new ComposioSessionsAdapter();
|
|
114
119
|
}
|
|
115
120
|
async search(query) {
|
|
116
121
|
const available = this.availableInstallations();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
122
|
+
if (available.installations.length === 0) return [];
|
|
123
|
+
const settled = await Promise.allSettled(available.installations.map(async (installation) => {
|
|
124
|
+
const toolkit = toolkitFromInstallation(installation);
|
|
125
|
+
let phase = "create_session";
|
|
126
|
+
try {
|
|
127
|
+
const session = await this.adapter.createSession({
|
|
128
|
+
principalId: available.principalId,
|
|
129
|
+
toolkits: [toolkit],
|
|
130
|
+
authConfigs: getConfiguredComposioAuthConfigs(this.deps.getConfig(), [toolkit])
|
|
131
|
+
});
|
|
132
|
+
phase = "search";
|
|
133
|
+
return {
|
|
134
|
+
installation,
|
|
135
|
+
toolkit,
|
|
136
|
+
result: await session.search({
|
|
137
|
+
query,
|
|
138
|
+
toolkits: [toolkit]
|
|
139
|
+
})
|
|
140
|
+
};
|
|
141
|
+
} catch (cause) {
|
|
142
|
+
throw new ExternalToolSearchError(phase, [toolkit], cause);
|
|
143
|
+
}
|
|
144
|
+
}));
|
|
136
145
|
const hits = [];
|
|
137
|
-
|
|
138
|
-
for (const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
const failures = [];
|
|
147
|
+
for (const attempt of settled) {
|
|
148
|
+
if (attempt.status === "rejected") {
|
|
149
|
+
failures.push(attempt.reason instanceof ExternalToolSearchError ? attempt.reason : new ExternalToolSearchError("search", [], attempt.reason));
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const { installation, toolkit, result } = attempt.value;
|
|
153
|
+
this.unavailableToolkits.delete(toolkit);
|
|
154
|
+
const schemas = result && typeof result === "object" && !Array.isArray(result) ? result.toolSchemas : void 0;
|
|
155
|
+
if (!schemas || typeof schemas !== "object" || Array.isArray(schemas)) continue;
|
|
156
|
+
for (const [actionId, schema] of Object.entries(schemas)) {
|
|
157
|
+
if (toolkitForAction(actionId, [toolkit]) !== toolkit || !isComposioActionAllowedByCatalog(actionId)) continue;
|
|
158
|
+
if (!isToolInputSchema(schema && typeof schema === "object" ? schema.inputSchema : void 0)) continue;
|
|
159
|
+
upsertConnectorActionMetadata(contractFromSearch(installation.connectorId, toolkit, actionId, schema));
|
|
160
|
+
hits.push({
|
|
161
|
+
toolRef: externalToolRef(this.source, installation.id, actionId),
|
|
162
|
+
source: this.source,
|
|
163
|
+
namespace: toolkit,
|
|
164
|
+
title: actionId,
|
|
165
|
+
summary: schemaSummary(schema, `Run ${actionId} in ${toolkit}.`)
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (failures.length === settled.length) {
|
|
170
|
+
const first = failures[0];
|
|
171
|
+
throw new ExternalToolSearchError(first.phase, [...new Set(failures.flatMap((failure) => failure.toolkits))], first);
|
|
172
|
+
}
|
|
173
|
+
if (failures.length > 0) {
|
|
174
|
+
const failedToolkits = [...new Set(failures.flatMap((failure) => failure.toolkits))];
|
|
175
|
+
const newlyUnavailable = failedToolkits.filter((toolkit) => !this.unavailableToolkits.has(toolkit));
|
|
176
|
+
failedToolkits.forEach((toolkit) => this.unavailableToolkits.add(toolkit));
|
|
177
|
+
if (newlyUnavailable.length > 0) log.warn({
|
|
178
|
+
failedToolkits: newlyUnavailable,
|
|
179
|
+
failureCount: newlyUnavailable.length,
|
|
180
|
+
err: failures[0]
|
|
181
|
+
}, `Composio tool discovery skipped ${newlyUnavailable.length} unavailable toolkit${newlyUnavailable.length === 1 ? "" : "s"}`);
|
|
152
182
|
}
|
|
153
183
|
return hits;
|
|
154
184
|
}
|
|
@@ -13,15 +13,17 @@ function searchFailureDetails(error) {
|
|
|
13
13
|
phase: error.phase,
|
|
14
14
|
toolkits: error.toolkits
|
|
15
15
|
} : { phase: "search" };
|
|
16
|
+
const pending = [error];
|
|
16
17
|
const visited = /* @__PURE__ */ new Set();
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
while (pending.length > 0) {
|
|
19
|
+
const current = pending.shift();
|
|
20
|
+
if (!current || typeof current !== "object" || visited.has(current)) continue;
|
|
19
21
|
visited.add(current);
|
|
20
22
|
const row = current;
|
|
21
23
|
if (details.code === void 0 && (typeof row.code === "number" || typeof row.code === "string" && /^[a-zA-Z0-9_.-]{1,100}$/.test(row.code))) details.code = row.code;
|
|
22
24
|
const status = row.status ?? row.statusCode;
|
|
23
25
|
if (details.status === void 0 && typeof status === "number") details.status = status;
|
|
24
|
-
|
|
26
|
+
pending.push(row.cause, row.error);
|
|
25
27
|
}
|
|
26
28
|
return details;
|
|
27
29
|
}
|
|
@@ -229,7 +229,8 @@ var AgentService = class {
|
|
|
229
229
|
verboseLevel: config.verboseLevel,
|
|
230
230
|
gatewayClarify: config.gatewayClarify,
|
|
231
231
|
getAutomationService: config.getAutomationService,
|
|
232
|
-
|
|
232
|
+
getBrowserAutomationService: config.getBrowserAutomationService,
|
|
233
|
+
emitBrowserEvent: config.emitBrowserEvent,
|
|
233
234
|
getNotesService: config.getNotesService,
|
|
234
235
|
getProjectService: config.getProjectService,
|
|
235
236
|
getLocalAppService: config.getLocalAppService,
|
|
@@ -28,7 +28,8 @@ export interface AgentServiceConfig {
|
|
|
28
28
|
requestClarification: GatewayClarifyRequestFn;
|
|
29
29
|
};
|
|
30
30
|
getAutomationService?: () => AutomationService | undefined;
|
|
31
|
-
|
|
31
|
+
getBrowserAutomationService?: () => import('../browser/automations/index.js').BrowserAutomationService | undefined;
|
|
32
|
+
emitBrowserEvent?: (type: string, payload: unknown) => void;
|
|
32
33
|
/** Gateway: exposes first-class xopc product objects for the `xopc_use` tool. */
|
|
33
34
|
getNotesService?: () => NotesService | undefined;
|
|
34
35
|
getProjectService?: () => ProjectService | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../../../../platform/resolution.js";
|
|
1
2
|
import { MAX_SKILL_ZIP_BYTES, isValidSkillId } from "../../../managed-store.js";
|
|
2
3
|
import { MAX_EXTENSION_STORE_ZIP_BYTES } from "../../../../../extensions/store-zip-limits.js";
|
|
3
4
|
import { createHash } from "node:crypto";
|
|
@@ -8,12 +9,15 @@ import { createHash } from "node:crypto";
|
|
|
8
9
|
*
|
|
9
10
|
* Facade: {@link ../../../skills-marketplace.js}.
|
|
10
11
|
*/
|
|
12
|
+
init_resolution();
|
|
11
13
|
const DEFAULT_STORE_BASE = "https://store.xopc.ai";
|
|
12
14
|
function resolveSkillsStoreBaseUrl(config) {
|
|
13
15
|
const env = process.env.XOPC_SKILLS_STORE_URL?.trim();
|
|
14
16
|
if (env) try {
|
|
15
17
|
return normalizeBaseUrl(new URL(env).toString());
|
|
16
18
|
} catch {}
|
|
19
|
+
const fromPlatform = resolveConnectedPlatformEndpoint("storeApi");
|
|
20
|
+
if (fromPlatform) return normalizeBaseUrl(fromPlatform);
|
|
17
21
|
const fromConfig = config.gateway?.skillsStoreBaseUrl?.trim();
|
|
18
22
|
if (fromConfig) try {
|
|
19
23
|
return normalizeBaseUrl(new URL(fromConfig).toString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const browserUseManual = "# Browser Tool Manual\n\n##
|
|
1
|
+
export declare const browserUseManual = "# Browser Tool Manual\n\n## browser_use\n\nUse one typed action per call. Start with `observe` or `navigate`. Every observation returns a `sessionId`, `revision`, and semantic element refs. Element actions must use refs from the newest revision; never invent refs.\n\nAvailable actions:\n\n- `observe`: return URL, title, interactive semantic nodes, and changes. Set `visual` to `always` only when visual evidence is needed.\n- `navigate`: open an HTTP(S) URL and optionally verify an expectation.\n- `click`, `fill`, `select`: act on a semantic ref with its observation revision.\n- `press`, `scroll`: act on an optional ref or the active page.\n- `wait`: wait for page idle, text, or a ref visibility state.\n- `upload`: attach workspace files to a file input. Local approval may be required.\n- `tabs`: list, create, activate, or close task-owned tabs.\n- `sequence`: run a short list of same-document ref actions.\n- `close`: close the task-owned browser session.\n\nThe tool does not accept CSS, XPath, JavaScript, cookie, storage, or network-inspection commands. Re-observe after navigation or a stale-observation response. Cross-domain, upload, destructive, and external-effect actions follow the configured local-owner approval policy. Sensitive fields expose only their semantic identity; their values are redacted and filling them requires approval.\n\n## browser_automation\n\nReusable browser automations are strict JSON. They use semantic `role` plus `name` or `nameIncludes` targets and an exact `allowedDomains` list. Input templates use `${input.name}`. Save only a flow that has been run and verified; never store passwords, one-time codes, recovery codes, or payment details.\n";
|
|
@@ -1,238 +1,27 @@
|
|
|
1
1
|
//#region src/agent/tool-manuals/browser.ts
|
|
2
2
|
const browserUseManual = `# Browser Tool Manual
|
|
3
3
|
|
|
4
|
-
##
|
|
4
|
+
## browser_use
|
|
5
5
|
|
|
6
|
-
\`
|
|
6
|
+
Use one typed action per call. Start with \`observe\` or \`navigate\`. Every observation returns a \`sessionId\`, \`revision\`, and semantic element refs. Element actions must use refs from the newest revision; never invent refs.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|------|---------|
|
|
10
|
-
| \`command\` | Run a single browser action |
|
|
11
|
-
| \`pipeline\` | Run a multi-step YAML flow |
|
|
12
|
-
| \`inspect\` | Read current page state |
|
|
13
|
-
| \`close\` | Close the browser session |
|
|
8
|
+
Available actions:
|
|
14
9
|
|
|
15
|
-
|
|
10
|
+
- \`observe\`: return URL, title, interactive semantic nodes, and changes. Set \`visual\` to \`always\` only when visual evidence is needed.
|
|
11
|
+
- \`navigate\`: open an HTTP(S) URL and optionally verify an expectation.
|
|
12
|
+
- \`click\`, \`fill\`, \`select\`: act on a semantic ref with its observation revision.
|
|
13
|
+
- \`press\`, \`scroll\`: act on an optional ref or the active page.
|
|
14
|
+
- \`wait\`: wait for page idle, text, or a ref visibility state.
|
|
15
|
+
- \`upload\`: attach workspace files to a file input. Local approval may be required.
|
|
16
|
+
- \`tabs\`: list, create, activate, or close task-owned tabs.
|
|
17
|
+
- \`sequence\`: run a short list of same-document ref actions.
|
|
18
|
+
- \`close\`: close the task-owned browser session.
|
|
16
19
|
|
|
17
|
-
-
|
|
18
|
-
- Capture screenshots or page content
|
|
19
|
-
- Run multi-step automation flows
|
|
20
|
-
- Extract data from pages
|
|
20
|
+
The tool does not accept CSS, XPath, JavaScript, cookie, storage, or network-inspection commands. Re-observe after navigation or a stale-observation response. Cross-domain, upload, destructive, and external-effect actions follow the configured local-owner approval policy. Sensitive fields expose only their semantic identity; their values are redacted and filling them requires approval.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## browser_automation
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
\`\`\`json
|
|
27
|
-
{
|
|
28
|
-
"mode": "command",
|
|
29
|
-
"command": "<action>",
|
|
30
|
-
"args": { ... }
|
|
31
|
-
}
|
|
32
|
-
\`\`\`
|
|
33
|
-
|
|
34
|
-
### Available commands
|
|
35
|
-
|
|
36
|
-
| Command | Description | Key arguments |
|
|
37
|
-
|---------|-------------|---------------|
|
|
38
|
-
| \`open\` / \`navigate\` | Open a URL | \`url\`, \`wait_until\` |
|
|
39
|
-
| \`state\` / \`snapshot\` | ARIA snapshot of the page | \`selector\`, \`maxLength\` |
|
|
40
|
-
| \`click\` | Click an element | \`selector\` / \`text\` / \`role\` |
|
|
41
|
-
| \`type\` / \`input\` | Type text | \`selector\` / \`label\`, \`text\`, \`pressEnter\` |
|
|
42
|
-
| \`scroll\` | Scroll the page | \`direction\`, \`amount\` |
|
|
43
|
-
| \`screenshot\` | Screenshot | \`selector\`, \`full_page\`, \`path\` |
|
|
44
|
-
| \`back\` | Go back | \`waitFor\` |
|
|
45
|
-
| \`keys\` / \`press\` | Keyboard input | \`key\` |
|
|
46
|
-
| \`console\` / \`eval\` | Run JavaScript | \`javascript\` |
|
|
47
|
-
| \`images\` | Collect images on the page | \`selector\`, \`maxImages\` |
|
|
48
|
-
| \`wait\` | Wait for element/text/function/time | \`selector\` / \`text\` / \`function\` / \`ms\`, \`state\`, \`timeout_ms\` |
|
|
49
|
-
| \`wait_for_navigation\` | Wait for page load state | \`wait_until\`, \`timeout_ms\` |
|
|
50
|
-
| \`wait_for_network_idle\` | Wait until network is idle | \`timeout_ms\` |
|
|
51
|
-
| \`element_text\` | Read element text | \`selector\` |
|
|
52
|
-
| \`element_attribute\` | Read element attribute | \`selector\`, \`attribute\` |
|
|
53
|
-
| \`bounding_box\` | Read element box | \`selector\` |
|
|
54
|
-
| \`network_start\` / \`network_events\` / \`network_stop\` | Capture network events | \`url_pattern\`, \`include_body\` |
|
|
55
|
-
| \`dialog\` | Handle dialogs | \`action\` (accept/dismiss) |
|
|
56
|
-
| \`close\` | Close the current page | — |
|
|
57
|
-
|
|
58
|
-
### Element targeting
|
|
59
|
-
|
|
60
|
-
Prefer, in order:
|
|
61
|
-
|
|
62
|
-
1. **ARIA role**: most stable, e.g. \`"role": "button:Submit"\`
|
|
63
|
-
2. **Visible text**, e.g. \`"text": "Sign In"\`
|
|
64
|
-
3. **CSS selector**, e.g. \`"selector": "#login-btn"\`
|
|
65
|
-
|
|
66
|
-
Guidelines:
|
|
67
|
-
|
|
68
|
-
- Use \`inspect\` or \`state\` first to get a snapshot
|
|
69
|
-
- Pick locators from ARIA info in the snapshot
|
|
70
|
-
- Avoid dynamic class names when possible
|
|
71
|
-
|
|
72
|
-
## Inspect mode
|
|
73
|
-
|
|
74
|
-
Before acting, understand the current page:
|
|
75
|
-
|
|
76
|
-
\`\`\`json
|
|
77
|
-
{ "mode": "inspect" }
|
|
78
|
-
\`\`\`
|
|
79
|
-
|
|
80
|
-
Returns: current URL, title, ARIA snapshot.
|
|
81
|
-
|
|
82
|
-
**Best practice**: after each navigation, inspect, then choose the next step.
|
|
83
|
-
|
|
84
|
-
## Pipeline mode
|
|
85
|
-
|
|
86
|
-
For multi-step, reusable flows. Uses a brocli-style YAML DSL.
|
|
87
|
-
|
|
88
|
-
### Run from file
|
|
89
|
-
|
|
90
|
-
\`\`\`json
|
|
91
|
-
{
|
|
92
|
-
"mode": "pipeline",
|
|
93
|
-
"pipeline": {
|
|
94
|
-
"path": "./browser-flow.yaml",
|
|
95
|
-
"args": { "url": "https://example.com" }
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
\`\`\`
|
|
99
|
-
|
|
100
|
-
### Run inline YAML
|
|
101
|
-
|
|
102
|
-
\`\`\`json
|
|
103
|
-
{
|
|
104
|
-
"mode": "pipeline",
|
|
105
|
-
"pipeline": {
|
|
106
|
-
"yaml": "name: quick-check\\npipeline:\\n - navigate:\\n url: https://example.com\\n - screenshot:\\n full_page: true",
|
|
107
|
-
"dryRun": false
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
\`\`\`
|
|
111
|
-
|
|
112
|
-
### YAML layout
|
|
113
|
-
|
|
114
|
-
\`\`\`yaml
|
|
115
|
-
name: pipeline-name
|
|
116
|
-
description: What this flow does
|
|
117
|
-
timeoutSeconds: 60
|
|
118
|
-
include:
|
|
119
|
-
- ./shared-login.yaml
|
|
120
|
-
args:
|
|
121
|
-
url:
|
|
122
|
-
type: string
|
|
123
|
-
required: true
|
|
124
|
-
query:
|
|
125
|
-
type: string
|
|
126
|
-
default: "hello"
|
|
127
|
-
pipeline:
|
|
128
|
-
- navigate:
|
|
129
|
-
url: \${{ args.url }}
|
|
130
|
-
wait_until: domcontentloaded
|
|
131
|
-
- wait:
|
|
132
|
-
selector: input[name="q"]
|
|
133
|
-
- type:
|
|
134
|
-
selector: input[name="q"]
|
|
135
|
-
text: \${{ args.query }}
|
|
136
|
-
- press:
|
|
137
|
-
key: Enter
|
|
138
|
-
- wait:
|
|
139
|
-
selector: body
|
|
140
|
-
timeout_ms: 10000
|
|
141
|
-
- element_text:
|
|
142
|
-
selector: h1
|
|
143
|
-
- assert:
|
|
144
|
-
contains: Results
|
|
145
|
-
- screenshot:
|
|
146
|
-
path: ./artifacts/result.png
|
|
147
|
-
full_page: true
|
|
148
|
-
- output:
|
|
149
|
-
value:
|
|
150
|
-
screenshot: ./artifacts/result.png
|
|
151
|
-
on_error:
|
|
152
|
-
- screenshot:
|
|
153
|
-
path: ./artifacts/error.png
|
|
154
|
-
full_page: true
|
|
155
|
-
\`\`\`
|
|
156
|
-
|
|
157
|
-
### Authoring rules
|
|
158
|
-
|
|
159
|
-
1. One action per step
|
|
160
|
-
2. Use \`\${{ args.xxx }}\` for parameters
|
|
161
|
-
3. Use \`\${{ last }}\` or \`\${{ last | json }}\` for the previous step result
|
|
162
|
-
4. Use \`\${{ outputs.0 }}\` for prior \`output\` values and \`\${{ vars.name }}\` for values from \`set_var\`
|
|
163
|
-
5. Use \`include\` for shared YAML fragments; relative includes resolve from the current pipeline file
|
|
164
|
-
6. Use \`on_error\` to collect diagnostics after failure
|
|
165
|
-
|
|
166
|
-
### Stable pipeline actions
|
|
167
|
-
|
|
168
|
-
\`\`\`yaml
|
|
169
|
-
pipeline:
|
|
170
|
-
- network_start:
|
|
171
|
-
url_pattern: /api/search
|
|
172
|
-
include_body: true
|
|
173
|
-
- click:
|
|
174
|
-
text: Search
|
|
175
|
-
- wait_for_network_idle:
|
|
176
|
-
timeout_ms: 10000
|
|
177
|
-
- collect: {}
|
|
178
|
-
- filter:
|
|
179
|
-
path: type
|
|
180
|
-
equals: response
|
|
181
|
-
- limit:
|
|
182
|
-
count: 3
|
|
183
|
-
- output:
|
|
184
|
-
value: \${{ last }}
|
|
185
|
-
\`\`\`
|
|
186
|
-
|
|
187
|
-
Control flow:
|
|
188
|
-
|
|
189
|
-
\`\`\`yaml
|
|
190
|
-
pipeline:
|
|
191
|
-
- retry:
|
|
192
|
-
times: 3
|
|
193
|
-
delay_ms: 500
|
|
194
|
-
pipeline:
|
|
195
|
-
- wait:
|
|
196
|
-
selector: button.submit
|
|
197
|
-
timeout_ms: 3000
|
|
198
|
-
- click:
|
|
199
|
-
selector: button.submit
|
|
200
|
-
- if:
|
|
201
|
-
condition: \${{ last }}
|
|
202
|
-
then:
|
|
203
|
-
- output:
|
|
204
|
-
value: clicked
|
|
205
|
-
else:
|
|
206
|
-
- output:
|
|
207
|
-
value: missing
|
|
208
|
-
\`\`\`
|
|
209
|
-
|
|
210
|
-
### Validate without running
|
|
211
|
-
|
|
212
|
-
\`\`\`json
|
|
213
|
-
{
|
|
214
|
-
"mode": "pipeline",
|
|
215
|
-
"pipeline": {
|
|
216
|
-
"yaml": "...",
|
|
217
|
-
"dryRun": true
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
\`\`\`
|
|
221
|
-
|
|
222
|
-
## Recovery when something fails
|
|
223
|
-
|
|
224
|
-
1. \`inspect\` to see current state
|
|
225
|
-
2. Confirm the URL (redirects may have changed it)
|
|
226
|
-
3. Use the snapshot to see if the page finished loading
|
|
227
|
-
4. \`screenshot\` for visual debugging
|
|
228
|
-
5. \`wait\` for elements, then retry
|
|
229
|
-
|
|
230
|
-
## Safety
|
|
231
|
-
|
|
232
|
-
- Do not put API keys or tokens in URLs
|
|
233
|
-
- Do not target private IPs / localhost unless configuration allows it
|
|
234
|
-
- Cloud metadata endpoints are always blocked
|
|
235
|
-
- For destructive actions (submit forms, delete data), confirm intent with the user first
|
|
24
|
+
Reusable browser automations are strict JSON. They use semantic \`role\` plus \`name\` or \`nameIncludes\` targets and an exact \`allowedDomains\` list. Input templates use \`\${input.name}\`. Save only a flow that has been run and verified; never store passwords, one-time codes, recovery codes, or payment details.
|
|
236
25
|
`;
|
|
237
26
|
//#endregion
|
|
238
27
|
export { browserUseManual };
|