@vpxa/aikit 0.1.59 → 0.1.60

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 (553) hide show
  1. package/README.md +38 -3
  2. package/package.json +2 -1
  3. package/packages/aikit-client/dist/index.d.ts +146 -4
  4. package/packages/aikit-client/dist/index.js +5 -1
  5. package/packages/analyzers/dist/index.d.ts +309 -11
  6. package/packages/analyzers/dist/index.js +54 -1
  7. package/packages/chunker/dist/index.d.ts +451 -18
  8. package/packages/chunker/dist/index.js +24 -1
  9. package/packages/cli/dist/{commands/init/constants.js → constants-D3v4VDf0.js} +1 -1
  10. package/packages/cli/dist/index.js +15 -2
  11. package/packages/cli/dist/init-D0CiV9PX.js +7 -0
  12. package/packages/cli/dist/scaffold-CJwkHf-q.js +2 -0
  13. package/packages/cli/dist/{commands/init/templates.js → templates-DJ7EC5vw.js} +1 -1
  14. package/packages/cli/dist/user-HmJYNt5b.js +5 -0
  15. package/packages/core/dist/index.d.ts +357 -6
  16. package/packages/core/dist/index.js +1 -1
  17. package/packages/dashboard/dist/assets/{index-Cdke3KDK.js → index-C6D-PCp0.js} +7 -7
  18. package/packages/dashboard/dist/assets/index-C6D-PCp0.js.map +1 -0
  19. package/packages/dashboard/dist/index.html +1 -1
  20. package/packages/elicitation/dist/index.d.ts +139 -4
  21. package/packages/elicitation/dist/index.js +1 -1
  22. package/packages/embeddings/dist/index.d.ts +45 -2
  23. package/packages/embeddings/dist/index.js +1 -1
  24. package/packages/enterprise-bridge/dist/index.d.ts +275 -7
  25. package/packages/enterprise-bridge/dist/index.js +1 -1
  26. package/packages/flows/dist/index.d.ts +345 -12
  27. package/packages/flows/dist/index.js +15 -1
  28. package/packages/indexer/dist/index.d.ts +196 -6
  29. package/packages/indexer/dist/index.js +1 -1
  30. package/packages/present/dist/index.html +314 -313
  31. package/packages/server/dist/curated-manager-DX-_oJg0.js +5 -0
  32. package/packages/server/dist/index.d.ts +139 -1
  33. package/packages/server/dist/index.js +1 -1
  34. package/packages/server/dist/server-eMZ64H9b.js +1274 -0
  35. package/packages/store/dist/index.d.ts +316 -5
  36. package/packages/store/dist/index.js +90 -1
  37. package/packages/store/dist/lance-store-jdHZp-V4.js +1 -0
  38. package/packages/tools/dist/index.d.ts +2161 -61
  39. package/packages/tools/dist/index.js +117 -1
  40. package/packages/tui/dist/{App-CoMyn2kt.js → App-DobfqTPH.js} +1 -1
  41. package/packages/tui/dist/App.d.ts +1 -1
  42. package/packages/tui/dist/App.js +1 -1
  43. package/packages/tui/dist/{LogPanel-CDItCD0E.js → LogPanel-DGeptKim.js} +3 -3
  44. package/packages/tui/dist/hooks/useKBClient.d.ts +1 -1
  45. package/packages/tui/dist/{index-MXJeXmCf.d.ts → index-floZQwfo.d.ts} +2 -1
  46. package/packages/tui/dist/index.d.ts +1 -1
  47. package/packages/tui/dist/index.js +1 -1
  48. package/packages/tui/dist/panels/LogPanel.js +1 -1
  49. package/scaffold/definitions/bodies.mjs +47 -0
  50. package/scaffold/definitions/protocols.mjs +9 -0
  51. package/scaffold/definitions/tools.mjs +15 -0
  52. package/scaffold/general/agents/Debugger.agent.md +9 -0
  53. package/scaffold/general/agents/Documenter.agent.md +9 -0
  54. package/scaffold/general/agents/Frontend.agent.md +9 -0
  55. package/scaffold/general/agents/Implementer.agent.md +9 -0
  56. package/scaffold/general/agents/Orchestrator.agent.md +47 -0
  57. package/scaffold/general/agents/Planner.agent.md +9 -0
  58. package/scaffold/general/agents/Refactor.agent.md +9 -0
  59. package/scaffold/general/agents/Security.agent.md +9 -0
  60. package/scaffold/general/agents/_shared/code-agent-base.md +9 -0
  61. package/scaffold/general/skills/aikit/SKILL.md +71 -7
  62. package/packages/aikit-client/dist/direct-client.d.ts +0 -37
  63. package/packages/aikit-client/dist/direct-client.js +0 -1
  64. package/packages/aikit-client/dist/mcp-client.d.ts +0 -19
  65. package/packages/aikit-client/dist/mcp-client.js +0 -4
  66. package/packages/aikit-client/dist/parsers.d.ts +0 -35
  67. package/packages/aikit-client/dist/parsers.js +0 -2
  68. package/packages/aikit-client/dist/types.d.ts +0 -62
  69. package/packages/aikit-client/dist/types.js +0 -1
  70. package/packages/analyzers/dist/blast-radius-analyzer.d.ts +0 -19
  71. package/packages/analyzers/dist/blast-radius-analyzer.js +0 -6
  72. package/packages/analyzers/dist/dependency-analyzer.d.ts +0 -32
  73. package/packages/analyzers/dist/dependency-analyzer.js +0 -8
  74. package/packages/analyzers/dist/diagram-generator.d.ts +0 -16
  75. package/packages/analyzers/dist/diagram-generator.js +0 -2
  76. package/packages/analyzers/dist/entry-point-analyzer.d.ts +0 -40
  77. package/packages/analyzers/dist/entry-point-analyzer.js +0 -4
  78. package/packages/analyzers/dist/knowledge-producer.d.ts +0 -40
  79. package/packages/analyzers/dist/knowledge-producer.js +0 -26
  80. package/packages/analyzers/dist/pattern-analyzer.d.ts +0 -15
  81. package/packages/analyzers/dist/pattern-analyzer.js +0 -2
  82. package/packages/analyzers/dist/regex-call-graph.d.ts +0 -10
  83. package/packages/analyzers/dist/regex-call-graph.js +0 -1
  84. package/packages/analyzers/dist/structure-analyzer.d.ts +0 -19
  85. package/packages/analyzers/dist/structure-analyzer.js +0 -4
  86. package/packages/analyzers/dist/symbol-analyzer.d.ts +0 -14
  87. package/packages/analyzers/dist/symbol-analyzer.js +0 -9
  88. package/packages/analyzers/dist/ts-call-graph.d.ts +0 -29
  89. package/packages/analyzers/dist/ts-call-graph.js +0 -1
  90. package/packages/analyzers/dist/types.d.ts +0 -110
  91. package/packages/analyzers/dist/types.js +0 -1
  92. package/packages/chunker/dist/call-graph-extractor.d.ts +0 -25
  93. package/packages/chunker/dist/call-graph-extractor.js +0 -1
  94. package/packages/chunker/dist/chunker-factory.d.ts +0 -19
  95. package/packages/chunker/dist/chunker-factory.js +0 -1
  96. package/packages/chunker/dist/chunker.interface.d.ts +0 -13
  97. package/packages/chunker/dist/chunker.interface.js +0 -1
  98. package/packages/chunker/dist/code-chunker.d.ts +0 -17
  99. package/packages/chunker/dist/code-chunker.js +0 -11
  100. package/packages/chunker/dist/extractors/call-extractor.d.ts +0 -24
  101. package/packages/chunker/dist/extractors/call-extractor.js +0 -1
  102. package/packages/chunker/dist/extractors/entry-point-detector.d.ts +0 -14
  103. package/packages/chunker/dist/extractors/entry-point-detector.js +0 -1
  104. package/packages/chunker/dist/extractors/import-extractor.d.ts +0 -14
  105. package/packages/chunker/dist/extractors/import-extractor.js +0 -1
  106. package/packages/chunker/dist/extractors/pattern-detector.d.ts +0 -14
  107. package/packages/chunker/dist/extractors/pattern-detector.js +0 -1
  108. package/packages/chunker/dist/extractors/scope-resolver.d.ts +0 -26
  109. package/packages/chunker/dist/extractors/scope-resolver.js +0 -1
  110. package/packages/chunker/dist/extractors/symbol-extractor.d.ts +0 -14
  111. package/packages/chunker/dist/extractors/symbol-extractor.js +0 -3
  112. package/packages/chunker/dist/extractors/types.d.ts +0 -44
  113. package/packages/chunker/dist/extractors/types.js +0 -1
  114. package/packages/chunker/dist/generic-chunker.d.ts +0 -15
  115. package/packages/chunker/dist/generic-chunker.js +0 -5
  116. package/packages/chunker/dist/markdown-chunker.d.ts +0 -17
  117. package/packages/chunker/dist/markdown-chunker.js +0 -3
  118. package/packages/chunker/dist/wasm/languages.d.ts +0 -18
  119. package/packages/chunker/dist/wasm/languages.js +0 -1
  120. package/packages/chunker/dist/wasm/query-executor.d.ts +0 -70
  121. package/packages/chunker/dist/wasm/query-executor.js +0 -1
  122. package/packages/chunker/dist/wasm/runtime.d.ts +0 -44
  123. package/packages/chunker/dist/wasm/runtime.js +0 -1
  124. package/packages/chunker/dist/wasm/types.d.ts +0 -84
  125. package/packages/chunker/dist/wasm/types.js +0 -1
  126. package/packages/chunker/dist/wasm-chunker.d.ts +0 -23
  127. package/packages/chunker/dist/wasm-chunker.js +0 -6
  128. package/packages/cli/dist/aikit-init.d.ts +0 -59
  129. package/packages/cli/dist/aikit-init.js +0 -1
  130. package/packages/cli/dist/commands/analyze.d.ts +0 -6
  131. package/packages/cli/dist/commands/analyze.js +0 -2
  132. package/packages/cli/dist/commands/context-cmds.d.ts +0 -6
  133. package/packages/cli/dist/commands/context-cmds.js +0 -1
  134. package/packages/cli/dist/commands/environment.d.ts +0 -6
  135. package/packages/cli/dist/commands/environment.js +0 -1
  136. package/packages/cli/dist/commands/execution.d.ts +0 -6
  137. package/packages/cli/dist/commands/execution.js +0 -1
  138. package/packages/cli/dist/commands/flow.d.ts +0 -6
  139. package/packages/cli/dist/commands/flow.js +0 -1
  140. package/packages/cli/dist/commands/graph.d.ts +0 -6
  141. package/packages/cli/dist/commands/graph.js +0 -6
  142. package/packages/cli/dist/commands/init/adapters.d.ts +0 -28
  143. package/packages/cli/dist/commands/init/adapters.js +0 -1
  144. package/packages/cli/dist/commands/init/config.d.ts +0 -10
  145. package/packages/cli/dist/commands/init/config.js +0 -3
  146. package/packages/cli/dist/commands/init/constants.d.ts +0 -46
  147. package/packages/cli/dist/commands/init/curated.d.ts +0 -7
  148. package/packages/cli/dist/commands/init/curated.js +0 -1
  149. package/packages/cli/dist/commands/init/frontmatter.d.ts +0 -79
  150. package/packages/cli/dist/commands/init/frontmatter.js +0 -2
  151. package/packages/cli/dist/commands/init/index.d.ts +0 -36
  152. package/packages/cli/dist/commands/init/index.js +0 -5
  153. package/packages/cli/dist/commands/init/manifest.d.ts +0 -72
  154. package/packages/cli/dist/commands/init/manifest.js +0 -1
  155. package/packages/cli/dist/commands/init/scaffold.d.ts +0 -58
  156. package/packages/cli/dist/commands/init/scaffold.js +0 -1
  157. package/packages/cli/dist/commands/init/templates.d.ts +0 -9
  158. package/packages/cli/dist/commands/init/user.d.ts +0 -61
  159. package/packages/cli/dist/commands/init/user.js +0 -5
  160. package/packages/cli/dist/commands/knowledge.d.ts +0 -6
  161. package/packages/cli/dist/commands/knowledge.js +0 -1
  162. package/packages/cli/dist/commands/search.d.ts +0 -6
  163. package/packages/cli/dist/commands/search.js +0 -1
  164. package/packages/cli/dist/commands/system.d.ts +0 -6
  165. package/packages/cli/dist/commands/system.js +0 -4
  166. package/packages/cli/dist/commands/upgrade.d.ts +0 -6
  167. package/packages/cli/dist/commands/upgrade.js +0 -1
  168. package/packages/cli/dist/commands/workspace.d.ts +0 -6
  169. package/packages/cli/dist/commands/workspace.js +0 -1
  170. package/packages/cli/dist/context.d.ts +0 -7
  171. package/packages/cli/dist/context.js +0 -1
  172. package/packages/cli/dist/helpers.d.ts +0 -55
  173. package/packages/cli/dist/helpers.js +0 -5
  174. package/packages/cli/dist/types.d.ts +0 -9
  175. package/packages/cli/dist/types.js +0 -1
  176. package/packages/core/dist/constants.d.ts +0 -74
  177. package/packages/core/dist/constants.js +0 -1
  178. package/packages/core/dist/content-detector.d.ts +0 -13
  179. package/packages/core/dist/content-detector.js +0 -1
  180. package/packages/core/dist/errors.d.ts +0 -20
  181. package/packages/core/dist/errors.js +0 -1
  182. package/packages/core/dist/global-registry.d.ts +0 -69
  183. package/packages/core/dist/global-registry.js +0 -1
  184. package/packages/core/dist/logger.d.ts +0 -32
  185. package/packages/core/dist/logger.js +0 -1
  186. package/packages/core/dist/types.d.ts +0 -149
  187. package/packages/core/dist/types.js +0 -1
  188. package/packages/dashboard/dist/assets/index-Cdke3KDK.js.map +0 -1
  189. package/packages/elicitation/dist/build.d.ts +0 -14
  190. package/packages/elicitation/dist/build.js +0 -1
  191. package/packages/elicitation/dist/fields.d.ts +0 -32
  192. package/packages/elicitation/dist/fields.js +0 -1
  193. package/packages/elicitation/dist/normalize.d.ts +0 -15
  194. package/packages/elicitation/dist/normalize.js +0 -1
  195. package/packages/elicitation/dist/types.d.ts +0 -88
  196. package/packages/elicitation/dist/types.js +0 -1
  197. package/packages/embeddings/dist/embedder.interface.d.ts +0 -26
  198. package/packages/embeddings/dist/embedder.interface.js +0 -1
  199. package/packages/embeddings/dist/onnx-embedder.d.ts +0 -23
  200. package/packages/embeddings/dist/onnx-embedder.js +0 -1
  201. package/packages/enterprise-bridge/dist/cache.d.ts +0 -28
  202. package/packages/enterprise-bridge/dist/cache.js +0 -1
  203. package/packages/enterprise-bridge/dist/er-client.d.ts +0 -37
  204. package/packages/enterprise-bridge/dist/er-client.js +0 -1
  205. package/packages/enterprise-bridge/dist/evolution-collector.d.ts +0 -62
  206. package/packages/enterprise-bridge/dist/evolution-collector.js +0 -1
  207. package/packages/enterprise-bridge/dist/policy-store.d.ts +0 -45
  208. package/packages/enterprise-bridge/dist/policy-store.js +0 -1
  209. package/packages/enterprise-bridge/dist/push-adapter.d.ts +0 -23
  210. package/packages/enterprise-bridge/dist/push-adapter.js +0 -1
  211. package/packages/enterprise-bridge/dist/result-merger.d.ts +0 -14
  212. package/packages/enterprise-bridge/dist/result-merger.js +0 -1
  213. package/packages/enterprise-bridge/dist/types.d.ts +0 -81
  214. package/packages/enterprise-bridge/dist/types.js +0 -1
  215. package/packages/flows/dist/adapters/claude-plugin.d.ts +0 -25
  216. package/packages/flows/dist/adapters/claude-plugin.js +0 -3
  217. package/packages/flows/dist/adapters/copilot.d.ts +0 -12
  218. package/packages/flows/dist/adapters/copilot.js +0 -1
  219. package/packages/flows/dist/adapters/index.d.ts +0 -12
  220. package/packages/flows/dist/adapters/index.js +0 -1
  221. package/packages/flows/dist/adapters/native.d.ts +0 -10
  222. package/packages/flows/dist/adapters/native.js +0 -1
  223. package/packages/flows/dist/adapters/openspec.d.ts +0 -40
  224. package/packages/flows/dist/adapters/openspec.js +0 -1
  225. package/packages/flows/dist/builtins.d.ts +0 -16
  226. package/packages/flows/dist/builtins.js +0 -1
  227. package/packages/flows/dist/foundation.d.ts +0 -20
  228. package/packages/flows/dist/foundation.js +0 -11
  229. package/packages/flows/dist/git.d.ts +0 -53
  230. package/packages/flows/dist/git.js +0 -2
  231. package/packages/flows/dist/loader.d.ts +0 -13
  232. package/packages/flows/dist/loader.js +0 -2
  233. package/packages/flows/dist/registry.d.ts +0 -23
  234. package/packages/flows/dist/registry.js +0 -1
  235. package/packages/flows/dist/state-machine.d.ts +0 -23
  236. package/packages/flows/dist/state-machine.js +0 -1
  237. package/packages/flows/dist/symlinks.d.ts +0 -17
  238. package/packages/flows/dist/symlinks.js +0 -1
  239. package/packages/flows/dist/types.d.ts +0 -127
  240. package/packages/flows/dist/types.js +0 -1
  241. package/packages/indexer/dist/file-hasher.d.ts +0 -13
  242. package/packages/indexer/dist/file-hasher.js +0 -1
  243. package/packages/indexer/dist/filesystem-crawler.d.ts +0 -29
  244. package/packages/indexer/dist/filesystem-crawler.js +0 -1
  245. package/packages/indexer/dist/graph-extractor.d.ts +0 -22
  246. package/packages/indexer/dist/graph-extractor.js +0 -1
  247. package/packages/indexer/dist/hash-cache.d.ts +0 -24
  248. package/packages/indexer/dist/hash-cache.js +0 -1
  249. package/packages/indexer/dist/incremental-indexer.d.ts +0 -73
  250. package/packages/indexer/dist/incremental-indexer.js +0 -1
  251. package/packages/indexer/dist/smart-index-scheduler.d.ts +0 -47
  252. package/packages/indexer/dist/smart-index-scheduler.js +0 -1
  253. package/packages/server/dist/api.d.ts +0 -3
  254. package/packages/server/dist/api.js +0 -1
  255. package/packages/server/dist/auto-gc.d.ts +0 -30
  256. package/packages/server/dist/auto-gc.js +0 -1
  257. package/packages/server/dist/background-task.d.ts +0 -47
  258. package/packages/server/dist/background-task.js +0 -1
  259. package/packages/server/dist/completions.d.ts +0 -14
  260. package/packages/server/dist/completions.js +0 -1
  261. package/packages/server/dist/compression-interceptor.d.ts +0 -12
  262. package/packages/server/dist/compression-interceptor.js +0 -1
  263. package/packages/server/dist/config.d.ts +0 -16
  264. package/packages/server/dist/cross-workspace.d.ts +0 -43
  265. package/packages/server/dist/cross-workspace.js +0 -1
  266. package/packages/server/dist/curated-manager.d.ts +0 -92
  267. package/packages/server/dist/curated-manager.js +0 -5
  268. package/packages/server/dist/dashboard-static.d.ts +0 -27
  269. package/packages/server/dist/elicitor.d.ts +0 -18
  270. package/packages/server/dist/elicitor.js +0 -1
  271. package/packages/server/dist/idle-timer.d.ts +0 -33
  272. package/packages/server/dist/idle-timer.js +0 -1
  273. package/packages/server/dist/mcp-logging.d.ts +0 -11
  274. package/packages/server/dist/mcp-logging.js +0 -1
  275. package/packages/server/dist/memory-monitor.d.ts +0 -37
  276. package/packages/server/dist/memory-monitor.js +0 -1
  277. package/packages/server/dist/output-schemas.d.ts +0 -244
  278. package/packages/server/dist/output-schemas.js +0 -1
  279. package/packages/server/dist/prompts.d.ts +0 -13
  280. package/packages/server/dist/prompts.js +0 -13
  281. package/packages/server/dist/replay-interceptor.d.ts +0 -23
  282. package/packages/server/dist/replay-interceptor.js +0 -1
  283. package/packages/server/dist/resource-links.d.ts +0 -34
  284. package/packages/server/dist/resource-links.js +0 -1
  285. package/packages/server/dist/resources/curated-resources.d.ts +0 -13
  286. package/packages/server/dist/resources/curated-resources.js +0 -2
  287. package/packages/server/dist/resources/resource-notifier.d.ts +0 -45
  288. package/packages/server/dist/resources/resource-notifier.js +0 -1
  289. package/packages/server/dist/resources/resources.d.ts +0 -8
  290. package/packages/server/dist/resources/resources.js +0 -2
  291. package/packages/server/dist/sampling.d.ts +0 -41
  292. package/packages/server/dist/sampling.js +0 -2
  293. package/packages/server/dist/server.d.ts +0 -63
  294. package/packages/server/dist/server.js +0 -3
  295. package/packages/server/dist/structured-content-guard.d.ts +0 -28
  296. package/packages/server/dist/structured-content-guard.js +0 -1
  297. package/packages/server/dist/task-manager.d.ts +0 -40
  298. package/packages/server/dist/task-manager.js +0 -1
  299. package/packages/server/dist/tool-metadata.d.ts +0 -38
  300. package/packages/server/dist/tool-metadata.js +0 -1
  301. package/packages/server/dist/tool-prefix.d.ts +0 -12
  302. package/packages/server/dist/tool-prefix.js +0 -1
  303. package/packages/server/dist/tool-timeout.d.ts +0 -27
  304. package/packages/server/dist/tool-timeout.js +0 -1
  305. package/packages/server/dist/tools/analyze.tools.d.ts +0 -14
  306. package/packages/server/dist/tools/analyze.tools.js +0 -8
  307. package/packages/server/dist/tools/audit.tool.d.ts +0 -8
  308. package/packages/server/dist/tools/audit.tool.js +0 -1
  309. package/packages/server/dist/tools/brainstorm.tool.d.ts +0 -7
  310. package/packages/server/dist/tools/brainstorm.tool.js +0 -9
  311. package/packages/server/dist/tools/bridge.tools.d.ts +0 -34
  312. package/packages/server/dist/tools/bridge.tools.js +0 -15
  313. package/packages/server/dist/tools/config.tool.d.ts +0 -8
  314. package/packages/server/dist/tools/config.tool.js +0 -12
  315. package/packages/server/dist/tools/context.tools.d.ts +0 -15
  316. package/packages/server/dist/tools/context.tools.js +0 -10
  317. package/packages/server/dist/tools/evolution.tools.d.ts +0 -7
  318. package/packages/server/dist/tools/evolution.tools.js +0 -5
  319. package/packages/server/dist/tools/execution.tools.d.ts +0 -14
  320. package/packages/server/dist/tools/execution.tools.js +0 -4
  321. package/packages/server/dist/tools/flow.tools.d.ts +0 -7
  322. package/packages/server/dist/tools/flow.tools.js +0 -16
  323. package/packages/server/dist/tools/forge.tools.d.ts +0 -13
  324. package/packages/server/dist/tools/forge.tools.js +0 -10
  325. package/packages/server/dist/tools/forget.tool.d.ts +0 -8
  326. package/packages/server/dist/tools/forget.tool.js +0 -1
  327. package/packages/server/dist/tools/graph.tool.d.ts +0 -7
  328. package/packages/server/dist/tools/graph.tool.js +0 -29
  329. package/packages/server/dist/tools/infra.tools.d.ts +0 -10
  330. package/packages/server/dist/tools/infra.tools.js +0 -5
  331. package/packages/server/dist/tools/list.tool.d.ts +0 -7
  332. package/packages/server/dist/tools/list.tool.js +0 -2
  333. package/packages/server/dist/tools/lookup.tool.d.ts +0 -7
  334. package/packages/server/dist/tools/lookup.tool.js +0 -3
  335. package/packages/server/dist/tools/manipulation.tools.d.ts +0 -10
  336. package/packages/server/dist/tools/manipulation.tools.js +0 -4
  337. package/packages/server/dist/tools/onboard.tool.d.ts +0 -12
  338. package/packages/server/dist/tools/onboard.tool.js +0 -2
  339. package/packages/server/dist/tools/persistence.tools.d.ts +0 -10
  340. package/packages/server/dist/tools/persistence.tools.js +0 -5
  341. package/packages/server/dist/tools/policy.tools.d.ts +0 -7
  342. package/packages/server/dist/tools/policy.tools.js +0 -3
  343. package/packages/server/dist/tools/present/browser.d.ts +0 -4
  344. package/packages/server/dist/tools/present/browser.js +0 -93
  345. package/packages/server/dist/tools/present/helpers.d.ts +0 -19
  346. package/packages/server/dist/tools/present/helpers.js +0 -16
  347. package/packages/server/dist/tools/present/html.d.ts +0 -18
  348. package/packages/server/dist/tools/present/html.js +0 -5
  349. package/packages/server/dist/tools/present/index.d.ts +0 -2
  350. package/packages/server/dist/tools/present/index.js +0 -1
  351. package/packages/server/dist/tools/present/markdown.d.ts +0 -32
  352. package/packages/server/dist/tools/present/markdown.js +0 -11
  353. package/packages/server/dist/tools/present/templates.d.ts +0 -14
  354. package/packages/server/dist/tools/present/templates.js +0 -472
  355. package/packages/server/dist/tools/present/tool.d.ts +0 -27
  356. package/packages/server/dist/tools/present/tool.js +0 -39
  357. package/packages/server/dist/tools/present-blocks.d.ts +0 -46
  358. package/packages/server/dist/tools/present-blocks.js +0 -27
  359. package/packages/server/dist/tools/present-charts.d.ts +0 -31
  360. package/packages/server/dist/tools/present-charts.js +0 -34
  361. package/packages/server/dist/tools/present-theme.d.ts +0 -14
  362. package/packages/server/dist/tools/present-theme.js +0 -396
  363. package/packages/server/dist/tools/present-utils.d.ts +0 -11
  364. package/packages/server/dist/tools/present-utils.js +0 -1
  365. package/packages/server/dist/tools/present.tool.d.ts +0 -2
  366. package/packages/server/dist/tools/present.tool.js +0 -1
  367. package/packages/server/dist/tools/produce.tool.d.ts +0 -7
  368. package/packages/server/dist/tools/produce.tool.js +0 -4
  369. package/packages/server/dist/tools/read.tool.d.ts +0 -7
  370. package/packages/server/dist/tools/read.tool.js +0 -2
  371. package/packages/server/dist/tools/reindex.tool.d.ts +0 -11
  372. package/packages/server/dist/tools/reindex.tool.js +0 -9
  373. package/packages/server/dist/tools/remember.tool.d.ts +0 -9
  374. package/packages/server/dist/tools/remember.tool.js +0 -4
  375. package/packages/server/dist/tools/replay.tool.d.ts +0 -6
  376. package/packages/server/dist/tools/replay.tool.js +0 -3
  377. package/packages/server/dist/tools/restore.tool.d.ts +0 -6
  378. package/packages/server/dist/tools/restore.tool.js +0 -3
  379. package/packages/server/dist/tools/search.tool.d.ts +0 -11
  380. package/packages/server/dist/tools/search.tool.js +0 -10
  381. package/packages/server/dist/tools/status.tool.d.ts +0 -28
  382. package/packages/server/dist/tools/status.tool.js +0 -3
  383. package/packages/server/dist/tools/update.tool.d.ts +0 -8
  384. package/packages/server/dist/tools/update.tool.js +0 -1
  385. package/packages/server/dist/tools/utility.tools.d.ts +0 -15
  386. package/packages/server/dist/tools/utility.tools.js +0 -13
  387. package/packages/server/dist/version-check.d.ts +0 -32
  388. package/packages/store/dist/graph-store.interface.d.ts +0 -159
  389. package/packages/store/dist/graph-store.interface.js +0 -1
  390. package/packages/store/dist/lance-store.d.ts +0 -46
  391. package/packages/store/dist/lance-store.js +0 -1
  392. package/packages/store/dist/sqlite-graph-store.d.ts +0 -57
  393. package/packages/store/dist/sqlite-graph-store.js +0 -90
  394. package/packages/store/dist/store-factory.d.ts +0 -12
  395. package/packages/store/dist/store-factory.js +0 -1
  396. package/packages/store/dist/store.interface.d.ts +0 -54
  397. package/packages/store/dist/store.interface.js +0 -1
  398. package/packages/tools/dist/audit.d.ts +0 -65
  399. package/packages/tools/dist/audit.js +0 -6
  400. package/packages/tools/dist/batch.d.ts +0 -23
  401. package/packages/tools/dist/batch.js +0 -1
  402. package/packages/tools/dist/changelog.d.ts +0 -36
  403. package/packages/tools/dist/changelog.js +0 -2
  404. package/packages/tools/dist/check.d.ts +0 -48
  405. package/packages/tools/dist/check.js +0 -2
  406. package/packages/tools/dist/checkpoint.d.ts +0 -19
  407. package/packages/tools/dist/checkpoint.js +0 -1
  408. package/packages/tools/dist/codemod.d.ts +0 -39
  409. package/packages/tools/dist/codemod.js +0 -2
  410. package/packages/tools/dist/compact.d.ts +0 -47
  411. package/packages/tools/dist/compact.js +0 -3
  412. package/packages/tools/dist/compress-output.d.ts +0 -38
  413. package/packages/tools/dist/compress-output.js +0 -1
  414. package/packages/tools/dist/compression/delta-cache.d.ts +0 -29
  415. package/packages/tools/dist/compression/delta-cache.js +0 -1
  416. package/packages/tools/dist/compression/engine.d.ts +0 -34
  417. package/packages/tools/dist/compression/engine.js +0 -4
  418. package/packages/tools/dist/compression/litm.d.ts +0 -20
  419. package/packages/tools/dist/compression/litm.js +0 -1
  420. package/packages/tools/dist/compression/mmr.d.ts +0 -24
  421. package/packages/tools/dist/compression/mmr.js +0 -1
  422. package/packages/tools/dist/compression/rules/docker.d.ts +0 -11
  423. package/packages/tools/dist/compression/rules/docker.js +0 -3
  424. package/packages/tools/dist/compression/rules/generic.d.ts +0 -11
  425. package/packages/tools/dist/compression/rules/generic.js +0 -3
  426. package/packages/tools/dist/compression/rules/git.d.ts +0 -11
  427. package/packages/tools/dist/compression/rules/git.js +0 -3
  428. package/packages/tools/dist/compression/rules/index.d.ts +0 -14
  429. package/packages/tools/dist/compression/rules/index.js +0 -1
  430. package/packages/tools/dist/compression/rules/kubectl.d.ts +0 -11
  431. package/packages/tools/dist/compression/rules/kubectl.js +0 -3
  432. package/packages/tools/dist/compression/rules/lint.d.ts +0 -11
  433. package/packages/tools/dist/compression/rules/lint.js +0 -3
  434. package/packages/tools/dist/compression/rules/npm.d.ts +0 -11
  435. package/packages/tools/dist/compression/rules/npm.js +0 -3
  436. package/packages/tools/dist/compression/rules/test-runner.d.ts +0 -11
  437. package/packages/tools/dist/compression/rules/test-runner.js +0 -3
  438. package/packages/tools/dist/compression/scoring.d.ts +0 -26
  439. package/packages/tools/dist/compression/scoring.js +0 -1
  440. package/packages/tools/dist/compression/types.d.ts +0 -61
  441. package/packages/tools/dist/compression/types.js +0 -1
  442. package/packages/tools/dist/config-extractor.d.ts +0 -9
  443. package/packages/tools/dist/config-extractor.js +0 -7
  444. package/packages/tools/dist/data-transform.d.ts +0 -12
  445. package/packages/tools/dist/data-transform.js +0 -1
  446. package/packages/tools/dist/dead-symbols.d.ts +0 -28
  447. package/packages/tools/dist/dead-symbols.js +0 -2
  448. package/packages/tools/dist/delegate.d.ts +0 -36
  449. package/packages/tools/dist/delegate.js +0 -1
  450. package/packages/tools/dist/diagram-builder.d.ts +0 -9
  451. package/packages/tools/dist/diagram-builder.js +0 -9
  452. package/packages/tools/dist/diff-parse.d.ts +0 -28
  453. package/packages/tools/dist/diff-parse.js +0 -3
  454. package/packages/tools/dist/digest.d.ts +0 -55
  455. package/packages/tools/dist/digest.js +0 -6
  456. package/packages/tools/dist/dogfood-log.d.ts +0 -49
  457. package/packages/tools/dist/dogfood-log.js +0 -2
  458. package/packages/tools/dist/encode.d.ts +0 -16
  459. package/packages/tools/dist/encode.js +0 -1
  460. package/packages/tools/dist/env-info.d.ts +0 -30
  461. package/packages/tools/dist/env-info.js +0 -1
  462. package/packages/tools/dist/eval.d.ts +0 -15
  463. package/packages/tools/dist/eval.js +0 -2
  464. package/packages/tools/dist/evidence-map.d.ts +0 -92
  465. package/packages/tools/dist/evidence-map.js +0 -2
  466. package/packages/tools/dist/file-cache.d.ts +0 -41
  467. package/packages/tools/dist/file-cache.js +0 -3
  468. package/packages/tools/dist/file-summary.d.ts +0 -52
  469. package/packages/tools/dist/file-summary.js +0 -2
  470. package/packages/tools/dist/file-walk.d.ts +0 -6
  471. package/packages/tools/dist/file-walk.js +0 -1
  472. package/packages/tools/dist/find-examples.d.ts +0 -29
  473. package/packages/tools/dist/find-examples.js +0 -3
  474. package/packages/tools/dist/find.d.ts +0 -49
  475. package/packages/tools/dist/find.js +0 -1
  476. package/packages/tools/dist/forge-classify.d.ts +0 -44
  477. package/packages/tools/dist/forge-classify.js +0 -2
  478. package/packages/tools/dist/forge-ground.d.ts +0 -61
  479. package/packages/tools/dist/forge-ground.js +0 -1
  480. package/packages/tools/dist/git-context.d.ts +0 -25
  481. package/packages/tools/dist/git-context.js +0 -3
  482. package/packages/tools/dist/graph-query.d.ts +0 -98
  483. package/packages/tools/dist/graph-query.js +0 -1
  484. package/packages/tools/dist/guide.d.ts +0 -25
  485. package/packages/tools/dist/guide.js +0 -1
  486. package/packages/tools/dist/health.d.ts +0 -16
  487. package/packages/tools/dist/health.js +0 -2
  488. package/packages/tools/dist/http-request.d.ts +0 -25
  489. package/packages/tools/dist/http-request.js +0 -1
  490. package/packages/tools/dist/lane.d.ts +0 -41
  491. package/packages/tools/dist/lane.js +0 -6
  492. package/packages/tools/dist/measure.d.ts +0 -42
  493. package/packages/tools/dist/measure.js +0 -2
  494. package/packages/tools/dist/onboard-utils.d.ts +0 -12
  495. package/packages/tools/dist/onboard-utils.js +0 -1
  496. package/packages/tools/dist/onboard.d.ts +0 -50
  497. package/packages/tools/dist/onboard.js +0 -18
  498. package/packages/tools/dist/parse-output.d.ts +0 -84
  499. package/packages/tools/dist/parse-output.js +0 -2
  500. package/packages/tools/dist/path-resolver.d.ts +0 -14
  501. package/packages/tools/dist/path-resolver.js +0 -1
  502. package/packages/tools/dist/process-manager.d.ts +0 -20
  503. package/packages/tools/dist/process-manager.js +0 -1
  504. package/packages/tools/dist/queue.d.ts +0 -40
  505. package/packages/tools/dist/queue.js +0 -1
  506. package/packages/tools/dist/regex-test.d.ts +0 -33
  507. package/packages/tools/dist/regex-test.js +0 -1
  508. package/packages/tools/dist/regex-utils.d.ts +0 -8
  509. package/packages/tools/dist/regex-utils.js +0 -1
  510. package/packages/tools/dist/rename.d.ts +0 -31
  511. package/packages/tools/dist/rename.js +0 -2
  512. package/packages/tools/dist/replay.d.ts +0 -59
  513. package/packages/tools/dist/replay.js +0 -4
  514. package/packages/tools/dist/response-envelope.d.ts +0 -43
  515. package/packages/tools/dist/response-envelope.js +0 -1
  516. package/packages/tools/dist/restore-points.d.ts +0 -22
  517. package/packages/tools/dist/restore-points.js +0 -1
  518. package/packages/tools/dist/schema-validate.d.ts +0 -25
  519. package/packages/tools/dist/schema-validate.js +0 -1
  520. package/packages/tools/dist/scope-map.d.ts +0 -51
  521. package/packages/tools/dist/scope-map.js +0 -1
  522. package/packages/tools/dist/snippet.d.ts +0 -35
  523. package/packages/tools/dist/snippet.js +0 -1
  524. package/packages/tools/dist/stash.d.ts +0 -14
  525. package/packages/tools/dist/stash.js +0 -1
  526. package/packages/tools/dist/stratum-card.d.ts +0 -30
  527. package/packages/tools/dist/stratum-card.js +0 -4
  528. package/packages/tools/dist/symbol.d.ts +0 -45
  529. package/packages/tools/dist/symbol.js +0 -3
  530. package/packages/tools/dist/synthesis-engine.d.ts +0 -13
  531. package/packages/tools/dist/synthesis-engine.js +0 -6
  532. package/packages/tools/dist/test-run.d.ts +0 -28
  533. package/packages/tools/dist/test-run.js +0 -2
  534. package/packages/tools/dist/text-utils.d.ts +0 -24
  535. package/packages/tools/dist/text-utils.js +0 -2
  536. package/packages/tools/dist/time-utils.d.ts +0 -20
  537. package/packages/tools/dist/time-utils.js +0 -1
  538. package/packages/tools/dist/trace.d.ts +0 -43
  539. package/packages/tools/dist/trace.js +0 -2
  540. package/packages/tools/dist/truncation.d.ts +0 -66
  541. package/packages/tools/dist/truncation.js +0 -11
  542. package/packages/tools/dist/watch.d.ts +0 -32
  543. package/packages/tools/dist/watch.js +0 -1
  544. package/packages/tools/dist/web-fetch.d.ts +0 -47
  545. package/packages/tools/dist/web-fetch.js +0 -8
  546. package/packages/tools/dist/web-search.d.ts +0 -25
  547. package/packages/tools/dist/web-search.js +0 -1
  548. package/packages/tools/dist/workset.d.ts +0 -47
  549. package/packages/tools/dist/workset.js +0 -1
  550. package/scaffold/__tests__/copilot-inline-shared-protocols.test.mjs +0 -39
  551. /package/packages/server/dist/{config.js → config-C5IU9Lau.js} +0 -0
  552. /package/packages/server/dist/{dashboard-static.js → dashboard-static-BfIe0Si1.js} +0 -0
  553. /package/packages/server/dist/{version-check.js → version-check-D4j0Pykd.js} +0 -0
