ai-prompt-guide-mcp 1.0.0

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 (887) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +271 -0
  3. package/dist/__tests__/config-loading.test.d.ts +5 -0
  4. package/dist/__tests__/config-loading.test.d.ts.map +1 -0
  5. package/dist/__tests__/config-loading.test.js +127 -0
  6. package/dist/__tests__/config-loading.test.js.map +1 -0
  7. package/dist/__tests__/config-logging.test.d.ts +5 -0
  8. package/dist/__tests__/config-logging.test.d.ts.map +1 -0
  9. package/dist/__tests__/config-logging.test.js +146 -0
  10. package/dist/__tests__/config-logging.test.js.map +1 -0
  11. package/dist/__tests__/config-path-resolution.test.d.ts +5 -0
  12. package/dist/__tests__/config-path-resolution.test.d.ts.map +1 -0
  13. package/dist/__tests__/config-path-resolution.test.js +88 -0
  14. package/dist/__tests__/config-path-resolution.test.js.map +1 -0
  15. package/dist/__tests__/config-path-validation.test.d.ts +6 -0
  16. package/dist/__tests__/config-path-validation.test.d.ts.map +1 -0
  17. package/dist/__tests__/config-path-validation.test.js +203 -0
  18. package/dist/__tests__/config-path-validation.test.js.map +1 -0
  19. package/dist/__tests__/config-precedence.test.d.ts +5 -0
  20. package/dist/__tests__/config-precedence.test.d.ts.map +1 -0
  21. package/dist/__tests__/config-precedence.test.js +200 -0
  22. package/dist/__tests__/config-precedence.test.js.map +1 -0
  23. package/dist/__tests__/config-types.test.d.ts +5 -0
  24. package/dist/__tests__/config-types.test.d.ts.map +1 -0
  25. package/dist/__tests__/config-types.test.js +189 -0
  26. package/dist/__tests__/config-types.test.js.map +1 -0
  27. package/dist/__tests__/config.test.d.ts +5 -0
  28. package/dist/__tests__/config.test.d.ts.map +1 -0
  29. package/dist/__tests__/config.test.js +229 -0
  30. package/dist/__tests__/config.test.js.map +1 -0
  31. package/dist/config.d.ts +87 -0
  32. package/dist/config.d.ts.map +1 -0
  33. package/dist/config.js +498 -0
  34. package/dist/config.js.map +1 -0
  35. package/dist/constants/defaults.d.ts +78 -0
  36. package/dist/constants/defaults.d.ts.map +1 -0
  37. package/dist/constants/defaults.js +78 -0
  38. package/dist/constants/defaults.js.map +1 -0
  39. package/dist/document-cache.d.ts +485 -0
  40. package/dist/document-cache.d.ts.map +1 -0
  41. package/dist/document-cache.hierarchical.test.d.ts +2 -0
  42. package/dist/document-cache.hierarchical.test.d.ts.map +1 -0
  43. package/dist/document-cache.hierarchical.test.js +243 -0
  44. package/dist/document-cache.hierarchical.test.js.map +1 -0
  45. package/dist/document-cache.js +965 -0
  46. package/dist/document-cache.js.map +1 -0
  47. package/dist/document-cache.test.d.ts +8 -0
  48. package/dist/document-cache.test.d.ts.map +1 -0
  49. package/dist/document-cache.test.js +624 -0
  50. package/dist/document-cache.test.js.map +1 -0
  51. package/dist/document-manager.d.ts +252 -0
  52. package/dist/document-manager.d.ts.map +1 -0
  53. package/dist/document-manager.js +760 -0
  54. package/dist/document-manager.js.map +1 -0
  55. package/dist/document-manager.race-condition.test.d.ts +8 -0
  56. package/dist/document-manager.race-condition.test.d.ts.map +1 -0
  57. package/dist/document-manager.race-condition.test.js +139 -0
  58. package/dist/document-manager.race-condition.test.js.map +1 -0
  59. package/dist/fingerprint-index.d.ts +177 -0
  60. package/dist/fingerprint-index.d.ts.map +1 -0
  61. package/dist/fingerprint-index.js +374 -0
  62. package/dist/fingerprint-index.js.map +1 -0
  63. package/dist/fingerprint-index.test.d.ts +15 -0
  64. package/dist/fingerprint-index.test.d.ts.map +1 -0
  65. package/dist/fingerprint-index.test.js +482 -0
  66. package/dist/fingerprint-index.test.js.map +1 -0
  67. package/dist/fsio.d.ts +76 -0
  68. package/dist/fsio.d.ts.map +1 -0
  69. package/dist/fsio.js +506 -0
  70. package/dist/fsio.js.map +1 -0
  71. package/dist/index.d.ts +6 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +20 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/markdown-tools.test.d.ts +5 -0
  76. package/dist/markdown-tools.test.d.ts.map +1 -0
  77. package/dist/markdown-tools.test.js +200 -0
  78. package/dist/markdown-tools.test.js.map +1 -0
  79. package/dist/parse.d.ts +19 -0
  80. package/dist/parse.d.ts.map +1 -0
  81. package/dist/parse.js +144 -0
  82. package/dist/parse.js.map +1 -0
  83. package/dist/prompts/__tests__/prompt-loader.test.d.ts +5 -0
  84. package/dist/prompts/__tests__/prompt-loader.test.d.ts.map +1 -0
  85. package/dist/prompts/__tests__/prompt-loader.test.js +300 -0
  86. package/dist/prompts/__tests__/prompt-loader.test.js.map +1 -0
  87. package/dist/prompts/prompt-loader.d.ts +58 -0
  88. package/dist/prompts/prompt-loader.d.ts.map +1 -0
  89. package/dist/prompts/prompt-loader.js +215 -0
  90. package/dist/prompts/prompt-loader.js.map +1 -0
  91. package/dist/prompts/prompt-validator.d.ts +30 -0
  92. package/dist/prompts/prompt-validator.d.ts.map +1 -0
  93. package/dist/prompts/prompt-validator.js +65 -0
  94. package/dist/prompts/prompt-validator.js.map +1 -0
  95. package/dist/prompts/types.d.ts +46 -0
  96. package/dist/prompts/types.d.ts.map +1 -0
  97. package/dist/prompts/types.js +14 -0
  98. package/dist/prompts/types.js.map +1 -0
  99. package/dist/prompts/workflow-prompts.d.ts +42 -0
  100. package/dist/prompts/workflow-prompts.d.ts.map +1 -0
  101. package/dist/prompts/workflow-prompts.js +61 -0
  102. package/dist/prompts/workflow-prompts.js.map +1 -0
  103. package/dist/sections.d.ts +67 -0
  104. package/dist/sections.d.ts.map +1 -0
  105. package/dist/sections.hierarchical.test.d.ts +8 -0
  106. package/dist/sections.hierarchical.test.d.ts.map +1 -0
  107. package/dist/sections.hierarchical.test.js +397 -0
  108. package/dist/sections.hierarchical.test.js.map +1 -0
  109. package/dist/sections.js +1229 -0
  110. package/dist/sections.js.map +1 -0
  111. package/dist/server/default-dependencies.d.ts +134 -0
  112. package/dist/server/default-dependencies.d.ts.map +1 -0
  113. package/dist/server/default-dependencies.js +176 -0
  114. package/dist/server/default-dependencies.js.map +1 -0
  115. package/dist/server/dependencies.d.ts +161 -0
  116. package/dist/server/dependencies.d.ts.map +1 -0
  117. package/dist/server/dependencies.js +50 -0
  118. package/dist/server/dependencies.js.map +1 -0
  119. package/dist/server/index.d.ts +10 -0
  120. package/dist/server/index.d.ts.map +1 -0
  121. package/dist/server/index.js +9 -0
  122. package/dist/server/index.js.map +1 -0
  123. package/dist/server/middleware/error-handling.d.ts +52 -0
  124. package/dist/server/middleware/error-handling.d.ts.map +1 -0
  125. package/dist/server/middleware/error-handling.js +76 -0
  126. package/dist/server/middleware/error-handling.js.map +1 -0
  127. package/dist/server/middleware/index.d.ts +7 -0
  128. package/dist/server/middleware/index.d.ts.map +1 -0
  129. package/dist/server/middleware/index.js +7 -0
  130. package/dist/server/middleware/index.js.map +1 -0
  131. package/dist/server/middleware/logging.d.ts +29 -0
  132. package/dist/server/middleware/logging.d.ts.map +1 -0
  133. package/dist/server/middleware/logging.js +49 -0
  134. package/dist/server/middleware/logging.js.map +1 -0
  135. package/dist/server/middleware/session-management.d.ts +38 -0
  136. package/dist/server/middleware/session-management.d.ts.map +1 -0
  137. package/dist/server/middleware/session-management.js +66 -0
  138. package/dist/server/middleware/session-management.js.map +1 -0
  139. package/dist/server/request-handlers/index.d.ts +5 -0
  140. package/dist/server/request-handlers/index.d.ts.map +1 -0
  141. package/dist/server/request-handlers/index.js +5 -0
  142. package/dist/server/request-handlers/index.js.map +1 -0
  143. package/dist/server/request-handlers/prompt-handlers.d.ts +13 -0
  144. package/dist/server/request-handlers/prompt-handlers.d.ts.map +1 -0
  145. package/dist/server/request-handlers/prompt-handlers.js +80 -0
  146. package/dist/server/request-handlers/prompt-handlers.js.map +1 -0
  147. package/dist/server/request-handlers/tool-handlers.d.ts +11 -0
  148. package/dist/server/request-handlers/tool-handlers.d.ts.map +1 -0
  149. package/dist/server/request-handlers/tool-handlers.js +85 -0
  150. package/dist/server/request-handlers/tool-handlers.js.map +1 -0
  151. package/dist/server/server-factory.d.ts +68 -0
  152. package/dist/server/server-factory.d.ts.map +1 -0
  153. package/dist/server/server-factory.js +135 -0
  154. package/dist/server/server-factory.js.map +1 -0
  155. package/dist/server/transport/stdio-transport.d.ts +9 -0
  156. package/dist/server/transport/stdio-transport.d.ts.map +1 -0
  157. package/dist/server/transport/stdio-transport.js +11 -0
  158. package/dist/server/transport/stdio-transport.js.map +1 -0
  159. package/dist/session/index.d.ts +5 -0
  160. package/dist/session/index.d.ts.map +1 -0
  161. package/dist/session/index.js +7 -0
  162. package/dist/session/index.js.map +1 -0
  163. package/dist/session/session-store.d.ts +74 -0
  164. package/dist/session/session-store.d.ts.map +1 -0
  165. package/dist/session/session-store.js +150 -0
  166. package/dist/session/session-store.js.map +1 -0
  167. package/dist/session/types.d.ts +96 -0
  168. package/dist/session/types.d.ts.map +1 -0
  169. package/dist/session/types.js +9 -0
  170. package/dist/session/types.js.map +1 -0
  171. package/dist/shared/__tests__/addressing-system.batch-cache.test.d.ts +12 -0
  172. package/dist/shared/__tests__/addressing-system.batch-cache.test.d.ts.map +1 -0
  173. package/dist/shared/__tests__/addressing-system.batch-cache.test.js +306 -0
  174. package/dist/shared/__tests__/addressing-system.batch-cache.test.js.map +1 -0
  175. package/dist/shared/__tests__/addressing-system.hierarchical.test.d.ts +6 -0
  176. package/dist/shared/__tests__/addressing-system.hierarchical.test.d.ts.map +1 -0
  177. package/dist/shared/__tests__/addressing-system.hierarchical.test.js +205 -0
  178. package/dist/shared/__tests__/addressing-system.hierarchical.test.js.map +1 -0
  179. package/dist/shared/__tests__/addressing-system.lru.test.d.ts +6 -0
  180. package/dist/shared/__tests__/addressing-system.lru.test.d.ts.map +1 -0
  181. package/dist/shared/__tests__/addressing-system.lru.test.js +159 -0
  182. package/dist/shared/__tests__/addressing-system.lru.test.js.map +1 -0
  183. package/dist/shared/__tests__/addressing-system.relative-paths.test.d.ts +14 -0
  184. package/dist/shared/__tests__/addressing-system.relative-paths.test.d.ts.map +1 -0
  185. package/dist/shared/__tests__/addressing-system.relative-paths.test.js +249 -0
  186. package/dist/shared/__tests__/addressing-system.relative-paths.test.js.map +1 -0
  187. package/dist/shared/__tests__/document-analysis-enhanced.test.d.ts +9 -0
  188. package/dist/shared/__tests__/document-analysis-enhanced.test.d.ts.map +1 -0
  189. package/dist/shared/__tests__/document-analysis-enhanced.test.js +419 -0
  190. package/dist/shared/__tests__/document-analysis-enhanced.test.js.map +1 -0
  191. package/dist/shared/__tests__/document-analysis.test.d.ts +8 -0
  192. package/dist/shared/__tests__/document-analysis.test.d.ts.map +1 -0
  193. package/dist/shared/__tests__/document-analysis.test.js +904 -0
  194. package/dist/shared/__tests__/document-analysis.test.js.map +1 -0
  195. package/dist/shared/__tests__/keyword-utils-integration.test.d.ts +9 -0
  196. package/dist/shared/__tests__/keyword-utils-integration.test.d.ts.map +1 -0
  197. package/dist/shared/__tests__/keyword-utils-integration.test.js +317 -0
  198. package/dist/shared/__tests__/keyword-utils-integration.test.js.map +1 -0
  199. package/dist/shared/__tests__/link-utils.test.d.ts +5 -0
  200. package/dist/shared/__tests__/link-utils.test.d.ts.map +1 -0
  201. package/dist/shared/__tests__/link-utils.test.js +560 -0
  202. package/dist/shared/__tests__/link-utils.test.js.map +1 -0
  203. package/dist/shared/__tests__/link-validation.test.d.ts +5 -0
  204. package/dist/shared/__tests__/link-validation.test.d.ts.map +1 -0
  205. package/dist/shared/__tests__/link-validation.test.js +473 -0
  206. package/dist/shared/__tests__/link-validation.test.js.map +1 -0
  207. package/dist/shared/__tests__/reference-extractor.test.d.ts +8 -0
  208. package/dist/shared/__tests__/reference-extractor.test.d.ts.map +1 -0
  209. package/dist/shared/__tests__/reference-extractor.test.js +260 -0
  210. package/dist/shared/__tests__/reference-extractor.test.js.map +1 -0
  211. package/dist/shared/__tests__/reference-loader.test.d.ts +8 -0
  212. package/dist/shared/__tests__/reference-loader.test.d.ts.map +1 -0
  213. package/dist/shared/__tests__/reference-loader.test.js +622 -0
  214. package/dist/shared/__tests__/reference-loader.test.js.map +1 -0
  215. package/dist/shared/__tests__/section-operations.append.test.d.ts +8 -0
  216. package/dist/shared/__tests__/section-operations.append.test.d.ts.map +1 -0
  217. package/dist/shared/__tests__/section-operations.append.test.js +150 -0
  218. package/dist/shared/__tests__/section-operations.append.test.js.map +1 -0
  219. package/dist/shared/__tests__/section-operations.test.d.ts +7 -0
  220. package/dist/shared/__tests__/section-operations.test.d.ts.map +1 -0
  221. package/dist/shared/__tests__/section-operations.test.js +118 -0
  222. package/dist/shared/__tests__/section-operations.test.js.map +1 -0
  223. package/dist/shared/__tests__/slug-utils.test.d.ts +5 -0
  224. package/dist/shared/__tests__/slug-utils.test.d.ts.map +1 -0
  225. package/dist/shared/__tests__/slug-utils.test.js +542 -0
  226. package/dist/shared/__tests__/slug-utils.test.js.map +1 -0
  227. package/dist/shared/__tests__/task-operations.test.d.ts +9 -0
  228. package/dist/shared/__tests__/task-operations.test.d.ts.map +1 -0
  229. package/dist/shared/__tests__/task-operations.test.js +257 -0
  230. package/dist/shared/__tests__/task-operations.test.js.map +1 -0
  231. package/dist/shared/__tests__/task-validation.test.d.ts +6 -0
  232. package/dist/shared/__tests__/task-validation.test.d.ts.map +1 -0
  233. package/dist/shared/__tests__/task-validation.test.js +129 -0
  234. package/dist/shared/__tests__/task-validation.test.js.map +1 -0
  235. package/dist/shared/__tests__/task-view-utilities.test.d.ts +5 -0
  236. package/dist/shared/__tests__/task-view-utilities.test.d.ts.map +1 -0
  237. package/dist/shared/__tests__/task-view-utilities.test.js +312 -0
  238. package/dist/shared/__tests__/task-view-utilities.test.js.map +1 -0
  239. package/dist/shared/__tests__/tool-integration.array-validation.test.d.ts +7 -0
  240. package/dist/shared/__tests__/tool-integration.array-validation.test.d.ts.map +1 -0
  241. package/dist/shared/__tests__/tool-integration.array-validation.test.js +169 -0
  242. package/dist/shared/__tests__/tool-integration.array-validation.test.js.map +1 -0
  243. package/dist/shared/__tests__/tool-integration.hierarchical.test.d.ts +7 -0
  244. package/dist/shared/__tests__/tool-integration.hierarchical.test.d.ts.map +1 -0
  245. package/dist/shared/__tests__/tool-integration.hierarchical.test.js +204 -0
  246. package/dist/shared/__tests__/tool-integration.hierarchical.test.js.map +1 -0
  247. package/dist/shared/__tests__/workflow-prompt-utilities.test.d.ts +8 -0
  248. package/dist/shared/__tests__/workflow-prompt-utilities.test.d.ts.map +1 -0
  249. package/dist/shared/__tests__/workflow-prompt-utilities.test.js +722 -0
  250. package/dist/shared/__tests__/workflow-prompt-utilities.test.js.map +1 -0
  251. package/dist/shared/addressing-system.d.ts +799 -0
  252. package/dist/shared/addressing-system.d.ts.map +1 -0
  253. package/dist/shared/addressing-system.js +1074 -0
  254. package/dist/shared/addressing-system.js.map +1 -0
  255. package/dist/shared/document-analysis/__tests__/keyword-utils.test.d.ts +8 -0
  256. package/dist/shared/document-analysis/__tests__/keyword-utils.test.d.ts.map +1 -0
  257. package/dist/shared/document-analysis/__tests__/keyword-utils.test.js +601 -0
  258. package/dist/shared/document-analysis/__tests__/keyword-utils.test.js.map +1 -0
  259. package/dist/shared/document-analysis/index.d.ts +67 -0
  260. package/dist/shared/document-analysis/index.d.ts.map +1 -0
  261. package/dist/shared/document-analysis/index.js +166 -0
  262. package/dist/shared/document-analysis/index.js.map +1 -0
  263. package/dist/shared/document-analysis/keyword-utils.d.ts +405 -0
  264. package/dist/shared/document-analysis/keyword-utils.d.ts.map +1 -0
  265. package/dist/shared/document-analysis/keyword-utils.js +1147 -0
  266. package/dist/shared/document-analysis/keyword-utils.js.map +1 -0
  267. package/dist/shared/document-analysis/reference-validation.d.ts +27 -0
  268. package/dist/shared/document-analysis/reference-validation.d.ts.map +1 -0
  269. package/dist/shared/document-analysis/reference-validation.js +173 -0
  270. package/dist/shared/document-analysis/reference-validation.js.map +1 -0
  271. package/dist/shared/document-analysis/related-docs.d.ts +27 -0
  272. package/dist/shared/document-analysis/related-docs.d.ts.map +1 -0
  273. package/dist/shared/document-analysis/related-docs.js +459 -0
  274. package/dist/shared/document-analysis/related-docs.js.map +1 -0
  275. package/dist/shared/document-analysis/types.d.ts +89 -0
  276. package/dist/shared/document-analysis/types.d.ts.map +1 -0
  277. package/dist/shared/document-analysis/types.js +41 -0
  278. package/dist/shared/document-analysis/types.js.map +1 -0
  279. package/dist/shared/document-analysis.d.ts +15 -0
  280. package/dist/shared/document-analysis.d.ts.map +1 -0
  281. package/dist/shared/document-analysis.js +16 -0
  282. package/dist/shared/document-analysis.js.map +1 -0
  283. package/dist/shared/document-manager-factory.d.ts +32 -0
  284. package/dist/shared/document-manager-factory.d.ts.map +1 -0
  285. package/dist/shared/document-manager-factory.js +75 -0
  286. package/dist/shared/document-manager-factory.js.map +1 -0
  287. package/dist/shared/index.d.ts +5 -0
  288. package/dist/shared/index.d.ts.map +1 -0
  289. package/dist/shared/index.js +7 -0
  290. package/dist/shared/index.js.map +1 -0
  291. package/dist/shared/link-analysis.d.ts +84 -0
  292. package/dist/shared/link-analysis.d.ts.map +1 -0
  293. package/dist/shared/link-analysis.js +213 -0
  294. package/dist/shared/link-analysis.js.map +1 -0
  295. package/dist/shared/link-context.d.ts +23 -0
  296. package/dist/shared/link-context.d.ts.map +1 -0
  297. package/dist/shared/link-context.js +172 -0
  298. package/dist/shared/link-context.js.map +1 -0
  299. package/dist/shared/link-utils.d.ts +33 -0
  300. package/dist/shared/link-utils.d.ts.map +1 -0
  301. package/dist/shared/link-utils.js +301 -0
  302. package/dist/shared/link-utils.js.map +1 -0
  303. package/dist/shared/link-validation.d.ts +79 -0
  304. package/dist/shared/link-validation.d.ts.map +1 -0
  305. package/dist/shared/link-validation.js +340 -0
  306. package/dist/shared/link-validation.js.map +1 -0
  307. package/dist/shared/namespace-analysis.d.ts +10 -0
  308. package/dist/shared/namespace-analysis.d.ts.map +1 -0
  309. package/dist/shared/namespace-analysis.js +100 -0
  310. package/dist/shared/namespace-analysis.js.map +1 -0
  311. package/dist/shared/namespace-constants.d.ts +69 -0
  312. package/dist/shared/namespace-constants.d.ts.map +1 -0
  313. package/dist/shared/namespace-constants.js +97 -0
  314. package/dist/shared/namespace-constants.js.map +1 -0
  315. package/dist/shared/path-utilities.d.ts +13 -0
  316. package/dist/shared/path-utilities.d.ts.map +1 -0
  317. package/dist/shared/path-utilities.js +39 -0
  318. package/dist/shared/path-utilities.js.map +1 -0
  319. package/dist/shared/reference-extractor.d.ts +121 -0
  320. package/dist/shared/reference-extractor.d.ts.map +1 -0
  321. package/dist/shared/reference-extractor.js +195 -0
  322. package/dist/shared/reference-extractor.js.map +1 -0
  323. package/dist/shared/reference-loader.d.ts +163 -0
  324. package/dist/shared/reference-loader.d.ts.map +1 -0
  325. package/dist/shared/reference-loader.js +265 -0
  326. package/dist/shared/reference-loader.js.map +1 -0
  327. package/dist/shared/section-operations.d.ts +14 -0
  328. package/dist/shared/section-operations.d.ts.map +1 -0
  329. package/dist/shared/section-operations.js +115 -0
  330. package/dist/shared/section-operations.js.map +1 -0
  331. package/dist/shared/slug-utils.d.ts +109 -0
  332. package/dist/shared/slug-utils.d.ts.map +1 -0
  333. package/dist/shared/slug-utils.js +302 -0
  334. package/dist/shared/slug-utils.js.map +1 -0
  335. package/dist/shared/task-operations.d.ts +152 -0
  336. package/dist/shared/task-operations.d.ts.map +1 -0
  337. package/dist/shared/task-operations.js +416 -0
  338. package/dist/shared/task-operations.js.map +1 -0
  339. package/dist/shared/task-utilities.d.ts +63 -0
  340. package/dist/shared/task-utilities.d.ts.map +1 -0
  341. package/dist/shared/task-utilities.js +86 -0
  342. package/dist/shared/task-utilities.js.map +1 -0
  343. package/dist/shared/task-validation.d.ts +50 -0
  344. package/dist/shared/task-validation.d.ts.map +1 -0
  345. package/dist/shared/task-validation.js +97 -0
  346. package/dist/shared/task-validation.js.map +1 -0
  347. package/dist/shared/task-view-utilities.d.ts +109 -0
  348. package/dist/shared/task-view-utilities.d.ts.map +1 -0
  349. package/dist/shared/task-view-utilities.js +255 -0
  350. package/dist/shared/task-view-utilities.js.map +1 -0
  351. package/dist/shared/utilities.d.ts +14 -0
  352. package/dist/shared/utilities.d.ts.map +1 -0
  353. package/dist/shared/utilities.js +23 -0
  354. package/dist/shared/utilities.js.map +1 -0
  355. package/dist/shared/utilities.test.d.ts +5 -0
  356. package/dist/shared/utilities.test.d.ts.map +1 -0
  357. package/dist/shared/utilities.test.js +422 -0
  358. package/dist/shared/utilities.test.js.map +1 -0
  359. package/dist/shared/validation-utils.d.ts +57 -0
  360. package/dist/shared/validation-utils.d.ts.map +1 -0
  361. package/dist/shared/validation-utils.js +63 -0
  362. package/dist/shared/validation-utils.js.map +1 -0
  363. package/dist/shared/workflow-prompt-utilities.d.ts +64 -0
  364. package/dist/shared/workflow-prompt-utilities.d.ts.map +1 -0
  365. package/dist/shared/workflow-prompt-utilities.js +163 -0
  366. package/dist/shared/workflow-prompt-utilities.js.map +1 -0
  367. package/dist/slug.d.ts +9 -0
  368. package/dist/slug.d.ts.map +1 -0
  369. package/dist/slug.js +40 -0
  370. package/dist/slug.js.map +1 -0
  371. package/dist/template-loader.d.ts +6 -0
  372. package/dist/template-loader.d.ts.map +1 -0
  373. package/dist/template-loader.js +8 -0
  374. package/dist/template-loader.js.map +1 -0
  375. package/dist/tools/__tests__/create-document-self-reference.test.d.ts +2 -0
  376. package/dist/tools/__tests__/create-document-self-reference.test.d.ts.map +1 -0
  377. package/dist/tools/__tests__/create-document-self-reference.test.js +124 -0
  378. package/dist/tools/__tests__/create-document-self-reference.test.js.map +1 -0
  379. package/dist/tools/__tests__/create-document-workflow-regression.test.d.ts +16 -0
  380. package/dist/tools/__tests__/create-document-workflow-regression.test.d.ts.map +1 -0
  381. package/dist/tools/__tests__/create-document-workflow-regression.test.js +655 -0
  382. package/dist/tools/__tests__/create-document-workflow-regression.test.js.map +1 -0
  383. package/dist/tools/__tests__/create-document.test.d.ts +2 -0
  384. package/dist/tools/__tests__/create-document.test.d.ts.map +1 -0
  385. package/dist/tools/__tests__/create-document.test.js +255 -0
  386. package/dist/tools/__tests__/create-document.test.js.map +1 -0
  387. package/dist/tools/__tests__/delete-document.test.d.ts +7 -0
  388. package/dist/tools/__tests__/delete-document.test.d.ts.map +1 -0
  389. package/dist/tools/__tests__/delete-document.test.js +311 -0
  390. package/dist/tools/__tests__/delete-document.test.js.map +1 -0
  391. package/dist/tools/__tests__/edit-document.test.d.ts +2 -0
  392. package/dist/tools/__tests__/edit-document.test.d.ts.map +1 -0
  393. package/dist/tools/__tests__/edit-document.test.js +644 -0
  394. package/dist/tools/__tests__/edit-document.test.js.map +1 -0
  395. package/dist/tools/__tests__/error-scenarios.test.d.ts +5 -0
  396. package/dist/tools/__tests__/error-scenarios.test.d.ts.map +1 -0
  397. package/dist/tools/__tests__/error-scenarios.test.js +105 -0
  398. package/dist/tools/__tests__/error-scenarios.test.js.map +1 -0
  399. package/dist/tools/__tests__/mocks/document-manager.mock.d.ts +99 -0
  400. package/dist/tools/__tests__/mocks/document-manager.mock.d.ts.map +1 -0
  401. package/dist/tools/__tests__/mocks/document-manager.mock.js +457 -0
  402. package/dist/tools/__tests__/mocks/document-manager.mock.js.map +1 -0
  403. package/dist/tools/__tests__/mocks/filesystem.mock.d.ts +103 -0
  404. package/dist/tools/__tests__/mocks/filesystem.mock.d.ts.map +1 -0
  405. package/dist/tools/__tests__/mocks/filesystem.mock.js +247 -0
  406. package/dist/tools/__tests__/mocks/filesystem.mock.js.map +1 -0
  407. package/dist/tools/__tests__/move-document.test.d.ts +12 -0
  408. package/dist/tools/__tests__/move-document.test.d.ts.map +1 -0
  409. package/dist/tools/__tests__/move-document.test.js +214 -0
  410. package/dist/tools/__tests__/move-document.test.js.map +1 -0
  411. package/dist/tools/__tests__/move.test.d.ts +13 -0
  412. package/dist/tools/__tests__/move.test.d.ts.map +1 -0
  413. package/dist/tools/__tests__/move.test.js +939 -0
  414. package/dist/tools/__tests__/move.test.js.map +1 -0
  415. package/dist/tools/__tests__/section.integration.improved.test.d.ts +5 -0
  416. package/dist/tools/__tests__/section.integration.improved.test.d.ts.map +1 -0
  417. package/dist/tools/__tests__/section.integration.improved.test.js +199 -0
  418. package/dist/tools/__tests__/section.integration.improved.test.js.map +1 -0
  419. package/dist/tools/__tests__/section.integration.test.d.ts +5 -0
  420. package/dist/tools/__tests__/section.integration.test.d.ts.map +1 -0
  421. package/dist/tools/__tests__/section.integration.test.js +637 -0
  422. package/dist/tools/__tests__/section.integration.test.js.map +1 -0
  423. package/dist/tools/__tests__/setup/test-environment.d.ts +111 -0
  424. package/dist/tools/__tests__/setup/test-environment.d.ts.map +1 -0
  425. package/dist/tools/__tests__/setup/test-environment.js +322 -0
  426. package/dist/tools/__tests__/setup/test-environment.js.map +1 -0
  427. package/dist/tools/__tests__/suggestion-generator.test.d.ts +8 -0
  428. package/dist/tools/__tests__/suggestion-generator.test.d.ts.map +1 -0
  429. package/dist/tools/__tests__/suggestion-generator.test.js +508 -0
  430. package/dist/tools/__tests__/suggestion-generator.test.js.map +1 -0
  431. package/dist/tools/__tests__/task-consistency.test.d.ts +11 -0
  432. package/dist/tools/__tests__/task-consistency.test.d.ts.map +1 -0
  433. package/dist/tools/__tests__/task-consistency.test.js +93 -0
  434. package/dist/tools/__tests__/task-consistency.test.js.map +1 -0
  435. package/dist/tools/__tests__/task-status-parsing.test.d.ts +15 -0
  436. package/dist/tools/__tests__/task-status-parsing.test.d.ts.map +1 -0
  437. package/dist/tools/__tests__/task-status-parsing.test.js +126 -0
  438. package/dist/tools/__tests__/task-status-parsing.test.js.map +1 -0
  439. package/dist/tools/__tests__/view-section-boundary.test.d.ts +2 -0
  440. package/dist/tools/__tests__/view-section-boundary.test.d.ts.map +1 -0
  441. package/dist/tools/__tests__/view-section-boundary.test.js +132 -0
  442. package/dist/tools/__tests__/view-section-boundary.test.js.map +1 -0
  443. package/dist/tools/__tests__/write-operations-integration.test.d.ts +8 -0
  444. package/dist/tools/__tests__/write-operations-integration.test.d.ts.map +1 -0
  445. package/dist/tools/__tests__/write-operations-integration.test.js +136 -0
  446. package/dist/tools/__tests__/write-operations-integration.test.js.map +1 -0
  447. package/dist/tools/browse/content-analyzer.d.ts +27 -0
  448. package/dist/tools/browse/content-analyzer.d.ts.map +1 -0
  449. package/dist/tools/browse/content-analyzer.js +150 -0
  450. package/dist/tools/browse/content-analyzer.js.map +1 -0
  451. package/dist/tools/browse/dependency-analyzer.d.ts +63 -0
  452. package/dist/tools/browse/dependency-analyzer.d.ts.map +1 -0
  453. package/dist/tools/browse/dependency-analyzer.js +261 -0
  454. package/dist/tools/browse/dependency-analyzer.js.map +1 -0
  455. package/dist/tools/browse/folder-navigator.d.ts +35 -0
  456. package/dist/tools/browse/folder-navigator.d.ts.map +1 -0
  457. package/dist/tools/browse/folder-navigator.js +154 -0
  458. package/dist/tools/browse/folder-navigator.js.map +1 -0
  459. package/dist/tools/browse/index.d.ts +10 -0
  460. package/dist/tools/browse/index.d.ts.map +1 -0
  461. package/dist/tools/browse/index.js +14 -0
  462. package/dist/tools/browse/index.js.map +1 -0
  463. package/dist/tools/browse/relationship-classifier.d.ts +9 -0
  464. package/dist/tools/browse/relationship-classifier.d.ts.map +1 -0
  465. package/dist/tools/browse/relationship-classifier.js +38 -0
  466. package/dist/tools/browse/relationship-classifier.js.map +1 -0
  467. package/dist/tools/browse/search-engine.d.ts +69 -0
  468. package/dist/tools/browse/search-engine.d.ts.map +1 -0
  469. package/dist/tools/browse/search-engine.js +197 -0
  470. package/dist/tools/browse/search-engine.js.map +1 -0
  471. package/dist/tools/create/__tests__/file-creator.test.d.ts +6 -0
  472. package/dist/tools/create/__tests__/file-creator.test.d.ts.map +1 -0
  473. package/dist/tools/create/__tests__/file-creator.test.js +138 -0
  474. package/dist/tools/create/__tests__/file-creator.test.js.map +1 -0
  475. package/dist/tools/create/__tests__/template-processor.test.d.ts +6 -0
  476. package/dist/tools/create/__tests__/template-processor.test.d.ts.map +1 -0
  477. package/dist/tools/create/__tests__/template-processor.test.js +130 -0
  478. package/dist/tools/create/__tests__/template-processor.test.js.map +1 -0
  479. package/dist/tools/create/file-creator.d.ts +35 -0
  480. package/dist/tools/create/file-creator.d.ts.map +1 -0
  481. package/dist/tools/create/file-creator.js +103 -0
  482. package/dist/tools/create/file-creator.js.map +1 -0
  483. package/dist/tools/create/index.d.ts +6 -0
  484. package/dist/tools/create/index.d.ts.map +1 -0
  485. package/dist/tools/create/index.js +7 -0
  486. package/dist/tools/create/index.js.map +1 -0
  487. package/dist/tools/create/pipeline.d.ts +39 -0
  488. package/dist/tools/create/pipeline.d.ts.map +1 -0
  489. package/dist/tools/create/pipeline.js +112 -0
  490. package/dist/tools/create/pipeline.js.map +1 -0
  491. package/dist/tools/create/suggestion-generator.d.ts +47 -0
  492. package/dist/tools/create/suggestion-generator.d.ts.map +1 -0
  493. package/dist/tools/create/suggestion-generator.js +51 -0
  494. package/dist/tools/create/suggestion-generator.js.map +1 -0
  495. package/dist/tools/create/template-processor.d.ts +27 -0
  496. package/dist/tools/create/template-processor.d.ts.map +1 -0
  497. package/dist/tools/create/template-processor.js +74 -0
  498. package/dist/tools/create/template-processor.js.map +1 -0
  499. package/dist/tools/create/validation-processor.d.ts +48 -0
  500. package/dist/tools/create/validation-processor.d.ts.map +1 -0
  501. package/dist/tools/create/validation-processor.js +107 -0
  502. package/dist/tools/create/validation-processor.js.map +1 -0
  503. package/dist/tools/executor.d.ts +19 -0
  504. package/dist/tools/executor.d.ts.map +1 -0
  505. package/dist/tools/executor.js +53 -0
  506. package/dist/tools/executor.js.map +1 -0
  507. package/dist/tools/implementations/__tests__/browse-documents.test.d.ts +8 -0
  508. package/dist/tools/implementations/__tests__/browse-documents.test.d.ts.map +1 -0
  509. package/dist/tools/implementations/__tests__/browse-documents.test.js +319 -0
  510. package/dist/tools/implementations/__tests__/browse-documents.test.js.map +1 -0
  511. package/dist/tools/implementations/__tests__/complete-coordinator-task.test.d.ts +7 -0
  512. package/dist/tools/implementations/__tests__/complete-coordinator-task.test.d.ts.map +1 -0
  513. package/dist/tools/implementations/__tests__/complete-coordinator-task.test.js +440 -0
  514. package/dist/tools/implementations/__tests__/complete-coordinator-task.test.js.map +1 -0
  515. package/dist/tools/implementations/__tests__/complete-subagent-task.test.d.ts +14 -0
  516. package/dist/tools/implementations/__tests__/complete-subagent-task.test.d.ts.map +1 -0
  517. package/dist/tools/implementations/__tests__/complete-subagent-task.test.js +851 -0
  518. package/dist/tools/implementations/__tests__/complete-subagent-task.test.js.map +1 -0
  519. package/dist/tools/implementations/__tests__/complete-task-notes.test.d.ts +6 -0
  520. package/dist/tools/implementations/__tests__/complete-task-notes.test.d.ts.map +1 -0
  521. package/dist/tools/implementations/__tests__/complete-task-notes.test.js +157 -0
  522. package/dist/tools/implementations/__tests__/complete-task-notes.test.js.map +1 -0
  523. package/dist/tools/implementations/__tests__/complete-task.test.d.ts +14 -0
  524. package/dist/tools/implementations/__tests__/complete-task.test.d.ts.map +1 -0
  525. package/dist/tools/implementations/__tests__/complete-task.test.js +867 -0
  526. package/dist/tools/implementations/__tests__/complete-task.test.js.map +1 -0
  527. package/dist/tools/implementations/__tests__/continue-task.test.d.ts +11 -0
  528. package/dist/tools/implementations/__tests__/continue-task.test.d.ts.map +1 -0
  529. package/dist/tools/implementations/__tests__/continue-task.test.js +845 -0
  530. package/dist/tools/implementations/__tests__/continue-task.test.js.map +1 -0
  531. package/dist/tools/implementations/__tests__/coordinator-task.test.d.ts +7 -0
  532. package/dist/tools/implementations/__tests__/coordinator-task.test.d.ts.map +1 -0
  533. package/dist/tools/implementations/__tests__/coordinator-task.test.js +495 -0
  534. package/dist/tools/implementations/__tests__/coordinator-task.test.js.map +1 -0
  535. package/dist/tools/implementations/__tests__/get-guide.test.d.ts +8 -0
  536. package/dist/tools/implementations/__tests__/get-guide.test.d.ts.map +1 -0
  537. package/dist/tools/implementations/__tests__/get-guide.test.js +242 -0
  538. package/dist/tools/implementations/__tests__/get-guide.test.js.map +1 -0
  539. package/dist/tools/implementations/__tests__/get-workflow.test.d.ts +8 -0
  540. package/dist/tools/implementations/__tests__/get-workflow.test.d.ts.map +1 -0
  541. package/dist/tools/implementations/__tests__/get-workflow.test.js +232 -0
  542. package/dist/tools/implementations/__tests__/get-workflow.test.js.map +1 -0
  543. package/dist/tools/implementations/__tests__/search-documents.test.d.ts +8 -0
  544. package/dist/tools/implementations/__tests__/search-documents.test.d.ts.map +1 -0
  545. package/dist/tools/implementations/__tests__/search-documents.test.js +336 -0
  546. package/dist/tools/implementations/__tests__/search-documents.test.js.map +1 -0
  547. package/dist/tools/implementations/__tests__/start-coordinator-task.test.d.ts +7 -0
  548. package/dist/tools/implementations/__tests__/start-coordinator-task.test.d.ts.map +1 -0
  549. package/dist/tools/implementations/__tests__/start-coordinator-task.test.js +177 -0
  550. package/dist/tools/implementations/__tests__/start-coordinator-task.test.js.map +1 -0
  551. package/dist/tools/implementations/__tests__/start-subagent-task.test.d.ts +11 -0
  552. package/dist/tools/implementations/__tests__/start-subagent-task.test.d.ts.map +1 -0
  553. package/dist/tools/implementations/__tests__/start-subagent-task.test.js +846 -0
  554. package/dist/tools/implementations/__tests__/start-subagent-task.test.js.map +1 -0
  555. package/dist/tools/implementations/__tests__/start-task.test.d.ts +11 -0
  556. package/dist/tools/implementations/__tests__/start-task.test.d.ts.map +1 -0
  557. package/dist/tools/implementations/__tests__/start-task.test.js +828 -0
  558. package/dist/tools/implementations/__tests__/start-task.test.js.map +1 -0
  559. package/dist/tools/implementations/__tests__/subagent-task-batch-operations.test.d.ts +8 -0
  560. package/dist/tools/implementations/__tests__/subagent-task-batch-operations.test.d.ts.map +1 -0
  561. package/dist/tools/implementations/__tests__/subagent-task-batch-operations.test.js +199 -0
  562. package/dist/tools/implementations/__tests__/subagent-task-batch-operations.test.js.map +1 -0
  563. package/dist/tools/implementations/__tests__/subagent-task.test.d.ts +7 -0
  564. package/dist/tools/implementations/__tests__/subagent-task.test.d.ts.map +1 -0
  565. package/dist/tools/implementations/__tests__/subagent-task.test.js +720 -0
  566. package/dist/tools/implementations/__tests__/subagent-task.test.js.map +1 -0
  567. package/dist/tools/implementations/__tests__/task-batch-operations.test.d.ts +8 -0
  568. package/dist/tools/implementations/__tests__/task-batch-operations.test.d.ts.map +1 -0
  569. package/dist/tools/implementations/__tests__/task-batch-operations.test.js +200 -0
  570. package/dist/tools/implementations/__tests__/task-batch-operations.test.js.map +1 -0
  571. package/dist/tools/implementations/__tests__/task.test.d.ts +7 -0
  572. package/dist/tools/implementations/__tests__/task.test.d.ts.map +1 -0
  573. package/dist/tools/implementations/__tests__/task.test.js +578 -0
  574. package/dist/tools/implementations/__tests__/task.test.js.map +1 -0
  575. package/dist/tools/implementations/__tests__/view-coordinator-task.test.d.ts +13 -0
  576. package/dist/tools/implementations/__tests__/view-coordinator-task.test.d.ts.map +1 -0
  577. package/dist/tools/implementations/__tests__/view-coordinator-task.test.js +1404 -0
  578. package/dist/tools/implementations/__tests__/view-coordinator-task.test.js.map +1 -0
  579. package/dist/tools/implementations/__tests__/view-document.linked-context.test.d.ts +8 -0
  580. package/dist/tools/implementations/__tests__/view-document.linked-context.test.d.ts.map +1 -0
  581. package/dist/tools/implementations/__tests__/view-document.linked-context.test.js +235 -0
  582. package/dist/tools/implementations/__tests__/view-document.linked-context.test.js.map +1 -0
  583. package/dist/tools/implementations/__tests__/view-document.simplification.test.d.ts +9 -0
  584. package/dist/tools/implementations/__tests__/view-document.simplification.test.d.ts.map +1 -0
  585. package/dist/tools/implementations/__tests__/view-document.simplification.test.js +160 -0
  586. package/dist/tools/implementations/__tests__/view-document.simplification.test.js.map +1 -0
  587. package/dist/tools/implementations/__tests__/view-task.test.d.ts +12 -0
  588. package/dist/tools/implementations/__tests__/view-task.test.d.ts.map +1 -0
  589. package/dist/tools/implementations/__tests__/view-task.test.js +1158 -0
  590. package/dist/tools/implementations/__tests__/view-task.test.js.map +1 -0
  591. package/dist/tools/implementations/browse-documents.d.ts +36 -0
  592. package/dist/tools/implementations/browse-documents.d.ts.map +1 -0
  593. package/dist/tools/implementations/browse-documents.js +123 -0
  594. package/dist/tools/implementations/browse-documents.js.map +1 -0
  595. package/dist/tools/implementations/complete-coordinator-task.d.ts +53 -0
  596. package/dist/tools/implementations/complete-coordinator-task.d.ts.map +1 -0
  597. package/dist/tools/implementations/complete-coordinator-task.js +159 -0
  598. package/dist/tools/implementations/complete-coordinator-task.js.map +1 -0
  599. package/dist/tools/implementations/complete-subagent-task.d.ts +47 -0
  600. package/dist/tools/implementations/complete-subagent-task.d.ts.map +1 -0
  601. package/dist/tools/implementations/complete-subagent-task.js +141 -0
  602. package/dist/tools/implementations/complete-subagent-task.js.map +1 -0
  603. package/dist/tools/implementations/complete-task.d.ts +32 -0
  604. package/dist/tools/implementations/complete-task.d.ts.map +1 -0
  605. package/dist/tools/implementations/complete-task.hierarchical.test.d.ts +8 -0
  606. package/dist/tools/implementations/complete-task.hierarchical.test.d.ts.map +1 -0
  607. package/dist/tools/implementations/complete-task.hierarchical.test.js +363 -0
  608. package/dist/tools/implementations/complete-task.hierarchical.test.js.map +1 -0
  609. package/dist/tools/implementations/complete-task.js +122 -0
  610. package/dist/tools/implementations/complete-task.js.map +1 -0
  611. package/dist/tools/implementations/continue-task.d.ts +48 -0
  612. package/dist/tools/implementations/continue-task.d.ts.map +1 -0
  613. package/dist/tools/implementations/continue-task.js +167 -0
  614. package/dist/tools/implementations/continue-task.js.map +1 -0
  615. package/dist/tools/implementations/coordinator-task.d.ts +72 -0
  616. package/dist/tools/implementations/coordinator-task.d.ts.map +1 -0
  617. package/dist/tools/implementations/coordinator-task.js +169 -0
  618. package/dist/tools/implementations/coordinator-task.js.map +1 -0
  619. package/dist/tools/implementations/create-document.d.ts +12 -0
  620. package/dist/tools/implementations/create-document.d.ts.map +1 -0
  621. package/dist/tools/implementations/create-document.js +15 -0
  622. package/dist/tools/implementations/create-document.js.map +1 -0
  623. package/dist/tools/implementations/delete-document.d.ts +16 -0
  624. package/dist/tools/implementations/delete-document.d.ts.map +1 -0
  625. package/dist/tools/implementations/delete-document.js +70 -0
  626. package/dist/tools/implementations/delete-document.js.map +1 -0
  627. package/dist/tools/implementations/edit-document.d.ts +8 -0
  628. package/dist/tools/implementations/edit-document.d.ts.map +1 -0
  629. package/dist/tools/implementations/edit-document.js +118 -0
  630. package/dist/tools/implementations/edit-document.js.map +1 -0
  631. package/dist/tools/implementations/get-guide.d.ts +13 -0
  632. package/dist/tools/implementations/get-guide.d.ts.map +1 -0
  633. package/dist/tools/implementations/get-guide.js +64 -0
  634. package/dist/tools/implementations/get-guide.js.map +1 -0
  635. package/dist/tools/implementations/get-workflow.d.ts +12 -0
  636. package/dist/tools/implementations/get-workflow.d.ts.map +1 -0
  637. package/dist/tools/implementations/get-workflow.js +71 -0
  638. package/dist/tools/implementations/get-workflow.js.map +1 -0
  639. package/dist/tools/implementations/index.d.ts +24 -0
  640. package/dist/tools/implementations/index.d.ts.map +1 -0
  641. package/dist/tools/implementations/index.js +24 -0
  642. package/dist/tools/implementations/index.js.map +1 -0
  643. package/dist/tools/implementations/manage-document.d.ts +8 -0
  644. package/dist/tools/implementations/manage-document.d.ts.map +1 -0
  645. package/dist/tools/implementations/manage-document.js +180 -0
  646. package/dist/tools/implementations/manage-document.js.map +1 -0
  647. package/dist/tools/implementations/move-document.d.ts +12 -0
  648. package/dist/tools/implementations/move-document.d.ts.map +1 -0
  649. package/dist/tools/implementations/move-document.js +72 -0
  650. package/dist/tools/implementations/move-document.js.map +1 -0
  651. package/dist/tools/implementations/move.d.ts +24 -0
  652. package/dist/tools/implementations/move.d.ts.map +1 -0
  653. package/dist/tools/implementations/move.js +167 -0
  654. package/dist/tools/implementations/move.js.map +1 -0
  655. package/dist/tools/implementations/search-documents.d.ts +39 -0
  656. package/dist/tools/implementations/search-documents.d.ts.map +1 -0
  657. package/dist/tools/implementations/search-documents.js +246 -0
  658. package/dist/tools/implementations/search-documents.js.map +1 -0
  659. package/dist/tools/implementations/section.d.ts +42 -0
  660. package/dist/tools/implementations/section.d.ts.map +1 -0
  661. package/dist/tools/implementations/section.hierarchical.test.d.ts +8 -0
  662. package/dist/tools/implementations/section.hierarchical.test.d.ts.map +1 -0
  663. package/dist/tools/implementations/section.hierarchical.test.js +299 -0
  664. package/dist/tools/implementations/section.hierarchical.test.js.map +1 -0
  665. package/dist/tools/implementations/section.js +244 -0
  666. package/dist/tools/implementations/section.js.map +1 -0
  667. package/dist/tools/implementations/section.test.d.ts +5 -0
  668. package/dist/tools/implementations/section.test.d.ts.map +1 -0
  669. package/dist/tools/implementations/section.test.js +371 -0
  670. package/dist/tools/implementations/section.test.js.map +1 -0
  671. package/dist/tools/implementations/start-coordinator-task.d.ts +44 -0
  672. package/dist/tools/implementations/start-coordinator-task.d.ts.map +1 -0
  673. package/dist/tools/implementations/start-coordinator-task.js +125 -0
  674. package/dist/tools/implementations/start-coordinator-task.js.map +1 -0
  675. package/dist/tools/implementations/start-subagent-task.d.ts +53 -0
  676. package/dist/tools/implementations/start-subagent-task.d.ts.map +1 -0
  677. package/dist/tools/implementations/start-subagent-task.js +179 -0
  678. package/dist/tools/implementations/start-subagent-task.js.map +1 -0
  679. package/dist/tools/implementations/start-task.d.ts +48 -0
  680. package/dist/tools/implementations/start-task.d.ts.map +1 -0
  681. package/dist/tools/implementations/start-task.js +216 -0
  682. package/dist/tools/implementations/start-task.js.map +1 -0
  683. package/dist/tools/implementations/subagent-task.d.ts +98 -0
  684. package/dist/tools/implementations/subagent-task.d.ts.map +1 -0
  685. package/dist/tools/implementations/subagent-task.js +277 -0
  686. package/dist/tools/implementations/subagent-task.js.map +1 -0
  687. package/dist/tools/implementations/task.d.ts +97 -0
  688. package/dist/tools/implementations/task.d.ts.map +1 -0
  689. package/dist/tools/implementations/task.hierarchical.test.d.ts +8 -0
  690. package/dist/tools/implementations/task.hierarchical.test.d.ts.map +1 -0
  691. package/dist/tools/implementations/task.hierarchical.test.js +333 -0
  692. package/dist/tools/implementations/task.hierarchical.test.js.map +1 -0
  693. package/dist/tools/implementations/task.js +235 -0
  694. package/dist/tools/implementations/task.js.map +1 -0
  695. package/dist/tools/implementations/view-coordinator-task.d.ts +61 -0
  696. package/dist/tools/implementations/view-coordinator-task.d.ts.map +1 -0
  697. package/dist/tools/implementations/view-coordinator-task.js +295 -0
  698. package/dist/tools/implementations/view-coordinator-task.js.map +1 -0
  699. package/dist/tools/implementations/view-document.d.ts +84 -0
  700. package/dist/tools/implementations/view-document.d.ts.map +1 -0
  701. package/dist/tools/implementations/view-document.js +287 -0
  702. package/dist/tools/implementations/view-document.js.map +1 -0
  703. package/dist/tools/implementations/view-section.d.ts +28 -0
  704. package/dist/tools/implementations/view-section.d.ts.map +1 -0
  705. package/dist/tools/implementations/view-section.hierarchical.test.d.ts +8 -0
  706. package/dist/tools/implementations/view-section.hierarchical.test.d.ts.map +1 -0
  707. package/dist/tools/implementations/view-section.hierarchical.test.js +318 -0
  708. package/dist/tools/implementations/view-section.hierarchical.test.js.map +1 -0
  709. package/dist/tools/implementations/view-section.js +167 -0
  710. package/dist/tools/implementations/view-section.js.map +1 -0
  711. package/dist/tools/implementations/view-subagent-task.d.ts +46 -0
  712. package/dist/tools/implementations/view-subagent-task.d.ts.map +1 -0
  713. package/dist/tools/implementations/view-subagent-task.js +283 -0
  714. package/dist/tools/implementations/view-subagent-task.js.map +1 -0
  715. package/dist/tools/implementations/view-task.d.ts +43 -0
  716. package/dist/tools/implementations/view-task.d.ts.map +1 -0
  717. package/dist/tools/implementations/view-task.hierarchical.test.d.ts +8 -0
  718. package/dist/tools/implementations/view-task.hierarchical.test.d.ts.map +1 -0
  719. package/dist/tools/implementations/view-task.hierarchical.test.js +420 -0
  720. package/dist/tools/implementations/view-task.hierarchical.test.js.map +1 -0
  721. package/dist/tools/implementations/view-task.js +280 -0
  722. package/dist/tools/implementations/view-task.js.map +1 -0
  723. package/dist/tools/index.d.ts +6 -0
  724. package/dist/tools/index.d.ts.map +1 -0
  725. package/dist/tools/index.js +6 -0
  726. package/dist/tools/index.js.map +1 -0
  727. package/dist/tools/registry.d.ts +10 -0
  728. package/dist/tools/registry.d.ts.map +1 -0
  729. package/dist/tools/registry.js +132 -0
  730. package/dist/tools/registry.js.map +1 -0
  731. package/dist/tools/schemas/__tests__/get-guide-schemas.test.d.ts +8 -0
  732. package/dist/tools/schemas/__tests__/get-guide-schemas.test.d.ts.map +1 -0
  733. package/dist/tools/schemas/__tests__/get-guide-schemas.test.js +216 -0
  734. package/dist/tools/schemas/__tests__/get-guide-schemas.test.js.map +1 -0
  735. package/dist/tools/schemas/__tests__/get-workflow-schemas.test.d.ts +8 -0
  736. package/dist/tools/schemas/__tests__/get-workflow-schemas.test.d.ts.map +1 -0
  737. package/dist/tools/schemas/__tests__/get-workflow-schemas.test.js +229 -0
  738. package/dist/tools/schemas/__tests__/get-workflow-schemas.test.js.map +1 -0
  739. package/dist/tools/schemas/browse-documents-schemas.d.ts +47 -0
  740. package/dist/tools/schemas/browse-documents-schemas.d.ts.map +1 -0
  741. package/dist/tools/schemas/browse-documents-schemas.js +48 -0
  742. package/dist/tools/schemas/browse-documents-schemas.js.map +1 -0
  743. package/dist/tools/schemas/complete-coordinator-task-schemas.d.ts +41 -0
  744. package/dist/tools/schemas/complete-coordinator-task-schemas.d.ts.map +1 -0
  745. package/dist/tools/schemas/complete-coordinator-task-schemas.js +42 -0
  746. package/dist/tools/schemas/complete-coordinator-task-schemas.js.map +1 -0
  747. package/dist/tools/schemas/complete-subagent-task-schemas.d.ts +38 -0
  748. package/dist/tools/schemas/complete-subagent-task-schemas.d.ts.map +1 -0
  749. package/dist/tools/schemas/complete-subagent-task-schemas.js +41 -0
  750. package/dist/tools/schemas/complete-subagent-task-schemas.js.map +1 -0
  751. package/dist/tools/schemas/complete-task-schemas.d.ts +33 -0
  752. package/dist/tools/schemas/complete-task-schemas.d.ts.map +1 -0
  753. package/dist/tools/schemas/complete-task-schemas.js +36 -0
  754. package/dist/tools/schemas/complete-task-schemas.js.map +1 -0
  755. package/dist/tools/schemas/continue-task-schemas.d.ts +27 -0
  756. package/dist/tools/schemas/continue-task-schemas.d.ts.map +1 -0
  757. package/dist/tools/schemas/continue-task-schemas.js +28 -0
  758. package/dist/tools/schemas/continue-task-schemas.js.map +1 -0
  759. package/dist/tools/schemas/coordinator-task-schemas.d.ts +87 -0
  760. package/dist/tools/schemas/coordinator-task-schemas.d.ts.map +1 -0
  761. package/dist/tools/schemas/coordinator-task-schemas.js +80 -0
  762. package/dist/tools/schemas/coordinator-task-schemas.js.map +1 -0
  763. package/dist/tools/schemas/create-document-schemas.d.ts +61 -0
  764. package/dist/tools/schemas/create-document-schemas.d.ts.map +1 -0
  765. package/dist/tools/schemas/create-document-schemas.js +143 -0
  766. package/dist/tools/schemas/create-document-schemas.js.map +1 -0
  767. package/dist/tools/schemas/delete-document-schemas.d.ts +24 -0
  768. package/dist/tools/schemas/delete-document-schemas.d.ts.map +1 -0
  769. package/dist/tools/schemas/delete-document-schemas.js +25 -0
  770. package/dist/tools/schemas/delete-document-schemas.js.map +1 -0
  771. package/dist/tools/schemas/edit-document-schemas.d.ts +27 -0
  772. package/dist/tools/schemas/edit-document-schemas.d.ts.map +1 -0
  773. package/dist/tools/schemas/edit-document-schemas.js +28 -0
  774. package/dist/tools/schemas/edit-document-schemas.js.map +1 -0
  775. package/dist/tools/schemas/get-guide-schemas.d.ts +35 -0
  776. package/dist/tools/schemas/get-guide-schemas.d.ts.map +1 -0
  777. package/dist/tools/schemas/get-guide-schemas.js +66 -0
  778. package/dist/tools/schemas/get-guide-schemas.js.map +1 -0
  779. package/dist/tools/schemas/get-workflow-schemas.d.ts +35 -0
  780. package/dist/tools/schemas/get-workflow-schemas.d.ts.map +1 -0
  781. package/dist/tools/schemas/get-workflow-schemas.js +67 -0
  782. package/dist/tools/schemas/get-workflow-schemas.js.map +1 -0
  783. package/dist/tools/schemas/manage-document-schemas.d.ts +59 -0
  784. package/dist/tools/schemas/manage-document-schemas.d.ts.map +1 -0
  785. package/dist/tools/schemas/manage-document-schemas.js +83 -0
  786. package/dist/tools/schemas/manage-document-schemas.js.map +1 -0
  787. package/dist/tools/schemas/move-document-schemas.d.ts +25 -0
  788. package/dist/tools/schemas/move-document-schemas.d.ts.map +1 -0
  789. package/dist/tools/schemas/move-document-schemas.js +26 -0
  790. package/dist/tools/schemas/move-document-schemas.js.map +1 -0
  791. package/dist/tools/schemas/move-schemas.d.ts +43 -0
  792. package/dist/tools/schemas/move-schemas.d.ts.map +1 -0
  793. package/dist/tools/schemas/move-schemas.js +43 -0
  794. package/dist/tools/schemas/move-schemas.js.map +1 -0
  795. package/dist/tools/schemas/search-documents-schemas.d.ts +77 -0
  796. package/dist/tools/schemas/search-documents-schemas.d.ts.map +1 -0
  797. package/dist/tools/schemas/search-documents-schemas.js +78 -0
  798. package/dist/tools/schemas/search-documents-schemas.js.map +1 -0
  799. package/dist/tools/schemas/section-schemas.d.ts +361 -0
  800. package/dist/tools/schemas/section-schemas.d.ts.map +1 -0
  801. package/dist/tools/schemas/section-schemas.js +182 -0
  802. package/dist/tools/schemas/section-schemas.js.map +1 -0
  803. package/dist/tools/schemas/start-coordinator-task-schemas.d.ts +30 -0
  804. package/dist/tools/schemas/start-coordinator-task-schemas.d.ts.map +1 -0
  805. package/dist/tools/schemas/start-coordinator-task-schemas.js +31 -0
  806. package/dist/tools/schemas/start-coordinator-task-schemas.js.map +1 -0
  807. package/dist/tools/schemas/start-subagent-task-schemas.d.ts +29 -0
  808. package/dist/tools/schemas/start-subagent-task-schemas.d.ts.map +1 -0
  809. package/dist/tools/schemas/start-subagent-task-schemas.js +40 -0
  810. package/dist/tools/schemas/start-subagent-task-schemas.js.map +1 -0
  811. package/dist/tools/schemas/start-task-schemas.d.ts +23 -0
  812. package/dist/tools/schemas/start-task-schemas.d.ts.map +1 -0
  813. package/dist/tools/schemas/start-task-schemas.js +39 -0
  814. package/dist/tools/schemas/start-task-schemas.js.map +1 -0
  815. package/dist/tools/schemas/subagent-task-schemas.d.ts +93 -0
  816. package/dist/tools/schemas/subagent-task-schemas.d.ts.map +1 -0
  817. package/dist/tools/schemas/subagent-task-schemas.js +81 -0
  818. package/dist/tools/schemas/subagent-task-schemas.js.map +1 -0
  819. package/dist/tools/schemas/task-schemas.d.ts +88 -0
  820. package/dist/tools/schemas/task-schemas.d.ts.map +1 -0
  821. package/dist/tools/schemas/task-schemas.js +80 -0
  822. package/dist/tools/schemas/task-schemas.js.map +1 -0
  823. package/dist/tools/schemas/view-coordinator-task-schemas.d.ts +27 -0
  824. package/dist/tools/schemas/view-coordinator-task-schemas.d.ts.map +1 -0
  825. package/dist/tools/schemas/view-coordinator-task-schemas.js +46 -0
  826. package/dist/tools/schemas/view-coordinator-task-schemas.js.map +1 -0
  827. package/dist/tools/schemas/view-document-schemas.d.ts +152 -0
  828. package/dist/tools/schemas/view-document-schemas.d.ts.map +1 -0
  829. package/dist/tools/schemas/view-document-schemas.js +70 -0
  830. package/dist/tools/schemas/view-document-schemas.js.map +1 -0
  831. package/dist/tools/schemas/view-section-schemas.d.ts +31 -0
  832. package/dist/tools/schemas/view-section-schemas.d.ts.map +1 -0
  833. package/dist/tools/schemas/view-section-schemas.js +56 -0
  834. package/dist/tools/schemas/view-section-schemas.js.map +1 -0
  835. package/dist/tools/schemas/view-subagent-task-schemas.d.ts +31 -0
  836. package/dist/tools/schemas/view-subagent-task-schemas.d.ts.map +1 -0
  837. package/dist/tools/schemas/view-subagent-task-schemas.js +65 -0
  838. package/dist/tools/schemas/view-subagent-task-schemas.js.map +1 -0
  839. package/dist/tools/schemas/view-task-schemas.d.ts +31 -0
  840. package/dist/tools/schemas/view-task-schemas.d.ts.map +1 -0
  841. package/dist/tools/schemas/view-task-schemas.js +62 -0
  842. package/dist/tools/schemas/view-task-schemas.js.map +1 -0
  843. package/dist/tools/types.d.ts +98 -0
  844. package/dist/tools/types.d.ts.map +1 -0
  845. package/dist/tools/types.js +9 -0
  846. package/dist/tools/types.js.map +1 -0
  847. package/dist/tools-manager.d.ts +8 -0
  848. package/dist/tools-manager.d.ts.map +1 -0
  849. package/dist/tools-manager.js +9 -0
  850. package/dist/tools-manager.js.map +1 -0
  851. package/dist/types/core.d.ts +71 -0
  852. package/dist/types/core.d.ts.map +1 -0
  853. package/dist/types/core.js +5 -0
  854. package/dist/types/core.js.map +1 -0
  855. package/dist/types/index.d.ts +5 -0
  856. package/dist/types/index.d.ts.map +1 -0
  857. package/dist/types/index.js +5 -0
  858. package/dist/types/index.js.map +1 -0
  859. package/dist/types/linking.d.ts +97 -0
  860. package/dist/types/linking.d.ts.map +1 -0
  861. package/dist/types/linking.js +5 -0
  862. package/dist/types/linking.js.map +1 -0
  863. package/dist/utils/__tests__/path-handler.archive.test.d.ts +8 -0
  864. package/dist/utils/__tests__/path-handler.archive.test.d.ts.map +1 -0
  865. package/dist/utils/__tests__/path-handler.archive.test.js +163 -0
  866. package/dist/utils/__tests__/path-handler.archive.test.js.map +1 -0
  867. package/dist/utils/error-formatter.d.ts +32 -0
  868. package/dist/utils/error-formatter.d.ts.map +1 -0
  869. package/dist/utils/error-formatter.js +79 -0
  870. package/dist/utils/error-formatter.js.map +1 -0
  871. package/dist/utils/logger.d.ts +21 -0
  872. package/dist/utils/logger.d.ts.map +1 -0
  873. package/dist/utils/logger.js +154 -0
  874. package/dist/utils/logger.js.map +1 -0
  875. package/dist/utils/path-handler.d.ts +52 -0
  876. package/dist/utils/path-handler.d.ts.map +1 -0
  877. package/dist/utils/path-handler.js +129 -0
  878. package/dist/utils/path-handler.js.map +1 -0
  879. package/dist/utils/security-audit-logger.d.ts +64 -0
  880. package/dist/utils/security-audit-logger.d.ts.map +1 -0
  881. package/dist/utils/security-audit-logger.js +56 -0
  882. package/dist/utils/security-audit-logger.js.map +1 -0
  883. package/dist/utils/virtual-path-resolver.d.ts +126 -0
  884. package/dist/utils/virtual-path-resolver.d.ts.map +1 -0
  885. package/dist/utils/virtual-path-resolver.js +171 -0
  886. package/dist/utils/virtual-path-resolver.js.map +1 -0
  887. package/package.json +82 -0
