gsd-pi 2.63.0 → 2.64.0-dev.05b8a94

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 (612) hide show
  1. package/README.md +46 -134
  2. package/dist/cli.js +48 -6
  3. package/dist/headless-query.js +11 -1
  4. package/dist/headless.js +3 -1
  5. package/dist/help-text.js +4 -1
  6. package/dist/onboarding.js +15 -8
  7. package/dist/resource-loader.js +18 -3
  8. package/dist/resources/extensions/bg-shell/bg-shell-lifecycle.js +22 -7
  9. package/dist/resources/extensions/bg-shell/process-manager.js +6 -1
  10. package/dist/resources/extensions/cmux/index.js +21 -12
  11. package/dist/resources/extensions/gsd/auto/detect-stuck.js +27 -0
  12. package/dist/resources/extensions/gsd/auto/finalize-timeout.js +40 -0
  13. package/dist/resources/extensions/gsd/auto/loop.js +4 -0
  14. package/dist/resources/extensions/gsd/auto/phases.js +157 -22
  15. package/dist/resources/extensions/gsd/auto/session.js +12 -0
  16. package/dist/resources/extensions/gsd/auto-dashboard.js +14 -8
  17. package/dist/resources/extensions/gsd/auto-model-selection.js +32 -0
  18. package/dist/resources/extensions/gsd/auto-post-unit.js +222 -11
  19. package/dist/resources/extensions/gsd/auto-prompts.js +25 -0
  20. package/dist/resources/extensions/gsd/auto-recovery.js +15 -7
  21. package/dist/resources/extensions/gsd/auto-start.js +10 -21
  22. package/dist/resources/extensions/gsd/auto-timers.js +2 -1
  23. package/dist/resources/extensions/gsd/auto-tool-tracking.js +17 -0
  24. package/dist/resources/extensions/gsd/auto-verification.js +138 -1
  25. package/dist/resources/extensions/gsd/auto-worktree.js +13 -7
  26. package/dist/resources/extensions/gsd/auto.js +24 -2
  27. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +158 -75
  28. package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +13 -0
  29. package/dist/resources/extensions/gsd/bootstrap/notify-interceptor.js +28 -0
  30. package/dist/resources/extensions/gsd/bootstrap/query-tools.js +85 -0
  31. package/dist/resources/extensions/gsd/bootstrap/register-extension.js +3 -0
  32. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +40 -1
  33. package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +15 -0
  34. package/dist/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.js +54 -0
  35. package/dist/resources/extensions/gsd/bootstrap/system-context.js +50 -2
  36. package/dist/resources/extensions/gsd/commands/catalog.js +7 -1
  37. package/dist/resources/extensions/gsd/commands/handlers/core.js +1 -0
  38. package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +103 -0
  39. package/dist/resources/extensions/gsd/commands/handlers/ops.js +5 -0
  40. package/dist/resources/extensions/gsd/commands-handlers.js +9 -4
  41. package/dist/resources/extensions/gsd/constants.js +42 -0
  42. package/dist/resources/extensions/gsd/db-writer.js +72 -4
  43. package/dist/resources/extensions/gsd/forensics.js +20 -4
  44. package/dist/resources/extensions/gsd/gsd-db.js +64 -17
  45. package/dist/resources/extensions/gsd/guided-flow.js +19 -0
  46. package/dist/resources/extensions/gsd/metrics.js +27 -1
  47. package/dist/resources/extensions/gsd/native-git-bridge.js +5 -3
  48. package/dist/resources/extensions/gsd/notification-overlay.js +224 -0
  49. package/dist/resources/extensions/gsd/notification-store.js +268 -0
  50. package/dist/resources/extensions/gsd/notification-widget.js +56 -0
  51. package/dist/resources/extensions/gsd/post-execution-checks.js +407 -0
  52. package/dist/resources/extensions/gsd/pre-execution-checks.js +464 -0
  53. package/dist/resources/extensions/gsd/preferences-types.js +6 -0
  54. package/dist/resources/extensions/gsd/preferences-validation.js +33 -0
  55. package/dist/resources/extensions/gsd/preferences.js +11 -2
  56. package/dist/resources/extensions/gsd/prompt-loader.js +7 -0
  57. package/dist/resources/extensions/gsd/prompts/complete-milestone.md +2 -0
  58. package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -0
  59. package/dist/resources/extensions/gsd/prompts/doctor-heal.md +1 -0
  60. package/dist/resources/extensions/gsd/prompts/forensics.md +2 -0
  61. package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +2 -0
  62. package/dist/resources/extensions/gsd/prompts/system.md +4 -7
  63. package/dist/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
  64. package/dist/resources/extensions/gsd/roadmap-mutations.js +1 -1
  65. package/dist/resources/extensions/gsd/roadmap-slices.js +9 -5
  66. package/dist/resources/extensions/gsd/safety/content-validator.js +73 -0
  67. package/dist/resources/extensions/gsd/safety/destructive-guard.js +34 -0
  68. package/dist/resources/extensions/gsd/safety/evidence-collector.js +109 -0
  69. package/dist/resources/extensions/gsd/safety/evidence-cross-ref.js +83 -0
  70. package/dist/resources/extensions/gsd/safety/file-change-validator.js +71 -0
  71. package/dist/resources/extensions/gsd/safety/git-checkpoint.js +91 -0
  72. package/dist/resources/extensions/gsd/safety/safety-harness.js +64 -0
  73. package/dist/resources/extensions/gsd/slice-parallel-conflict.js +67 -0
  74. package/dist/resources/extensions/gsd/slice-parallel-eligibility.js +51 -0
  75. package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +378 -0
  76. package/dist/resources/extensions/gsd/state.js +74 -14
  77. package/dist/resources/extensions/gsd/status-guards.js +11 -0
  78. package/dist/resources/extensions/gsd/tools/complete-milestone.js +17 -12
  79. package/dist/resources/extensions/gsd/tools/complete-slice.js +40 -26
  80. package/dist/resources/extensions/gsd/tools/complete-task.js +12 -12
  81. package/dist/resources/extensions/gsd/tools/plan-milestone.js +33 -25
  82. package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -8
  83. package/dist/resources/extensions/gsd/verification-evidence.js +18 -0
  84. package/dist/resources/extensions/gsd/workflow-logger.js +8 -0
  85. package/dist/resources/extensions/gsd/workflow-projections.js +21 -5
  86. package/dist/resources/extensions/gsd/worktree-manager.js +82 -29
  87. package/dist/resources/extensions/gsd/worktree-resolver.js +4 -3
  88. package/dist/resources/extensions/mcp-client/auth.js +101 -0
  89. package/dist/resources/extensions/mcp-client/index.js +10 -1
  90. package/dist/resources/extensions/ollama/index.js +28 -22
  91. package/dist/resources/extensions/ollama/model-capabilities.js +37 -34
  92. package/dist/resources/extensions/ollama/ndjson-stream.js +54 -0
  93. package/dist/resources/extensions/ollama/ollama-chat-provider.js +380 -0
  94. package/dist/resources/extensions/ollama/ollama-client.js +23 -32
  95. package/dist/resources/extensions/ollama/ollama-discovery.js +2 -7
  96. package/dist/resources/extensions/ollama/ollama-tool.js +62 -0
  97. package/dist/resources/extensions/ollama/thinking-parser.js +104 -0
  98. package/dist/update-cmd.js +4 -2
  99. package/dist/web/standalone/.next/BUILD_ID +1 -1
  100. package/dist/web/standalone/.next/app-path-routes-manifest.json +20 -19
  101. package/dist/web/standalone/.next/build-manifest.json +3 -3
  102. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  103. package/dist/web/standalone/.next/required-server-files.json +4 -4
  104. package/dist/web/standalone/.next/routes-manifest.json +6 -0
  105. package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
  106. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  107. package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
  108. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  109. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  110. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  111. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  112. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  113. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  114. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  115. package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
  116. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  117. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  118. package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
  119. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  120. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  121. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  122. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  123. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  124. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  125. package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
  126. package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
  127. package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
  128. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
  129. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
  130. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
  131. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
  132. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
  133. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
  134. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
  135. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
  136. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
  137. package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
  138. package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
  139. package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
  140. package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
  141. package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
  142. package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
  143. package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
  144. package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
  145. package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
  146. package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
  147. package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
  148. package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
  149. package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
  150. package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
  151. package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
  152. package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
  153. package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
  154. package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
  155. package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
  156. package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  157. package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  158. package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
  159. package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
  160. package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
  161. package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
  162. package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  163. package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  164. package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
  165. package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
  166. package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  167. package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
  168. package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
  169. package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  170. package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
  171. package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
  172. package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
  173. package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
  174. package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
  175. package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
  176. package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
  177. package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
  178. package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
  179. package/dist/web/standalone/.next/server/app/api/notifications/route.js +3 -0
  180. package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -0
  181. package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -0
  182. package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
  183. package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
  184. package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
  185. package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
  186. package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  187. package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
  188. package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  189. package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  190. package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
  191. package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
  192. package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
  193. package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
  194. package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
  195. package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
  196. package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
  197. package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
  198. package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
  199. package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
  200. package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
  201. package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
  202. package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
  203. package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
  204. package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
  205. package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
  206. package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
  207. package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
  208. package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
  209. package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
  210. package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
  211. package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  212. package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
  213. package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
  214. package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
  215. package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
  216. package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
  217. package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
  218. package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
  219. package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
  220. package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
  221. package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
  222. package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  223. package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
  224. package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  225. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
  226. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
  227. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
  228. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
  229. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
  230. package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  231. package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
  232. package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
  233. package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
  234. package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
  235. package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
  236. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  237. package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  238. package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
  239. package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
  240. package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
  241. package/dist/web/standalone/.next/server/app/index.html +1 -1
  242. package/dist/web/standalone/.next/server/app/index.rsc +4 -4
  243. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  244. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
  245. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  246. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  247. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  248. package/dist/web/standalone/.next/server/app/page.js +2 -2
  249. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  250. package/dist/web/standalone/.next/server/app-paths-manifest.json +20 -19
  251. package/dist/web/standalone/.next/server/chunks/6897.js +12 -0
  252. package/dist/web/standalone/.next/server/chunks/7471.js +3 -3
  253. package/dist/web/standalone/.next/server/functions-config-manifest.json +1 -0
  254. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  255. package/dist/web/standalone/.next/server/middleware.js +2 -2
  256. package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
  257. package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
  258. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  259. package/dist/web/standalone/.next/server/pages/500.html +2 -2
  260. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  261. package/dist/web/standalone/.next/static/Vbx2-SrSBOgta6576xj9m/_buildManifest.js +1 -0
  262. package/dist/web/standalone/.next/static/chunks/app/_global-error/page-8805a20e15762c3c.js +1 -0
  263. package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
  264. package/dist/web/standalone/.next/static/chunks/app/api/boot/route-8805a20e15762c3c.js +1 -0
  265. package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/input/route-8805a20e15762c3c.js +1 -0
  266. package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/resize/route-8805a20e15762c3c.js +1 -0
  267. package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/stream/route-8805a20e15762c3c.js +1 -0
  268. package/dist/web/standalone/.next/static/chunks/app/api/browse-directories/route-8805a20e15762c3c.js +1 -0
  269. package/dist/web/standalone/.next/static/chunks/app/api/captures/route-8805a20e15762c3c.js +1 -0
  270. package/dist/web/standalone/.next/static/chunks/app/api/cleanup/route-8805a20e15762c3c.js +1 -0
  271. package/dist/web/standalone/.next/static/chunks/app/api/dev-mode/route-8805a20e15762c3c.js +1 -0
  272. package/dist/web/standalone/.next/static/chunks/app/api/doctor/route-8805a20e15762c3c.js +1 -0
  273. package/dist/web/standalone/.next/static/chunks/app/api/experimental/route-8805a20e15762c3c.js +1 -0
  274. package/dist/web/standalone/.next/static/chunks/app/api/export-data/route-8805a20e15762c3c.js +1 -0
  275. package/dist/web/standalone/.next/static/chunks/app/api/files/route-8805a20e15762c3c.js +1 -0
  276. package/dist/web/standalone/.next/static/chunks/app/api/forensics/route-8805a20e15762c3c.js +1 -0
  277. package/dist/web/standalone/.next/static/chunks/app/api/git/route-8805a20e15762c3c.js +1 -0
  278. package/dist/web/standalone/.next/static/chunks/app/api/history/route-8805a20e15762c3c.js +1 -0
  279. package/dist/web/standalone/.next/static/chunks/app/api/hooks/route-8805a20e15762c3c.js +1 -0
  280. package/dist/web/standalone/.next/static/chunks/app/api/inspect/route-8805a20e15762c3c.js +1 -0
  281. package/dist/web/standalone/.next/static/chunks/app/api/knowledge/route-8805a20e15762c3c.js +1 -0
  282. package/dist/web/standalone/.next/static/chunks/app/api/live-state/route-8805a20e15762c3c.js +1 -0
  283. package/dist/web/standalone/.next/static/chunks/app/api/notifications/route-8805a20e15762c3c.js +1 -0
  284. package/dist/web/standalone/.next/static/chunks/app/api/onboarding/route-8805a20e15762c3c.js +1 -0
  285. package/dist/web/standalone/.next/static/chunks/app/api/preferences/route-8805a20e15762c3c.js +1 -0
  286. package/dist/web/standalone/.next/static/chunks/app/api/projects/route-8805a20e15762c3c.js +1 -0
  287. package/dist/web/standalone/.next/static/chunks/app/api/recovery/route-8805a20e15762c3c.js +1 -0
  288. package/dist/web/standalone/.next/static/chunks/app/api/remote-questions/route-8805a20e15762c3c.js +1 -0
  289. package/dist/web/standalone/.next/static/chunks/app/api/session/browser/route-8805a20e15762c3c.js +1 -0
  290. package/dist/web/standalone/.next/static/chunks/app/api/session/command/route-8805a20e15762c3c.js +1 -0
  291. package/dist/web/standalone/.next/static/chunks/app/api/session/events/route-8805a20e15762c3c.js +1 -0
  292. package/dist/web/standalone/.next/static/chunks/app/api/session/manage/route-8805a20e15762c3c.js +1 -0
  293. package/dist/web/standalone/.next/static/chunks/app/api/settings-data/route-8805a20e15762c3c.js +1 -0
  294. package/dist/web/standalone/.next/static/chunks/app/api/shutdown/route-8805a20e15762c3c.js +1 -0
  295. package/dist/web/standalone/.next/static/chunks/app/api/skill-health/route-8805a20e15762c3c.js +1 -0
  296. package/dist/web/standalone/.next/static/chunks/app/api/steer/route-8805a20e15762c3c.js +1 -0
  297. package/dist/web/standalone/.next/static/chunks/app/api/switch-root/route-8805a20e15762c3c.js +1 -0
  298. package/dist/web/standalone/.next/static/chunks/app/api/terminal/input/route-8805a20e15762c3c.js +1 -0
  299. package/dist/web/standalone/.next/static/chunks/app/api/terminal/resize/route-8805a20e15762c3c.js +1 -0
  300. package/dist/web/standalone/.next/static/chunks/app/api/terminal/sessions/route-8805a20e15762c3c.js +1 -0
  301. package/dist/web/standalone/.next/static/chunks/app/api/terminal/stream/route-8805a20e15762c3c.js +1 -0
  302. package/dist/web/standalone/.next/static/chunks/app/api/terminal/upload/route-8805a20e15762c3c.js +1 -0
  303. package/dist/web/standalone/.next/static/chunks/app/api/undo/route-8805a20e15762c3c.js +1 -0
  304. package/dist/web/standalone/.next/static/chunks/app/api/update/route-8805a20e15762c3c.js +1 -0
  305. package/dist/web/standalone/.next/static/chunks/app/api/visualizer/route-8805a20e15762c3c.js +1 -0
  306. package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
  307. package/dist/web/standalone/.next/static/chunks/app/page-0c485498795110d6.js +1 -0
  308. package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
  309. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-8805a20e15762c3c.js +1 -0
  310. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-8805a20e15762c3c.js +1 -0
  311. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
  312. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-8805a20e15762c3c.js +1 -0
  313. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8805a20e15762c3c.js +1 -0
  314. package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
  315. package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
  316. package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
  317. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
  318. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
  319. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
  320. package/dist/web/standalone/server.js +1 -1
  321. package/dist/welcome-screen.js +1 -1
  322. package/package.json +1 -1
  323. package/packages/pi-agent-core/dist/agent-loop.d.ts +8 -0
  324. package/packages/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  325. package/packages/pi-agent-core/dist/agent-loop.js +70 -3
  326. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  327. package/packages/pi-agent-core/src/agent-loop.test.ts +317 -5
  328. package/packages/pi-agent-core/src/agent-loop.ts +90 -6
  329. package/packages/pi-ai/dist/types.d.ts +16 -1
  330. package/packages/pi-ai/dist/types.d.ts.map +1 -1
  331. package/packages/pi-ai/dist/types.js.map +1 -1
  332. package/packages/pi-ai/src/types.ts +18 -1
  333. package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.d.ts +2 -0
  334. package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.d.ts.map +1 -0
  335. package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.js +38 -0
  336. package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.js.map +1 -0
  337. package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  338. package/packages/pi-coding-agent/dist/core/agent-session.js +11 -0
  339. package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  340. package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +9 -0
  341. package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  342. package/packages/pi-coding-agent/dist/core/auth-storage.js +50 -1
  343. package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  344. package/packages/pi-coding-agent/dist/core/auth-storage.test.js +41 -0
  345. package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
  346. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +7 -0
  347. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  348. package/packages/pi-coding-agent/dist/core/extensions/loader.js +31 -4
  349. package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  350. package/packages/pi-coding-agent/dist/core/extensions/loader.test.js +28 -1
  351. package/packages/pi-coding-agent/dist/core/extensions/loader.test.js.map +1 -1
  352. package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.d.ts +2 -0
  353. package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.d.ts.map +1 -0
  354. package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.js +46 -0
  355. package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.js.map +1 -0
  356. package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +2 -0
  357. package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  358. package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  359. package/packages/pi-coding-agent/dist/core/model-registry.d.ts +1 -0
  360. package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  361. package/packages/pi-coding-agent/dist/core/model-registry.js +12 -0
  362. package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  363. package/packages/pi-coding-agent/dist/core/model-resolver.js +3 -3
  364. package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  365. package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.d.ts +2 -0
  366. package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.d.ts.map +1 -0
  367. package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.js +24 -0
  368. package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.js.map +1 -0
  369. package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +23 -1
  370. package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  371. package/packages/pi-coding-agent/dist/core/resource-loader.js +84 -57
  372. package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  373. package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  374. package/packages/pi-coding-agent/dist/core/sdk.js +9 -0
  375. package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
  376. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +1 -0
  377. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  378. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +8 -0
  379. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  380. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +6 -0
  381. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  382. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +36 -0
  383. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  384. package/packages/pi-coding-agent/package.json +1 -1
  385. package/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts +64 -0
  386. package/packages/pi-coding-agent/src/core/agent-session.ts +10 -0
  387. package/packages/pi-coding-agent/src/core/auth-storage.test.ts +53 -0
  388. package/packages/pi-coding-agent/src/core/auth-storage.ts +66 -1
  389. package/packages/pi-coding-agent/src/core/extensions/loader.test.ts +39 -1
  390. package/packages/pi-coding-agent/src/core/extensions/loader.ts +34 -4
  391. package/packages/pi-coding-agent/src/core/extensions/provider-registration.test.ts +81 -0
  392. package/packages/pi-coding-agent/src/core/extensions/types.ts +2 -0
  393. package/packages/pi-coding-agent/src/core/model-registry.ts +14 -0
  394. package/packages/pi-coding-agent/src/core/model-resolver.ts +3 -3
  395. package/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts +42 -0
  396. package/packages/pi-coding-agent/src/core/resource-loader.ts +94 -57
  397. package/packages/pi-coding-agent/src/core/sdk.ts +10 -0
  398. package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +9 -0
  399. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +33 -0
  400. package/packages/pi-tui/dist/components/loader.d.ts +4 -2
  401. package/packages/pi-tui/dist/components/loader.d.ts.map +1 -1
  402. package/packages/pi-tui/dist/components/loader.js +27 -9
  403. package/packages/pi-tui/dist/components/loader.js.map +1 -1
  404. package/packages/pi-tui/dist/components/text.d.ts.map +1 -1
  405. package/packages/pi-tui/dist/components/text.js +2 -0
  406. package/packages/pi-tui/dist/components/text.js.map +1 -1
  407. package/packages/pi-tui/dist/tui.d.ts +2 -0
  408. package/packages/pi-tui/dist/tui.d.ts.map +1 -1
  409. package/packages/pi-tui/dist/tui.js +35 -0
  410. package/packages/pi-tui/dist/tui.js.map +1 -1
  411. package/packages/pi-tui/src/components/loader.ts +27 -10
  412. package/packages/pi-tui/src/components/text.ts +1 -0
  413. package/packages/pi-tui/src/tui.ts +32 -0
  414. package/pkg/package.json +1 -1
  415. package/src/resources/extensions/bg-shell/bg-shell-lifecycle.ts +19 -7
  416. package/src/resources/extensions/bg-shell/process-manager.ts +8 -2
  417. package/src/resources/extensions/cmux/index.ts +18 -12
  418. package/src/resources/extensions/gsd/auto/detect-stuck.ts +27 -0
  419. package/src/resources/extensions/gsd/auto/finalize-timeout.ts +46 -0
  420. package/src/resources/extensions/gsd/auto/loop.ts +5 -0
  421. package/src/resources/extensions/gsd/auto/phases.ts +194 -33
  422. package/src/resources/extensions/gsd/auto/session.ts +14 -0
  423. package/src/resources/extensions/gsd/auto-dashboard.ts +16 -7
  424. package/src/resources/extensions/gsd/auto-model-selection.ts +36 -0
  425. package/src/resources/extensions/gsd/auto-post-unit.ts +263 -12
  426. package/src/resources/extensions/gsd/auto-prompts.ts +21 -0
  427. package/src/resources/extensions/gsd/auto-recovery.ts +9 -8
  428. package/src/resources/extensions/gsd/auto-start.ts +11 -20
  429. package/src/resources/extensions/gsd/auto-timers.ts +2 -1
  430. package/src/resources/extensions/gsd/auto-tool-tracking.ts +19 -0
  431. package/src/resources/extensions/gsd/auto-verification.ts +190 -2
  432. package/src/resources/extensions/gsd/auto-worktree.ts +14 -6
  433. package/src/resources/extensions/gsd/auto.ts +26 -1
  434. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +172 -88
  435. package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +15 -0
  436. package/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts +34 -0
  437. package/src/resources/extensions/gsd/bootstrap/query-tools.ts +98 -0
  438. package/src/resources/extensions/gsd/bootstrap/register-extension.ts +4 -0
  439. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +44 -1
  440. package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +19 -0
  441. package/src/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.ts +57 -0
  442. package/src/resources/extensions/gsd/bootstrap/system-context.ts +59 -2
  443. package/src/resources/extensions/gsd/commands/catalog.ts +7 -1
  444. package/src/resources/extensions/gsd/commands/handlers/core.ts +1 -0
  445. package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +139 -0
  446. package/src/resources/extensions/gsd/commands/handlers/ops.ts +5 -0
  447. package/src/resources/extensions/gsd/commands-handlers.ts +10 -4
  448. package/src/resources/extensions/gsd/constants.ts +44 -0
  449. package/src/resources/extensions/gsd/db-writer.ts +78 -4
  450. package/src/resources/extensions/gsd/forensics.ts +21 -5
  451. package/src/resources/extensions/gsd/gsd-db.ts +64 -17
  452. package/src/resources/extensions/gsd/guided-flow.ts +22 -0
  453. package/src/resources/extensions/gsd/metrics.ts +28 -1
  454. package/src/resources/extensions/gsd/native-git-bridge.ts +5 -3
  455. package/src/resources/extensions/gsd/notification-overlay.ts +267 -0
  456. package/src/resources/extensions/gsd/notification-store.ts +288 -0
  457. package/src/resources/extensions/gsd/notification-widget.ts +68 -0
  458. package/src/resources/extensions/gsd/post-execution-checks.ts +539 -0
  459. package/src/resources/extensions/gsd/pre-execution-checks.ts +573 -0
  460. package/src/resources/extensions/gsd/preferences-types.ts +44 -0
  461. package/src/resources/extensions/gsd/preferences-validation.ts +33 -0
  462. package/src/resources/extensions/gsd/preferences.ts +13 -2
  463. package/src/resources/extensions/gsd/prompt-loader.ts +8 -0
  464. package/src/resources/extensions/gsd/prompts/complete-milestone.md +2 -0
  465. package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -0
  466. package/src/resources/extensions/gsd/prompts/doctor-heal.md +1 -0
  467. package/src/resources/extensions/gsd/prompts/forensics.md +2 -0
  468. package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +2 -0
  469. package/src/resources/extensions/gsd/prompts/system.md +4 -7
  470. package/src/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
  471. package/src/resources/extensions/gsd/roadmap-mutations.ts +1 -1
  472. package/src/resources/extensions/gsd/roadmap-slices.ts +10 -5
  473. package/src/resources/extensions/gsd/safety/content-validator.ts +98 -0
  474. package/src/resources/extensions/gsd/safety/destructive-guard.ts +49 -0
  475. package/src/resources/extensions/gsd/safety/evidence-collector.ts +151 -0
  476. package/src/resources/extensions/gsd/safety/evidence-cross-ref.ts +120 -0
  477. package/src/resources/extensions/gsd/safety/file-change-validator.ts +108 -0
  478. package/src/resources/extensions/gsd/safety/git-checkpoint.ts +106 -0
  479. package/src/resources/extensions/gsd/safety/safety-harness.ts +105 -0
  480. package/src/resources/extensions/gsd/slice-parallel-conflict.ts +86 -0
  481. package/src/resources/extensions/gsd/slice-parallel-eligibility.ts +73 -0
  482. package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +477 -0
  483. package/src/resources/extensions/gsd/state.ts +67 -12
  484. package/src/resources/extensions/gsd/status-guards.ts +13 -0
  485. package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +288 -0
  486. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +34 -13
  487. package/src/resources/extensions/gsd/tests/auto-start-time-persistence.test.ts +50 -0
  488. package/src/resources/extensions/gsd/tests/cmux.test.ts +58 -0
  489. package/src/resources/extensions/gsd/tests/cold-resume-db-reopen.test.ts +51 -0
  490. package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +140 -0
  491. package/src/resources/extensions/gsd/tests/complete-slice-string-coercion.test.ts +247 -0
  492. package/src/resources/extensions/gsd/tests/complete-task.test.ts +39 -0
  493. package/src/resources/extensions/gsd/tests/dashboard-model-label-ordering.test.ts +107 -0
  494. package/src/resources/extensions/gsd/tests/db-access-guardrails.test.ts +109 -0
  495. package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +13 -9
  496. package/src/resources/extensions/gsd/tests/db-writer.test.ts +134 -0
  497. package/src/resources/extensions/gsd/tests/deferred-slice-dispatch.test.ts +203 -0
  498. package/src/resources/extensions/gsd/tests/discuss-tool-scope-leak.test.ts +76 -0
  499. package/src/resources/extensions/gsd/tests/discuss-tool-scoping.test.ts +130 -0
  500. package/src/resources/extensions/gsd/tests/doctor-fix-flag.test.ts +92 -0
  501. package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +526 -0
  502. package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +116 -0
  503. package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +50 -0
  504. package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +103 -0
  505. package/src/resources/extensions/gsd/tests/git-checkpoint.test.ts +94 -0
  506. package/src/resources/extensions/gsd/tests/insert-slice-no-wipe.test.ts +88 -0
  507. package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +27 -7
  508. package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +34 -0
  509. package/src/resources/extensions/gsd/tests/metrics.test.ts +116 -1
  510. package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +201 -0
  511. package/src/resources/extensions/gsd/tests/notification-store.test.ts +249 -0
  512. package/src/resources/extensions/gsd/tests/plan-milestone-title.test.ts +2 -1
  513. package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +82 -18
  514. package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +312 -0
  515. package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +813 -0
  516. package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +999 -0
  517. package/src/resources/extensions/gsd/tests/pre-execution-fail-closed.test.ts +266 -0
  518. package/src/resources/extensions/gsd/tests/pre-execution-pause-wiring.test.ts +457 -0
  519. package/src/resources/extensions/gsd/tests/preferences.test.ts +10 -0
  520. package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +25 -0
  521. package/src/resources/extensions/gsd/tests/roadmap-slices.test.ts +69 -0
  522. package/src/resources/extensions/gsd/tests/shared-wal.test.ts +30 -0
  523. package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +50 -0
  524. package/src/resources/extensions/gsd/tests/slice-parallel-conflict.test.ts +92 -0
  525. package/src/resources/extensions/gsd/tests/slice-parallel-eligibility.test.ts +95 -0
  526. package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +83 -0
  527. package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +42 -0
  528. package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +103 -0
  529. package/src/resources/extensions/gsd/tests/tool-param-optionality.test.ts +349 -0
  530. package/src/resources/extensions/gsd/tests/unstructured-continue-context-injection.test.ts +163 -0
  531. package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +35 -2
  532. package/src/resources/extensions/gsd/tests/worktree-health-monorepo.test.ts +73 -0
  533. package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +34 -0
  534. package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +1 -1
  535. package/src/resources/extensions/gsd/tests/worktree-teardown-safety.test.ts +148 -0
  536. package/src/resources/extensions/gsd/tools/complete-milestone.ts +34 -20
  537. package/src/resources/extensions/gsd/tools/complete-slice.ts +41 -26
  538. package/src/resources/extensions/gsd/tools/complete-task.ts +12 -12
  539. package/src/resources/extensions/gsd/tools/plan-milestone.ts +55 -30
  540. package/src/resources/extensions/gsd/tools/plan-slice.ts +13 -8
  541. package/src/resources/extensions/gsd/types.ts +44 -22
  542. package/src/resources/extensions/gsd/verification-evidence.ts +68 -0
  543. package/src/resources/extensions/gsd/workflow-logger.ts +15 -1
  544. package/src/resources/extensions/gsd/workflow-projections.ts +23 -5
  545. package/src/resources/extensions/gsd/worktree-manager.ts +76 -28
  546. package/src/resources/extensions/gsd/worktree-resolver.ts +4 -3
  547. package/src/resources/extensions/mcp-client/auth.ts +149 -0
  548. package/src/resources/extensions/mcp-client/index.ts +16 -1
  549. package/src/resources/extensions/ollama/index.ts +26 -25
  550. package/src/resources/extensions/ollama/model-capabilities.ts +41 -34
  551. package/src/resources/extensions/ollama/ndjson-stream.ts +63 -0
  552. package/src/resources/extensions/ollama/ollama-auth-mode.test.ts +20 -0
  553. package/src/resources/extensions/ollama/ollama-chat-provider.ts +459 -0
  554. package/src/resources/extensions/ollama/ollama-client.ts +30 -30
  555. package/src/resources/extensions/ollama/ollama-discovery.ts +5 -8
  556. package/src/resources/extensions/ollama/ollama-tool.ts +69 -0
  557. package/src/resources/extensions/ollama/tests/ollama-chat-provider-stream.test.ts +82 -0
  558. package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +0 -27
  559. package/src/resources/extensions/ollama/thinking-parser.ts +116 -0
  560. package/src/resources/extensions/ollama/types.ts +23 -0
  561. package/dist/web/standalone/.next/server/chunks/2229.js +0 -12
  562. package/dist/web/standalone/.next/static/5FLUBNdqolRyyehCyChPd/_buildManifest.js +0 -1
  563. package/dist/web/standalone/.next/static/chunks/app/_global-error/page-c4cc189e7b117ea2.js +0 -1
  564. package/dist/web/standalone/.next/static/chunks/app/api/boot/route-c4cc189e7b117ea2.js +0 -1
  565. package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/input/route-c4cc189e7b117ea2.js +0 -1
  566. package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/resize/route-c4cc189e7b117ea2.js +0 -1
  567. package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/stream/route-c4cc189e7b117ea2.js +0 -1
  568. package/dist/web/standalone/.next/static/chunks/app/api/browse-directories/route-c4cc189e7b117ea2.js +0 -1
  569. package/dist/web/standalone/.next/static/chunks/app/api/captures/route-c4cc189e7b117ea2.js +0 -1
  570. package/dist/web/standalone/.next/static/chunks/app/api/cleanup/route-c4cc189e7b117ea2.js +0 -1
  571. package/dist/web/standalone/.next/static/chunks/app/api/dev-mode/route-c4cc189e7b117ea2.js +0 -1
  572. package/dist/web/standalone/.next/static/chunks/app/api/doctor/route-c4cc189e7b117ea2.js +0 -1
  573. package/dist/web/standalone/.next/static/chunks/app/api/experimental/route-c4cc189e7b117ea2.js +0 -1
  574. package/dist/web/standalone/.next/static/chunks/app/api/export-data/route-c4cc189e7b117ea2.js +0 -1
  575. package/dist/web/standalone/.next/static/chunks/app/api/files/route-c4cc189e7b117ea2.js +0 -1
  576. package/dist/web/standalone/.next/static/chunks/app/api/forensics/route-c4cc189e7b117ea2.js +0 -1
  577. package/dist/web/standalone/.next/static/chunks/app/api/git/route-c4cc189e7b117ea2.js +0 -1
  578. package/dist/web/standalone/.next/static/chunks/app/api/history/route-c4cc189e7b117ea2.js +0 -1
  579. package/dist/web/standalone/.next/static/chunks/app/api/hooks/route-c4cc189e7b117ea2.js +0 -1
  580. package/dist/web/standalone/.next/static/chunks/app/api/inspect/route-c4cc189e7b117ea2.js +0 -1
  581. package/dist/web/standalone/.next/static/chunks/app/api/knowledge/route-c4cc189e7b117ea2.js +0 -1
  582. package/dist/web/standalone/.next/static/chunks/app/api/live-state/route-c4cc189e7b117ea2.js +0 -1
  583. package/dist/web/standalone/.next/static/chunks/app/api/onboarding/route-c4cc189e7b117ea2.js +0 -1
  584. package/dist/web/standalone/.next/static/chunks/app/api/preferences/route-c4cc189e7b117ea2.js +0 -1
  585. package/dist/web/standalone/.next/static/chunks/app/api/projects/route-c4cc189e7b117ea2.js +0 -1
  586. package/dist/web/standalone/.next/static/chunks/app/api/recovery/route-c4cc189e7b117ea2.js +0 -1
  587. package/dist/web/standalone/.next/static/chunks/app/api/remote-questions/route-c4cc189e7b117ea2.js +0 -1
  588. package/dist/web/standalone/.next/static/chunks/app/api/session/browser/route-c4cc189e7b117ea2.js +0 -1
  589. package/dist/web/standalone/.next/static/chunks/app/api/session/command/route-c4cc189e7b117ea2.js +0 -1
  590. package/dist/web/standalone/.next/static/chunks/app/api/session/events/route-c4cc189e7b117ea2.js +0 -1
  591. package/dist/web/standalone/.next/static/chunks/app/api/session/manage/route-c4cc189e7b117ea2.js +0 -1
  592. package/dist/web/standalone/.next/static/chunks/app/api/settings-data/route-c4cc189e7b117ea2.js +0 -1
  593. package/dist/web/standalone/.next/static/chunks/app/api/shutdown/route-c4cc189e7b117ea2.js +0 -1
  594. package/dist/web/standalone/.next/static/chunks/app/api/skill-health/route-c4cc189e7b117ea2.js +0 -1
  595. package/dist/web/standalone/.next/static/chunks/app/api/steer/route-c4cc189e7b117ea2.js +0 -1
  596. package/dist/web/standalone/.next/static/chunks/app/api/switch-root/route-c4cc189e7b117ea2.js +0 -1
  597. package/dist/web/standalone/.next/static/chunks/app/api/terminal/input/route-c4cc189e7b117ea2.js +0 -1
  598. package/dist/web/standalone/.next/static/chunks/app/api/terminal/resize/route-c4cc189e7b117ea2.js +0 -1
  599. package/dist/web/standalone/.next/static/chunks/app/api/terminal/sessions/route-c4cc189e7b117ea2.js +0 -1
  600. package/dist/web/standalone/.next/static/chunks/app/api/terminal/stream/route-c4cc189e7b117ea2.js +0 -1
  601. package/dist/web/standalone/.next/static/chunks/app/api/terminal/upload/route-c4cc189e7b117ea2.js +0 -1
  602. package/dist/web/standalone/.next/static/chunks/app/api/undo/route-c4cc189e7b117ea2.js +0 -1
  603. package/dist/web/standalone/.next/static/chunks/app/api/update/route-c4cc189e7b117ea2.js +0 -1
  604. package/dist/web/standalone/.next/static/chunks/app/api/visualizer/route-c4cc189e7b117ea2.js +0 -1
  605. package/dist/web/standalone/.next/static/chunks/app/page-62be3b5fa91e4c8f.js +0 -1
  606. package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
  607. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-c4cc189e7b117ea2.js +0 -1
  608. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-c4cc189e7b117ea2.js +0 -1
  609. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
  610. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-c4cc189e7b117ea2.js +0 -1
  611. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c4cc189e7b117ea2.js +0 -1
  612. /package/dist/web/standalone/.next/static/{5FLUBNdqolRyyehCyChPd → Vbx2-SrSBOgta6576xj9m}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -27,152 +27,59 @@ One command. Walk away. Come back to a built project with clean git history.
