@jingyi0605/codingns 0.3.0 → 0.3.6

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 (261) hide show
  1. package/README.md +13 -0
  2. package/bin/codingns.mjs +880 -9
  3. package/dist/public/assets/{TerminalPage-Dfw1QUqW.js → TerminalPage-D00S4KM6.js} +19 -19
  4. package/dist/public/assets/index-BlOinYqR.js +122 -0
  5. package/dist/public/assets/index-Dg_7g6lA.css +1 -0
  6. package/dist/public/index.html +2 -2
  7. package/dist/server/config/env.d.ts +2 -0
  8. package/dist/server/config/env.js +35 -0
  9. package/dist/server/config/env.js.map +1 -1
  10. package/dist/server/config/opencode-base-url-resolver.d.ts +7 -0
  11. package/dist/server/config/opencode-base-url-resolver.js +48 -11
  12. package/dist/server/config/opencode-base-url-resolver.js.map +1 -1
  13. package/dist/server/config/opencode-system-probe-helper-client.d.ts +4 -0
  14. package/dist/server/config/opencode-system-probe-helper-client.js +29 -0
  15. package/dist/server/config/opencode-system-probe-helper-client.js.map +1 -1
  16. package/dist/server/config/opencode-system-probe-helper-process.d.ts +12 -0
  17. package/dist/server/config/opencode-system-probe-helper-process.js +34 -7
  18. package/dist/server/config/opencode-system-probe-helper-process.js.map +1 -1
  19. package/dist/server/modules/assistant-capability/assistant-capability-controller.d.ts +144 -0
  20. package/dist/server/modules/assistant-capability/assistant-capability-controller.js +242 -1
  21. package/dist/server/modules/assistant-capability/assistant-capability-controller.js.map +1 -1
  22. package/dist/server/modules/assistant-capability/assistant-capability-service.d.ts +133 -2
  23. package/dist/server/modules/assistant-capability/assistant-capability-service.js +395 -2
  24. package/dist/server/modules/assistant-capability/assistant-capability-service.js.map +1 -1
  25. package/dist/server/modules/auth/auth-service.d.ts +18 -1
  26. package/dist/server/modules/auth/auth-service.js +168 -7
  27. package/dist/server/modules/auth/auth-service.js.map +1 -1
  28. package/dist/server/modules/butler/butler-codex-model-policy.d.ts +1 -0
  29. package/dist/server/modules/butler/butler-codex-model-policy.js +36 -0
  30. package/dist/server/modules/butler/butler-codex-model-policy.js.map +1 -0
  31. package/dist/server/modules/butler/butler-control-session-service.d.ts +13 -1
  32. package/dist/server/modules/butler/butler-control-session-service.js +55 -231
  33. package/dist/server/modules/butler/butler-control-session-service.js.map +1 -1
  34. package/dist/server/modules/butler/butler-controller.d.ts +17 -0
  35. package/dist/server/modules/butler/butler-controller.js +20 -1
  36. package/dist/server/modules/butler/butler-controller.js.map +1 -1
  37. package/dist/server/modules/butler/butler-follow-up-service.js +7 -3
  38. package/dist/server/modules/butler/butler-follow-up-service.js.map +1 -1
  39. package/dist/server/modules/butler/butler-inbox-analysis-service.d.ts +36 -0
  40. package/dist/server/modules/butler/butler-inbox-analysis-service.js +375 -0
  41. package/dist/server/modules/butler/butler-inbox-analysis-service.js.map +1 -0
  42. package/dist/server/modules/butler/butler-inbox-instruction-adapter.d.ts +23 -0
  43. package/dist/server/modules/butler/butler-inbox-instruction-adapter.js +97 -0
  44. package/dist/server/modules/butler/butler-inbox-instruction-adapter.js.map +1 -0
  45. package/dist/server/modules/butler/butler-inbox-service.d.ts +39 -2
  46. package/dist/server/modules/butler/butler-inbox-service.js +392 -2
  47. package/dist/server/modules/butler/butler-inbox-service.js.map +1 -1
  48. package/dist/server/modules/butler/butler-session-service.d.ts +8 -0
  49. package/dist/server/modules/butler/butler-session-service.js +205 -53
  50. package/dist/server/modules/butler/butler-session-service.js.map +1 -1
  51. package/dist/server/modules/butler/butler-session-summary-service.d.ts +1 -0
  52. package/dist/server/modules/butler/butler-session-summary-service.js +48 -23
  53. package/dist/server/modules/butler/butler-session-summary-service.js.map +1 -1
  54. package/dist/server/modules/butler/butler-workspace-context.d.ts +13 -0
  55. package/dist/server/modules/butler/butler-workspace-context.js +234 -0
  56. package/dist/server/modules/butler/butler-workspace-context.js.map +1 -0
  57. package/dist/server/modules/client/client-controller.d.ts +6 -0
  58. package/dist/server/modules/client/client-controller.js +30 -8
  59. package/dist/server/modules/client/client-controller.js.map +1 -1
  60. package/dist/server/modules/client/client-service.d.ts +22 -10
  61. package/dist/server/modules/client/client-service.js +77 -100
  62. package/dist/server/modules/client/client-service.js.map +1 -1
  63. package/dist/server/modules/client/npm-global-package-service.d.ts +21 -0
  64. package/dist/server/modules/client/npm-global-package-service.js +210 -0
  65. package/dist/server/modules/client/npm-global-package-service.js.map +1 -0
  66. package/dist/server/modules/client/service-update-task-service.d.ts +15 -0
  67. package/dist/server/modules/client/service-update-task-service.js +147 -0
  68. package/dist/server/modules/client/service-update-task-service.js.map +1 -0
  69. package/dist/server/modules/client/service-update-types.d.ts +30 -0
  70. package/dist/server/modules/client/service-update-types.js +2 -0
  71. package/dist/server/modules/client/service-update-types.js.map +1 -0
  72. package/dist/server/modules/debug-target/debug-target-controller.d.ts +13 -0
  73. package/dist/server/modules/debug-target/debug-target-controller.js +77 -2
  74. package/dist/server/modules/debug-target/debug-target-controller.js.map +1 -1
  75. package/dist/server/modules/debug-target/debug-target-service.d.ts +11 -2
  76. package/dist/server/modules/debug-target/debug-target-service.js +138 -3
  77. package/dist/server/modules/debug-target/debug-target-service.js.map +1 -1
  78. package/dist/server/modules/git/git-command-helper-client.d.ts +2 -0
  79. package/dist/server/modules/git/git-command-helper-client.js +52 -3
  80. package/dist/server/modules/git/git-command-helper-client.js.map +1 -1
  81. package/dist/server/modules/git/git-command-helper-process.js +62 -9
  82. package/dist/server/modules/git/git-command-helper-process.js.map +1 -1
  83. package/dist/server/modules/git/git-command-runner.d.ts +1 -0
  84. package/dist/server/modules/git/git-command-runner.js +25 -0
  85. package/dist/server/modules/git/git-command-runner.js.map +1 -1
  86. package/dist/server/modules/git/git-controller.js +8 -7
  87. package/dist/server/modules/git/git-controller.js.map +1 -1
  88. package/dist/server/modules/git/git-read-service.d.ts +7 -7
  89. package/dist/server/modules/git/git-read-service.js +41 -24
  90. package/dist/server/modules/git/git-read-service.js.map +1 -1
  91. package/dist/server/modules/model-switch/cc-switch-adapter.d.ts +36 -0
  92. package/dist/server/modules/model-switch/cc-switch-adapter.js +321 -0
  93. package/dist/server/modules/model-switch/cc-switch-adapter.js.map +1 -0
  94. package/dist/server/modules/model-switch/model-switch-controller.d.ts +11 -0
  95. package/dist/server/modules/model-switch/model-switch-controller.js +30 -0
  96. package/dist/server/modules/model-switch/model-switch-controller.js.map +1 -0
  97. package/dist/server/modules/model-switch/model-switch-service.d.ts +16 -0
  98. package/dist/server/modules/model-switch/model-switch-service.js +29 -0
  99. package/dist/server/modules/model-switch/model-switch-service.js.map +1 -0
  100. package/dist/server/modules/preferences/profile-service.d.ts +1 -0
  101. package/dist/server/modules/preferences/profile-service.js +9 -0
  102. package/dist/server/modules/preferences/profile-service.js.map +1 -1
  103. package/dist/server/modules/provider/codex-model-options.js +2 -3
  104. package/dist/server/modules/provider/codex-model-options.js.map +1 -1
  105. package/dist/server/modules/provider/opencode-model-options.js +2 -3
  106. package/dist/server/modules/provider/opencode-model-options.js.map +1 -1
  107. package/dist/server/modules/provider/provider-discovery-helper-client.d.ts +9 -4
  108. package/dist/server/modules/provider/provider-discovery-helper-client.js +87 -11
  109. package/dist/server/modules/provider/provider-discovery-helper-client.js.map +1 -1
  110. package/dist/server/modules/provider/provider-discovery-helper-process.js +52 -47
  111. package/dist/server/modules/provider/provider-discovery-helper-process.js.map +1 -1
  112. package/dist/server/modules/provider/provider-discovery-runtime.d.ts +4 -0
  113. package/dist/server/modules/provider/provider-discovery-runtime.js +65 -0
  114. package/dist/server/modules/provider/provider-discovery-runtime.js.map +1 -0
  115. package/dist/server/modules/sessions/codex-app-server-helper-process.js +3 -0
  116. package/dist/server/modules/sessions/codex-app-server-helper-process.js.map +1 -1
  117. package/dist/server/modules/sessions/session-activity-authority-service.d.ts +3 -1
  118. package/dist/server/modules/sessions/session-activity-authority-service.js +3 -0
  119. package/dist/server/modules/sessions/session-activity-authority-service.js.map +1 -1
  120. package/dist/server/modules/sessions/session-activity-inspector.d.ts +1 -1
  121. package/dist/server/modules/sessions/session-activity-inspector.js +43 -16
  122. package/dist/server/modules/sessions/session-activity-inspector.js.map +1 -1
  123. package/dist/server/modules/sessions/session-controller.d.ts +3 -3
  124. package/dist/server/modules/sessions/session-controller.js +3 -3
  125. package/dist/server/modules/sessions/session-controller.js.map +1 -1
  126. package/dist/server/modules/sessions/session-history-service.d.ts +8 -2
  127. package/dist/server/modules/sessions/session-history-service.js +473 -65
  128. package/dist/server/modules/sessions/session-history-service.js.map +1 -1
  129. package/dist/server/modules/sessions/session-live-runtime-service.d.ts +9 -3
  130. package/dist/server/modules/sessions/session-live-runtime-service.js +114 -34
  131. package/dist/server/modules/sessions/session-live-runtime-service.js.map +1 -1
  132. package/dist/server/modules/sessions/session-message-attachment-service.d.ts +8 -8
  133. package/dist/server/modules/sessions/session-message-attachment-service.js +25 -34
  134. package/dist/server/modules/sessions/session-message-attachment-service.js.map +1 -1
  135. package/dist/server/modules/sessions/session-provider-error-mapper.js +7 -0
  136. package/dist/server/modules/sessions/session-provider-error-mapper.js.map +1 -1
  137. package/dist/server/modules/skills/builtin-skill-service.d.ts +12 -0
  138. package/dist/server/modules/skills/builtin-skill-service.js +49 -0
  139. package/dist/server/modules/skills/builtin-skill-service.js.map +1 -0
  140. package/dist/server/modules/skills/builtin-skills/codingns-assistant/SKILL.md +75 -0
  141. package/dist/server/modules/skills/builtin-skills/codingns-assistant/agents/openai.yaml +4 -0
  142. package/dist/server/modules/skills/builtin-skills/codingns-assistant/references/cli-workflow.md +130 -0
  143. package/dist/server/modules/skills/skill-manager-service.d.ts +7 -0
  144. package/dist/server/modules/skills/skill-manager-service.js +98 -0
  145. package/dist/server/modules/skills/skill-manager-service.js.map +1 -1
  146. package/dist/server/modules/tailscale/tailscale-helper-client.d.ts +1 -0
  147. package/dist/server/modules/tailscale/tailscale-helper-client.js +12 -0
  148. package/dist/server/modules/tailscale/tailscale-helper-client.js.map +1 -1
  149. package/dist/server/modules/tailscale/tailscale-manager.js +5 -1
  150. package/dist/server/modules/tailscale/tailscale-manager.js.map +1 -1
  151. package/dist/server/modules/tasks/task-helper-client.d.ts +5 -0
  152. package/dist/server/modules/tasks/task-helper-client.js +45 -0
  153. package/dist/server/modules/tasks/task-helper-client.js.map +1 -1
  154. package/dist/server/modules/tasks/task-helper-process-handlers.d.ts +10 -3
  155. package/dist/server/modules/tasks/task-helper-process-handlers.js +7 -5
  156. package/dist/server/modules/tasks/task-helper-process-handlers.js.map +1 -1
  157. package/dist/server/modules/tasks/task-helper-process.js +11 -1
  158. package/dist/server/modules/tasks/task-helper-process.js.map +1 -1
  159. package/dist/server/modules/tasks/task-lane-executors.js +5 -2
  160. package/dist/server/modules/tasks/task-lane-executors.js.map +1 -1
  161. package/dist/server/modules/tasks/task-types.d.ts +3 -0
  162. package/dist/server/modules/tasks/task-types.js +4 -1
  163. package/dist/server/modules/tasks/task-types.js.map +1 -1
  164. package/dist/server/modules/terminal/command-template-service.d.ts +2 -2
  165. package/dist/server/modules/terminal/command-template-service.js +14 -5
  166. package/dist/server/modules/terminal/command-template-service.js.map +1 -1
  167. package/dist/server/modules/terminal/runtime/terminal-log-writer-client.js +1 -1
  168. package/dist/server/modules/terminal/runtime/terminal-log-writer-client.js.map +1 -1
  169. package/dist/server/modules/terminal/runtime/terminal-log-writer-process.js +160 -11
  170. package/dist/server/modules/terminal/runtime/terminal-log-writer-process.js.map +1 -1
  171. package/dist/server/modules/terminal/template-port-runtime.d.ts +13 -2
  172. package/dist/server/modules/terminal/template-port-runtime.js +266 -44
  173. package/dist/server/modules/terminal/template-port-runtime.js.map +1 -1
  174. package/dist/server/modules/terminal/terminal-service.d.ts +4 -0
  175. package/dist/server/modules/terminal/terminal-service.js +65 -4
  176. package/dist/server/modules/terminal/terminal-service.js.map +1 -1
  177. package/dist/server/modules/workbench/workbench-service.js +3 -3
  178. package/dist/server/modules/workbench/workbench-service.js.map +1 -1
  179. package/dist/server/modules/workbench/workspace-panel-snapshot-service.d.ts +1 -0
  180. package/dist/server/modules/workbench/workspace-panel-snapshot-service.js +118 -39
  181. package/dist/server/modules/workbench/workspace-panel-snapshot-service.js.map +1 -1
  182. package/dist/server/modules/workspace/workspace-code-composition.d.ts +1 -0
  183. package/dist/server/modules/workspace/workspace-code-composition.js +277 -2
  184. package/dist/server/modules/workspace/workspace-code-composition.js.map +1 -1
  185. package/dist/server/modules/workspace/workspace-service.js +54 -17
  186. package/dist/server/modules/workspace/workspace-service.js.map +1 -1
  187. package/dist/server/modules/worktree/worktree-cleanup-service.d.ts +1 -1
  188. package/dist/server/modules/worktree/worktree-cleanup-service.js +22 -17
  189. package/dist/server/modules/worktree/worktree-cleanup-service.js.map +1 -1
  190. package/dist/server/modules/worktree/worktree-controller.js +6 -5
  191. package/dist/server/modules/worktree/worktree-controller.js.map +1 -1
  192. package/dist/server/modules/worktree/worktree-manager.d.ts +1 -1
  193. package/dist/server/modules/worktree/worktree-manager.js +26 -19
  194. package/dist/server/modules/worktree/worktree-manager.js.map +1 -1
  195. package/dist/server/modules/worktree/worktree-merge-service.d.ts +2 -2
  196. package/dist/server/modules/worktree/worktree-merge-service.js +34 -27
  197. package/dist/server/modules/worktree/worktree-merge-service.js.map +1 -1
  198. package/dist/server/modules/worktree/worktree-sync-service.d.ts +1 -1
  199. package/dist/server/modules/worktree/worktree-sync-service.js +5 -3
  200. package/dist/server/modules/worktree/worktree-sync-service.js.map +1 -1
  201. package/dist/server/routes/assistant.js +24 -0
  202. package/dist/server/routes/assistant.js.map +1 -1
  203. package/dist/server/routes/butler.js +4 -0
  204. package/dist/server/routes/butler.js.map +1 -1
  205. package/dist/server/routes/client.js +2 -0
  206. package/dist/server/routes/client.js.map +1 -1
  207. package/dist/server/routes/sessions.js +1 -1
  208. package/dist/server/routes/sessions.js.map +1 -1
  209. package/dist/server/routes/system.d.ts +2 -1
  210. package/dist/server/routes/system.js +3 -1
  211. package/dist/server/routes/system.js.map +1 -1
  212. package/dist/server/server/create-server.d.ts +4 -0
  213. package/dist/server/server/create-server.js +67 -8
  214. package/dist/server/server/create-server.js.map +1 -1
  215. package/dist/server/shared/errors/app-error.d.ts +2 -0
  216. package/dist/server/shared/errors/app-error.js +2 -0
  217. package/dist/server/shared/errors/app-error.js.map +1 -1
  218. package/dist/server/shared/http/error-handler.d.ts +2 -1
  219. package/dist/server/shared/http/error-handler.js +3 -2
  220. package/dist/server/shared/http/error-handler.js.map +1 -1
  221. package/dist/server/shared/http/request-abort.d.ts +2 -0
  222. package/dist/server/shared/http/request-abort.js +38 -0
  223. package/dist/server/shared/http/request-abort.js.map +1 -0
  224. package/dist/server/storage/repositories/auth-login-attempt-repository.d.ts +9 -0
  225. package/dist/server/storage/repositories/auth-login-attempt-repository.js +59 -0
  226. package/dist/server/storage/repositories/auth-login-attempt-repository.js.map +1 -0
  227. package/dist/server/storage/repositories/butler-control-session-repository.d.ts +3 -0
  228. package/dist/server/storage/repositories/butler-control-session-repository.js +80 -4
  229. package/dist/server/storage/repositories/butler-control-session-repository.js.map +1 -1
  230. package/dist/server/storage/repositories/butler-inbox-item-repository.js +54 -3
  231. package/dist/server/storage/repositories/butler-inbox-item-repository.js.map +1 -1
  232. package/dist/server/storage/repositories/terminal-instance-repository.js +1 -1
  233. package/dist/server/storage/repositories/terminal-instance-repository.js.map +1 -1
  234. package/dist/server/storage/repositories/user-preference-profile-repository.js +6 -3
  235. package/dist/server/storage/repositories/user-preference-profile-repository.js.map +1 -1
  236. package/dist/server/storage/sqlite/client.js +127 -0
  237. package/dist/server/storage/sqlite/client.js.map +1 -1
  238. package/dist/server/storage/sqlite/schema.sql +19 -1
  239. package/dist/server/types/domain.d.ts +37 -1
  240. package/dist/server/ws/workbench-ws-hub.d.ts +1 -0
  241. package/dist/server/ws/workbench-ws-hub.js +25 -3
  242. package/dist/server/ws/workbench-ws-hub.js.map +1 -1
  243. package/node_modules/@codingns/session-sync-core/dist/patch-builder.d.ts +23 -0
  244. package/node_modules/@codingns/session-sync-core/dist/patch-builder.js +162 -0
  245. package/node_modules/@codingns/session-sync-core/dist/patch-builder.js.map +1 -1
  246. package/node_modules/@codingns/session-sync-core/dist/providers/codex.d.ts +1 -0
  247. package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +89 -33
  248. package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +1 -1
  249. package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js +18 -2
  250. package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js.map +1 -1
  251. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.d.ts +3 -1
  252. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +238 -53
  253. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +1 -1
  254. package/node_modules/@codingns/session-sync-core/dist/runtime/provider-runtime-service.js +1 -0
  255. package/node_modules/@codingns/session-sync-core/dist/runtime/provider-runtime-service.js.map +1 -1
  256. package/node_modules/@codingns/session-sync-core/dist/runtime/types.d.ts +6 -2
  257. package/node_modules/@codingns/session-sync-core/dist/types.d.ts +1 -1
  258. package/package.json +1 -1
  259. package/scripts/postinstall.mjs +33 -0
  260. package/dist/public/assets/index-DR2rPNi7.css +0 -1
  261. package/dist/public/assets/index-DTOruahn.js +0 -114
