agent-enderun 0.9.3 → 0.9.5

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 (50) hide show
  1. package/.enderun/ENDERUN.md +1 -1
  2. package/.enderun/PROJECT_MEMORY.md +16 -0
  3. package/.enderun/STATUS.md +2 -2
  4. package/.enderun/config.json +1 -1
  5. package/.enderun/logs/manager.json +17 -0
  6. package/.enderun/mcp_config.json +4 -2
  7. package/.enderun/memory-graph/shared-facts.json +1 -1
  8. package/README.md +171 -99
  9. package/bin/init-check.js +9 -1
  10. package/bin/update-contract.js +9 -1
  11. package/bin/validate-agent-army.js +9 -1
  12. package/framework-mcp/dist/index.js +43 -225
  13. package/framework-mcp/dist/tools/definitions.js +109 -0
  14. package/framework-mcp/dist/tools/file_system/patch_file.js +18 -0
  15. package/framework-mcp/dist/tools/file_system/read_file.js +7 -0
  16. package/framework-mcp/dist/tools/file_system/replace_text.js +14 -0
  17. package/framework-mcp/dist/tools/file_system/write_file.js +9 -0
  18. package/framework-mcp/dist/tools/framework/get_status.js +5 -0
  19. package/framework-mcp/dist/tools/framework/orchestrate.js +5 -0
  20. package/framework-mcp/dist/tools/framework/update_contract_hash.js +5 -0
  21. package/framework-mcp/dist/tools/framework/update_memory.js +8 -0
  22. package/framework-mcp/dist/tools/index.js +25 -0
  23. package/framework-mcp/dist/tools/messaging/log_action.js +22 -0
  24. package/framework-mcp/dist/tools/messaging/send_message.js +21 -0
  25. package/framework-mcp/dist/tools/types.js +1 -0
  26. package/framework-mcp/dist/utils/cli.js +20 -0
  27. package/framework-mcp/dist/utils/security.js +35 -0
  28. package/framework-mcp/package.json +1 -1
  29. package/framework-mcp/src/declarations.d.ts +17 -3
  30. package/framework-mcp/src/index.ts +50 -262
  31. package/framework-mcp/src/tools/definitions.ts +111 -0
  32. package/framework-mcp/src/tools/file_system/patch_file.ts +23 -0
  33. package/framework-mcp/src/tools/file_system/read_file.ts +9 -0
  34. package/framework-mcp/src/tools/file_system/replace_text.ts +18 -0
  35. package/framework-mcp/src/tools/file_system/write_file.ts +11 -0
  36. package/framework-mcp/src/tools/framework/get_status.ts +7 -0
  37. package/framework-mcp/src/tools/framework/orchestrate.ts +7 -0
  38. package/framework-mcp/src/tools/framework/update_contract_hash.ts +7 -0
  39. package/framework-mcp/src/tools/framework/update_memory.ts +10 -0
  40. package/framework-mcp/src/tools/index.ts +31 -0
  41. package/framework-mcp/src/tools/messaging/log_action.ts +28 -0
  42. package/framework-mcp/src/tools/messaging/send_message.ts +26 -0
  43. package/framework-mcp/src/tools/types.ts +40 -0
  44. package/framework-mcp/src/utils/cli.ts +20 -0
  45. package/framework-mcp/src/utils/security.ts +41 -0
  46. package/mcp.json +4 -2
  47. package/package.json +2 -2
  48. package/src/cli/adapters.ts +4 -1
  49. package/src/cli/utils/app.ts +1 -10
  50. package/src/cli/utils/claude.ts +8 -3
@@ -1,4 +1,4 @@
1
- # Agent Enderun (v0.8.8)
1
+ # Agent Enderun (v0.9.4)
2
2
  # Place in project root. This file is the single source of truth for Base Project AI Extensions.
3
3
 
4
4
  ## đŸŽ–ī¸ AGENT CHECKLIST (MANDATORY BEFORE RESPONSE)
@@ -18,6 +18,22 @@
18
18
 
19
19
  ## HISTORY
20
20
 
21
+ ### 2026-05-30 — Framework Promotion to Stable v0.9.4
22
+
23
+ - **Agent:** @manager
24
+ - **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W5
25
+ - **Action:** Surgically aligned all directory conventions and MCP settings, then promoted the Agent Enderun framework to Stable Release v0.9.4 with comprehensive, high-quality documentation.
26
+
27
+ ### 2026-05-30 — Aligned Agent Directories & Integrations
28
+
29
+ - **Agent:** @manager
30
+ - **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W5
31
+ - **Action:** Surgically updated framework initialization and resolution logic to adhere to official directory standards.
32
+ - Aligned Grok's directory from generic `.agent` to the standard `.grok` directory.
33
+ - Fixed macOS/Windows Claude Desktop configuration path to target `claude_desktop_config.json`.
34
+ - Added global Claude Code CLI (`~/.claude.json`) and project-local `.mcp.json` support.
35
+ - Cleaned up duplicated candidate directories and unified frameworkDir resolution logic.
36
+
21
37
  ### 2026-05-30 — Framework Promotion to Stable v0.9.3
22
38
 
23
39
  - **Agent:** @manager
@@ -1,5 +1,5 @@
1
1
  # đŸ›ī¸ AGENT ENDERUN — ARMY COMMAND DASHBOARD
2
- > v0.9.2 | State Machine Active | Memory Graph: Online
2
+ > v0.9.4 | State Machine Active | Memory Graph: Online
3
3
 
4
4
  ---
5
5
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  | Metric | Value |
26
26
  | :--- | :--- |
27
- | **Framework Version** | v0.9.2 |
27
+ | **Framework Version** | v0.9.4 |
28
28
  | **System Health** | đŸŸĸ GREEN |
29
29
  | **Major Governance Audit** | COMPLETED |
30
30
  | **Active Tasks** | 1 |
@@ -2,7 +2,7 @@
2
2
  "logLevel": "info",
3
3
  "outputFormat": "text",
4
4
  "defaultProfile": "Lightweight",
