gsd-pi 2.75.0-dev.063e5a3 → 2.75.0-dev.fd2382b9f

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 (606) hide show
  1. package/README.md +186 -149
  2. package/dist/claude-cli-check.d.ts +10 -0
  3. package/dist/claude-cli-check.js +13 -3
  4. package/dist/headless-events.d.ts +1 -1
  5. package/dist/headless-events.js +5 -2
  6. package/dist/headless.js +5 -6
  7. package/dist/loader.js +0 -0
  8. package/dist/onboarding.js +39 -14
  9. package/dist/resources/extensions/ask-user-questions.js +17 -5
  10. package/dist/resources/extensions/claude-code-cli/models.js +9 -0
  11. package/dist/resources/extensions/claude-code-cli/readiness.js +12 -2
  12. package/dist/resources/extensions/claude-code-cli/stream-adapter.js +76 -4
  13. package/dist/resources/extensions/gsd/auto/detect-stuck.js +9 -0
  14. package/dist/resources/extensions/gsd/auto/loop.js +67 -4
  15. package/dist/resources/extensions/gsd/auto/phases.js +70 -47
  16. package/dist/resources/extensions/gsd/auto/resolve.js +1 -1
  17. package/dist/resources/extensions/gsd/auto/run-unit.js +10 -1
  18. package/dist/resources/extensions/gsd/auto/session.js +5 -0
  19. package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
  20. package/dist/resources/extensions/gsd/auto-dashboard.js +15 -7
  21. package/dist/resources/extensions/gsd/auto-dispatch.js +112 -6
  22. package/dist/resources/extensions/gsd/auto-loop.js +1 -1
  23. package/dist/resources/extensions/gsd/auto-model-selection.js +10 -2
  24. package/dist/resources/extensions/gsd/auto-post-unit.js +9 -7
  25. package/dist/resources/extensions/gsd/auto-prompts.js +151 -37
  26. package/dist/resources/extensions/gsd/auto-recovery.js +57 -0
  27. package/dist/resources/extensions/gsd/auto-start.js +5 -3
  28. package/dist/resources/extensions/gsd/auto-verification.js +3 -3
  29. package/dist/resources/extensions/gsd/auto-worktree.js +55 -1
  30. package/dist/resources/extensions/gsd/auto.js +50 -25
  31. package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +8 -21
  32. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +22 -4
  33. package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
  34. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
  35. package/dist/resources/extensions/gsd/commands/catalog.js +67 -3
  36. package/dist/resources/extensions/gsd/commands/handlers/core.js +6 -0
  37. package/dist/resources/extensions/gsd/commands/handlers/escalate.js +171 -0
  38. package/dist/resources/extensions/gsd/commands/handlers/ops.js +16 -0
  39. package/dist/resources/extensions/gsd/commands/handlers/workflow.js +228 -29
  40. package/dist/resources/extensions/gsd/commands-cmux.js +5 -2
  41. package/dist/resources/extensions/gsd/commands-debug.js +388 -0
  42. package/dist/resources/extensions/gsd/commands-do.js +1 -0
  43. package/dist/resources/extensions/gsd/commands-handlers.js +21 -2
  44. package/dist/resources/extensions/gsd/commands-prefs-wizard.js +1 -1
  45. package/dist/resources/extensions/gsd/commands-scan.js +94 -0
  46. package/dist/resources/extensions/gsd/commands-workflow-templates.js +101 -2
  47. package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
  48. package/dist/resources/extensions/gsd/db-writer.js +1 -0
  49. package/dist/resources/extensions/gsd/debug-session-store.js +238 -0
  50. package/dist/resources/extensions/gsd/definition-loader.js +7 -0
  51. package/dist/resources/extensions/gsd/docs/preferences-reference.md +9 -9
  52. package/dist/resources/extensions/gsd/doctor-git-checks.js +5 -1
  53. package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
  54. package/dist/resources/extensions/gsd/doctor-providers.js +48 -20
  55. package/dist/resources/extensions/gsd/doctor-runtime-checks.js +22 -4
  56. package/dist/resources/extensions/gsd/doctor.js +7 -1
  57. package/dist/resources/extensions/gsd/error-classifier.js +6 -3
  58. package/dist/resources/extensions/gsd/escalation.js +321 -0
  59. package/dist/resources/extensions/gsd/forensics.js +26 -29
  60. package/dist/resources/extensions/gsd/git-service.js +0 -1
  61. package/dist/resources/extensions/gsd/graph.js +26 -2
  62. package/dist/resources/extensions/gsd/gsd-db.js +254 -29
  63. package/dist/resources/extensions/gsd/health-widget-core.js +42 -14
  64. package/dist/resources/extensions/gsd/health-widget.js +7 -4
  65. package/dist/resources/extensions/gsd/metrics.js +1 -0
  66. package/dist/resources/extensions/gsd/model-cost-table.js +3 -1
  67. package/dist/resources/extensions/gsd/model-router.js +7 -1
  68. package/dist/resources/extensions/gsd/native-git-bridge.js +137 -5
  69. package/dist/resources/extensions/gsd/notification-widget.js +24 -39
  70. package/dist/resources/extensions/gsd/notifications.js +4 -0
  71. package/dist/resources/extensions/gsd/post-execution-checks.js +27 -11
  72. package/dist/resources/extensions/gsd/pre-execution-checks.js +97 -4
  73. package/dist/resources/extensions/gsd/preferences-models.js +1 -0
  74. package/dist/resources/extensions/gsd/preferences-types.js +2 -1
  75. package/dist/resources/extensions/gsd/preferences-validation.js +42 -8
  76. package/dist/resources/extensions/gsd/preferences.js +10 -10
  77. package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +25 -0
  78. package/dist/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
  79. package/dist/resources/extensions/gsd/prompts/execute-task.md +12 -0
  80. package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
  81. package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
  82. package/dist/resources/extensions/gsd/prompts/scan.md +79 -0
  83. package/dist/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
  84. package/dist/resources/extensions/gsd/run-manager.js +37 -17
  85. package/dist/resources/extensions/gsd/state.js +47 -3
  86. package/dist/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
  87. package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
  88. package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -12
  89. package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -2
  90. package/dist/resources/extensions/gsd/uok/flags.js +7 -7
  91. package/dist/resources/extensions/gsd/uok/kernel.js +8 -3
  92. package/dist/resources/extensions/gsd/workflow-dispatch.js +64 -0
  93. package/dist/resources/extensions/gsd/workflow-install.js +327 -0
  94. package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
  95. package/dist/resources/extensions/gsd/workflow-mcp.js +1 -6
  96. package/dist/resources/extensions/gsd/workflow-plugins.js +346 -0
  97. package/dist/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
  98. package/dist/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
  99. package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
  100. package/dist/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
  101. package/dist/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
  102. package/dist/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
  103. package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
  104. package/dist/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
  105. package/dist/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
  106. package/dist/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
  107. package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
  108. package/dist/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
  109. package/dist/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
  110. package/dist/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
  111. package/dist/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
  112. package/dist/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
  113. package/dist/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
  114. package/dist/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
  115. package/dist/resources/extensions/gsd/workflow-templates/registry.json +184 -0
  116. package/dist/resources/extensions/gsd/workflow-templates/release.md +118 -0
  117. package/dist/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
  118. package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
  119. package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
  120. package/dist/resources/extensions/gsd/workflow-templates/spike.md +1 -0
  121. package/dist/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
  122. package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
  123. package/dist/resources/extensions/remote-questions/commands.js +380 -0
  124. package/dist/resources/extensions/remote-questions/manager.js +39 -5
  125. package/dist/resources/extensions/remote-questions/telegram-adapter.js +79 -4
  126. package/dist/resources/extensions/shared/interview-ui.js +189 -1
  127. package/dist/resources/extensions/shared/layout-utils.js +17 -0
  128. package/dist/resources/extensions/shared/rtk-shared.js +47 -0
  129. package/dist/resources/extensions/shared/rtk.js +3 -46
  130. package/dist/resources/skills/create-workflow/SKILL.md +33 -6
  131. package/dist/rtk-shared.d.ts +10 -0
  132. package/dist/rtk-shared.js +47 -0
  133. package/dist/rtk.d.ts +2 -6
  134. package/dist/rtk.js +3 -48
  135. package/dist/shared/workspace-types.d.ts +52 -0
  136. package/dist/shared/workspace-types.js +1 -0
  137. package/dist/tsconfig.extensions.tsbuildinfo +1 -1
  138. package/dist/update-check.d.ts +10 -0
  139. package/dist/update-check.js +24 -3
  140. package/dist/web/standalone/.next/BUILD_ID +1 -1
  141. package/dist/web/standalone/.next/app-path-routes-manifest.json +6 -6
  142. package/dist/web/standalone/.next/build-manifest.json +3 -3
  143. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  144. package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
  145. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  146. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  147. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  148. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  149. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  150. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  151. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  152. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  153. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  154. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  155. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  156. package/dist/web/standalone/.next/server/app/_not-found.rsc +2 -2
  157. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  158. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  159. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  160. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  161. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  162. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  163. package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
  164. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  165. package/dist/web/standalone/.next/server/app/index.html +1 -1
  166. package/dist/web/standalone/.next/server/app/index.rsc +2 -2
  167. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  168. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
  169. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  170. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  171. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  172. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  173. package/dist/web/standalone/.next/server/app-paths-manifest.json +6 -6
  174. package/dist/web/standalone/.next/server/chunks/6897.js +2 -2
  175. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  176. package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
  177. package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  178. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  179. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  180. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  181. package/dist/web/standalone/.next/static/chunks/2826.02df9631042cc18e.js +9 -0
  182. package/dist/web/standalone/.next/static/chunks/{webpack-b868033a5834586d.js → webpack-6c7cda3e318eedb6.js} +1 -1
  183. package/dist/web/standalone/.next/static/css/3e9cdadb4d23b8a4.css +1 -0
  184. package/dist/welcome-screen.js +48 -24
  185. package/dist/wizard.js +2 -2
  186. package/dist/worktree-cli.d.ts +6 -5
  187. package/dist/worktree-cli.js +23 -7
  188. package/package.json +3 -3
  189. package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
  190. package/packages/native/tsconfig.tsbuildinfo +1 -1
  191. package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
  192. package/packages/pi-ai/dist/models/capability-patches.d.ts.map +1 -1
  193. package/packages/pi-ai/dist/models/capability-patches.js +3 -2
  194. package/packages/pi-ai/dist/models/capability-patches.js.map +1 -1
  195. package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts +68 -0
  196. package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts.map +1 -1
  197. package/packages/pi-ai/dist/models/generated/amazon-bedrock.js +68 -0
  198. package/packages/pi-ai/dist/models/generated/amazon-bedrock.js.map +1 -1
  199. package/packages/pi-ai/dist/models/generated/anthropic.d.ts +17 -0
  200. package/packages/pi-ai/dist/models/generated/anthropic.d.ts.map +1 -1
  201. package/packages/pi-ai/dist/models/generated/anthropic.js +17 -0
  202. package/packages/pi-ai/dist/models/generated/anthropic.js.map +1 -1
  203. package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts +17 -0
  204. package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts.map +1 -1
  205. package/packages/pi-ai/dist/models/generated/google-antigravity.js +17 -0
  206. package/packages/pi-ai/dist/models/generated/google-antigravity.js.map +1 -1
  207. package/packages/pi-ai/dist/models/generated/groq.d.ts +0 -153
  208. package/packages/pi-ai/dist/models/generated/groq.d.ts.map +1 -1
  209. package/packages/pi-ai/dist/models/generated/groq.js +0 -153
  210. package/packages/pi-ai/dist/models/generated/groq.js.map +1 -1
  211. package/packages/pi-ai/dist/models/generated/index.d.ts +136 -153
  212. package/packages/pi-ai/dist/models/generated/index.d.ts.map +1 -1
  213. package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +17 -0
  214. package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -1
  215. package/packages/pi-ai/dist/models/generated/openai-codex.js +17 -0
  216. package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -1
  217. package/packages/pi-ai/dist/models/generated/openrouter.d.ts +17 -0
  218. package/packages/pi-ai/dist/models/generated/openrouter.d.ts.map +1 -1
  219. package/packages/pi-ai/dist/models/generated/openrouter.js +17 -0
  220. package/packages/pi-ai/dist/models/generated/openrouter.js.map +1 -1
  221. package/packages/pi-ai/dist/models.generated.test.js +17 -0
  222. package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
  223. package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts +22 -1
  224. package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  225. package/packages/pi-ai/dist/providers/amazon-bedrock.js +40 -6
  226. package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  227. package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts +2 -0
  228. package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts.map +1 -0
  229. package/packages/pi-ai/dist/providers/amazon-bedrock.test.js +106 -0
  230. package/packages/pi-ai/dist/providers/amazon-bedrock.test.js.map +1 -0
  231. package/packages/pi-ai/dist/providers/anthropic-auth.test.js +42 -1
  232. package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
  233. package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +20 -1
  234. package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
  235. package/packages/pi-ai/dist/providers/anthropic-shared.js +32 -2
  236. package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
  237. package/packages/pi-ai/dist/providers/anthropic-shared.test.js +12 -1
  238. package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +1 -1
  239. package/packages/pi-ai/dist/providers/anthropic.d.ts +11 -0
  240. package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  241. package/packages/pi-ai/dist/providers/anthropic.js +18 -1
  242. package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
  243. package/packages/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  244. package/packages/pi-ai/dist/utils/oauth/openai-codex.js +12 -0
  245. package/packages/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
  246. package/packages/pi-ai/package.json +1 -1
  247. package/packages/pi-ai/scripts/generate-models.ts +50 -0
  248. package/packages/pi-ai/src/models/capability-patches.ts +5 -2
  249. package/packages/pi-ai/src/models/generated/amazon-bedrock.ts +68 -0
  250. package/packages/pi-ai/src/models/generated/anthropic.ts +17 -0
  251. package/packages/pi-ai/src/models/generated/google-antigravity.ts +17 -0
  252. package/packages/pi-ai/src/models/generated/groq.ts +0 -153
  253. package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
  254. package/packages/pi-ai/src/models/generated/openrouter.ts +17 -0
  255. package/packages/pi-ai/src/models.generated.test.ts +17 -0
  256. package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
  257. package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -7
  258. package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
  259. package/packages/pi-ai/src/providers/anthropic-shared.test.ts +15 -1
  260. package/packages/pi-ai/src/providers/anthropic-shared.ts +36 -3
  261. package/packages/pi-ai/src/providers/anthropic.ts +19 -1
  262. package/packages/pi-ai/src/utils/oauth/openai-codex.ts +15 -0
  263. package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
  264. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts +2 -0
  265. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts.map +1 -0
  266. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js +38 -0
  267. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js.map +1 -0
  268. package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +14 -0
  269. package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  270. package/packages/pi-coding-agent/dist/core/auth-storage.js +34 -0
  271. package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  272. package/packages/pi-coding-agent/dist/core/auth-storage.test.js +74 -0
  273. package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
  274. package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +4 -1
  275. package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
  276. package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +32 -0
  277. package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
  278. package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  279. package/packages/pi-coding-agent/dist/core/sdk.js +32 -0
  280. package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
  281. package/packages/pi-coding-agent/dist/core/skill-tool.test.js +2 -2
  282. package/packages/pi-coding-agent/dist/core/skill-tool.test.js.map +1 -1
  283. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
  284. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +17 -7
  285. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
  286. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
  287. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +48 -34
  288. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
  289. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +4 -0
  290. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  291. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +83 -33
  292. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  293. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
  294. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  295. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +77 -0
  296. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  297. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -66
  298. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  299. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -75
  300. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  301. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +1 -1
  302. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
  303. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +192 -24
  304. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
  305. package/packages/pi-coding-agent/src/core/agent-session-abort-order.test.ts +56 -0
  306. package/packages/pi-coding-agent/src/core/auth-storage.test.ts +83 -0
  307. package/packages/pi-coding-agent/src/core/auth-storage.ts +35 -0
  308. package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
  309. package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
  310. package/packages/pi-coding-agent/src/core/sdk.ts +41 -0
  311. package/packages/pi-coding-agent/src/core/skill-tool.test.ts +2 -2
  312. package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +19 -7
  313. package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +53 -31
  314. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +88 -36
  315. package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +83 -0
  316. package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +2 -83
  317. package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +208 -27
  318. package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
  319. package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
  320. package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
  321. package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
  322. package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  323. package/pkg/dist/modes/interactive/theme/theme-schema.js +77 -0
  324. package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  325. package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -66
  326. package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  327. package/pkg/dist/modes/interactive/theme/theme.js +1 -75
  328. package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
  329. package/pkg/dist/modes/interactive/theme/themes.d.ts +1 -1
  330. package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
  331. package/pkg/dist/modes/interactive/theme/themes.js +192 -24
  332. package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
  333. package/src/resources/extensions/ask-user-questions.ts +24 -6
  334. package/src/resources/extensions/claude-code-cli/models.ts +9 -0
  335. package/src/resources/extensions/claude-code-cli/readiness.ts +13 -2
  336. package/src/resources/extensions/claude-code-cli/stream-adapter.ts +94 -4
  337. package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +84 -0
  338. package/src/resources/extensions/gsd/auto/detect-stuck.ts +10 -0
  339. package/src/resources/extensions/gsd/auto/loop-deps.ts +1 -0
  340. package/src/resources/extensions/gsd/auto/loop.ts +109 -3
  341. package/src/resources/extensions/gsd/auto/phases.ts +94 -60
  342. package/src/resources/extensions/gsd/auto/resolve.ts +1 -1
  343. package/src/resources/extensions/gsd/auto/run-unit.ts +11 -1
  344. package/src/resources/extensions/gsd/auto/session.ts +7 -0
  345. package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
  346. package/src/resources/extensions/gsd/auto-dashboard.ts +21 -4
  347. package/src/resources/extensions/gsd/auto-dispatch.ts +123 -5
  348. package/src/resources/extensions/gsd/auto-loop.ts +1 -1
  349. package/src/resources/extensions/gsd/auto-model-selection.ts +13 -2
  350. package/src/resources/extensions/gsd/auto-post-unit.ts +9 -7
  351. package/src/resources/extensions/gsd/auto-prompts.ts +178 -38
  352. package/src/resources/extensions/gsd/auto-recovery.ts +63 -1
  353. package/src/resources/extensions/gsd/auto-start.ts +8 -6
  354. package/src/resources/extensions/gsd/auto-verification.ts +3 -3
  355. package/src/resources/extensions/gsd/auto-worktree.ts +65 -0
  356. package/src/resources/extensions/gsd/auto.ts +53 -28
  357. package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +8 -21
  358. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +22 -4
  359. package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
  360. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
  361. package/src/resources/extensions/gsd/commands/catalog.ts +60 -3
  362. package/src/resources/extensions/gsd/commands/handlers/core.ts +6 -0
  363. package/src/resources/extensions/gsd/commands/handlers/escalate.ts +216 -0
  364. package/src/resources/extensions/gsd/commands/handlers/ops.ts +16 -0
  365. package/src/resources/extensions/gsd/commands/handlers/workflow.ts +279 -29
  366. package/src/resources/extensions/gsd/commands-cmux.ts +6 -2
  367. package/src/resources/extensions/gsd/commands-debug.ts +484 -0
  368. package/src/resources/extensions/gsd/commands-do.ts +1 -0
  369. package/src/resources/extensions/gsd/commands-handlers.ts +19 -2
  370. package/src/resources/extensions/gsd/commands-prefs-wizard.ts +1 -1
  371. package/src/resources/extensions/gsd/commands-scan.ts +125 -0
  372. package/src/resources/extensions/gsd/commands-workflow-templates.ts +129 -2
  373. package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
  374. package/src/resources/extensions/gsd/db-writer.ts +3 -0
  375. package/src/resources/extensions/gsd/debug-session-store.ts +377 -0
  376. package/src/resources/extensions/gsd/definition-loader.ts +7 -0
  377. package/src/resources/extensions/gsd/docs/preferences-reference.md +9 -9
  378. package/src/resources/extensions/gsd/doctor-git-checks.ts +5 -1
  379. package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
  380. package/src/resources/extensions/gsd/doctor-providers.ts +52 -22
  381. package/src/resources/extensions/gsd/doctor-runtime-checks.ts +23 -4
  382. package/src/resources/extensions/gsd/doctor-types.ts +1 -0
  383. package/src/resources/extensions/gsd/doctor.ts +7 -1
  384. package/src/resources/extensions/gsd/error-classifier.ts +6 -3
  385. package/src/resources/extensions/gsd/escalation.ts +367 -0
  386. package/src/resources/extensions/gsd/forensics.ts +25 -29
  387. package/src/resources/extensions/gsd/git-service.ts +0 -1
  388. package/src/resources/extensions/gsd/graph.ts +33 -3
  389. package/src/resources/extensions/gsd/gsd-db.ts +306 -29
  390. package/src/resources/extensions/gsd/health-widget-core.ts +43 -14
  391. package/src/resources/extensions/gsd/health-widget.ts +7 -3
  392. package/src/resources/extensions/gsd/metrics.ts +1 -0
  393. package/src/resources/extensions/gsd/model-cost-table.ts +3 -1
  394. package/src/resources/extensions/gsd/model-router.ts +15 -1
  395. package/src/resources/extensions/gsd/native-git-bridge.ts +134 -6
  396. package/src/resources/extensions/gsd/notification-widget.ts +25 -43
  397. package/src/resources/extensions/gsd/notifications.ts +6 -0
  398. package/src/resources/extensions/gsd/post-execution-checks.ts +37 -14
  399. package/src/resources/extensions/gsd/pre-execution-checks.ts +98 -8
  400. package/src/resources/extensions/gsd/preferences-models.ts +1 -0
  401. package/src/resources/extensions/gsd/preferences-types.ts +10 -2
  402. package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
  403. package/src/resources/extensions/gsd/preferences.ts +10 -10
  404. package/src/resources/extensions/gsd/prompts/debug-diagnose.md +25 -0
  405. package/src/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
  406. package/src/resources/extensions/gsd/prompts/execute-task.md +12 -0
  407. package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
  408. package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
  409. package/src/resources/extensions/gsd/prompts/scan.md +79 -0
  410. package/src/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
  411. package/src/resources/extensions/gsd/run-manager.ts +53 -19
  412. package/src/resources/extensions/gsd/state.ts +50 -2
  413. package/src/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
  414. package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +1 -34
  415. package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
  416. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +45 -31
  417. package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +123 -1
  418. package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +39 -0
  419. package/src/resources/extensions/gsd/tests/autocomplete-regressions-1675.test.ts +39 -0
  420. package/src/resources/extensions/gsd/tests/commands-do.test.ts +48 -0
  421. package/src/resources/extensions/gsd/tests/commands-scan.test.ts +351 -0
  422. package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +8 -6
  423. package/src/resources/extensions/gsd/tests/complete-slice.test.ts +2 -2
  424. package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
  425. package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +63 -0
  426. package/src/resources/extensions/gsd/tests/debug-command-handler.test.ts +905 -0
  427. package/src/resources/extensions/gsd/tests/debug-command-lifecycle.integration.test.ts +1229 -0
  428. package/src/resources/extensions/gsd/tests/debug-session-store.test.ts +565 -0
  429. package/src/resources/extensions/gsd/tests/discuss-milestone-structured-questions.test.ts +64 -0
  430. package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +67 -0
  431. package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +62 -18
  432. package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
  433. package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
  434. package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +29 -12
  435. package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +106 -0
  436. package/src/resources/extensions/gsd/tests/forensics-hook-key-parse.test.ts +74 -0
  437. package/src/resources/extensions/gsd/tests/graph-operations.test.ts +0 -4
  438. package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -1
  439. package/src/resources/extensions/gsd/tests/health-widget.test.ts +8 -2
  440. package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +39 -0
  441. package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +44 -0
  442. package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +68 -1
  443. package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +109 -11
  444. package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +51 -0
  445. package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
  446. package/src/resources/extensions/gsd/tests/journal-integration.test.ts +171 -1
  447. package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
  448. package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
  449. package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +3 -2
  450. package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +2 -2
  451. package/src/resources/extensions/gsd/tests/model-router.test.ts +1 -1
  452. package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +59 -0
  453. package/src/resources/extensions/gsd/tests/notification-widget.test.ts +1 -1
  454. package/src/resources/extensions/gsd/tests/plan-slice.test.ts +17 -0
  455. package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -1
  456. package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +275 -6
  457. package/src/resources/extensions/gsd/tests/preferences.test.ts +69 -1
  458. package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +539 -0
  459. package/src/resources/extensions/gsd/tests/projection-regression.test.ts +7 -0
  460. package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +27 -0
  461. package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
  462. package/src/resources/extensions/gsd/tests/prompt-db.test.ts +1 -1
  463. package/src/resources/extensions/gsd/tests/provider-errors.test.ts +33 -0
  464. package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +67 -0
  465. package/src/resources/extensions/gsd/tests/remote-notification-from-desktop.test.ts +107 -0
  466. package/src/resources/extensions/gsd/tests/requirements.test.ts +9 -0
  467. package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +153 -0
  468. package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +16 -4
  469. package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -0
  470. package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +15 -0
  471. package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +5 -0
  472. package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +2 -1
  473. package/src/resources/extensions/gsd/tests/uok-flags.test.ts +31 -1
  474. package/src/resources/extensions/gsd/tests/uok-kernel-path.test.ts +166 -0
  475. package/src/resources/extensions/gsd/tests/workflow-install.test.ts +113 -0
  476. package/src/resources/extensions/gsd/tests/workflow-logger-wiring.test.ts +15 -6
  477. package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +2 -2
  478. package/src/resources/extensions/gsd/tests/workflow-plugins.test.ts +310 -0
  479. package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
  480. package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +8 -2
  481. package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +2 -1
  482. package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +77 -2
  483. package/src/resources/extensions/gsd/tools/complete-task.ts +87 -0
  484. package/src/resources/extensions/gsd/tools/plan-milestone.ts +42 -8
  485. package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -1
  486. package/src/resources/extensions/gsd/types.ts +62 -0
  487. package/src/resources/extensions/gsd/unit-runtime.ts +1 -0
  488. package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
  489. package/src/resources/extensions/gsd/uok/flags.ts +7 -7
  490. package/src/resources/extensions/gsd/uok/kernel.ts +16 -4
  491. package/src/resources/extensions/gsd/workflow-dispatch.ts +106 -0
  492. package/src/resources/extensions/gsd/workflow-install.ts +423 -0
  493. package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
  494. package/src/resources/extensions/gsd/workflow-mcp.ts +1 -6
  495. package/src/resources/extensions/gsd/workflow-plugins.ts +403 -0
  496. package/src/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
  497. package/src/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
  498. package/src/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
  499. package/src/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
  500. package/src/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
  501. package/src/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
  502. package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
  503. package/src/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
  504. package/src/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
  505. package/src/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
  506. package/src/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
  507. package/src/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
  508. package/src/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
  509. package/src/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
  510. package/src/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
  511. package/src/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
  512. package/src/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
  513. package/src/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
  514. package/src/resources/extensions/gsd/workflow-templates/registry.json +184 -0
  515. package/src/resources/extensions/gsd/workflow-templates/release.md +118 -0
  516. package/src/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
  517. package/src/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
  518. package/src/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
  519. package/src/resources/extensions/gsd/workflow-templates/spike.md +1 -0
  520. package/src/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
  521. package/src/resources/extensions/gsd/workflow-templates.ts +7 -0
  522. package/src/resources/extensions/gsd/workspace-index.ts +9 -4
  523. package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
  524. package/src/resources/extensions/remote-questions/commands.ts +480 -0
  525. package/src/resources/extensions/remote-questions/manager.ts +49 -4
  526. package/src/resources/extensions/remote-questions/telegram-adapter.ts +86 -4
  527. package/src/resources/extensions/remote-questions/tests/command-polling.test.ts +246 -0
  528. package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
  529. package/src/resources/extensions/remote-questions/tests/telegram-commands.test.ts +267 -0
  530. package/src/resources/extensions/shared/interview-ui.ts +195 -1
  531. package/src/resources/extensions/shared/layout-utils.ts +26 -0
  532. package/src/resources/extensions/shared/rtk-shared.ts +58 -0
  533. package/src/resources/extensions/shared/rtk.ts +12 -52
  534. package/src/resources/extensions/shared/tests/interview-preview.test.ts +177 -0
  535. package/src/resources/extensions/shared/tests/preview-layout.test.ts +120 -0
  536. package/src/resources/skills/create-workflow/SKILL.md +33 -6
  537. package/dist/web/standalone/.next/static/chunks/2826.dd3dc8bbd3025fa5.js +0 -9
  538. package/dist/web/standalone/.next/static/css/f6e8833d46e738d8.css +0 -1
  539. package/packages/native/dist/ps/types.d.ts +0 -5
  540. package/packages/native/dist/ps/types.js +0 -2
  541. package/packages/native/src/ps/types.ts +0 -5
  542. package/packages/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  543. package/packages/pi-ai/node_modules/@smithy/node-http-handler/README.md +0 -9
  544. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -762
  545. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  546. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  547. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -9
  548. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  549. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -230
  550. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -87
  551. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -32
  552. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -169
  553. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
  554. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
  555. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  556. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  557. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  558. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  559. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
  560. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
  561. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
  562. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  563. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  564. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
  565. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
  566. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
  567. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
  568. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -46
  569. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -24
  570. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -12
  571. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -63
  572. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -13
  573. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +0 -12
  574. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
  575. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
  576. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
  577. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
  578. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
  579. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -6
  580. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -13
  581. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -8
  582. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
  583. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
  584. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
  585. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
  586. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -46
  587. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -24
  588. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -12
  589. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -63
  590. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -13
  591. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +0 -12
  592. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
  593. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
  594. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
  595. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
  596. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -5
  597. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +0 -6
  598. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -13
  599. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -8
  600. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
  601. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
  602. package/packages/pi-ai/node_modules/@smithy/node-http-handler/package.json +0 -68
  603. package/packages/pi-ai/oauth.d.ts +0 -1
  604. package/packages/pi-ai/oauth.js +0 -1
  605. /package/dist/web/standalone/.next/static/{j7IBD35UgrL2b298GLK3V → jaWw1Jh0TYayjbfOrFe8D}/_buildManifest.js +0 -0
  606. /package/dist/web/standalone/.next/static/{j7IBD35UgrL2b298GLK3V → jaWw1Jh0TYayjbfOrFe8D}/_ssgManifest.js +0 -0
