@baique/pi-web-sky 0.1.55 → 0.1.57

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 (396) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +8 -4
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +2 -2
  5. package/.next/react-loadable-manifest.json +2 -2
  6. package/.next/required-server-files.js +3 -2
  7. package/.next/required-server-files.json +3 -2
  8. package/.next/routes-manifest.json +28 -0
  9. package/.next/server/app/_global-error/page.js +2 -2
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page.js +1 -1
  17. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/_not-found.html +1 -1
  19. package/.next/server/app/_not-found.rsc +4 -3
  20. package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -3
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -3
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  23. package/.next/server/app/api/agent/[id]/bash-output/route.js +2 -2
  24. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  25. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
  26. package/.next/server/app/api/agent/[id]/route.js +1 -1
  27. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/agent/new/route.js +1 -1
  29. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  30. package/.next/server/app/api/agent/running/route.js +1 -1
  31. package/.next/server/app/api/agent/running/route.js.nft.json +1 -1
  32. package/.next/server/app/api/app-update/route.js +1 -1
  33. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  34. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  35. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  36. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  37. package/.next/server/app/api/auth/providers/route.js +1 -1
  38. package/.next/server/app/api/board-assets/[...path]/route.js +2 -2
  39. package/.next/server/app/api/board-assets/route.js +2 -2
  40. package/.next/server/app/api/boards/[id]/add-session/route.js +1 -0
  41. package/.next/server/app/api/boards/[id]/add-session/route.js.nft.json +1 -0
  42. package/.next/server/app/api/boards/[id]/add-session/route_client-reference-manifest.js +1 -0
  43. package/.next/server/app/api/boards/[id]/reconcile/route.js +1 -1
  44. package/.next/server/app/api/boards/[id]/route.js +1 -1
  45. package/.next/server/app/api/boards/reorder/route.js +2 -2
  46. package/.next/server/app/api/boards/route.js +1 -1
  47. package/.next/server/app/api/cwd/browse/route.js +1 -1
  48. package/.next/server/app/api/cwd/validate/route.js +2 -2
  49. package/.next/server/app/api/default-cwd/route.js +2 -2
  50. package/.next/server/app/api/file-index/route.js +2 -2
  51. package/.next/server/app/api/files/[...path]/route.js +3 -3
  52. package/.next/server/app/api/git/diff/route.js +1 -1
  53. package/.next/server/app/api/git/status/route.js +1 -1
  54. package/.next/server/app/api/home/route.js +1 -1
  55. package/.next/server/app/api/mcp/route.js +2 -2
  56. package/.next/server/app/api/models/route.js +2 -2
  57. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  58. package/.next/server/app/api/models-config/discover/route.js +1 -1
  59. package/.next/server/app/api/models-config/route.js +1 -1
  60. package/.next/server/app/api/models-config/test/route.js +1 -1
  61. package/.next/server/app/api/plugins/route.js +2 -2
  62. package/.next/server/app/api/project-trust/route.js +1 -1
  63. package/.next/server/app/api/project-trust/route.js.nft.json +1 -1
  64. package/.next/server/app/api/quota/route.js +1 -1
  65. package/.next/server/app/api/search/route.js +3 -3
  66. package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
  67. package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
  68. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  69. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
  70. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +2 -2
  71. package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
  72. package/.next/server/app/api/sessions/[id]/minimap/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/minimap/route.js.nft.json +1 -1
  74. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  76. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  77. package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
  78. package/.next/server/app/api/sessions/[id]/todos/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/todos/route.js.nft.json +1 -1
  80. package/.next/server/app/api/sessions/route.js +1 -1
  81. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  82. package/.next/server/app/api/sessions/summary/route.js +2 -2
  83. package/.next/server/app/api/skills/check/route.js +1 -1
  84. package/.next/server/app/api/skills/install/route.js +2 -2
  85. package/.next/server/app/api/skills/route.js +1 -1
  86. package/.next/server/app/api/skills/search/route.js +1 -1
  87. package/.next/server/app/api/skills/update/route.js +1 -1
  88. package/.next/server/app/api/subagents/[id]/route.js +1 -0
  89. package/.next/server/app/api/subagents/[id]/route.js.nft.json +1 -0
  90. package/.next/server/app/api/subagents/[id]/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/subagents/profiles/route.js +30 -0
  92. package/.next/server/app/api/subagents/profiles/route.js.nft.json +1 -0
  93. package/.next/server/app/api/subagents/profiles/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/subagents/settings/route.js +1 -0
  95. package/.next/server/app/api/subagents/settings/route.js.nft.json +1 -0
  96. package/.next/server/app/api/subagents/settings/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/task-card-questions/[id]/answer/route.js +2 -2
  98. package/.next/server/app/api/task-card-questions/route.js +2 -2
  99. package/.next/server/app/api/task-cards/[id]/route.js +1 -1
  100. package/.next/server/app/api/task-cards/route.js +1 -1
  101. package/.next/server/app/api/task-cards/unbind/route.js +3 -3
  102. package/.next/server/app/api/task-scheduler/status/route.js +1 -1
  103. package/.next/server/app/api/task-scheduler/status/route.js.nft.json +1 -1
  104. package/.next/server/app/api/tasks/[id]/assign-session/route.js +2 -12
  105. package/.next/server/app/api/tasks/[id]/board/route.js +1 -1
  106. package/.next/server/app/api/tasks/[id]/route.js +1 -1
  107. package/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
  108. package/.next/server/app/api/tasks/reorder/route.js +2 -12
  109. package/.next/server/app/api/tasks/route.js +2 -12
  110. package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
  111. package/.next/server/app/api/terminal/[id]/route.js +2 -2
  112. package/.next/server/app/api/terminal/route.js +2 -2
  113. package/.next/server/app/api/worktrees/route.js +2 -2
  114. package/.next/server/app/api/yjs-version/route.js +1 -1
  115. package/.next/server/app/favicon.ico/route.js +1 -1
  116. package/.next/server/app/index.html +1 -1
  117. package/.next/server/app/index.rsc +6 -5
  118. package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -5
  119. package/.next/server/app/index.segments/_full.segment.rsc +6 -5
  120. package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
  121. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  122. package/.next/server/app/page.js +175 -8
  123. package/.next/server/app/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app-paths-manifest.json +8 -4
  125. package/.next/server/chunks/1937.js +14 -13
  126. package/.next/server/chunks/2524.js +2 -2
  127. package/.next/server/chunks/3379.js +1 -1
  128. package/.next/server/chunks/3500.js +1 -1
  129. package/.next/server/chunks/402.js +28 -7
  130. package/.next/server/chunks/426.js +14 -0
  131. package/.next/server/chunks/4367.js +1 -1
  132. package/.next/server/chunks/4457.js +3 -13
  133. package/.next/server/chunks/4980.js +1 -1
  134. package/.next/server/chunks/542.js +23 -4
  135. package/.next/server/chunks/5794.js +2 -2
  136. package/.next/server/chunks/5940.js +1 -1
  137. package/.next/server/chunks/6337.js +1 -1
  138. package/.next/server/chunks/6429.js +15 -2
  139. package/.next/server/chunks/6525.js +25 -4
  140. package/.next/server/chunks/6583.js +12 -11
  141. package/.next/server/chunks/7048.js +6 -0
  142. package/.next/server/instrumentation.js +1 -1
  143. package/.next/server/middleware-build-manifest.js +1 -1
  144. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  145. package/.next/server/middleware.js +3 -3
  146. package/.next/server/pages/404.html +1 -1
  147. package/.next/server/pages/500.html +1 -1
  148. package/.next/static/MPBMmQqmDG8zo8tM_bkDy/_buildManifest.js +1 -0
  149. package/.next/static/chunks/752.bafff304e6b00987.js +1 -0
  150. package/.next/static/chunks/8088.39866dc5f1d15868.js +1 -0
  151. package/.next/static/chunks/app/_global-error/page-ad6e695deb9de65c.js +1 -0
  152. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-ad6e695deb9de65c.js +1 -0
  153. package/.next/static/chunks/app/api/agent/[id]/events/route-ad6e695deb9de65c.js +1 -0
  154. package/.next/static/chunks/app/api/agent/[id]/route-ad6e695deb9de65c.js +1 -0
  155. package/.next/static/chunks/app/api/agent/new/route-ad6e695deb9de65c.js +1 -0
  156. package/.next/static/chunks/app/api/agent/running/route-ad6e695deb9de65c.js +1 -0
  157. package/.next/static/chunks/app/api/app-update/route-ad6e695deb9de65c.js +1 -0
  158. package/.next/static/chunks/app/api/auth/all-providers/route-ad6e695deb9de65c.js +1 -0
  159. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-ad6e695deb9de65c.js +1 -0
  160. package/.next/static/chunks/app/api/auth/login/[provider]/route-ad6e695deb9de65c.js +1 -0
  161. package/.next/static/chunks/app/api/auth/logout/[provider]/route-ad6e695deb9de65c.js +1 -0
  162. package/.next/static/chunks/app/api/auth/providers/route-ad6e695deb9de65c.js +1 -0
  163. package/.next/static/chunks/app/api/board-assets/[...path]/route-ad6e695deb9de65c.js +1 -0
  164. package/.next/static/chunks/app/api/board-assets/route-ad6e695deb9de65c.js +1 -0
  165. package/.next/static/chunks/app/api/boards/[id]/add-session/route-ad6e695deb9de65c.js +1 -0
  166. package/.next/static/chunks/app/api/boards/[id]/reconcile/route-ad6e695deb9de65c.js +1 -0
  167. package/.next/static/chunks/app/api/boards/[id]/route-ad6e695deb9de65c.js +1 -0
  168. package/.next/static/chunks/app/api/boards/reorder/route-ad6e695deb9de65c.js +1 -0
  169. package/.next/static/chunks/app/api/boards/route-ad6e695deb9de65c.js +1 -0
  170. package/.next/static/chunks/app/api/cwd/browse/route-ad6e695deb9de65c.js +1 -0
  171. package/.next/static/chunks/app/api/cwd/validate/route-ad6e695deb9de65c.js +1 -0
  172. package/.next/static/chunks/app/api/default-cwd/route-ad6e695deb9de65c.js +1 -0
  173. package/.next/static/chunks/app/api/file-index/route-ad6e695deb9de65c.js +1 -0
  174. package/.next/static/chunks/app/api/files/[...path]/route-ad6e695deb9de65c.js +1 -0
  175. package/.next/static/chunks/app/api/git/diff/route-ad6e695deb9de65c.js +1 -0
  176. package/.next/static/chunks/app/api/git/status/route-ad6e695deb9de65c.js +1 -0
  177. package/.next/static/chunks/app/api/home/route-ad6e695deb9de65c.js +1 -0
  178. package/.next/static/chunks/app/api/mcp/route-ad6e695deb9de65c.js +1 -0
  179. package/.next/static/chunks/app/api/models/route-ad6e695deb9de65c.js +1 -0
  180. package/.next/static/chunks/app/api/models-config/catalog/route-ad6e695deb9de65c.js +1 -0
  181. package/.next/static/chunks/app/api/models-config/discover/route-ad6e695deb9de65c.js +1 -0
  182. package/.next/static/chunks/app/api/models-config/route-ad6e695deb9de65c.js +1 -0
  183. package/.next/static/chunks/app/api/models-config/test/route-ad6e695deb9de65c.js +1 -0
  184. package/.next/static/chunks/app/api/plugins/route-ad6e695deb9de65c.js +1 -0
  185. package/.next/static/chunks/app/api/project-trust/route-ad6e695deb9de65c.js +1 -0
  186. package/.next/static/chunks/app/api/quota/route-ad6e695deb9de65c.js +1 -0
  187. package/.next/static/chunks/app/api/search/route-ad6e695deb9de65c.js +1 -0
  188. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-ad6e695deb9de65c.js +1 -0
  189. package/.next/static/chunks/app/api/sessions/[id]/context/route-ad6e695deb9de65c.js +1 -0
  190. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-ad6e695deb9de65c.js +1 -0
  191. package/.next/static/chunks/app/api/sessions/[id]/export/route-ad6e695deb9de65c.js +1 -0
  192. package/.next/static/chunks/app/api/sessions/[id]/minimap/route-ad6e695deb9de65c.js +1 -0
  193. package/.next/static/chunks/app/api/sessions/[id]/route-ad6e695deb9de65c.js +1 -0
  194. package/.next/static/chunks/app/api/sessions/[id]/state/route-ad6e695deb9de65c.js +1 -0
  195. package/.next/static/chunks/app/api/sessions/[id]/todos/route-ad6e695deb9de65c.js +1 -0
  196. package/.next/static/chunks/app/api/sessions/route-ad6e695deb9de65c.js +1 -0
  197. package/.next/static/chunks/app/api/sessions/summary/route-ad6e695deb9de65c.js +1 -0
  198. package/.next/static/chunks/app/api/skills/check/route-ad6e695deb9de65c.js +1 -0
  199. package/.next/static/chunks/app/api/skills/install/route-ad6e695deb9de65c.js +1 -0
  200. package/.next/static/chunks/app/api/skills/route-ad6e695deb9de65c.js +1 -0
  201. package/.next/static/chunks/app/api/skills/search/route-ad6e695deb9de65c.js +1 -0
  202. package/.next/static/chunks/app/api/skills/update/route-ad6e695deb9de65c.js +1 -0
  203. package/.next/static/chunks/app/api/subagents/[id]/route-ad6e695deb9de65c.js +1 -0
  204. package/.next/static/chunks/app/api/subagents/profiles/route-ad6e695deb9de65c.js +1 -0
  205. package/.next/static/chunks/app/api/subagents/settings/route-ad6e695deb9de65c.js +1 -0
  206. package/.next/static/chunks/app/api/task-card-questions/[id]/answer/route-ad6e695deb9de65c.js +1 -0
  207. package/.next/static/chunks/app/api/task-card-questions/route-ad6e695deb9de65c.js +1 -0
  208. package/.next/static/chunks/app/api/task-cards/[id]/route-ad6e695deb9de65c.js +1 -0
  209. package/.next/static/chunks/app/api/task-cards/route-ad6e695deb9de65c.js +1 -0
  210. package/.next/static/chunks/app/api/task-cards/unbind/route-ad6e695deb9de65c.js +1 -0
  211. package/.next/static/chunks/app/api/task-scheduler/status/route-ad6e695deb9de65c.js +1 -0
  212. package/.next/static/chunks/app/api/tasks/[id]/assign-session/route-ad6e695deb9de65c.js +1 -0
  213. package/.next/static/chunks/app/api/tasks/[id]/board/route-ad6e695deb9de65c.js +1 -0
  214. package/.next/static/chunks/app/api/tasks/[id]/route-ad6e695deb9de65c.js +1 -0
  215. package/.next/static/chunks/app/api/tasks/reorder/route-ad6e695deb9de65c.js +1 -0
  216. package/.next/static/chunks/app/api/tasks/route-ad6e695deb9de65c.js +1 -0
  217. package/.next/static/chunks/app/api/terminal/[id]/events/route-ad6e695deb9de65c.js +1 -0
  218. package/.next/static/chunks/app/api/terminal/[id]/route-ad6e695deb9de65c.js +1 -0
  219. package/.next/static/chunks/app/api/terminal/route-ad6e695deb9de65c.js +1 -0
  220. package/.next/static/chunks/app/api/worktrees/route-ad6e695deb9de65c.js +1 -0
  221. package/.next/static/chunks/app/api/yjs-version/route-ad6e695deb9de65c.js +1 -0
  222. package/.next/static/chunks/app/layout-fae2b226b3c78448.js +1 -0
  223. package/.next/static/chunks/app/manifest.webmanifest/route-ad6e695deb9de65c.js +1 -0
  224. package/.next/static/chunks/app/page-d5af3bd535589daf.js +256 -0
  225. package/.next/static/chunks/next/dist/client/components/builtin/app-error-ad6e695deb9de65c.js +1 -0
  226. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-ad6e695deb9de65c.js +1 -0
  227. package/.next/static/chunks/next/dist/client/components/builtin/not-found-ad6e695deb9de65c.js +1 -0
  228. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ad6e695deb9de65c.js +1 -0
  229. package/.next/static/chunks/{webpack-b0effde51c1651b8.js → webpack-1ce35e1249cfd931.js} +1 -1
  230. package/.next/static/css/bb9361c7f832a89d.css +1 -0
  231. package/.next/static/css/c7d127e07b1a786c.css +1 -0
  232. package/.next/trace +8 -7
  233. package/.next/trace-build +1 -1
  234. package/.next/types/app/api/boards/[id]/add-session/route.ts +353 -0
  235. package/.next/types/app/api/subagents/[id]/route.ts +353 -0
  236. package/.next/types/app/api/subagents/profiles/route.ts +353 -0
  237. package/.next/types/app/api/subagents/settings/route.ts +353 -0
  238. package/.next/types/routes.d.ts +5 -1
  239. package/.next/types/validator.ts +36 -0
  240. package/lib/api-types.ts +10 -0
  241. package/lib/board-reconcile.test.mjs +46 -8
  242. package/lib/board-reconcile.ts +57 -1
  243. package/lib/board-store.test.mjs +2 -2
  244. package/lib/chat-lazy-load.test.mjs +0 -62
  245. package/lib/chat-lazy-load.ts +0 -13
  246. package/lib/chat-only.ts +23 -0
  247. package/lib/draft-stash.ts +4 -5
  248. package/lib/file-types.ts +16 -1
  249. package/lib/i18n/messages/en.ts +91 -0
  250. package/lib/i18n/messages/zh-CN.ts +91 -0
  251. package/lib/id.test.mjs +38 -0
  252. package/lib/id.ts +17 -0
  253. package/lib/ime-guard.test.mjs +52 -0
  254. package/lib/ime-guard.ts +54 -0
  255. package/lib/message-text.ts +24 -0
  256. package/lib/models-cache.ts +1 -1
  257. package/lib/pi-types.ts +19 -1
  258. package/lib/pin-store.ts +85 -0
  259. package/lib/powershell-settings.ts +106 -0
  260. package/lib/quoted-selection.ts +4 -0
  261. package/lib/rpc-manager.activity.test.mjs +223 -0
  262. package/lib/rpc-manager.test.mjs +22 -0
  263. package/lib/rpc-manager.title.test.mjs +152 -0
  264. package/lib/rpc-manager.ts +301 -28
  265. package/lib/session-activity.test.mjs +123 -0
  266. package/lib/session-activity.ts +77 -0
  267. package/lib/session-delete.test.mjs +45 -41
  268. package/lib/session-delete.ts +8 -34
  269. package/lib/session-family.test.mjs +49 -0
  270. package/lib/session-family.ts +80 -0
  271. package/lib/session-index-scanner.test.mjs +364 -2
  272. package/lib/session-index-scanner.ts +199 -55
  273. package/lib/session-reader.noscan.test.mjs +371 -0
  274. package/lib/session-reader.project.test.mjs +30 -52
  275. package/lib/session-reader.test.mjs +2 -65
  276. package/lib/session-reader.ts +177 -213
  277. package/lib/session-scanner.test.mjs +151 -38
  278. package/lib/session-scanner.ts +140 -61
  279. package/lib/session-search.ts +6 -5
  280. package/lib/session-time-group.test.mjs +38 -0
  281. package/lib/session-time-group.ts +55 -0
  282. package/lib/settings-navigation.ts +124 -0
  283. package/lib/sqlite-db.test.mjs +26 -0
  284. package/lib/sqlite-db.ts +10 -1
  285. package/lib/subagent-extension.test.mjs +424 -0
  286. package/lib/subagent-extension.ts +309 -0
  287. package/lib/subagent-input.test.mjs +63 -0
  288. package/lib/subagent-input.ts +71 -0
  289. package/lib/subagent-profile-precedence.ts +20 -0
  290. package/lib/subagent-prompt.test.mjs +64 -0
  291. package/lib/subagent-prompt.ts +31 -0
  292. package/lib/subagent-queue.test.mjs +35 -0
  293. package/lib/subagent-queue.ts +74 -0
  294. package/lib/subagent-runtime.test.mjs +150 -0
  295. package/lib/subagent-runtime.ts +629 -0
  296. package/lib/subagent-session-title.test.mjs +120 -0
  297. package/lib/subagent-settings.test.mjs +50 -0
  298. package/lib/subagent-settings.ts +93 -0
  299. package/lib/subagents.test.mjs +601 -0
  300. package/lib/subagents.ts +602 -0
  301. package/lib/task-scheduler.test.mjs +27 -0
  302. package/lib/task-scheduler.ts +8 -1
  303. package/lib/task-store.activity.test.mjs +141 -0
  304. package/lib/task-store.meta-row.test.mjs +25 -5
  305. package/lib/task-store.partial-row.test.mjs +198 -0
  306. package/lib/task-store.subtree.test.mjs +172 -0
  307. package/lib/task-store.test.mjs +46 -20
  308. package/lib/task-store.ts +344 -68
  309. package/lib/tool-presets.ts +4 -0
  310. package/lib/types.ts +19 -0
  311. package/lib/worktree-isolation.test.mjs +51 -0
  312. package/next.config.ts +3 -1
  313. package/package.json +1 -1
  314. package/.next/static/bsW3fla0-BlBHVMKtAM5I/_buildManifest.js +0 -1
  315. package/.next/static/chunks/752.0ad92735d5f38143.js +0 -1
  316. package/.next/static/chunks/8088.53d9cdaf15634d4b.js +0 -1
  317. package/.next/static/chunks/app/_global-error/page-2d5f6296c7e693c6.js +0 -1
  318. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-2d5f6296c7e693c6.js +0 -1
  319. package/.next/static/chunks/app/api/agent/[id]/events/route-2d5f6296c7e693c6.js +0 -1
  320. package/.next/static/chunks/app/api/agent/[id]/route-2d5f6296c7e693c6.js +0 -1
  321. package/.next/static/chunks/app/api/agent/new/route-2d5f6296c7e693c6.js +0 -1
  322. package/.next/static/chunks/app/api/agent/running/route-2d5f6296c7e693c6.js +0 -1
  323. package/.next/static/chunks/app/api/app-update/route-2d5f6296c7e693c6.js +0 -1
  324. package/.next/static/chunks/app/api/auth/all-providers/route-2d5f6296c7e693c6.js +0 -1
  325. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-2d5f6296c7e693c6.js +0 -1
  326. package/.next/static/chunks/app/api/auth/login/[provider]/route-2d5f6296c7e693c6.js +0 -1
  327. package/.next/static/chunks/app/api/auth/logout/[provider]/route-2d5f6296c7e693c6.js +0 -1
  328. package/.next/static/chunks/app/api/auth/providers/route-2d5f6296c7e693c6.js +0 -1
  329. package/.next/static/chunks/app/api/board-assets/[...path]/route-2d5f6296c7e693c6.js +0 -1
  330. package/.next/static/chunks/app/api/board-assets/route-2d5f6296c7e693c6.js +0 -1
  331. package/.next/static/chunks/app/api/boards/[id]/reconcile/route-2d5f6296c7e693c6.js +0 -1
  332. package/.next/static/chunks/app/api/boards/[id]/route-2d5f6296c7e693c6.js +0 -1
  333. package/.next/static/chunks/app/api/boards/reorder/route-2d5f6296c7e693c6.js +0 -1
  334. package/.next/static/chunks/app/api/boards/route-2d5f6296c7e693c6.js +0 -1
  335. package/.next/static/chunks/app/api/cwd/browse/route-2d5f6296c7e693c6.js +0 -1
  336. package/.next/static/chunks/app/api/cwd/validate/route-2d5f6296c7e693c6.js +0 -1
  337. package/.next/static/chunks/app/api/default-cwd/route-2d5f6296c7e693c6.js +0 -1
  338. package/.next/static/chunks/app/api/file-index/route-2d5f6296c7e693c6.js +0 -1
  339. package/.next/static/chunks/app/api/files/[...path]/route-2d5f6296c7e693c6.js +0 -1
  340. package/.next/static/chunks/app/api/git/diff/route-2d5f6296c7e693c6.js +0 -1
  341. package/.next/static/chunks/app/api/git/status/route-2d5f6296c7e693c6.js +0 -1
  342. package/.next/static/chunks/app/api/home/route-2d5f6296c7e693c6.js +0 -1
  343. package/.next/static/chunks/app/api/mcp/route-2d5f6296c7e693c6.js +0 -1
  344. package/.next/static/chunks/app/api/models/route-2d5f6296c7e693c6.js +0 -1
  345. package/.next/static/chunks/app/api/models-config/catalog/route-2d5f6296c7e693c6.js +0 -1
  346. package/.next/static/chunks/app/api/models-config/discover/route-2d5f6296c7e693c6.js +0 -1
  347. package/.next/static/chunks/app/api/models-config/route-2d5f6296c7e693c6.js +0 -1
  348. package/.next/static/chunks/app/api/models-config/test/route-2d5f6296c7e693c6.js +0 -1
  349. package/.next/static/chunks/app/api/plugins/route-2d5f6296c7e693c6.js +0 -1
  350. package/.next/static/chunks/app/api/project-trust/route-2d5f6296c7e693c6.js +0 -1
  351. package/.next/static/chunks/app/api/quota/route-2d5f6296c7e693c6.js +0 -1
  352. package/.next/static/chunks/app/api/search/route-2d5f6296c7e693c6.js +0 -1
  353. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-2d5f6296c7e693c6.js +0 -1
  354. package/.next/static/chunks/app/api/sessions/[id]/context/route-2d5f6296c7e693c6.js +0 -1
  355. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-2d5f6296c7e693c6.js +0 -1
  356. package/.next/static/chunks/app/api/sessions/[id]/export/route-2d5f6296c7e693c6.js +0 -1
  357. package/.next/static/chunks/app/api/sessions/[id]/minimap/route-2d5f6296c7e693c6.js +0 -1
  358. package/.next/static/chunks/app/api/sessions/[id]/route-2d5f6296c7e693c6.js +0 -1
  359. package/.next/static/chunks/app/api/sessions/[id]/state/route-2d5f6296c7e693c6.js +0 -1
  360. package/.next/static/chunks/app/api/sessions/[id]/todos/route-2d5f6296c7e693c6.js +0 -1
  361. package/.next/static/chunks/app/api/sessions/route-2d5f6296c7e693c6.js +0 -1
  362. package/.next/static/chunks/app/api/sessions/summary/route-2d5f6296c7e693c6.js +0 -1
  363. package/.next/static/chunks/app/api/skills/check/route-2d5f6296c7e693c6.js +0 -1
  364. package/.next/static/chunks/app/api/skills/install/route-2d5f6296c7e693c6.js +0 -1
  365. package/.next/static/chunks/app/api/skills/route-2d5f6296c7e693c6.js +0 -1
  366. package/.next/static/chunks/app/api/skills/search/route-2d5f6296c7e693c6.js +0 -1
  367. package/.next/static/chunks/app/api/skills/update/route-2d5f6296c7e693c6.js +0 -1
  368. package/.next/static/chunks/app/api/task-card-questions/[id]/answer/route-2d5f6296c7e693c6.js +0 -1
  369. package/.next/static/chunks/app/api/task-card-questions/route-2d5f6296c7e693c6.js +0 -1
  370. package/.next/static/chunks/app/api/task-cards/[id]/route-2d5f6296c7e693c6.js +0 -1
  371. package/.next/static/chunks/app/api/task-cards/route-2d5f6296c7e693c6.js +0 -1
  372. package/.next/static/chunks/app/api/task-cards/unbind/route-2d5f6296c7e693c6.js +0 -1
  373. package/.next/static/chunks/app/api/task-scheduler/status/route-2d5f6296c7e693c6.js +0 -1
  374. package/.next/static/chunks/app/api/tasks/[id]/assign-session/route-2d5f6296c7e693c6.js +0 -1
  375. package/.next/static/chunks/app/api/tasks/[id]/board/route-2d5f6296c7e693c6.js +0 -1
  376. package/.next/static/chunks/app/api/tasks/[id]/route-2d5f6296c7e693c6.js +0 -1
  377. package/.next/static/chunks/app/api/tasks/reorder/route-2d5f6296c7e693c6.js +0 -1
  378. package/.next/static/chunks/app/api/tasks/route-2d5f6296c7e693c6.js +0 -1
  379. package/.next/static/chunks/app/api/terminal/[id]/events/route-2d5f6296c7e693c6.js +0 -1
  380. package/.next/static/chunks/app/api/terminal/[id]/route-2d5f6296c7e693c6.js +0 -1
  381. package/.next/static/chunks/app/api/terminal/route-2d5f6296c7e693c6.js +0 -1
  382. package/.next/static/chunks/app/api/worktrees/route-2d5f6296c7e693c6.js +0 -1
  383. package/.next/static/chunks/app/api/yjs-version/route-2d5f6296c7e693c6.js +0 -1
  384. package/.next/static/chunks/app/layout-dace09825b2d3857.js +0 -1
  385. package/.next/static/chunks/app/manifest.webmanifest/route-2d5f6296c7e693c6.js +0 -1
  386. package/.next/static/chunks/app/page-64b9f4b3567a2f73.js +0 -89
  387. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2d5f6296c7e693c6.js +0 -1
  388. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2d5f6296c7e693c6.js +0 -1
  389. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2d5f6296c7e693c6.js +0 -1
  390. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2d5f6296c7e693c6.js +0 -1
  391. package/.next/static/css/fd25673802257262.css +0 -1
  392. package/lib/extension-command.test.mjs +0 -63
  393. package/lib/extension-command.ts +0 -81
  394. package/lib/subagent-widget.test.mjs +0 -87
  395. package/lib/subagent-widget.ts +0 -109
  396. /package/.next/static/{bsW3fla0-BlBHVMKtAM5I → MPBMmQqmDG8zo8tM_bkDy}/_ssgManifest.js +0 -0