@@ -1,13 +1,346 @@
1
- import { ContentTransformFn, FlowFormat, FlowFormatAdapter, FlowManifest, FlowParseOptions, FlowRegistry, FlowRegistryEntry, FlowResult, FlowSourceType, FlowState, FlowStatus, FlowStep, StepAction } from "./types.js";
2
- import { ClaudePluginAdapter } from "./adapters/claude-plugin.js";
3
- import { CopilotAdapter } from "./adapters/copilot.js";
4
- import { NativeAdapter } from "./adapters/native.js";
5
- import { OpenSpecAdapter } from "./adapters/openspec.js";
6
- import { BuiltinFlow, getBuiltinFlows } from "./builtins.js";
7
- import { FoundationIntegration } from "./foundation.js";
8
- import { GitInstaller } from "./git.js";
9
- import { FlowLoader } from "./loader.js";
10
- import { FlowRegistryManager } from "./registry.js";
11
- import { FlowStateMachine } from "./state-machine.js";
12
- import { SymlinkManager } from "./symlinks.js";
1
+ //#region packages/flows/src/types.d.ts
2
+ /**
3
+ * @aikit/flows Type definitions for the pluggable flow system.
4
+ */
5
+ /** A single step in a flow */
6
+ interface FlowStep {
7
+ /** Unique step identifier within the flow (e.g., "spec", "plan", "execute") */
8
+ id: string;
9
+ /** Human-readable step name */
10
+ name: string;
11
+ /** Relative path to the step's instruction file */
12
+ instruction: string;
13
+ /** Artifact filenames this step produces */
14
+ produces: string[];
15
+ /** Step IDs this step depends on (must be completed first) */
16
+ requires: string[];
17
+ /** Agent files specific to this step (relative paths) */
18
+ agents: string[];
19
+ /** Step description */
20
+ description: string;
21
+ }
22
+ /** Flow manifest — the flow.json schema */
23
+ interface FlowManifest {
24
+ /** Flow name (unique identifier) */
25
+ name: string;
26
+ /** Semantic version */
27
+ version: string;
28
+ /** Human-readable description */
29
+ description: string;
30
+ /** Author name or organization */
31
+ author?: string;
32
+ /** Ordered list of steps */
33
+ steps: FlowStep[];
34
+ /** Flow-level agent files (relative paths) */
35
+ agents: string[];
36
+ /** Directory for artifacts (default: ".spec") */
37
+ artifacts_dir: string;
38
+ /** External dependencies to install at flow-add time */
39
+ install: string[];
40
+ }
41
+ /** Source type for flow installation */
42
+ type FlowSourceType = 'builtin' | 'git' | 'local' | 'npm-global' | 'claude-plugin';
43
+ /** Detected format of the flow source */
44
+ type FlowFormat = 'native' | 'claude-plugin' | 'copilot' | 'openspec';
45
+ type ContentTransformFn = (request: {
46
+ content: string;
47
+ sourceFormat: FlowFormat;
48
+ stepName: string;
49
+ metadata?: Record<string, unknown>;
50
+ }) => Promise<string>;
51
+ /** Registry entry for an installed flow */
52
+ interface FlowRegistryEntry {
53
+ /** Flow name */
54
+ name: string;
55
+ /** Flow version */
56
+ version: string;
57
+ /** Original source (URL, path, or "builtin") */
58
+ source: string;
59
+ /** How the flow was installed */
60
+ sourceType: FlowSourceType;
61
+ /** Absolute path where flow files are stored */
62
+ installPath: string;
63
+ /** Detected source format */
64
+ format: FlowFormat;
65
+ /** ISO timestamp when registered */
66
+ registeredAt: string;
67
+ /** ISO timestamp of last update */
68
+ updatedAt: string;
69
+ /** Parsed manifest (cached) */
70
+ manifest: FlowManifest;
71
+ /** Git commit SHA of the installed version (git sources only) */
72
+ commitSha?: string;
73
+ }
74
+ /** The flow registry file structure */
75
+ interface FlowRegistry {
76
+ /** Schema version */
77
+ version: 1;
78
+ /** Map of flow name → registry entry */
79
+ flows: Record<string, FlowRegistryEntry>;
80
+ }
81
+ /** Flow execution state */
82
+ type FlowStatus = 'idle' | 'active' | 'completed';
83
+ /** Active flow state (persisted to state.json) */
84
+ interface FlowState {
85
+ /** Which flow is active (name from registry) */
86
+ flow: string;
87
+ /** Current status */
88
+ status: FlowStatus;
89
+ /** Current step ID (null if not started) */
90
+ currentStep: string | null;
91
+ /** Completed step IDs in order */
92
+ completedSteps: string[];
93
+ /** Skipped step IDs */
94
+ skippedSteps: string[];
95
+ /** Map of artifact name → file path */
96
+ artifacts: Record<string, string>;
97
+ /** ISO timestamp when flow was started */
98
+ startedAt: string;
99
+ /** ISO timestamp of last state change */
100
+ updatedAt: string;
101
+ }
102
+ /** Step action for state machine transitions */
103
+ type StepAction = 'next' | 'skip' | 'redo';
104
+ /** Options passed to format adapter parse */
105
+ interface FlowParseOptions {
106
+ /** When true, force-refresh supporting assets (e.g. on update) */
107
+ forceAssetSync?: boolean;
108
+ /** Optional content transformer for converting foreign step content to native README.md */
109
+ transform?: ContentTransformFn;
110
+ }
111
+ /** Format adapter interface — converts external formats to FlowManifest */
112
+ interface FlowFormatAdapter {
113
+ /** Format name */
114
+ readonly format: FlowFormat;
115
+ /** Check if a directory matches this format */
116
+ detect(sourceDir: string): boolean;
117
+ /** Parse the source directory into a FlowManifest */
118
+ parse(sourceDir: string, options?: FlowParseOptions): Promise<FlowManifest>;
119
+ }
120
+ /** Result of a flow operation */
121
+ interface FlowResult<T = void> {
122
+ success: boolean;
123
+ data?: T;
124
+ error?: string;
125
+ }
126
+ //#endregion
127
+ //#region packages/flows/src/adapters/claude-plugin.d.ts
128
+ declare class ClaudePluginAdapter implements FlowFormatAdapter {
129
+ readonly format: "claude-plugin";
130
+ detect(sourceDir: string): boolean;
131
+ parse(sourceDir: string, options?: FlowParseOptions): Promise<FlowManifest>;
132
+ private readPluginJson;
133
+ private readString;
134
+ private discoverSteps;
135
+ private readStep;
136
+ /**
137
+ * Copy supporting subdirectories (references/, assets/, scripts/) from
138
+ * skills/<step>/ to steps/<step>/ so that relative paths inside the
139
+ * step README.md resolve correctly at runtime.
140
+ *
141
+ * When `force` is true, existing copies are replaced (used during updates).
142
+ */
143
+ private syncStepAssets;
144
+ private materializeNativeSteps;
145
+ private buildStepReadme;
146
+ private discoverAgents;
147
+ }
148
+ //#endregion
149
+ //#region packages/flows/src/adapters/copilot.d.ts
150
+ declare class CopilotAdapter implements FlowFormatAdapter {
151
+ readonly format: "copilot";
152
+ detect(sourceDir: string): boolean;
153
+ parse(sourceDir: string, options?: FlowParseOptions): Promise<FlowManifest>;
154
+ private getStepId;
155
+ private materializeSteps;
156
+ }
157
+ //#endregion
158
+ //#region packages/flows/src/adapters/native.d.ts
159
+ declare class NativeAdapter implements FlowFormatAdapter {
160
+ readonly format: "native";
161
+ detect(sourceDir: string): boolean;
162
+ parse(sourceDir: string): Promise<FlowManifest>;
163
+ }
164
+ //#endregion
165
+ //#region packages/flows/src/adapters/openspec.d.ts
166
+ /**
167
+ * OpenSpec adapter — detects repos that follow the OpenSpec workflow
168
+ * (https://github.com/Fission-AI/OpenSpec) and converts them to FlowManifest.
169
+ *
170
+ * Detection marker: `openspec/config.yaml` in the source directory.
171
+ *
172
+ * Flow steps are derived from the active OpenSpec schema.yaml.
173
+ */
174
+ declare class OpenSpecAdapter implements FlowFormatAdapter {
175
+ readonly format: "openspec";
176
+ detect(sourceDir: string): boolean;
177
+ parse(sourceDir: string, options?: FlowParseOptions): Promise<FlowManifest>;
178
+ /**
179
+ * Read metadata from package.json if available, otherwise use defaults
180
+ * derived from the openspec config.
181
+ */
182
+ private readMeta;
183
+ private readConfigSchema;
184
+ private resolveSchemaDir;
185
+ private parseSchemaArtifacts;
186
+ private loadSchema;
187
+ private discoverSchemaFromDirectory;
188
+ private collectMarkdownFiles;
189
+ private hasFileRecursive;
190
+ private findSchemaYaml;
191
+ private toStepIdFromMarkdown;
192
+ private buildStepsFromSchema;
193
+ private materializeSteps;
194
+ private resolveInstructionContent;
195
+ private normalizeArtifact;
196
+ private normalizeApply;
197
+ private readString;
198
+ private readStringArray;
199
+ private humanizeStepName;
200
+ }
201
+ //#endregion
202
+ //#region packages/flows/src/builtins.d.ts
203
+ interface BuiltinFlow {
204
+ /** Flow manifest */
205
+ manifest: FlowManifest;
206
+ /** Relative path within the monorepo where scaffold files live */
207
+ scaffoldDir: string;
208
+ }
209
+ /**
210
+ * Returns all built-in flow definitions bundled with @aikit/flows.
211
+ * These flows are always available, even without installation via `flow add`.
212
+ */
213
+ declare function getBuiltinFlows(): BuiltinFlow[];
214
+ //#endregion
215
+ //#region packages/flows/src/foundation.d.ts
216
+ declare class FoundationIntegration {
217
+ /**
218
+ * Inject foundation preamble into a file.
219
+ * Replaces existing preamble if present, otherwise prepends.
220
+ */
221
+ injectPreamble(filePath: string, manifest: FlowManifest): void;
222
+ /**
223
+ * Remove foundation preamble from a file.
224
+ */
225
+ removePreamble(filePath: string): void;
226
+ /**
227
+ * Get list of IDE instruction files to inject preamble into.
228
+ */
229
+ getTargetFiles(workspaceRoot: string): string[];
230
+ }
231
+ //#endregion
232
+ //#region packages/flows/src/git.d.ts
233
+ declare class GitInstaller {
234
+ private readonly flowsDir;
235
+ constructor(flowsDir: string);
236
+ /**
237
+ * Clone a git repo into the flows directory.
238
+ * On auth failure, if GCM is available, retries interactively so the
239
+ * credential manager can open a browser / device-code flow.
240
+ * Returns the local install path.
241
+ */
242
+ clone(repoUrl: string, token?: string): FlowResult<string>;
243
+ /**
244
+ * Update an existing cloned flow repo.
245
+ */
246
+ update(installPath: string): FlowResult;
247
+ /**
248
+ * Copy a local directory as a flow source.
249
+ */
250
+ copyLocal(sourcePath: string, name: string): FlowResult<string>;
251
+ /**
252
+ * Remove installed flow files.
253
+ */
254
+ remove(installPath: string): FlowResult;
255
+ /**
256
+ * Run install dependencies for a flow.
257
+ * Processes the `install[]` field from flow.json.
258
+ */
259
+ runInstallDeps(installEntries: string[]): FlowResult;
260
+ /**
261
+ * Get the current HEAD commit SHA for a local git repo.
262
+ */
263
+ getLocalCommit(installPath: string): string | null;
264
+ /**
265
+ * Get the latest commit SHA on the remote default branch.
266
+ * Uses `git ls-remote` so it doesn't modify the working tree.
267
+ */
268
+ getRemoteCommit(installPath: string): string | null;
269
+ /**
270
+ * Check whether the remote has commits newer than the local HEAD.
271
+ */
272
+ hasUpdates(installPath: string): FlowResult<{
273
+ localCommit: string;
274
+ remoteCommit: string;
275
+ hasUpdates: boolean;
276
+ }>;
277
+ /** Extract repo name from git URL */
278
+ private repoNameFromUrl;
279
+ private ensureFlowsDir;
280
+ }
281
+ //#endregion
282
+ //#region packages/flows/src/loader.d.ts
283
+ declare class FlowLoader {
284
+ load(sourceDir: string, options?: FlowParseOptions): Promise<FlowResult<{
285
+ manifest: FlowManifest;
286
+ format: FlowFormat;
287
+ }>>;
288
+ loadWithFormat(sourceDir: string, format: FlowFormat, options?: FlowParseOptions): Promise<FlowResult<FlowManifest>>;
289
+ validate(manifest: FlowManifest): FlowResult;
290
+ }
291
+ //#endregion
292
+ //#region packages/flows/src/registry.d.ts
293
+ declare class FlowRegistryManager {
294
+ private readonly registryPath;
295
+ constructor(registryPath: string);
296
+ /** Load registry from disk, or create empty if missing */
297
+ load(): FlowRegistry;
298
+ /** Save registry to disk */
299
+ save(registry: FlowRegistry): void;
300
+ /** Register a new flow or update an existing one */
301
+ register(entry: FlowRegistryEntry): FlowResult;
302
+ /** Remove a flow from the registry */
303
+ unregister(name: string): FlowResult;
304
+ /** Get a specific flow entry (checks disk registry first, then builtins) */
305
+ get(name: string): FlowRegistryEntry | null;
306
+ /** List all registered flows (disk + builtins, disk overrides builtins) */
307
+ list(): FlowRegistryEntry[];
308
+ /** Check if a flow is registered (disk or builtin) */
309
+ has(name: string): boolean;
310
+ }
311
+ //#endregion
312
+ //#region packages/flows/src/state-machine.d.ts
313
+ declare class FlowStateMachine {
314
+ private readonly statePath;
315
+ constructor(statePath: string);
316
+ /** Load active flow state from disk, or null if no active flow */
317
+ load(): FlowState | null;
318
+ /** Save state to disk */
319
+ private save;
320
+ /** Start a new flow */
321
+ start(flowName: string, manifest: FlowManifest): FlowResult<FlowState>;
322
+ /** Advance the flow: next, skip, or redo current step */
323
+ step(action: StepAction, manifest: FlowManifest): FlowResult<FlowState>;
324
+ /** Get current flow status */
325
+ getStatus(): FlowResult<FlowState>;
326
+ /** Reset flow state (clear active flow) */
327
+ reset(): FlowResult;
328
+ /** Record an artifact produced by a step */
329
+ recordArtifact(name: string, path: string): FlowResult;
330
+ }
331
+ //#endregion
332
+ //#region packages/flows/src/symlinks.d.ts
333
+ declare class SymlinkManager {
334
+ /**
335
+ * Create agent symlinks for a flow in the workspace.
336
+ */
337
+ createSymlinks(workspaceRoot: string, flowName: string, flowInstallPath: string, manifest: FlowManifest): void;
338
+ /**
339
+ * Remove agent symlinks for a flow.
340
+ */
341
+ removeSymlinks(workspaceRoot: string, flowName: string): void;
342
+ private getTargets;
343
+ private getAgentStem;
344
+ }
345
+ //#endregion
13
346
  export { type BuiltinFlow, ClaudePluginAdapter, type ContentTransformFn, CopilotAdapter, type FlowFormat, type FlowFormatAdapter, FlowLoader, type FlowManifest, type FlowParseOptions, type FlowRegistry, type FlowRegistryEntry, FlowRegistryManager, type FlowResult, type FlowSourceType, type FlowState, FlowStateMachine, type FlowStatus, type FlowStep, FoundationIntegration, GitInstaller, NativeAdapter, OpenSpecAdapter, type StepAction, SymlinkManager, getBuiltinFlows };
