xtep-workspace 1.10.10

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 (418) hide show
  1. package/CHANGELOG.md +525 -0
  2. package/README.md +188 -0
  3. package/config/component-versions.json +16 -0
  4. package/config/scenarioCapabilities.json +29 -0
  5. package/config/version-notes.yaml +244 -0
  6. package/dist/adapters/OutputAdapter.d.ts +79 -0
  7. package/dist/adapters/OutputAdapter.d.ts.map +1 -0
  8. package/dist/adapters/OutputAdapter.js +124 -0
  9. package/dist/adapters/OutputAdapter.js.map +1 -0
  10. package/dist/cli/check-node-version.d.ts +3 -0
  11. package/dist/cli/check-node-version.d.ts.map +1 -0
  12. package/dist/cli/check-node-version.js +153 -0
  13. package/dist/cli/check-node-version.js.map +1 -0
  14. package/dist/cli/plugins.d.ts +41 -0
  15. package/dist/cli/plugins.d.ts.map +1 -0
  16. package/dist/cli/plugins.js +742 -0
  17. package/dist/cli/plugins.js.map +1 -0
  18. package/dist/cli/rebuild.d.ts +63 -0
  19. package/dist/cli/rebuild.d.ts.map +1 -0
  20. package/dist/cli/rebuild.js +989 -0
  21. package/dist/cli/rebuild.js.map +1 -0
  22. package/dist/cli/repair.d.ts +7 -0
  23. package/dist/cli/repair.d.ts.map +1 -0
  24. package/dist/cli/repair.js +925 -0
  25. package/dist/cli/repair.js.map +1 -0
  26. package/dist/cli/setup.d.ts +7 -0
  27. package/dist/cli/setup.d.ts.map +1 -0
  28. package/dist/cli/setup.js +452 -0
  29. package/dist/cli/setup.js.map +1 -0
  30. package/dist/cli/update.d.ts +10 -0
  31. package/dist/cli/update.d.ts.map +1 -0
  32. package/dist/cli/update.js +426 -0
  33. package/dist/cli/update.js.map +1 -0
  34. package/dist/cli/webui.d.ts +6 -0
  35. package/dist/cli/webui.d.ts.map +1 -0
  36. package/dist/cli/webui.js +210 -0
  37. package/dist/cli/webui.js.map +1 -0
  38. package/dist/http/index.d.ts +3 -0
  39. package/dist/http/index.d.ts.map +1 -0
  40. package/dist/http/index.js +15 -0
  41. package/dist/http/index.js.map +1 -0
  42. package/dist/http/middleware/errorHandler.d.ts +16 -0
  43. package/dist/http/middleware/errorHandler.d.ts.map +1 -0
  44. package/dist/http/middleware/errorHandler.js +79 -0
  45. package/dist/http/middleware/errorHandler.js.map +1 -0
  46. package/dist/http/routes/admin.d.ts +3 -0
  47. package/dist/http/routes/admin.d.ts.map +1 -0
  48. package/dist/http/routes/admin.js +730 -0
  49. package/dist/http/routes/admin.js.map +1 -0
  50. package/dist/http/routes/backup.d.ts +3 -0
  51. package/dist/http/routes/backup.d.ts.map +1 -0
  52. package/dist/http/routes/backup.js +172 -0
  53. package/dist/http/routes/backup.js.map +1 -0
  54. package/dist/http/routes/config.d.ts +3 -0
  55. package/dist/http/routes/config.d.ts.map +1 -0
  56. package/dist/http/routes/config.js +157 -0
  57. package/dist/http/routes/config.js.map +1 -0
  58. package/dist/http/routes/context.d.ts +3 -0
  59. package/dist/http/routes/context.d.ts.map +1 -0
  60. package/dist/http/routes/context.js +82 -0
  61. package/dist/http/routes/context.js.map +1 -0
  62. package/dist/http/routes/log.d.ts +3 -0
  63. package/dist/http/routes/log.d.ts.map +1 -0
  64. package/dist/http/routes/log.js +105 -0
  65. package/dist/http/routes/log.js.map +1 -0
  66. package/dist/http/routes/memo.d.ts +6 -0
  67. package/dist/http/routes/memo.d.ts.map +1 -0
  68. package/dist/http/routes/memo.js +29 -0
  69. package/dist/http/routes/memo.js.map +1 -0
  70. package/dist/http/routes/node.d.ts +3 -0
  71. package/dist/http/routes/node.d.ts.map +1 -0
  72. package/dist/http/routes/node.js +251 -0
  73. package/dist/http/routes/node.js.map +1 -0
  74. package/dist/http/routes/state.d.ts +3 -0
  75. package/dist/http/routes/state.d.ts.map +1 -0
  76. package/dist/http/routes/state.js +48 -0
  77. package/dist/http/routes/state.js.map +1 -0
  78. package/dist/http/routes/workspace.d.ts +3 -0
  79. package/dist/http/routes/workspace.d.ts.map +1 -0
  80. package/dist/http/routes/workspace.js +249 -0
  81. package/dist/http/routes/workspace.js.map +1 -0
  82. package/dist/http/server.d.ts +10 -0
  83. package/dist/http/server.d.ts.map +1 -0
  84. package/dist/http/server.js +284 -0
  85. package/dist/http/server.js.map +1 -0
  86. package/dist/http/services.d.ts +93 -0
  87. package/dist/http/services.d.ts.map +1 -0
  88. package/dist/http/services.js +297 -0
  89. package/dist/http/services.js.map +1 -0
  90. package/dist/index.d.ts +3 -0
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +1073 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/prompts/guidanceContent.d.ts +18 -0
  95. package/dist/prompts/guidanceContent.d.ts.map +1 -0
  96. package/dist/prompts/guidanceContent.js +814 -0
  97. package/dist/prompts/guidanceContent.js.map +1 -0
  98. package/dist/prompts/index.d.ts +2 -0
  99. package/dist/prompts/index.d.ts.map +1 -0
  100. package/dist/prompts/index.js +4 -0
  101. package/dist/prompts/index.js.map +1 -0
  102. package/dist/prompts/instructions.d.ts +56 -0
  103. package/dist/prompts/instructions.d.ts.map +1 -0
  104. package/dist/prompts/instructions.js +1343 -0
  105. package/dist/prompts/instructions.js.map +1 -0
  106. package/dist/services/BackupService.d.ts +104 -0
  107. package/dist/services/BackupService.d.ts.map +1 -0
  108. package/dist/services/BackupService.js +549 -0
  109. package/dist/services/BackupService.js.map +1 -0
  110. package/dist/services/CapabilityService.d.ts +38 -0
  111. package/dist/services/CapabilityService.d.ts.map +1 -0
  112. package/dist/services/CapabilityService.js +256 -0
  113. package/dist/services/CapabilityService.js.map +1 -0
  114. package/dist/services/ConfigService.d.ts +35 -0
  115. package/dist/services/ConfigService.d.ts.map +1 -0
  116. package/dist/services/ConfigService.js +105 -0
  117. package/dist/services/ConfigService.js.map +1 -0
  118. package/dist/services/ContextService.d.ts +65 -0
  119. package/dist/services/ContextService.d.ts.map +1 -0
  120. package/dist/services/ContextService.js +503 -0
  121. package/dist/services/ContextService.js.map +1 -0
  122. package/dist/services/DetectionService.d.ts +76 -0
  123. package/dist/services/DetectionService.d.ts.map +1 -0
  124. package/dist/services/DetectionService.js +262 -0
  125. package/dist/services/DetectionService.js.map +1 -0
  126. package/dist/services/DispatchService.d.ts +267 -0
  127. package/dist/services/DispatchService.d.ts.map +1 -0
  128. package/dist/services/DispatchService.js +1357 -0
  129. package/dist/services/DispatchService.js.map +1 -0
  130. package/dist/services/EventService.d.ts +81 -0
  131. package/dist/services/EventService.d.ts.map +1 -0
  132. package/dist/services/EventService.js +187 -0
  133. package/dist/services/EventService.js.map +1 -0
  134. package/dist/services/GuidanceService.d.ts +64 -0
  135. package/dist/services/GuidanceService.d.ts.map +1 -0
  136. package/dist/services/GuidanceService.js +259 -0
  137. package/dist/services/GuidanceService.js.map +1 -0
  138. package/dist/services/HealthService.d.ts +43 -0
  139. package/dist/services/HealthService.d.ts.map +1 -0
  140. package/dist/services/HealthService.js +276 -0
  141. package/dist/services/HealthService.js.map +1 -0
  142. package/dist/services/InstallationService.d.ts +62 -0
  143. package/dist/services/InstallationService.d.ts.map +1 -0
  144. package/dist/services/InstallationService.js +204 -0
  145. package/dist/services/InstallationService.js.map +1 -0
  146. package/dist/services/LogService.d.ts +35 -0
  147. package/dist/services/LogService.d.ts.map +1 -0
  148. package/dist/services/LogService.js +189 -0
  149. package/dist/services/LogService.js.map +1 -0
  150. package/dist/services/MemoService.d.ts +39 -0
  151. package/dist/services/MemoService.d.ts.map +1 -0
  152. package/dist/services/MemoService.js +288 -0
  153. package/dist/services/MemoService.js.map +1 -0
  154. package/dist/services/NodeService.d.ts +90 -0
  155. package/dist/services/NodeService.d.ts.map +1 -0
  156. package/dist/services/NodeService.js +958 -0
  157. package/dist/services/NodeService.js.map +1 -0
  158. package/dist/services/OpenSpecParser.d.ts +43 -0
  159. package/dist/services/OpenSpecParser.d.ts.map +1 -0
  160. package/dist/services/OpenSpecParser.js +191 -0
  161. package/dist/services/OpenSpecParser.js.map +1 -0
  162. package/dist/services/ReferenceService.d.ts +35 -0
  163. package/dist/services/ReferenceService.d.ts.map +1 -0
  164. package/dist/services/ReferenceService.js +195 -0
  165. package/dist/services/ReferenceService.js.map +1 -0
  166. package/dist/services/RepairService.d.ts +36 -0
  167. package/dist/services/RepairService.d.ts.map +1 -0
  168. package/dist/services/RepairService.js +429 -0
  169. package/dist/services/RepairService.js.map +1 -0
  170. package/dist/services/SearchService.d.ts +34 -0
  171. package/dist/services/SearchService.d.ts.map +1 -0
  172. package/dist/services/SearchService.js +293 -0
  173. package/dist/services/SearchService.js.map +1 -0
  174. package/dist/services/SessionService.d.ts +136 -0
  175. package/dist/services/SessionService.d.ts.map +1 -0
  176. package/dist/services/SessionService.js +297 -0
  177. package/dist/services/SessionService.js.map +1 -0
  178. package/dist/services/StateService.d.ts +97 -0
  179. package/dist/services/StateService.d.ts.map +1 -0
  180. package/dist/services/StateService.js +846 -0
  181. package/dist/services/StateService.js.map +1 -0
  182. package/dist/services/TutorialService.d.ts +114 -0
  183. package/dist/services/TutorialService.d.ts.map +1 -0
  184. package/dist/services/TutorialService.js +1262 -0
  185. package/dist/services/TutorialService.js.map +1 -0
  186. package/dist/services/WorkspaceService.d.ts +273 -0
  187. package/dist/services/WorkspaceService.d.ts.map +1 -0
  188. package/dist/services/WorkspaceService.js +1764 -0
  189. package/dist/services/WorkspaceService.js.map +1 -0
  190. package/dist/services/index.d.ts +15 -0
  191. package/dist/services/index.d.ts.map +1 -0
  192. package/dist/services/index.js +14 -0
  193. package/dist/services/index.js.map +1 -0
  194. package/dist/storage/FileSystemAdapter.d.ts +223 -0
  195. package/dist/storage/FileSystemAdapter.d.ts.map +1 -0
  196. package/dist/storage/FileSystemAdapter.js +384 -0
  197. package/dist/storage/FileSystemAdapter.js.map +1 -0
  198. package/dist/storage/JsonStorage.d.ts +158 -0
  199. package/dist/storage/JsonStorage.d.ts.map +1 -0
  200. package/dist/storage/JsonStorage.js +613 -0
  201. package/dist/storage/JsonStorage.js.map +1 -0
  202. package/dist/storage/MarkdownStorage.d.ts +178 -0
  203. package/dist/storage/MarkdownStorage.d.ts.map +1 -0
  204. package/dist/storage/MarkdownStorage.js +918 -0
  205. package/dist/storage/MarkdownStorage.js.map +1 -0
  206. package/dist/storage/SessionBindingStorage.d.ts +69 -0
  207. package/dist/storage/SessionBindingStorage.d.ts.map +1 -0
  208. package/dist/storage/SessionBindingStorage.js +131 -0
  209. package/dist/storage/SessionBindingStorage.js.map +1 -0
  210. package/dist/storage/index.d.ts +6 -0
  211. package/dist/storage/index.d.ts.map +1 -0
  212. package/dist/storage/index.js +6 -0
  213. package/dist/storage/index.js.map +1 -0
  214. package/dist/tools/capability.d.ts +18 -0
  215. package/dist/tools/capability.d.ts.map +1 -0
  216. package/dist/tools/capability.js +73 -0
  217. package/dist/tools/capability.js.map +1 -0
  218. package/dist/tools/config.d.ts +14 -0
  219. package/dist/tools/config.d.ts.map +1 -0
  220. package/dist/tools/config.js +61 -0
  221. package/dist/tools/config.js.map +1 -0
  222. package/dist/tools/context.d.ts +22 -0
  223. package/dist/tools/context.d.ts.map +1 -0
  224. package/dist/tools/context.js +139 -0
  225. package/dist/tools/context.js.map +1 -0
  226. package/dist/tools/dispatch.d.ts +41 -0
  227. package/dist/tools/dispatch.d.ts.map +1 -0
  228. package/dist/tools/dispatch.js +380 -0
  229. package/dist/tools/dispatch.js.map +1 -0
  230. package/dist/tools/help.d.ts +44 -0
  231. package/dist/tools/help.d.ts.map +1 -0
  232. package/dist/tools/help.js +227 -0
  233. package/dist/tools/help.js.map +1 -0
  234. package/dist/tools/import.d.ts +17 -0
  235. package/dist/tools/import.d.ts.map +1 -0
  236. package/dist/tools/import.js +96 -0
  237. package/dist/tools/import.js.map +1 -0
  238. package/dist/tools/index.d.ts +12 -0
  239. package/dist/tools/index.d.ts.map +1 -0
  240. package/dist/tools/index.js +13 -0
  241. package/dist/tools/index.js.map +1 -0
  242. package/dist/tools/log.d.ts +21 -0
  243. package/dist/tools/log.d.ts.map +1 -0
  244. package/dist/tools/log.js +93 -0
  245. package/dist/tools/log.js.map +1 -0
  246. package/dist/tools/memo.d.ts +26 -0
  247. package/dist/tools/memo.d.ts.map +1 -0
  248. package/dist/tools/memo.js +188 -0
  249. package/dist/tools/memo.js.map +1 -0
  250. package/dist/tools/node.d.ts +34 -0
  251. package/dist/tools/node.d.ts.map +1 -0
  252. package/dist/tools/node.js +328 -0
  253. package/dist/tools/node.js.map +1 -0
  254. package/dist/tools/search.d.ts +14 -0
  255. package/dist/tools/search.d.ts.map +1 -0
  256. package/dist/tools/search.js +95 -0
  257. package/dist/tools/search.js.map +1 -0
  258. package/dist/tools/session.d.ts +22 -0
  259. package/dist/tools/session.d.ts.map +1 -0
  260. package/dist/tools/session.js +127 -0
  261. package/dist/tools/session.js.map +1 -0
  262. package/dist/tools/state.d.ts +10 -0
  263. package/dist/tools/state.d.ts.map +1 -0
  264. package/dist/tools/state.js +79 -0
  265. package/dist/tools/state.js.map +1 -0
  266. package/dist/tools/workspace.d.ts +38 -0
  267. package/dist/tools/workspace.d.ts.map +1 -0
  268. package/dist/tools/workspace.js +240 -0
  269. package/dist/tools/workspace.js.map +1 -0
  270. package/dist/types/capability.d.ts +36 -0
  271. package/dist/types/capability.d.ts.map +1 -0
  272. package/dist/types/capability.js +3 -0
  273. package/dist/types/capability.js.map +1 -0
  274. package/dist/types/confirmation.d.ts +35 -0
  275. package/dist/types/confirmation.d.ts.map +1 -0
  276. package/dist/types/confirmation.js +3 -0
  277. package/dist/types/confirmation.js.map +1 -0
  278. package/dist/types/context.d.ts +174 -0
  279. package/dist/types/context.d.ts.map +1 -0
  280. package/dist/types/context.js +3 -0
  281. package/dist/types/context.js.map +1 -0
  282. package/dist/types/errors.d.ts +81 -0
  283. package/dist/types/errors.d.ts.map +1 -0
  284. package/dist/types/errors.js +154 -0
  285. package/dist/types/errors.js.map +1 -0
  286. package/dist/types/guidance.d.ts +162 -0
  287. package/dist/types/guidance.d.ts.map +1 -0
  288. package/dist/types/guidance.js +4 -0
  289. package/dist/types/guidance.js.map +1 -0
  290. package/dist/types/health.d.ts +61 -0
  291. package/dist/types/health.d.ts.map +1 -0
  292. package/dist/types/health.js +3 -0
  293. package/dist/types/health.js.map +1 -0
  294. package/dist/types/index.d.ts +10 -0
  295. package/dist/types/index.d.ts.map +1 -0
  296. package/dist/types/index.js +11 -0
  297. package/dist/types/index.js.map +1 -0
  298. package/dist/types/memo.d.ts +132 -0
  299. package/dist/types/memo.d.ts.map +1 -0
  300. package/dist/types/memo.js +3 -0
  301. package/dist/types/memo.js.map +1 -0
  302. package/dist/types/node.d.ts +316 -0
  303. package/dist/types/node.d.ts.map +1 -0
  304. package/dist/types/node.js +3 -0
  305. package/dist/types/node.js.map +1 -0
  306. package/dist/types/repair.d.ts +62 -0
  307. package/dist/types/repair.d.ts.map +1 -0
  308. package/dist/types/repair.js +4 -0
  309. package/dist/types/repair.js.map +1 -0
  310. package/dist/types/search.d.ts +58 -0
  311. package/dist/types/search.d.ts.map +1 -0
  312. package/dist/types/search.js +3 -0
  313. package/dist/types/search.js.map +1 -0
  314. package/dist/types/settings.d.ts +109 -0
  315. package/dist/types/settings.d.ts.map +1 -0
  316. package/dist/types/settings.js +30 -0
  317. package/dist/types/settings.js.map +1 -0
  318. package/dist/types/workspace.d.ts +357 -0
  319. package/dist/types/workspace.d.ts.map +1 -0
  320. package/dist/types/workspace.js +3 -0
  321. package/dist/types/workspace.js.map +1 -0
  322. package/dist/utils/contentValidation.d.ts +47 -0
  323. package/dist/utils/contentValidation.d.ts.map +1 -0
  324. package/dist/utils/contentValidation.js +93 -0
  325. package/dist/utils/contentValidation.js.map +1 -0
  326. package/dist/utils/devLog.d.ts +43 -0
  327. package/dist/utils/devLog.d.ts.map +1 -0
  328. package/dist/utils/devLog.js +94 -0
  329. package/dist/utils/devLog.js.map +1 -0
  330. package/dist/utils/errorLogger.d.ts +27 -0
  331. package/dist/utils/errorLogger.d.ts.map +1 -0
  332. package/dist/utils/errorLogger.js +105 -0
  333. package/dist/utils/errorLogger.js.map +1 -0
  334. package/dist/utils/git.d.ts +123 -0
  335. package/dist/utils/git.d.ts.map +1 -0
  336. package/dist/utils/git.js +400 -0
  337. package/dist/utils/git.js.map +1 -0
  338. package/dist/utils/hash.d.ts +32 -0
  339. package/dist/utils/hash.d.ts.map +1 -0
  340. package/dist/utils/hash.js +37 -0
  341. package/dist/utils/hash.js.map +1 -0
  342. package/dist/utils/id.d.ts +54 -0
  343. package/dist/utils/id.d.ts.map +1 -0
  344. package/dist/utils/id.js +96 -0
  345. package/dist/utils/id.js.map +1 -0
  346. package/dist/utils/index.d.ts +8 -0
  347. package/dist/utils/index.d.ts.map +1 -0
  348. package/dist/utils/index.js +9 -0
  349. package/dist/utils/index.js.map +1 -0
  350. package/dist/utils/logger.d.ts +42 -0
  351. package/dist/utils/logger.d.ts.map +1 -0
  352. package/dist/utils/logger.js +228 -0
  353. package/dist/utils/logger.js.map +1 -0
  354. package/dist/utils/manualChangeFormatter.d.ts +8 -0
  355. package/dist/utils/manualChangeFormatter.d.ts.map +1 -0
  356. package/dist/utils/manualChangeFormatter.js +21 -0
  357. package/dist/utils/manualChangeFormatter.js.map +1 -0
  358. package/dist/utils/paramValidator.d.ts +35 -0
  359. package/dist/utils/paramValidator.d.ts.map +1 -0
  360. package/dist/utils/paramValidator.js +214 -0
  361. package/dist/utils/paramValidator.js.map +1 -0
  362. package/dist/utils/port.d.ts +7 -0
  363. package/dist/utils/port.d.ts.map +1 -0
  364. package/dist/utils/port.js +28 -0
  365. package/dist/utils/port.js.map +1 -0
  366. package/dist/utils/processManager.d.ts +53 -0
  367. package/dist/utils/processManager.d.ts.map +1 -0
  368. package/dist/utils/processManager.js +267 -0
  369. package/dist/utils/processManager.js.map +1 -0
  370. package/dist/utils/sessionLogger.d.ts +28 -0
  371. package/dist/utils/sessionLogger.d.ts.map +1 -0
  372. package/dist/utils/sessionLogger.js +142 -0
  373. package/dist/utils/sessionLogger.js.map +1 -0
  374. package/dist/utils/time.d.ts +15 -0
  375. package/dist/utils/time.d.ts.map +1 -0
  376. package/dist/utils/time.js +32 -0
  377. package/dist/utils/time.js.map +1 -0
  378. package/dist/utils/validation.d.ts +23 -0
  379. package/dist/utils/validation.d.ts.map +1 -0
  380. package/dist/utils/validation.js +88 -0
  381. package/dist/utils/validation.js.map +1 -0
  382. package/docs//346/227/245/345/277/227/347/263/273/347/273/237.md +389 -0
  383. package/docs//347/224/250/346/210/267/346/211/213/345/206/214.md +1446 -0
  384. package/docs//347/224/250/346/210/267/346/211/213/345/206/214/344/270/216/346/212/200/346/234/257/346/214/207/345/215/227.md +873 -0
  385. package/package.json +89 -0
  386. package/plugin/README.md +141 -0
  387. package/plugin/agents/xtep-executor.md +114 -0
  388. package/plugin/agents/xtep-reviewer.md +133 -0
  389. package/plugin/docs/diagnostic-guide.md +128 -0
  390. package/plugin/hooks/hooks.json.deprecated +70 -0
  391. package/plugin/scripts/cursor-hook-entry.cjs +217 -0
  392. package/plugin/scripts/hook-entry.cjs +663 -0
  393. package/plugin/scripts/openspec-import.cjs +714 -0
  394. package/plugin/scripts/shared/binding.cjs +98 -0
  395. package/plugin/scripts/shared/config.cjs +65 -0
  396. package/plugin/scripts/shared/context.cjs +120 -0
  397. package/plugin/scripts/shared/index.cjs +34 -0
  398. package/plugin/scripts/shared/logger.cjs +196 -0
  399. package/plugin/scripts/shared/reminder.cjs +261 -0
  400. package/plugin/scripts/shared/utils.cjs +62 -0
  401. package/plugin/scripts/shared/workspace.cjs +322 -0
  402. package/plugin/skills/aligning-intent/SKILL.md +275 -0
  403. package/plugin/skills/analyzing-measurements/SKILL.md +223 -0
  404. package/plugin/skills/bootstrapping-workspace/SKILL.md +260 -0
  405. package/plugin/skills/designing-solutions/SKILL.md +363 -0
  406. package/plugin/skills/diagnosing-issues/SKILL.md +219 -0
  407. package/plugin/skills/discovering-context/SKILL.md +283 -0
  408. package/plugin/skills/dispatching-parent/SKILL.md +399 -0
  409. package/plugin/skills/executing-task/SKILL.md +340 -0
  410. package/plugin/skills/memo-create/SKILL.md +222 -0
  411. package/plugin/skills/planning-verification/SKILL.md +245 -0
  412. package/plugin/skills/preparing-dispatch/SKILL.md +299 -0
  413. package/plugin/skills/researching-tech/SKILL.md +223 -0
  414. package/plugin/skills/reviewing-quality/SKILL.md +354 -0
  415. package/plugin/skills/reviewing-spec/SKILL.md +333 -0
  416. package/plugin/skills/starting-info-flow/SKILL.md +196 -0
  417. package/web/README.md +5 -0
  418. package//351/205/215/347/275/256/346/226/271/345/274/217.md +330 -0