5
- "version": "0.9.2",
5
+ "version": "0.9.4",
6
6
  "paths": {
7
7
  "backend": "apps/backend",
8
8
  "frontend": "apps/web",
@@ -0,0 +1,17 @@
1
+ {
2
+ "timestamp": "2026-05-30T13:51:00Z",
3
+ "agent": "@manager",
4
+ "action": "MODIFY",
5
+ "requestId": "01HGT8J5E2N0W0W0W0W0W0W0W5",
6
+ "status": "SUCCESS",
7
+ "summary": "Aligned framework directory definitions and discovery paths with official ecosystem conventions for Gemini, Claude Desktop/Code, Grok, and Antigravity.",
8
+ "files": [
9
+ "src/cli/adapters.ts",
10
+ "src/cli/utils/claude.ts",
11
+ "src/cli/utils/app.ts",
12
+ "bin/init-check.js",
13
+ "bin/validate-agent-army.js",
14
+ "bin/update-contract.js",
15
+ "framework-mcp/src/index.ts"
16
+ ]
17
+ }
@@ -2,8 +2,10 @@
2
2
  "mcpServers": {
3
3
  "agent-enderun": {
4
4
  "command": "node",
5
- "args": ["framework-mcp/dist/index.js"],
6
- "env": {}
5
+ "args": ["/Users/ybekar/Desktop/Projeler/agent-enderun/framework-mcp/dist/index.js"],
6
+ "env": {
7
+ "ENDERUN_PROJECT_ROOT": "/Users/ybekar/Desktop/Projeler/agent-enderun"
8
+ }
7
9
  }
8
10
  }
9
11
  }
@@ -41,6 +41,6 @@
41
41
  "Hermes Messaging Protocol — mandatory for inter-agent traffic",
42
42
  "Audit Log Mandatory — every agent action must be logged"
43
43
  ],
44
- "frameworkVersion": "0.9.0",
44
+ "frameworkVersion": "0.9.4",
45
45
  "constitutionFile": "ENDERUN.md"
46
46
  }
package/README.md CHANGED
@@ -1,41 +1,43 @@
1
1
  # đŸ›ī¸ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
2
2
 
3
- > **Stable Release:** v0.9.3
3
+ > **Stable Release:** v0.9.4
4
4
  > **Author:** Yusuf BEKAR
5
- > **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W4`
5
+ > **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W5`
6
6
  > **System Status:** đŸŸĸ All Systems Operational | Build Compile: Clean | Type-Safety: 100% Verified
7
7
 
8
8
  ---
9
9
 
10
- ## 🇹🇷 TÜRKÇE — Proje TanÄątÄąmÄą & DokÃŧmantasyonu
10
+ ## 🇹🇷 TÜRKÇE — Proje TanÄątÄąmÄą & DetaylÄą KullanÄąm KÄąlavuzu
11
11
 
12
12
  **Agent Enderun**, sÄąradan bir kod şablon Ãŧreteci veya basit bir AI asistanÄą değildir; karmaÅŸÄąk, Ãļlçeklenebilir ve kurumsal (enterprise) dÃŧzeydeki yazÄąlÄąm projeleri için Ãļzel olarak tasarlanmÄąÅŸ bir **Yapay Zeka YÃļnetişimi ve Otonom Ordu Komuta Sistemidir**.
13
13
 
14
- SÃŧrÃŧm **v0.9.2** itibarÄąyla sistem; kendi hafÄązasÄąnÄą yÃļnetebilen, monorepo proje yollarÄąnÄą dinamik olarak haritalayan, tÃŧm ajan seanslarÄąnÄą gÃŧvenli şekilde gÃŧnlÃŧkleyen ve farklÄą yapay zeka ekosistemlerini anayasal bir disiplin altÄąnda birleştiren **"Yaşayan Bir MÃŧhendislik OrganizmasÄą"** haline getirilmiştir.
14
+ SÃŧrÃŧm **v0.9.4** itibarÄąyla sistem; kendi hafÄązasÄąnÄą yÃļnetebilen, monorepo proje yollarÄąnÄą dinamik olarak haritalayan, tÃŧm ajan seanslarÄąnÄą gÃŧvenli şekilde gÃŧnlÃŧkleyen, farklÄą yapay zeka ekosistemlerini anayasal bir disiplin altÄąnda birleştiren ve **Claude Code / Desktop Sandbox kurallarÄąna tam uyum sağlayan** yaşayan bir mÃŧhendislik organizmasÄądÄąr.
15
15
 
16
16
  ---
17
17
 
18
- ### 🚀 SÃŧrÃŧm v0.9.2 İle Gelen Devrimsel Yenilikler
18
+ ### ❓ Neden Agent Enderun?
19
19
 
20
- 1. **`log_agent_action` (Otonom Telemetri ve Seans GÃŧnlÃŧğÃŧ):**
21
- * TÃŧm uzman ajanlarÄąn anayasaya gÃļre seans sonunda çalÄąÅŸtÄąrmak zorunda olduğu `log_agent_action` MCP aracÄą sisteme entegre edildi.
22
- * Ajan faaliyetlerini otomatik olarak `.enderun/logs/{agent}.json` veya `.gemini/antigravity-cli/logs/{agent}.json` altÄąnda gÃŧvenle kayÄąt altÄąna alan merkezi kilit sistemli telemetri altyapÄąsÄą kuruldu.
20
+ Yapay zeka kodlama yardÄąmcÄąlarÄą (Claude Code, Gemini CLI, Grok Build vb.) geliştikçe, kurumsal projelerde kontrolÃŧ kaybetmek çok daha kolay hale gelmiştir. Agent Enderun, aşağıdaki kritik **kurumsal problemleri çÃļzmek** amacÄąyla doğmuştur:
23
21
 
