@duckmind/dm-windows-x64 0.61.5 → 0.62.1

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 (285) hide show
  1. package/dm.exe +0 -0
  2. package/extensions/.dm-extensions.json +215 -71
  3. package/extensions/dm-cua/bin/browser-cua.mjs +6 -1
  4. package/extensions/dm-cua/index.js +3 -2
  5. package/extensions/dm-cua/src/browser-cua-lib.mjs +69 -13
  6. package/extensions/dm-subagents/agents/claude-code-writer.md +15 -0
  7. package/extensions/dm-subagents/agents/claude-code.md +15 -0
  8. package/extensions/dm-subagents/agents/codex-exec-writer.md +15 -0
  9. package/extensions/dm-subagents/agents/codex-exec.md +15 -0
  10. package/extensions/dm-subagents/agents/cursor-agent-writer.md +14 -0
  11. package/extensions/dm-subagents/agents/cursor-agent.md +14 -0
  12. package/extensions/dm-subagents/agents/delegate.md +3 -2
  13. package/extensions/dm-subagents/agents/oracle.md +10 -5
  14. package/extensions/dm-subagents/agents/researcher.md +2 -2
  15. package/extensions/dm-subagents/agents/reviewer.md +17 -7
  16. package/extensions/dm-subagents/agents/scout.md +5 -5
  17. package/extensions/dm-subagents/agents/worker.md +6 -2
  18. package/extensions/dm-subagents/async-retention-discovery-worker.mjs +167 -0
  19. package/extensions/dm-subagents/index.js +4 -0
  20. package/extensions/dm-subagents/inspector-runner.mjs +10 -0
  21. package/extensions/dm-subagents/install.mjs +3 -2
  22. package/extensions/dm-subagents/package.json +2 -2
  23. package/extensions/dm-subagents/prompts/council.md +60 -0
  24. package/extensions/dm-subagents/prompts/parallel-review.md +5 -1
  25. package/extensions/dm-subagents/prompts/review-loop.md +13 -7
  26. package/extensions/dm-subagents/skills/council-mode/SKILL.md +59 -0
  27. package/extensions/dm-subagents/skills/council-mode/references/pass-contracts.md +150 -0
  28. package/extensions/dm-subagents/skills/dm-subagents/SKILL.md +96 -911
  29. package/extensions/dm-subagents/skills/dm-subagents/references/constraints-and-recipes.md +70 -0
  30. package/extensions/dm-subagents/skills/dm-subagents/references/execution-controls.md +539 -0
  31. package/extensions/dm-subagents/skills/dm-subagents/references/management-authoring-rpc.md +161 -0
  32. package/extensions/dm-subagents/skills/dm-subagents/references/multi-lane-orchestration.md +51 -0
  33. package/extensions/dm-subagents/skills/dm-subagents/references/prompting-and-roles.md +295 -0
  34. package/extensions/dm-subagents/skills/dm-subagents/references/review-and-validation.md +73 -0
  35. package/extensions/dm-subagents/src/agents/agent-management.js +716 -484
  36. package/extensions/dm-subagents/src/agents/agent-refinements.js +563 -0
  37. package/extensions/dm-subagents/src/agents/agent-serializer.js +70 -5
  38. package/extensions/dm-subagents/src/agents/agents.js +1447 -299
  39. package/extensions/dm-subagents/src/agents/builtin-names.js +15 -0
  40. package/extensions/dm-subagents/src/agents/chain-serializer.js +12 -7
  41. package/extensions/dm-subagents/src/agents/frontmatter.js +64 -14
  42. package/extensions/dm-subagents/src/agents/identity.js +1 -1
  43. package/extensions/dm-subagents/src/agents/proactive-skills.js +14 -11
  44. package/extensions/dm-subagents/src/agents/runtime-agent-events.js +49 -0
  45. package/extensions/dm-subagents/src/agents/runtime-agent-registry.js +412 -0
  46. package/extensions/dm-subagents/src/agents/skills.js +52 -35
  47. package/extensions/dm-subagents/src/api/agents.js +6 -0
  48. package/extensions/dm-subagents/src/api/background-work.js +151 -0
  49. package/extensions/dm-subagents/src/api/capability-ceiling.js +12 -0
  50. package/extensions/dm-subagents/src/api/control-channel.js +3 -0
  51. package/extensions/dm-subagents/src/api/delegation.js +5 -0
  52. package/extensions/dm-subagents/src/api/dm-args.js +3 -0
  53. package/extensions/dm-subagents/src/api/external-job-provider.js +137 -0
  54. package/extensions/dm-subagents/src/api/external-runs.js +233 -0
  55. package/extensions/dm-subagents/src/api/intercom-bridge.js +3 -0
  56. package/extensions/dm-subagents/src/api/preflight.js +322 -0
  57. package/extensions/dm-subagents/src/api/project-panes.js +11 -0
  58. package/extensions/dm-subagents/src/api/shared-types.js +4 -0
  59. package/extensions/dm-subagents/src/extension/config.js +175 -0
  60. package/extensions/dm-subagents/src/extension/control-notices.js +4 -43
  61. package/extensions/dm-subagents/src/extension/doctor.js +71 -17
  62. package/extensions/dm-subagents/src/extension/fanout-child.js +49 -32
  63. package/extensions/dm-subagents/src/extension/index.js +711 -265
  64. package/extensions/dm-subagents/src/extension/public-execution.js +114 -0
  65. package/extensions/dm-subagents/src/extension/rpc.js +427 -22
  66. package/extensions/dm-subagents/src/extension/schemas.js +158 -65
  67. package/extensions/dm-subagents/src/extension/steering-notices.js +23 -0
  68. package/extensions/dm-subagents/src/extension/subagent-guide.js +31 -0
  69. package/extensions/dm-subagents/src/extension/tool-description.js +92 -74
  70. package/extensions/dm-subagents/src/extension/tool-result.js +7 -0
  71. package/extensions/dm-subagents/src/inspectors/herdr/actions.js +218 -0
  72. package/extensions/dm-subagents/src/inspectors/herdr/client.js +123 -0
  73. package/extensions/dm-subagents/src/inspectors/herdr/focus.js +47 -0
  74. package/extensions/dm-subagents/src/inspectors/herdr/inspector-runner.js +160 -0
  75. package/extensions/dm-subagents/src/inspectors/herdr/project-panes.js +618 -0
  76. package/extensions/dm-subagents/src/inspectors/herdr/session-roots-codec.js +21 -0
  77. package/extensions/dm-subagents/src/inspectors/herdr/shell-command.js +15 -0
  78. package/extensions/dm-subagents/src/integrations/herdr-status.js +377 -0
  79. package/extensions/dm-subagents/src/intercom/intercom-bridge.js +17 -13
  80. package/extensions/dm-subagents/src/intercom/native-supervisor-channel.js +371 -79
  81. package/extensions/dm-subagents/src/intercom/result-intercom.js +47 -7
  82. package/extensions/dm-subagents/src/missions/actions.js +394 -0
  83. package/extensions/dm-subagents/src/missions/goal-driver.js +149 -0
  84. package/extensions/dm-subagents/src/missions/lifecycle.js +331 -0
  85. package/extensions/dm-subagents/src/missions/store.js +548 -0
  86. package/extensions/dm-subagents/src/missions/types.js +9 -0
  87. package/extensions/dm-subagents/src/missions/workflow-state.js +245 -0
  88. package/extensions/dm-subagents/src/policy/authority.js +37 -0
  89. package/extensions/dm-subagents/src/profiles/profiles.js +36 -18
  90. package/extensions/dm-subagents/src/runs/background/active-async-capacity.js +427 -0
  91. package/extensions/dm-subagents/src/runs/background/active-run-index.js +122 -0
  92. package/extensions/dm-subagents/src/runs/background/async-execution.js +925 -137
  93. package/extensions/dm-subagents/src/runs/background/async-job-tracker.js +515 -148
  94. package/extensions/dm-subagents/src/runs/background/async-resume.js +378 -51
  95. package/extensions/dm-subagents/src/runs/background/async-retention.js +828 -0
  96. package/extensions/dm-subagents/src/runs/background/async-status-snapshot.js +31 -0
  97. package/extensions/dm-subagents/src/runs/background/async-status.js +259 -22
  98. package/extensions/dm-subagents/src/runs/background/auto-drain.js +46 -0
  99. package/extensions/dm-subagents/src/runs/background/chain-append.js +50 -15
  100. package/extensions/dm-subagents/src/runs/background/chain-root-attachment.js +67 -12
  101. package/extensions/dm-subagents/src/runs/background/completion-batcher.js +5 -1
  102. package/extensions/dm-subagents/src/runs/background/completion-dedupe.js +3 -11
  103. package/extensions/dm-subagents/src/runs/background/completion-replay.js +245 -0
  104. package/extensions/dm-subagents/src/runs/background/control-channel.js +423 -36
  105. package/extensions/dm-subagents/src/runs/background/fleet-view.js +132 -59
  106. package/extensions/dm-subagents/src/runs/background/index-segment.js +38 -0
  107. package/extensions/dm-subagents/src/runs/background/inspect-rpc.js +373 -0
  108. package/extensions/dm-subagents/src/runs/background/notify.js +357 -57
  109. package/extensions/dm-subagents/src/runs/background/owned-process-tree.js +86 -0
  110. package/extensions/dm-subagents/src/runs/background/process-terminal.js +269 -0
  111. package/extensions/dm-subagents/src/runs/background/result-delivery-ownership.js +34 -0
  112. package/extensions/dm-subagents/src/runs/background/result-files.js +469 -0
  113. package/extensions/dm-subagents/src/runs/background/result-watcher.js +540 -75
  114. package/extensions/dm-subagents/src/runs/background/resume-guidance.js +44 -0
  115. package/extensions/dm-subagents/src/runs/background/retained-children.js +119 -0
  116. package/extensions/dm-subagents/src/runs/background/run-id-query.js +5 -0
  117. package/extensions/dm-subagents/src/runs/background/run-id-resolver.js +93 -9
  118. package/extensions/dm-subagents/src/runs/background/run-status.js +303 -32
  119. package/extensions/dm-subagents/src/runs/background/scheduled-runs.js +784 -376
  120. package/extensions/dm-subagents/src/runs/background/stale-run-reconciler.js +75 -34
  121. package/extensions/dm-subagents/src/runs/background/steering.js +221 -0
  122. package/extensions/dm-subagents/src/runs/background/subagent-runner.js +3106 -844
  123. package/extensions/dm-subagents/src/runs/background/subagent-wait.js +529 -0
  124. package/extensions/dm-subagents/src/runs/background/terminal-run-index.js +106 -0
  125. package/extensions/dm-subagents/src/runs/background/top-level-async.js +1 -1
  126. package/extensions/dm-subagents/src/runs/background/wait-completions.js +155 -0
  127. package/extensions/dm-subagents/src/runs/background/wait-config.js +46 -0
  128. package/extensions/dm-subagents/src/runs/background/wait-subscriptions.js +278 -0
  129. package/extensions/dm-subagents/src/runs/background/wait-tool.js +47 -0
  130. package/extensions/dm-subagents/src/runs/foreground/async-dismiss-action.js +81 -0
  131. package/extensions/dm-subagents/src/runs/foreground/async-steering-action.js +245 -0
  132. package/extensions/dm-subagents/src/runs/foreground/async-stop-action.js +74 -0
  133. package/extensions/dm-subagents/src/runs/foreground/execution.js +1401 -342
  134. package/extensions/dm-subagents/src/runs/foreground/foreground-control.js +133 -0
  135. package/extensions/dm-subagents/src/runs/foreground/foreground-history.js +148 -0
  136. package/extensions/dm-subagents/src/runs/foreground/prompt-audit.js +139 -0
  137. package/extensions/dm-subagents/src/runs/foreground/subagent-executor.js +4278 -1441
  138. package/extensions/dm-subagents/src/runs/foreground/workflow-detach-reconcile.js +278 -0
  139. package/extensions/dm-subagents/src/runs/foreground/workflow-foreground-steering.js +155 -0
  140. package/extensions/dm-subagents/src/runs/shared/abort-recovery.js +97 -0
  141. package/extensions/dm-subagents/src/runs/shared/acceptance.js +597 -148
  142. package/extensions/dm-subagents/src/runs/shared/agent-contract.js +35 -0
  143. package/extensions/dm-subagents/src/runs/shared/async-status-projection.js +472 -0
  144. package/extensions/dm-subagents/src/runs/shared/background-process-options.js +6 -0
  145. package/extensions/dm-subagents/src/runs/shared/capability-ceiling.js +175 -0
  146. package/extensions/dm-subagents/src/runs/shared/child-identity.js +32 -0
  147. package/extensions/dm-subagents/src/runs/shared/child-launch-plan.js +65 -0
  148. package/extensions/dm-subagents/src/runs/shared/child-protocol.js +447 -0
  149. package/extensions/dm-subagents/src/runs/shared/claude-code-adapter.js +120 -0
  150. package/extensions/dm-subagents/src/runs/shared/codex-exec-adapter.js +129 -0
  151. package/extensions/dm-subagents/src/runs/shared/completion-evidence.js +40 -0
  152. package/extensions/dm-subagents/src/runs/shared/completion-guard.js +140 -83
  153. package/extensions/dm-subagents/src/runs/shared/context-mode.js +38 -0
  154. package/extensions/dm-subagents/src/runs/shared/cursor-agent-adapter.js +101 -0
  155. package/extensions/dm-subagents/src/runs/shared/dm-args.js +445 -72
  156. package/extensions/dm-subagents/src/runs/shared/dm-spawn.js +27 -16
  157. package/extensions/dm-subagents/src/runs/shared/dynamic-fanout.js +19 -6
  158. package/extensions/dm-subagents/src/runs/shared/extension-bindings.js +81 -0
  159. package/extensions/dm-subagents/src/runs/shared/external-cli-contract.js +134 -0
  160. package/extensions/dm-subagents/src/runs/shared/external-cli-preflight.js +98 -0
  161. package/extensions/dm-subagents/src/runs/shared/external-cli-runner.js +419 -0
  162. package/extensions/dm-subagents/src/runs/shared/external-job-bridge.js +404 -0
  163. package/extensions/dm-subagents/src/runs/shared/external-job-runner.js +334 -0
  164. package/extensions/dm-subagents/src/runs/shared/fast-mode-extension.js +8 -0
  165. package/extensions/dm-subagents/src/runs/shared/host-step-status.js +228 -0
  166. package/extensions/dm-subagents/src/runs/shared/lane-metadata.js +104 -0
  167. package/extensions/dm-subagents/src/runs/shared/launch-cwd.js +17 -0
  168. package/extensions/dm-subagents/src/runs/shared/llm-intent-arbiter.js +190 -0
  169. package/extensions/dm-subagents/src/runs/shared/long-running-guard.js +48 -3
  170. package/extensions/dm-subagents/src/runs/shared/mcp-config-sources.js +387 -0
  171. package/extensions/dm-subagents/src/runs/shared/mcp-direct-tool-allowlist.js +212 -137
  172. package/extensions/dm-subagents/src/runs/shared/mcp-direct-tool-grant.js +131 -0
  173. package/extensions/dm-subagents/src/runs/shared/model-exclusions.js +207 -0
  174. package/extensions/dm-subagents/src/runs/shared/model-fallback.js +225 -55
  175. package/extensions/dm-subagents/src/runs/shared/model-scope.js +85 -28
  176. package/extensions/dm-subagents/src/runs/shared/mutation-evidence.js +182 -0
  177. package/extensions/dm-subagents/src/runs/shared/nested-events.js +264 -102
  178. package/extensions/dm-subagents/src/runs/shared/nested-render.js +15 -5
  179. package/extensions/dm-subagents/src/runs/shared/orca-progress-tabs.js +505 -0
  180. package/extensions/dm-subagents/src/runs/shared/parallel-handoff.js +653 -0
  181. package/extensions/dm-subagents/src/runs/shared/parallel-utils.js +29 -12
  182. package/extensions/dm-subagents/src/runs/shared/permissions.js +108 -0
  183. package/extensions/dm-subagents/src/runs/shared/process-signal.js +13 -0
  184. package/extensions/dm-subagents/src/runs/shared/run-fanout-budget.js +257 -0
  185. package/extensions/dm-subagents/src/runs/shared/run-history.js +133 -13
  186. package/extensions/dm-subagents/src/runs/shared/runtime-acknowledged-extensions.js +62 -0
  187. package/extensions/dm-subagents/src/runs/shared/session-lease.js +225 -0
  188. package/extensions/dm-subagents/src/runs/shared/single-output.js +129 -27
  189. package/extensions/dm-subagents/src/runs/shared/spawn-budget.js +95 -0
  190. package/extensions/dm-subagents/src/runs/shared/structured-output.js +129 -10
  191. package/extensions/dm-subagents/src/runs/shared/subagent-control.js +66 -11
  192. package/extensions/dm-subagents/src/runs/shared/subagent-prompt-runtime.js +548 -70
  193. package/extensions/dm-subagents/src/runs/shared/subagent-startup-retry.js +50 -0
  194. package/extensions/dm-subagents/src/runs/shared/task-intent.js +130 -0
  195. package/extensions/dm-subagents/src/runs/shared/tool-availability.js +59 -0
  196. package/extensions/dm-subagents/src/runs/shared/tool-budget.js +7 -5
  197. package/extensions/dm-subagents/src/runs/shared/tool-timeout.js +64 -0
  198. package/extensions/dm-subagents/src/runs/shared/usage-budget.js +74 -0
  199. package/extensions/dm-subagents/src/runs/shared/workflow-graph.js +22 -0
  200. package/extensions/dm-subagents/src/runs/shared/worktree-cleanup-plan.js +721 -0
  201. package/extensions/dm-subagents/src/runs/shared/worktree.js +168 -19
  202. package/extensions/dm-subagents/src/shared/accessible-dir.js +35 -0
  203. package/extensions/dm-subagents/src/shared/agent-stream-options.js +3 -0
  204. package/extensions/dm-subagents/src/shared/artifacts.js +170 -11
  205. package/extensions/dm-subagents/src/shared/atomic-json.js +36 -38
  206. package/extensions/dm-subagents/src/shared/capacity-resilient-json.js +77 -0
  207. package/extensions/dm-subagents/src/shared/child-session-name.js +15 -0
  208. package/extensions/dm-subagents/src/shared/child-transcript.js +57 -2
  209. package/extensions/dm-subagents/src/shared/completion-owner.js +7 -0
  210. package/extensions/dm-subagents/src/shared/display-text.js +142 -0
  211. package/extensions/dm-subagents/src/shared/extension-context.js +17 -0
  212. package/extensions/dm-subagents/src/shared/file-coalescer.js +9 -0
  213. package/extensions/dm-subagents/src/shared/file-system-retry.js +56 -0
  214. package/extensions/dm-subagents/src/shared/fork-context.js +96 -33
  215. package/extensions/dm-subagents/src/shared/formatters.js +21 -7
  216. package/extensions/dm-subagents/src/shared/launch-contract.js +94 -0
  217. package/extensions/dm-subagents/src/shared/model-info.js +10 -5
  218. package/extensions/dm-subagents/src/shared/node-executable.js +19 -0
  219. package/extensions/dm-subagents/src/shared/prompt-resources.js +10 -0
  220. package/extensions/dm-subagents/src/shared/pruned-fork.js +427 -0
  221. package/extensions/dm-subagents/src/shared/session-file-trust.js +19 -0
  222. package/extensions/dm-subagents/src/shared/session-tokens.js +14 -3
  223. package/extensions/dm-subagents/src/shared/settings.js +39 -47
  224. package/extensions/dm-subagents/src/shared/shortcuts.js +16 -0
  225. package/extensions/dm-subagents/src/shared/status-format.js +9 -2
  226. package/extensions/dm-subagents/src/shared/thinking-ceiling.js +41 -0
  227. package/extensions/dm-subagents/src/shared/types.js +47 -7
  228. package/extensions/dm-subagents/src/shared/utf8.js +12 -0
  229. package/extensions/dm-subagents/src/shared/utils.js +151 -131
  230. package/extensions/dm-subagents/src/shared/watch-strategy.js +3 -0
  231. package/extensions/dm-subagents/src/shared/workflow-child-permit.js +84 -0
  232. package/extensions/dm-subagents/src/slash/delegation-adapters.js +274 -0
  233. package/extensions/dm-subagents/src/slash/delegation-json.js +113 -0
  234. package/extensions/dm-subagents/src/slash/delegation-request.js +152 -0
  235. package/extensions/dm-subagents/src/slash/prompt-template-bridge.js +294 -243
  236. package/extensions/dm-subagents/src/slash/prompt-workflows.js +35 -73
  237. package/extensions/dm-subagents/src/slash/selector.js +101 -0
  238. package/extensions/dm-subagents/src/slash/slash-bridge.js +17 -1
  239. package/extensions/dm-subagents/src/slash/slash-commands.js +722 -732
  240. package/extensions/dm-subagents/src/slash/slash-live-state.js +37 -19
  241. package/extensions/dm-subagents/src/slash/subagents-admin.js +410 -0
  242. package/extensions/dm-subagents/src/tui/fleet-status.js +824 -0
  243. package/extensions/dm-subagents/src/tui/fleet-transcript.js +479 -0
  244. package/extensions/dm-subagents/src/tui/fleet.js +1326 -0
  245. package/extensions/dm-subagents/src/tui/render-helpers.js +22 -0
  246. package/extensions/dm-subagents/src/tui/render.js +1511 -261
  247. package/extensions/dm-subagents/src/watchdog/change-signature.js +220 -0
  248. package/extensions/dm-subagents/src/watchdog/child-status.js +151 -0
  249. package/extensions/dm-subagents/src/watchdog/emission-guard.js +90 -0
  250. package/extensions/dm-subagents/src/watchdog/lsp-diagnostics.js +484 -0
  251. package/extensions/dm-subagents/src/watchdog/model-selection.js +154 -0
  252. package/extensions/dm-subagents/src/watchdog/permission-arbiter.js +138 -0
  253. package/extensions/dm-subagents/src/watchdog/register-child.js +112 -0
  254. package/extensions/dm-subagents/src/watchdog/register-main.js +419 -0
  255. package/extensions/dm-subagents/src/watchdog/render.js +54 -0
  256. package/extensions/dm-subagents/src/watchdog/review.js +251 -0
  257. package/extensions/dm-subagents/src/watchdog/runtime.js +803 -0
  258. package/extensions/dm-subagents/src/watchdog/scope.js +56 -0
  259. package/extensions/dm-subagents/src/watchdog/settings.js +515 -0
  260. package/extensions/dm-subagents/src/watchdog/tool-actions.js +151 -0
  261. package/extensions/dm-subagents/src/watchdog/turn-delta.js +169 -0
  262. package/extensions/dm-subagents/src/watchdog/types.js +29 -0
  263. package/extensions/dm-subagents/src/watchdog/warning-format.js +58 -0
  264. package/extensions/dm-subagents/src/workflows/chat-progress.js +116 -0
  265. package/extensions/dm-subagents/src/workflows/host-command.js +227 -0
  266. package/extensions/dm-subagents/src/workflows/scripted-workflow.js +2011 -0
  267. package/extensions/dm-subagents/src/workflows/workflow-child-summary.js +116 -0
  268. package/extensions/dm-subagents/src/workflows/workflow-preflight.js +243 -0
  269. package/extensions/dm-subagents/src/workflows/workflow-receipt.js +387 -0
  270. package/extensions/dm-subagents/src/workflows/workflow-settlement.js +189 -0
  271. package/extensions/greedysearch-dm/bin/cdp.mjs +28 -3
  272. package/extensions/greedysearch-dm/bin/launch.mjs +2 -3
  273. package/extensions/greedysearch-dm/src/search/constants.mjs +5 -2
  274. package/package.json +4 -3
  275. package/extensions/dm-fff/package.json +0 -21
  276. package/extensions/dm-fff/src/index.js +0 -691
  277. package/extensions/dm-fff/src/query.js +0 -60
  278. package/extensions/dm-subagents/agents/context-builder.md +0 -46
  279. package/extensions/dm-subagents/agents/planner.md +0 -55
  280. package/extensions/dm-subagents/prompts/parallel-context-build.md +0 -55
  281. package/extensions/dm-subagents/prompts/parallel-handoff-plan.md +0 -61
  282. package/extensions/dm-subagents/src/runs/background/wait.js +0 -206
  283. package/extensions/dm-subagents/src/runs/foreground/chain-clarify.js +0 -1013
  284. package/extensions/dm-subagents/src/runs/foreground/chain-execution.js +0 -981
  285. package/extensions/dm-subagents/src/runs/shared/turn-budget.js +0 -50
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dm-subagents",
3
- "version": "0.33.1",
3
+ "version": "0.60.0",
4
4
  "description": "DM extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification",