@@ -1 +1,15 @@
1
- import{getBuiltinFlows as e}from"./builtins.js";import{FoundationIntegration as t}from"./foundation.js";import{GitInstaller as n}from"./git.js";import{ClaudePluginAdapter as r}from"./adapters/claude-plugin.js";import{CopilotAdapter as i}from"./adapters/copilot.js";import{NativeAdapter as a}from"./adapters/native.js";import{OpenSpecAdapter as o}from"./adapters/openspec.js";import{FlowLoader as s}from"./loader.js";import{FlowRegistryManager as c}from"./registry.js";import{FlowStateMachine as l}from"./state-machine.js";import{SymlinkManager as u}from"./symlinks.js";export{r as ClaudePluginAdapter,i as CopilotAdapter,s as FlowLoader,c as FlowRegistryManager,l as FlowStateMachine,t as FoundationIntegration,n as GitInstaller,a as NativeAdapter,o as OpenSpecAdapter,u as SymlinkManager,e as getBuiltinFlows};
1
+ import{copyFileSync as e,cpSync as t,existsSync as n,mkdirSync as r,readFileSync as i,readdirSync as a,rmSync as o,rmdirSync as s,symlinkSync as c,unlinkSync as l,writeFileSync as u}from"node:fs";import{basename as d,dirname as f,join as p,relative as m}from"node:path";import{execSync as h,spawnSync as g}from"node:child_process";import{parse as _}from"yaml";import{tmpdir as v}from"node:os";const y=[`spec`,`plan`,`task`,`execute`,`verify`];function b(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{data:{},body:e};let n={};for(let e of t[1].split(/\r?\n/)){let t=e.indexOf(`:`);t>0&&(n[e.slice(0,t).trim()]=e.slice(t+1).trim().replace(/^["']|["']$/g,``))}return{data:n,body:t[2]}}function x(e){return e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function S(e){let t=y.indexOf(e);return t===-1?1/0:t}var C=class{format=`claude-plugin`;detect(e){return n(p(e,`.claude-plugin`,`plugin.json`))}async parse(e,t){let n=this.readPluginJson(e),r=this.discoverSteps(e);await this.materializeNativeSteps(e,r,t);let i=this.discoverAgents(e),a=r.map(({step:e})=>e);return{name:this.readString(n.name)??d(e),version:this.readString(n.version)??`1.0.0`,description:this.readString(n.description)??``,author:this.readString(n.author),steps:a,agents:i,artifacts_dir:`.spec`,install:[]}}readPluginJson(e){let t=p(e,`.claude-plugin`,`plugin.json`);return JSON.parse(i(t,`utf-8`))}readString(e){return typeof e==`string`?e:void 0}discoverSteps(e){let t=p(e,`skills`);if(!n(t))return[];let r=a(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).map(t=>this.readStep(e,t)).filter(e=>e!==null).sort((e,t)=>{let n=Number(e.metadata.order),r=Number(t.metadata.order),i=Number.isFinite(n),a=Number.isFinite(r);if(i&&a)return n-r;if(i)return-1;if(a)return 1;let o=S(e.step.id),s=S(t.step.id);return o===s?e.step.id.localeCompare(t.step.id):o-s});return r.map((e,t)=>({...e,step:{...e.step,requires:t>0?[r[t-1].step.id]:[]}}))}readStep(e,t){let r=p(e,`skills`,t,`SKILL.md`);if(!n(r))return null;let a=i(r,`utf-8`),{data:o,body:s}=b(a),c=o.name||x(t),l=o.description||`${c} step`;return{step:{id:t,name:c,instruction:`steps/${t}/README.md`,produces:[`${t}.md`],requires:[],agents:[],description:l},metadata:o,content:a,body:s}}syncStepAssets(e,r,i){let a=[`references`,`assets`,`scripts`];for(let s of r)for(let r of a){let a=p(e,`skills`,s.id,r),c=p(e,`steps`,s.id,r);if(n(a)){if(n(c)){if(!i)continue;o(c,{recursive:!0,force:!0})}t(a,c,{recursive:!0})}}}async materializeNativeSteps(e,t,n){for(let i of t){let t=p(e,`steps`,i.step.id);r(t,{recursive:!0});let a=n?.transform?await n.transform({content:i.content,sourceFormat:`claude-plugin`,stepName:i.step.id,metadata:i.metadata}):this.buildStepReadme(i.step.name,i.step.description,i.body);u(p(t,`README.md`),a,`utf-8`)}this.syncStepAssets(e,t.map(({step:e})=>e),n?.forceAssetSync)}buildStepReadme(e,t,n){return[`# ${e}`,``,t,``,`---`,``,n.trim()].join(`
2
+ `).trimEnd().concat(`
3
+ `)}discoverAgents(e){let t=p(e,`agents`);return n(t)?a(t,{withFileTypes:!0}).filter(e=>e.isFile()&&e.name.endsWith(`.md`)).map(e=>`agents/${e.name}`):[]}},w=class{format=`copilot`;detect(e){return n(p(e,`.github`,`agents`))}async parse(e,t){let n=a(p(e,`.github`,`agents`),{withFileTypes:!0}).filter(e=>e.isFile()&&e.name.endsWith(`.md`)).map(e=>`.github/agents/${e.name}`),r=n.map(e=>this.getStepId(e)),i=n.map((e,t)=>{let n=r[t];return{id:n,name:n.charAt(0).toUpperCase()+n.slice(1),instruction:`steps/${n}/README.md`,produces:[`${n}.md`],requires:t>0?[r[t-1]]:[],agents:[e],description:`${n} agent step`}});return await this.materializeSteps(e,i,t),{name:d(e),version:`1.0.0`,description:`Copilot agents flow from ${d(e)}`,steps:i,agents:n,artifacts_dir:`.spec`,install:[]}}getStepId(e){return d(e,`.md`).toLowerCase().replace(/\.agent$/,``)}async materializeSteps(e,t,n){for(let a of t){let t=a.agents[0];if(!t)continue;let o=i(p(e,t),`utf-8`),s=p(e,`steps`,a.id),c=p(s,`README.md`);r(s,{recursive:!0}),u(c,n?.transform?await n.transform({content:o,sourceFormat:`copilot`,stepName:a.id,metadata:{sourcePath:t,displayName:a.name}}):`# ${a.name}\n\n${o}`,`utf-8`)}}},T=class{format=`native`;detect(e){return n(p(e,`flow.json`))}async parse(e){let t=i(p(e,`flow.json`),`utf-8`);return JSON.parse(t)}},E=class{format=`openspec`;detect(e){return!!(n(p(e,`openspec`,`config.yaml`))||n(p(e,`schemas`))&&this.findSchemaYaml(e))}async parse(e,t){let n=this.readMeta(e),r=this.loadSchema(e),i=this.buildStepsFromSchema(r);return await this.materializeSteps(e,i,r,t),{name:n.name,version:n.version,description:r.description??n.description,author:n.author,steps:i,agents:[],artifacts_dir:`openspec`,install:[]}}readMeta(e){let t=p(e,`package.json`);if(n(t))try{let n=JSON.parse(i(t,`utf-8`));return{name:n.name??d(e),version:n.version??`0.1.0`,description:n.description??`OpenSpec flow`,author:n.author}}catch{}return{name:d(e),version:`0.1.0`,description:`OpenSpec flow`}}readConfigSchema(e){let t=p(e,`openspec`,`config.yaml`);if(!n(t))return`spec-driven`;try{let e=_(i(t,`utf-8`));return typeof e?.schema==`string`&&e.schema.trim().length>0?e.schema:`spec-driven`}catch{return`spec-driven`}}resolveSchemaDir(e){let t=this.readConfigSchema(e),r=p(e,`openspec`,`schemas`,t);if(n(p(r,`schema.yaml`)))return r;let i=p(e,`schemas`,t);if(n(p(i,`schema.yaml`)))return i;try{let e=p(h(`npm root -g`,{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).trim(),`@fission-ai`,`openspec`,`schemas`,t);if(n(p(e,`schema.yaml`)))return e}catch{}return null}parseSchemaArtifacts(e){try{let t=_(e);if(!t||!Array.isArray(t.artifacts))return null;let n=t.artifacts.map(e=>this.normalizeArtifact(e)).filter(e=>e!==null);return n.length===0?null:{name:typeof t.name==`string`&&t.name.trim().length>0?t.name:this.readString(t.schema)??`spec-driven`,version:typeof t.version==`number`?t.version:1,description:this.readString(t.description),artifacts:n,apply:this.normalizeApply(t.apply)}}catch{return null}}loadSchema(e){let t=this.resolveSchemaDir(e);if(t){let e=p(t,`schema.yaml`);try{let t=i(e,`utf-8`),n=this.parseSchemaArtifacts(t);if(n)return n}catch{}}return this.discoverSchemaFromDirectory(e)}discoverSchemaFromDirectory(e){let t=[p(e,`openspec`,`schemas`),p(e,`schemas`)];for(let e of t)if(n(e))try{let t=a(e,{withFileTypes:!0}).filter(e=>e.isDirectory());for(let r of t){let t=p(e,r.name,`schema.yaml`);if(n(t))try{let e=this.parseSchemaArtifacts(i(t,`utf-8`));if(e)return e}catch{}}}catch{}let r=[],o=p(e,`openspec`),s=[],c=this.collectMarkdownFiles(o);for(let e of c){let t=m(o,e).replace(/\\/g,`/`),n=this.toStepIdFromMarkdown(t);!n||s.includes(n)||(r.push({id:n,generates:t,description:`${this.humanizeStepName(n)} phase`,template:d(e),requires:s.length>0?[s[s.length-1]]:[]}),s.push(n))}return{name:this.readConfigSchema(e),version:1,artifacts:r}}collectMarkdownFiles(e){if(!n(e))return[];let t=[];try{let n=a(e,{withFileTypes:!0}).sort((e,t)=>e.name.localeCompare(t.name));for(let r of n){let n=p(e,r.name);if(r.isFile()&&r.name.toLowerCase().endsWith(`.md`)){t.push(n);continue}r.isDirectory()&&t.push(...this.collectMarkdownFiles(n))}}catch{}return t}hasFileRecursive(e,t){if(!n(e))return!1;try{let n=a(e,{withFileTypes:!0});for(let r of n)if(r.isFile()&&r.name===t||r.isDirectory()&&this.hasFileRecursive(p(e,r.name),t))return!0}catch{}return!1}findSchemaYaml(e){let t=p(e,`schemas`);if(!n(t))return!1;try{return a(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).some(e=>n(p(t,e.name,`schema.yaml`)))}catch{return!1}}toStepIdFromMarkdown(e){let t=e.replace(/\\/g,`/`).split(`/`).filter(Boolean);if(t.length===0)return null;let n=(t[t.length-1]??``).replace(/\.md$/i,``);return(n.toLowerCase()===`readme`&&t.length>1?t[t.length-2]:n).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||null}buildStepsFromSchema(e){let t=e.artifacts.map(e=>({id:e.id,name:this.humanizeStepName(e.id),instruction:`steps/${e.id}/README.md`,produces:e.generates?[e.generates]:[],requires:e.requires,agents:[],description:e.description}));return e.apply&&t.push({id:`apply`,name:`Apply`,instruction:`steps/apply/README.md`,produces:[],requires:e.apply.requires,agents:[],description:`Implement the tasks, writing code and tests according to the design`}),t}async materializeSteps(e,t,i,a){let o=this.resolveSchemaDir(e),s=new Map(i.artifacts.map(e=>[e.id,e]));for(let c of t){let t=p(e,`steps`,c.id),l=p(t,`README.md`);r(t,{recursive:!0});let d=this.resolveInstructionContent(o,c.id,s.get(c.id),i.apply);if(!d){n(l)||u(l,`# ${c.name}\n\n${c.description}\n`,`utf-8`);continue}u(l,a?.transform?await a.transform({content:d,sourceFormat:`openspec`,stepName:c.id,metadata:{schemaName:i.name,displayName:c.name,description:c.description,produces:c.produces,requires:c.requires}}):`# ${c.name}\n\n${d}`,`utf-8`)}}resolveInstructionContent(e,t,r,a){if(t===`apply`&&a?.instruction)return a.instruction;if(!r)return null;if(r.instruction)return r.instruction;if(e&&r.template){let t=p(e,`templates`,r.template);if(n(t))try{return i(t,`utf-8`)}catch{}}return r.description||null}normalizeArtifact(e){if(!e||typeof e!=`object`)return null;let t=e,n=this.readString(t.id),r=this.readString(t.generates);return!n||!r?null:{id:n,generates:r,description:this.readString(t.description)??`${this.humanizeStepName(n)} phase`,template:this.readString(t.template)??``,instruction:this.readString(t.instruction),requires:this.readStringArray(t.requires)}}normalizeApply(e){if(!e||typeof e!=`object`)return;let t=e;return{requires:this.readStringArray(t.requires),tracks:this.readString(t.tracks)??null,instruction:this.readString(t.instruction)}}readString(e){return typeof e==`string`&&e.trim().length>0?e:void 0}readStringArray(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.length>0):[]}humanizeStepName(e){return e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}};const D={name:`aikit:basic`,version:`0.1.0`,description:`Quick development flow for bug fixes, small features, and refactoring`,steps:[{id:`design`,name:`Design Gate`,instruction:`steps/design/README.md`,produces:[`design-decisions.md`],requires:[],agents:[`Researcher-Alpha`,`Researcher-Beta`,`Researcher-Gamma`,`Researcher-Delta`],description:`Evaluate task type, run brainstorming for features, FORGE classification. Auto-skips for bug fixes and refactors.`},{id:`assess`,name:`Assessment`,instruction:`steps/assess/README.md`,produces:[`assessment.md`],requires:[`design-decisions.md`],agents:[`Explorer`,`Researcher-Alpha`],description:`Understand scope, analyze codebase, identify approach`},{id:`implement`,name:`Implementation`,instruction:`steps/implement/README.md`,produces:[`progress.md`],requires:[`assessment.md`],agents:[`Implementer`,`Frontend`],description:`Write code following the assessment plan`},{id:`verify`,name:`Verification`,instruction:`steps/verify/README.md`,produces:[`verify-report.md`],requires:[`progress.md`],agents:[`Code-Reviewer-Alpha`,`Security`],description:`Review code, run tests, validate changes`}],agents:[],artifacts_dir:`.spec`,install:[]},O={name:`aikit:advanced`,version:`0.1.0`,description:`Full development flow for new features, API design, and architecture changes`,steps:[{id:`design`,name:`Design Gate`,instruction:`steps/design/README.md`,produces:[`design-decisions.md`],requires:[],agents:[`Researcher-Alpha`,`Researcher-Beta`,`Researcher-Gamma`,`Researcher-Delta`],description:`Full brainstorming, FORGE classification, decision protocol with parallel research. ADR for critical-tier tasks.`},{id:`spec`,name:`Specification`,instruction:`steps/spec/README.md`,produces:[`spec.md`],requires:[`design-decisions.md`],agents:[`Researcher-Alpha`],description:`Elicit requirements, clarify scope, define acceptance criteria`},{id:`plan`,name:`Planning`,instruction:`steps/plan/README.md`,produces:[`plan.md`],requires:[`spec.md`],agents:[`Planner`,`Explorer`],description:`Analyze codebase, design architecture, create implementation plan`},{id:`task`,name:`Task Breakdown`,instruction:`steps/task/README.md`,produces:[`tasks.md`],requires:[`plan.md`],agents:[`Planner`,`Architect-Reviewer-Alpha`],description:`Break plan into ordered implementation tasks with dependencies`},{id:`execute`,name:`Execution`,instruction:`steps/execute/README.md`,produces:[`progress.md`],requires:[`tasks.md`],agents:[`Orchestrator`,`Implementer`,`Frontend`,`Refactor`],description:`Implement all tasks, write code, write tests`},{id:`verify`,name:`Verification`,instruction:`steps/verify/README.md`,produces:[`verify-report.md`],requires:[`progress.md`],agents:[`Code-Reviewer-Alpha`,`Code-Reviewer-Beta`,`Architect-Reviewer-Alpha`,`Architect-Reviewer-Beta`,`Security`],description:`Dual code review, architecture review, security review, test validation`}],agents:[],artifacts_dir:`.spec`,install:[]};function k(){return[{manifest:D,scaffoldDir:`scaffold/flows/aikit-basic`},{manifest:O,scaffoldDir:`scaffold/flows/aikit-advanced`}]}const A=`<!-- aikit foundation context -->`,j=`<!-- end foundation context -->`;function M(e){let t=e.artifacts_dir||`.spec`;return`${A}
4
+ You are operating within the @vpxa/aikit framework.
5
+ - Use aikit MCP tools for all search, analysis, and memory operations
6
+ - Follow agents defined in AGENTS.md for delegation
7
+ - Use built-in skills (brainstorming, requirements-clarity, etc.) as needed
8
+ - Track state via the flow state machine (flow_status, flow_step)
9
+ - Active flow: ${e.name} v${e.version}
10
+ - Artifacts go in: ${t}/${e.name}/
11
+ ${j}`}var N=class{injectPreamble(e,t){let r=M(t);if(!n(e)){u(e,`${r}\n`,`utf-8`);return}let a=i(e,`utf-8`),o=a.indexOf(A),s=a.indexOf(j);if(o!==-1&&s!==-1){u(e,`${a.slice(0,o)}${r}${a.slice(s+31)}`,`utf-8`);return}u(e,`${r}\n\n${a}`,`utf-8`)}removePreamble(e){if(!n(e))return;let t=i(e,`utf-8`),r=t.indexOf(A),a=t.indexOf(j);r===-1||a===-1||u(e,(t.slice(0,r)+t.slice(a+31)).replace(/^\n+/,``).replace(/\n{3,}/g,`
12
+
13
+ `),`utf-8`)}getTargetFiles(e){let t=[],r=p(e,`.github`,`copilot-instructions.md`);n(r)&&t.push(r);let i=p(e,`CLAUDE.md`);n(i)&&t.push(i);let a=p(e,`AGENTS.md`);return n(a)&&t.push(a),t}};function P(e){if(!e||typeof e!=`object`||!(`stderr`in e))return``;let t=e.stderr;return Buffer.isBuffer(t)?t.toString().trim():typeof t==`string`?t.trim():``}function F(e){try{return new URL(e).hostname}catch{}return e.match(/^[^@]+@([^:]+):/)?.[1]??`<host>`}function I(e,t,n){let r=[`Git operation failed for: ${e}`],i=F(e),a=t.includes(`ETIMEDOUT`)||t.includes(`SIGTERM`)||t.toLowerCase().includes(`timed out`),o=n.includes(`Authentication failed`)||n.includes(`could not read Username`)||n.includes(`terminal prompts disabled`)||n.includes(`401`)||n.includes(`403`)||n.includes(`Permission denied`),s=n.includes(`SSL certificate`)||n.includes(`unable to access`)&&n.includes(`SSL`),c=n.includes(`Could not resolve host`)||n.includes(`Name or service not known`),l=n.includes(`SAML`)||n.includes(`single sign-on`);return o||l?(r.push(``),r.push(`Cause: Authentication required or credentials not configured.`),r.push(``),r.push(`To fix this, ensure git can access this repository:`),r.push(``),r.push(` Option 1 - SSH key:`),r.push(` 1. Generate an SSH key: ssh-keygen -t ed25519`),r.push(` 2. Add the public key to your Git hosting account`),r.push(` 3. Use the SSH URL instead: git@<host>:<org>/<repo>.git`),r.push(``),r.push(` Option 2 - Personal Access Token (PAT):`),r.push(` 1. Create a PAT in your Git hosting Settings > Developer settings > Tokens`),r.push(` 2. For GitHub Enterprise with SAML SSO, authorize the token for your org`),r.push(` 3. Configure git credentials:`),r.push(` git config --global credential.helper store`),r.push(` git clone ${e} (enter PAT as password)`),r.push(``),r.push(` Option 3 - Git Credential Manager:`),r.push(` 1. Install: https://github.com/git-ecosystem/git-credential-manager`),r.push(` 2. Run: git clone ${e}`),r.push(` 3. Follow the browser-based auth prompt`),r.push(``),r.push(`After configuring credentials, retry: aikit flow add ${e}`)):a?(r.push(``),r.push(`Cause: Connection timed out - the server did not respond within 60 seconds.`),r.push(``),r.push(`Possible reasons:`),r.push(` - The repository requires VPN access. Ensure your VPN is connected`),r.push(` - The host is behind a firewall or corporate proxy`),r.push(` - The URL may be incorrect`),r.push(``),r.push(`Diagnostics:`),r.push(` 1. Verify the URL is correct: ${e}`),r.push(` 2. Test connectivity: git ls-remote ${e}`),r.push(` 3. If behind a proxy, configure git:`),r.push(` git config --global http.proxy http://proxy:port`),r.push(``),r.push(`If this is a corporate/internal host, you may need to:`),r.push(` - Connect to the corporate VPN`),r.push(` - Add the host to your SSH config or git config`),r.push(` - Ask your IT team to allowlist your machine`),r.push(``),r.push(`After resolving, retry: aikit flow add ${e}`)):s?(r.push(``),r.push(`Cause: SSL/TLS certificate verification failed.`),r.push(``),r.push(`This often happens with corporate proxies or self-signed certificates.`),r.push(``),r.push(`To fix:`),r.push(` 1. If your company uses a custom CA, add it:`),r.push(` git config --global http.sslCAInfo /path/to/ca-bundle.crt`),r.push(` 2. As a last resort (not recommended for production):`),r.push(` git config --global http.sslVerify false`),r.push(``),r.push(`After resolving, retry: aikit flow add ${e}`)):c?(r.push(``),r.push(`Cause: Cannot resolve hostname.`),r.push(``),r.push(`Check:`),r.push(` 1. Is the URL correct? ${e}`),r.push(` 2. Are you connected to the internet/VPN?`),r.push(` 3. Can you resolve the host? ping ${i}`),r.push(``),r.push(`After resolving, retry: aikit flow add ${e}`)):(r.push(``),r.push(`Error: ${t}`),n&&r.push(`Details: ${n}`),r.push(``),r.push(`Troubleshooting:`),r.push(` 1. Verify the URL is a valid git repository: git ls-remote ${e}`),r.push(` 2. Check your git credentials and network connectivity`),r.push(` 3. If the repo requires auth, configure credentials first (PAT or SSH key)`),r.push(``),r.push(`After resolving, retry: aikit flow add ${e}`)),r.join(`
14
+ `)}function L(){try{return g(`git`,[`credential-manager`,`--version`],{stdio:`pipe`,timeout:5e3}).status===0}catch{return!1}}function R(e,t){let n=`${e}\n${t}`.toLowerCase();return n.includes(`authentication failed`)||n.includes(`could not read username`)||n.includes(`saml sso`)||n.includes(`terminal prompts disabled`)||n.includes(`host key verification failed`)||n.includes(`permission denied`)||n.includes(`403`)||n.includes(`401`)}var z=class{constructor(e){this.flowsDir=e}clone(e,t){let r=this.repoNameFromUrl(e),i=p(this.flowsDir,r);if(n(i))if(!n(p(i,`.git`)))o(i,{recursive:!0,force:!0});else return{success:!1,error:`Flow "${r}" already installed at ${i}. Use update instead.`};try{if(this.ensureFlowsDir(),t){let n=process.platform===`win32`?`bat`:`sh`,r=p(v(),`git-askpass-${Date.now()}.${n}`);process.platform===`win32`?u(r,`@echo ${t}`,{mode:448}):u(r,`#!/bin/sh\necho "${t}"`,{mode:448});try{let t=g(`git`,[`clone`,`--depth`,`1`,e,i],{stdio:`pipe`,timeout:6e4,env:{...process.env,GIT_TERMINAL_PROMPT:`0`,GIT_ASKPASS:r}});if(t.status!==0){let e=t.stderr?.toString().trim()??``;throw Error(e||t.error?.message||`git clone failed`)}}finally{try{l(r)}catch{}}}else{let t=g(`git`,[`clone`,`--depth`,`1`,e,i],{stdio:`pipe`,timeout:6e4,env:{...process.env,GIT_TERMINAL_PROMPT:`0`,GIT_ASKPASS:``}});if(t.status!==0){let e=t.stderr?.toString().trim()??``;throw Error(e||t.error?.message||`git clone failed`)}}return{success:!0,data:i}}catch(r){n(i)&&o(i,{recursive:!0,force:!0});let a=P(r),s=r instanceof Error?r.message:String(r);if(!t&&R(s,a)&&L()){let t=F(e)||e;console.log(`\nAuthentication required for ${t}.\nGit Credential Manager detected - opening browser for login...\n(If a browser window does not open, check your terminal for a device code.)\n`);try{if(this.ensureFlowsDir(),g(`git`,[`clone`,`--depth`,`1`,e,i],{stdio:`inherit`,timeout:12e4,env:{...process.env,GIT_TERMINAL_PROMPT:`1`}}).status===0)return{success:!0,data:i};n(i)&&o(i,{recursive:!0,force:!0})}catch{n(i)&&o(i,{recursive:!0,force:!0})}}return{success:!1,error:I(e,s,a)}}}update(e){if(!n(e))return{success:!1,error:`Install path not found: ${e}`};try{return h(`git pull --ff-only`,{cwd:e,stdio:`pipe`,timeout:6e4,env:{...process.env,GIT_TERMINAL_PROMPT:`0`,GIT_ASKPASS:``}}),{success:!0}}catch(t){let n=e;try{n=h(`git remote get-url origin`,{cwd:e,stdio:`pipe`,timeout:1e4}).toString().trim()}catch{}let r=P(t),i=t instanceof Error?t.message:String(t);if(R(i,r)&&L()){let t=F(n)||n;console.log(`\nAuthentication required for ${t}.\nGit Credential Manager detected - opening browser for login...\n`);try{if(g(`git`,[`pull`,`--ff-only`],{cwd:e,stdio:`inherit`,timeout:12e4,env:{...process.env,GIT_TERMINAL_PROMPT:`1`}}).status===0)return{success:!0}}catch{}}return{success:!1,error:I(n,i,r)}}}copyLocal(e,r){let i=p(this.flowsDir,r);if(n(i))return{success:!1,error:`Flow "${r}" already installed at ${i}`};try{return this.ensureFlowsDir(),t(e,i,{recursive:!0}),{success:!0,data:i}}catch(e){return{success:!1,error:`Copy failed: ${e instanceof Error?e.message:String(e)}`}}}remove(e){if(!n(e))return{success:!0};try{return o(e,{recursive:!0,force:!0}),{success:!0}}catch(e){return{success:!1,error:`Remove failed: ${e instanceof Error?e.message:String(e)}`}}}runInstallDeps(e){for(let t of e)try{if(t.startsWith(`npm:`)){h(`npx skills add ${t.slice(4)} -g`,{stdio:`pipe`,timeout:12e4});continue}if(t.endsWith(`.git`)||t.includes(`github.com`)){h(`npx skills add ${t} -g`,{stdio:`pipe`,timeout:12e4});continue}return{success:!1,error:`Unknown install entry format: ${t}`}}catch(e){return{success:!1,error:`Install dependency failed for "${t}": ${e instanceof Error?e.message:String(e)}`}}return{success:!0}}getLocalCommit(e){try{return h(`git rev-parse HEAD`,{cwd:e,stdio:`pipe`,timeout:1e4,env:{...process.env,GIT_TERMINAL_PROMPT:`0`}}).toString().trim()||null}catch{return null}}getRemoteCommit(e){try{return h(`git ls-remote origin HEAD`,{cwd:e,stdio:`pipe`,timeout:3e4,env:{...process.env,GIT_TERMINAL_PROMPT:`0`}}).toString().trim().split(/\s+/)[0]||null}catch{return null}}hasUpdates(e){let t=this.getLocalCommit(e);if(!t)return{success:!1,error:`Could not determine local commit (not a git repo?)`};let n=this.getRemoteCommit(e);return n?{success:!0,data:{localCommit:t,remoteCommit:n,hasUpdates:t!==n}}:{success:!1,error:`Could not reach remote to check for updates`}}repoNameFromUrl(e){return d(e).replace(/\.git$/,``)}ensureFlowsDir(){n(this.flowsDir)||r(this.flowsDir,{recursive:!0})}};const B=[new T,new C,new w,new E];function V(e){let t=B.find(t=>t.format===e);if(!t)throw Error(`No adapter for format: ${e}`);return t}function H(e){for(let t of B)if(t.detect(e))return t;return null}var U=class{async load(e,t){if(!n(e))return{success:!1,error:`Source directory not found: ${e}`};let r=H(e);if(!r)return{success:!1,error:`No format adapter matches source: ${e}`};try{let n=await r.parse(e,t),i=this.validate(n);return i.success?{success:!0,data:{manifest:n,format:r.format}}:i}catch(e){return{success:!1,error:`Failed to parse flow: ${e instanceof Error?e.message:String(e)}`}}}async loadWithFormat(e,t,n){let r=V(t);try{let t=await r.parse(e,n),i=this.validate(t);return i.success?{success:!0,data:t}:i}catch(e){return{success:!1,error:`Failed to parse flow: ${e instanceof Error?e.message:String(e)}`}}}validate(e){let t=[];e.name?.trim()||t.push(`Missing flow name`),e.version?.trim()||t.push(`Missing flow version`),e.steps?.length||t.push(`Flow must have at least one step`);let n=new Set(e.steps.map(e=>e.id));for(let r of e.steps??[]){r.id?.trim()||t.push(`Step missing id`),r.instruction?.trim()||t.push(`Step "${r.id}" missing instruction path`);for(let e of r.requires??[])n.has(e)||t.push(`Step "${r.id}" requires unknown step "${e}"`)}return n.size!==(e.steps?.length??0)&&t.push(`Duplicate step IDs found`),t.length>0?{success:!1,error:`Validation failed:\n${t.join(`
15
+ `)}`}:{success:!0}}};function W(){return k().map(e=>({name:e.manifest.name,version:e.manifest.version,source:`builtin`,sourceType:`builtin`,installPath:e.scaffoldDir,format:`native`,registeredAt:`1970-01-01T00:00:00.000Z`,updatedAt:`1970-01-01T00:00:00.000Z`,manifest:e.manifest}))}var G=class{constructor(e){this.registryPath=e}load(){if(!n(this.registryPath))return{version:1,flows:{}};try{let e=i(this.registryPath,`utf-8`);return JSON.parse(e)}catch{return{version:1,flows:{}}}}save(e){let t=f(this.registryPath);n(t)||r(t,{recursive:!0}),u(this.registryPath,JSON.stringify(e,null,2),`utf-8`)}register(e){let t=this.load();return t.flows[e.name]=e,this.save(t),{success:!0}}unregister(e){let t=this.load();return t.flows[e]?(delete t.flows[e],this.save(t),{success:!0}):{success:!1,error:`Flow "${e}" not found in registry`}}get(e){return this.load().flows[e]||(W().find(t=>t.name===e)??null)}list(){let e=this.load(),t=new Set(Object.keys(e.flows)),n=Object.values(e.flows);for(let e of W())t.has(e.name)||n.push(e);return n}has(e){return e in this.load().flows?!0:W().some(t=>t.name===e)}},K=class{constructor(e){this.statePath=e}load(){if(!n(this.statePath))return null;try{let e=i(this.statePath,`utf-8`);return JSON.parse(e)}catch{return null}}save(e){let t=f(this.statePath);n(t)||r(t,{recursive:!0}),u(this.statePath,JSON.stringify(e,null,2),`utf-8`)}start(e,t){let n=this.load();if(n&&n.status===`active`)return{success:!1,error:`Flow "${n.flow}" is already active. Reset it first.`};if(!t.steps.length)return{success:!1,error:`Flow has no steps`};let r=new Date().toISOString(),i={flow:e,status:`active`,currentStep:t.steps[0].id,completedSteps:[],skippedSteps:[],artifacts:{},startedAt:r,updatedAt:r};return this.save(i),{success:!0,data:i}}step(e,t){let n=this.load();if(!n)return{success:!1,error:`No active flow`};if(n.status!==`active`)return{success:!1,error:`Flow is ${n.status}, not active`};if(!n.currentStep)return{success:!1,error:`No current step`};let r=t.steps.findIndex(e=>e.id===n.currentStep);if(r===-1)return{success:!1,error:`Current step "${n.currentStep}" not found in manifest`};let i=new Date().toISOString();switch(e){case`next`:{n.completedSteps.includes(n.currentStep)||n.completedSteps.push(n.currentStep);let e=r+1;e>=t.steps.length?(n.currentStep=null,n.status=`completed`):n.currentStep=t.steps[e].id;break}case`skip`:{n.skippedSteps.includes(n.currentStep)||n.skippedSteps.push(n.currentStep);let e=r+1;e>=t.steps.length?(n.currentStep=null,n.status=`completed`):n.currentStep=t.steps[e].id;break}case`redo`:n.completedSteps=n.completedSteps.filter(e=>e!==n.currentStep),n.skippedSteps=n.skippedSteps.filter(e=>e!==n.currentStep);break}return n.updatedAt=i,this.save(n),{success:!0,data:n}}getStatus(){let e=this.load();return e?{success:!0,data:e}:{success:!1,error:`No active flow`}}reset(){return n(this.statePath)&&l(this.statePath),{success:!0}}recordArtifact(e,t){let n=this.load();return n?(n.artifacts[e]=t,n.updatedAt=new Date().toISOString(),this.save(n),{success:!0}):{success:!1,error:`No active flow`}}},q=class{createSymlinks(t,i,a,o){let s=this.getTargets(t,i);for(let t of s){n(t.baseDir)||r(t.baseDir,{recursive:!0});for(let r of o.agents){let i=p(a,r);if(!n(i))continue;let o=this.getAgentStem(r),s=p(t.baseDir,`${o}${t.extension}`);n(s)&&l(s);let u=m(f(s),i);try{c(u,s,`file`)}catch{try{e(i,s)}catch(e){console.warn(`Failed to create symlink or copy fallback for ${i}: ${e instanceof Error?e.message:String(e)}`)}}}}}removeSymlinks(e,t){let r=this.getTargets(e,t);for(let e of r)if(n(e.baseDir))try{let t=a(e.baseDir,{withFileTypes:!0});for(let n of t)!n.isFile()&&!n.isSymbolicLink()||l(p(e.baseDir,n.name));a(e.baseDir).length===0&&s(e.baseDir)}catch{}}getTargets(e,t){return[{ide:`copilot`,baseDir:p(e,`.github`,`agents`,`flows`,t),extension:`.agent.md`},{ide:`claude-code`,baseDir:p(e,`.claude`,`agents`,`flows`,t),extension:`.md`}]}getAgentStem(e){return d(e).replace(/\.agent\.md$/,``).replace(/\.md$/,``)}};export{C as ClaudePluginAdapter,w as CopilotAdapter,U as FlowLoader,G as FlowRegistryManager,K as FlowStateMachine,N as FoundationIntegration,z as GitInstaller,T as NativeAdapter,E as OpenSpecAdapter,q as SymlinkManager,k as getBuiltinFlows};
@@ -1,7 +1,197 @@
1
- import { generateRecordId, hashContent } from "./file-hasher.js";
2
- import { CrawlOptions, CrawlResult, FilesystemCrawler } from "./filesystem-crawler.js";
3
- import { ExtractGraphOptions, ExtractedGraph, extractGraph } from "./graph-extractor.js";
4
- import { FileHashCache } from "./hash-cache.js";
5
- import { IncrementalIndexer, IndexProgress, IndexResult, ProgressCallback } from "./incremental-indexer.js";
6
- import { SmartIndexScheduler } from "./smart-index-scheduler.js";
1
+ import { IndexStats, KBConfig } from "../../core/dist/index.js";
2
+ import { GraphEdge, GraphNode, IGraphStore, IKnowledgeStore } from "../../store/dist/index.js";
3
+ import { IEmbedder } from "../../embeddings/dist/index.js";
4
+
5
+ //#region packages/indexer/src/file-hasher.d.ts
6
+ /**
7
+ * Generate a deterministic hash for a file's content.
8
+ * Used for incremental indexing -- skip files that haven't changed.
9
+ */
10
+ declare function hashContent(content: string): string;
11
+ /**
12
+ * Generate a deterministic ID for a knowledge record.
13
+ * Based on source path + chunk index to ensure idempotent upserts.
14
+ */
15
+ declare function generateRecordId(sourcePath: string, chunkIndex: number): string;
16
+ //#endregion
17
+ //#region packages/indexer/src/filesystem-crawler.d.ts
18
+ interface CrawlResult {
19
+ /** File path relative to workspace root */
20
+ relativePath: string;
21
+ /** Absolute file path */
22
+ absolutePath: string;
23
+ /** File content */
24
+ content: string;
25
+ /** File extension (lowercase, with dot) */
26
+ extension: string;
27
+ }
28
+ interface CrawlOptions {
29
+ /** Glob patterns to exclude */
30
+ excludePatterns: string[];
31
+ /** Root directory to crawl */
32
+ rootDir: string;
33
+ }
34
+ /**
35
+ * Crawl a directory tree and yield files that should be indexed.
36
+ */
37
+ declare class FilesystemCrawler {
38
+ /** Binary file extensions that should always be skipped */
39
+ private static readonly BINARY_EXTENSIONS;
40
+ crawl(options: CrawlOptions): Promise<CrawlResult[]>;
41
+ private walkDir;
42
+ private isExcluded;
43
+ }
44
+ //#endregion
45
+ //#region packages/indexer/src/graph-extractor.d.ts
46
+ interface ExtractGraphOptions {
47
+ /** Maps workspace package names to entry module paths without extensions. */
48
+ workspacePackages?: Map<string, string>;
49
+ }
50
+ interface ExtractedGraph {
51
+ nodes: GraphNode[];
52
+ edges: GraphEdge[];
53
+ }
54
+ /**
55
+ * Extract graph nodes and edges from a single file's content.
56
+ * Produces:
57
+ * - One "module" node per file
58
+ * - Symbol nodes (function, class, interface, type, const, enum)
59
+ * - "defines" edges from module → symbol
60
+ * - "imports" edges from module → imported module
61
+ */
62
+ declare function extractGraph(content: string, sourcePath: string, options?: ExtractGraphOptions): ExtractedGraph;
63
+ //#endregion
64
+ //#region packages/indexer/src/hash-cache.d.ts
65
+ /**
66
+ * Persistent file hash cache.
67
+ * Stores path->hash mappings in a JSON file to avoid LanceDB round-trips
68
+ * when checking which files have changed during incremental indexing.
69
+ */
70
+ declare class FileHashCache {
71
+ private cache;
72
+ private readonly filePath;
73
+ private dirty;
74
+ constructor(storeDir: string);
75
+ /** Load cache from disk. Non-fatal if missing or corrupt. */
76
+ load(): void;
77
+ get(path: string): string | undefined;
78
+ set(path: string, hash: string): void;
79
+ delete(path: string): void;
80
+ /** Persist cache to disk if changed. */
81
+ flush(): void;
82
+ /** Clear all entries and delete file. */
83
+ clear(): void;
84
+ get size(): number;
85
+ }
86
+ //#endregion
87
+ //#region packages/indexer/src/incremental-indexer.d.ts
88
+ interface IndexProgress {
89
+ phase: 'crawling' | 'chunking' | 'embedding' | 'storing' | 'cleanup' | 'done';
90
+ filesTotal: number;
91
+ filesProcessed: number;
92
+ chunksTotal: number;
93
+ chunksProcessed: number;
94
+ /** The file currently being processed */
95
+ currentFile?: string;
96
+ }
97
+ type ProgressCallback = (progress: IndexProgress) => void;
98
+ interface IndexResult {
99
+ filesProcessed: number;
100
+ filesSkipped: number;
101
+ chunksCreated: number;
102
+ filesRemoved: number;
103
+ durationMs: number;
104
+ }
105
+ declare class IncrementalIndexer {
106
+ private readonly embedder;
107
+ private readonly store;
108
+ private readonly crawler;
109
+ private indexing;
110
+ private graphStore?;
111
+ private hashCache?;
112
+ /** Whether an index operation is currently in progress. */
113
+ get isIndexing(): boolean;
114
+ constructor(embedder: IEmbedder, store: IKnowledgeStore);
115
+ /** Set the graph store for auto-population during indexing and cleanup on re-index. */
116
+ setGraphStore(graphStore: IGraphStore): void;
117
+ /** Set the hash cache for faster incremental checks. */
118
+ setHashCache(cache: FileHashCache): void;
119
+ /**
120
+ * Index all configured sources. Only re-indexes files that have changed.
121
+ * Sources are crawled in parallel, and file processing runs concurrently
122
+ * up to `config.indexing.concurrency` (default: 50% of CPU cores, minimum 2, maximum 4).
123
+ */
124
+ index(config: KBConfig, onProgress?: ProgressCallback): Promise<IndexResult>;
125
+ /**
126
+ * Crawl sources and return file paths whose content has changed since the last index.
127
+ * This performs a read-only scan and does not modify the store.
128
+ */
129
+ getChangedFiles(config: KBConfig): Promise<string[]>;
130
+ /**
131
+ * Index only the specified file paths.
132
+ * Files that have not changed are skipped.
133
+ */
134
+ indexFiles(config: KBConfig, paths: string[], onProgress?: ProgressCallback): Promise<IndexResult>;
135
+ private doIndex;
136
+ private doIndexFiles;
137
+ private crawlSources;
138
+ private planIndexWork;
139
+ private getPathsToRemove;
140
+ private buildWorkspacePackageMap;
141
+ private processFiles;
142
+ private cleanupRemovedFiles;
143
+ /**
144
+ * Force re-index all files (ignoring hashes).
145
+ */
146
+ reindexAll(config: KBConfig, onProgress?: ProgressCallback): Promise<IndexResult>;
147
+ private doReindex;
148
+ /**
149
+ * Get current index statistics.
150
+ */
151
+ getStats(): Promise<IndexStats>;
152
+ }
153
+ //#endregion
154
+ //#region packages/indexer/src/smart-index-scheduler.d.ts
155
+ /**
156
+ * SmartIndexScheduler trickles indexing work over time instead of running
157
+ * large idle-triggered indexing passes.
158
+ */
159
+ declare class SmartIndexScheduler {
160
+ private readonly indexer;
161
+ private readonly config;
162
+ private readonly store?;
163
+ private trickleTimer;
164
+ private readonly trickleIntervalMs;
165
+ private readonly batchSize;
166
+ private readonly priorityQueue;
167
+ private changedFiles;
168
+ private lastRefreshTime;
169
+ private refreshing;
170
+ constructor(indexer: IncrementalIndexer, config: KBConfig, store?: {
171
+ createFtsIndex: () => Promise<void>;
172
+ } | undefined);
173
+ /** Start the trickle indexing loop. */
174
+ start(): void;
175
+ /** Stop the scheduler and clear all timers. */
176
+ stop(): void;
177
+ /**
178
+ * Add file paths to the front of the priority queue for near-term indexing.
179
+ */
180
+ prioritize(...paths: string[]): void;
181
+ getState(): {
182
+ mode: 'smart';
183
+ queueSize: number;
184
+ changedFilesSize: number;
185
+ intervalMs: number;
186
+ batchSize: number;
187
+ running: boolean;
188
+ };
189
+ private readPositiveIntEnv;
190
+ private scheduleTick;
191
+ private tick;
192
+ private getCpuCount;
193
+ private pickFiles;
194
+ private maybeRefreshChangedFiles;
195
+ }
196
+ //#endregion
7
197
  export { type CrawlOptions, type CrawlResult, type ExtractGraphOptions, type ExtractedGraph, FileHashCache, FilesystemCrawler, IncrementalIndexer, type IndexProgress, type IndexResult, type ProgressCallback, SmartIndexScheduler, extractGraph, generateRecordId, hashContent };