atabey 0.0.12 → 0.0.13

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 (232) hide show
  1. package/ATABEY.md +45 -499
  2. package/PRIVACY.md +161 -0
  3. package/README.md +353 -88
  4. package/bin/validate-al-registry.js +4 -4
  5. package/dist/framework-mcp/src/tools/definitions.js +23 -1
  6. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  7. package/dist/framework-mcp/src/tools/gateway/llm_gateway_query.d.ts +19 -0
  8. package/dist/framework-mcp/src/tools/gateway/llm_gateway_query.js +138 -0
  9. package/dist/framework-mcp/src/tools/gateway/llm_gateway_query.js.map +1 -0
  10. package/dist/framework-mcp/src/tools/gateway/llm_gateway_status.d.ts +8 -0
  11. package/dist/framework-mcp/src/tools/gateway/llm_gateway_status.js +91 -0
  12. package/dist/framework-mcp/src/tools/gateway/llm_gateway_status.js.map +1 -0
  13. package/dist/framework-mcp/src/tools/index.d.ts +1 -1
  14. package/dist/framework-mcp/src/tools/index.js +35 -20
  15. package/dist/framework-mcp/src/tools/index.js.map +1 -1
  16. package/dist/framework-mcp/src/tools/quality/analyze_code_quality.d.ts +11 -0
  17. package/dist/framework-mcp/src/tools/quality/analyze_code_quality.js +166 -0
  18. package/dist/framework-mcp/src/tools/quality/analyze_code_quality.js.map +1 -0
  19. package/dist/framework-mcp/src/tools/quality/check_architecture_compliance.d.ts +11 -0
  20. package/dist/framework-mcp/src/tools/quality/check_architecture_compliance.js +135 -0
  21. package/dist/framework-mcp/src/tools/quality/check_architecture_compliance.js.map +1 -0
  22. package/dist/framework-mcp/src/tools/schemas.d.ts +88 -8
  23. package/dist/framework-mcp/src/tools/schemas.js +29 -0
  24. package/dist/framework-mcp/src/tools/schemas.js.map +1 -1
  25. package/dist/framework-mcp/src/tools/shell/run_command.js +2 -2
  26. package/dist/framework-mcp/src/tools/shell/run_command.js.map +1 -1
  27. package/dist/src/cli/commands/check.js +2 -2
  28. package/dist/src/cli/commands/check.js.map +1 -1
  29. package/dist/src/cli/commands/dashboard.d.ts +1 -1
  30. package/dist/src/cli/commands/dashboard.js +264 -41
  31. package/dist/src/cli/commands/dashboard.js.map +1 -1
  32. package/dist/src/cli/commands/gateway.d.ts +1 -0
  33. package/dist/src/cli/commands/gateway.js +172 -0
  34. package/dist/src/cli/commands/gateway.js.map +1 -0
  35. package/dist/src/cli/commands/init/create-agent.js +3 -3
  36. package/dist/src/cli/commands/init/create-agent.js.map +1 -1
  37. package/dist/src/cli/commands/init/scaffold-core.d.ts +1 -1
  38. package/dist/src/cli/commands/init/scaffold-core.js +1 -1
  39. package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
  40. package/dist/src/cli/commands/init.d.ts +2 -0
  41. package/dist/src/cli/commands/init.js +105 -23
  42. package/dist/src/cli/commands/init.js.map +1 -1
  43. package/dist/src/cli/commands/mcp.d.ts +7 -0
  44. package/dist/src/cli/commands/mcp.js +45 -22
  45. package/dist/src/cli/commands/mcp.js.map +1 -1
  46. package/dist/src/cli/commands/orchestrate.d.ts +8 -7
  47. package/dist/src/cli/commands/orchestrate.js +2 -1
  48. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  49. package/dist/src/cli/commands/quickstart.d.ts +5 -5
  50. package/dist/src/cli/commands/quickstart.js +36 -36
  51. package/dist/src/cli/commands/quickstart.js.map +1 -1
  52. package/dist/src/cli/index.js +230 -320
  53. package/dist/src/cli/index.js.map +1 -1
  54. package/dist/src/cli/platforms/core.d.ts +12 -0
  55. package/dist/src/cli/platforms/core.js +73 -0
  56. package/dist/src/cli/platforms/core.js.map +1 -0
  57. package/dist/src/cli/platforms/index.d.ts +5 -0
  58. package/dist/src/cli/platforms/index.js +6 -0
  59. package/dist/src/cli/platforms/index.js.map +1 -0
  60. package/dist/src/cli/platforms/paths.d.ts +15 -0
  61. package/dist/src/cli/platforms/paths.js +102 -0
  62. package/dist/src/cli/platforms/paths.js.map +1 -0
  63. package/dist/src/cli/platforms/scaffold.d.ts +2 -0
  64. package/dist/src/cli/platforms/scaffold.js +73 -0
  65. package/dist/src/cli/platforms/scaffold.js.map +1 -0
  66. package/dist/src/cli/platforms/utils.d.ts +4 -0
  67. package/dist/src/cli/platforms/utils.js +76 -0
  68. package/dist/src/cli/platforms/utils.js.map +1 -0
  69. package/dist/src/cli/shims.js +4 -4
  70. package/dist/src/cli/utils/fs.d.ts +1 -1
  71. package/dist/src/cli/utils/fs.js +1 -1
  72. package/dist/src/cli/utils/fs.js.map +1 -1
  73. package/dist/src/modules/agents/definitions.d.ts +2 -2
  74. package/dist/src/modules/agents/definitions.js +59 -23
  75. package/dist/src/modules/agents/definitions.js.map +1 -1
  76. package/dist/src/modules/contracts/api.d.ts +178 -0
  77. package/dist/src/modules/contracts/api.js +56 -0
  78. package/dist/src/modules/contracts/api.js.map +1 -0
  79. package/dist/src/modules/contracts/index.d.ts +5 -0
  80. package/dist/src/modules/contracts/index.js +6 -0
  81. package/dist/src/modules/contracts/index.js.map +1 -0
  82. package/dist/src/modules/engines/agent-executor.d.ts +27 -28
  83. package/dist/src/modules/engines/agent-executor.js +97 -69
  84. package/dist/src/modules/engines/agent-executor.js.map +1 -1
  85. package/dist/src/modules/engines/quality-gate.d.ts +7 -7
  86. package/dist/src/modules/engines/quality-gate.js +7 -7
  87. package/dist/src/modules/engines/routing-engine.d.ts +18 -27
  88. package/dist/src/modules/engines/routing-engine.js +70 -44
  89. package/dist/src/modules/engines/routing-engine.js.map +1 -1
  90. package/dist/src/modules/gateway/circuit-breaker.d.ts +40 -0
  91. package/dist/src/modules/gateway/circuit-breaker.js +163 -0
  92. package/dist/src/modules/gateway/circuit-breaker.js.map +1 -0
  93. package/dist/src/modules/gateway/cost-tracker.d.ts +55 -0
  94. package/dist/src/modules/gateway/cost-tracker.js +127 -0
  95. package/dist/src/modules/gateway/cost-tracker.js.map +1 -0
  96. package/dist/src/modules/gateway/gateway.d.ts +68 -0
  97. package/dist/src/modules/gateway/gateway.js +235 -0
  98. package/dist/src/modules/gateway/gateway.js.map +1 -0
  99. package/dist/src/modules/gateway/index.d.ts +19 -0
  100. package/dist/src/modules/gateway/index.js +19 -0
  101. package/dist/src/modules/gateway/index.js.map +1 -0
  102. package/dist/src/modules/gateway/load-balancer.d.ts +86 -0
  103. package/dist/src/modules/gateway/load-balancer.js +230 -0
  104. package/dist/src/modules/gateway/load-balancer.js.map +1 -0
  105. package/dist/src/modules/gateway/providers/anthropic.d.ts +14 -0
  106. package/dist/src/modules/gateway/providers/anthropic.js +169 -0
  107. package/dist/src/modules/gateway/providers/anthropic.js.map +1 -0
  108. package/dist/src/modules/gateway/providers/base.d.ts +38 -0
  109. package/dist/src/modules/gateway/providers/base.js +42 -0
  110. package/dist/src/modules/gateway/providers/base.js.map +1 -0
  111. package/dist/src/modules/gateway/providers/google.d.ts +18 -0
  112. package/dist/src/modules/gateway/providers/google.js +176 -0
  113. package/dist/src/modules/gateway/providers/google.js.map +1 -0
  114. package/dist/src/modules/gateway/providers/grok.d.ts +14 -0
  115. package/dist/src/modules/gateway/providers/grok.js +166 -0
  116. package/dist/src/modules/gateway/providers/grok.js.map +1 -0
  117. package/dist/src/modules/gateway/providers/index.d.ts +21 -0
  118. package/dist/src/modules/gateway/providers/index.js +38 -0
  119. package/dist/src/modules/gateway/providers/index.js.map +1 -0
  120. package/dist/src/modules/gateway/providers/ollama.d.ts +23 -0
  121. package/dist/src/modules/gateway/providers/ollama.js +187 -0
  122. package/dist/src/modules/gateway/providers/ollama.js.map +1 -0
  123. package/dist/src/modules/gateway/providers/openai.d.ts +14 -0
  124. package/dist/src/modules/gateway/providers/openai.js +170 -0
  125. package/dist/src/modules/gateway/providers/openai.js.map +1 -0
  126. package/dist/src/modules/gateway/rate-limiter.d.ts +41 -0
  127. package/dist/src/modules/gateway/rate-limiter.js +119 -0
  128. package/dist/src/modules/gateway/rate-limiter.js.map +1 -0
  129. package/dist/src/modules/gateway/types.d.ts +114 -0
  130. package/dist/src/modules/gateway/types.js +8 -0
  131. package/dist/src/modules/gateway/types.js.map +1 -0
  132. package/dist/src/modules/memory/core.d.ts +4 -12
  133. package/dist/src/modules/memory/core.js +10 -17
  134. package/dist/src/modules/memory/core.js.map +1 -1
  135. package/dist/src/modules/memory/embedding.d.ts +28 -0
  136. package/dist/src/modules/memory/embedding.js +131 -0
  137. package/dist/src/modules/memory/embedding.js.map +1 -0
  138. package/dist/src/modules/providers/definitions.d.ts +9 -0
  139. package/dist/src/modules/providers/definitions.js +141 -0
  140. package/dist/src/modules/providers/definitions.js.map +1 -0
  141. package/dist/src/modules/providers/registry.d.ts +12 -0
  142. package/dist/src/modules/providers/registry.js +19 -0
  143. package/dist/src/modules/providers/registry.js.map +1 -0
  144. package/dist/src/modules/providers/shared.d.ts +1 -0
  145. package/dist/src/modules/providers/shared.js +105 -0
  146. package/dist/src/modules/providers/shared.js.map +1 -0
  147. package/dist/src/modules/providers/types.d.ts +14 -0
  148. package/dist/src/modules/providers/types.js +2 -0
  149. package/dist/src/modules/providers/types.js.map +1 -0
  150. package/dist/src/modules/skills/adapter-skills.d.ts +68 -0
  151. package/dist/src/modules/skills/adapter-skills.js +450 -0
  152. package/dist/src/modules/skills/adapter-skills.js.map +1 -0
  153. package/dist/src/shared/audit.d.ts +105 -0
  154. package/dist/src/shared/audit.js +220 -0
  155. package/dist/src/shared/audit.js.map +1 -0
  156. package/dist/src/shared/fs.js +4 -2
  157. package/dist/src/shared/fs.js.map +1 -1
  158. package/dist/src/shared/lock.d.ts +82 -0
  159. package/dist/src/shared/lock.js +160 -0
  160. package/dist/src/shared/lock.js.map +1 -0
  161. package/dist/src/shared/logger.d.ts +2 -0
  162. package/dist/src/shared/logger.js +15 -5
  163. package/dist/src/shared/logger.js.map +1 -1
  164. package/dist/src/shared/pii.d.ts +37 -0
  165. package/dist/src/shared/pii.js +122 -0
  166. package/dist/src/shared/pii.js.map +1 -0
  167. package/dist/src/shared/retention.d.ts +63 -0
  168. package/dist/src/shared/retention.js +171 -0
  169. package/dist/src/shared/retention.js.map +1 -0
  170. package/dist/src/shared/storage.d.ts +3 -1
  171. package/dist/src/shared/storage.js +3 -1
  172. package/dist/src/shared/storage.js.map +1 -1
  173. package/dist/tests/adapter.test.js +1 -1
  174. package/dist/tests/adapter.test.js.map +1 -1
  175. package/dist/tests/adapters/paths.test.js +4 -4
  176. package/dist/tests/adapters/paths.test.js.map +1 -1
  177. package/dist/tests/cli/commands/dashboard-coverage.test.d.ts +1 -0
  178. package/dist/tests/cli/commands/dashboard-coverage.test.js +88 -0
  179. package/dist/tests/cli/commands/dashboard-coverage.test.js.map +1 -0
  180. package/dist/tests/cli/init/adapter_init.test.js +4 -5
  181. package/dist/tests/cli/init/adapter_init.test.js.map +1 -1
  182. package/dist/tests/cli/init/unified_init.test.js +5 -7
  183. package/dist/tests/cli/init/unified_init.test.js.map +1 -1
  184. package/dist/tests/integration/agent_flow.test.js +14 -8
  185. package/dist/tests/integration/agent_flow.test.js.map +1 -1
  186. package/dist/tests/modules/adapters/adapters.test.js +2 -2
  187. package/dist/tests/modules/adapters/adapters.test.js.map +1 -1
  188. package/dist/tests/modules/contracts/contracts.test.d.ts +1 -0
  189. package/dist/tests/modules/contracts/contracts.test.js +73 -0
  190. package/dist/tests/modules/contracts/contracts.test.js.map +1 -0
  191. package/dist/tests/modules/engines/agent-executor.test.js +30 -23
  192. package/dist/tests/modules/engines/agent-executor.test.js.map +1 -1
  193. package/dist/tests/modules/gateway/circuit-breaker.test.d.ts +1 -0
  194. package/dist/tests/modules/gateway/circuit-breaker.test.js +124 -0
  195. package/dist/tests/modules/gateway/circuit-breaker.test.js.map +1 -0
  196. package/dist/tests/modules/gateway/cost-tracker.test.d.ts +1 -0
  197. package/dist/tests/modules/gateway/cost-tracker.test.js +74 -0
  198. package/dist/tests/modules/gateway/cost-tracker.test.js.map +1 -0
  199. package/dist/tests/modules/gateway/load-balancer.test.d.ts +1 -0
  200. package/dist/tests/modules/gateway/load-balancer.test.js +70 -0
  201. package/dist/tests/modules/gateway/load-balancer.test.js.map +1 -0
  202. package/dist/tests/modules/gateway/rate-limiter.test.d.ts +1 -0
  203. package/dist/tests/modules/gateway/rate-limiter.test.js +62 -0
  204. package/dist/tests/modules/gateway/rate-limiter.test.js.map +1 -0
  205. package/dist/tests/orchestrator-dependencies.test.js +23 -6
  206. package/dist/tests/orchestrator-dependencies.test.js.map +1 -1
  207. package/dist/tests/shared/audit.test.d.ts +1 -0
  208. package/dist/tests/shared/audit.test.js +53 -0
  209. package/dist/tests/shared/audit.test.js.map +1 -0
  210. package/dist/tests/storage-operations.test.d.ts +1 -0
  211. package/dist/tests/storage-operations.test.js +116 -0
  212. package/dist/tests/storage-operations.test.js.map +1 -0
  213. package/framework-mcp/README.md +324 -77
  214. package/framework-mcp/dist/dashboard/assets/index-BAPGLiWE.js +267 -0
  215. package/framework-mcp/dist/dashboard/index.html +15 -0
  216. package/framework-mcp/dist/framework-mcp/src/tools/definitions.js +23 -1
  217. package/framework-mcp/dist/framework-mcp/src/tools/gateway/llm_gateway_query.js +137 -0
  218. package/framework-mcp/dist/framework-mcp/src/tools/gateway/llm_gateway_status.js +90 -0
  219. package/framework-mcp/dist/framework-mcp/src/tools/index.js +35 -20
  220. package/framework-mcp/dist/framework-mcp/src/tools/quality/analyze_code_quality.js +165 -0
  221. package/framework-mcp/dist/framework-mcp/src/tools/quality/check_architecture_compliance.js +134 -0
  222. package/framework-mcp/dist/framework-mcp/src/tools/schemas.js +29 -0
  223. package/framework-mcp/dist/framework-mcp/src/tools/shell/run_command.js +2 -2
  224. package/framework-mcp/dist/src/modules/memory/core.js +10 -17
  225. package/framework-mcp/dist/src/modules/memory/embedding.js +130 -0
  226. package/framework-mcp/dist/src/shared/fs.js +4 -2
  227. package/framework-mcp/dist/src/shared/logger.js +15 -5
  228. package/framework-mcp/dist/src/shared/pii.js +121 -0
  229. package/framework-mcp/dist/src/shared/storage.js +3 -1
  230. package/framework-mcp/package.json +1 -1
  231. package/package.json +10 -4
  232. package/templates/full/ATABEY_FULL.md +515 -0
