atabey 0.0.6 → 0.0.8

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 (407) hide show
  1. package/ATABEY.md +4 -4
  2. package/README.md +35 -33
  3. package/bin/cli.js +2 -2
  4. package/bin/validate-agent-army.js +6 -6
  5. package/dist/framework-mcp/src/constants.js +1 -1
  6. package/dist/framework-mcp/src/constants.js.map +1 -1
  7. package/dist/framework-mcp/src/index.js +29 -5
  8. package/dist/framework-mcp/src/index.js.map +1 -1
  9. package/dist/framework-mcp/src/resources/index.d.ts +10 -0
  10. package/dist/framework-mcp/src/resources/index.js +59 -0
  11. package/dist/framework-mcp/src/resources/index.js.map +1 -0
  12. package/dist/framework-mcp/src/tools/control_plane/locking.js +3 -3
  13. package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -1
  14. package/dist/framework-mcp/src/tools/control_plane/registry.js +3 -2
  15. package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -1
  16. package/dist/framework-mcp/src/tools/definitions.js +33 -1
  17. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  18. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.d.ts +1 -1
  19. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js +8 -3
  20. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js.map +1 -1
  21. package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +1 -1
  22. package/dist/framework-mcp/src/tools/file_system/patch_file.js +8 -3
  23. package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -1
  24. package/dist/framework-mcp/src/tools/file_system/read_file.js +3 -3
  25. package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
  26. package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +1 -1
  27. package/dist/framework-mcp/src/tools/file_system/replace_text.js +8 -3
  28. package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -1
  29. package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +1 -1
  30. package/dist/framework-mcp/src/tools/file_system/write_file.js +10 -5
  31. package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
  32. package/dist/framework-mcp/src/tools/framework/audit_deps.js +2 -2
  33. package/dist/framework-mcp/src/tools/framework/audit_deps.js.map +1 -1
  34. package/dist/framework-mcp/src/tools/framework/run_tests.js +2 -2
  35. package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
  36. package/dist/framework-mcp/src/tools/framework/submit_plan.d.ts +10 -0
  37. package/dist/framework-mcp/src/tools/framework/submit_plan.js +14 -0
  38. package/dist/framework-mcp/src/tools/framework/submit_plan.js.map +1 -0
  39. package/dist/framework-mcp/src/tools/framework/update_memory.js +1 -1
  40. package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -1
  41. package/dist/framework-mcp/src/tools/index.js +2 -0
  42. package/dist/framework-mcp/src/tools/index.js.map +1 -1
  43. package/dist/framework-mcp/src/tools/memory/get_insights.js +1 -1
  44. package/dist/framework-mcp/src/tools/memory/get_insights.js.map +1 -1
  45. package/dist/framework-mcp/src/tools/messaging/log_action.js +1 -1
  46. package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -1
  47. package/dist/framework-mcp/src/tools/messaging/send_message.js +5 -5
  48. package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
  49. package/dist/framework-mcp/src/tools/observability/check_ports.js +1 -1
  50. package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
  51. package/dist/framework-mcp/src/tools/quality/check_lint.js +2 -2
  52. package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -1
  53. package/dist/framework-mcp/src/tools/search/get_gaps.js +1 -1
  54. package/dist/framework-mcp/src/tools/search/get_gaps.js.map +1 -1
  55. package/dist/framework-mcp/src/tools/search/grep_search.js +3 -3
  56. package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -1
  57. package/dist/framework-mcp/src/tools/types.d.ts +1 -0
  58. package/dist/framework-mcp/src/utils/compliance.d.ts +6 -0
  59. package/dist/framework-mcp/src/utils/compliance.js +158 -5
  60. package/dist/framework-mcp/src/utils/compliance.js.map +1 -1
  61. package/dist/framework-mcp/src/utils/permissions.d.ts +12 -0
  62. package/dist/framework-mcp/src/utils/permissions.js +72 -0
  63. package/dist/framework-mcp/src/utils/permissions.js.map +1 -0
  64. package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.d.ts +1 -0
  65. package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js +84 -0
  66. package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js.map +1 -0
  67. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +31 -31
  68. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -1
  69. package/dist/framework-mcp/tests/tools/file_system/permissions.test.d.ts +1 -0
  70. package/dist/framework-mcp/tests/tools/file_system/permissions.test.js +92 -0
  71. package/dist/framework-mcp/tests/tools/file_system/permissions.test.js.map +1 -0
  72. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +5 -5
  73. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -1
  74. package/dist/src/cli/adapters/core.js +13 -20
  75. package/dist/src/cli/adapters/core.js.map +1 -1
  76. package/dist/src/cli/adapters/scaffold.js +2 -2
  77. package/dist/src/cli/adapters/scaffold.js.map +1 -1
  78. package/dist/src/cli/commands/check.js +5 -3
  79. package/dist/src/cli/commands/check.js.map +1 -1
  80. package/dist/src/cli/commands/compliance.js +2 -2
  81. package/dist/src/cli/commands/compliance.js.map +1 -1
  82. package/dist/src/cli/commands/contract.js +2 -2
  83. package/dist/src/cli/commands/contract.js.map +1 -1
  84. package/dist/src/cli/commands/dashboard.d.ts +5 -0
  85. package/dist/src/cli/commands/dashboard.js +124 -0
  86. package/dist/src/cli/commands/dashboard.js.map +1 -0
  87. package/dist/src/cli/commands/explorer.js +3 -3
  88. package/dist/src/cli/commands/explorer.js.map +1 -1
  89. package/dist/src/cli/commands/git.js +3 -3
  90. package/dist/src/cli/commands/git.js.map +1 -1
  91. package/dist/src/cli/commands/init/create-agent.d.ts +4 -0
  92. package/dist/src/cli/commands/init/create-agent.js +59 -0
  93. package/dist/src/cli/commands/init/create-agent.js.map +1 -0
  94. package/dist/src/cli/commands/init/scaffold-core.d.ts +1 -0
  95. package/dist/src/cli/commands/init/scaffold-core.js +11 -7
  96. package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
  97. package/dist/src/cli/commands/init/scaffold-docs.d.ts +1 -0
  98. package/dist/src/cli/commands/init/scaffold-docs.js +4 -6
  99. package/dist/src/cli/commands/init/scaffold-docs.js.map +1 -1
  100. package/dist/src/cli/commands/init/scaffold-ops.js +4 -4
  101. package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -1
  102. package/dist/src/cli/commands/init/scaffold-standards.js +10 -8
  103. package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -1
  104. package/dist/src/cli/commands/init.js +26 -10
  105. package/dist/src/cli/commands/init.js.map +1 -1
  106. package/dist/src/cli/commands/knowledge.js +3 -3
  107. package/dist/src/cli/commands/knowledge.js.map +1 -1
  108. package/dist/src/cli/commands/lint.js +2 -2
  109. package/dist/src/cli/commands/lint.js.map +1 -1
  110. package/dist/src/cli/commands/log.js +6 -28
  111. package/dist/src/cli/commands/log.js.map +1 -1
  112. package/dist/src/cli/commands/orchestrate.d.ts +10 -17
  113. package/dist/src/cli/commands/orchestrate.js +92 -341
  114. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  115. package/dist/src/cli/commands/plan.d.ts +5 -0
  116. package/dist/src/cli/commands/plan.js +80 -59
  117. package/dist/src/cli/commands/plan.js.map +1 -1
  118. package/dist/src/cli/commands/script.js +3 -3
  119. package/dist/src/cli/commands/script.js.map +1 -1
  120. package/dist/src/cli/commands/security.js +2 -2
  121. package/dist/src/cli/commands/security.js.map +1 -1
  122. package/dist/src/cli/commands/status.js +65 -8
  123. package/dist/src/cli/commands/status.js.map +1 -1
  124. package/dist/src/cli/commands/trace.d.ts +4 -0
  125. package/dist/src/cli/commands/trace.js +83 -2
  126. package/dist/src/cli/commands/trace.js.map +1 -1
  127. package/dist/src/cli/index.js +68 -18
  128. package/dist/src/cli/index.js.map +1 -1
  129. package/dist/src/cli/shims.js +14 -14
  130. package/dist/src/cli/utils/claude.js +1 -1
  131. package/dist/src/cli/utils/claude.js.map +1 -1
  132. package/dist/src/cli/utils/compliance.js +7 -1
  133. package/dist/src/cli/utils/compliance.js.map +1 -1
  134. package/dist/src/cli/utils/fs.js +1 -1
  135. package/dist/src/cli/utils/fs.js.map +1 -1
  136. package/dist/src/cli/utils/i18n.d.ts +1 -0
  137. package/dist/src/cli/utils/i18n.js +2 -0
  138. package/dist/src/cli/utils/i18n.js.map +1 -1
  139. package/dist/src/cli/utils/memory.d.ts +12 -3
  140. package/dist/src/cli/utils/memory.js +39 -31
  141. package/dist/src/cli/utils/memory.js.map +1 -1
  142. package/dist/src/cli/utils/pkg.js +2 -2
  143. package/dist/src/cli/utils/pkg.js.map +1 -1
  144. package/dist/src/cli/utils/schemas.d.ts +8 -8
  145. package/dist/src/cli/utils/ui.js +4 -4
  146. package/dist/src/cli/utils/ui.js.map +1 -1
  147. package/dist/src/contracts/tasks.d.ts +2 -2
  148. package/dist/src/dashboard/vite.config.d.ts +2 -0
  149. package/dist/src/dashboard/vite.config.js +16 -0
  150. package/dist/src/dashboard/vite.config.js.map +1 -0
  151. package/dist/src/modules/adapters/definitions.js +10 -10
  152. package/dist/src/modules/adapters/definitions.js.map +1 -1
  153. package/dist/src/modules/adapters/shared.js +4 -4
  154. package/dist/src/modules/adapters/shared.js.map +1 -1
  155. package/dist/src/modules/agents/definitions.d.ts +19 -0
  156. package/dist/src/modules/agents/definitions.js +74 -21
  157. package/dist/src/modules/agents/definitions.js.map +1 -1
  158. package/dist/src/modules/agents/registry/backend.js +8 -0
  159. package/dist/src/modules/agents/registry/backend.js.map +1 -1
  160. package/dist/src/modules/agents/registry/database.js +7 -0
  161. package/dist/src/modules/agents/registry/database.js.map +1 -1
  162. package/dist/src/modules/agents/registry/devops.js +6 -0
  163. package/dist/src/modules/agents/registry/devops.js.map +1 -1
  164. package/dist/src/modules/agents/registry/frontend.js +8 -0
  165. package/dist/src/modules/agents/registry/frontend.js.map +1 -1
  166. package/dist/src/modules/agents/registry/security.js +6 -0
  167. package/dist/src/modules/agents/registry/security.js.map +1 -1
  168. package/dist/src/modules/agents/types.d.ts +2 -0
  169. package/dist/src/modules/engines/evaluation-engine.d.ts +11 -0
  170. package/dist/src/modules/engines/evaluation-engine.js +103 -0
  171. package/dist/src/modules/engines/evaluation-engine.js.map +1 -0
  172. package/dist/src/modules/engines/health-engine.d.ts +16 -0
  173. package/dist/src/modules/engines/health-engine.js +50 -0
  174. package/dist/src/modules/engines/health-engine.js.map +1 -0
  175. package/dist/src/modules/engines/planning-engine.d.ts +25 -0
  176. package/dist/src/modules/engines/planning-engine.js +79 -0
  177. package/dist/src/modules/engines/planning-engine.js.map +1 -0
  178. package/dist/src/modules/engines/risk-engine.d.ts +18 -0
  179. package/dist/src/modules/engines/risk-engine.js +106 -0
  180. package/dist/src/modules/engines/risk-engine.js.map +1 -0
  181. package/dist/src/modules/engines/routing-engine.d.ts +11 -0
  182. package/dist/src/modules/engines/routing-engine.js +74 -0
  183. package/dist/src/modules/engines/routing-engine.js.map +1 -0
  184. package/dist/src/modules/engines/types.d.ts +47 -0
  185. package/dist/src/modules/engines/types.js +2 -0
  186. package/dist/src/modules/engines/types.js.map +1 -0
  187. package/dist/src/shared/constants.d.ts +6 -2
  188. package/dist/src/shared/constants.js +5 -1
  189. package/dist/src/shared/constants.js.map +1 -1
  190. package/dist/src/shared/fs.d.ts +1 -0
  191. package/dist/src/shared/fs.js +4 -0
  192. package/dist/src/shared/fs.js.map +1 -1
  193. package/dist/src/shared/storage.d.ts +60 -0
  194. package/dist/src/shared/storage.js +208 -0
  195. package/dist/src/shared/storage.js.map +1 -0
  196. package/dist/tests/adapter.test.js +3 -2
  197. package/dist/tests/adapter.test.js.map +1 -1
  198. package/dist/tests/agent-memory-v2.test.d.ts +1 -0
  199. package/dist/tests/agent-memory-v2.test.js +68 -0
  200. package/dist/tests/agent-memory-v2.test.js.map +1 -0
  201. package/dist/tests/agents-definitions.test.js +42 -0
  202. package/dist/tests/agents-definitions.test.js.map +1 -1
  203. package/dist/tests/integration/hermes_locking.test.js +7 -10
  204. package/dist/tests/integration/hermes_locking.test.js.map +1 -1
  205. package/dist/tests/orchestrate.test.js +5 -1
  206. package/dist/tests/orchestrate.test.js.map +1 -1
  207. package/dist/tests/orchestrator-dependencies.test.d.ts +1 -0
  208. package/dist/tests/orchestrator-dependencies.test.js +52 -0
  209. package/dist/tests/orchestrator-dependencies.test.js.map +1 -0
  210. package/dist/tests/plan.test.d.ts +1 -0
  211. package/dist/tests/plan.test.js +63 -0
  212. package/dist/tests/plan.test.js.map +1 -0
  213. package/dist/tests/planning-engine.test.d.ts +1 -0
  214. package/dist/tests/planning-engine.test.js +50 -0
  215. package/dist/tests/planning-engine.test.js.map +1 -0
  216. package/dist/tests/status-cost.test.d.ts +1 -0
  217. package/dist/tests/status-cost.test.js +54 -0
  218. package/dist/tests/status-cost.test.js.map +1 -0
  219. package/dist/tests/status.test.js +8 -7
  220. package/dist/tests/status.test.js.map +1 -1
  221. package/dist/tests/trace-replay.test.d.ts +1 -0
  222. package/dist/tests/trace-replay.test.js +65 -0
  223. package/dist/tests/trace-replay.test.js.map +1 -0
  224. package/dist/tests/trace.test.js +14 -7
  225. package/dist/tests/trace.test.js.map +1 -1
  226. package/dist/ui/assets/index-Bkt7APzu.css +1 -0
  227. package/dist/ui/assets/index-CeX-06mI.js +49 -0
  228. package/dist/ui/index.html +14 -0
  229. package/framework-mcp/dist/constants.js +1 -1
  230. package/framework-mcp/{src/constants.ts → dist/framework-mcp/src/constants.js} +4 -18
  231. package/framework-mcp/{src/index.ts → dist/framework-mcp/src/index.js} +52 -53
  232. package/framework-mcp/dist/framework-mcp/src/resources/index.js +58 -0
  233. package/framework-mcp/{src/tools/control_plane/locking.ts → dist/framework-mcp/src/tools/control_plane/locking.js} +14 -21
  234. package/framework-mcp/{src/tools/control_plane/registry.ts → dist/framework-mcp/src/tools/control_plane/registry.js} +8 -11
  235. package/framework-mcp/{src/tools/definitions.ts → dist/framework-mcp/src/tools/definitions.js} +35 -5
  236. package/framework-mcp/{src/tools/file_system/batch_surgical_edit.ts → dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js} +16 -31
  237. package/framework-mcp/{src/tools/file_system/patch_file.ts → dist/framework-mcp/src/tools/file_system/patch_file.js} +9 -14
  238. package/framework-mcp/{src/tools/file_system/read_file.ts → dist/framework-mcp/src/tools/file_system/read_file.js} +9 -16
  239. package/framework-mcp/{src/tools/file_system/replace_text.ts → dist/framework-mcp/src/tools/file_system/replace_text.js} +13 -17
  240. package/framework-mcp/{src/tools/file_system/write_file.ts → dist/framework-mcp/src/tools/file_system/write_file.js} +14 -16
  241. package/framework-mcp/{src/tools/framework/audit_deps.ts → dist/framework-mcp/src/tools/framework/audit_deps.js} +9 -17
  242. package/framework-mcp/{src/tools/framework/get_status.ts → dist/framework-mcp/src/tools/framework/get_status.js} +1 -3
  243. package/framework-mcp/{src/tools/framework/orchestrate.ts → dist/framework-mcp/src/tools/framework/orchestrate.js} +1 -3
  244. package/framework-mcp/{src/tools/framework/run_tests.ts → dist/framework-mcp/src/tools/framework/run_tests.js} +9 -12
  245. package/framework-mcp/dist/framework-mcp/src/tools/framework/submit_plan.js +13 -0
  246. package/framework-mcp/{src/tools/framework/update_contract_hash.ts → dist/framework-mcp/src/tools/framework/update_contract_hash.js} +1 -3
  247. package/framework-mcp/{src/tools/framework/update_memory.ts → dist/framework-mcp/src/tools/framework/update_memory.js} +2 -4
  248. package/framework-mcp/{src/tools/index.ts → dist/framework-mcp/src/tools/index.js} +5 -7
  249. package/framework-mcp/{src/tools/memory/get_insights.ts → dist/framework-mcp/src/tools/memory/get_insights.js} +4 -11
  250. package/framework-mcp/{src/tools/memory/read_memory.ts → dist/framework-mcp/src/tools/memory/read_memory.js} +3 -6
  251. package/framework-mcp/{src/tools/messaging/log_action.ts → dist/framework-mcp/src/tools/messaging/log_action.js} +2 -8
  252. package/framework-mcp/{src/tools/messaging/send_message.ts → dist/framework-mcp/src/tools/messaging/send_message.js} +19 -22
  253. package/framework-mcp/{src/tools/observability/check_ports.ts → dist/framework-mcp/src/tools/observability/check_ports.js} +6 -10
  254. package/framework-mcp/{src/tools/observability/get_health.ts → dist/framework-mcp/src/tools/observability/get_health.js} +1 -6
  255. package/framework-mcp/{src/tools/quality/check_lint.ts → dist/framework-mcp/src/tools/quality/check_lint.js} +3 -9
  256. package/framework-mcp/{src/tools/search/get_gaps.ts → dist/framework-mcp/src/tools/search/get_gaps.js} +12 -18
  257. package/framework-mcp/{src/tools/search/get_map.ts → dist/framework-mcp/src/tools/search/get_map.js} +14 -19
  258. package/framework-mcp/{src/tools/search/grep_search.ts → dist/framework-mcp/src/tools/search/grep_search.js} +26 -26
  259. package/framework-mcp/{src/tools/search/list_dir.ts → dist/framework-mcp/src/tools/search/list_dir.js} +4 -10
  260. package/framework-mcp/{src/tools/shell/run_command.ts → dist/framework-mcp/src/tools/shell/run_command.js} +1 -11
  261. package/framework-mcp/dist/framework-mcp/src/tools/types.js +1 -0
  262. package/framework-mcp/{src/utils/cli.ts → dist/framework-mcp/src/utils/cli.js} +25 -19
  263. package/framework-mcp/dist/framework-mcp/src/utils/compliance.js +231 -0
  264. package/framework-mcp/{src/utils/fs.ts → dist/framework-mcp/src/utils/fs.js} +9 -10
  265. package/framework-mcp/{src/utils/metrics.ts → dist/framework-mcp/src/utils/metrics.js} +11 -28
  266. package/framework-mcp/dist/framework-mcp/src/utils/permissions.js +71 -0
  267. package/framework-mcp/{src/utils/security.ts → dist/framework-mcp/src/utils/security.js} +9 -15
  268. package/framework-mcp/dist/index.js +29 -5
  269. package/framework-mcp/dist/resources/index.js +58 -0
  270. package/{src/cli/adapters/core.ts → framework-mcp/dist/src/cli/adapters/core.js} +21 -41
  271. package/{src/cli/adapters/index.ts → framework-mcp/dist/src/cli/adapters/index.js} +1 -1
  272. package/{src/cli/adapters/paths.ts → framework-mcp/dist/src/cli/adapters/paths.js} +19 -53
  273. package/{src/cli/adapters/scaffold.ts → framework-mcp/dist/src/cli/adapters/scaffold.js} +18 -42
  274. package/{src/cli/adapters/utils.ts → framework-mcp/dist/src/cli/adapters/utils.js} +19 -31
  275. package/{src/cli/commands/approve.ts → framework-mcp/dist/src/cli/commands/approve.js} +15 -25
  276. package/{src/cli/commands/check.ts → framework-mcp/dist/src/cli/commands/check.js} +36 -43
  277. package/{src/cli/commands/compliance.ts → framework-mcp/dist/src/cli/commands/compliance.js} +10 -15
  278. package/{src/cli/commands/contract.ts → framework-mcp/dist/src/cli/commands/contract.js} +13 -31
  279. package/framework-mcp/dist/src/cli/commands/dashboard.js +123 -0
  280. package/{src/cli/commands/explorer.ts → framework-mcp/dist/src/cli/commands/explorer.js} +14 -17
  281. package/{src/cli/commands/git.ts → framework-mcp/dist/src/cli/commands/git.js} +15 -14
  282. package/framework-mcp/dist/src/cli/commands/init/create-agent.js +58 -0
  283. package/{src/cli/commands/init/scaffold-core.ts → framework-mcp/dist/src/cli/commands/init/scaffold-core.js} +35 -59
  284. package/framework-mcp/dist/src/cli/commands/init/scaffold-docs.js +34 -0
  285. package/{src/cli/commands/init/scaffold-ops.ts → framework-mcp/dist/src/cli/commands/init/scaffold-ops.js} +19 -22
  286. package/{src/cli/commands/init/scaffold-standards.ts → framework-mcp/dist/src/cli/commands/init/scaffold-standards.js} +20 -20
  287. package/{src/cli/commands/init.ts → framework-mcp/dist/src/cli/commands/init.js} +51 -77
  288. package/{src/cli/commands/knowledge.ts → framework-mcp/dist/src/cli/commands/knowledge.js} +9 -11
  289. package/{src/cli/commands/lint.ts → framework-mcp/dist/src/cli/commands/lint.js} +5 -6
  290. package/framework-mcp/dist/src/cli/commands/log.js +10 -0
  291. package/{src/cli/commands/memory.ts → framework-mcp/dist/src/cli/commands/memory.js} +1 -3
  292. package/framework-mcp/dist/src/cli/commands/orchestrate.js +159 -0
  293. package/framework-mcp/dist/src/cli/commands/plan.js +117 -0
  294. package/{src/cli/commands/script.ts → framework-mcp/dist/src/cli/commands/script.js} +6 -7
  295. package/{src/cli/commands/security.ts → framework-mcp/dist/src/cli/commands/security.js} +6 -8
  296. package/framework-mcp/dist/src/cli/commands/status.js +97 -0
  297. package/framework-mcp/dist/src/cli/commands/trace.js +109 -0
  298. package/{src/cli/index.ts → framework-mcp/dist/src/cli/index.js} +80 -64
  299. package/{src/cli/shims.ts → framework-mcp/dist/src/cli/shims.js} +15 -15
  300. package/{src/cli/utils/claude.ts → framework-mcp/dist/src/cli/utils/claude.js} +8 -15
  301. package/{src/cli/utils/compliance.ts → framework-mcp/dist/src/cli/utils/compliance.js} +18 -36
  302. package/{src/cli/utils/config-schema.ts → framework-mcp/dist/src/cli/utils/config-schema.js} +0 -6
  303. package/{src/cli/utils/fs.ts → framework-mcp/dist/src/cli/utils/fs.js} +34 -67
  304. package/{src/cli/utils/i18n.ts → framework-mcp/dist/src/cli/utils/i18n.js} +3 -17
  305. package/{src/cli/utils/memory.ts → framework-mcp/dist/src/cli/utils/memory.js} +87 -114
  306. package/{src/cli/utils/pkg.ts → framework-mcp/dist/src/cli/utils/pkg.js} +120 -155
  307. package/{src/cli/utils/schemas.ts → framework-mcp/dist/src/cli/utils/schemas.js} +0 -3
  308. package/{src/cli/utils/string.ts → framework-mcp/dist/src/cli/utils/string.js} +18 -24
  309. package/{src/cli/utils/time.ts → framework-mcp/dist/src/cli/utils/time.js} +4 -4
  310. package/{src/cli/utils/ui.ts → framework-mcp/dist/src/cli/utils/ui.js} +9 -17
  311. package/{src/contracts/tasks.ts → framework-mcp/dist/src/contracts/tasks.js} +0 -6
  312. package/framework-mcp/dist/src/dashboard/vite.config.js +15 -0
  313. package/framework-mcp/dist/src/modules/adapters/definitions.js +140 -0
  314. package/framework-mcp/dist/src/modules/adapters/registry.js +18 -0
  315. package/{src/modules/adapters/shared.ts → framework-mcp/dist/src/modules/adapters/shared.js} +9 -25
  316. package/framework-mcp/dist/src/modules/adapters/types.js +1 -0
  317. package/{src/modules/agents/definitions.ts → framework-mcp/dist/src/modules/agents/definitions.js} +158 -161
  318. package/{src/modules/agents/registry/analyst.ts → framework-mcp/dist/src/modules/agents/registry/analyst.js} +9 -14
  319. package/{src/modules/agents/registry/architect.ts → framework-mcp/dist/src/modules/agents/registry/architect.js} +9 -14
  320. package/{src/modules/agents/registry/backend.ts → framework-mcp/dist/src/modules/agents/registry/backend.js} +16 -13
  321. package/{src/modules/agents/registry/database.ts → framework-mcp/dist/src/modules/agents/registry/database.js} +16 -14
  322. package/{src/modules/agents/registry/devops.ts → framework-mcp/dist/src/modules/agents/registry/devops.js} +15 -14
  323. package/{src/modules/agents/registry/explorer.ts → framework-mcp/dist/src/modules/agents/registry/explorer.js} +9 -14
  324. package/{src/modules/agents/registry/frontend.ts → framework-mcp/dist/src/modules/agents/registry/frontend.js} +17 -14
  325. package/{src/modules/agents/registry/git.ts → framework-mcp/dist/src/modules/agents/registry/git.js} +9 -14
  326. package/{src/modules/agents/registry/manager.ts → framework-mcp/dist/src/modules/agents/registry/manager.js} +10 -15
  327. package/{src/modules/agents/registry/mobile.ts → framework-mcp/dist/src/modules/agents/registry/mobile.js} +9 -14
  328. package/{src/modules/agents/registry/native.ts → framework-mcp/dist/src/modules/agents/registry/native.js} +9 -14
  329. package/{src/modules/agents/registry/quality.ts → framework-mcp/dist/src/modules/agents/registry/quality.js} +9 -14
  330. package/{src/modules/agents/registry/security.ts → framework-mcp/dist/src/modules/agents/registry/security.js} +15 -14
  331. package/framework-mcp/dist/src/modules/agents/types.js +1 -0
  332. package/framework-mcp/dist/src/modules/engines/evaluation-engine.js +102 -0
  333. package/framework-mcp/dist/src/modules/engines/health-engine.js +49 -0
  334. package/framework-mcp/dist/src/modules/engines/planning-engine.js +78 -0
  335. package/framework-mcp/dist/src/modules/engines/risk-engine.js +105 -0
  336. package/framework-mcp/dist/src/modules/engines/routing-engine.js +73 -0
  337. package/framework-mcp/dist/src/modules/engines/types.js +1 -0
  338. package/{src/modules/skills/definitions.ts → framework-mcp/dist/src/modules/skills/definitions.js} +0 -1
  339. package/{src/shared/constants.ts → framework-mcp/dist/src/shared/constants.js} +40 -71
  340. package/{src/shared/errors.ts → framework-mcp/dist/src/shared/errors.js} +10 -17
  341. package/{src/shared/fs.ts → framework-mcp/dist/src/shared/fs.js} +14 -13
  342. package/{src/shared/logger.ts → framework-mcp/dist/src/shared/logger.js} +28 -51
  343. package/framework-mcp/dist/src/shared/storage.js +207 -0
  344. package/framework-mcp/dist/src/shared/types.js +12 -0
  345. package/framework-mcp/dist/tools/control_plane/locking.js +3 -3
  346. package/framework-mcp/dist/tools/control_plane/registry.js +3 -2
  347. package/framework-mcp/dist/tools/definitions.js +33 -1
  348. package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +8 -3
  349. package/framework-mcp/dist/tools/file_system/patch_file.js +8 -3
  350. package/framework-mcp/dist/tools/file_system/read_file.js +3 -3
  351. package/framework-mcp/dist/tools/file_system/replace_text.js +8 -3
  352. package/framework-mcp/dist/tools/file_system/write_file.js +10 -5
  353. package/framework-mcp/dist/tools/framework/audit_deps.js +2 -2
  354. package/framework-mcp/dist/tools/framework/run_tests.js +2 -2
  355. package/framework-mcp/dist/tools/framework/submit_plan.js +13 -0
  356. package/framework-mcp/dist/tools/framework/update_memory.js +1 -1
  357. package/framework-mcp/dist/tools/index.js +2 -0
  358. package/framework-mcp/dist/tools/memory/get_insights.js +1 -1
  359. package/framework-mcp/dist/tools/messaging/log_action.js +1 -1
  360. package/framework-mcp/dist/tools/messaging/send_message.js +5 -5
  361. package/framework-mcp/dist/tools/observability/check_ports.js +1 -1
  362. package/framework-mcp/dist/tools/quality/check_lint.js +2 -2
  363. package/framework-mcp/dist/tools/search/get_gaps.js +1 -1
  364. package/framework-mcp/dist/tools/search/grep_search.js +3 -3
  365. package/framework-mcp/dist/utils/compliance.js +158 -5
  366. package/framework-mcp/dist/utils/permissions.js +71 -0
  367. package/framework-mcp/package.json +7 -1
  368. package/mcp.json +1 -1
  369. package/package.json +10 -6
  370. package/templates/prompts/contract-design-recipe.md +1 -1
  371. package/templates/prompts/db-management-recipe.md +3 -3
  372. package/templates/prompts/deployment-recipe.md +3 -3
  373. package/templates/prompts/performance-optimization-recipe.md +3 -3
  374. package/templates/prompts/pull-request-template.md +2 -2
  375. package/templates/prompts/security-audit-recipe.md +3 -3
  376. package/templates/standards/crud-governance.md +1 -1
  377. package/templates/standards/deployment-standards.md +1 -1
  378. package/templates/standards/governance-standards.md +1 -1
  379. package/templates/standards/llm-governance.md +1 -1
  380. package/templates/standards/nextjs-standards.md +13 -0
  381. package/templates/standards/observability-standards.md +1 -1
  382. package/templates/standards/security-audit-standards.md +1 -1
  383. package/templates/standards/security-standards.md +1 -1
  384. package/templates/standards/testing-standards.md +1 -1
  385. package/templates/standards/vite-standards.md +13 -0
  386. package/framework-mcp/package-lock.json +0 -1191
  387. package/framework-mcp/src/declarations.d.ts +0 -17
  388. package/framework-mcp/src/tools/types.ts +0 -89
  389. package/framework-mcp/src/utils/compliance.ts +0 -95
  390. package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +0 -212
  391. package/framework-mcp/tests/tools/messaging/send_message.test.ts +0 -136
  392. package/framework-mcp/tests/tools/quality/check_lint.test.ts +0 -46
  393. package/framework-mcp/tests/tools/shell/run_command.test.ts +0 -55
  394. package/framework-mcp/tsconfig.json +0 -14
  395. package/src/cli/commands/init/scaffold-docs.ts +0 -44
  396. package/src/cli/commands/log.ts +0 -37
  397. package/src/cli/commands/orchestrate.ts +0 -450
  398. package/src/cli/commands/plan.ts +0 -113
  399. package/src/cli/commands/status.ts +0 -44
  400. package/src/cli/commands/trace.ts +0 -31
  401. package/src/modules/adapters/definitions.ts +0 -171
  402. package/src/modules/adapters/registry.ts +0 -27
  403. package/src/modules/adapters/types.ts +0 -16
  404. package/src/modules/agents/types.ts +0 -37
  405. package/src/schema/agent-lifecycle-schema.json +0 -59
  406. package/src/shared/types.ts +0 -20
  407. /package/{src/contracts/index.ts → framework-mcp/dist/src/contracts/index.js} +0 -0
