@xopcai/xopc 0.0.253 → 0.0.254
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/dist/background.js +59 -13
- package/dist/browser-ext/dist/content.js +0 -5
- package/dist/browser-ext/manifest.json +2 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-CeS1bgXP.js → activity-store-Ci5Rxmi_.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BdF3HhCW.js → agent-avatar-dicebear-D82jpmFL.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-vul32IsP.js +1 -0
- package/dist/gateway/static/root/assets/{agents-DARlgjTm.js → agents-p3kWyz1T.js} +1 -1
- package/dist/gateway/static/root/assets/{api-zMPeC0yU.js → api-CXIzQJ2Z.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BaAFln8W.js → app-management-settings-panel-mhxcQpkQ.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CXvsoBlw.js → appearance-settings-BIMwACUF.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-CJFJKNwS.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-C0o_mVQI.js → archive-plugin-C63Xp_sU.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-B5Ry3tGL.js → attachment-load-D12KYOav.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DY5QAEQd.js → automations-page-DXj0o5CY.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-B2wxcpgq.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BydpEgBA.js → binary-plugins-Bcv8hun6.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-D0CpUOMo.js → block-editor-C61LqK_-.js} +50 -50
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DzbTsGI6.js → browser-automation-inputs-CAclu735.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D7fZYjni.js → browser-automations-page-BITfKX8L.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-BMjY8cyv.js +8 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-wB3Vgmp3.js +7 -0
- package/dist/gateway/static/root/assets/{channels-settings-bdRLT9KA.js → channels-settings-U5ffzu4r.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-status-swr-BGGRTkn6.js → channels-status-swr-Cmbx0E8O.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-_CP4nvlg.js → chat-terminal-dock-CNBgHN9U.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BGaF--m5.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-g2U8Rllf.js → cron-expression-DCTN4QAG.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-SmVlhtj_.js → date-picker-BuEyUxZn.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-D-0gcbbM.js → dependency-picker-l6IXzk0C.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Cl3JRIu6.js → desktop-pet-cGn_20DO.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-D7kvWQ9H.js → desktop-pet-settings-DIfccDKS.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DtP2tJHY.js → extension-debug-page-CTS5RP_D.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CphZDdoT.js → extension-page-Dg9YssYH.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CsxVLV4-.js → extension-settings-page-CWZYL8Fi.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BW3Bx-aV.js → gateway-config-swr-Chsr5wGH.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DxBZ05dX.js → gateway-settings-vHI_Que8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DAq74TZe.js → gateway-startup-retry-C9ynH6VV.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-DWcKsIoZ.js → heartbeat-settings-WUhSfvob.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CYjlMzPx.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-MPuaXDRs.js → image-generation-api-D_TsVe7h.js} +1 -1
- package/dist/gateway/static/root/assets/{index-C7RDs6S-.js → index-BBlJYVxR.js} +18 -18
- package/dist/gateway/static/root/assets/index-_I0dD2LN.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CfhaTqgE.js → keyboard-shortcuts-settings-DGBf6YfD.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CLlIl83V.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-g01W3kEK.js → local-apps-page-DGWP_xsQ.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BkeaPZpn.js → locale-store-B2v8mNJw.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DuhCigiB.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DeGxJF_Z.js → management-settings-DUAZ-dtt.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Ca7BRBLL.js → markdown-view-DBWu9d_n.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-FmOhmzlD.js → media-plugins-CsUjcIBy.js} +1 -1
- package/dist/gateway/static/root/assets/messages-ChSTFZR5.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-BXNbn05L.js → mobile-pairing-wizard-Dxu8twiQ.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DMdbaTZp.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-xe_vX0nM.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-pyukZ1PJ.js → page-tabs-YeJKwV-7.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-slFHoMUe.js → preview-open-alternatives-BfJ3jMDG.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CXa3FNNk.js → product-open-page-B7NRGPox.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-BDF88VdN.js → project-detail-page-hG7ELibZ.js} +1 -1
- package/dist/gateway/static/root/assets/projects-page-C5G2ET4w.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CviQoUBf.js → registry-api-B9OZUdwC.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DTO-faxH.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-O9D9o7-O.js → runtime-tools-settings-panel-uJ8Br3ZL.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-8FesicnL.js → schema-form-CXwn6up5.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-CwzsUCgP.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-Djc3EdoO.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-CBic9TFH.js → settings-form-section-YVNYsR0U.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Xz66_Mjg.js → settings-page-cHqrIdVR.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-C6DuwrP5.js → setup-status-panel-MUAMcZLD.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page--JpjwB58.js → share-preview-page-DnjSDQru.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-C7A0aywX.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-D1xSGJAQ.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-fVKExKv5.js → skills-page-DkrGEdiY.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-Yv9u3uJp.js → skills-page.utils-CqZbiZuK.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CCWjVdc2.js → system-settings-panel-Dmw0RfxZ.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-BvZSCLUH.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-BtkaVpMm.js → theme-store-CubltMKm.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-C__W9BaN.js → tunnel-api-CiieC6HP.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Dow9RRcq.js → use-autosave-XQ3SuyB9.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-CU6nxmoM.js → user-model-page-BKJC7tyW.js} +2 -2
- package/dist/gateway/static/root/assets/{voice-api-key-field-CvF3lEyx.js → voice-api-key-field-D4QzVgdt.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-BEUVAyM6.js → voice-config-api-B1ZbyVmF.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B9PDfReq.js → work-discovery-overlay-D5Tf8GRZ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-kWGFkhjz.js → workflow-run-setup-panel-BW9p8Maz.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DuqRodIc.js +5 -0
- package/dist/gateway/static/root/index.html +10 -10
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js +17 -2
- package/dist/src/agent/tools/browser/tool/schemas.d.ts +85 -1
- package/dist/src/agent/tools/browser/tool/schemas.js +212 -5
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/drivers/extension-driver.d.ts +4 -4
- package/dist/src/browser/drivers/extension-driver.js +20 -8
- package/dist/src/browser/drivers/playwright-driver.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.d.ts +3 -0
- package/dist/src/browser/providers/browser-ext-install.js +19 -4
- package/dist/src/browser/providers/extension.d.ts +14 -1
- package/dist/src/browser/providers/extension.js +89 -11
- package/dist/src/browser/providers/playwright-install.js +8 -12
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/browser.js +149 -27
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +10 -10
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/model-thinking.js +57 -20
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/work-discovery/service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Bs34Kp0K.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BhgvfBJT.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BzX4lILP.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BBdMqxl0.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D_WfftDW.js +0 -7
- package/dist/gateway/static/root/assets/connectors-page-CPDjU5wU.js +0 -2
- package/dist/gateway/static/root/assets/home-page-BdvLZKQZ.js +0 -1
- package/dist/gateway/static/root/assets/index-Cu8xqZQ9.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-CR6asX7L.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-ZP4QTWoC.js +0 -2
- package/dist/gateway/static/root/assets/messages-C72stReU.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-EeVeF4II.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-D7bMff96.js +0 -8
- package/dist/gateway/static/root/assets/projects-page-DeTD6pu1.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CxKrdQ6a.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-DUFJN-2t.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CcSYDjaH.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CovcdHSC.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CrHagTsE.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-I8hueJnG.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-B4Is5E42.js +0 -5
|
@@ -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-BBlJYVxR.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-ChSTFZR5.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-B2v8mNJw.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-DBWu9d_n.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-C9ynH6VV.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-B9OZUdwC.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-Chsr5wGH.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-Ci5Rxmi_.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-CubltMKm.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-_I0dD2LN.css">
|
|
60
60
|
</head>
|
|
61
61
|
<body>
|
|
62
62
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -7,16 +7,16 @@ import { getInteractionState } from "../storage/sqlite/interaction-state-reposit
|
|
|
7
7
|
import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
8
8
|
import "../storage/sqlite/index.js";
|
|
9
9
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
10
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
11
10
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
12
11
|
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
13
|
-
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
14
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
15
12
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
16
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
17
13
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
14
|
+
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
15
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
18
16
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
19
17
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
18
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
19
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
20
20
|
import { extractTextContent } from "./context/workspace.js";
|
|
21
21
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
22
22
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
@@ -4,10 +4,10 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
4
4
|
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
5
5
|
import { loadCompactionSourceSnapshot } from "../../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import "../../storage/sqlite/index.js";
|
|
7
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
8
7
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
9
8
|
import { getApiKeySync, init_providers, resolveModel } from "../../providers/index.js";
|
|
10
9
|
import { createExtensionAwareStreamFn } from "../../providers/extension-stream-bridge.js";
|
|
10
|
+
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
11
11
|
import { extractTextContent } from "../context/workspace.js";
|
|
12
12
|
import { listUserAssertions } from "../../user-model/repository.js";
|
|
13
13
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths, resolveModelsJsonPath } from "../../config/paths.js";
|
|
2
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
4
4
|
import { XopcModelCredentialStore, init_model_credential_store } from "../../auth/model-credential-store.js";
|
|
5
5
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
6
6
|
import { init_register_runtime_providers, registerRuntimeProviders } from "../../providers/register-runtime-providers.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { parseTurnOutcome } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
4
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { runWithEmbeddedExecutionSession } from "./execution-context.js";
|
|
7
7
|
import { resolveAgentTurnTimeoutMs } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
8
8
|
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
2
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
|
-
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
4
3
|
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
4
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
6
6
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
7
7
|
import "../../capabilities/readiness/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { readFile, rm } from "node:fs/promises";
|
|
5
5
|
//#region src/agent/mcp/oauth/mcp-oauth-store.ts
|
|
@@ -2,10 +2,10 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
5
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
7
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
8
6
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
7
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
8
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
9
9
|
import { extractTextContent } from "./context/workspace.js";
|
|
10
10
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
11
11
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
4
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
7
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
8
8
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
4
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
4
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
7
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
7
9
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
8
10
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
9
11
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
10
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
11
12
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
12
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
13
13
|
//#region src/agent/tasks/task-judge-service.ts
|
|
14
14
|
init_schema();
|
|
15
15
|
init_providers();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatBrowserObservation } from "../../../../browser/observation/format.js";
|
|
2
|
-
import { BrowserUseSchema } from "./schemas.js";
|
|
2
|
+
import { BrowserUseSchema, decodeBrowserUseInput } from "./schemas.js";
|
|
3
3
|
//#region src/agent/tools/browser/tool/browser-use-tool.ts
|
|
4
4
|
function createBrowserUseTool(deps) {
|
|
5
5
|
return {
|
|
@@ -8,6 +8,21 @@ function createBrowserUseTool(deps) {
|
|
|
8
8
|
description: "Control a persistent browser through typed semantic actions. Start with observe or navigate, then use only refs and revision values from the latest observation. Screenshots are attached only when requested or semantic observation is insufficient.",
|
|
9
9
|
parameters: BrowserUseSchema,
|
|
10
10
|
async execute(_toolCallId, params, signal) {
|
|
11
|
+
const input = decodeBrowserUseInput(params);
|
|
12
|
+
if (!input) return {
|
|
13
|
+
content: [{
|
|
14
|
+
type: "text",
|
|
15
|
+
text: `[INVALID_INPUT] Invalid parameters for browser action "${params.action}".`
|
|
16
|
+
}],
|
|
17
|
+
details: {
|
|
18
|
+
ok: false,
|
|
19
|
+
kind: "browser_error",
|
|
20
|
+
error: {
|
|
21
|
+
code: "INVALID_INPUT",
|
|
22
|
+
message: `Invalid parameters for browser action "${params.action}".`
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
11
26
|
const readiness = await deps.getReadiness?.();
|
|
12
27
|
if (readiness) return {
|
|
13
28
|
content: [{
|
|
@@ -20,7 +35,7 @@ function createBrowserUseTool(deps) {
|
|
|
20
35
|
hint: readiness.hint
|
|
21
36
|
}
|
|
22
37
|
};
|
|
23
|
-
return presentResult(await deps.getRuntime().execute(deps.getTaskId(),
|
|
38
|
+
return presentResult(await deps.getRuntime().execute(deps.getTaskId(), input, signal));
|
|
24
39
|
}
|
|
25
40
|
};
|
|
26
41
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { BrowserActionInput } from '@xopcai/browser-control-contract';
|
|
1
2
|
import { type Static } from '@sinclair/typebox';
|
|
2
|
-
export declare const
|
|
3
|
+
export declare const BrowserUseActionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
3
4
|
action: import("@sinclair/typebox").TLiteral<"observe">;
|
|
4
5
|
sessionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
5
6
|
approvalId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -200,4 +201,87 @@ export declare const BrowserUseSchema: import("@sinclair/typebox").TUnion<[impor
|
|
|
200
201
|
sessionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
201
202
|
approvalId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
202
203
|
}>]>;
|
|
204
|
+
export declare const BrowserUseSchema: import("@sinclair/typebox").TObject<{
|
|
205
|
+
action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"observe">, import("@sinclair/typebox").TLiteral<"navigate">, import("@sinclair/typebox").TLiteral<"click">, import("@sinclair/typebox").TLiteral<"fill">, import("@sinclair/typebox").TLiteral<"select">, import("@sinclair/typebox").TLiteral<"press">, import("@sinclair/typebox").TLiteral<"scroll">, import("@sinclair/typebox").TLiteral<"wait">, import("@sinclair/typebox").TLiteral<"upload">, import("@sinclair/typebox").TLiteral<"tabs">, import("@sinclair/typebox").TLiteral<"sequence">, import("@sinclair/typebox").TLiteral<"close">]>;
|
|
206
|
+
sessionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
207
|
+
approvalId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
208
|
+
revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
209
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
210
|
+
expect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
211
|
+
urlIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
212
|
+
titleIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
213
|
+
textIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
214
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
215
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
216
|
+
}>>;
|
|
217
|
+
visual: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"never">, import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"always">]>>;
|
|
218
|
+
url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
219
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
220
|
+
submit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
221
|
+
key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
222
|
+
deltaY: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
223
|
+
condition: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"page_idle">, import("@sinclair/typebox").TLiteral<"text">, import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
224
|
+
timeoutMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
225
|
+
paths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
226
|
+
operation: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"list">, import("@sinclair/typebox").TLiteral<"create">, import("@sinclair/typebox").TLiteral<"activate">, import("@sinclair/typebox").TLiteral<"close">]>>;
|
|
227
|
+
tabId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
228
|
+
steps: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
229
|
+
action: import("@sinclair/typebox").TLiteral<"click">;
|
|
230
|
+
ref: import("@sinclair/typebox").TString;
|
|
231
|
+
expect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
232
|
+
urlIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
233
|
+
titleIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
234
|
+
textIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
235
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
236
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
237
|
+
}>>;
|
|
238
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
239
|
+
action: import("@sinclair/typebox").TLiteral<"fill">;
|
|
240
|
+
ref: import("@sinclair/typebox").TString;
|
|
241
|
+
value: import("@sinclair/typebox").TString;
|
|
242
|
+
submit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
243
|
+
expect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
244
|
+
urlIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
245
|
+
titleIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
246
|
+
textIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
247
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
248
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
249
|
+
}>>;
|
|
250
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
251
|
+
action: import("@sinclair/typebox").TLiteral<"select">;
|
|
252
|
+
ref: import("@sinclair/typebox").TString;
|
|
253
|
+
value: import("@sinclair/typebox").TString;
|
|
254
|
+
expect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
255
|
+
urlIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
256
|
+
titleIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
257
|
+
textIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
258
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
259
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
260
|
+
}>>;
|
|
261
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
262
|
+
action: import("@sinclair/typebox").TLiteral<"press">;
|
|
263
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
264
|
+
key: import("@sinclair/typebox").TString;
|
|
265
|
+
expect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
266
|
+
urlIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
267
|
+
titleIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
268
|
+
textIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
269
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
270
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
271
|
+
}>>;
|
|
272
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
273
|
+
action: import("@sinclair/typebox").TLiteral<"scroll">;
|
|
274
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
275
|
+
deltaY: import("@sinclair/typebox").TNumber;
|
|
276
|
+
expect: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
277
|
+
urlIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
278
|
+
titleIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
279
|
+
textIncludes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
280
|
+
ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
281
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"visible">, import("@sinclair/typebox").TLiteral<"hidden">]>>;
|
|
282
|
+
}>>;
|
|
283
|
+
}>]>>>;
|
|
284
|
+
}>;
|
|
203
285
|
export type BrowserUseInput = Static<typeof BrowserUseSchema>;
|
|
286
|
+
/** Decode the provider-facing superset into one exact Browser Control action. */
|
|
287
|
+
export declare function decodeBrowserUseInput(value: unknown): BrowserActionInput | null;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { Value } from "@sinclair/typebox/value";
|
|
2
3
|
//#region src/agent/tools/browser/tool/schemas.ts
|
|
3
4
|
const ApprovalId = Type.Optional(Type.String({ description: "One-time local-owner approval id for this exact action." }));
|
|
4
5
|
const SessionId = Type.Optional(Type.String({ description: "Browser session id returned by the previous observation." }));
|
|
5
6
|
const Revision = Type.Number({ description: "Observation revision used to resolve element refs." });
|
|
6
|
-
const Ref = Type.String({
|
|
7
|
-
|
|
7
|
+
const Ref = Type.String({
|
|
8
|
+
minLength: 1,
|
|
9
|
+
description: "Ephemeral element ref from the latest observation."
|
|
10
|
+
});
|
|
11
|
+
const ExpectationSchema = Type.Object({
|
|
8
12
|
urlIncludes: Type.Optional(Type.String()),
|
|
9
13
|
titleIncludes: Type.Optional(Type.String()),
|
|
10
14
|
textIncludes: Type.Optional(Type.String()),
|
|
11
15
|
ref: Type.Optional(Type.String()),
|
|
12
16
|
state: Type.Optional(Type.Union([Type.Literal("visible"), Type.Literal("hidden")]))
|
|
13
|
-
}, { additionalProperties: false })
|
|
17
|
+
}, { additionalProperties: false });
|
|
18
|
+
const Expectation = Type.Optional(ExpectationSchema);
|
|
14
19
|
function action(name, properties) {
|
|
15
20
|
return Type.Object({
|
|
16
21
|
action: Type.Literal(name),
|
|
@@ -133,7 +138,7 @@ const Sequence = action("sequence", {
|
|
|
133
138
|
expect: Expectation
|
|
134
139
|
});
|
|
135
140
|
const Close = action("close", {});
|
|
136
|
-
const
|
|
141
|
+
const BrowserUseActionSchema = Type.Union([
|
|
137
142
|
Observe,
|
|
138
143
|
Navigate,
|
|
139
144
|
Click,
|
|
@@ -147,5 +152,207 @@ const BrowserUseSchema = Type.Union([
|
|
|
147
152
|
Sequence,
|
|
148
153
|
Close
|
|
149
154
|
]);
|
|
155
|
+
const BrowserUseSchema = Type.Object({
|
|
156
|
+
action: Type.Union([
|
|
157
|
+
Type.Literal("observe"),
|
|
158
|
+
Type.Literal("navigate"),
|
|
159
|
+
Type.Literal("click"),
|
|
160
|
+
Type.Literal("fill"),
|
|
161
|
+
Type.Literal("select"),
|
|
162
|
+
Type.Literal("press"),
|
|
163
|
+
Type.Literal("scroll"),
|
|
164
|
+
Type.Literal("wait"),
|
|
165
|
+
Type.Literal("upload"),
|
|
166
|
+
Type.Literal("tabs"),
|
|
167
|
+
Type.Literal("sequence"),
|
|
168
|
+
Type.Literal("close")
|
|
169
|
+
]),
|
|
170
|
+
sessionId: SessionId,
|
|
171
|
+
approvalId: ApprovalId,
|
|
172
|
+
revision: Type.Optional(Revision),
|
|
173
|
+
ref: Type.Optional(Ref),
|
|
174
|
+
expect: Type.Optional(ExpectationSchema),
|
|
175
|
+
visual: Type.Optional(Type.Union([
|
|
176
|
+
Type.Literal("never"),
|
|
177
|
+
Type.Literal("auto"),
|
|
178
|
+
Type.Literal("always")
|
|
179
|
+
])),
|
|
180
|
+
url: Type.Optional(Type.String({ minLength: 1 })),
|
|
181
|
+
value: Type.Optional(Type.String()),
|
|
182
|
+
submit: Type.Optional(Type.Boolean()),
|
|
183
|
+
key: Type.Optional(Type.String({ minLength: 1 })),
|
|
184
|
+
deltaY: Type.Optional(Type.Number()),
|
|
185
|
+
condition: Type.Optional(Type.Union([
|
|
186
|
+
Type.Literal("page_idle"),
|
|
187
|
+
Type.Literal("text"),
|
|
188
|
+
Type.Literal("visible"),
|
|
189
|
+
Type.Literal("hidden")
|
|
190
|
+
])),
|
|
191
|
+
timeoutMs: Type.Optional(Type.Number({
|
|
192
|
+
minimum: 100,
|
|
193
|
+
maximum: 12e4
|
|
194
|
+
})),
|
|
195
|
+
paths: Type.Optional(Type.Array(Type.String({ minLength: 1 }), {
|
|
196
|
+
minItems: 1,
|
|
197
|
+
maxItems: 20
|
|
198
|
+
})),
|
|
199
|
+
operation: Type.Optional(Type.Union([
|
|
200
|
+
Type.Literal("list"),
|
|
201
|
+
Type.Literal("create"),
|
|
202
|
+
Type.Literal("activate"),
|
|
203
|
+
Type.Literal("close")
|
|
204
|
+
])),
|
|
205
|
+
tabId: Type.Optional(Type.String()),
|
|
206
|
+
steps: Type.Optional(Type.Array(SequenceStep, {
|
|
207
|
+
minItems: 1,
|
|
208
|
+
maxItems: 10
|
|
209
|
+
}))
|
|
210
|
+
}, { additionalProperties: false });
|
|
211
|
+
const ACTION_FIELDS = {
|
|
212
|
+
observe: ["visual"],
|
|
213
|
+
navigate: ["url", "expect"],
|
|
214
|
+
click: [
|
|
215
|
+
"revision",
|
|
216
|
+
"ref",
|
|
217
|
+
"expect"
|
|
218
|
+
],
|
|
219
|
+
fill: [
|
|
220
|
+
"revision",
|
|
221
|
+
"ref",
|
|
222
|
+
"value",
|
|
223
|
+
"submit",
|
|
224
|
+
"expect"
|
|
225
|
+
],
|
|
226
|
+
select: [
|
|
227
|
+
"revision",
|
|
228
|
+
"ref",
|
|
229
|
+
"value",
|
|
230
|
+
"expect"
|
|
231
|
+
],
|
|
232
|
+
press: [
|
|
233
|
+
"revision",
|
|
234
|
+
"ref",
|
|
235
|
+
"key",
|
|
236
|
+
"expect"
|
|
237
|
+
],
|
|
238
|
+
scroll: [
|
|
239
|
+
"revision",
|
|
240
|
+
"ref",
|
|
241
|
+
"deltaY",
|
|
242
|
+
"expect"
|
|
243
|
+
],
|
|
244
|
+
wait: [
|
|
245
|
+
"revision",
|
|
246
|
+
"condition",
|
|
247
|
+
"value",
|
|
248
|
+
"ref",
|
|
249
|
+
"timeoutMs"
|
|
250
|
+
],
|
|
251
|
+
upload: [
|
|
252
|
+
"revision",
|
|
253
|
+
"ref",
|
|
254
|
+
"paths",
|
|
255
|
+
"expect"
|
|
256
|
+
],
|
|
257
|
+
tabs: [
|
|
258
|
+
"operation",
|
|
259
|
+
"tabId",
|
|
260
|
+
"url"
|
|
261
|
+
],
|
|
262
|
+
sequence: [
|
|
263
|
+
"revision",
|
|
264
|
+
"steps",
|
|
265
|
+
"expect"
|
|
266
|
+
],
|
|
267
|
+
close: []
|
|
268
|
+
};
|
|
269
|
+
const SEQUENCE_STEP_FIELDS = {
|
|
270
|
+
click: ["ref", "expect"],
|
|
271
|
+
fill: [
|
|
272
|
+
"ref",
|
|
273
|
+
"value",
|
|
274
|
+
"submit",
|
|
275
|
+
"expect"
|
|
276
|
+
],
|
|
277
|
+
select: [
|
|
278
|
+
"ref",
|
|
279
|
+
"value",
|
|
280
|
+
"expect"
|
|
281
|
+
],
|
|
282
|
+
press: [
|
|
283
|
+
"ref",
|
|
284
|
+
"key",
|
|
285
|
+
"expect"
|
|
286
|
+
],
|
|
287
|
+
scroll: [
|
|
288
|
+
"ref",
|
|
289
|
+
"deltaY",
|
|
290
|
+
"expect"
|
|
291
|
+
]
|
|
292
|
+
};
|
|
293
|
+
/** Decode the provider-facing superset into one exact Browser Control action. */
|
|
294
|
+
function decodeBrowserUseInput(value) {
|
|
295
|
+
if (!isRecord(value) || !isBrowserActionName(value.action)) return null;
|
|
296
|
+
const candidate = { action: value.action };
|
|
297
|
+
copyNonEmptyString(value, candidate, "sessionId");
|
|
298
|
+
copyNonEmptyString(value, candidate, "approvalId");
|
|
299
|
+
for (const field of ACTION_FIELDS[value.action]) {
|
|
300
|
+
const fieldValue = value[field];
|
|
301
|
+
if (fieldValue === void 0 || fieldValue === null) continue;
|
|
302
|
+
if (field === "expect") {
|
|
303
|
+
const expectation = decodeExpectation(fieldValue);
|
|
304
|
+
if (expectation) candidate.expect = expectation;
|
|
305
|
+
} else if (field === "steps") {
|
|
306
|
+
if (!Array.isArray(fieldValue)) {
|
|
307
|
+
candidate.steps = fieldValue;
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
const steps = fieldValue.map(decodeSequenceStep);
|
|
311
|
+
if (steps.some((step) => step === null)) return null;
|
|
312
|
+
candidate.steps = steps;
|
|
313
|
+
} else if ((field === "ref" || field === "tabId" || field === "url") && fieldValue === "") continue;
|
|
314
|
+
else candidate[field] = fieldValue;
|
|
315
|
+
}
|
|
316
|
+
return Value.Check(BrowserUseActionSchema, candidate) ? candidate : null;
|
|
317
|
+
}
|
|
318
|
+
function decodeSequenceStep(value) {
|
|
319
|
+
if (!isRecord(value) || !isSequenceActionName(value.action)) return null;
|
|
320
|
+
const candidate = { action: value.action };
|
|
321
|
+
for (const field of SEQUENCE_STEP_FIELDS[value.action]) {
|
|
322
|
+
const fieldValue = value[field];
|
|
323
|
+
if (fieldValue === void 0 || fieldValue === null) continue;
|
|
324
|
+
if (field === "expect") {
|
|
325
|
+
const expectation = decodeExpectation(fieldValue);
|
|
326
|
+
if (expectation) candidate.expect = expectation;
|
|
327
|
+
} else if (field === "ref" && fieldValue === "") continue;
|
|
328
|
+
else candidate[field] = fieldValue;
|
|
329
|
+
}
|
|
330
|
+
return candidate;
|
|
331
|
+
}
|
|
332
|
+
function decodeExpectation(value) {
|
|
333
|
+
if (!isRecord(value)) return null;
|
|
334
|
+
const expectation = {};
|
|
335
|
+
for (const field of [
|
|
336
|
+
"urlIncludes",
|
|
337
|
+
"titleIncludes",
|
|
338
|
+
"textIncludes",
|
|
339
|
+
"ref"
|
|
340
|
+
]) copyNonEmptyString(value, expectation, field);
|
|
341
|
+
if (expectation.ref && (value.state === "visible" || value.state === "hidden")) expectation.state = value.state;
|
|
342
|
+
return Object.keys(expectation).length > 0 ? expectation : null;
|
|
343
|
+
}
|
|
344
|
+
function copyNonEmptyString(source, target, field) {
|
|
345
|
+
const value = source[field];
|
|
346
|
+
if (typeof value === "string" && value.length > 0) target[field] = value;
|
|
347
|
+
}
|
|
348
|
+
function isBrowserActionName(value) {
|
|
349
|
+
return typeof value === "string" && Object.hasOwn(ACTION_FIELDS, value);
|
|
350
|
+
}
|
|
351
|
+
function isSequenceActionName(value) {
|
|
352
|
+
return typeof value === "string" && Object.hasOwn(SEQUENCE_STEP_FIELDS, value);
|
|
353
|
+
}
|
|
354
|
+
function isRecord(value) {
|
|
355
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
356
|
+
}
|
|
150
357
|
//#endregion
|
|
151
|
-
export { BrowserUseSchema };
|
|
358
|
+
export { BrowserUseActionSchema, BrowserUseSchema, decodeBrowserUseInput };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
6
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
7
7
|
//#region src/ai-assist/text-assist.ts
|
|
8
8
|
init_providers();
|
|
9
9
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
7
|
+
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
2
|
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
|
+
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
import http from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
|
-
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|