@@ -11,7 +11,7 @@ export class WorktreeSyncService {
11
11
  this.workspaceWorktreeRepository = workspaceWorktreeRepository;
12
12
  this.gitCommandRunner = gitCommandRunner;
13
13
  }
14
- async syncRoot(rootWorkspaceId) {
14
+ async syncRoot(rootWorkspaceId, signal) {
15
15
  const requestedWorkspaceId = rootWorkspaceId.trim();
16
16
  if (!requestedWorkspaceId) {
17
17
  throw new AppError({
@@ -26,7 +26,8 @@ export class WorktreeSyncService {
26
26
  const rootWorkspace = this.workspaceService.getWorkspaceOrThrow(resolvedRootWorkspaceId);
27
27
  const listResult = await this.gitCommandRunner.run(rootWorkspace.path, ["worktree", "list", "--porcelain"], {
28
28
  workspaceId: resolvedRootWorkspaceId,
29
- operation: "worktree.sync.list"
29
+ operation: "worktree.sync.list",
30
+ signal
30
31
  });
31
32
  const actualEntryByPath = new Map(parseWorktreeList(listResult.stdout)
32
33
  .map((entry) => [normalizeWorktreePath(entry.path), entry]));
@@ -69,7 +70,8 @@ export class WorktreeSyncService {
69
70
  await this.gitCommandRunner.run(rootWorkspace.path, ["worktree", "prune"], {
70
71
  allowNonZeroExit: true,
71
72
  workspaceId: resolvedRootWorkspaceId,
72
- operation: "worktree.sync.prune"
73
+ operation: "worktree.sync.prune",
74
+ signal
73
75
  });
74
76
  }
75
77
  return syncResult;
@@ -1 +1 @@
1
- {"version":3,"file":"worktree-sync-service.js","sourceRoot":"","sources":["../../../../src/modules/worktree/worktree-sync-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AA0BpD,MAAM,OAAO,mBAAmB;IAEX;IACA;IACA;IAHnB,YACmB,gBAAkC,EAClC,2BAAwD,EACxD,gBAAkC;QAFlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,eAAuB;QACpC,MAAM,oBAAoB,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;QAEpD,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,MAAM,IAAI,QAAQ,CAAC;gBACjB,UAAU,EAAE,GAAG;gBACf,SAAS,EAAE,eAAe;gBAC1B,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE,iBAAiB;aACzB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;QAC1F,MAAM,uBAAuB,GAAG,QAAQ,EAAE,eAAe,IAA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AC;AACjB,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC;QACxC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;QACvC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa;IAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvF,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -11,5 +11,29 @@ export async function registerAssistantCapabilityRoutes(app, assistantCapability
11
11
  app.get("/api/assistant/terminals", assistantCapabilityController.listTerminals);
12
12
  app.get("/api/assistant/terminals/:terminalId/history", assistantCapabilityController.readTerminalHistory);
13
13
  app.post("/api/assistant/terminals/:terminalId/input", assistantCapabilityController.sendTerminalInput);
14
+ app.delete("/api/assistant/terminals/:terminalId", assistantCapabilityController.closeTerminal);
15
+ app.get("/api/assistant/workspaces", assistantCapabilityController.listWorkspaces);
16
+ app.get("/api/assistant/workspaces/browse", assistantCapabilityController.browseWorkspaces);
17
+ app.post("/api/assistant/workspaces/directories", assistantCapabilityController.createWorkspaceDirectory);
18
+ app.post("/api/assistant/workspaces/import", assistantCapabilityController.importWorkspace);
19
+ app.post("/api/assistant/workspaces/clone", assistantCapabilityController.cloneWorkspace);
20
+ app.put("/api/assistant/workspaces/reorder", assistantCapabilityController.reorderWorkspaces);
21
+ app.get("/api/assistant/workspaces/:workspaceId/management", assistantCapabilityController.getWorkspaceManagementSummary);
22
+ app.put("/api/assistant/workspaces/:workspaceId/navigation-state", assistantCapabilityController.updateWorkspaceNavigationState);
23
+ app.delete("/api/assistant/workspaces/:workspaceId", assistantCapabilityController.removeWorkspace);
24
+ app.get("/api/assistant/worktrees/tree", assistantCapabilityController.getWorktreeTree);
25
+ app.post("/api/assistant/worktrees", assistantCapabilityController.createWorktree);
26
+ app.post("/api/assistant/worktrees/:workspaceId/merge-preview", assistantCapabilityController.getWorktreeMergePreview);
27
+ app.post("/api/assistant/worktrees/:workspaceId/merge-into-parent", assistantCapabilityController.mergeWorktreeIntoParent);
28
+ app.post("/api/assistant/worktrees/:workspaceId/cleanup", assistantCapabilityController.cleanupWorktree);
29
+ app.get("/api/assistant/debug-targets/compatibility-matrix", assistantCapabilityController.getDebugCompatibilityMatrix);
30
+ app.post("/api/assistant/debug-targets/analyze", assistantCapabilityController.analyzeDebugTarget);
31
+ app.get("/api/assistant/debug-targets/:targetId/framework-analysis", assistantCapabilityController.getDebugFrameworkAnalysis);
32
+ app.post("/api/assistant/debug-targets/:targetId/framework-analysis/refresh", assistantCapabilityController.refreshDebugFrameworkAnalysis);
33
+ app.post("/api/assistant/debug-targets/:targetId/launch-plan", assistantCapabilityController.createDebugLaunchPlan);
34
+ app.post("/api/assistant/debug-targets/:targetId/run", assistantCapabilityController.runDebugTarget);
35
+ app.get("/api/assistant/debug-targets/:targetId/runtime-latest", assistantCapabilityController.getLatestDebugRuntime);
36
+ app.get("/api/assistant/debug-targets/:targetId/runtimes", assistantCapabilityController.listDebugRuntimes);
37
+ app.get("/api/assistant/debug-runtimes/:runtimeId", assistantCapabilityController.getDebugRuntime);
14
38
  }
15
39
  //# sourceMappingURL=assistant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assistant.js","sourceRoot":"","sources":["../../../src/routes/assistant.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,GAAoB,EACpB,6BAA4D;IAE5D,GAAG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G,GAAG,CAAC,GAAG,CAAC,uDAAuD,EAAE,6BAA6B,CAAC,qBAAqB,CAAC,CAAC;IACtH,GAAG,CAAC,GAAG,CAAC,iDAAiD,EAAE,6BAA6B,CAAC,iBAAiB,CAAC,CAAC;IAC5G,GAAG,CAAC,GAAG,CAAC,0CAA0C,EAAE,6BAA6B,CAAC,eAAe,CAAC,CAAC;AACrG,CAAC"}
@@ -3,6 +3,8 @@ export async function registerButlerRoutes(app, butlerController) {
3
3
  app.post("/api/butler/profile/init", butlerController.initProfile);
4
4
  app.patch("/api/butler/profile", butlerController.updateProfile);
5
5
  app.get("/api/butler/control-session", butlerController.getCurrentControlSession);
6
+ app.get("/api/butler/control-sessions", butlerController.listControlSessions);
7
+ app.get("/api/butler/control-sessions/:controlSessionId", butlerController.getControlSession);
6
8
  app.get("/api/butler/control-session/events", butlerController.listControlSessionEvents);
7
9
  app.post("/api/butler/control-session/reset", butlerController.resetControlSession);
8
10
  app.post("/api/butler/control-session/start", butlerController.startControlSession);
@@ -16,6 +18,8 @@ export async function registerButlerRoutes(app, butlerController) {
16
18
  app.get("/api/butler/inbox", butlerController.listInboxItems);
17
19
  app.post("/api/butler/inbox", butlerController.createInboxItem);
18
20
  app.patch("/api/butler/inbox/:itemId", butlerController.updateInboxItem);
21
+ app.post("/api/butler/inbox/:itemId/analyze", butlerController.analyzeInboxItem);
22
+ app.post("/api/butler/inbox/:itemId/start-session", butlerController.startInboxItemSession);
19
23
  app.delete("/api/butler/inbox/:itemId", butlerController.deleteInboxItem);
20
24
  app.get("/api/butler/notifications/archives", butlerController.listNotificationArchives);
21
25
  app.patch("/api/butler/notifications/archives/:notificationId", butlerController.updateNotificationArchive);
@@ -1 +1 @@
1
- {"version":3,"file":"butler.js","sourceRoot":"","sources":["../../../src/routes/butler.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAoB,EACpB,gBAAkC;IAElC,GAAG,CAAC,GAAG,CAAC,qBAAqB,E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CAAC,IAAI,CACN,kEAAkE,EAClE,gBAAgB,CAAC,oBAAoB,CACtC,CAAC;IACF,GAAG,CAAC,IAAI,CACN,oEAAoE,EACpE,gBAAgB,CAAC,6BAA6B,CAC/C,CAAC;IACF,GAAG,CAAC,GAAG,CAAC,0CAA0C,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1F,GAAG,CAAC,IAAI,CAAC,0CAA0C,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC3F,GAAG,CAAC,KAAK,CAAC,oDAAoD,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IACtG,GAAG,CAAC,GAAG,CAAC,8CAA8C,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC1F,GAAG,CAAC,IAAI,CAAC,8CAA8C,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC5F,GAAG,CAAC,KAAK,CAAC,sDAAsD,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACrG,GAAG,CAAC,GAAG,CAAC,6CAA6C,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IACxF,GAAG,CAAC,IAAI,CAAC,mDAAmD,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/F,GAAG,CAAC,GAAG,CAAC,oDAAoD,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC7F,GAAG,CAAC,GAAG,CAAC,+CAA+C,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;IAChG,GAAG,CAAC,IAAI,CAAC,+CAA+C,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;IACjG,GAAG,CAAC,GAAG,CACL,+DAA+D,EAC/D,gBAAgB,CAAC,kBAAkB,CACpC,CAAC;AACJ,CAAC"}
@@ -1,6 +1,8 @@
1
1
  export async function registerClientRoutes(app, clientController) {
2
2
  app.get("/api/client/runtime-config", clientController.getRuntimeConfig);
3
3
  app.get("/api/client/service-update", clientController.getServiceUpdate);
4
+ app.post("/api/client/service-update/install", clientController.installServiceUpdate);
5
+ app.get("/api/client/service-update/tasks/:taskId", clientController.getServiceUpdateTask);
4
6
  app.get("/api/client/release-manifest", clientController.getReleaseManifest);
5
7
  }
6
8
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/routes/client.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAoB,EACpB,gBAAkC;IAElC,GAAG,CAAC,GAAG,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACzE,GAAG,CAAC,GAAG,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACzE,GAAG,CAAC,GAAG,CAAC,8BAA8B,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AAC/E,CAAC"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/routes/client.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAoB,EACpB,gBAAkC;IAElC,GAAG,CAAC,GAAG,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACzE,GAAG,CAAC,GAAG,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACzE,GAAG,CAAC,IAAI,CAAC,oCAAoC,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;IACtF,GAAG,CAAC,GAAG,CAAC,0CAA0C,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;IAC3F,GAAG,CAAC,GAAG,CAAC,8BAA8B,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AAC/E,CAAC"}
@@ -1,4 +1,4 @@
1
- // 会话图片附件当前通过 JSON + base64 直接提交,Fastify 默认 1MB bodyLimit
1
+ // 会话附件当前通过 JSON + base64 直接提交,Fastify 默认 1MB bodyLimit
2
2
  // 对首条/追加/排队消息都过小,合法图片会在进入 controller 前就被 413 拦掉。
3
3
  export const SESSION_MESSAGE_BODY_LIMIT_BYTES = 64 * 1024 * 1024;
4
4
  export async function registerSessionRoutes(app, sessionController) {
@@ -1 +1 @@
1
- {"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../src/routes/sessions.ts"],"names":[],"mappings":"AAIA,yDAAyD;AACzD,iDAAiD;AACjD,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAoB,EACpB,iBAAoC;IAEpC,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjD,GAAG,CAAC,GAAG,CAAC,0BAA0B,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACjE,GAAG,CAAC,GAAG,CAAC,wCAAwC,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACrF,GAAG,CAAC,GAAG,CAAC,mCAAmC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC7E,GAAG,CAAC,GAAG,CAAC,4DAA4D,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACxG,GAAG,CAAC,GAAG,CAAC,uCAAuC,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACpF,GAAG,CAAC,GAAG,CAAC,8CAA8C,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;IAClG,GAAG,CAAC,GAAG,CAAC,gCAAgC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvE,GAAG,CAAC,GAAG,CAAC,kCAAkC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC1E,GAAG,CAAC,KAAK,CAAC,gCAAgC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC3E,GAAG,CAAC,KAAK,CAAC,kCAAkC,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AAmC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC7E,GAAG,CAAC,IAAI,CACN,wCAAwC,EACxC;QACE,SAAS,EAAE,gCAAgC;KAC5C,EACD,iBAAiB,CAAC,eAAe,CAClC,CAAC;IACF,GAAG,CAAC,IAAI,CACN,+DAA+D,EAC/D,iBAAiB,CAAC,sBAAsB,CACzC,CAAC;IACF,GAAG,CAAC,IAAI,CACN,gCAAgC,EAChC;QACE,SAAS,EAAE,gCAAgC;KAC5C,EACD,iBAAiB,CAAC,kBAAkB,CACrC,CAAC;IACF,GAAG,CAAC,IAAI,CAAC,mDAAmD,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IACpG,GAAG,CAAC,IAAI,CAAC,oCAAoC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC5E,GAAG,CAAC,IAAI,CAAC,+BAA+B,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACtE,GAAG,CAAC,IAAI,CAAC,iCAAiC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACtE,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzD,GAAG,CAAC,IAAI,CACN,0BAA0B,EAC1B;QACE,SAAS,EAAE,gCAAgC;KAC5C,EACD,iBAAiB,CAAC,SAAS,CAC5B,CAAC;IACF,GAAG,CAAC,MAAM,CAAC,6CAA6C,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AACnG,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import type { FastifyInstance } from "fastify";
2
+ import type { ModelSwitchController } from "../modules/model-switch/model-switch-controller.js";
2
3
  import type { TailscaleController } from "../modules/tailscale/tailscale-controller.js";
3
- export declare function registerSystemRoutes(app: FastifyInstance, tailscaleController: TailscaleController): Promise<void>;
4
+ export declare function registerSystemRoutes(app: FastifyInstance, tailscaleController: TailscaleController, modelSwitchController: ModelSwitchController): Promise<void>;
@@ -1,9 +1,11 @@
1
- export async function registerSystemRoutes(app, tailscaleController) {
1
+ export async function registerSystemRoutes(app, tailscaleController, modelSwitchController) {
2
2
  app.get("/api/system/tailscale/status", tailscaleController.getStatus);
3
3
  app.put("/api/system/tailscale/config", tailscaleController.updateConfig);
4
4
  app.post("/api/system/tailscale/enable", tailscaleController.enable);
5
5
  app.post("/api/system/tailscale/disable", tailscaleController.disable);
6
6
  app.post("/api/system/tailscale/login", tailscaleController.login);
7
7
  app.post("/api/system/tailscale/logout", tailscaleController.logout);
8
+ app.get("/api/system/model-switch", modelSwitchController.getSnapshot);
9
+ app.post("/api/system/model-switch", modelSwitchController.switchPreset);
8
10
  }
9
11
  //# sourceMappingURL=system.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/routes/system.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAoB,EACpB,mBAAwC;IAExC,GAAG,CAAC,GAAG,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACvE,GAAG,CAAC,GAAG,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC1E,GAAG,CAAC,IAAI,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACrE,GAAG,CAAC,IAAI,CAAC,+BAA+B,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACvE,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,GAAG,CAAC,IAAI,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACvE,CAAC"}
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/routes/system.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAoB,EACpB,mBAAwC,EACxC,qBAA4C;IAE5C,GAAG,CAAC,GAAG,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACvE,GAAG,CAAC,GAAG,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC1E,GAAG,CAAC,IAAI,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACrE,GAAG,CAAC,IAAI,CAAC,+BAA+B,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACvE,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,GAAG,CAAC,IAAI,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACrE,GAAG,CAAC,GAAG,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACvE,GAAG,CAAC,IAAI,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;AAC3E,CAAC"}
@@ -32,6 +32,7 @@ import { GitReadService } from "../modules/git/git-read-service.js";
32
32
  import { GitWriteService } from "../modules/git/git-write-service.js";
33
33
  import { PreferenceProfileService } from "../modules/preferences/profile-service.js";
34
34
  import { QuickPhraseService } from "../modules/preferences/quick-phrase-service.js";
35
+ import { ModelSwitchService } from "../modules/model-switch/model-switch-service.js";
35
36
  import { SkillManagerService } from "../modules/skills/skill-manager-service.js";
36
37
  import { TailscaleManager } from "../modules/tailscale/tailscale-manager.js";
37
38
  import { TailscaleService } from "../modules/tailscale/tailscale-service.js";
@@ -50,6 +51,7 @@ import { WorktreeManager } from "../modules/worktree/worktree-manager.js";
50
51
  import { WorktreeSyncService } from "../modules/worktree/worktree-sync-service.js";
51
52
  import { WorkspaceService } from "../modules/workspace/workspace-service.js";
52
53
  import { AuthTokenRepository } from "../storage/repositories/auth-token-repository.js";
54
+ import { AuthLoginAttemptRepository } from "../storage/repositories/auth-login-attempt-repository.js";
53
55
  import { AuthUserRepository } from "../storage/repositories/auth-user-repository.js";
54
56
  import { AiFallbackEditRepository } from "../storage/repositories/ai-fallback-edit-repository.js";
55
57
  import { BootstrapStateRepository } from "../storage/repositories/bootstrap-state-repository.js";
@@ -110,6 +112,7 @@ export declare function createServer(config: HostConfig): {
110
112
  bootstrapStateRepository: BootstrapStateRepository;
111
113
  authUserRepository: AuthUserRepository;
112
114
  authTokenRepository: AuthTokenRepository;
115
+ authLoginAttemptRepository: AuthLoginAttemptRepository;
113
116
  workspaceRepository: WorkspaceRepository;
114
117
  workspaceWorktreeRepository: WorkspaceWorktreeRepository;
115
118
  workspaceNavigationStateRepository: WorkspaceNavigationStateRepository;
@@ -202,6 +205,7 @@ export declare function createServer(config: HostConfig): {
202
205
  skillManagerService: SkillManagerService;
203
206
  tailscaleManager: TailscaleManager;
204
207
  tailscaleService: TailscaleService;
208
+ modelSwitchService: ModelSwitchService;
205
209
  runtimeObservabilityService: RuntimeObservabilityService;
206
210
  sessionHistoryService: SessionHistoryService;
207
211
  sessionChangedFileService: SessionChangedFileService;
@@ -1,5 +1,6 @@
1
1
  import path from "node:path";
2
2
  import Fastify from "fastify";
3
+ import { disposeSharedOpenCodeSystemProbeHelperClient } from "../config/opencode-system-probe-helper-client.js";
3
4
  import { createAuthGuard } from "../middlewares/auth-guard.js";
4
5
  import { AuthController } from "../modules/auth/auth-controller.js";
5
6
  import { AuthService } from "../modules/auth/auth-service.js";
@@ -16,6 +17,7 @@ import { ButlerAuthService } from "../modules/butler/butler-auth-service.js";
16
17
  import { ButlerFollowUpEvaluationInstructionAdapter } from "../modules/butler/butler-follow-up-evaluation-instruction-adapter.js";
17
18
  import { ButlerFollowUpScheduler } from "../modules/butler/butler-follow-up-scheduler.js";
18
19
  import { ButlerFollowUpService } from "../modules/butler/butler-follow-up-service.js";
20
+ import { ButlerInboxAnalysisService } from "../modules/butler/butler-inbox-analysis-service.js";
19
21
  import { ButlerInboxService } from "../modules/butler/butler-inbox-service.js";
20
22
  import { ButlerNotificationService } from "../modules/butler/butler-notification-service.js";
21
23
  import { ButlerProfileService } from "../modules/butler/butler-profile-service.js";
@@ -34,6 +36,8 @@ import { SessionSummaryScheduler } from "../modules/butler/session-summary-sched
34
36
  import { VerificationRunService } from "../modules/butler/verification-run-service.js";
35
37
  import { ClientController } from "../modules/client/client-controller.js";
36
38
  import { ClientService } from "../modules/client/client-service.js";
39
+ import { NpmGlobalPackageService } from "../modules/client/npm-global-package-service.js";
40
+ import { ServiceUpdateTaskService } from "../modules/client/service-update-task-service.js";
37
41
  import { DebugTargetController } from "../modules/debug-target/debug-target-controller.js";
38
42
  import { DebugRuntimeReconciliationScheduler } from "../modules/debug-target/debug-runtime-reconciliation-scheduler.js";
39
43
  import { DebugTargetService } from "../modules/debug-target/debug-target-service.js";
@@ -62,8 +66,13 @@ import { ProfileController } from "../modules/preferences/profile-controller.js"
62
66
  import { PreferenceProfileService } from "../modules/preferences/profile-service.js";
63
67
  import { QuickPhraseController } from "../modules/preferences/quick-phrase-controller.js";
64
68
  import { QuickPhraseService } from "../modules/preferences/quick-phrase-service.js";
69
+ import { CcSwitchAdapter } from "../modules/model-switch/cc-switch-adapter.js";
70
+ import { ModelSwitchController } from "../modules/model-switch/model-switch-controller.js";
71
+ import { ModelSwitchService } from "../modules/model-switch/model-switch-service.js";
65
72
  import { ProviderController } from "../modules/provider/provider-controller.js";
73
+ import { disposeSharedProviderDiscoveryHelperClient } from "../modules/provider/provider-discovery-helper-client.js";
66
74
  import { SkillController } from "../modules/skills/skill-controller.js";
75
+ import { syncBuiltinSkillsOnStartup } from "../modules/skills/builtin-skill-service.js";
67
76
  import { SkillManagerService } from "../modules/skills/skill-manager-service.js";
68
77
  import { createDefaultSkillTargetAdapters } from "../modules/skills/skill-target-adapter.js";
69
78
  import { TailscaleManager } from "../modules/tailscale/tailscale-manager.js";
@@ -82,6 +91,7 @@ import { RuntimeObservabilityService } from "../modules/tasks/observability-serv
82
91
  import { SchedulerMetrics } from "../modules/tasks/scheduler-metrics.js";
83
92
  import { TaskActivityLog } from "../modules/tasks/task-activity-log.js";
84
93
  import { createTaskManager } from "../modules/tasks/task-manager.js";
94
+ import { disposeSharedTaskHelperProcessClient } from "../modules/tasks/task-helper-client.js";
85
95
  import { createHostTaskLaneExecutors } from "../modules/tasks/task-lane-executors.js";
86
96
  import { CommandTemplateService } from "../modules/terminal/command-template-service.js";
87
97
  import { TerminalController } from "../modules/terminal/terminal-controller.js";
@@ -122,6 +132,7 @@ import { DemoCleanupService, DemoOnlineTracker } from "../modules/demo/demo-clea
122
132
  import { setErrorHandler } from "../shared/http/error-handler.js";
123
133
  import { startTerminalDebugEventLoopLagMonitor } from "../shared/utils/terminal-debug-log.js";
124
134
  import { AuthTokenRepository } from "../storage/repositories/auth-token-repository.js";
135
+ import { AuthLoginAttemptRepository } from "../storage/repositories/auth-login-attempt-repository.js";
125
136
  import { AuthUserRepository } from "../storage/repositories/auth-user-repository.js";
126
137
  import { AiFallbackEditRepository } from "../storage/repositories/ai-fallback-edit-repository.js";
127
138
  import { BootstrapStateRepository } from "../storage/repositories/bootstrap-state-repository.js";
@@ -185,12 +196,14 @@ export function createServer(config) {
185
196
  const app = Fastify({
186
197
  logger: false
187
198
  });
199
+ let shuttingDown = false;
188
200
  const stopTerminalDebugEventLoopLagMonitor = startTerminalDebugEventLoopLagMonitor();
189
201
  const database = createDatabaseClient(config.databasePath);
190
202
  const repositories = {
191
203
  bootstrapStateRepository: new BootstrapStateRepository(database.db),
192
204
  authUserRepository: new AuthUserRepository(database.db),
193
205
  authTokenRepository: new AuthTokenRepository(database.db),
206
+ authLoginAttemptRepository: new AuthLoginAttemptRepository(database.db),
194
207
  workspaceRepository: new WorkspaceRepository(database.db),
195
208
  workspaceWorktreeRepository: new WorkspaceWorktreeRepository(database.db),
196
209
  workspaceNavigationStateRepository: new WorkspaceNavigationStateRepository(database.db),
@@ -240,7 +253,6 @@ export function createServer(config) {
240
253
  terminalCommandTemplateRepository: new TerminalCommandTemplateRepository(database.db)
241
254
  };
242
255
  const bootstrapService = new BootstrapService(database.db, repositories.bootstrapStateRepository, repositories.authUserRepository, config.demoMode);
243
- const clientService = new ClientService(config);
244
256
  // Demo 模式服务
245
257
  const demoCleanupService = config.demoMode
246
258
  ? new DemoCleanupService(database.db, config.databasePath)
@@ -251,7 +263,7 @@ export function createServer(config) {
251
263
  const demoServices = (demoCleanupService && demoOnlineTracker)
252
264
  ? { cleanupService: demoCleanupService, onlineTracker: demoOnlineTracker }
253
265
  : undefined;
254
- const authService = new AuthService(repositories.bootstrapStateRepository, repositories.authUserRepository, repositories.authTokenRepository, effectiveConfig, demoServices);
266
+ const authService = new AuthService(repositories.bootstrapStateRepository, repositories.authUserRepository, repositories.authTokenRepository, repositories.authLoginAttemptRepository, effectiveConfig, demoServices);
255
267
  const butlerProfileService = new ButlerProfileService(repositories.butlerProfileRepository, repositories.butlerProjectRepository, path.dirname(config.databasePath));
256
268
  const gitCommandRunner = new GitCommandRunner({
257
269
  preferHelperProcess: !process.env.VITEST
@@ -261,6 +273,9 @@ export function createServer(config) {
261
273
  let runtimeObservabilityService;
262
274
  const taskActivityLog = new TaskActivityLog(() => runtimeObservabilityService.hasActiveSession());
263
275
  const taskManager = createTaskManager(taskActivityLog, createHostTaskLaneExecutors());
276
+ const npmGlobalPackageService = new NpmGlobalPackageService(config);
277
+ const serviceUpdateTaskService = new ServiceUpdateTaskService(taskManager, npmGlobalPackageService);
278
+ const clientService = new ClientService(config, npmGlobalPackageService, serviceUpdateTaskService);
264
279
  const workspaceService = new WorkspaceService(repositories.workspaceRepository, gitCommandRunner, repositories.workspaceNavigationStateRepository, butlerProfileService, repositories.workspaceWorktreeRepository, taskManager);
265
280
  const fileAccessGuard = new FileAccessGuard(workspaceService, app.log);
266
281
  const recentFileService = new RecentFileService(repositories.recentFileRepository);
@@ -285,9 +300,20 @@ export function createServer(config) {
285
300
  const tailscaleService = new TailscaleService(database.db, repositories.instanceTailscaleRepository, tailscaleManager, {
286
301
  databasePath: config.databasePath
287
302
  });
303
+ const modelSwitchService = new ModelSwitchService(new CcSwitchAdapter({
304
+ commandPath: config.ccSwitchCliPath,
305
+ dbPath: config.ccSwitchDbPath
306
+ }));
288
307
  const skillManagerService = new SkillManagerService(repositories.managedSkillRepository, repositories.skillTargetBindingRepository, createDefaultSkillTargetAdapters(config), {
289
308
  ssotRootDir: path.join(path.dirname(config.databasePath), "skills")
290
309
  });
310
+ for (const result of syncBuiltinSkillsOnStartup(skillManagerService)) {
311
+ if (result.ok) {
312
+ console.info(`[host] 已同步内置 Skill ${result.directoryName} -> ${result.targetCli.join(",")}`);
313
+ continue;
314
+ }
315
+ console.warn(`[host] 同步内置 Skill 失败 ${result.directoryName}: ${result.errorDetail ?? "unknown error"}`);
316
+ }
291
317
  const commitRuleEngine = new CommitRuleEngine();
292
318
  const commitDraftService = new CommitDraftService(gitReadService);
293
319
  const commitOrchestrator = new CommitOrchestrator(gitRuleRepository, commitRuleEngine, commitDraftService, gitWriteService, repositories.aiFallbackEditRepository);
@@ -326,7 +352,7 @@ export function createServer(config) {
326
352
  const worktreeCleanupService = new WorktreeCleanupService(workspaceService, repositories.workspaceWorktreeRepository, repositories.sessionIndexRepository, repositories.terminalInstanceRepository, gitReadService, gitCommandRunner, worktreeSyncService);
327
353
  const workbenchService = new WorkbenchService(repositories.workspaceRepository, repositories.workspaceNavigationStateRepository, sessionHistoryService, butlerProfileService, repositories.butlerControlSessionRepository, repositories.workspaceWorktreeRepository, taskManager);
328
354
  const butlerProjectService = new ButlerProjectService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.workspaceRepository, butlerProfileService);
329
- const butlerInboxService = new ButlerInboxService(repositories.butlerProjectRepository, repositories.butlerInboxItemRepository);
355
+ const butlerInboxService = new ButlerInboxService(repositories.butlerProjectRepository, repositories.butlerInboxItemRepository, taskManager);
330
356
  const butlerNotificationService = new ButlerNotificationService(repositories.butlerNotificationArchiveRepository);
331
357
  const butlerSessionService = new ButlerSessionService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.sessionCheckpointRepository, repositories.sessionBindingRepository, repositories.sessionIndexRepository, repositories.sessionStateRepository, sessionLiveRuntimeService, sessionHistoryService);
332
358
  const projectMemoryService = new ProjectMemoryService(repositories.butlerProjectRepository, repositories.projectMemoryRepository);
@@ -345,6 +371,10 @@ export function createServer(config) {
345
371
  new RuntimePatrolProviderAdapter("codex", butlerFollowUpSessionLiveRuntimeService, sessionHistoryService),
346
372
  new RuntimePatrolProviderAdapter("claude-code", butlerFollowUpSessionLiveRuntimeService, sessionHistoryService)
347
373
  ]);
374
+ const butlerAnalysisProviderAdapterRegistry = new ProviderAdapterRegistry([
375
+ new RuntimePatrolProviderAdapter("codex", butlerSessionLiveRuntimeService, sessionHistoryService),
376
+ new RuntimePatrolProviderAdapter("claude-code", butlerSessionLiveRuntimeService, sessionHistoryService)
377
+ ]);
348
378
  const patrolExecutionService = new PatrolExecutionService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.sessionCheckpointRepository, repositories.patrolPlanRepository, patrolRunService, repositories.projectMemoryRepository, repositories.sessionChangedFileRepository, repositories.authUserRepository, providerAdapterRegistry, instructionAdapter);
349
379
  const patrolScheduler = new PatrolScheduler(patrolPlanService, patrolRunService, patrolExecutionService, {
350
380
  schedulerMetrics
@@ -354,6 +384,7 @@ export function createServer(config) {
354
384
  const verificationRunService = new VerificationRunService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.sessionCheckpointRepository, repositories.verificationRunRepository);
355
385
  const butlerContextAggregator = new ButlerContextAggregator(butlerProfileService, butlerProjectService, butlerSessionService, butlerInboxService, projectMemoryService, patrolRunService, verificationRunService, repositories.sessionCheckpointRepository);
356
386
  const butlerAuthService = new ButlerAuthService(repositories.authTokenRepository, config);
387
+ const butlerInboxAnalysisService = new ButlerInboxAnalysisService(butlerProfileService, workspaceService, butlerContextAggregator, butlerAuthService, skillManagerService, sessionHistoryService, butlerSessionLiveRuntimeService, butlerAnalysisProviderAdapterRegistry, butlerRuntimeConfig.codexHomeDir, config.codexHomeDir);
357
388
  const butlerSessionSummaryService = new ButlerSessionSummaryService(butlerProfileService, butlerProjectService, butlerSessionService, repositories.butlerSessionRepository, repositories.butlerSessionSummaryStateRepository, repositories.sessionCheckpointRepository, repositories.sessionIndexRepository, repositories.authUserRepository, workspaceService, sessionHistoryService, summaryProviderAdapterRegistry, sessionSummaryInstructionAdapter, {
358
389
  summaryCodexHomeDir: butlerSummaryRuntimeConfig.codexHomeDir,
359
390
  sourceCodexHomeDir: config.codexHomeDir
@@ -370,6 +401,12 @@ export function createServer(config) {
370
401
  await butlerFollowUpService.handleSessionTerminal(event.sessionId, event.timestamp);
371
402
  });
372
403
  const butlerControlSessionService = new ButlerControlSessionService(butlerProfileService, repositories.butlerControlSessionRepository, workspaceService, sessionHistoryService, butlerSessionLiveRuntimeService, butlerContextAggregator, butlerAuthService, skillManagerService, butlerRuntimeConfig.codexHomeDir, config.codexHomeDir);
404
+ butlerInboxService.configureLifecycleServices({
405
+ butlerInboxAnalysisService,
406
+ butlerControlSessionService,
407
+ butlerSessionService,
408
+ butlerFollowUpService
409
+ });
373
410
  const butlerControlActionService = new ButlerControlActionService(butlerProfileService, repositories.butlerControlSessionRepository, repositories.butlerControlEventRepository, butlerProjectService, butlerSessionService, patrolRunService, patrolExecutionService, verificationRunService, butlerContextAggregator);
374
411
  const fileContextService = new FileContextService(sessionHistoryService, repositories.fileContextBindingRepository);
375
412
  const terminalService = new TerminalService(database.db, repositories.terminalInstanceRepository, repositories.terminalRuntimeSessionRepository, workspaceService, config.terminalIdleTimeoutSeconds, {
@@ -399,10 +436,11 @@ export function createServer(config) {
399
436
  const workbenchController = new WorkbenchController(workbenchService);
400
437
  const butlerController = new ButlerController(butlerProfileService, butlerControlSessionService, butlerControlActionService, butlerContextAggregator, butlerFollowUpService, butlerInboxService, butlerNotificationService, butlerProjectService, butlerSessionService, projectMemoryService, patrolPlanService, patrolRunService, patrolExecutionService, verificationRunService, butlerActionContextService);
401
438
  const sessionController = new SessionController(sessionHistoryService, sessionLiveRuntimeService, repositories.butlerControlSessionRepository);
402
- const assistantCapabilityController = new AssistantCapabilityController(new AssistantCapabilityService(butlerProjectService, butlerSessionService, sessionHistoryService, sessionLiveRuntimeService, terminalService));
439
+ const assistantCapabilityController = new AssistantCapabilityController(new AssistantCapabilityService(butlerProjectService, butlerSessionService, sessionHistoryService, sessionLiveRuntimeService, terminalService, debugTargetService, workspaceService, worktreeManager, worktreeSyncService, worktreeMergeService, worktreeCleanupService));
403
440
  const providerController = new ProviderController(sessionHistoryService, sessionLiveRuntimeService, config);
404
441
  const skillController = new SkillController(skillManagerService);
405
442
  const tailscaleController = new TailscaleController(tailscaleService);
443
+ const modelSwitchController = new ModelSwitchController(modelSwitchService);
406
444
  const quickPhraseController = new QuickPhraseController(quickPhraseService);
407
445
  const profileController = new ProfileController(preferenceProfileService);
408
446
  const fileController = new FileController(fileTreeService, fileContentService, fileSearchService, recentFileService, filePreviewService, filePreviewLinkService);
@@ -423,9 +461,24 @@ export function createServer(config) {
423
461
  });
424
462
  app.addHook("onRequest", createAuthGuard(authService));
425
463
  app.setErrorHandler(setErrorHandler);
426
- app.addHook("onReady", async () => {
427
- await debugTargetService.runBackgroundRuntimeReconciliation("debug_target.startup_runtime_recovery");
428
- await tailscaleService.restoreOnStartup();
464
+ app.addHook("onReady", () => {
465
+ // 启动恢复属于后台补偿流程,不能把 Host ready 绑死在外部命令或慢任务上。
466
+ void debugTargetService.runBackgroundRuntimeReconciliation("debug_target.startup_runtime_recovery").catch((error) => {
467
+ if (shuttingDown) {
468
+ return;
469
+ }
470
+ console.error("[startup-recovery] 调试运行时恢复失败", {
471
+ error: error instanceof Error ? error.message : String(error)
472
+ });
473
+ });
474
+ void tailscaleService.restoreOnStartup().catch((error) => {
475
+ if (shuttingDown) {
476
+ return;
477
+ }
478
+ console.error("[startup-recovery] Tailscale 启动恢复失败", {
479
+ error: error instanceof Error ? error.message : String(error)
480
+ });
481
+ });
429
482
  });
430
483
  // Demo 模式:自动创建演示用户
431
484
  if (config.demoMode) {
@@ -448,7 +501,7 @@ export function createServer(config) {
448
501
  void registerSessionRoutes(app, sessionController);
449
502
  void registerPreferenceRoutes(app, quickPhraseController, profileController);
450
503
  void registerSkillRoutes(app, skillController);
451
- void registerSystemRoutes(app, tailscaleController);
504
+ void registerSystemRoutes(app, tailscaleController, modelSwitchController);
452
505
  void registerFileRoutes(app, fileController);
453
506
  void registerSessionContextRoutes(app, fileContextController);
454
507
  void registerTerminalRoutes(app, terminalController);
@@ -462,6 +515,7 @@ export function createServer(config) {
462
515
  registerStaticWebRoutes(app, config.webUiDir);
463
516
  }
464
517
  app.addHook("onClose", async () => {
518
+ shuttingDown = true;
465
519
  stopTerminalDebugEventLoopLagMonitor();
466
520
  eventLoopMonitor.dispose();
467
521
  butlerFollowUpTerminalSubscription.close();
@@ -476,8 +530,12 @@ export function createServer(config) {
476
530
  await butlerSessionLiveRuntimeService.dispose();
477
531
  await sessionLiveRuntimeService.dispose();
478
532
  await wsHandle.close();
533
+ config.opencodeBaseUrlResolver?.dispose?.();
479
534
  gitCommandRunner.dispose();
480
535
  tailscaleHelperClient.dispose();
536
+ disposeSharedTaskHelperProcessClient();
537
+ disposeSharedProviderDiscoveryHelperClient();
538
+ disposeSharedOpenCodeSystemProbeHelperClient();
481
539
  database.close();
482
540
  });
483
541
  return {
@@ -530,6 +588,7 @@ export function createServer(config) {
530
588
  skillManagerService,
531
589
  tailscaleManager,
532
590
  tailscaleService,
591
+ modelSwitchService,
533
592
  runtimeObservabilityService,
534
593
  sessionHistoryService,
535
594
  sessionChangedFileService,