@@ -1,7 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
3
  import { execSync } from "child_process";
4
-
5
4
  import { getFrameworkDir, getMemoryPath, getConfiguredPaths, isFrameworkDevelopmentRepo, readState } from "../utils/memory.js";
6
5
  import { getPackageVersion, getValidatorPath } from "../utils/pkg.js";
7
6
  import { UI } from "../utils/ui.js";
@@ -9,25 +8,19 @@ import { logger } from "../../shared/logger.js";
9
8
  import { scanProjectCompliance } from "../utils/compliance.js";
10
9
  import { ALL_AGENTS } from "../../modules/agents/definitions.js";
11
10
  import { detectActiveAgentLayouts, findAgentInstruction } from "../adapters/paths.js";
12
-
13
11
  import { verifyApiContractCommand } from "./contract.js";
14
-
15
12
  export async function checkCommand() {
16
13
  UI.intent("Agent Atabey Health Check", `Checking system health and discipline rules (v${getPackageVersion()})...`);
17
14
  let issues = 0;
18
-
19
15
  const state = readState();
20
16
  if (!state) {
21
17
  UI.error("Memory state not found. Run 'init' first.");
22
18
  return;
23
19
  }
24
-
25
20
  const frameworkDir = getFrameworkDir();
26
21
  const memoryPath = getMemoryPath();
27
22
  const pathsMap = getConfiguredPaths();
28
-
29
23
  UI.success(`Using framework dir: ${frameworkDir}`);
30
-
31
24
  // --- Contract Gate (Phase 2+ Discipline) ---
32
25
  if (["PHASE_2", "PHASE_3", "PHASE_4"].includes(state.phase)) {
33
26
  console.warn("\n📝 Validating API Contracts (Phase 2+ Required)...");
@@ -36,30 +29,27 @@ export async function checkCommand() {
36
29
  if (!contractOk) {
37
30
  UI.error("Contract verification FAILED! You cannot be in Phase 2+ with unverified contracts.");
38
31
  issues++;
39
- } else {
32
+ }
33
+ else {
40
34
  UI.success("API Contracts verified and sealed.");
41
35
  }
42
- } catch {
36
+ }
37
+ catch {
43
38
  UI.error("Error during contract verification.");
44
39
  issues++;
45
40
  }
46
41
  }
47
-
48
42
  let knowledgeDir = "knowledge";
49
- if (frameworkDir === ".github") knowledgeDir = "instructions";
50
-
43
+ if (frameworkDir === ".github")
44
+ knowledgeDir = "instructions";
51
45
  const constitutionPath = fs.existsSync(path.join(process.cwd(), "ATABEY.md")) ? "ATABEY.md" : path.join(frameworkDir, "ATABEY.md");
52
-
53
46
  const rootPandaPath = path.join(process.cwd(), "panda.config.ts");
54
47
  const appPandaPath = path.join(pathsMap.frontend, "panda.config.ts");
55
-
56
48
  if (fs.existsSync(rootPandaPath)) {
57
49
  UI.error(`Panda CSS config must NOT be at the root directory! Move it to '${pathsMap.frontend}/panda.config.ts'.`);
58
50
  issues++;
59
51
  }
60
-
61
52
  const isFrameworkDevelopment = isFrameworkDevelopmentRepo();
62
-
63
53
  const checks = [
64
54
  { name: "Constitution (ATABEY.md)", path: constitutionPath },
65
55
  { name: "Memory (PROJECT_MEMORY.md)", path: path.relative(process.cwd(), memoryPath) },
@@ -72,6 +62,8 @@ export async function checkCommand() {
72
62
  { name: "CRUD Governance Standards", path: path.join(frameworkDir, `${knowledgeDir}/crud-governance.md`) },
73
63
  { name: "Architecture Standards", path: path.join(frameworkDir, `${knowledgeDir}/architecture-standards.md`) },
74
64
  { name: "Frontend Standards", path: path.join(frameworkDir, `${knowledgeDir}/frontend-standards.md`) },
65
+ { name: "Vite Standards", path: path.join(frameworkDir, `${knowledgeDir}/vite-standards.md`), optional: true },
66
+ { name: "Next.js Standards", path: path.join(frameworkDir, `${knowledgeDir}/nextjs-standards.md`), optional: true },
75
67
  { name: "Tailwind Standards", path: path.join(frameworkDir, `${knowledgeDir}/tailwind-standards.md`), optional: true },
76
68
  { name: "Mobile Standards", path: path.join(frameworkDir, `${knowledgeDir}/mobile-standards.md`) },
77
69
  { name: "Security Standards", path: path.join(frameworkDir, `${knowledgeDir}/security-standards.md`) },
@@ -83,56 +75,56 @@ export async function checkCommand() {
83
75
  ...(isFrameworkDevelopment ? [{ name: "MCP Server", path: "framework-mcp/package.json" }] : []),
84
76
  { name: "Panda CSS Config", path: appPandaPath, optional: true },
85
77
  ];
86
-
87
78
  for (const check of checks) {
88
79
  const fullPath = path.isAbsolute(check.path) ? check.path : path.join(process.cwd(), check.path);
89
80
  if (fs.existsSync(fullPath)) {
90
81
  UI.success(`${check.name} found.`);
91
- } else {
82
+ }
83
+ else {
92
84
  if (check.optional) {
93
85
  UI.warning(`${check.name} MISSING! (${check.path}) [Optional]`);
94
- } else {
86
+ }
87
+ else {
95
88
  UI.error(`${check.name} MISSING! (${check.path})`);
96
89
  issues++;
97
90
  }
98
91
  }
99
92
  }
100
-
101
93
  // Agent Army Check
102
- console.warn("\n🛡️ Running Agent Army Compliance...");
94
+ console.warn("\n[SECURITY] Running Agent Army Compliance...");
103
95
  try {
104
96
  const validatorScript = getValidatorPath();
105
97
  execSync(`node "${validatorScript}"`, { stdio: "pipe" });
106
98
  UI.success("Agent Army AL validation PASSED.");
107
- } catch (error: unknown) {
108
- const err = error as Error & { stderr?: Buffer };
99
+ }
100
+ catch (error) {
101
+ const err = error;
109
102
  UI.error(`Agent Army AL validation FAILED: ${err.message}`);
110
- if (err.stderr) console.error(err.stderr.toString());
103
+ if (err.stderr)
104
+ console.error(err.stderr.toString());
111
105
  issues++;
112
106
  }
113
-
114
107
  // Agent Documentation Check (Live Integrity)
115
108
  console.warn("\n📚 Checking Agent Integrity (Instructions)...");
116
-
117
109
  const projectRoot = process.cwd();
118
110
  const activeLayouts = detectActiveAgentLayouts(projectRoot);
119
-
120
111
  if (activeLayouts.length > 0) {
121
112
  UI.success(`Active agent layout(s): ${activeLayouts.join(", ")}`);
122
113
  ALL_AGENTS.forEach((agent) => {
123
114
  const found = findAgentInstruction(projectRoot, agent.name);
124
115
  if (found) {
125
116
  UI.success(`Instructions for @${agent.name} found at ${found}`);
126
- } else {
117
+ }
118
+ else {
127
119
  UI.error(`Instructions for @${agent.name} MISSING! Run 'atabey init' to scaffold.`);
128
120
  issues++;
129
121
  }
130
122
  });
131
- } else {
123
+ }
124
+ else {
132
125
  UI.warning("No active agent instruction directory detected. Run 'atabey init [adapter]' first.");
133
126
  issues++;
134
127
  }
135
-
136
128
  // Code Quality - Using the new Compliance Scanner
137
129
  console.warn("\n⚖️ Checking Discipline (Code Quality)...");
138
130
  const complianceIssues = scanProjectCompliance();
@@ -141,37 +133,37 @@ export async function checkCommand() {
141
133
  UI.error(`${issue.rule} in ${issue.file}:${issue.line}`);
142
134
  });
143
135
  issues += complianceIssues.length;
144
- } else {
136
+ }
137
+ else {
145
138
  UI.success("No compliance issues detected.");
146
139
  }
147
-
148
140
  const rootTestFiles = checkRootTestFiles();
149
141
  if (rootTestFiles.length > 0) {
150
142
  UI.warning(`Test files found in the root directory: ${rootTestFiles.join(", ")}. It is recommended to place all test files under the 'tests/' folder or application-specific directories.`);
151
143
  }
152
-
153
144
  try {
154
145
  UI.intent("Type Check", "Running 'npx tsc --noEmit' (this may take a few seconds)...");
155
146
  execSync("npx tsc --noEmit", { stdio: "pipe" });
156
147
  UI.success("TypeScript type check PASSED.");
157
- } catch (err) {
148
+ }
149
+ catch (err) {
158
150
  UI.warning("TypeScript type check FAILED or 'tsc' not found. This is a non-blocking warning for lightweight checks.");
159
151
  logger.debug("npx tsc --noEmit check failed", err);
160
152
  }
161
-
162
153
  if (issues === 0) {
163
- UI.success("\n🚀 All systems green! Agent Atabey is ready.");
164
- } else {
165
- UI.error(`\n⚠️ Found ${issues} issues. Please fix them.`);
154
+ UI.success("\n[START] All systems green! Agent Atabey is ready.");
155
+ }
156
+ else {
157
+ UI.error(`\n[WARN] Found ${issues} issues. Please fix them.`);
166
158
  process.exit(1);
167
159
  }
168
160
  }