@@ -0,0 +1,353 @@
1
+ // File: /Users/baique/work/pi-web-sky/app/api/subagents/settings/route.ts
2
+ import * as entry from '../../../../../../app/api/subagents/settings/route.js'
3
+ import type { NextRequest } from 'next/server.js'
4
+
5
+ import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
6
+
7
+ type TEntry = typeof import('../../../../../../app/api/subagents/settings/route.js')
8
+
9
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
10
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
11
+ : T
12
+
13
+ // Check that the entry is a valid entry
14
+ checkFields<Diff<{
15
+ GET?: Function
16
+ HEAD?: Function
17
+ OPTIONS?: Function
18
+ POST?: Function
19
+ PUT?: Function
20
+ DELETE?: Function
21
+ PATCH?: Function
22
+ config?: {}
23
+ generateStaticParams?: Function
24
+ instant?: InstantConfigForTypeCheckInternal
25
+ prefetch?: Prefetch
26
+ unstable_dynamicStaleTime?: number
27
+ revalidate?: RevalidateRange<TEntry> | false
28
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
29
+ dynamicParams?: boolean
30
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
31
+ /** @deprecated The `preferredRegion` config is deprecated. Remove this export. */
32
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
33
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
34
+ maxDuration?: number
35
+
36
+ }, TEntry, ''>>()
37
+
38
+ type RouteContext = { params: Promise<SegmentParams> }
39
+ // Check the prop type of the entry function
40
+ if ('GET' in entry) {
41
+ checkFields<
42
+ Diff<
43
+ ParamCheck<Request | NextRequest>,
44
+ {
45
+ __tag__: 'GET'
46
+ __param_position__: 'first'
47
+ __param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
48
+ },
49
+ 'GET'
50
+ >
51
+ >()
52
+ checkFields<
53
+ Diff<
54
+ ParamCheck<RouteContext>,
55
+ {
56
+ __tag__: 'GET'
57
+ __param_position__: 'second'
58
+ __param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
59
+ },
60
+ 'GET'
61
+ >
62
+ >()
63
+
64
+ checkFields<
65
+ Diff<
66
+ {
67
+ __tag__: 'GET',
68
+ __return_type__: Response | void | never | Promise<Response | void | never>
69
+ },
70
+ {
71
+ __tag__: 'GET',
72
+ __return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
73
+ },
74
+ 'GET'
75
+ >
76
+ >()
77
+ }
78
+ // Check the prop type of the entry function
79
+ if ('HEAD' in entry) {
80
+ checkFields<
81
+ Diff<
82
+ ParamCheck<Request | NextRequest>,
83
+ {
84
+ __tag__: 'HEAD'
85
+ __param_position__: 'first'
86
+ __param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
87
+ },
88
+ 'HEAD'
89
+ >
90
+ >()
91
+ checkFields<
92
+ Diff<
93
+ ParamCheck<RouteContext>,
94
+ {
95
+ __tag__: 'HEAD'
96
+ __param_position__: 'second'
97
+ __param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
98
+ },
99
+ 'HEAD'
100
+ >
101
+ >()
102
+
103
+ checkFields<
104
+ Diff<
105
+ {
106
+ __tag__: 'HEAD',
107
+ __return_type__: Response | void | never | Promise<Response | void | never>
108
+ },
109
+ {
110
+ __tag__: 'HEAD',
111
+ __return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
112
+ },
113
+ 'HEAD'
114
+ >
115
+ >()
116
+ }
117
+ // Check the prop type of the entry function
118
+ if ('OPTIONS' in entry) {
119
+ checkFields<
120
+ Diff<
121
+ ParamCheck<Request | NextRequest>,
122
+ {
123
+ __tag__: 'OPTIONS'
124
+ __param_position__: 'first'
125
+ __param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
126
+ },
127
+ 'OPTIONS'
128
+ >
129
+ >()
130
+ checkFields<
131
+ Diff<
132
+ ParamCheck<RouteContext>,
133
+ {
134
+ __tag__: 'OPTIONS'
135
+ __param_position__: 'second'
136
+ __param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
137
+ },
138
+ 'OPTIONS'
139
+ >
140
+ >()
141
+
142
+ checkFields<
143
+ Diff<
144
+ {
145
+ __tag__: 'OPTIONS',
146
+ __return_type__: Response | void | never | Promise<Response | void | never>
147
+ },
148
+ {
149
+ __tag__: 'OPTIONS',
150
+ __return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
151
+ },
152
+ 'OPTIONS'
153
+ >
154
+ >()
155
+ }
156
+ // Check the prop type of the entry function
157
+ if ('POST' in entry) {
158
+ checkFields<
159
+ Diff<
160
+ ParamCheck<Request | NextRequest>,
161
+ {
162
+ __tag__: 'POST'
163
+ __param_position__: 'first'
164
+ __param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
165
+ },
166
+ 'POST'
167
+ >
168
+ >()
169
+ checkFields<
170
+ Diff<
171
+ ParamCheck<RouteContext>,
172
+ {
173
+ __tag__: 'POST'
174
+ __param_position__: 'second'
175
+ __param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
176
+ },
177
+ 'POST'
178
+ >
179
+ >()
180
+
181
+ checkFields<
182
+ Diff<
183
+ {
184
+ __tag__: 'POST',
185
+ __return_type__: Response | void | never | Promise<Response | void | never>
186
+ },
187
+ {
188
+ __tag__: 'POST',
189
+ __return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
190
+ },
191
+ 'POST'
192
+ >
193
+ >()
194
+ }
195
+ // Check the prop type of the entry function
196
+ if ('PUT' in entry) {
197
+ checkFields<
198
+ Diff<
199
+ ParamCheck<Request | NextRequest>,
200
+ {
201
+ __tag__: 'PUT'
202
+ __param_position__: 'first'
203
+ __param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
204
+ },
205
+ 'PUT'
206
+ >
207
+ >()
208
+ checkFields<
209
+ Diff<
210
+ ParamCheck<RouteContext>,
211
+ {
212
+ __tag__: 'PUT'
213
+ __param_position__: 'second'
214
+ __param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
215
+ },
216
+ 'PUT'
217
+ >
218
+ >()
219
+
220
+ checkFields<
221
+ Diff<
222
+ {
223
+ __tag__: 'PUT',
224
+ __return_type__: Response | void | never | Promise<Response | void | never>
225
+ },
226
+ {
227
+ __tag__: 'PUT',
228
+ __return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
229
+ },
230
+ 'PUT'
231
+ >
232
+ >()
233
+ }
234
+ // Check the prop type of the entry function
235
+ if ('DELETE' in entry) {
236
+ checkFields<
237
+ Diff<
238
+ ParamCheck<Request | NextRequest>,
239
+ {
240
+ __tag__: 'DELETE'
241
+ __param_position__: 'first'
242
+ __param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
243
+ },
244
+ 'DELETE'
245
+ >
246
+ >()
247
+ checkFields<
248
+ Diff<
249
+ ParamCheck<RouteContext>,
250
+ {
251
+ __tag__: 'DELETE'
252
+ __param_position__: 'second'
253
+ __param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
254
+ },
255
+ 'DELETE'
256
+ >
257
+ >()
258
+
259
+ checkFields<
260
+ Diff<
261
+ {
262
+ __tag__: 'DELETE',
263
+ __return_type__: Response | void | never | Promise<Response | void | never>
264
+ },
265
+ {
266
+ __tag__: 'DELETE',
267
+ __return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
268
+ },
269
+ 'DELETE'
270
+ >
271
+ >()
272
+ }
273
+ // Check the prop type of the entry function
274
+ if ('PATCH' in entry) {
275
+ checkFields<
276
+ Diff<
277
+ ParamCheck<Request | NextRequest>,
278
+ {
279
+ __tag__: 'PATCH'
280
+ __param_position__: 'first'
281
+ __param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
282
+ },
283
+ 'PATCH'
284
+ >
285
+ >()
286
+ checkFields<
287
+ Diff<
288
+ ParamCheck<RouteContext>,
289
+ {
290
+ __tag__: 'PATCH'
291
+ __param_position__: 'second'
292
+ __param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
293
+ },
294
+ 'PATCH'
295
+ >
296
+ >()
297
+
298
+ checkFields<
299
+ Diff<
300
+ {
301
+ __tag__: 'PATCH',
302
+ __return_type__: Response | void | never | Promise<Response | void | never>
303
+ },
304
+ {
305
+ __tag__: 'PATCH',
306
+ __return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
307
+ },
308
+ 'PATCH'
309
+ >
310
+ >()
311
+ }
312
+
313
+ // Check the arguments and return type of the generateStaticParams function
314
+ if ('generateStaticParams' in entry) {
315
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
316
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
317
+ }
318
+
319
+ export interface PageProps {
320
+ params?: Promise<SegmentParams>
321
+ searchParams?: Promise<any>
322
+ }
323
+ export interface LayoutProps {
324
+ children?: React.ReactNode
325
+
326
+ params?: Promise<SegmentParams>
327
+ }
328
+
329
+ // =============
330
+ // Utility types
331
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
332
+
333
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
334
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
335
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
336
+
337
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
338
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
339
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
340
+
341
+ type ParamCheck<T> = {
342
+ __tag__: string
343
+ __param_position__: string
344
+ __param_type__: T
345
+ }
346
+
347
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
348
+
349
+ // https://github.com/sindresorhus/type-fest
350
+ type Numeric = number | bigint
351
+ type Zero = 0 | 0n
352
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
353
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -2,7 +2,7 @@
2
2
  // Do not edit this file manually
