atabey 0.0.12 → 0.0.14

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 (432) hide show
  1. package/ATABEY.md +45 -499
  2. package/PRIVACY.md +161 -0
  3. package/README.md +553 -88
  4. package/bin/validate-al-registry.js +4 -4
  5. package/dist/framework-mcp/src/index.js +914 -62
  6. package/dist/framework-mcp/src/index.js.map +1 -1
  7. package/dist/framework-mcp/src/tools/compliance/mask_pii.d.ts +17 -0
  8. package/dist/framework-mcp/src/tools/compliance/mask_pii.js +56 -0
  9. package/dist/framework-mcp/src/tools/compliance/mask_pii.js.map +1 -0
  10. package/dist/framework-mcp/src/tools/definitions.js +24 -1
  11. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  12. package/dist/framework-mcp/src/tools/framework/run_tests.js +25 -0
  13. package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
  14. package/dist/framework-mcp/src/tools/gateway/llm_gateway_query.d.ts +19 -0
  15. package/dist/framework-mcp/src/tools/gateway/llm_gateway_query.js +138 -0
  16. package/dist/framework-mcp/src/tools/gateway/llm_gateway_query.js.map +1 -0
  17. package/dist/framework-mcp/src/tools/gateway/llm_gateway_status.d.ts +8 -0
  18. package/dist/framework-mcp/src/tools/gateway/llm_gateway_status.js +91 -0
  19. package/dist/framework-mcp/src/tools/gateway/llm_gateway_status.js.map +1 -0
  20. package/dist/framework-mcp/src/tools/index.d.ts +1 -1
  21. package/dist/framework-mcp/src/tools/index.js +34 -20
  22. package/dist/framework-mcp/src/tools/index.js.map +1 -1
  23. package/dist/framework-mcp/src/tools/messaging/approve_operation.d.ts +22 -0
  24. package/dist/framework-mcp/src/tools/messaging/approve_operation.js +81 -0
  25. package/dist/framework-mcp/src/tools/messaging/approve_operation.js.map +1 -0
  26. package/dist/framework-mcp/src/tools/messaging/ask_human.d.ts +15 -0
  27. package/dist/framework-mcp/src/tools/messaging/ask_human.js +89 -20
  28. package/dist/framework-mcp/src/tools/messaging/ask_human.js.map +1 -1
  29. package/dist/framework-mcp/src/tools/observability/check_ports.js +3 -1
  30. package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
  31. package/dist/framework-mcp/src/tools/quality/analyze_code_quality.d.ts +11 -0
  32. package/dist/framework-mcp/src/tools/quality/analyze_code_quality.js +115 -0
  33. package/dist/framework-mcp/src/tools/quality/analyze_code_quality.js.map +1 -0
  34. package/dist/framework-mcp/src/tools/quality/check_architecture_compliance.d.ts +11 -0
  35. package/dist/framework-mcp/src/tools/quality/check_architecture_compliance.js +135 -0
  36. package/dist/framework-mcp/src/tools/quality/check_architecture_compliance.js.map +1 -0
  37. package/dist/framework-mcp/src/tools/schemas.d.ts +90 -15
  38. package/dist/framework-mcp/src/tools/schemas.js +32 -7
  39. package/dist/framework-mcp/src/tools/schemas.js.map +1 -1
  40. package/dist/framework-mcp/src/tools/shell/run_command.js +12 -2
  41. package/dist/framework-mcp/src/tools/shell/run_command.js.map +1 -1
  42. package/dist/framework-mcp/src/tools/types.d.ts +11 -105
  43. package/dist/framework-mcp/src/tools/types.js +1 -0
  44. package/dist/framework-mcp/src/tools/types.js.map +1 -1
  45. package/dist/framework-mcp/src/utils/auth.d.ts +36 -0
  46. package/dist/framework-mcp/src/utils/auth.js +79 -0
  47. package/dist/framework-mcp/src/utils/auth.js.map +1 -0
  48. package/dist/framework-mcp/src/utils/auto-rollback.d.ts +71 -0
  49. package/dist/framework-mcp/src/utils/auto-rollback.js +266 -0
  50. package/dist/framework-mcp/src/utils/auto-rollback.js.map +1 -0
  51. package/dist/framework-mcp/src/utils/compliance.js +12 -4
  52. package/dist/framework-mcp/src/utils/compliance.js.map +1 -1
  53. package/dist/framework-mcp/src/utils/context-optimizer.d.ts +69 -0
  54. package/dist/framework-mcp/src/utils/context-optimizer.js +157 -0
  55. package/dist/framework-mcp/src/utils/context-optimizer.js.map +1 -0
  56. package/dist/framework-mcp/src/utils/discipline.d.ts +68 -0
  57. package/dist/framework-mcp/src/utils/discipline.js +218 -0
  58. package/dist/framework-mcp/src/utils/discipline.js.map +1 -0
  59. package/dist/framework-mcp/src/utils/finops.d.ts +143 -0
  60. package/dist/framework-mcp/src/utils/finops.js +326 -0
  61. package/dist/framework-mcp/src/utils/finops.js.map +1 -0
  62. package/dist/framework-mcp/src/utils/human-in-loop.d.ts +95 -0
  63. package/dist/framework-mcp/src/utils/human-in-loop.js +216 -0
  64. package/dist/framework-mcp/src/utils/human-in-loop.js.map +1 -0
  65. package/dist/framework-mcp/src/utils/license-scanner.d.ts +71 -0
  66. package/dist/framework-mcp/src/utils/license-scanner.js +284 -0
  67. package/dist/framework-mcp/src/utils/license-scanner.js.map +1 -0
  68. package/dist/framework-mcp/src/utils/loop-detector.d.ts +105 -0
  69. package/dist/framework-mcp/src/utils/loop-detector.js +362 -0
  70. package/dist/framework-mcp/src/utils/loop-detector.js.map +1 -0
  71. package/dist/framework-mcp/src/utils/quality.d.ts +19 -0
  72. package/dist/framework-mcp/src/utils/quality.js +124 -0
  73. package/dist/framework-mcp/src/utils/quality.js.map +1 -0
  74. package/dist/framework-mcp/src/utils/rules-engine.d.ts +78 -0
  75. package/dist/framework-mcp/src/utils/rules-engine.js +232 -0
  76. package/dist/framework-mcp/src/utils/rules-engine.js.map +1 -0
  77. package/dist/framework-mcp/src/utils/silent-router.d.ts +47 -0
  78. package/dist/framework-mcp/src/utils/silent-router.js +129 -0
  79. package/dist/framework-mcp/src/utils/silent-router.js.map +1 -0
  80. package/dist/framework-mcp/src/utils/storage.d.ts +1 -0
  81. package/dist/framework-mcp/src/utils/storage.js +2 -2
  82. package/dist/framework-mcp/src/utils/storage.js.map +1 -1
  83. package/dist/framework-mcp/src/utils/telemetry-streamer.d.ts +133 -0
  84. package/dist/framework-mcp/src/utils/telemetry-streamer.js +397 -0
  85. package/dist/framework-mcp/src/utils/telemetry-streamer.js.map +1 -0
  86. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +2 -2
  87. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -1
  88. package/dist/framework-mcp/tests/tools/framework/run_tests.test.d.ts +1 -0
  89. package/dist/framework-mcp/tests/tools/framework/run_tests.test.js +49 -0
  90. package/dist/framework-mcp/tests/tools/framework/run_tests.test.js.map +1 -0
  91. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +14 -5
  92. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -1
  93. package/dist/framework-mcp/tests/tools/observability/check_ports.test.d.ts +1 -0
  94. package/dist/framework-mcp/tests/tools/observability/check_ports.test.js +30 -0
  95. package/dist/framework-mcp/tests/tools/observability/check_ports.test.js.map +1 -0
  96. package/dist/framework-mcp/tests/tools/shell/run_command.test.js +7 -0
  97. package/dist/framework-mcp/tests/tools/shell/run_command.test.js.map +1 -1
  98. package/dist/framework-mcp/tests/utils/auto-rollback.test.d.ts +7 -0
  99. package/dist/framework-mcp/tests/utils/auto-rollback.test.js +178 -0
  100. package/dist/framework-mcp/tests/utils/auto-rollback.test.js.map +1 -0
  101. package/dist/framework-mcp/tests/utils/context-optimizer.test.d.ts +1 -0
  102. package/dist/framework-mcp/tests/utils/context-optimizer.test.js +62 -0
  103. package/dist/framework-mcp/tests/utils/context-optimizer.test.js.map +1 -0
  104. package/dist/framework-mcp/tests/utils/finops.test.d.ts +7 -0
  105. package/dist/framework-mcp/tests/utils/finops.test.js +157 -0
  106. package/dist/framework-mcp/tests/utils/finops.test.js.map +1 -0
  107. package/dist/framework-mcp/tests/utils/human-in-loop.test.d.ts +1 -0
  108. package/dist/framework-mcp/tests/utils/human-in-loop.test.js +59 -0
  109. package/dist/framework-mcp/tests/utils/human-in-loop.test.js.map +1 -0
  110. package/dist/framework-mcp/tests/utils/license-scanner.test.d.ts +7 -0
  111. package/dist/framework-mcp/tests/utils/license-scanner.test.js +131 -0
  112. package/dist/framework-mcp/tests/utils/license-scanner.test.js.map +1 -0
  113. package/dist/framework-mcp/tests/utils/loop-detector.test.d.ts +7 -0
  114. package/dist/framework-mcp/tests/utils/loop-detector.test.js +204 -0
  115. package/dist/framework-mcp/tests/utils/loop-detector.test.js.map +1 -0
  116. package/dist/framework-mcp/tests/utils/rules-engine.test.d.ts +1 -0
  117. package/dist/framework-mcp/tests/utils/rules-engine.test.js +106 -0
  118. package/dist/framework-mcp/tests/utils/rules-engine.test.js.map +1 -0
  119. package/dist/framework-mcp/tests/utils/telemetry-streamer.test.d.ts +7 -0
  120. package/dist/framework-mcp/tests/utils/telemetry-streamer.test.js +201 -0
  121. package/dist/framework-mcp/tests/utils/telemetry-streamer.test.js.map +1 -0
  122. package/dist/src/cli/commands/check.js +18 -3
  123. package/dist/src/cli/commands/check.js.map +1 -1
  124. package/dist/src/cli/commands/dashboard.d.ts +1 -1
  125. package/dist/src/cli/commands/dashboard.js +343 -96
  126. package/dist/src/cli/commands/dashboard.js.map +1 -1
  127. package/dist/src/cli/commands/gateway.d.ts +1 -0
  128. package/dist/src/cli/commands/gateway.js +172 -0
  129. package/dist/src/cli/commands/gateway.js.map +1 -0
  130. package/dist/src/cli/commands/init/create-agent.js +3 -3
  131. package/dist/src/cli/commands/init/create-agent.js.map +1 -1
  132. package/dist/src/cli/commands/init/scaffold-core.d.ts +3 -1
  133. package/dist/src/cli/commands/init/scaffold-core.js +17 -2
  134. package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
  135. package/dist/src/cli/commands/init/scaffold-ops.js +2 -2
  136. package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -1
  137. package/dist/src/cli/commands/init/scaffold-standards.js +13 -1
  138. package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -1
  139. package/dist/src/cli/commands/init.d.ts +6 -0
  140. package/dist/src/cli/commands/init.js +163 -25
  141. package/dist/src/cli/commands/init.js.map +1 -1
  142. package/dist/src/cli/commands/mcp.d.ts +7 -0
  143. package/dist/src/cli/commands/mcp.js +45 -22
  144. package/dist/src/cli/commands/mcp.js.map +1 -1
  145. package/dist/src/cli/commands/orchestrate.d.ts +8 -7
  146. package/dist/src/cli/commands/orchestrate.js +2 -1
  147. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  148. package/dist/src/cli/commands/quickstart.d.ts +5 -5
  149. package/dist/src/cli/commands/quickstart.js +30 -42
  150. package/dist/src/cli/commands/quickstart.js.map +1 -1
  151. package/dist/src/cli/index.js +228 -317
  152. package/dist/src/cli/index.js.map +1 -1
  153. package/dist/src/cli/platforms/core.d.ts +12 -0
  154. package/dist/src/cli/platforms/core.js +73 -0
  155. package/dist/src/cli/platforms/core.js.map +1 -0
  156. package/dist/src/cli/platforms/index.d.ts +5 -0
  157. package/dist/src/cli/platforms/index.js +6 -0
  158. package/dist/src/cli/platforms/index.js.map +1 -0
  159. package/dist/src/cli/platforms/paths.d.ts +15 -0
  160. package/dist/src/cli/platforms/paths.js +102 -0
  161. package/dist/src/cli/platforms/paths.js.map +1 -0
  162. package/dist/src/cli/platforms/scaffold.d.ts +2 -0
  163. package/dist/src/cli/platforms/scaffold.js +73 -0
  164. package/dist/src/cli/platforms/scaffold.js.map +1 -0
  165. package/dist/src/cli/platforms/utils.d.ts +4 -0
  166. package/dist/src/cli/platforms/utils.js +76 -0
  167. package/dist/src/cli/platforms/utils.js.map +1 -0
  168. package/dist/src/cli/shims.js +11 -11
  169. package/dist/src/cli/utils/fs.d.ts +1 -1
  170. package/dist/src/cli/utils/fs.js +1 -1
  171. package/dist/src/cli/utils/fs.js.map +1 -1
  172. package/dist/src/cli/utils/pkg.js +2 -3
  173. package/dist/src/cli/utils/pkg.js.map +1 -1
  174. package/dist/src/cli/utils/quality.d.ts +10 -0
  175. package/dist/src/cli/utils/quality.js +10 -0
  176. package/dist/src/cli/utils/quality.js.map +1 -0
  177. package/dist/src/modules/agents/definitions.d.ts +2 -2
  178. package/dist/src/modules/agents/definitions.js +104 -63
  179. package/dist/src/modules/agents/definitions.js.map +1 -1
  180. package/dist/src/modules/agents/registry/manager.js +6 -1
  181. package/dist/src/modules/agents/registry/manager.js.map +1 -1
  182. package/dist/src/modules/contracts/api.d.ts +178 -0
  183. package/dist/src/modules/contracts/api.js +56 -0
  184. package/dist/src/modules/contracts/api.js.map +1 -0
  185. package/dist/src/modules/contracts/index.d.ts +5 -0
  186. package/dist/src/modules/contracts/index.js +6 -0
  187. package/dist/src/modules/contracts/index.js.map +1 -0
  188. package/dist/src/modules/engines/agent-executor.d.ts +25 -30
  189. package/dist/src/modules/engines/agent-executor.js +133 -73
  190. package/dist/src/modules/engines/agent-executor.js.map +1 -1
  191. package/dist/src/modules/engines/agent-loop.d.ts +34 -0
  192. package/dist/src/modules/engines/agent-loop.js +102 -0
  193. package/dist/src/modules/engines/agent-loop.js.map +1 -0
  194. package/dist/src/modules/engines/evaluation-engine.js +2 -2
  195. package/dist/src/modules/engines/evaluation-engine.js.map +1 -1
  196. package/dist/src/modules/engines/quality-gate.d.ts +16 -8
  197. package/dist/src/modules/engines/quality-gate.js +42 -34
  198. package/dist/src/modules/engines/quality-gate.js.map +1 -1
  199. package/dist/src/modules/engines/routing-engine.d.ts +21 -28
  200. package/dist/src/modules/engines/routing-engine.js +83 -50
  201. package/dist/src/modules/engines/routing-engine.js.map +1 -1
  202. package/dist/src/modules/gateway/circuit-breaker.d.ts +40 -0
  203. package/dist/src/modules/gateway/circuit-breaker.js +163 -0
  204. package/dist/src/modules/gateway/circuit-breaker.js.map +1 -0
  205. package/dist/src/modules/gateway/cost-tracker.d.ts +60 -0
  206. package/dist/src/modules/gateway/cost-tracker.js +198 -0
  207. package/dist/src/modules/gateway/cost-tracker.js.map +1 -0
  208. package/dist/src/modules/gateway/gateway.d.ts +72 -0
  209. package/dist/src/modules/gateway/gateway.js +243 -0
  210. package/dist/src/modules/gateway/gateway.js.map +1 -0
  211. package/dist/src/modules/gateway/index.d.ts +19 -0
  212. package/dist/src/modules/gateway/index.js +19 -0
  213. package/dist/src/modules/gateway/index.js.map +1 -0
  214. package/dist/src/modules/gateway/load-balancer.d.ts +86 -0
  215. package/dist/src/modules/gateway/load-balancer.js +230 -0
  216. package/dist/src/modules/gateway/load-balancer.js.map +1 -0
  217. package/dist/src/modules/gateway/providers/anthropic.d.ts +14 -0
  218. package/dist/src/modules/gateway/providers/anthropic.js +169 -0
  219. package/dist/src/modules/gateway/providers/anthropic.js.map +1 -0
  220. package/dist/src/modules/gateway/providers/base.d.ts +38 -0
  221. package/dist/src/modules/gateway/providers/base.js +42 -0
  222. package/dist/src/modules/gateway/providers/base.js.map +1 -0
  223. package/dist/src/modules/gateway/providers/google.d.ts +18 -0
  224. package/dist/src/modules/gateway/providers/google.js +176 -0
  225. package/dist/src/modules/gateway/providers/google.js.map +1 -0
  226. package/dist/src/modules/gateway/providers/grok.d.ts +14 -0
  227. package/dist/src/modules/gateway/providers/grok.js +166 -0
  228. package/dist/src/modules/gateway/providers/grok.js.map +1 -0
  229. package/dist/src/modules/gateway/providers/index.d.ts +21 -0
  230. package/dist/src/modules/gateway/providers/index.js +38 -0
  231. package/dist/src/modules/gateway/providers/index.js.map +1 -0
  232. package/dist/src/modules/gateway/providers/ollama.d.ts +23 -0
  233. package/dist/src/modules/gateway/providers/ollama.js +187 -0
  234. package/dist/src/modules/gateway/providers/ollama.js.map +1 -0
  235. package/dist/src/modules/gateway/providers/openai.d.ts +14 -0
  236. package/dist/src/modules/gateway/providers/openai.js +170 -0
  237. package/dist/src/modules/gateway/providers/openai.js.map +1 -0
  238. package/dist/src/modules/gateway/rate-limiter.d.ts +41 -0
  239. package/dist/src/modules/gateway/rate-limiter.js +119 -0
  240. package/dist/src/modules/gateway/rate-limiter.js.map +1 -0
  241. package/dist/src/modules/gateway/types.d.ts +114 -0
  242. package/dist/src/modules/gateway/types.js +8 -0
  243. package/dist/src/modules/gateway/types.js.map +1 -0
  244. package/dist/src/modules/memory/core.d.ts +4 -12
  245. package/dist/src/modules/memory/core.js +10 -17
  246. package/dist/src/modules/memory/core.js.map +1 -1
  247. package/dist/src/modules/memory/embedding.d.ts +28 -0
  248. package/dist/src/modules/memory/embedding.js +131 -0
  249. package/dist/src/modules/memory/embedding.js.map +1 -0
  250. package/dist/src/modules/providers/definitions.d.ts +9 -0
  251. package/dist/src/modules/providers/definitions.js +141 -0
  252. package/dist/src/modules/providers/definitions.js.map +1 -0
  253. package/dist/src/modules/providers/registry.d.ts +12 -0
  254. package/dist/src/modules/providers/registry.js +19 -0
  255. package/dist/src/modules/providers/registry.js.map +1 -0
  256. package/dist/src/modules/providers/shared.d.ts +1 -0
  257. package/dist/src/modules/providers/shared.js +105 -0
  258. package/dist/src/modules/providers/shared.js.map +1 -0
  259. package/dist/src/modules/providers/types.d.ts +14 -0
  260. package/dist/src/modules/providers/types.js +2 -0
  261. package/dist/src/modules/providers/types.js.map +1 -0
  262. package/dist/src/modules/skills/adapter-skills.d.ts +68 -0
  263. package/dist/src/modules/skills/adapter-skills.js +450 -0
  264. package/dist/src/modules/skills/adapter-skills.js.map +1 -0
  265. package/dist/src/shared/audit.d.ts +105 -0
  266. package/dist/src/shared/audit.js +221 -0
  267. package/dist/src/shared/audit.js.map +1 -0
  268. package/dist/src/shared/fs.js +4 -2
  269. package/dist/src/shared/fs.js.map +1 -1
  270. package/dist/src/shared/lock.d.ts +82 -0
  271. package/dist/src/shared/lock.js +160 -0
  272. package/dist/src/shared/lock.js.map +1 -0
  273. package/dist/src/shared/logger.d.ts +2 -0
  274. package/dist/src/shared/logger.js +15 -5
  275. package/dist/src/shared/logger.js.map +1 -1
  276. package/dist/src/shared/pii.d.ts +69 -0
  277. package/dist/src/shared/pii.js +213 -0
  278. package/dist/src/shared/pii.js.map +1 -0
  279. package/dist/src/shared/retention.d.ts +63 -0
  280. package/dist/src/shared/retention.js +171 -0
  281. package/dist/src/shared/retention.js.map +1 -0
  282. package/dist/src/shared/storage.d.ts +22 -1
  283. package/dist/src/shared/storage.js +49 -7
  284. package/dist/src/shared/storage.js.map +1 -1
  285. package/dist/tests/adapter.test.js +1 -1
  286. package/dist/tests/adapter.test.js.map +1 -1
  287. package/dist/tests/adapters/paths.test.js +4 -4
  288. package/dist/tests/adapters/paths.test.js.map +1 -1
  289. package/dist/tests/cli/commands/dashboard-coverage.test.d.ts +1 -0
  290. package/dist/tests/cli/commands/dashboard-coverage.test.js +88 -0
  291. package/dist/tests/cli/commands/dashboard-coverage.test.js.map +1 -0
  292. package/dist/tests/cli/init/adapter_init.test.js +4 -5
  293. package/dist/tests/cli/init/adapter_init.test.js.map +1 -1
  294. package/dist/tests/cli/init/unified_init.test.js +5 -7
  295. package/dist/tests/cli/init/unified_init.test.js.map +1 -1
  296. package/dist/tests/embedding.test.d.ts +1 -0
  297. package/dist/tests/embedding.test.js +82 -0
  298. package/dist/tests/embedding.test.js.map +1 -0
  299. package/dist/tests/engines/evaluation-engine.test.d.ts +1 -0
  300. package/dist/tests/engines/evaluation-engine.test.js +71 -0
  301. package/dist/tests/engines/evaluation-engine.test.js.map +1 -0
  302. package/dist/tests/engines/planning-engine.test.d.ts +1 -0
  303. package/dist/tests/engines/planning-engine.test.js +100 -0
  304. package/dist/tests/engines/planning-engine.test.js.map +1 -0
  305. package/dist/tests/engines/quality-gate.test.d.ts +1 -0
  306. package/dist/tests/engines/quality-gate.test.js +59 -0
  307. package/dist/tests/engines/quality-gate.test.js.map +1 -0
  308. package/dist/tests/engines/risk-engine.test.d.ts +1 -0
  309. package/dist/tests/engines/risk-engine.test.js +80 -0
  310. package/dist/tests/engines/risk-engine.test.js.map +1 -0
  311. package/dist/tests/engines/routing-engine.test.d.ts +1 -0
  312. package/dist/tests/engines/routing-engine.test.js +78 -0
  313. package/dist/tests/engines/routing-engine.test.js.map +1 -0
  314. package/dist/tests/integration/agent_flow.test.js +14 -8
  315. package/dist/tests/integration/agent_flow.test.js.map +1 -1
  316. package/dist/tests/integration/hermes_locking.test.js +1 -0
  317. package/dist/tests/integration/hermes_locking.test.js.map +1 -1
  318. package/dist/tests/modules/adapters/adapters.test.js +2 -2
  319. package/dist/tests/modules/adapters/adapters.test.js.map +1 -1
  320. package/dist/tests/modules/contracts/contracts.test.d.ts +1 -0
  321. package/dist/tests/modules/contracts/contracts.test.js +73 -0
  322. package/dist/tests/modules/contracts/contracts.test.js.map +1 -0
  323. package/dist/tests/modules/engines/agent-executor.test.js +30 -23
  324. package/dist/tests/modules/engines/agent-executor.test.js.map +1 -1
  325. package/dist/tests/modules/gateway/circuit-breaker.test.d.ts +1 -0
  326. package/dist/tests/modules/gateway/circuit-breaker.test.js +124 -0
  327. package/dist/tests/modules/gateway/circuit-breaker.test.js.map +1 -0
  328. package/dist/tests/modules/gateway/cost-tracker.test.d.ts +1 -0
  329. package/dist/tests/modules/gateway/cost-tracker.test.js +93 -0
  330. package/dist/tests/modules/gateway/cost-tracker.test.js.map +1 -0
  331. package/dist/tests/modules/gateway/load-balancer.test.d.ts +1 -0
  332. package/dist/tests/modules/gateway/load-balancer.test.js +70 -0
  333. package/dist/tests/modules/gateway/load-balancer.test.js.map +1 -0
  334. package/dist/tests/modules/gateway/rate-limiter.test.d.ts +1 -0
  335. package/dist/tests/modules/gateway/rate-limiter.test.js +62 -0
  336. package/dist/tests/modules/gateway/rate-limiter.test.js.map +1 -0
  337. package/dist/tests/orchestrator-dependencies.test.js +23 -6
  338. package/dist/tests/orchestrator-dependencies.test.js.map +1 -1
  339. package/dist/tests/shared/audit.test.d.ts +1 -0
  340. package/dist/tests/shared/audit.test.js +53 -0
  341. package/dist/tests/shared/audit.test.js.map +1 -0
  342. package/dist/tests/shared/lock.test.d.ts +1 -0
  343. package/dist/tests/shared/lock.test.js +95 -0
  344. package/dist/tests/shared/lock.test.js.map +1 -0
  345. package/dist/tests/shared/pii.test.d.ts +1 -0
  346. package/dist/tests/shared/pii.test.js +183 -0
  347. package/dist/tests/shared/pii.test.js.map +1 -0
  348. package/dist/tests/storage-operations.test.d.ts +1 -0
  349. package/dist/tests/storage-operations.test.js +116 -0
  350. package/dist/tests/storage-operations.test.js.map +1 -0
  351. package/framework-mcp/README.md +596 -77
  352. package/framework-mcp/dist/dashboard/assets/index-B2mYld0c.js +1221 -0
  353. package/framework-mcp/dist/dashboard/index.html +15 -0
  354. package/framework-mcp/dist/framework-mcp/src/index.js +914 -62
  355. package/framework-mcp/dist/framework-mcp/src/tools/compliance/mask_pii.js +55 -0
  356. package/framework-mcp/dist/framework-mcp/src/tools/definitions.js +24 -1
  357. package/framework-mcp/dist/framework-mcp/src/tools/framework/run_tests.js +25 -0
  358. package/framework-mcp/dist/framework-mcp/src/tools/gateway/llm_gateway_query.js +137 -0
  359. package/framework-mcp/dist/framework-mcp/src/tools/gateway/llm_gateway_status.js +90 -0
  360. package/framework-mcp/dist/framework-mcp/src/tools/index.js +34 -20
  361. package/framework-mcp/dist/framework-mcp/src/tools/messaging/approve_operation.js +80 -0
  362. package/framework-mcp/dist/framework-mcp/src/tools/messaging/ask_human.js +89 -20
  363. package/framework-mcp/dist/framework-mcp/src/tools/observability/check_ports.js +3 -1
  364. package/framework-mcp/dist/framework-mcp/src/tools/quality/analyze_code_quality.js +114 -0
  365. package/framework-mcp/dist/framework-mcp/src/tools/quality/check_architecture_compliance.js +134 -0
  366. package/framework-mcp/dist/framework-mcp/src/tools/schemas.js +32 -7
  367. package/framework-mcp/dist/framework-mcp/src/tools/shell/run_command.js +12 -2
  368. package/framework-mcp/dist/framework-mcp/src/tools/types.js +1 -0
  369. package/framework-mcp/dist/framework-mcp/src/utils/auth.js +78 -0
  370. package/framework-mcp/dist/framework-mcp/src/utils/auto-rollback.js +265 -0
  371. package/framework-mcp/dist/framework-mcp/src/utils/compliance.js +12 -4
  372. package/framework-mcp/dist/framework-mcp/src/utils/context-optimizer.js +156 -0
  373. package/framework-mcp/dist/framework-mcp/src/utils/discipline.js +217 -0
  374. package/framework-mcp/dist/framework-mcp/src/utils/finops.js +325 -0
  375. package/framework-mcp/dist/framework-mcp/src/utils/human-in-loop.js +215 -0
  376. package/framework-mcp/dist/framework-mcp/src/utils/license-scanner.js +283 -0
  377. package/framework-mcp/dist/framework-mcp/src/utils/loop-detector.js +361 -0
  378. package/framework-mcp/dist/framework-mcp/src/utils/quality.js +123 -0
  379. package/framework-mcp/dist/framework-mcp/src/utils/rules-engine.js +231 -0
  380. package/framework-mcp/dist/framework-mcp/src/utils/silent-router.js +128 -0
  381. package/framework-mcp/dist/framework-mcp/src/utils/storage.js +2 -2
  382. package/framework-mcp/dist/framework-mcp/src/utils/telemetry-streamer.js +396 -0
  383. package/framework-mcp/dist/src/cli/platforms/core.js +72 -0
  384. package/framework-mcp/dist/src/cli/platforms/index.js +5 -0
  385. package/framework-mcp/dist/src/cli/platforms/paths.js +101 -0
  386. package/framework-mcp/dist/src/cli/platforms/scaffold.js +72 -0
  387. package/framework-mcp/dist/src/cli/platforms/utils.js +75 -0
  388. package/framework-mcp/dist/src/cli/utils/claude.js +57 -0
  389. package/framework-mcp/dist/src/cli/utils/compliance.js +12 -0
  390. package/framework-mcp/dist/src/cli/utils/fs.js +138 -0
  391. package/framework-mcp/dist/src/cli/utils/pkg.js +282 -0
  392. package/framework-mcp/dist/src/cli/utils/quality.js +9 -0
  393. package/framework-mcp/dist/src/modules/agents/definitions.js +563 -0
  394. package/framework-mcp/dist/src/modules/agents/registry/analyst.js +39 -0
  395. package/framework-mcp/dist/src/modules/agents/registry/architect.js +42 -0
  396. package/framework-mcp/dist/src/modules/agents/registry/backend.js +50 -0
  397. package/framework-mcp/dist/src/modules/agents/registry/database.js +45 -0
  398. package/framework-mcp/dist/src/modules/agents/registry/devops.js +45 -0
  399. package/framework-mcp/dist/src/modules/agents/registry/explorer.js +37 -0
  400. package/framework-mcp/dist/src/modules/agents/registry/frontend.js +52 -0
  401. package/framework-mcp/dist/src/modules/agents/registry/git.js +36 -0
  402. package/framework-mcp/dist/src/modules/agents/registry/manager.js +64 -0
  403. package/framework-mcp/dist/src/modules/agents/registry/mobile.js +41 -0
  404. package/framework-mcp/dist/src/modules/agents/registry/native.js +41 -0
  405. package/framework-mcp/dist/src/modules/agents/registry/quality.js +43 -0
  406. package/framework-mcp/dist/src/modules/agents/registry/security.js +42 -0
  407. package/framework-mcp/dist/src/modules/agents/types.js +1 -0
  408. package/framework-mcp/dist/src/modules/engines/quality-gate.js +92 -0
  409. package/framework-mcp/dist/src/modules/engines/risk-engine.js +105 -0
  410. package/framework-mcp/dist/src/modules/engines/routing-engine.js +408 -0
  411. package/framework-mcp/dist/src/modules/engines/types.js +1 -0
  412. package/framework-mcp/dist/src/modules/memory/core.js +10 -17
  413. package/framework-mcp/dist/src/modules/memory/embedding.js +130 -0
  414. package/framework-mcp/dist/src/modules/providers/definitions.js +140 -0
  415. package/framework-mcp/dist/src/modules/providers/registry.js +18 -0
  416. package/framework-mcp/dist/src/modules/providers/shared.js +104 -0
  417. package/framework-mcp/dist/src/modules/providers/types.js +1 -0
  418. package/framework-mcp/dist/src/modules/skills/adapter-skills.js +449 -0
  419. package/framework-mcp/dist/src/modules/skills/definitions.js +70 -0
  420. package/framework-mcp/dist/src/shared/audit.js +220 -0
  421. package/framework-mcp/dist/src/shared/errors.js +68 -0
  422. package/framework-mcp/dist/src/shared/fs.js +4 -2
  423. package/framework-mcp/dist/src/shared/lock.js +159 -0
  424. package/framework-mcp/dist/src/shared/logger.js +15 -5
  425. package/framework-mcp/dist/src/shared/pii.js +212 -0
  426. package/framework-mcp/dist/src/shared/retention.js +170 -0
  427. package/framework-mcp/dist/src/shared/storage.js +49 -7
  428. package/framework-mcp/dist/src/shared/string.js +29 -0
  429. package/framework-mcp/package.json +8 -2
  430. package/mcp.json +11 -6
  431. package/package.json +22 -9
  432. package/templates/full/ATABEY_FULL.md +515 -0