169
-
170
- function checkRootTestFiles(): string[] {
161
+ function checkRootTestFiles() {
171
162
  const rootDir = process.cwd();
172
- if (!fs.existsSync(rootDir)) return [];
163
+ if (!fs.existsSync(rootDir))
164
+ return [];
173
165
  const files = fs.readdirSync(rootDir);
174
- const testFiles: string[] = [];
166
+ const testFiles = [];
175
167
  for (const file of files) {
176
168
  const fullPath = path.join(rootDir, file);
177
169
  try {
@@ -180,7 +172,8 @@ function checkRootTestFiles(): string[] {
180
172
  testFiles.push(file);
181
173
  }
182
174
  }
183
- } catch (err) {
175
+ }
176
+ catch (err) {
184
177
  logger.debug(`Failed to stat file ${fullPath} in checkRootTestFiles`, err);
185
178
  }
186
179
  }
@@ -1,15 +1,11 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
-
4
3
  import { collectFiles } from "../utils/fs.js";
5
-
6
4
  const targetDir = process.cwd(); // Assuming targetDir is process.cwd() in the CLI context
7
-
8
- export async function complianceCheckCommand(targetPath: string) {
5
+ export async function complianceCheckCommand(targetPath) {
9
6
  console.warn(`📜 Checking Constitution Compliance: ${targetPath}...`);
10
- const violations: string[] = [];
7
+ const violations = [];
11
8
  const forbidden = ["@shadcn", "mui", "@chakra-ui", "tailwindcss"];
12
-
13
9
  // 1. package.json scan (Blind Spot 5)
14
10
  const pkgJsonPath = path.join(targetDir, "package.json");
15
11
  if (fs.existsSync(pkgJsonPath)) {
@@ -21,21 +17,20 @@ export async function complianceCheckCommand(targetPath: string) {
21
17
  violations.push(`package.json: Forbidden library dependency '${lib}' found in package.json.`);
22
18
  }
23
19
  });
24
- } catch {
20
+ }
21
+ catch {
25
22
  // ignore
26
23
  }
27
24
  }
