@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.
Files changed (484) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +120 -2
  3. package/THIRD_PARTY_NOTICES.md +30 -0
  4. package/bin/apply_patch +9 -0
  5. package/cordis.patch.yml +433 -0
  6. package/docs/CHANGELOG.md +641 -0
  7. package/docs/account-login.md +44 -0
  8. package/docs/auto-review.md +128 -0
  9. package/docs/browser-use.md +783 -0
  10. package/docs/computer-use.md +81 -0
  11. package/docs/custom-providers.md +88 -0
  12. package/docs/demo.md +76 -0
  13. package/docs/distribution.md +58 -0
  14. package/docs/dscode-ultra.md +75 -0
  15. package/docs/email.md +296 -0
  16. package/docs/exec.md +40 -0
  17. package/docs/hub-distribution.md +190 -0
  18. package/docs/memory.md +121 -0
  19. package/docs/opencode-go.md +61 -0
  20. package/docs/plugin-hub.md +68 -0
  21. package/docs/releases/0.2.0.md +28 -0
  22. package/docs/releases/0.3.0.md +21 -0
  23. package/docs/releases/0.4.0.md +20 -0
  24. package/docs/releases/0.5.0.md +19 -0
  25. package/docs/releases/0.6.0.md +20 -0
  26. package/docs/releases/0.7.0.md +22 -0
  27. package/docs/releases/0.7.1.md +20 -0
  28. package/docs/releases/0.7.10.md +10 -0
  29. package/docs/releases/0.7.11.md +17 -0
  30. package/docs/releases/0.7.12.md +11 -0
  31. package/docs/releases/0.7.13.md +12 -0
  32. package/docs/releases/0.7.14.md +11 -0
  33. package/docs/releases/0.7.15.md +11 -0
  34. package/docs/releases/0.7.16.md +10 -0
  35. package/docs/releases/0.7.17.md +12 -0
  36. package/docs/releases/0.7.18.md +13 -0
  37. package/docs/releases/0.7.19.md +8 -0
  38. package/docs/releases/0.7.2.md +19 -0
  39. package/docs/releases/0.7.20.md +10 -0
  40. package/docs/releases/0.7.21.md +9 -0
  41. package/docs/releases/0.7.22.md +11 -0
  42. package/docs/releases/0.7.23.md +14 -0
  43. package/docs/releases/0.7.24.md +11 -0
  44. package/docs/releases/0.7.25.md +8 -0
  45. package/docs/releases/0.7.26.md +18 -0
  46. package/docs/releases/0.7.27.md +8 -0
  47. package/docs/releases/0.7.28.md +22 -0
  48. package/docs/releases/0.7.29.md +12 -0
  49. package/docs/releases/0.7.3.md +23 -0
  50. package/docs/releases/0.7.30.md +19 -0
  51. package/docs/releases/0.7.31.md +14 -0
  52. package/docs/releases/0.7.32.md +14 -0
  53. package/docs/releases/0.7.33.md +30 -0
  54. package/docs/releases/0.7.4.md +16 -0
  55. package/docs/releases/0.7.5.md +18 -0
  56. package/docs/releases/0.7.6.md +29 -0
  57. package/docs/releases/0.7.7.md +36 -0
  58. package/docs/releases/0.7.8.md +14 -0
  59. package/docs/releases/0.7.9.md +15 -0
  60. package/docs/session-bridge.md +80 -0
  61. package/docs/session-cards.md +53 -0
  62. package/docs/session-communication.md +186 -0
  63. package/docs/session-metrics.md +41 -0
  64. package/docs/skills.md +81 -0
  65. package/docs/triggers.md +338 -0
  66. package/docs/tui-commands.md +204 -0
  67. package/extensions/browser/manifest.json +22 -0
  68. package/extensions/browser/popup.css +6 -0
  69. package/extensions/browser/popup.html +11 -0
  70. package/extensions/browser/popup.mjs +47 -0
  71. package/extensions/browser/protocol.mjs +168 -0
  72. package/extensions/browser/worker.mjs +94 -0
  73. package/icon.svg +7 -0
  74. package/locale/en.json +6 -0
  75. package/locale/zh-cn.json +6 -0
  76. package/node_modules/@deepseek-ai/node-addon-system/LICENSE +21 -0
  77. package/node_modules/@deepseek-ai/node-addon-system/README.i18n.yaml +6 -0
  78. package/node_modules/@deepseek-ai/node-addon-system/README.md +15 -0
  79. package/node_modules/@deepseek-ai/node-addon-system/README.zh.md +15 -0
  80. package/node_modules/@deepseek-ai/node-addon-system/lib/flock.d.ts +13 -0
  81. package/node_modules/@deepseek-ai/node-addon-system/lib/flock.js +51 -0
  82. package/node_modules/@deepseek-ai/node-addon-system/lib/index.d.ts +73 -0
  83. package/node_modules/@deepseek-ai/node-addon-system/lib/index.js +98 -0
  84. package/node_modules/@deepseek-ai/node-addon-system/package.json +45 -0
  85. package/node_modules/@deepseek-ai/node-addon-system/src/flock.c +164 -0
  86. package/node_modules/@deepseek-ai/node-addon-system/src/main.c +298 -0
  87. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/LICENSE +28 -0
  88. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.i18n.yaml +6 -0
  89. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.md +9 -0
  90. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.zh.md +9 -0
  91. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/bin/system.node +0 -0
  92. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/package.json +31 -0
  93. package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/prebuilds.json +6 -0
  94. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/LICENSE +28 -0
  95. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.i18n.yaml +6 -0
  96. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.md +9 -0
  97. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.zh.md +9 -0
  98. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/bin/system.node +0 -0
  99. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/package.json +31 -0
  100. package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/prebuilds.json +6 -0
  101. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/LICENSE +28 -0
  102. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.i18n.yaml +6 -0
  103. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.md +11 -0
  104. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.zh.md +11 -0
  105. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/glibc/system.node +0 -0
  106. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/landlock-run +0 -0
  107. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/musl/system.node +0 -0
  108. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/package.json +31 -0
  109. package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/prebuilds.json +24 -0
  110. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/LICENSE +28 -0
  111. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.i18n.yaml +6 -0
  112. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.md +11 -0
  113. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.zh.md +11 -0
  114. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/glibc/system.node +0 -0
  115. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/landlock-run +0 -0
  116. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/musl/system.node +0 -0
  117. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/package.json +31 -0
  118. package/node_modules/@deepseek-ai/node-addon-system-linux-x64/prebuilds.json +24 -0
  119. package/package.json +156 -4
  120. package/plugins/account/index.mjs +178 -0
  121. package/plugins/account/state.mjs +123 -0
  122. package/plugins/auto-review/audit.mjs +24 -0
  123. package/plugins/auto-review/index.mjs +267 -0
  124. package/plugins/auto-review/policy.mjs +92 -0
  125. package/plugins/browser/SKILL.md +158 -0
  126. package/plugins/browser/access.mjs +143 -0
  127. package/plugins/browser/config.mjs +60 -0
  128. package/plugins/browser/connection.mjs +385 -0
  129. package/plugins/browser/desktop-client.mjs +282 -0
  130. package/plugins/browser/desktop-host.mjs +74 -0
  131. package/plugins/browser/document-identity.mjs +57 -0
  132. package/plugins/browser/extension-relay.mjs +66 -0
  133. package/plugins/browser/files.mjs +32 -0
  134. package/plugins/browser/index.mjs +235 -0
  135. package/plugins/browser/mcp-entry.mjs +18 -0
  136. package/plugins/browser/mcp-tools.mjs +21 -0
  137. package/plugins/browser/presentation.mjs +45 -0
  138. package/plugins/browser/preview.mjs +77 -0
  139. package/plugins/browser/review.mjs +20 -0
  140. package/plugins/browser/screenshots.mjs +35 -0
  141. package/plugins/clipboard-image/clipboard-image.swift +56 -0
  142. package/plugins/clipboard-image/index.mjs +70 -0
  143. package/plugins/code-review/baseline.mjs +143 -0
  144. package/plugins/code-review/git.mjs +163 -0
  145. package/plugins/code-review/index.mjs +236 -0
  146. package/plugins/compaction/engine.mjs +304 -0
  147. package/plugins/compaction/tetris.mjs +65 -0
  148. package/plugins/compaction/threshold.mjs +98 -0
  149. package/plugins/computer-use/DESKTOP-SKILL.md +64 -0
  150. package/plugins/computer-use/desktop-host.mjs +75 -0
  151. package/plugins/computer-use/desktop-skill.mjs +28 -0
  152. package/plugins/computer-use/desktop-upstream.mjs +3 -0
  153. package/plugins/computer-use/index.mjs +37 -0
  154. package/plugins/cordis-config/plain.mjs +31 -0
  155. package/plugins/credentials/index.mjs +73 -0
  156. package/plugins/custom/adapter.mjs +110 -0
  157. package/plugins/custom/config.mjs +85 -0
  158. package/plugins/custom/desktop-client.mjs +150 -0
  159. package/plugins/custom/desktop-host.mjs +78 -0
  160. package/plugins/custom/images.mjs +32 -0
  161. package/plugins/custom/index.mjs +145 -0
  162. package/plugins/custom/wire.mjs +179 -0
  163. package/plugins/desktop/client.mjs +1041 -0
  164. package/plugins/desktop/index.mjs +10 -0
  165. package/plugins/desktop/shell-environment.mjs +9 -0
  166. package/plugins/desktop-workspace/hooks.mjs +29 -0
  167. package/plugins/desktop-workspace/index.mjs +37 -0
  168. package/plugins/dscode/board.mjs +260 -0
  169. package/plugins/dscode/child-target.mjs +11 -0
  170. package/plugins/dscode/control.mjs +17 -0
  171. package/plugins/dscode/desktop-client.mjs +55 -0
  172. package/plugins/dscode/desktop-host.mjs +37 -0
  173. package/plugins/dscode/index.mjs +270 -0
  174. package/plugins/email/cli.mjs +32 -0
  175. package/plugins/email/contacts.mjs +36 -0
  176. package/plugins/email/desktop-client.mjs +117 -0
  177. package/plugins/email/desktop-host.mjs +54 -0
  178. package/plugins/email/desktop-service.mjs +106 -0
  179. package/plugins/email/gmail-oauth.mjs +69 -0
  180. package/plugins/email/gmail-store.mjs +2 -0
  181. package/plugins/email/gmail.mjs +194 -0
  182. package/plugins/email/imap.mjs +136 -0
  183. package/plugins/email/inbox.d.mts +25 -0
  184. package/plugins/email/inbox.mjs +76 -0
  185. package/plugins/email/smtp.mjs +70 -0
  186. package/plugins/email/store.mjs +32 -0
  187. package/plugins/email-tools/index.mjs +46 -0
  188. package/plugins/exec/cli.mjs +64 -0
  189. package/plugins/exec/index.mjs +112 -0
  190. package/plugins/grok/adapter.mjs +114 -0
  191. package/plugins/grok/auth.mjs +76 -0
  192. package/plugins/grok/billing.mjs +146 -0
  193. package/plugins/grok/index.mjs +122 -0
  194. package/plugins/grok/models.mjs +129 -0
  195. package/plugins/grok/status.mjs +28 -0
  196. package/plugins/grok/wire.mjs +268 -0
  197. package/plugins/hub/catalog.mjs +82 -0
  198. package/plugins/hub/desktop-client.mjs +114 -0
  199. package/plugins/hub/desktop-host.mjs +129 -0
  200. package/plugins/i18n/messages.d.mts +21 -0
  201. package/plugins/i18n/messages.mjs +537 -0
  202. package/plugins/jev/approval.mjs +131 -0
  203. package/plugins/jev/client.mjs +74 -0
  204. package/plugins/jev/index.mjs +99 -0
  205. package/plugins/memory/content.mjs +57 -0
  206. package/plugins/memory/desktop-host.mjs +3 -0
  207. package/plugins/memory/index.mjs +168 -0
  208. package/plugins/memory/pipeline.mjs +79 -0
  209. package/plugins/memory/store.mjs +93 -0
  210. package/plugins/message-source/kind.mjs +20 -0
  211. package/plugins/opencode-go/adapter.mjs +96 -0
  212. package/plugins/opencode-go/command.mjs +128 -0
  213. package/plugins/opencode-go/index.mjs +120 -0
  214. package/plugins/opencode-go/models.mjs +58 -0
  215. package/plugins/opencode-go/oauth.mjs +194 -0
  216. package/plugins/opencode-go/search.mjs +86 -0
  217. package/plugins/opencode-go/usage.mjs +119 -0
  218. package/plugins/opencode-go/version.mjs +10 -0
  219. package/plugins/opencode-go/wire.mjs +73 -0
  220. package/plugins/openrouter/adapter.mjs +232 -0
  221. package/plugins/openrouter/index.mjs +123 -0
  222. package/plugins/openrouter/models.mjs +157 -0
  223. package/plugins/openrouter/search.mjs +113 -0
  224. package/plugins/openrouter/wire.mjs +101 -0
  225. package/plugins/providers/catalog.mjs +160 -0
  226. package/plugins/providers/chat-messages.mjs +120 -0
  227. package/plugins/providers/chat-stream.mjs +174 -0
  228. package/plugins/providers/desktop-client.mjs +84 -0
  229. package/plugins/providers/desktop-host.mjs +63 -0
  230. package/plugins/providers/effort.mjs +35 -0
  231. package/plugins/providers/http-errors.mjs +50 -0
  232. package/plugins/providers/openrouter-account.mjs +171 -0
  233. package/plugins/session-bridge/client.mjs +106 -0
  234. package/plugins/session-bridge/communication.mjs +260 -0
  235. package/plugins/session-bridge/index.mjs +68 -0
  236. package/plugins/session-bridge/mailbox.mjs +267 -0
  237. package/plugins/session-bridge/paths.mjs +21 -0
  238. package/plugins/session-bridge/server.mjs +172 -0
  239. package/plugins/session-bridge/tasks.mjs +229 -0
  240. package/plugins/session-cards/content.mjs +64 -0
  241. package/plugins/session-cards/index.mjs +38 -0
  242. package/plugins/session-cards/manager.mjs +140 -0
  243. package/plugins/session-metrics/attribution.mjs +30 -0
  244. package/plugins/session-metrics/balance.mjs +81 -0
  245. package/plugins/session-metrics/desktop-client.mjs +62 -0
  246. package/plugins/session-metrics/desktop-host.mjs +46 -0
  247. package/plugins/session-metrics/index.mjs +96 -0
  248. package/plugins/session-metrics/pricing.mjs +84 -0
  249. package/plugins/session-metrics/rate.mjs +59 -0
  250. package/plugins/session-metrics/store.mjs +75 -0
  251. package/plugins/session-metrics/turns.mjs +134 -0
  252. package/plugins/session-metrics/view.mjs +271 -0
  253. package/plugins/time-marks/desktop-host.mjs +2 -0
  254. package/plugins/time-marks/index.mjs +116 -0
  255. package/plugins/time-marks/marks.mjs +152 -0
  256. package/plugins/triggers/cli.mjs +558 -0
  257. package/plugins/triggers/commands.mjs +143 -0
  258. package/plugins/triggers/config.mjs +264 -0
  259. package/plugins/triggers/desktop-client.mjs +155 -0
  260. package/plugins/triggers/desktop-host.mjs +88 -0
  261. package/plugins/triggers/desktop-management.mjs +97 -0
  262. package/plugins/triggers/desktop-scheduler.mjs +125 -0
  263. package/plugins/triggers/host.mjs +24 -0
  264. package/plugins/triggers/index.mjs +27 -0
  265. package/plugins/triggers/job-cli.mjs +110 -0
  266. package/plugins/triggers/jobs.mjs +156 -0
  267. package/plugins/triggers/launchd.mjs +101 -0
  268. package/plugins/triggers/lease.mjs +24 -0
  269. package/plugins/triggers/log.mjs +104 -0
  270. package/plugins/triggers/management.mjs +181 -0
  271. package/plugins/triggers/options.mjs +117 -0
  272. package/plugins/triggers/overlay.mjs +7 -0
  273. package/plugins/triggers/poll.mjs +65 -0
  274. package/plugins/triggers/run.mjs +157 -0
  275. package/plugins/triggers/schedule.mjs +40 -0
  276. package/plugins/triggers/scheduler-service.mjs +46 -0
  277. package/plugins/triggers/scheduler.mjs +92 -0
  278. package/plugins/triggers/session-run.mjs +125 -0
  279. package/plugins/triggers/session.mjs +48 -0
  280. package/plugins/triggers/source-emit.mjs +19 -0
  281. package/plugins/triggers/source-host.mjs +78 -0
  282. package/plugins/triggers/source-ingress.mjs +70 -0
  283. package/plugins/triggers/source-sandbox.mjs +35 -0
  284. package/plugins/triggers/sources.mjs +45 -0
  285. package/plugins/triggers/spool.mjs +145 -0
  286. package/plugins/triggers/tools.mjs +67 -0
  287. package/plugins/triggers/unattended.mjs +18 -0
  288. package/plugins/tui-tools/composition.mjs +28 -0
  289. package/plugins/tui-tools/desktop-host.mjs +2 -0
  290. package/plugins/tui-tools/doctor-cli.mjs +22 -0
  291. package/plugins/tui-tools/doctor.mjs +148 -0
  292. package/plugins/tui-tools/hook-sources.mjs +113 -0
  293. package/plugins/tui-tools/hooks.mjs +23 -0
  294. package/plugins/tui-tools/index.mjs +268 -0
  295. package/plugins/tui-tools/sandbox-runner.mjs +123 -0
  296. package/plugins/tui-tools/shell.mjs +27 -0
  297. package/plugins/tui-tools/update.mjs +111 -0
  298. package/plugins/tui-tools/workspace-discovery.mjs +129 -0
  299. package/plugins/ultra/policy.mjs +42 -0
  300. package/plugins/worktree-subagent/worktree.mjs +56 -0
  301. package/runtime-sources.json +94 -0
  302. package/vendor/bash/LICENSE +21 -0
  303. package/vendor/bash/index.js +717 -0
  304. package/vendor/bash/types/background.d.ts +50 -0
  305. package/vendor/bash/types/index.d.ts +38 -0
  306. package/vendor/bash/types/render.d.ts +57 -0
  307. package/vendor/command-goal/LICENSE +21 -0
  308. package/vendor/command-goal/index.js +210 -0
  309. package/vendor/command-goal/types/index.d.ts +10 -0
  310. package/vendor/computer-use/LICENSE +21 -0
  311. package/vendor/computer-use/lib/approval-policy.js +12 -0
  312. package/vendor/computer-use/lib/approval-policy.js.map +1 -0
  313. package/vendor/computer-use/lib/artifacts.js +79 -0
  314. package/vendor/computer-use/lib/artifacts.js.map +1 -0
  315. package/vendor/computer-use/lib/backend.js +3 -0
  316. package/vendor/computer-use/lib/backend.js.map +1 -0
  317. package/vendor/computer-use/lib/client.js +369 -0
  318. package/vendor/computer-use/lib/client.js.map +1 -0
  319. package/vendor/computer-use/lib/config.js +159 -0
  320. package/vendor/computer-use/lib/config.js.map +1 -0
  321. package/vendor/computer-use/lib/confirmations.js +99 -0
  322. package/vendor/computer-use/lib/confirmations.js.map +1 -0
  323. package/vendor/computer-use/lib/diff.js +58 -0
  324. package/vendor/computer-use/lib/diff.js.map +1 -0
  325. package/vendor/computer-use/lib/errors.js +22 -0
  326. package/vendor/computer-use/lib/errors.js.map +1 -0
  327. package/vendor/computer-use/lib/exposure.js +244 -0
  328. package/vendor/computer-use/lib/exposure.js.map +1 -0
  329. package/vendor/computer-use/lib/index.js +66 -0
  330. package/vendor/computer-use/lib/index.js.map +1 -0
  331. package/vendor/computer-use/lib/leases.js +262 -0
  332. package/vendor/computer-use/lib/leases.js.map +1 -0
  333. package/vendor/computer-use/lib/providers/macos.js +243 -0
  334. package/vendor/computer-use/lib/providers/macos.js.map +1 -0
  335. package/vendor/computer-use/lib/providers/native-helper.js +726 -0
  336. package/vendor/computer-use/lib/providers/native-helper.js.map +1 -0
  337. package/vendor/computer-use/lib/providers/unsupported.js +51 -0
  338. package/vendor/computer-use/lib/providers/unsupported.js.map +1 -0
  339. package/vendor/computer-use/lib/service.js +608 -0
  340. package/vendor/computer-use/lib/service.js.map +1 -0
  341. package/vendor/computer-use/lib/skill.js +136 -0
  342. package/vendor/computer-use/lib/skill.js.map +1 -0
  343. package/vendor/computer-use/lib/target-resolver.js +180 -0
  344. package/vendor/computer-use/lib/target-resolver.js.map +1 -0
  345. package/vendor/computer-use/lib/tools.js +511 -0
  346. package/vendor/computer-use/lib/tools.js.map +1 -0
  347. package/vendor/computer-use/lib/types/approval-policy.d.ts +13 -0
  348. package/vendor/computer-use/lib/types/approval-policy.d.ts.map +1 -0
  349. package/vendor/computer-use/lib/types/artifacts.d.ts +10 -0
  350. package/vendor/computer-use/lib/types/artifacts.d.ts.map +1 -0
  351. package/vendor/computer-use/lib/types/backend.d.ts +124 -0
  352. package/vendor/computer-use/lib/types/backend.d.ts.map +1 -0
  353. package/vendor/computer-use/lib/types/client/index.d.ts +83 -0
  354. package/vendor/computer-use/lib/types/client/index.d.ts.map +1 -0
  355. package/vendor/computer-use/lib/types/config.d.ts +94 -0
  356. package/vendor/computer-use/lib/types/config.d.ts.map +1 -0
  357. package/vendor/computer-use/lib/types/confirmations.d.ts +23 -0
  358. package/vendor/computer-use/lib/types/confirmations.d.ts.map +1 -0
  359. package/vendor/computer-use/lib/types/diff.d.ts +5 -0
  360. package/vendor/computer-use/lib/types/diff.d.ts.map +1 -0
  361. package/vendor/computer-use/lib/types/errors.d.ts +15 -0
  362. package/vendor/computer-use/lib/types/errors.d.ts.map +1 -0
  363. package/vendor/computer-use/lib/types/exposure.d.ts +30 -0
  364. package/vendor/computer-use/lib/types/exposure.d.ts.map +1 -0
  365. package/vendor/computer-use/lib/types/index.d.ts +21 -0
  366. package/vendor/computer-use/lib/types/index.d.ts.map +1 -0
  367. package/vendor/computer-use/lib/types/leases.d.ts +81 -0
  368. package/vendor/computer-use/lib/types/leases.d.ts.map +1 -0
  369. package/vendor/computer-use/lib/types/providers/macos.d.ts +39 -0
  370. package/vendor/computer-use/lib/types/providers/macos.d.ts.map +1 -0
  371. package/vendor/computer-use/lib/types/providers/native-helper.d.ts +48 -0
  372. package/vendor/computer-use/lib/types/providers/native-helper.d.ts.map +1 -0
  373. package/vendor/computer-use/lib/types/providers/unsupported.d.ts +23 -0
  374. package/vendor/computer-use/lib/types/providers/unsupported.d.ts.map +1 -0
  375. package/vendor/computer-use/lib/types/service.d.ts +58 -0
  376. package/vendor/computer-use/lib/types/service.d.ts.map +1 -0
  377. package/vendor/computer-use/lib/types/skill.d.ts +14 -0
  378. package/vendor/computer-use/lib/types/skill.d.ts.map +1 -0
  379. package/vendor/computer-use/lib/types/target-resolver.d.ts +38 -0
  380. package/vendor/computer-use/lib/types/target-resolver.d.ts.map +1 -0
  381. package/vendor/computer-use/lib/types/tools.d.ts +6 -0
  382. package/vendor/computer-use/lib/types/tools.d.ts.map +1 -0
  383. package/vendor/computer-use/lib/types/types.d.ts +270 -0
  384. package/vendor/computer-use/lib/types/types.d.ts.map +1 -0
  385. package/vendor/computer-use/lib/types/web.d.ts +33 -0
  386. package/vendor/computer-use/lib/types/web.d.ts.map +1 -0
  387. package/vendor/computer-use/lib/types.js +9 -0
  388. package/vendor/computer-use/lib/types.js.map +1 -0
  389. package/vendor/computer-use/lib/web.js +188 -0
  390. package/vendor/computer-use/lib/web.js.map +1 -0
  391. package/vendor/computer-use/native/macos/Sources/Fixture/main.swift +412 -0
  392. package/vendor/computer-use/native/macos/Sources/Helper/CursorImage.swift +11 -0
  393. package/vendor/computer-use/native/macos/Sources/Helper/CursorMotion.swift +67 -0
  394. package/vendor/computer-use/native/macos/Sources/Helper/CursorOverlay.swift +840 -0
  395. package/vendor/computer-use/native/macos/Sources/Helper/TargetedPointer.swift +327 -0
  396. package/vendor/computer-use/native/macos/Sources/Helper/WindowNumberMatcher.swift +29 -0
  397. package/vendor/computer-use/native/macos/Sources/Helper/main.swift +1244 -0
  398. package/vendor/computer-use/native/macos/Sources/Monitor/main.swift +153 -0
  399. package/vendor/computer-use/native/macos/bin/dsh-computer-use-helper +0 -0
  400. package/vendor/computer-use/native/macos/manifest.json +14 -0
  401. package/vendor/persistent/LICENSE +21 -0
  402. package/vendor/persistent/index.js +411 -0
  403. package/vendor/persistent/types/index.d.ts +24 -0
  404. package/vendor/subagent/LICENSE +21 -0
  405. package/vendor/subagent/index.js +694 -0
  406. package/vendor/subagent/invariant.js +52 -0
  407. package/vendor/subagent/model-selection-settings.js +68 -0
  408. package/vendor/subagent/types/index.d.ts +82 -0
  409. package/vendor/subagent/types/invariant.d.ts +16 -0
  410. package/vendor/subagent/types/list-models.d.ts +10 -0
  411. package/vendor/subagent/types/model-selection-settings.d.ts +45 -0
  412. package/vendor/subagent/types/model-selection-state.d.ts +48 -0
  413. package/vendor/subagent/types/model-selection.d.ts +81 -0
  414. package/vendor/subagent-core/LICENSE +21 -0
  415. package/vendor/subagent-core/index.js +3202 -0
  416. package/vendor/subagent-core/invariant.js +76 -0
  417. package/vendor/subagent-core/typert.host.d.ts +3 -0
  418. package/vendor/subagent-core/typert.host.js +978 -0
  419. package/vendor/subagent-core/typert.remote-client.d.ts +25 -0
  420. package/vendor/subagent-core/typert.remote-client.js +114 -0
  421. package/vendor/subagent-core/types/archive-admission.d.ts +16 -0
  422. package/vendor/subagent-core/types/archive-admission.js +151 -0
  423. package/vendor/subagent-core/types/assistant-output.d.ts +48 -0
  424. package/vendor/subagent-core/types/assistant-output.js +73 -0
  425. package/vendor/subagent-core/types/catalog.d.ts +84 -0
  426. package/vendor/subagent-core/types/catalog.js +109 -0
  427. package/vendor/subagent-core/types/child-agent.d.ts +156 -0
  428. package/vendor/subagent-core/types/child-agent.js +213 -0
  429. package/vendor/subagent-core/types/client.d.ts +8 -0
  430. package/vendor/subagent-core/types/client.js +7 -0
  431. package/vendor/subagent-core/types/continuation-activation.d.ts +267 -0
  432. package/vendor/subagent-core/types/continuation-activation.js +700 -0
  433. package/vendor/subagent-core/types/continuation-messages.d.ts +62 -0
  434. package/vendor/subagent-core/types/continuation-messages.js +106 -0
  435. package/vendor/subagent-core/types/continuation.d.ts +124 -0
  436. package/vendor/subagent-core/types/continuation.js +455 -0
  437. package/vendor/subagent-core/types/control-types.d.ts +135 -0
  438. package/vendor/subagent-core/types/control-types.js +8 -0
  439. package/vendor/subagent-core/types/control.d.ts +45 -0
  440. package/vendor/subagent-core/types/control.js +79 -0
  441. package/vendor/subagent-core/types/depth.d.ts +31 -0
  442. package/vendor/subagent-core/types/depth.js +39 -0
  443. package/vendor/subagent-core/types/descriptor.d.ts +144 -0
  444. package/vendor/subagent-core/types/descriptor.js +193 -0
  445. package/vendor/subagent-core/types/error.d.ts +11 -0
  446. package/vendor/subagent-core/types/error.js +14 -0
  447. package/vendor/subagent-core/types/inbox.d.ts +43 -0
  448. package/vendor/subagent-core/types/inbox.js +61 -0
  449. package/vendor/subagent-core/types/index.d.ts +320 -0
  450. package/vendor/subagent-core/types/index.js +475 -0
  451. package/vendor/subagent-core/types/internal.d.ts +58 -0
  452. package/vendor/subagent-core/types/internal.js +58 -0
  453. package/vendor/subagent-core/types/invariant.d.ts +13 -0
  454. package/vendor/subagent-core/types/invariant.js +91 -0
  455. package/vendor/subagent-core/types/lifecycle.d.ts +113 -0
  456. package/vendor/subagent-core/types/lifecycle.js +180 -0
  457. package/vendor/subagent-core/types/list-children.d.ts +36 -0
  458. package/vendor/subagent-core/types/list-children.js +166 -0
  459. package/vendor/subagent-core/types/out-of-process.d.ts +118 -0
  460. package/vendor/subagent-core/types/out-of-process.js +219 -0
  461. package/vendor/subagent-core/types/projection-types.d.ts +82 -0
  462. package/vendor/subagent-core/types/projection-types.js +7 -0
  463. package/vendor/subagent-core/types/projection.d.ts +100 -0
  464. package/vendor/subagent-core/types/projection.js +157 -0
  465. package/vendor/subagent-core/types/run-settlement.d.ts +17 -0
  466. package/vendor/subagent-core/types/run-settlement.js +70 -0
  467. package/vendor/subagent-core/types/types.d.ts +377 -0
  468. package/vendor/subagent-core/types/types.js +19 -0
  469. package/vendor/subagent-driver/LICENSE +21 -0
  470. package/vendor/subagent-driver/index.js +255 -0
  471. package/vendor/subagent-driver/types/index.d.ts +33 -0
  472. package/vendor/subagent-driver/types/structured.d.ts +42 -0
  473. package/vendor/subagent-fork/LICENSE +21 -0
  474. package/vendor/subagent-fork/index.js +61 -0
  475. package/vendor/subagent-fork/types/index.d.ts +20 -0
  476. package/vendor/subagent-spawn/LICENSE +21 -0
  477. package/vendor/subagent-spawn/index.js +45 -0
  478. package/vendor/subagent-spawn/types/index.d.ts +19 -0
  479. package/vendor/terminal/LICENSE +21 -0
  480. package/vendor/terminal/index.js +1093 -0
  481. package/vendor/terminal/types/config.d.ts +82 -0
  482. package/vendor/terminal/types/index.d.ts +36 -0
  483. package/vendor/terminal/types/sanitize.d.ts +47 -0
  484. package/vendor/terminal/types/session.d.ts +87 -0