27
27
 
28
28
  ---
29
29
 
30
- ## What's New in v2.52.0
30
+ ## What's New in v2.63.0
31
31
 
32
- ### VS Code Extension & Web UI
32
+ ### MCP Server & Integrations
33
33
 
34
- - **VS Code integration** — status bar, file decorations, bash terminal, session tree, conversation history, and code lens. (#2651)
35
- - **Dark mode contrast** — raised token floor and flattened opacity tier system for better readability. (#2734)
36
- - **Auth token gate** — synthetic 401 on missing token, unauthenticated boot state, and recovery screen. (#2740)
34
+ - **MCP server** — 6 read-only project state tools for external integrations, auto-wrapup guard, and question dedup.
35
+ - **Ollama extension** — first-class local LLM support via Ollama, with dynamic routing enabled by default.
36
+ - **Discord bot & daemon** — dedicated daemon package, Discord bot with 6 discord.js shard event listeners, and headless text mode with tool calls.
37
37
 
38
- ### Capability Metadata & Model Routing
38
+ ### Intelligent Model Routing
39
39
 
40
- - **Capability-based model selection** — replaced model-ID pattern matching with capability metadata, making custom provider integration more reliable. (#2548)
40
+ - **Capability-aware model routing (ADR-004)** — capability scoring, `before_model_select` hook, and task metadata extraction replace pattern-based model selection.
41
+ - **Stop/backtrack capture classifications** — context optimization with model routing and masking.
41
42
 
42
- ### Key Changes
43
+ ### VS Code & TUI
43
44
 
44
- - **`--bare` mode** — wired across headless, pi-coding-agent, and resource-loader for minimal-output operation.
45
- - **RPC protocol v2**new types, init handshake with version detection, and runId generation on prompt/steer/follow_up commands.
46
- - **PREFERENCES.md rename** — `preferences.md` renamed to `PREFERENCES.md` for consistency. (#2700, #2738)
47
- - **Comprehensive SQLite audit** — indexes, caching, safety, and reconciliation fixes across gsd-db.
48
- - **Unified error classifier** — three overlapping error classifiers consolidated into a single classify-decide-act pipeline.
45
+ - **VS Code sidebar redesign** — SCM provider, checkpoints, diagnostics panel, activity feed, workflow controls, session forking, and enhanced code lens.
46
+ - **`/gsd parallel watch`**native TUI overlay for real-time worker monitoring.
47
+ - **Real-time TUI monitor dashboard** — self-healing dashboard with colorized headless verbose output.
49
48
 
50
- ### Key Fixes
49
+ ### Agent & Auto-Mode
51
50
 
52
- - **Auto-mode stops on provider errors** — auto loop now halts after provider errors instead of retrying indefinitely. (#2762, #2764)
53
- - **Transaction safety** — state machine guards moved inside transactions in 5 tool handlers (#2752), and `transaction()` made re-entrant.
54
- - **Worktree seeding** — `preferences.md` seeded into auto-mode worktrees and included in worktree sync. (#2693)
55
- - **Idle watchdog** — interactive tools exempted from stall detection (#2676), and filesystem activity no longer overrides stalled-tool detection. (#2697)
56
- - **Milestone guards** — `allSlicesDone` guarded against vacuous truth on empty slice arrays (#2679), and `complete-milestone` dispatch blocked when validation is `needs-remediation`. (#2682)
57
- - **Docker overhaul** — fragile setup replaced with proven container patterns. (#2716)
58
- - **Windows** — EINVAL prevented by disabling detached process groups on Win32. (#2744)
59
- - **Audit log** — `setLogBasePath` wired into engine init to resurrect audit logging. (#2745)
51
+ - **`/btw` skill** — ephemeral side questions without interrupting the main workflow.
52
+ - **Codebase map** — automatic codebase map injection for fresh agent contexts.
53
+ - **`--resume` flag** — resume previous sessions from the CLI.
54
+ - **Concurrent invocation guard** — prevents overlapping auto-mode runs with parallel worker reliability improvements.
55
+ - **Safety mechanisms on by default** snapshots and pre-merge checks enabled out of the box.
60
56
 
61
- ### v2.51.0 Skills, RTK, and Verification
57
+ ### Infrastructure & Performance
62
58
 
63
- - **`/terminal` command** — direct shell execution from the slash command interface. (#2349)
64
- - **Managed RTK integration** — RTK binary auto-provisioned with opt-in preference and web UI toggle. (#2620)
65
- - **Verification classes** — compliance checked before milestone completion, with classes injected into validation prompts. (#2621, #2623)
66
- - **Skills overhaul** — 30+ new skill packs covering major frameworks, databases, and cloud platforms; curated catalog with `~/.agents/skills/` as primary directory.
59
+ - **Topological sort for extensions** — correct load ordering for dependent extensions.
60
+ - **Headless integration hardening** — real-time streaming, verbose output, and observability improvements across v2.54–v2.55.
61
+ - **GLM-5.1 model** — new model support added.
62
+ - **80+ bug fixes** — worktree safety, parallel mode scoping, state corruption, and more.
67
63
 
68
- ### v2.50.0 Quality Gates
64
+ See the full [Changelog](./CHANGELOG.md) for details on every release.
69
65
 
70
- - **Quality gates** — 8-question quality gates added to planning and completion templates, with parallel evaluation via `evaluating-gates` phase.
71
- - **Structured error propagation** — errors wired through `UnitResult` for better diagnostics.
72
-
73
- ### v2.49.0 — Git Trailers & Yolo Mode
74
-
75
- - **`--yolo` flag** — `/gsd auto --yolo` for non-interactive project init.
76
- - **Git trailers** — GSD metadata moved from commit subject scopes to git trailers.
77
-
78
- ### v2.48.0 — Forensics & Discussion
79
-
80
- - **`/gsd discuss` for queued milestones** — target milestones still in the queue. (#2349)
81
- - **Enhanced forensics** — journal and activity log awareness added to `/gsd forensics`.
82
-
83
- ### v2.47.0 — External Providers
84
-
85
- - **External tool execution mode** — `externalToolExecution` mode for external providers in agent-core.
86
- - **Claude Code CLI provider** — new provider extension for Claude Code CLI. (#2382)
87
-
88
- ### Previous highlights (v2.42–v2.46)
89
-
90
- - **Single-writer state engine** — disciplined state transitions with machine guards, actor identity, reversibility, and TOCTOU hardening. (#2494)
91
- - **`/gsd rethink`** — conversational project reorganization. (#2459)
92
- - **`/gsd mcp`** — MCP server status and connectivity. (#2362)
93
- - **Complete offline mode** — fully offline with local models. (#2429)
94
- - **Global KNOWLEDGE.md injection** — cross-project knowledge via `~/.gsd/agent/KNOWLEDGE.md`. (#2331)
95
- - **Mobile-responsive web UI** — browser interface works on phones and tablets. (#2354)
96
- - **Default isolation mode changed to `none`** — set `git.isolation: worktree` explicitly if needed. (#2481)
97
- - **Non-API-key provider extensions** — support for Claude Code CLI and similar providers. (#2382)
98
- - **Docker sandbox template** — official Docker template for isolated auto mode. (#2360)
99
- - **DB-backed planning tools** — write-side state transitions use atomic SQLite tool calls. (#2141)
100
- - **Declarative workflow engine** — YAML workflows through auto-loop. (#2024)
101
- - **`/gsd fast`** — toggle service tier for prioritized API routing. (#1862)
102
-
103
- ---
104
-
105
- ## What's New in v2.41.0
106
-
107
- ### New Features
108
-
109
- - **Browser-based web interface** — run GSD from the browser with `gsd --web`. Full project management, real-time progress, and multi-project support via server-sent events. (#1717)
110
- - **Doctor: worktree lifecycle checks** — `/gsd doctor` now validates worktree health, detects orphaned worktrees, consolidates cleanup, and enhances `/worktree list` with lifecycle status. (#1814)
111
- - **CI: docs-only PR detection** — PRs that only change documentation skip build and test steps, with a new prompt injection scan for security. (#1699)
112
- - **Custom Models guide** — new documentation for adding custom providers (Ollama, vLLM, LM Studio, proxies) via `models.json`. (#1670)
113
-
114
- ### Data Loss Prevention (Critical Fixes)
115
-
116
- This release includes 7 fixes preventing silent data loss in auto-mode:
117
-
118
- - **Hallucination guard** — execute-task agents that complete with zero tool calls are now rejected as hallucinated. Previously, agents could produce detailed but fabricated summaries without writing any code, wasting ~$25/milestone. (#1838)
119
- - **Merge anchor verification** — before deleting a milestone worktree/branch, GSD now verifies the code is actually on the integration branch. Prevents orphaning commits when squash-merge produces an empty diff. (#1829)
120
- - **Dirty working tree detection** — `nativeMergeSquash` now distinguishes dirty-tree rejections from content conflicts, preventing silent commit loss when synced `.gsd/` files block the merge. (#1752)
121
- - **Doctor cleanup safety** — the `orphaned_completed_units` check no longer auto-fixes during post-task health checks. Previously, timing races could cause the doctor to remove valid completion keys, reverting users to earlier tasks. (#1825)
122
- - **Root file reverse-sync** — worktree teardown now syncs root-level `.gsd/` files (PROJECT.md, REQUIREMENTS.md, completed-units.json) back to the project root. Previously these were lost on milestone closeout. (#1831)
123
- - **Empty merge guard** — milestone branches with unanchored code changes are preserved instead of deleted when squash-merge produces nothing to commit. (#1755)
124
- - **Crash-safe task closeout** — orphaned checkboxes in PLAN.md are unchecked on retry, preventing phantom task completion. (#1759)
125
-
126
- ### Auto-Mode Stability
127
-
128
- - **Terminal hang fix** — `stopAuto()` now resolves pending promises, preventing the terminal from freezing permanently after stopping auto-mode. (#1818)
129
- - **Signal handler coverage** — SIGHUP and SIGINT now clean up lock files, not just SIGTERM. Prevents stranded locks on VS-Code crash. (#1821)
130
- - **Needs-discussion routing** — milestones in `needs-discussion` phase now route to the smart entry UI instead of hard-stopping, breaking the infinite loop. (#1820)
131
- - **Infrastructure error handling** — auto-mode stops immediately on ENOSPC, ENOMEM, and similar unrecoverable errors instead of retrying. (#1780)
132
- - **Dependency-aware dispatch** — slice dispatch now uses declared `depends_on` instead of positional ordering. (#1770)
133
- - **Queue mode depth verification** — the write gate now processes depth verification in queue mode, fixing a deadlock where CONTEXT.md writes were permanently blocked. (#1823)
134
-
135
- ### Roadmap Parser Improvements
136
-
137
- - **Table format support** — roadmaps using markdown tables (`| S01 | Title | Risk | Status |`) are now parsed correctly. (#1741)
138
- - **Prose header fallback** — when `## Slices` contains H3 headers instead of checkboxes, the prose parser is invoked as a fallback. (#1744)
139
- - **Completion marker detection** — prose headers with `✓` or `(Complete)` markers are correctly identified as done. (#1816)
140
- - **Zero-slice stub handling** — stub roadmaps from `/gsd queue` return `pre-planning` instead of `blocked`. (#1826)
141
- - **Immediate roadmap fix** — roadmap checkbox and UAT stub are fixed immediately after last task instead of deferring to `complete-slice`. (#1819)
142
-
143
- ### State & Git Improvements
144
-
145
- - **CONTEXT-DRAFT.md fallback** — `depends_on` is read from CONTEXT-DRAFT.md when CONTEXT.md doesn't exist, preventing draft milestones from being promoted past dependency constraints. (#1743)
146
- - **Unborn branch support** — `nativeBranchExists` handles repos with zero commits, preventing dispatch deadlock on new repos. (#1815)
147
- - **Ghost milestone detection** — empty `.gsd/milestones/` directories are skipped instead of crashing `deriveState()`. (#1817)
148
- - **Default branch detection** — milestone merge detects `master` vs `main` instead of hardcoding. (#1669)
149
- - **Milestone title extraction** — titles are pulled from CONTEXT.md headings when no ROADMAP exists. (#1729)
150
-
151
- ### Windows & Platform
152
-
153
- - **Windows path handling** — 8.3 short paths, `pathToFileURL` for ESM imports, and `realpathSync.native` fixes across the test suite and verification gate. (#1804)
154
- - **DEP0190 fix** — `spawnSync` deprecation warning eliminated by passing commands to shell explicitly. (#1827)
155
- - **Web build skip on Windows** — Next.js webpack EPERM errors on system directories are handled gracefully.
156
-
157
- ### Developer Experience
158
-
159
- - **@ file finder fix** — typing `@` no longer freezes the TUI. The fix adds debounce, dedup, and empty-query short-circuit. (#1832)
160
- - **Tool-call loop guard** — detects and breaks infinite tool-call loops within a single unit, preventing stack overflow. (#1801)
161
- - **Completion deferral fix** — roadmap checkbox and UAT stub are fixed at task level, closing the fragile handoff window between last task and `complete-slice`. (#1819)
162
-
163
- See the full [Changelog](./CHANGELOG.md) for all 70+ fixes in this release.
164
-
165
- ### Previous highlights (v2.39–v2.41)
66
+ <details>
67
+ <summary>Previous highlights (v2.52 and earlier)</summary>
166
68
 
69
+ - **VS Code integration** — status bar, file decorations, bash terminal, session tree, conversation history, and code lens
70
+ - **Capability-based model selection** — replaced model-ID pattern matching with capability metadata
71
+ - **Skills overhaul** — 30+ skill packs covering major frameworks, databases, and cloud platforms
72
+ - **Quality gates** — 8-question quality gates for planning and completion templates
73
+ - **Single-writer state engine** — disciplined state transitions with machine guards and TOCTOU hardening
74
+ - **`/gsd rethink`** — conversational project reorganization
75
+ - **Complete offline mode** — fully offline with local models
167
76
  - **Browser-based web interface** — run GSD from the browser with `gsd --web`
168
- - **GitHub sync extension** — auto-sync milestones to GitHub Issues, PRs, and Milestones
169
- - **Skill tool resolution** — skills auto-activate in dispatched prompts
170
- - **Health check phase 2** — real-time doctor issues in dashboard and visualizer
171
- - **Forensics upgrade** — full-access GSD debugger with anomaly detection
77
+ - **DB-backed planning tools** — atomic SQLite tool calls for state transitions
78
+ - **Declarative workflow engine** — YAML workflows through auto-loop
172
79
  - **7 data-loss prevention fixes** — hallucination guard, merge anchor verification, dirty tree detection, and more
173
- - **Pipeline decomposition** — auto-loop rewritten as linear phase pipeline
174
- - **Sliding-window stuck detection** — pattern-aware, fewer false positives
175
- - **Data-loss recovery** — automatic detection and recovery from v2.30–v2.38 migration issues
80
+ - **Doctor: worktree lifecycle checks** — validates worktree health, detects orphans, consolidates cleanup
81
+
82
+ </details>
176
83
 
177
84
  ---
178
85
 
@@ -626,7 +533,7 @@ See the full [Token Optimization Guide](./docs/token-optimization.md) for detail
626
533
 
627
534
  ### Bundled Tools
628
535
 
629
- GSD ships with 19 extensions, all loaded automatically:
536
+ GSD ships with 24 extensions, all loaded automatically:
630
537
 
631
538
  | Extension | What it provides |
632
539
  | ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
@@ -648,7 +555,12 @@ GSD ships with 19 extensions, all loaded automatically:
648
555
  | **Remote Questions** | Route decisions to Slack/Discord when human input is needed in headless/CI mode |
649
556
  | **Universal Config** | Discover and import MCP servers and rules from other AI coding tools |
650
557
  | **AWS Auth** | Automatic Bedrock credential refresh for AWS-hosted models |
651
- | **TTSR** | Tool-use type-safe runtime validation |
558
+ | **Ollama** | First-class local LLM support via Ollama |
559
+ | **Claude Code CLI** | External provider extension for Claude Code CLI |
560
+ | **cmux** | Claude multiplexer integration — desktop notifications, sidebar metadata, visual subagent splits |
561
+ | **GitHub Sync** | Auto-sync milestones to GitHub Issues, PRs, and Milestones |
562
+ | **LSP** | Language Server Protocol — diagnostics, definitions, references, hover, rename |
563
+ | **TTSR** | Tool-triggered system rules — conditional context injection based on tool usage |
652
564
 
653
565
  ### Bundled Agents
654
566
 
@@ -733,7 +645,7 @@ gsd (CLI binary)
733
645
  ├─ resource-loader.ts Syncs bundled extensions + agents to ~/.gsd/agent/
734
646
  └─ src/resources/
735
647
  ├─ extensions/gsd/ Core GSD extension (auto, state, commands, ...)
736
- ├─ extensions/... 18 supporting extensions
648
+ ├─ extensions/... 23 supporting extensions
737
649
  ├─ agents/ scout, researcher, worker
738
650
  ├─ AGENTS.md Agent routing instructions
739
651
  └─ GSD-WORKFLOW.md Manual bootstrap protocol
package/dist/cli.js CHANGED
@@ -247,6 +247,10 @@ if (cliFlags.messages[0] === 'sessions') {
247
247
  // `gsd headless` — run auto-mode without TUI
248
248
  if (cliFlags.messages[0] === 'headless') {
249
249
  await ensureRtkBootstrap();
250
+ // Sync bundled resources before headless runs (#3471). Without this,
251
+ // headless-query loads from src/resources/ while auto/interactive load
252
+ // from ~/.gsd/agent/extensions/ — different extension copies diverge.
253
+ initResources(agentDir);
250
254
  const { runHeadless, parseHeadlessArgs } = await import('./headless.js');
251
255
  await runHeadless(parseHeadlessArgs(process.argv));
252
256
  process.exit(0);
@@ -385,7 +389,7 @@ if (isPrintMode) {
385
389
  });
386
390
  await resourceLoader.reload();
387
391
  markStartup('resourceLoader.reload');
388
- const { session, extensionsResult } = await createAgentSession({
392
+ const { session, extensionsResult, modelFallbackMessage } = await createAgentSession({
389
393
  authStorage,
390
394
  modelRegistry,
391
395
  settingsManager,
@@ -397,11 +401,30 @@ if (isPrintMode) {
397
401
  // Before this, extension-provided models (e.g. claude-code/*) were not yet in the
398
402
  // registry, causing the user's valid choice to be silently overwritten.
399
403
  validateConfiguredModel(modelRegistry, settingsManager);
404
+ // Re-apply the validated model to the session only when findInitialModel() used a
405
+ // fallback (not when restoring an existing session's model). This prevents silently
406
+ // overriding the persisted model of resumed conversations (#3534).
407
+ if (modelFallbackMessage) {
408
+ const validatedProvider = settingsManager.getDefaultProvider();
409
+ const validatedModelId = settingsManager.getDefaultModel();
410
+ if (validatedProvider && validatedModelId) {
411
+ const correctModel = modelRegistry.getAvailable()
412
+ .find((m) => m.provider === validatedProvider && m.id === validatedModelId);
413
+ if (correctModel) {
414
+ try {
415
+ await session.setModel(correctModel);
416
+ }
417
+ catch {
418
+ // Provider not ready — leave session on its current model
419
+ }
420
+ }
421
+ }
422
+ }
400
423
  if (extensionsResult.errors.length > 0) {
401
424
  for (const err of extensionsResult.errors) {
402
425
  // Downgrade conflicts with built-in tools to warnings (#1347)
403
- const isSuperseded = err.error.includes("supersedes");
404
- const prefix = isSuperseded ? "Extension conflict" : "Extension load error";
426
+ const isConflict = err.error.includes("supersedes") || err.error.includes("conflicts with");
427
+ const prefix = isConflict ? "Extension conflict" : "Extension load error";
405
428
  process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
406
429
  }
407
430
  }
@@ -521,7 +544,7 @@ const resourceLoadPromise = resourceLoader.reload();
521
544
  // Then await the resource promise before creating the agent session.
522
545
  await resourceLoadPromise;
523
546
  markStartup('resourceLoader.reload');
524
- const { session, extensionsResult } = await createAgentSession({
547
+ const { session, extensionsResult, modelFallbackMessage: interactiveFallbackMsg } = await createAgentSession({
525
548
  authStorage,
526
549
  modelRegistry,
527
550
  settingsManager,
@@ -533,10 +556,29 @@ markStartup('createAgentSession');
533
556
  // Before this, extension-provided models (e.g. claude-code/*) were not yet in the
534
557
  // registry, causing the user's valid choice to be silently overwritten.
535
558
  validateConfiguredModel(modelRegistry, settingsManager);
559
+ // Re-apply the validated model to the session only when findInitialModel() used a
560
+ // fallback (not when restoring an existing session's model). This prevents silently
561
+ // overriding the persisted model of resumed conversations (#3534).
562
+ if (interactiveFallbackMsg) {
563
+ const validatedProvider = settingsManager.getDefaultProvider();
564
+ const validatedModelId = settingsManager.getDefaultModel();
565
+ if (validatedProvider && validatedModelId) {
566
+ const correctModel = modelRegistry.getAvailable()
567
+ .find((m) => m.provider === validatedProvider && m.id === validatedModelId);
568
+ if (correctModel) {
569
+ try {
570
+ await session.setModel(correctModel);
571
+ }
572
+ catch {
573
+ // Provider not ready — leave session on its current model
574
+ }
575
+ }
576
+ }
577
+ }
536
578
  if (extensionsResult.errors.length > 0) {
537
579
  for (const err of extensionsResult.errors) {
538
- const isSuperseded = err.error.includes("supersedes");
539
- const prefix = isSuperseded ? "Extension conflict" : "Extension load error";
580
+ const isConflict = err.error.includes("supersedes") || err.error.includes("conflicts with");
581
+ const prefix = isConflict ? "Extension conflict" : "Extension load error";
540
582
  process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
541
583
  }
542
584
  }
@@ -15,9 +15,19 @@
15
15
  */
16
16
  import { createJiti } from '@mariozechner/jiti';
17
17
  import { fileURLToPath } from 'node:url';
18
+ import { join } from 'node:path';
19
+ import { homedir } from 'node:os';
18
20
  import { resolveBundledSourceResource } from './bundled-resource-path.js';
19
21
  const jiti = createJiti(fileURLToPath(import.meta.url), { interopDefault: true, debug: false });
20
- const gsdExtensionPath = (...segments) => resolveBundledSourceResource(import.meta.url, 'extensions', 'gsd', ...segments);
22
+ // Resolve extensions from the synced agent directory so headless-query
23
+ // loads the same extension copy as interactive/auto modes (#3471).
24
+ // Falls back to bundled source for source-tree dev workflows.
25
+ const agentExtensionsDir = join(process.env.GSD_AGENT_DIR || join(homedir(), '.gsd', 'agent'), 'extensions', 'gsd');
26
+ const { existsSync } = await import('node:fs');
27
+ const useAgentDir = existsSync(join(agentExtensionsDir, 'state.ts'));
28
+ const gsdExtensionPath = (...segments) => useAgentDir
29
+ ? join(agentExtensionsDir, ...segments)
30
+ : resolveBundledSourceResource(import.meta.url, 'extensions', 'gsd', ...segments);
21
31
  async function loadExtensionModules() {
22
32
  const stateModule = await jiti.import(gsdExtensionPath('state.ts'), {});
23
33
  const dispatchModule = await jiti.import(gsdExtensionPath('auto-dispatch.ts'), {});
package/dist/headless.js CHANGED
@@ -184,7 +184,9 @@ async function runHeadlessOnce(options, restartCount) {
184
184
  // per-unit timeout via auto-supervisor. Disable the overall timeout unless the
185
185
  // user explicitly set --timeout.
186
186
  const isAutoMode = options.command === 'auto';
187
- const isMultiTurnCommand = options.command === 'auto' || options.command === 'next';
187
+ // discuss and plan are multi-turn: they involve multiple question rounds,
188
+ // codebase scanning, and artifact writing before the workflow completes (#3547).
189
+ const isMultiTurnCommand = options.command === 'auto' || options.command === 'next' || options.command === 'discuss' || options.command === 'plan';
188
190
  if (isAutoMode && options.timeout === 300_000) {
189
191
  options.timeout = 0;
190
192
  }
package/dist/help-text.js CHANGED
@@ -3,12 +3,15 @@ const SUBCOMMAND_HELP = {
3
3
  'Usage: gsd config',
4
4
  '',
5
5
  'Re-run the interactive setup wizard to configure:',
6
- ' - LLM provider (Anthropic, OpenAI, Google, etc.)',
6
+ ' - LLM provider (Anthropic, OpenAI, Google, OpenRouter, Ollama, LM Studio, etc.)',
7
7
  ' - Web search provider (Brave, Tavily, built-in)',
8
8
  ' - Remote questions (Discord, Slack, Telegram)',
9
9
  ' - Tool API keys (Context7, Jina, Groq)',
10
10
  '',
11
11
  'All steps are skippable and can be changed later with /login or /search-provider.',
12
+ '',
13
+ 'For detailed provider setup instructions (OpenRouter, Ollama, LM Studio, vLLM,',
14
+ 'and other OpenAI-compatible endpoints), see docs/providers.md.',
12
15
  ].join('\n'),
13
16
  update: [
14
17
  'Usage: gsd update',
@@ -59,14 +59,13 @@ const API_KEY_PREFIXES = {
59
59
  openai: ['sk-'],
60
60
  };
61
61
  const OTHER_PROVIDERS = [
62
- { value: 'google', label: 'Google (Gemini)' },
63
- { value: 'groq', label: 'Groq' },
64
- { value: 'xai', label: 'xAI (Grok)' },
65
- { value: 'openrouter', label: 'OpenRouter' },
66
- { value: 'mistral', label: 'Mistral' },
67
- { value: 'ollama', label: 'Ollama (Local)' },
62
+ { value: 'google', label: 'Google (Gemini)', hint: 'aistudio.google.com/app/apikey' },
63
+ { value: 'groq', label: 'Groq', hint: 'console.groq.com/keys' },
64
+ { value: 'xai', label: 'xAI (Grok)', hint: 'console.x.ai' },
65
+ { value: 'openrouter', label: 'OpenRouter', hint: '200+ models — openrouter.ai/keys' },
66
+ { value: 'mistral', label: 'Mistral', hint: 'console.mistral.ai/api-keys' },
68
67
  { value: 'ollama-cloud', label: 'Ollama Cloud' },
69
- { value: 'custom-openai', label: 'Custom (OpenAI-compatible)' },
68
+ { value: 'custom-openai', label: 'Custom (OpenAI-compatible)', hint: 'Ollama, LM Studio, vLLM, proxies — see docs/providers.md' },
70
69
  ];
71
70
  // ─── Dynamic imports ──────────────────────────────────────────────────────────
72
71
  /**
@@ -385,6 +384,11 @@ async function runApiKeyFlow(p, pc, authStorage, providerId, providerLabel) {
385
384
  }
386
385
  authStorage.set(providerId, { type: 'api_key', key: trimmed });
387
386
  p.log.success(`API key saved for ${pc.green(providerLabel)}`);
387
+ // Provider-specific post-setup hints
388
+ if (providerId === 'openrouter') {
389
+ p.log.info(`Use ${pc.cyan('/model')} inside GSD to pick an OpenRouter model.`);
390
+ p.log.info(`To add custom models or control routing, see ${pc.dim('docs/providers.md#openrouter')}`);
391
+ }
388
392
  return true;
389
393
  }
390
394
  // ─── Ollama Local Flow ───────────────────────────────────────────────────────
@@ -428,10 +432,11 @@ async function runOllamaLocalFlow(p, pc, authStorage) {
428
432
  }
429
433
  // ─── Custom OpenAI-compatible Flow ────────────────────────────────────────────
430
434
  async function runCustomOpenAIFlow(p, pc, authStorage) {
435
+ p.log.info(pc.dim('Common endpoints:\n Ollama: http://localhost:11434/v1\n LM Studio: http://localhost:1234/v1\n vLLM: http://localhost:8000/v1'));
431
436
  // Prompt for base URL
432
437
  const baseUrl = await p.text({
433
438
  message: 'Base URL of your OpenAI-compatible endpoint:',
434
- placeholder: 'https://my-proxy.example.com/v1',
439
+ placeholder: 'http://localhost:11434/v1',
435
440
  validate: (val) => {
436
441
  const trimmed = val?.trim();
437
442
  if (!trimmed)
@@ -512,6 +517,8 @@ async function runCustomOpenAIFlow(p, pc, authStorage) {
512
517
  p.log.success(`Custom endpoint saved: ${pc.green(trimmedUrl)}`);
513
518
  p.log.info(`Model: ${pc.cyan(trimmedModelId)}`);
514
519
  p.log.info(`Config written to ${pc.dim(modelsJsonPath)}`);
520
+ p.log.info(`If you get role or streaming errors, add compat settings to models.json.`);
521
+ p.log.info(`See ${pc.dim('docs/providers.md#common-pitfalls')} for details.`);
515
522
  return true;
516
523
  }
517
524
  // ─── Web Search Provider Step ─────────────────────────────────────────────────
@@ -62,9 +62,13 @@ function writeManagedResourceManifest(agentDir) {
62
62
  installedExtensionDirs = entries
63
63
  .filter(e => e.isDirectory())
64
64
  .filter(e => {
65
- // Only track directories that are actual extensions (contain index.js or index.ts)
65
+ // Track directories that are actual extensions identified by an
66
+ // index.js/index.ts entry point OR an extension-manifest.json (e.g.
67
+ // remote-questions which uses mod.ts instead of index.ts).
66
68
  const dirPath = join(bundledExtensionsDir, e.name);
67
- return existsSync(join(dirPath, 'index.js')) || existsSync(join(dirPath, 'index.ts'));
69
+ return existsSync(join(dirPath, 'index.js'))
70
+ || existsSync(join(dirPath, 'index.ts'))
71
+ || existsSync(join(dirPath, 'extension-manifest.json'));
68
72
  })
69
73
  .map(e => e.name);
70
74
  }
@@ -341,6 +345,17 @@ function pruneRemovedBundledExtensions(manifest, agentDir) {
341
345
  removeDirIfStale(prevDir);
342
346
  }
343
347
  }
348
+ // Sweep-based: also remove any installed extension subdirectory not in the current bundle,
349
+ // even if it was never tracked in the manifest (e.g. installed by a pre-manifest version).
350
+ try {
351
+ if (existsSync(extensionsDir)) {
352
+ for (const e of readdirSync(extensionsDir, { withFileTypes: true })) {
353
+ if (e.isDirectory())
354
+ removeDirIfStale(e.name);
355
+ }
356
+ }
357
+ }
358
+ catch { /* non-fatal */ }
344
359
  // Always remove known stale files regardless of manifest state.
345
360
  // These were installed by pre-manifest versions so they may not appear in
346
361
  // installedExtensionRootFiles even when a manifest exists.
@@ -583,7 +598,7 @@ export function buildResourceLoader(agentDir) {
583
598
  return new DefaultResourceLoader({
584
599
  agentDir,
585
600
  additionalExtensionPaths: piExtensionPaths,
586
- bundledExtensionNames: bundledKeys,
601
+ bundledExtensionKeys: bundledKeys,
587
602
  extensionPathsTransform: (paths) => {
588
603
  // 1. Filter community extensions through the GSD registry
589
604
  const filteredPaths = paths.filter((entryPath) => {
@@ -3,7 +3,7 @@
3
3
  * context injection, process discovery, footer widget, and periodic maintenance.
4
4
  */
5
5
  import { truncateToWidth, visibleWidth, } from "@gsd/pi-tui";
6
- import { processes, pendingAlerts, cleanupAll, cleanupSessionProcesses, persistManifest, loadManifest, pruneDeadProcesses, } from "./process-manager.js";
6
+ import { processes, pendingAlerts, pushAlert, cleanupAll, cleanupSessionProcesses, persistManifest, loadManifest, pruneDeadProcesses, } from "./process-manager.js";
7
7
  import { formatUptime, getBgShellLiveCwd, resolveBgShellPersistenceCwd } from "./utilities.js";
8
8
  import { formatTokenCount } from "../shared/format-utils.js";
9
9
  export function registerBgShellLifecycle(pi, state) {
@@ -15,17 +15,32 @@ export function registerBgShellLifecycle(pi, state) {
15
15
  state.latestCtx = { ...state.latestCtx, cwd: syncedCwd };
16
16
  }
17
17
  }
18
- // Clean up on session shutdown
19
- pi.on("session_shutdown", async () => {
20
- cleanupAll();
21
- });
22
18
  // Register signal handlers to clean up bg processes on unexpected exit (fixes #428)
23
19
  const signalCleanup = () => {
24
20
  cleanupAll();
21
+ // Also kill bash-tool spawned children that bg-shell doesn't track
22
+ try {
23
+ const { listDescendants } = require("@gsd/native");
24
+ const descendants = listDescendants(process.pid);
25
+ for (const childPid of descendants) {
26
+ try {
27
+ process.kill(childPid, "SIGKILL");
28
+ }
29
+ catch { }
30
+ }
31
+ }
32
+ catch { }
25
33
  };
26
34
  process.on("SIGTERM", signalCleanup);
27
35
  process.on("SIGINT", signalCleanup);
28
36
  process.on("beforeExit", signalCleanup);
37
+ // Clean up on session shutdown — remove signal handlers to prevent accumulation
38
+ pi.on("session_shutdown", async () => {
39
+ process.off("SIGTERM", signalCleanup);
40
+ process.off("SIGINT", signalCleanup);
41
+ process.off("beforeExit", signalCleanup);
42
+ cleanupAll();
43
+ });
29
44
  // ── Compaction Awareness: Survive Context Resets ───────────────
30
45
  /** Build a compact state summary of all alive processes for context re-injection */
31
46
  function buildProcessStateAlert(reason) {
@@ -39,7 +54,7 @@ export function registerBgShellLifecycle(pi, state) {
39
54
  const groupInfo = p.group ? ` [${p.group}]` : "";
40
55
  return ` - id:${p.id} "${p.label}" [${p.processType}] status:${p.status} uptime:${formatUptime(Date.now() - p.startedAt)}${portInfo}${urlInfo}${errInfo}${groupInfo}`;
41
56
  }).join("\n");
42
- pendingAlerts.push(`${reason} ${alive.length} background process(es) are still running:\n${processSummaries}\nUse bg_shell digest/output/kill with these IDs.`);
57
+ pushAlert(null, `${reason} ${alive.length} background process(es) are still running:\n${processSummaries}\nUse bg_shell digest/output/kill with these IDs.`);
43
58
  }
44
59
  // After compaction, the LLM loses all memory of running processes.
45
60
  // Queue a detailed alert so the next before_agent_start injects full state.
@@ -108,7 +123,7 @@ export function registerBgShellLifecycle(pi, state) {
108
123
  }
109
124
  if (surviving.length > 0) {
110
125
  const summary = surviving.map(s => ` - ${s.id}: ${s.label} (pid ${s.pid}, type: ${s.processType}${s.group ? `, group: ${s.group}` : ""})`).join("\n");
111
- pendingAlerts.push(`${surviving.length} background process(es) from previous session still running:\n${summary}\n Note: These processes are outside bg_shell's control. Kill them manually if needed.`);
126
+ pushAlert(null, `${surviving.length} background process(es) from previous session still running:\n${summary}\n Note: These processes are outside bg_shell's control. Kill them manually if needed.`);
112
127
  }
113
128
  }
114
129
  });
@@ -16,6 +16,7 @@ import { startPortProbing, transitionToReady } from "./readiness-detector.js";
16
16
  export const processes = new Map();
17
17
  /** Pending alerts to inject into the next agent context */
18
18
  export let pendingAlerts = [];
19
+ const MAX_PENDING_ALERTS = 50;
19
20
  /** Replace the pendingAlerts array (used by the extension entry point) */
20
21
  export function setPendingAlerts(alerts) {
21
22
  pendingAlerts = alerts;
@@ -41,7 +42,11 @@ export function addEvent(bg, event) {
41
42
  }
42
43
  }
43
44
  export function pushAlert(bg, message) {
44
- pendingAlerts.push(`[bg:${bg.id} ${bg.label}] ${message}`);
45
+ const prefix = bg ? `[bg:${bg.id} ${bg.label}] ` : "";
46
+ pendingAlerts.push(`${prefix}${message}`);
47
+ if (pendingAlerts.length > MAX_PENDING_ALERTS) {
48
+ pendingAlerts.splice(0, pendingAlerts.length - MAX_PENDING_ALERTS);
49
+ }
45
50
  }
46
51
  export function getInfo(p) {
47
52
  return {
@@ -1,7 +1,5 @@
1
- import { execFile, execFileSync } from "node:child_process";
1
+ import { execFileSync, spawn } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
- import { promisify } from "node:util";
4
- const execFileAsync = promisify(execFile);
5
3
  const DEFAULT_SOCKET_PATH = "/tmp/cmux.sock";
6
4
  const STATUS_KEY = "gsd";
7
5
  const lastSidebarSnapshots = new Map();
@@ -147,6 +145,7 @@ export class CmuxClient {
147
145
  return execFileSync("cmux", args, {
148
146
  encoding: "utf-8",
149
147
  timeout: 3000,
148
+ stdio: ["ignore", "pipe", "pipe"],
150
149
  env: process.env,
151
150
  });
152
151
  }
@@ -157,17 +156,27 @@ export class CmuxClient {
157
156
  async runAsync(args) {
158
157
  if (!this.canRun())
159
158
  return null;
160
- try {
161
- const result = await execFileAsync("cmux", args, {
162
- encoding: "utf-8",
163
- timeout: 5000,
159
+ return new Promise((resolve) => {
160
+ const child = spawn("cmux", args, {
161
+ stdio: ["ignore", "pipe", "pipe"],
164
162
  env: process.env,
165
163
  });
166
- return result.stdout;
167
- }
168
- catch {
169
- return null;
170
- }
164
+ const chunks = [];
165
+ let settled = false;
166
+ const done = (result) => {
167
+ if (!settled) {
168
+ settled = true;
169
+ resolve(result);
170
+ }
171
+ };
172
+ const timer = setTimeout(() => { child.kill(); done(null); }, 5000);
173
+ child.stdout.on("data", (chunk) => chunks.push(chunk));
174
+ child.on("close", (code) => {
175
+ clearTimeout(timer);
176
+ done(code === 0 ? Buffer.concat(chunks).toString("utf-8") : null);
177
+ });
178
+ child.on("error", () => { clearTimeout(timer); done(null); });
179
+ });
171
180
  }
172
181
  getCapabilities() {
173
182
  const stdout = this.runSync(["capabilities", "--json"]);