28
-
29
25
  // 2. Source files scan
30
26
  const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx", ".js", ".jsx", ".md"]);
31
27
  files.forEach(f => {
32
28
  const isTypesFile = f.includes("brands.ts") || f.includes("brands.js") || f.includes("brands.tsx") || f.includes("src/types/brands");
33
-
34
29
  const content = fs.readFileSync(f, "utf8");
35
30
  forbidden.forEach(lib => {
36
- if (content.includes(lib)) violations.push(`${path.relative(targetDir, f)}: Forbidden library '${lib}' found.`);
31
+ if (content.includes(lib))
32
+ violations.push(`${path.relative(targetDir, f)}: Forbidden library '${lib}' found.`);
37
33
  });
38
-
39
34
  // Robust Branded Types validation (Blind Spot 4)
40
35
  if ((f.endsWith(".ts") || f.endsWith(".tsx")) && !isTypesFile && content.includes("interface")) {
41
36
  const plainIdMatches = content.match(/\b\w*(?:id|Id|ID)\??\s*:\s*(?:string|number)\b/g);
@@ -46,10 +41,10 @@ export async function complianceCheckCommand(targetPath: string) {
46
41
  }
47
42
  }
48
43
  });
49
-
50
44
  if (violations.length === 0) {
51
- console.warn(" All systems compliant with ATABEY.md.");
52
- } else {
53
- violations.forEach(v => console.warn(`❌ ${v}`));
45
+ console.warn("[OK] All systems compliant with ATABEY.md.");
46
+ }
47
+ else {
48
+ violations.forEach(v => console.warn(`[ERROR] ${v}`));
54
49
  }