package/README.md CHANGED
@@ -1,159 +1,624 @@
1
- # [GOV] Agent Atabey -- Enterprise AI Governance & Autonomous Orchestration Framework
1
+ # [GOV] Agent Atabey MCP-Powered AI Governance & Autonomous Orchestration
2
2
 
3
- [![Version](https://img.shields.io/badge/Version-v0.0.12-blue.svg)](https://github.com/ysf-bkr/atabey)
3
+ [![Version](https://img.shields.io/badge/Version-v0.0.15-blue.svg)](https://github.com/ysf-bkr/atabey)
4
4
  [![npm](https://img.shields.io/npm/v/atabey)](https://www.npmjs.com/package/atabey)
5
5
  [![npm-mcp](https://img.shields.io/npm/v/atabey-mcp)](https://www.npmjs.com/package/atabey-mcp)
6
+ [![MCP](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io)
6
7
  [![Type-Safety](https://img.shields.io/badge/Type--Safety-100%25-green.svg)](https://github.com/ysf-bkr/atabey)
7
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![Tests](https://img.shields.io/badge/Tests-205%20passed-brightgreen)](https://github.com/ysf-bkr/atabey)
9
- [![CI](https://img.shields.io/badge/CI-GitHub%20Actions-blue)](https://github.com/ysf-bkr/atabey/actions)
9
+ [![Tests](https://img.shields.io/badge/Tests-266%20passed-brightgreen)](https://github.com/ysf-bkr/atabey)
10
+ [![MCP Tools](https://img.shields.io/badge/MCP%20Tools-35-blue)](https://github.com/ysf-bkr/atabey)
11
+ [![Engine Tests](https://img.shields.io/badge/Engine%20Tests-56%20passed-brightgreen)](https://github.com/ysf-bkr/atabey)
10
12
 
11
- **[EN]** Agent Atabey is a Supreme AI Governance & Autonomous Orchestration Framework designed for Enterprise Development. It enforces strict "Zero Type Hole" and "Zero Mock" policies via deterministic Quality Gates, provides local Vector Memory, and orchestrates 13 specialized AI agents through a SQLite-backed Hermes Message Broker. Production ready for MCP integrations (Claude, Gemini, Cursor).
13
+ **Agent Atabey** is a **MCP (Model Context Protocol) server** that plugs directly into your AI coding interface Claude Code, Gemini CLI, or Cursor adding 13 specialized AI agents with enterprise-grade governance.
12
14
 
13
- **[TR]** Agent Atabey, kurumsal projeler için geliştirilmiş Yüce Yapay Zeka Yönetişim ve Otonom Orkestrasyon Çerçevesidir. Deterministik Kalite Kapıları ile katı "Zero Type Hole" ve "Zero Mock" kurallarını uygular, yerel Vektörel Hafıza sağlar ve 13 uzman yapay zeka ajanını SQLite tabanlı Hermes Mesajlaşma Aracısı üzerinden koordine eder. MCP entegrasyonları (Claude, Gemini, Cursor) için üretime tam hazırdır.
15
+ > **Philosophy:** "Order from Chaos"
16
+ > **How it works:** Install → Connect to your AI → Use `@agent` commands in chat
14
17
 
15
18
  ---
16
19
 
17
- ## [INSTALL] Installation / Kurulum
20
+ ## 🚀 How It Works
18
21
 
19
- ### Requirements / Gereksinimler
22
+ Atabey connects to your AI interface as an **MCP tool server**. Once connected, you use `@agent` commands directly in your AI chat:
23
+
24
+ ```
25
+ You (@backend): "Create a user login service with JWT authentication"
26
+
27
+
28
+ Atabey MCP Server (framework-mcp/)
29
+ │ Intercepts @agent command
30
+ │ Routes via RoutingEngine (TF-IDF)
31
+ │ Routes to @backend specialist
32
+ │ Quality Gate checks output
33
+ │ Stores in Vector Memory
34
+
35
+
36
+ Returns governed, reviewed, audited code
37
+ ```
38
+
39
+ **No separate terminal needed. No CLI commands for daily use.** Just chat with your AI and use `@agent` syntax.
40
+
41
+ ---
42
+
43
+ ## 📋 Table of Contents
44
+
45
+ - [Quick Start](#quick-start)
46
+ - [How Atabey Plugs Into Your AI](#how-atabey-plugs-into-your-ai)
47
+ - [Installation](#installation)
48
+ - [Profile-Based Setup](#profile-based-setup)
49
+ - [13 Specialized Agents](#13-specialized-agents)
50
+ - [Core Features](#core-features)
51
+ - [Dashboard](#dashboard)
52
+ - [CLI Reference](#cli-reference)
53
+ - [Architecture](#architecture)
54
+ - [Security](#security)
55
+ - [Contributing](#contributing)
56
+
57
+ ---
58
+
59
+ ## Quick Start
60
+
61
+ ### 1. Initialize Atabey in Your Project
62
+
63
+ ```bash
64
+ npx atabey init gemini --profile freelancer --yes
65
+ ```
66
+
67
+ ### 2. Connect to Your AI Interface
68
+
69
+ Atabey generates an `mcp.json` config. Point your AI assistant to it:
70
+
71
+ **Claude Code:**
72
+ ```json
73
+ // mcp.json
74
+ {
75
+ "mcpServers": {
76
+ "atabey": {
77
+ "command": "npx",
78
+ "args": ["-y", "atabey-mcp"],
79
+ "env": {
80
+ "ATABEY_PROJECT_ROOT": "/path/to/your/project"
81
+ }
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ **Gemini CLI:**
88
+ ```bash
89
+ gemini config set mcpServers.atabey.command "npx"
90
+ gemini config set mcpServers.atabey.args "[\"-y\", \"atabey-mcp\"]"
91
+ ```
92
+
93
+ **Cursor:**
94
+ ```json
95
+ // .cursor/mcp.json
96
+ {
97
+ "mcpServers": {
98
+ "atabey": {
99
+ "command": "npx",
100
+ "args": ["-y", "atabey-mcp"]
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ ### 3. Start Using in AI Chat
107
+
108
+ Open your AI interface and simply type:
109
+
110
+ ```
111
+ @backend Create a REST API for user management with CRUD operations
112
+ @security Audit the authentication middleware
113
+ @quality Run compliance check on the new feature
114
+ ```
115
+
116
+ **That's it.** Atabey handles routing, quality gates, memory, and governance automatically.
117
+
118
+ ---
119
+
120
+ ## How Atabey Plugs Into Your AI
121
+
122
+ ```
123
+ ┌──────────────────────────────────────────────────────────────────┐
124
+ │ YOUR AI INTERFACE │
125
+ │ Claude Code · Gemini CLI · Cursor · Codex CLI │
126
+ │ You type: @backend Create login service │
127
+ ├──────────────────────────────────────────────────────────────────┤
128
+ │ MCP PROTOCOL (stdio) │
129
+ │ JSON-RPC messages over stdin/stdout │
130
+ ├──────────────────────────────────────────────────────────────────┤
131
+ │ ATABEY MCP SERVER │
132
+ │ ┌──────────────────────────────────────────────────────────┐ │
133
+ │ │ 34 Tools: read_file, write_file, send_message, │ │
134
+ │ │ orchestrate_loop, run_tests, check_lint │ │
135
+ │ └──────────────────────────────────────────────────────────┘ │
136
+ ├──────────────────────────────────────────────────────────────────┤
137
+ │ GOVERNANCE LAYER │
138
+ │ Quality Gate → Risk Engine → Vector Memory → Audit Log │
139
+ └──────────────────────────────────────────────────────────────────┘
140
+ ```
141
+
142
+ Atabey is **not a separate platform**. It's a tool server that augments your existing AI assistant with:
143
+ - **13 specialized agents** (backend, frontend, security, etc.)
144
+ - **Deterministic quality gates** (AST analysis + lint + tests)
145
+ - **Risk detection** (blocks destructive operations)
146
+ - **Vector memory** (remembers past decisions)
147
+ - **Audit trails** (every action logged)
148
+
149
+ ---
150
+
151
+ ## Installation
152
+
153
+ ### Requirements
20
154
 
21
155
  | Requirement | Version |
22
- |-----------|----------|
156
+ |------------|---------|
23
157
  | **Node.js** | >= 18.0.0 |
24
158
  | **npm** | >= 9.0.0 |
25
- | **SQLite** | Built-in (via better-sqlite3) |
159
+ | **AI Interface** | Claude Code, Gemini CLI, Cursor, Codex CLI |
26
160
 
27
- ### Global Install / Global Kurulum
28
-
29
- **[EN]** Install the main CLI and the optional MCP server globally.
30
- **[TR]** Ana CLI aracını ve isteğe bağlı MCP sunucusunu global olarak kurun.
161
+ ### Quick Install
31
162
 
32
163
  ```bash
33
- # Main package / Ana Paket (CLI + Framework)
164
+ # Install globally (recommended)
34
165
  npm install -g atabey
35
166
 
36
- # MCP Server (for Claude/Gemini integration)
37
- npm install -g atabey-mcp
167
+ # Initialize with your preferred profile
168
+ npx atabey init gemini --profile freelancer --yes
169
+
170
+ # Verify installation
171
+ npx atabey status
172
+
173
+ # (Optional) Open the web dashboard
174
+ npx atabey dashboard
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Profile-Based Setup
180
+
181
+ Choose the profile that matches your team size. You can also customize your setup using **`--focus`** and **`--lang`** options to match your project type and preferred language.
182
+
183
+ ### `--profile freelancer` (1-3 people)
184
+
185
+ ```bash
186
+ # Default setup (Fullstack)
187
+ npx atabey init gemini --profile freelancer
188
+
189
+ # Custom focus (Mobile) in English
190
+ npx atabey init gemini --profile freelancer --focus mobile --lang en --yes
191
+ ```
192
+
193
+ | Feature | What You Get |
194
+ |---------|-------------|
195
+ | **Agents** | `@manager`, `@quality` + focus-specific agents (`@backend` for backend, `@frontend` for frontend, `@mobile` for mobile) |
196
+ | **Setup Time** | ~10 seconds |
197
+ | **Daily Workflow** | Chat with AI using focus-specific specialist agents |
198
+ | **Governance** | Basic quality gate + risk engine |
199
+ | **Why?** | Minimal overhead, just code |
200
+
201
+ ### `--profile team` (5-15 people)
202
+
203
+ ```bash
204
+ # Default setup (Fullstack)
205
+ npx atabey init gemini --profile team --unified
206
+
207
+ # Custom focus (Backend-only)
208
+ npx atabey init gemini --profile team --focus backend --yes
209
+ ```
210
+
211
+ | Feature | What You Get |
212
+ |---------|-------------|
213
+ | **Agents** | 5-8 focus-specific agents (e.g. manager, architect, backend, quality, database, security for backend focus) |
214
+ | **Setup Time** | ~30 seconds |
215
+ | **Daily Workflow** | Multi-agent collaboration with quality gate |
216
+ | **Dashboard** | 12 live modules, WebSocket real-time (shows only configured agents) |
217
+ | **Governance** | Quality gate + risk engine + contract validation |
218
+ | **Why?** | Team-scale governance without overhead |
219
+
220
+ ### `--profile enterprise` (15+ people)
221
+
222
+ ```bash
223
+ npx atabey init gemini --profile enterprise
224
+ ```
225
+
226
+ | Feature | What You Get |
227
+ |---------|-------------|
228
+ | **Agents** | All 13 agents (Supreme + Core + Recon) |
229
+ | **Setup Time** | ~1 minute |
230
+ | **Daily Workflow** | Full governance with human-in-the-loop |
231
+ | **Dashboard** | 12 modules + audit/error/memory tracking |
232
+ | **Security** | Human-in-the-Loop, KVKK PII masking, audit log |
233
+
234
+ ### Custom Setup
235
+
236
+ ```bash
237
+ npx atabey init gemini
238
+ # Interactive menu: choose agents, directories, focus, languages, and colors manually
38
239
  ```
39
240
 
40
241
  ---
41
242
 
42
- ## [QUICKSTART] Quick Start / Hızlı Başlangıç
243
+ ## 13 Specialized Agents
244
+
245
+ | Agent | Tier | Role | Freelancer | Team | Enterprise |
246
+ |-------|------|------|:----------:|:----:|:----------:|
247
+ | **@manager** | Supreme | Orchestration, governance, quality gate | ✅ | ✅ | ✅ |
248
+ | **@security** | Supreme | Security audit, vulnerability scanning | ❌ | ✅ | ✅ |
249
+ | **@architect** | Core | System design, contracts, architecture | ❌ | ✅ | ✅ |
250
+ | **@backend** | Core | Backend dev, API, business logic, tests | ✅ | ✅ | ✅ |
251
+ | **@frontend** | Core | UI, atomic components, responsive design | ❌ | ✅ | ✅ |
252
+ | **@quality** | Core | Compliance, lint, test coverage | ✅ | ✅ | ✅ |
253
+ | **@database** | Core | Database management, migrations, queries | ❌ | ✅ | ✅ |
254
+ | **@analyst** | Core | Strategy analysis, requirements | ❌ | ❌ | ✅ |
255
+ | **@mobile** | Core | React Native mobile development | ❌ | ❌ | ✅ |
256
+ | **@native** | Core | Native platform integration | ❌ | ❌ | ✅ |
257
+ | **@devops** | Core | CI/CD, deploy, infrastructure | ❌ | ❌ | ✅ |
258
+ | **@explorer** | Recon | Codebase discovery, analysis | ❌ | ❌ | ✅ |
259
+ | **@git** | Recon | Version control, commit management | ❌ | ❌ | ✅ |
260
+
261
+ ---
262
+
263
+ ## Core Features
264
+
265
+ ### 1. Deterministic Quality Gate
266
+ No agent can push code directly to production. All outputs pass through AST analysis (compliance), linting, and unit tests. Failed code triggers an automatic 3-attempt retry loop.
267
+
268
+ ### 2. Autonomous Vector Memory
269
+ Project context, contracts, and past tasks are stored locally via `better-sqlite3` using TF-IDF semantic search (cosine similarity). Agents search past architectural decisions.
43
270
 
44
- ### 1. Initialize Your Project / Projeyi Başlat
271
+ ### 3. Hermes Message Broker
272
+ Agents communicate asynchronously via a SQLite-backed message queue. A file-based lock protocol prevents race conditions.
45
273
 
46
- **[EN]** Enable Atabey in your project. This creates the `.atabey/` working directory, configures 13 specialized agents, and initializes the Hermes message infrastructure.
47
- **[TR]** Atabey'i proje dizininde aktif edin. Bu komut `.atabey/` çalışma dizinini oluşturur, 13 uzman ajanı yapılandırır ve Hermes mesaj altyapısını başlatır.
274
+ ### 4. Risk Engine (Human-in-the-Loop In-Chat Approval)
275
+ Operations containing `DROP`, `DELETE`, `TRUNCATE`, or secret manipulation are flagged. Execution is blocked until human approval.
48
276
 
277
+ **In-Chat Approval (no terminal switch needed):**
278
+ When an operation is blocked, the AI is instructed to call the `approve_operation` MCP tool:
279
+ ```
280
+ # AI calls this tool directly in chat:
281
+ approve_operation { "action": "approve", "traceId": "trace-xyz" }
282
+ approve_operation { "action": "reject", "traceId": "trace-xyz" }
283
+ approve_operation { "action": "list" } # See all pending approvals
284
+ ```
285
+
286
+ **Alternative (terminal):** `atabey approve <traceId>`
287
+
288
+ ### 5. Smart Routing Engine
289
+ TF-IDF keyword matching routes natural language tasks to the most capable agent. Uses specialized weights for all 13 agents.
290
+
291
+ ### 6. Web Dashboard
292
+ Real-time WebSocket dashboard with 12 live modules. Fully responsive (mobile + desktop).
293
+
294
+ ### 7. Multi-Platform Support
295
+ Claude Code, Gemini CLI, Cursor, Codex CLI, Antigravity CLI — automatic agent configuration for all platforms.
296
+
297
+ ### 8. Polyglot Backend Support
298
+ Node.js, Go, Java, Python, .NET — automatic scaffolding based on backend language selection.
299
+
300
+ ### 9. Multi-User Distributed Lock Registry
301
+ When multiple developers work on the same repository, their autonomous agents might attempt to modify the same files simultaneously. Atabey implements a Git-aware distributed locking mechanism (`DistributedLock`). It dynamically identifies the lock owner using `git config user.name` and blocks other processes from mutating the locked resources until released or expired, preventing merge conflicts and race conditions.
302
+
303
+ ### 10. Multi-Client MCP Support (Stdio + HTTP/SSE)
304
+ Atabey supports two transport modes:
305
+
306
+ **Stdio Mode (Default - Each developer runs their own instance):**
307
+ ```bash
308
+ # Each developer on their own machine
309
+ atabey mcp start
310
+ ```
311
+
312
+ **HTTP/SSE Mode (Single server serves the entire team):**
313
+ ```bash
314
+ # Run on a shared server or one developer's machine
315
+ MCP_TRANSPORT=http MCP_PORT=5858 atabey mcp start
316
+ ```
317
+ ```json
318
+ // Each developer's mcp.json:
319
+ {
320
+ "mcpServers": {
321
+ "atabey": {
322
+ "url": "http://192.168.1.100:5858/sse"
323
+ }
324
+ }
325
+ }
326
+ ```
327
+ In SSE mode, multiple IDEs/clients can connect simultaneously. Each client gets a dedicated session. Configure via `MCP_PORT` (default: **5858**) and `MCP_HOST` environment variables.
328
+
329
+ ### 11. AI Discipline Engine (Tool-Level Governance)
330
+ Atabey enforces strict AI behavior rules **at the MCP middleware layer** — AI cannot bypass these:
331
+
332
+ - **Rate Limiting**: Max 60 calls/minute per agent (configurable via `MCP_MAX_CALLS_PER_MINUTE`)
333
+ - **File Size Limits**: Prevents reading/writing files >1MB (configurable via `MCP_MAX_FILE_SIZE`)
334
+ - **Tool Blacklist/Whitelist**: Per-agent tool access control (`MCP_RESTRICTED_TOOLS`, `MCP_AGENT_TOOL_WHITELIST`)
335
+ - **Loop Detection**: Blocks consecutive same-tool calls (>10 in a row triggers cooldown)
336
+ - **Response Validation**: Checks response size and binary content before returning to AI
337
+ - **Cooldown Mechanism**: Automatic cooldown when limits are exceeded
338
+
339
+ > **Note:** `run_shell_command` is **not restricted by default** — it uses a command allowlist (`npm test`, `git`, `go test`, etc.) with shell metacharacter injection protection. Restrict specific commands via `MCP_RESTRICTED_TOOLS` if needed.
340
+
341
+ ```bash
342
+ # Restrict specific tools (optional, empty by default)
343
+ export MCP_RESTRICTED_TOOLS="some_dangerous_tool"
344
+ export MCP_AGENT_TOOL_WHITELIST="@backend:read_file,write_file,replace_text"
345
+ ```
346
+
347
+ ### 12. Token Economy & Cost Tracking
348
+ Every MCP tool call is tracked for token usage and estimated cost:
349
+
350
+ - **Per-Agent Metrics**: Total calls, tokens consumed, estimated cost per agent
351
+ - **Per-Action Metrics**: Most expensive operations tracked
352
+ - **Dashboard Integration**: Real-time cost visualization in the Metrics panel
353
+ - **Cost Calculation**: Estimated at $0.003 per 1K tokens
354
+
355
+ ```bash
356
+ # View metrics via API
357
+ curl http://localhost:5858/api/metrics
358
+ ```
359
+
360
+ ### 13. MCP Authentication (HTTP/SSE Mode)
361
+ When running in HTTP/SSE mode, API and MCP routes are protected with Bearer token authentication:
362
+
363
+ ```bash
364
+ # Set auth token
365
+ export MCP_AUTH_TOKEN="your-secret-token"
366
+
367
+ # Client connects with token
368
+ curl -H "Authorization: Bearer your-secret-token" http://localhost:5858/api/status
369
+ ```
370
+
371
+ - Public endpoints: `/api/health`, `/mcp/health`, static UI
372
+ - Protected endpoints: all `/api/*` and `/mcp/*` routes
373
+ - Unauthorized requests return 401 with configuration instructions
374
+
375
+ ### 14. Data Classification & Portability
376
+ Atabey automatically classifies data into security levels:
377
+
378
+ | Level | Description | Example |
379
+ |-------|-------------|---------|
380
+ | **public** | No sensitive data | General code |
381
+ | **internal** | Project-internal data | Configuration |
382
+ | **confidential** | PII detected | Emails, phones |
383
+ | **restricted** | Highly sensitive | API keys, tokens, IBAN |
384
+ | **critical** | Security-critical | Credentials, secrets |
385
+
386
+ Data portability (KVKK Art. 11 / GDPR Art. 20):
49
387
  ```bash
50
- atabey init gemini --unified --yes
388
+ # Export all data
389
+ atabey kvkk:export
390
+
391
+ # Export audit logs
392
+ atabey gateway stats
51
393
  ```
52
394
 
53
- ### 2. Start a Task / Ajanlara Görev Ver
395
+ ### 15. Adapter-Skill System
396
+ Each AI platform (Claude, Gemini, Cursor, Codex) has a unique skill mapping:
397
+
398
+ - **Platform-Specific Tool Mapping**: Internal tool names → platform-native identifiers
399
+ - **Skill-Based Agent Configuration**: Each agent gets platform-optimized tool sets
400
+ - **Unified Hub**: `.agents/` directory supports multi-adapter configurations
54
401
 
55
- **[EN]** Delegate directly to an agent or start smart orchestration.
56
- **[TR]** Doğrudan bir ajana görev verin veya akıllı orkestrasyonu başlatın.
402
+ ### 16. Explorer & Security Audit Commands
403
+ Built-in codebase analysis tools:
57
404
 
58
405
  ```bash
59
- # Direct delegation
60
- atabey @backend "Write and test the user login service"
406
+ # Generate dependency graph
407
+ atabey explorer graph src/
408
+
409
+ # Run security audit
410
+ atabey security src/
411
+
412
+ # Audit code quality
413
+ atabey explorer audit src/
414
+ ```
415
+
416
+ ### 17. Memory Layers
417
+ Atabey uses a multi-layered memory architecture:
418
+
419
+ | Layer | Description | Storage |
420
+ |-------|-------------|---------|
421
+ | **Core Memory** | Project state, trace, status | SQLite + JSON |
422
+ | **Vector Memory** | TF-IDF document embeddings | SQLite |
423
+ | **Knowledge Base** | Structured project knowledge | SQLite |
424
+ | **Task Store** | Planned tasks with DAG dependencies | SQLite |
425
+ | **Audit Logs** | All operation records | SQLite |
426
+ | **Specialty Memory** | Per-agent learned conventions | Markdown files |
427
+
428
+ ### 18. GDPR & KVKK - Automated PII Masking
429
+ Atabey implements **multi-layer PII masking** for compliance with KVKK (Turkish Law No. 6698) and GDPR (European Union):
430
+
431
+ **Layer 1 - MCP Middleware (Automatic):**
432
+ All MCP tool calls are intercepted:
433
+ - **Args Masking**: Tool arguments from the AI are masked before reaching the handler
434
+ - **Result Masking**: Handler results are masked before returning to the AI
435
+ - **No sensitive data ever reaches the AI model**
61
436
 
62
- # Smart orchestration
63
- atabey orchestrate
437
+ **Layer 2 - Logger PII Masking:**
438
+ All log entries are scanned for PII before being written. Sensitive data is automatically redacted.
439
+
440
+ **Layer 3 - Manual `mask_pii` Tool:**
441
+ Users can manually mask text or objects on demand:
442
+ ```
443
+ mask_pii(text: "Email: user@example.com") → "Email: ***@***"
64
444
  ```
65
445
 
66
- ### 3. Dashboard / Kontrol Paneli
446
+ **Supported Patterns:**
447
+ | Pattern | Example | Masked |
448
+ |---------|---------|--------|
449
+ | Email | `user@example.com` | `***@***` |
450
+ | Phone | `+90 555 123 45 67` | `***-***-****` |
451
+ | TC ID (Turkish ID) | `12345678901` | `***********` |
452
+ | API Key | `sk-abc...xyz` | `***-REDACTED-***` |
453
+ | JWT Token | `eyJ...eyJ...` | `***-JWT-REDACTED-***` |
454
+ | IP Address | `192.168.1.1` | `***.***.***.***` |
455
+ | Credit Card | `4111 1111 1111 1111` | `****-****-****-****` |
456
+ | IBAN | `TR33...1326` | `****-IBAN-REDACTED-****` |
457
+ | Date of Birth | `15/08/1990` | `**/**/****` |
458
+ | SSN | `123-45-6789` | `***-**-****` |
459
+
460
+ **Dashboard GDPR/KVKK Panel:**
461
+ - PII masked/detected statistics
462
+ - Data category distribution (USER_DATA, SECURITY, COMPLIANCE, RESTRICTED)
463
+ - Audit trail with masked data details
464
+ - GDPR Art. 17 / KVKK Art. 7 - Right to Erasure (Unutulma Hakkı) execution
465
+ - Category filter for event viewing
67
466
 
68
- **[EN]** Open the web-based visual control panel.
69
- **[TR]** Web tabanlı görsel yönetim panelini açın.
467
+ ---
468
+
469
+ ## Dashboard
70
470
 
71
471
  ```bash
72
- atabey dashboard
472
+ npx atabey dashboard # Opens at http://localhost:5858
73
473
  ```
74
474
 
475
+ | Module | Description | Update |
476
+ |--------|-------------|--------|
477
+ | 🤖 **Agent Monitor** | AI agent status + tasks | WS (5s) |
478
+ | 📨 **Hermes Stats** | Message queue statistics | WS (5s) |
479
+ | 💬 **Hermes Messages** | Message queue viewer + filter | WS (5s) |
480
+ | 🔐 **Approval Center** | Human-in-the-Loop approvals | WS |
481
+ | 📋 **Task Planner** | Task DAG + progress | REST (5s) |
482
+ | 📝 **Agent Logs** | Execution logs | WS (5s) |
483
+ | ⚠️ **Error Tracker** | Lint/compliance/security errors | WS |
484
+ | 🧠 **Memory Insights** | Vector memory search | REST |
485
+ | 🛡️ **Compliance** | Quality gate violations | REST (15s) |
486
+ | ✅ **Quality Panel** | Code quality analysis | REST |
487
+ | 🔌 **Adapters** | Adapter-skill mapping | REST |
488
+ | 🔒 **GDPR / KVKK** | PII masking, erasure, audit trail | REST |
489
+ | 📊 **Dashboard** | System overview | Mixed |
490
+
75
491
  ---
76
492
 
77
- ## [FEATURES] Core Features / Temel Özellikler
493
+ ## CLI Reference
78
494
 
79
- ### 1. Deterministic Quality Gate / Deterministik Kalite Kapısı
80
- **[EN]** No agent can push code directly to production. All outputs pass through AST Analysis (Compliance), Linting, and Unit Tests. If the code fails, the agent is forced into an automatic 3-attempt Retry Loop to fix its mistakes.
81
- **[TR]** Hiçbir ajan doğrudan üretime kod gönderemez. Tüm çıktılar AST Analizi, Lint ve Unit Test süreçlerinden geçer. Kod başarısız olursa, ajan hatalarını düzeltmesi için otomatik olarak 3 denemelik bir döngüye sokulur.
495
+ ```bash
496
+ atabey init [adapter] Initialize Atabey (--profile freelancer|team|enterprise)
497
+ atabey mcp start Start MCP server (connects to your AI interface)
498
+ atabey mcp install Generate mcp.json config for AI integration
499
+ atabey dashboard [port] Open web dashboard (default: 5858)
500
+ atabey status Show agent statuses and costs
501
+ atabey check Full health and compliance check
502
+ atabey orchestrate Start autonomous orchestration loop
503
+ atabey approve <traceId> Approve a blocked high-risk task (terminal alternative)
504
+ atabey hitl answer "<text>" Answer a pending ask_human question
505
+ atabey @agent "task" Send task directly to an agent
506
+ ```
82
507
 
83
- ### 2. Autonomous Vector Memory / Otonom Vektör Hafızası
84
- **[EN]** Atabey stores project context, contracts, and past tasks locally via `better-sqlite3` using a TF-IDF semantic search engine (Cosine Similarity). Agents can search and retrieve past architectural decisions.
85
- **[TR]** Proje bağlamı, kontratlar ve geçmiş görevler yerel SQLite üzerinde anlamsal bir arama motoruyla vektörel olarak depolanır. Ajanlar geçmiş mimari kararları arayıp bulabilir.
508
+ > **In-chat alternative:** Use `approve_operation` MCP tool directly in your AI CLI chat — no terminal switch needed.
86
509
 
87
- ### 3. Hermes Message Broker / Hermes Mesaj Kuyruğu
88
- **[EN]** Agents communicate asynchronously via a SQLite-backed message queue (`@manager` -> `@backend` -> `@quality`). A file-based Lock Protocol is used to prevent race conditions.
89
- **[TR]** Ajanlar SQLite tabanlı bir mesaj kuyruğu üzerinden birbirleriyle asenkron olarak haberleşir. Çakışmaları önlemek için dosya tabanlı kilit protokolü kullanılır.
510
+ Full command list: see `atabey help` or [ARCHITECTURE.md](ARCHITECTURE.md)
511
+
512
+ ---
90
513
 
91
- ### 4. Risk Engine / Risk Motoru
92
- **[EN]** Operations containing `DROP`, `DELETE`, `TRUNCATE`, or secret manipulation are flagged. Execution is blocked until a human administrator approves it via `atabey approve <traceId>` (Human-in-the-Loop).
93
- **[TR]** Tehlikeli veritabanı komutları veya gizli anahtar manipülasyonu içeren işlemler işaretlenir. Yönetici `atabey approve <traceId>` ile onay verene kadar işlem durdurulur (Human-in-the-Loop).
514
+ ## Architecture
94
515
 
95
- ### 5. Smart Routing Engine / Akıllı Yönlendirme Motoru
96
- **[EN]** Uses TF-IDF based keyword matching (Specialty + Role + DisplayName) to automatically route the user's natural language task to the most capable agent and split it into sub-tasks.
97
- **[TR]** TF-IDF tabanlı kelime eşleştirme kullanarak kullanıcının doğal dildeki görevini en yetkin ajana yönlendirir ve alt görevlere böler.
516
+ ```
517
+ ┌──────────────────────────────────────────────────────────────────┐
518
+ │ AI Chat Interface │
519
+ │ @backend Create login service (in Claude/Gemini/Cursor) │
520
+ ├──────────────────────────────────────────────────────────────────┤
521
+ │ MCP Server (framework-mcp/) │
522
+ │ 34 Tools · Stdio Transport │
523
+ │ Zod Validation · Error Handling │
524
+ ├──────────────────────────────────────────────────────────────────┤
525
+ │ src/cli/ 30+ Commands │
526
+ │ src/modules/ Engines + Agents │
527
+ │ src/shared/ Types + Storage │
528
+ ├────────────────┬───────────────────────────┬──────────────────────┤
529
+ │ ▼ ▼ │
530
+ │ ┌──────────────────────────┐ ┌──────────────────────────────┐ │
531
+ │ │ Web Dashboard │ │ SQLite (better-sqlite3) │ │
532
+ │ │ Port 5858 │ │ Hermes Queue · Memory │ │
533
+ │ │ 8 Module WS Live │ │ Audit Logs · Locks │ │
534
+ │ │ Responsive (Mob+Desk) │ │ │ │
535
+ │ └──────────────────────────┘ └──────────────────────────────┘ │
536
+ └──────────────────────────────────────────────────────────────────┘
537
+ ```
98
538
 
99
539
  ---
100
540
 
101
- ## [AGENTS] 13 Specialized Agents / 13 Uzman Ajan
102
541
 
103
- **[EN]** The framework consists of 13 agents divided into 3 tiers based on authority and role:
104
- **[TR]** Framework, yetki ve görevlerine göre 3 katmana ayrılmış 13 ajandan oluşur:
542
+ ## Implemented Governance Features
543
+
544
+ > These features were previously listed as "Blind Spots" but are now fully implemented:
105
545
 
106
- | Agent | Tier | Role | Description |
107
- |------|------|------|-------------|
108
- | **@manager** | [S] Supreme | Orchestration | Manages all agents, distributes tasks, oversees the Quality Gate. |
109
- | **@security** | [S] Supreme | Security Audit | Enforces Zero-Trust, encryption, and secret management. |
110
- | **@architect** | [C] Core | System Design | Manages system architecture and API contracts. |
111
- | **@backend** | [C] Core | Backend Dev. | Develops API endpoints, business logic, and writes mandatory tests. |
112
- | **@frontend** | [C] Core | Frontend Dev. | Builds UI, atomic components, and responsive designs (React/Vite). |
113
- | **@quality** | [C] Core | Quality Audit | Validates code compliance (Lint, AST) and test coverage. |
114
- | **@database** | [C] Core | DB Management | Handles schemas, migrations, and query optimization. |
115
- | **@analyst** | [C] Core | Strategy | Performs requirement analysis and contract validation. |
116
- | **@mobile** | [C] Core | Mobile Dev. | Develops offline-first React Native architecture. |
117
- | **@native** | [C] Core | Native Ops. | Handles OS-level integrations and system calls. |
118
- | **@devops** | [C] Core | Infrastructure | Manages CI/CD, Docker configurations, and server health. |
119
- | **@explorer** | [R] Recon | Discovery | Maps the codebase and analyzes dependencies. |
120
- | **@git** | [R] Recon | Version Control | Enforces Trace ID-based commit discipline and Git operations. |
546
+ | # | Feature | Status | Implementation |
547
+ |---|---------|--------|---------------|
548
+ | 1 | Token Budget / Circuit Breaker | **Implemented** | `context-optimizer.ts` budget tracking, per-agent limits, 50/80/90/100% alert thresholds |
549
+ | 2 | Silent Semantic Routing | **Implemented** | `silent-router.ts` — TF-IDF detection, stealth context injection via tool response |
550
+ | 3 | In-Chat Human-in-the-Loop | **Implemented** | `approve_operation` MCP tool approve/reject/list without leaving AI CLI chat |
551
+ | 4 | Prompt Conflict Resolution (Auto-Rollback) | **Implemented** | `auto-rollback.ts` AST scan, secret detection, file snapshot + restore + instruction |
552
+ | 5 | Distributed CLI Telemetry | 🟡 **Partial** | `telemetry-streamer.ts` local JSONL + HTTPS batch ready; central server not yet deployed |
121
553
 
122
554
  ---
123
555
 
124
- ## [CLI] Command Reference / Komut Referansı
556
+ ## Strategic Roadmap
125
557
 
126
- | Command | Usage | Description |
127
- |-------|-------|-------------|
128
- | `init` | `atabey init <adapter>` | Initialize the project and structure |
129
- | `orchestrate` | `atabey orchestrate` | Start the autonomous agent orchestration loop |
130
- | `dashboard` | `atabey dashboard` | Open the web-based visual control panel |
131
- | `approve` | `atabey approve <traceId>` | Approve a blocked high-risk task |
132
- | `status` | `atabey status` | Show current agent statuses and costs |
133
- | `trace` | `atabey trace [id]` | View execution trace history |
134
- | `check` | `atabey check` | Run AST compliance check |
135
- | `lint` | `atabey lint` | Run code quality checks (ESLint) |
136
- | `mcp` | `atabey mcp` | Manage MCP server configuration |
558
+ | # | Feature | Priority | Status |
559
+ |---|---------|----------|--------|
560
+ | 1 | Agent specialty memory auto-sync to agent files | 🟠 High | Planned |
561
+ | 2 | MCP `prompts/` endpoint for session-level governance injection | 🟠 High | Planned |
562
+ | 3 | Central Enterprise Server (telemetry ingest + org dashboard) | 🟡 Medium | Planned |
563
+ | 4 | Dynamic rule loading from `.atabey/rules/*.json` | 🟡 Medium | Planned |
137
564
 
138
565
  ---
139
566
 
140
- ## [TEST] Testing / Testler
567
+ ## Security
568
+
569
+ ### Zero Type Hole Policy
570
+ - `any` type usage is **strictly forbidden**
571
+ - All function inputs validated with Zod schemas
572
+ - Type safety enforced in CI pipeline
573
+
574
+ ### Zero Mock Policy
575
+ - Mock data usage is **forbidden** (except 3rd party services)
576
+ - Tests run against real implementations
577
+
578
+ ### PII Masking (KVKK Compliant)
579
+ - All logs scanned for Personally Identifiable Information
580
+ - Sensitive data automatically masked
581
+ - Turkish KVKK and EU GDPR compliant
582
+
583
+ ### Human-in-the-Loop
584
+ - Risk score ≥ 60 requires human approval
585
+ - `DROP`, `DELETE`, `TRUNCATE` operations blocked
586
+ - **In-chat approval:** `approve_operation` MCP tool (no terminal switch)
587
+ - **Terminal fallback:** `atabey approve <traceId>`
588
+
589
+ ---
141
590
 
142
- **[EN]** The project is comprehensively tested using Vitest (100% Success).
143
- **[TR]** Proje Vitest kullanılarak kapsamlı bir şekilde test edilmektedir (%100 Başarı).
591
+ ## Testing
144
592
 
145
593
  ```bash
146
- # Run all tests
147
- npm test
594
+ npm test # Run all tests (266 passing)
595
+ npm run test:watch # Watch mode
596
+ npm run test:coverage # Coverage report
597
+ ```
598
+
599
+ ---
600
+
601
+ ## Contributing
602
+
603
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the code of conduct and pull request process.
148
604
 
149
- # Test coverage report
150
- npm run test:coverage
605
+ ```bash
606
+ git clone https://github.com/ysf-bkr/atabey.git
607
+ cd atabey
608
+ npm install
609
+ npm install --prefix framework-mcp
610
+ npm install --prefix framework-mcp/dashboard
611
+ npm run build
151
612
  ```
152
613
 
153
614
  ---
154
615
 
155
- ## [LICENSE] License / Lisans
616
+ ## License
156
617
 
157
- MIT License -- [Yusuf BEKAR](mailto:ybekar@msn.com)
618
+ MIT License [Yusuf BEKAR](mailto:ybekar@msn.com)
158
619
 
159
620
  Enterprise inquiries: **ybekar@msn.com**
621
+
622
+ ---
623
+
624
+ *Developer: **Yusuf BEKAR** — "Order from Chaos"*