package/PRIVACY.md ADDED
@@ -0,0 +1,161 @@
1
+ # Privacy & Compliance — Agent Atabey
2
+
3
+ ## KVKK & GDPR Compliance Declaration
4
+
5
+ Agent Atabey is designed with **Privacy by Design** and **Privacy by Default** principles, compliant with:
6
+
7
+ - **KVKK** (Turkish Personal Data Protection Law No. 6698) — Articles 4, 5, 7, 11, 12
8
+ - **GDPR** (EU General Data Protection Regulation) — Articles 5, 17, 32
9
+
10
+ ---
11
+
12
+ ## 📋 Data Inventory
13
+
14
+ | Data Type | Collected | Storage | Retention | Purpose |
15
+ |-----------|-----------|---------|-----------|---------|
16
+ | **Chat messages** | ✅ | SQLite (`messages`) | 30 days | Agent communication (Hermes) |
17
+ | **Audit logs** | ✅ | SQLite (`audit_log`) | 30-90 days | Governance & traceability |
18
+ | **Agent execution logs** | ✅ | SQLite (`logs`) | 30 days | Performance monitoring |
19
+ | **Task plans** | ✅ | SQLite (`tasks`) | 30 days | Task orchestration |
20
+ | **Project memory** | ✅ | SQLite + `.md` | Project lifetime | Agent context |
21
+ | **Vector embeddings** | ✅ | SQLite | Project lifetime | Semantic search |
22
+ | **API keys** | ❌ Never stored | Env variables only | N/A | N/A |
23
+ | **User credentials** | ❌ Never stored | N/A | N/A | N/A |
24
+ | **Personal data (PII)** | ❌ Automatically masked | N/A | N/A | N/A |
25
+
26
+ ---
27
+
28
+ ## 🛡️ Built-in Compliance Features
29
+
30
+ ### 1. PII Masking (KVKK Art. 12 / GDPR Art. 32)
31
+
32
+ All logs and audit records are automatically scanned for Personally Identifiable Information:
33
+
34
+ ```typescript
35
+ // Automatic masking on every log entry
36
+ logger.info("User email: user@example.com");
37
+ // Output: [INFO] User email: [EMAIL]
38
+
39
+ // Automatic masking on audit records
40
+ audit.log({ details: { phone: "+90 555 123 4567" } });
41
+ // Stored: { phone: "[PHONE]" }
42
+ ```
43
+
44
+ **Masked patterns:**
45
+ | Pattern | Example | Masked |
46
+ |---------|---------|--------|
47
+ | Email | `user@example.com` | `[EMAIL]` |
48
+ | Phone (TR) | `+90 555 123 4567` | `[PHONE]` |
49
+ | TC Kimlik | `12345678901` | `[TCKN]` |
50
+ | Credit Card | `4532 1234 5678 1234` | `[CC]` |
51
+ | IP Address | `192.168.1.1` | `[IP]` |
52
+ | API Keys | `sk-abc...` | `[REDACTED]` |
53
+ | JWT Tokens | `eyJ...` | `[REDACTED]` |
54
+ | Passwords | `"password": "123"` | `"password": "***"` |
55
+
56
+ ### 2. Data Retention (KVKK Art. 5 / GDPR Art. 5)
57
+
58
+ | Category | Retention | Justification |
59
+ |----------|-----------|---------------|
60
+ | OPERATIONAL | 30 days | KVKK Art. 5 — Limited purpose |
61
+ | USER_DATA | 90 days | KVKK Art. 5 — Contract fulfillment |
62
+ | API_CALL | 180 days | KVKK Art. 5 — Legal obligation |
63
+ | SECURITY | 365 days | KVKK Art. 5 — Security audit |
64
+ | COMPLIANCE | 730 days | KVKK Art. 5 — Regulatory compliance |
65
+
66
+ Automatic cleanup runs every hour. Configure via environment:
67
+ ```bash
68
+ export ATABEY_DATA_RETENTION_DAYS=60 # Override default (30)
69
+ ```
70
+
71
+ ### 3. Right to Erasure (KVKK Art. 7 / GDPR Art. 17)
72
+
73
+ Users can request deletion of all data associated with a Trace ID:
74
+
75
+ ```bash
76
+ # Delete all data for a specific trace
77
+ npx atabey approve T-042
78
+
79
+ # Complete data erasure (admin only)
80
+ atabey kvkk:erase-all
81
+ ```
82
+
83
+ Via API:
84
+ ```typescript
85
+ import { DataRetention } from "./shared/retention.js";
86
+
87
+ // Delete trace data
88
+ DataRetention.eraseTraceData("T-abc123");
89
+
90
+ // Delete ALL data (requires confirmation code)
91
+ DataRetention.eraseAllData("KVKK-RIGHT-TO-ERASURE");
92
+ ```
93
+
94
+ ### 4. Data Portability (KVKK Art. 11 / GDPR Art. 20)
95
+
96
+ All stored data is exportable:
97
+
98
+ ```bash
99
+ # Export audit logs
100
+ atabey gateway stats
101
+
102
+ # Export all data
103
+ atabey kvkk:export
104
+ ```
105
+
106
+ ### 5. Data Processing Records (KVKK Art. 4 / GDPR Art. 30)
107
+
108
+ Every data processing operation is logged in the audit trail:
109
+ - **What** data was processed
110
+ - **Who** processed it (which agent)
111
+ - **When** it was processed (timestamp)
112
+ - **Why** it was processed (trace ID)
113
+ - **Retention** period applied
114
+
115
+ ---
116
+
117
+ ## 🔒 Security Measures
118
+
119
+ | Measure | KVKK | GDPR | Implementation |
120
+ |---------|------|------|----------------|
121
+ | Pseudonymization | Art. 5 | Art. 32 | PII masking |
122
+ | Encryption at rest | Art. 12 | Art. 32 | SQLite file permissions |
123
+ | Access control | Art. 12 | Art. 32 | File-based locking |
124
+ | Incident response | Art. 12 | Art. 33 | Hermes alert system |
125
+ | Data breach notification | Art. 12 | Art. 34 | Audit log + logger |
126
+
127
+ ---
128
+
129
+ ## 📝 CLI Commands
130
+
131
+ ```bash
132
+ # Check current retention status
133
+ atabey kvkk:status
134
+
135
+ # Export data inventory
136
+ atabey kvkk:export
137
+
138
+ # Erase all data (with confirmation)
139
+ atabey kvkk:erase-all
140
+
141
+ # Run compliance audit
142
+ atabey check
143
+ ```
144
+
145
+ ---
146
+
147
+ ## 📚 References
148
+
149
+ - **KVKK Law No. 6698:** [kvkk.gov.tr](https://www.kvkk.gov.tr)
150
+ - **GDPR:** [gdpr.eu](https://gdpr.eu)
151
+ - **KVKK Art. 5:** Data processing conditions
152
+ - **KVKK Art. 7:** Right to erasure
153
+ - **KVKK Art. 11:** Data subject rights
154
+ - **KVKK Art. 12:** Data security obligations
155
+ - **GDPR Art. 5:** Principles of processing
156
+ - **GDPR Art. 17:** Right to erasure
157
+ - **GDPR Art. 32:** Security of processing
158
+
159
+ ---
160
+
161
+ *Last updated: 19.06.2026*