@@ -17,6 +17,7 @@ export const MODEL_CAPABILITY_TIER = {
17
17
  "gpt-4.1-nano": "light",
18
18
  "gpt-5-mini": "light",
19
19
  "gpt-5-nano": "light",
20
+ "gpt-5.4-mini": "light",
20
21
  "gpt-5.1-codex-mini": "light",
21
22
  "gpt-5.3-codex-spark": "light",
22
23
  "gemini-2.0-flash": "light",
@@ -32,6 +33,7 @@ export const MODEL_CAPABILITY_TIER = {
32
33
  "deepseek-chat": "standard",
33
34
  // Heavy-tier models (most capable)
34
35
  "claude-opus-4-6": "heavy",
36
+ "claude-opus-4-7": "heavy",
35
37
  "claude-3-opus-latest": "heavy",
36
38
  "gpt-4-turbo": "heavy",
37
39
  "gpt-5": "heavy",
@@ -54,7 +56,8 @@ const MODEL_COST_PER_1K_INPUT = {
54
56
  "claude-3-5-haiku-latest": 0.0008,
55
57
  "claude-sonnet-4-6": 0.003,
56
58
  "claude-sonnet-4-5-20250514": 0.003,
57
- "claude-opus-4-6": 0.015,
59
+ "claude-opus-4-6": 0.005,
60
+ "claude-opus-4-7": 0.005,
58
61
  "gpt-4o-mini": 0.00015,
59
62
  "gpt-4o": 0.0025,
60
63
  "gpt-4.1": 0.002,
@@ -63,6 +66,7 @@ const MODEL_COST_PER_1K_INPUT = {
63
66
  "gpt-5": 0.01,
64
67
  "gpt-5-mini": 0.0003,
65
68
  "gpt-5-nano": 0.0001,
69
+ "gpt-5.4-mini": 0.00075,
66
70
  "gpt-5-pro": 0.015,
67
71
  "gpt-5.1": 0.005,
68
72
  "gpt-5.1-codex-max": 0.003,
@@ -84,6 +88,7 @@ const MODEL_COST_PER_1K_INPUT = {
84
88
  export const MODEL_CAPABILITY_PROFILES = {
85
89
  // ── Anthropic ──────────────────────────────────────────────────────────────
86
90
  "claude-opus-4-6": { coding: 95, debugging: 90, research: 85, reasoning: 95, speed: 30, longContext: 80, instruction: 90 },
91
+ "claude-opus-4-7": { coding: 95, debugging: 90, research: 85, reasoning: 95, speed: 30, longContext: 80, instruction: 90 },
87
92
  "claude-sonnet-4-6": { coding: 85, debugging: 80, research: 75, reasoning: 80, speed: 60, longContext: 75, instruction: 85 },
88
93
  "claude-sonnet-4-5-20250514": { coding: 85, debugging: 80, research: 75, reasoning: 80, speed: 60, longContext: 75, instruction: 85 },
89
94
  "claude-3-5-sonnet-latest": { coding: 82, debugging: 78, research: 72, reasoning: 78, speed: 62, longContext: 70, instruction: 82 },
@@ -101,6 +106,7 @@ export const MODEL_CAPABILITY_PROFILES = {
101
106
  "gpt-5": { coding: 92, debugging: 88, research: 85, reasoning: 92, speed: 40, longContext: 85, instruction: 90 },
102
107
  "gpt-5-mini": { coding: 62, debugging: 52, research: 48, reasoning: 52, speed: 88, longContext: 52, instruction: 74 },
103
108
  "gpt-5-nano": { coding: 42, debugging: 32, research: 28, reasoning: 32, speed: 95, longContext: 32, instruction: 62 },
109
+ "gpt-5.4-mini": { coding: 70, debugging: 60, research: 55, reasoning: 60, speed: 84, longContext: 60, instruction: 78 },
104
110
  "gpt-5-pro": { coding: 94, debugging: 90, research: 88, reasoning: 94, speed: 35, longContext: 88, instruction: 92 },
105
111
  "gpt-5.1": { coding: 93, debugging: 89, research: 86, reasoning: 93, speed: 42, longContext: 86, instruction: 91 },
106
112
  "gpt-5.1-codex-max": { coding: 90, debugging: 85, research: 70, reasoning: 85, speed: 55, longContext: 75, instruction: 85 },
@@ -5,6 +5,8 @@
5
5
  // Both READ and WRITE operations are native — push operations remain as
6
6
  // execSync calls because git2 credential handling is too complex.
7
7
  import { execFileSync } from "node:child_process";
8
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
9
+ import { join } from "node:path";
8
10
  import { GSDError, GSD_GIT_ERROR } from "./errors.js";
9
11
  import { GIT_NO_PROMPT_ENV } from "./git-constants.js";
10
12
  import { getErrorMessage } from "./error-utils.js";
@@ -534,6 +536,136 @@ export function nativeAddAll(basePath) {
534
536
  export function nativeAddTracked(basePath) {
535
537
  gitFileExec(basePath, ["add", "-u"]);
536
538
  }
539
+ function isDotGsdIgnored(basePath) {
540
+ for (const path of [".gsd", ".gsd/"]) {
541
+ try {
542
+ execFileSync("git", ["check-ignore", "-q", path], {
543
+ cwd: basePath,
544
+ stdio: "pipe",
545
+ env: GIT_NO_PROMPT_ENV,
546
+ });
547
+ return true;
548
+ }
549
+ catch {
550
+ // exit 1 means this form is not ignored; try the next variant
551
+ }
552
+ }
553
+ return false;
554
+ }
555
+ /**
556
+ * Determine whether the project opts out of GSD-managed `.gitignore` via
557
+ * `git.manage_gitignore: false` in `.gsd/PREFERENCES.md`. Uses a minimal
558
+ * inline parser to avoid importing the full preferences module (which would
559
+ * introduce a circular dependency back into this low-level bridge).
560
+ *
561
+ * Returns true when management is disabled. Any parse failure or missing
562
+ * file returns false (default: GSD may manage `.gitignore`).
563
+ */
564
+ function isGitignoreManagementDisabled(basePath) {
565
+ const prefsPath = join(basePath, ".gsd", "PREFERENCES.md");
566
+ if (!existsSync(prefsPath))
567
+ return false;
568
+ try {
569
+ const content = readFileSync(prefsPath, "utf-8");
570
+ // Look for `manage_gitignore: false` under a `git:` block. The preference
571
+ // is indented; a loose regex is sufficient since we only care about the
572
+ // explicit opt-out case.
573
+ return /^\s*manage_gitignore\s*:\s*false\s*$/m.test(content);
574
+ }
575
+ catch {
576
+ return false;
577
+ }
578
+ }
579
+ /**
580
+ * Self-heal path for the symlinked-`.gsd` staging failure: append `.gsd` to
581
+ * `.gitignore` so subsequent `git add -A` calls succeed without the symlink
582
+ * pathspec error. Honors the `git.manage_gitignore: false` opt-out.
583
+ *
584
+ * Returns true when `.gitignore` now contains an entry covering `.gsd`
585
+ * (either pre-existing or newly appended). Returns false when the opt-out
586
+ * is set or the write fails.
587
+ */
588
+ function trySelfHealGsdGitignore(basePath) {
589
+ if (isGitignoreManagementDisabled(basePath))
590
+ return false;
591
+ const gitignorePath = join(basePath, ".gitignore");
592
+ try {
593
+ const existing = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
594
+ const lines = new Set(existing.split("\n").map(l => l.trim()).filter(l => l && !l.startsWith("#")));
595
+ if (lines.has(".gsd") || lines.has(".gsd/"))
596
+ return true;
597
+ const prefix = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
598
+ const block = `${prefix}\n# ── GSD self-heal: .gsd is a symlink to external state ──\n.gsd\n`;
599
+ writeFileSync(gitignorePath, existing + block, "utf-8");
600
+ return true;
601
+ }
602
+ catch {
603
+ return false;
604
+ }
605
+ }
606
+ /**
607
+ * Stage untracked files individually while skipping anything under `.gsd`.
608
+ * Used as a last-resort when `.gsd` is a symlink, not gitignored, and
609
+ * `git.manage_gitignore: false` forbids the self-heal path. Protects user
610
+ * work by never silently dropping new real files.
611
+ */
612
+ function stageUntrackedExcludingDotGsd(basePath) {
613
+ // Stage tracked modifications first. `git add -u` never fails on pathspec
614
+ // issues because it doesn't walk untracked trees.
615
+ gitFileExec(basePath, ["add", "-u"]);
616
+ // Enumerate untracked paths via porcelain output. `?? ` prefix marks
617
+ // untracked files (status respects `.gitignore`).
618
+ const status = gitFileExec(basePath, ["status", "--porcelain=v1", "-z"], true);
619
+ if (!status)
620
+ return;
621
+ const untracked = [];
622
+ for (const entry of status.split("\0")) {
623
+ if (!entry)
624
+ continue;
625
+ // Porcelain format: "XY path" where XY is the 2-char status code.
626
+ if (entry.length < 4)
627
+ continue;
628
+ const code = entry.slice(0, 2);
629
+ const path = entry.slice(3);
630
+ if (code !== "??")
631
+ continue;
632
+ // Skip GSD runtime artifacts. Under `manage_gitignore: false` the user
633
+ // may not have these in `.gitignore`, so we filter explicitly to avoid
634
+ // committing transient state (.gsd external link, migration lock,
635
+ // background shell scratch dir).
636
+ if (path === ".gsd" || path.startsWith(".gsd/"))
637
+ continue;
638
+ if (path === ".gsd-id" || path === ".gsd.migrating")
639
+ continue;
640
+ if (path === ".bg-shell" || path.startsWith(".bg-shell/"))
641
+ continue;
642
+ untracked.push(path);
643
+ }
644
+ if (untracked.length === 0)
645
+ return;
646
+ // Stage in chunks to avoid exceeding ARG_MAX on large change sets.
647
+ const CHUNK = 200;
648
+ for (let i = 0; i < untracked.length; i += CHUNK) {
649
+ gitFileExec(basePath, ["add", "--", ...untracked.slice(i, i + CHUNK)]);
650
+ }
651
+ }
652
+ /**
653
+ * Handle `nativeAddAllWithExclusions` failing with "beyond a symbolic link"
654
+ * when `.gsd` is a symlink. Self-heals by adding `.gsd` to `.gitignore`, or
655
+ * falls back to explicit per-file staging so user work is never dropped.
656
+ */
657
+ function fallbackStageWithSymlinkedDotGsd(basePath) {
658
+ if (isDotGsdIgnored(basePath)) {
659
+ gitFileExec(basePath, ["add", "-A"]);
660
+ return;
661
+ }
662
+ if (trySelfHealGsdGitignore(basePath)) {
663
+ gitFileExec(basePath, ["add", "-A"]);
664
+ return;
665
+ }
666
+ // `manage_gitignore: false` — protect work by staging files explicitly.
667
+ stageUntrackedExcludingDotGsd(basePath);
668
+ }
537
669
  /**
538
670
  * Stage all files with pathspec exclusions (git add -A -- ':!pattern' ...).
539
671
  * Excluded paths are never hashed by git, preventing hangs on large
@@ -569,12 +701,12 @@ export function nativeAddAllWithExclusions(basePath, exclusions) {
569
701
  return;
570
702
  }
571
703
  // When .gsd is a symlink, git rejects `:!.gsd/...` pathspecs with
572
- // "beyond a symbolic link". Fall back to `git add -u` which only
573
- // stages changes to already-tracked files O(tracked) not O(filesystem).
574
- // Using `git add -A` here would traverse the entire working tree,
575
- // hanging indefinitely on repos with large untracked data dirs. (#1977)
704
+ // "beyond a symbolic link". Hand off to the self-heal fallback which
705
+ // either adds `.gsd` to `.gitignore` and retries `git add -A`, or stages
706
+ // real files explicitly when `git.manage_gitignore: false` forbids the
707
+ // self-heal path. Either way, user work is protected from silent drops.
576
708
  if (stderr.includes("beyond a symbolic link")) {
577
- gitFileExec(basePath, ["add", "-u"]);
709
+ fallbackStageWithSymlinkedDotGsd(basePath);
578
710
  return;
579
711
  }
580
712
  throw new GSDError(GSD_GIT_ERROR, `git add -A with exclusions failed in ${basePath}: ${getErrorMessage(err)}`);
@@ -1,49 +1,34 @@
1
- // GSD Extension — Notification Widget
2
- // Always-on ambient widget rendered belowEditor showing unread count and
3
- // the most recent notification message. Refreshes every 30 seconds.
4
- // Widget key: "gsd-notifications", placement: "belowEditor"
1
+ // GSD Extension — Notification Status
2
+ // Always-on ambient notification chip surfaced as an extension status on the
3
+ // footer pwd row. Refreshes on store change + on a 30s timer. Hidden when
4
+ // unread=0. Key sorts late so the chip renders to the right of other
5
+ // extension statuses.
5
6
  import { getUnreadCount, onNotificationStoreChange } from "./notification-store.js";
6
7
  import { formattedShortcutPair } from "./shortcut-defs.js";
7
- // ─── Pure rendering ──���────────────────────────���─────────────────────────
8
- export function buildNotificationWidgetLines() {
8
+ // Key chosen to sort after alphabetic extension keys so the chip lands on the
9
+ // far right of the extension-status block.
10
+ const STATUS_KEY = "zz-notifications";
11
+ export function buildNotificationChip() {
9
12
  const unread = getUnreadCount();
10
13
  if (unread === 0)
11
- return [];
12
- return [` 🔔 Notifications: ${unread} unread (${formattedShortcutPair("notifications")})`];
14
+ return "";
15
+ return `🔔 ${unread} unread (${formattedShortcutPair("notifications")})`;
16
+ }
17
+ // Retained for backwards compatibility with tests and the RPC fallback path
18
+ // that still expected a line-array widget. Returns empty when no unread.
19
+ export function buildNotificationWidgetLines() {
20
+ const chip = buildNotificationChip();
21
+ return chip ? [` ${chip}`] : [];
13
22
  }
14
- // ─── Widget init ────────────────────────────────────────────────────────
15
23
  const REFRESH_INTERVAL_MS = 30_000;
16
- /**
17
- * Initialize the always-on notification widget (belowEditor).
18
- * Call once from session_start after the notification store is initialized.
19
- */
20
24
  export function initNotificationWidget(ctx) {
21
25
  if (!ctx.hasUI)
22
26
  return;
23
- // String-array fallback for RPC mode
24
- ctx.ui.setWidget("gsd-notifications", buildNotificationWidgetLines(), { placement: "belowEditor" });
25
- // Factory-based widget for TUI mode
26
- ctx.ui.setWidget("gsd-notifications", (_tui, _theme) => {
27
- let cachedLines;
28
- const refresh = () => {
29
- cachedLines = undefined;
30
- _tui.requestRender();
31
- };
32
- const unsubscribe = onNotificationStoreChange(refresh);
33
- const refreshTimer = setInterval(refresh, REFRESH_INTERVAL_MS);
34
- return {
35
- render(_width) {
36
- if (!cachedLines)
37
- cachedLines = buildNotificationWidgetLines();
38
- return cachedLines;
39
- },
40
- invalidate() {
41
- cachedLines = undefined;
42
- },
43
- dispose() {
44
- unsubscribe();
45
- clearInterval(refreshTimer);
46
- },
47
- };
48
- }, { placement: "belowEditor" });
27
+ const push = () => {
28
+ const chip = buildNotificationChip();
29
+ ctx.ui.setStatus(STATUS_KEY, chip.length > 0 ? chip : undefined);
30
+ };
31
+ push();
32
+ onNotificationStoreChange(push);
33
+ setInterval(push, REFRESH_INTERVAL_MS).unref?.();
49
34
  }
@@ -3,6 +3,7 @@
3
3
  import { execFileSync } from "node:child_process";
4
4
  import { loadEffectiveGSDPreferences } from "./preferences.js";
5
5
  import { CmuxClient, emitOsc777Notification, resolveCmuxConfig } from "../cmux/index.js";
6
+ import { sendRemoteNotification } from "../remote-questions/notify.js";
6
7
  /**
7
8
  * Send a native desktop notification. Non-blocking, non-fatal.
8
9
  * macOS: osascript, Linux: notify-send, Windows: skipped.
@@ -14,6 +15,9 @@ export function sendDesktopNotification(title, message, level = "info", kind = "
14
15
  title = formatNotificationTitle(projectName);
15
16
  }
16
17
  const loaded = loadEffectiveGSDPreferences()?.preferences;
18
+ // Remote notifications fire independently of desktop preferences.
19
+ // sendRemoteNotification handles "not configured" gracefully (early return).
20
+ void sendRemoteNotification(title, message).catch(() => { });
17
21
  if (!shouldSendDesktopNotification(kind, loaded?.notifications))
18
22
  return;
19
23
  const cmux = resolveCmuxConfig(loaded);
@@ -75,12 +75,36 @@ export function extractRelativeImports(source) {
75
75
  }
76
76
  /**
77
77
  * Check if a relative import resolves to an existing file.
78
- * Handles .ts, .tsx, .js, .jsx extensions and index files.
79
- * Also handles TypeScript ESM convention where imports use .js but resolve to .ts.
78
+ * Resolution order:
79
+ * 1. Imports carrying an explicit extension are checked as-is (handles assets
80
+ * like .css/.scss/images/fonts and .json, not just code extensions).
81
+ * 2. TypeScript ESM convention where .js imports resolve to .ts files.
82
+ * 3. Extensionless imports resolved against .ts/.tsx/.js/.jsx/.mjs/.cjs.
83
+ * 4. Directory imports resolved against index.{ts,tsx,js,jsx,mjs,cjs}.
80
84
  */
81
85
  export function resolveImportPath(importPath, sourceFile, basePath) {
82
86
  const sourceDir = dirname(resolve(basePath, sourceFile));
83
87
  const extensions = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"];
88
+ // If the import already has an explicit extension, check it as-is first.
89
+ // This correctly resolves asset imports like .css, .scss, images, fonts
90
+ // without requiring each extension to be enumerated (issue #4411). We only
91
+ // do this when the import carries an extension so that extensionless module
92
+ // imports still flow through the TS ESM convention and index-file resolvers.
93
+ const explicitExt = extname(importPath);
94
+ if (explicitExt !== "") {
95
+ const directPath = resolve(sourceDir, importPath);
96
+ if (existsSync(directPath)) {
97
+ return { exists: true, resolvedPath: directPath };
98
+ }
99
+ // Only .js/.jsx/.mjs/.cjs imports legitimately fall through for the TS
100
+ // ESM convention (.js → .ts). Any other explicit extension (.css, .json,
101
+ // .svg, images, fonts, .ts, .tsx, …) must stay unresolved when the direct
102
+ // path is missing — otherwise a stray `./missing.css.ts` could shadow a
103
+ // genuinely missing `./missing.css` import.
104
+ if (![".js", ".jsx", ".mjs", ".cjs"].includes(explicitExt)) {
105
+ return { exists: false, resolvedPath: null };
106
+ }
107
+ }
84
108
  // Handle TypeScript ESM convention: .js imports resolve to .ts files
85
109
  // e.g., import './types.js' -> ./types.ts
86
110
  let normalizedPath = importPath;
@@ -96,7 +120,7 @@ export function resolveImportPath(importPath, sourceFile, basePath) {
96
120
  else if (importPath.endsWith(".cjs")) {
97
121
  normalizedPath = importPath.slice(0, -4);
98
122
  }
99
- // Try the normalized path with common extensions first
123
+ // Try the normalized path with common extensions
100
124
  for (const ext of extensions) {
101
125
  const fullPath = resolve(sourceDir, normalizedPath + ext);
102
126
  if (existsSync(fullPath)) {
@@ -110,14 +134,6 @@ export function resolveImportPath(importPath, sourceFile, basePath) {
110
134
  return { exists: true, resolvedPath: indexPath };
111
135
  }
112
136
  }
113
- // Check if path already has extension (for .json, etc.)
114
- const hasExt = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".json"].some((ext) => importPath.endsWith(ext));
115
- if (hasExt) {
116
- const fullPath = resolve(sourceDir, importPath);
117
- if (existsSync(fullPath)) {
118
- return { exists: true, resolvedPath: fullPath };
119
- }
120
- }
121
137
  return { exists: false, resolvedPath: null };
122
138
  }
123
139
  /**
@@ -15,6 +15,7 @@
15
15
  */
16
16
  import { existsSync } from "node:fs";
17
17
  import { spawn } from "node:child_process";
18
+ import { homedir } from "node:os";
18
19
  import { resolve } from "node:path";
19
20
  const NPM_COMMAND = process.platform === "win32" ? "npm.cmd" : "npm";
20
21
  // ─── Package Existence Check ─────────────────────────────────────────────────
@@ -202,6 +203,16 @@ export function normalizeFilePath(filePath) {
202
203
  let normalized = extractPathFromAnnotation(filePath);
203
204
  // Normalize path separators to forward slashes
204
205
  normalized = normalized.replace(/\\/g, "/");
206
+ // Expand a leading ~ or ~/ so downstream resolve()/set lookups hit the real
207
+ // home directory instead of treating the tilde as a literal path segment.
208
+ if (normalized === "~") {
209
+ normalized = homedir();
210
+ }
211
+ else if (normalized.startsWith("~/")) {
212
+ normalized = resolve(homedir(), normalized.slice(2));
213
+ }
214
+ // homedir()/resolve() can emit platform separators (e.g. "\" on Windows).
215
+ normalized = normalized.replace(/\\/g, "/");
205
216
  // Remove leading ./
206
217
  while (normalized.startsWith("./")) {
207
218
  normalized = normalized.slice(2);
@@ -214,6 +225,49 @@ export function normalizeFilePath(filePath) {
214
225
  }
215
226
  return normalized;
216
227
  }
228
+ /**
229
+ * Planning units sometimes pass a directory reference as task.inputs
230
+ * (e.g. `artifacts/M009-S03/`). The trailing slash is meaningful — the task
231
+ * reads whatever lands inside — but normalizeFilePath strips it, so call this
232
+ * helper against the raw input before normalization.
233
+ */
234
+ function isDirectoryReference(raw) {
235
+ const candidate = extractPathFromAnnotation(raw.trim());
236
+ if (!candidate)
237
+ return false;
238
+ if (containsGlobPattern(candidate))
239
+ return false;
240
+ return candidate.endsWith("/");
241
+ }
242
+ /**
243
+ * True when any of `knownOutputs` lives under `normalizedDir` (i.e. the task
244
+ * directory input is the parent of something a prior/same task produces).
245
+ */
246
+ function anyOutputUnderDirectory(normalizedDir, knownOutputs) {
247
+ const prefix = normalizedDir + "/";
248
+ for (const output of knownOutputs) {
249
+ if (output === normalizedDir)
250
+ return true;
251
+ if (output.startsWith(prefix))
252
+ return true;
253
+ }
254
+ return false;
255
+ }
256
+ const URL_SCHEME_PATTERN = /^(https?|ftp|file|ssh|git):\/\//i;
257
+ const SCP_PATTERN = /^[\w.-]+@[\w.-]+:[^/]/;
258
+ function looksLikePathOrUrl(token) {
259
+ if (URL_SCHEME_PATTERN.test(token))
260
+ return true;
261
+ if (SCP_PATTERN.test(token))
262
+ return true;
263
+ if (/^[./~]/.test(token))
264
+ return true;
265
+ if (/[\\/]/.test(token))
266
+ return true;
267
+ if (/\.[A-Za-z0-9]{1,8}$/.test(token))
268
+ return true;
269
+ return false;
270
+ }
217
271
  function extractPathFromAnnotation(raw) {
218
272
  const trimmed = raw.trim();
219
273
  if (!trimmed)
@@ -226,6 +280,19 @@ function extractPathFromAnnotation(raw) {
226
280
  if (annotatedMatch) {
227
281
  return annotatedMatch[1].trim();
228
282
  }
283
+ // Fallback: scan all backticked tokens and return the first one that looks
284
+ // like a path or URL. Handles prose-annotated bullets such as:
285
+ // `path/` directory listing (...)
286
+ // Prefix prose `https://...` suffix prose
287
+ // Citing `.gsd/REQUIREMENTS.md` mid-sentence
288
+ // Skips non-path backticked tokens like `note` or `npm test`.
289
+ const backtickTokens = trimmed.matchAll(/`([^`]+)`/g);
290
+ for (const match of backtickTokens) {
291
+ const token = match[1].trim();
292
+ if (looksLikePathOrUrl(token)) {
293
+ return token;
294
+ }
295
+ }
229
296
  // Fall back to the original behavior for already-plain paths.
230
297
  return trimmed.replace(/`/g, "");
231
298
  }
@@ -240,12 +307,17 @@ function shouldValidateInputAsPath(raw) {
240
307
  const trimmed = raw.trim();
241
308
  if (!trimmed)
242
309
  return false;
243
- if (/^`+[^`]+`+/.test(trimmed)) {
244
- return true;
245
- }
246
310
  const candidate = extractPathFromAnnotation(trimmed);
247
311
  if (!candidate)
248
312
  return false;
313
+ // URLs and remote repo refs are not filesystem paths.
314
+ if (URL_SCHEME_PATTERN.test(candidate))
315
+ return false;
316
+ if (SCP_PATTERN.test(candidate))
317
+ return false;
318
+ if (/^`+[^`]+`+/.test(trimmed)) {
319
+ return true;
320
+ }
249
321
  if (!/\s/.test(candidate)) {
250
322
  return true;
251
323
  }
@@ -256,6 +328,9 @@ function shouldValidateInputAsPath(raw) {
256
328
  /[\\/]/.test(candidate) ||
257
329
  /[*?[\]{}]/.test(candidate));
258
330
  }
331
+ function containsGlobPattern(candidate) {
332
+ return ["*", "?", "[", "]", "{", "}"].some((char) => candidate.includes(char));
333
+ }
259
334
  /**
260
335
  * Build a set of files that will be created by tasks up to (but not including) taskIndex.
261
336
  * All paths are normalized for consistent comparison.
@@ -293,12 +368,23 @@ export function checkFilePathConsistency(tasks, basePath) {
293
368
  continue;
294
369
  // Normalize path for consistent comparison
295
370
  const normalizedFile = normalizeFilePath(file);
371
+ if (containsGlobPattern(normalizedFile))
372
+ continue;
296
373
  // Check if file exists on disk
297
374
  const absolutePath = resolve(basePath, normalizedFile);
298
375
  const existsOnDisk = existsSync(absolutePath);
299
376
  // Check if file is in prior expected outputs (priorOutputs already normalized)
300
377
  const inPriorOutputs = priorOutputs.has(normalizedFile);
301
- if (!existsOnDisk && !inPriorOutputs) {
378
+ // Directory inputs are satisfied when something produces a file beneath
379
+ // them — either a prior task or the current task itself.
380
+ let directorySatisfied = false;
381
+ if (!existsOnDisk && !inPriorOutputs && isDirectoryReference(file)) {
382
+ const sameTaskOutputs = task.expected_output.map(normalizeFilePath);
383
+ directorySatisfied =
384
+ anyOutputUnderDirectory(normalizedFile, priorOutputs) ||
385
+ anyOutputUnderDirectory(normalizedFile, sameTaskOutputs);
386
+ }
387
+ if (!existsOnDisk && !inPriorOutputs && !directorySatisfied) {
302
388
  results.push({
303
389
  category: "file",
304
390
  target: file,
@@ -341,6 +427,13 @@ export function checkTaskOrdering(tasks, basePath) {
341
427
  if (!shouldValidateInputAsPath(file))
342
428
  continue;
343
429
  const normalizedFile = normalizeFilePath(file);
430
+ if (containsGlobPattern(normalizedFile))
431
+ continue;
432
+ // A directory reference like `artifacts/M009-S03/` is never a concrete
433
+ // read-before-create dependency: the fileCreators map is keyed by leaf
434
+ // files, and a same-task output under the directory satisfies it.
435
+ if (isDirectoryReference(file))
436
+ continue;
344
437
  const creator = fileCreators.get(normalizedFile);
345
438
  const absolutePath = resolve(basePath, normalizedFile);
346
439
  const existsOnDisk = existsSync(absolutePath);
@@ -39,6 +39,7 @@ export function resolveModelWithFallbacksForUnit(unitType) {
39
39
  break;
40
40
  case "plan-milestone":
41
41
  case "plan-slice":
42
+ case "refine-slice":
42
43
  case "replan-slice":
43
44
  phaseConfig = m.planning;
44
45
  break;
@@ -86,10 +86,11 @@ export const KNOWN_PREFERENCE_KEYS = new Set([
86
86
  "discuss_depth",
87
87
  "flat_rate_providers",
88
88
  "language",
89
+ "context_window_override",
89
90
  ]);
90
91
  /** Canonical list of all dispatch unit types. */
91
92
  export const KNOWN_UNIT_TYPES = [
92
- "research-milestone", "plan-milestone", "research-slice", "plan-slice",
93
+ "research-milestone", "plan-milestone", "research-slice", "plan-slice", "refine-slice",
93
94
  "execute-task", "reactive-execute", "gate-evaluate", "complete-slice", "replan-slice", "reassess-roadmap",
94
95
  "run-uat", "complete-milestone", "validate-milestone", "rewrite-docs",
95
96
  "discuss-milestone", "discuss-slice", "worktree-merge",
@@ -288,20 +288,48 @@ export function validatePreferences(preferences) {
288
288
  if (typeof preferences.phases === "object" && preferences.phases !== null) {
289
289
  const validatedPhases = {};
290
290
  const p = preferences.phases;
291
+ // Strict boolean parsing — YAML usually delivers real booleans, but
292
+ // hand-edits like `progressive_planning: "false"` otherwise coerce to
293
+ // truthy via `!!`. Accept only real booleans or the literal strings
294
+ // "true"/"false"; anything else becomes a warning + ignored.
295
+ const parseStrictBoolean = (key, raw) => {
296
+ if (typeof raw === "boolean")
297
+ return raw;
298
+ if (typeof raw === "string") {
299
+ if (raw === "true")
300
+ return true;
301
+ if (raw === "false")
302
+ return false;
303
+ }
304
+ warnings.push(`phases.${key} must be a boolean (got ${typeof raw}: ${JSON.stringify(raw)}) — ignored`);
305
+ return undefined;
306
+ };
307
+ const assignBool = (key, raw) => {
308
+ const v = parseStrictBoolean(String(key), raw);
309
+ if (v !== undefined)
310
+ validatedPhases[key] = v;
311
+ };
291
312
  if (p.skip_research !== undefined)
292
- validatedPhases.skip_research = !!p.skip_research;
313
+ assignBool("skip_research", p.skip_research);
293
314
  if (p.skip_reassess !== undefined)
294
- validatedPhases.skip_reassess = !!p.skip_reassess;
315
+ assignBool("skip_reassess", p.skip_reassess);
295
316
  if (p.skip_slice_research !== undefined)
296
- validatedPhases.skip_slice_research = !!p.skip_slice_research;
317
+ assignBool("skip_slice_research", p.skip_slice_research);
297
318
  if (p.skip_milestone_validation !== undefined)
298
- validatedPhases.skip_milestone_validation = !!p.skip_milestone_validation;
319
+ assignBool("skip_milestone_validation", p.skip_milestone_validation);
299
320
  if (p.reassess_after_slice !== undefined)
300
- validatedPhases.reassess_after_slice = !!p.reassess_after_slice;
301
- if (p.require_slice_discussion !== undefined)
302
- validatedPhases.require_slice_discussion = !!p.require_slice_discussion;
321
+ assignBool("reassess_after_slice", p.reassess_after_slice);
322
+ if (p.require_slice_discussion !== undefined) {
323
+ const v = parseStrictBoolean("require_slice_discussion", p.require_slice_discussion);
324
+ if (v !== undefined)
325
+ validatedPhases.require_slice_discussion = v;
326
+ }
327
+ if (p.mid_execution_escalation !== undefined)
328
+ assignBool("mid_execution_escalation", p.mid_execution_escalation);
329
+ if (p.progressive_planning !== undefined)
330
+ assignBool("progressive_planning", p.progressive_planning);
303
331
  // Warn on unknown phase keys
304
- const knownPhaseKeys = new Set(["skip_research", "skip_reassess", "skip_slice_research", "skip_milestone_validation", "reassess_after_slice", "require_slice_discussion"]);
332
+ const knownPhaseKeys = new Set(["skip_research", "skip_reassess", "skip_slice_research", "skip_milestone_validation", "reassess_after_slice", "require_slice_discussion", "mid_execution_escalation", "progressive_planning"]);
305
333
  for (const key of Object.keys(p)) {
306
334
  if (!knownPhaseKeys.has(key)) {
307
335
  warnings.push(`unknown phases key "${key}" — ignored`);
@@ -559,6 +587,12 @@ export function validatePreferences(preferences) {
559
587
  else
560
588
  errors.push("dynamic_routing.capability_routing must be a boolean");
561
589
  }
590
+ if (dr.allow_flat_rate_providers !== undefined) {
591
+ if (typeof dr.allow_flat_rate_providers === "boolean")
592
+ validDr.allow_flat_rate_providers = dr.allow_flat_rate_providers;
593
+ else
594
+ errors.push("dynamic_routing.allow_flat_rate_providers must be a boolean");
595
+ }
562
596
  if (dr.tier_models !== undefined) {
563
597
  if (typeof dr.tier_models === "object" && dr.tier_models !== null) {
564
598
  const tm = dr.tier_models;