@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,81 @@
1
+ # Computer Use
2
+
3
+ Computer Use observes and operates local macOS application windows through
4
+ Accessibility, with screenshot artifacts for visual evidence. Prefer a connector,
5
+ API, CLI or browser tool when one can complete the task directly.
6
+
7
+ ## Experimental Desktop adapter
8
+
9
+ The [combined Desktop package](browser-use.md#install-the-experimental-combined-desktop-package)
10
+ includes an experimental native adapter. It requires macOS 14 or later; the
11
+ packaged helper supports Apple Silicon and Intel. Other platforms keep the Host
12
+ available and report Computer Use as unsupported, without exposing its tools.
13
+
14
+ In a DSCODE session, load the `dscode-computer-use` skill before using native tools.
15
+ Loading the exact bundled skill activates app discovery, observation, click,
16
+ value entry, typing, keyboard, scrolling, dragging, advertised Accessibility
17
+ actions, bounded waits and sensitive-action confirmation. Native Standard
18
+ sessions do not receive this skill or its tools. A successful skill load is
19
+ restored from persisted session history; unloading the plugin removes its tools
20
+ from open agents, and reloading restores them where that history permits.
21
+
22
+ `/computer` or `/computer status` checks helper health and reports Accessibility
23
+ and Screen Recording permissions. A healthy helper can still report a missing
24
+ OS permission. It does not change those permissions or application grants.
25
+
26
+ The current qualification covers helper integrity and initialization, app
27
+ discovery, progressive activation, native session resume, Standard isolation,
28
+ denied unconfigured app access, and live-plugin unload/reload on Host versions
29
+ `0.2.0-rc.2` and `0.2.1-alpha.1`. The tested helper reported Accessibility denied.
30
+ **Reading application windows, screenshot capture and input actions have not yet
31
+ been qualified in the Desktop adapter.** Their presence in the tool catalog does
32
+ not establish that those operations work on your machine.
33
+
34
+ ## Application and OS permissions
35
+
36
+ There are two independent permission layers:
37
+
38
+ - macOS Accessibility and Screen Recording govern the native process. Grant them
39
+ through System Settings when you choose to permit these capabilities. Use
40
+ `/computer` to recheck after changing permissions or restarting Desktop.
41
+ - DSCODE app read/control grants select which applications a session may use.
42
+ Missing grants follow the session's approval policy. A rejected request stays
43
+ rejected for that session and scope. With prompts disabled, missing grants are
44
+ denied without a user dialog; full filesystem access does not grant app access.
45
+
46
+ The Desktop entry is `dscode-desktop-computer-use`. Its profile configuration can
47
+ grant exact bundle IDs. For example, this grants read access only to TextEdit:
48
+
49
+ ```yaml
50
+ - id: dscode-desktop-computer-use
51
+ config:
52
+ allowAllApps: false
53
+ observationTtlMs: 30000
54
+ grants:
55
+ - bundleId: com.apple.TextEdit
56
+ read: true
57
+ control: false
58
+ ```
59
+
60
+ Restart Desktop after editing the profile configuration. `control: true` also
61
+ permits reading that app. Wildcard bundle IDs are rejected. Defaults grant no
62
+ applications and preserve the user's foreground app for both pointer and
63
+ keyboard input. The adapter uses the Host's configuration directly and does not
64
+ install the upstream plugin's retired Settings API or its old Web settings page.
65
+
66
+ ## Observation and image evidence
67
+
68
+ Actions require a fresh observation ID. Element indices belong to that
69
+ observation; opaque target handles permit only validated, unambiguous rebinding.
70
+ Successful actions return fresh state. Sensitive actions require a one-use
71
+ confirmation tied to the app, observation and exact action; a changed target
72
+ requires fresh confirmation.
73
+
74
+ Screenshots are stored as workspace image artifacts. Use the Host's `read_image`
75
+ tool and an image-capable model to inspect the returned path. Missing model image
76
+ support is a separate limitation from Screen Recording permission. The Desktop
77
+ adapter does not require the separate upstream Vision Toolkit plugin.
78
+
79
+ The terminal installation continues to use its existing `computer-use` skill and
80
+ upstream bundle. Desktop-specific activation, configuration and qualification
81
+ described here do not change that terminal integration.
@@ -0,0 +1,88 @@
1
+ # Custom model providers
2
+
3
+ Use `/provider custom`, or choose **Custom** in `/provider`, to connect a self-hosted or private model API. DSCODE runs its tools in the current workspace; pointing inference at another computer does not move shell commands or file edits to that computer.
4
+
5
+ Saved services appear by name in `/provider`. Choose a service and press Enter to switch to its current or first configured model; `/model` then selects among that service's models. **Custom · add / edit model services** opens configuration instead of switching. A service without a model context window opens its editor so the missing setting can be completed.
6
+
7
+ ## Add a service
8
+
9
+ Choose **Add provider** and enter a name and API base URL. The URL is the API prefix, for example `http://studio:8000/v1`, not a complete chat endpoint. The editor displays the final request URL.
10
+
11
+ Choose one API format:
12
+
13
+ | Format | Path appended to the base URL | Default authentication |
14
+ | --- | --- | --- |
15
+ | Chat Completions | `/chat/completions` | Bearer token |
16
+ | Responses | `/responses` | Bearer token |
17
+ | Anthropic Messages | `/messages` | `x-api-key`, with the Anthropic version header |
18
+
19
+ Authentication can be changed independently to **none**, **bearer** or **x-api-key**. For example, oMLX uses Bearer authentication even when serving Anthropic Messages. No-auth requests omit the key entirely. API keys are masked while editing; leaving the field blank preserves an existing key.
20
+
21
+ Use Up/Down to navigate and Enter to edit or activate. For API format, authentication, thinking and input type, Enter opens a choice editor; use the arrow keys to choose, Enter to apply, or Escape to cancel that choice while keeping the provider form open. In text fields, Ctrl+U clears the field and Escape cancels the edit. Terminal paste markers and line breaks are removed from pasted field values. Enter applies a field to the draft; **Save** persists the provider. Outside a field editor, Escape goes back. **Save and switch to this model** also selects the model for the next step, using the existing context-compaction check when needed. Escape cancels discovery and test requests. Saving configuration is allowed while the server is offline.
22
+
23
+ ## Models and context
24
+
25
+ **Discover models** requests `/models`, relative to the API prefix. Select models with Enter or Space, then choose **Use selected models**. Existing models are kept; remove one from its model editor when needed. If discovery is unavailable, choose **Add model manually** and enter the server's exact model ID.
26
+
27
+ Each model has its own context window and output budget. The context window is required before the model appears in `/model` or can be tested. Discovery accepts positive `max_model_len`, `context_length` or `context_window` values; unknown values remain blank. It does not infer capacity from the model's name.
28
+
29
+ For a listing identified as oMLX, DSCODE also reads `/models/status`. Valid positive integer `max_context_window` and `max_tokens` values take precedence over the model listing; the output budget must also be smaller than the context window. Missing or malformed optional metadata, and invalid optional limits, fall back to valid values in the base listing. Cancelling during this extra request cancels discovery instead of returning a partial success. These fields are **server-reported configuration**, not proof that a full-window request will fit in memory. The reported output setting is not treated as a hard architectural model limit.
30
+
31
+ The editor labels values as `server` or `user`. Editing a number makes it a user override; discovery refreshes server values while preserving those overrides. Changing the endpoint or model ID clears the previous deployment's reported limits and keeps explicit user overrides. A blank output budget defaults to the smaller of 4,096 tokens or one quarter of the context window. The existing compaction path reserves the output budget inside the context window.
32
+
33
+ Clearing the output budget explicitly selects that calculated default. Saving
34
+ preserves this choice in both terminal and Desktop settings, so reopening the
35
+ editor and discovering models again does not replace it with a server-reported
36
+ output limit. Models whose output budget has never been edited can still adopt
37
+ the server's reported value.
38
+
39
+ In Desktop's **Settings → DSCODE models**, **Discover models** immediately merges the returned models into the draft. Existing models keep their order, thinking mode and image-input choice; new models are appended. Reported limits refresh unless you have edited that value, including an output budget you deliberately left blank. Models absent from the response remain in the draft. Choose **Save provider** to persist the changes.
40
+
41
+ Thinking defaults to the server's behavior. Identified oMLX models also offer Off/On in the editor and Off/On in `/effort` (the stored effort IDs are `off` and `high`). Other custom APIs do not receive guessed reasoning parameters. Native Responses reasoning items and Anthropic thinking signatures are retained for replay to the same service, model and protocol.
42
+
43
+ ## Image input
44
+
45
+ In the model editor, set **Input → Text and images** only when that model and endpoint support image input. Existing configurations and newly discovered models default to **Text only**; DSCODE does not infer vision support from a model name. Discovery preserves your explicit choice. Changing the base URL, API format or model ID resets the editor's image choice to **Text only**, so enable it again for the new deployment.
46
+
47
+ In the [experimental Desktop package](browser-use.md#install-the-experimental-combined-desktop-package), open **Settings → DSCODE models**, select the saved provider, enable the model's **Accepts images** checkbox and choose **Save provider**. Select that saved model in the session's model picker. The same explicit capability setting and request-image limits apply in both interfaces. The settings test checks text, streaming and tools; it does not test image understanding.
48
+
49
+ All three protocols can send user images, browser annotation screenshots and images returned by tools. DSCODE reads their durable attachments and sends image bytes to the configured API: Chat Completions uses `image_url` data URLs, Responses uses `input_image`, and Anthropic Messages uses base64 `image` blocks. Tool screenshots follow their tool result as user image content. Enabling this option does not add vision capability to a text-only server.
50
+
51
+ Request images preserve aspect ratio within 4,194,304 pixels, with a 1 MiB encoded-byte target per image. The attachment encoder may exceed that per-image target when its smallest output is larger. A request has a 20 MiB aggregate base64 image budget; exceeding it asks the session's image-offload mechanism to omit older occurrences and retry. Original attachments remain in history. Previously offloaded occurrences stay omitted when changing models. A text-only route receives placeholders; enable image input before sending a new screenshot that the model needs to inspect.
52
+
53
+ ## Test and runtime behavior
54
+
55
+ The model editor's **Test text, streaming and tools** makes three short streamed requests: a fixed text answer, a synthetic tool call, and an answer after a fixed tool result. It never executes a real shell command or other tool. Results name the tested model and distinguish text/streaming, streamed arguments and the tool-result round trip. Starting another test clears the previous report immediately, including when the new request later fails or is cancelled. Tests are local to the current editor and cleared on configuration changes; they do not certify thinking behavior, image input, model quality or long-context operation. The Desktop **Test model** buttons follow the same reporting rules. oMLX probes turn thinking off.
56
+
57
+ Desktop discovery and model tests offer **Cancel request** while waiting. Cancelling preserves the provider draft and unsaved key, and discards any result that arrives afterward. Closing the settings page also cancels an active discovery or test. Saving and removing providers run to completion and do not offer cancellation.
58
+
59
+ The default stream idle timeout is 180 seconds to allow cold model loading. Desktop model tests use the same configured idle timeout, without an additional total-duration cutoff; an active stream can run longer while continuing to deliver data. Discovery has a separate ten-second timeout. Each service permits one in-flight inference request per DSCODE Host; queued title and compaction calls yield to queued foreground calls. This is not a machine-wide limit across separate DSCODE processes. Cancellation releases the queue slot and aborts the HTTP request.
60
+
61
+ Text, structured tool calls and explicitly enabled image input use the same configured service. The local session history is authoritative for all three protocols; Responses requests use stateless replay rather than relying on a remote response ID. Interrupted streams are errors, and invalid tool arguments are rejected before executing the tool. Requests do not redirect or fall back to another model service.
62
+
63
+ Automatic review follows its configured model route. When that route is Custom, it skips the cloud Jev shortcut. The default web-search router does not fall back to a cloud search service for Custom sessions; configure a separate web search provider explicitly if needed. This does not disable other configured MCPs, browser tools or external integrations.
64
+
65
+ ## Persistence
66
+
67
+ Service and model configuration lives in `~/.dscode/providers.yaml`; keys use the existing owner-only `~/.dscode/credentials.yaml` store. Provider records contain no key values. Each service receives a stable `custom-…` ID and a derived `DSCODE_CUSTOM_CUSTOM_…_API_KEY` credential reference. An environment variable with that exact reference takes precedence over the saved key, following the existing credential-store rules.
68
+
69
+ Configuration is shared across projects and installed versions, written atomically, and reloaded by other running Hosts. Stale editors cannot overwrite newer configuration. Renaming a service preserves its ID, so persisted sessions continue to resolve it. Removing a provider removes its route and writable stored credential; it does not reroute existing sessions or delete their history. An environment-supplied key remains in the environment. If it masks a stored key, clear the environment override before removing the provider to remove that stored key too.
70
+
71
+ ## Development verification
72
+
73
+ The fixture suites exercise all three stream formats, tool-result replay, credential storage, context budgeting, cancellation, native Harness registration, session route restoration and terminal input. Image fixtures run browser annotation admission through the native model registry and durable attachment store to a local HTTP server, checking actual image bytes in all three protocols, text-only projections, durable offloading and cancellation. They use synthetic pixels and scripted responses; they do not establish a live model's visual understanding or complete Desktop UI behavior. An explicit live probe can use an environment key without saving a provider:
74
+
75
+ ```bash
76
+ DSCODE_CUSTOM_BASE_URL=http://studio:8000/v1 \
77
+ DSCODE_CUSTOM_MODEL=your-model-id \
78
+ DSCODE_CUSTOM_KEY_ENV=OMLX_API_KEY \
79
+ node --env-file=.env scripts/verify-custom-provider.mjs
80
+ ```
81
+
82
+ That probe tests all three protocols. It requires the endpoint to serve all three; a failed protocol stays failed in its output.
83
+
84
+ For multi-step browser tasks with independent outcome checks, run
85
+ `npm run eval:browser -- --provider custom-YOUR-ID --model your-model-id`.
86
+ This uses the saved service, model settings and credential through the same adapter.
87
+ See [Browser use](browser-use.md#measure-multi-step-task-performance) for budgets,
88
+ credential overrides, reports and the distinction between scripted checks and model quality.
package/docs/demo.md ADDED
@@ -0,0 +1,76 @@
1
+ # The 90-second demo
2
+
3
+ Most coding agents work alone. This script shows the three things DSCODE does
4
+ instead — sessions that can see each other, an independent reviewer for code and
5
+ for approvals, and side questions that never disturb the main conversation — in
6
+ an order a stranger can follow.
7
+
8
+ The recording lands in `assets/demo.gif`; put that image directly under the
9
+ README tagline. Every command below is real, so the demo is reproducible: the
10
+ only unpredictable part is the model's own wording.
11
+
12
+ ## Record it
13
+
14
+ ```sh
15
+ brew install asciinema agg
16
+ cd /path/to/dscode # the repo, so the cast can be saved next to it
17
+ asciinema rec demo.cast -i 2 # then run the shot list below; -i trims pauses
18
+ agg demo.cast assets/demo.gif # renders the cast into the gif the README shows
19
+ ```
20
+
21
+ Checked against **asciinema 3.2.1 + agg 1.9.0**: `rec` writes asciicast v3 by
22
+ default and `agg` reads it, as it does v2 — pass `-f asciicast-v2` if you use an
23
+ older `agg`. `-i 2` (idle time limit) caps every pause at two seconds, which
24
+ keeps the gif close to the 90 seconds you actually plan; recording has to happen
25
+ in a real terminal window, since the command needs the child's pty.
26
+
27
+ Before you hit record:
28
+
29
+ - Window at least **120 columns** and a font around 14pt: the footer, the panels
30
+ and `/btw` all want width. Dark theme (the default).
31
+ - A scratch repository so nothing personal shows up:
32
+ ```sh
33
+ mkdir -p ~/demo && cd ~/demo && git init
34
+ printf 'export const parse = (text: string) => text.split(",")\n' > parser.ts
35
+ printf 'import { parse } from "./parser"\nconsole.log(parse("a,b,c"))\n' > index.ts
36
+ git add -A && git commit -m "start"
37
+ ```
38
+ - Your normal installation and credentials (do not show `dscode doctor` output
39
+ or full home paths). Any interface language works; the captions below are
40
+ English.
41
+
42
+ ## Shot list
43
+
44
+ | Time | Screen | Do this | Say this (captions) |
45
+ |---|---|---|---|
46
+ | 0:00–0:06 | Shell in the scratch repo | `dscode` | "A coding agent in your terminal — macOS, local, one pinned harness." |
47
+ | 0:06–0:22 | TUI, main session | Type `Add a bounds check to parse() in parser.ts and run the tests.` | "It reads the file, edits it, runs the tests." |
48
+ | 0:22–0:36 | Same terminal | `/btw why would the first turn have a cold cache?` — leave the main turn running | "A side question runs in its own read-only child session. The answer never enters the main conversation." |
49
+ | 0:36–0:56 | Second terminal | `dscode sessions` then `dscode send <the other session id> --steer "review the change in parser.ts and reply with what you would change"` | "Two sessions on one machine can find each other, hand work over and answer." |
50
+ | 0:56–1:06 | Back in the first terminal | Show the reply arriving (`/mailbox`, or the agent's `read_session`/`send_session` tools if you asked it to hand the review over itself) | "The answer comes back as a message, not as a new task." |
51
+ | 1:06–1:20 | Same terminal | `/review` | "And the diff can go to an independent reviewer model that never saw this session." |
52
+ | 1:20–1:30 | Closing card | Static title + `npm i -g @toddzheng024/dscode` | "Agents that work as a team. `npm i -g @toddzheng024/dscode`" |
53
+
54
+ Two beats worth keeping if you have the seconds:
55
+
56
+ - `/permission auto-review` then `/review-usage`: the approval layer is a model that
57
+ scores whether **your instruction** authorized the exact action, and the panel
58
+ shows what that cost. Hard to stage reliably on camera; describe it in the
59
+ closing card instead if the demo must be shot in one take.
60
+ - `/agents` at the end: the `/btw` child session is a real, read-only session,
61
+ not a hidden prompt.
62
+
63
+ ## Reproduce it without recording
64
+
65
+ ```sh
66
+ npm i -g @toddzheng024/dscode
67
+ cd ~/demo && dscode # terminal 1: the main session
68
+ dscode sessions # terminal 2: both session ids
69
+ dscode send <id> --steer "review the change in parser.ts and reply with what you would change"
70
+ dscode read <id> # read that session's event page
71
+ dscode watch <id> # subscribe to it instead
72
+ ```
73
+
74
+ In the TUI: `/btw <question>` (side question), `/review` (independent review of
75
+ the diff), `/permission auto-review` + `/review-usage` (approval policy and its cost),
76
+ `/agents` (every child session), `/mailbox` (messages between sessions).
@@ -0,0 +1,58 @@
1
+ # Distribution and one-command start
2
+
3
+ The npm + Hub release path is covered in [Hub distribution](hub-distribution.md). The tar installation below is retained.
4
+
5
+ The deliverable is an installable `dscode-0.7.8.tar.gz`, not just a configured `.dshprofile`. After installing, the user runs `dscode` directly. The npm + Hub installation is available and the tar packages ship through GitHub Releases; a Homebrew formula in the [`qiz029/tap`](https://github.com/qiz029/homebrew-tap) tap installs the same launcher (Homebrew 7 wants `brew trust qiz029/tap` before the first install).
6
+
7
+ ## Publisher
8
+
9
+ ```sh
10
+ npm run dist
11
+ ```
12
+
13
+ It produces three tarballs, all attached to the GitHub release:
14
+
15
+ | File | Contents | Needed to install |
16
+ |---|---|---|
17
+ | `dscode-<version>-darwin-arm64.tar.gz`, `dscode-<version>-darwin-x64.tar.gz` | Prebuilt package: the source tree + the locked `node_modules` installed for that platform + a `.dscode-prebuilt` marker (about 70 MB) | Node, Git; **no npm and no npm registry access** |
18
+ | `dscode-<version>.tar.gz` | Source package: launcher, preset, dependency manifest and the complete lockfile, without node_modules (about 1 MB) | Node, npm, Git; downloads the locked dependencies from npm at install time |
19
+
20
+ None of them contains model keys, local override configuration, sessions or research files. The prebuilt package is produced in a staging directory with `npm ci --ignore-scripts --os=darwin --cpu=<arch>` — the same command the installer runs itself, and the native modules are all precompiled optional dependencies selected by `os`/`cpu`, so one runner can build both architectures. `DSCODE_PREBUILT_ARCHS=arm64` builds one architecture only, and an empty string builds the source package alone.
21
+
22
+ ## User
23
+
24
+ macOS 14+, Node 22.19+ (22.x) or 24+, Git (for `apply_patch`) and Google Chrome are required. npm is needed only when installing from the source package.
25
+
26
+ The same script can fetch the package by itself: run from a pipe it enters remote mode, resolves the latest release, verifies the publisher's sha256 digest, unpacks, and then hands over to the `install.sh` inside the package, so the downloaded version and the install script's understanding of the layout cannot diverge. It prefers the prebuilt package for the current platform, and the whole installation only reaches GitHub — a corporate npm registry proxy blocking installs does not affect it; when a release has no prebuilt package for the platform it falls back to the source package with a notice, and `DSCODE_INSTALL_SOURCE=1` asks for the source package explicitly. When the packaged `install.sh` sees `.dscode-prebuilt` and `node_modules` it skips `npm ci` and provisions directly with `node scripts/harness.mjs setup`; a marker for a different platform refuses the installation.
27
+
28
+ ```sh
29
+ curl -fsSL https://raw.githubusercontent.com/qiz029/dscode/main/install.sh | sh
30
+ # pin a version
31
+ curl -fsSL https://raw.githubusercontent.com/qiz029/dscode/main/install.sh | sh -s -- 0.7.8
32
+ ```
33
+
34
+ Or unpack the same tarball by hand:
35
+
36
+ ```sh
37
+ mkdir dscode-install
38
+ tar -xzf dscode-0.7.8-darwin-arm64.tar.gz -C dscode-install
39
+ sh dscode-install/install.sh
40
+ cd /path/to/project
41
+ dscode
42
+ ```
43
+
44
+ The default installation goes to `~/.local/share/dscode` with the command linked as `~/.local/bin/dscode`. If that bin directory is not on PATH, add `export PATH="$HOME/.local/bin:$PATH"` to the shell configuration and reopen the terminal.
45
+
46
+ Enter `/model` once to configure a provider and a model. macOS Computer Use still needs the user to grant Accessibility/Screen Recording permission; those permissions and credentials cannot be distributed with the package.
47
+
48
+ `dscode --continue`, `dscode --resume SESSION_ID` and `dscode --cwd /path/to/project` are supported. By default it operates on the current terminal directory; state is kept in the installation's `.runtime`. A custom location can be set at install time with the absolute `DSCODE_INSTALL_DIR` and `DSCODE_BIN_DIR`.
49
+
50
+ Re-running the installer keeps a tar installation current rather than refusing: it reads the installed version, leaves an equal or newer one alone, and hands an older one to that installation's own `dscode update`, which performs the swap with its state migration and backup. A directory that is not a DSCODE installation, or a `dscode` command that belongs to another installation (a source checkout, an npm launcher), is still never overwritten — the installer refuses and names the path it found. Since the version with a self-contained `dscode update`, a tar installation supports self-upgrade: `dscode update [exact version]` downloads the tarball from GitHub Releases, verifies it against the publisher's sha256 digest, migrates `.runtime`, `.env` and the local config, and swaps the directory in place (the `dscode` command path does not change and needs no relinking), keeping the old installation as a sibling backup directory to switch back to or discard by hand. An update requires no running session; when the release has a prebuilt package for the current platform it takes that, so the upgrade needs no npm either, otherwise it takes the source package and downloads the locked dependencies with npm ci. A tar installation older than that has no updater: unpack the new tarball into a new directory and migrate the state by hand once.
51
+
52
+ ## Why not plain npm install -g today
53
+
54
+ An npm `overrides` entry in the dependencies does not become the resolution rule of a root project when the package is installed as a third-party dependency. This composition needs a single pinned DSH rc line, so it keeps the verified locked dependency graph by using the root manifest inside the install package and `npm ci`. `package.json` already declares the `dscode` bin, but a bare bin declaration is not evidence of npm global-install compatibility.
55
+
56
+ A one-line `curl | sh` installation is available, reusing the GitHub Releases tarball and the publisher's sha256 digest, and preferring the npm-free prebuilt package; a release without a digest is refused rather than installed unverified. A Homebrew formula ships in the `qiz029/tap` tap: it installs the published launcher tarball into `libexec`, so the pinned dependency graph is npm's rather than the formula's, writes the `.dscode-brew` marker that keeps `dscode update` off the npm pass, and leaves the launcher to `brew upgrade`.
57
+
58
+ The complete tarball contains `presets/dscode`, `bin/apply_patch` and the version-locked runtime patch scripts. setup enables dscode by default and installs Ultra effort support; the node_modules inside a prebuilt package comes from a fresh install of the lockfile in a staging directory, so the local node_modules is never packed. An old session keeps resuming under its original preset; use `dscode --mode dscode` to create a new session explicitly.
@@ -0,0 +1,75 @@
1
+ # DSCODE preset and Ultra
2
+
3
+ The interactive TUI is fixed to the `dscode` preset. `/new` starts a DSCODE conversation; the preset picker is absent from slash completion and help. Typing `/mode` reports that the preset is fixed, and `/new <other-preset>` or `--mode <other-preset>` is refused. The hidden compatibility flag `--mode dscode` still works. Resuming an older conversation mounts DSCODE while preserving its transcript and recording the new effective preset; the original session header is retained. Model, reasoning effort, permissions and plan mode keep their separate controls.
4
+
5
+ ## Execution through a persistent shell
6
+
7
+ The preset combines the pinned minimal preset's owner-scoped persistent shell with project instructions, runtime context, Skills, plan/Todo/Goal, compaction and subagents from standard. It does not copy minimal's fixed complete system prompt or its lack of compaction. Host MCP, Computer Use, hooks and auto review remain mounted. Skill and instruction discovery — including the ancestor mode — is described in [Skills](skills.md).
8
+
9
+ The preset also registers a `review` tool and `/review` command backed by one independent, read-only model request over the selected Git diff. The main agent is guided to call it after code changes and focused checks, before its final reply. This is a diff-only review, not a tool-using subagent or a substitute for tests; it does not change Ultra delegation policy. See [TUI review usage](tui-commands.md).
10
+
11
+ The model uses `bash` for file reads, searches and edits instead of separate `read`, `write`, `edit`, `glob` and `grep` tools. `cd`, exports, functions and background jobs persist across calls for the same agent. Each child gets a separate shell. By default children share workspace files; the parent can explicitly set `worktree: true` on `subagent` or `subagent_fork` to give a child an isolated Git checkout.
12
+
13
+ `apply_patch` is available in the harness shell PATH and wraps `git apply`. Feed it a **standard unified diff**, not the Codex `*** Begin Patch` format. Git is required. `apply_patch --check` checks hunks without writing. This works outside a Git repository too.
14
+
15
+ ```sh
16
+ apply_patch <<'PATCH'
17
+ diff --git a/example.txt b/example.txt
18
+ --- a/example.txt
19
+ +++ b/example.txt
20
+ @@ -1 +1 @@
21
+ -before
22
+ +after
23
+ PATCH
24
+ ```
25
+
26
+ `/shell` lists the current session's terminals. `/shell reset` closes them while the agent is idle. Timeout, cancellation, `exit`, reset and host restart discard shell state; the next call starts at the session workspace. Conversation resume restores messages and files, **not** an OS process or its exports. Interactive foreground programs that require stdin are not supported by this tool. Background work can use shell job control; `shell_retry` also exposes the existing tracked background-job mechanism.
27
+
28
+ Normal persistent commands keep the active OS sandbox and do not each incur an LLM review. After a genuine sandbox denial, the model may use `shell_retry` for a single fresh-shell retry, with explicit `workdir`, wider `sandbox_permissions` and justification. This uses the original escalation approval seam and auto reviewer. Reviewer input resolves relative workdir against the session workspace and explicitly identifies the environment as fresh. It cannot see or rely on the persistent shell's exports/functions. Rejected approval prevents execution. Sandbox mode changes while persistent terminals exist are rejected upstream; close them with `/shell reset` first when changing permission modes that also change sandbox policy.
29
+
30
+ Hooks which should cover both execution paths should match `^(bash|shell_retry)$`.
31
+
32
+ ## Ultra effort
33
+
34
+ In the DeepSeek native route, `/effort` replaces the bottom composer with a Low → High → Max → Ultra bar (arrow keys to move, Enter to apply, Esc to cancel, `o` for Off). Focusing Ultra triggers a blue wave that spreads from the center before confirmation. After applying Ultra, the composer briefly shows a second center-out text-and-border ripple. Both effects are skipped when animations are disabled. Ultra is a harness policy, not a new DeepSeek API value:
35
+
36
+ - Session selection and request headers retain `ultra`; the native adapter serializes it as `thinking.type: enabled` and `reasoning_effort: max`.
37
+ - Normal tool-capable requests get collaboration guidance appended to the effective system message at the adapter boundary. The immutable logged request is not mutated. This extra text is reflected in provider usage; preflight local token estimates do not include the adapter-added text.
38
+ - The guidance actively seeks independent useful subtasks, disjoint file ownership and independent review, while avoiding delegation for trivial work. The main agent integrates and verifies results.
39
+ - Children inherit the effort when no model/effort override is selected. Ultra stays in the persisted request header across compaction and the TUI's standard restore path; switching effort to Max removes the extra guidance on subsequent requests. Switching to a different provider uses that provider's own effort catalog.
40
+ - In dscode, a parent can run at most five direct children concurrently below Ultra and twenty at Ultra, judged by the parent's effort when it launches or wakes a child; admission reservations prevent concurrent launches from racing past the cap. Idle-child wake requests also count. The preset allows one delegation level, including non-Ultra sessions. Parent/child messaging remains available; direct sibling messaging is not added.
41
+ - Every child gets a parent-chosen `name`: 1 to 10 characters, letters, digits and underscores only, starting and ending with a letter, unique among the parent's live, resumable and starting children. The child appears as `/name · description` in the TUI agents line and `/agents`, and the parent addresses it as `/name` in `send_message` and `interrupt_agent`; a child addresses its parent as `/`. Continuable child names resolve from the parent's saved catalog after a Host restart, and sending to one resumes that same child. Lookup alone does not wake it. A disposed foreground child cannot be resumed by name. Session ids keep working as before.
42
+ - Prefer `subagent_fork` when completed conversation history helps the child; use fresh `subagent` for self-contained work that gains nothing from that history. Fork excludes the unfinished turn, so the child's assignment must still state its objective and constraints. Both child paths hide delegation tools, and runtime checks reject a child that tries to delegate again.
43
+ - Worktree choice is independent of conversation forking. `worktree: true` creates a detached checkout under `.dscode-worktrees/<id>/` at the parent repository root, starting from `HEAD`. It requires the parent session cwd to be that Git root and the parent worktree to be clean, including untracked files. A dirty parent is rejected before creating a child, so a child never silently misses uncommitted parent changes. Omit the flag for read-only tasks or when the child needs those changes; choose it for independent parallel edits. The child session persists its own cwd; the parent receives the path in the tool result and must inspect and integrate the diff. The checkout remains available for later messages to an idle child; remove it with `git worktree remove PATH` only when no child follow-up or resume is expected. Removing it earlier makes that child's future file work fail. Worktrees with edits are retained on child failure, while an empty checkout is removed if child startup fails. The directory is added to local `.git/info/exclude` so it does not appear as an untracked parent change.
44
+ - Every effort can start or wake child agents, so models without a `max` level (which never offer Ultra) can delegate too. Below Ultra there is no collaboration policy; the shell policy makes delegation the exception instead: the agent works itself by default, delegates only a substantial independent part or a broad read-only investigation, runs at most one child at a time and picks the lowest child effort the model offers. This is prompt guidance; the runtime enforces only the five-child cap and the single delegation level. `workflow` and `ralph` are unavailable in this preset because they can start children outside the admission cap.
45
+ - Compaction/title requests do not get the collaboration instruction. Auto review does not inherit the main agent's Ultra selection. Permissions are unchanged.
46
+
47
+ Use Ultra for complex changes with independent investigation/implementation/review opportunities. It is not the default and can cost more tokens because children make additional model requests. `/agents` shows their activity; `/status` and `/review-usage` expose the existing recorded usage surfaces. The native root token totals are not a complete bill for child sessions. The session footer separately aggregates recorded descendant calls; see [session metrics](session-metrics.md).
48
+
49
+ Normal `deepseek-flash` agent requests also receive a short task-proportional instruction: answer simple questions directly; for bounded code changes, make the focused change, run the relevant check, and stop when it passes. This is guidance rather than a hard reasoning-token limit. Internal compaction and other non-agent calls do not receive it.
50
+
51
+ ## Delegate mode
52
+
53
+ `/delegate <task>` asks the main agent to coordinate the task instead of doing it. The command only checks that the session starts at a clean Git repository root and then queues the task with a fixed coordinator protocol as the agent's next turn; planning, dispatch, verification and merging are the model following that protocol, while the runtime enforces the child cap and keeps the board. It works at every effort and overrides the below-Ultra one-child guidance for that task.
54
+
55
+ The main agent first plans the parts on a delegate board with the `delegate_board` tool: each task gets a title, the child name it will run under, its owned files, a priority (`high`, `normal` or `low`) and the tasks it depends on — only those whose changes it must build on. The board rejects dependency cycles. A pending task is ready once every dependency is complete, and blocked until then; the runtime refuses to launch a blocked task. Ready tasks are ordered by effective priority, which is a task's own priority or that of any open task waiting on it, whichever is higher, so work that unblocks a high-priority task goes first. The main agent launches ready tasks in that order, in the background with `worktree: true`, while child slots are free — five below Ultra, twenty at Ultra — and launches the next ones as children settle. Launching a child under a task's planned name moves the task to running. `delegate_board update` re-plans a pending task's priority or dependencies, and dropping a task releases the tasks that waited on it. Whenever the board changes, the main agent receives its state and the number of free slots as a message ahead of its next step, so a free slot with pending work is always in view. The state is not placed in the system prompt, because rewriting the prompt on every change would invalidate the provider's prompt cache for the whole conversation; the terminal hides these board messages, and `/delegate` itself appears as one line.
56
+
57
+ Children work only in their own worktree and leave their changes uncommitted. A task with dependencies starts from their verified changes: its child applies each dependency's diff from the worktree path the board recorded, then commits the result as a baseline on its worktree's detached HEAD. That commit never reaches a branch; it keeps the child's own diff separate from its dependencies' changes. A child that is blocked sends its question to `/` and waits; its task stays in running, marked as waiting, until the main agent answers with `send_message`. Once a child settles, its task shows as verifying. The main agent verifies tasks that others depend on first, since they gate further work. It reviews the worktree and reruns its checks there, then records the task as complete with the evidence, sends the child fixes, or reopens the task. A task cannot be completed before its child was launched, and the tool requires the verification evidence.
58
+
59
+ Merging waits until every task is complete or dropped, because a new worktree needs a clean main workspace. Complete tasks are then merged in dependency order, each dependency before the tasks built on it, so a task with a baseline contributes only its own changes. Each is merged with `git -C <worktree> add -A && git -C <worktree> diff --cached --binary | git apply --3way`, which stages the result; nothing is committed, branched or pushed unless you ask. The final reply lists each task's outcome and the checks run in the main workspace.
60
+
61
+ `/delegate-dashboard` opens the board as a kanban with pending, running, verifying and complete columns. Running and verifying are read from the children's live status, not from what the model last reported, so the board cannot claim a child is working after it stopped. Boards are kept per session under `$DSH_HOME/delegate-boards/` and survive a restart; `delegate_board clear` empties one.
62
+
63
+ ## Implementation and checks
64
+
65
+ `presets/dscode/agent.cordis.yml` is the checked-in composition template. Setup renders it as one `@deepseek-ai/dsh-agent-preset` declaration row at the end of the profile patch, with its plugin paths resolved; DSH 0.1.7's preset registry reads declaration rows and no longer discovers presets from a directory. The launcher performs idempotent, version-checked patches to the pinned native DeepSeek adapter (Ultra), bash tool (separate name for retry), persistent shell (reset cache invalidation), and DSH-Code TUI (existing `/clear`/command discovery fixes). Unsupported upstream package versions or source shapes fail setup. These changes are included in the full tar distribution; the Hub-only configuration export does not include them.
66
+
67
+ Tests cover real serialized DeepSeek requests with mocked HTTP, concurrent admission reservations, persistent cwd/exports, unified-diff file editing, fresh retry isolation, approval denial, cancellation/reset, actual child shell isolation, deterministic manual compaction and TUI-equivalent Ultra restoration. The actual terminal picker was also checked for Ultra and the default dscode mode. These are local deterministic checks, not a paid DeepSeek quality or multi-agent performance benchmark.
68
+
69
+ ### Task-proportional execution
70
+
71
+ Ultra keeps native `max` reasoning but now explicitly routes bounded work (such as one unit test) through direct implementation and focused verification. It avoids unnecessary planning, child agents, broad repository scans and repeated review. Expand scope only for a concrete uncertainty or failure; stop when acceptance criteria and required checks pass. This is prompt guidance, not a runtime deadline or adaptive reasoning-effort switch. It has not yet been benchmarked against the reported slow session, and cannot guarantee shorter model deliberation.
72
+
73
+ ### Per-child reasoning effort
74
+
75
+ The parent can pass `reasoning_effort` to `subagent` or `subagent_fork`, independently of the model-selection opt-in. For example: `{"name":"unit_tests","description":"Add focused unit tests","prompt":"...","reasoning_effort":"low"}`. Omission keeps existing inheritance. The selected child model validates the effort before child creation; unsupported values fail instead of silently falling back. Effort-only selection does not change provider/model or the parent's effort. Explicit provider/model overrides still require the existing model-selection policy. Ultra guidance asks parents to choose low for bounded work, high for difficult work and max only when justified. This configures newly created children, not existing children sent another message.