@toddzheng024/dscode-desktop 0.0.0-stage → 0.7.34
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/LICENSE +21 -0
- package/README.md +120 -2
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/bin/apply_patch +9 -0
- package/cordis.patch.yml +433 -0
- package/docs/CHANGELOG.md +649 -0
- package/docs/account-login.md +44 -0
- package/docs/auto-review.md +128 -0
- package/docs/browser-use.md +784 -0
- package/docs/computer-use.md +81 -0
- package/docs/custom-providers.md +88 -0
- package/docs/demo.md +158 -0
- package/docs/distribution.md +58 -0
- package/docs/dscode-ultra.md +75 -0
- package/docs/email.md +296 -0
- package/docs/exec.md +40 -0
- package/docs/hub-distribution.md +212 -0
- package/docs/memory.md +121 -0
- package/docs/opencode-go.md +61 -0
- package/docs/plugin-hub.md +68 -0
- package/docs/releases/0.2.0.md +28 -0
- package/docs/releases/0.3.0.md +21 -0
- package/docs/releases/0.4.0.md +20 -0
- package/docs/releases/0.5.0.md +19 -0
- package/docs/releases/0.6.0.md +20 -0
- package/docs/releases/0.7.0.md +22 -0
- package/docs/releases/0.7.1.md +20 -0
- package/docs/releases/0.7.10.md +10 -0
- package/docs/releases/0.7.11.md +17 -0
- package/docs/releases/0.7.12.md +11 -0
- package/docs/releases/0.7.13.md +12 -0
- package/docs/releases/0.7.14.md +11 -0
- package/docs/releases/0.7.15.md +11 -0
- package/docs/releases/0.7.16.md +10 -0
- package/docs/releases/0.7.17.md +12 -0
- package/docs/releases/0.7.18.md +13 -0
- package/docs/releases/0.7.19.md +8 -0
- package/docs/releases/0.7.2.md +19 -0
- package/docs/releases/0.7.20.md +10 -0
- package/docs/releases/0.7.21.md +9 -0
- package/docs/releases/0.7.22.md +11 -0
- package/docs/releases/0.7.23.md +14 -0
- package/docs/releases/0.7.24.md +11 -0
- package/docs/releases/0.7.25.md +8 -0
- package/docs/releases/0.7.26.md +18 -0
- package/docs/releases/0.7.27.md +8 -0
- package/docs/releases/0.7.28.md +22 -0
- package/docs/releases/0.7.29.md +12 -0
- package/docs/releases/0.7.3.md +23 -0
- package/docs/releases/0.7.30.md +19 -0
- package/docs/releases/0.7.31.md +14 -0
- package/docs/releases/0.7.32.md +14 -0
- package/docs/releases/0.7.33.md +37 -0
- package/docs/releases/0.7.34.md +24 -0
- package/docs/releases/0.7.4.md +16 -0
- package/docs/releases/0.7.5.md +18 -0
- package/docs/releases/0.7.6.md +29 -0
- package/docs/releases/0.7.7.md +36 -0
- package/docs/releases/0.7.8.md +14 -0
- package/docs/releases/0.7.9.md +15 -0
- package/docs/session-bridge.md +80 -0
- package/docs/session-cards.md +53 -0
- package/docs/session-communication.md +186 -0
- package/docs/session-metrics.md +41 -0
- package/docs/skills.md +81 -0
- package/docs/triggers.md +338 -0
- package/docs/tui-commands.md +204 -0
- package/extensions/browser/manifest.json +22 -0
- package/extensions/browser/popup.css +6 -0
- package/extensions/browser/popup.html +11 -0
- package/extensions/browser/popup.mjs +47 -0
- package/extensions/browser/protocol.mjs +168 -0
- package/extensions/browser/worker.mjs +94 -0
- package/icon.svg +7 -0
- package/locale/en.json +6 -0
- package/locale/zh-cn.json +6 -0
- package/node_modules/@deepseek-ai/node-addon-system/LICENSE +21 -0
- package/node_modules/@deepseek-ai/node-addon-system/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system/README.md +15 -0
- package/node_modules/@deepseek-ai/node-addon-system/README.zh.md +15 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/flock.d.ts +13 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/flock.js +51 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/index.d.ts +73 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/index.js +98 -0
- package/node_modules/@deepseek-ai/node-addon-system/package.json +45 -0
- package/node_modules/@deepseek-ai/node-addon-system/src/flock.c +164 -0
- package/node_modules/@deepseek-ai/node-addon-system/src/main.c +298 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.zh.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/bin/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/prebuilds.json +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.zh.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/bin/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/prebuilds.json +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.zh.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/glibc/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/landlock-run +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/musl/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/prebuilds.json +24 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.zh.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/glibc/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/landlock-run +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/musl/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/prebuilds.json +24 -0
- package/package.json +156 -4
- package/plugins/account/index.mjs +178 -0
- package/plugins/account/state.mjs +123 -0
- package/plugins/auto-review/audit.mjs +24 -0
- package/plugins/auto-review/index.mjs +267 -0
- package/plugins/auto-review/policy.mjs +92 -0
- package/plugins/browser/SKILL.md +158 -0
- package/plugins/browser/access.mjs +143 -0
- package/plugins/browser/config.mjs +60 -0
- package/plugins/browser/connection.mjs +385 -0
- package/plugins/browser/desktop-client.mjs +282 -0
- package/plugins/browser/desktop-host.mjs +74 -0
- package/plugins/browser/document-identity.mjs +57 -0
- package/plugins/browser/extension-relay.mjs +66 -0
- package/plugins/browser/files.mjs +32 -0
- package/plugins/browser/index.mjs +235 -0
- package/plugins/browser/mcp-entry.mjs +18 -0
- package/plugins/browser/mcp-tools.mjs +21 -0
- package/plugins/browser/presentation.mjs +45 -0
- package/plugins/browser/preview.mjs +77 -0
- package/plugins/browser/review.mjs +20 -0
- package/plugins/browser/screenshots.mjs +35 -0
- package/plugins/clipboard-image/clipboard-image.swift +56 -0
- package/plugins/clipboard-image/index.mjs +70 -0
- package/plugins/code-review/baseline.mjs +143 -0
- package/plugins/code-review/git.mjs +163 -0
- package/plugins/code-review/index.mjs +236 -0
- package/plugins/compaction/engine.mjs +304 -0
- package/plugins/compaction/tetris.mjs +65 -0
- package/plugins/compaction/threshold.mjs +99 -0
- package/plugins/computer-use/DESKTOP-SKILL.md +64 -0
- package/plugins/computer-use/desktop-host.mjs +75 -0
- package/plugins/computer-use/desktop-skill.mjs +28 -0
- package/plugins/computer-use/desktop-upstream.mjs +3 -0
- package/plugins/computer-use/index.mjs +37 -0
- package/plugins/cordis-config/plain.mjs +31 -0
- package/plugins/credentials/index.mjs +73 -0
- package/plugins/custom/adapter.mjs +110 -0
- package/plugins/custom/config.mjs +85 -0
- package/plugins/custom/desktop-client.mjs +150 -0
- package/plugins/custom/desktop-host.mjs +78 -0
- package/plugins/custom/images.mjs +32 -0
- package/plugins/custom/index.mjs +145 -0
- package/plugins/custom/wire.mjs +179 -0
- package/plugins/desktop/client.mjs +1041 -0
- package/plugins/desktop/index.mjs +10 -0
- package/plugins/desktop/shell-environment.mjs +9 -0
- package/plugins/desktop-workspace/hooks.mjs +29 -0
- package/plugins/desktop-workspace/index.mjs +37 -0
- package/plugins/dscode/board.mjs +260 -0
- package/plugins/dscode/child-target.mjs +11 -0
- package/plugins/dscode/control.mjs +17 -0
- package/plugins/dscode/desktop-client.mjs +55 -0
- package/plugins/dscode/desktop-host.mjs +37 -0
- package/plugins/dscode/index.mjs +270 -0
- package/plugins/email/cli.mjs +32 -0
- package/plugins/email/contacts.mjs +36 -0
- package/plugins/email/desktop-client.mjs +117 -0
- package/plugins/email/desktop-host.mjs +54 -0
- package/plugins/email/desktop-service.mjs +106 -0
- package/plugins/email/gmail-oauth.mjs +69 -0
- package/plugins/email/gmail-store.mjs +2 -0
- package/plugins/email/gmail.mjs +194 -0
- package/plugins/email/imap.mjs +136 -0
- package/plugins/email/inbox.d.mts +25 -0
- package/plugins/email/inbox.mjs +76 -0
- package/plugins/email/smtp.mjs +70 -0
- package/plugins/email/store.mjs +32 -0
- package/plugins/email-tools/index.mjs +46 -0
- package/plugins/exec/cli.mjs +64 -0
- package/plugins/exec/index.mjs +112 -0
- package/plugins/grok/adapter.mjs +114 -0
- package/plugins/grok/auth.mjs +76 -0
- package/plugins/grok/billing.mjs +147 -0
- package/plugins/grok/index.mjs +123 -0
- package/plugins/grok/models.mjs +129 -0
- package/plugins/grok/status.mjs +29 -0
- package/plugins/grok/wire.mjs +268 -0
- package/plugins/hub/catalog.mjs +82 -0
- package/plugins/hub/desktop-client.mjs +114 -0
- package/plugins/hub/desktop-host.mjs +129 -0
- package/plugins/i18n/messages.d.mts +21 -0
- package/plugins/i18n/messages.mjs +537 -0
- package/plugins/jev/approval.mjs +131 -0
- package/plugins/jev/client.mjs +74 -0
- package/plugins/jev/index.mjs +100 -0
- package/plugins/memory/content.mjs +57 -0
- package/plugins/memory/desktop-host.mjs +3 -0
- package/plugins/memory/index.mjs +168 -0
- package/plugins/memory/pipeline.mjs +79 -0
- package/plugins/memory/store.mjs +93 -0
- package/plugins/message-source/kind.mjs +20 -0
- package/plugins/opencode-go/adapter.mjs +96 -0
- package/plugins/opencode-go/command.mjs +128 -0
- package/plugins/opencode-go/index.mjs +121 -0
- package/plugins/opencode-go/models.mjs +58 -0
- package/plugins/opencode-go/oauth.mjs +194 -0
- package/plugins/opencode-go/search.mjs +86 -0
- package/plugins/opencode-go/usage.mjs +120 -0
- package/plugins/opencode-go/version.mjs +10 -0
- package/plugins/opencode-go/wire.mjs +73 -0
- package/plugins/openrouter/adapter.mjs +232 -0
- package/plugins/openrouter/index.mjs +124 -0
- package/plugins/openrouter/models.mjs +157 -0
- package/plugins/openrouter/search.mjs +113 -0
- package/plugins/openrouter/wire.mjs +101 -0
- package/plugins/providers/catalog.mjs +160 -0
- package/plugins/providers/chat-messages.mjs +120 -0
- package/plugins/providers/chat-stream.mjs +174 -0
- package/plugins/providers/desktop-client.mjs +84 -0
- package/plugins/providers/desktop-host.mjs +63 -0
- package/plugins/providers/effort.mjs +35 -0
- package/plugins/providers/http-errors.mjs +50 -0
- package/plugins/providers/openrouter-account.mjs +171 -0
- package/plugins/session-bridge/client.mjs +106 -0
- package/plugins/session-bridge/communication.mjs +260 -0
- package/plugins/session-bridge/index.mjs +67 -0
- package/plugins/session-bridge/mailbox.mjs +267 -0
- package/plugins/session-bridge/paths.mjs +21 -0
- package/plugins/session-bridge/server.mjs +172 -0
- package/plugins/session-bridge/tasks.mjs +229 -0
- package/plugins/session-cards/content.mjs +64 -0
- package/plugins/session-cards/index.mjs +38 -0
- package/plugins/session-cards/manager.mjs +140 -0
- package/plugins/session-metrics/attribution.mjs +30 -0
- package/plugins/session-metrics/balance.mjs +81 -0
- package/plugins/session-metrics/desktop-client.mjs +62 -0
- package/plugins/session-metrics/desktop-host.mjs +46 -0
- package/plugins/session-metrics/index.mjs +97 -0
- package/plugins/session-metrics/pricing.mjs +84 -0
- package/plugins/session-metrics/rate.mjs +59 -0
- package/plugins/session-metrics/store.mjs +75 -0
- package/plugins/session-metrics/turns.mjs +134 -0
- package/plugins/session-metrics/view.mjs +272 -0
- package/plugins/time-marks/desktop-host.mjs +2 -0
- package/plugins/time-marks/index.mjs +116 -0
- package/plugins/time-marks/marks.mjs +152 -0
- package/plugins/triggers/cli.mjs +558 -0
- package/plugins/triggers/commands.mjs +143 -0
- package/plugins/triggers/config.mjs +264 -0
- package/plugins/triggers/desktop-client.mjs +155 -0
- package/plugins/triggers/desktop-host.mjs +88 -0
- package/plugins/triggers/desktop-management.mjs +97 -0
- package/plugins/triggers/desktop-scheduler.mjs +125 -0
- package/plugins/triggers/host.mjs +24 -0
- package/plugins/triggers/index.mjs +27 -0
- package/plugins/triggers/job-cli.mjs +110 -0
- package/plugins/triggers/jobs.mjs +156 -0
- package/plugins/triggers/launchd.mjs +101 -0
- package/plugins/triggers/lease.mjs +24 -0
- package/plugins/triggers/log.mjs +104 -0
- package/plugins/triggers/management.mjs +181 -0
- package/plugins/triggers/options.mjs +117 -0
- package/plugins/triggers/overlay.mjs +7 -0
- package/plugins/triggers/poll.mjs +65 -0
- package/plugins/triggers/run.mjs +157 -0
- package/plugins/triggers/schedule.mjs +40 -0
- package/plugins/triggers/scheduler-service.mjs +46 -0
- package/plugins/triggers/scheduler.mjs +92 -0
- package/plugins/triggers/session-run.mjs +125 -0
- package/plugins/triggers/session.mjs +48 -0
- package/plugins/triggers/source-emit.mjs +19 -0
- package/plugins/triggers/source-host.mjs +78 -0
- package/plugins/triggers/source-ingress.mjs +70 -0
- package/plugins/triggers/source-sandbox.mjs +35 -0
- package/plugins/triggers/sources.mjs +45 -0
- package/plugins/triggers/spool.mjs +145 -0
- package/plugins/triggers/tools.mjs +67 -0
- package/plugins/triggers/unattended.mjs +18 -0
- package/plugins/tui-tools/composition.mjs +28 -0
- package/plugins/tui-tools/desktop-host.mjs +2 -0
- package/plugins/tui-tools/doctor-cli.mjs +22 -0
- package/plugins/tui-tools/doctor.mjs +149 -0
- package/plugins/tui-tools/hook-sources.mjs +113 -0
- package/plugins/tui-tools/hooks.mjs +23 -0
- package/plugins/tui-tools/index.mjs +269 -0
- package/plugins/tui-tools/sandbox-runner.mjs +123 -0
- package/plugins/tui-tools/shell.mjs +27 -0
- package/plugins/tui-tools/update.mjs +111 -0
- package/plugins/tui-tools/workspace-discovery.mjs +129 -0
- package/plugins/ultra/policy.mjs +42 -0
- package/plugins/worktree-subagent/worktree.mjs +56 -0
- package/runtime-sources.json +94 -0
- package/vendor/bash/LICENSE +21 -0
- package/vendor/bash/index.js +717 -0
- package/vendor/bash/types/background.d.ts +50 -0
- package/vendor/bash/types/index.d.ts +38 -0
- package/vendor/bash/types/render.d.ts +57 -0
- package/vendor/command-goal/LICENSE +21 -0
- package/vendor/command-goal/index.js +210 -0
- package/vendor/command-goal/types/index.d.ts +10 -0
- package/vendor/computer-use/LICENSE +21 -0
- package/vendor/computer-use/lib/approval-policy.js +12 -0
- package/vendor/computer-use/lib/approval-policy.js.map +1 -0
- package/vendor/computer-use/lib/artifacts.js +79 -0
- package/vendor/computer-use/lib/artifacts.js.map +1 -0
- package/vendor/computer-use/lib/backend.js +3 -0
- package/vendor/computer-use/lib/backend.js.map +1 -0
- package/vendor/computer-use/lib/client.js +369 -0
- package/vendor/computer-use/lib/client.js.map +1 -0
- package/vendor/computer-use/lib/config.js +159 -0
- package/vendor/computer-use/lib/config.js.map +1 -0
- package/vendor/computer-use/lib/confirmations.js +99 -0
- package/vendor/computer-use/lib/confirmations.js.map +1 -0
- package/vendor/computer-use/lib/diff.js +58 -0
- package/vendor/computer-use/lib/diff.js.map +1 -0
- package/vendor/computer-use/lib/errors.js +22 -0
- package/vendor/computer-use/lib/errors.js.map +1 -0
- package/vendor/computer-use/lib/exposure.js +244 -0
- package/vendor/computer-use/lib/exposure.js.map +1 -0
- package/vendor/computer-use/lib/index.js +66 -0
- package/vendor/computer-use/lib/index.js.map +1 -0
- package/vendor/computer-use/lib/leases.js +262 -0
- package/vendor/computer-use/lib/leases.js.map +1 -0
- package/vendor/computer-use/lib/providers/macos.js +243 -0
- package/vendor/computer-use/lib/providers/macos.js.map +1 -0
- package/vendor/computer-use/lib/providers/native-helper.js +726 -0
- package/vendor/computer-use/lib/providers/native-helper.js.map +1 -0
- package/vendor/computer-use/lib/providers/unsupported.js +51 -0
- package/vendor/computer-use/lib/providers/unsupported.js.map +1 -0
- package/vendor/computer-use/lib/service.js +608 -0
- package/vendor/computer-use/lib/service.js.map +1 -0
- package/vendor/computer-use/lib/skill.js +136 -0
- package/vendor/computer-use/lib/skill.js.map +1 -0
- package/vendor/computer-use/lib/target-resolver.js +180 -0
- package/vendor/computer-use/lib/target-resolver.js.map +1 -0
- package/vendor/computer-use/lib/tools.js +511 -0
- package/vendor/computer-use/lib/tools.js.map +1 -0
- package/vendor/computer-use/lib/types/approval-policy.d.ts +13 -0
- package/vendor/computer-use/lib/types/approval-policy.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/artifacts.d.ts +10 -0
- package/vendor/computer-use/lib/types/artifacts.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/backend.d.ts +124 -0
- package/vendor/computer-use/lib/types/backend.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/client/index.d.ts +83 -0
- package/vendor/computer-use/lib/types/client/index.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/config.d.ts +94 -0
- package/vendor/computer-use/lib/types/config.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/confirmations.d.ts +23 -0
- package/vendor/computer-use/lib/types/confirmations.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/diff.d.ts +5 -0
- package/vendor/computer-use/lib/types/diff.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/errors.d.ts +15 -0
- package/vendor/computer-use/lib/types/errors.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/exposure.d.ts +30 -0
- package/vendor/computer-use/lib/types/exposure.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/index.d.ts +21 -0
- package/vendor/computer-use/lib/types/index.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/leases.d.ts +81 -0
- package/vendor/computer-use/lib/types/leases.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/providers/macos.d.ts +39 -0
- package/vendor/computer-use/lib/types/providers/macos.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/providers/native-helper.d.ts +48 -0
- package/vendor/computer-use/lib/types/providers/native-helper.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/providers/unsupported.d.ts +23 -0
- package/vendor/computer-use/lib/types/providers/unsupported.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/service.d.ts +58 -0
- package/vendor/computer-use/lib/types/service.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/skill.d.ts +14 -0
- package/vendor/computer-use/lib/types/skill.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/target-resolver.d.ts +38 -0
- package/vendor/computer-use/lib/types/target-resolver.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/tools.d.ts +6 -0
- package/vendor/computer-use/lib/types/tools.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/types.d.ts +270 -0
- package/vendor/computer-use/lib/types/types.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/web.d.ts +33 -0
- package/vendor/computer-use/lib/types/web.d.ts.map +1 -0
- package/vendor/computer-use/lib/types.js +9 -0
- package/vendor/computer-use/lib/types.js.map +1 -0
- package/vendor/computer-use/lib/web.js +188 -0
- package/vendor/computer-use/lib/web.js.map +1 -0
- package/vendor/computer-use/native/macos/Sources/Fixture/main.swift +412 -0
- package/vendor/computer-use/native/macos/Sources/Helper/CursorImage.swift +11 -0
- package/vendor/computer-use/native/macos/Sources/Helper/CursorMotion.swift +67 -0
- package/vendor/computer-use/native/macos/Sources/Helper/CursorOverlay.swift +840 -0
- package/vendor/computer-use/native/macos/Sources/Helper/TargetedPointer.swift +327 -0
- package/vendor/computer-use/native/macos/Sources/Helper/WindowNumberMatcher.swift +29 -0
- package/vendor/computer-use/native/macos/Sources/Helper/main.swift +1244 -0
- package/vendor/computer-use/native/macos/Sources/Monitor/main.swift +153 -0
- package/vendor/computer-use/native/macos/bin/dsh-computer-use-helper +0 -0
- package/vendor/computer-use/native/macos/manifest.json +14 -0
- package/vendor/persistent/LICENSE +21 -0
- package/vendor/persistent/index.js +411 -0
- package/vendor/persistent/types/index.d.ts +24 -0
- package/vendor/subagent/LICENSE +21 -0
- package/vendor/subagent/index.js +694 -0
- package/vendor/subagent/invariant.js +52 -0
- package/vendor/subagent/model-selection-settings.js +68 -0
- package/vendor/subagent/types/index.d.ts +82 -0
- package/vendor/subagent/types/invariant.d.ts +16 -0
- package/vendor/subagent/types/list-models.d.ts +10 -0
- package/vendor/subagent/types/model-selection-settings.d.ts +45 -0
- package/vendor/subagent/types/model-selection-state.d.ts +48 -0
- package/vendor/subagent/types/model-selection.d.ts +81 -0
- package/vendor/subagent-core/LICENSE +21 -0
- package/vendor/subagent-core/index.js +3202 -0
- package/vendor/subagent-core/invariant.js +76 -0
- package/vendor/subagent-core/typert.host.d.ts +3 -0
- package/vendor/subagent-core/typert.host.js +978 -0
- package/vendor/subagent-core/typert.remote-client.d.ts +25 -0
- package/vendor/subagent-core/typert.remote-client.js +114 -0
- package/vendor/subagent-core/types/archive-admission.d.ts +16 -0
- package/vendor/subagent-core/types/archive-admission.js +151 -0
- package/vendor/subagent-core/types/assistant-output.d.ts +48 -0
- package/vendor/subagent-core/types/assistant-output.js +73 -0
- package/vendor/subagent-core/types/catalog.d.ts +84 -0
- package/vendor/subagent-core/types/catalog.js +109 -0
- package/vendor/subagent-core/types/child-agent.d.ts +156 -0
- package/vendor/subagent-core/types/child-agent.js +213 -0
- package/vendor/subagent-core/types/client.d.ts +8 -0
- package/vendor/subagent-core/types/client.js +7 -0
- package/vendor/subagent-core/types/continuation-activation.d.ts +267 -0
- package/vendor/subagent-core/types/continuation-activation.js +700 -0
- package/vendor/subagent-core/types/continuation-messages.d.ts +62 -0
- package/vendor/subagent-core/types/continuation-messages.js +106 -0
- package/vendor/subagent-core/types/continuation.d.ts +124 -0
- package/vendor/subagent-core/types/continuation.js +455 -0
- package/vendor/subagent-core/types/control-types.d.ts +135 -0
- package/vendor/subagent-core/types/control-types.js +8 -0
- package/vendor/subagent-core/types/control.d.ts +45 -0
- package/vendor/subagent-core/types/control.js +79 -0
- package/vendor/subagent-core/types/depth.d.ts +31 -0
- package/vendor/subagent-core/types/depth.js +39 -0
- package/vendor/subagent-core/types/descriptor.d.ts +144 -0
- package/vendor/subagent-core/types/descriptor.js +193 -0
- package/vendor/subagent-core/types/error.d.ts +11 -0
- package/vendor/subagent-core/types/error.js +14 -0
- package/vendor/subagent-core/types/inbox.d.ts +43 -0
- package/vendor/subagent-core/types/inbox.js +61 -0
- package/vendor/subagent-core/types/index.d.ts +320 -0
- package/vendor/subagent-core/types/index.js +475 -0
- package/vendor/subagent-core/types/internal.d.ts +58 -0
- package/vendor/subagent-core/types/internal.js +58 -0
- package/vendor/subagent-core/types/invariant.d.ts +13 -0
- package/vendor/subagent-core/types/invariant.js +91 -0
- package/vendor/subagent-core/types/lifecycle.d.ts +113 -0
- package/vendor/subagent-core/types/lifecycle.js +180 -0
- package/vendor/subagent-core/types/list-children.d.ts +36 -0
- package/vendor/subagent-core/types/list-children.js +166 -0
- package/vendor/subagent-core/types/out-of-process.d.ts +118 -0
- package/vendor/subagent-core/types/out-of-process.js +219 -0
- package/vendor/subagent-core/types/projection-types.d.ts +82 -0
- package/vendor/subagent-core/types/projection-types.js +7 -0
- package/vendor/subagent-core/types/projection.d.ts +100 -0
- package/vendor/subagent-core/types/projection.js +157 -0
- package/vendor/subagent-core/types/run-settlement.d.ts +17 -0
- package/vendor/subagent-core/types/run-settlement.js +70 -0
- package/vendor/subagent-core/types/types.d.ts +377 -0
- package/vendor/subagent-core/types/types.js +19 -0
- package/vendor/subagent-driver/LICENSE +21 -0
- package/vendor/subagent-driver/index.js +255 -0
- package/vendor/subagent-driver/types/index.d.ts +33 -0
- package/vendor/subagent-driver/types/structured.d.ts +42 -0
- package/vendor/subagent-fork/LICENSE +21 -0
- package/vendor/subagent-fork/index.js +61 -0
- package/vendor/subagent-fork/types/index.d.ts +20 -0
- package/vendor/subagent-spawn/LICENSE +21 -0
- package/vendor/subagent-spawn/index.js +45 -0
- package/vendor/subagent-spawn/types/index.d.ts +19 -0
- package/vendor/terminal/LICENSE +21 -0
- package/vendor/terminal/index.js +1093 -0
- package/vendor/terminal/types/config.d.ts +82 -0
- package/vendor/terminal/types/index.d.ts +36 -0
- package/vendor/terminal/types/sanitize.d.ts +47 -0
- package/vendor/terminal/types/session.d.ts +87 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/** Session-sidecar read leases, durable denials, and per-turn control leases. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { defineDomain, domainTable } from '@deepseek-ai/dsh-storage-domain';
|
|
4
|
+
import { approvalPolicy } from "./approval-policy.js";
|
|
5
|
+
import { ComputerUseError } from "./errors.js";
|
|
6
|
+
const nonNegativeSafeInteger = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
7
|
+
const leaseScopeSchema = z.union([z.literal('read'), z.literal('control')]);
|
|
8
|
+
const sessionIdentitySchema = z.object({
|
|
9
|
+
createdAt: nonNegativeSafeInteger,
|
|
10
|
+
cwd: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
const deniedLeaseSchema = z.object({
|
|
13
|
+
bundleId: z.string().min(1),
|
|
14
|
+
scope: leaseScopeSchema,
|
|
15
|
+
});
|
|
16
|
+
/** Runtime validation for the whole-Session Computer Use sidecar row. */
|
|
17
|
+
export const computerUseSessionStateSchema = z.object({
|
|
18
|
+
session: sessionIdentitySchema,
|
|
19
|
+
readGrants: z.array(z.string().min(1)),
|
|
20
|
+
denied: z.array(deniedLeaseSchema),
|
|
21
|
+
}).superRefine((row, ctx) => {
|
|
22
|
+
const readGrants = new Set();
|
|
23
|
+
row.readGrants.forEach((bundleId, index) => {
|
|
24
|
+
if (readGrants.has(bundleId)) {
|
|
25
|
+
ctx.addIssue({
|
|
26
|
+
code: 'custom',
|
|
27
|
+
path: ['readGrants', index],
|
|
28
|
+
message: `duplicate Computer Use read grant '${bundleId}'`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
readGrants.add(bundleId);
|
|
32
|
+
});
|
|
33
|
+
const denials = new Set();
|
|
34
|
+
row.denied.forEach((denial, index) => {
|
|
35
|
+
const key = `${denial.scope}\0${denial.bundleId}`;
|
|
36
|
+
if (denials.has(key)) {
|
|
37
|
+
ctx.addIssue({
|
|
38
|
+
code: 'custom',
|
|
39
|
+
path: ['denied', index],
|
|
40
|
+
message: `duplicate Computer Use ${denial.scope} denial '${denial.bundleId}'`,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
denials.add(key);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
/** One lifecycle-bound Computer Use sidecar record per Session id. */
|
|
47
|
+
export const computerUseStateDomainSpec = defineDomain({
|
|
48
|
+
name: 'computer_use_state',
|
|
49
|
+
version: 0,
|
|
50
|
+
tables: {
|
|
51
|
+
sessions: domainTable(computerUseSessionStateSchema),
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
function currentTurn(events) {
|
|
55
|
+
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
56
|
+
const event = events[index];
|
|
57
|
+
if (event?.type === 'turn/end')
|
|
58
|
+
return undefined;
|
|
59
|
+
if (event?.type === 'turn/start')
|
|
60
|
+
return event.data.turn;
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
function identityOf(header) {
|
|
65
|
+
return Object.freeze({
|
|
66
|
+
createdAt: header.createdAt,
|
|
67
|
+
...(header.cwd === undefined ? {} : { cwd: header.cwd }),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function sameIdentity(row, header) {
|
|
71
|
+
return row.session.createdAt === header.createdAt && row.session.cwd === header.cwd;
|
|
72
|
+
}
|
|
73
|
+
function stateSnapshot(header, readGrants, denied) {
|
|
74
|
+
const readGrantSnapshot = Object.freeze([...readGrants]);
|
|
75
|
+
const deniedSnapshot = Object.freeze([...denied].map(item => Object.freeze({ ...item })));
|
|
76
|
+
return Object.freeze({
|
|
77
|
+
session: identityOf(header),
|
|
78
|
+
readGrants: readGrantSnapshot,
|
|
79
|
+
denied: deniedSnapshot,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function configuredAccess(config, bundleId, scope) {
|
|
83
|
+
if (config.allowAllApps)
|
|
84
|
+
return true;
|
|
85
|
+
return config.grants.find(grant => grant.bundleId === bundleId)?.[scope] === true;
|
|
86
|
+
}
|
|
87
|
+
function boundedFailure(error) {
|
|
88
|
+
return (error instanceof Error ? error.message : String(error)).slice(0, 500);
|
|
89
|
+
}
|
|
90
|
+
/** Applies configured app policy and routes missing leases through DSH approval. */
|
|
91
|
+
export class ComputerLeaseManager {
|
|
92
|
+
ctx;
|
|
93
|
+
config;
|
|
94
|
+
storage;
|
|
95
|
+
storageFiber;
|
|
96
|
+
decisionTails = new Map();
|
|
97
|
+
mutationTails = new Map();
|
|
98
|
+
controlGrants = new WeakMap();
|
|
99
|
+
constructor(ctx, config) {
|
|
100
|
+
this.ctx = ctx;
|
|
101
|
+
this.config = config;
|
|
102
|
+
this.storageFiber = ctx.inject(['storageDomain'], async (storageCtx) => {
|
|
103
|
+
const domain = await storageCtx.storageDomain.open(computerUseStateDomainSpec);
|
|
104
|
+
const binding = { table: domain.table('sessions') };
|
|
105
|
+
this.storage = binding;
|
|
106
|
+
return async () => {
|
|
107
|
+
if (this.storage === binding)
|
|
108
|
+
this.storage = undefined;
|
|
109
|
+
await Promise.all(this.mutationTails.values());
|
|
110
|
+
await domain.close();
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
ctx.effect(() => () => this.storageFiber.dispose(), 'dsh-computer-use: optional lease sidecar');
|
|
114
|
+
}
|
|
115
|
+
/** Wait for an already-composed storage-domain service to finish opening. */
|
|
116
|
+
async initialize() {
|
|
117
|
+
await this.prepareStorage();
|
|
118
|
+
}
|
|
119
|
+
/** Ensure one Agent may read or control one exact running application. */
|
|
120
|
+
async ensure(agent, app, scope, toolName, callId, signal) {
|
|
121
|
+
if (configuredAccess(this.config(), app.bundleId, scope))
|
|
122
|
+
return 'configured';
|
|
123
|
+
return await this.enqueueDecision(agent.session.id, async () => {
|
|
124
|
+
if (configuredAccess(this.config(), app.bundleId, scope))
|
|
125
|
+
return 'configured';
|
|
126
|
+
return await this.ensureInteractive(agent, app, scope, toolName, callId, signal);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/** Forget process-local control grants when their Agent is disposed. */
|
|
130
|
+
releaseAgent(agent) {
|
|
131
|
+
this.controlGrants.delete(agent);
|
|
132
|
+
}
|
|
133
|
+
async ensureInteractive(agent, app, scope, toolName, callId, signal) {
|
|
134
|
+
await this.prepareStorage();
|
|
135
|
+
const sessionEvents = typeof agent.session.snapshotEvents === 'function'
|
|
136
|
+
? agent.session.snapshotEvents()
|
|
137
|
+
: agent.session.events ?? [];
|
|
138
|
+
const turn = currentTurn(sessionEvents);
|
|
139
|
+
if (turn === undefined) {
|
|
140
|
+
throw new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${scope} access for ${app.name} must be requested inside an open Agent turn`);
|
|
141
|
+
}
|
|
142
|
+
if (scope === 'control' && this.controlGrants.get(agent)?.get(app.bundleId) === turn) {
|
|
143
|
+
return 'approved';
|
|
144
|
+
}
|
|
145
|
+
const stored = this.currentState(agent);
|
|
146
|
+
if (scope === 'read' && stored?.readGrants.includes(app.bundleId) === true) {
|
|
147
|
+
return 'approved';
|
|
148
|
+
}
|
|
149
|
+
if (stored?.denied.some(denial => denial.bundleId === app.bundleId && denial.scope === scope) === true) {
|
|
150
|
+
throw new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${scope} access for ${app.name} was rejected earlier in this Session; do not retry without new user instructions`);
|
|
151
|
+
}
|
|
152
|
+
if (approvalPolicy(this.ctx, agent) === 'never') {
|
|
153
|
+
throw new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${scope} access for ${app.name} is blocked because approval prompts are disabled in this Session (approval/policy: never, e.g. the danger-full-access preset); add "${app.bundleId}" to the computer-use grants in Settings, or switch the permission preset to one with approval ask`);
|
|
154
|
+
}
|
|
155
|
+
if (scope === 'read' && this.storage === undefined) {
|
|
156
|
+
throw this.storageRequired(app, scope, 'a Session-wide interactive read grant');
|
|
157
|
+
}
|
|
158
|
+
const outcome = await this.ctx.approval.request({
|
|
159
|
+
agent,
|
|
160
|
+
toolName,
|
|
161
|
+
...(callId === undefined ? {} : { callId }),
|
|
162
|
+
reason: scope === 'read'
|
|
163
|
+
? `Allow this Agent to inspect the Accessibility state and requested screenshot of ${app.name} (${app.bundleId}) for this Session.`
|
|
164
|
+
: `Allow this Agent to send UI input to ${app.name} (${app.bundleId}) for the current turn.`,
|
|
165
|
+
signal,
|
|
166
|
+
});
|
|
167
|
+
if (outcome === 'cancelled') {
|
|
168
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', `${scope} access request for ${app.name} was cancelled`);
|
|
169
|
+
}
|
|
170
|
+
if (outcome === 'rejected') {
|
|
171
|
+
if (this.storage === undefined) {
|
|
172
|
+
throw this.storageRequired(app, scope, 'the rejected interactive decision');
|
|
173
|
+
}
|
|
174
|
+
await this.persist(agent, app, { kind: 'denied', scope });
|
|
175
|
+
throw new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${scope} access for ${app.name} was not granted (rejected); do not retry in this Session without new user instructions`);
|
|
176
|
+
}
|
|
177
|
+
if (outcome !== 'allowed-once') {
|
|
178
|
+
throw new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${scope} access for ${app.name} was not granted (${outcome})`);
|
|
179
|
+
}
|
|
180
|
+
if (scope === 'control') {
|
|
181
|
+
let grants = this.controlGrants.get(agent);
|
|
182
|
+
if (grants === undefined) {
|
|
183
|
+
grants = new Map();
|
|
184
|
+
this.controlGrants.set(agent, grants);
|
|
185
|
+
}
|
|
186
|
+
grants.set(app.bundleId, turn);
|
|
187
|
+
return 'approved';
|
|
188
|
+
}
|
|
189
|
+
await this.persist(agent, app, { kind: 'read-granted' });
|
|
190
|
+
return 'approved';
|
|
191
|
+
}
|
|
192
|
+
currentState(agent) {
|
|
193
|
+
const row = this.storage?.table.get(agent.session.id);
|
|
194
|
+
return row !== undefined && sameIdentity(row, agent.session.header) ? row : undefined;
|
|
195
|
+
}
|
|
196
|
+
async prepareStorage() {
|
|
197
|
+
if (this.storage !== undefined)
|
|
198
|
+
return this.storage;
|
|
199
|
+
if (this.ctx.get('storageDomain') === undefined)
|
|
200
|
+
return undefined;
|
|
201
|
+
await this.storageFiber;
|
|
202
|
+
return this.storage;
|
|
203
|
+
}
|
|
204
|
+
async persist(agent, app, decision) {
|
|
205
|
+
const purpose = decision.kind === 'read-granted'
|
|
206
|
+
? 'the Session-wide read grant'
|
|
207
|
+
: `the Session-wide ${decision.scope} denial`;
|
|
208
|
+
try {
|
|
209
|
+
const participated = await this.ctx.sessions.flush(agent.session);
|
|
210
|
+
if (!participated) {
|
|
211
|
+
throw new Error('no Session persistence listener participated in ctx.sessions.flush');
|
|
212
|
+
}
|
|
213
|
+
await this.enqueueMutation(agent.session.id, async () => {
|
|
214
|
+
const binding = this.storage;
|
|
215
|
+
if (binding === undefined)
|
|
216
|
+
throw this.storageRequired(app, decision.kind === 'read-granted' ? 'read' : decision.scope, purpose);
|
|
217
|
+
const current = binding.table.get(agent.session.id);
|
|
218
|
+
const row = current !== undefined && sameIdentity(current, agent.session.header)
|
|
219
|
+
? current
|
|
220
|
+
: stateSnapshot(agent.session.header, [], []);
|
|
221
|
+
const readGrants = new Set(row.readGrants);
|
|
222
|
+
const denied = [...row.denied];
|
|
223
|
+
if (decision.kind === 'read-granted') {
|
|
224
|
+
readGrants.add(app.bundleId);
|
|
225
|
+
}
|
|
226
|
+
else if (!denied.some(item => item.bundleId === app.bundleId && item.scope === decision.scope)) {
|
|
227
|
+
denied.push({ bundleId: app.bundleId, scope: decision.scope });
|
|
228
|
+
}
|
|
229
|
+
await binding.table.put(agent.session.id, stateSnapshot(agent.session.header, readGrants, denied));
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
if (error instanceof ComputerUseError)
|
|
234
|
+
throw error;
|
|
235
|
+
throw new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${purpose} for ${app.name} could not be persisted after the approval audit: ${boundedFailure(error)}; configure working Session persistence and @deepseek-ai/dsh-storage-domain before retrying`, { cause: error });
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
storageRequired(app, scope, purpose) {
|
|
239
|
+
return new ComputerUseError('COMPUTER_PERMISSION_REQUIRED', `${scope} access for ${app.name} requires ctx.storageDomain to persist ${purpose}; compose @deepseek-ai/dsh-storage-domain or add an exact static grant for "${app.bundleId}" before retrying`);
|
|
240
|
+
}
|
|
241
|
+
enqueueDecision(sessionId, operation) {
|
|
242
|
+
const previous = this.decisionTails.get(sessionId) ?? Promise.resolve();
|
|
243
|
+
const result = previous.then(operation);
|
|
244
|
+
const tail = result.then(() => undefined, () => undefined);
|
|
245
|
+
this.decisionTails.set(sessionId, tail);
|
|
246
|
+
return result.finally(() => {
|
|
247
|
+
if (this.decisionTails.get(sessionId) === tail)
|
|
248
|
+
this.decisionTails.delete(sessionId);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
enqueueMutation(sessionId, operation) {
|
|
252
|
+
const previous = this.mutationTails.get(sessionId) ?? Promise.resolve();
|
|
253
|
+
const result = previous.then(operation);
|
|
254
|
+
const tail = result.then(() => undefined, () => undefined);
|
|
255
|
+
this.mutationTails.set(sessionId, tail);
|
|
256
|
+
return result.finally(() => {
|
|
257
|
+
if (this.mutationTails.get(sessionId) === tail)
|
|
258
|
+
this.mutationTails.delete(sessionId);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=leases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leases.js","sourceRoot":"","sources":["../src/leases.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAG3E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAG9C,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;AAC1F,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;AAE3E,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,sBAAsB;IACjC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,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,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,IAAI;gBAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACtF,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,eAAe,CAAI,SAAoB,EAAE,SAA2B;QAC1E,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;QACvE,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACvC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;QAC1D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QACvC,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,IAAI;gBAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACtF,CAAC,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/** macOS Accessibility/CoreGraphics/ScreenCaptureKit provider for `ctx.computerUse`. */
|
|
2
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
3
|
+
import { Service } from '@deepseek-ai/cordis';
|
|
4
|
+
import { Config, COMPUTER_USE_SETTINGS_NAMESPACE, readComputerUseConfig, resolveConfig, } from "../config.js";
|
|
5
|
+
import { ComputerUseService } from "../service.js";
|
|
6
|
+
import { NativeHelperClient } from "./native-helper.js";
|
|
7
|
+
import { UnsupportedPlatformBackend } from "./unsupported.js";
|
|
8
|
+
function createBackend(ctx, config) {
|
|
9
|
+
return process.platform === 'darwin'
|
|
10
|
+
? new MacOSBackend(ctx, config)
|
|
11
|
+
: new UnsupportedPlatformBackend(process.platform);
|
|
12
|
+
}
|
|
13
|
+
/** Fixed-command native backend. */
|
|
14
|
+
export class MacOSBackend {
|
|
15
|
+
config;
|
|
16
|
+
name = 'macos-ax';
|
|
17
|
+
client;
|
|
18
|
+
constructor(ctx, config) {
|
|
19
|
+
this.config = config;
|
|
20
|
+
this.client = new NativeHelperClient(ctx, config);
|
|
21
|
+
}
|
|
22
|
+
get helperPath() {
|
|
23
|
+
return this.client.helperPath;
|
|
24
|
+
}
|
|
25
|
+
async resolveApp(selector, signal) {
|
|
26
|
+
return await this.client.invoke({ command: 'resolve-app', selector }, signal);
|
|
27
|
+
}
|
|
28
|
+
async listApps(signal) {
|
|
29
|
+
return await this.client.invoke({ command: 'list-apps' }, signal);
|
|
30
|
+
}
|
|
31
|
+
async observe(app, options, signal) {
|
|
32
|
+
return await this.client.invoke({
|
|
33
|
+
command: 'observe',
|
|
34
|
+
app,
|
|
35
|
+
options,
|
|
36
|
+
}, signal);
|
|
37
|
+
}
|
|
38
|
+
async activateForCursor(app, expectedStateHash, options, signal) {
|
|
39
|
+
return await this.client.invoke({
|
|
40
|
+
command: 'activate-for-cursor',
|
|
41
|
+
app,
|
|
42
|
+
expectedStateHash,
|
|
43
|
+
options,
|
|
44
|
+
actionTimeoutMs: this.config.actionTimeoutMs,
|
|
45
|
+
}, signal);
|
|
46
|
+
}
|
|
47
|
+
async act(request, signal) {
|
|
48
|
+
if (request.action.kind === 'drag') {
|
|
49
|
+
const execution = await this.prepareNativeDrag(request, signal);
|
|
50
|
+
await execution.start();
|
|
51
|
+
return await execution.result;
|
|
52
|
+
}
|
|
53
|
+
return await this.client.invoke({
|
|
54
|
+
command: 'act',
|
|
55
|
+
request: {
|
|
56
|
+
...request,
|
|
57
|
+
actionTimeoutMs: this.config.actionTimeoutMs,
|
|
58
|
+
limits: {
|
|
59
|
+
maxNodes: this.config.maxNodes,
|
|
60
|
+
maxDepth: this.config.maxDepth,
|
|
61
|
+
maxTextBytes: this.config.maxTextBytes,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
}, signal);
|
|
65
|
+
}
|
|
66
|
+
async actDragWithCursor(request, cursor, signal) {
|
|
67
|
+
const execution = await this.prepareNativeDrag(request, signal);
|
|
68
|
+
let started = false;
|
|
69
|
+
let cursorResult;
|
|
70
|
+
try {
|
|
71
|
+
cursorResult = await this.visualizeCursorPhase(cursor, 'during', signal, async () => {
|
|
72
|
+
await execution.start();
|
|
73
|
+
started = true;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if (!started) {
|
|
78
|
+
execution.cancel();
|
|
79
|
+
await execution.result.catch(() => undefined);
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
cursorResult = {
|
|
83
|
+
visible: false,
|
|
84
|
+
reason: `the agent cursor could not track the drag action: ${error instanceof Error ? error.message : String(error)}`,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return { action: await execution.result, cursor: cursorResult };
|
|
88
|
+
}
|
|
89
|
+
async prepareNativeDrag(request, signal) {
|
|
90
|
+
return await this.client.prepareDrag({
|
|
91
|
+
command: 'act',
|
|
92
|
+
request: {
|
|
93
|
+
...request,
|
|
94
|
+
actionTimeoutMs: this.config.actionTimeoutMs,
|
|
95
|
+
limits: {
|
|
96
|
+
maxNodes: this.config.maxNodes,
|
|
97
|
+
maxDepth: this.config.maxDepth,
|
|
98
|
+
maxTextBytes: this.config.maxTextBytes,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
}, signal, this.config.actionTimeoutMs + 2_000);
|
|
102
|
+
}
|
|
103
|
+
async visualizeCursor(action, phase, signal) {
|
|
104
|
+
return await this.visualizeCursorPhase(action, phase, signal);
|
|
105
|
+
}
|
|
106
|
+
async visualizeCursorPhase(action, phase, signal, onMoveWritten) {
|
|
107
|
+
if (this.config.interaction.cursorVisualization !== 'visible')
|
|
108
|
+
return { visible: false, reason: 'the agent cursor is disabled by configuration' };
|
|
109
|
+
// The overlay answers per command; the least visible outcome wins, because
|
|
110
|
+
// a cursor that vanished partway through is a cursor the user cannot follow.
|
|
111
|
+
let outcome = { visible: true };
|
|
112
|
+
const record = (response) => {
|
|
113
|
+
if (!response.visible && outcome.visible)
|
|
114
|
+
outcome = response;
|
|
115
|
+
};
|
|
116
|
+
const autoHideMs = this.config.interaction.cursorAutoHideMs;
|
|
117
|
+
const move = async (point, onWritten) => {
|
|
118
|
+
const command = {
|
|
119
|
+
op: 'move',
|
|
120
|
+
x: point.x,
|
|
121
|
+
y: point.y,
|
|
122
|
+
speedPxPerSecond: this.config.interaction.cursorSpeedPxPerSecond,
|
|
123
|
+
accelerationPxPerSecondSquared: this.config.interaction.cursorAccelerationPxPerSecondSquared,
|
|
124
|
+
// The after phase arms the configured timeout once native input has
|
|
125
|
+
// completed. Hiding during travel or dwell would invalidate press.
|
|
126
|
+
autoHideMs: 0,
|
|
127
|
+
targetPid: action.targetPid,
|
|
128
|
+
targetWindowNumber: action.targetWindowNumber,
|
|
129
|
+
targetWindowFrame: action.targetWindowFrame,
|
|
130
|
+
};
|
|
131
|
+
record(await (onWritten === undefined
|
|
132
|
+
? this.client.cursorCommand(command, signal)
|
|
133
|
+
: this.client.cursorCommand(command, signal, onWritten)));
|
|
134
|
+
};
|
|
135
|
+
if (phase === 'after') {
|
|
136
|
+
// Every action validates the bound target after native input. Only drag
|
|
137
|
+
// needs release semantics; click and scroll use a side-effect-free check.
|
|
138
|
+
record(await this.client.cursorCommand({
|
|
139
|
+
op: action.kind === 'drag' ? 'release' : 'validate',
|
|
140
|
+
autoHideMs,
|
|
141
|
+
targetPid: action.targetPid,
|
|
142
|
+
targetWindowNumber: action.targetWindowNumber,
|
|
143
|
+
targetWindowFrame: action.targetWindowFrame,
|
|
144
|
+
}, signal));
|
|
145
|
+
return outcome;
|
|
146
|
+
}
|
|
147
|
+
if (phase === 'during') {
|
|
148
|
+
if (action.kind !== 'drag')
|
|
149
|
+
return { visible: false, reason: 'only drag has a during-action cursor phase' };
|
|
150
|
+
await move(action.to, onMoveWritten);
|
|
151
|
+
return outcome;
|
|
152
|
+
}
|
|
153
|
+
const start = action.kind === 'drag' ? action.from : action.to;
|
|
154
|
+
if (start === undefined)
|
|
155
|
+
return { visible: false, reason: 'this action has no cursor position to show' };
|
|
156
|
+
// A move response means the native overlay reached its destination. Keep
|
|
157
|
+
// the configurable dwell after arrival and before the visual/native press.
|
|
158
|
+
await move(start);
|
|
159
|
+
if (!outcome.visible || action.kind === 'scroll')
|
|
160
|
+
return outcome;
|
|
161
|
+
if (this.config.interaction.cursorClickDelayMs > 0) {
|
|
162
|
+
await delay(this.config.interaction.cursorClickDelayMs, undefined, { signal });
|
|
163
|
+
}
|
|
164
|
+
record(await this.client.cursorCommand({
|
|
165
|
+
op: 'press',
|
|
166
|
+
autoHideMs: 0,
|
|
167
|
+
targetPid: action.targetPid,
|
|
168
|
+
targetWindowNumber: action.targetWindowNumber,
|
|
169
|
+
targetWindowFrame: action.targetWindowFrame,
|
|
170
|
+
sustainedPress: action.kind === 'drag',
|
|
171
|
+
}, signal));
|
|
172
|
+
return outcome;
|
|
173
|
+
}
|
|
174
|
+
async dispose() {
|
|
175
|
+
await this.client.dispose();
|
|
176
|
+
}
|
|
177
|
+
async health(signal) {
|
|
178
|
+
const prepared = await this.client.prepare(signal);
|
|
179
|
+
const health = await this.client.invoke({ command: 'health' }, signal);
|
|
180
|
+
return {
|
|
181
|
+
helperVersion: health.helperVersion || prepared.version,
|
|
182
|
+
helperSha256: prepared.sha256,
|
|
183
|
+
accessibility: health.accessibility,
|
|
184
|
+
screenRecording: health.screenRecording,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
async openSettings(kind, signal) {
|
|
188
|
+
await this.client.invoke({ command: 'open-settings', kind }, signal);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/** Cordis Service provider loaded by the Bundle before the model-facing consumer. */
|
|
192
|
+
export class MacOSComputerUseProvider extends ComputerUseService {
|
|
193
|
+
static inject = ['subprocess', 'approval', 'settings', 'sessions', 'agents'];
|
|
194
|
+
static Config = Config;
|
|
195
|
+
constructor(ctx, config = {}) {
|
|
196
|
+
const legacySettings = ctx.settings;
|
|
197
|
+
const settings = typeof legacySettings.register === 'function'
|
|
198
|
+
? legacySettings.register(COMPUTER_USE_SETTINGS_NAMESPACE, Config, {
|
|
199
|
+
base: config,
|
|
200
|
+
applies: 'live',
|
|
201
|
+
validate: (value) => { resolveConfig(value); },
|
|
202
|
+
})
|
|
203
|
+
: undefined;
|
|
204
|
+
const resolved = resolveConfig(settings?.get() ?? readComputerUseConfig(config));
|
|
205
|
+
super(ctx, createBackend(ctx, resolved), resolved);
|
|
206
|
+
if (process.platform !== 'darwin') {
|
|
207
|
+
ctx.logger.warn('dsh-computer-use: supports macOS only; Computer Use Tools are disabled on %s', process.platform);
|
|
208
|
+
}
|
|
209
|
+
const reconfigure = async (next) => {
|
|
210
|
+
const candidate = resolveConfig(next);
|
|
211
|
+
const backend = createBackend(ctx, candidate);
|
|
212
|
+
try {
|
|
213
|
+
await this.reconfigure(backend, candidate);
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
await backend.dispose();
|
|
217
|
+
throw error;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
if (settings) {
|
|
221
|
+
ctx.effect(() => settings.watch(reconfigure), 'dsh-computer-use: Settings watch');
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
// DSH 0.1.7 projects Settings from Config and commits volatile fields in
|
|
225
|
+
// place. The Loader emits this event after its references have changed.
|
|
226
|
+
ctx.effect(() => {
|
|
227
|
+
const onVolatileUpdate = ctx.on;
|
|
228
|
+
return onVolatileUpdate.call(ctx, 'loader/volatile-update', () => {
|
|
229
|
+
void reconfigure(readComputerUseConfig(config)).catch(error => {
|
|
230
|
+
ctx.logger.warn('dsh-computer-use: live config update failed: %s', error);
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}, 'dsh-computer-use: Loader volatile update');
|
|
234
|
+
}
|
|
235
|
+
ctx.effect(() => ctx.on('agent/disposed', ({ agent }) => { this.releaseAgent(agent); }), 'dsh-computer-use: Agent cleanup');
|
|
236
|
+
}
|
|
237
|
+
/** Verify helper integrity and permissions before the service is injectable. */
|
|
238
|
+
async [Service.init]() {
|
|
239
|
+
await this.initialize();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
export default MacOSComputerUseProvider;
|
|
243
|
+
//# sourceMappingURL=macos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macos.js","sourceRoot":"","sources":["../../src/providers/macos.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAA;AAiB3D,OAAO,EACL,MAAM,EACN,+BAA+B,EAC/B,qBAAqB,EACrB,aAAa,GAGd,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAe7D,SAAS,aAAa,CAAC,GAAY,EAAE,MAAiC;IACpE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAClC,CAAC,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC;QAC/B,CAAC,CAAC,IAAI,0BAA0B,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AACtD,CAAC;AAED,oCAAoC;AACpC,MAAM,OAAO,YAAY;IAIoB;IAHlC,IAAI,GAAG,UAAmB,CAAA;IAC1B,MAAM,CAAoB;IAEnC,YAAY,GAAY,EAAmB,MAAiC;QAAjC,WAAM,GAAN,MAAM,CAA2B;QAC1E,IAAI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