@toddzheng024/dscode-desktop 0.0.0-stage → 0.7.33
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 +641 -0
- package/docs/account-login.md +44 -0
- package/docs/auto-review.md +128 -0
- package/docs/browser-use.md +783 -0
- package/docs/computer-use.md +81 -0
- package/docs/custom-providers.md +88 -0
- package/docs/demo.md +76 -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 +190 -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 +30 -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 +98 -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 +146 -0
- package/plugins/grok/index.mjs +122 -0
- package/plugins/grok/models.mjs +129 -0
- package/plugins/grok/status.mjs +28 -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 +99 -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 +120 -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 +119 -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 +123 -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 +68 -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 +96 -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 +271 -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 +148 -0
- package/plugins/tui-tools/hook-sources.mjs +113 -0
- package/plugins/tui-tools/hooks.mjs +23 -0
- package/plugins/tui-tools/index.mjs +268 -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,726 @@
|
|
|
1
|
+
/** Managed invocation and integrity checks for the fixed-command Swift helper. */
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { access, chmod, lstat, readFile, realpath, stat } from 'node:fs/promises';
|
|
4
|
+
import { constants } from 'node:fs';
|
|
5
|
+
import { dirname, resolve } from 'node:path';
|
|
6
|
+
import { createInterface } from 'node:readline';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { ComputerUseError, computerUseError } from "../errors.js";
|
|
9
|
+
/**
|
|
10
|
+
* The response includes synchronous WindowServer validation, which can exceed
|
|
11
|
+
* a scheduler tick under load even though the protocol itself is local.
|
|
12
|
+
*/
|
|
13
|
+
// Keep the bound finite. A timed-out generation is discarded before the next
|
|
14
|
+
// serialized command, so a late frame cannot satisfy a later command.
|
|
15
|
+
const CURSOR_RESPONSE_TIMEOUT_MS = 1_000;
|
|
16
|
+
const CURSOR_MOTION_RESPONSE_TIMEOUT_MS = 4_000;
|
|
17
|
+
const CURSOR_READY_TIMEOUT_MS = 2_000;
|
|
18
|
+
const CURSOR_PROTOCOL_MAX_BYTES = 64 * 1024;
|
|
19
|
+
function cursorResponseTimeout(command) {
|
|
20
|
+
if (command.op !== 'move')
|
|
21
|
+
return CURSOR_RESPONSE_TIMEOUT_MS;
|
|
22
|
+
if (typeof command.speedPxPerSecond === 'number')
|
|
23
|
+
return CURSOR_MOTION_RESPONSE_TIMEOUT_MS;
|
|
24
|
+
if (typeof command.durationMs === 'number' && Number.isFinite(command.durationMs)) {
|
|
25
|
+
return Math.max(CURSOR_RESPONSE_TIMEOUT_MS, Math.trunc(command.durationMs) + 2 * CURSOR_RESPONSE_TIMEOUT_MS);
|
|
26
|
+
}
|
|
27
|
+
return CURSOR_RESPONSE_TIMEOUT_MS;
|
|
28
|
+
}
|
|
29
|
+
function collected(reader) {
|
|
30
|
+
if (reader === undefined)
|
|
31
|
+
return '';
|
|
32
|
+
const value = reader.readFrom(0);
|
|
33
|
+
if (value.lossy)
|
|
34
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native helper output exceeded its protocol limit');
|
|
35
|
+
return value.text;
|
|
36
|
+
}
|
|
37
|
+
async function sha256(path) {
|
|
38
|
+
return createHash('sha256').update(await readFile(path)).digest('hex');
|
|
39
|
+
}
|
|
40
|
+
function nativeRoot() {
|
|
41
|
+
return fileURLToPath(new URL('../../native/macos/', import.meta.url));
|
|
42
|
+
}
|
|
43
|
+
function cursorErrorMessage(error) {
|
|
44
|
+
if (typeof error === 'string' && error.length > 0)
|
|
45
|
+
return error.slice(0, 1000);
|
|
46
|
+
if (typeof error !== 'object' || error === null)
|
|
47
|
+
return undefined;
|
|
48
|
+
const message = error.message;
|
|
49
|
+
return typeof message === 'string' && message.length > 0 ? message.slice(0, 1000) : undefined;
|
|
50
|
+
}
|
|
51
|
+
function normalizeCursorResponse(command, response) {
|
|
52
|
+
if (response.ok === false) {
|
|
53
|
+
const detail = cursorErrorMessage(response.error);
|
|
54
|
+
return {
|
|
55
|
+
result: {
|
|
56
|
+
visible: false,
|
|
57
|
+
reason: detail === undefined
|
|
58
|
+
? 'the native cursor overlay rejected its command'
|
|
59
|
+
: `the native cursor overlay rejected its command: ${detail}`,
|
|
60
|
+
},
|
|
61
|
+
discardGeneration: false,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (response.ok !== true) {
|
|
65
|
+
return {
|
|
66
|
+
result: { visible: false, reason: 'the native cursor overlay returned a malformed response' },
|
|
67
|
+
discardGeneration: true,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (typeof command.op !== 'string' || response.op !== command.op) {
|
|
71
|
+
return {
|
|
72
|
+
result: { visible: false, reason: 'the native cursor overlay response did not match its command' },
|
|
73
|
+
discardGeneration: true,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (response.visible === true)
|
|
77
|
+
return { result: { visible: true }, discardGeneration: false };
|
|
78
|
+
if (response.visible === false) {
|
|
79
|
+
const reasonCode = response.reasonCode === 'target-not-frontmost' || response.reasonCode === 'target-invalid'
|
|
80
|
+
? response.reasonCode
|
|
81
|
+
: undefined;
|
|
82
|
+
return {
|
|
83
|
+
result: {
|
|
84
|
+
visible: false,
|
|
85
|
+
...(reasonCode === undefined ? {} : { reasonCode }),
|
|
86
|
+
...(typeof response.reason === 'string' && response.reason.length > 0
|
|
87
|
+
? { reason: response.reason.slice(0, 1000) }
|
|
88
|
+
: { reason: 'the native cursor overlay reported that the cursor is not visible' }),
|
|
89
|
+
},
|
|
90
|
+
discardGeneration: false,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
result: { visible: false, reason: 'the native cursor overlay did not report boolean visibility' },
|
|
95
|
+
discardGeneration: true,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Invokes only the packaged JSON protocol through `ctx.subprocess`; no source or shell reaches the helper. */
|
|
99
|
+
export class NativeHelperClient {
|
|
100
|
+
ctx;
|
|
101
|
+
config;
|
|
102
|
+
managedRoot;
|
|
103
|
+
prepared;
|
|
104
|
+
cursor;
|
|
105
|
+
cursorStart;
|
|
106
|
+
cursorCommandTail = Promise.resolve();
|
|
107
|
+
disposed = false;
|
|
108
|
+
constructor(ctx, config, managedRoot = nativeRoot()) {
|
|
109
|
+
this.ctx = ctx;
|
|
110
|
+
this.config = config;
|
|
111
|
+
this.managedRoot = managedRoot;
|
|
112
|
+
}
|
|
113
|
+
/** Absolute executable path selected by explicit override or the packaged managed binary. */
|
|
114
|
+
get helperPath() {
|
|
115
|
+
return this.prepared?.path ?? this.config.helper.path ?? resolve(this.managedRoot, 'bin', 'dsh-computer-use-helper');
|
|
116
|
+
}
|
|
117
|
+
/** Verify platform, file type, packaged hash, and executable mode before use. */
|
|
118
|
+
async prepare(signal) {
|
|
119
|
+
if (process.platform !== 'darwin') {
|
|
120
|
+
throw new ComputerUseError('COMPUTER_UNSUPPORTED_PLATFORM', `macOS provider cannot run on ${process.platform}`);
|
|
121
|
+
}
|
|
122
|
+
const managed = this.config.helper.path === undefined;
|
|
123
|
+
let path = this.helperPath;
|
|
124
|
+
let selectedInfo;
|
|
125
|
+
try {
|
|
126
|
+
selectedInfo = await lstat(path);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
const missing = error.code === 'ENOENT';
|
|
130
|
+
if (!managed || !missing || !this.config.helper.allowSourceBuild) {
|
|
131
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `native helper is missing or unreadable: ${path}`, { cause: error });
|
|
132
|
+
}
|
|
133
|
+
await this.buildManaged(signal);
|
|
134
|
+
selectedInfo = await lstat(path);
|
|
135
|
+
}
|
|
136
|
+
if (!selectedInfo.isFile() || selectedInfo.isSymbolicLink()) {
|
|
137
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native helper must be a regular non-symbolic-link executable');
|
|
138
|
+
}
|
|
139
|
+
path = await realpath(path);
|
|
140
|
+
const digest = await sha256(path);
|
|
141
|
+
let version = 'external';
|
|
142
|
+
if (managed) {
|
|
143
|
+
const manifestPath = resolve(this.managedRoot, 'manifest.json');
|
|
144
|
+
const manifest = JSON.parse(await readFile(manifestPath, 'utf8'));
|
|
145
|
+
if (manifest.schemaVersion !== 1 || manifest.binary.path !== 'bin/dsh-computer-use-helper') {
|
|
146
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native helper manifest is malformed');
|
|
147
|
+
}
|
|
148
|
+
if (manifest.binary.sha256 !== digest) {
|
|
149
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native helper hash does not match native/macos/manifest.json');
|
|
150
|
+
}
|
|
151
|
+
version = manifest.helperVersion;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
await access(path, constants.X_OK);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
if (!managed) {
|
|
158
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `external native helper is not executable: ${path}`, { cause: error });
|
|
159
|
+
}
|
|
160
|
+
try {
|
|
161
|
+
// npm-compatible tarballs normalize non-bin payloads to 0644. Restore
|
|
162
|
+
// only the owner's execute bit after the committed hash is verified.
|
|
163
|
+
await chmod(path, (selectedInfo.mode & 0o777) | 0o100);
|
|
164
|
+
await access(path, constants.X_OK);
|
|
165
|
+
}
|
|
166
|
+
catch (chmodError) {
|
|
167
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `managed native helper cannot be marked executable: ${path}`, { cause: chmodError });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
this.prepared = { path, version, sha256: digest };
|
|
171
|
+
return this.prepared;
|
|
172
|
+
}
|
|
173
|
+
/** Invoke one fixed helper command and parse its bounded JSON envelope. */
|
|
174
|
+
async invoke(request, signal) {
|
|
175
|
+
const prepared = this.prepared ?? await this.prepare(signal);
|
|
176
|
+
const timeout = AbortSignal.timeout(this.config.actionTimeoutMs);
|
|
177
|
+
const combined = AbortSignal.any([signal, timeout]);
|
|
178
|
+
const handle = this.ctx.subprocess.spawn({
|
|
179
|
+
argv: [prepared.path],
|
|
180
|
+
cwd: dirname(prepared.path),
|
|
181
|
+
stdio: {
|
|
182
|
+
stdin: { data: `${JSON.stringify({ protocolVersion: 1, ...request })}\n` },
|
|
183
|
+
stdout: { maxBytes: 4 * 1024 * 1024 },
|
|
184
|
+
stderr: { maxBytes: 64 * 1024 },
|
|
185
|
+
},
|
|
186
|
+
graceMs: 1000,
|
|
187
|
+
signal: combined,
|
|
188
|
+
env: {
|
|
189
|
+
LANG: process.env.LANG ?? 'en_US.UTF-8',
|
|
190
|
+
LC_ALL: process.env.LC_ALL ?? 'en_US.UTF-8',
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
let outcome;
|
|
194
|
+
try {
|
|
195
|
+
outcome = await handle.done;
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
throw computerUseError(error, 'native helper failed to start');
|
|
199
|
+
}
|
|
200
|
+
if (combined.aborted) {
|
|
201
|
+
if (signal.aborted)
|
|
202
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native helper call was cancelled');
|
|
203
|
+
throw new ComputerUseError('COMPUTER_TIMEOUT', `native helper exceeded ${this.config.actionTimeoutMs} milliseconds`);
|
|
204
|
+
}
|
|
205
|
+
const stdout = collected(handle.collected.stdout);
|
|
206
|
+
const stderr = collected(handle.collected.stderr);
|
|
207
|
+
if (outcome.exitCode !== 0 && stdout.trim().length === 0) {
|
|
208
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `native helper exited ${String(outcome.exitCode)}${stderr.trim().length === 0 ? '' : `: ${stderr.trim().slice(0, 1000)}`}`);
|
|
209
|
+
}
|
|
210
|
+
let envelope;
|
|
211
|
+
try {
|
|
212
|
+
envelope = JSON.parse(stdout);
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native helper returned invalid JSON', { cause: error });
|
|
216
|
+
}
|
|
217
|
+
if (envelope.ok !== true)
|
|
218
|
+
throw new ComputerUseError(envelope.error.code, envelope.error.message.slice(0, 1000));
|
|
219
|
+
return envelope.value;
|
|
220
|
+
}
|
|
221
|
+
/** Prepare and validate a drag, then wait for an explicit pre-mouse-down start barrier. */
|
|
222
|
+
async prepareDrag(request, signal, readinessTimeoutMs) {
|
|
223
|
+
const prepared = this.prepared ?? await this.prepare(signal);
|
|
224
|
+
if (signal.aborted)
|
|
225
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native drag preparation was cancelled');
|
|
226
|
+
const processAbort = new AbortController();
|
|
227
|
+
const handle = this.ctx.subprocess.spawn({
|
|
228
|
+
argv: [prepared.path, '--drag-action'],
|
|
229
|
+
cwd: dirname(prepared.path),
|
|
230
|
+
stdio: {
|
|
231
|
+
stdin: 'pipe',
|
|
232
|
+
stdout: 'pipe',
|
|
233
|
+
stderr: { maxBytes: 64 * 1024 },
|
|
234
|
+
},
|
|
235
|
+
graceMs: 1000,
|
|
236
|
+
signal: processAbort.signal,
|
|
237
|
+
env: {
|
|
238
|
+
LANG: process.env.LANG ?? 'en_US.UTF-8',
|
|
239
|
+
LC_ALL: process.env.LC_ALL ?? 'en_US.UTF-8',
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
if (handle.stdin === undefined || handle.stdout === undefined) {
|
|
243
|
+
handle.terminate();
|
|
244
|
+
await handle.waitForExit();
|
|
245
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native drag barrier protocol pipes are unavailable');
|
|
246
|
+
}
|
|
247
|
+
const stdin = handle.stdin;
|
|
248
|
+
stdin.on('error', () => {
|
|
249
|
+
// Write callbacks and process completion own protocol error reporting.
|
|
250
|
+
});
|
|
251
|
+
const lines = createInterface({ input: handle.stdout, crlfDelay: Infinity });
|
|
252
|
+
const iterator = lines[Symbol.asyncIterator]();
|
|
253
|
+
const readLine = async (readSignal) => await new Promise((resolveLine, rejectLine) => {
|
|
254
|
+
const onAbort = () => { rejectLine(readSignal.reason); };
|
|
255
|
+
if (readSignal.aborted) {
|
|
256
|
+
onAbort();
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
readSignal.addEventListener('abort', onAbort, { once: true });
|
|
260
|
+
void iterator.next().then(next => {
|
|
261
|
+
readSignal.removeEventListener('abort', onAbort);
|
|
262
|
+
if (next.done === true)
|
|
263
|
+
rejectLine(new Error('native drag helper closed before replying'));
|
|
264
|
+
else if (Buffer.byteLength(next.value) > 4 * 1024 * 1024)
|
|
265
|
+
rejectLine(new Error('native drag helper response exceeded its protocol limit'));
|
|
266
|
+
else
|
|
267
|
+
resolveLine(next.value);
|
|
268
|
+
}, error => {
|
|
269
|
+
readSignal.removeEventListener('abort', onAbort);
|
|
270
|
+
rejectLine(error);
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
const writeLine = async (line) => await new Promise((resolveWrite, rejectWrite) => {
|
|
274
|
+
stdin.write(`${line}\n`, error => {
|
|
275
|
+
if (error === undefined || error === null)
|
|
276
|
+
resolveWrite();
|
|
277
|
+
else
|
|
278
|
+
rejectWrite(error);
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
let started = false;
|
|
282
|
+
const onCallerAbort = () => {
|
|
283
|
+
if (!started)
|
|
284
|
+
processAbort.abort();
|
|
285
|
+
};
|
|
286
|
+
signal.addEventListener('abort', onCallerAbort);
|
|
287
|
+
const readinessTimeout = AbortSignal.timeout(readinessTimeoutMs);
|
|
288
|
+
try {
|
|
289
|
+
await writeLine(JSON.stringify({ protocolVersion: 1, ...request }));
|
|
290
|
+
const readySignal = AbortSignal.any([signal, readinessTimeout, processAbort.signal]);
|
|
291
|
+
const ready = JSON.parse(await readLine(readySignal));
|
|
292
|
+
if (ready.ok !== true || ready.event !== 'drag-ready') {
|
|
293
|
+
throw new Error('native drag helper returned an invalid ready frame');
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
catch (error) {
|
|
297
|
+
processAbort.abort();
|
|
298
|
+
await handle.done.catch(() => undefined);
|
|
299
|
+
signal.removeEventListener('abort', onCallerAbort);
|
|
300
|
+
lines.close();
|
|
301
|
+
if (signal.aborted)
|
|
302
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native drag preparation was cancelled', { cause: error });
|
|
303
|
+
if (readinessTimeout.aborted) {
|
|
304
|
+
throw new ComputerUseError('COMPUTER_TIMEOUT', `native drag preparation exceeded ${readinessTimeoutMs} milliseconds`, { cause: error });
|
|
305
|
+
}
|
|
306
|
+
throw computerUseError(error, 'native drag preparation failed');
|
|
307
|
+
}
|
|
308
|
+
const result = (async () => {
|
|
309
|
+
try {
|
|
310
|
+
const raw = await readLine(processAbort.signal);
|
|
311
|
+
const outcome = await handle.done;
|
|
312
|
+
let envelope;
|
|
313
|
+
try {
|
|
314
|
+
envelope = JSON.parse(raw);
|
|
315
|
+
}
|
|
316
|
+
catch (error) {
|
|
317
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native drag helper returned invalid JSON', { cause: error });
|
|
318
|
+
}
|
|
319
|
+
if (envelope.ok !== true)
|
|
320
|
+
throw new ComputerUseError(envelope.error.code, envelope.error.message.slice(0, 1000));
|
|
321
|
+
if (outcome.exitCode !== 0) {
|
|
322
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `native drag helper exited ${String(outcome.exitCode)}`);
|
|
323
|
+
}
|
|
324
|
+
if (signal.aborted)
|
|
325
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native drag action was cancelled after safe mouse release');
|
|
326
|
+
return envelope.value;
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
if (error instanceof ComputerUseError && error.code === 'COMPUTER_CANCELLED')
|
|
330
|
+
throw error;
|
|
331
|
+
if (signal.aborted) {
|
|
332
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native drag action was cancelled', { cause: error });
|
|
333
|
+
}
|
|
334
|
+
throw computerUseError(error, 'native drag action failed');
|
|
335
|
+
}
|
|
336
|
+
finally {
|
|
337
|
+
signal.removeEventListener('abort', onCallerAbort);
|
|
338
|
+
lines.close();
|
|
339
|
+
}
|
|
340
|
+
})();
|
|
341
|
+
void result.catch(() => undefined);
|
|
342
|
+
return {
|
|
343
|
+
result,
|
|
344
|
+
start: async () => {
|
|
345
|
+
if (started)
|
|
346
|
+
return;
|
|
347
|
+
if (signal.aborted) {
|
|
348
|
+
processAbort.abort();
|
|
349
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native drag action was cancelled before mouse-down');
|
|
350
|
+
}
|
|
351
|
+
started = true;
|
|
352
|
+
signal.removeEventListener('abort', onCallerAbort);
|
|
353
|
+
// Once native mouse-down is possible, caller cancellation no longer
|
|
354
|
+
// owns this process. The bounded native motion must reach mouse-up.
|
|
355
|
+
try {
|
|
356
|
+
await writeLine('START');
|
|
357
|
+
}
|
|
358
|
+
catch (error) {
|
|
359
|
+
processAbort.abort();
|
|
360
|
+
throw computerUseError(error, 'native drag start barrier failed');
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
cancel: () => {
|
|
364
|
+
if (!started)
|
|
365
|
+
processAbort.abort();
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
/** Send one serialized command to the persistent, click-through Agent cursor overlay. */
|
|
370
|
+
cursorCommand(command, signal, onWritten) {
|
|
371
|
+
const run = this.cursorCommandTail.then(async () => {
|
|
372
|
+
if (signal.aborted)
|
|
373
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native cursor overlay command was cancelled');
|
|
374
|
+
if (this.disposed)
|
|
375
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay client is disposed');
|
|
376
|
+
return await this.executeCursorCommand(command, signal, onWritten);
|
|
377
|
+
});
|
|
378
|
+
this.cursorCommandTail = run.then(() => undefined, () => undefined);
|
|
379
|
+
return new Promise((resolveCommand, rejectCommand) => {
|
|
380
|
+
const onAbort = () => {
|
|
381
|
+
rejectCommand(new ComputerUseError('COMPUTER_CANCELLED', 'native cursor overlay command was cancelled'));
|
|
382
|
+
};
|
|
383
|
+
if (signal.aborted)
|
|
384
|
+
onAbort();
|
|
385
|
+
else
|
|
386
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
387
|
+
void run.then(resolveCommand, rejectCommand).finally(() => {
|
|
388
|
+
signal.removeEventListener('abort', onAbort);
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
async executeCursorCommand(command, signal, onWritten) {
|
|
393
|
+
const prepared = this.prepared ?? await this.prepare(signal);
|
|
394
|
+
if (this.disposed)
|
|
395
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay client is disposed');
|
|
396
|
+
const cursor = await this.getCursor(prepared, signal);
|
|
397
|
+
signal.throwIfAborted();
|
|
398
|
+
if (this.disposed) {
|
|
399
|
+
this.discardCursor(cursor);
|
|
400
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay client is disposed');
|
|
401
|
+
}
|
|
402
|
+
try {
|
|
403
|
+
await new Promise((resolveWrite, rejectWrite) => {
|
|
404
|
+
cursor.stdin.write(`${JSON.stringify(command)}\n`, error => {
|
|
405
|
+
if (error === undefined || error === null)
|
|
406
|
+
resolveWrite();
|
|
407
|
+
else
|
|
408
|
+
rejectWrite(error);
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
await onWritten?.();
|
|
412
|
+
const frame = await cursor.nextResponse(cursorResponseTimeout(command), signal);
|
|
413
|
+
if (frame.kind === 'failure') {
|
|
414
|
+
this.discardCursor(cursor);
|
|
415
|
+
return { visible: false, reason: frame.reason };
|
|
416
|
+
}
|
|
417
|
+
const normalized = normalizeCursorResponse(command, frame.response);
|
|
418
|
+
if (normalized.discardGeneration)
|
|
419
|
+
this.discardCursor(cursor);
|
|
420
|
+
return normalized.result;
|
|
421
|
+
}
|
|
422
|
+
catch (error) {
|
|
423
|
+
this.discardCursor(cursor);
|
|
424
|
+
if (signal.aborted) {
|
|
425
|
+
throw new ComputerUseError('COMPUTER_CANCELLED', 'native cursor overlay command was cancelled', { cause: error });
|
|
426
|
+
}
|
|
427
|
+
throw computerUseError(error, 'native cursor overlay command failed');
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
discardCursor(cursor) {
|
|
431
|
+
if (this.cursor === cursor)
|
|
432
|
+
this.cursor = undefined;
|
|
433
|
+
cursor.terminate();
|
|
434
|
+
}
|
|
435
|
+
/** Stop the cursor process before a provider generation is replaced or disposed. */
|
|
436
|
+
async dispose() {
|
|
437
|
+
this.disposed = true;
|
|
438
|
+
const cursor = this.cursor ?? await this.cursorStart?.promise.catch(() => undefined);
|
|
439
|
+
this.cursorStart = undefined;
|
|
440
|
+
this.cursor = undefined;
|
|
441
|
+
if (cursor === undefined) {
|
|
442
|
+
await this.cursorCommandTail.catch(() => undefined);
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
try {
|
|
446
|
+
cursor.stdin.end(`${JSON.stringify({ op: 'stop' })}\n`);
|
|
447
|
+
}
|
|
448
|
+
catch {
|
|
449
|
+
// A child that already closed its pipe is handled by the tree-exit wait below.
|
|
450
|
+
}
|
|
451
|
+
if (!await cursor.waitForExit(AbortSignal.timeout(1_000))) {
|
|
452
|
+
cursor.terminate();
|
|
453
|
+
await cursor.waitForExit();
|
|
454
|
+
}
|
|
455
|
+
await this.cursorCommandTail.catch(() => undefined);
|
|
456
|
+
}
|
|
457
|
+
/** Prepared integrity facts used by provider health. */
|
|
458
|
+
preparedInfo() {
|
|
459
|
+
if (this.prepared === undefined)
|
|
460
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native helper is not prepared');
|
|
461
|
+
return this.prepared;
|
|
462
|
+
}
|
|
463
|
+
async buildManaged(signal) {
|
|
464
|
+
const script = fileURLToPath(new URL('../../scripts/build-native.mjs', import.meta.url));
|
|
465
|
+
const handle = this.ctx.subprocess.spawn({
|
|
466
|
+
argv: [process.execPath, script, '--helper-only'],
|
|
467
|
+
cwd: dirname(script),
|
|
468
|
+
stdio: {
|
|
469
|
+
stdin: 'ignore',
|
|
470
|
+
stdout: { maxBytes: 256 * 1024 },
|
|
471
|
+
stderr: { maxBytes: 256 * 1024 },
|
|
472
|
+
},
|
|
473
|
+
graceMs: 1000,
|
|
474
|
+
signal,
|
|
475
|
+
env: {},
|
|
476
|
+
});
|
|
477
|
+
const outcome = await handle.done;
|
|
478
|
+
if (outcome.exitCode !== 0) {
|
|
479
|
+
const stderr = collected(handle.collected.stderr);
|
|
480
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `explicit native source build failed: ${stderr.slice(0, 1000)}`);
|
|
481
|
+
}
|
|
482
|
+
const info = await stat(this.helperPath).catch(() => undefined);
|
|
483
|
+
if (info?.isFile() !== true)
|
|
484
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native source build completed without producing the helper');
|
|
485
|
+
}
|
|
486
|
+
async getCursor(prepared, signal) {
|
|
487
|
+
signal.throwIfAborted();
|
|
488
|
+
if (this.disposed)
|
|
489
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay client is disposed');
|
|
490
|
+
if (this.cursor !== undefined)
|
|
491
|
+
return this.cursor;
|
|
492
|
+
if (this.cursorStart === undefined) {
|
|
493
|
+
if (this.disposed)
|
|
494
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay client is disposed');
|
|
495
|
+
const start = { promise: Promise.resolve(undefined) };
|
|
496
|
+
start.promise = this.spawnCursor(prepared).then(cursor => {
|
|
497
|
+
this.cursor = cursor;
|
|
498
|
+
void cursor.done.catch(() => undefined).finally(() => {
|
|
499
|
+
if (this.cursor === cursor)
|
|
500
|
+
this.cursor = undefined;
|
|
501
|
+
});
|
|
502
|
+
return cursor;
|
|
503
|
+
}).finally(() => {
|
|
504
|
+
if (this.cursorStart === start)
|
|
505
|
+
this.cursorStart = undefined;
|
|
506
|
+
});
|
|
507
|
+
this.cursorStart = start;
|
|
508
|
+
}
|
|
509
|
+
const cursor = await this.cursorStart.promise;
|
|
510
|
+
signal.throwIfAborted();
|
|
511
|
+
if (this.disposed) {
|
|
512
|
+
this.discardCursor(cursor);
|
|
513
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay client is disposed');
|
|
514
|
+
}
|
|
515
|
+
return cursor;
|
|
516
|
+
}
|
|
517
|
+
async spawnCursor(prepared) {
|
|
518
|
+
const cursorSignal = new AbortController();
|
|
519
|
+
const handle = this.ctx.subprocess.spawn({
|
|
520
|
+
argv: [prepared.path, '--cursor-overlay'],
|
|
521
|
+
cwd: dirname(prepared.path),
|
|
522
|
+
stdio: {
|
|
523
|
+
stdin: 'pipe',
|
|
524
|
+
stdout: 'pipe',
|
|
525
|
+
stderr: { maxBytes: 64 * 1024 },
|
|
526
|
+
},
|
|
527
|
+
graceMs: 1000,
|
|
528
|
+
signal: cursorSignal.signal,
|
|
529
|
+
env: {
|
|
530
|
+
LANG: process.env.LANG ?? 'en_US.UTF-8',
|
|
531
|
+
LC_ALL: process.env.LC_ALL ?? 'en_US.UTF-8',
|
|
532
|
+
},
|
|
533
|
+
});
|
|
534
|
+
if (handle.stdin === undefined || handle.stdout === undefined) {
|
|
535
|
+
handle.terminate();
|
|
536
|
+
await handle.waitForExit();
|
|
537
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', 'native cursor overlay protocol pipes are unavailable');
|
|
538
|
+
}
|
|
539
|
+
handle.stdin.on('error', () => {
|
|
540
|
+
// Process outcome and the next command own recovery from a closed protocol pipe.
|
|
541
|
+
});
|
|
542
|
+
try {
|
|
543
|
+
await this.waitForCursorReady(handle);
|
|
544
|
+
}
|
|
545
|
+
catch (error) {
|
|
546
|
+
handle.terminate();
|
|
547
|
+
await handle.waitForExit();
|
|
548
|
+
const stderr = collected(handle.collected.stderr).trim();
|
|
549
|
+
throw new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `native cursor overlay failed to become ready${stderr.length === 0 ? '' : `: ${stderr.slice(0, 1000)}`}`, { cause: error });
|
|
550
|
+
}
|
|
551
|
+
// Commands are serialized by the client and the overlay answers one line
|
|
552
|
+
// per command. A protocol failure invalidates this entire process
|
|
553
|
+
// generation; its buffered or late frames can never reach a replacement.
|
|
554
|
+
const pending = [];
|
|
555
|
+
const buffered = [];
|
|
556
|
+
const dispatch = (frame) => {
|
|
557
|
+
const waiter = pending.shift();
|
|
558
|
+
if (waiter === undefined)
|
|
559
|
+
buffered.push(frame);
|
|
560
|
+
else
|
|
561
|
+
waiter(frame);
|
|
562
|
+
};
|
|
563
|
+
let residue = '';
|
|
564
|
+
handle.stdout.setEncoding('utf8').on('data', (chunk) => {
|
|
565
|
+
residue += chunk;
|
|
566
|
+
if (Buffer.byteLength(residue) > CURSOR_PROTOCOL_MAX_BYTES && !residue.includes('\n')) {
|
|
567
|
+
residue = '';
|
|
568
|
+
dispatch({ kind: 'failure', reason: 'the native cursor overlay response exceeded its protocol limit' });
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
while (true) {
|
|
572
|
+
const newline = residue.indexOf('\n');
|
|
573
|
+
if (newline < 0)
|
|
574
|
+
break;
|
|
575
|
+
const line = residue.slice(0, newline).trim();
|
|
576
|
+
residue = residue.slice(newline + 1);
|
|
577
|
+
if (line.length === 0)
|
|
578
|
+
continue;
|
|
579
|
+
if (Buffer.byteLength(line) > CURSOR_PROTOCOL_MAX_BYTES) {
|
|
580
|
+
dispatch({ kind: 'failure', reason: 'the native cursor overlay response exceeded its protocol limit' });
|
|
581
|
+
continue;
|
|
582
|
+
}
|
|
583
|
+
let parsed;
|
|
584
|
+
try {
|
|
585
|
+
parsed = JSON.parse(line);
|
|
586
|
+
}
|
|
587
|
+
catch {
|
|
588
|
+
dispatch({ kind: 'failure', reason: 'the native cursor overlay returned invalid JSON' });
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
592
|
+
dispatch({ kind: 'failure', reason: 'the native cursor overlay returned a malformed response' });
|
|
593
|
+
continue;
|
|
594
|
+
}
|
|
595
|
+
dispatch({ kind: 'response', response: parsed });
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
handle.stdout.once('end', () => {
|
|
599
|
+
dispatch({ kind: 'failure', reason: 'the native cursor overlay closed before replying' });
|
|
600
|
+
});
|
|
601
|
+
handle.stdout.once('error', error => {
|
|
602
|
+
dispatch({ kind: 'failure', reason: `the native cursor overlay response stream failed: ${error.message}` });
|
|
603
|
+
});
|
|
604
|
+
return {
|
|
605
|
+
stdin: handle.stdin,
|
|
606
|
+
done: handle.done,
|
|
607
|
+
nextResponse: async (timeoutMs, signal) => {
|
|
608
|
+
const ready = buffered.shift();
|
|
609
|
+
if (ready !== undefined) {
|
|
610
|
+
signal.throwIfAborted();
|
|
611
|
+
return ready;
|
|
612
|
+
}
|
|
613
|
+
return await new Promise((resolveResponse, rejectResponse) => {
|
|
614
|
+
let timer;
|
|
615
|
+
const settle = (frame) => {
|
|
616
|
+
const index = pending.indexOf(settle);
|
|
617
|
+
if (index >= 0)
|
|
618
|
+
pending.splice(index, 1);
|
|
619
|
+
if (timer !== undefined)
|
|
620
|
+
clearTimeout(timer);
|
|
621
|
+
signal.removeEventListener('abort', onAbort);
|
|
622
|
+
resolveResponse(frame);
|
|
623
|
+
};
|
|
624
|
+
const onAbort = () => {
|
|
625
|
+
const index = pending.indexOf(settle);
|
|
626
|
+
if (index >= 0)
|
|
627
|
+
pending.splice(index, 1);
|
|
628
|
+
if (timer !== undefined)
|
|
629
|
+
clearTimeout(timer);
|
|
630
|
+
signal.removeEventListener('abort', onAbort);
|
|
631
|
+
rejectResponse(signal.reason);
|
|
632
|
+
};
|
|
633
|
+
timer = setTimeout(() => settle({
|
|
634
|
+
kind: 'failure',
|
|
635
|
+
reason: `the native cursor overlay did not respond within ${timeoutMs} milliseconds`,
|
|
636
|
+
}), timeoutMs);
|
|
637
|
+
if (signal.aborted) {
|
|
638
|
+
onAbort();
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
642
|
+
pending.push(settle);
|
|
643
|
+
});
|
|
644
|
+
},
|
|
645
|
+
terminate: () => {
|
|
646
|
+
cursorSignal.abort();
|
|
647
|
+
handle.terminate();
|
|
648
|
+
},
|
|
649
|
+
waitForExit: signal => handle.waitForExit(signal),
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
async waitForCursorReady(handle) {
|
|
653
|
+
const stdout = handle.stdout;
|
|
654
|
+
if (stdout === undefined)
|
|
655
|
+
throw new Error('cursor stdout is unavailable');
|
|
656
|
+
const timeout = AbortSignal.timeout(CURSOR_READY_TIMEOUT_MS);
|
|
657
|
+
await new Promise((resolveReady, rejectReady) => {
|
|
658
|
+
let buffer = '';
|
|
659
|
+
let settled = false;
|
|
660
|
+
const cleanup = () => {
|
|
661
|
+
clearListeners();
|
|
662
|
+
timeout.removeEventListener('abort', onTimeout);
|
|
663
|
+
};
|
|
664
|
+
const succeed = () => {
|
|
665
|
+
if (settled)
|
|
666
|
+
return;
|
|
667
|
+
settled = true;
|
|
668
|
+
cleanup();
|
|
669
|
+
resolveReady();
|
|
670
|
+
};
|
|
671
|
+
const fail = (error) => {
|
|
672
|
+
if (settled)
|
|
673
|
+
return;
|
|
674
|
+
settled = true;
|
|
675
|
+
cleanup();
|
|
676
|
+
rejectReady(error);
|
|
677
|
+
};
|
|
678
|
+
const onData = (chunk) => {
|
|
679
|
+
buffer += chunk.toString();
|
|
680
|
+
if (Buffer.byteLength(buffer) > CURSOR_PROTOCOL_MAX_BYTES) {
|
|
681
|
+
fail(new Error('cursor ready response exceeded its protocol limit'));
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
while (true) {
|
|
685
|
+
const newline = buffer.indexOf('\n');
|
|
686
|
+
if (newline < 0)
|
|
687
|
+
return;
|
|
688
|
+
const line = buffer.slice(0, newline);
|
|
689
|
+
buffer = buffer.slice(newline + 1);
|
|
690
|
+
if (line.length === 0)
|
|
691
|
+
continue;
|
|
692
|
+
let response;
|
|
693
|
+
try {
|
|
694
|
+
response = JSON.parse(line);
|
|
695
|
+
}
|
|
696
|
+
catch (error) {
|
|
697
|
+
fail(error);
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
if (typeof response === 'object' && response !== null
|
|
701
|
+
&& response.ok === true
|
|
702
|
+
&& response.ready === true) {
|
|
703
|
+
succeed();
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
fail(new Error('cursor overlay returned an unexpected ready response'));
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
const onEnd = () => { fail(new Error('cursor overlay stdout closed before ready')); };
|
|
711
|
+
const onError = (error) => { fail(error); };
|
|
712
|
+
const onTimeout = () => { fail(new Error(`cursor overlay ready timeout after ${CURSOR_READY_TIMEOUT_MS} milliseconds`)); };
|
|
713
|
+
const clearListeners = () => {
|
|
714
|
+
stdout.removeListener('data', onData);
|
|
715
|
+
stdout.removeListener('end', onEnd);
|
|
716
|
+
stdout.removeListener('error', onError);
|
|
717
|
+
};
|
|
718
|
+
stdout.on('data', onData);
|
|
719
|
+
stdout.once('end', onEnd);
|
|
720
|
+
stdout.once('error', onError);
|
|
721
|
+
timeout.addEventListener('abort', onTimeout, { once: true });
|
|
722
|
+
void handle.done.then(outcome => { fail(new Error(`cursor overlay exited before ready (${String(outcome.exitCode ?? outcome.signal)})`)); }, error => { fail(error); });
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
//# sourceMappingURL=native-helper.js.map
|