24
- 2. **`update-contract` (SÃļzleşme Senkronizasyon Otomasyonu):**
25
- * Backend tipleri değiştiğinde SHA-256 hash'ini otomatik hesaplayÄąp `apps/backend/contract.version.json` dosyasÄąna yazan `update-contract` CLI komutu ve `update_contract_hash` MCP aracÄą eklendi.
26
- * Bu sayede frontend/backend arasÄąndaki tip uyuşmazlığı tespiti ve senkronizasyonu otonom olarak yapÄąlabilir hale getirildi.
22
+ 1. **KontrolsÃŧz ve HatalÄą Değişiklikler (Rogue AI):** AjanlarÄąn tÃŧm kod dosyasÄąnÄą baştan yazmasÄąnÄą engelleyerek **milyonlarca satÄąrlÄąk kodlarÄą cerrahi hassasiyetle (`replace_text` / `patch_file` Ãŧzerinden)** değiştirmeye zorlar. Token tÃŧketimini ve hata oranÄąnÄą %90 azaltÄąr.
23
+ 2. **KayÄąp HafÄąza ve Bağlam Drifti:** Ajanlar oturum değiştirdikçe projenin geçmişini ve mimari kararlarÄąnÄą unutur. Enderun, **`PROJECT_MEMORY.md`** dosyasÄąnÄą projenin değişmez tek doğruluk kaynağı (SSOT) haline getirerek, seanslar arasÄą bağlam kaybÄąnÄą tamamen engeller.
24
+ 3. **Frontend-Backend Tip Uyuşmazlığı:** Backend tip tanÄąmlamalarÄąnda en ufak bir kayma olduğunda, otonom SHA-256 hash hesaplama ve kontrat denetleme motoru (`update-contract` / `verify-contract`) sayesinde arayÃŧz kodlarÄą yazÄąlmadan Ãļnce hatalar yakalanÄąr.
25
+ 4. **Çoklu Ajan Kaosu:** 10 farklÄą uzman yapay zeka ajanÄą, olay tabanlÄą asenkron bir haberleşme protokolÃŧ olan **Hermes Message Broker** Ãŧzerinden koordine edilir. Ajanlar birbirine rastgele mÃŧdahale edemez; tÃŧm gÃļrevler bir İş DağılÄąm Grafiği (DAG) Ãŧzerinden komuta edilir.
26
+ 5. **Sandbox ve GÃŧvenlik SÄąnÄąrlamalarÄą:** Claude Code gibi modern araçlarÄąn kernel dÃŧzeyindeki gÃŧvenlik yalÄątÄąmlarÄąnÄą (bubblewrap/seatbelt) ihlal etmemek adÄąna, tÃŧm bellek, kuyruk ve gÃŧnlÃŧk mekanizmalarÄą **proje kÃļk klasÃļrÃŧndeki lokal adaptÃļr yollarÄąnda saklanÄąr**; `/tmp` veya dÄąÅŸ dizinleri kullanmayarak sÄąfÄąr hata ile çalÄąÅŸÄąr.
27
27
 
28
- 3. **İleri Seviye KlasÃļr Keşfi (Antigravity Entegrasyonu):**
29
- * Dizin tespit mekanizmasÄąndaki aday listesine `.gemini/antigravity` ve `.gemini/antigravity-cli` gibi iç içe geçmiş (nested) yollar eklenerek Antigravity (IDE & CLI) çalÄąÅŸma ortamlarÄą için 100% hatasÄąz bir entegrasyon sağlandÄą.
30
-
31
- 4. **Dinamik Framework KlasÃļr Keşfi (Multi-Adapter Engine):**
32
- * CLI aracÄą; çalÄąÅŸma anÄąnda projede aktif olan framework klasÃļrÃŧnÃŧ `[.gemini/antigravity, .gemini/antigravity-cli, .gemini, .claude, .agent, .enderun]` adaylarÄą arasÄąndan otomatik olarak keşfeder.
28
+ ---
33
29
 
34
- 5. **YapÄąlandÄąrÄąlabilir KlasÃļr HaritalamasÄą (Dynamic Paths Map):**
35
- * Projede kullanÄąlan `backend`, `frontend`, `docs` ve `tests` dizin yollarÄą artÄąk dinamik olarak yÃļnetilir. Bilgiler `config.json` içerisindeki `paths` bloğundan okunur.
30
+ ### 🚀 SÃŧrÃŧm v0.9.4 İle Gelen Devrimsel Yenilikler
36
31
 
37
- 6. **Hermes Otonom Orkestrasyon DÃļngÃŧsÃŧ (`orchestrate` / `loop`):**
38
- * Yapay zeka ajanlarÄąnÄąn asenkron olay tabanlÄą (event-driven) haberleşme kanalÄą olan **Hermes Message Broker** devreye alÄąndÄą. `agent-enderun orchestrate` komutu asenkron delege gÃļrevleri otonom olarak yÃļnlendirir.
32
+ 1. **🔒 Claude Code & Desktop Sandbox Uyumlu MCP Mimarisi:**
33
+ * Claude Desktop ve Claude Code CLI'Äąn gÃŧvenlik yalÄątÄąmlarÄąna (sandbox) uyum sağlamak amacÄąyla, MCP sunucusunun otonom çalÄąÅŸacağı aktif proje dizinini dinamik çÃļzÃŧmleyen `ENDERUN_PROJECT_ROOT` ortam değişkeni altyapÄąsÄą sisteme entegre edildi.
34
+ * `claude` adaptÃļrÃŧ kurulurken, Claude Code CLI'Äąn projeyi otomatik keşfetmesini sağlayan proje-seviyesi **`.mcp.json`** dosyasÄą otomatik oluşturulur.
35
+ 2. **📂 Claude Desktop & CLI YapÄąlandÄąrma DÃŧzeltmeleri:**
36
+ * Kod tabanÄąnda eskiden aranan yanlÄąÅŸ `config.json` yollarÄą temizlendi; yerine macOS ve Windows'taki gerçek Claude Desktop ayar dosyasÄą olan **`claude_desktop_config.json`** ve kÃŧresel Claude Code CLI ayar dosyasÄą olan **`~/.claude.json`** entegrasyonlarÄą getirildi.
37
+ 3. **🛸 Grok Entegrasyonunun SektÃļr StandartlarÄąna UyumlanmasÄą:**
38
+ * Grok adaptÃļrÃŧnÃŧn kullandığı varsayÄąlan çalÄąÅŸma dizini jenerik `.agent` yerine, resmi ve topluluk standardÄą olan **`.grok/`** ve **`grok.md`** olarak gÃŧncellendi. Geriye dÃļnÃŧk uyumluluk korunarak `.agent` aday dizin listesinde tutuldu.
39
+ 4. **🧹 Kod Tekrarlarının Arındırılması ve SSOT Standardı:**
40
+ * `src/cli/utils/app.ts` içerisindeki mÃŧkerrer `getFrameworkDir` ve `getMemoryPath` fonksiyonlarÄą arÄąndÄąrÄąlarak, `./memory.js` Ãŧzerindeki tekil doğruluk kaynağı ile birleştirildi.
39
41
 