3
3
 
4
4
  type AppRoutes = "/"
5
- type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/app-update" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/board-assets" | "/api/board-assets/[...path]" | "/api/boards" | "/api/boards/[id]" | "/api/boards/[id]/reconcile" | "/api/boards/reorder" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/default-cwd" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/status" | "/api/home" | "/api/mcp" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/plugins" | "/api/project-trust" | "/api/quota" | "/api/search" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/export" | "/api/sessions/[id]/minimap" | "/api/sessions/[id]/state" | "/api/sessions/[id]/todos" | "/api/sessions/summary" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/task-card-questions" | "/api/task-card-questions/[id]/answer" | "/api/task-cards" | "/api/task-cards/[id]" | "/api/task-cards/unbind" | "/api/task-scheduler/status" | "/api/tasks" | "/api/tasks/[id]" | "/api/tasks/[id]/assign-session" | "/api/tasks/[id]/board" | "/api/tasks/reorder" | "/api/terminal" | "/api/terminal/[id]" | "/api/terminal/[id]/events" | "/api/worktrees" | "/api/yjs-version"
5
+ type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/app-update" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/board-assets" | "/api/board-assets/[...path]" | "/api/boards" | "/api/boards/[id]" | "/api/boards/[id]/add-session" | "/api/boards/[id]/reconcile" | "/api/boards/reorder" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/default-cwd" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/status" | "/api/home" | "/api/mcp" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/plugins" | "/api/project-trust" | "/api/quota" | "/api/search" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/export" | "/api/sessions/[id]/minimap" | "/api/sessions/[id]/state" | "/api/sessions/[id]/todos" | "/api/sessions/summary" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/subagents/[id]" | "/api/subagents/profiles" | "/api/subagents/settings" | "/api/task-card-questions" | "/api/task-card-questions/[id]/answer" | "/api/task-cards" | "/api/task-cards/[id]" | "/api/task-cards/unbind" | "/api/task-scheduler/status" | "/api/tasks" | "/api/tasks/[id]" | "/api/tasks/[id]/assign-session" | "/api/tasks/[id]/board" | "/api/tasks/reorder" | "/api/terminal" | "/api/terminal/[id]" | "/api/terminal/[id]/events" | "/api/worktrees" | "/api/yjs-version"
6
6
  type PageRoutes = never