55
50
  }
@@ -3,41 +3,32 @@ import fs from "fs";
3
3
  import { getConfiguredPaths } from "../utils/memory.js";
4
4
  import { computeTypesHash, writeJsonFile } from "../utils/fs.js";
5
5
  import { ValidationError } from "../../shared/errors.js";
6
-
7
6
  /**
8
7
  * Verify type safety between backend and frontend contracts.
9
8
  */
10
- export async function verifyApiContractCommand(options: { silent?: boolean } = {}): Promise<boolean> {
9
+ export async function verifyApiContractCommand(options = {}) {
11
10
  const projectRoot = process.cwd();
12
11
  const pathsMap = getConfiguredPaths();
13
12
  const sharedDir = path.join(projectRoot, pathsMap.backend, "src/types");
14
13
  const contractPath = path.join(projectRoot, pathsMap.backend, "contract.version.json");
15
-
16
14
  if (!fs.existsSync(sharedDir) || !fs.existsSync(contractPath)) {
17
- if (options.silent) return false;
18
- throw new ValidationError(
19
- "API types or contract version file missing.",
20
- null,
21
- "Ensure you have initialized the project and the backend directory is correctly configured in config.json."
22
- );
15
+ if (options.silent)
16
+ return false;
17
+ throw new ValidationError("API types or contract version file missing.", null, "Ensure you have initialized the project and the backend directory is correctly configured in config.json.");
23
18
  }
24
-
25
19
  const currentHash = computeTypesHash(projectRoot, sharedDir);
26
20
  const contract = JSON.parse(fs.readFileSync(contractPath, "utf8"));
27
-
28
21
  if (contract.contract_hash === currentHash) {
29
- if (!options.silent) console.warn("✅ Contract is valid and synchronized.");
22
+ if (!options.silent)
23
+ console.warn("[OK] Contract is valid and synchronized.");
30
24
  return true;
31
- } else {
32
- if (options.silent) return false;
33
- throw new ValidationError(
34
- "Contract drift detected!",
35
- { stored: contract.contract_hash, actual: currentHash },
36
- "Run 'npx atabey update-contract' to re-synchronize the API contracts."
37
- );
25
+ }
26
+ else {
27
+ if (options.silent)
28
+ return false;
29
+ throw new ValidationError("Contract drift detected!", { stored: contract.contract_hash, actual: currentHash }, "Run 'npx atabey update-contract' to re-synchronize the API contracts.");
38
30
  }
39
31
  }
40
-
41
32
  /**
42
33
  * Update and synchronize type safety between backend and frontend contracts.
43
34
  */
@@ -46,23 +37,14 @@ export async function updateApiContractCommand() {
46
37
  const pathsMap = getConfiguredPaths();
47
38
  const sharedDir = path.join(projectRoot, pathsMap.backend, "src/types");
48
39
  const contractPath = path.join(projectRoot, pathsMap.backend, "contract.version.json");
49
-
50
40
  if (!fs.existsSync(sharedDir)) {
51
- throw new ValidationError(
52
- "API types directory missing.",
53
- null,
54
- "The directory specified for backend types does not exist. Check your framework configuration."
55
- );
41
+ throw new ValidationError("API types directory missing.", null, "The directory specified for backend types does not exist. Check your framework configuration.");
56
42
  }
57
-
58
43
  const currentHash = computeTypesHash(projectRoot, sharedDir);
59
-
60
44
  const contractData = {
61
45
  contract_hash: currentHash,
62
46
  last_updated: new Date().toISOString()
63
47
  };
64
-
65
48
  writeJsonFile(contractPath, contractData);
66
- console.warn(`✅ Contract successfully synchronized. New hash: ${currentHash}`);
49
+ console.warn(`[OK] Contract successfully synchronized. New hash: ${currentHash}`);
67
50
  }
68
-
@@ -0,0 +1,123 @@
1
+ import http from "http";
2
+ import fs from "fs";
3
+ import path from "path";
4
+ import { fileURLToPath } from "url";
5
+ import { getFrameworkDir } from "../utils/memory.js";
6
+ import { UI } from "../utils/ui.js";
7
+ import { FRAMEWORK } from "../../shared/constants.js";
8
+ /**
9
+ * Serves a JSON file.
10
+ */
11
+ function serveJson(res, filePath) {
12
+ if (fs.existsSync(filePath)) {
13
+ try {
14
+ const content = fs.readFileSync(filePath, "utf8");
15
+ res.writeHead(200, { "Content-Type": "application/json" });
16
+ res.end(content);
17
+ }
18
+ catch (e) {
19
+ res.writeHead(500);
20
+ res.end(JSON.stringify({ error: "Read Error", message: e.message }));
21
+ }
22
+ }
23
+ else {
24
+ res.writeHead(404);
25
+ res.end(JSON.stringify({ error: "Not Found", path: filePath }));
26
+ }
27
+ }
28
+ /**
29
+ * Serves a file with specific content type.
30
+ */
31
+ function serveFile(res, filePath, contentType) {
32
+ if (fs.existsSync(filePath)) {
33
+ try {
34
+ const content = fs.readFileSync(filePath);
35
+ res.writeHead(200, { "Content-Type": contentType });
36
+ res.end(content);
37
+ }
38
+ catch (e) {
39
+ res.writeHead(500);
40
+ res.end(e.message);
41
+ }
42
+ }
43
+ else {
44
+ res.writeHead(404);
45
+ res.end("Not Found");
46
+ }
47
+ }
48
+ /**
49
+ * 🖥️ Hermes Visual Control Plane (Dashboard Server)
50
+ * Serves the framework state as a JSON API and the bundled Web UI.
51
+ */
52
+ export async function dashboardCommand(port = FRAMEWORK.DASHBOARD_PORT) {
53
+ const frameworkDir = getFrameworkDir();
54
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
55
+ const projectRoot = path.resolve(__dirname, "../../../");
56
+ const uiDistPath = path.join(projectRoot, "dist/ui");
57
+ const server = http.createServer((req, res) => {
58
+ // CORS Headers
59
+ res.setHeader("Access-Control-Allow-Origin", "*");
60
+ res.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
61
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type");
62
+ if (req.method === "OPTIONS") {
63
+ res.writeHead(204);
64
+ res.end();
65
+ return;
66
+ }
67
+ const url = req.url || "/";
68
+ // API Routes
69
+ if (url === "/api/status") {
70
+ const statusPath = path.join(frameworkDir, "memory", "status.json");
71
+ serveJson(res, statusPath);
72
+ return;
73
+ }
74
+ if (url === "/api/memory") {
75
+ const memoryPath = path.join(frameworkDir, "memory", "PROJECT_MEMORY.md");
76
+ serveFile(res, memoryPath, "text/markdown");
77
+ return;
78
+ }
79
+ if (url.startsWith("/api/logs/")) {
80
+ const agent = url.replace("/api/logs/", "");
81
+ const logPath = path.join(frameworkDir, "logs", `${agent}.json`);
82
+ serveJson(res, logPath);
83
+ return;
84
+ }
85
+ if (url === "/api/health") {
86
+ res.writeHead(200, { "Content-Type": "application/json" });
87
+ res.end(JSON.stringify({ status: "healthy", version: "0.0.6", frameworkDir }));
88
+ return;
89
+ }
90
+ // Static UI Serving
91
+ let filePath = path.join(uiDistPath, url === "/" ? "index.html" : url);
92
+ // Fallback to index.html for SPA routing if file not found
93
+ if (!fs.existsSync(filePath) && !url.startsWith("/api")) {
94
+ filePath = path.join(uiDistPath, "index.html");
95
+ }
96
+ if (fs.existsSync(filePath) && !fs.statSync(filePath).isDirectory()) {
97
+ const ext = path.extname(filePath).toLowerCase();
98
+ const mimeTypes = {
99
+ ".html": "text/html",
100
+ ".js": "application/javascript",
101
+ ".css": "text/css",
102
+ ".json": "application/json",
103
+ ".png": "image/png",
104
+ ".jpg": "image/jpg",
105
+ ".gif": "image/gif",
106
+ ".svg": "image/svg+xml",
107
+ ".ico": "image/x-icon",
108
+ };
109
+ const contentType = mimeTypes[ext] || "application/octet-stream";
110
+ serveFile(res, filePath, contentType);
111
+ }
112
+ else {
113
+ res.writeHead(404, { "Content-Type": "application/json" });
114
+ res.end(JSON.stringify({ error: "Not Found", message: "Route not found" }));
115
+ }
116
+ });
117
+ server.listen(port, () => {
118
+ UI.success("\n[START] Hermes Visual Control Plane is running!");
119
+ UI.success(`[INFO] Web UI: http://localhost:${port}`);
120
+ UI.success(`[DATA] API Base: http://localhost:${port}/api`);
121
+ UI.warning("\n(Press Ctrl+C to stop the server)\n");
122
+ });
123
+ }
@@ -1,14 +1,11 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
-
4
3
  import { collectFiles } from "../utils/fs.js";
5
-
6
4
  const targetDir = process.cwd();
7
-
8
- export async function explorerGraphCommand(targetPath: string) {
5
+ export async function explorerGraphCommand(targetPath) {
9
6
  console.warn(`🗺️ Generating Dependency Graph for: ${targetPath}...`);
10
7
  const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx"]);
11
- const edges: string[] = [];
8
+ const edges = [];
12
9
  files.forEach((f) => {
13
10
  const content = fs.readFileSync(f, "utf8");
14
11
  const name = path.basename(f, path.extname(f));
@@ -20,26 +17,26 @@ export async function explorerGraphCommand(targetPath: string) {
20
17
  });
21
18
  if (edges.length === 0) {
22
19
  console.warn("ℹ️ No internal dependencies found.");
23
- } else {
24
- console.warn(
25
- "```mermaid\ngraph TD\n" + Array.from(new Set(edges)).join("\n") + "\n```",
26
- );
20
+ }
21
+ else {
22
+ console.warn("```mermaid\ngraph TD\n" + Array.from(new Set(edges)).join("\n") + "\n```");
27
23
  }
28
24
  }
29
-
30
- export async function explorerAuditCommand(targetPath: string) {
31
- console.warn(`🧠 Codebase Intelligence Scan: ${targetPath}...`);
25
+ export async function explorerAuditCommand(targetPath) {
26
+ console.warn(`[MEMORY] Codebase Intelligence Scan: ${targetPath}...`);
32
27
  const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx"]);
33
- const complexity: string[] = [];
28
+ const complexity = [];
34
29
  files.forEach((f) => {
35
30
  const content = fs.readFileSync(f, "utf8");
36
31
  const lines = content.split("\n").length;
37
- if (lines > 300) complexity.push(`${path.relative(targetDir, f)} (${lines} lines)`);
32
+ if (lines > 300)
33
+ complexity.push(`${path.relative(targetDir, f)} (${lines} lines)`);
38
34
  });
39
35
  if (complexity.length > 0) {
40
- console.warn("\n⚠️ Complexity Spikes:");
36
+ console.warn("\n[WARN] Complexity Spikes:");
41
37
  complexity.forEach((c) => console.warn(`- ${c}`));
42
- } else {
43
- console.warn("✅ Codebase structure looks clean.");
38
+ }
39
+ else {
40
+ console.warn("[OK] Codebase structure looks clean.");
44
41
  }
45
42
  }
@@ -1,8 +1,7 @@
1
1
  import cp from "child_process";
2
2
  import path from "path";
3
3
  import { getConfiguredPaths } from "../utils/memory.js";
4
-
5
- export async function gitCommitCommand(traceId: string) {
4
+ export async function gitCommitCommand(traceId) {
6
5
  try {
7
6
  const diff = cp.execSync("git diff --staged", { encoding: "utf8" });
8
7
  if (!diff) {
@@ -16,24 +15,26 @@ export async function gitCommitCommand(traceId: string) {
16
15
  const backendTypesPath = path.join(pathsMap.backend, "src/types");
17
16
  let type = "feat";
18
17
  const scope = "code";
19
- if (files.some((f) => f.includes(".md"))) type = "docs";
20
- else if (files.some((f) => f.includes(backendTypesPath))) type = "arch";
21
- else if (files.some((f) => f.includes("bin/cli.js"))) type = "fix";
22
-
23
- const summary =
24
- files.length === 1 ? `update ${path.basename(files[0])}` : `update ${files.length} files`;
18
+ if (files.some((f) => f.includes(".md")))
19
+ type = "docs";
20
+ else if (files.some((f) => f.includes(backendTypesPath)))
21
+ type = "arch";
22
+ else if (files.some((f) => f.includes("bin/cli.js")))
23
+ type = "fix";
24
+ const summary = files.length === 1 ? `update ${path.basename(files[0])}` : `update ${files.length} files`;
25
25
  console.warn(`\n### SUGGESTED COMMIT MESSAGE ###\n\n[${traceId}] ${type}(${scope}): ${summary}\n`);
26
- } catch {
27
- console.warn("❌ Git command failed.");
26
+ }
27
+ catch {
28
+ console.warn("[ERROR] Git command failed.");
28
29
  }
29
30
  }
30
-
31
31
  export async function gitSyncCommand() {
32
32
  console.warn("🔄 Syncing with remote repository...");
33
33
  try {
34
34
  cp.execSync("git pull origin main --rebase", { stdio: "inherit" });
35
- console.warn(" Successfully synced and rebased.");
36
- } catch {
37
- console.warn("❌ Sync failed. Please resolve conflicts manually.");
35
+ console.warn("[OK] Successfully synced and rebased.");
36
+ }
37
+ catch {
38
+ console.warn("[ERROR] Sync failed. Please resolve conflicts manually.");
38
39
  }
39
40
  }
@@ -0,0 +1,58 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import { UI } from "../../utils/ui.js";
4
+ import { writeTextFile } from "../../../shared/fs.js";
5
+ /**
6
+ * Plugin SDK: Creates a new custom agent template.
7
+ */
8
+ export async function createAgentCommand(name) {
9
+ const projectRoot = process.cwd();
10
+ const agentsDir = path.join(projectRoot, "src/modules/agents/registry");
11
+ if (!fs.existsSync(agentsDir)) {
12
+ UI.error("Ajan kayıt dizini bulunamadı. Lütfen Atabey geliştirme ortamında olduğunuzdan emin olun.");
13
+ return;
14
+ }
15
+ const filePath = path.join(agentsDir, `${name}.ts`);
16
+ if (fs.existsSync(filePath)) {
17
+ UI.error(`Ajan '${name}' zaten mevcut.`);
18
+ return;
19
+ }
20
+ const template = `import { AgentDefinition } from "../types.js";
21
+
22
+ const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
23
+
24
+ export const ${name}: AgentDefinition = {
25
+ name: "${name}",
26
+ displayName: "${name.charAt(0).toUpperCase() + name.slice(1)} Specialist",
27
+ role: "Custom Specialty",
28
+ description: "Automatically generated custom agent for specific project needs.",
29
+ capability: 7,
30
+ tier: "core",
31
+ tags: ["custom"],
32
+ stateMachine: STATE_MACHINE,
33
+ tools: [
34
+ "read_file",
35
+ "write_file",
36
+ "replace_text",
37
+ "grep_search",
38
+ "send_agent_message",
39
+ ],
40
+ instructions: {
41
+ identity: "${name.toUpperCase()} Domain Expert",
42
+ mission: "Execute tasks related to ${name} with high precision and following Atabey standards.",
43
+ chainOfThought: "1. Analyze Task\\n2. Plan Steps\\n3. Execute\\n4. Verify",
44
+ rules: [
45
+ "Always maintain type safety.",
46
+ "Log all critical actions.",
47
+ ],
48
+ knowledgeFiles: [],
49
+ },
50
+ specialties: {
51
+ ${name}: 10,
52
+ },
53
+ };
54
+ `;
55
+ writeTextFile(filePath, template);
56
+ UI.success(`[OK] New agent '${name}' created at src/modules/agents/registry/${name}.ts`);
57
+ UI.warning("[INFO] Don't forget to register the agent in src/modules/agents/definitions.ts");
58
+ }