40
42
  ---
41
43
 
@@ -45,7 +47,7 @@ Agent Enderun, sektÃļrÃŧn ÃļncÃŧsÃŧ olan yapay zeka ekosistemlerini bir araya ge
45
47
  * **🚀 Claude Code (Operasyonel Cerrahi):** **Saha MÃŧhendisi**. Kod tabanÄąndaki otonom ve milimetrik cerrahi dÃŧzenlemeleri (Surgical Edits) gerçekleştirir.
46
48
  * **♊ Gemini & Vertex AI (Komuta İstihbaratÄą):** **Stratejik Karar Merkezi**. Proje geçmişini, mimari kararlarÄą analiz eder ve yÃŧksek seviyeli stratejik yÃļnlendirmeler yapar.
47
49
  * **🛸 Antigravity (İç Disiplin & Akademi):** **Askeri Akademi**. İç standartlarÄą, anayasal uyumu korumak amacÄąyla izole edilmiş, yÃŧksek disiplinli geliştirme ve test ortamÄą sağlar.
48
- * **🤖 Grok / X.ai (Otonom Keşif KanadÄą):** **Deneysel Keşif**. Gelecek vizyonlu otonom protokolleri test eder ve yapay zeka gÃŧdÃŧmlÃŧ geliştirme sÄąnÄąrlarÄąnÄą zorlar.
50
+ * **🤖 Grok / X.ai (Otonom Keşif KanadÄą):** **Deneysel Keşif**. Gelecek vizyonlu otonom protokolleri test eder ve yapay zeka gÃŧgÃŧmlÃŧ geliştirme sÄąnÄąrlarÄąnÄą zorlar.
49
51
 
50
52
  ---
51
53
 
@@ -68,87 +70,136 @@ TÃŧm operasyonlar, uzmanlÄąk alanlarÄąna gÃļre ayrÄąlmÄąÅŸ ve Hermes protokolÃŧy
68
70
 
69
71
  ---
70
72
 
71
- ### đŸ›Ąī¸ Enderun Disiplininin 5 Temel Direği
73
+ ### đŸ› ī¸ Kurulum & AdaptÃļr Entegrasyon KÄąlavuzu
72
74
 
73
- 1. **Mutlak İzlenebilirlik (Trace ID):** Her karar, işlem ve commit, denetlenebilir olmasÄą adÄąna 26 karakterli benzersiz bir ULID (Trace ID) ile mÃŧhÃŧrlenir.
74
- 2. **Önce Kontrat (Contract-First):** Backend ve frontend arasÄąndaki veri kontratlarÄą ve tipler, herhangi bir arayÃŧz kodu yazÄąlmadan Ãļnce kesin olarak kilitlenir.
75
- 3. **Cerrahi DÃŧzenleme StandardÄą:** TÃŧm dosyayÄą baştan yazmak yasaktÄąr. Sadece değişmesi gereken satÄąrlar `replace_text` / `patch_file` araçlarÄąyla milimetrik olarak değiştirilir.
76
- 4. **Otonom Bellek Arşivleme:** `PROJECT_MEMORY.md` kendi kendini temizleyen ve en gÃŧncel durumu koruyan bir SSOT (Single Source of Truth) olarak çalÄąÅŸÄąr.
77
- 5. **Anayasal Otorite:** TÃŧm ajanlar `.enderun/ENDERUN.md` içinde tanÄąmlanan Supreme Law (YÃŧce Yasa) kurallarÄąna kayÄątsÄąz şartsÄąz uymak zorundadÄąr.
75
+ #### 1. Gemini AdaptÃļrÃŧ Kurulumu
76
+ Gemini CLI veya Vertex AI entegrasyonu için proje dizininizde aşağıdaki komutu çalÄąÅŸtÄąrÄąn:
77
+ ```bash
78
+ npx agent-enderun init gemini
79
+ ```
80
+ * **Oluşturulan YapÄą:** Proje kÃļkÃŧnde `.gemini/` dizini ve `gemini.md` (SSOT şim dosyasÄą) oluşturulur.
81
+ * **Aktivasyon:** Gemini CLI'a `.gemini/mcp_config.json` dosyasÄąnÄą tanÄątÄąn.
78
82
 
79
- ---
83
+ #### 2. Claude AdaptÃļrÃŧ Kurulumu (Claude Code & Desktop)
84
+ Claude Desktop uygulamasÄąnda ve Claude Code CLI aracÄąnda otonom orduyu aktif etmek için:
85
+ ```bash
86
+ npx agent-enderun init claude
87
+ ```
88
+ * **Oluşturulan YapÄą:** Proje kÃļkÃŧnde `.claude/` dizini, `claude.md` ve en Ãļnemlisi proje-seviyesinde **`.mcp.json`** dosyasÄą oluşturulur.
89
+ * **KÃŧresel KayÄąt:** Komut, sisteminizde kurulu olan Claude Desktop yapÄąlandÄąrmasÄąnÄą (`claude_desktop_config.json`) ve Claude Code kÃŧresel yapÄąlandÄąrmasÄąnÄą (`~/.claude.json`) tarayarak MCP sunucusunu otomatik olarak kaydeder.
80
90
 
