@ouro.bot/cli 0.1.0-alpha.1469 → 0.1.0-alpha.1470

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 (567) hide show
  1. package/README.md +1 -1
  2. package/changelog.json +6 -2
  3. package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
  4. package/deploy/unraid/sanctuary.xml +1 -1
  5. package/desk.lock.json +8 -0
  6. package/dist/heart/identity.js +27 -1
  7. package/dist/mind/desk-section.js +33 -43
  8. package/dist/repertoire/desk-mcp.js +140 -0
  9. package/dist/repertoire/mcp-manager.js +22 -0
  10. package/dist/repertoire/mcp-tools.js +11 -7
  11. package/npm-shrinkwrap.json +2 -2
  12. package/package.json +4 -1
  13. package/vendor/desk/.claude-plugin/plugin.json +35 -0
  14. package/vendor/desk/.mcp.claude-codex.json +28 -0
  15. package/vendor/desk/.mcp.copilot.json +16 -0
  16. package/vendor/desk/.ouro-desk.json +6 -0
  17. package/vendor/desk/CHANGELOG.md +7004 -0
  18. package/vendor/desk/README.md +195 -0
  19. package/vendor/desk/activation/README.md +98 -0
  20. package/vendor/desk/activation/copilot-root.flattened-bundle.json +38 -0
  21. package/vendor/desk/activation/desk.activation.json +251 -0
  22. package/vendor/desk/activation/host-capability-evidence.md +46 -0
  23. package/vendor/desk/activation/support-matrix.json +84 -0
  24. package/vendor/desk/agency.json +20 -0
  25. package/vendor/desk/agents/observer.agent.md +26 -0
  26. package/vendor/desk/agents/observer.md +29 -0
  27. package/vendor/desk/agents/worker.agent.md +32 -0
  28. package/vendor/desk/agents/worker.md +40 -0
  29. package/vendor/desk/artifacts/tombstones/tombstone.schema.json +53 -0
  30. package/vendor/desk/artifacts/tombstones/tombstones.jsonl +1 -0
  31. package/vendor/desk/changelog.d/README.md +12 -0
  32. package/vendor/desk/docs/agent-files.md +104 -0
  33. package/vendor/desk/docs/agentic-engineering-v2-rfc.md +206 -0
  34. package/vendor/desk/docs/agentic-engineering-v3-rfc.md +109 -0
  35. package/vendor/desk/docs/browser-remote-desktops.md +69 -0
  36. package/vendor/desk/docs/dependency-activation-stories-and-criteria.md +500 -0
  37. package/vendor/desk/docs/evaluation-packet.md +363 -0
  38. package/vendor/desk/docs/factory-local-capture.md +651 -0
  39. package/vendor/desk/docs/factory-store-playbook.md +927 -0
  40. package/vendor/desk/docs/images/factory-site.png +0 -0
  41. package/vendor/desk/docs/issue-drains.md +79 -0
  42. package/vendor/desk/docs/lfs-inspection.md +55 -0
  43. package/vendor/desk/docs/preview-diagnostics.md +11 -0
  44. package/vendor/desk/docs/relays.md +88 -0
  45. package/vendor/desk/docs/schedules.md +69 -0
  46. package/vendor/desk/docs/search-recovery.md +22 -0
  47. package/vendor/desk/docs/session-labels.md +157 -0
  48. package/vendor/desk/docs/session-retention.md +125 -0
  49. package/vendor/desk/docs/sessions.md +17 -0
  50. package/vendor/desk/docs/stalled-nudges.md +54 -0
  51. package/vendor/desk/docs/webhooks.md +80 -0
  52. package/vendor/desk/docs/workspace-tidy.md +74 -0
  53. package/vendor/desk/hooks/boot-checks.cjs +7 -0
  54. package/vendor/desk/hooks/claude-session-start.cjs +123 -0
  55. package/vendor/desk/hooks/compatible-node.cjs +97 -0
  56. package/vendor/desk/hooks/copilot-boot-prompt.cjs +69 -0
  57. package/vendor/desk/hooks/copilot-durable-files.cjs +8 -0
  58. package/vendor/desk/hooks/copilot-hooks.json +61 -0
  59. package/vendor/desk/hooks/copilot-intake-context.cjs +5 -0
  60. package/vendor/desk/hooks/copilot-lane-model.cjs +8 -0
  61. package/vendor/desk/hooks/copilot-session-start.cjs +264 -0
  62. package/vendor/desk/hooks/copilot-skill-current.cjs +28 -0
  63. package/vendor/desk/hooks/factory-end.cjs +5 -0
  64. package/vendor/desk/hooks/factory-start.cjs +27 -0
  65. package/vendor/desk/hooks/hooks.json +40 -0
  66. package/vendor/desk/hooks/lib/boot-checks.cjs +643 -0
  67. package/vendor/desk/hooks/lib/child-agent.cjs +14 -0
  68. package/vendor/desk/hooks/lib/copilot-intake-context.cjs +73 -0
  69. package/vendor/desk/hooks/lib/current-release.cjs +162 -0
  70. package/vendor/desk/hooks/lib/delivery-stop.cjs +326 -0
  71. package/vendor/desk/hooks/lib/detach-worker.cjs +43 -0
  72. package/vendor/desk/hooks/lib/durable-files.cjs +102 -0
  73. package/vendor/desk/hooks/lib/factory-end.cjs +327 -0
  74. package/vendor/desk/hooks/lib/lane-model.cjs +82 -0
  75. package/vendor/desk/hooks/lib/node-required.cjs +56 -0
  76. package/vendor/desk/hooks/lib/orca-session-title.cjs +60 -0
  77. package/vendor/desk/hooks/lib/session-end.cjs +30 -0
  78. package/vendor/desk/hooks/lib/sync-end.cjs +89 -0
  79. package/vendor/desk/hooks/loop-start.cjs +105 -0
  80. package/vendor/desk/hooks/node-missing.sh +78 -0
  81. package/vendor/desk/hooks/orca-session-title.cjs +8 -0
  82. package/vendor/desk/hooks/session-end.cjs +8 -0
  83. package/vendor/desk/mcp/README.md +269 -0
  84. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  85. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  86. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  87. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  88. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  89. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  90. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  91. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  92. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  93. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  94. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  95. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  96. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  97. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  98. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  99. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/support-matrix.json +72 -0
  100. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  101. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  102. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  103. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
  104. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
  105. package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
  106. package/vendor/desk/mcp/artifacts/runtime-deps/README.md +25 -0
  107. package/vendor/desk/mcp/bootstrap.cjs +761 -0
  108. package/vendor/desk/mcp/docs/private-feedback.md +13 -0
  109. package/vendor/desk/mcp/idle-proxy.cjs +423 -0
  110. package/vendor/desk/mcp/index.js +813 -0
  111. package/vendor/desk/mcp/package-lock.json +3717 -0
  112. package/vendor/desk/mcp/package.json +44 -0
  113. package/vendor/desk/mcp/scripts/agency-desk-channel.js +7 -0
  114. package/vendor/desk/mcp/scripts/build-runtime-deps-pack.js +5 -0
  115. package/vendor/desk/mcp/scripts/crew.js +89 -0
  116. package/vendor/desk/mcp/scripts/drains-launcher.mjs +329 -0
  117. package/vendor/desk/mcp/scripts/drains.js +5 -0
  118. package/vendor/desk/mcp/scripts/factory.js +657 -0
  119. package/vendor/desk/mcp/scripts/file-desk-problem.js +9 -0
  120. package/vendor/desk/mcp/scripts/finish-commit.js +7 -0
  121. package/vendor/desk/mcp/scripts/lfs.js +37 -0
  122. package/vendor/desk/mcp/scripts/local-recovery.js +363 -0
  123. package/vendor/desk/mcp/scripts/migrations.js +11 -0
  124. package/vendor/desk/mcp/scripts/private-view.js +177 -0
  125. package/vendor/desk/mcp/scripts/resolve-desk-root.js +106 -0
  126. package/vendor/desk/mcp/scripts/session-boot.js +22 -0
  127. package/vendor/desk/mcp/scripts/session-retention.js +5 -0
  128. package/vendor/desk/mcp/scripts/session-sync.js +10 -0
  129. package/vendor/desk/mcp/scripts/sessions.js +5 -0
  130. package/vendor/desk/mcp/scripts/sync-push.js +13 -0
  131. package/vendor/desk/mcp/scripts/tidy-status.js +8 -0
  132. package/vendor/desk/mcp/scripts/verify-runtime-deps-pack.js +5 -0
  133. package/vendor/desk/mcp/src/actions/desk-read.actions.mts +73 -0
  134. package/vendor/desk/mcp/src/actions/desk-session.actions.mts +42 -0
  135. package/vendor/desk/mcp/src/actions/desk-web.actions.mts +52 -0
  136. package/vendor/desk/mcp/src/actions/desk.actions.mts +5 -0
  137. package/vendor/desk/mcp/src/actions/generated/desk/OuroActions.swift +649 -0
  138. package/vendor/desk/mcp/src/actions/generated/desk/OuroActionsReins.swift +61 -0
  139. package/vendor/desk/mcp/src/actions/generated/desk/actions.json +280 -0
  140. package/vendor/desk/mcp/src/actions/generated/desk/commands.json +145 -0
  141. package/vendor/desk/mcp/src/actions/generated/desk/mcp.json +256 -0
  142. package/vendor/desk/mcp/src/actions/generated/desk/web.ts +59 -0
  143. package/vendor/desk/mcp/src/actions/generated/desk/webmcp.json +250 -0
  144. package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActions.swift +241 -0
  145. package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActionsReins.swift +25 -0
  146. package/vendor/desk/mcp/src/actions/generated/desk-web/actions.json +73 -0
  147. package/vendor/desk/mcp/src/actions/generated/desk-web/commands.json +53 -0
  148. package/vendor/desk/mcp/src/actions/generated/desk-web/mcp.json +83 -0
  149. package/vendor/desk/mcp/src/actions/generated/desk-web/web.ts +47 -0
  150. package/vendor/desk/mcp/src/actions/generated/desk-web/webmcp.json +81 -0
  151. package/vendor/desk/mcp/src/actions/served.js +5 -0
  152. package/vendor/desk/mcp/src/activation/admit.js +77 -0
  153. package/vendor/desk/mcp/src/activation/failures.js +65 -0
  154. package/vendor/desk/mcp/src/activation/readiness-policy.js +102 -0
  155. package/vendor/desk/mcp/src/activation/schema.js +17 -0
  156. package/vendor/desk/mcp/src/activation/superpowers-context.js +265 -0
  157. package/vendor/desk/mcp/src/activation/validate.js +540 -0
  158. package/vendor/desk/mcp/src/artifacts/tombstones.js +61 -0
  159. package/vendor/desk/mcp/src/crew/initiative.js +287 -0
  160. package/vendor/desk/mcp/src/crew/workspace.js +1259 -0
  161. package/vendor/desk/mcp/src/db/init.js +75 -0
  162. package/vendor/desk/mcp/src/db/schema.sql +83 -0
  163. package/vendor/desk/mcp/src/desk/active-tasks.js +408 -0
  164. package/vendor/desk/mcp/src/desk/card-commit-guard.js +281 -0
  165. package/vendor/desk/mcp/src/desk/cleanup-index.js +53 -0
  166. package/vendor/desk/mcp/src/desk/content-home.js +246 -0
  167. package/vendor/desk/mcp/src/desk/crew-config.js +102 -0
  168. package/vendor/desk/mcp/src/desk/crew-member.js +196 -0
  169. package/vendor/desk/mcp/src/desk/crew-roster.js +151 -0
  170. package/vendor/desk/mcp/src/desk/frontmatter-lite.js +228 -0
  171. package/vendor/desk/mcp/src/desk/gh-logins.js +109 -0
  172. package/vendor/desk/mcp/src/desk/handles.js +123 -0
  173. package/vendor/desk/mcp/src/desk/handoff-reference.js +35 -0
  174. package/vendor/desk/mcp/src/desk/improvement-authority.js +3 -0
  175. package/vendor/desk/mcp/src/desk/improvement-cards.js +704 -0
  176. package/vendor/desk/mcp/src/desk/improvement-person.js +51 -0
  177. package/vendor/desk/mcp/src/desk/lifecycle.js +16 -0
  178. package/vendor/desk/mcp/src/desk/machine-desks.js +119 -0
  179. package/vendor/desk/mcp/src/desk/naming.js +333 -0
  180. package/vendor/desk/mcp/src/desk/organization.js +592 -0
  181. package/vendor/desk/mcp/src/desk/resources.js +274 -0
  182. package/vendor/desk/mcp/src/desk/runtime-resolver.js +30 -0
  183. package/vendor/desk/mcp/src/desk/scratch-paths.js +44 -0
  184. package/vendor/desk/mcp/src/desk/step-delivery.js +140 -0
  185. package/vendor/desk/mcp/src/desk/steps.js +263 -0
  186. package/vendor/desk/mcp/src/desk/tidy.js +930 -0
  187. package/vendor/desk/mcp/src/desk/unsigned-deliveries.js +359 -0
  188. package/vendor/desk/mcp/src/factory/agent-types.js +45 -0
  189. package/vendor/desk/mcp/src/factory/andon-watch.js +109 -0
  190. package/vendor/desk/mcp/src/factory/binding.js +612 -0
  191. package/vendor/desk/mcp/src/factory/boot-check.js +645 -0
  192. package/vendor/desk/mcp/src/factory/capture-classify.js +158 -0
  193. package/vendor/desk/mcp/src/factory/capture-count.js +183 -0
  194. package/vendor/desk/mcp/src/factory/capture-flush.js +268 -0
  195. package/vendor/desk/mcp/src/factory/capture-publish.js +141 -0
  196. package/vendor/desk/mcp/src/factory/capture-schema.js +193 -0
  197. package/vendor/desk/mcp/src/factory/capture-sweep.js +239 -0
  198. package/vendor/desk/mcp/src/factory/catch-point.js +60 -0
  199. package/vendor/desk/mcp/src/factory/commit-resolve.js +94 -0
  200. package/vendor/desk/mcp/src/factory/consent-answer.js +37 -0
  201. package/vendor/desk/mcp/src/factory/context-capability.js +15 -0
  202. package/vendor/desk/mcp/src/factory/context-outbox.js +885 -0
  203. package/vendor/desk/mcp/src/factory/context-run.js +386 -0
  204. package/vendor/desk/mcp/src/factory/context-schema.js +249 -0
  205. package/vendor/desk/mcp/src/factory/copilot-turn-index.js +93 -0
  206. package/vendor/desk/mcp/src/factory/copilot-usage.js +148 -0
  207. package/vendor/desk/mcp/src/factory/credential.js +45 -0
  208. package/vendor/desk/mcp/src/factory/derive-claude.js +960 -0
  209. package/vendor/desk/mcp/src/factory/derive-codex.js +734 -0
  210. package/vendor/desk/mcp/src/factory/derive-common.js +279 -0
  211. package/vendor/desk/mcp/src/factory/derive-copilot.js +1057 -0
  212. package/vendor/desk/mcp/src/factory/derive-run.js +807 -0
  213. package/vendor/desk/mcp/src/factory/desk-problem-file.js +310 -0
  214. package/vendor/desk/mcp/src/factory/desk-problem-fingerprint.js +70 -0
  215. package/vendor/desk/mcp/src/factory/desk-problem-known.js +246 -0
  216. package/vendor/desk/mcp/src/factory/desk-problem-template.js +107 -0
  217. package/vendor/desk/mcp/src/factory/desk-repo.js +1223 -0
  218. package/vendor/desk/mcp/src/factory/desk-task-line.js +28 -0
  219. package/vendor/desk/mcp/src/factory/desk-visibility.js +48 -0
  220. package/vendor/desk/mcp/src/factory/end-hook.js +14 -0
  221. package/vendor/desk/mcp/src/factory/evaluate-kick.js +164 -0
  222. package/vendor/desk/mcp/src/factory/evaluate-run.js +678 -0
  223. package/vendor/desk/mcp/src/factory/evaluator-step.js +484 -0
  224. package/vendor/desk/mcp/src/factory/filer-launch.js +79 -0
  225. package/vendor/desk/mcp/src/factory/flush-health.js +26 -0
  226. package/vendor/desk/mcp/src/factory/flush.js +1758 -0
  227. package/vendor/desk/mcp/src/factory/focus.js +326 -0
  228. package/vendor/desk/mcp/src/factory/headless-flag.cjs +32 -0
  229. package/vendor/desk/mcp/src/factory/headless-flag.js +25 -0
  230. package/vendor/desk/mcp/src/factory/headless-ledger.js +743 -0
  231. package/vendor/desk/mcp/src/factory/headless.js +567 -0
  232. package/vendor/desk/mcp/src/factory/held-route.js +93 -0
  233. package/vendor/desk/mcp/src/factory/host-flags.js +36 -0
  234. package/vendor/desk/mcp/src/factory/improvement-verify.js +429 -0
  235. package/vendor/desk/mcp/src/factory/kaizen-file.js +231 -0
  236. package/vendor/desk/mcp/src/factory/label-binding.js +90 -0
  237. package/vendor/desk/mcp/src/factory/label-schema.js +426 -0
  238. package/vendor/desk/mcp/src/factory/local-status.js +368 -0
  239. package/vendor/desk/mcp/src/factory/loop-conditions.js +121 -0
  240. package/vendor/desk/mcp/src/factory/loop-health.js +500 -0
  241. package/vendor/desk/mcp/src/factory/loop-slot.js +90 -0
  242. package/vendor/desk/mcp/src/factory/loop-status.js +100 -0
  243. package/vendor/desk/mcp/src/factory/loop-switch.cjs +14 -0
  244. package/vendor/desk/mcp/src/factory/loop-worker-state.js +96 -0
  245. package/vendor/desk/mcp/src/factory/loop-worker.js +290 -0
  246. package/vendor/desk/mcp/src/factory/marker.js +61 -0
  247. package/vendor/desk/mcp/src/factory/mirror-step.js +145 -0
  248. package/vendor/desk/mcp/src/factory/os-protect.js +243 -0
  249. package/vendor/desk/mcp/src/factory/outbox.js +2231 -0
  250. package/vendor/desk/mcp/src/factory/outcome.js +431 -0
  251. package/vendor/desk/mcp/src/factory/pipeline/andon.js +319 -0
  252. package/vendor/desk/mcp/src/factory/pipeline/attention-rollup.js +158 -0
  253. package/vendor/desk/mcp/src/factory/pipeline/attention.js +146 -0
  254. package/vendor/desk/mcp/src/factory/pipeline/build.js +299 -0
  255. package/vendor/desk/mcp/src/factory/pipeline/compare.js +148 -0
  256. package/vendor/desk/mcp/src/factory/pipeline/formulas.js +652 -0
  257. package/vendor/desk/mcp/src/factory/pipeline/kaizen.js +387 -0
  258. package/vendor/desk/mcp/src/factory/pipeline/lifecycle-clocks.js +345 -0
  259. package/vendor/desk/mcp/src/factory/pipeline/normalize.js +73 -0
  260. package/vendor/desk/mcp/src/factory/pipeline/number-states.js +154 -0
  261. package/vendor/desk/mcp/src/factory/pipeline/outcomes.js +268 -0
  262. package/vendor/desk/mcp/src/factory/pipeline/report.js +737 -0
  263. package/vendor/desk/mcp/src/factory/pipeline/rollups.js +883 -0
  264. package/vendor/desk/mcp/src/factory/pipeline/stretches.js +523 -0
  265. package/vendor/desk/mcp/src/factory/pipeline/timeline.js +199 -0
  266. package/vendor/desk/mcp/src/factory/pipeline/validate-pr.js +238 -0
  267. package/vendor/desk/mcp/src/factory/pipeline/versions.js +42 -0
  268. package/vendor/desk/mcp/src/factory/pipeline/walk.js +1177 -0
  269. package/vendor/desk/mcp/src/factory/plugin-registry.js +72 -0
  270. package/vendor/desk/mcp/src/factory/plugin-sources.cjs +249 -0
  271. package/vendor/desk/mcp/src/factory/pr-green.js +77 -0
  272. package/vendor/desk/mcp/src/factory/process-lock.js +142 -0
  273. package/vendor/desk/mcp/src/factory/proof-session.js +75 -0
  274. package/vendor/desk/mcp/src/factory/publish.js +637 -0
  275. package/vendor/desk/mcp/src/factory/published-schema.js +648 -0
  276. package/vendor/desk/mcp/src/factory/reconcile-reasons.js +22 -0
  277. package/vendor/desk/mcp/src/factory/reconcile-step.js +251 -0
  278. package/vendor/desk/mcp/src/factory/reconcile.js +808 -0
  279. package/vendor/desk/mcp/src/factory/release-version.js +134 -0
  280. package/vendor/desk/mcp/src/factory/repo-name.js +13 -0
  281. package/vendor/desk/mcp/src/factory/retention.js +60 -0
  282. package/vendor/desk/mcp/src/factory/route-desk.js +40 -0
  283. package/vendor/desk/mcp/src/factory/route-issues.js +251 -0
  284. package/vendor/desk/mcp/src/factory/route-local.js +264 -0
  285. package/vendor/desk/mcp/src/factory/schema.js +957 -0
  286. package/vendor/desk/mcp/src/factory/session-kind.js +16 -0
  287. package/vendor/desk/mcp/src/factory/session-lifetime.js +56 -0
  288. package/vendor/desk/mcp/src/factory/session-route.js +183 -0
  289. package/vendor/desk/mcp/src/factory/shell-git.js +500 -0
  290. package/vendor/desk/mcp/src/factory/store-issues.js +143 -0
  291. package/vendor/desk/mcp/src/factory/store-route.js +208 -0
  292. package/vendor/desk/mcp/src/factory/test-state-guard.js +103 -0
  293. package/vendor/desk/mcp/src/factory/time.js +36 -0
  294. package/vendor/desk/mcp/src/factory/tool-issue-file.js +84 -0
  295. package/vendor/desk/mcp/src/factory/tool-kinds.js +87 -0
  296. package/vendor/desk/mcp/src/factory/triage-schema.js +233 -0
  297. package/vendor/desk/mcp/src/factory/windows-acl.js +679 -0
  298. package/vendor/desk/mcp/src/indexer/chunk.js +232 -0
  299. package/vendor/desk/mcp/src/indexer/discover.js +434 -0
  300. package/vendor/desk/mcp/src/indexer/exclusions.js +247 -0
  301. package/vendor/desk/mcp/src/indexer/index.js +167 -0
  302. package/vendor/desk/mcp/src/indexer/refs.js +0 -0
  303. package/vendor/desk/mcp/src/indexer/text-hash.js +18 -0
  304. package/vendor/desk/mcp/src/lib/ouro-actions/actions.claims.json +75 -0
  305. package/vendor/desk/mcp/src/lib/ouro-actions/dist-manifest.json +70 -0
  306. package/vendor/desk/mcp/src/lib/ouro-actions/ouro-actions.mts +1416 -0
  307. package/vendor/desk/mcp/src/lib/ouro-ui/LICENSE +21 -0
  308. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-claims.ts +190 -0
  309. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-command.ts +1020 -0
  310. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/checks.ts +343 -0
  311. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/cli.ts +240 -0
  312. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/component.ts +430 -0
  313. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/dev-commands.ts +204 -0
  314. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/doctor.ts +126 -0
  315. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/effects.ts +68 -0
  316. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/exit-codes.ts +75 -0
  317. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/help.ts +220 -0
  318. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/mcp.ts +268 -0
  319. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/outcome.ts +265 -0
  320. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/output.ts +67 -0
  321. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/precise-copy.ts +235 -0
  322. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/problem.ts +124 -0
  323. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.kit.mts +8 -0
  324. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.ts +568 -0
  325. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/terminal.ts +245 -0
  326. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/voice.ts +136 -0
  327. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/wait.ts +226 -0
  328. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/work-event.ts +181 -0
  329. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.kit.mts +18 -0
  330. package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.ts +2072 -0
  331. package/vendor/desk/mcp/src/package-metadata.js +20 -0
  332. package/vendor/desk/mcp/src/protected/legacy-ledger.js +55 -0
  333. package/vendor/desk/mcp/src/readiness/leftovers.js +75 -0
  334. package/vendor/desk/mcp/src/readiness/process-start.js +149 -0
  335. package/vendor/desk/mcp/src/runtime/admission-worker.js +194 -0
  336. package/vendor/desk/mcp/src/runtime/admission.js +177 -0
  337. package/vendor/desk/mcp/src/runtime/agency-desk-channel.js +342 -0
  338. package/vendor/desk/mcp/src/runtime/agents-md.js +62 -0
  339. package/vendor/desk/mcp/src/runtime/append-lane.js +68 -0
  340. package/vendor/desk/mcp/src/runtime/argv-safe-reason.js +55 -0
  341. package/vendor/desk/mcp/src/runtime/boot-dependencies.js +75 -0
  342. package/vendor/desk/mcp/src/runtime/boot-text.js +504 -0
  343. package/vendor/desk/mcp/src/runtime/boot.js +1677 -0
  344. package/vendor/desk/mcp/src/runtime/bootstrap.js +1455 -0
  345. package/vendor/desk/mcp/src/runtime/chunked-import.js +102 -0
  346. package/vendor/desk/mcp/src/runtime/copilot-commit-trailer.js +133 -0
  347. package/vendor/desk/mcp/src/runtime/copilot-session.js +155 -0
  348. package/vendor/desk/mcp/src/runtime/deliver.js +469 -0
  349. package/vendor/desk/mcp/src/runtime/desk-channel.js +86 -0
  350. package/vendor/desk/mcp/src/runtime/desk-failure.js +26 -0
  351. package/vendor/desk/mcp/src/runtime/desk-health.js +168 -0
  352. package/vendor/desk/mcp/src/runtime/desk-session.js +1451 -0
  353. package/vendor/desk/mcp/src/runtime/diagnostic-server.js +72 -0
  354. package/vendor/desk/mcp/src/runtime/diagnostics.js +241 -0
  355. package/vendor/desk/mcp/src/runtime/drains-cli.js +187 -0
  356. package/vendor/desk/mcp/src/runtime/drains.js +781 -0
  357. package/vendor/desk/mcp/src/runtime/elsewhere-note.js +9 -0
  358. package/vendor/desk/mcp/src/runtime/failure-evidence.js +21 -0
  359. package/vendor/desk/mcp/src/runtime/fast-refs.js +209 -0
  360. package/vendor/desk/mcp/src/runtime/filer-throttle.js +66 -0
  361. package/vendor/desk/mcp/src/runtime/focused-card.js +147 -0
  362. package/vendor/desk/mcp/src/runtime/front-door.js +204 -0
  363. package/vendor/desk/mcp/src/runtime/gate-wait.js +2 -0
  364. package/vendor/desk/mcp/src/runtime/git-inspection.js +201 -0
  365. package/vendor/desk/mcp/src/runtime/git-read-worker.js +157 -0
  366. package/vendor/desk/mcp/src/runtime/health.js +50 -0
  367. package/vendor/desk/mcp/src/runtime/hooks.js +353 -0
  368. package/vendor/desk/mcp/src/runtime/hosted.js +163 -0
  369. package/vendor/desk/mcp/src/runtime/inbox.js +102 -0
  370. package/vendor/desk/mcp/src/runtime/index-drift.js +118 -0
  371. package/vendor/desk/mcp/src/runtime/last-start.js +133 -0
  372. package/vendor/desk/mcp/src/runtime/lesson-section.js +92 -0
  373. package/vendor/desk/mcp/src/runtime/lessons-shelf.js +100 -0
  374. package/vendor/desk/mcp/src/runtime/lfs.js +319 -0
  375. package/vendor/desk/mcp/src/runtime/native-path.js +12 -0
  376. package/vendor/desk/mcp/src/runtime/newest-release.js +197 -0
  377. package/vendor/desk/mcp/src/runtime/node-selection.js +233 -0
  378. package/vendor/desk/mcp/src/runtime/orca-session-title.js +225 -0
  379. package/vendor/desk/mcp/src/runtime/other-sessions.js +183 -0
  380. package/vendor/desk/mcp/src/runtime/pending-migrations.js +653 -0
  381. package/vendor/desk/mcp/src/runtime/plugin-update.js +215 -0
  382. package/vendor/desk/mcp/src/runtime/pluginless-runtimes.js +34 -0
  383. package/vendor/desk/mcp/src/runtime/pr-publication.js +226 -0
  384. package/vendor/desk/mcp/src/runtime/preview-snapshot.js +23 -0
  385. package/vendor/desk/mcp/src/runtime/publication-mode.js +19 -0
  386. package/vendor/desk/mcp/src/runtime/relays.js +974 -0
  387. package/vendor/desk/mcp/src/runtime/release-alert.js +148 -0
  388. package/vendor/desk/mcp/src/runtime/remote-identity.js +140 -0
  389. package/vendor/desk/mcp/src/runtime/resolve-here.js +4 -0
  390. package/vendor/desk/mcp/src/runtime/runtime-deps-cli.js +65 -0
  391. package/vendor/desk/mcp/src/runtime/runtime-deps.js +1109 -0
  392. package/vendor/desk/mcp/src/runtime/runtime-identity.js +22 -0
  393. package/vendor/desk/mcp/src/runtime/runtime-swap.js +101 -0
  394. package/vendor/desk/mcp/src/runtime/schedules.js +235 -0
  395. package/vendor/desk/mcp/src/runtime/session-activity.js +190 -0
  396. package/vendor/desk/mcp/src/runtime/session-label.js +30 -0
  397. package/vendor/desk/mcp/src/runtime/session-retention.js +662 -0
  398. package/vendor/desk/mcp/src/runtime/session-sync.js +333 -0
  399. package/vendor/desk/mcp/src/runtime/session-trailer.js +126 -0
  400. package/vendor/desk/mcp/src/runtime/sessions-cli.js +301 -0
  401. package/vendor/desk/mcp/src/runtime/signoff-listed.js +81 -0
  402. package/vendor/desk/mcp/src/runtime/skills.js +76 -0
  403. package/vendor/desk/mcp/src/runtime/stale-card-lead.js +52 -0
  404. package/vendor/desk/mcp/src/runtime/stale-desk-refresh.js +198 -0
  405. package/vendor/desk/mcp/src/runtime/stale-desk.js +219 -0
  406. package/vendor/desk/mcp/src/runtime/stalled.js +255 -0
  407. package/vendor/desk/mcp/src/runtime/standing-authority.js +79 -0
  408. package/vendor/desk/mcp/src/runtime/startup-boot.js +341 -0
  409. package/vendor/desk/mcp/src/runtime/startup-resolve.js +140 -0
  410. package/vendor/desk/mcp/src/runtime/state-branch.js +203 -0
  411. package/vendor/desk/mcp/src/runtime/status-compact.js +165 -0
  412. package/vendor/desk/mcp/src/runtime/status-inspection-child.js +26 -0
  413. package/vendor/desk/mcp/src/runtime/status-inspection.js +147 -0
  414. package/vendor/desk/mcp/src/runtime/status-root.js +39 -0
  415. package/vendor/desk/mcp/src/runtime/sync-worker.js +911 -0
  416. package/vendor/desk/mcp/src/runtime/test-state-guard.js +107 -0
  417. package/vendor/desk/mcp/src/runtime/unmerged-saves.js +247 -0
  418. package/vendor/desk/mcp/src/runtime/workspace-claim.js +53 -0
  419. package/vendor/desk/mcp/src/runtime/workspace-evidence.js +96 -0
  420. package/vendor/desk/mcp/src/runtime/workspace-tidy.js +509 -0
  421. package/vendor/desk/mcp/src/search/direct-lexical.js +54 -0
  422. package/vendor/desk/mcp/src/search/embedder.js +108 -0
  423. package/vendor/desk/mcp/src/search/engine.js +406 -0
  424. package/vendor/desk/mcp/src/search/files-router.js +22 -0
  425. package/vendor/desk/mcp/src/search/old-index.js +46 -0
  426. package/vendor/desk/mcp/src/search/vectors.js +60 -0
  427. package/vendor/desk/mcp/src/server.js +389 -0
  428. package/vendor/desk/mcp/src/tool-names.js +73 -0
  429. package/vendor/desk/mcp/src/tool-refusal.cjs +35 -0
  430. package/vendor/desk/mcp/src/tool-schema-parts.js +12 -0
  431. package/vendor/desk/mcp/src/tool-schemas.js +325 -0
  432. package/vendor/desk/mcp/src/tools/_card-commit.js +148 -0
  433. package/vendor/desk/mcp/src/tools/archive-links.js +185 -0
  434. package/vendor/desk/mcp/src/tools/archive-move.js +18 -0
  435. package/vendor/desk/mcp/src/tools/archive-native-session.js +728 -0
  436. package/vendor/desk/mcp/src/tools/archive-state.js +513 -0
  437. package/vendor/desk/mcp/src/tools/delivery-gate.js +251 -0
  438. package/vendor/desk/mcp/src/tools/desk-save.js +444 -0
  439. package/vendor/desk/mcp/src/tools/doctor.js +122 -0
  440. package/vendor/desk/mcp/src/tools/done-evidence.js +260 -0
  441. package/vendor/desk/mcp/src/tools/factory-context.js +204 -0
  442. package/vendor/desk/mcp/src/tools/friction.js +332 -0
  443. package/vendor/desk/mcp/src/tools/improvement.js +156 -0
  444. package/vendor/desk/mcp/src/tools/lesson-lines.js +22 -0
  445. package/vendor/desk/mcp/src/tools/lesson-owners.js +137 -0
  446. package/vendor/desk/mcp/src/tools/lesson-team.js +169 -0
  447. package/vendor/desk/mcp/src/tools/lesson.js +254 -0
  448. package/vendor/desk/mcp/src/tools/local-only.js +151 -0
  449. package/vendor/desk/mcp/src/tools/move.js +794 -0
  450. package/vendor/desk/mcp/src/tools/native-stage-context.js +32 -0
  451. package/vendor/desk/mcp/src/tools/note.js +267 -0
  452. package/vendor/desk/mcp/src/tools/search.js +634 -0
  453. package/vendor/desk/mcp/src/tools/shared-write.js +196 -0
  454. package/vendor/desk/mcp/src/tools/sibling-desk.js +37 -0
  455. package/vendor/desk/mcp/src/tools/status.js +233 -0
  456. package/vendor/desk/mcp/src/tools/task-archive-due.js +9 -0
  457. package/vendor/desk/mcp/src/tools/task-archived-resource.js +53 -0
  458. package/vendor/desk/mcp/src/tools/task-body.js +141 -0
  459. package/vendor/desk/mcp/src/tools/task-focus.js +164 -0
  460. package/vendor/desk/mcp/src/tools/task-log.js +76 -0
  461. package/vendor/desk/mcp/src/tools/task-signoff.js +155 -0
  462. package/vendor/desk/mcp/src/tools/task.js +1768 -0
  463. package/vendor/desk/mcp/src/tools/track-row.js +89 -0
  464. package/vendor/desk/mcp/src/tools/track.js +240 -0
  465. package/vendor/desk/mcp/src/util/agency-session.cjs +29 -0
  466. package/vendor/desk/mcp/src/util/archive-links.js +105 -0
  467. package/vendor/desk/mcp/src/util/bash.js +36 -0
  468. package/vendor/desk/mcp/src/util/capture-record.js +73 -0
  469. package/vendor/desk/mcp/src/util/cas-commit.js +252 -0
  470. package/vendor/desk/mcp/src/util/created-dirs.js +71 -0
  471. package/vendor/desk/mcp/src/util/deferred-tools.js +51 -0
  472. package/vendor/desk/mcp/src/util/desk-owner.js +99 -0
  473. package/vendor/desk/mcp/src/util/env-value.js +13 -0
  474. package/vendor/desk/mcp/src/util/file-identity.js +40 -0
  475. package/vendor/desk/mcp/src/util/finish-commit.js +145 -0
  476. package/vendor/desk/mcp/src/util/fm.js +410 -0
  477. package/vendor/desk/mcp/src/util/git-config-file.js +85 -0
  478. package/vendor/desk/mcp/src/util/git-stage.js +440 -0
  479. package/vendor/desk/mcp/src/util/main-publish.js +240 -0
  480. package/vendor/desk/mcp/src/util/markdown-links.cjs +555 -0
  481. package/vendor/desk/mcp/src/util/object-input.js +59 -0
  482. package/vendor/desk/mcp/src/util/paths.js +647 -0
  483. package/vendor/desk/mcp/src/util/rank.js +189 -0
  484. package/vendor/desk/mcp/src/util/redact.js +92 -0
  485. package/vendor/desk/mcp/src/util/remove-retry.js +35 -0
  486. package/vendor/desk/mcp/src/util/rename-retry.js +73 -0
  487. package/vendor/desk/mcp/src/util/route-around.js +265 -0
  488. package/vendor/desk/mcp/src/util/shell-quote.js +18 -0
  489. package/vendor/desk/mcp/src/util/startup-direction.js +124 -0
  490. package/vendor/desk/mcp/src/util/state-ignore.js +33 -0
  491. package/vendor/desk/mcp/src/util/tool-commits.js +64 -0
  492. package/vendor/desk/mcp/src/util/unicode-16/LICENSE-MIT.txt +7 -0
  493. package/vendor/desk/mcp/src/util/unicode-16/README.md +9 -0
  494. package/vendor/desk/mcp/src/util/unicode-16/letter.cjs +1 -0
  495. package/vendor/desk/mcp/src/util/unicode-16/mark.cjs +1 -0
  496. package/vendor/desk/mcp/src/util/unicode-16/number.cjs +1 -0
  497. package/vendor/desk/mcp/web-auth.cjs +1897 -0
  498. package/vendor/desk/mcp/web-browser-discovery.cjs +53 -0
  499. package/vendor/desk/mcp/web-catalog.json +34 -0
  500. package/vendor/desk/mcp/web-launch.cjs +101 -0
  501. package/vendor/desk/mcp/web.cjs +1239 -0
  502. package/vendor/desk/migrations/01-move-to-ourostack-desk.md +188 -0
  503. package/vendor/desk/migrations/02-tidy-desk.md +87 -0
  504. package/vendor/desk/migrations/03-desk-release-channel.md +38 -0
  505. package/vendor/desk/optional/session-label/consumer.mjs +237 -0
  506. package/vendor/desk/optional/session-label/extension.mjs +32 -0
  507. package/vendor/desk/plugin.json +54 -0
  508. package/vendor/desk/settings.json +3 -0
  509. package/vendor/desk/skills/add-workspace-mcp/SKILL.md +180 -0
  510. package/vendor/desk/skills/adopt-inflight-work/SKILL.md +212 -0
  511. package/vendor/desk/skills/archive-workflow/SKILL.md +132 -0
  512. package/vendor/desk/skills/content-routing/SKILL.md +95 -0
  513. package/vendor/desk/skills/core-meeting-capture/SKILL.md +47 -0
  514. package/vendor/desk/skills/core-meeting-capture/references/capture-contract.md +175 -0
  515. package/vendor/desk/skills/curator/SKILL.md +103 -0
  516. package/vendor/desk/skills/delightful-decks/SKILL.md +67 -0
  517. package/vendor/desk/skills/desk-problem/SKILL.md +87 -0
  518. package/vendor/desk/skills/directory-structure/SKILL.md +169 -0
  519. package/vendor/desk/skills/doc-review-rigor/SKILL.md +63 -0
  520. package/vendor/desk/skills/draining-issues/SKILL.md +62 -0
  521. package/vendor/desk/skills/evaluate-release/SKILL.md +96 -0
  522. package/vendor/desk/skills/evidence-discipline/SKILL.md +150 -0
  523. package/vendor/desk/skills/factory-evaluator/SKILL.md +122 -0
  524. package/vendor/desk/skills/factory-task-context/SKILL.md +116 -0
  525. package/vendor/desk/skills/factory-work/SKILL.md +16 -0
  526. package/vendor/desk/skills/fast-honest-ci/SKILL.md +70 -0
  527. package/vendor/desk/skills/fast-honest-ci/examples.md +49 -0
  528. package/vendor/desk/skills/first-run-bootstrap/SKILL.md +95 -0
  529. package/vendor/desk/skills/friction-management/SKILL.md +98 -0
  530. package/vendor/desk/skills/git-hygiene/SKILL.md +253 -0
  531. package/vendor/desk/skills/independent-review/SKILL.md +34 -0
  532. package/vendor/desk/skills/interaction-style/SKILL.md +239 -0
  533. package/vendor/desk/skills/lesson-capture/SKILL.md +85 -0
  534. package/vendor/desk/skills/lesson-capture/agents-md-budget.mjs +61 -0
  535. package/vendor/desk/skills/online-evaluation/SKILL.md +81 -0
  536. package/vendor/desk/skills/operator-voice-comments/LICENSE-humanize +21 -0
  537. package/vendor/desk/skills/operator-voice-comments/SKILL.md +90 -0
  538. package/vendor/desk/skills/operator-voice-comments/human-voice.md +43 -0
  539. package/vendor/desk/skills/peer-pr-review/SKILL.md +104 -0
  540. package/vendor/desk/skills/pr-feedback-on-own-pr/SKILL.md +145 -0
  541. package/vendor/desk/skills/pr-review-interrogation/SKILL.md +121 -0
  542. package/vendor/desk/skills/pr-reviewer-audit/SKILL.md +68 -0
  543. package/vendor/desk/skills/pr-reviewer-audit/helpers/audit.py +335 -0
  544. package/vendor/desk/skills/pr-reviewer-audit/helpers/test_audit.py +486 -0
  545. package/vendor/desk/skills/pr-self-review/SKILL.md +86 -0
  546. package/vendor/desk/skills/pr-surface-hygiene/SKILL.md +105 -0
  547. package/vendor/desk/skills/pr-surface-hygiene/check-visual-proof.cjs +99 -0
  548. package/vendor/desk/skills/pr-surface-hygiene/repository-setup.md +19 -0
  549. package/vendor/desk/skills/pr-surface-hygiene/resources/pr-visual-proof.yml +29 -0
  550. package/vendor/desk/skills/pr-surface-hygiene/resources/pull-request-template.md +5 -0
  551. package/vendor/desk/skills/preflight-actions/SKILL.md +60 -0
  552. package/vendor/desk/skills/preview-feedback/SKILL.md +70 -0
  553. package/vendor/desk/skills/repo-handling/SKILL.md +67 -0
  554. package/vendor/desk/skills/rnd-lab/SKILL.md +52 -0
  555. package/vendor/desk/skills/runtime-symptom-investigation/SKILL.md +106 -0
  556. package/vendor/desk/skills/session-resumption/SKILL.md +126 -0
  557. package/vendor/desk/skills/session-start/SKILL.md +54 -0
  558. package/vendor/desk/skills/session-start/details.md +150 -0
  559. package/vendor/desk/skills/session-start-migrations/README.md +71 -0
  560. package/vendor/desk/skills/session-start-migrations/SKILL.md +108 -0
  561. package/vendor/desk/skills/start-task/SKILL.md +88 -0
  562. package/vendor/desk/skills/task-card-format/SKILL.md +198 -0
  563. package/vendor/desk/skills/task-lifecycle/SKILL.md +217 -0
  564. package/vendor/desk/skills/track-card-format/SKILL.md +90 -0
  565. package/vendor/desk/skills/using-desk/SKILL.md +58 -0
  566. package/vendor/desk/skills/using-superpowers-with-desk/SKILL.md +156 -0
  567. package/vendor/desk/skills/work-orchestration/SKILL.md +162 -0
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Runs the newest Desk release on disk when this session started on an older one (lib/current-release.cjs).
5
+ if (require("./lib/current-release.cjs").delegate(__filename)) return;
6
+
7
+ // Copilot userPromptSubmitted: hands the model the session boot's result as context beside the message. Copilot weighs sessionStart
8
+ // context lightly (boot acceptance rounds F and G), and it runs this hook before sessionStart on a new session, so this hook starts
9
+ // the boot itself (mcp/src/runtime/startup-boot.js), waits for it within its budget and delivers it once; the sessionStart hook and
10
+ // the first Desk tool reply deliver it when it was not ready here. A folder that resolves to no usable desk, a boot already delivered
11
+ // and any failure answer `{}`; it always exits 0.
12
+
13
+ // The hook's limit is 11 s (copilot-hooks.json); the boot takes 3 to 10 s on a busy machine and has a 15 s budget of its own, so a slow one finishes later and is delivered then.
14
+ // The wait ends this long after the hook's process started, so a slow Node start shortens the wait instead of overrunning the limit.
15
+ const WAIT_UNTIL_MS = 8000;
16
+
17
+ let input = "";
18
+ process.stdin.setEncoding("utf8");
19
+ process.stdin.on("data", (chunk) => { input += chunk; });
20
+ process.stdin.on("end", async () => {
21
+ try {
22
+ // A headless evaluator session gets no boot and claims nothing (mcp/src/factory/headless-flag.cjs); a missing rule file falls back to the same exact comparison.
23
+ let headless;
24
+ try { headless = require("../mcp/src/factory/headless-flag.cjs").isHeadlessFactorySession(process.env); } catch { const v = String(process.env.DESK_FACTORY_HEADLESS ?? ""); headless = v !== "" && v !== "0"; }
25
+ if (headless) {
26
+ process.stdout.write("{}\n");
27
+ return;
28
+ }
29
+ const payload = JSON.parse(input);
30
+ const { sessionId, cwd } = payload;
31
+ // A subagent's brief is its instruction: it gets one short line, once, and no boot of its own.
32
+ const { CHILD_AGENT_LINE, isChildAgentInput } = require("./lib/child-agent.cjs");
33
+ if (isChildAgentInput(payload)) {
34
+ const { markBootDirected: claimChild } = await import("../mcp/src/runtime/copilot-session.js");
35
+ process.stdout.write(claimChild({ sessionId, env: process.env }) ? `${JSON.stringify({ additionalContext: CHILD_AGENT_LINE })}\n` : "{}\n");
36
+ return;
37
+ }
38
+ const boot = await import("../mcp/src/runtime/startup-boot.js");
39
+ const { copilotBootRoot } = await import("../mcp/src/util/startup-direction.js");
40
+ const { markBootDirected } = await import("../mcp/src/runtime/copilot-session.js");
41
+ const sessionFolder = typeof cwd === "string" && cwd.length > 0 ? cwd : process.cwd();
42
+ const key = boot.bootKey({ sessionId });
43
+ if (key === null || !boot.autoBootEnabled(process.env) || copilotBootRoot({ env: process.env, sessionFolder }) === null) {
44
+ process.stdout.write("{}\n");
45
+ return;
46
+ }
47
+ if (process.platform === "win32") {
48
+ // A hook that starts the boot holds the host's pipe open for as long as the boot runs; the Desk server starts it instead.
49
+ process.stdout.write(markBootDirected({ sessionId, env: process.env }) ? `${JSON.stringify({ additionalContext: boot.WINDOWS_BOOT_LINE })}\n` : "{}\n");
50
+ return;
51
+ }
52
+ const { paths } = boot.startBoot({ key, folder: sessionFolder, sessionId, env: process.env });
53
+ if (paths === null || boot.wasDelivered(paths)) {
54
+ process.stdout.write("{}\n");
55
+ return;
56
+ }
57
+ const result = await boot.awaitBoot({ paths, waitMs: Math.max(0, WAIT_UNTIL_MS - performance.now()) });
58
+ let context = "";
59
+ if (result.boot !== null) {
60
+ if (boot.claimDelivery(paths)) context = boot.bootContext({ boot: result.boot }).text;
61
+ } else if (result.reason === "running" && markBootDirected({ sessionId, env: process.env })) {
62
+ // Said once: the next message or the first Desk tool reply carries the result.
63
+ context = boot.pendingBootLine({ seconds: boot.bootAgeSeconds(paths) });
64
+ }
65
+ process.stdout.write(context === "" ? "{}\n" : `${JSON.stringify({ additionalContext: context })}\n`);
66
+ } catch {
67
+ process.stdout.write("{}\n");
68
+ }
69
+ });
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Runs the newest Desk release on disk when this session started on an older one (lib/current-release.cjs).
5
+ if (require("./lib/current-release.cjs").delegate(__filename)) return;
6
+
7
+ // Copilot preToolUse: a durable file written into the host's session folder gets a note naming the desk folder to use. The logic is in `lib/durable-files.cjs`.
8
+ require("./lib/durable-files.cjs").main();
@@ -0,0 +1,61 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "postToolUse": [
5
+ {
6
+ "type": "command",
7
+ "matcher": "skill",
8
+ "bash": "node \"${PLUGIN_ROOT}/hooks/copilot-intake-context.cjs\"",
9
+ "powershell": "node \"${PLUGIN_ROOT}/hooks/copilot-intake-context.cjs\"",
10
+ "timeoutSec": 5
11
+ },
12
+ {
13
+ "type": "command",
14
+ "matcher": "skill",
15
+ "bash": "node \"${PLUGIN_ROOT}/hooks/copilot-skill-current.cjs\"",
16
+ "powershell": "node \"${PLUGIN_ROOT}/hooks/copilot-skill-current.cjs\"",
17
+ "timeoutSec": 5
18
+ }
19
+ ],
20
+ "preToolUse": [
21
+ {
22
+ "type": "command",
23
+ "matcher": "create_session|open_issue_session|open_pr_session",
24
+ "bash": "node \"${PLUGIN_ROOT}/hooks/copilot-lane-model.cjs\"",
25
+ "powershell": "node \"${PLUGIN_ROOT}/hooks/copilot-lane-model.cjs\"",
26
+ "timeoutSec": 5
27
+ },
28
+ {
29
+ "type": "command",
30
+ "matcher": "create|edit|[a-z_]*image[a-z_]*",
31
+ "bash": "node \"${PLUGIN_ROOT}/hooks/copilot-durable-files.cjs\"",
32
+ "powershell": "node \"${PLUGIN_ROOT}/hooks/copilot-durable-files.cjs\"",
33
+ "timeoutSec": 5
34
+ }
35
+ ],
36
+ "sessionEnd": [
37
+ {
38
+ "type": "command",
39
+ "bash": "node \"${PLUGIN_ROOT}/hooks/session-end.cjs\" copilot",
40
+ "powershell": "node \"${PLUGIN_ROOT}/hooks/session-end.cjs\" copilot",
41
+ "timeoutSec": 3
42
+ }
43
+ ],
44
+ "sessionStart": [
45
+ {
46
+ "type": "command",
47
+ "bash": "if command -v node >/dev/null 2>&1; then node \"${PLUGIN_ROOT}/hooks/copilot-session-start.cjs\"; else desk_host=copilot; . \"${PLUGIN_ROOT}/hooks/node-missing.sh\"; fi",
48
+ "powershell": "if (Get-Command node -CommandType Application -ErrorAction SilentlyContinue) { node \"${PLUGIN_ROOT}\\hooks\\copilot-session-start.cjs\" } else { $nodeDir = @($env:ProgramFiles + '\\nodejs') + @(([Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User')) -split ';') + @($env:NVM_SYMLINK) + @(Get-ChildItem -Path ($env:LOCALAPPDATA + '\\fnm\\node-versions\\*\\installation') -Directory -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | ForEach-Object { $_.FullName }) | Where-Object { $_ -and (Test-Path -LiteralPath (Join-Path $_ 'node.exe')) } | Select-Object -First 1; if ($nodeDir) { $text = 'To fix this, restart the app or background service that started this session, or open a new terminal and start the session from there; there is nothing to install. Desk needs Node.js 22.18 or newer. It is installed at ' + (Join-Path $nodeDir 'node.exe') + ', but it is not on this session''s PATH, because the app or service that started this session was started before Node was installed (or with an older PATH), so the Desk tool servers (desk, desk-web) cannot run and Desk tools do not work in this session.'; @{ additionalContext = $text } | ConvertTo-Json -Compress } elseif ($env:NVM_HOME) { '{\"additionalContext\":\"To fix this, run `nvm install lts` and then `nvm use lts` in a terminal. Then the person must open a new terminal and start a new session, because tool servers load only when a session starts. Desk needs Node.js 22.18 or newer, and this machine has no Node.js (no `node` on PATH, in the Windows registry PATH or in the usual install folders), so the Desk tool servers (desk, desk-web) cannot run and Desk tools do not work in this session.\"}' } else { '{\"additionalContext\":\"To fix this, run `winget install --id OpenJS.NodeJS.LTS --exact --accept-source-agreements --accept-package-agreements` in a terminal. Then the person must open a new terminal and start a new session, because tool servers load only when a session starts. Desk needs Node.js 22.18 or newer, and this machine has no Node.js (no `node` on PATH, in the Windows registry PATH or in the usual install folders), so the Desk tool servers (desk, desk-web) cannot run and Desk tools do not work in this session.\"}' } }",
49
+ "timeoutSec": 10
50
+ }
51
+ ],
52
+ "userPromptSubmitted": [
53
+ {
54
+ "type": "command",
55
+ "bash": "node \"${PLUGIN_ROOT}/hooks/copilot-boot-prompt.cjs\"",
56
+ "powershell": "node \"${PLUGIN_ROOT}/hooks/copilot-boot-prompt.cjs\"",
57
+ "timeoutSec": 11
58
+ }
59
+ ]
60
+ }
61
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ // Runs the newest Desk release on disk when this session started on an older one (lib/current-release.cjs).
4
+ if (require("./lib/current-release.cjs").delegate(__filename)) return;
5
+ require("./lib/copilot-intake-context.cjs").main();
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Runs the newest Desk release on disk when this session started on an older one (lib/current-release.cjs).
5
+ if (require("./lib/current-release.cjs").delegate(__filename)) return;
6
+
7
+ // Copilot preToolUse: a lane started without a model gets Desk's lane default. The logic is in `lib/lane-model.cjs`.
8
+ require("./lib/lane-model.cjs").main();
@@ -0,0 +1,264 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Runs the newest Desk release on disk when this session started on an older one (lib/current-release.cjs).
5
+ if (require("./lib/current-release.cjs").delegate(__filename)) return;
6
+
7
+ const fs = require("node:fs");
8
+ const { pathToFileURL } = require("node:url");
9
+ const path = require("node:path");
10
+
11
+ // How long the hook may keep running after its output is written, for cancelled children to close.
12
+ const EXIT_GRACE_MS = 500;
13
+
14
+ const pluginRoot = process.env.PLUGIN_ROOT || path.resolve(__dirname, "..");
15
+ const foundationPath = path.join(pluginRoot, "skills", "using-desk", "SKILL.md");
16
+ // Copilot has no setting that makes a plugin's agent the default (Claude Code takes `agent` from settings.json), and the hook
17
+ // input does not say which agent runs, so every session is told to act as the worker unless it was started as another agent.
18
+ const workerPointer = `Unless started with \`--agent\` or the stand-down rule above applies (then skip this read too), act as Desk's worker: read ${path.join(pluginRoot, "agents", "worker.agent.md")} first.`;
19
+ // The same rule as BOOT_STAND_DOWN in mcp/src/util/startup-direction.js; the fallbacks below cannot load that module.
20
+ const BOOT_STAND_DOWN = "The boot's instructions are for the operator's session: a child agent with a bounded brief, or a session the operator told not to boot, follows its brief and ignores them.";
21
+ // The foundation points at the RFC through this line: the installed copy, which
22
+ // the agent can open from any repository. Computed, never read at startup.
23
+ const rfcPath = path.join(pluginRoot, "docs", "agentic-engineering-v3-rfc.md");
24
+ // The optional lines' deadline (lib/boot-checks.cjs `timing`), read where it is used: the module is loaded inside the hook's try blocks.
25
+ const optionalLinesDeadlineMs = () => require("./lib/boot-checks.cjs").timing.optionalLinesDeadlineMs;
26
+ const { performance } = require("node:perf_hooks");
27
+
28
+ // Copilot passes the session's working folder as `cwd` and the session id as `sessionId` in the hook input. Read
29
+ // them briefly and fall back to the process folder, so startup never waits on a host that leaves stdin open.
30
+ function readSessionInput() {
31
+ return new Promise((resolve) => {
32
+ if (process.stdin.isTTY) {
33
+ resolve({ folder: process.cwd() });
34
+ return;
35
+ }
36
+ let input = "";
37
+ const finish = () => {
38
+ clearTimeout(timer);
39
+ process.stdin.destroy();
40
+ try {
41
+ const { cwd, sessionId, source } = JSON.parse(input);
42
+ resolve({ folder: typeof cwd === "string" && cwd.length > 0 ? cwd : process.cwd(), sessionId, source });
43
+ } catch {
44
+ resolve({ folder: process.cwd() });
45
+ }
46
+ };
47
+ const timer = setTimeout(finish, 500);
48
+ process.stdin.setEncoding("utf8");
49
+ process.stdin.on("data", (chunk) => { input += chunk; });
50
+ process.stdin.on("end", finish);
51
+ process.stdin.on("error", finish);
52
+ });
53
+ }
54
+
55
+ // Copilot gives the Desk MCP server no session folder, so this hook records the one it was given, and the saved binding
56
+ // it sees, in a file keyed by the session id; the server reads it whenever it resolves its root (see
57
+ // mcp/src/runtime/copilot-session.js). It runs before the line below is composed, so the line and the server resolve alike.
58
+ // Writing the record never throws (a session must start without it); only a Desk install that cannot load the module reaches the fallback line.
59
+ async function recordSession({ folder, sessionId, source }) {
60
+ const { recordCopilotSession } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "runtime", "copilot-session.js")).href);
61
+ const { resolveActivationConfigPath } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "util", "paths.js")).href);
62
+ recordCopilotSession({ sessionId, folder: path.resolve(folder), source, activationConfig: resolveActivationConfigPath({ env: process.env }), env: process.env });
63
+ }
64
+
65
+ // Every commit an agent makes in this repository carries a `Session: <id>` trailer (mcp/src/runtime/session-trailer.js), so a
66
+ // commit on another session's branch can be traced. Quiet and best-effort: a session must start whatever the repository's hooks look like.
67
+ async function installSessionTrailer(folder) {
68
+ try {
69
+ const { installSessionTrailerHooks } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "runtime", "session-trailer.js")).href);
70
+ installSessionTrailerHooks(path.resolve(folder));
71
+ } catch {
72
+ // Not installed this time; the next session start tries again.
73
+ }
74
+ }
75
+
76
+ // Copilot asks its agent for an AI co-author trailer on commits, and offers it the ask_user question form, unless the operator's
77
+ // Copilot settings turn them off. Desk forbids AI attribution and asks in plain chat (Claude's worker disallows AskUserQuestion), so
78
+ // each setting is turned off once, only when unset (mcp/src/runtime/copilot-commit-trailer.js). One line for each it changed.
79
+ async function hostSettingLines() {
80
+ try {
81
+ const { disableCoAuthorTrailer, disableAskUser } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "runtime", "copilot-commit-trailer.js")).href);
82
+ const trailer = disableCoAuthorTrailer({ env: process.env });
83
+ const askUser = disableAskUser({ env: process.env });
84
+ // A first session usually sets both; one line keeps the startup context inside its budget.
85
+ if (trailer.state === "set" && askUser.state === "set") {
86
+ const file = path.join(process.env.COPILOT_HOME || path.join(process.env.HOME || process.env.USERPROFILE || require("node:os").homedir(), ".copilot"), "settings.json");
87
+ return `Desk startup: set \`includeCoAuthoredBy: false\` and \`askUser: false\` in ${file}, so from the next session Copilot adds no AI co-author trailer and the ask_user form is off; in this session add no trailer and ask in plain chat. Desk keeps a value the operator sets.`;
88
+ }
89
+ return [trailer.line, askUser.line].filter(Boolean).join("\n\n");
90
+ } catch {
91
+ return "";
92
+ }
93
+ }
94
+
95
+ async function nativeMemoryLine() {
96
+ try {
97
+ const { disableNativeMemory } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "runtime", "copilot-commit-trailer.js")).href);
98
+ const result = disableNativeMemory({ env: process.env });
99
+ if (result.state === "already") return "";
100
+ if (result.state === "set") return result.line;
101
+ if (result.line) process.stderr.write(result.line + "\n");
102
+ return "Desk memory: repair native memory now.";
103
+ } catch {
104
+ process.stderr.write("Desk memory: set memory:false before continuing; the native settings helper failed.\n");
105
+ return "Desk memory: repair native memory now.";
106
+ }
107
+ }
108
+
109
+ // Copilot already loads the AGENTS.md at the root of the repository a session works in, so a session working in the desk
110
+ // itself (or in a folder of the desk's own repository) has the grants from the host, and a second copy only spends context.
111
+ function hostLoadsDeskAgentsFile(sessionFolder, root) {
112
+ try {
113
+ const deskRoot = fs.realpathSync(root);
114
+ let folder = fs.realpathSync(sessionFolder);
115
+ while (folder !== deskRoot) {
116
+ if (fs.existsSync(path.join(folder, ".git"))) return false;
117
+ const parent = path.dirname(folder);
118
+ if (parent === folder) return false;
119
+ folder = parent;
120
+ }
121
+ return true;
122
+ } catch {
123
+ return false;
124
+ }
125
+ }
126
+
127
+ // The standing-authority line for the desk this session binds (mcp/src/runtime/standing-authority.js): `deskOnly` from a
128
+ // solo desk's AGENTS.md, and `withPerson()`, which in a Crew workspace reads the person's own desk, resolved without a
129
+ // network call. Never throws.
130
+ async function standingAuthorityLines(sessionFolder) {
131
+ const none = { deskOnly: "", withPerson: async () => "" };
132
+ try {
133
+ const { resolveStartupRoot } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "util", "startup-direction.js")).href);
134
+ const { resolveActivationConfigPath } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "util", "paths.js")).href);
135
+ const { standingAuthorityLine } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "runtime", "standing-authority.js")).href);
136
+ const bound = resolveStartupRoot({ activationConfigPath: resolveActivationConfigPath({ env: process.env }), env: process.env, hostProjectRoot: sessionFolder });
137
+ if (!bound.root || bound.unavailable || bound.error) return none;
138
+ const root = bound.root;
139
+ // A Crew workspace's root AGENTS.md is the team's and grants nothing: there only the person's own desk counts.
140
+ const { crewWorkspace } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "desk", "crew-roster.js")).href);
141
+ const crew = crewWorkspace(root).crew === true;
142
+ const deskOnly = crew || hostLoadsDeskAgentsFile(sessionFolder, root) ? "" : standingAuthorityLine({ root });
143
+ const withPerson = async () => {
144
+ if (!crew) return deskOnly;
145
+ try {
146
+ const { improvementPerson } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "desk", "improvement-person.js")).href);
147
+ const who = await improvementPerson({ deskRoot: root, env: process.env });
148
+ return who?.status === "ok" && who.personPrefix ? standingAuthorityLine({ root, personPrefix: who.personPrefix, crew }) : "";
149
+ } catch {
150
+ return "";
151
+ }
152
+ };
153
+ return { deskOnly, withPerson };
154
+ } catch {
155
+ return none;
156
+ }
157
+ }
158
+
159
+ // Starts the session's boot at once (it runs detached, in the background) and hands over its result when it finishes inside the hook's
160
+ // budget. Copilot runs the first-prompt hook before this one on a new session, which has usually started it and delivered it already;
161
+ // then this adds nothing. A resumed session boots afresh. A result that is not ready is left for the next message or the first Desk tool
162
+ // reply (mcp/src/runtime/startup-boot.js). Never throws.
163
+ async function bootSection({ folder, sessionId, source }) {
164
+ try {
165
+ const boot = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "runtime", "startup-boot.js")).href);
166
+ const { copilotBootRoot } = await import(pathToFileURL(path.join(pluginRoot, "mcp", "src", "util", "startup-direction.js")).href);
167
+ if (!boot.autoBootEnabled(process.env) || !copilotBootRoot({ env: process.env, sessionFolder: folder })) return "";
168
+ // On Windows a hook that starts the boot holds the host's pipe open until it ends; the first-prompt hook says so and the Desk server starts it.
169
+ if (process.platform === "win32") return "";
170
+ const key = boot.bootKey({ sessionId });
171
+ if (key === null) return "";
172
+ const { paths } = boot.startBoot({ key, folder, sessionId, env: process.env, fresh: source === "resume" });
173
+ if (paths === null || boot.wasDelivered(paths)) return "";
174
+ const result = await boot.awaitBoot({ paths, waitMs: Math.max(0, optionalLinesDeadlineMs() - performance.now()) });
175
+ if (result.boot !== null) return boot.claimDelivery(paths) ? boot.bootContext({ boot: result.boot }).text : "";
176
+ return result.reason === "running" ? boot.pendingBootLine({ seconds: boot.bootAgeSeconds(paths) }) : "";
177
+ } catch {
178
+ return "";
179
+ }
180
+ }
181
+
182
+ // Let Desk's shared startup module resolve the root the way the Desk server will, with the session folder as the
183
+ // project folder, so the line never names a root the server will not use.
184
+ async function startupDirection() {
185
+ try {
186
+ const modulePath = path.join(pluginRoot, "mcp", "src", "util", "startup-direction.js");
187
+ const { copilotStartupDirection } = await import(pathToFileURL(modulePath).href);
188
+ const session = await readSessionInput();
189
+ const sessionFolder = session.folder;
190
+ await recordSession(session);
191
+ await installSessionTrailer(sessionFolder);
192
+ const direction = copilotStartupDirection({ env: process.env, sessionFolder });
193
+ // The boot starts now, before the slower checks below, so it runs while they do.
194
+ const bootResult = bootSection({ folder: sessionFolder, sessionId: session.sessionId, source: session.source });
195
+ bootResult.catch(() => {});
196
+ // The boot checks add one agent line only when one of them has something to say.
197
+ const { runBootChecks, migrationLine } = require("./lib/boot-checks.cjs");
198
+ // Desk's own migration Detect blocks run alongside the boot checks, and
199
+ // add one line only when a migration is pending.
200
+ const optional = Promise.all([
201
+ runBootChecks({ host: "copilot", env: process.env, sessionFolder }),
202
+ migrationLine({ host: "copilot", env: process.env, sessionFolder }),
203
+ ]);
204
+ // The awaits below must not leave a rejection here unhandled (it would end the hook with no output); the race still
205
+ // rejects into this function's catch, as before.
206
+ optional.catch(() => {});
207
+ // The operator's standing grants follow the startup line, so the session has them before any host default
208
+ // (interaction-style, "Standing authority"). Read after the checks start, so it never delays them; a Crew member's
209
+ // own section is raced on its own, and past the deadline the desk's own section stands alone.
210
+ const standing = await standingAuthorityLines(sessionFolder);
211
+ const personLine = standing.withPerson();
212
+ let timer;
213
+ const late = new Promise((resolve) => { timer = setTimeout(resolve, Math.max(0, optionalLinesDeadlineMs() - performance.now()), null); });
214
+ const [lines, standingLine] = await Promise.all([Promise.race([optional, late]), Promise.race([personLine, late])]);
215
+ clearTimeout(timer);
216
+ const bootText = await bootResult;
217
+ // A delivered boot prints the desk's AGENTS.md, which already holds the grants: say them once.
218
+ const standingText = standingLine || standing.deskOnly;
219
+ const probe = String(standingText).split("\n")[3]?.replace(/^[-*\s]+/u, "").slice(0, 60);
220
+ const granted = Boolean(probe) && bootText.includes(probe);
221
+ return [direction, bootText, granted ? "" : standingText, ...(lines ?? [])].filter(Boolean).join("\n\n");
222
+ } catch {
223
+ return `Desk startup: Desk could not resolve its root in this hook, so the hook did not start the boot. Desk starts it with your first Desk tool reply; desk_status reports the root Desk actually bound. ${BOOT_STAND_DOWN}`;
224
+ }
225
+ }
226
+
227
+ // The pointer to the on-demand Plain Language skill, with its blank line; a copy of the hook without the library adds nothing.
228
+ function plainLanguagePointer() {
229
+ try { return `${require("./lib/child-agent.cjs").PLAIN_LANGUAGE_POINTER}\n\n`; } catch { return ""; }
230
+ }
231
+
232
+ function emit(additionalContext) {
233
+ // The host waits for this process to end, not for its output: once the output is written, nothing left running (a
234
+ // check past its budget, a migration block being stopped) may hold it for long. Cancelled children get a moment to close
235
+ // first; the timer does not itself keep the process alive. Every repair and delivery it started is detached.
236
+ process.stdout.write(JSON.stringify({ additionalContext }), () => setTimeout(() => process.exit(0), EXIT_GRACE_MS).unref());
237
+ }
238
+
239
+ (async () => {
240
+ // A headless evaluator session gets no startup output and starts nothing (mcp/src/factory/headless-flag.cjs); a missing rule file falls back to the same exact comparison.
241
+ try { if (require("../mcp/src/factory/headless-flag.cjs").isHeadlessFactorySession(process.env)) return; } catch { const v = String(process.env.DESK_FACTORY_HEADLESS ?? ""); if (v !== "" && v !== "0") return; }
242
+ // A Node older than Desk needs, with no newer one installed: say what to install and that a new session is needed, and nothing else.
243
+ let nodeRequired = "";
244
+ try { nodeRequired = require("./lib/node-required.cjs").nodeRequiredLine(); } catch { /* a check that cannot load never blocks the session */ }
245
+ if (nodeRequired) {
246
+ emit(nodeRequired);
247
+ return;
248
+ }
249
+ const memory = await nativeMemoryLine();
250
+ const settings = await hostSettingLines();
251
+ try {
252
+ // The frontmatter only names and describes the skill for the host's skill list; dropping it here pays for the worker pointer
253
+ // inside the startup context budget.
254
+ const foundation = fs.readFileSync(foundationPath, "utf8").replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n\s*/u, "").trimEnd();
255
+ const direction = await startupDirection();
256
+ // The startup line leads, as in the Claude hook: a host that keeps only a preview of a long context still shows the boot imperative.
257
+ // The boot names the RFC itself; the foundation's pointer to it needs a line only when the boot has not arrived.
258
+ const rfcLine = direction.includes("Desk RFC:") ? "" : `\n\nDesk RFC: ${rfcPath}`;
259
+ const output = `${direction}${settings ? `\n\n${settings}` : ""}${memory ? `\n\n${memory}` : ""}\n\n${plainLanguagePointer()}${workerPointer}\n\n${foundation}${rfcLine}`;
260
+ emit(output);
261
+ } catch {
262
+ emit([settings, memory, `desk worker boot — the Desk foundation could not be read from ${foundationPath}. Desk runs its own boot; its result comes with your first Desk tool reply, and desk:session-start explains it. ${BOOT_STAND_DOWN}`].filter(Boolean).join("\n\n"));
263
+ }
264
+ })();
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Copilot postToolUse for the `skill` tool. The host reads a plugin's skills when the app starts, so a skill the agent loads is
5
+ // the text of the release the session began on. When a newer release of that skill's plugin is on disk (Agency's cache, Desk's
6
+ // release copies) and the text differs, this hands the agent the current text and where its docs are. Output is `{}` when there
7
+ // is nothing newer; it always exits 0.
8
+
9
+ if (require("./lib/current-release.cjs").delegate(__filename)) return;
10
+
11
+ let input = "";
12
+ process.stdin.setEncoding("utf8");
13
+ process.stdin.on("data", (chunk) => { input += chunk; });
14
+ process.stdin.on("end", () => {
15
+ let output = {};
16
+ try {
17
+ const payload = JSON.parse(input);
18
+ let args = payload.toolArgs;
19
+ if (typeof args === "string") args = JSON.parse(args);
20
+ if (payload.toolName === "skill" && args && typeof args.skill === "string") {
21
+ const additionalContext = require("./lib/current-release.cjs").currentSkill({ pluginRoot: require("node:path").resolve(__dirname, ".."), name: args.skill });
22
+ if (additionalContext !== null) output = { additionalContext };
23
+ }
24
+ } catch {
25
+ // Nothing to add; the skill's own text stands.
26
+ }
27
+ process.stdout.write(`${JSON.stringify(output)}\n`);
28
+ });
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // The end hook hosts register. Its logic is in `lib/factory-end.cjs`, which tests import by name.
5
+ require("./lib/factory-end.cjs").main(__filename);
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Started detached, with ignored stdio, by both session-start hooks once their
5
+ // output is built (boot-checks.cjs `startFactory`, only when a store has
6
+ // `contribute: true`). It runs one sweep of pending session markers and then,
7
+ // for every consented store, a flush and a refresh of its open andon issues
8
+ // (mcp/src/factory/flush.js `flushConsented`), all within one 120-second
9
+ // deadline. It prints nothing and
10
+ // always exits 0; a hard stop 30 seconds after the deadline ends a process
11
+ // held up outside the flush's own runner boundaries.
12
+
13
+
14
+ const DEADLINE_MS = 120000;
15
+ const GRACE_MS = 30000;
16
+
17
+ async function main({ env = process.env, deadlineMs = DEADLINE_MS } = {}) {
18
+ const { flushConsented, ghRunner } = await import("../mcp/src/factory/flush.js");
19
+ return flushConsented(env, { runner: ghRunner({ env }), deadlineMs });
20
+ }
21
+
22
+ module.exports = { main, DEADLINE_MS };
23
+
24
+ if (require.main === module) {
25
+ setTimeout(() => process.exit(0), DEADLINE_MS + GRACE_MS).unref();
26
+ main().then(() => process.exit(0), () => process.exit(0));
27
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "hooks": {
3
+ "SessionEnd": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-end.cjs\" claude",
9
+ "timeout": 5
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "SessionStart": [
15
+ {
16
+ "matcher": "startup|resume|clear|compact",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "if command -v node >/dev/null 2>&1; then node \"${CLAUDE_PLUGIN_ROOT}/hooks/claude-session-start.cjs\" \"${CLAUDE_PLUGIN_ROOT}/skills/using-desk/SKILL.md\"; else desk_host=claude; . \"${CLAUDE_PLUGIN_ROOT}/hooks/node-missing.sh\"; fi",
21
+ "timeout": 10
22
+ }
23
+ ]
24
+ }
25
+ ],
26
+ "PostToolUse": [
27
+ {
28
+ "matcher": "^mcp__(plugin_desk_)?desk__task_(focus|create)$",
29
+ "hooks": [
30
+ {
31
+ "type": "command",
32
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/orca-session-title.cjs\"",
33
+ "timeout": 15,
34
+ "async": true
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ }