@vpxa/aikit 0.1.58 → 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 (557) 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 +315 -314
  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/scaffold/general/skills/c4-architecture/SKILL.md +87 -1
  63. package/scaffold/general/skills/c4-architecture/references/html-design-system.md +337 -0
  64. package/scaffold/general/skills/c4-architecture/references/html-template.html +627 -0
  65. package/scaffold/general/skills/present/SKILL.md +180 -0
  66. package/packages/aikit-client/dist/direct-client.d.ts +0 -37
  67. package/packages/aikit-client/dist/direct-client.js +0 -1
  68. package/packages/aikit-client/dist/mcp-client.d.ts +0 -19
  69. package/packages/aikit-client/dist/mcp-client.js +0 -4
  70. package/packages/aikit-client/dist/parsers.d.ts +0 -35
  71. package/packages/aikit-client/dist/parsers.js +0 -2
  72. package/packages/aikit-client/dist/types.d.ts +0 -62
  73. package/packages/aikit-client/dist/types.js +0 -1
  74. package/packages/analyzers/dist/blast-radius-analyzer.d.ts +0 -19
  75. package/packages/analyzers/dist/blast-radius-analyzer.js +0 -6
  76. package/packages/analyzers/dist/dependency-analyzer.d.ts +0 -32
  77. package/packages/analyzers/dist/dependency-analyzer.js +0 -8
  78. package/packages/analyzers/dist/diagram-generator.d.ts +0 -16
  79. package/packages/analyzers/dist/diagram-generator.js +0 -2
  80. package/packages/analyzers/dist/entry-point-analyzer.d.ts +0 -40
  81. package/packages/analyzers/dist/entry-point-analyzer.js +0 -4
  82. package/packages/analyzers/dist/knowledge-producer.d.ts +0 -40
  83. package/packages/analyzers/dist/knowledge-producer.js +0 -26
  84. package/packages/analyzers/dist/pattern-analyzer.d.ts +0 -15
  85. package/packages/analyzers/dist/pattern-analyzer.js +0 -2
  86. package/packages/analyzers/dist/regex-call-graph.d.ts +0 -10
  87. package/packages/analyzers/dist/regex-call-graph.js +0 -1
  88. package/packages/analyzers/dist/structure-analyzer.d.ts +0 -19
  89. package/packages/analyzers/dist/structure-analyzer.js +0 -4
  90. package/packages/analyzers/dist/symbol-analyzer.d.ts +0 -14
  91. package/packages/analyzers/dist/symbol-analyzer.js +0 -9
  92. package/packages/analyzers/dist/ts-call-graph.d.ts +0 -29
  93. package/packages/analyzers/dist/ts-call-graph.js +0 -1
  94. package/packages/analyzers/dist/types.d.ts +0 -110
  95. package/packages/analyzers/dist/types.js +0 -1
  96. package/packages/chunker/dist/call-graph-extractor.d.ts +0 -25
  97. package/packages/chunker/dist/call-graph-extractor.js +0 -1
  98. package/packages/chunker/dist/chunker-factory.d.ts +0 -19
  99. package/packages/chunker/dist/chunker-factory.js +0 -1
  100. package/packages/chunker/dist/chunker.interface.d.ts +0 -13
  101. package/packages/chunker/dist/chunker.interface.js +0 -1
  102. package/packages/chunker/dist/code-chunker.d.ts +0 -17
  103. package/packages/chunker/dist/code-chunker.js +0 -11
  104. package/packages/chunker/dist/extractors/call-extractor.d.ts +0 -24
  105. package/packages/chunker/dist/extractors/call-extractor.js +0 -1
  106. package/packages/chunker/dist/extractors/entry-point-detector.d.ts +0 -14
  107. package/packages/chunker/dist/extractors/entry-point-detector.js +0 -1
  108. package/packages/chunker/dist/extractors/import-extractor.d.ts +0 -14
  109. package/packages/chunker/dist/extractors/import-extractor.js +0 -1
  110. package/packages/chunker/dist/extractors/pattern-detector.d.ts +0 -14
  111. package/packages/chunker/dist/extractors/pattern-detector.js +0 -1
  112. package/packages/chunker/dist/extractors/scope-resolver.d.ts +0 -26
  113. package/packages/chunker/dist/extractors/scope-resolver.js +0 -1
  114. package/packages/chunker/dist/extractors/symbol-extractor.d.ts +0 -14
  115. package/packages/chunker/dist/extractors/symbol-extractor.js +0 -3
  116. package/packages/chunker/dist/extractors/types.d.ts +0 -44
  117. package/packages/chunker/dist/extractors/types.js +0 -1
  118. package/packages/chunker/dist/generic-chunker.d.ts +0 -15
  119. package/packages/chunker/dist/generic-chunker.js +0 -5
  120. package/packages/chunker/dist/markdown-chunker.d.ts +0 -17
  121. package/packages/chunker/dist/markdown-chunker.js +0 -3
  122. package/packages/chunker/dist/wasm/languages.d.ts +0 -18
  123. package/packages/chunker/dist/wasm/languages.js +0 -1
  124. package/packages/chunker/dist/wasm/query-executor.d.ts +0 -70
  125. package/packages/chunker/dist/wasm/query-executor.js +0 -1
  126. package/packages/chunker/dist/wasm/runtime.d.ts +0 -44
  127. package/packages/chunker/dist/wasm/runtime.js +0 -1
  128. package/packages/chunker/dist/wasm/types.d.ts +0 -84
  129. package/packages/chunker/dist/wasm/types.js +0 -1
  130. package/packages/chunker/dist/wasm-chunker.d.ts +0 -23
  131. package/packages/chunker/dist/wasm-chunker.js +0 -6
  132. package/packages/cli/dist/aikit-init.d.ts +0 -59
  133. package/packages/cli/dist/aikit-init.js +0 -1
  134. package/packages/cli/dist/commands/analyze.d.ts +0 -6
  135. package/packages/cli/dist/commands/analyze.js +0 -2
  136. package/packages/cli/dist/commands/context-cmds.d.ts +0 -6
  137. package/packages/cli/dist/commands/context-cmds.js +0 -1
  138. package/packages/cli/dist/commands/environment.d.ts +0 -6
  139. package/packages/cli/dist/commands/environment.js +0 -1
  140. package/packages/cli/dist/commands/execution.d.ts +0 -6
  141. package/packages/cli/dist/commands/execution.js +0 -1
  142. package/packages/cli/dist/commands/flow.d.ts +0 -6
  143. package/packages/cli/dist/commands/flow.js +0 -1
  144. package/packages/cli/dist/commands/graph.d.ts +0 -6
  145. package/packages/cli/dist/commands/graph.js +0 -6
  146. package/packages/cli/dist/commands/init/adapters.d.ts +0 -28
  147. package/packages/cli/dist/commands/init/adapters.js +0 -1
  148. package/packages/cli/dist/commands/init/config.d.ts +0 -10
  149. package/packages/cli/dist/commands/init/config.js +0 -3
  150. package/packages/cli/dist/commands/init/constants.d.ts +0 -46
  151. package/packages/cli/dist/commands/init/curated.d.ts +0 -7
  152. package/packages/cli/dist/commands/init/curated.js +0 -1
  153. package/packages/cli/dist/commands/init/frontmatter.d.ts +0 -79
  154. package/packages/cli/dist/commands/init/frontmatter.js +0 -2
  155. package/packages/cli/dist/commands/init/index.d.ts +0 -36
  156. package/packages/cli/dist/commands/init/index.js +0 -5
  157. package/packages/cli/dist/commands/init/manifest.d.ts +0 -72
  158. package/packages/cli/dist/commands/init/manifest.js +0 -1
  159. package/packages/cli/dist/commands/init/scaffold.d.ts +0 -58
  160. package/packages/cli/dist/commands/init/scaffold.js +0 -1
  161. package/packages/cli/dist/commands/init/templates.d.ts +0 -9
  162. package/packages/cli/dist/commands/init/user.d.ts +0 -61
  163. package/packages/cli/dist/commands/init/user.js +0 -5
  164. package/packages/cli/dist/commands/knowledge.d.ts +0 -6
  165. package/packages/cli/dist/commands/knowledge.js +0 -1
  166. package/packages/cli/dist/commands/search.d.ts +0 -6
  167. package/packages/cli/dist/commands/search.js +0 -1
  168. package/packages/cli/dist/commands/system.d.ts +0 -6
  169. package/packages/cli/dist/commands/system.js +0 -4
  170. package/packages/cli/dist/commands/upgrade.d.ts +0 -6
  171. package/packages/cli/dist/commands/upgrade.js +0 -1
  172. package/packages/cli/dist/commands/workspace.d.ts +0 -6
  173. package/packages/cli/dist/commands/workspace.js +0 -1
  174. package/packages/cli/dist/context.d.ts +0 -7
  175. package/packages/cli/dist/context.js +0 -1
  176. package/packages/cli/dist/helpers.d.ts +0 -55
  177. package/packages/cli/dist/helpers.js +0 -5
  178. package/packages/cli/dist/types.d.ts +0 -9
  179. package/packages/cli/dist/types.js +0 -1
  180. package/packages/core/dist/constants.d.ts +0 -74
  181. package/packages/core/dist/constants.js +0 -1
  182. package/packages/core/dist/content-detector.d.ts +0 -13
  183. package/packages/core/dist/content-detector.js +0 -1
  184. package/packages/core/dist/errors.d.ts +0 -20
  185. package/packages/core/dist/errors.js +0 -1
  186. package/packages/core/dist/global-registry.d.ts +0 -69
  187. package/packages/core/dist/global-registry.js +0 -1
  188. package/packages/core/dist/logger.d.ts +0 -32
  189. package/packages/core/dist/logger.js +0 -1
  190. package/packages/core/dist/types.d.ts +0 -149
  191. package/packages/core/dist/types.js +0 -1
  192. package/packages/dashboard/dist/assets/index-Cdke3KDK.js.map +0 -1
  193. package/packages/elicitation/dist/build.d.ts +0 -14
  194. package/packages/elicitation/dist/build.js +0 -1
  195. package/packages/elicitation/dist/fields.d.ts +0 -32
  196. package/packages/elicitation/dist/fields.js +0 -1
  197. package/packages/elicitation/dist/normalize.d.ts +0 -15
  198. package/packages/elicitation/dist/normalize.js +0 -1
  199. package/packages/elicitation/dist/types.d.ts +0 -88
  200. package/packages/elicitation/dist/types.js +0 -1
  201. package/packages/embeddings/dist/embedder.interface.d.ts +0 -26
  202. package/packages/embeddings/dist/embedder.interface.js +0 -1
  203. package/packages/embeddings/dist/onnx-embedder.d.ts +0 -23
  204. package/packages/embeddings/dist/onnx-embedder.js +0 -1
  205. package/packages/enterprise-bridge/dist/cache.d.ts +0 -28
  206. package/packages/enterprise-bridge/dist/cache.js +0 -1
  207. package/packages/enterprise-bridge/dist/er-client.d.ts +0 -37
  208. package/packages/enterprise-bridge/dist/er-client.js +0 -1
  209. package/packages/enterprise-bridge/dist/evolution-collector.d.ts +0 -62
  210. package/packages/enterprise-bridge/dist/evolution-collector.js +0 -1
  211. package/packages/enterprise-bridge/dist/policy-store.d.ts +0 -45
  212. package/packages/enterprise-bridge/dist/policy-store.js +0 -1
  213. package/packages/enterprise-bridge/dist/push-adapter.d.ts +0 -23
  214. package/packages/enterprise-bridge/dist/push-adapter.js +0 -1
  215. package/packages/enterprise-bridge/dist/result-merger.d.ts +0 -14
  216. package/packages/enterprise-bridge/dist/result-merger.js +0 -1
  217. package/packages/enterprise-bridge/dist/types.d.ts +0 -81
  218. package/packages/enterprise-bridge/dist/types.js +0 -1
  219. package/packages/flows/dist/adapters/claude-plugin.d.ts +0 -25
  220. package/packages/flows/dist/adapters/claude-plugin.js +0 -3
  221. package/packages/flows/dist/adapters/copilot.d.ts +0 -12
  222. package/packages/flows/dist/adapters/copilot.js +0 -1
  223. package/packages/flows/dist/adapters/index.d.ts +0 -12
  224. package/packages/flows/dist/adapters/index.js +0 -1
  225. package/packages/flows/dist/adapters/native.d.ts +0 -10
  226. package/packages/flows/dist/adapters/native.js +0 -1
  227. package/packages/flows/dist/adapters/openspec.d.ts +0 -40
  228. package/packages/flows/dist/adapters/openspec.js +0 -1
  229. package/packages/flows/dist/builtins.d.ts +0 -16
  230. package/packages/flows/dist/builtins.js +0 -1
  231. package/packages/flows/dist/foundation.d.ts +0 -20
  232. package/packages/flows/dist/foundation.js +0 -11
  233. package/packages/flows/dist/git.d.ts +0 -53
  234. package/packages/flows/dist/git.js +0 -2
  235. package/packages/flows/dist/loader.d.ts +0 -13
  236. package/packages/flows/dist/loader.js +0 -2
  237. package/packages/flows/dist/registry.d.ts +0 -23
  238. package/packages/flows/dist/registry.js +0 -1
  239. package/packages/flows/dist/state-machine.d.ts +0 -23
  240. package/packages/flows/dist/state-machine.js +0 -1
  241. package/packages/flows/dist/symlinks.d.ts +0 -17
  242. package/packages/flows/dist/symlinks.js +0 -1
  243. package/packages/flows/dist/types.d.ts +0 -127
  244. package/packages/flows/dist/types.js +0 -1
  245. package/packages/indexer/dist/file-hasher.d.ts +0 -13
  246. package/packages/indexer/dist/file-hasher.js +0 -1
  247. package/packages/indexer/dist/filesystem-crawler.d.ts +0 -29
  248. package/packages/indexer/dist/filesystem-crawler.js +0 -1
  249. package/packages/indexer/dist/graph-extractor.d.ts +0 -22
  250. package/packages/indexer/dist/graph-extractor.js +0 -1
  251. package/packages/indexer/dist/hash-cache.d.ts +0 -24
  252. package/packages/indexer/dist/hash-cache.js +0 -1
  253. package/packages/indexer/dist/incremental-indexer.d.ts +0 -73
  254. package/packages/indexer/dist/incremental-indexer.js +0 -1
  255. package/packages/indexer/dist/smart-index-scheduler.d.ts +0 -47
  256. package/packages/indexer/dist/smart-index-scheduler.js +0 -1
  257. package/packages/server/dist/api.d.ts +0 -3
  258. package/packages/server/dist/api.js +0 -1
  259. package/packages/server/dist/auto-gc.d.ts +0 -30
  260. package/packages/server/dist/auto-gc.js +0 -1
  261. package/packages/server/dist/background-task.d.ts +0 -47
  262. package/packages/server/dist/background-task.js +0 -1
  263. package/packages/server/dist/completions.d.ts +0 -14
  264. package/packages/server/dist/completions.js +0 -1
  265. package/packages/server/dist/compression-interceptor.d.ts +0 -12
  266. package/packages/server/dist/compression-interceptor.js +0 -1
  267. package/packages/server/dist/config.d.ts +0 -16
  268. package/packages/server/dist/cross-workspace.d.ts +0 -43
  269. package/packages/server/dist/cross-workspace.js +0 -1
  270. package/packages/server/dist/curated-manager.d.ts +0 -92
  271. package/packages/server/dist/curated-manager.js +0 -5
  272. package/packages/server/dist/dashboard-static.d.ts +0 -27
  273. package/packages/server/dist/elicitor.d.ts +0 -18
  274. package/packages/server/dist/elicitor.js +0 -1
  275. package/packages/server/dist/idle-timer.d.ts +0 -33
  276. package/packages/server/dist/idle-timer.js +0 -1
  277. package/packages/server/dist/mcp-logging.d.ts +0 -11
  278. package/packages/server/dist/mcp-logging.js +0 -1
  279. package/packages/server/dist/memory-monitor.d.ts +0 -37
  280. package/packages/server/dist/memory-monitor.js +0 -1
  281. package/packages/server/dist/output-schemas.d.ts +0 -244
  282. package/packages/server/dist/output-schemas.js +0 -1
  283. package/packages/server/dist/prompts.d.ts +0 -13
  284. package/packages/server/dist/prompts.js +0 -13
  285. package/packages/server/dist/replay-interceptor.d.ts +0 -23
  286. package/packages/server/dist/replay-interceptor.js +0 -1
  287. package/packages/server/dist/resource-links.d.ts +0 -34
  288. package/packages/server/dist/resource-links.js +0 -1
  289. package/packages/server/dist/resources/curated-resources.d.ts +0 -13
  290. package/packages/server/dist/resources/curated-resources.js +0 -2
  291. package/packages/server/dist/resources/resource-notifier.d.ts +0 -45
  292. package/packages/server/dist/resources/resource-notifier.js +0 -1
  293. package/packages/server/dist/resources/resources.d.ts +0 -8
  294. package/packages/server/dist/resources/resources.js +0 -2
  295. package/packages/server/dist/sampling.d.ts +0 -41
  296. package/packages/server/dist/sampling.js +0 -2
  297. package/packages/server/dist/server.d.ts +0 -63
  298. package/packages/server/dist/server.js +0 -3
  299. package/packages/server/dist/structured-content-guard.d.ts +0 -28
  300. package/packages/server/dist/structured-content-guard.js +0 -1
  301. package/packages/server/dist/task-manager.d.ts +0 -40
  302. package/packages/server/dist/task-manager.js +0 -1
  303. package/packages/server/dist/tool-metadata.d.ts +0 -38
  304. package/packages/server/dist/tool-metadata.js +0 -1
  305. package/packages/server/dist/tool-prefix.d.ts +0 -12
  306. package/packages/server/dist/tool-prefix.js +0 -1
  307. package/packages/server/dist/tool-timeout.d.ts +0 -27
  308. package/packages/server/dist/tool-timeout.js +0 -1
  309. package/packages/server/dist/tools/analyze.tools.d.ts +0 -14
  310. package/packages/server/dist/tools/analyze.tools.js +0 -8
  311. package/packages/server/dist/tools/audit.tool.d.ts +0 -8
  312. package/packages/server/dist/tools/audit.tool.js +0 -1
  313. package/packages/server/dist/tools/brainstorm.tool.d.ts +0 -7
  314. package/packages/server/dist/tools/brainstorm.tool.js +0 -9
  315. package/packages/server/dist/tools/bridge.tools.d.ts +0 -34
  316. package/packages/server/dist/tools/bridge.tools.js +0 -15
  317. package/packages/server/dist/tools/config.tool.d.ts +0 -8
  318. package/packages/server/dist/tools/config.tool.js +0 -12
  319. package/packages/server/dist/tools/context.tools.d.ts +0 -15
  320. package/packages/server/dist/tools/context.tools.js +0 -10
  321. package/packages/server/dist/tools/evolution.tools.d.ts +0 -7
  322. package/packages/server/dist/tools/evolution.tools.js +0 -5
  323. package/packages/server/dist/tools/execution.tools.d.ts +0 -14
  324. package/packages/server/dist/tools/execution.tools.js +0 -4
  325. package/packages/server/dist/tools/flow.tools.d.ts +0 -7
  326. package/packages/server/dist/tools/flow.tools.js +0 -16
  327. package/packages/server/dist/tools/forge.tools.d.ts +0 -13
  328. package/packages/server/dist/tools/forge.tools.js +0 -10
  329. package/packages/server/dist/tools/forget.tool.d.ts +0 -8
  330. package/packages/server/dist/tools/forget.tool.js +0 -1
  331. package/packages/server/dist/tools/graph.tool.d.ts +0 -7
  332. package/packages/server/dist/tools/graph.tool.js +0 -29
  333. package/packages/server/dist/tools/infra.tools.d.ts +0 -10
  334. package/packages/server/dist/tools/infra.tools.js +0 -5
  335. package/packages/server/dist/tools/list.tool.d.ts +0 -7
  336. package/packages/server/dist/tools/list.tool.js +0 -2
  337. package/packages/server/dist/tools/lookup.tool.d.ts +0 -7
  338. package/packages/server/dist/tools/lookup.tool.js +0 -3
  339. package/packages/server/dist/tools/manipulation.tools.d.ts +0 -10
  340. package/packages/server/dist/tools/manipulation.tools.js +0 -4
  341. package/packages/server/dist/tools/onboard.tool.d.ts +0 -12
  342. package/packages/server/dist/tools/onboard.tool.js +0 -2
  343. package/packages/server/dist/tools/persistence.tools.d.ts +0 -10
  344. package/packages/server/dist/tools/persistence.tools.js +0 -5
  345. package/packages/server/dist/tools/policy.tools.d.ts +0 -7
  346. package/packages/server/dist/tools/policy.tools.js +0 -3
  347. package/packages/server/dist/tools/present/browser.d.ts +0 -4
  348. package/packages/server/dist/tools/present/browser.js +0 -93
  349. package/packages/server/dist/tools/present/helpers.d.ts +0 -19
  350. package/packages/server/dist/tools/present/helpers.js +0 -16
  351. package/packages/server/dist/tools/present/html.d.ts +0 -18
  352. package/packages/server/dist/tools/present/html.js +0 -5
  353. package/packages/server/dist/tools/present/index.d.ts +0 -2
  354. package/packages/server/dist/tools/present/index.js +0 -1
  355. package/packages/server/dist/tools/present/markdown.d.ts +0 -32
  356. package/packages/server/dist/tools/present/markdown.js +0 -11
  357. package/packages/server/dist/tools/present/templates.d.ts +0 -14
  358. package/packages/server/dist/tools/present/templates.js +0 -472
  359. package/packages/server/dist/tools/present/tool.d.ts +0 -27
  360. package/packages/server/dist/tools/present/tool.js +0 -39
  361. package/packages/server/dist/tools/present-blocks.d.ts +0 -46
  362. package/packages/server/dist/tools/present-blocks.js +0 -27
  363. package/packages/server/dist/tools/present-charts.d.ts +0 -31
  364. package/packages/server/dist/tools/present-charts.js +0 -34
  365. package/packages/server/dist/tools/present-theme.d.ts +0 -14
  366. package/packages/server/dist/tools/present-theme.js +0 -396
  367. package/packages/server/dist/tools/present-utils.d.ts +0 -11
  368. package/packages/server/dist/tools/present-utils.js +0 -1
  369. package/packages/server/dist/tools/present.tool.d.ts +0 -2
  370. package/packages/server/dist/tools/present.tool.js +0 -1
  371. package/packages/server/dist/tools/produce.tool.d.ts +0 -7
  372. package/packages/server/dist/tools/produce.tool.js +0 -4
  373. package/packages/server/dist/tools/read.tool.d.ts +0 -7
  374. package/packages/server/dist/tools/read.tool.js +0 -2
  375. package/packages/server/dist/tools/reindex.tool.d.ts +0 -11
  376. package/packages/server/dist/tools/reindex.tool.js +0 -9
  377. package/packages/server/dist/tools/remember.tool.d.ts +0 -9
  378. package/packages/server/dist/tools/remember.tool.js +0 -4
  379. package/packages/server/dist/tools/replay.tool.d.ts +0 -6
  380. package/packages/server/dist/tools/replay.tool.js +0 -3
  381. package/packages/server/dist/tools/restore.tool.d.ts +0 -6
  382. package/packages/server/dist/tools/restore.tool.js +0 -3
  383. package/packages/server/dist/tools/search.tool.d.ts +0 -11
  384. package/packages/server/dist/tools/search.tool.js +0 -10
  385. package/packages/server/dist/tools/status.tool.d.ts +0 -28
  386. package/packages/server/dist/tools/status.tool.js +0 -3
  387. package/packages/server/dist/tools/update.tool.d.ts +0 -8
  388. package/packages/server/dist/tools/update.tool.js +0 -1
  389. package/packages/server/dist/tools/utility.tools.d.ts +0 -15
  390. package/packages/server/dist/tools/utility.tools.js +0 -13
  391. package/packages/server/dist/version-check.d.ts +0 -32
  392. package/packages/store/dist/graph-store.interface.d.ts +0 -159
  393. package/packages/store/dist/graph-store.interface.js +0 -1
  394. package/packages/store/dist/lance-store.d.ts +0 -46
  395. package/packages/store/dist/lance-store.js +0 -1
  396. package/packages/store/dist/sqlite-graph-store.d.ts +0 -57
  397. package/packages/store/dist/sqlite-graph-store.js +0 -90
  398. package/packages/store/dist/store-factory.d.ts +0 -12
  399. package/packages/store/dist/store-factory.js +0 -1
  400. package/packages/store/dist/store.interface.d.ts +0 -54
  401. package/packages/store/dist/store.interface.js +0 -1
  402. package/packages/tools/dist/audit.d.ts +0 -65
  403. package/packages/tools/dist/audit.js +0 -6
  404. package/packages/tools/dist/batch.d.ts +0 -23
  405. package/packages/tools/dist/batch.js +0 -1
  406. package/packages/tools/dist/changelog.d.ts +0 -36
  407. package/packages/tools/dist/changelog.js +0 -2
  408. package/packages/tools/dist/check.d.ts +0 -48
  409. package/packages/tools/dist/check.js +0 -2
  410. package/packages/tools/dist/checkpoint.d.ts +0 -19
  411. package/packages/tools/dist/checkpoint.js +0 -1
  412. package/packages/tools/dist/codemod.d.ts +0 -39
  413. package/packages/tools/dist/codemod.js +0 -2
  414. package/packages/tools/dist/compact.d.ts +0 -47
  415. package/packages/tools/dist/compact.js +0 -3
  416. package/packages/tools/dist/compress-output.d.ts +0 -38
  417. package/packages/tools/dist/compress-output.js +0 -1
  418. package/packages/tools/dist/compression/delta-cache.d.ts +0 -29
  419. package/packages/tools/dist/compression/delta-cache.js +0 -1
  420. package/packages/tools/dist/compression/engine.d.ts +0 -34
  421. package/packages/tools/dist/compression/engine.js +0 -4
  422. package/packages/tools/dist/compression/litm.d.ts +0 -20
  423. package/packages/tools/dist/compression/litm.js +0 -1
  424. package/packages/tools/dist/compression/mmr.d.ts +0 -24
  425. package/packages/tools/dist/compression/mmr.js +0 -1
  426. package/packages/tools/dist/compression/rules/docker.d.ts +0 -11
  427. package/packages/tools/dist/compression/rules/docker.js +0 -3
  428. package/packages/tools/dist/compression/rules/generic.d.ts +0 -11
  429. package/packages/tools/dist/compression/rules/generic.js +0 -3
  430. package/packages/tools/dist/compression/rules/git.d.ts +0 -11
  431. package/packages/tools/dist/compression/rules/git.js +0 -3
  432. package/packages/tools/dist/compression/rules/index.d.ts +0 -14
  433. package/packages/tools/dist/compression/rules/index.js +0 -1
  434. package/packages/tools/dist/compression/rules/kubectl.d.ts +0 -11
  435. package/packages/tools/dist/compression/rules/kubectl.js +0 -3
  436. package/packages/tools/dist/compression/rules/lint.d.ts +0 -11
  437. package/packages/tools/dist/compression/rules/lint.js +0 -3
  438. package/packages/tools/dist/compression/rules/npm.d.ts +0 -11
  439. package/packages/tools/dist/compression/rules/npm.js +0 -3
  440. package/packages/tools/dist/compression/rules/test-runner.d.ts +0 -11
  441. package/packages/tools/dist/compression/rules/test-runner.js +0 -3
  442. package/packages/tools/dist/compression/scoring.d.ts +0 -26
  443. package/packages/tools/dist/compression/scoring.js +0 -1
  444. package/packages/tools/dist/compression/types.d.ts +0 -61
  445. package/packages/tools/dist/compression/types.js +0 -1
  446. package/packages/tools/dist/config-extractor.d.ts +0 -9
  447. package/packages/tools/dist/config-extractor.js +0 -7
  448. package/packages/tools/dist/data-transform.d.ts +0 -12
  449. package/packages/tools/dist/data-transform.js +0 -1
  450. package/packages/tools/dist/dead-symbols.d.ts +0 -28
  451. package/packages/tools/dist/dead-symbols.js +0 -2
  452. package/packages/tools/dist/delegate.d.ts +0 -36
  453. package/packages/tools/dist/delegate.js +0 -1
  454. package/packages/tools/dist/diagram-builder.d.ts +0 -9
  455. package/packages/tools/dist/diagram-builder.js +0 -9
  456. package/packages/tools/dist/diff-parse.d.ts +0 -28
  457. package/packages/tools/dist/diff-parse.js +0 -3
  458. package/packages/tools/dist/digest.d.ts +0 -55
  459. package/packages/tools/dist/digest.js +0 -6
  460. package/packages/tools/dist/dogfood-log.d.ts +0 -49
  461. package/packages/tools/dist/dogfood-log.js +0 -2
  462. package/packages/tools/dist/encode.d.ts +0 -16
  463. package/packages/tools/dist/encode.js +0 -1
  464. package/packages/tools/dist/env-info.d.ts +0 -30
  465. package/packages/tools/dist/env-info.js +0 -1
  466. package/packages/tools/dist/eval.d.ts +0 -15
  467. package/packages/tools/dist/eval.js +0 -2
  468. package/packages/tools/dist/evidence-map.d.ts +0 -92
  469. package/packages/tools/dist/evidence-map.js +0 -2
  470. package/packages/tools/dist/file-cache.d.ts +0 -41
  471. package/packages/tools/dist/file-cache.js +0 -3
  472. package/packages/tools/dist/file-summary.d.ts +0 -52
  473. package/packages/tools/dist/file-summary.js +0 -2
  474. package/packages/tools/dist/file-walk.d.ts +0 -6
  475. package/packages/tools/dist/file-walk.js +0 -1
  476. package/packages/tools/dist/find-examples.d.ts +0 -29
  477. package/packages/tools/dist/find-examples.js +0 -3
  478. package/packages/tools/dist/find.d.ts +0 -49
  479. package/packages/tools/dist/find.js +0 -1
  480. package/packages/tools/dist/forge-classify.d.ts +0 -44
  481. package/packages/tools/dist/forge-classify.js +0 -2
  482. package/packages/tools/dist/forge-ground.d.ts +0 -61
  483. package/packages/tools/dist/forge-ground.js +0 -1
  484. package/packages/tools/dist/git-context.d.ts +0 -25
  485. package/packages/tools/dist/git-context.js +0 -3
  486. package/packages/tools/dist/graph-query.d.ts +0 -98
  487. package/packages/tools/dist/graph-query.js +0 -1
  488. package/packages/tools/dist/guide.d.ts +0 -25
  489. package/packages/tools/dist/guide.js +0 -1
  490. package/packages/tools/dist/health.d.ts +0 -16
  491. package/packages/tools/dist/health.js +0 -2
  492. package/packages/tools/dist/http-request.d.ts +0 -25
  493. package/packages/tools/dist/http-request.js +0 -1
  494. package/packages/tools/dist/lane.d.ts +0 -41
  495. package/packages/tools/dist/lane.js +0 -6
  496. package/packages/tools/dist/measure.d.ts +0 -42
  497. package/packages/tools/dist/measure.js +0 -2
  498. package/packages/tools/dist/onboard-utils.d.ts +0 -12
  499. package/packages/tools/dist/onboard-utils.js +0 -1
  500. package/packages/tools/dist/onboard.d.ts +0 -50
  501. package/packages/tools/dist/onboard.js +0 -18
  502. package/packages/tools/dist/parse-output.d.ts +0 -84
  503. package/packages/tools/dist/parse-output.js +0 -2
  504. package/packages/tools/dist/path-resolver.d.ts +0 -14
  505. package/packages/tools/dist/path-resolver.js +0 -1
  506. package/packages/tools/dist/process-manager.d.ts +0 -20
  507. package/packages/tools/dist/process-manager.js +0 -1
  508. package/packages/tools/dist/queue.d.ts +0 -40
  509. package/packages/tools/dist/queue.js +0 -1
  510. package/packages/tools/dist/regex-test.d.ts +0 -33
  511. package/packages/tools/dist/regex-test.js +0 -1
  512. package/packages/tools/dist/regex-utils.d.ts +0 -8
  513. package/packages/tools/dist/regex-utils.js +0 -1
  514. package/packages/tools/dist/rename.d.ts +0 -31
  515. package/packages/tools/dist/rename.js +0 -2
  516. package/packages/tools/dist/replay.d.ts +0 -59
  517. package/packages/tools/dist/replay.js +0 -4
  518. package/packages/tools/dist/response-envelope.d.ts +0 -43
  519. package/packages/tools/dist/response-envelope.js +0 -1
  520. package/packages/tools/dist/restore-points.d.ts +0 -22
  521. package/packages/tools/dist/restore-points.js +0 -1
  522. package/packages/tools/dist/schema-validate.d.ts +0 -25
  523. package/packages/tools/dist/schema-validate.js +0 -1
  524. package/packages/tools/dist/scope-map.d.ts +0 -51
  525. package/packages/tools/dist/scope-map.js +0 -1
  526. package/packages/tools/dist/snippet.d.ts +0 -35
  527. package/packages/tools/dist/snippet.js +0 -1
  528. package/packages/tools/dist/stash.d.ts +0 -14
  529. package/packages/tools/dist/stash.js +0 -1
  530. package/packages/tools/dist/stratum-card.d.ts +0 -30
  531. package/packages/tools/dist/stratum-card.js +0 -4
  532. package/packages/tools/dist/symbol.d.ts +0 -45
  533. package/packages/tools/dist/symbol.js +0 -3
  534. package/packages/tools/dist/synthesis-engine.d.ts +0 -13
  535. package/packages/tools/dist/synthesis-engine.js +0 -6
  536. package/packages/tools/dist/test-run.d.ts +0 -28
  537. package/packages/tools/dist/test-run.js +0 -2
  538. package/packages/tools/dist/text-utils.d.ts +0 -24
  539. package/packages/tools/dist/text-utils.js +0 -2
  540. package/packages/tools/dist/time-utils.d.ts +0 -20
  541. package/packages/tools/dist/time-utils.js +0 -1
  542. package/packages/tools/dist/trace.d.ts +0 -43
  543. package/packages/tools/dist/trace.js +0 -2
  544. package/packages/tools/dist/truncation.d.ts +0 -66
  545. package/packages/tools/dist/truncation.js +0 -11
  546. package/packages/tools/dist/watch.d.ts +0 -32
  547. package/packages/tools/dist/watch.js +0 -1
  548. package/packages/tools/dist/web-fetch.d.ts +0 -47
  549. package/packages/tools/dist/web-fetch.js +0 -8
  550. package/packages/tools/dist/web-search.d.ts +0 -25
  551. package/packages/tools/dist/web-search.js +0 -1
  552. package/packages/tools/dist/workset.d.ts +0 -47
  553. package/packages/tools/dist/workset.js +0 -1
  554. package/scaffold/__tests__/copilot-inline-shared-protocols.test.mjs +0 -39
  555. /package/packages/server/dist/{config.js → config-C5IU9Lau.js} +0 -0
  556. /package/packages/server/dist/{dashboard-static.js → dashboard-static-BfIe0Si1.js} +0 -0
  557. /package/packages/server/dist/{version-check.js → version-check-D4j0Pykd.js} +0 -0
@@ -1,10 +0,0 @@
1
- import { FlowFormatAdapter, FlowManifest } from "../types.js";
2
-
3
- //#region packages/flows/src/adapters/native.d.ts
4
- declare class NativeAdapter implements FlowFormatAdapter {
5
- readonly format: "native";
6
- detect(sourceDir: string): boolean;
7
- parse(sourceDir: string): Promise<FlowManifest>;
8
- }
9
- //#endregion
10
- export { NativeAdapter };
@@ -1 +0,0 @@
1
- import{existsSync as e,readFileSync as t}from"node:fs";import{join as n}from"node:path";var r=class{format=`native`;detect(t){return e(n(t,`flow.json`))}async parse(e){let r=t(n(e,`flow.json`),`utf-8`);return JSON.parse(r)}};export{r as NativeAdapter};
@@ -1,40 +0,0 @@
1
- import { FlowFormatAdapter, FlowManifest, FlowParseOptions } from "../types.js";
2
-
3
- //#region packages/flows/src/adapters/openspec.d.ts
4
- /**
5
- * OpenSpec adapter — detects repos that follow the OpenSpec workflow
6
- * (https://github.com/Fission-AI/OpenSpec) and converts them to FlowManifest.
7
- *
8
- * Detection marker: `openspec/config.yaml` in the source directory.
9
- *
10
- * Flow steps are derived from the active OpenSpec schema.yaml.
11
- */
12
- declare class OpenSpecAdapter implements FlowFormatAdapter {
13
- readonly format: "openspec";
14
- detect(sourceDir: string): boolean;
15
- parse(sourceDir: string, options?: FlowParseOptions): Promise<FlowManifest>;
16
- /**
17
- * Read metadata from package.json if available, otherwise use defaults
18
- * derived from the openspec config.
19
- */
20
- private readMeta;
21
- private readConfigSchema;
22
- private resolveSchemaDir;
23
- private parseSchemaArtifacts;
24
- private loadSchema;
25
- private discoverSchemaFromDirectory;
26
- private collectMarkdownFiles;
27
- private hasFileRecursive;
28
- private findSchemaYaml;
29
- private toStepIdFromMarkdown;
30
- private buildStepsFromSchema;
31
- private materializeSteps;
32
- private resolveInstructionContent;
33
- private normalizeArtifact;
34
- private normalizeApply;
35
- private readString;
36
- private readStringArray;
37
- private humanizeStepName;
38
- }
39
- //#endregion
40
- export { OpenSpecAdapter };
@@ -1 +0,0 @@
1
- import{existsSync as e,mkdirSync as t,readFileSync as n,readdirSync as r,writeFileSync as i}from"node:fs";import{basename as a,join as o,relative as s}from"node:path";import{execSync as c}from"node:child_process";import{parse as l}from"yaml";var u=class{format=`openspec`;detect(t){return!!(e(o(t,`openspec`,`config.yaml`))||e(o(t,`schemas`))&&this.findSchemaYaml(t))}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(t){let r=o(t,`package.json`);if(e(r))try{let e=JSON.parse(n(r,`utf-8`));return{name:e.name??a(t),version:e.version??`0.1.0`,description:e.description??`OpenSpec flow`,author:e.author}}catch{}return{name:a(t),version:`0.1.0`,description:`OpenSpec flow`}}readConfigSchema(t){let r=o(t,`openspec`,`config.yaml`);if(!e(r))return`spec-driven`;try{let e=l(n(r,`utf-8`));return typeof e?.schema==`string`&&e.schema.trim().length>0?e.schema:`spec-driven`}catch{return`spec-driven`}}resolveSchemaDir(t){let n=this.readConfigSchema(t),r=o(t,`openspec`,`schemas`,n);if(e(o(r,`schema.yaml`)))return r;let i=o(t,`schemas`,n);if(e(o(i,`schema.yaml`)))return i;try{let t=o(c(`npm root -g`,{encoding:`utf-8`,timeout:5e3,stdio:[`ignore`,`pipe`,`ignore`]}).trim(),`@fission-ai`,`openspec`,`schemas`,n);if(e(o(t,`schema.yaml`)))return t}catch{}return null}parseSchemaArtifacts(e){try{let t=l(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=o(t,`schema.yaml`);try{let t=n(e,`utf-8`),r=this.parseSchemaArtifacts(t);if(r)return r}catch{}}return this.discoverSchemaFromDirectory(e)}discoverSchemaFromDirectory(t){let i=[o(t,`openspec`,`schemas`),o(t,`schemas`)];for(let t of i)if(e(t))try{let i=r(t,{withFileTypes:!0}).filter(e=>e.isDirectory());for(let r of i){let i=o(t,r.name,`schema.yaml`);if(e(i))try{let e=this.parseSchemaArtifacts(n(i,`utf-8`));if(e)return e}catch{}}}catch{}let c=[],l=o(t,`openspec`),u=[],d=this.collectMarkdownFiles(l);for(let e of d){let t=s(l,e).replace(/\\/g,`/`),n=this.toStepIdFromMarkdown(t);!n||u.includes(n)||(c.push({id:n,generates:t,description:`${this.humanizeStepName(n)} phase`,template:a(e),requires:u.length>0?[u[u.length-1]]:[]}),u.push(n))}return{name:this.readConfigSchema(t),version:1,artifacts:c}}collectMarkdownFiles(t){if(!e(t))return[];let n=[];try{let e=r(t,{withFileTypes:!0}).sort((e,t)=>e.name.localeCompare(t.name));for(let r of e){let e=o(t,r.name);if(r.isFile()&&r.name.toLowerCase().endsWith(`.md`)){n.push(e);continue}r.isDirectory()&&n.push(...this.collectMarkdownFiles(e))}}catch{}return n}hasFileRecursive(t,n){if(!e(t))return!1;try{let e=r(t,{withFileTypes:!0});for(let r of e)if(r.isFile()&&r.name===n||r.isDirectory()&&this.hasFileRecursive(o(t,r.name),n))return!0}catch{}return!1}findSchemaYaml(t){let n=o(t,`schemas`);if(!e(n))return!1;try{return r(n,{withFileTypes:!0}).filter(e=>e.isDirectory()).some(t=>e(o(n,t.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(n,r,a,s){let c=this.resolveSchemaDir(n),l=new Map(a.artifacts.map(e=>[e.id,e]));for(let u of r){let r=o(n,`steps`,u.id),d=o(r,`README.md`);t(r,{recursive:!0});let f=this.resolveInstructionContent(c,u.id,l.get(u.id),a.apply);if(!f){e(d)||i(d,`# ${u.name}\n\n${u.description}\n`,`utf-8`);continue}i(d,s?.transform?await s.transform({content:f,sourceFormat:`openspec`,stepName:u.id,metadata:{schemaName:a.name,displayName:u.name,description:u.description,produces:u.produces,requires:u.requires}}):`# ${u.name}\n\n${f}`,`utf-8`)}}resolveInstructionContent(t,r,i,a){if(r===`apply`&&a?.instruction)return a.instruction;if(!i)return null;if(i.instruction)return i.instruction;if(t&&i.template){let r=o(t,`templates`,i.template);if(e(r))try{return n(r,`utf-8`)}catch{}}return i.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(` `)}};export{u as OpenSpecAdapter};
@@ -1,16 +0,0 @@
1
- import { FlowManifest } from "./types.js";
2
-
3
- //#region packages/flows/src/builtins.d.ts
4
- interface BuiltinFlow {
5
- /** Flow manifest */
6
- manifest: FlowManifest;
7
- /** Relative path within the monorepo where scaffold files live */
8
- scaffoldDir: string;
9
- }
10
- /**
11
- * Returns all built-in flow definitions bundled with @aikit/flows.
12
- * These flows are always available, even without installation via `flow add`.
13
- */
14
- declare function getBuiltinFlows(): BuiltinFlow[];
15
- //#endregion
16
- export { BuiltinFlow, getBuiltinFlows };
@@ -1 +0,0 @@
1
- const e={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:[]},t={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 n(){return[{manifest:e,scaffoldDir:`scaffold/flows/aikit-basic`},{manifest:t,scaffoldDir:`scaffold/flows/aikit-advanced`}]}export{n as getBuiltinFlows};
@@ -1,20 +0,0 @@
1
- import { FlowManifest } from "./types.js";
2
-
3
- //#region packages/flows/src/foundation.d.ts
4
- declare class FoundationIntegration {
5
- /**
6
- * Inject foundation preamble into a file.
7
- * Replaces existing preamble if present, otherwise prepends.
8
- */
9
- injectPreamble(filePath: string, manifest: FlowManifest): void;
10
- /**
11
- * Remove foundation preamble from a file.
12
- */
13
- removePreamble(filePath: string): void;
14
- /**
15
- * Get list of IDE instruction files to inject preamble into.
16
- */
17
- getTargetFiles(workspaceRoot: string): string[];
18
- }
19
- //#endregion
20
- export { FoundationIntegration };
@@ -1,11 +0,0 @@
1
- import{existsSync as e,readFileSync as t,writeFileSync as n}from"node:fs";import{join as r}from"node:path";const i=`<!-- aikit foundation context -->`,a=`<!-- end foundation context -->`;function o(e){let t=e.artifacts_dir||`.spec`;return`${i}
2
- You are operating within the @vpxa/aikit framework.
3
- - Use aikit MCP tools for all search, analysis, and memory operations
4
- - Follow agents defined in AGENTS.md for delegation
5
- - Use built-in skills (brainstorming, requirements-clarity, etc.) as needed
6
- - Track state via the flow state machine (flow_status, flow_step)
7
- - Active flow: ${e.name} v${e.version}
8
- - Artifacts go in: ${t}/${e.name}/
9
- ${a}`}var s=class{injectPreamble(r,s){let c=o(s);if(!e(r)){n(r,`${c}\n`,`utf-8`);return}let l=t(r,`utf-8`),u=l.indexOf(i),d=l.indexOf(a);if(u!==-1&&d!==-1){n(r,`${l.slice(0,u)}${c}${l.slice(d+31)}`,`utf-8`);return}n(r,`${c}\n\n${l}`,`utf-8`)}removePreamble(r){if(!e(r))return;let o=t(r,`utf-8`),s=o.indexOf(i),c=o.indexOf(a);s===-1||c===-1||n(r,(o.slice(0,s)+o.slice(c+31)).replace(/^\n+/,``).replace(/\n{3,}/g,`
10
-
11
- `),`utf-8`)}getTargetFiles(t){let n=[],i=r(t,`.github`,`copilot-instructions.md`);e(i)&&n.push(i);let a=r(t,`CLAUDE.md`);e(a)&&n.push(a);let o=r(t,`AGENTS.md`);return e(o)&&n.push(o),n}};export{s as FoundationIntegration};
@@ -1,53 +0,0 @@
1
- import { FlowResult } from "./types.js";
2
-
3
- //#region packages/flows/src/git.d.ts
4
- declare class GitInstaller {
5
- private readonly flowsDir;
6
- constructor(flowsDir: string);
7
- /**
8
- * Clone a git repo into the flows directory.
9
- * On auth failure, if GCM is available, retries interactively so the
10
- * credential manager can open a browser / device-code flow.
11
- * Returns the local install path.
12
- */
13
- clone(repoUrl: string, token?: string): FlowResult<string>;
14
- /**
15
- * Update an existing cloned flow repo.
16
- */
17
- update(installPath: string): FlowResult;
18
- /**
19
- * Copy a local directory as a flow source.
20
- */
21
- copyLocal(sourcePath: string, name: string): FlowResult<string>;
22
- /**
23
- * Remove installed flow files.
24
- */
25
- remove(installPath: string): FlowResult;
26
- /**
27
- * Run install dependencies for a flow.
28
- * Processes the `install[]` field from flow.json.
29
- */
30
- runInstallDeps(installEntries: string[]): FlowResult;
31
- /**
32
- * Get the current HEAD commit SHA for a local git repo.
33
- */
34
- getLocalCommit(installPath: string): string | null;
35
- /**
36
- * Get the latest commit SHA on the remote default branch.
37
- * Uses `git ls-remote` so it doesn't modify the working tree.
38
- */
39
- getRemoteCommit(installPath: string): string | null;
40
- /**
41
- * Check whether the remote has commits newer than the local HEAD.
42
- */
43
- hasUpdates(installPath: string): FlowResult<{
44
- localCommit: string;
45
- remoteCommit: string;
46
- hasUpdates: boolean;
47
- }>;
48
- /** Extract repo name from git URL */
49
- private repoNameFromUrl;
50
- private ensureFlowsDir;
51
- }
52
- //#endregion
53
- export { GitInstaller };
@@ -1,2 +0,0 @@
1
- import{cpSync as e,existsSync as t,mkdirSync as n,rmSync as r,unlinkSync as i,writeFileSync as a}from"node:fs";import{basename as o,join as s}from"node:path";import{execSync as c,spawnSync as l}from"node:child_process";import{tmpdir as u}from"node:os";function d(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 p(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(`
2
- `)}function m(){try{return l(`git`,[`credential-manager`,`--version`],{stdio:`pipe`,timeout:5e3}).status===0}catch{return!1}}function h(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 g=class{constructor(e){this.flowsDir=e}clone(e,n){let o=this.repoNameFromUrl(e),c=s(this.flowsDir,o);if(t(c))if(!t(s(c,`.git`)))r(c,{recursive:!0,force:!0});else return{success:!1,error:`Flow "${o}" already installed at ${c}. Use update instead.`};try{if(this.ensureFlowsDir(),n){let t=process.platform===`win32`?`bat`:`sh`,r=s(u(),`git-askpass-${Date.now()}.${t}`);process.platform===`win32`?a(r,`@echo ${n}`,{mode:448}):a(r,`#!/bin/sh\necho "${n}"`,{mode:448});try{let t=l(`git`,[`clone`,`--depth`,`1`,e,c],{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{i(r)}catch{}}}else{let t=l(`git`,[`clone`,`--depth`,`1`,e,c],{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:c}}catch(i){t(c)&&r(c,{recursive:!0,force:!0});let a=d(i),o=i instanceof Error?i.message:String(i);if(!n&&h(o,a)&&m()){let n=f(e)||e;console.log(`\nAuthentication required for ${n}.\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(),l(`git`,[`clone`,`--depth`,`1`,e,c],{stdio:`inherit`,timeout:12e4,env:{...process.env,GIT_TERMINAL_PROMPT:`1`}}).status===0)return{success:!0,data:c};t(c)&&r(c,{recursive:!0,force:!0})}catch{t(c)&&r(c,{recursive:!0,force:!0})}}return{success:!1,error:p(e,o,a)}}}update(e){if(!t(e))return{success:!1,error:`Install path not found: ${e}`};try{return c(`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=c(`git remote get-url origin`,{cwd:e,stdio:`pipe`,timeout:1e4}).toString().trim()}catch{}let r=d(t),i=t instanceof Error?t.message:String(t);if(h(i,r)&&m()){let t=f(n)||n;console.log(`\nAuthentication required for ${t}.\nGit Credential Manager detected - opening browser for login...\n`);try{if(l(`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:p(n,i,r)}}}copyLocal(n,r){let i=s(this.flowsDir,r);if(t(i))return{success:!1,error:`Flow "${r}" already installed at ${i}`};try{return this.ensureFlowsDir(),e(n,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(!t(e))return{success:!0};try{return r(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:`)){c(`npx skills add ${t.slice(4)} -g`,{stdio:`pipe`,timeout:12e4});continue}if(t.endsWith(`.git`)||t.includes(`github.com`)){c(`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 c(`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 c(`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 o(e).replace(/\.git$/,``)}ensureFlowsDir(){t(this.flowsDir)||n(this.flowsDir,{recursive:!0})}};export{g as GitInstaller};
@@ -1,13 +0,0 @@
1
- import { FlowFormat, FlowManifest, FlowParseOptions, FlowResult } from "./types.js";
2
-
3
- //#region packages/flows/src/loader.d.ts
4
- declare class FlowLoader {
5
- load(sourceDir: string, options?: FlowParseOptions): Promise<FlowResult<{
6
- manifest: FlowManifest;
7
- format: FlowFormat;
8
- }>>;
9
- loadWithFormat(sourceDir: string, format: FlowFormat, options?: FlowParseOptions): Promise<FlowResult<FlowManifest>>;
10
- validate(manifest: FlowManifest): FlowResult;
11
- }
12
- //#endregion
13
- export { FlowLoader };
@@ -1,2 +0,0 @@
1
- import{getAdapter as e,getAdapterForSource as t}from"./adapters/index.js";import{existsSync as n}from"node:fs";var r=class{async load(e,r){if(!n(e))return{success:!1,error:`Source directory not found: ${e}`};let i=t(e);if(!i)return{success:!1,error:`No format adapter matches source: ${e}`};try{let t=await i.parse(e,r),n=this.validate(t);return n.success?{success:!0,data:{manifest:t,format:i.format}}:n}catch(e){return{success:!1,error:`Failed to parse flow: ${e instanceof Error?e.message:String(e)}`}}}async loadWithFormat(t,n,r){let i=e(n);try{let e=await i.parse(t,r),n=this.validate(e);return n.success?{success:!0,data:e}:n}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(`
2
- `)}`}:{success:!0}}};export{r as FlowLoader};
@@ -1,23 +0,0 @@
1
- import { FlowRegistry, FlowRegistryEntry, FlowResult } from "./types.js";
2
-
3
- //#region packages/flows/src/registry.d.ts
4
- declare class FlowRegistryManager {
5
- private readonly registryPath;
6
- constructor(registryPath: string);
7
- /** Load registry from disk, or create empty if missing */
8
- load(): FlowRegistry;
9
- /** Save registry to disk */
10
- save(registry: FlowRegistry): void;
11
- /** Register a new flow or update an existing one */
12
- register(entry: FlowRegistryEntry): FlowResult;
13
- /** Remove a flow from the registry */
14
- unregister(name: string): FlowResult;
15
- /** Get a specific flow entry (checks disk registry first, then builtins) */
16
- get(name: string): FlowRegistryEntry | null;
17
- /** List all registered flows (disk + builtins, disk overrides builtins) */
18
- list(): FlowRegistryEntry[];
19
- /** Check if a flow is registered (disk or builtin) */
20
- has(name: string): boolean;
21
- }
22
- //#endregion
23
- export { FlowRegistryManager };
@@ -1 +0,0 @@
1
- import{getBuiltinFlows as e}from"./builtins.js";import{existsSync as t,mkdirSync as n,readFileSync as r,writeFileSync as i}from"node:fs";import{dirname as a}from"node:path";function o(){return e().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 s=class{constructor(e){this.registryPath=e}load(){if(!t(this.registryPath))return{version:1,flows:{}};try{let e=r(this.registryPath,`utf-8`);return JSON.parse(e)}catch{return{version:1,flows:{}}}}save(e){let r=a(this.registryPath);t(r)||n(r,{recursive:!0}),i(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]||(o().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 o())t.has(e.name)||n.push(e);return n}has(e){return e in this.load().flows?!0:o().some(t=>t.name===e)}};export{s as FlowRegistryManager};
@@ -1,23 +0,0 @@
1
- import { FlowManifest, FlowResult, FlowState, StepAction } from "./types.js";
2
-
3
- //#region packages/flows/src/state-machine.d.ts
4
- declare class FlowStateMachine {
5
- private readonly statePath;
6
- constructor(statePath: string);
7
- /** Load active flow state from disk, or null if no active flow */
8
- load(): FlowState | null;
9
- /** Save state to disk */
10
- private save;
11
- /** Start a new flow */
12
- start(flowName: string, manifest: FlowManifest): FlowResult<FlowState>;
13
- /** Advance the flow: next, skip, or redo current step */
14
- step(action: StepAction, manifest: FlowManifest): FlowResult<FlowState>;
15
- /** Get current flow status */
16
- getStatus(): FlowResult<FlowState>;
17
- /** Reset flow state (clear active flow) */
18
- reset(): FlowResult;
19
- /** Record an artifact produced by a step */
20
- recordArtifact(name: string, path: string): FlowResult;
21
- }
22
- //#endregion
23
- export { FlowStateMachine };
@@ -1 +0,0 @@
1
- import{existsSync as e,mkdirSync as t,readFileSync as n,unlinkSync as r,writeFileSync as i}from"node:fs";import{dirname as a}from"node:path";var o=class{constructor(e){this.statePath=e}load(){if(!e(this.statePath))return null;try{let e=n(this.statePath,`utf-8`);return JSON.parse(e)}catch{return null}}save(n){let r=a(this.statePath);e(r)||t(r,{recursive:!0}),i(this.statePath,JSON.stringify(n,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 e(this.statePath)&&r(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`}}};export{o as FlowStateMachine};
@@ -1,17 +0,0 @@
1
- import { FlowManifest } from "./types.js";
2
-
3
- //#region packages/flows/src/symlinks.d.ts
4
- declare class SymlinkManager {
5
- /**
6
- * Create agent symlinks for a flow in the workspace.
7
- */
8
- createSymlinks(workspaceRoot: string, flowName: string, flowInstallPath: string, manifest: FlowManifest): void;
9
- /**
10
- * Remove agent symlinks for a flow.
11
- */
12
- removeSymlinks(workspaceRoot: string, flowName: string): void;
13
- private getTargets;
14
- private getAgentStem;
15
- }
16
- //#endregion
17
- export { SymlinkManager };
@@ -1 +0,0 @@
1
- import{copyFileSync as e,existsSync as t,mkdirSync as n,readdirSync as r,rmdirSync as i,symlinkSync as a,unlinkSync as o}from"node:fs";import{basename as s,dirname as c,join as l,relative as u}from"node:path";var d=class{createSymlinks(r,i,s,d){let f=this.getTargets(r,i);for(let r of f){t(r.baseDir)||n(r.baseDir,{recursive:!0});for(let n of d.agents){let i=l(s,n);if(!t(i))continue;let d=this.getAgentStem(n),f=l(r.baseDir,`${d}${r.extension}`);t(f)&&o(f);let p=u(c(f),i);try{a(p,f,`file`)}catch{try{e(i,f)}catch(e){console.warn(`Failed to create symlink or copy fallback for ${i}: ${e instanceof Error?e.message:String(e)}`)}}}}}removeSymlinks(e,n){let a=this.getTargets(e,n);for(let e of a)if(t(e.baseDir))try{let t=r(e.baseDir,{withFileTypes:!0});for(let n of t)!n.isFile()&&!n.isSymbolicLink()||o(l(e.baseDir,n.name));r(e.baseDir).length===0&&i(e.baseDir)}catch{}}getTargets(e,t){return[{ide:`copilot`,baseDir:l(e,`.github`,`agents`,`flows`,t),extension:`.agent.md`},{ide:`claude-code`,baseDir:l(e,`.claude`,`agents`,`flows`,t),extension:`.md`}]}getAgentStem(e){return s(e).replace(/\.agent\.md$/,``).replace(/\.md$/,``)}};export{d as SymlinkManager};
@@ -1,127 +0,0 @@
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
- export { ContentTransformFn, FlowFormat, FlowFormatAdapter, FlowManifest, FlowParseOptions, FlowRegistry, FlowRegistryEntry, FlowResult, FlowSourceType, FlowState, FlowStatus, FlowStep, StepAction };
@@ -1 +0,0 @@
1
- export{};
@@ -1,13 +0,0 @@
1
- //#region packages/indexer/src/file-hasher.d.ts
2
- /**
3
- * Generate a deterministic hash for a file's content.
4
- * Used for incremental indexing -- skip files that haven't changed.
5
- */
6
- declare function hashContent(content: string): string;
7
- /**
8
- * Generate a deterministic ID for a knowledge record.
9
- * Based on source path + chunk index to ensure idempotent upserts.
10
- */
11
- declare function generateRecordId(sourcePath: string, chunkIndex: number): string;
12
- //#endregion
13
- export { generateRecordId, hashContent };
@@ -1 +0,0 @@
1
- import{createHash as e}from"node:crypto";function t(t){return e(`sha256`).update(t).digest(`hex`).slice(0,16)}function n(t,n){let r=`${t}:${n}`;return e(`sha256`).update(r).digest(`hex`).slice(0,16)}export{n as generateRecordId,t as hashContent};
@@ -1,29 +0,0 @@
1
- //#region packages/indexer/src/filesystem-crawler.d.ts
2
- interface CrawlResult {
3
- /** File path relative to workspace root */
4
- relativePath: string;
5
- /** Absolute file path */
6
- absolutePath: string;
7
- /** File content */
8
- content: string;
9
- /** File extension (lowercase, with dot) */
10
- extension: string;
11
- }
12
- interface CrawlOptions {
13
- /** Glob patterns to exclude */
14
- excludePatterns: string[];
15
- /** Root directory to crawl */
16
- rootDir: string;
17
- }
18
- /**
19
- * Crawl a directory tree and yield files that should be indexed.
20
- */
21
- declare class FilesystemCrawler {
22
- /** Binary file extensions that should always be skipped */
23
- private static readonly BINARY_EXTENSIONS;
24
- crawl(options: CrawlOptions): Promise<CrawlResult[]>;
25
- private walkDir;
26
- private isExcluded;
27
- }
28
- //#endregion
29
- export { CrawlOptions, CrawlResult, FilesystemCrawler };
@@ -1 +0,0 @@
1
- import{realpathSync as e}from"node:fs";import{lstat as t,readFile as n,readdir as r,stat as i}from"node:fs/promises";import{extname as a,join as o,relative as s}from"node:path";import{AIKIT_PATHS as c,FILE_LIMITS as l,createLogger as u}from"../../core/dist/index.js";import{minimatch as d}from"minimatch";const f=u(`indexer`);var p=class u{static BINARY_EXTENSIONS=new Set(`.node,.so,.dylib,.dll,.wasm,.bin,.exe,.png,.jpg,.jpeg,.gif,.bmp,.ico,.webp,.svg,.mp3,.mp4,.wav,.avi,.mov,.flac,.zip,.gz,.tar,.bz2,.7z,.rar,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.ttf,.otf,.woff,.woff2,.eot,.pyc,.class,.o,.obj,.a,.lib`.split(`,`));async crawl(e){let t=[],n=new Set;return await this.walkDir(e.rootDir,e.rootDir,e.excludePatterns,t,n),t}async walkDir(d,p,m,h,g){let _;try{_=await r(d,{withFileTypes:!0})}catch(e){let t=e.code;(t===`EACCES`||t===`EPERM`)&&f.warn(`Permission denied, skipping directory`,{dir:d});return}for(let r of _){let f=o(d,r.name),_=s(p,f).replace(/\\/g,`/`);if(!this.isExcluded(_,m)){if(r.isDirectory()){if(r.name.startsWith(`.`)&&!(r.name===c.ai.slice(1)&&_.startsWith(c.ai)))continue;try{if((await t(f)).isSymbolicLink())continue}catch{continue}let n;try{n=e(f)}catch{continue}if(g.has(n))continue;g.add(n),await this.walkDir(f,p,m,h,g)}else if(r.isFile()){let e=a(r.name).toLowerCase();if(u.BINARY_EXTENSIONS.has(e))continue;try{if((await i(f)).size>l.maxFileSizeBytes)continue;let t=await n(f,`utf-8`);if(t.includes(`\0`))continue;h.push({relativePath:_,absolutePath:f,content:t,extension:e})}catch{}}}}}isExcluded(e,t){return t.some(t=>d(e,t,{dot:!0}))}};export{p as FilesystemCrawler};
@@ -1,22 +0,0 @@
1
- import { GraphEdge, GraphNode } from "../../store/dist/index.js";
2
-
3
- //#region packages/indexer/src/graph-extractor.d.ts
4
- interface ExtractGraphOptions {
5
- /** Maps workspace package names to entry module paths without extensions. */
6
- workspacePackages?: Map<string, string>;
7
- }
8
- interface ExtractedGraph {
9
- nodes: GraphNode[];
10
- edges: GraphEdge[];
11
- }
12
- /**
13
- * Extract graph nodes and edges from a single file's content.
14
- * Produces:
15
- * - One "module" node per file
16
- * - Symbol nodes (function, class, interface, type, const, enum)
17
- * - "defines" edges from module → symbol
18
- * - "imports" edges from module → imported module
19
- */
20
- declare function extractGraph(content: string, sourcePath: string, options?: ExtractGraphOptions): ExtractedGraph;
21
- //#endregion
22
- export { ExtractGraphOptions, ExtractedGraph, extractGraph };
@@ -1 +0,0 @@
1
- import{createHash as e}from"node:crypto";import{dirname as t,extname as n,join as r}from"node:path";const i=new Set([`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`]),a=[{pattern:/^export\s+(?:async\s+)?function\s+(\w+)/gm,kind:`function`,exported:!0},{pattern:/^export\s+(?:default\s+)?class\s+(\w+)/gm,kind:`class`,exported:!0},{pattern:/^export\s+interface\s+(\w+)/gm,kind:`interface`,exported:!0},{pattern:/^export\s+type\s+(\w+)/gm,kind:`type`,exported:!0},{pattern:/^export\s+(?:const|let)\s+(\w+)/gm,kind:`const`,exported:!0},{pattern:/^export\s+enum\s+(\w+)/gm,kind:`enum`,exported:!0},{pattern:/^(?:async\s+)?function\s+(\w+)/gm,kind:`function`,exported:!1},{pattern:/^class\s+(\w+)/gm,kind:`class`,exported:!1},{pattern:/^interface\s+(\w+)/gm,kind:`interface`,exported:!1},{pattern:/^type\s+(\w+)/gm,kind:`type`,exported:!1},{pattern:/^enum\s+(\w+)/gm,kind:`enum`,exported:!1}],o=[/import\s+(?:(?:type\s+)?(?:(?:\{[^}]*\}|[\w*]+)\s+from\s+)?)['"]([^'"]+)['"]/g,/import\(\s*['"]([^'"]+)['"]\s*\)/g,/require\(\s*['"]([^'"]+)['"]\s*\)/g];function s(t,n,r){return e(`sha256`).update(`${t}:${n}:${r}`).digest(`hex`).slice(0,16)}function c(t,n,r){return e(`sha256`).update(`${t}-${r}-${n}`).digest(`hex`).slice(0,16)}function l(e,n){return r(t(n),e).replace(/\\/g,`/`).replace(/\.(js|jsx|ts|tsx|mjs|cjs)$/,``)}function u(e){return e.replace(/\.(js|jsx|ts|tsx|mjs|cjs)$/,``)}function d(e,t,r){let d=n(t).toLowerCase();if(!i.has(d))return{nodes:[],edges:[]};let f=[],p=[],m=new Date().toISOString(),h=new Set,g=u(t),_=s(`module`,g,g);f.push({id:_,type:`module`,name:t,properties:{ext:d},sourcePath:t,createdAt:m});for(let{pattern:n,kind:r,exported:i}of a){let a=new RegExp(n.source,n.flags),o;for(;(o=a.exec(e))!==null;){let e=o[1],n=`${r}:${e}`;if(h.has(n))continue;h.add(n);let a=s(r,e,t);f.push({id:a,type:r,name:e,properties:{exported:i},sourcePath:t,createdAt:m}),p.push({id:c(_,a,`defines`),fromId:_,toId:a,type:`defines`,weight:i?1:.5})}}let v=r?.workspacePackages,y=new Set;for(let n of o){let r=new RegExp(n.source,n.flags),i;for(;(i=r.exec(e))!==null;){let e=i[1];if(y.has(e))continue;let n;if(e.startsWith(`.`))n=l(e,t);else if(v){let t=e.startsWith(`@`)?e.split(`/`).slice(0,2).join(`/`):e.split(`/`)[0],r=v.get(t);if(!r)continue;n=r}else continue;y.add(e);let r=u(n),a=s(`module`,r,r);p.push({id:c(_,a,`imports`),fromId:_,toId:a,type:`imports`,properties:{source:e}})}}return{nodes:f,edges:p}}export{d as extractGraph};
@@ -1,24 +0,0 @@
1
- //#region packages/indexer/src/hash-cache.d.ts
2
- /**
3
- * Persistent file hash cache.
4
- * Stores path->hash mappings in a JSON file to avoid LanceDB round-trips
5
- * when checking which files have changed during incremental indexing.
6
- */
7
- declare class FileHashCache {
8
- private cache;
9
- private readonly filePath;
10
- private dirty;
11
- constructor(storeDir: string);
12
- /** Load cache from disk. Non-fatal if missing or corrupt. */
13
- load(): void;
14
- get(path: string): string | undefined;
15
- set(path: string, hash: string): void;
16
- delete(path: string): void;
17
- /** Persist cache to disk if changed. */
18
- flush(): void;
19
- /** Clear all entries and delete file. */
20
- clear(): void;
21
- get size(): number;
22
- }
23
- //#endregion
24
- export { FileHashCache };
@@ -1 +0,0 @@
1
- import{existsSync as e,readFileSync as t,writeFileSync as n}from"node:fs";import{resolve as r}from"node:path";import{createLogger as i}from"../../core/dist/index.js";const a=i(`hash-cache`);var o=class{cache;filePath;dirty=!1;constructor(e){this.filePath=r(e,`file-hashes.json`),this.cache=new Map}load(){if(e(this.filePath))try{let e=t(this.filePath,`utf-8`),n=JSON.parse(e);this.cache=new Map(Object.entries(n)),a.info(`Hash cache loaded`,{entries:this.cache.size})}catch(e){a.warn(`Hash cache load failed, starting fresh`,{err:e}),this.cache=new Map}}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t),this.dirty=!0}delete(e){this.cache.delete(e)&&(this.dirty=!0)}flush(){if(this.dirty)try{let e={};for(let[t,n]of this.cache)e[t]=n;n(this.filePath,JSON.stringify(e),`utf-8`),this.dirty=!1}catch(e){a.warn(`Hash cache flush failed`,{err:e})}}clear(){this.cache.clear(),this.dirty=!0,this.flush()}get size(){return this.cache.size}};export{o as FileHashCache};
@@ -1,73 +0,0 @@
1
- import { FileHashCache } from "./hash-cache.js";
2
- import { IndexStats, KBConfig } from "../../core/dist/index.js";
3
- import { IGraphStore, IKnowledgeStore } from "../../store/dist/index.js";
4
- import { IEmbedder } from "../../embeddings/dist/index.js";
5
-
6
- //#region packages/indexer/src/incremental-indexer.d.ts
7
- interface IndexProgress {
8
- phase: 'crawling' | 'chunking' | 'embedding' | 'storing' | 'cleanup' | 'done';
9
- filesTotal: number;
10
- filesProcessed: number;
11
- chunksTotal: number;
12
- chunksProcessed: number;
13
- /** The file currently being processed */
14
- currentFile?: string;
15
- }
16
- type ProgressCallback = (progress: IndexProgress) => void;
17
- interface IndexResult {
18
- filesProcessed: number;
19
- filesSkipped: number;
20
- chunksCreated: number;
21
- filesRemoved: number;
22
- durationMs: number;
23
- }
24
- declare class IncrementalIndexer {
25
- private readonly embedder;
26
- private readonly store;
27
- private readonly crawler;
28
- private indexing;
29
- private graphStore?;
30
- private hashCache?;
31
- /** Whether an index operation is currently in progress. */
32
- get isIndexing(): boolean;
33
- constructor(embedder: IEmbedder, store: IKnowledgeStore);
34
- /** Set the graph store for auto-population during indexing and cleanup on re-index. */
35
- setGraphStore(graphStore: IGraphStore): void;
36
- /** Set the hash cache for faster incremental checks. */
37
- setHashCache(cache: FileHashCache): void;
38
- /**
39
- * Index all configured sources. Only re-indexes files that have changed.
40
- * Sources are crawled in parallel, and file processing runs concurrently
41
- * up to `config.indexing.concurrency` (default: 50% of CPU cores, minimum 2, maximum 4).
42
- */
43
- index(config: KBConfig, onProgress?: ProgressCallback): Promise<IndexResult>;
44
- /**
45
- * Crawl sources and return file paths whose content has changed since the last index.
46
- * This performs a read-only scan and does not modify the store.
47
- */
48
- getChangedFiles(config: KBConfig): Promise<string[]>;
49
- /**
50
- * Index only the specified file paths.
51
- * Files that have not changed are skipped.
52
- */
53
- indexFiles(config: KBConfig, paths: string[], onProgress?: ProgressCallback): Promise<IndexResult>;
54
- private doIndex;
55
- private doIndexFiles;
56
- private crawlSources;
57
- private planIndexWork;
58
- private getPathsToRemove;
59
- private buildWorkspacePackageMap;
60
- private processFiles;
61
- private cleanupRemovedFiles;
62
- /**
63
- * Force re-index all files (ignoring hashes).
64
- */
65
- reindexAll(config: KBConfig, onProgress?: ProgressCallback): Promise<IndexResult>;
66
- private doReindex;
67
- /**
68
- * Get current index statistics.
69
- */
70
- getStats(): Promise<IndexStats>;
71
- }
72
- //#endregion
73
- export { IncrementalIndexer, IndexProgress, IndexResult, ProgressCallback };