5
5
  "author": "Nico Bailon",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "dm": {
17
17
  "extensions": [
18
- "./src/extension/index.js"
18
+ "./index.js"
19
19
  ],
20
20
  "skills": [
21
21
  "./skills"
@@ -0,0 +1,60 @@
1
+ ---
2
+ description: Run a bounded supervisor-mediated council of advisors and write a decision memo
3
+ argument-hint: "<question> [--advisors name,name] [--max-passes 2|3] [--scope ...] [--non-goals ...]"
4
+ ---
5
+
6
+ Run a bounded, supervisor-mediated council on this question. You, the parent
7
+ session, are the supervisor. You select the roster, curate cross-advisor packets,
8
+ decide which feedback is valid, and write the final memo. Advisors do not talk
9
+ directly or see peer transcripts by default. This is not free-form agent chat.
10
+
11
+ Before you orchestrate, read `skills/council-mode/SKILL.md` and
12
+ `skills/dm-subagents/references/execution-controls.md`.
13
+
14
+ Parse the invocation yourself. The flags below are conventions, not runtime
15
+ options. Record a brief with the question, scope, non-goals, evidence targets,
16
+ roster, known advisor context modes, and pass cap. Default `--max-passes` to 2.
17
+ Clamp it to 2 or 3. If the question is trivial or settled, answer directly instead
18
+ of convening a council.
19
+
20
+ ## Roster
21
+
22
+ - If `--advisors` is given, use exactly those agent names. Fail clearly on an
23
+ unknown agent. Do not require or invent per-advisor role labels.
24
+ - Otherwise list agents with `subagent({ action: "list" })`, then prefer 2–3
25
+ executable names that start with `council-`.
26
+ - If fewer than two profiles are available, fill the roster with `oracle`, then
27
+ `reviewer`, until it has two advisors. Launch fallback `oracle` with
28
+ `context: "fork"` so global defaults cannot remove its parent-chat context.
29
+ Let `reviewer` use its normal profile context. Note the fallback and known
30
+ context modes in the memo.
31
+ - Use the normal single-oracle loop only when a requested roster or unavailable
32
+ builtins leaves fewer than two advisors. Label the memo as degraded mode.
33
+
34
+ Profiles provide the model, tools, context, and advisor stance. The council
35
+ question and scope provide the decision frame. If the user wants a specific lens,
36
+ they should put it in the question, scope, or profile definition. Keep the roster
37
+ at 2–3 and never exceed 4.
38
+
39
+ Package advisors such as Surf's `gpt-pro` are valid only when the package DM
40
+ extension is installed and its external-job provider is registered. For Surf,
41
+ that means the `surf-cli` DM extension has loaded and `surf-oracle` appears in
42
+ `subagent({ action: "list" })` or the advisor is explicitly requested in
43
+ `--advisors` after that install. Treat them as external-runner advisors: omit
44
+ child `async` for normal attached council results, do not pass `outputSchema`,
45
+ include any needed evidence in the prompt, and use the fresh fallback cross-exam
46
+ path if the run is not resumable.
47
+
48
+ ## Run the protocol
49
+
50
+ Use the canonical workflow, structured advisor contracts, aggregate pass receipts,
51
+ and memo requirements in `skills/council-mode/SKILL.md`. Keep the parent as the
52
+ only synthesizer and decision maker. Do not introduce a chair advisor, peer chat,
53
+ or transcript sharing.
54
+
55
+ Use its required boundary checkpoints, yield for each async workflow without
56
+ polling, and write its required final memo.
57
+
58
+ Question and options from the slash command invocation:
59
+
60
+ $@
@@ -28,7 +28,11 @@ Choose or adapt angles when the work calls for it:
28
28
 
29
29
  Prefer three strong reviewers over many vague reviewers.
30
30
 
31
- Give every reviewer a specific task prompt naming its angle. Ask reviewers to return concise, evidence-backed findings with file/line references and suggested fixes. The response should be review feedback, not a context summary. Reviewers must not edit files unless I explicitly ask for a writer pass.
31
+ Give every reviewer a specific task prompt naming its angle. Ask reviewers to return concise, evidence-backed findings with file/line references and suggested fixes. Filter on evidence, not severity: a finding must be concrete, current, caused or made reachable by the target diff, and supported by source proof, a test or repro, or a contract contradiction. Label findings P0/P1/P2. P0 blocks merge. P1 should be fixed before release. P2 is report-only. End each review with `Merge verdict: BLOCK`, `Merge verdict: OK`, or `Merge verdict: OK with notes`. If nothing qualifies, ask the reviewer to say exactly `No issues found.` The response should be review feedback, not a context summary. Reviewers must not edit files unless I explicitly ask for a writer pass.
32
+
33
+ Do not default first-pass reviews to `blockers only`. That phrase is valid only for final pre-merge re-checks after P1/P2 findings are already inventoried, or for explicit emergency hotfix lanes where non-blocking findings are intentionally deferred.
34
+
35
+ For a targeted follow-up review, ask only whether the named finding was resolved, whether the fix introduced a new defect in the fix blast radius, and whether prior P1/P2 notes still stand. For bot or PR-comment triage, classify each comment as VALID, STALE, INVALID, or OUT-OF-POLICY against current HEAD, then assign P0/P1/P2 only to VALID comments.
32
36
 
33
37
  While reviewers run, do your own narrow inspection if useful. After they return, synthesize the feedback into:
34
38
  - fixes worth doing now
@@ -6,30 +6,36 @@ Run a parent-orchestrated review loop for the requested work.
6
6
 
7
7
  Use the `subagent` tool. Keep the parent session as the loop controller and final decision-maker. Child subagents must receive concrete role-specific tasks; they must not run subagents or manage the loop themselves unless the parent intentionally selected an explicit fanout agent whose builtin `tools` includes `subagent` for that assigned fanout.
8
8
 
9
- Default to a maximum of 3 review rounds unless I specify a different cap. Count a review round each time fresh-context reviewers inspect the current diff after a worker pass. Stop early when reviewers find no blockers or fixes worth doing now.
9
+ Default to a maximum of 3 review rounds unless I specify a different cap. Count a review round each time fresh-context reviewers inspect the current diff after a worker pass. Stop early when reviewers find no P0 findings, no P1 fixes worth doing now, and no approved P2 notes that should be handled in this loop.
10
10
 
11
- If the invocation includes an implementation request, first launch one async `worker` to implement the approved scope. If the current diff is already the target, start with review. The sequence can be launched up front as an async/background chain when the workflow is already clear, or continued as follow-up subagent runs after each async completion. For an initial chain, pass `async: true` so the main chat is unblocked; do not set `clarify: true` unless I explicitly want the foreground clarify UI. Use only one writer against the active worktree at a time unless I explicitly ask for isolated worktrees.
11
+ If the invocation includes an implementation request, first launch one async `worker` to implement the approved scope. If the current diff is already the target, start with review. The sequence can be launched up front with `workflowScript` when it is already clear, or continued as follow-up single-agent runs after each async completion. For an initial workflowScript, pass `async: true` so the main chat is unblocked; do not set `clarify: true` unless I explicitly want the foreground clarify UI. Use only one writer against the active worktree at a time unless I explicitly ask for isolated worktrees.
12
+
13
+ As a conservative orchestration policy, do not set a hard `toolBudget` or tight `usageBudget` on implementation or fix workers. A default tool budget blocks read/search tools rather than mutation tools, and reported usage has no reservation model, so count or usage limits still do not measure delivery safety. Give each writer a narrow delivery slice and an outer elapsed deadline with enough margin. Before that deadline, request a checkpoint after the current tool returns with changed files, build/test state, remaining work, and commit or PR state. An elapsed timeout is not a mutation-safe boundary and must not be the checkpoint trigger.
12
14
 
13
15
  For each review round, launch fresh-context `reviewer` agents in parallel. Reviewers must inspect the repository, relevant instructions, and current diff directly from files and commands. They must not rely on the main conversation history and must not edit files.
14
16
 
17
+ Tell reviewers to filter on evidence, not severity. They should report only concrete current issues caused or made reachable by the target diff, with source proof, a test or repro, or a contract contradiction. Ask them to label findings P0/P1/P2 and end with `Merge verdict: BLOCK`, `Merge verdict: OK`, or `Merge verdict: OK with notes`. P0 blocks merge. P1 should be fixed before release. P2 is report-only. Use `blockers only` only for final pre-merge re-checks after P1/P2 findings are already captured, or for explicit emergency hotfix lanes.
18
+
15
19
  Choose review angles from the actual change. Common angles are correctness/regressions, tests/validation, and simplicity/maintainability. Add security, performance, docs/API contracts, or user-flow validation when the work calls for it. Prefer three strong reviewers over many vague reviewers.
16
20
 
17
21
  After reviewers return, synthesize their feedback into:
18
- - blockers or scope/product/architecture decisions that need user approval;
19
- - fixes worth doing now;
20
- - optional improvements;
22
+ - P0 blockers or scope/product/architecture decisions that need user approval;
23
+ - P1 fixes worth doing now;
24
+ - P2 report-only notes or optional improvements;
21
25
  - feedback to ignore or defer, with a short reason.
22
26
 
23
27
  Do not blindly apply every reviewer suggestion. If reviewers surface an unapproved product, scope, or architecture decision, pause and ask me before launching a fix worker.
24
28
 
25
29
  When an async implementation worker completes, treat its handoff as the transition into review, not as final completion, unless I explicitly asked for worker-only work, review-only output, or to stop after implementation.
26
30
 
27
- When there are fixes worth doing now and the workflow is implementation-authorized, launch one async forked `worker` to apply only those synthesized fixes. Ask it to preserve the approved scope, run focused validation, and report changed files, commands run with exit codes, validation evidence, surprises, and anything left undone.
31
+ When there are fixes worth doing now and the workflow is implementation-authorized, launch one async forked `worker` without hard tool-call caps to apply only those synthesized fixes. Ask it to preserve the approved scope, run focused validation, and report changed files, commands run with exit codes, validation evidence, surprises, and anything left undone.
28
32
 
29
33
  After a fix worker returns, run another review round only when it made material changes or addressed non-trivial findings. Do not keep looping for optional polish, speculative improvements, or findings already deferred by the parent.
30
34
 
35
+ For a targeted follow-up review, ask only three questions: whether the named finding was resolved, whether the fix introduced a new concrete defect in the fix blast radius, and whether prior P1/P2 notes still stand. End with a fix verdict and the merge verdict.
36
+
31
37
  Stop and summarize when one of these is true:
32
- - reviewers find no blockers or fixes worth doing now;
38
+ - reviewers find no P0 blockers or P1 fixes worth doing now;
33
39
  - remaining feedback is optional, speculative, or intentionally deferred;
34
40
  - reviewers surface an unapproved decision that needs me;
35
41
  - the max review-round cap is reached.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: council-mode
3
+ description: Run a bounded supervisor-mediated advisor council. Use when the user asks for council mode, asks to convene advisors, debate a decision, cross-examine recommendations, or run /council.
4
+ ---
5
+
6
+ # Council Mode
7
+
8
+ Council mode is parent-supervised advice for a material decision with real tradeoffs. It is not free-form agent chat, implementation work, a transcript dump, mutation authority, or a council UI.
9
+
10
+ The parent selects the roster, relays only curated claims, decides validity, and writes the memo. Advisors stay read-only and do not see peer transcripts by default.
11
+
12
+ Before launch, read:
13
+
14
+ - `skills/dm-subagents/references/execution-controls.md`
15
+ - `skills/council-mode/references/pass-contracts.md`
16
+
17
+ ## Roster
18
+
19
+ Run `subagent({ action: "list" })`, then choose 2-3 executable advisor names that start with `council-`. The prefix is convention only. Never use more than four advisors.
20
+
21
+ If fewer than two council profiles are available, fill with `oracle`, then `reviewer`. Launch fallback `oracle` with `context: "fork"`; let fallback `reviewer` use its normal profile context. Note fallbacks and known context modes in the memo. If fewer than two advisors remain, use the normal one-oracle consultation loop and label it degraded mode.
22
+
23
+ `council-*` profiles live in user or project agent directories, not this package. A profile defines model, tools, context, output defaults, and persistent stance. Keep advisors read-only, disable inherited skills unless needed, and put stance in the profile body instead of inventing per-run role labels.
24
+
25
+ External-job/package advisors may join only when their provider is registered. Treat them as ordinary advisor names in `runs.all`, but honor their runner limits: they may lack repo tools, structured output, or resumability. Include evidence they cannot read, request JSON text instead of `outputSchema`, and use a fresh-context fallback when they cannot resume for cross-exam.
26
+
27
+ ## Passes
28
+
29
+ Pass 1 is independent reports. Pass 2 is one cross-exam. Run Pass 3 only when `--max-passes 3` was requested and a material dispute can still be settled by evidence. Never run an unbounded loop.
30
+
31
+ ## Protocol
32
+
33
+ 1. Write the council brief: question, scope, non-goals, evidence targets, roster, known advisor context modes, and pass cap.
34
+ 2. Tell the user the roster, context modes, and pass cap.
35
+ 3. Launch one async `workflowScript` with `runs.all` for Pass 1. Use stable keys, `phase: "Council pass 1"`, concise labels, and `output: false` unless separate artifacts are useful. Set `context` only when the profile context is known or a fallback rule requires it.
36
+ 4. Return one aggregate Pass 1 receipt. On completion, tell the user completion count, agreement count, dispute count, and whether Pass 2 is needed.
37
+ 5. Synthesize the claim matrix in the parent: agreements, disputed claims, missing proof, owner decisions, and at most five material relay claims per advisor.
38
+ 6. For Pass 2, tell the user which claims are relayed and why they matter. Resume each advisor with a curated challenge packet. A resume needs a retained run id and task; it excludes `agent` and rejects `gate`. Record each new run id; Pass 3 resumes those latest ids with new stable keys.
39
+ 7. Stop at convergence, pass cap, failed fallback, or user interruption. The parent writes the final memo.
40
+
41
+ If an advisor is not resumable, run the same profile fresh with its Pass 1 report and challenge packet. Label it a fresh-context fallback, not true cross-exam.
42
+
43
+ Do not set `clarify`, `worktree`, `gate`, tool budgets, or tight usage budgets on advisors. Bound work through the roster, pass cap, and report length.
44
+
45
+ ## Memo
46
+
47
+ Converged means no disputed claim remains that both affects the recommendation and can plausibly be settled by advisor evidence. Put unresolved disputes in owner decisions. Do not add a round for polish or symmetry.
48
+
49
+ The memo states:
50
+
51
+ - question and scope
52
+ - recommendation and rationale
53
+ - accepted and rejected feedback with reasons
54
+ - owner decisions
55
+ - evidence and run ids
56
+ - confidence and what would change the decision
57
+ - roster, passes, fallbacks, and known advisor context modes
58
+
59
+ Identify advisors by profile name. State when fallback `oracle` was forked and context-aware. Escalate to a writer only after the memo and only when the user requests it.
@@ -0,0 +1,150 @@
1
+ # Council Mode Pass Contracts
2
+
3
+ Load this before launching council advisors.
4
+
5
+ ## Pass 1 report
6
+
7
+ Native DM advisors should receive this `outputSchema`. External runners should receive the same shape as plain JSON text and no `outputSchema`.
8
+
9
+ ```js
10
+ const pass1OutputSchema = {
11
+ type: "object",
12
+ required: [
13
+ "recommendation",
14
+ "evidence",
15
+ "assumptions",
16
+ "risks",
17
+ "confidence",
18
+ "challengeClaims",
19
+ "ownerDecisions",
20
+ "changeMyMind"
21
+ ],
22
+ properties: {
23
+ recommendation: { type: "string" },
24
+ evidence: {
25
+ type: "array",
26
+ items: {
27
+ type: "object",
28
+ required: ["claim", "sources"],
29
+ properties: {
30
+ claim: { type: "string" },
31
+ sources: { type: "array", items: { type: "string" } }
32
+ }
33
+ }
34
+ },
35
+ assumptions: {
36
+ type: "array",
37
+ items: {
38
+ type: "object",
39
+ required: ["assumption", "status"],
40
+ properties: {
41
+ assumption: { type: "string" },
42
+ status: { enum: ["verified", "unverified"] }
43
+ }
44
+ }
45
+ },
46
+ risks: { type: "array", items: { type: "string" } },
47
+ confidence: {
48
+ type: "object",
49
+ required: ["level", "reason"],
50
+ properties: {
51
+ level: { enum: ["high", "medium", "low"] },
52
+ reason: { type: "string" }
53
+ }
54
+ },
55
+ challengeClaims: { type: "array", items: { type: "string" }, maxItems: 3 },
56
+ ownerDecisions: { type: "array", items: { type: "string" } },
57
+ changeMyMind: { type: "array", items: { type: "string" } }
58
+ }
59
+ };
60
+ ```
61
+
62
+ Task text:
63
+
64
+ - inspect supplied evidence directly
65
+ - do not ask other advisors or read peer reports
66
+ - stay read-only
67
+ - do not spawn children
68
+ - return only the structured report
69
+ - keep the report under about 600 words
70
+
71
+ For external runners, say: `Return only JSON matching this shape. Do not wrap it in Markdown.` Include any evidence they cannot read with tools.
72
+
73
+ ## Pass 1 aggregate receipt
74
+
75
+ Return one aggregate receipt. Preserve result order or map it by stable key.
76
+
77
+ ```js
78
+ return {
79
+ pass: 1,
80
+ advisors: results.map((result, index) => ({
81
+ key: result.key,
82
+ agent: result.agent,
83
+ requestedContext: roster[index].context ?? "runtime-default-unknown",
84
+ runId: result.runId,
85
+ report: result.structuredOutput ?? result.output
86
+ }))
87
+ };
88
+ ```
89
+
90
+ Do not replace `runtime-default-unknown` with a guessed context.
91
+
92
+ ## Pass 2 challenge
93
+
94
+ A challenge packet contains only disputed claims, strong conflicting evidence, missing proof, owner decisions, and high-impact risks. Attribute peer content as "another advisor". Do not include full peer reports.
95
+
96
+ Native DM advisors receive `pass2OutputSchema`. External runners and fresh external fallbacks receive the same shape as JSON-only task text and no `outputSchema`.
97
+
98
+ ```js
99
+ const pass2OutputSchema = {
100
+ type: "object",
101
+ required: ["responses", "recommendationChanged", "outOfScopeFindings"],
102
+ properties: {
103
+ responses: {
104
+ type: "array",
105
+ items: {
106
+ type: "object",
107
+ required: ["claimId", "disposition", "reason", "sources"],
108
+ properties: {
109
+ claimId: { type: "string" },
110
+ disposition: { enum: ["accept", "reject", "refine", "owner-decision"] },
111
+ reason: { type: "string" },
112
+ sources: { type: "array", items: { type: "string" } }
113
+ }
114
+ }
115
+ },
116
+ recommendationChanged: {
117
+ type: "object",
118
+ required: ["changed", "reason"],
119
+ properties: {
120
+ changed: { type: "boolean" },
121
+ reason: { type: "string" }
122
+ }
123
+ },
124
+ outOfScopeFindings: { type: "array", items: { type: "string" } }
125
+ }
126
+ };
127
+ ```
128
+
129
+ Use stable resume keys such as `cross-oracle`, `phase: "Council pass 2"`, concise labels, and `output: false` unless separate artifacts are useful. The aggregate Pass 2 receipt uses the Pass 1 row shape with the new `runId` and `structuredOutput ?? output`. Pass 3 resumes those latest ids with new stable keys.
130
+
131
+ ## Advisor profile template
132
+
133
+ Create model-based advisors in the user or project agent directory, not in this package:
134
+
135
+ ```markdown
136
+ ---
137
+ name: council-sol
138
+ description: Read-only fresh-context advisor for bounded council decisions
139
+ tools: read, grep, find, ls
140
+ model: provider/top-reasoning-model
141
+ thinking: high
142
+ systemPromptMode: replace
143
+ inheritProjectContext: true
144
+ inheritSkills: false
145
+ defaultContext: fresh
146
+ acceptanceRole: read-only
147
+ ---
148
+
149
+ Analyze the council question independently. Inspect evidence directly. Do not edit, run mutating commands, commit, push, contact peers, or spawn subagents. Return concise, cited advice using the report contract in the council task.
150
+ ```