81
- ### đŸ› ī¸ CLI Komut ReferansÄą
91
+ #### 3. Grok AdaptÃļrÃŧ Kurulumu
92
+ xAI Grok Build veya topluluk CLI araçlarÄą için:
93
+ ```bash
94
+ npx agent-enderun init grok
95
+ ```
96
+ * **Oluşturulan YapÄą:** Proje kÃļkÃŧnde **`.grok/`** dizini ve **`grok.md`** şim dosyasÄą oluşturulur.
82
97
 
83
- | Komut | Yetkili Ajan | AÃ§Äąklama |
84
- | :--- | :--- | :--- |
85
- | `init [adapter]` | `@manager` | Seçilen IDE/Agent adaptÃļrÃŧnÃŧ (`gemini`, `claude`, `grok`, `antigravity-cli`) yerel projenize kurar. |
86
- | `status` | `@manager` | Aktif aşamayÄą, aktif Trace ID'yi ve ajanlarÄąn anlÄąk ordu durumlarÄąnÄą listeler. |
87
- | `check` | `@quality` | Anayasal sağlÄąk kontrolÃŧ, dosya bÃŧtÃŧnlÃŧğÃŧ ve dizin doğrulamasÄą yapar. |
88
- | `trace:new [desc]` | `@manager` | Yeni bir Trace ID başlatarak gÃļrev zincirini ve izlenebilirliği tetikler. |
89
- | `orchestrate` / `loop` | `@manager` | CanlÄą Hermes mesaj yÃļnlendirici dÃļngÃŧsÃŧnÃŧ başlatarak asenkron ajan gÃļrevlerini yÃļnlendirir. |
90
- | `verify-contract` | `@backend` | Backend ile frontend arasındaki tip uyumluluğunu doğrular ve denetler. |
91
- | `update-contract` | `@backend` | backend tip değişikliklerine gÃļre gÃŧncel SHA-256 hash sÃļzleşmesini otomatik Ãŧretir. |
92
- | `create-app [idea]` | `@manager` | Doğal dildeki talep ve gereksinimlerden kurumsal monorepo uygulamasÄą oluşturur. |
98
+ #### 4. Antigravity AdaptÃļrÃŧ Kurulumu
99
+ Antigravity IDE ve CLI entegrasyonlarÄąnÄą etkinleştirmek için:
100
+ ```bash
101
+ npx agent-enderun init antigravity
102
+ ```
103
+ * **Oluşturulan YapÄą:** `.gemini/antigravity/` veya `.gemini/antigravity-cli/` dizinleri altÄąnda yÃŧksek disiplinli izole çalÄąÅŸma ortamlarÄą oluşturulur.
93
104
 
94
105
  ---
95
106
 
96
- ### đŸ“Ļ npmjs YayÄąnlama & Prepublish Otomasyonu
107
+ ### đŸ•šī¸ CLI Komut ReferansÄą ve Parametreleri
108
+
109
+ Enderun CLI, `agent-enderun` (veya `npx agent-enderun`) komutu ile yÃļnetilir.
110
+
111
+ #### `init [adapter]`
112
+ Seçilen yapay zeka/IDE adaptÃļrÃŧnÃŧ projeye kurar.
113
+ * **KullanÄąm:** `npx agent-enderun init [gemini | claude | grok | antigravity]`
114
+ * **Örnek:** `npx agent-enderun init claude`
115
+
116
+ #### `status`
117
+ Projenin aktif fazÄąnÄą (Phase 0 - 4), aktif Trace ID'sini ve uzman ajanlarÄąn durum puanlarÄąnÄą listeler.
118
+ * **KullanÄąm:** `npx agent-enderun status`
119
+
120
+ #### `check`
121
+ Anayasal uyumluluk denetimlerini, kritik dosya bÃŧtÃŧnlÃŧklerini ve dizin doğrulamalarÄąnÄą gerçekleştirir.
122
+ * **KullanÄąm:** `npx agent-enderun check`
97
123
 
98
- Agent Enderun, npmjs Ãŧzerinde paketlenmeye kusursuz şekilde hazÄąrdÄąr:
99
- * **HazÄąr Derleme Otomasyonu (`prepublishOnly`):** Paket yayÄąna gÃļnderilmeden Ãļnce `"prepublishOnly"` kancasÄą tetiklenir ve `framework-mcp` (MCP Server) en gÃŧncel haliyle derlenerek dağıtÄąma hazÄąr hale getirilir.
100
- * **CLI Kaynak BÃŧtÃŧnlÃŧğÃŧ:** TÃŧm TypeScript derleme kaynaklarÄą (`src/`) paket içeriğine dahil edilmiştir.
124
+ #### `trace:new [description]`
125
+ Belirli bir geliştirme zinciri için yeni bir Trace ID (ULID) tetikler.
126
+ * **KullanÄąm:** `npx agent-enderun trace:new "Giriş modÃŧlÃŧ tasarÄąmÄą" [agent-name] [priority]`
127
+ * **Örnek:** `npx agent-enderun trace:new "Auth module design" backend P1`
101
128
 