@@ -0,0 +1,799 @@
1
+ /**
2
+ * Central addressing system for consistent document/section/task addressing
3
+ *
4
+ * This module provides unified addressing patterns to prevent inconsistencies
5
+ * across the codebase in how documents, sections, and tasks are referenced.
6
+ *
7
+ * Key Features:
8
+ * - Type-safe addressing with validation
9
+ * - Flexible input format support (#slug, slug, /doc.md#slug)
10
+ * - Relative path structure (user-facing paths are relative to base folders)
11
+ * - Performance caching for repeated operations
12
+ * - Comparison utilities for address equality
13
+ * - Standard tool integration patterns
14
+ * - Comprehensive error handling
15
+ *
16
+ * Path Structure:
17
+ * - User-facing: /api/auth.md (relative to docs/ folder)
18
+ * - Internal: May include namespace prefixes for file operations
19
+ * - Archives: /archived/docs/... (explicit prefix per requirements)
20
+ */
21
+ /**
22
+ * Custom error types for addressing system
23
+ *
24
+ * These error classes provide consistent error handling throughout the addressing system
25
+ * with standardized error codes and contextual information for debugging and recovery.
26
+ */
27
+ /**
28
+ * Base error class for all addressing system errors
29
+ *
30
+ * Provides structured error information with error codes and contextual data
31
+ * for programmatic error handling and debugging.
32
+ *
33
+ * @param message - Human-readable error message
34
+ * @param code - Machine-readable error code for programmatic handling
35
+ * @param context - Additional context about the error for debugging
36
+ *
37
+ * @example Basic error handling
38
+ * ```typescript
39
+ * try {
40
+ * // Some addressing operation
41
+ * } catch (error) {
42
+ * if (error instanceof AddressingError) {
43
+ * console.error('Error code:', error.code);
44
+ * console.error('Context:', error.context);
45
+ * }
46
+ * }
47
+ * ```
48
+ *
49
+ * @example Error code checking
50
+ * ```typescript
51
+ * try {
52
+ * parseDocumentAddress('/invalid/path');
53
+ * } catch (error) {
54
+ * if (error instanceof AddressingError && error.code === 'DOCUMENT_NOT_FOUND') {
55
+ * // Handle missing document specifically
56
+ * }
57
+ * }
58
+ * ```
59
+ */
60
+ export declare class AddressingError extends Error {
61
+ code: string;
62
+ context?: Record<string, unknown> | undefined;
63
+ constructor(message: string, code: string, context?: Record<string, unknown> | undefined);
64
+ }
65
+ /**
66
+ * Error thrown when a document cannot be found at the specified path
67
+ *
68
+ * This error indicates that the document path is valid but the document
69
+ * does not exist in the file system or document cache.
70
+ *
71
+ * @param path - The document path that was not found
72
+ *
73
+ * @example Handling missing documents
74
+ * ```typescript
75
+ * try {
76
+ * const doc = parseDocumentAddress('/missing/document.md');
77
+ * } catch (error) {
78
+ * if (error instanceof DocumentNotFoundError) {
79
+ * console.error('Document not found:', error.context.path);
80
+ * // Suggest creating the document or checking the path
81
+ * }
82
+ * }
83
+ * ```
84
+ *
85
+ * @example Recovery strategy
86
+ * ```typescript
87
+ * try {
88
+ * return parseDocumentAddress(documentPath);
89
+ * } catch (error) {
90
+ * if (error instanceof DocumentNotFoundError) {
91
+ * // Try alternative paths or suggest creation
92
+ * return suggestAlternativeDocuments(error.context.path);
93
+ * }
94
+ * throw error;
95
+ * }
96
+ * ```
97
+ */
98
+ export declare class DocumentNotFoundError extends AddressingError {
99
+ constructor(path: string);
100
+ }
101
+ /**
102
+ * Error thrown when a section cannot be found within a document
103
+ *
104
+ * This error indicates that the document exists but the specified section
105
+ * slug does not match any section in the document.
106
+ *
107
+ * @param slug - The section slug that was not found
108
+ * @param documentPath - The document path where the section was searched
109
+ *
110
+ * @example Handling missing sections
111
+ * ```typescript
112
+ * try {
113
+ * const section = parseSectionAddress('missing-section', '/api/auth.md');
114
+ * } catch (error) {
115
+ * if (error instanceof SectionNotFoundError) {
116
+ * console.error('Section not found:', error.context.slug);
117
+ * console.error('In document:', error.context.documentPath);
118
+ * // Suggest available sections or check section name
119
+ * }
120
+ * }
121
+ * ```
122
+ *
123
+ * @example Hierarchical section recovery
124
+ * ```typescript
125
+ * try {
126
+ * return parseSectionAddress(sectionSlug, documentPath);
127
+ * } catch (error) {
128
+ * if (error instanceof SectionNotFoundError) {
129
+ * const slug = error.context.slug;
130
+ * if (slug.includes('/')) {
131
+ * // Try parent section for hierarchical addresses
132
+ * const parentSlug = slug.split('/').slice(0, -1).join('/');
133
+ * console.log(`Section not found. Try parent section: ${parentSlug}`);
134
+ * }
135
+ * }
136
+ * throw error;
137
+ * }
138
+ * ```
139
+ */
140
+ export declare class SectionNotFoundError extends AddressingError {
141
+ constructor(slug: string, documentPath: string);
142
+ }
143
+ /**
144
+ * Error thrown when an address format is invalid or malformed
145
+ *
146
+ * This error indicates that the provided address string does not conform
147
+ * to expected patterns or contains invalid characters or structure.
148
+ *
149
+ * @param address - The invalid address that was provided
150
+ * @param reason - Specific reason why the address is invalid
151
+ *
152
+ * @example Handling invalid addresses
153
+ * ```typescript
154
+ * try {
155
+ * const doc = parseDocumentAddress('invalid-path');
156
+ * } catch (error) {
157
+ * if (error instanceof InvalidAddressError) {
158
+ * console.error('Invalid address:', error.context.address);
159
+ * console.error('Reason:', error.context.reason);
160
+ * // Provide guidance on correct address format
161
+ * }
162
+ * }
163
+ * ```
164
+ *
165
+ * @example Address format validation
166
+ * ```typescript
167
+ * function validateAndParseAddress(address: string) {
168
+ * try {
169
+ * return parseDocumentAddress(address);
170
+ * } catch (error) {
171
+ * if (error instanceof InvalidAddressError) {
172
+ * switch (error.context.reason) {
173
+ * case 'Document path must end with .md':
174
+ * return parseDocumentAddress(address + '.md');
175
+ * case 'Document path cannot be empty':
176
+ * throw new Error('Please provide a document path');
177
+ * default:
178
+ * throw error;
179
+ * }
180
+ * }
181
+ * throw error;
182
+ * }
183
+ * }
184
+ * ```
185
+ */
186
+ export declare class InvalidAddressError extends AddressingError {
187
+ constructor(address: string, reason: string);
188
+ }
189
+ /**
190
+ * Batch cache statistics for debugging and monitoring
191
+ */
192
+ export interface BatchCacheStats {
193
+ readonly size: number;
194
+ readonly keys: string[];
195
+ }
196
+ /**
197
+ * Address parsing cache optimized for batch operations
198
+ *
199
+ * This cache uses a simple Map for batch-scoped caching instead of persistent LRU caching.
200
+ * Cache entries are only valid for the current batch operation and are cleared after each batch.
201
+ *
202
+ * Benefits of batch-scoped caching:
203
+ * - Simpler implementation (no LRU logic needed)
204
+ * - Lower memory footprint (no persistent 1000-entry cache)
205
+ * - Same performance for batch operations (addresses cached within batch)
206
+ * - Clearer memory model (cache lifecycle tied to batch lifecycle)
207
+ */
208
+ declare class AddressCache {
209
+ private readonly batchCache;
210
+ private batchStartTime;
211
+ private readonly BATCH_TIMEOUT_MS;
212
+ /**
213
+ * Check if batch cache has timed out and clear if needed
214
+ */
215
+ private checkBatchTimeout;
216
+ /**
217
+ * Get document address from batch cache
218
+ */
219
+ getDocument(path: string): DocumentAddress | undefined;
220
+ /**
221
+ * Set document address in batch cache
222
+ */
223
+ setDocument(path: string, address: DocumentAddress): void;
224
+ /**
225
+ * Get section address from batch cache
226
+ */
227
+ getSection(key: string): SectionAddress | undefined;
228
+ /**
229
+ * Set section address in batch cache
230
+ */
231
+ setSection(key: string, address: SectionAddress): void;
232
+ /**
233
+ * Clear all batch cache entries
234
+ *
235
+ * This should be called after completing a batch operation to free memory
236
+ * and ensure fresh parsing for the next batch.
237
+ */
238
+ clearBatch(): void;
239
+ /**
240
+ * Get batch cache statistics for debugging
241
+ *
242
+ * Returns the current size and all cache keys for monitoring and debugging
243
+ * batch caching behavior.
244
+ */
245
+ getBatchStats(): BatchCacheStats;
246
+ /**
247
+ * Invalidate all cached addresses for a specific document
248
+ *
249
+ * This clears the batch cache entries for a document and its sections.
250
+ * Called when a document changes to ensure cache consistency.
251
+ */
252
+ invalidateDocument(docPath: string): void;
253
+ }
254
+ /**
255
+ * Get global address cache instance for testing and batch management
256
+ *
257
+ * This allows external code to clear the batch cache and access statistics.
258
+ * Primarily used for:
259
+ * - Testing batch cache behavior
260
+ * - Clearing cache after batch operations
261
+ * - Monitoring cache statistics
262
+ */
263
+ export declare function getGlobalAddressCache(): AddressCache;
264
+ /**
265
+ * Invalidate addressing cache entries for a specific document
266
+ *
267
+ * This should be called when a document changes to maintain cache consistency.
268
+ * Clears both the document entry and all section entries for that document.
269
+ */
270
+ export declare function invalidateAddressCache(docPath: string): void;
271
+ /**
272
+ * Core addressing interfaces
273
+ */
274
+ export interface DocumentAddress {
275
+ /**
276
+ * Full document path starting with /
277
+ * User-facing paths are relative to base folders:
278
+ * - /api/auth.md (relative to docs/)
279
+ * - /active.md (relative to coordinator/)
280
+ * - /archived/docs/api/auth.md (explicit archive prefix)
281
+ */
282
+ readonly path: string;
283
+ /** Document slug (filename without extension) */
284
+ readonly slug: string;
285
+ /**
286
+ * Document namespace (folder path or 'root')
287
+ * Extracted from the path structure:
288
+ * - /api/auth.md → 'api'
289
+ * - /api/specs/auth.md → 'api/specs'
290
+ * - /active.md → 'root'
291
+ */
292
+ readonly namespace: string;
293
+ /** Normalized path for internal use */
294
+ readonly normalizedPath: string;
295
+ /** Cache key for this address */
296
+ readonly cacheKey: string;
297
+ }
298
+ export interface SectionAddress {
299
+ /** Parent document address */
300
+ readonly document: DocumentAddress;
301
+ /** Section slug (normalized, no # prefix) */
302
+ readonly slug: string;
303
+ /** Full section path for referencing (document#section) */
304
+ readonly fullPath: string;
305
+ /** Cache key for this address */
306
+ readonly cacheKey: string;
307
+ }
308
+ export interface TaskAddress {
309
+ /** Parent document address */
310
+ readonly document: DocumentAddress;
311
+ /** Task slug (normalized, no # prefix) */
312
+ readonly slug: string;
313
+ /** Full task path for referencing */
314
+ readonly fullPath: string;
315
+ /** Flag indicating this is a task (always true) */
316
+ readonly isTask: true;
317
+ /** Cache key for this address */
318
+ readonly cacheKey: string;
319
+ }
320
+ /**
321
+ * Parse and normalize a document path with caching
322
+ *
323
+ * Accepts user-facing relative paths:
324
+ * - /api/auth.md (relative to docs/)
325
+ * - /active.md (relative to coordinator/)
326
+ * - /archived/docs/api/auth.md (explicit archive prefix)
327
+ *
328
+ * The system does NOT require or validate namespace prefixes like /docs/ or /coordinator/.
329
+ * Paths are relative to their base folders for cleaner user experience.
330
+ *
331
+ * @param docPath - Document path (relative to base folder)
332
+ * @returns Parsed and cached document address
333
+ * @throws {InvalidAddressError} When path format is invalid
334
+ *
335
+ * @example Regular document
336
+ * ```typescript
337
+ * const addr = parseDocumentAddress('/api/auth.md');
338
+ * // { path: '/api/auth.md', namespace: 'api', slug: 'auth' }
339
+ * ```
340
+ *
341
+ * @example Coordinator document
342
+ * ```typescript
343
+ * const addr = parseDocumentAddress('/active.md');
344
+ * // { path: '/active.md', namespace: 'root', slug: 'active' }
345
+ * ```
346
+ *
347
+ * @example Archived document
348
+ * ```typescript
349
+ * const addr = parseDocumentAddress('/archived/docs/api/auth.md');
350
+ * // { path: '/archived/docs/api/auth.md', namespace: 'archived/docs/api', slug: 'auth' }
351
+ * ```
352
+ */
353
+ export declare function parseDocumentAddress(docPath: string): DocumentAddress;
354
+ /**
355
+ * Parse and normalize a section reference with caching
356
+ * Supports formats: "section", "#section", "/doc.md#section"
357
+ */
358
+ export declare function parseSectionAddress(sectionRef: string, contextDoc?: string): SectionAddress;
359
+ /**
360
+ * Parse and normalize a task reference with caching
361
+ * Tasks are special sections that live under a "Tasks" parent section
362
+ */
363
+ export declare function parseTaskAddress(taskRef: string, contextDoc?: string): TaskAddress;
364
+ /**
365
+ * Check if a section is a task by looking at document structure
366
+ */
367
+ export declare function isTaskSection(sectionSlug: string, document: {
368
+ headings: ReadonlyArray<{
369
+ slug: string;
370
+ title: string;
371
+ depth: number;
372
+ }>;
373
+ }): Promise<boolean>;
374
+ /**
375
+ * Standardize addressing parameters for tool operations
376
+ */
377
+ export interface StandardizedParams {
378
+ document: DocumentAddress;
379
+ section?: SectionAddress;
380
+ task?: TaskAddress;
381
+ }
382
+ /**
383
+ * Hierarchical context information for section addresses
384
+ */
385
+ export interface HierarchicalContext {
386
+ full_path: string;
387
+ parent_path: string;
388
+ section_name: string;
389
+ depth: number;
390
+ }
391
+ /**
392
+ * Tool integration helpers - standard patterns for adopting the addressing system
393
+ *
394
+ * This class provides standardized methods for tools to consistently handle addressing,
395
+ * validation, formatting, and error handling across the MCP server.
396
+ */
397
+ export declare class ToolIntegration {
398
+ /**
399
+ * Standard parameter validation and parsing for document-based tools
400
+ *
401
+ * Validates and parses document/section/task addresses into standardized format.
402
+ * Throws AddressingError for validation failures with appropriate error codes.
403
+ *
404
+ * @param params - Parameters containing document and optional section/task references
405
+ * @returns Object with validated addresses and original params
406
+ * @throws {DocumentNotFoundError} When document path is invalid
407
+ * @throws {SectionNotFoundError} When section reference is invalid
408
+ * @throws {InvalidAddressError} When address format is malformed
409
+ * @throws {AddressingError} For general parameter validation failures
410
+ *
411
+ * @example Basic document validation (relative path)
412
+ * ```typescript
413
+ * const { addresses } = ToolIntegration.validateAndParse({
414
+ * document: '/api/auth.md' // Relative to docs/
415
+ * });
416
+ * // Returns: { addresses: { document: DocumentAddress }, params: {...} }
417
+ * ```
418
+ *
419
+ * @example Coordinator document
420
+ * ```typescript
421
+ * const { addresses } = ToolIntegration.validateAndParse({
422
+ * document: '/active.md' // Relative to coordinator/
423
+ * });
424
+ * ```
425
+ *
426
+ * @example Document with section
427
+ * ```typescript
428
+ * const { addresses } = ToolIntegration.validateAndParse({
429
+ * document: '/api/auth.md',
430
+ * section: 'jwt-tokens'
431
+ * });
432
+ * // Returns: { addresses: { document: DocumentAddress, section: SectionAddress }, params: {...} }
433
+ * ```
434
+ *
435
+ * @example Hierarchical section addressing
436
+ * ```typescript
437
+ * const { addresses } = ToolIntegration.validateAndParse({
438
+ * document: '/api/auth.md',
439
+ * section: 'authentication/jwt-tokens'
440
+ * });
441
+ * // Handles hierarchical paths automatically
442
+ * ```
443
+ */
444
+ static validateAndParse<T extends Record<string, unknown>>(params: T & {
445
+ document: string;
446
+ section?: string;
447
+ task?: string;
448
+ }): {
449
+ addresses: StandardizedParams;
450
+ params: T;
451
+ };
452
+ /**
453
+ * Standard document info response format
454
+ *
455
+ * Provides consistent document information structure across all tools.
456
+ * Returns only the human-readable title, as slug and namespace can be
457
+ * derived from the document path in the response.
458
+ *
459
+ * @param document - Document address object
460
+ * @param metadata - Optional metadata containing document title
461
+ * @returns Standardized document info object with title only
462
+ *
463
+ * @example Basic document info
464
+ * ```typescript
465
+ * const docInfo = ToolIntegration.formatDocumentInfo(document);
466
+ * // Returns: { title: 'auth' }
467
+ * ```
468
+ *
469
+ * @example With metadata title
470
+ * ```typescript
471
+ * const docInfo = ToolIntegration.formatDocumentInfo(document, { title: 'Authentication Guide' });
472
+ * // Returns: { title: 'Authentication Guide' }
473
+ * ```
474
+ */
475
+ static formatDocumentInfo(document: DocumentAddress, metadata?: {
476
+ title: string;
477
+ }): {
478
+ title: string;
479
+ };
480
+ /**
481
+ * Standard section path formatting for responses with hierarchical indicator
482
+ *
483
+ * Formats section paths consistently with hierarchical indicators when applicable.
484
+ * Adds "(hierarchical)" suffix for sections containing forward slashes.
485
+ *
486
+ * @param section - Section address object
487
+ * @returns Formatted section path with hierarchical indicator if applicable
488
+ *
489
+ * @example Flat section
490
+ * ```typescript
491
+ * const path = ToolIntegration.formatSectionPath(flatSection);
492
+ * // Returns: '/api/auth.md#overview'
493
+ * ```
494
+ *
495
+ * @example Hierarchical section
496
+ * ```typescript
497
+ * const path = ToolIntegration.formatSectionPath(hierarchicalSection);
498
+ * // Returns: '/api/auth.md#authentication/jwt-tokens (hierarchical)'
499
+ * ```
500
+ */
501
+ static formatSectionPath(section: SectionAddress): string;
502
+ /**
503
+ * Standard task path formatting for responses
504
+ *
505
+ * Formats task paths with consistent "(task)" indicator.
506
+ *
507
+ * @param task - Task address object
508
+ * @returns Formatted task path with task indicator
509
+ *
510
+ * @example Task path formatting
511
+ * ```typescript
512
+ * const path = ToolIntegration.formatTaskPath(taskAddress);
513
+ * // Returns: '/project/setup.md#initialize-project (task)'
514
+ * ```
515
+ */
516
+ static formatTaskPath(task: TaskAddress): string;
517
+ /**
518
+ * Format hierarchical context for section addresses
519
+ *
520
+ * Provides detailed hierarchical information for sections with forward slashes.
521
+ * Returns null for flat sections to indicate no hierarchical structure.
522
+ *
523
+ * @param section - Section address object
524
+ * @returns Hierarchical context object or null for flat sections
525
+ *
526
+ * @example Flat section (returns null)
527
+ * ```typescript
528
+ * const context = ToolIntegration.formatHierarchicalContext(flatSection);
529
+ * // Returns: null
530
+ * ```
531
+ *
532
+ * @example Hierarchical section
533
+ * ```typescript
534
+ * const context = ToolIntegration.formatHierarchicalContext(hierarchicalSection);
535
+ * // Returns: {
536
+ * // full_path: 'authentication/jwt-tokens',
537
+ * // parent_path: 'authentication',
538
+ * // section_name: 'jwt-tokens',
539
+ * // depth: 2
540
+ * // }
541
+ * ```
542
+ */
543
+ static formatHierarchicalContext(section: SectionAddress): HierarchicalContext | null;
544
+ /**
545
+ * Enhanced error formatting with hierarchical context
546
+ *
547
+ * Provides standardized error formatting with hierarchical-aware suggestions.
548
+ * Automatically adds helpful suggestions for hierarchical section errors.
549
+ *
550
+ * @param error - AddressingError to format
551
+ * @param suggestion - Optional custom suggestion to override defaults
552
+ * @returns Formatted error object with context and suggestions
553
+ *
554
+ * @example Basic error formatting
555
+ * ```typescript
556
+ * try {
557
+ * parseDocumentAddress('/invalid/path');
558
+ * } catch (error) {
559
+ * const formatted = ToolIntegration.formatHierarchicalError(error);
560
+ * // Returns: { error: 'Document not found: /invalid/path', context: { path: '/invalid/path' } }
561
+ * }
562
+ * ```
563
+ *
564
+ * @example Hierarchical section error with auto-suggestion
565
+ * ```typescript
566
+ * try {
567
+ * parseSectionAddress('auth/missing-section', '/api/guide.md');
568
+ * } catch (error) {
569
+ * const formatted = ToolIntegration.formatHierarchicalError(error);
570
+ * // Returns: {
571
+ * // error: 'Section not found: auth/missing-section',
572
+ * // context: { slug: 'auth/missing-section', documentPath: '/api/guide.md' },
573
+ * // suggestion: 'Section not found. Try checking parent section: auth'
574
+ * // }
575
+ * }
576
+ * ```
577
+ *
578
+ * @example Custom suggestion
579
+ * ```typescript
580
+ * const formatted = ToolIntegration.formatHierarchicalError(error, 'Check the document exists first');
581
+ * // Uses provided suggestion instead of auto-generated one
582
+ * ```
583
+ */
584
+ static formatHierarchicalError(error: AddressingError, suggestion?: string): {
585
+ error: string;
586
+ context?: unknown;
587
+ suggestion?: string;
588
+ };
589
+ /**
590
+ * Type guard to safely check if error context has section-specific properties
591
+ *
592
+ * Provides type-safe validation for error context structure before accessing properties.
593
+ * Used internally by formatHierarchicalError for safe property access.
594
+ *
595
+ * @param context - Unknown context object to validate
596
+ * @returns True if context has required section properties
597
+ *
598
+ * @example Type guard usage
599
+ * ```typescript
600
+ * if (ToolIntegration.hasSectionContext(error.context)) {
601
+ * // TypeScript now knows context has slug and documentPath properties
602
+ * const slug = error.context.slug;
603
+ * const docPath = error.context.documentPath;
604
+ * }
605
+ * ```
606
+ */
607
+ static hasSectionContext(context: unknown): context is {
608
+ slug: string;
609
+ documentPath: string;
610
+ };
611
+ /**
612
+ * Clear batch cache after batch operations
613
+ *
614
+ * This helper provides a standardized way for tools to clear the batch cache
615
+ * after completing multi-item operations. Clearing the cache frees memory
616
+ * and ensures fresh parsing for the next batch.
617
+ *
618
+ * @example Clearing cache after batch section operations
619
+ * ```typescript
620
+ * // Process multiple section operations
621
+ * for (const op of operations) {
622
+ * const { addresses } = ToolIntegration.validateAndParse({
623
+ * document: op.document,
624
+ * section: op.section
625
+ * });
626
+ * // ... process operation
627
+ * }
628
+ *
629
+ * // Clear batch cache after all operations complete
630
+ * ToolIntegration.clearBatchCache();
631
+ * ```
632
+ */
633
+ static clearBatchCache(): void;
634
+ /**
635
+ * Common validation utilities to eliminate copy-paste patterns
636
+ */
637
+ /**
638
+ * Validate document parameter - standard pattern used across tools
639
+ *
640
+ * Ensures document parameter is a non-empty string with consistent error messaging.
641
+ *
642
+ * @param document - Document parameter to validate
643
+ * @returns Validated document string
644
+ * @throws {AddressingError} When document is not a non-empty string
645
+ *
646
+ * @example Valid document
647
+ * ```typescript
648
+ * const doc = ToolIntegration.validateDocumentParameter('/api/auth.md');
649
+ * // Returns: '/api/auth.md'
650
+ * ```
651
+ *
652
+ * @example Invalid document
653
+ * ```typescript
654
+ * try {
655
+ * ToolIntegration.validateDocumentParameter('');
656
+ * } catch (error) {
657
+ * // Throws: AddressingError with code 'INVALID_PARAMETER'
658
+ * }
659
+ * ```
660
+ */
661
+ static validateDocumentParameter(document: unknown): string;
662
+ /**
663
+ * Validate count limits with consistent error messages
664
+ *
665
+ * Validates that arrays don't exceed specified limits with standardized error messages.
666
+ *
667
+ * @param items - Array to validate count for
668
+ * @param maxCount - Maximum allowed count
669
+ * @param itemType - Type name for error messages
670
+ * @throws {AddressingError} When count exceeds limit
671
+ *
672
+ * @example Valid count
673
+ * ```typescript
674
+ * ToolIntegration.validateCountLimit(['a', 'b'], 5, 'documents');
675
+ * // Passes validation
676
+ * ```
677
+ *
678
+ * @example Count limit exceeded
679
+ * ```typescript
680
+ * try {
681
+ * ToolIntegration.validateCountLimit(['a', 'b', 'c'], 2, 'documents');
682
+ * } catch (error) {
683
+ * // Throws: AddressingError 'Too many documents. Maximum 2 documents allowed, got 3'
684
+ * }
685
+ * ```
686
+ */
687
+ static validateCountLimit(items: unknown[], maxCount: number, itemType: string): void;
688
+ /**
689
+ * Validate array parameter with type checking
690
+ *
691
+ * Validates and normalizes array parameters that can be strings or arrays.
692
+ * Converts single strings to single-element arrays for consistent handling.
693
+ *
694
+ * @param param - Parameter to validate (string or array of strings)
695
+ * @param paramName - Parameter name for error messages
696
+ * @returns Normalized array of strings
697
+ * @throws {AddressingError} When parameter is not string or array
698
+ *
699
+ * @example String parameter
700
+ * ```typescript
701
+ * const result = ToolIntegration.validateArrayParameter('single', 'documents');
702
+ * // Returns: ['single']
703
+ * ```
704
+ *
705
+ * @example Array parameter
706
+ * ```typescript
707
+ * const result = ToolIntegration.validateArrayParameter(['a', 'b'], 'documents');
708
+ * // Returns: ['a', 'b']
709
+ * ```
710
+ *
711
+ * @example Invalid parameter
712
+ * ```typescript
713
+ * try {
714
+ * ToolIntegration.validateArrayParameter(null, 'documents');
715
+ * } catch (error) {
716
+ * // Throws: AddressingError 'documents parameter is required and must be a string or array of strings'
717
+ * }
718
+ * ```
719
+ */
720
+ static validateArrayParameter(param: unknown, paramName: string): string[];
721
+ /**
722
+ * Validate string parameter with consistent error handling
723
+ *
724
+ * Ensures parameter is a non-empty string with standardized error messages.
725
+ * Prevents common validation inconsistencies across tools.
726
+ *
727
+ * @param param - Parameter to validate
728
+ * @param paramName - Parameter name for error messages
729
+ * @returns Validated string parameter
730
+ * @throws {AddressingError} When parameter is not a non-empty string
731
+ *
732
+ * @example Valid string parameter
733
+ * ```typescript
734
+ * const operation = ToolIntegration.validateStringParameter('edit', 'operation');
735
+ * // Returns: 'edit'
736
+ * ```
737
+ *
738
+ * @example Invalid string parameter
739
+ * ```typescript
740
+ * try {
741
+ * ToolIntegration.validateStringParameter('', 'operation');
742
+ * } catch (error) {
743
+ * // Throws: AddressingError with code 'INVALID_PARAMETER'
744
+ * }
745
+ * ```
746
+ */
747
+ static validateStringParameter(param: unknown, paramName: string): string;
748
+ /**
749
+ * Validate optional string parameter with consistent error handling
750
+ *
751
+ * Validates optional string parameters, returning undefined for null/undefined inputs.
752
+ * Ensures non-empty strings when provided.
753
+ *
754
+ * @param param - Optional parameter to validate
755
+ * @param paramName - Parameter name for error messages
756
+ * @returns Validated string or undefined
757
+ * @throws {AddressingError} When parameter is empty string or invalid type
758
+ *
759
+ * @example Valid optional parameter
760
+ * ```typescript
761
+ * const content = ToolIntegration.validateOptionalStringParameter('hello', 'content');
762
+ * // Returns: 'hello'
763
+ *
764
+ * const content2 = ToolIntegration.validateOptionalStringParameter(undefined, 'content');
765
+ * // Returns: undefined
766
+ * ```
767
+ */
768
+ static validateOptionalStringParameter(param: unknown, paramName: string): string | undefined;
769
+ /**
770
+ * Validate operation parameter against allowed values
771
+ *
772
+ * Ensures operation parameter is one of the allowed values with consistent error messaging.
773
+ * Prevents duplicate validation logic across tools.
774
+ *
775
+ * @param operation - Operation to validate
776
+ * @param allowedOperations - Array of allowed operation values
777
+ * @param toolName - Tool name for error context
778
+ * @returns Validated operation string
779
+ * @throws {AddressingError} When operation is not in allowed list
780
+ *
781
+ * @example Valid operation
782
+ * ```typescript
783
+ * const op = ToolIntegration.validateOperation('edit', ['list', 'create', 'edit'], 'task');
784
+ * // Returns: 'edit'
785
+ * ```
786
+ *
787
+ * @example Invalid operation
788
+ * ```typescript
789
+ * try {
790
+ * ToolIntegration.validateOperation('invalid', ['list', 'create'], 'task');
791
+ * } catch (error) {
792
+ * // Throws: AddressingError 'Invalid operation: invalid. Must be one of: list, create'
793
+ * }
794
+ * ```
795
+ */
796
+ static validateOperation(operation: unknown, allowedOperations: readonly string[], toolName: string): string;
797
+ }
798
+ export {};
799
+ //# sourceMappingURL=addressing-system.d.ts.map