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
@@ -0,0 +1,49 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import { getFrameworkDir } from "../../cli/utils/memory.js";
4
+ import { ensureDir, writeJsonFile } from "../../shared/fs.js";
5
+ /**
6
+ * [DATA] Evaluation & Health Engine
7
+ * Rates agent performance and tracks overall project stability.
8
+ */
9
+ export class HealthEngine {
10
+ /**
11
+ * Records a post-task evaluation.
12
+ */
13
+ static async recordEvaluation(result) {
14
+ const evalDir = path.join(getFrameworkDir(), "memory", "evaluations");
15
+ ensureDir(evalDir);
16
+ const filePath = path.join(evalDir, `${result.traceId}_${result.agent}.json`);
17
+ writeJsonFile(filePath, result);
18
+ // Trigger health update
19
+ await this.updateProjectHealth();
20
+ }
21
+ /**
22
+ * Aggregates all data to calculate the overall Project Health.
23
+ */
24
+ static async updateProjectHealth() {
25
+ // This would normally read compliance reports, test results, and recent evaluations
26
+ // Prototyping with semi-static values for now
27
+ const health = {
28
+ score: 85,
29
+ codeQuality: 90,
30
+ security: 80,
31
+ architecture: 85,
32
+ lastUpdated: new Date().toISOString()
33
+ };
34
+ const healthFile = path.join(getFrameworkDir(), "memory", "HEALTH.json");
35
+ writeJsonFile(healthFile, health);
36
+ return health;
37
+ }
38
+ static getHealth() {
39
+ try {
40
+ const healthFile = path.join(getFrameworkDir(), "memory", "HEALTH.json");
41
+ if (!fs.existsSync(healthFile))
42
+ return null;
43
+ return JSON.parse(fs.readFileSync(healthFile, "utf8"));
44
+ }
45
+ catch {
46
+ return null;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,78 @@
1
+ import { generateULID } from "../../cli/utils/time.js";
2
+ import { RoutingEngine } from "./routing-engine.js";
3
+ /**
4
+ * 🗺️ Planning Engine (The Strategist)
5
+ * Responsible for decomposing complex requests into a DAG of atomic tasks.
6
+ */
7
+ export class PlanningEngine {
8
+ /**
9
+ * Creates a new Plan structure.
10
+ * In a real enterprise scenario, this would be fueled by an LLM prompt.
11
+ * For now, it provides the structural backbone.
12
+ */
13
+ static createPlan(rawTasks) {
14
+ const planId = generateULID();
15
+ const tasks = rawTasks.map((t, index) => {
16
+ const id = t.id || `TASK_${String(index + 1).padStart(2, "0")}`;
17
+ return {
18
+ id,
19
+ agent: t.agent || RoutingEngine.resolveAgent(t.task),
20
+ task: t.task,
21
+ dependencies: t.dependencies || []
22
+ };
23
+ });
24
+ return {
25
+ planId,
26
+ tasks
27
+ };
28
+ }
29
+ /**
30
+ * Validates a plan's integrity (no circular dependencies, all agents valid).
31
+ */
32
+ static validatePlan(plan) {
33
+ const errors = [];
34
+ const taskIds = new Set(plan.tasks.map(t => t.id));
35
+ for (const task of plan.tasks) {
36
+ // Check dependencies exist
37
+ for (const dep of task.dependencies) {
38
+ if (!taskIds.has(dep)) {
39
+ errors.push(`Task ${task.id} has non-existent dependency: ${dep}`);
40
+ }
41
+ }
42
+ // Check circular dependencies (simple check for now)
43
+ if (task.dependencies.includes(task.id)) {
44
+ errors.push(`Task ${task.id} cannot depend on itself.`);
45
+ }
46
+ }
47
+ // Circular dependency detection using DFS
48
+ const visited = new Set();
49
+ const recStack = new Set();
50
+ const hasCycle = (taskId) => {
51
+ if (recStack.has(taskId))
52
+ return true;
53
+ if (visited.has(taskId))
54
+ return false;
55
+ visited.add(taskId);
56
+ recStack.add(taskId);
57
+ const task = plan.tasks.find(t => t.id === taskId);
58
+ if (task) {
59
+ for (const dep of task.dependencies) {
60
+ if (hasCycle(dep))
61
+ return true;
62
+ }
63
+ }
64
+ recStack.delete(taskId);
65
+ return false;
66
+ };
67
+ for (const task of plan.tasks) {
68
+ if (hasCycle(task.id)) {
69
+ errors.push("Circular dependency detected in plan.");
70
+ break;
71
+ }
72
+ }
73
+ return {
74
+ valid: errors.length === 0,
75
+ errors
76
+ };
77
+ }
78
+ }
@@ -0,0 +1,105 @@
1
+ /**
2
+ * [SECURITY] Risk Engine (The Guardian)
3
+ * Calculates the danger level of a proposed task or operation.
4
+ */
5
+ export class RiskEngine {
6
+ static HIGH_RISK_KEYWORDS = [
7
+ { word: "delete", weight: 40 },
8
+ { word: "drop", weight: 50 },
9
+ { word: "truncate", weight: 50 },
10
+ { word: "rm -rf", weight: 60 },
11
+ { word: "purge", weight: 40 },
12
+ { word: "format", weight: 50 },
13
+ { word: "force", weight: 20 },
14
+ ];
15
+ static SENSITIVE_PATHS = [
16
+ { pattern: /\.env/, weight: 50 },
17
+ { pattern: /config/, weight: 20 },
18
+ { pattern: /database\//, weight: 30 },
19
+ { pattern: /auth\//, weight: 30 },
20
+ { pattern: /security/, weight: 30 },
21
+ { pattern: /atabey/, weight: 40 }, // Framework protection
22
+ ];
23
+ /**
24
+ * Assesses the risk of a natural language task or command string.
25
+ */
26
+ static assessTaskRisk(task) {
27
+ const factors = [];
28
+ let totalScore = 0;
29
+ // 1. Keyword Analysis
30
+ for (const { word, weight } of this.HIGH_RISK_KEYWORDS) {
31
+ if (new RegExp(`\\b${word}\\b`, "i").test(task)) {
32
+ factors.push({
33
+ factor: `Keyword: ${word}`,
34
+ score: weight,
35
+ description: `Detected high-risk keyword '${word}' in task description.`
36
+ });
37
+ totalScore += weight;
38
+ }
39
+ }
40
+ // 2. Path Sensitivity (if paths are mentioned in the task)
41
+ for (const { pattern, weight } of this.SENSITIVE_PATHS) {
42
+ if (pattern.test(task)) {
43
+ factors.push({
44
+ factor: `Sensitive Path: ${pattern.source}`,
45
+ score: weight,
46
+ description: `Task involves access to sensitive path or pattern: ${pattern.source}`
47
+ });
48
+ totalScore += weight;
49
+ }
50
+ }
51
+ // 3. Complexity Risk (Length of task as a proxy)
52
+ if (task.length > 300) {
53
+ const score = 10;
54
+ factors.push({
55
+ factor: "High Complexity",
56
+ score,
57
+ description: "Task description is unusually long, increasing the chance of misunderstanding."
58
+ });
59
+ totalScore += score;
60
+ }
61
+ return this.finalizeAssessment(totalScore, factors);
62
+ }
63
+ /**
64
+ * Assesses risk based on a proposed file change.
65
+ */
66
+ static assessChangeRisk(filePath, operation) {
67
+ const factors = [];
68
+ let totalScore = 0;
69
+ // 1. Operation Weight
70
+ const opWeights = { write: 30, replace: 5, patch: 10 };
71
+ totalScore += opWeights[operation];
72
+ factors.push({
73
+ factor: `Operation: ${operation}`,
74
+ score: opWeights[operation],
75
+ description: `A '${operation}' operation is inherently riskier than a surgical 'replace'.`
76
+ });
77
+ // 2. File Path Risk
78
+ for (const { pattern, weight } of this.SENSITIVE_PATHS) {
79
+ if (pattern.test(filePath)) {
80
+ factors.push({
81
+ factor: `Sensitive File: ${filePath}`,
82
+ score: weight,
83
+ description: "Modifying a sensitive file is high risk."
84
+ });
85
+ totalScore += weight;
86
+ }
87
+ }
88
+ return this.finalizeAssessment(totalScore, factors);
89
+ }
90
+ static finalizeAssessment(totalScore, factors) {
91
+ let severity = "LOW";
92
+ if (totalScore >= 80)
93
+ severity = "CRITICAL";
94
+ else if (totalScore >= 50)
95
+ severity = "HIGH";
96
+ else if (totalScore >= 20)
97
+ severity = "MEDIUM";
98
+ return {
99
+ totalScore: Math.min(totalScore, 100),
100
+ severity,
101
+ factors,
102
+ requiresApproval: totalScore >= 60
103
+ };
104
+ }
105
+ }
@@ -0,0 +1,73 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import { getFrameworkDir } from "../../cli/utils/memory.js";
4
+ import { ALL_AGENTS } from "../agents/definitions.js";
5
+ export class RoutingEngine {
6
+ /**
7
+ * Finds the best agent for a given task description based on capability scores and specialties.
8
+ */
9
+ static resolveAgent(taskDescription) {
10
+ const textLower = taskDescription.toLowerCase();
11
+ const candidates = this.getCandidates();
12
+ let bestAgent = "@backend"; // Default fallback
13
+ let bestScore = 0;
14
+ for (const candidate of candidates) {
15
+ let candidateScore = 0;
16
+ for (const [specialty, weight] of Object.entries(candidate.specialties)) {
17
+ const specLower = specialty.toLowerCase();
18
+ if (textLower.includes(specLower)) {
19
+ candidateScore += weight;
20
+ }
21
+ }
22
+ if (candidateScore > bestScore) {
23
+ bestScore = candidateScore;
24
+ bestAgent = candidate.agent;
25
+ }
26
+ }
27
+ // Static fallback keywords if no specialty match found
28
+ if (bestScore === 0) {
29
+ if (textLower.includes("frontend") || textLower.includes("ui") || textLower.includes("page") || textLower.includes("css") || textLower.includes("html") || textLower.includes("react")) {
30
+ bestAgent = "@frontend";
31
+ }
32
+ else if (textLower.includes("security") || textLower.includes("audit") || textLower.includes("auth") || textLower.includes("token")) {
33
+ bestAgent = "@security";
34
+ }
35
+ else if (textLower.includes("database") || textLower.includes("migration") || textLower.includes("sql") || textLower.includes("schema") || textLower.includes("postgres")) {
36
+ bestAgent = "@database";
37
+ }
38
+ else if (textLower.includes("docker") || textLower.includes("ci") || textLower.includes("deploy") || textLower.includes("devops")) {
39
+ bestAgent = "@devops";
40
+ }
41
+ }
42
+ return bestAgent;
43
+ }
44
+ static getCandidates() {
45
+ const frameworkDir = getFrameworkDir();
46
+ const registryDir = path.join(frameworkDir, "registry");
47
+ let candidates = [];
48
+ // 1. Try Control Plane Registry first (active registered agents)
49
+ if (fs.existsSync(registryDir)) {
50
+ const registryFiles = fs.readdirSync(registryDir).filter(f => f.endsWith("_active.json"));
51
+ for (const file of registryFiles) {
52
+ try {
53
+ const data = JSON.parse(fs.readFileSync(path.join(registryDir, file), "utf8"));
54
+ if (data.agent && data.specialties) {
55
+ candidates.push({
56
+ agent: data.agent,
57
+ specialties: data.specialties
58
+ });
59
+ }
60
+ }
61
+ catch { /* ignore */ }
62
+ }
63
+ }
64
+ // 2. Fallback to built-in agent definitions
65
+ if (candidates.length === 0) {
66
+ candidates = ALL_AGENTS.map(ag => ({
67
+ agent: ag.name.startsWith("@") ? ag.name : `@${ag.name}`,
68
+ specialties: ag.specialties || {}
69
+ }));
70
+ }
71
+ return candidates;
72
+ }
73
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,6 @@
2
2
  * Core Skill Definitions for Agent Atabey.
3
3
  * Groups tools into logical capabilities for agents.
4
4
  */
5
-
6
5
  export const CORE_SKILLS = {
7
6
  FILE_SYSTEM: {
8
7
  name: "File System Mastery",
@@ -2,9 +2,7 @@
2
2
  * Agent Atabey — Single Source of Truth for framework constants.
3
3
  * Import from here instead of hardcoding paths, phases, or directory names.
4
4
  */
5
-
6
5
  // ─── Framework identity ───────────────────────────────────────────────────────
7
-
8
6
  export const FRAMEWORK = {
9
7
  NAME: "Agent Atabey",
10
8
  CORE_DIR: ".atabey",
@@ -13,29 +11,26 @@ export const FRAMEWORK = {
13
11
  DEFAULT_TRACE_ID: "T-000",
14
12
  DEFAULT_PHASE: "PHASE_0",
15
13
  DEFAULT_MANAGER_STATE: "ACTIVE",
16
- } as const;
17
-
14
+ DASHBOARD_PORT: 5858,
15
+ };
18
16
  export const PROJECT_PHASES = [
19
17
  "PHASE_0",
20
18
  "PHASE_1",
21
19
  "PHASE_2",
22
20
  "PHASE_3",
23
21
  "PHASE_4",
24
- ] as const;
25
-
22
+ ];
26
23
  // ─── Adapter platform directories (native / legacy) ───────────────────────────
27
-
28
24
  export const ADAPTER_DIRS = {
29
25
  GEMINI: ".gemini",
30
26
  CLAUDE: ".claude",
31
27
  GROK: ".grok",
32
28
  CURSOR: ".cursor",
33
29
  CODEX: ".agents",
34
- ANTIGRAVITY: ".antigravity",
30
+ ANTIGRAVITY: ".agents",
35
31
  LOCAL: ".atabey",
36
32
  LEGACY_AGENT: ".agent",
37
- } as const;
38
-
33
+ };
39
34
  /** Priority order for framework directory resolution (CLI + MCP). */
40
35
  export const FRAMEWORK_DIR_CANDIDATES = [
41
36
  FRAMEWORK.CORE_DIR,
@@ -46,8 +41,7 @@ export const FRAMEWORK_DIR_CANDIDATES = [
46
41
  ADAPTER_DIRS.CURSOR,
47
42
  ADAPTER_DIRS.ANTIGRAVITY,
48
43
  ADAPTER_DIRS.LOCAL,
49
- ] as const;
50
-
44
+ ];
51
45
  /** Slug under `.agents/{slug}/` for each adapter in unified mode. */
52
46
  export const UNIFIED_ADAPTER_SLUG = {
53
47
  gemini: "gemini",
@@ -57,12 +51,8 @@ export const UNIFIED_ADAPTER_SLUG = {
57
51
  codex: "codex",
58
52
  local: "local",
59
53
  "antigravity-cli": "antigravity",
60
- } as const;
61
-
62
- export type UnifiedAdapterSlug = keyof typeof UNIFIED_ADAPTER_SLUG;
63
-
54
+ };
64
55
  // ─── Native agent instruction paths (legacy tool compatibility) ───────────────
65
-
66
56
  export const NATIVE_AGENT_PATHS = {
67
57
  gemini: pathJoin(ADAPTER_DIRS.GEMINI, "agents"),
68
58
  claude: pathJoin(ADAPTER_DIRS.CLAUDE, "agents"),
@@ -71,8 +61,7 @@ export const NATIVE_AGENT_PATHS = {
71
61
  codex: pathJoin(ADAPTER_DIRS.CODEX, "instructions"),
72
62
  local: pathJoin(ADAPTER_DIRS.LOCAL, "agents"),
73
63
  "antigravity-cli": pathJoin(ADAPTER_DIRS.ANTIGRAVITY, "agents"),
74
- } as const;
75
-
64
+ };
76
65
  /** Legacy layout bases used by `check` and discovery (non-unified installs). */
77
66
  export const LEGACY_AGENT_LAYOUT_BASES = [
78
67
  NATIVE_AGENT_PATHS.gemini,
@@ -82,10 +71,8 @@ export const LEGACY_AGENT_LAYOUT_BASES = [
82
71
  NATIVE_AGENT_PATHS.codex,
83
72
  NATIVE_AGENT_PATHS.local,
84
73
  NATIVE_AGENT_PATHS["antigravity-cli"],
85
- ] as const;
86
-
74
+ ];
87
75
  // ─── Framework internal subdirectories (under `.atabey/`) ──────────────────
88
-
89
76
  export const FRAMEWORK_SUBDIRS = {
90
77
  AGENTS: "agents",
91
78
  SKILLS: "skills",
@@ -99,8 +86,9 @@ export const FRAMEWORK_SUBDIRS = {
99
86
  MESSAGES: "messages",
100
87
  LOGS: "logs",
101
88
  MEMORY_GRAPH: "memory-graph",
102
- } as const;
103
-
89
+ DASHBOARD: "dashboard",
90
+ UI_DIST: "ui",
91
+ };
104
92
  export const CORE_SCAFFOLD_SUBDIRS = [
105
93
  FRAMEWORK_SUBDIRS.KNOWLEDGE,
106
94
  FRAMEWORK_SUBDIRS.PROMPTS,
@@ -109,71 +97,61 @@ export const CORE_SCAFFOLD_SUBDIRS = [
109
97
  FRAMEWORK_SUBDIRS.REGISTRY,
110
98
  FRAMEWORK_SUBDIRS.OBSERVABILITY,
111
99
  FRAMEWORK_SUBDIRS.RULES,
112
- ] as const;
113
-
100
+ ];
114
101
  export const RUNTIME_SUBDIRS = [
115
102
  FRAMEWORK_SUBDIRS.MESSAGES,
116
103
  FRAMEWORK_SUBDIRS.LOGS,
117
104
  FRAMEWORK_SUBDIRS.MEMORY_GRAPH,
118
- ] as const;
119
-
105
+ ];
120
106
  export const MEMORY_SUBDIRS = {
121
107
  TASKS: "tasks",
122
108
  HISTORY: "history",
123
- } as const;
124
-
109
+ };
125
110
  export const MEMORY_FILES = {
126
111
  STATE: "state.json",
127
112
  STATUS: "status.json",
128
113
  PROJECT_MEMORY: "PROJECT_MEMORY.md",
129
114
  SHARED_FACTS: "shared-facts.json",
130
- } as const;
131
-
115
+ };
132
116
  // ─── Monorepo default paths ───────────────────────────────────────────────────
133
-
134
117
  export const DEFAULT_MONOREPO_PATHS = {
135
118
  backend: "apps/backend",
136
119
  frontend: "apps/web",
137
120
  mobile: "apps/mobile",
138
121
  docs: "docs",
139
122
  tests: "tests",
140
- } as const;
141
-
123
+ };
142
124
  /** Cursor rule globs per agent role (enterprise monorepo layout). */
143
- export const CURSOR_AGENT_GLOBS: Record<string, string> = {
144
- manager: "**/*",
145
- security: "**/*",
125
+ export const CURSOR_AGENT_GLOBS = {
126
+ manager: "**/*",
127
+ security: "**/*",
146
128
  architect: "**/*",
147
- backend: `${DEFAULT_MONOREPO_PATHS.backend}/**/*`,
148
- frontend: `${DEFAULT_MONOREPO_PATHS.frontend}/**/*`,
149
- mobile: `${DEFAULT_MONOREPO_PATHS.mobile}/**/*`,
150
- native: "apps/native/**/*",
151
- database: `${DEFAULT_MONOREPO_PATHS.backend}/src/database/**/*`,
152
- devops: "{.github,docker,infra,scripts,*.yml,*.yaml,Dockerfile*}",
153
- quality: "**/*",
154
- analyst: "{docs,specs,contracts}/**/*",
155
- explorer: "**/*",
156
- git: "**/*",
129
+ backend: `${DEFAULT_MONOREPO_PATHS.backend}/**/*`,
130
+ frontend: `${DEFAULT_MONOREPO_PATHS.frontend}/**/*`,
131
+ mobile: `${DEFAULT_MONOREPO_PATHS.mobile}/**/*`,
132
+ native: "apps/native/**/*",
133
+ database: `${DEFAULT_MONOREPO_PATHS.backend}/src/database/**/*`,
134
+ devops: "{.github,docker,infra,scripts,*.yml,*.yaml,Dockerfile*}",
135
+ quality: "**/*",
136
+ analyst: "{docs,specs,contracts}/**/*",
137
+ explorer: "**/*",
138
+ git: "**/*",
157
139
  };
158
-
159
140
  // ─── MCP & environment ──────────────────────────────────────────────────────
160
-
161
141
  export const MCP = {
162
142
  SERVER_NAME: "atabey",
163
143
  ROOT_CONFIG_FILE: "mcp.json",
164
144
  PROJECT_ROOT_ENV: "ATABEY_PROJECT_ROOT",
165
145
  TEST_DIR_ENV: "ATABEY_TEST_DIR",
166
- } as const;
167
-
146
+ SERVER_DIST_PATH: "framework-mcp/dist/index.js",
147
+ };
168
148
  export const ROOT_CONFIG_FILES = {
169
149
  MCP: MCP.ROOT_CONFIG_FILE,
170
150
  DOT_MCP: ".mcp.json",
171
151
  ENV_EXAMPLE: ".env.example",
172
152
  VSCODE_MCP: ".vscode/mcp.json",
173
- } as const;
174
-
153
+ };
175
154
  // ─── Shim template placeholders ───────────────────────────────────────────────
176
-
177
155
  export const TEMPLATE_PLACEHOLDERS = {
178
156
  FRAMEWORK_DIR: "{{FRAMEWORK_DIR}}",
179
157
  ADAPTER: "{{ADAPTER}}",
@@ -181,37 +159,28 @@ export const TEMPLATE_PLACEHOLDERS = {
181
159
  FRONTEND_DIR: "{{FRONTEND_DIR}}",
182
160
  DOCS_DIR: "{{DOCS_DIR}}",
183
161
  TESTS_DIR: "{{TESTS_DIR}}",
184
- } as const;
185
-
162
+ };
186
163
  // ─── File extensions ─────────────────────────────────────────────────────────
187
-
188
164
  export const AGENT_FILE_EXT = {
189
165
  MARKDOWN: ".md",
190
166
  CURSOR_RULE: ".mdc",
191
- } as const;
192
-
167
+ };
193
168
  // ─── Path helpers ─────────────────────────────────────────────────────────────