102
- Yerel projenizi test etmek veya npm link Ãŧzerinden kurmak için:
129
+ #### `orchestrate` / `loop`
130
+ Hermes Message Broker asenkron event-driven ajanlar arasÄą iletişim dÃļngÃŧsÃŧnÃŧ canlÄą olarak başlatÄąr.
131
+ * **KullanÄąm:** `npx agent-enderun orchestrate`
132
+
133
+ #### `verify-contract`
134
+ Frontend ve backend katmanlarÄą arasÄąndaki tip bÃŧtÃŧnlÃŧğÃŧnÃŧ ve `contract.version.json` uygunluğunu kontrol eder.
135
+ * **KullanÄąm:** `npx agent-enderun verify-contract`
136
+
137
+ #### `update-contract`
138
+ Backend tiplerinde yapÄąlan değişiklikleri tarayarak `contract.version.json` Ãŧzerindeki SHA-256 hash imzalarÄąnÄą otonom olarak gÃŧnceller.
139
+ * **KullanÄąm:** `npx agent-enderun update-contract`
140
+
141
+ #### `create-app [idea]`
142
+ Doğal dildeki aÃ§Äąklamalardan, kurumsal standartlarda kontrat-tabanlÄą monorepo uygulamasÄą Ãŧretir.
143
+ * **KullanÄąm:** `npx agent-enderun create-app "MÃŧşteri CRM Paneli"`
144
+
145
+ ---
146
+
147
+ ### đŸ“Ļ Geliştirici & npm Link Test AltyapÄąsÄą
148
+
149
+ Paketi npm'de yayÄąnlamadan Ãļnce yerelinizde derlemek ve test etmek için:
103
150
  ```bash
104
- # Bağımlılıkları kurun ve MCP sunucusunu derleyin
151
+ # Proje bağımlÄąlÄąklarÄąnÄą yÃŧkleyin
105
152
  npm install
153
+
154
+ # framework-mcp (MCP Sunucusu) ve CLI derlemelerini tetikleyin
106
155
  npm run enderun:build
107
156
 
108
- # Paketi yerel NPM havuzunuza linkleyin
157
+ # Paketi global NPM havuzunuza bağlayın
109
158
  npm link
110
159
 
111
- # Test etmek istediğiniz boş bir klasÃļre gidin ve aracÄą bağlayÄąn
112
- mkdir test-projem && cd test-projem
160
+ # Boş bir test dizini aÃ§Äąp aracÄą bağlayÄąn
161
+ mkdir enderun-test && cd enderun-test
113
162
  npm init -y
114
163
  npm link agent-enderun
115
164
 
116
- # AdaptÃļrÃŧ başlatÄąn
165
+ # Herhangi bir adaptÃļr kurulumunu başlatÄąn
117
166
  npx agent-enderun init gemini
118
167
  ```
119
168
 
120
169
  ---
121
170
  ---
122
171
 
123
- ## đŸ‡ē🇸 ENGLISH — Project Showcase & Documentation
172
+ ## đŸ‡ē🇸 ENGLISH — Detailed Product Guide & Documentation
124
173
 
125
- **Agent Enderun** is not just a boilerplate code generator or a simple AI assistant; it is a state-of-the-art **AI Governance and Autonomous Army Command System** designed for highly complex, scalable, and fully auditable enterprise software projects.
174
+ **Agent Enderun** is not a generic boilerplate generator or a simple AI wrapper; it is an elite, state-of-the-art **AI Governance and Autonomous Army Command System** designed for complex, scalable, and highly auditable enterprise software projects.
126
175
 
127
- As of **v0.9.2**, the system operates as a **"Living Engineering Organism"** capable of managing its own memory, dynamically mapping monorepo project subfolders, secure-logging all agent sessions, and uniting disparate AI ecosystems under a single constitutional discipline.
176
+ As of **v0.9.4**, the system operates as a **"Living Engineering Organism"** capable of managing its own persistent memory, dynamically mapping project directory scopes, secure-logging expert agent activities, and **fully complying with Claude Code & Desktop Sandbox standards**.
128
177
 
129
178
  ---
130
179
 
131
- ### 🚀 Key Improvements in Version v0.9.2
180
+ ### ❓ Why Agent Enderun?
132
181
 
133
- 1. **`log_agent_action` (Autonomous Telemetry Log):**
134
- * Formally integrated the `log_agent_action` MCP tool, which all expert agents are constitutionally required to call at the end of their sessions.
135
- * Established a secure, file-locked logging mechanism to automatically append agent telemetry to `.enderun/logs/{agent}.json` or `.gemini/antigravity-cli/logs/{agent}.json`.
182
+ As AI coding assistants (Claude Code, Gemini CLI, Grok Build, etc.) become increasingly powerful, software projects are prone to rapid architectural drift and token wastage. Agent Enderun solves these critical **enterprise AI challenges**:
136
183
 
137
- 2. **`update-contract` (Contract Sync Automation):**
138
- * Added the `update-contract` CLI command and `update_contract_hash` MCP tool to automatically calculate the SHA-256 hash of backend types and write it to `apps/backend/contract.version.json`.
139
- * This enables autonomous drift detection and seamless type synchronization between frontend and backend.
184
+ 1. **Rogue AI Prevention (Surgical Edits):** It strictly prohibits agents from rewriting entire files. Instead, it forces them to execute micro-targeted changes via **`replace_text` / `patch_file` tools**, reducing API token consumption by up to 90%.
185
+ 2. **Context Loss Prevention (SSOT Memory):** AI agents naturally lose project history across chats. Enderun seals all project milestones, decisions, and tasks into a self-pruning **`PROJECT_MEMORY.md`** file, ensuring absolute context continuity.
186
+ 3. **Contract-First Safety (Frontend-Backend Drift):** Before any user interface code is written, API models and branded types are sealed. The otonomous contract verification engine checks SHA-256 type definitions to prevent integration drifts.
187
+ 4. **Symmetric Orchestration (Hermes Protocol):** 10 specialized expert agents communicate via an asynchronous, event-driven message broker (**Hermes**), preventing chaotic, uncoordinated AI behavior.
188
+ 5. **Sandbox & Security Compliance:** Modern CLI agents (like Claude Code) restrict filesystem access. By keeping all configurations, task logs, and queues local (inside `.gemini/`, `.claude/`, `.grok/`, etc.) in the project workspace, Enderun runs with **zero sandbox violations**.
140
189
 
141
- 3. **Advanced Path Discovery (Antigravity Integration):**
142
- * Added nested framework directory candidates like `.gemini/antigravity` and `.gemini/antigravity-cli` to the path resolution engine, ensuring 100% error-free integration within Antigravity IDE and CLI runtime environments.
143
-
144
- 4. **Dynamic Framework Directory Discovery (Multi-Adapter Engine):**
145
- * The CLI dynamically discovers the active framework folder from an prioritized candidate list `[.gemini/antigravity, .gemini/antigravity-cli, .gemini, .claude, .agent, .enderun]`.
190
+ ---
146
191
 