7
7
  type LayoutRoutes = "/"
8
8
  type RedirectRoutes = never
@@ -27,6 +27,7 @@ interface ParamMap {
27
27
  "/api/board-assets/[...path]": { "path": string[]; }
28
28
  "/api/boards": {}
29
29
  "/api/boards/[id]": { "id": string; }
30
+ "/api/boards/[id]/add-session": { "id": string; }
30
31
  "/api/boards/[id]/reconcile": { "id": string; }
31
32
  "/api/boards/reorder": {}
32
33
  "/api/cwd/browse": {}
@@ -62,6 +63,9 @@ interface ParamMap {
62
63
  "/api/skills/install": {}
63
64
  "/api/skills/search": {}
64
65
  "/api/skills/update": {}
66
+ "/api/subagents/[id]": { "id": string; }
67
+ "/api/subagents/profiles": {}
68
+ "/api/subagents/settings": {}
65
69
  "/api/task-card-questions": {}
66
70
  "/api/task-card-questions/[id]/answer": { "id": string; }
67
71
  "/api/task-cards": {}
@@ -173,6 +173,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
173
173
  type __Unused = __Check
174
174
  }
175
175
 
176
+ // Validate ../../app/api/boards/[id]/add-session/route.ts
177
+ {
178
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/boards/[id]/add-session">> = Specific
179
+ const handler = {} as typeof import("../../app/api/boards/[id]/add-session/route.js")
180
+ type __Check = __IsExpected<typeof handler>
181
+ // @ts-ignore
182
+ type __Unused = __Check
183
+ }
184
+
176
185
  // Validate ../../app/api/boards/[id]/reconcile/route.ts
177
186
  {
178
187
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/boards/[id]/reconcile">> = Specific
@@ -506,6 +515,33 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
506
515
  type __Unused = __Check
507
516
  }
508
517
 
518
+ // Validate ../../app/api/subagents/[id]/route.ts
519
+ {
520
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/subagents/[id]">> = Specific
521
+ const handler = {} as typeof import("../../app/api/subagents/[id]/route.js")
522
+ type __Check = __IsExpected<typeof handler>
523
+ // @ts-ignore
524
+ type __Unused = __Check
525
+ }
526
+
527
+ // Validate ../../app/api/subagents/profiles/route.ts
528
+ {
529
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/subagents/profiles">> = Specific
530
+ const handler = {} as typeof import("../../app/api/subagents/profiles/route.js")
531
+ type __Check = __IsExpected<typeof handler>
532
+ // @ts-ignore
533
+ type __Unused = __Check
534
+ }
535
+
536
+ // Validate ../../app/api/subagents/settings/route.ts
537
+ {
538
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/subagents/settings">> = Specific
539
+ const handler = {} as typeof import("../../app/api/subagents/settings/route.js")
540
+ type __Check = __IsExpected<typeof handler>
541
+ // @ts-ignore
542
+ type __Unused = __Check
543
+ }
544
+
509
545
  // Validate ../../app/api/task-card-questions/[id]/answer/route.ts
510
546
  {
511
547
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/task-card-questions/[id]/answer">> = Specific
package/lib/api-types.ts CHANGED
@@ -1,4 +1,14 @@
1
1
  import type { ResourceDiagnostic } from "@earendil-works/pi-coding-agent";
2
+ import type { SubagentProfile } from "./subagents";
3
+
4
+ export interface SubagentProfilesResponse {
5
+ profiles: SubagentProfile[];
6
+ }
7
+
8
+ export interface SubagentSettingsResponse {
9
+ enabled: boolean;
10
+ maxConcurrent: number;
11
+ }
2
12
 
3
13
  /** 时间轴导航条(ChatMinimap)的 turn 索引条目:只含文本摘要,不携带完整 content。 */
4
14
  export interface TurnIndexItem {
@@ -1,17 +1,35 @@
1
- import { test, beforeEach, afterEach } from "node:test";
1
+ import { test, beforeEach, afterEach, after } from "node:test";
2
2
  import assert from "node:assert/strict";
3
+ import { mkdtempSync, rmSync } from "node:fs";
4
+ import { tmpdir } from "node:os";
5
+ import { join } from "node:path";
3
6
  import { DatabaseSync } from "node:sqlite";
4
7
  import { createJiti } from "jiti";
5
8
 
9
+ // 隔离:归属写入现在会对「库里无行」的会话解析会话文件,临时 agentDir 保证
10
+ // 测试绝不扫开发机真实的 ~/.pi/agent/sessions。
11
+ const agentDir = mkdtempSync(join(tmpdir(), "pi-web-board-reconcile-"));
12
+ process.env.PI_CODING_AGENT_DIR = agentDir;
13
+ after(() => rmSync(agentDir, { recursive: true, force: true }));
14
+
6
15
  const jiti = createJiti(import.meta.url, { interopDefault: true, moduleCache: false });
7
16
  const { setDbForTesting, getDb } = await jiti.import("./sqlite-db.ts");
8
17
  const { createTask } = await jiti.import("./task-store.ts");
9
18
  const { getOrCreateTaskBoard } = await jiti.import("./board-store.ts");
10
19
  const { createCard, updateCard } = await jiti.import("./task-card-store.ts");
11
- const { assignSessionToTask } = await jiti.import("./task-store.ts");
12
20
 
13
21
  const PROJECT = "proj-reconcile";
14
22
 
23
+ /** 库里已有该会话的行且已归属本任务(生产链路:行由创建链路/扫描器建、归属由
24
+ * assignSessionToTask 写;reconcile 只消费「行 + 归属」,这里一次插齐)。 */
25
+ function seedAssignedSession(sid, taskId) {
26
+ const ts = Date.now();
27
+ getDb().prepare(
28
+ "INSERT INTO session_meta (session_id, task_id, updated, pinned, path, cwd, project_key, created, modified) " +
29
+ "VALUES (?, ?, ?, 0, ?, ?, ?, ?, ?)",
30
+ ).run(sid, taskId, ts, `/sessions/proj/${sid}.jsonl`, "/proj", PROJECT, ts, ts);
31
+ }
32
+
15
33
  // 注入 mutateBoard mock:捕获每次事务调用(读入当前 Y 状态,执行 transaction 后
16
34
  // 记录对 nodes/edges 的增删,模拟服务端权威写)。
17
35
  function installYjsMock() {
@@ -79,9 +97,9 @@ test("窗口期 reconcile 不补同 sid 占位卡(新建会话指定 ID 场景
79
97
  const board = getOrCreateTaskBoard(task.id, PROJECT, "任务A"); // board.id = task.id
80
98
  assert.ok(board.taskId);
81
99
 
82
- // 服务端已落库(assignSessionToTask 在 /api/agent/new 中先于前端转正执行)
100
+ // 服务端已落库(行由创建链路建,归属在 /api/agent/new 中先于前端转正写入)
83
101
  const sid = "abc-123";
84
- assignSessionToTask(sid, task.id);
102
+ seedAssignedSession(sid, task.id);
85
103
 
86
104
  // 画布已存在「新建中占位卡」:cwd 非空 + sessionId = 即将创建/刚创建的会话 UUID
87
105
  mockState.nodeSets.set("user-card-1", cardNode("user-card-1", sid, { cwd: "/proj", expanded: true }));
@@ -99,7 +117,7 @@ test("无占位卡时业务表会话正常补卡(回归,不误伤)", async
99
117
  const task = createTask(PROJECT, "任务B");
100
118
  const board = getOrCreateTaskBoard(task.id, PROJECT, "任务B");
101
119
  const sid = "reg-session-1";
102
- assignSessionToTask(sid, task.id);
120
+ seedAssignedSession(sid, task.id);
103
121
 
104
122
  const { reconcileBoard } = await jiti.import("./board-reconcile.ts");
105
123
  await reconcileBoard(board.id);
@@ -119,11 +137,11 @@ test("占位卡不影响其他会话补卡(6461a61 语义保留)", async ()
119
137
 
120
138
  // 一个业务表真实会话 + 任务卡执行会话
121
139
  const realSid = "real-session";
122
- assignSessionToTask(realSid, task.id);
140
+ seedAssignedSession(realSid, task.id);
123
141
  const execSid = "exec-session";
124
142
  const card = createCard({ boardId: board.id, projectKey: PROJECT, name: "子任务" });
125
143
  updateCard(card.id, { sessionId: execSid });
126
- assignSessionToTask(execSid, task.id);
144
+ seedAssignedSession(execSid, task.id);
127
145
 
128
146
  const { reconcileBoard } = await jiti.import("./board-reconcile.ts");
129
147
  await reconcileBoard(board.id);
@@ -315,7 +333,7 @@ test("拖入任务看板的会话:无 session_meta 归属 → 判孤儿删;
315
333
 
316
334
  // 拖入的会话已写 session_meta(先归属后落卡)→ 存活;画布已有该卡 → 不补第二张
317
335
  const assignedSid = "drag-with-meta";
318
- assignSessionToTask(assignedSid, task.id);
336
+ seedAssignedSession(assignedSid, task.id);
319
337
  mockState.nodeSets.set("drag-card2", cardNode("drag-card2", assignedSid, { taskId: task.id }));
320
338
  await reconcileBoard(board.id);
321
339
  assert.ok(mockState.nodeSets.has("drag-card2"), "有 session_meta 归属的拖入卡存活");
@@ -343,3 +361,23 @@ test("删除会话:普通看板清理级联删除以会话卡为端点的边",
343
361
  assert.deepEqual([...doc.nodes.keys()], ["a2"], "只删 s1 卡");
344
362
  assert.deepEqual([...doc.edges.keys()], [], "以 a1 为端点的边级联删除");
345
363
  });
364
+
365
+ test("侧栏拖会话到看板行:落卡到空位、重复拖同 sid 不动", async () => {
366
+ const { addSessionCardToBoard } = await jiti.import("./board-reconcile.ts");
367
+
368
+ // 已占 4 列首列(60,60)→ 新卡应落第二列(60 + 340 + 24)
369
+ mockState.nodeSets.set("session-占用", cardNode("session-占用", "占用", {}));
370
+
371
+ assert.equal(await addSessionCardToBoard("board-x", "sid-new", "拖来的标题"), true);
372
+ const node = mockState.nodeSets.get("session-sid-new");
373
+ assert.ok(node, "落卡存在");
374
+ assert.equal(node.type, "session-card");
375
+ assert.equal(node.data.title, "拖来的标题", "标题随拖拽源带入");
376
+ assert.equal(node.data.cwd, "", "cwd 必须空(非空 = 新建会话占位卡语义)");
377
+ assert.equal(node.position.x, 60 + 340 + 24, "不与已有卡重叠");
378
+
379
+ // 再拖同一会话:不重落(保留用户布局/展开态),也不改标题
380
+ assert.equal(await addSessionCardToBoard("board-x", "sid-new", "新标题"), false);
381
+ assert.equal(mockState.nodeSets.get("session-sid-new").data.title, "拖来的标题");
382
+ assert.equal(mockState.nodeSets.size, 2, "只有一张新卡");
383
+ });
@@ -175,7 +175,9 @@ export async function reconcileBoard(boardId: string, force = false): Promise<vo
175
175
  if (isTaskBoard) for (const sid of listTaskSessionIds(board.taskId!)) allSessionIds.add(sid);
176
176
  for (const c of cards) if (c.sessionId) allSessionIds.add(c.sessionId);
177
177
  // fork 会话派生:fork(parent_id 非空)会话的源会话归属本任务 → 本任务看板补 fork 卡。
178
- // fork 会话自身不继承 task_id,需经源会话归属定位;普通看板 board.taskId 为空天然不参与。
178
+ // fork 会话建行时已继承源会话的 task_id(T1),这里仍按「源会话归属」定位,
179
+ // 是为了兼容存量行(扫描器收敛前的父在任务/子为空的脏行)与跨任务拖入的过渡态;
180
+ // 普通看板 board.taskId 为空天然不参与。
179
181
  const forkBySid = new Map<string, string>(); // forkSid -> parentSid
180
182
  if (isTaskBoard) {
181
183
  for (const { sessionId, parentId } of listTaskForkedSessions(board.taskId!)) {
@@ -417,6 +419,60 @@ function listTaskForkedSessions(taskId: string): Array<{ sessionId: string; pare
417
419
  .all(taskId) as Array<{ sessionId: string; parentId: string }>;
418
420
  }
419
421
 
422
+ /**
423
+ * 侧栏拖会话到「看板」行 → 在目标看板落一张会话卡。
424
+ *
425
+ * 为什么走后端写:拖到侧栏行时目标看板可能没在当前页面打开(前端没有那个 Y.Doc),
426
+ * 只有服务端能权威写。落点用 findFreeSpot 找空位——拖到侧栏行没有画布坐标,
427
+ * 位置由后端定(不与已有卡重叠即可)。
428
+ *
429
+ * 幂等:画布已有同 sid 卡 → 不动(保留用户的布局/展开态),返回 false。
430
+ */
431
+ export async function addSessionCardToBoard(
432
+ boardId: string,
433
+ sessionId: string,
434
+ title?: string,
435
+ ): Promise<boolean> {
436
+ let added = false;
437
+ await mutateBoard(boardId, (maps) => {
438
+ const id = `session-${sessionId}`;
439
+ if (maps.nodes.get(id)) return;
440
+ const nodes = Array.from(maps.nodes.values()) as unknown as DocNode[];
441
+ const spot = findFreeSpot(nodes, SESSION_CARD_W, SESSION_CARD_H);
442
+ maps.nodes.set(id, {
443
+ id,
444
+ type: "session-card",
445
+ position: { x: spot.x, y: spot.y },
446
+ style: { width: SESSION_CARD_W, height: SESSION_CARD_H },
447
+ data: {
448
+ sessionId,
449
+ title: title ?? "",
450
+ emoji: "💬",
451
+ projectName: "",
452
+ messageCount: 0,
453
+ lastReply: "",
454
+ phase: "idle",
455
+ runningMs: 0,
456
+ endedAt: 0,
457
+ lastActivityAt: 0,
458
+ stale: false,
459
+ expanded: false,
460
+ // cwd 必须留空:非空在 reconcile 语义里 = 「新会话卡(会话未创建)」
461
+ cwd: "",
462
+ taskId: "",
463
+ w: SESSION_CARD_W,
464
+ h: SESSION_CARD_H,
465
+ expandedW: 0,
466
+ expandedH: 0,
467
+ collapsedW: 0,
468
+ collapsedH: 0,
469
+ },
470
+ });
471
+ added = true;
472
+ });
473
+ return added;
474
+ }
475
+
420
476
  /**
421
477
  * fork 后精准触发:源会话归属任务 → reconcile 该任务看板(fork 卡即时出现)。
422
478
  * 源会话不归属任何任务(普通看板)→ 无操作。单板 reconcile,毫秒级;
@@ -47,9 +47,9 @@ test("schema version reaches latest with board tables", () => {
47
47
  .prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'boards'")
48
48
  .all();
49
49
  assert.equal(boards.length, 1);
50
- assert.equal(SCHEMA_VERSION, 11);
50
+ assert.equal(SCHEMA_VERSION, 12); // v12: session_meta.last_reply
51
51
  const row = db.prepare("PRAGMA user_version").get();
52
- assert.equal(row.user_version, 11);
52
+ assert.equal(row.user_version, SCHEMA_VERSION);
53
53
  // v5 迁移:boards.task_id 列存在
54
54
  const cols = db.prepare("PRAGMA table_info(boards)").all().map((c) => c.name);
55
55
  assert.ok(cols.includes("task_id"));