@@ -0,0 +1,99 @@
1
+ /** One-use just-in-time confirmation tokens for sensitive Computer Use actions. */
2
+ import { createHash, randomUUID } from 'node:crypto';
3
+ import { approvalPolicy } from "./approval-policy.js";
4
+ import { ComputerUseError } from "./errors.js";
5
+ import { ComputerConfirmationToken, } from "./types.js";
6
+ function stable(value) {
7
+ if (value === null || typeof value !== 'object')
8
+ return JSON.stringify(value);
9
+ if (Array.isArray(value))
10
+ return `[${value.map(stable).join(',')}]`;
11
+ const record = value;
12
+ return `{${Object.keys(record).sort().filter(key => record[key] !== undefined).map(key => `${JSON.stringify(key)}:${stable(record[key])}`).join(',')}}`;
13
+ }
14
+ function actionHash(action) {
15
+ const { confirmationToken: _token, ...rest } = action;
16
+ return createHash('sha256').update(stable(rest)).digest('hex');
17
+ }
18
+ /** Issues, validates, consumes, and releases scoped sensitive-action tokens. */
19
+ export class ComputerConfirmationManager {
20
+ ctx;
21
+ config;
22
+ records = new Map();
23
+ constructor(ctx, config) {
24
+ this.ctx = ctx;
25
+ this.config = config;
26
+ }
27
+ /** Request user approval and mint one token bound to the exact action. */
28
+ async confirm(agent, app, request, callId, signal) {
29
+ if (approvalPolicy(this.ctx, agent) === 'never') {
30
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', 'sensitive action confirmation is blocked because approval prompts are disabled in this Session (approval/policy: never); do not execute the action, and ask the user to switch the permission preset to one with approval ask or run it manually');
31
+ }
32
+ const outcome = await this.ctx.approval.request({
33
+ agent,
34
+ toolName: 'computer_confirm',
35
+ ...(callId === undefined ? {} : { callId }),
36
+ reason: `${request.reason} Target: ${request.target}.${request.dataSummary === undefined ? '' : ` Data: ${request.dataSummary}.`}`,
37
+ signal,
38
+ });
39
+ if (outcome === 'cancelled')
40
+ throw new ComputerUseError('COMPUTER_CANCELLED', 'sensitive action confirmation was cancelled');
41
+ if (outcome !== 'allowed-once') {
42
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', `sensitive action was not confirmed (${outcome})`);
43
+ }
44
+ const token = ComputerConfirmationToken(randomUUID());
45
+ const expiresAt = Date.now() + this.config().confirmationTtlMs;
46
+ let agentRecords = this.records.get(agent);
47
+ if (agentRecords === undefined) {
48
+ agentRecords = new Map();
49
+ this.records.set(agent, agentRecords);
50
+ }
51
+ agentRecords.set(token, {
52
+ app,
53
+ observationId: request.action.observationId,
54
+ actionHash: actionHash(request.action),
55
+ expiresAt,
56
+ });
57
+ return { token, observationId: request.action.observationId, app, expiresAt: new Date(expiresAt).toISOString() };
58
+ }
59
+ /** Require and consume the one matching token when an action is marked sensitive. */
60
+ consume(agent, app, action) {
61
+ if (action.sensitive !== true) {
62
+ if (action.confirmationToken !== undefined) {
63
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', 'confirmationToken is valid only when sensitive is true');
64
+ }
65
+ return;
66
+ }
67
+ const token = action.confirmationToken;
68
+ if (token === undefined) {
69
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', 'sensitive action requires a token from computer_confirm');
70
+ }
71
+ const agentRecords = this.records.get(agent);
72
+ const record = agentRecords?.get(token);
73
+ if (record === undefined) {
74
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', 'confirmation token is unknown, expired, or already consumed');
75
+ }
76
+ agentRecords?.delete(token);
77
+ if (record.expiresAt < Date.now()) {
78
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', 'confirmation token expired');
79
+ }
80
+ if (record.app.bundleId !== app.bundleId || record.app.pid !== app.pid
81
+ || record.observationId !== action.observationId || record.actionHash !== actionHash(action)) {
82
+ throw new ComputerUseError('COMPUTER_CONFIRMATION_REQUIRED', 'confirmation token does not match this app, observation, or action');
83
+ }
84
+ }
85
+ /** Invalidate one pending token after target identity changes before input. */
86
+ invalidate(agent, token) {
87
+ if (token !== undefined)
88
+ this.records.get(agent)?.delete(token);
89
+ }
90
+ /** Release every pending token owned by one Agent. */
91
+ releaseAgent(agent) {
92
+ this.records.delete(agent);
93
+ }
94
+ /** Release all pending tokens on provider teardown or generation replacement. */
95
+ clear() {
96
+ this.records.clear();
97
+ }
98
+ }
99
+ //# sourceMappingURL=confirmations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmations.js","sourceRoot":"","sources":["../src/confirmations.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EACL,yBAAyB,GAM1B,MAAM,YAAY,CAAA;AASnB,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,KAAK,KAAK,IAAI,IAAI,OA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MAAM,CAAC,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG;eACjE,MAAM,CAAC,aAAa,KAAK,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,UAAU,KAAK,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/F,MAAM,IAAI,gBAAgB,CAAC,gCAAgC,EAAE,oEAAoE,CAAC,CAAA;QACpI,CAAC;IACH,CAAC;IAED,+EAA+E;IAC/E,UAAU,CAAC,KAAY,EAAE,KAA4C;QACnE,IAAI,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;IACjE,CAAC;IAED,sDAAsD;IACtD,YAAY,CAAC,KAAY;QACvB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;IAED,iFAAiF;IACjF,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;IACtB,CAAC;CACF"}
@@ -0,0 +1,58 @@
1
+ /** Accessibility-tree diff projection for model-context efficiency. */
2
+ function identity(element) {
3
+ const frame = element.frame === undefined
4
+ ? ''
5
+ : `${Math.round(element.frame.x)},${Math.round(element.frame.y)},${Math.round(element.frame.width)},${Math.round(element.frame.height)}`;
6
+ return [element.role, element.subrole ?? '', element.title ?? '', element.label ?? '', frame].join('|');
7
+ }
8
+ function summary(element, includeIndex) {
9
+ const parts = [includeIndex ? `[${element.index}]` : undefined, element.role];
10
+ if (element.title !== undefined)
11
+ parts.push(JSON.stringify(element.title));
12
+ else if (element.label !== undefined)
13
+ parts.push(JSON.stringify(element.label));
14
+ if (element.value !== undefined)
15
+ parts.push(`value=${JSON.stringify(element.value)}`);
16
+ if (element.enabled === false)
17
+ parts.push('disabled');
18
+ if (element.focused === true)
19
+ parts.push('focused');
20
+ if (element.selected === true)
21
+ parts.push('selected');
22
+ return parts.filter((part) => part !== undefined).join(' ');
23
+ }
24
+ function state(element) {
25
+ return JSON.stringify({
26
+ value: element.value,
27
+ enabled: element.enabled,
28
+ focused: element.focused,
29
+ selected: element.selected,
30
+ actions: element.actions,
31
+ });
32
+ }
33
+ /** Return a bounded full-to-full element diff whose current rows use current indexes. */
34
+ export function diffElements(previous, current, maxBytes) {
35
+ const before = new Map(previous.map(element => [identity(element), element]));
36
+ const after = new Map(current.map(element => [identity(element), element]));
37
+ const lines = [];
38
+ for (const [key, element] of before) {
39
+ if (!after.has(key))
40
+ lines.push(`- ${summary(element, false)}`);
41
+ }
42
+ for (const [key, element] of after) {
43
+ const old = before.get(key);
44
+ if (old === undefined)
45
+ lines.push(`+ ${summary(element, true)}`);
46
+ else if (state(old) !== state(element))
47
+ lines.push(`~ ${summary(element, true)}`);
48
+ }
49
+ if (lines.length === 0)
50
+ return '(no accessibility changes)';
51
+ const text = lines.join('\n');
52
+ const bytes = Buffer.byteLength(text);
53
+ if (bytes <= maxBytes)
54
+ return text;
55
+ const suffix = '\n… diff truncated';
56
+ return `${Buffer.from(text).subarray(0, Math.max(0, maxBytes - Buffer.byteLength(suffix))).toString('utf8')}${suffix}`;
57
+ }
58
+ //# sourceMappingURL=diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.js","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAIvE,SAAS,QAAQ,CAAC,OAAwB;IACxC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS;QACvC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI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AAE,IAAI,CAAC,EAAE,CAAC,CAAA;aAC3D,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;IACnF,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,4BAA4B,CAAA;IAC3D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IACrC,IAAI,KAAK,IAAI,QAAQ;QAAE,OAAO,IAAI,CAAA;IAClC,MAAM,MAAM,GAAG,oBAAoB,CAAA;IACnC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAAA;AACxH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /** Error with a stable model-visible code and bounded public details. */
2
+ export class ComputerUseError extends Error {
3
+ code;
4
+ /**
5
+ * @param code - Stable failure category.
6
+ * @param message - Bounded correction-oriented description without UI secrets.
7
+ * @param options - Optional original cause retained outside the model-facing message.
8
+ */
9
+ constructor(code, message, options) {
10
+ super(`${code}: ${message}`, options);
11
+ this.name = 'ComputerUseError';
12
+ this.code = code;
13
+ }
14
+ }
15
+ /** Convert an unknown failure into the provider-failure category without leaking unbounded native text. */
16
+ export function computerUseError(error, fallback) {
17
+ if (error instanceof ComputerUseError)
18
+ return error;
19
+ const message = error instanceof Error ? error.message : String(error);
20
+ return new ComputerUseError('COMPUTER_PROVIDER_FAILURE', `${fallback}: ${message.slice(0, 1000)}`, { cause: error });
21
+ }
22
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAiBA,yEAAyE;AACzE,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAChC,IAAI,CAAsB;IAEnC;;;;OAIG;IACH,YAAY,IAA0B,EAAE,OAAe,EAAE,OAAsB;QAC7E,KAAK,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,EAAE,OAAO,CAAC,CAAA;QACrC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF;AAED,2GAA2G;AAC3G,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,QAAgB;IAC/D,IAAI,KAAK,YAAY,gBAAgB;QAAE,OAAO,KAAK,CAAA;IACnD,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACtE,OAAO,IAAI,gBAAgB,CAAC,2BAA2B,EAAE,GAAG,QAAQ,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;AACtH,CAAC"}
@@ -0,0 +1,244 @@
1
+ /** Agent-scoped progressive exposure for Computer Use execution Tools. */
2
+ import { defineTool } from '@deepseek-ai/dsh-tools';
3
+ import { COMPUTER_USE_SKILL_CONTENT, COMPUTER_USE_SKILL_NAME, COMPUTER_USE_SKILL_NAMES } from "./skill.js";
4
+ /** One global bootstrap retained until the current Agent loads the Skill. */
5
+ export const COMPUTER_USE_ACTIVATE = 'computer_use_activate';
6
+ const VISION_TOOL_NAMES = [
7
+ 'vision_glance',
8
+ 'vision_ground',
9
+ 'vision_detect',
10
+ 'vision_crop',
11
+ 'vision_long_screenshot_ocr',
12
+ 'vision_toolkit_activate',
13
+ ];
14
+ const COMMAND_PREFIX = /^(?:(?:[A-Za-z_][A-Za-z0-9_]*=\S+)\s+)*(?:(?:\S*\/)?(?:sudo|env|nohup|time|command|exec)\s+(?:(?:-\S+|[A-Za-z_][A-Za-z0-9_]*=\S+)\s+)*)?/iu;
15
+ const OCR_COMMAND_PROBE = /^(?:which|type|command\s+-v)\b[^\n;&|]*\b(?:tesseract|screencapture)\b/iu;
16
+ const OCR_EXECUTABLE = /^(?:\S*\/)?(?:tesseract|screencapture)(?:\s|$)/iu;
17
+ const OCR_STACK_SETUP = /^(?:(?:\S*\/)?(?:brew|port|apt(?:-get)?|dnf|yum|pacman)\b[^\n]*(?:install|add)\b[^\n]*\btesseract(?:-ocr)?\b|(?:\S*\/)?(?:pip(?:3(?:\.\d+)*)?|uv\s+pip|poetry\s+add|pdm\s+add)\b[^\n]*(?:install|add)?[^\n]*\b(?:pytesseract|easyocr|ocrmypdf)\b)/iu;
18
+ const SCRIPTED_OCR_EXECUTABLE = /^(?:\S*\/)?(?:python(?:3(?:\.\d+)*)?|swift)(?:\s|$)/iu;
19
+ const SCRIPTED_OCR_MARKER = /(?:\bpytesseract\b|\beasyocr\b|\bocrmypdf\b|VNRecognizeTextRequest|\bimport\s+Vision\b)/iu;
20
+ const SHELL_META = /(?:&&|\|\||[;|\n])/u;
21
+ function renderJson(_args, value) {
22
+ return [{ type: 'text', text: JSON.stringify(value, null, 2) }];
23
+ }
24
+ function isRecord(value) {
25
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
26
+ }
27
+ function adHocOcrCommand(value) {
28
+ if (!isRecord(value) || typeof value.command !== 'string')
29
+ return false;
30
+ const commands = value.command.split(SHELL_META)
31
+ .map(command => command.trimStart().replace(COMMAND_PREFIX, ''));
32
+ if (commands.some(command => OCR_COMMAND_PROBE.test(command)
33
+ || OCR_EXECUTABLE.test(command)
34
+ || OCR_STACK_SETUP.test(command)))
35
+ return true;
36
+ return SCRIPTED_OCR_MARKER.test(value.command)
37
+ && commands.some(command => SCRIPTED_OCR_EXECUTABLE.test(command));
38
+ }
39
+ function isSkillArguments(value) {
40
+ return isRecord(value) && COMPUTER_USE_SKILL_NAMES.has(value.name);
41
+ }
42
+ function nativeSkillCall(raw) {
43
+ try {
44
+ return isSkillArguments(JSON.parse(raw));
45
+ }
46
+ catch {
47
+ return false;
48
+ }
49
+ }
50
+ function containsSkillContent(blocks) {
51
+ return blocks.some(block => isRecord(block)
52
+ && block.type === 'text'
53
+ && typeof block.text === 'string'
54
+ && block.text.includes(COMPUTER_USE_SKILL_CONTENT));
55
+ }
56
+ function isSkillResult(value) {
57
+ return isRecord(value)
58
+ && COMPUTER_USE_SKILL_NAMES.has(value.name)
59
+ && value.content === COMPUTER_USE_SKILL_CONTENT;
60
+ }
61
+ /**
62
+ * Session event types carrying one PTC (`run_code`) sub-dispatch.
63
+ *
64
+ * DSH 0.1.5 renamed the append site from `tool/code-dispatch` to
65
+ * `tool/ptc-dispatch` (`dsh-tools`) with an identical payload, and its session
66
+ * format migration renames replayed legacy events to the new name, so a log
67
+ * can legitimately carry either. Both are accepted: a pre-0.1.5 host only ever
68
+ * appends the old name, a 0.1.5 host only the new one.
69
+ */
70
+ const PTC_DISPATCH_EVENT_TYPES = new Set(['tool/ptc-dispatch', 'tool/code-dispatch']);
71
+ /** Whether durable Session history proves that the bundled Skill was loaded. */
72
+ export function hasLoadedComputerUseSkill(session) {
73
+ const nativeCalls = new Set();
74
+ const events = typeof session.snapshotEvents === 'function'
75
+ ? session.snapshotEvents()
76
+ : session.events ?? [];
77
+ for (const event of events) {
78
+ if (event.type === 'user/message') {
79
+ const source = event.data.source;
80
+ if (source.kind === 'skill-invocation'
81
+ && COMPUTER_USE_SKILL_NAMES.has(source.name)
82
+ && containsSkillContent(event.data.content))
83
+ return true;
84
+ continue;
85
+ }
86
+ if (event.type === 'tool/call') {
87
+ if (event.data.name === 'skill' && nativeSkillCall(event.data.arguments))
88
+ nativeCalls.add(String(event.data.callId));
89
+ continue;
90
+ }
91
+ if (event.type === 'tool/result') {
92
+ const [block] = event.data.message.content;
93
+ if (block?.type === 'tool-result'
94
+ && block.isError !== true
95
+ && nativeCalls.has(String(block.toolCallId))
96
+ && containsSkillContent(block.content))
97
+ return true;
98
+ continue;
99
+ }
100
+ if (PTC_DISPATCH_EVENT_TYPES.has(event.type)
101
+ && event.data.name === 'skill'
102
+ && event.data.isError === false
103
+ && isSkillArguments(event.data.arguments)
104
+ && containsSkillContent(event.data.content))
105
+ return true;
106
+ }
107
+ return false;
108
+ }
109
+ /** Owns one progressive Tool-exposure generation. */
110
+ export class ComputerUseExposure {
111
+ ctx;
112
+ createTools;
113
+ activationTool;
114
+ states = new Map();
115
+ installed = false;
116
+ constructor(ctx, createTools) {
117
+ this.ctx = ctx;
118
+ this.createTools = createTools;
119
+ this.activationTool = defineTool({
120
+ name: COMPUTER_USE_ACTIVATE,
121
+ description: `Activate the macOS Computer Use execution tools for this Agent after loading the ${COMPUTER_USE_SKILL_NAME} Skill. The Skill tool normally activates them automatically; call this only after a direct Skill invocation when the tools are still absent. This bootstrap disappears after success.`,
122
+ parameters: {},
123
+ output: {
124
+ schema: {
125
+ type: 'object',
126
+ additionalProperties: false,
127
+ properties: {
128
+ activated: { type: 'boolean', required: true },
129
+ tools: { type: 'array', items: { type: 'string' }, required: true },
130
+ },
131
+ },
132
+ render: renderJson,
133
+ },
134
+ execute: (_args, exec) => {
135
+ if (exec.agent === undefined)
136
+ throw new Error(`${COMPUTER_USE_ACTIVATE}: an Agent Session is required`);
137
+ if (!hasLoadedComputerUseSkill(exec.agent.session)) {
138
+ throw new Error(`${COMPUTER_USE_ACTIVATE}: load the ${COMPUTER_USE_SKILL_NAME} Skill first`);
139
+ }
140
+ return Promise.resolve(this.activate(exec.agent));
141
+ },
142
+ presentCall: () => ({ card: 'generic', title: 'Activate Computer Use', kind: 'execute' }),
143
+ });
144
+ }
145
+ /** Install lifecycle listeners and adopt existing Agents. */
146
+ install() {
147
+ if (this.installed)
148
+ throw new Error('dsh-computer-use: progressive exposure is already installed');
149
+ this.installed = true;
150
+ const effects = [
151
+ this.ctx.on('agent/created', ({ agent }) => { this.attach(agent); }),
152
+ this.ctx.on('agent/disposed', ({ agent }) => { this.detach(agent); }),
153
+ this.ctx.tools.guard((exec) => {
154
+ if (exec.name !== 'bash'
155
+ || exec.agent === undefined
156
+ || !hasLoadedComputerUseSkill(exec.agent.session)
157
+ || !adHocOcrCommand(exec.arguments)
158
+ || !VISION_TOOL_NAMES.some(name => this.ctx.tools.get(name, exec.agent) !== undefined))
159
+ return undefined;
160
+ return 'Computer Use screenshot analysis must use the installed Vision Toolkit instead of a shell-built OCR stack. If vision_glance is absent, call the skill tool with {"name":"vision-tools"}; then pass the existing screenshot Artifact path to vision_glance, vision_ground, vision_detect, vision_crop, or vision_long_screenshot_ocr.';
161
+ }),
162
+ this.ctx.on('tools/result', (exec, result) => {
163
+ if (result.isError === false
164
+ && exec.name === 'skill'
165
+ && exec.agent !== undefined
166
+ && isSkillArguments(exec.arguments)
167
+ && isSkillResult(result.value))
168
+ this.activate(exec.agent);
169
+ return undefined;
170
+ }),
171
+ ];
172
+ try {
173
+ for (const agent of this.ctx.agents.list())
174
+ this.attach(agent);
175
+ }
176
+ catch (error) {
177
+ for (const dispose of effects.reverse())
178
+ dispose();
179
+ this.disposeStates();
180
+ this.installed = false;
181
+ throw error;
182
+ }
183
+ return () => {
184
+ if (!this.installed)
185
+ return;
186
+ this.installed = false;
187
+ for (const dispose of effects.reverse())
188
+ dispose();
189
+ this.disposeStates();
190
+ };
191
+ }
192
+ attach(agent) {
193
+ if (this.states.has(agent))
194
+ return;
195
+ this.states.set(agent, { active: false, toolDisposers: [], toolNames: [] });
196
+ if (hasLoadedComputerUseSkill(agent.session))
197
+ this.activate(agent);
198
+ }
199
+ activate(agent) {
200
+ this.attach(agent);
201
+ const state = this.states.get(agent);
202
+ if (state === undefined)
203
+ throw new Error(`dsh-computer-use: Agent ${String(agent.id)} has no exposure state`);
204
+ if (state.active)
205
+ return { activated: false, tools: [...state.toolNames] };
206
+ const definitions = this.createTools();
207
+ const toolDisposers = [];
208
+ let hideActivation;
209
+ try {
210
+ for (const definition of definitions)
211
+ toolDisposers.push(agent.ctx.tools.register(definition));
212
+ hideActivation = agent.ctx.tools.restrict({ deny: [COMPUTER_USE_ACTIVATE] });
213
+ }
214
+ catch (error) {
215
+ hideActivation?.();
216
+ for (const dispose of toolDisposers.reverse())
217
+ dispose();
218
+ throw error;
219
+ }
220
+ state.active = true;
221
+ state.hideActivation = hideActivation;
222
+ state.toolDisposers = toolDisposers;
223
+ state.toolNames = definitions.map(definition => definition.name);
224
+ return { activated: true, tools: [...state.toolNames] };
225
+ }
226
+ detach(agent) {
227
+ const state = this.states.get(agent);
228
+ if (state === undefined)
229
+ return;
230
+ this.states.delete(agent);
231
+ this.disposeState(state);
232
+ }
233
+ disposeStates() {
234
+ for (const state of this.states.values())
235
+ this.disposeState(state);
236
+ this.states.clear();
237
+ }
238
+ disposeState(state) {
239
+ state.hideActivation?.();
240
+ for (const dispose of state.toolDisposers.reverse())
241
+ dispose();
242
+ }
243
+ }
244
+ //# sourceMappingURL=exposure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exposure.js","sourceRoot":"","sources":["../src/exposure.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAK1E,OAAO,EAAE,UAAU,EAAuB,MAAM,wBAAwB,CAAA;AAExE,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAE1G,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAA;AAE5D,MAAM,iBAAiB,GAAG;IACxB,eAAe;IACf,eAAe;IACf,eAAe;IACf,aAAa;IACb,4BAA4B;IAC5B,yBAAyB;CACjB,CAAA;AAEV,MAAM,cAAc,GAAG,4IAA4I,CAAA;AACnK,MAAM,iBAAiB,GAAG,0EAA0E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AAA;QACnB,KAAK,CAAC,cAAc,GAAG,cAAc,CAAA;QACrC,KAAK,CAAC,aAAa,GAAG,aAAa,CAAA;QACnC,KAAK,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QAChE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAA;IACzD,CAAC;IAEO,MAAM,CAAC,KAAY;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACpC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAM;QAC/B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACzB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAC1B,CAAC;IAEO,aAAa;QACnB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QAClE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;IACrB,CAAC;IAEO,YAAY,CAAC,KAAoB;QACvC,KAAK,CAAC,cAAc,EAAE,EAAE,CAAA;QACxB,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE;YAAE,OAAO,EAAE,CAAA;IAChE,CAAC;CACF"}
@@ -0,0 +1,66 @@
1
+ /** DSH Computer Use model-facing consumer and progressive Skill bundle. */
2
+ import { Service } from '@deepseek-ai/cordis';
3
+ import { Config } from "./config.js";
4
+ import { ComputerUseExposure } from "./exposure.js";
5
+ import { MacOSComputerUseProvider } from "./providers/macos.js";
6
+ import { COMPUTER_USE_SKILL, LEGACY_COMPUTER_USE_SKILL } from "./skill.js";
7
+ import { createComputerUseTools } from "./tools.js";
8
+ import { installComputerUseWeb } from "./web.js";
9
+ export { Config } from "./config.js";
10
+ export * from "./errors.js";
11
+ export * from "./service.js";
12
+ export * from "./types.js";
13
+ /** Register the portable Skill, bootstrap, Agent-scoped Tools, and optional Web diagnostics. */
14
+ export function installComputerUseConsumer(ctx) {
15
+ const exposure = new ComputerUseExposure(ctx, () => createComputerUseTools(ctx.computerUse));
16
+ let activation;
17
+ let skill;
18
+ let legacySkill;
19
+ let exposureDispose;
20
+ try {
21
+ activation = ctx.tools.register(exposure.activationTool);
22
+ skill = ctx.skills.register(COMPUTER_USE_SKILL);
23
+ legacySkill = ctx.skills.register(LEGACY_COMPUTER_USE_SKILL);
24
+ exposureDispose = exposure.install();
25
+ installComputerUseWeb(ctx);
26
+ }
27
+ catch (error) {
28
+ exposureDispose?.();
29
+ legacySkill?.();
30
+ skill?.();
31
+ activation?.();
32
+ throw error;
33
+ }
34
+ return () => {
35
+ exposureDispose?.();
36
+ activation?.();
37
+ legacySkill?.();
38
+ skill?.();
39
+ };
40
+ }
41
+ /** macOS provider plus the portable Skill, scoped Tools, and optional Web diagnostics. */
42
+ export class ComputerUseBundle extends MacOSComputerUseProvider {
43
+ static inject = ['subprocess', 'approval', 'settings', 'sessions', 'agents', 'tools', 'skills'];
44
+ static Config = Config;
45
+ consumerDispose;
46
+ constructor(ctx, config = {}) {
47
+ super(ctx, config);
48
+ ctx.effect(() => () => {
49
+ this.consumerDispose?.();
50
+ this.consumerDispose = undefined;
51
+ }, 'dsh-computer-use: consumer lifecycle');
52
+ }
53
+ /** Publish model-facing capabilities only after provider integrity and health pass. */
54
+ async [Service.init]() {
55
+ await super[Service.init]();
56
+ if (process.platform !== 'darwin') {
57
+ // Non-macOS hosts keep the profile healthy and show the reason in Web Settings,
58
+ // but never expose Computer Use Tools or the Skill to the model.
59
+ installComputerUseWeb(this.ctx);
60
+ return;
61
+ }
62
+ this.consumerDispose = installComputerUseConsumer(this.ctx);
63
+ }
64
+ }
65
+ export default ComputerUseBundle;
66
+ //# sourceMappingURL=index.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