147
- 5. **Configurable Path Mapping (Dynamic Paths Map):**
148
- * Directories for `backend`, `frontend`, `docs`, and `tests` are fully dynamic and configurable via the `paths` block inside `config.json`.
192
+ ### 🚀 Key Improvements in Version v0.9.4
149
193
 
150
- 6. **Hermes Autonomous Orchestration Loop (`orchestrate` / `loop`):**
151
- * Enabled the **Hermes Message Broker**—an event-driven asynchronous communication channel between expert AI agents.
194
+ 1. **🔒 Claude Sandbox-Compliant MCP Architecture:**
195
+ * Integrated the `ENDERUN_PROJECT_ROOT` environment variable mapping, allowing the Model Context Protocol (MCP) server to dynamically resolve the target workspace root even when globally spawned by Claude Desktop.
196
+ * Added auto-generation of project-level **`.mcp.json`** files during Claude adapter initialization, enabling seamless project discovery for the Claude Code CLI.
197
+ 2. **📂 Robust Claude Config Resolution:**
198
+ * Patched path resolution to look for macOS/Windows **`claude_desktop_config.json`** (instead of standard `config.json`) and Claude Code CLI global configuration **`~/.claude.json`**.
199
+ 3. **🛸 Official Grok/xAI Directory Alignment:**
200
+ * Aligned Grok's default `frameworkDir` from the generic `.agent` directory to the standard **`.grok/`** folder and **`grok.md`** shim file.
201
+ 4. **🧹 Refactoring and Code Compaction:**
202
+ * Removed duplicated local `getFrameworkDir` and `getMemoryPath` helpers in `src/cli/utils/app.ts`, merging them directly into `./memory.js` to respect the Single Source of Truth rule.
152
203
 
153
204
  ---
154
205
 
@@ -158,7 +209,7 @@ Agent Enderun coordinates industry-leading AI environments by assigning each a s
158
209
  * **🚀 Claude Code (Operational Surgery):** The **Field Engineer**. Excels in executing precise, surgical, and autonomous codebase edits.
159
210
  * **♊ Gemini & Vertex AI (Command Intelligence):** The **Command Center**. Analyzes project history, memory logs, and executes high-level strategic decisions.
160
211
  * **🛸 Antigravity (Internal Discipline):** The **Military Academy**. Provides an isolated, high-discipline sandbox to preserve internal framework coding standards.
161
- * **🤖 Grok / X.ai (Exploration Wing):** The **Autonomous Scouting**. Testing futuristic agent behaviors and pushing AI-driven developer limits.
212
+ * **🤖 Grok / X.ai (Scouting Wing):** The **Scouting Specialist**. Explores futuristic agent behaviors and tests experimental protocols.
162
213
 
163
214
  ---
164
215
 
@@ -175,61 +226,82 @@ All workspace operations are divided among 10 specialized expert agents connecte
175
226
  | **`@frontend`** | Fluid Responsive UI | Panda CSS design, responsive-first interfaces, customized React hooks, rollback discipline management. |
176
227
  | **`@devops`** | Infrastructure Specialist | Native Node.js deployments, rollback plans, monitoring & logging setups. |
177
228
  | **`@explorer`** | Codebase Intelligence | Project analysis, dependency graph generation, legacy conversion strategies. |
178
- | **`@git`** | Version Control | Semantic Trace-ID-aligned commits, release tagging, branch hygiene. |
229
+ | **`@git`** | Version Control | Semantic Trace-ID-aligned commits, branch hygiene. |
179
230
  | **`@mobile`** | Mobile Development | React Native / Expo UI automation and native builds. |
180
231
  | **`@native`** | Desktop Engineering | Tauri and Electron desktop app integrations. |
181
232
 
182
233
  ---
183
234
 
184
- ### đŸ›Ąī¸ Five Pillars of Enderun Discipline
235
+ ### đŸ› ī¸ Adapter Scaffolding & Setup Guide
185
236
 
186
- 1. **Absolute Traceability (Trace ID):** Every single decision is stamped with a unique 26-character ULID (Trace ID) for thorough auditing.
187
- 2. **Contract-First:** Backend-frontend data contracts are defined and sealed before any user interface code is written.
188
- 3. **Surgical Edit Standard:** Rewriting entire files is strictly prohibited. Only modified lines are changed using `replace_text` / `patch_file`.
189
- 4. **Autonomous Memory Archiving:** `PROJECT_MEMORY.md` functions as a self-pruning Single Source of Truth (SSOT).
190
- 5. **Constitutional SSOT:** All agents must adhere to the supreme constitutional law defined in `.enderun/ENDERUN.md`.
237
+ #### 1. Gemini Adapter
238
+ Initialize the Gemini CLI / Vertex AI environment:
239
+ ```bash
240
+ npx agent-enderun init gemini
241
+ ```
242
+ * **Created Files:** `.gemini/` runtime folder, `gemini.md` (SSOT entrance), and `.gemini/mcp_config.json`.
191
243
 
192
- ---
244
+ #### 2. Claude Adapter (Claude Code CLI & Desktop App)
245
+ Bootstrap the framework for Anthropic's Claude:
246
+ ```bash
247
+ npx agent-enderun init claude
248
+ ```
249
+ * **Created Files:** `.claude/` folder, `claude.md` shim, and project-level **`.mcp.json`** for Claude Code.
250
+ * **Global Registration:** Automatically discovers and registers the MCP server in Claude Desktop's `claude_desktop_config.json` and Claude Code's `~/.claude.json`.
193
251
 
194
- ### đŸ› ī¸ CLI Command Map
252
+ #### 3. Grok Adapter
253
+ Scaffold for xAI Grok Build:
254
+ ```bash
255
+ npx agent-enderun init grok
256
+ ```
257
+ * **Created Files:** **`.grok/`** folder and **`grok.md`** shim file.
195
258
 