@@ -0,0 +1,261 @@
1
+ /**
2
+ * 智能提醒模块
3
+ * 根据节点状态、日志、问题等信息智能判断是否需要提醒
4
+ */
5
+
6
+ const fs = require('node:fs');
7
+ const path = require('node:path');
8
+ const { getNodeGraph, getNodeLog, getNodeProblem, getWorkspaceEntry } = require('./workspace.cjs');
9
+ const { DIR_SUFFIX } = require('./config.cjs');
10
+
11
+ // 提醒优先级
12
+ const PRIORITY = {
13
+ P0_PROBLEM: 0, // 有未解决的问题
14
+ P1_LOG_TIMEOUT: 1, // 执行中但长时间未记录日志
15
+ P2_ALL_COMPLETED: 2, // 所有子节点已完成
16
+ P3_PLAN_CONFIRM: 3, // 计划需要用户确认
17
+ P4_NO_LOG: 4, // 开始执行但未记录日志
18
+ P5_NO_PROBLEM: 5, // 执行较长时间但未记录问题
19
+ P6_FAILED_NODE: 6, // 执行节点失败后引导
20
+ P7_NO_DOCS: 7 // 执行中但无文档引用
21
+ };
22
+
23
+ // 时间阈值(分钟)
24
+ const THRESHOLDS = {
25
+ LOG_TIMEOUT: 3, // 日志超时阈值
26
+ NO_LOG_START: 1, // 开始后无日志阈值
27
+ NO_PROBLEM: 5 // 无问题记录阈值
28
+ };
29
+
30
+ /**
31
+ * 计算时间差(分钟)
32
+ * @param {string} timeStr - 时间字符串 (格式: YYYY-MM-DD HH:mm:ss)
33
+ * @returns {number} 分钟数
34
+ */
35
+ function getMinutesSince(timeStr) {
36
+ if (!timeStr) return Infinity;
37
+
38
+ try {
39
+ // 解析时间字符串
40
+ const parsed = new Date(timeStr.replace(' ', 'T'));
41
+ if (isNaN(parsed.getTime())) return Infinity;
42
+
43
+ const now = new Date();
44
+ const diffMs = now.getTime() - parsed.getTime();
45
+ return Math.floor(diffMs / 60000);
46
+ } catch {
47
+ return Infinity;
48
+ }
49
+ }
50
+
51
+ /**
52
+ * 解析 ISO 时间字符串
53
+ * @param {string} isoStr - ISO 格式时间字符串
54
+ * @returns {number} 分钟数
55
+ */
56
+ function getMinutesSinceISO(isoStr) {
57
+ if (!isoStr) return Infinity;
58
+
59
+ try {
60
+ const parsed = new Date(isoStr);
61
+ if (isNaN(parsed.getTime())) return Infinity;
62
+
63
+ const now = new Date();
64
+ const diffMs = now.getTime() - parsed.getTime();
65
+ return Math.floor(diffMs / 60000);
66
+ } catch {
67
+ return Infinity;
68
+ }
69
+ }
70
+
71
+ /**
72
+ * 检查节点是否有文档引用
73
+ * @param {string} workspaceId - 工作区 ID
74
+ * @param {string} nodeId - 节点 ID
75
+ * @returns {boolean} 是否有文档引用
76
+ */
77
+ function hasDocumentReferences(workspaceId, nodeId) {
78
+ const entry = getWorkspaceEntry(workspaceId);
79
+ if (!entry || !entry.projectRoot) {
80
+ return true; // 无法确认时不提醒
81
+ }
82
+
83
+ const infoPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, workspaceId, 'nodes', nodeId, 'Info.md');
84
+ try {
85
+ const content = fs.readFileSync(infoPath, 'utf-8');
86
+ // 查找文档引用区块
87
+ const docsMatch = content.match(/## 文档引用\n\n([\s\S]*?)(?=\n##|$)/);
88
+ if (!docsMatch) {
89
+ return false;
90
+ }
91
+ // 检查是否有实际的文档引用(排除"无"或空内容)
92
+ const docsText = docsMatch[1].trim();
93
+ if (!docsText || docsText === '无' || docsText === '(无)') {
94
+ return false;
95
+ }
96
+ // 检查是否有 active 状态的文档
97
+ return docsText.includes('- ') && !docsText.includes('[expired]');
98
+ } catch {
99
+ return true; // 文件读取失败时不提醒
100
+ }
101
+ }
102
+
103
+ /**
104
+ * 分析节点状态,返回需要的提醒
105
+ * @param {string} workspaceId - 工作区 ID
106
+ * @param {string} nodeId - 节点 ID
107
+ * @returns {object|null} 提醒信息 { priority, type, message } 或 null
108
+ */
109
+ function analyzeNodeStatus(workspaceId, nodeId) {
110
+ const graph = getNodeGraph(workspaceId);
111
+ if (!graph || !graph.nodes || !graph.nodes[nodeId]) {
112
+ return null;
113
+ }
114
+
115
+ const node = graph.nodes[nodeId];
116
+ const status = node.status;
117
+ const nodeType = node.type;
118
+ const parentId = node.parentId;
119
+
120
+ // 获取日志和问题信息
121
+ const logInfo = getNodeLog(workspaceId, nodeId);
122
+ const problemInfo = getNodeProblem(workspaceId, nodeId);
123
+
124
+ // P0: 有未解决的问题(排除空问题占位符)
125
+ const hasProblem = problemInfo && problemInfo.problem &&
126
+ problemInfo.problem !== '(暂无)' &&
127
+ problemInfo.problem !== '暂无' &&
128
+ problemInfo.problem.trim() !== '';
129
+ if (hasProblem) {
130
+ return {
131
+ priority: PRIORITY.P0_PROBLEM,
132
+ type: 'problem',
133
+ message: `⚠️ 当前有未解决问题:${problemInfo.problem}${problemInfo.nextStep ? `\n下一步:${problemInfo.nextStep}` : ''}`
134
+ };
135
+ }
136
+
137
+ // P6: 执行节点失败后引导
138
+ if (nodeType === 'execution' && status === 'failed') {
139
+ return {
140
+ priority: PRIORITY.P6_FAILED_NODE,
141
+ type: 'failed_node',
142
+ message: `❌ 任务执行失败。请分析失败原因:
143
+ - 如果是可修复的问题(如临时错误、配置问题),使用 node_transition(action="retry") 重试
144
+ - 如果任务过于复杂或需要重新规划,回到父规划节点 ${parentId || 'root'} 重新分解任务`
145
+ };
146
+ }
147
+
148
+ // 执行节点状态检查
149
+ if (nodeType === 'execution' && status === 'implementing') {
150
+ const nodeUpdatedAt = node.updatedAt;
151
+ const minutesSinceUpdate = getMinutesSinceISO(nodeUpdatedAt);
152
+
153
+ // 获取日志时间
154
+ const lastLogTime = logInfo?.lastTime;
155
+ const minutesSinceLog = getMinutesSince(lastLogTime);
156
+ const hasLog = logInfo && logInfo.entryCount > 0;
157
+
158
+ // P4: 开始执行但未记录日志(1分钟)
159
+ if (!hasLog && minutesSinceUpdate >= THRESHOLDS.NO_LOG_START) {
160
+ return {
161
+ priority: PRIORITY.P4_NO_LOG,
162
+ type: 'no_log',
163
+ message: `💡 任务已开始 ${minutesSinceUpdate} 分钟但未记录日志,建议用 log_append 记录执行过程`
164
+ };
165
+ }
166
+
167
+ // P1: 执行中但长时间未记录日志(3分钟)
168
+ if (hasLog && minutesSinceLog >= THRESHOLDS.LOG_TIMEOUT) {
169
+ return {
170
+ priority: PRIORITY.P1_LOG_TIMEOUT,
171
+ type: 'log_timeout',
172
+ message: `💡 任务执行中,已 ${minutesSinceLog} 分钟未记录日志,建议用 log_append 记录进展`
173
+ };
174
+ }
175
+
176
+ // P5: 执行较长时间但未记录问题(5分钟)
177
+ if (minutesSinceUpdate >= THRESHOLDS.NO_PROBLEM && (!problemInfo || !problemInfo.problem)) {
178
+ return {
179
+ priority: PRIORITY.P5_NO_PROBLEM,
180
+ type: 'no_problem',
181
+ message: `💡 任务已执行 ${minutesSinceUpdate} 分钟,如遇到阻塞请用 problem_update 记录问题和下一步计划`
182
+ };
183
+ }
184
+
185
+ // P7: 执行中但无文档引用(仅在执行超过1分钟后提醒)
186
+ if (minutesSinceUpdate >= THRESHOLDS.NO_LOG_START && !hasDocumentReferences(workspaceId, nodeId)) {
187
+ return {
188
+ priority: PRIORITY.P7_NO_DOCS,
189
+ type: 'no_docs',
190
+ message: `📄 当前节点无文档引用。如需参考文档请用 node_reference 添加,或确认父节点是否遗漏派发文档。`
191
+ };
192
+ }
193
+ }
194
+
195
+ // 规划节点状态检查
196
+ if (nodeType === 'planning') {
197
+ const children = node.children || [];
198
+
199
+ // P2: monitoring 状态且所有子节点已完成
200
+ if (status === 'monitoring' && children.length > 0) {
201
+ const allCompleted = children.every(childId => {
202
+ const child = graph.nodes[childId];
203
+ return child && ['completed', 'failed', 'cancelled'].includes(child.status);
204
+ });
205
+
206
+ if (allCompleted) {
207
+ return {
208
+ priority: PRIORITY.P2_ALL_COMPLETED,
209
+ type: 'all_completed',
210
+ message: `✅ 所有 ${children.length} 个子节点已完成,请调用 node_transition(action="complete") 汇总结论`
211
+ };
212
+ }
213
+ }
214
+
215
+ // P3: planning 状态 + 有子节点 + 是根节点的直接子节点
216
+ if (status === 'planning' && children.length > 0 && parentId === 'root') {
217
+ return {
218
+ priority: PRIORITY.P3_PLAN_CONFIRM,
219
+ type: 'plan_confirm',
220
+ message: `📋 计划已创建 ${children.length} 个子节点,请向用户展示计划并等待确认后再开始执行`
221
+ };
222
+ }
223
+ }
224
+
225
+ return null;
226
+ }
227
+
228
+ /**
229
+ * 生成智能提醒内容
230
+ * @param {object} binding - 会话绑定信息
231
+ * @returns {string|null} 提醒内容或 null
232
+ */
233
+ function generateSmartReminder(binding) {
234
+ if (!binding || !binding.workspaceId) {
235
+ return null;
236
+ }
237
+
238
+ // 获取聚焦节点(优先使用 graph.currentFocus 作为权威来源)
239
+ const graph = getNodeGraph(binding.workspaceId);
240
+ const focusNodeId = graph?.currentFocus || binding.focusedNodeId;
241
+ if (!focusNodeId) {
242
+ return null;
243
+ }
244
+
245
+ const reminder = analyzeNodeStatus(binding.workspaceId, focusNodeId);
246
+ if (!reminder) {
247
+ return null;
248
+ }
249
+
250
+ return `<xtep-smart-reminder>\n${reminder.message}\n</xtep-smart-reminder>`;
251
+ }
252
+
253
+ module.exports = {
254
+ PRIORITY,
255
+ THRESHOLDS,
256
+ getMinutesSince,
257
+ getMinutesSinceISO,
258
+ hasDocumentReferences,
259
+ analyzeNodeStatus,
260
+ generateSmartReminder
261
+ };
@@ -0,0 +1,62 @@
1
+ /**
2
+ * 通用工具函数
3
+ */
4
+
5
+ const fs = require('node:fs');
6
+
7
+ /**
8
+ * 读取 JSON 文件
9
+ * @param {string} filePath - 文件路径
10
+ * @returns {object|null} 解析后的 JSON 对象或 null
11
+ */
12
+ function readJsonFile(filePath) {
13
+ try {
14
+ if (!fs.existsSync(filePath)) {
15
+ return null;
16
+ }
17
+ const content = fs.readFileSync(filePath, 'utf-8');
18
+ return JSON.parse(content);
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+
24
+ /**
25
+ * 读取标准输入
26
+ * @returns {Promise<object>} 解析后的 JSON 对象
27
+ */
28
+ async function readStdin() {
29
+ return new Promise((resolve) => {
30
+ let data = '';
31
+
32
+ // 设置超时,防止无限等待
33
+ const timeout = setTimeout(() => {
34
+ resolve({});
35
+ }, 3000);
36
+
37
+ process.stdin.setEncoding('utf8');
38
+ process.stdin.on('data', (chunk) => {
39
+ data += chunk;
40
+ });
41
+
42
+ process.stdin.on('end', () => {
43
+ clearTimeout(timeout);
44
+ try {
45
+ resolve(JSON.parse(data));
46
+ } catch {
47
+ resolve({});
48
+ }
49
+ });
50
+
51
+ // 如果没有输入,立即结束
52
+ if (process.stdin.isTTY) {
53
+ clearTimeout(timeout);
54
+ resolve({});
55
+ }
56
+ });
57
+ }
58
+
59
+ module.exports = {
60
+ readJsonFile,
61
+ readStdin
62
+ };
@@ -0,0 +1,322 @@
1
+ /**
2
+ * 工作区数据读取逻辑
3
+ */
4
+
5
+ const fs = require('node:fs');
6
+ const path = require('node:path');
7
+ const { readJsonFile } = require('./utils.cjs');
8
+ const { INDEX_PATH, DIR_SUFFIX } = require('./config.cjs');
9
+
10
+ /**
11
+ * 获取工作区入口信息
12
+ * @param {string} workspaceId - 工作区 ID
13
+ * @returns {object|null} 工作区入口信息
14
+ */
15
+ function getWorkspaceEntry(workspaceId) {
16
+ const index = readJsonFile(INDEX_PATH);
17
+ if (!index || !index.workspaces) {
18
+ return null;
19
+ }
20
+ return index.workspaces.find(ws => ws.id === workspaceId) || null;
21
+ }
22
+
23
+ /**
24
+ * 获取工作区配置
25
+ * @param {string} workspaceId - 工作区 ID
26
+ * @returns {object|null} 工作区配置
27
+ */
28
+ function getWorkspaceConfig(workspaceId) {
29
+ const entry = getWorkspaceEntry(workspaceId);
30
+ if (!entry || !entry.projectRoot) {
31
+ return null;
32
+ }
33
+
34
+ const configPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, entry.dirName, 'workspace.json');
35
+ return readJsonFile(configPath);
36
+ }
37
+
38
+ /**
39
+ * 解析 Workspace.md
40
+ * @param {string} content - Markdown 内容
41
+ * @returns {object} 解析结果
42
+ */
43
+ function parseWorkspaceMd(content) {
44
+ const result = {
45
+ goal: '',
46
+ rules: [],
47
+ docs: []
48
+ };
49
+
50
+ // 解析目标
51
+ const goalMatch = content.match(/## 目标\n\n([\s\S]*?)(?=\n##|$)/);
52
+ if (goalMatch) {
53
+ result.goal = goalMatch[1].trim();
54
+ }
55
+
56
+ // 解析规则
57
+ const rulesMatch = content.match(/## 规则\n\n[\s\S]*?\n\n([\s\S]*?)(?=\n##|$)/);
58
+ if (rulesMatch) {
59
+ const rulesText = rulesMatch[1];
60
+ result.rules = rulesText
61
+ .split('\n')
62
+ .filter(line => line.startsWith('- '))
63
+ .map(line => line.slice(2).trim());
64
+ }
65
+
66
+ return result;
67
+ }
68
+
69
+ /**
70
+ * 获取工作区 Markdown 数据
71
+ * @param {string} workspaceId - 工作区 ID
72
+ * @returns {object|null} 解析后的 Markdown 数据
73
+ */
74
+ function getWorkspaceMdData(workspaceId) {
75
+ const entry = getWorkspaceEntry(workspaceId);
76
+ if (!entry || !entry.projectRoot) {
77
+ return null;
78
+ }
79
+
80
+ const mdPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, entry.dirName, 'Workspace.md');
81
+ try {
82
+ const content = fs.readFileSync(mdPath, 'utf-8');
83
+ return parseWorkspaceMd(content);
84
+ } catch {
85
+ return null;
86
+ }
87
+ }
88
+
89
+ /**
90
+ * 获取节点图
91
+ * @param {string} workspaceId - 工作区 ID
92
+ * @returns {object|null} 节点图数据
93
+ */
94
+ function getNodeGraph(workspaceId) {
95
+ const entry = getWorkspaceEntry(workspaceId);
96
+ if (!entry || !entry.projectRoot) {
97
+ return null;
98
+ }
99
+
100
+ const graphPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, entry.dirName, 'graph.json');
101
+ return readJsonFile(graphPath);
102
+ }
103
+
104
+ /**
105
+ * 解析节点 Info.md
106
+ * @param {string} content - Markdown 内容
107
+ * @returns {object} 解析结果
108
+ */
109
+ function parseNodeInfo(content) {
110
+ const result = {
111
+ title: '',
112
+ status: '',
113
+ requirement: ''
114
+ };
115
+
116
+ // 解析标题
117
+ const titleMatch = content.match(/^# (.+)$/m);
118
+ if (titleMatch) {
119
+ result.title = titleMatch[1].trim();
120
+ }
121
+
122
+ // 解析状态(从 frontmatter 或内容中)
123
+ const statusMatch = content.match(/status:\s*(.+)/);
124
+ if (statusMatch) {
125
+ result.status = statusMatch[1].trim();
126
+ }
127
+
128
+ // 解析需求
129
+ const reqMatch = content.match(/## 需求\n\n([\s\S]*?)(?=\n##|$)/);
130
+ if (reqMatch) {
131
+ result.requirement = reqMatch[1].trim();
132
+ }
133
+
134
+ return result;
135
+ }
136
+
137
+ /**
138
+ * 获取节点信息
139
+ * @param {string} workspaceId - 工作区 ID
140
+ * @param {string} nodeId - 节点 ID
141
+ * @returns {object|null} 节点信息
142
+ */
143
+ function getNodeInfo(workspaceId, nodeId) {
144
+ const entry = getWorkspaceEntry(workspaceId);
145
+ if (!entry || !entry.projectRoot) {
146
+ return null;
147
+ }
148
+
149
+ const infoPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, entry.dirName, 'nodes', nodeId, 'Info.md');
150
+ try {
151
+ const content = fs.readFileSync(infoPath, 'utf-8');
152
+ return parseNodeInfo(content);
153
+ } catch {
154
+ return null;
155
+ }
156
+ }
157
+
158
+ /**
159
+ * 解析 Log.md 获取日志信息
160
+ * @param {string} content - Markdown 内容
161
+ * @returns {object} 解析结果 { lastEntry, lastTime, entryCount }
162
+ */
163
+ function parseLogMd(content) {
164
+ const result = {
165
+ lastEntry: null,
166
+ lastTime: null,
167
+ entryCount: 0
168
+ };
169
+
170
+ // 匹配日志表格行: | 时间 | 操作者 | 事件 |
171
+ const tableRows = content.match(/\| \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \|[^|]+\|[^|]+\|/g);
172
+ if (!tableRows || tableRows.length === 0) {
173
+ return result;
174
+ }
175
+
176
+ result.entryCount = tableRows.length;
177
+
178
+ // 获取最后一条日志
179
+ const lastRow = tableRows[tableRows.length - 1];
180
+ const parts = lastRow.split('|').map(s => s.trim()).filter(s => s);
181
+ if (parts.length >= 3) {
182
+ result.lastTime = parts[0];
183
+ result.lastEntry = {
184
+ time: parts[0],
185
+ operator: parts[1],
186
+ event: parts[2]
187
+ };
188
+ }
189
+
190
+ return result;
191
+ }
192
+
193
+ /**
194
+ * 获取节点日志信息
195
+ * @param {string} workspaceId - 工作区 ID
196
+ * @param {string} nodeId - 节点 ID
197
+ * @returns {object|null} 日志信息 { lastEntry, lastTime, entryCount }
198
+ */
199
+ function getNodeLog(workspaceId, nodeId) {
200
+ const entry = getWorkspaceEntry(workspaceId);
201
+ if (!entry || !entry.projectRoot) {
202
+ return null;
203
+ }
204
+
205
+ const logPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, entry.dirName, 'nodes', nodeId, 'Log.md');
206
+ try {
207
+ const content = fs.readFileSync(logPath, 'utf-8');
208
+ return parseLogMd(content);
209
+ } catch {
210
+ return null;
211
+ }
212
+ }
213
+
214
+ /**
215
+ * 解析 Problem.md 获取问题信息
216
+ * @param {string} content - Markdown 内容
217
+ * @returns {object} 解析结果 { problem, nextStep }
218
+ */
219
+ function parseProblemMd(content) {
220
+ const result = {
221
+ problem: null,
222
+ nextStep: null
223
+ };
224
+
225
+ // 解析当前问题
226
+ const problemMatch = content.match(/## 当前问题\n\n([\s\S]*?)(?=\n##|$)/);
227
+ if (problemMatch) {
228
+ const problemText = problemMatch[1].trim();
229
+ if (problemText && problemText !== '无') {
230
+ result.problem = problemText;
231
+ }
232
+ }
233
+
234
+ // 解析下一步计划(支持 "下一步" 和 "下一步计划" 两种格式)
235
+ const nextStepMatch = content.match(/## 下一步(?:计划)?\n\n([\s\S]*?)(?=\n##|$)/);
236
+ if (nextStepMatch) {
237
+ const nextStepText = nextStepMatch[1].trim();
238
+ if (nextStepText && nextStepText !== '无' && nextStepText !== '(暂无)') {
239
+ result.nextStep = nextStepText;
240
+ }
241
+ }
242
+
243
+ return result;
244
+ }
245
+
246
+ /**
247
+ * 获取节点问题信息
248
+ * @param {string} workspaceId - 工作区 ID
249
+ * @param {string} nodeId - 节点 ID
250
+ * @returns {object|null} 问题信息 { problem, nextStep }
251
+ */
252
+ function getNodeProblem(workspaceId, nodeId) {
253
+ const entry = getWorkspaceEntry(workspaceId);
254
+ if (!entry || !entry.projectRoot) {
255
+ return null;
256
+ }
257
+
258
+ const problemPath = path.join(entry.projectRoot, `.xtep-workspace${DIR_SUFFIX}`, entry.dirName, 'nodes', nodeId, 'Problem.md');
259
+ try {
260
+ const content = fs.readFileSync(problemPath, 'utf-8');
261
+ return parseProblemMd(content);
262
+ } catch {
263
+ return null;
264
+ }
265
+ }
266
+
267
+ /**
268
+ * 获取与指定 cwd 匹配的活跃工作区列表
269
+ * @param {string} cwd - 当前工作目录
270
+ * @returns {Array<object>} 匹配的工作区列表 [{ id, name, projectRoot, goal }]
271
+ */
272
+ function getWorkspacesByCwd(cwd) {
273
+ const index = readJsonFile(INDEX_PATH);
274
+ if (!index || !index.workspaces) {
275
+ return [];
276
+ }
277
+
278
+ // 规范化 cwd 路径
279
+ const normalizedCwd = path.resolve(cwd);
280
+
281
+ // 查找匹配的活跃工作区
282
+ const matchedWorkspaces = index.workspaces
283
+ .filter(ws => {
284
+ // 只匹配活跃工作区
285
+ if (ws.status !== 'active') return false;
286
+
287
+ // 检查 projectRoot 是否匹配
288
+ if (!ws.projectRoot) return false;
289
+ const normalizedRoot = path.resolve(ws.projectRoot);
290
+
291
+ // cwd 等于或是 projectRoot 的子目录
292
+ return normalizedCwd === normalizedRoot ||
293
+ normalizedCwd.startsWith(normalizedRoot + path.sep);
294
+ })
295
+ .map(ws => {
296
+ // 获取工作区目标
297
+ const mdData = getWorkspaceMdData(ws.id);
298
+ return {
299
+ id: ws.id,
300
+ name: ws.name,
301
+ projectRoot: ws.projectRoot,
302
+ goal: mdData?.goal || ''
303
+ };
304
+ });
305
+
306
+ return matchedWorkspaces;
307
+ }
308
+
309
+ module.exports = {
310
+ getWorkspaceEntry,
311
+ getWorkspaceConfig,
312
+ getWorkspaceMdData,
313
+ getNodeGraph,
314
+ getNodeInfo,
315
+ getNodeLog,
316
+ getNodeProblem,
317
+ parseWorkspaceMd,
318
+ parseNodeInfo,
319
+ parseLogMd,
320
+ parseProblemMd,
321
+ getWorkspacesByCwd
322
+ };