@weavelogic/knowledge-graph-agent 0.2.0 → 0.4.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 (711) hide show
  1. package/README.md +972 -303
  2. package/dist/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/additionalItems.js +5 -0
  5. package/dist/_virtual/additionalItems.js.map +1 -0
  6. package/dist/_virtual/additionalProperties.js +5 -0
  7. package/dist/_virtual/additionalProperties.js.map +1 -0
  8. package/dist/_virtual/ajv.js +6 -0
  9. package/dist/_virtual/ajv.js.map +1 -0
  10. package/dist/_virtual/ajv2.js +5 -0
  11. package/dist/_virtual/ajv2.js.map +1 -0
  12. package/dist/_virtual/allOf.js +5 -0
  13. package/dist/_virtual/allOf.js.map +1 -0
  14. package/dist/_virtual/anyOf.js +5 -0
  15. package/dist/_virtual/anyOf.js.map +1 -0
  16. package/dist/_virtual/applicability.js +5 -0
  17. package/dist/_virtual/applicability.js.map +1 -0
  18. package/dist/_virtual/boolSchema.js +5 -0
  19. package/dist/_virtual/boolSchema.js.map +1 -0
  20. package/dist/_virtual/code.js +5 -0
  21. package/dist/_virtual/code.js.map +1 -0
  22. package/dist/_virtual/code2.js +5 -0
  23. package/dist/_virtual/code2.js.map +1 -0
  24. package/dist/_virtual/const.js +5 -0
  25. package/dist/_virtual/const.js.map +1 -0
  26. package/dist/_virtual/contains.js +5 -0
  27. package/dist/_virtual/contains.js.map +1 -0
  28. package/dist/_virtual/core.js +5 -0
  29. package/dist/_virtual/core.js.map +1 -0
  30. package/dist/_virtual/dataType.js +5 -0
  31. package/dist/_virtual/dataType.js.map +1 -0
  32. package/dist/_virtual/defaults.js +5 -0
  33. package/dist/_virtual/defaults.js.map +1 -0
  34. package/dist/_virtual/dependencies.js +5 -0
  35. package/dist/_virtual/dependencies.js.map +1 -0
  36. package/dist/_virtual/draft7.js +5 -0
  37. package/dist/_virtual/draft7.js.map +1 -0
  38. package/dist/_virtual/enum.js +5 -0
  39. package/dist/_virtual/enum.js.map +1 -0
  40. package/dist/_virtual/equal.js +5 -0
  41. package/dist/_virtual/equal.js.map +1 -0
  42. package/dist/_virtual/errors.js +5 -0
  43. package/dist/_virtual/errors.js.map +1 -0
  44. package/dist/_virtual/format.js +5 -0
  45. package/dist/_virtual/format.js.map +1 -0
  46. package/dist/_virtual/formats.js +5 -0
  47. package/dist/_virtual/formats.js.map +1 -0
  48. package/dist/_virtual/id.js +5 -0
  49. package/dist/_virtual/id.js.map +1 -0
  50. package/dist/_virtual/if.js +5 -0
  51. package/dist/_virtual/if.js.map +1 -0
  52. package/dist/_virtual/index.js +8 -0
  53. package/dist/_virtual/index.js.map +1 -0
  54. package/dist/_virtual/index10.js +5 -0
  55. package/dist/_virtual/index10.js.map +1 -0
  56. package/dist/_virtual/index11.js +5 -0
  57. package/dist/_virtual/index11.js.map +1 -0
  58. package/dist/_virtual/index12.js +5 -0
  59. package/dist/_virtual/index12.js.map +1 -0
  60. package/dist/_virtual/index2.js +5 -0
  61. package/dist/_virtual/index2.js.map +1 -0
  62. package/dist/_virtual/index3.js +5 -0
  63. package/dist/_virtual/index3.js.map +1 -0
  64. package/dist/_virtual/index4.js +5 -0
  65. package/dist/_virtual/index4.js.map +1 -0
  66. package/dist/_virtual/index5.js +5 -0
  67. package/dist/_virtual/index5.js.map +1 -0
  68. package/dist/_virtual/index6.js +5 -0
  69. package/dist/_virtual/index6.js.map +1 -0
  70. package/dist/_virtual/index7.js +5 -0
  71. package/dist/_virtual/index7.js.map +1 -0
  72. package/dist/_virtual/index8.js +5 -0
  73. package/dist/_virtual/index8.js.map +1 -0
  74. package/dist/_virtual/index9.js +5 -0
  75. package/dist/_virtual/index9.js.map +1 -0
  76. package/dist/_virtual/items.js +5 -0
  77. package/dist/_virtual/items.js.map +1 -0
  78. package/dist/_virtual/items2020.js +5 -0
  79. package/dist/_virtual/items2020.js.map +1 -0
  80. package/dist/_virtual/keyword.js +5 -0
  81. package/dist/_virtual/keyword.js.map +1 -0
  82. package/dist/_virtual/limit.js +5 -0
  83. package/dist/_virtual/limit.js.map +1 -0
  84. package/dist/_virtual/limitItems.js +5 -0
  85. package/dist/_virtual/limitItems.js.map +1 -0
  86. package/dist/_virtual/limitLength.js +5 -0
  87. package/dist/_virtual/limitLength.js.map +1 -0
  88. package/dist/_virtual/limitNumber.js +5 -0
  89. package/dist/_virtual/limitNumber.js.map +1 -0
  90. package/dist/_virtual/limitProperties.js +5 -0
  91. package/dist/_virtual/limitProperties.js.map +1 -0
  92. package/dist/_virtual/metadata.js +5 -0
  93. package/dist/_virtual/metadata.js.map +1 -0
  94. package/dist/_virtual/multipleOf.js +5 -0
  95. package/dist/_virtual/multipleOf.js.map +1 -0
  96. package/dist/_virtual/names.js +5 -0
  97. package/dist/_virtual/names.js.map +1 -0
  98. package/dist/_virtual/not.js +5 -0
  99. package/dist/_virtual/not.js.map +1 -0
  100. package/dist/_virtual/oneOf.js +5 -0
  101. package/dist/_virtual/oneOf.js.map +1 -0
  102. package/dist/_virtual/pattern.js +5 -0
  103. package/dist/_virtual/pattern.js.map +1 -0
  104. package/dist/_virtual/patternProperties.js +5 -0
  105. package/dist/_virtual/patternProperties.js.map +1 -0
  106. package/dist/_virtual/prefixItems.js +5 -0
  107. package/dist/_virtual/prefixItems.js.map +1 -0
  108. package/dist/_virtual/properties.js +5 -0
  109. package/dist/_virtual/properties.js.map +1 -0
  110. package/dist/_virtual/propertyNames.js +5 -0
  111. package/dist/_virtual/propertyNames.js.map +1 -0
  112. package/dist/_virtual/ref.js +5 -0
  113. package/dist/_virtual/ref.js.map +1 -0
  114. package/dist/_virtual/ref_error.js +5 -0
  115. package/dist/_virtual/ref_error.js.map +1 -0
  116. package/dist/_virtual/required.js +5 -0
  117. package/dist/_virtual/required.js.map +1 -0
  118. package/dist/_virtual/resolve.js +5 -0
  119. package/dist/_virtual/resolve.js.map +1 -0
  120. package/dist/_virtual/rules.js +5 -0
  121. package/dist/_virtual/rules.js.map +1 -0
  122. package/dist/_virtual/scope.js +5 -0
  123. package/dist/_virtual/scope.js.map +1 -0
  124. package/dist/_virtual/subschema.js +5 -0
  125. package/dist/_virtual/subschema.js.map +1 -0
  126. package/dist/_virtual/thenElse.js +5 -0
  127. package/dist/_virtual/thenElse.js.map +1 -0
  128. package/dist/_virtual/types.js +5 -0
  129. package/dist/_virtual/types.js.map +1 -0
  130. package/dist/_virtual/ucs2length.js +5 -0
  131. package/dist/_virtual/ucs2length.js.map +1 -0
  132. package/dist/_virtual/uniqueItems.js +5 -0
  133. package/dist/_virtual/uniqueItems.js.map +1 -0
  134. package/dist/_virtual/uri.js +5 -0
  135. package/dist/_virtual/uri.js.map +1 -0
  136. package/dist/_virtual/util.js +5 -0
  137. package/dist/_virtual/util.js.map +1 -0
  138. package/dist/_virtual/validation_error.js +5 -0
  139. package/dist/_virtual/validation_error.js.map +1 -0
  140. package/dist/agents/analyst-agent.d.ts +230 -0
  141. package/dist/agents/analyst-agent.d.ts.map +1 -0
  142. package/dist/agents/analyst-agent.js +793 -0
  143. package/dist/agents/analyst-agent.js.map +1 -0
  144. package/dist/agents/architect-agent.d.ts +248 -0
  145. package/dist/agents/architect-agent.d.ts.map +1 -0
  146. package/dist/agents/architect-agent.js +685 -0
  147. package/dist/agents/architect-agent.js.map +1 -0
  148. package/dist/agents/base-agent.d.ts +169 -0
  149. package/dist/agents/base-agent.d.ts.map +1 -0
  150. package/dist/agents/base-agent.js +441 -0
  151. package/dist/agents/base-agent.js.map +1 -0
  152. package/dist/agents/coder-agent.d.ts +191 -0
  153. package/dist/agents/coder-agent.d.ts.map +1 -0
  154. package/dist/agents/coder-agent.js +1008 -0
  155. package/dist/agents/coder-agent.js.map +1 -0
  156. package/dist/agents/index.d.ts +18 -0
  157. package/dist/agents/index.d.ts.map +1 -0
  158. package/dist/agents/index.js +40 -0
  159. package/dist/agents/index.js.map +1 -0
  160. package/dist/agents/registry.d.ts +213 -0
  161. package/dist/agents/registry.d.ts.map +1 -0
  162. package/dist/agents/registry.js +419 -0
  163. package/dist/agents/registry.js.map +1 -0
  164. package/dist/agents/researcher-agent.d.ts +226 -0
  165. package/dist/agents/researcher-agent.d.ts.map +1 -0
  166. package/dist/agents/researcher-agent.js +572 -0
  167. package/dist/agents/researcher-agent.js.map +1 -0
  168. package/dist/agents/rules-engine.d.ts +320 -0
  169. package/dist/agents/rules-engine.d.ts.map +1 -0
  170. package/dist/agents/rules-engine.js +552 -0
  171. package/dist/agents/rules-engine.js.map +1 -0
  172. package/dist/agents/tester-agent.d.ts +219 -0
  173. package/dist/agents/tester-agent.d.ts.map +1 -0
  174. package/dist/agents/tester-agent.js +683 -0
  175. package/dist/agents/tester-agent.js.map +1 -0
  176. package/dist/agents/types.d.ts +425 -0
  177. package/dist/agents/types.d.ts.map +1 -0
  178. package/dist/agents/types.js +57 -0
  179. package/dist/agents/types.js.map +1 -0
  180. package/dist/audit/config.d.ts +150 -0
  181. package/dist/audit/config.d.ts.map +1 -0
  182. package/dist/audit/config.js +111 -0
  183. package/dist/audit/config.js.map +1 -0
  184. package/dist/audit/index.d.ts +38 -0
  185. package/dist/audit/index.d.ts.map +1 -0
  186. package/dist/audit/services/audit-chain.d.ts +276 -0
  187. package/dist/audit/services/audit-chain.d.ts.map +1 -0
  188. package/dist/audit/services/audit-chain.js +502 -0
  189. package/dist/audit/services/audit-chain.js.map +1 -0
  190. package/dist/audit/services/index.d.ts +11 -0
  191. package/dist/audit/services/index.d.ts.map +1 -0
  192. package/dist/audit/services/syndication.d.ts +334 -0
  193. package/dist/audit/services/syndication.d.ts.map +1 -0
  194. package/dist/audit/services/syndication.js +589 -0
  195. package/dist/audit/services/syndication.js.map +1 -0
  196. package/dist/audit/types.d.ts +453 -0
  197. package/dist/audit/types.d.ts.map +1 -0
  198. package/dist/caching/index.d.ts +55 -0
  199. package/dist/caching/index.d.ts.map +1 -0
  200. package/dist/caching/index.js +206 -0
  201. package/dist/caching/index.js.map +1 -0
  202. package/dist/caching/lru-cache.d.ts +254 -0
  203. package/dist/caching/lru-cache.d.ts.map +1 -0
  204. package/dist/caching/types.d.ts +95 -0
  205. package/dist/caching/types.d.ts.map +1 -0
  206. package/dist/chunking/chunker.d.ts +94 -0
  207. package/dist/chunking/chunker.d.ts.map +1 -0
  208. package/dist/chunking/index.d.ts +125 -0
  209. package/dist/chunking/index.d.ts.map +1 -0
  210. package/dist/chunking/index.js +283 -0
  211. package/dist/chunking/index.js.map +1 -0
  212. package/dist/chunking/types.d.ts +92 -0
  213. package/dist/chunking/types.d.ts.map +1 -0
  214. package/dist/cli/commands/audit.d.ts +21 -0
  215. package/dist/cli/commands/audit.d.ts.map +1 -0
  216. package/dist/cli/commands/audit.js +621 -0
  217. package/dist/cli/commands/audit.js.map +1 -0
  218. package/dist/cli/commands/commit.d.ts +11 -0
  219. package/dist/cli/commands/commit.d.ts.map +1 -0
  220. package/dist/cli/commands/commit.js +379 -0
  221. package/dist/cli/commands/commit.js.map +1 -0
  222. package/dist/cli/commands/config.d.ts +8 -0
  223. package/dist/cli/commands/config.d.ts.map +1 -0
  224. package/dist/cli/commands/config.js +107 -0
  225. package/dist/cli/commands/config.js.map +1 -0
  226. package/dist/cli/commands/cultivate.d.ts +16 -0
  227. package/dist/cli/commands/cultivate.d.ts.map +1 -0
  228. package/dist/cli/commands/cultivate.js +254 -0
  229. package/dist/cli/commands/cultivate.js.map +1 -0
  230. package/dist/cli/commands/diagnostics.d.ts +8 -0
  231. package/dist/cli/commands/diagnostics.d.ts.map +1 -0
  232. package/dist/cli/commands/diagnostics.js +140 -0
  233. package/dist/cli/commands/diagnostics.js.map +1 -0
  234. package/dist/cli/commands/generate.d.ts +13 -0
  235. package/dist/cli/commands/generate.d.ts.map +1 -0
  236. package/dist/cli/commands/init-primitives.d.ts +19 -0
  237. package/dist/cli/commands/init-primitives.d.ts.map +1 -0
  238. package/dist/cli/commands/init-primitives.js +208 -0
  239. package/dist/cli/commands/init-primitives.js.map +1 -0
  240. package/dist/cli/commands/sop.d.ts +14 -0
  241. package/dist/cli/commands/sop.d.ts.map +1 -0
  242. package/dist/cli/commands/sop.js +598 -0
  243. package/dist/cli/commands/sop.js.map +1 -0
  244. package/dist/cli/commands/vector.d.ts +14 -0
  245. package/dist/cli/commands/vector.d.ts.map +1 -0
  246. package/dist/cli/commands/vector.js +429 -0
  247. package/dist/cli/commands/vector.js.map +1 -0
  248. package/dist/cli/commands/workflow.d.ts +12 -0
  249. package/dist/cli/commands/workflow.d.ts.map +1 -0
  250. package/dist/cli/commands/workflow.js +471 -0
  251. package/dist/cli/commands/workflow.js.map +1 -0
  252. package/dist/cli/index.d.ts.map +1 -1
  253. package/dist/cli/index.js +66 -1
  254. package/dist/cli/index.js.map +1 -1
  255. package/dist/config/index.d.ts +153 -0
  256. package/dist/config/index.d.ts.map +1 -0
  257. package/dist/config/index.js +141 -0
  258. package/dist/config/index.js.map +1 -0
  259. package/dist/config/manager.d.ts +136 -0
  260. package/dist/config/manager.d.ts.map +1 -0
  261. package/dist/config/types.d.ts +127 -0
  262. package/dist/config/types.d.ts.map +1 -0
  263. package/dist/core/cache.d.ts +185 -0
  264. package/dist/core/cache.d.ts.map +1 -0
  265. package/dist/core/cache.js +435 -0
  266. package/dist/core/cache.js.map +1 -0
  267. package/dist/cultivation/deep-analyzer.d.ts +129 -0
  268. package/dist/cultivation/deep-analyzer.d.ts.map +1 -0
  269. package/dist/cultivation/deep-analyzer.js +322 -0
  270. package/dist/cultivation/deep-analyzer.js.map +1 -0
  271. package/dist/cultivation/index.d.ts +13 -0
  272. package/dist/cultivation/index.d.ts.map +1 -0
  273. package/dist/cultivation/seed-generator.d.ts +92 -0
  274. package/dist/cultivation/seed-generator.d.ts.map +1 -0
  275. package/dist/cultivation/seed-generator.js +1033 -0
  276. package/dist/cultivation/seed-generator.js.map +1 -0
  277. package/dist/cultivation/types.d.ts +230 -0
  278. package/dist/cultivation/types.d.ts.map +1 -0
  279. package/dist/database/schemas/index.d.ts +85 -0
  280. package/dist/database/schemas/index.d.ts.map +1 -0
  281. package/dist/generators/claude-md.d.ts +7 -0
  282. package/dist/generators/claude-md.d.ts.map +1 -1
  283. package/dist/generators/claude-md.js.map +1 -1
  284. package/dist/generators/docs-init.d.ts +6 -0
  285. package/dist/generators/docs-init.d.ts.map +1 -1
  286. package/dist/generators/docs-init.js.map +1 -1
  287. package/dist/health/checks.d.ts +135 -0
  288. package/dist/health/checks.d.ts.map +1 -0
  289. package/dist/health/index.d.ts +119 -0
  290. package/dist/health/index.d.ts.map +1 -0
  291. package/dist/health/index.js +191 -0
  292. package/dist/health/index.js.map +1 -0
  293. package/dist/health/monitor.d.ts +146 -0
  294. package/dist/health/monitor.d.ts.map +1 -0
  295. package/dist/health/types.d.ts +135 -0
  296. package/dist/health/types.d.ts.map +1 -0
  297. package/dist/index.d.ts +32 -0
  298. package/dist/index.d.ts.map +1 -1
  299. package/dist/index.js +182 -1
  300. package/dist/index.js.map +1 -1
  301. package/dist/integrations/auto-commit.d.ts +175 -0
  302. package/dist/integrations/auto-commit.d.ts.map +1 -0
  303. package/dist/integrations/auto-commit.js +399 -0
  304. package/dist/integrations/auto-commit.js.map +1 -0
  305. package/dist/integrations/git.d.ts +299 -0
  306. package/dist/integrations/git.d.ts.map +1 -0
  307. package/dist/integrations/git.js +465 -0
  308. package/dist/integrations/git.js.map +1 -0
  309. package/dist/mcp-server/bin.d.ts +11 -0
  310. package/dist/mcp-server/bin.d.ts.map +1 -0
  311. package/dist/mcp-server/handlers/index.d.ts +57 -0
  312. package/dist/mcp-server/handlers/index.d.ts.map +1 -0
  313. package/dist/mcp-server/handlers/index.js +235 -0
  314. package/dist/mcp-server/handlers/index.js.map +1 -0
  315. package/dist/mcp-server/index.d.ts +28 -0
  316. package/dist/mcp-server/index.d.ts.map +1 -0
  317. package/dist/mcp-server/server.d.ts +133 -0
  318. package/dist/mcp-server/server.d.ts.map +1 -0
  319. package/dist/mcp-server/server.js +280 -0
  320. package/dist/mcp-server/server.js.map +1 -0
  321. package/dist/mcp-server/tools/agents/index.d.ts +10 -0
  322. package/dist/mcp-server/tools/agents/index.d.ts.map +1 -0
  323. package/dist/mcp-server/tools/agents/list.d.ts +19 -0
  324. package/dist/mcp-server/tools/agents/list.d.ts.map +1 -0
  325. package/dist/mcp-server/tools/agents/spawn.d.ts +19 -0
  326. package/dist/mcp-server/tools/agents/spawn.d.ts.map +1 -0
  327. package/dist/mcp-server/tools/audit/checkpoint.d.ts +58 -0
  328. package/dist/mcp-server/tools/audit/checkpoint.d.ts.map +1 -0
  329. package/dist/mcp-server/tools/audit/checkpoint.js +73 -0
  330. package/dist/mcp-server/tools/audit/checkpoint.js.map +1 -0
  331. package/dist/mcp-server/tools/audit/index.d.ts +53 -0
  332. package/dist/mcp-server/tools/audit/index.d.ts.map +1 -0
  333. package/dist/mcp-server/tools/audit/index.js +12 -0
  334. package/dist/mcp-server/tools/audit/index.js.map +1 -0
  335. package/dist/mcp-server/tools/audit/query.d.ts +58 -0
  336. package/dist/mcp-server/tools/audit/query.d.ts.map +1 -0
  337. package/dist/mcp-server/tools/audit/query.js +125 -0
  338. package/dist/mcp-server/tools/audit/query.js.map +1 -0
  339. package/dist/mcp-server/tools/audit/sync.d.ts +58 -0
  340. package/dist/mcp-server/tools/audit/sync.d.ts.map +1 -0
  341. package/dist/mcp-server/tools/audit/sync.js +126 -0
  342. package/dist/mcp-server/tools/audit/sync.js.map +1 -0
  343. package/dist/mcp-server/tools/graph/generate.d.ts +21 -0
  344. package/dist/mcp-server/tools/graph/generate.d.ts.map +1 -0
  345. package/dist/mcp-server/tools/graph/index.d.ts +11 -0
  346. package/dist/mcp-server/tools/graph/index.d.ts.map +1 -0
  347. package/dist/mcp-server/tools/graph/query.d.ts +22 -0
  348. package/dist/mcp-server/tools/graph/query.d.ts.map +1 -0
  349. package/dist/mcp-server/tools/graph/stats.d.ts +22 -0
  350. package/dist/mcp-server/tools/graph/stats.d.ts.map +1 -0
  351. package/dist/mcp-server/tools/health.d.ts +21 -0
  352. package/dist/mcp-server/tools/health.d.ts.map +1 -0
  353. package/dist/mcp-server/tools/index.d.ts +16 -0
  354. package/dist/mcp-server/tools/index.d.ts.map +1 -0
  355. package/dist/mcp-server/tools/registry.d.ts +90 -0
  356. package/dist/mcp-server/tools/registry.d.ts.map +1 -0
  357. package/dist/mcp-server/tools/registry.js +753 -0
  358. package/dist/mcp-server/tools/registry.js.map +1 -0
  359. package/dist/mcp-server/tools/search/index.d.ts +10 -0
  360. package/dist/mcp-server/tools/search/index.d.ts.map +1 -0
  361. package/dist/mcp-server/tools/search/nodes.d.ts +22 -0
  362. package/dist/mcp-server/tools/search/nodes.d.ts.map +1 -0
  363. package/dist/mcp-server/tools/search/tags.d.ts +22 -0
  364. package/dist/mcp-server/tools/search/tags.d.ts.map +1 -0
  365. package/dist/mcp-server/tools/vector/index.d.ts +12 -0
  366. package/dist/mcp-server/tools/vector/index.d.ts.map +1 -0
  367. package/dist/mcp-server/tools/vector/index.js +12 -0
  368. package/dist/mcp-server/tools/vector/index.js.map +1 -0
  369. package/dist/mcp-server/tools/vector/search.d.ts +41 -0
  370. package/dist/mcp-server/tools/vector/search.d.ts.map +1 -0
  371. package/dist/mcp-server/tools/vector/search.js +224 -0
  372. package/dist/mcp-server/tools/vector/search.js.map +1 -0
  373. package/dist/mcp-server/tools/vector/trajectory.d.ts +39 -0
  374. package/dist/mcp-server/tools/vector/trajectory.d.ts.map +1 -0
  375. package/dist/mcp-server/tools/vector/trajectory.js +170 -0
  376. package/dist/mcp-server/tools/vector/trajectory.js.map +1 -0
  377. package/dist/mcp-server/tools/vector/upsert.d.ts +44 -0
  378. package/dist/mcp-server/tools/vector/upsert.d.ts.map +1 -0
  379. package/dist/mcp-server/tools/vector/upsert.js +175 -0
  380. package/dist/mcp-server/tools/vector/upsert.js.map +1 -0
  381. package/dist/mcp-server/tools/workflow/index.d.ts +29 -0
  382. package/dist/mcp-server/tools/workflow/index.d.ts.map +1 -0
  383. package/dist/mcp-server/tools/workflow/index.js +12 -0
  384. package/dist/mcp-server/tools/workflow/index.js.map +1 -0
  385. package/dist/mcp-server/tools/workflow/list.d.ts +41 -0
  386. package/dist/mcp-server/tools/workflow/list.d.ts.map +1 -0
  387. package/dist/mcp-server/tools/workflow/list.js +195 -0
  388. package/dist/mcp-server/tools/workflow/list.js.map +1 -0
  389. package/dist/mcp-server/tools/workflow/start.d.ts +40 -0
  390. package/dist/mcp-server/tools/workflow/start.d.ts.map +1 -0
  391. package/dist/mcp-server/tools/workflow/start.js +165 -0
  392. package/dist/mcp-server/tools/workflow/start.js.map +1 -0
  393. package/dist/mcp-server/tools/workflow/status.d.ts +38 -0
  394. package/dist/mcp-server/tools/workflow/status.d.ts.map +1 -0
  395. package/dist/mcp-server/tools/workflow/status.js +97 -0
  396. package/dist/mcp-server/tools/workflow/status.js.map +1 -0
  397. package/dist/mcp-server/types/index.d.ts +286 -0
  398. package/dist/mcp-server/types/index.d.ts.map +1 -0
  399. package/dist/memory/index.d.ts +10 -0
  400. package/dist/memory/index.d.ts.map +1 -0
  401. package/dist/memory/vault-sync.d.ts +212 -0
  402. package/dist/memory/vault-sync.d.ts.map +1 -0
  403. package/dist/memory/vault-sync.js +463 -0
  404. package/dist/memory/vault-sync.js.map +1 -0
  405. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +296 -0
  406. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  407. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +71 -0
  408. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  409. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +26 -0
  410. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  411. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +407 -0
  412. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  413. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1332 -0
  414. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  415. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +71 -0
  416. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  417. package/dist/node_modules/ajv/dist/ajv.js +84 -0
  418. package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
  419. package/dist/node_modules/ajv/dist/compile/codegen/code.js +160 -0
  420. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  421. package/dist/node_modules/ajv/dist/compile/codegen/index.js +728 -0
  422. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  423. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +152 -0
  424. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  425. package/dist/node_modules/ajv/dist/compile/errors.js +131 -0
  426. package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
  427. package/dist/node_modules/ajv/dist/compile/index.js +234 -0
  428. package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
  429. package/dist/node_modules/ajv/dist/compile/names.js +44 -0
  430. package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
  431. package/dist/node_modules/ajv/dist/compile/ref_error.js +22 -0
  432. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  433. package/dist/node_modules/ajv/dist/compile/resolve.js +163 -0
  434. package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  435. package/dist/node_modules/ajv/dist/compile/rules.js +35 -0
  436. package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
  437. package/dist/node_modules/ajv/dist/compile/util.js +173 -0
  438. package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
  439. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
  440. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  441. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +58 -0
  442. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  443. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +193 -0
  444. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  445. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +43 -0
  446. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  447. package/dist/node_modules/ajv/dist/compile/validate/index.js +522 -0
  448. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  449. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +126 -0
  450. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  451. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +89 -0
  452. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  453. package/dist/node_modules/ajv/dist/core.js +628 -0
  454. package/dist/node_modules/ajv/dist/core.js.map +1 -0
  455. package/dist/node_modules/ajv/dist/refs/data.json.js +24 -0
  456. package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
  457. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +25 -0
  458. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
  459. package/dist/node_modules/ajv/dist/runtime/equal.js +16 -0
  460. package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  461. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +30 -0
  462. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  463. package/dist/node_modules/ajv/dist/runtime/uri.js +16 -0
  464. package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  465. package/dist/node_modules/ajv/dist/runtime/validation_error.js +20 -0
  466. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  467. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +59 -0
  468. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  469. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +114 -0
  470. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  471. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +32 -0
  472. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  473. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +22 -0
  474. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  475. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +100 -0
  476. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  477. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +103 -0
  478. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  479. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +75 -0
  480. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  481. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +68 -0
  482. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  483. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +64 -0
  484. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  485. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +43 -0
  486. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  487. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
  488. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  489. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +64 -0
  490. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  491. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +81 -0
  492. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  493. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
  494. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  495. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +66 -0
  496. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  497. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +49 -0
  498. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  499. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +23 -0
  500. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  501. package/dist/node_modules/ajv/dist/vocabularies/code.js +140 -0
  502. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  503. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
  504. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  505. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
  506. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  507. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +132 -0
  508. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  509. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +114 -0
  510. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  511. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
  512. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  513. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
  514. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  515. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +95 -0
  516. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  517. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +16 -0
  518. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  519. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
  520. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  521. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +36 -0
  522. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  523. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +56 -0
  524. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  525. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +52 -0
  526. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  527. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +34 -0
  528. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  529. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +39 -0
  530. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  531. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +37 -0
  532. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  533. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +34 -0
  534. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  535. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +33 -0
  536. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  537. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +34 -0
  538. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  539. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +89 -0
  540. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  541. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
  542. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  543. package/dist/node_modules/ajv-formats/dist/formats.js +209 -0
  544. package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
  545. package/dist/node_modules/ajv-formats/dist/index.js +51 -0
  546. package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
  547. package/dist/node_modules/ajv-formats/dist/limit.js +80 -0
  548. package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
  549. package/dist/node_modules/fast-deep-equal/index.js +39 -0
  550. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  551. package/dist/node_modules/fast-uri/index.js +261 -0
  552. package/dist/node_modules/fast-uri/index.js.map +1 -0
  553. package/dist/node_modules/fast-uri/lib/schemes.js +215 -0
  554. package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
  555. package/dist/node_modules/fast-uri/lib/utils.js +261 -0
  556. package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
  557. package/dist/node_modules/json-schema-traverse/index.js +92 -0
  558. package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
  559. package/dist/node_modules/zod/v4/classic/errors.js +37 -0
  560. package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
  561. package/dist/node_modules/zod/v4/classic/iso.js +43 -0
  562. package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
  563. package/dist/node_modules/zod/v4/classic/parse.js +13 -0
  564. package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
  565. package/dist/node_modules/zod/v4/classic/schemas.js +688 -0
  566. package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
  567. package/dist/node_modules/zod/v4/core/api.js +492 -0
  568. package/dist/node_modules/zod/v4/core/api.js.map +1 -0
  569. package/dist/node_modules/zod/v4/core/checks.js +405 -0
  570. package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
  571. package/dist/node_modules/zod/v4/core/core.js +58 -0
  572. package/dist/node_modules/zod/v4/core/core.js.map +1 -0
  573. package/dist/node_modules/zod/v4/core/doc.js +38 -0
  574. package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
  575. package/dist/node_modules/zod/v4/core/errors.js +82 -0
  576. package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
  577. package/dist/node_modules/zod/v4/core/parse.js +60 -0
  578. package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
  579. package/dist/node_modules/zod/v4/core/regexes.js +87 -0
  580. package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
  581. package/dist/node_modules/zod/v4/core/registries.js +52 -0
  582. package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
  583. package/dist/node_modules/zod/v4/core/schemas.js +1283 -0
  584. package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
  585. package/dist/node_modules/zod/v4/core/util.js +341 -0
  586. package/dist/node_modules/zod/v4/core/util.js.map +1 -0
  587. package/dist/node_modules/zod/v4/core/versions.js +9 -0
  588. package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
  589. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +2 -0
  590. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  591. package/dist/reasoning/index.d.ts +74 -0
  592. package/dist/reasoning/index.d.ts.map +1 -0
  593. package/dist/reasoning/index.js +124 -0
  594. package/dist/reasoning/index.js.map +1 -0
  595. package/dist/reasoning/tracker.d.ts +210 -0
  596. package/dist/reasoning/tracker.d.ts.map +1 -0
  597. package/dist/reasoning/types.d.ts +146 -0
  598. package/dist/reasoning/types.d.ts.map +1 -0
  599. package/dist/recovery/backup.d.ts +110 -0
  600. package/dist/recovery/backup.d.ts.map +1 -0
  601. package/dist/recovery/index.d.ts +70 -0
  602. package/dist/recovery/index.d.ts.map +1 -0
  603. package/dist/recovery/index.js +186 -0
  604. package/dist/recovery/index.js.map +1 -0
  605. package/dist/recovery/integrity.d.ts +74 -0
  606. package/dist/recovery/integrity.d.ts.map +1 -0
  607. package/dist/recovery/types.d.ts +94 -0
  608. package/dist/recovery/types.d.ts.map +1 -0
  609. package/dist/services/index.d.ts +130 -0
  610. package/dist/services/index.d.ts.map +1 -0
  611. package/dist/services/index.js +134 -0
  612. package/dist/services/index.js.map +1 -0
  613. package/dist/services/manager.d.ts +140 -0
  614. package/dist/services/manager.d.ts.map +1 -0
  615. package/dist/services/types.d.ts +106 -0
  616. package/dist/services/types.d.ts.map +1 -0
  617. package/dist/services/watchers.d.ts +95 -0
  618. package/dist/services/watchers.d.ts.map +1 -0
  619. package/dist/sops/compliance-checker.d.ts +83 -0
  620. package/dist/sops/compliance-checker.d.ts.map +1 -0
  621. package/dist/sops/compliance-checker.js +399 -0
  622. package/dist/sops/compliance-checker.js.map +1 -0
  623. package/dist/sops/gap-analyzer.d.ts +124 -0
  624. package/dist/sops/gap-analyzer.d.ts.map +1 -0
  625. package/dist/sops/gap-analyzer.js +313 -0
  626. package/dist/sops/gap-analyzer.js.map +1 -0
  627. package/dist/sops/index.d.ts +14 -0
  628. package/dist/sops/index.d.ts.map +1 -0
  629. package/dist/sops/overlay-manager.d.ts +115 -0
  630. package/dist/sops/overlay-manager.d.ts.map +1 -0
  631. package/dist/sops/overlay-manager.js +394 -0
  632. package/dist/sops/overlay-manager.js.map +1 -0
  633. package/dist/sops/registry.d.ts +73 -0
  634. package/dist/sops/registry.d.ts.map +1 -0
  635. package/dist/sops/registry.js +919 -0
  636. package/dist/sops/registry.js.map +1 -0
  637. package/dist/sops/types.d.ts +377 -0
  638. package/dist/sops/types.d.ts.map +1 -0
  639. package/dist/sops/types.js +46 -0
  640. package/dist/sops/types.js.map +1 -0
  641. package/dist/utils/error-recovery.d.ts +230 -0
  642. package/dist/utils/error-recovery.d.ts.map +1 -0
  643. package/dist/utils/error-recovery.js +228 -0
  644. package/dist/utils/error-recovery.js.map +1 -0
  645. package/dist/utils/error-taxonomy.d.ts +149 -0
  646. package/dist/utils/error-taxonomy.d.ts.map +1 -0
  647. package/dist/utils/error-taxonomy.js +260 -0
  648. package/dist/utils/error-taxonomy.js.map +1 -0
  649. package/dist/utils/index.d.ts +11 -0
  650. package/dist/utils/index.d.ts.map +1 -0
  651. package/dist/utils/logger.d.ts +139 -0
  652. package/dist/utils/logger.d.ts.map +1 -0
  653. package/dist/utils/logger.js +311 -0
  654. package/dist/utils/logger.js.map +1 -0
  655. package/dist/vector/config.d.ts +300 -0
  656. package/dist/vector/config.d.ts.map +1 -0
  657. package/dist/vector/config.js +124 -0
  658. package/dist/vector/config.js.map +1 -0
  659. package/dist/vector/index.d.ts +50 -0
  660. package/dist/vector/index.d.ts.map +1 -0
  661. package/dist/vector/services/index.d.ts +13 -0
  662. package/dist/vector/services/index.d.ts.map +1 -0
  663. package/dist/vector/services/trajectory-tracker.d.ts +405 -0
  664. package/dist/vector/services/trajectory-tracker.d.ts.map +1 -0
  665. package/dist/vector/services/trajectory-tracker.js +445 -0
  666. package/dist/vector/services/trajectory-tracker.js.map +1 -0
  667. package/dist/vector/services/vector-store.d.ts +339 -0
  668. package/dist/vector/services/vector-store.d.ts.map +1 -0
  669. package/dist/vector/services/vector-store.js +748 -0
  670. package/dist/vector/services/vector-store.js.map +1 -0
  671. package/dist/vector/types.d.ts +677 -0
  672. package/dist/vector/types.d.ts.map +1 -0
  673. package/dist/workflow/adapters/goap-adapter.d.ts +196 -0
  674. package/dist/workflow/adapters/goap-adapter.d.ts.map +1 -0
  675. package/dist/workflow/adapters/goap-adapter.js +706 -0
  676. package/dist/workflow/adapters/goap-adapter.js.map +1 -0
  677. package/dist/workflow/adapters/index.d.ts +10 -0
  678. package/dist/workflow/adapters/index.d.ts.map +1 -0
  679. package/dist/workflow/config.d.ts +135 -0
  680. package/dist/workflow/config.d.ts.map +1 -0
  681. package/dist/workflow/config.js +92 -0
  682. package/dist/workflow/config.js.map +1 -0
  683. package/dist/workflow/handlers/index.d.ts +9 -0
  684. package/dist/workflow/handlers/index.d.ts.map +1 -0
  685. package/dist/workflow/handlers/webhook-handlers.d.ts +397 -0
  686. package/dist/workflow/handlers/webhook-handlers.d.ts.map +1 -0
  687. package/dist/workflow/handlers/webhook-handlers.js +454 -0
  688. package/dist/workflow/handlers/webhook-handlers.js.map +1 -0
  689. package/dist/workflow/index.d.ts +42 -0
  690. package/dist/workflow/index.d.ts.map +1 -0
  691. package/dist/workflow/services/index.d.ts +9 -0
  692. package/dist/workflow/services/index.d.ts.map +1 -0
  693. package/dist/workflow/services/workflow-service.d.ts +318 -0
  694. package/dist/workflow/services/workflow-service.d.ts.map +1 -0
  695. package/dist/workflow/services/workflow-service.js +577 -0
  696. package/dist/workflow/services/workflow-service.js.map +1 -0
  697. package/dist/workflow/types.d.ts +470 -0
  698. package/dist/workflow/types.d.ts.map +1 -0
  699. package/dist/workflow/workflows/realtime-collab.d.ts +245 -0
  700. package/dist/workflow/workflows/realtime-collab.d.ts.map +1 -0
  701. package/dist/workflows/index.d.ts +11 -0
  702. package/dist/workflows/index.d.ts.map +1 -0
  703. package/dist/workflows/registry.d.ts +118 -0
  704. package/dist/workflows/registry.d.ts.map +1 -0
  705. package/dist/workflows/registry.js +575 -0
  706. package/dist/workflows/registry.js.map +1 -0
  707. package/dist/workflows/types.d.ts +322 -0
  708. package/dist/workflows/types.d.ts.map +1 -0
  709. package/dist/workflows/types.js +16 -0
  710. package/dist/workflows/types.js.map +1 -0
  711. package/package.json +1 -1