196
- | Command | Authoritative Agent | Description |
197
- | :--- | :--- | :--- |
198
- | `init [adapter]` | `@manager` | Initialize the framework for a selected adapter (`gemini`, `claude`, `grok`, `antigravity-cli`). |
199
- | `status` | `@manager` | Display active phase, Trace ID, and agent health scores. |
200
- | `check` | `@quality` | Perform a constitutional health check, folder structure, and file integrity scan. |
201
- | `trace:new [desc]` | `@manager` | Start a new task chain with a unique Trace ID. |
202
- | `orchestrate` / `loop` | `@manager` | Spin up the live Hermes message-broker loop to route asynchronous agent actions. |
203
- | `verify-contract` | `@backend` | Verify and seal type alignment between backend and frontend contracts. |
204
- | `update-contract` | `@backend` | Automatically calculate and synchronize the backend contract SHA-256 hash. |
205
- | `create-app [idea]` | `@manager` | Generate a corporate monorepo application from natural language requirements. |
259
+ #### 4. Antigravity Adapter
260
+ Bootstrap the high-discipline sandbox for Antigravity IDE and CLI runtimes:
261
+ ```bash
262
+ npx agent-enderun init antigravity
263
+ ```
264
+ * **Created Files:** `.gemini/antigravity/` or `.gemini/antigravity-cli/` isolated paths.
206
265
 
207
266
  ---
208
267
 
209
- ### đŸ“Ļ npmjs Publication & Prepublish Automation
268
+ ### đŸ•šī¸ CLI Command Reference
210
269
 
211
- Agent Enderun is fully optimized for immediate publication to npmjs:
212
- * **Prepublish Build Automation Hook (`prepublishOnly`):** Triggers `npm run enderun:build` before publishing, ensuring compiled Model Context Protocol (MCP) server binaries are always built and up-to-date.
213
- * **CLI Source Bundle Inclusion:** Bundles the `"src"` folder in the published package.
270
+ Execute commands via `agent-enderun` (or `npx agent-enderun`):
214
271
 
215
- To test the package locally via npm link:
272
+ * **`init [adapter]`**: Scaffold framework directories and register local/global MCP server instances.
273
+ * **`status`**: Output active Phase (0-4), current active Trace ID, and agent capability logs.
274
+ * **`check`**: Run a thorough framework integrity, folder alignment, and constitutional compliance check.
275
+ * **`trace:new [desc] [agent] [priority]`**: Launch a new traceable task chain stamped with a unique ULID.
276
+ * **`orchestrate` / `loop`**: Launch the Hermes live event-driven message-routing loop for asynchronous agent synchronization.
277
+ * **`verify-contract`**: Perform a contract audit to ensure frontend types match backend schemas.
278
+ * **`update-contract`**: Re-calculate type definitions and update `contract.version.json` with a new SHA-256 hash.
279
+ * **`create-app [idea]`**: Autonomously generate a full-stack monorepo project starter based on natural language inputs.
280
+
281
+ ---
282
+
283
+ ### đŸ“Ļ Local Package Testing & Development
284
+
285
+ To compile and link the package locally for development:
216
286
  ```bash
217
- # Install root dependencies and build MCP
287
+ # Install package dependencies
218
288
  npm install
289
+
290
+ # Compile the Model Context Protocol (MCP) server and build assets
219
291
  npm run enderun:build
220
292
 
221
- # Create a global npm link
293
+ # Globally link package on your system
222
294
  npm link
223
295
 
224
- # Create a test folder and link package
225
- mkdir test-project && cd test-project
296
+ # Create a test folder and mount package
297
+ mkdir enderun-test && cd enderun-test
226
298
  npm init -y
227
299
  npm link agent-enderun
228
300
 
229
- # Boot the adapter scaffolding
301
+ # Bootstrap scaffolding
230
302
  npx agent-enderun init gemini
231
303
  ```
232
304
 
233
305
  ---
234
306
 
235
- Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.3**
307
+ Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.4**
package/bin/init-check.js CHANGED
@@ -5,7 +5,15 @@ import path from "path";
5
5
 
6
6
  const targetDir = process.cwd();
7
7
 
8
- const candidates = [".gemini", ".claude", ".agent", ".enderun"];
8
+ const candidates = [
9
+ ".gemini/antigravity",
10
+ ".gemini/antigravity-cli",
11
+ ".gemini",
12
+ ".claude",
13
+ ".grok",
14
+ ".agent",
15
+ ".enderun",
16
+ ];
9
17
  let frameworkDir = ".enderun";
10
18
  for (const dir of candidates) {
11
19
  if (fs.existsSync(path.join(targetDir, dir))) {
@@ -9,7 +9,15 @@ const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
10
10
  const projectRoot = path.join(__dirname, "..");
11
11
 
12
- const candidates = [".gemini", ".claude", ".agent", ".enderun"];
12
+ const candidates = [
13
+ ".gemini/antigravity",
14
+ ".gemini/antigravity-cli",
15
+ ".gemini",
16
+ ".claude",
17
+ ".grok",
18
+ ".agent",
19
+ ".enderun",
20
+ ];
13
21
  let frameworkDir = ".enderun";
14
22
  for (const dir of candidates) {
15
23
  if (fs.existsSync(path.join(projectRoot, dir))) {
@@ -3,7 +3,15 @@
3
3
  import fs from "fs";
4
4
  import path from "path";
5
5
 
6
- const FRAMEWORK_CANDIDATES = [".gemini", ".claude", ".agent", ".enderun"];
6
+ const FRAMEWORK_CANDIDATES = [
7
+ ".gemini/antigravity",
8
+ ".gemini/antigravity-cli",
9
+ ".gemini",
10
+ ".claude",
11
+ ".grok",
12
+ ".agent",
13
+ ".enderun",
14
+ ];
7
15
 
8
16
  function detectFrameworkDir() {
9
17
  for (const dir of FRAMEWORK_CANDIDATES) {