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
@@ -0,0 +1,449 @@
1
+ /**
2
+ * Adapter-Skill Mapping System
3
+ *
4
+ * Determines which skills each adapter has based on its unique tool capabilities.
5
+ * This way:
6
+ * - Claude Code uses a different skill set
7
+ * - Gemini CLI uses a different skill set
8
+ * - Cursor uses a different skill set
9
+ * - Codex (Copilot) uses a different skill set
10
+ *
11
+ * Bridges each adapter's tool mapping (CLAUDE_TOOL_VALUES, GEMINI_TOOL_VALUES, etc.)
12
+ * with skill definitions.
13
+ */
14
+ /**
15
+ * Skill configurations for all adapters
16
+ * Each adapter defines its skill set based on platform capabilities.
17
+ */
18
+ export const ADAPTER_SKILLS = {
19
+ // ─── Claude Code ────────────────────────────────────────────────
20
+ "claude": {
21
+ adapterId: "claude",
22
+ enabledSkills: {
23
+ file_system: {
24
+ name: "File System Mastery",
25
+ tools: ["read_file", "write_file", "list_dir"],
26
+ description: "Read, write, and list files in the workspace.",
27
+ mandates: [
28
+ "Use Read for file reading with line range support",
29
+ "Use Write for creating new files",
30
+ "Use LS for directory listing"
31
+ ]
32
+ },
33
+ editing: {
34
+ name: "Surgical Code Modification",
35
+ tools: ["replace_text", "batch_surgical_edit", "patch_file"],
36
+ description: "Precise code edits without full file rewrites.",
37
+ mandates: [
38
+ "Use Edit for single replacements",
39
+ "Use MultiEdit for batch operations across files"
40
+ ]
41
+ },
42
+ orchestration: {
43
+ name: "Hermes Orchestration & Messaging",
44
+ tools: ["orchestrate_loop", "send_agent_message", "get_framework_status", "log_agent_action"],
45
+ description: "Inter-agent communication and task delegation.",
46
+ mandates: [
47
+ "Use Task for agent-to-agent messages",
48
+ "Always include traceId in all messages"
49
+ ]
50
+ },
51
+ governance: {
52
+ name: "Control Plane Governance",
53
+ tools: ["acquire_lock", "release_lock", "register_agent", "update_contract_hash"],
54
+ description: "Resource locking and agent registration.",
55
+ mandates: [
56
+ "Acquire lock before editing shared resources",
57
+ "Release lock immediately after write"
58
+ ]
59
+ },
60
+ quality: {
61
+ name: "Quality Assurance",
62
+ tools: ["run_shell_command", "run_tests", "check_lint"],
63
+ description: "Testing and code quality enforcement.",
64
+ mandates: [
65
+ "Use Bash for running tests and linting",
66
+ "Zero-error policy for all quality gates"
67
+ ]
68
+ },
69
+ search: {
70
+ name: "Codebase Search & Exploration",
71
+ tools: ["grep_search", "get_project_map", "get_project_gaps"],
72
+ description: "Search and map the project structure.",
73
+ mandates: [
74
+ "Use Grep for regex search across codebase",
75
+ "Use Bash for project map generation"
76
+ ]
77
+ },
78
+ memory: {
79
+ name: "Project Memory Management",
80
+ tools: ["read_project_memory", "update_project_memory", "get_memory_insights",
81
+ "store_knowledge", "search_knowledge", "delete_knowledge"],
82
+ description: "Centralized project memory and knowledge base.",
83
+ mandates: [
84
+ "Read PROJECT_MEMORY.md at session start",
85
+ "Update memory after every significant change"
86
+ ]
87
+ }
88
+ },
89
+ toolMapping: {
90
+ read_file: "Read", write_file: "Write", replace_text: "Edit",
91
+ batch_surgical_edit: "MultiEdit", patch_file: "Edit",
92
+ list_dir: "LS", grep_search: "Grep",
93
+ run_shell_command: "Bash", run_tests: "Bash",
94
+ send_agent_message: "Task", orchestrate_loop: "Task",
95
+ log_agent_action: "Write", ask_human: "Task",
96
+ acquire_lock: "Write", release_lock: "Write",
97
+ register_agent: "Write", update_contract_hash: "Write",
98
+ store_knowledge: "Write", search_knowledge: "Read",
99
+ delete_knowledge: "Write", check_lint: "Bash"
100
+ }
101
+ },
102
+ // ─── Gemini CLI ─────────────────────────────────────────────────
103
+ "gemini": {
104
+ adapterId: "gemini",
105
+ enabledSkills: {
106
+ file_system: {
107
+ name: "File System Mastery",
108
+ tools: ["read_file", "write_file", "list_dir"],
109
+ description: "Read, write, and list files in the workspace.",
110
+ mandates: [
111
+ "Use read_file with line range for large files",
112
+ "Use write_file for creating new files"
113
+ ]
114
+ },
115
+ editing: {
116
+ name: "Surgical Code Modification",
117
+ tools: ["replace_text", "patch_file"],
118
+ description: "Precise code edits.",
119
+ mandates: [
120
+ "Use replace for surgical text replacements",
121
+ "Prefer surgical edits over full rewrites"
122
+ ]
123
+ },
124
+ orchestration: {
125
+ name: "Agent Orchestration",
126
+ tools: ["orchestrate_loop", "send_agent_message", "get_framework_status"],
127
+ description: "Inter-agent communication.",
128
+ mandates: [
129
+ "Use run_shell_command for agent messages",
130
+ "Always include traceId in communications"
131
+ ]
132
+ },
133
+ governance: {
134
+ name: "Control Plane Governance",
135
+ tools: ["acquire_lock", "release_lock", "register_agent"],
136
+ description: "Resource locking and agent registration.",
137
+ mandates: [
138
+ "Acquire lock before editing shared resources"
139
+ ]
140
+ },
141
+ quality: {
142
+ name: "Quality Assurance",
143
+ tools: ["run_shell_command", "check_lint"],
144
+ description: "Code quality enforcement.",
145
+ mandates: [
146
+ "Use run_shell_command for linting and testing"
147
+ ]
148
+ },
149
+ search: {
150
+ name: "Codebase Search",
151
+ tools: ["grep_search", "get_project_map"],
152
+ description: "Search the project structure.",
153
+ mandates: [
154
+ "Use grep_search for regex search"
155
+ ]
156
+ }
157
+ },
158
+ toolMapping: {
159
+ read_file: "read_file", write_file: "write_file",
160
+ replace_text: "replace", patch_file: "replace",
161
+ list_dir: "list_directory", grep_search: "grep_search",
162
+ run_shell_command: "run_shell_command",
163
+ send_agent_message: "run_shell_command",
164
+ orchestrate_loop: "run_shell_command",
165
+ log_agent_action: "write_file", ask_human: "run_shell_command",
166
+ acquire_lock: "write_file", release_lock: "write_file",
167
+ register_agent: "write_file", check_lint: "run_shell_command"
168
+ }
169
+ },
170
+ // ─── Grok (Gemini-compatible) ───────────────────────────────────
171
+ "grok": {
172
+ adapterId: "grok",
173
+ enabledSkills: {
174
+ file_system: {
175
+ name: "File System Mastery",
176
+ tools: ["read_file", "write_file", "list_dir"],
177
+ description: "Read, write, and list files.",
178
+ mandates: ["Use read_file with line range for large files"]
179
+ },
180
+ editing: {
181
+ name: "Code Modification",
182
+ tools: ["replace_text", "patch_file"],
183
+ description: "Precise code edits.",
184
+ mandates: ["Prefer surgical edits over full rewrites"]
185
+ },
186
+ search: {
187
+ name: "Codebase Search",
188
+ tools: ["grep_search", "get_project_map"],
189
+ description: "Search the project structure.",
190
+ mandates: ["Use grep_search for regex search"]
191
+ },
192
+ quality: {
193
+ name: "Quality Assurance",
194
+ tools: ["run_shell_command", "check_lint"],
195
+ description: "Code quality enforcement.",
196
+ mandates: ["Use run_shell_command for linting"]
197
+ }
198
+ },
199
+ toolMapping: {
200
+ read_file: "read_file", write_file: "write_file",
201
+ replace_text: "replace", patch_file: "replace",
202
+ list_dir: "list_directory", grep_search: "grep_search",
203
+ run_shell_command: "run_shell_command",
204
+ check_lint: "run_shell_command"
205
+ }
206
+ },
207
+ // ─── Cursor IDE ─────────────────────────────────────────────────
208
+ "cursor": {
209
+ adapterId: "cursor",
210
+ enabledSkills: {
211
+ file_system: {
212
+ name: "File System Mastery",
213
+ tools: ["read_file", "write_file", "list_dir"],
214
+ description: "Read, write, and list files.",
215
+ mandates: ["Use read_file with line range for large files"]
216
+ },
217
+ editing: {
218
+ name: "Code Modification",
219
+ tools: ["replace_text", "patch_file"],
220
+ description: "Precise code edits.",
221
+ mandates: ["Prefer surgical edits over full rewrites"]
222
+ },
223
+ search: {
224
+ name: "Codebase Search",
225
+ tools: ["grep_search", "get_project_map"],
226
+ description: "Search the project structure.",
227
+ mandates: ["Use grep_search for regex search"]
228
+ },
229
+ quality: {
230
+ name: "Quality Assurance",
231
+ tools: ["run_shell_command", "check_lint"],
232
+ description: "Code quality enforcement.",
233
+ mandates: ["Use run_shell_command for linting"]
234
+ }
235
+ },
236
+ toolMapping: {
237
+ read_file: "read_file", write_file: "write_file",
238
+ replace_text: "replace", patch_file: "replace",
239
+ list_dir: "list_directory", grep_search: "grep_search",
240
+ run_shell_command: "run_shell_command",
241
+ check_lint: "run_shell_command"
242
+ }
243
+ },
244
+ // ─── Codex (GitHub Copilot) ─────────────────────────────────────
245
+ "codex": {
246
+ adapterId: "codex",
247
+ enabledSkills: {
248
+ file_system: {
249
+ name: "File System Mastery",
250
+ tools: ["read_file", "write_file", "list_dir"],
251
+ description: "Read, write, and list files.",
252
+ mandates: ["Use read category tools for file reading"]
253
+ },
254
+ editing: {
255
+ name: "Code Modification",
256
+ tools: ["replace_text", "patch_file", "batch_surgical_edit"],
257
+ description: "Precise code edits.",
258
+ mandates: ["Use write category tools for edits"]
259
+ },
260
+ search: {
261
+ name: "Codebase Search",
262
+ tools: ["grep_search", "get_project_map"],
263
+ description: "Search the project structure.",
264
+ mandates: ["Use read category tools for search"]
265
+ },
266
+ quality: {
267
+ name: "Quality Assurance",
268
+ tools: ["run_shell_command", "check_lint"],
269
+ description: "Code quality enforcement.",
270
+ mandates: ["Use shell category tools for linting"]
271
+ }
272
+ },
273
+ toolMapping: {
274
+ read_file: "read", write_file: "write",
275
+ replace_text: "write", patch_file: "write",
276
+ batch_surgical_edit: "write",
277
+ list_dir: "read", grep_search: "read",
278
+ run_shell_command: "shell", check_lint: "shell"
279
+ }
280
+ },
281
+ // ─── Local LLM ──────────────────────────────────────────────────
282
+ "local": {
283
+ adapterId: "local",
284
+ enabledSkills: {
285
+ file_system: {
286
+ name: "File System Mastery",
287
+ tools: ["read_file", "write_file", "list_dir"],
288
+ description: "Read, write, and list files.",
289
+ mandates: ["Use read_file with line range for large files"]
290
+ },
291
+ editing: {
292
+ name: "Code Modification",
293
+ tools: ["replace_text", "patch_file"],
294
+ description: "Precise code edits.",
295
+ mandates: ["Prefer surgical edits over full rewrites"]
296
+ },
297
+ orchestration: {
298
+ name: "Agent Orchestration",
299
+ tools: ["orchestrate_loop", "send_agent_message", "get_framework_status"],
300
+ description: "Inter-agent communication.",
301
+ mandates: ["Always include traceId in communications"]
302
+ },
303
+ governance: {
304
+ name: "Control Plane Governance",
305
+ tools: ["acquire_lock", "release_lock", "register_agent"],
306
+ description: "Resource locking.",
307
+ mandates: ["Acquire lock before editing shared resources"]
308
+ },
309
+ quality: {
310
+ name: "Quality Assurance",
311
+ tools: ["run_shell_command", "check_lint"],
312
+ description: "Code quality enforcement.",
313
+ mandates: ["Use run_shell_command for linting"]
314
+ },
315
+ search: {
316
+ name: "Codebase Search",
317
+ tools: ["grep_search", "get_project_map"],
318
+ description: "Search the project structure.",
319
+ mandates: ["Use grep_search for regex search"]
320
+ }
321
+ },
322
+ toolMapping: {
323
+ read_file: "read_file", write_file: "write_file",
324
+ replace_text: "replace", patch_file: "replace",
325
+ list_dir: "list_directory", grep_search: "grep_search",
326
+ run_shell_command: "run_shell_command",
327
+ send_agent_message: "run_shell_command",
328
+ orchestrate_loop: "run_shell_command",
329
+ log_agent_action: "write_file", ask_human: "run_shell_command",
330
+ acquire_lock: "write_file", release_lock: "write_file",
331
+ register_agent: "write_file", check_lint: "run_shell_command"
332
+ }
333
+ },
334
+ // ─── Antigravity CLI ────────────────────────────────────────────
335
+ "antigravity-cli": {
336
+ adapterId: "antigravity-cli",
337
+ enabledSkills: {
338
+ file_system: {
339
+ name: "File System Mastery",
340
+ tools: ["read_file", "write_file", "list_dir"],
341
+ description: "Read, write, and list files.",
342
+ mandates: ["Use read_file with line range for large files"]
343
+ },
344
+ editing: {
345
+ name: "Code Modification",
346
+ tools: ["replace_text", "patch_file", "batch_surgical_edit"],
347
+ description: "Precise code edits.",
348
+ mandates: ["Prefer surgical edits over full rewrites"]
349
+ },
350
+ orchestration: {
351
+ name: "Agent Orchestration",
352
+ tools: ["orchestrate_loop", "send_agent_message", "get_framework_status"],
353
+ description: "Inter-agent communication.",
354
+ mandates: ["Always include traceId in communications"]
355
+ },
356
+ governance: {
357
+ name: "Control Plane Governance",
358
+ tools: ["acquire_lock", "release_lock", "register_agent"],
359
+ description: "Resource locking.",
360
+ mandates: ["Acquire lock before editing shared resources"]
361
+ },
362
+ quality: {
363
+ name: "Quality Assurance",
364
+ tools: ["run_shell_command", "check_lint"],
365
+ description: "Code quality enforcement.",
366
+ mandates: ["Use run_shell_command for linting"]
367
+ },
368
+ search: {
369
+ name: "Codebase Search",
370
+ tools: ["grep_search", "get_project_map"],
371
+ description: "Search the project structure.",
372
+ mandates: ["Use grep_search for regex search"]
373
+ }
374
+ },
375
+ toolMapping: {
376
+ read_file: "read_file", write_file: "write_file",
377
+ replace_text: "replace", patch_file: "replace",
378
+ batch_surgical_edit: "replace",
379
+ list_dir: "list_directory", grep_search: "grep_search",
380
+ run_shell_command: "run_shell_command",
381
+ send_agent_message: "run_shell_command",
382
+ orchestrate_loop: "run_shell_command",
383
+ log_agent_action: "write_file", ask_human: "run_shell_command",
384
+ acquire_lock: "write_file", release_lock: "write_file",
385
+ register_agent: "write_file", check_lint: "run_shell_command"
386
+ }
387
+ }
388
+ };
389
+ /**
390
+ * Determines which tools of an agent are available for a specific adapter.
391
+ *
392
+ * @param adapterId - Adapter ID
393
+ * @param agentTools - Agent's defined tool list
394
+ * @returns Filtered tool list (only those supported by the adapter)
395
+ */
396
+ export function filterToolsForAdapter(adapterId, agentTools) {
397
+ const adapterConfig = ADAPTER_SKILLS[adapterId];
398
+ if (!adapterConfig)
399
+ return agentTools;
400
+ // Collect all tools supported by the adapter
401
+ const supportedTools = new Set();
402
+ for (const skill of Object.values(adapterConfig.enabledSkills)) {
403
+ for (const tool of skill.tools) {
404
+ supportedTools.add(tool);
405
+ }
406
+ }
407
+ // Filter agent tools by what the adapter supports
408
+ return agentTools.filter(tool => supportedTools.has(tool));
409
+ }
410
+ /**
411
+ * Returns which skills an agent has for a specific adapter.
412
+ *
413
+ * @param adapterId - Adapter ID
414
+ * @param agentTools - Agent's defined tool list
415
+ * @returns Skills the agent has for this adapter
416
+ */
417
+ export function getSkillsForAgent(adapterId, agentTools) {
418
+ const adapterConfig = ADAPTER_SKILLS[adapterId];
419
+ if (!adapterConfig)
420
+ return [];
421
+ const agentToolSet = new Set(agentTools);
422
+ const matchedSkills = [];
423
+ for (const [, skill] of Object.entries(adapterConfig.enabledSkills)) {
424
+ // Add skill if at least one of its tools matches the agent
425
+ const matchingTools = skill.tools.filter(t => agentToolSet.has(t));
426
+ if (matchingTools.length > 0) {
427
+ matchedSkills.push({
428
+ name: skill.name,
429
+ description: skill.description,
430
+ tools: matchingTools,
431
+ mandates: skill.mandates
432
+ });
433
+ }
434
+ }
435
+ return matchedSkills;
436
+ }
437
+ /**
438
+ * Translates a tool name to its platform-native equivalent for a given adapter.
439
+ *
440
+ * @param adapterId - Adapter ID
441
+ * @param internalToolName - Internal tool name (e.g. "read_file")
442
+ * @returns Platform-native tool name (e.g. "Read" for Claude, "read_file" for Gemini)
443
+ */
444
+ export function mapToolToPlatform(adapterId, internalToolName) {
445
+ const adapterConfig = ADAPTER_SKILLS[adapterId];
446
+ if (!adapterConfig)
447
+ return internalToolName;
448
+ return adapterConfig.toolMapping[internalToolName] || internalToolName;
449
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Core Skill Definitions for Agent Atabey.
3
+ * Groups tools into logical capabilities for agents.
4
+ */
5
+ export const CORE_SKILLS = {
6
+ FILE_SYSTEM: {
7
+ name: "File System Mastery",
8
+ tools: ["read_file", "write_file"],
9
+ description: "Enables reading and writing files in the workspace with token efficiency.",
10
+ mandates: [
11
+ "- **Token Efficiency:** When reading large files, always specify `startLine` and `endLine` to avoid loading the entire file content into context.",
12
+ "- **Surgical Changes:** Avoid overwriting entire files for small updates; prefer surgical edit tools."
13
+ ]
14
+ },
15
+ EDITING: {
16
+ name: "Surgical Code Modification",
17
+ tools: ["replace_text", "patch_file"],
18
+ description: "Enables surgical, precise edits to source code files without overwriting the entire content.",
19
+ mandates: [
20
+ "- **Precise Selection:** Ensure `oldText` matches the target string exactly, including all whitespace and indentation.",
21
+ "- **Line-based Replacement:** Use `patch_file` for multi-line block updates, specifying exact 1-indexed start and end lines."
22
+ ]
23
+ },
24
+ ORCHESTRATION: {
25
+ name: "Hermes Orchestration & Messaging",
26
+ tools: ["orchestrate_loop", "send_agent_message", "get_framework_status", "log_agent_action"],
27
+ description: "Governs inter-agent message passing, task delegation, and execution logs using the Hermes Message Broker.",
28
+ mandates: [
29
+ "- **Traceability:** Always include the active `traceId` in all messages and action logs.",
30
+ "- **Action Logs:** Log critical operations with `log_agent_action` to ensure transparency and accountability.",
31
+ "- **Message Loops:** Run `orchestrate_loop` to process queued messages and trigger state transitions."
32
+ ]
33
+ },
34
+ GOVERNANCE: {
35
+ name: "Control Plane Governance & Locking",
36
+ tools: ["acquire_lock", "release_lock", "register_agent", "update_contract_hash"],
37
+ description: "Governs access control, resource locking, type contract validation, and agent registration.",
38
+ mandates: [
39
+ "- **Locking Protocol:** Always acquire a lock via `acquire_lock` on shared resources (like memory files) before editing, and release it immediately after writing.",
40
+ "- **Contract Enforcement:** Run `update_contract_hash` to re-sync backend types and check for breaking API changes."
41
+ ]
42
+ },
43
+ QUALITY_ASSURANCE: {
44
+ name: "Quality Assurance & Testing",
45
+ tools: ["run_shell_command", "view_file"],
46
+ description: "Enforces testing coverage standards, code style compliance, and runs test suites.",
47
+ mandates: [
48
+ "- **Zero-Mock Policy:** Integration tests must use real test database connections or service-compatible backends; do not rely on fake mocks.",
49
+ "- **Coverage Standards:** Ensure new code meets the 80% test coverage threshold before transitioning to release phases."
50
+ ]
51
+ },
52
+ DATABASE_MANAGEMENT: {
53
+ name: "Database Management & Migrations",
54
+ tools: ["view_file", "replace_text", "run_shell_command"],
55
+ description: "Handles database migrations, schema design, and query optimization.",
56
+ mandates: [
57
+ "- **No Direct DB Calls in Controllers:** Database operations must be isolated inside repository or service files; controllers must never perform raw DB calls.",
58
+ "- **No Raw SQL Strings:** Do not write raw SQL query strings; strictly use type-safe query builders like Kysely."
59
+ ]
60
+ },
61
+ DEVOPS_INFRASTRUCTURE: {
62
+ name: "DevOps & Infrastructure",
63
+ tools: ["run_shell_command", "view_file"],
64
+ description: "Manages CI/CD pipelines, container configurations, env files, and deployments.",
65
+ mandates: [
66
+ "- **No Hardcoded Secrets:** Never embed API keys, secrets, or passwords inside configuration files or codebases.",
67
+ "- **Immutable Deploys:** Ensure build steps compile production bundles successfully without configuration side-effects."
68
+ ]
69
+ }
70
+ };