194
-
195
- export function pathJoin(...segments: string[]): string {
169
+ export function pathJoin(...segments) {
196
170
  return segments.filter(Boolean).join("/");
197
171
  }
198
-
199
- export function corePath(...segments: string[]): string {
172
+ export function corePath(...segments) {
200
173
  return pathJoin(FRAMEWORK.CORE_DIR, ...segments);
201
174
  }
202
-
203
- export function unifiedHubPath(...segments: string[]): string {
175
+ export function unifiedHubPath(...segments) {
204
176
  return pathJoin(FRAMEWORK.UNIFIED_HUB_DIR, ...segments);
205
177
  }
206
-
207
- export function unifiedAdapterPath(slug: string, ...segments: string[]): string {
178
+ export function unifiedAdapterPath(slug, ...segments) {
208
179
  return unifiedHubPath(slug, ...segments);
209
180
  }
210
-
211
- export function knowledgePath(filename: string): string {
181
+ export function knowledgePath(filename) {
212
182
  return corePath(FRAMEWORK_SUBDIRS.KNOWLEDGE, filename);
213
183
  }
214
-
215
184
  /** Backward-compatible aliases */
216
185
  export const CORE_FRAMEWORK_DIR = FRAMEWORK.CORE_DIR;
217
186
  export const UNIFIED_HUB_DIR = FRAMEWORK.UNIFIED_HUB_DIR;
@@ -2,30 +2,27 @@
2
2
  * Enterprise Base Error class for the Agent Atabey Framework.
3
3
  */
4
4
  export class AtabeyBaseError extends Error {
5
- public readonly code: string;
6
- public readonly timestamp: Date;
7
- public readonly details?: unknown;
8
- public readonly solution?: string;
9
-
10
- constructor(message: string, code = "ATABEY_INTERNAL_ERROR", details?: unknown, solution?: string) {
5
+ code;
6
+ timestamp;
7
+ details;
8
+ solution;
9
+ constructor(message, code = "ATABEY_INTERNAL_ERROR", details, solution) {
11
10
  super(message);
12
11
  this.name = this.constructor.name;
13
12
  this.code = code;
14
13
  this.timestamp = new Date();
15
14
  this.details = details;
16
15
  this.solution = solution;
17
-
18
16
  // Ensure proper prototype chain and capture stack trace
19
17
  Object.setPrototypeOf(this, new.target.prototype);
20
18
  if (Error.captureStackTrace) {
21
19
  Error.captureStackTrace(this, this.constructor);
22
20
  }
23
21
  }
24
-
25
22
  /**
26
23
  * Converts the error into a structured JSON log format.
27
24
  */
28
- public toJSON() {
25
+ toJSON() {
29
26
  return {
30
27
  name: this.name,
31
28
  message: this.message,
@@ -37,39 +34,35 @@ export class AtabeyBaseError extends Error {
37
34
  };
38
35
  }
39
36
  }
40
-
41
37
  /**
42
38
  * Thrown when configuration loading or validation fails.
43
39
  */
44
40
  export class ConfigurationError extends AtabeyBaseError {
45
- constructor(message: string, details?: unknown, solution?: string) {
41
+ constructor(message, details, solution) {
46
42
  super(message, "CONFIGURATION_ERROR", details, solution);
47
43
  }
48
44
  }
49
-
50
45
  /**
51
46
  * Thrown when data schema or payload validation fails.
52
47
  */
53
48
  export class ValidationError extends AtabeyBaseError {
54
- constructor(message: string, details?: unknown, solution?: string) {
49
+ constructor(message, details, solution) {
55
50
  super(message, "VALIDATION_ERROR", details, solution);
56
51
  }
57
52
  }
58
-
59
53
  /**
60
54
  * Thrown when adapter initialization or execution fails.
61
55
  */
62
56
  export class AdapterError extends AtabeyBaseError {
63
- constructor(message: string, adapterId: string, details?: unknown, solution?: string) {
57
+ constructor(message, adapterId, details, solution) {
64
58
  super(`Adapter '${adapterId}' failure: ${message}`, "ADAPTER_ERROR", details, solution);
65
59
  }
66
60
  }
67
-
68
61
  /**
69
62
  * Thrown when orchestration or agent communication fails.
70
63
  */
71
64
  export class OrchestrationError extends AtabeyBaseError {
72
- constructor(message: string, details?: unknown, solution?: string) {
65
+ constructor(message, details, solution) {
73
66
  super(message, "ORCHESTRATION_ERROR", details, solution);
74
67
  }
75
68
  }