@@ -0,0 +1,1033 @@
1
+ import { readFile, mkdir, writeFile, readdir, stat } from "fs/promises";
2
+ import { existsSync } from "fs";
3
+ import { join, dirname, basename } from "path";
4
+ import matter from "gray-matter";
5
+ import { createLogger } from "../utils/logger.js";
6
+ const logger = createLogger("seed-generator");
7
+ class SeedGenerator {
8
+ vaultContext;
9
+ projectRoot;
10
+ startTime = 0;
11
+ filesScanned = 0;
12
+ constructor(vaultContext, projectRoot) {
13
+ this.vaultContext = vaultContext;
14
+ this.projectRoot = projectRoot;
15
+ }
16
+ /**
17
+ * Create a SeedGenerator from project paths
18
+ */
19
+ static async create(projectRoot, docsPath) {
20
+ const vaultRoot = join(projectRoot, docsPath);
21
+ const allFiles = await SeedGenerator.collectVaultFiles(vaultRoot);
22
+ let primitives;
23
+ let features;
24
+ let techSpecs;
25
+ try {
26
+ primitives = await readFile(join(vaultRoot, "PRIMITIVES.md"), "utf-8");
27
+ } catch {
28
+ }
29
+ try {
30
+ features = await readFile(join(vaultRoot, "features.md"), "utf-8");
31
+ } catch {
32
+ }
33
+ try {
34
+ techSpecs = await readFile(join(vaultRoot, "tech-specs.md"), "utf-8");
35
+ } catch {
36
+ }
37
+ const vaultContext = {
38
+ vaultRoot,
39
+ allFiles,
40
+ primitives,
41
+ features,
42
+ techSpecs
43
+ };
44
+ return new SeedGenerator(vaultContext, projectRoot);
45
+ }
46
+ /**
47
+ * Collect all markdown files in vault
48
+ */
49
+ static async collectVaultFiles(vaultRoot) {
50
+ const files = [];
51
+ async function walk(dir) {
52
+ try {
53
+ const entries = await readdir(dir, { withFileTypes: true });
54
+ for (const entry of entries) {
55
+ const fullPath = join(dir, entry.name);
56
+ if (entry.isDirectory() && !entry.name.startsWith(".")) {
57
+ await walk(fullPath);
58
+ } else if (entry.isFile() && entry.name.endsWith(".md")) {
59
+ files.push(fullPath);
60
+ }
61
+ }
62
+ } catch {
63
+ }
64
+ }
65
+ await walk(vaultRoot);
66
+ return files;
67
+ }
68
+ /**
69
+ * Analyze entire codebase and generate seed data
70
+ */
71
+ async analyze() {
72
+ this.startTime = Date.now();
73
+ this.filesScanned = 0;
74
+ logger.info("Starting codebase analysis", { projectRoot: this.projectRoot });
75
+ const analysis = {
76
+ dependencies: [],
77
+ services: [],
78
+ frameworks: [],
79
+ languages: [],
80
+ deployments: [],
81
+ existingConcepts: [],
82
+ existingFeatures: [],
83
+ metadata: {
84
+ analyzedAt: (/* @__PURE__ */ new Date()).toISOString(),
85
+ projectRoot: this.projectRoot,
86
+ filesScanned: 0,
87
+ duration: 0
88
+ }
89
+ };
90
+ await this.analyzeDependencies(analysis);
91
+ await this.analyzeVaultDocuments(analysis);
92
+ await this.analyzeServices(analysis);
93
+ await this.analyzeDeployments(analysis);
94
+ this.classifyDependencies(analysis);
95
+ analysis.languages = [...new Set(analysis.languages)];
96
+ analysis.metadata.filesScanned = this.filesScanned;
97
+ analysis.metadata.duration = Date.now() - this.startTime;
98
+ logger.info("Analysis complete", {
99
+ dependencies: analysis.dependencies.length,
100
+ frameworks: analysis.frameworks.length,
101
+ services: analysis.services.length,
102
+ languages: analysis.languages.length,
103
+ duration: analysis.metadata.duration
104
+ });
105
+ return analysis;
106
+ }
107
+ /**
108
+ * Generate primitive nodes from seed analysis
109
+ */
110
+ async generatePrimitives(analysis) {
111
+ const documents = [];
112
+ const frameworkNames = new Set(analysis.frameworks.map((f) => f.name.toLowerCase()));
113
+ logger.info("Generating primitives", {
114
+ frameworks: analysis.frameworks.length,
115
+ dependencies: analysis.dependencies.length,
116
+ services: analysis.services.length
117
+ });
118
+ for (const framework of analysis.frameworks) {
119
+ const doc = this.generateFrameworkNode(framework, analysis);
120
+ documents.push(doc);
121
+ }
122
+ for (const dep of analysis.dependencies) {
123
+ if (frameworkNames.has(dep.name.toLowerCase())) {
124
+ continue;
125
+ }
126
+ if (this.shouldGenerateNode(dep)) {
127
+ const doc = this.generateDependencyNode(dep, analysis);
128
+ documents.push(doc);
129
+ }
130
+ }
131
+ for (const service of analysis.services) {
132
+ const doc = this.generateServiceNode(service, analysis);
133
+ documents.push(doc);
134
+ }
135
+ for (const language of analysis.languages) {
136
+ const doc = this.generateLanguageNode(language, analysis);
137
+ documents.push(doc);
138
+ }
139
+ logger.info("Generated primitives", { count: documents.length });
140
+ return documents;
141
+ }
142
+ /**
143
+ * Write generated documents to disk
144
+ */
145
+ async writePrimitives(documents) {
146
+ const result = {
147
+ success: true,
148
+ analysis: {
149
+ dependencies: [],
150
+ services: [],
151
+ frameworks: [],
152
+ languages: [],
153
+ deployments: [],
154
+ existingConcepts: [],
155
+ existingFeatures: [],
156
+ metadata: {
157
+ analyzedAt: (/* @__PURE__ */ new Date()).toISOString(),
158
+ projectRoot: this.projectRoot,
159
+ filesScanned: 0,
160
+ duration: 0
161
+ }
162
+ },
163
+ documentsGenerated: [],
164
+ directoriesCreated: [],
165
+ errors: [],
166
+ warnings: []
167
+ };
168
+ const createdDirs = /* @__PURE__ */ new Set();
169
+ for (const doc of documents) {
170
+ try {
171
+ const dir = dirname(doc.path);
172
+ if (!createdDirs.has(dir) && !existsSync(dir)) {
173
+ await mkdir(dir, { recursive: true });
174
+ createdDirs.add(dir);
175
+ result.directoriesCreated.push(dir);
176
+ }
177
+ if (existsSync(doc.path)) {
178
+ result.warnings.push(`File already exists, skipping: ${doc.path}`);
179
+ continue;
180
+ }
181
+ const frontmatterStr = matter.stringify(doc.content, doc.frontmatter);
182
+ await writeFile(doc.path, frontmatterStr, "utf-8");
183
+ result.documentsGenerated.push(doc);
184
+ logger.debug("Created primitive", { path: doc.path, title: doc.title });
185
+ } catch (error) {
186
+ const errorMsg = `Failed to write ${doc.path}: ${String(error)}`;
187
+ result.errors.push(errorMsg);
188
+ logger.error(errorMsg);
189
+ }
190
+ }
191
+ result.success = result.errors.length === 0;
192
+ return result;
193
+ }
194
+ /**
195
+ * Full init-primitives workflow
196
+ */
197
+ async initPrimitives(options) {
198
+ const analysis = await this.analyze();
199
+ const documents = await this.generatePrimitives(analysis);
200
+ if (options?.dryRun) {
201
+ return {
202
+ success: true,
203
+ analysis,
204
+ documentsGenerated: documents,
205
+ directoriesCreated: [],
206
+ errors: [],
207
+ warnings: ["Dry run - no files written"]
208
+ };
209
+ }
210
+ const result = await this.writePrimitives(documents);
211
+ result.analysis = analysis;
212
+ return result;
213
+ }
214
+ // ============================================================================
215
+ // Dependency Analysis Methods
216
+ // ============================================================================
217
+ async analyzeDependencies(analysis) {
218
+ await this.analyzePackageJson(analysis);
219
+ await this.analyzePython(analysis);
220
+ await this.analyzeComposer(analysis);
221
+ await this.analyzeCargo(analysis);
222
+ await this.analyzeGoMod(analysis);
223
+ await this.analyzeJava(analysis);
224
+ }
225
+ async analyzePackageJson(analysis) {
226
+ const packageJsonPaths = [
227
+ join(this.projectRoot, "package.json"),
228
+ join(this.projectRoot, "packages/*/package.json")
229
+ ];
230
+ for (const path of [packageJsonPaths[0]]) {
231
+ try {
232
+ const content = await readFile(path, "utf-8");
233
+ const pkg = JSON.parse(content);
234
+ this.filesScanned++;
235
+ if (!analysis.languages.includes("javascript")) {
236
+ analysis.languages.push("javascript");
237
+ }
238
+ if (pkg.devDependencies?.typescript || pkg.dependencies?.typescript) {
239
+ if (!analysis.languages.includes("typescript")) {
240
+ analysis.languages.push("typescript");
241
+ }
242
+ }
243
+ for (const [name, version] of Object.entries(pkg.dependencies || {})) {
244
+ const dep = this.createDependencyInfo(name, version, "nodejs", false);
245
+ analysis.dependencies.push(dep);
246
+ }
247
+ for (const [name, version] of Object.entries(pkg.devDependencies || {})) {
248
+ const dep = this.createDependencyInfo(name, version, "nodejs", true);
249
+ analysis.dependencies.push(dep);
250
+ }
251
+ } catch {
252
+ }
253
+ }
254
+ try {
255
+ const packagesDir = join(this.projectRoot, "packages");
256
+ const entries = await readdir(packagesDir, { withFileTypes: true });
257
+ for (const entry of entries) {
258
+ if (entry.isDirectory()) {
259
+ const pkgPath = join(packagesDir, entry.name, "package.json");
260
+ try {
261
+ const content = await readFile(pkgPath, "utf-8");
262
+ const pkg = JSON.parse(content);
263
+ this.filesScanned++;
264
+ for (const [name, version] of Object.entries(pkg.dependencies || {})) {
265
+ if (!analysis.dependencies.some((d) => d.name === name && d.ecosystem === "nodejs")) {
266
+ const dep = this.createDependencyInfo(name, version, "nodejs", false);
267
+ analysis.dependencies.push(dep);
268
+ }
269
+ }
270
+ } catch {
271
+ }
272
+ }
273
+ }
274
+ } catch {
275
+ }
276
+ }
277
+ async analyzePython(analysis) {
278
+ const requirementsPaths = [
279
+ join(this.projectRoot, "requirements.txt"),
280
+ join(this.projectRoot, "requirements-dev.txt")
281
+ ];
282
+ for (const path of requirementsPaths) {
283
+ try {
284
+ const content = await readFile(path, "utf-8");
285
+ const isDev = path.includes("dev");
286
+ this.filesScanned++;
287
+ if (!analysis.languages.includes("python")) {
288
+ analysis.languages.push("python");
289
+ }
290
+ for (const line of content.split("\n")) {
291
+ const trimmed = line.trim();
292
+ if (!trimmed || trimmed.startsWith("#")) continue;
293
+ const match = trimmed.match(/^([a-zA-Z0-9-_]+)(?:==|>=|<=|~=|>|<)?(.+)?$/);
294
+ if (match) {
295
+ const [, name, version] = match;
296
+ const dep = this.createDependencyInfo(name, version?.trim() || "latest", "python", isDev);
297
+ analysis.dependencies.push(dep);
298
+ }
299
+ }
300
+ } catch {
301
+ }
302
+ }
303
+ try {
304
+ const content = await readFile(join(this.projectRoot, "pyproject.toml"), "utf-8");
305
+ this.filesScanned++;
306
+ const depMatch = content.match(/\[tool\.poetry\.dependencies\]([\s\S]*?)(?=\[|$)/);
307
+ if (depMatch) {
308
+ for (const line of depMatch[1].split("\n")) {
309
+ const match = line.match(/^([a-zA-Z0-9-_]+)\s*=\s*"([^"]+)"/);
310
+ if (match) {
311
+ const [, name, version] = match;
312
+ if (name !== "python") {
313
+ const dep = this.createDependencyInfo(name, version, "python", false);
314
+ analysis.dependencies.push(dep);
315
+ }
316
+ }
317
+ }
318
+ }
319
+ } catch {
320
+ }
321
+ }
322
+ async analyzeComposer(analysis) {
323
+ try {
324
+ const content = await readFile(join(this.projectRoot, "composer.json"), "utf-8");
325
+ const composer = JSON.parse(content);
326
+ this.filesScanned++;
327
+ if (!analysis.languages.includes("php")) {
328
+ analysis.languages.push("php");
329
+ }
330
+ for (const [name, version] of Object.entries(composer.require || {})) {
331
+ if (name === "php") continue;
332
+ const dep = this.createDependencyInfo(name, version, "php", false);
333
+ analysis.dependencies.push(dep);
334
+ }
335
+ for (const [name, version] of Object.entries(composer["require-dev"] || {})) {
336
+ const dep = this.createDependencyInfo(name, version, "php", true);
337
+ analysis.dependencies.push(dep);
338
+ }
339
+ } catch {
340
+ }
341
+ }
342
+ async analyzeCargo(analysis) {
343
+ try {
344
+ const content = await readFile(join(this.projectRoot, "Cargo.toml"), "utf-8");
345
+ this.filesScanned++;
346
+ if (!analysis.languages.includes("rust")) {
347
+ analysis.languages.push("rust");
348
+ }
349
+ const depMatch = content.match(/\[dependencies\]([\s\S]*?)(?=\[|$)/);
350
+ if (depMatch) {
351
+ for (const line of depMatch[1].split("\n")) {
352
+ const match = line.match(/^([a-zA-Z0-9-_]+)\s*=\s*"([^"]+)"/);
353
+ if (match) {
354
+ const [, name, version] = match;
355
+ const dep = this.createDependencyInfo(name, version, "rust", false);
356
+ dep.repository = `https://crates.io/crates/${name}`;
357
+ analysis.dependencies.push(dep);
358
+ }
359
+ }
360
+ }
361
+ } catch {
362
+ }
363
+ }
364
+ async analyzeGoMod(analysis) {
365
+ try {
366
+ const content = await readFile(join(this.projectRoot, "go.mod"), "utf-8");
367
+ this.filesScanned++;
368
+ if (!analysis.languages.includes("go")) {
369
+ analysis.languages.push("go");
370
+ }
371
+ let inRequire = false;
372
+ for (const line of content.split("\n")) {
373
+ if (line.trim() === "require (") {
374
+ inRequire = true;
375
+ continue;
376
+ }
377
+ if (line.trim() === ")") {
378
+ inRequire = false;
379
+ continue;
380
+ }
381
+ if (inRequire || line.trim().startsWith("require ")) {
382
+ const match = line.match(/([a-zA-Z0-9.-]+\/[a-zA-Z0-9.-/]+)\s+v([0-9.]+)/);
383
+ if (match) {
384
+ const [, name, version] = match;
385
+ const dep = this.createDependencyInfo(name, version, "go", false);
386
+ dep.documentation = [`https://pkg.go.dev/${name}`];
387
+ dep.repository = `https://${name}`;
388
+ analysis.dependencies.push(dep);
389
+ }
390
+ }
391
+ }
392
+ } catch {
393
+ }
394
+ }
395
+ async analyzeJava(analysis) {
396
+ try {
397
+ const content = await readFile(join(this.projectRoot, "pom.xml"), "utf-8");
398
+ this.filesScanned++;
399
+ if (!analysis.languages.includes("java")) {
400
+ analysis.languages.push("java");
401
+ }
402
+ const depMatches = content.matchAll(
403
+ /<dependency>[\s\S]*?<groupId>([^<]+)<\/groupId>[\s\S]*?<artifactId>([^<]+)<\/artifactId>[\s\S]*?(?:<version>([^<]+)<\/version>)?[\s\S]*?<\/dependency>/g
404
+ );
405
+ for (const match of depMatches) {
406
+ const [, groupId, artifactId, version] = match;
407
+ const name = `${groupId}:${artifactId}`;
408
+ const dep = this.createDependencyInfo(name, version || "latest", "java", false);
409
+ dep.documentation = [`https://mvnrepository.com/artifact/${groupId}/${artifactId}`];
410
+ analysis.dependencies.push(dep);
411
+ }
412
+ } catch {
413
+ }
414
+ try {
415
+ const content = await readFile(join(this.projectRoot, "build.gradle"), "utf-8");
416
+ this.filesScanned++;
417
+ if (!analysis.languages.includes("java")) {
418
+ analysis.languages.push("java");
419
+ }
420
+ } catch {
421
+ }
422
+ }
423
+ createDependencyInfo(name, version, ecosystem, isDev) {
424
+ return {
425
+ name,
426
+ version,
427
+ type: this.inferDependencyType(name),
428
+ category: this.inferCategory(name),
429
+ ecosystem,
430
+ documentation: this.getDocumentationLinks(name, ecosystem),
431
+ repository: this.getRepositoryUrl(name, ecosystem),
432
+ usedBy: [],
433
+ relatedTo: [],
434
+ isDev
435
+ };
436
+ }
437
+ // ============================================================================
438
+ // Vault Document Analysis
439
+ // ============================================================================
440
+ async analyzeVaultDocuments(analysis) {
441
+ for (const filePath of this.vaultContext.allFiles) {
442
+ try {
443
+ const content = await readFile(filePath, "utf-8");
444
+ const { data } = matter(content);
445
+ this.filesScanned++;
446
+ if (data.type === "concept") {
447
+ analysis.existingConcepts.push(data.title || basename(filePath, ".md"));
448
+ } else if (data.type === "feature") {
449
+ analysis.existingFeatures.push(data.title || basename(filePath, ".md"));
450
+ }
451
+ const contentLower = content.toLowerCase();
452
+ for (const dep of analysis.dependencies) {
453
+ if (contentLower.includes(dep.name.toLowerCase())) {
454
+ dep.usedBy.push(data.title || basename(filePath, ".md"));
455
+ }
456
+ }
457
+ } catch {
458
+ }
459
+ }
460
+ }
461
+ // ============================================================================
462
+ // Service Analysis
463
+ // ============================================================================
464
+ async analyzeServices(analysis) {
465
+ const serviceFiles = [
466
+ "docker-compose.yml",
467
+ "docker-compose.yaml",
468
+ "compose.yml",
469
+ "compose.yaml"
470
+ ];
471
+ for (const file of serviceFiles) {
472
+ try {
473
+ const content = await readFile(join(this.projectRoot, file), "utf-8");
474
+ this.filesScanned++;
475
+ const lines = content.split("\n");
476
+ let inServices = false;
477
+ let currentService = null;
478
+ let currentIndent = 0;
479
+ const serviceData = /* @__PURE__ */ new Map();
480
+ for (const line of lines) {
481
+ if (line.match(/^services:\s*$/)) {
482
+ inServices = true;
483
+ continue;
484
+ }
485
+ if (inServices && line.match(/^[a-zA-Z]+:\s*$/)) {
486
+ inServices = false;
487
+ currentService = null;
488
+ continue;
489
+ }
490
+ if (!inServices) continue;
491
+ const serviceMatch = line.match(/^ ([a-zA-Z0-9-_]+):\s*$/);
492
+ if (serviceMatch) {
493
+ currentService = serviceMatch[1];
494
+ if (!["volumes", "networks", "secrets", "configs"].includes(currentService)) {
495
+ serviceData.set(currentService, { ports: [] });
496
+ } else {
497
+ currentService = null;
498
+ }
499
+ continue;
500
+ }
501
+ if (currentService && serviceData.has(currentService)) {
502
+ const data = serviceData.get(currentService);
503
+ const imageMatch = line.match(/^\s+image:\s*(.+)$/);
504
+ if (imageMatch) {
505
+ data.image = imageMatch[1].trim();
506
+ }
507
+ const portMatch = line.match(/^\s+-\s*["']?(\d+)(?::\d+)?["']?/);
508
+ if (portMatch) {
509
+ data.ports.push(portMatch[1]);
510
+ }
511
+ }
512
+ }
513
+ for (const [name, data] of serviceData.entries()) {
514
+ const service = {
515
+ name,
516
+ type: this.inferServiceType(name, data.image),
517
+ technology: data.image?.split(":")[0] || "unknown",
518
+ dependencies: [],
519
+ ports: data.ports.map((p) => parseInt(p, 10))
520
+ };
521
+ analysis.services.push(service);
522
+ }
523
+ } catch {
524
+ }
525
+ }
526
+ }
527
+ extractPorts(portsSection) {
528
+ if (!portsSection) return [];
529
+ const ports = [];
530
+ const matches = portsSection.matchAll(/(\d+)(?::\d+)?/g);
531
+ for (const match of matches) {
532
+ ports.push(parseInt(match[1], 10));
533
+ }
534
+ return ports;
535
+ }
536
+ // ============================================================================
537
+ // Deployment Analysis
538
+ // ============================================================================
539
+ async analyzeDeployments(analysis) {
540
+ const deploymentIndicators = [
541
+ "Dockerfile",
542
+ "docker-compose.yml",
543
+ ".github/workflows",
544
+ "vercel.json",
545
+ "netlify.toml",
546
+ "railway.json",
547
+ "fly.toml",
548
+ "render.yaml",
549
+ "kubernetes",
550
+ "k8s"
551
+ ];
552
+ for (const indicator of deploymentIndicators) {
553
+ try {
554
+ await stat(join(this.projectRoot, indicator));
555
+ analysis.deployments.push(indicator);
556
+ } catch {
557
+ }
558
+ }
559
+ }
560
+ // ============================================================================
561
+ // Classification Methods
562
+ // ============================================================================
563
+ classifyDependencies(analysis) {
564
+ const frameworkKeywords = [
565
+ "express",
566
+ "fastify",
567
+ "koa",
568
+ "hapi",
569
+ "nest",
570
+ "react",
571
+ "vue",
572
+ "angular",
573
+ "svelte",
574
+ "solid",
575
+ "next",
576
+ "nuxt",
577
+ "gatsby",
578
+ "remix",
579
+ "astro",
580
+ "django",
581
+ "flask",
582
+ "fastapi",
583
+ "rails",
584
+ "laravel",
585
+ "spring",
586
+ "quarkus",
587
+ "micronaut",
588
+ "actix",
589
+ "rocket",
590
+ "axum",
591
+ "gin",
592
+ "echo",
593
+ "fiber"
594
+ ];
595
+ for (const dep of analysis.dependencies) {
596
+ const nameLower = dep.name.toLowerCase();
597
+ if (frameworkKeywords.some((fw) => nameLower.includes(fw))) {
598
+ dep.type = "framework";
599
+ if (!analysis.frameworks.some((f) => f.name === dep.name)) {
600
+ analysis.frameworks.push(dep);
601
+ }
602
+ }
603
+ }
604
+ }
605
+ inferDependencyType(name) {
606
+ const nameLower = name.toLowerCase();
607
+ if (nameLower.includes("eslint") || nameLower.includes("prettier") || nameLower.includes("webpack") || nameLower.includes("vite") || nameLower.includes("rollup") || nameLower.includes("esbuild")) {
608
+ return "tool";
609
+ }
610
+ return "library";
611
+ }
612
+ inferCategory(name) {
613
+ const nameLower = name.toLowerCase();
614
+ if (["react", "vue", "angular", "svelte", "solid"].some((fw) => nameLower.includes(fw))) {
615
+ return "components/ui";
616
+ }
617
+ if (["radix", "shadcn", "chakra", "mui", "antd"].some((ui) => nameLower.includes(ui))) {
618
+ return "components/ui";
619
+ }
620
+ if (["express", "fastapi", "django", "flask", "next", "fastify", "koa", "hapi"].some((fw) => nameLower.includes(fw))) {
621
+ return "services/api";
622
+ }
623
+ if (["prisma", "typeorm", "sequelize", "mongoose", "pg", "mysql", "sqlite", "drizzle"].some((db) => nameLower.includes(db))) {
624
+ return "integrations/databases";
625
+ }
626
+ if (["auth", "passport", "jwt", "oauth", "clerk", "auth0", "nextauth"].some((auth) => nameLower.includes(auth))) {
627
+ return "integrations/auth-providers";
628
+ }
629
+ if (["test", "jest", "mocha", "vitest", "cypress", "playwright"].some((test) => nameLower.includes(test))) {
630
+ return "guides/testing";
631
+ }
632
+ if (["webpack", "vite", "rollup", "esbuild", "turbo", "nx"].some((tool) => nameLower.includes(tool))) {
633
+ return "standards/build-tools";
634
+ }
635
+ if (["eslint", "prettier", "stylelint", "biome"].some((lint) => nameLower.includes(lint))) {
636
+ return "standards/coding-standards";
637
+ }
638
+ if (nameLower.includes("@types") || nameLower.includes("typescript")) {
639
+ return "components/utilities";
640
+ }
641
+ return "components/utilities";
642
+ }
643
+ getDocumentationLinks(name, ecosystem) {
644
+ const links = [];
645
+ switch (ecosystem) {
646
+ case "nodejs":
647
+ links.push(`https://www.npmjs.com/package/${name}`);
648
+ break;
649
+ case "python":
650
+ links.push(`https://pypi.org/project/${name}/`);
651
+ break;
652
+ case "php":
653
+ links.push(`https://packagist.org/packages/${name}`);
654
+ break;
655
+ case "rust":
656
+ links.push(`https://crates.io/crates/${name}`);
657
+ break;
658
+ case "go":
659
+ links.push(`https://pkg.go.dev/${name}`);
660
+ break;
661
+ case "java":
662
+ if (name.includes(":")) {
663
+ const [group, artifact] = name.split(":");
664
+ links.push(`https://mvnrepository.com/artifact/${group}/${artifact}`);
665
+ }
666
+ break;
667
+ }
668
+ return links;
669
+ }
670
+ getRepositoryUrl(name, ecosystem) {
671
+ return void 0;
672
+ }
673
+ inferServiceType(name, image) {
674
+ const nameLower = name.toLowerCase();
675
+ const imageLower = image?.toLowerCase() || "";
676
+ if (nameLower.includes("db") || nameLower.includes("database") || ["postgres", "mysql", "mongo", "mariadb"].some((db) => imageLower.includes(db))) {
677
+ return "database";
678
+ }
679
+ if (nameLower.includes("cache") || imageLower.includes("redis") || imageLower.includes("memcached")) {
680
+ return "cache";
681
+ }
682
+ if (nameLower.includes("queue") || ["rabbitmq", "kafka", "nats"].some((q) => imageLower.includes(q))) {
683
+ return "queue";
684
+ }
685
+ if (nameLower.includes("search") || ["elastic", "meilisearch", "typesense"].some((s) => imageLower.includes(s))) {
686
+ return "search";
687
+ }
688
+ if (nameLower.includes("api") || nameLower.includes("backend") || nameLower.includes("server")) {
689
+ return "api";
690
+ }
691
+ if (nameLower.includes("storage") || imageLower.includes("minio") || imageLower.includes("s3")) {
692
+ return "storage";
693
+ }
694
+ if (["prometheus", "grafana", "jaeger", "datadog"].some((m) => imageLower.includes(m))) {
695
+ return "monitoring";
696
+ }
697
+ return "compute";
698
+ }
699
+ shouldGenerateNode(dep) {
700
+ if (dep.type === "framework") return true;
701
+ const majorPackages = [
702
+ "react",
703
+ "vue",
704
+ "angular",
705
+ "svelte",
706
+ "typescript",
707
+ "webpack",
708
+ "vite",
709
+ "esbuild",
710
+ "jest",
711
+ "vitest",
712
+ "mocha",
713
+ "playwright",
714
+ "cypress",
715
+ "express",
716
+ "fastify",
717
+ "koa",
718
+ "next",
719
+ "nuxt",
720
+ "prisma",
721
+ "typeorm",
722
+ "sequelize",
723
+ "drizzle",
724
+ "axios",
725
+ "graphql",
726
+ "trpc",
727
+ "zod"
728
+ ];
729
+ return majorPackages.some((pkg) => dep.name.toLowerCase().includes(pkg));
730
+ }
731
+ // ============================================================================
732
+ // Node Generation Methods
733
+ // ============================================================================
734
+ generateFrameworkNode(framework, analysis) {
735
+ const title = this.formatTitle(framework.name);
736
+ const content = this.buildFrameworkContent(framework, analysis);
737
+ const frontmatter = {
738
+ title,
739
+ type: "primitive",
740
+ category: framework.category,
741
+ ecosystem: framework.ecosystem,
742
+ version: framework.version,
743
+ status: "active",
744
+ tags: ["framework", framework.ecosystem, framework.category.split("/").pop() || ""],
745
+ documentation: framework.documentation,
746
+ repository: framework.repository,
747
+ used_by: framework.usedBy.slice(0, 10),
748
+ created: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
749
+ updated: (/* @__PURE__ */ new Date()).toISOString()
750
+ };
751
+ return {
752
+ type: "primitive",
753
+ path: join(this.vaultContext.vaultRoot, framework.category, `${this.slugify(framework.name)}.md`),
754
+ title,
755
+ content,
756
+ frontmatter,
757
+ backlinks: []
758
+ };
759
+ }
760
+ generateDependencyNode(dep, analysis) {
761
+ const title = this.formatTitle(dep.name);
762
+ const content = this.buildDependencyContent(dep, analysis);
763
+ const frontmatter = {
764
+ title,
765
+ type: "primitive",
766
+ category: dep.category,
767
+ ecosystem: dep.ecosystem,
768
+ version: dep.version,
769
+ status: "active",
770
+ tags: [dep.type, dep.ecosystem, dep.category.split("/").pop() || ""],
771
+ documentation: dep.documentation,
772
+ repository: dep.repository,
773
+ used_by: dep.usedBy.slice(0, 10),
774
+ created: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
775
+ updated: (/* @__PURE__ */ new Date()).toISOString()
776
+ };
777
+ return {
778
+ type: "primitive",
779
+ path: join(this.vaultContext.vaultRoot, dep.category, `${this.slugify(dep.name)}.md`),
780
+ title,
781
+ content,
782
+ frontmatter,
783
+ backlinks: []
784
+ };
785
+ }
786
+ generateServiceNode(service, analysis) {
787
+ const title = this.formatTitle(service.name);
788
+ const content = this.buildServiceContent(service, analysis);
789
+ const frontmatter = {
790
+ title,
791
+ type: "service",
792
+ category: "service",
793
+ service_type: service.type,
794
+ technology: service.technology,
795
+ status: "active",
796
+ tags: ["service", service.type, service.technology],
797
+ created: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
798
+ updated: (/* @__PURE__ */ new Date()).toISOString()
799
+ };
800
+ return {
801
+ type: "service",
802
+ path: join(this.vaultContext.vaultRoot, "services", service.type, `${this.slugify(service.name)}.md`),
803
+ title,
804
+ content,
805
+ frontmatter,
806
+ backlinks: []
807
+ };
808
+ }
809
+ generateLanguageNode(language, analysis) {
810
+ const title = this.formatTitle(language);
811
+ const content = this.buildLanguageContent(language, analysis);
812
+ const frontmatter = {
813
+ title,
814
+ type: "standard",
815
+ category: "language",
816
+ status: "active",
817
+ tags: ["language", "programming"],
818
+ created: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
819
+ updated: (/* @__PURE__ */ new Date()).toISOString()
820
+ };
821
+ return {
822
+ type: "standard",
823
+ path: join(this.vaultContext.vaultRoot, "standards", "programming-languages", `${language.toLowerCase()}.md`),
824
+ title,
825
+ content,
826
+ frontmatter,
827
+ backlinks: []
828
+ };
829
+ }
830
+ // ============================================================================
831
+ // Content Building Methods
832
+ // ============================================================================
833
+ buildFrameworkContent(framework, analysis) {
834
+ const sections = [];
835
+ sections.push(`# ${this.formatTitle(framework.name)}
836
+ `);
837
+ sections.push(`${framework.category} framework for ${framework.ecosystem}.
838
+ `);
839
+ sections.push(`## Overview
840
+ `);
841
+ sections.push(`**Version:** ${framework.version}`);
842
+ sections.push(`**Type:** ${framework.type}`);
843
+ sections.push(`**Ecosystem:** ${framework.ecosystem}
844
+ `);
845
+ if (framework.usedBy.length > 0) {
846
+ sections.push(`## Usage in This Project
847
+ `);
848
+ framework.usedBy.slice(0, 10).forEach((feature) => {
849
+ sections.push(`- [[${this.slugify(feature)}|${feature}]]`);
850
+ });
851
+ sections.push("");
852
+ }
853
+ if (framework.documentation && framework.documentation.length > 0) {
854
+ sections.push(`## Documentation
855
+ `);
856
+ framework.documentation.forEach((url) => {
857
+ sections.push(`- [${this.getLinkText(url)}](${url})`);
858
+ });
859
+ sections.push("");
860
+ }
861
+ if (framework.repository) {
862
+ sections.push(`## Repository
863
+ `);
864
+ sections.push(`- [Source Code](${framework.repository})
865
+ `);
866
+ }
867
+ const related = this.findRelatedTechnologies(framework, analysis);
868
+ if (related.length > 0) {
869
+ sections.push(`## Related Primitives
870
+ `);
871
+ related.forEach((rel) => {
872
+ sections.push(`- [[${this.slugify(rel)}]]`);
873
+ });
874
+ sections.push("");
875
+ }
876
+ return sections.join("\n");
877
+ }
878
+ buildDependencyContent(dep, analysis) {
879
+ const sections = [];
880
+ sections.push(`# ${this.formatTitle(dep.name)}
881
+ `);
882
+ sections.push(`${dep.category} ${dep.type} for ${dep.ecosystem}.
883
+ `);
884
+ sections.push(`## Overview
885
+ `);
886
+ sections.push(`**Version:** ${dep.version}`);
887
+ sections.push(`**Type:** ${dep.type}
888
+ `);
889
+ if (dep.usedBy.length > 0) {
890
+ sections.push(`## Usage
891
+ `);
892
+ dep.usedBy.slice(0, 10).forEach((ref) => {
893
+ sections.push(`- [[${this.slugify(ref)}|${ref}]]`);
894
+ });
895
+ if (dep.usedBy.length > 10) {
896
+ sections.push(`- ...and ${dep.usedBy.length - 10} more`);
897
+ }
898
+ sections.push("");
899
+ }
900
+ if (dep.documentation && dep.documentation.length > 0) {
901
+ sections.push(`## Documentation
902
+ `);
903
+ dep.documentation.forEach((url) => {
904
+ sections.push(`- [${this.getLinkText(url)}](${url})`);
905
+ });
906
+ sections.push("");
907
+ }
908
+ return sections.join("\n");
909
+ }
910
+ buildServiceContent(service, analysis) {
911
+ const sections = [];
912
+ sections.push(`# ${this.formatTitle(service.name)}
913
+ `);
914
+ sections.push(`${service.type} service using ${service.technology}.
915
+ `);
916
+ sections.push(`## Service Details
917
+ `);
918
+ sections.push(`**Type:** ${service.type}`);
919
+ sections.push(`**Technology:** ${service.technology}`);
920
+ if (service.framework) {
921
+ sections.push(`**Framework:** [[${this.slugify(service.framework)}|${service.framework}]]`);
922
+ }
923
+ if (service.language) {
924
+ sections.push(`**Language:** [[${service.language}]]`);
925
+ }
926
+ sections.push("");
927
+ if (service.ports && service.ports.length > 0) {
928
+ sections.push(`## Ports
929
+ `);
930
+ service.ports.forEach((port) => {
931
+ sections.push(`- ${port}`);
932
+ });
933
+ sections.push("");
934
+ }
935
+ if (service.dependencies.length > 0) {
936
+ sections.push(`## Dependencies
937
+ `);
938
+ service.dependencies.forEach((dep) => {
939
+ sections.push(`- [[${this.slugify(dep)}]]`);
940
+ });
941
+ sections.push("");
942
+ }
943
+ return sections.join("\n");
944
+ }
945
+ buildLanguageContent(language, analysis) {
946
+ const sections = [];
947
+ const langLower = language.toLowerCase();
948
+ sections.push(`# ${this.formatTitle(language)}
949
+ `);
950
+ sections.push(`Programming language used in this project.
951
+ `);
952
+ const frameworks = analysis.frameworks.filter(
953
+ (f) => f.ecosystem === langLower || langLower === "javascript" && f.ecosystem === "nodejs" || langLower === "typescript" && f.ecosystem === "nodejs"
954
+ );
955
+ const dependencies = analysis.dependencies.filter(
956
+ (d) => d.ecosystem === langLower || langLower === "javascript" && d.ecosystem === "nodejs" || langLower === "typescript" && d.ecosystem === "nodejs"
957
+ );
958
+ if (frameworks.length > 0) {
959
+ sections.push(`## Frameworks
960
+ `);
961
+ frameworks.slice(0, 10).forEach((fw) => {
962
+ sections.push(`- [[${this.slugify(fw.name)}|${this.formatTitle(fw.name)}]]`);
963
+ });
964
+ sections.push("");
965
+ }
966
+ if (dependencies.length > 0) {
967
+ sections.push(`## Libraries (${dependencies.length})
968
+ `);
969
+ sections.push(`This project uses ${dependencies.length} ${language} dependencies.
970
+ `);
971
+ }
972
+ sections.push(`## Resources
973
+ `);
974
+ sections.push(`- [Official Documentation](${this.getLanguageDocUrl(language)})`);
975
+ sections.push("");
976
+ return sections.join("\n");
977
+ }
978
+ // ============================================================================
979
+ // Helper Methods
980
+ // ============================================================================
981
+ findRelatedTechnologies(dep, analysis) {
982
+ const related = [];
983
+ for (const other of analysis.frameworks) {
984
+ if (other.name !== dep.name && other.category === dep.category) {
985
+ related.push(other.name);
986
+ }
987
+ }
988
+ return related.slice(0, 5);
989
+ }
990
+ formatTitle(name) {
991
+ return name.split(/[-_/]/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
992
+ }
993
+ slugify(text) {
994
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
995
+ }
996
+ getLinkText(url) {
997
+ if (url.includes("github.com")) return "GitHub";
998
+ if (url.includes("npmjs.com")) return "NPM";
999
+ if (url.includes("pypi.org")) return "PyPI";
1000
+ if (url.includes("crates.io")) return "Crates.io";
1001
+ if (url.includes("pkg.go.dev")) return "Go Docs";
1002
+ if (url.includes("packagist.org")) return "Packagist";
1003
+ if (url.includes("mvnrepository.com")) return "Maven";
1004
+ return "Documentation";
1005
+ }
1006
+ getLanguageDocUrl(language) {
1007
+ const urls = {
1008
+ "javascript": "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
1009
+ "typescript": "https://www.typescriptlang.org/docs/",
1010
+ "python": "https://docs.python.org/",
1011
+ "php": "https://www.php.net/docs.php",
1012
+ "rust": "https://doc.rust-lang.org/",
1013
+ "go": "https://go.dev/doc/",
1014
+ "java": "https://docs.oracle.com/en/java/",
1015
+ "ruby": "https://www.ruby-lang.org/en/documentation/"
1016
+ };
1017
+ return urls[language.toLowerCase()] || `https://www.google.com/search?q=${language}+documentation`;
1018
+ }
1019
+ }
1020
+ async function analyzeSeed(projectRoot, docsPath) {
1021
+ const generator = await SeedGenerator.create(projectRoot, docsPath);
1022
+ return generator.analyze();
1023
+ }
1024
+ async function initPrimitives(projectRoot, docsPath, options) {
1025
+ const generator = await SeedGenerator.create(projectRoot, docsPath);
1026
+ return generator.initPrimitives(options);
1027
+ }
1028
+ export {
1029
+ SeedGenerator,
1030
+ analyzeSeed,
1031
+ initPrimitives
1032
+ };
1033
+ //# sourceMappingURL=seed-generator.js.map