@xopcai/xopc 0.0.488 → 0.0.489
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/manifest.json +1 -1
- package/dist/extensions/dingtalk/src/index.js +54 -10
- package/dist/extensions/discord/src/index.js +39 -6
- package/dist/extensions/feishu/src/adapters/cli-login.js +1 -1
- package/dist/extensions/feishu/src/adapters/gateway-setup.js +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.d.ts +1 -0
- package/dist/extensions/feishu/src/outbound/media-load.js +2 -2
- package/dist/extensions/feishu/src/outbound/outbound-adapter.js +2 -1
- package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js +1 -1
- package/dist/extensions/feishu/src/plugin.js +1 -1
- package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -1
- package/dist/extensions/feishu/src/transport/client/install-sdk.js +2 -2
- package/dist/extensions/feishu/src/transport/reliability/message-ingress.js +3 -3
- package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +1 -1
- package/dist/extensions/slack/src/index.js +51 -1
- package/dist/extensions/slack/src/manifest.js +1 -0
- package/dist/extensions/telegram/src/adapters/outbound-adapter.js +6 -1
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +3 -3
- package/dist/extensions/telegram/src/doctor.js +2 -2
- package/dist/extensions/telegram/src/draft-stream.js +1 -1
- package/dist/extensions/telegram/src/exec-approval-handler.js +1 -1
- package/dist/extensions/telegram/src/focus-handler.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +7 -7
- package/dist/extensions/telegram/src/outbound-sender.js +6 -5
- package/dist/extensions/telegram/src/plugin.js +23 -23
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/wecom/src/index.js +82 -6
- package/dist/extensions/weixin/src/api/api.js +1 -1
- package/dist/extensions/weixin/src/auth/accounts.js +2 -2
- package/dist/extensions/weixin/src/auth/pairing.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/cli/gateway-qr-login.js +1 -1
- package/dist/extensions/weixin/src/cli/qr-login.js +2 -2
- package/dist/extensions/weixin/src/media/data-url.d.ts +1 -0
- package/dist/extensions/weixin/src/media/data-url.js +5 -2
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +2 -2
- package/dist/extensions/weixin/src/messaging/process-message.js +5 -5
- package/dist/extensions/weixin/src/messaging/quote-cache.js +1 -1
- package/dist/extensions/weixin/src/messaging/send.js +1 -1
- package/dist/extensions/weixin/src/monitor/monitor.js +2 -2
- package/dist/extensions/weixin/src/outbound-send.js +18 -6
- package/dist/extensions/weixin/src/plugin.js +3 -3
- package/dist/gateway/server/chunks.bin +1560 -1521
- package/dist/gateway/server/chunks.json +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DelDZorh.js → automations-page-B3i5x1Lc.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-leY4yCvw.js → automations-workspace-D6-Kk33X.js} +2 -2
- package/dist/gateway/static/root/assets/{chat-page-XqG9aYBd.js → chat-page-oy4EGdO1.js} +2 -2
- package/dist/gateway/static/root/assets/{home-page-Bxr3V5lc.js → home-page-BmoT_EN4.js} +3 -3
- package/dist/gateway/static/root/assets/{home-task-actions-GAO06s1_.js → home-task-actions-Ck0AhcYe.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BjU5H5hz.js → index-BiQP7-5r.js} +8 -8
- package/dist/gateway/static/root/assets/{note-detail-panel-BTNX68oO.js → note-detail-panel-CYNPJVVE.js} +2 -2
- package/dist/gateway/static/root/assets/{notes-page-FocipOyc.js → notes-page-Dpd98vQp.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-CSc2n5UD.js → personal-page-BfljqOp5.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-CK_EN6Jq.js → project-detail-page-CcnOT_aq.js} +1 -1
- package/dist/gateway/static/root/assets/right-workspace-store-DsVm6C0V.js +1 -0
- package/dist/gateway/static/root/assets/{route-preload-Ab7Zw-df.js → route-preload-CsBdFJHO.js} +2 -2
- package/dist/gateway/static/root/assets/{routine-panel-DzdJGicv.js → routine-panel-pVuJtctD.js} +2 -2
- package/dist/gateway/static/root/assets/{settings-page-CzW5GM5r.js → settings-page-BRAijVXZ.js} +1 -1
- package/dist/gateway/static/root/assets/{space-page-BCzDsNJd.js → space-page-CUwakPrj.js} +2 -2
- package/dist/gateway/static/root/assets/{task-detail-page-B_YXsT9W.js → task-detail-page-Cvx-XtFO.js} +1 -1
- package/dist/gateway/static/root/assets/{task-header-title-bZVPIbyR.js → task-header-title-DHb7z-hq.js} +1 -1
- package/dist/gateway/static/root/assets/{task-run-issue-notice-BXOES2t9.js → task-run-issue-notice-CqjS8_gi.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-DWiIdMIi.js → use-composer-attachments-CQwCTKAp.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-work-D0tMU1bP.js → use-personal-work-fvvZDK_7.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-DPHnm_7A.js → workspace-file-preview-dialog-DdVyIRKm.js} +1 -1
- package/dist/gateway/static/root/index.html +9 -9
- package/dist/package.js +1 -1
- package/dist/src/activity/emitter.js +1 -1
- package/dist/src/agent/agent-manager.js +8 -8
- package/dist/src/agent/background-review/prompts.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +3 -3
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/coding/workspace-revision.js +1 -1
- package/dist/src/agent/commands/command-isolation.js +1 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/context/execution-context.js +2 -2
- package/dist/src/agent/context/workspace-seed.js +1 -1
- package/dist/src/agent/data-acquisition/git.js +1 -1
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-output.js +2 -2
- package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +6 -6
- package/dist/src/agent/embedded/run-turn.js +76 -17
- package/dist/src/agent/embedded/runs.js +1 -1
- package/dist/src/agent/embedded/session-runner.js +2 -1
- package/dist/src/agent/embedded/types.d.ts +1 -1
- package/dist/src/agent/embedded/xopc-stream-bridge.js +3 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
- package/dist/src/agent/external-tools/index.js +1 -1
- package/dist/src/agent/image/generation/providers/xopc-cloud.js +2 -2
- package/dist/src/agent/image/load-image-media.js +2 -2
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +6 -1
- package/dist/src/agent/independent-execution.js +2 -2
- package/dist/src/agent/mcp/connection-drafts.js +2 -2
- package/dist/src/agent/mcp/connection-setup.js +1 -1
- package/dist/src/agent/mcp/conversation-setup.js +1 -1
- package/dist/src/agent/mcp/discovery.js +1 -1
- package/dist/src/agent/mcp/transport.js +1 -1
- package/dist/src/agent/mcp/weixin-setup-scope.js +2 -2
- package/dist/src/agent/messaging/command-handler.js +1 -1
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.d.ts +1 -0
- package/dist/src/agent/prompt/sections/tooling.js +7 -2
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
- package/dist/src/agent/prompt/system-prompt-params.js +1 -1
- package/dist/src/agent/prompt/system-prompt.js +1 -0
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/sandbox/native-command.js +1 -1
- package/dist/src/agent/sandbox/path-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +3 -3
- package/dist/src/agent/service/process-direct-streaming.js +2 -2
- package/dist/src/agent/service.js +7 -5
- package/dist/src/agent/session/session-config-service.js +1 -1
- package/dist/src/agent/skills/hub-hash.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +3 -3
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-sources.js +1 -1
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js +48 -2
- package/dist/src/agent/tools/browser/tool/schemas.d.ts +2 -1
- package/dist/src/agent/tools/browser/tool/schemas.js +6 -0
- package/dist/src/agent/tools/communication.d.ts +1 -0
- package/dist/src/agent/tools/communication.js +10 -3
- package/dist/src/agent/tools/delegate-tool.js +1 -1
- package/dist/src/agent/tools/exec-command.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +13 -4
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.d.ts +7 -0
- package/dist/src/agent/tools/image-generate-tool.js +21 -1
- package/dist/src/agent/tools/managed-job-tool.js +1 -1
- package/dist/src/agent/tools/personal-attention-tool.js +1 -1
- package/dist/src/agent/tools/personal-memory-tool.js +3 -3
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/review-workspace.js +2 -2
- package/dist/src/agent/tools/scoped-workspace-tools.js +1 -1
- package/dist/src/agent/tools/send-media.d.ts +1 -0
- package/dist/src/agent/tools/send-media.js +7 -4
- package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
- package/dist/src/agent/tools/tool-media.d.ts +1 -0
- package/dist/src/agent/tools/tool-media.js +14 -1
- package/dist/src/agent/tools/user-context-tool.js +2 -2
- package/dist/src/agent/tools/web-extract.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +6 -6
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth/openai.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +2 -2
- package/dist/src/auth/oauth-provider-lock.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/automations/delivery/delivery-router.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/automations/service/automation-service.js +1 -1
- package/dist/src/backup/archive.js +4 -4
- package/dist/src/browser/assistance.d.ts +34 -0
- package/dist/src/browser/assistance.js +243 -0
- package/dist/src/browser/cache-dir-policy.js +1 -1
- package/dist/src/browser/drivers/browser-driver.d.ts +44 -0
- package/dist/src/browser/drivers/playwright-driver.d.ts +2 -1
- package/dist/src/browser/drivers/playwright-driver.js +161 -0
- package/dist/src/browser/managed-live-runtime.d.ts +79 -0
- package/dist/src/browser/managed-live-runtime.js +313 -0
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +4 -4
- package/dist/src/browser/runtime/browser-runtime.d.ts +18 -1
- package/dist/src/browser/runtime/browser-runtime.js +55 -4
- package/dist/src/capabilities/capability-catalog.js +2 -2
- package/dist/src/capabilities/readiness/from-config.js +2 -2
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/channel-domain.d.ts +1 -0
- package/dist/src/channels/enterprise/media.d.ts +14 -0
- package/dist/src/channels/enterprise/media.js +208 -0
- package/dist/src/channels/enterprise/plugin.d.ts +4 -0
- package/dist/src/channels/enterprise/plugin.js +40 -12
- package/dist/src/channels/format.js +1 -1
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/internal-outbound.d.ts +2 -0
- package/dist/src/channels/internal-outbound.js +17 -1
- package/dist/src/channels/lifecycle-supervisor.js +1 -1
- package/dist/src/channels/outbound-sender.js +2 -2
- package/dist/src/channels/pairing/pairing-service.js +1 -1
- package/dist/src/channels/pairing/pairing-store.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/builtins/understanding.js +1 -1
- package/dist/src/chat-commands/context.js +2 -2
- package/dist/src/chat-commands/index.js +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/browser-cli-helpers.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/image-providers.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
- package/dist/src/cli/commands/extension-marketplace.js +3 -3
- package/dist/src/cli/commands/extension-pack.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/cli/commands/models.js +3 -3
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/cli/commands/runtime.js +1 -1
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/computer/broker.js +1 -1
- package/dist/src/computer/runtime.js +2 -2
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/paths-state.js +1 -1
- package/dist/src/config/schema.js +2 -2
- package/dist/src/config/workspace-path.js +1 -1
- package/dist/src/connectors/cli/installer.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +1 -1
- package/dist/src/connectors/connected-source-understanding.js +1 -1
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/daemon/constants.js +1 -1
- package/dist/src/daemon/install-plan.js +1 -1
- package/dist/src/daemon/launchd.js +1 -1
- package/dist/src/daemon/schtasks.js +1 -1
- package/dist/src/daemon/systemd.js +1 -1
- package/dist/src/discussions/action-tasks.js +1 -1
- package/dist/src/discussions/live-worker.js +2 -2
- package/dist/src/discussions/recording.js +2 -2
- package/dist/src/discussions/repository.js +1 -1
- package/dist/src/discussions/sealer.js +3 -3
- package/dist/src/discussions/service.js +1 -1
- package/dist/src/endpoint-tools/delegation.js +1 -1
- package/dist/src/endpoint-tools/upload-service.js +1 -1
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/execution-environments/worktree-safety.js +1 -1
- package/dist/src/extensions/activation-context.js +2 -2
- package/dist/src/extensions/agent-plugins/auth.js +3 -3
- package/dist/src/extensions/agent-plugins/branding.js +1 -1
- package/dist/src/extensions/agent-plugins/cli-authorization.js +3 -3
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +2 -2
- package/dist/src/extensions/agent-plugins/resources.js +1 -1
- package/dist/src/extensions/agent-plugins/setup.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/extensions/agent-plugins/source-catalog.js +2 -2
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/agent-plugins/sources.js +1 -1
- package/dist/src/extensions/agent-plugins/store.js +2 -2
- package/dist/src/extensions/agent-plugins/user-config.js +2 -2
- package/dist/src/extensions/agent-plugins/validation.js +3 -3
- package/dist/src/extensions/api.js +2 -2
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/update.js +2 -2
- package/dist/src/files/file-service.js +1 -1
- package/dist/src/gateway/agent-reactions/reaction.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/lib/static-ui.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/browser.js +261 -3
- package/dist/src/gateway/hono/routes/channels.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/device-connections.js +1 -1
- package/dist/src/gateway/hono/routes/files.js +1 -1
- package/dist/src/gateway/hono/routes/host-fs.js +1 -1
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.js +1 -1
- package/dist/src/gateway/hono/routes/mobile-capability-actions.js +3 -3
- package/dist/src/gateway/hono/routes/mobile-capability-panels.js +4 -4
- package/dist/src/gateway/hono/routes/mobile-model-settings.js +13 -5
- package/dist/src/gateway/hono/routes/models.js +6 -6
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/observability.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +1 -1
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/phone.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +2 -2
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/status.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +3 -3
- package/dist/src/gateway/hono/routes/video-generation.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +4 -4
- package/dist/src/gateway/image-generation-setup.js +2 -2
- package/dist/src/gateway/lock.js +2 -2
- package/dist/src/gateway/mobile-privacy.js +1 -1
- package/dist/src/gateway/next-turn-suggestions/snapshot.js +1 -1
- package/dist/src/gateway/ports.js +1 -1
- package/dist/src/gateway/provider-model-setup.js +1 -1
- package/dist/src/gateway/security/device-request-proof.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +2 -0
- package/dist/src/gateway/service/agent-runner.js +2 -2
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +5 -3
- package/dist/src/gateway/service/session-command-service.js +1 -1
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/session-input-coordinator.js +13 -3
- package/dist/src/gateway/service.d.ts +4 -0
- package/dist/src/gateway/service.js +42 -17
- package/dist/src/gateway/xopc-cloud-capability-setup.js +2 -2
- package/dist/src/home-intelligence/follow-ups.js +1 -1
- package/dist/src/home-intelligence/host.js +1 -1
- package/dist/src/home-intelligence/repository.js +1 -1
- package/dist/src/home-intelligence/routines.js +1 -1
- package/dist/src/imports/files.js +1 -1
- package/dist/src/imports/importService.js +2 -2
- package/dist/src/imports/inventory.js +1 -1
- package/dist/src/imports/planner.js +1 -1
- package/dist/src/imports/productImport.js +1 -1
- package/dist/src/imports/scanner.js +1 -1
- package/dist/src/imports/sources.js +1 -1
- package/dist/src/infra/brew.js +1 -1
- package/dist/src/infra/bus/queue.js +1 -1
- package/dist/src/infra/package-runtime-check.js +1 -1
- package/dist/src/infra/path-env.js +1 -1
- package/dist/src/infra/ports.js +1 -1
- package/dist/src/infra/process-diagnostics.js +1 -1
- package/dist/src/infra/ssh-tunnel.js +1 -1
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/infra/write-file-atomic.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/knowledge-memory/usage-policy.js +1 -1
- package/dist/src/local-apps/artifact-files.js +1 -1
- package/dist/src/local-apps/execution-authority.js +1 -1
- package/dist/src/local-apps/p1-services.js +1 -1
- package/dist/src/local-apps/preview-sessions.js +1 -1
- package/dist/src/local-apps/preview-worker.js +1 -1
- package/dist/src/local-apps/public-assets.js +1 -1
- package/dist/src/local-apps/service.js +3 -3
- package/dist/src/local-apps/store.js +1 -1
- package/dist/src/markdown/index.js +1 -1
- package/dist/src/mcp/connection-grants.js +1 -1
- package/dist/src/mcp/delegation.js +3 -3
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media/session-references.js +1 -1
- package/dist/src/media-shared/http/provider-http.js +1 -1
- package/dist/src/media-understanding/runner.js +1 -1
- package/dist/src/memory-learning/choice-observations.js +1 -1
- package/dist/src/memory-learning/source-learning.js +2 -2
- package/dist/src/music-generation/artifact.js +2 -2
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/notes/store.js +1 -1
- package/dist/src/notifications/store.js +1 -1
- package/dist/src/observability/runtime.js +1 -1
- package/dist/src/personal-agent/proactivity/repository.js +1 -1
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +3 -3
- package/dist/src/personal-agent/prompt-context.js +2 -2
- package/dist/src/personal-agent/reply-composer.js +4 -4
- package/dist/src/personal-agent/reply-style.d.ts +2 -2
- package/dist/src/personal-agent/reply-style.js +8 -7
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-service.js +1 -1
- package/dist/src/personal-agent/result-reader.js +3 -3
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/unread.js +1 -1
- package/dist/src/phone/adb-driver.js +2 -2
- package/dist/src/phone/cloud-adb-connection.js +1 -1
- package/dist/src/phone/execution-trace.js +1 -1
- package/dist/src/phone/hdc-driver.js +2 -2
- package/dist/src/phone/hdc-video-tools.js +1 -1
- package/dist/src/phone/model-adapter.js +1 -1
- package/dist/src/phone/ui-session.js +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/project-trust/trust-store.js +1 -1
- package/dist/src/projects/workspace-project.js +1 -1
- package/dist/src/providers/extension-stream-bridge.js +2 -2
- package/dist/src/providers/index.js +4 -4
- package/dist/src/providers/model-call.js +3 -3
- package/dist/src/providers/model-catalog-persistence.js +2 -2
- package/dist/src/providers/model-registry.js +3 -3
- package/dist/src/providers/provider-disconnect-core.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/providers/setup/voice.js +1 -1
- package/dist/src/providers/xopc-cloud-catalog-coordinator.js +1 -1
- package/dist/src/providers/xopc-cloud-credit-budget.js +1 -1
- package/dist/src/providers/xopc-cloud-model-source.js +1 -1
- package/dist/src/review/review-git.js +1 -1
- package/dist/src/runtime-tools/downloader.js +1 -1
- package/dist/src/runtime-tools/harmony-dependencies.js +1 -1
- package/dist/src/runtime-tools/manager.js +2 -2
- package/dist/src/runtime-tools/phone-dependencies.js +1 -1
- package/dist/src/session/history-recall-policy.js +1 -1
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/share/hosted-note-publication.js +1 -1
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/share/hosted-static-site-publication.js +1 -1
- package/dist/src/share/session-share-service.js +1 -1
- package/dist/src/share/share-auto.js +1 -1
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/space/budget-workbook.js +1 -1
- package/dist/src/space/ingest.js +1 -1
- package/dist/src/space/repository.js +2 -2
- package/dist/src/space/workbook-turn.js +1 -1
- package/dist/src/space/worker.js +1 -1
- package/dist/src/storage/sqlite/ai-usage-repository.js +1 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.js +2 -2
- package/dist/src/storage/sqlite/connection.js +2 -2
- package/dist/src/storage/sqlite/conversation-repository.js +2 -2
- package/dist/src/storage/sqlite/desktop-execution-repository.js +1 -1
- package/dist/src/storage/sqlite/desktop-execution-stop-repository.js +1 -1
- package/dist/src/storage/sqlite/device-access-repository.js +1 -1
- package/dist/src/storage/sqlite/device-pairing-approval.js +1 -1
- package/dist/src/storage/sqlite/index.js +1 -1
- package/dist/src/storage/sqlite/schema-upgrade.js +3 -3
- package/dist/src/storage/sqlite/session-creation-repository.js +1 -1
- package/dist/src/storage/sqlite/session-input-control-repository.js +1 -1
- package/dist/src/storage/sqlite/session-repository.js +1 -1
- package/dist/src/support/collect-support-report.js +1 -1
- package/dist/src/tasks/capabilities/management.js +1 -1
- package/dist/src/tasks/capabilities/relations.js +1 -1
- package/dist/src/tasks/delegated-run-result.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +2 -2
- package/dist/src/tasks/task-application-service.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-criterion-review-repository.js +1 -1
- package/dist/src/tasks/task-deliverables.js +1 -1
- package/dist/src/tasks/task-delivery-checks.js +1 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.js +4 -4
- package/dist/src/tasks/task-json-acceptance.js +1 -1
- package/dist/src/tasks/task-main-update-decision-service.js +1 -1
- package/dist/src/tasks/task-origin-repository.js +1 -1
- package/dist/src/tasks/task-read-model-projector.js +1 -1
- package/dist/src/tasks/task-research-repair.js +2 -2
- package/dist/src/tasks/task-research-result.js +3 -3
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +3 -3
- package/dist/src/tasks/task-run-repository.js +1 -1
- package/dist/src/tasks/task-signal-service.js +1 -1
- package/dist/src/tasks/task-workspace-verification.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +5 -5
- package/dist/src/tui/backends/embedded-drafts.js +1 -1
- package/dist/src/tui/clipboard-image.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-capabilities.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +2 -2
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +4 -4
- package/dist/src/tunnel/frpc-binary.js +2 -2
- package/dist/src/usage/cloud-capability.js +1 -1
- package/dist/src/usage/recorder.js +2 -2
- package/dist/src/user-context/access-policy.js +2 -2
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/user-model/usage-policy.js +1 -1
- package/dist/src/utils/index.js +1 -1
- package/dist/src/utils/logger/index.js +2 -2
- package/dist/src/utils/logger.js +1 -1
- package/dist/src/video-generation/artifact.js +2 -2
- package/dist/src/video-generation/repository.js +1 -1
- package/dist/src/voice/audio/normalize.js +1 -1
- package/dist/src/voice/platform-settings.js +1 -1
- package/dist/src/voice/realtime/conversation-context.js +1 -1
- package/dist/src/voice/realtime/memory-context.js +2 -2
- package/dist/src/voice/realtime/runtime.js +2 -2
- package/dist/src/voice/realtime/user-context.js +1 -1
- package/dist/src/voice/stt/factory.js +1 -1
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +2 -2
- package/dist/src/voice/stt/providers/bailian-plan-transcription.js +3 -3
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +3 -3
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/factory.js +1 -1
- package/dist/src/voice/tts/providers/bailian-plan-speech.js +2 -2
- package/dist/src/voice/tts/providers/edge-speech.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +2 -2
- package/dist/src/work-discovery/candidate-discovery.js +2 -2
- package/dist/src/work-discovery/probe.js +2 -2
- package/dist/src/work-discovery/service.js +4 -4
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/right-workspace-store-CcRApllu.js +0 -1
|
@@ -34,6 +34,19 @@ function mediaTypeFromMimeType(mimeType) {
|
|
|
34
34
|
if (mimeType.startsWith("audio/")) return "audio";
|
|
35
35
|
return "document";
|
|
36
36
|
}
|
|
37
|
+
function buildOutboundMediaMetadata(contextMetadata, mediaFileName) {
|
|
38
|
+
const out = {};
|
|
39
|
+
if (contextMetadata) {
|
|
40
|
+
if (contextMetadata.accountId !== void 0) out.accountId = contextMetadata.accountId;
|
|
41
|
+
if (contextMetadata.threadId !== void 0) out.threadId = contextMetadata.threadId;
|
|
42
|
+
if (contextMetadata.inboundMessageId !== void 0) out.inboundMessageId = contextMetadata.inboundMessageId;
|
|
43
|
+
if (typeof contextMetadata.channelReplyId === "string" && contextMetadata.channelReplyId) out.channelReplyId = contextMetadata.channelReplyId;
|
|
44
|
+
if (contextMetadata.sessionWebhook !== void 0) out.sessionWebhook = contextMetadata.sessionWebhook;
|
|
45
|
+
if (contextMetadata.conversationId !== void 0) out.conversationId = contextMetadata.conversationId;
|
|
46
|
+
}
|
|
47
|
+
if (mediaFileName) out.mediaFileName = mediaFileName;
|
|
48
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
49
|
+
}
|
|
37
50
|
async function persistToolMedia(params) {
|
|
38
51
|
const name = basename(params.filePath);
|
|
39
52
|
const mimeType = detectToolMediaMimeType(params.buffer, params.filePath);
|
|
@@ -56,4 +69,4 @@ async function persistToolMedia(params) {
|
|
|
56
69
|
};
|
|
57
70
|
}
|
|
58
71
|
//#endregion
|
|
59
|
-
export { detectToolMediaMimeType, mediaTypeFromMimeType, persistToolMedia };
|
|
72
|
+
export { buildOutboundMediaMetadata, detectToolMediaMimeType, mediaTypeFromMimeType, persistToolMedia };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
|
|
2
|
-
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
3
1
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
4
2
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
3
|
+
import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
|
|
4
|
+
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
5
5
|
import "../../user-model/index.js";
|
|
6
6
|
import "./local-read-budget.js";
|
|
7
7
|
import { memoryVersion } from "../../user-context/memory-version.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { checkUrlSafety, checkWebsiteBlocklist, cleanBase64Images } from "./url-safety.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
|
|
4
5
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
5
|
-
import { checkUrlSafety, checkWebsiteBlocklist, cleanBase64Images } from "./url-safety.js";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
//#region src/agent/tools/web-extract.ts
|
|
8
8
|
init_providers();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
1
2
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
2
3
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
5
|
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
5
6
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
|
-
import { checkFileSafety } from "../prompt/safety.js";
|
|
7
7
|
import { basename, isAbsolute, relative, sep } from "path";
|
|
8
8
|
import { realpath } from "fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
3
2
|
import { ChatPreviewCreateInputSchema, ChatPreviewReviseInputSchema } from "../../../packages/gateway-contract/src/chat-previews.js";
|
|
4
3
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
5
4
|
import { normalizeSpecialistRequirements } from "../../../packages/gateway-contract/src/specialists.js";
|
|
6
5
|
import { TaskCommandSchema, TaskContextInputSchema, TaskWorkspaceDestinationSchema } from "../../../packages/gateway-contract/src/tasks.js";
|
|
7
6
|
import { AutomationCancelOutputSchema, AutomationDeleteOutputSchema, AutomationMutationOutputSchema, AutomationReadAllInputSchema, AutomationReadAllOutputSchema, AutomationReadOutputSchema, AutomationRecoveryOutputSchema, AutomationRunMutationOutputSchema, CapabilityCallSchema, CapabilityResourceInputSchema, NoteDeleteOutputSchema, NoteGetOutputSchema, ProjectCreateInputSchema, ProjectDeleteInputSchema, ProjectDeleteOutputSchema, ProjectEditInputSchema, ProjectMilestoneCreateInputSchema, ProjectMilestoneDeleteInputSchema, ProjectMilestoneDeleteOutputSchema, ProjectMilestoneOutputSchema, ProjectMilestoneUpdateInputSchema, ProjectMutationOutputSchema, ProjectResolveWorkspaceInputSchema, ProjectResolveWorkspaceOutputSchema, ProjectSetPinnedInputSchema, ProjectUpdateCreateInputSchema, ProjectUpdateOutputSchema, TaskRunCancelInputSchema, TaskRunCancelOutputSchema, TaskRunFeedbackInputSchema, TaskRunFeedbackOutputSchema } from "../../../packages/gateway-contract/src/capabilities.js";
|
|
8
7
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
8
|
+
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
9
9
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
10
10
|
import { TaskRunRepository, mcpDelegatedRunPrincipal } from "../../tasks/task-run-repository.js";
|
|
11
11
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
12
12
|
import "../../storage/sqlite/index.js";
|
|
13
|
-
import "../../activity/index.js";
|
|
14
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
13
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
14
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
|
+
import { getEmbeddedExecutionRunId } from "../embedded/execution-context.js";
|
|
16
|
+
import { runWithActivityContext } from "../../activity/context.js";
|
|
17
|
+
import "../../activity/index.js";
|
|
16
18
|
import { hasUnlocalizedTaskText, resolveTaskLocale } from "../../tasks/task-language.js";
|
|
17
19
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
18
20
|
import "../../projects/index.js";
|
|
@@ -21,7 +23,6 @@ import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js
|
|
|
21
23
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
22
24
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
23
25
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
24
|
-
import { getEmbeddedExecutionRunId } from "../embedded/execution-context.js";
|
|
25
26
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
26
27
|
import { getAutomationSetup } from "../../automations/configuration-conversation.js";
|
|
27
28
|
import "../../capabilities/runtime/dispatcher.js";
|
|
@@ -32,7 +33,6 @@ import { resolveResponseLanguageForSession } from "../prompt/response-language.j
|
|
|
32
33
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
33
34
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
34
35
|
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
35
|
-
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
36
36
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
37
37
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
38
38
|
import { isTaskNotificationPreference, taskNotificationContext } from "../../tasks/task-notification-preference.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
2
|
import { DEFAULT_AGENT_ID, init_id, normalizeAgentId } from "./id.js";
|
|
4
3
|
import { AgentDefaultsSchema, AgentEntrySchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_SKILL_POLICY } from "../agent-config/schema.js";
|
|
5
4
|
import { init_agent_config } from "../agent-config/index.js";
|
|
6
5
|
import { BindingsSchema, init_binding_schema } from "../routing/binding-schema.js";
|
|
6
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
//#region src/agent-catalog/repository.ts
|
|
9
9
|
function parseObject(value, label) {
|
|
@@ -1,8 +1,8 @@
|
|
|
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_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
4
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
6
|
import { assertCurrentModelProvider, init_provider_policy, isRetiredModelProvider } from "../providers/provider-policy.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
3
2
|
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
|
+
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
4
4
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
5
5
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "../oauth-provider-lock.js";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
3
|
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
4
|
-
import { hostname } from "node:os";
|
|
5
4
|
import { randomBytes } from "node:crypto";
|
|
6
|
-
import
|
|
5
|
+
import { hostname } from "node:os";
|
|
7
6
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
7
|
+
import http from "node:http";
|
|
8
8
|
//#region src/auth/oauth/xopc-cloud.ts
|
|
9
9
|
function consoleUrl() {
|
|
10
10
|
return (process.env.XOPC_CONSOLE_URL ?? resolveConnectedPlatformEndpoint("authorizationServer") ?? DEFAULT_CONSOLE_URL).replace(/\/+$/, "");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths, resolveOAuthPath } from "../config/paths.js";
|
|
3
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
3
|
import { dirname } from "node:path";
|
|
5
4
|
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { mkdir, open, readFile, rm, stat } from "node:fs/promises";
|
|
7
7
|
import { setTimeout } from "node:timers/promises";
|
|
8
8
|
//#region src/auth/oauth-provider-lock.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.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,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { assertUrlSafe } from "../../agent/tools/url-safety.js";
|
|
3
4
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
4
5
|
import { getAutomationRun } from "../storage/automation-run-repository.js";
|
|
5
6
|
import "../storage/index.js";
|
|
6
7
|
import { getAutomationEventForRun } from "../events/event-repository.js";
|
|
7
8
|
import { assertLocalAppDelivery } from "../../local-apps/execution-authority.js";
|
|
8
|
-
import { assertUrlSafe } from "../../agent/tools/url-safety.js";
|
|
9
9
|
import "../events/index.js";
|
|
10
10
|
import { resolveAutomationWebhookSecret } from "../webhook-secrets.js";
|
|
11
11
|
import { createHmac, randomUUID } from "node:crypto";
|
|
@@ -2,8 +2,8 @@ import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
|
2
2
|
import { init_agent_scope } from "../../agent/agent-scope.js";
|
|
3
3
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
4
4
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
5
|
-
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
6
5
|
import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
|
|
6
|
+
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
7
7
|
import { getAutomationRunRequest, listAutomationRuns } from "../storage/automation-run-repository.js";
|
|
8
8
|
import "../storage/index.js";
|
|
9
9
|
import { withDeviceDelegation } from "../../endpoint-tools/delegation.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
4
3
|
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
4
|
+
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
5
5
|
import { init_agent_scope } from "../../agent/agent-scope.js";
|
|
6
6
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
7
7
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { assertDatabaseOffline, init_offline_access } from "../storage/sqlite/offline-access.js";
|
|
2
1
|
import { init_node_sqlite, requireNodeSqlite } from "../infra/node-sqlite.js";
|
|
2
|
+
import { assertDatabaseOffline, init_offline_access } from "../storage/sqlite/offline-access.js";
|
|
3
3
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
5
4
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
6
|
-
import { constants, createReadStream, createWriteStream } from "node:fs";
|
|
7
5
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, randomUUID, scryptSync } from "node:crypto";
|
|
6
|
+
import { tmpdir } from "node:os";
|
|
7
|
+
import { constants, createReadStream, createWriteStream } from "node:fs";
|
|
8
8
|
import { chmod, lstat, mkdir, mkdtemp, open, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
|
|
9
|
-
import { pipeline } from "node:stream/promises";
|
|
10
9
|
import { Transform } from "node:stream";
|
|
10
|
+
import { pipeline } from "node:stream/promises";
|
|
11
11
|
//#region src/backup/archive.ts
|
|
12
12
|
init_node_sqlite();
|
|
13
13
|
init_offline_access();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type SessionInput } from '../storage/sqlite/session-input-repository.js';
|
|
2
|
+
export interface BrowserAssistanceCheckpoint {
|
|
3
|
+
browserSessionId: string;
|
|
4
|
+
reason: string;
|
|
5
|
+
url: string;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BrowserAssistance {
|
|
9
|
+
id: string;
|
|
10
|
+
conversationId: string;
|
|
11
|
+
transcriptId: string;
|
|
12
|
+
originRunId: string;
|
|
13
|
+
toolCallId: string;
|
|
14
|
+
checkpoint: BrowserAssistanceCheckpoint;
|
|
15
|
+
version: number;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
status: 'open' | 'queued' | 'resuming' | 'completed' | 'cancelled';
|
|
18
|
+
queuedInputId?: string;
|
|
19
|
+
taskRunId?: string;
|
|
20
|
+
objectiveInputId?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class BrowserAssistanceError extends Error {
|
|
23
|
+
readonly code: string;
|
|
24
|
+
readonly status: number;
|
|
25
|
+
constructor(code: string, message: string, status?: number);
|
|
26
|
+
}
|
|
27
|
+
export declare function browserAssistance(conversationId: string): BrowserAssistance | undefined;
|
|
28
|
+
export declare function isBrowserAssistanceSuspended(conversationId: string, runId: string): boolean;
|
|
29
|
+
export declare function requireBrowserAssistance(conversationId: string, runId: string, toolCallId: string, checkpoint: BrowserAssistanceCheckpoint): BrowserAssistance;
|
|
30
|
+
export declare function cancelBrowserAssistance(conversationId: string): void;
|
|
31
|
+
export declare function queueBrowserAssistance(conversationId: string, waitId: string): BrowserAssistance;
|
|
32
|
+
export declare function consumeBrowserAssistance(input: SessionInput): boolean;
|
|
33
|
+
export declare function finishBrowserAssistance(input: SessionInput, succeeded: boolean): void;
|
|
34
|
+
export declare function reconcileBrowserAssistance(): string[];
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { init_connection, isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
2
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
|
+
import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
|
|
4
|
+
import { findSessionInputByRunId, getSessionInputById, init_session_input_repository, insertSessionInput } from "../storage/sqlite/session-input-repository.js";
|
|
5
|
+
import { DurableState, init_durable_state } from "../storage/sqlite/durable-state.js";
|
|
6
|
+
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
7
|
+
import { randomUUID } from "node:crypto";
|
|
8
|
+
//#region src/browser/assistance.ts
|
|
9
|
+
init_durable_state();
|
|
10
|
+
init_connection();
|
|
11
|
+
init_transaction();
|
|
12
|
+
init_session_instance_repository();
|
|
13
|
+
init_session_input_repository();
|
|
14
|
+
init_task_run_repository();
|
|
15
|
+
var BrowserAssistanceError = class extends Error {
|
|
16
|
+
constructor(code, message, status = 409) {
|
|
17
|
+
super(message);
|
|
18
|
+
this.code = code;
|
|
19
|
+
this.status = status;
|
|
20
|
+
this.name = "BrowserAssistanceError";
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const waits = new DurableState("browser.assistance");
|
|
24
|
+
function markTaskWaiting(wait) {
|
|
25
|
+
if (!wait.taskRunId) return;
|
|
26
|
+
const runs = new TaskRunRepository();
|
|
27
|
+
const run = runs.get(wait.taskRunId);
|
|
28
|
+
if (run?.status !== "running") return;
|
|
29
|
+
if (!runs.listActiveWaits(run.taskId).some((item) => item.taskRunId === run.id && item.condition.browserAssistanceId === wait.id)) runs.createWait({
|
|
30
|
+
taskId: run.taskId,
|
|
31
|
+
taskRunId: run.id,
|
|
32
|
+
kind: "user_input",
|
|
33
|
+
reason: wait.checkpoint.reason || "Browser requires manual operation",
|
|
34
|
+
condition: {
|
|
35
|
+
browserAssistanceId: wait.id,
|
|
36
|
+
browserSessionId: wait.checkpoint.browserSessionId
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
runs.setStatus({
|
|
40
|
+
runId: run.id,
|
|
41
|
+
expectedVersion: run.version,
|
|
42
|
+
from: ["running"],
|
|
43
|
+
to: "waiting",
|
|
44
|
+
actor: { kind: "system" }
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function browserAssistance(conversationId) {
|
|
48
|
+
if (!isXopcDatabaseOpen()) return void 0;
|
|
49
|
+
const wait = waits.get(conversationId);
|
|
50
|
+
if (wait && readCurrentTranscriptId(getSqliteDatabase(), conversationId) !== wait.transcriptId) {
|
|
51
|
+
waits.delete(conversationId);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
return wait;
|
|
55
|
+
}
|
|
56
|
+
function isBrowserAssistanceSuspended(conversationId, runId) {
|
|
57
|
+
const wait = browserAssistance(conversationId);
|
|
58
|
+
return Boolean(wait && wait.originRunId === runId && wait.status === "open");
|
|
59
|
+
}
|
|
60
|
+
function requireBrowserAssistance(conversationId, runId, toolCallId, checkpoint) {
|
|
61
|
+
if (!isXopcDatabaseOpen()) throw new BrowserAssistanceError("BROWSER_ASSISTANCE_UNAVAILABLE", "Database is unavailable for browser assistance.", 503);
|
|
62
|
+
return runSqliteWriteTransaction((db) => {
|
|
63
|
+
const transcriptId = readCurrentTranscriptId(db, conversationId);
|
|
64
|
+
if (!transcriptId) throw new BrowserAssistanceError("BROWSER_CONVERSATION_NOT_FOUND", "Browser assistance requires a saved conversation.", 409);
|
|
65
|
+
const current = browserAssistance(conversationId);
|
|
66
|
+
if (current?.originRunId === runId && current.toolCallId === toolCallId && current.status === "open") return current;
|
|
67
|
+
const origin = findSessionInputByRunId(conversationId, runId);
|
|
68
|
+
const wait = {
|
|
69
|
+
id: randomUUID(),
|
|
70
|
+
conversationId,
|
|
71
|
+
transcriptId,
|
|
72
|
+
originRunId: runId,
|
|
73
|
+
toolCallId,
|
|
74
|
+
checkpoint,
|
|
75
|
+
status: "open",
|
|
76
|
+
version: (current?.version ?? 0) + 1,
|
|
77
|
+
createdAt: Date.now(),
|
|
78
|
+
taskRunId: origin?.taskRunId,
|
|
79
|
+
objectiveInputId: current?.queuedInputId === origin?.id ? current?.objectiveInputId : origin?.id
|
|
80
|
+
};
|
|
81
|
+
markTaskWaiting(wait);
|
|
82
|
+
waits.set(conversationId, wait);
|
|
83
|
+
return wait;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function cancelBrowserAssistance(conversationId) {
|
|
87
|
+
if (!isXopcDatabaseOpen()) return;
|
|
88
|
+
runSqliteWriteTransaction(() => {
|
|
89
|
+
const wait = isXopcDatabaseOpen() ? waits.get(conversationId) : void 0;
|
|
90
|
+
if (!wait || ["completed", "cancelled"].includes(wait.status)) return;
|
|
91
|
+
if (wait.taskRunId && [
|
|
92
|
+
"open",
|
|
93
|
+
"queued",
|
|
94
|
+
"resuming"
|
|
95
|
+
].includes(wait.status)) {
|
|
96
|
+
const runs = new TaskRunRepository();
|
|
97
|
+
const run = runs.get(wait.taskRunId);
|
|
98
|
+
if (run && [
|
|
99
|
+
"queued",
|
|
100
|
+
"running",
|
|
101
|
+
"waiting",
|
|
102
|
+
"verifying"
|
|
103
|
+
].includes(run.status)) {
|
|
104
|
+
for (const item of runs.listActiveWaits(run.taskId)) if (item.condition.browserAssistanceId === wait.id) runs.resolveWait({
|
|
105
|
+
waitId: item.id,
|
|
106
|
+
actor: { kind: "user" },
|
|
107
|
+
resolution: { cancelled: true }
|
|
108
|
+
});
|
|
109
|
+
runs.finalize({
|
|
110
|
+
runId: run.id,
|
|
111
|
+
expectedVersion: run.version,
|
|
112
|
+
actor: { kind: "user" },
|
|
113
|
+
terminalCode: "cancelled_by_user",
|
|
114
|
+
receipt: {
|
|
115
|
+
status: "cancelled",
|
|
116
|
+
summary: "Browser task cancelled",
|
|
117
|
+
changes: [],
|
|
118
|
+
evidence: [],
|
|
119
|
+
verification: {
|
|
120
|
+
status: "unverified",
|
|
121
|
+
checks: []
|
|
122
|
+
},
|
|
123
|
+
remainingWork: [],
|
|
124
|
+
needsUser: false,
|
|
125
|
+
completionVerdict: "not_achieved"
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
waits.set(conversationId, {
|
|
131
|
+
...wait,
|
|
132
|
+
status: "cancelled",
|
|
133
|
+
version: wait.version + 1
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function queueBrowserAssistance(conversationId, waitId) {
|
|
138
|
+
return runSqliteWriteTransaction(() => {
|
|
139
|
+
const wait = browserAssistance(conversationId);
|
|
140
|
+
if (!wait || wait.id !== waitId || wait.status === "cancelled") throw new BrowserAssistanceError("BROWSER_ASSISTANCE_CHANGED", "The browser task changed. Refresh before continuing.", 409);
|
|
141
|
+
if (wait.status !== "open") return wait;
|
|
142
|
+
const original = (wait.objectiveInputId ? getSessionInputById(conversationId, wait.objectiveInputId) : void 0) ?? findSessionInputByRunId(conversationId, wait.originRunId);
|
|
143
|
+
const input = insertSessionInput({
|
|
144
|
+
id: randomUUID(),
|
|
145
|
+
conversationId,
|
|
146
|
+
expectedTranscriptId: wait.transcriptId,
|
|
147
|
+
clientMessageId: `browser-assistance:${wait.id}`,
|
|
148
|
+
requestedDelivery: "next",
|
|
149
|
+
effectiveDelivery: "next",
|
|
150
|
+
status: "queued",
|
|
151
|
+
content: `用户已完成浏览器上的人工操作并交还控制权,请继续原任务。原请求时间:${new Date(original?.createdAtMs ?? wait.createdAt).toISOString()};原目标:${original?.content ?? wait.checkpoint.reason}。请先调用 browser_use 的 observe(sessionId: "${wait.checkpoint.browserSessionId}")读取当前最新页面状态,不要重复用户已经完成的登录或表单操作,然后继续完成原任务。`,
|
|
152
|
+
origin: {
|
|
153
|
+
type: "system",
|
|
154
|
+
source: "internal"
|
|
155
|
+
},
|
|
156
|
+
thinking: original?.thinking,
|
|
157
|
+
taskRunId: original?.taskRunId,
|
|
158
|
+
contextRefs: original?.contextRefs,
|
|
159
|
+
contextSnapshots: original?.contextSnapshots
|
|
160
|
+
});
|
|
161
|
+
if (input.origin.type !== "system" || input.origin.source !== "internal" || input.status !== "queued") throw new BrowserAssistanceError("BROWSER_ASSISTANCE_CHANGED", "The continuation request changed. Refresh before continuing.", 409);
|
|
162
|
+
const next = {
|
|
163
|
+
...wait,
|
|
164
|
+
status: "queued",
|
|
165
|
+
queuedInputId: input.id,
|
|
166
|
+
version: wait.version + 1
|
|
167
|
+
};
|
|
168
|
+
waits.set(conversationId, next);
|
|
169
|
+
return next;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function consumeBrowserAssistance(input) {
|
|
173
|
+
if (!input.clientMessageId.startsWith("browser-assistance:")) return true;
|
|
174
|
+
return runSqliteWriteTransaction(() => {
|
|
175
|
+
const wait = browserAssistance(input.conversationId);
|
|
176
|
+
if (!wait || wait.queuedInputId !== input.id || wait.status !== "queued" || input.origin.type !== "system" || input.origin.source !== "internal") return false;
|
|
177
|
+
if (wait.taskRunId) {
|
|
178
|
+
const runs = new TaskRunRepository();
|
|
179
|
+
const run = runs.get(wait.taskRunId);
|
|
180
|
+
if (!run || run.status !== "waiting") return false;
|
|
181
|
+
const active = runs.listActiveWaits(run.taskId).filter((item) => item.taskRunId === run.id);
|
|
182
|
+
if (active.some((item) => item.condition.browserAssistanceId !== wait.id)) return false;
|
|
183
|
+
for (const item of active) runs.resolveWait({
|
|
184
|
+
waitId: item.id,
|
|
185
|
+
actor: { kind: "system" },
|
|
186
|
+
resolution: { browserAssistanceId: wait.id }
|
|
187
|
+
});
|
|
188
|
+
runs.setStatus({
|
|
189
|
+
runId: run.id,
|
|
190
|
+
expectedVersion: run.version,
|
|
191
|
+
from: ["waiting"],
|
|
192
|
+
to: "running",
|
|
193
|
+
actor: { kind: "system" }
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
waits.set(input.conversationId, {
|
|
197
|
+
...wait,
|
|
198
|
+
status: "resuming",
|
|
199
|
+
version: wait.version + 1
|
|
200
|
+
});
|
|
201
|
+
return true;
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function finishBrowserAssistance(input, succeeded) {
|
|
205
|
+
if (!isXopcDatabaseOpen()) return;
|
|
206
|
+
runSqliteWriteTransaction(() => {
|
|
207
|
+
const wait = browserAssistance(input.conversationId);
|
|
208
|
+
if (!wait || wait.queuedInputId !== input.id || !["queued", "resuming"].includes(wait.status)) return;
|
|
209
|
+
const next = {
|
|
210
|
+
...wait,
|
|
211
|
+
status: succeeded ? "completed" : "open",
|
|
212
|
+
...succeeded ? {} : {
|
|
213
|
+
id: randomUUID(),
|
|
214
|
+
queuedInputId: void 0
|
|
215
|
+
},
|
|
216
|
+
version: wait.version + 1
|
|
217
|
+
};
|
|
218
|
+
if (!succeeded) markTaskWaiting(next);
|
|
219
|
+
waits.set(input.conversationId, next);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function reconcileBrowserAssistance() {
|
|
223
|
+
if (!isXopcDatabaseOpen()) return [];
|
|
224
|
+
const conversations = [];
|
|
225
|
+
for (const wait of waits.values()) {
|
|
226
|
+
if (browserAssistance(wait.conversationId)?.id !== wait.id) continue;
|
|
227
|
+
const input = wait.queuedInputId ? getSessionInputById(wait.conversationId, wait.queuedInputId) : void 0;
|
|
228
|
+
if (wait.status === "resuming" || wait.status === "queued" && input?.status !== "queued") {
|
|
229
|
+
const next = {
|
|
230
|
+
...wait,
|
|
231
|
+
status: "open",
|
|
232
|
+
queuedInputId: void 0,
|
|
233
|
+
id: randomUUID(),
|
|
234
|
+
version: wait.version + 1
|
|
235
|
+
};
|
|
236
|
+
markTaskWaiting(next);
|
|
237
|
+
waits.set(wait.conversationId, next);
|
|
238
|
+
} else if (wait.status === "queued") conversations.push(wait.conversationId);
|
|
239
|
+
}
|
|
240
|
+
return conversations;
|
|
241
|
+
}
|
|
242
|
+
//#endregion
|
|
243
|
+
export { BrowserAssistanceError, browserAssistance, cancelBrowserAssistance, consumeBrowserAssistance, finishBrowserAssistance, isBrowserAssistanceSuspended, queueBrowserAssistance, reconcileBrowserAssistance, requireBrowserAssistance };
|
|
@@ -4,10 +4,54 @@ export type BrowserPrimitiveInput = Exclude<BrowserActionInput, BrowserNavigateI
|
|
|
4
4
|
} | {
|
|
5
5
|
action: 'close';
|
|
6
6
|
}>;
|
|
7
|
+
export type BrowserInteractiveKey = 'Enter' | 'Backspace' | 'Tab' | 'Escape' | 'Delete' | 'Home' | 'End' | 'PageUp' | 'PageDown' | 'Space' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';
|
|
8
|
+
export type BrowserInteractiveInput = {
|
|
9
|
+
kind: 'pointer';
|
|
10
|
+
phase: 'down' | 'move' | 'up' | 'cancel' | 'click';
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
button?: 'left' | 'right' | 'middle';
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'wheel';
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
deltaX: number;
|
|
19
|
+
deltaY: number;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'text';
|
|
22
|
+
text: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'key';
|
|
25
|
+
key: BrowserInteractiveKey;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'navigate';
|
|
28
|
+
action: 'back' | 'forward' | 'reload';
|
|
29
|
+
};
|
|
30
|
+
export interface ManagedBrowserFrame {
|
|
31
|
+
bytes: Uint8Array;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
timestamp: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ManagedBrowserViewport {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
version: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ManagedBrowserLiveHandle {
|
|
42
|
+
readonly sessionId: string;
|
|
43
|
+
getViewport(): ManagedBrowserViewport;
|
|
44
|
+
getUrl(): string;
|
|
45
|
+
getTitle(): Promise<string>;
|
|
46
|
+
startScreencast(onFrame: (frame: ManagedBrowserFrame) => void): Promise<() => Promise<void>>;
|
|
47
|
+
dispatchInput(input: BrowserInteractiveInput): Promise<void>;
|
|
48
|
+
invalidateRefs(): void;
|
|
49
|
+
}
|
|
7
50
|
export interface BrowserDriver {
|
|
8
51
|
readonly kind: 'playwright' | 'extension' | 'desktop';
|
|
9
52
|
readonly abortClosesSession?: boolean;
|
|
10
53
|
previewEndpoint?(sessionId: string): string | undefined;
|
|
54
|
+
getLiveHandle?(sessionId: string): ManagedBrowserLiveHandle | undefined;
|
|
11
55
|
connect(): Promise<void>;
|
|
12
56
|
disconnect(): Promise<void>;
|
|
13
57
|
createSession(sessionId: string): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserControlResult, BrowserNavigateInput, BrowserObservation, BrowserObserveInput, BrowserTabsInput } from '@xopcai/browser-control-contract';
|
|
2
2
|
import type { Browser, BrowserContext } from 'playwright-core';
|
|
3
|
-
import type { BrowserDriver, BrowserPrimitiveInput } from './browser-driver.js';
|
|
3
|
+
import type { BrowserDriver, BrowserPrimitiveInput, ManagedBrowserLiveHandle } from './browser-driver.js';
|
|
4
4
|
export interface PlaywrightConnection {
|
|
5
5
|
browser: Browser;
|
|
6
6
|
context?: BrowserContext;
|
|
@@ -21,6 +21,7 @@ export declare class PlaywrightDriver implements BrowserDriver {
|
|
|
21
21
|
private sessions;
|
|
22
22
|
constructor(options: PlaywrightDriverOptions);
|
|
23
23
|
get abortClosesSession(): boolean;
|
|
24
|
+
getLiveHandle(sessionId: string): ManagedBrowserLiveHandle | undefined;
|
|
24
25
|
connect(): Promise<void>;
|
|
25
26
|
disconnect(): Promise<void>;
|
|
26
27
|
createSession(sessionId: string): Promise<void>;
|