agent-enderun 0.9.2 → 0.9.3
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.
- package/.enderun/PROJECT_MEMORY.md +6 -25
- package/.enderun/agents/backend.md +1 -0
- package/.enderun/agents/frontend.md +2 -1
- package/.enderun/agents/manager.md +1 -1
- package/.enderun/agents/quality.md +2 -0
- package/README.md +51 -61
- package/framework-mcp/dist/index.js +58 -1
- package/framework-mcp/package.json +1 -1
- package/framework-mcp/src/index.ts +73 -1
- package/package.json +2 -1
- package/src/cli/adapters.ts +2 -0
- package/src/cli/commands/contract.ts +40 -0
- package/src/cli/index.ts +6 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
## CURRENT STATUS
|
|
2
2
|
|
|
3
|
-
- Phase:
|
|
4
|
-
- Trace ID:
|
|
3
|
+
- Phase: PHASE_0 (Genesis)
|
|
4
|
+
- Trace ID: 01HGT8J5E2N0W0W0W0W0W0W0W5
|
|
5
5
|
- @manager state: ENTERPRISE_FULL_PROFILE_ACTIVE
|
|
6
6
|
|
|
7
7
|
## ACTIVE TASKS
|
|
8
8
|
|
|
9
9
|
| Trace ID | Task | Agent | Priority | Status |
|
|
10
10
|
| :--- | :--- | :--- | :--- | :--- |
|
|
11
|
-
| 01HGT8J5E2N0W0W0W0W0W0W0W4 | Define initial API contracts (Dashboard) | @backend | P0 | COMPLETED |
|
|
12
|
-
| 01HGT8J5E2N0W0W0W0W0W0W0W4 | Knowledge Base Rehabilitation & Governance Audit | @manager | P0 | COMPLETED |
|
|
13
|
-
| 01HGT8J5E2N0W0W0W0W0W0W0W4 | Transition to Dynamic Hermes Orchestration Loop | @manager | P0 | COMPLETED |
|
|
14
11
|
|
|
15
12
|
## CRITICAL DECISIONS
|
|
16
13
|
- **Tech Stack:** Node.js/Fastify, React/Vite, PostgreSQL, Kysely.
|
|
@@ -20,25 +17,9 @@
|
|
|
20
17
|
- **Sovereign Backend Structure:** Every backend service MUST maintain its own database logic (schema, migrations, seeds) within `src/database/` to ensure full isolation.
|
|
21
18
|
|
|
22
19
|
## HISTORY
|
|
23
|
-
- **SYSTEM INITIALIZED:** Framework v0.9.0 promoted to stable release state.
|
|
24
|
-
- **PHASE TRANSITION:** Moved to PHASE_1. Enterprise profile selected.
|
|
25
|
-
- **CONTRACT DEFINITION:** API contracts defined and hash updated.
|
|
26
|
-
- **AGENT ADDED:** Created @database agent for schema and seeding authority.
|
|
27
|
-
- **AGENT MERGE:** Governance (@manager) and Orchestration (@orchestrator) roles merged into unified @manager authority.
|
|
28
|
-
- **DESIGN MANDATE:** Formally adopted 'Mobile-First, Responsive' design discipline and created Design System documentation.
|
|
29
|
-
- **UI GOVERNANCE:** Banned native browser dialogues (`alert`/`confirm`) and mandated integrated `Toaster`/`Modal` components.
|
|
30
|
-
- **LOGGING GOVERNANCE:** Implemented structured logging, banned `console.log`, and mandated audit logging for state-mutating operations.
|
|
31
|
-
- **LEARNING ENGINE:** Implemented 'Lessons Learned Engine'. Agents analyze failures to create 'Prevention Rules' and verify them before every task.
|
|
32
|
-
- **GOVERNANCE UPDATE:** Adopted 'Strategic Consultation Mandate'. Agents must now propose at least two distinct strategic options for major implementations and await user direction.
|
|
33
|
-
- **LANGUAGE MANDATE:** Standardized all documentation, agent definitions, and system reports to English-Only.
|
|
34
|
-
- **GOVERNANCE UPDATE:** Adopted 'Self-Contained Sovereign Services' structure for all backend applications.
|
|
35
|
-
- **VERSION BUMP:** Framework version updated to v0.9.1.
|
|
36
|
-
- **KNOWLEDGE REHABILITATION:** Inlined 13 stub files into agent definitions and added missing `documentation_ownership.md` to establish strict documentation boundaries.
|
|
37
|
-
- **DYNAMIC ORCHESTRATION TRANSITION:** Removed static template code generators, implemented dynamic Hermes Orchestrator Loop, and resolved critical CLI ReferenceError import bugs.
|
|
38
|
-
- **DYNAMIC PATH RESOLUTION ALIGNMENT:** Eliminated all hardcoded framework and application directories, introducing configuration-driven dynamic path mapping via `paths` inside `config.json`.
|
|
39
|
-
- **COMPILER & TYPE SAFETY REMEDIATION:** Fixed type-safety signature mismatches in `fs.ts` and const reassignment issues in `log.ts`, ensuring perfect TypeScript compiler build verification with zero errors.
|
|
40
|
-
- **ESLINT RUNTIME ALIGNMENT:** Patched ESLint to completely ignore hidden framework files, preventing EPERM scan crashes under sandboxed runtime restrictions.
|
|
41
|
-
- **VERSION BUMP:** Framework version updated to v0.9.2.
|
|
42
|
-
- **PACKAGING BUG FIX:** Included entire `framework-mcp` folder inside npm packaging files configuration, resolving compiler input errors during downstream workspace installations.
|
|
43
20
|
|
|
21
|
+
### 2026-05-30 — Framework Promotion to Stable v0.9.3
|
|
44
22
|
|
|
23
|
+
- **Agent:** @manager
|
|
24
|
+
- **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W5
|
|
25
|
+
- **Action:** Promoted Agent Enderun framework to Stable Release v0.9.3. Successfully reset memory state and purged session logs.
|
|
@@ -205,6 +205,7 @@ Every "mutation" (CREATE, UPDATE, DELETE) MUST trigger an audit log entry.
|
|
|
205
205
|
- **Traceability:** Link every audit log to the active **Trace ID**.
|
|
206
206
|
- **State Capture:** For updates, capture both `previousState` and `newState`.
|
|
207
207
|
- **User Context:** Identify the `UserID` performing the action.
|
|
208
|
+
- **Audit Scan Compliance:** Mutation handlers are audited via AST scans or code analysis by @quality to ensure they contain an active `AuditService.log()` invocation. Any mutation handler missing this call will fail the verification gate.
|
|
208
209
|
|
|
209
210
|
---
|
|
210
211
|
|
|
@@ -185,7 +185,8 @@ const { data, loading, error, update, remove, refetch } = useDetailPage<User>({
|
|
|
185
185
|
**Agent Rule:**
|
|
186
186
|
- Never perform direct fetch on detail pages. Always use `useDetailPage`.
|
|
187
187
|
- Loading + error states must be managed for update and delete operations.
|
|
188
|
-
- If optimistic updates are
|
|
188
|
+
- **Rollback Discipline:** If optimistic updates are utilized, a strict rollback mechanism must be integrated. Save the previous state to a local reference before modifying UI state, and restore this exact state inside the `catch` block of the async operation, providing immediate visual feedback to the user on failure.
|
|
189
|
+
|
|
189
190
|
|
|
190
191
|
#### 3. useFormPage (For Form Pages)
|
|
191
192
|
Standard hook for form pages and modal forms.
|
|
@@ -91,7 +91,7 @@ description: "Orchestration & Governance (Team-Lead) Agent for Agent Enderun"
|
|
|
91
91
|
2. Read `.enderun/PROJECT_MEMORY.md` (via `read_project_memory` tool) and extract the following:
|
|
92
92
|
- **Legacy Onboarding Trigger:** If the memory file is missing or almost empty but codebase files exist, use `send_agent_message` to order `@explorer` to execute `bootstrap_legacy_memory`.
|
|
93
93
|
- `CURRENT STATUS` → Which phase are we in? Is there an active Trace ID?
|
|
94
|
-
- `CRITICAL DECISIONS` → What was decided in previous sessions? **MUST COMPLY.**
|
|
94
|
+
- `CRITICAL DECISIONS` → What was decided in previous sessions? **MUST COMPLY.** Verify type alignment and database schemas against these decisions at startup; log a "Decision Conflict Alert" if any drift or mismatch is detected.
|
|
95
95
|
- `ACTIVE TASKS` → Are there any ongoing tasks? Has agent assignment been made?
|
|
96
96
|
- `HISTORY` → Read the last 3 entries to understand previous work.
|
|
97
97
|
3. Check `.enderun/docs/api/README.md` → Which endpoints exist? Are there missing contracts?
|
|
@@ -84,6 +84,8 @@ Every action must be logged using `log_agent_action` to `.enderun/logs/quality.j
|
|
|
84
84
|
- Unit tests pass, Integration tests pass against real test DB.
|
|
85
85
|
- Coverage meets project threshold.
|
|
86
86
|
- No skipped tests without manager approval.
|
|
87
|
+
- **CI/CD Coverage Gate:** Strictly reject PR gate approval if the automated coverage report falls below the mandatory >80% threshold in core packages and domain logic.
|
|
88
|
+
|
|
87
89
|
|
|
88
90
|
## 🛡️ Security Audit Gate (Security)
|
|
89
91
|
- Zero CRITICAL/HIGH findings for deploy/merge.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🏛️ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
|
|
2
2
|
|
|
3
|
-
> **Stable Release:** v0.9.
|
|
3
|
+
> **Stable Release:** v0.9.3
|
|
4
4
|
> **Author:** Yusuf BEKAR
|
|
5
5
|
> **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W4`
|
|
6
6
|
> **System Status:** 🟢 All Systems Operational | Build Compile: Clean | Type-Safety: 100% Verified
|
|
@@ -11,37 +11,31 @@
|
|
|
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.
|
|
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.
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
### 🚀 Sürüm v0.9.
|
|
18
|
+
### 🚀 Sürüm v0.9.2 İle Gelen Devrimsel Yenilikler
|
|
19
19
|
|
|
20
|
-
1.
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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.
|
|
23
23
|
|
|
24
|
-
2.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
```json
|
|
28
|
-
"paths": {
|
|
29
|
-
"backend": "apps/backend",
|
|
30
|
-
"frontend": "apps/web",
|
|
31
|
-
"docs": "docs",
|
|
32
|
-
"tests": "tests"
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
* Tüm sözleşme doğrulama (`verify-contract`), sistem bütünlük denetimi (`check`) ve kod üreticileri bu yapılandırmayı tüketir.
|
|
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.
|
|
36
27
|
|
|
37
|
-
3.
|
|
38
|
-
*
|
|
39
|
-
* `agent-enderun orchestrate` komutu, kuyruktaki asenkron delege görevleri tarar, hedef ajanın durumunu ordu paneli üzerinde (`STATUS.md`) anlık olarak `EXECUTING` yapar ve görevi otonom olarak yönlendirir.
|
|
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ı.
|
|
40
30
|
|
|
41
|
-
4. **
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
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.
|
|
33
|
+
|
|
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.
|
|
36
|
+
|
|
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.
|
|
45
39
|
|
|
46
40
|
---
|
|
47
41
|
|
|
@@ -62,10 +56,10 @@ Tüm operasyonlar, uzmanlık alanlarına göre ayrılmış ve Hermes protokolüy
|
|
|
62
56
|
| Ajan | Uzmanlık Rolü | Temel Sorumluluğu |
|
|
63
57
|
| :--- | :--- | :--- |
|
|
64
58
|
| **`@manager`** | Komuta & Strateji | Görev dağılımı (DAG), hafıza yönetimi (`PROJECT_MEMORY.md`), anayasa koruyuculuğu. |
|
|
65
|
-
| **`@quality`** | Kalite, Güvenlik & Analiz | AST zafiyet taramaları, anayasal uyum denetimi, kod inceleme checklistleri, test standartları kapıs
|
|
59
|
+
| **`@quality`** | Kalite, Güvenlik & Analiz | AST zafiyet taramaları, anayasal uyum denetimi, kod inceleme checklistleri, test standartları kapısı, CI/CD kapsam denetimi. |
|
|
66
60
|
| **`@database`** | Veritabanı Mimarisi | Veritabanı şemaları, migration kuralları, index optimizasyonları ve veri tohumlama (seeding). |
|
|
67
|
-
| **`@backend`** | İş Mantığı (Domain Logic) | API tasarımı, branded types, katmanlı mimari (Route -> Controller -> Service -> Repository)
|
|
68
|
-
| **`@frontend`** | Akıcı Responsive UI | Panda CSS tasarımı, responsive-first
|
|
61
|
+
| **`@backend`** | İş Mantığı (Domain Logic) | API tasarımı, branded types, katmanlı mimari (Route -> Controller -> Service -> Repository), audit günlüğü kontrolü. |
|
|
62
|
+
| **`@frontend`** | Akıcı Responsive UI | Panda CSS tasarımı, responsive-first arayüzler, custom React kancaları, rollback disiplini yönetimi. |
|
|
69
63
|
| **`@devops`** | Altyapı & Canlı Dağıtım | Native Node.js deploymentları, rollback planları, telemetri ve izleme (monitoring) kurulumları. |
|
|
70
64
|
| **`@explorer`** | Kod Analizi & Keşif | Kod tabanı analizi, bağımlılık grafikleri, legacy onboarding stratejileri. |
|
|
71
65
|
| **`@git`** | Sürüm Kontrolü | Trace ID uyumlu commit yönetimi, sürüm etiketleme ve dal (branch) hijyeni. |
|
|
@@ -88,12 +82,13 @@ Tüm operasyonlar, uzmanlık alanlarına göre ayrılmış ve Hermes protokolüy
|
|
|
88
82
|
|
|
89
83
|
| Komut | Yetkili Ajan | Açıklama |
|
|
90
84
|
| :--- | :--- | :--- |
|
|
91
|
-
| `init [adapter]` | `@manager` | Seçilen IDE/Agent adaptörünü (`gemini`, `claude`, `grok`, `antigravity`) yerel projenize kurar. |
|
|
85
|
+
| `init [adapter]` | `@manager` | Seçilen IDE/Agent adaptörünü (`gemini`, `claude`, `grok`, `antigravity-cli`) yerel projenize kurar. |
|
|
92
86
|
| `status` | `@manager` | Aktif aşamayı, aktif Trace ID'yi ve ajanların anlık ordu durumlarını listeler. |
|
|
93
87
|
| `check` | `@quality` | Anayasal sağlık kontrolü, dosya bütünlüğü ve dizin doğrulaması yapar. |
|
|
94
88
|
| `trace:new [desc]` | `@manager` | Yeni bir Trace ID başlatarak görev zincirini ve izlenebilirliği tetikler. |
|
|
95
89
|
| `orchestrate` / `loop` | `@manager` | Canlı Hermes mesaj yönlendirici döngüsünü başlatarak asenkron ajan görevlerini yönlendirir. |
|
|
96
|
-
| `verify-contract` | `@backend` | Backend ile frontend arasındaki tip uyumluluğunu
|
|
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. |
|
|
97
92
|
| `create-app [idea]` | `@manager` | Doğal dildeki talep ve gereksinimlerden kurumsal monorepo uygulaması oluşturur. |
|
|
98
93
|
|
|
99
94
|
---
|
|
@@ -102,7 +97,7 @@ Tüm operasyonlar, uzmanlık alanlarına göre ayrılmış ve Hermes protokolüy
|
|
|
102
97
|
|
|
103
98
|
Agent Enderun, npmjs üzerinde paketlenmeye kusursuz şekilde hazırdır:
|
|
104
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.
|
|
105
|
-
* **CLI Kaynak Bütünlüğü:** Tüm TypeScript derleme kaynakları (`src/`) paket içeriğine dahil edilmiştir
|
|
100
|
+
* **CLI Kaynak Bütünlüğü:** Tüm TypeScript derleme kaynakları (`src/`) paket içeriğine dahil edilmiştir.
|
|
106
101
|
|
|
107
102
|
Yerel projenizi test etmek veya npm link üzerinden kurmak için:
|
|
108
103
|
```bash
|
|
@@ -129,37 +124,31 @@ npx agent-enderun init gemini
|
|
|
129
124
|
|
|
130
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.
|
|
131
126
|
|
|
132
|
-
As of **v0.9.
|
|
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.
|
|
133
128
|
|
|
134
129
|
---
|
|
135
130
|
|
|
136
|
-
### 🚀 Key Improvements in Version v0.9.
|
|
131
|
+
### 🚀 Key Improvements in Version v0.9.2
|
|
137
132
|
|
|
138
|
-
1.
|
|
139
|
-
*
|
|
140
|
-
*
|
|
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`.
|
|
141
136
|
|
|
142
|
-
2.
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
```json
|
|
146
|
-
"paths": {
|
|
147
|
-
"backend": "apps/backend",
|
|
148
|
-
"frontend": "apps/web",
|
|
149
|
-
"docs": "docs",
|
|
150
|
-
"tests": "tests"
|
|
151
|
-
}
|
|
152
|
-
```
|
|
153
|
-
* All validations (`verify-contract`), integrity checks (`check`), and scaffolding engines utilize this mapping.
|
|
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.
|
|
154
140
|
|
|
155
|
-
3. **
|
|
156
|
-
*
|
|
157
|
-
* The `agent-enderun orchestrate` command scans pending message queues, dynamically locks the target agent's state to `EXECUTING` on the dashboard (`STATUS.md`), and routes tasks autonomously.
|
|
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.
|
|
158
143
|
|
|
159
|
-
4. **
|
|
160
|
-
*
|
|
161
|
-
|
|
162
|
-
|
|
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]`.
|
|
146
|
+
|
|
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`.
|
|
149
|
+
|
|
150
|
+
6. **Hermes Autonomous Orchestration Loop (`orchestrate` / `loop`):**
|
|
151
|
+
* Enabled the **Hermes Message Broker**—an event-driven asynchronous communication channel between expert AI agents.
|
|
163
152
|
|
|
164
153
|
---
|
|
165
154
|
|
|
@@ -180,10 +169,10 @@ All workspace operations are divided among 10 specialized expert agents connecte
|
|
|
180
169
|
| Agent | Specialization Role | Core Responsibility |
|
|
181
170
|
| :--- | :--- | :--- |
|
|
182
171
|
| **`@manager`** | Command & Strategy | Task dependency graphs (DAG), memory pruning (`PROJECT_MEMORY.md`), constitution compliance. |
|
|
183
|
-
| **`@quality`** | Quality, Security & Analysis | AST vulnerability scanning, constitutional audits, code review checklists, test standard gates. |
|
|
172
|
+
| **`@quality`** | Quality, Security & Analysis | AST vulnerability scanning, constitutional audits, code review checklists, test standard gates, CI/CD coverage verification. |
|
|
184
173
|
| **`@database`** | Database Architecture | Database schemas, migration workflows, query optimization, and contract-aware seeding. |
|
|
185
|
-
| **`@backend`** | Domain Logic Specialist | API route design, branded types, layered architecture (Route -> Controller -> Service -> Repository). |
|
|
186
|
-
| **`@frontend`** | Fluid Responsive UI | Panda CSS design, responsive-first interfaces, customized React hooks. |
|
|
174
|
+
| **`@backend`** | Domain Logic Specialist | API route design, branded types, layered architecture (Route -> Controller -> Service -> Repository), audit logging scan. |
|
|
175
|
+
| **`@frontend`** | Fluid Responsive UI | Panda CSS design, responsive-first interfaces, customized React hooks, rollback discipline management. |
|
|
187
176
|
| **`@devops`** | Infrastructure Specialist | Native Node.js deployments, rollback plans, monitoring & logging setups. |
|
|
188
177
|
| **`@explorer`** | Codebase Intelligence | Project analysis, dependency graph generation, legacy conversion strategies. |
|
|
189
178
|
| **`@git`** | Version Control | Semantic Trace-ID-aligned commits, release tagging, branch hygiene. |
|
|
@@ -206,12 +195,13 @@ All workspace operations are divided among 10 specialized expert agents connecte
|
|
|
206
195
|
|
|
207
196
|
| Command | Authoritative Agent | Description |
|
|
208
197
|
| :--- | :--- | :--- |
|
|
209
|
-
| `init [adapter]` | `@manager` | Initialize the framework for a selected adapter (`gemini`, `claude`, `grok`, `antigravity`). |
|
|
198
|
+
| `init [adapter]` | `@manager` | Initialize the framework for a selected adapter (`gemini`, `claude`, `grok`, `antigravity-cli`). |
|
|
210
199
|
| `status` | `@manager` | Display active phase, Trace ID, and agent health scores. |
|
|
211
200
|
| `check` | `@quality` | Perform a constitutional health check, folder structure, and file integrity scan. |
|
|
212
201
|
| `trace:new [desc]` | `@manager` | Start a new task chain with a unique Trace ID. |
|
|
213
202
|
| `orchestrate` / `loop` | `@manager` | Spin up the live Hermes message-broker loop to route asynchronous agent actions. |
|
|
214
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. |
|
|
215
205
|
| `create-app [idea]` | `@manager` | Generate a corporate monorepo application from natural language requirements. |
|
|
216
206
|
|
|
217
207
|
---
|
|
@@ -220,7 +210,7 @@ All workspace operations are divided among 10 specialized expert agents connecte
|
|
|
220
210
|
|
|
221
211
|
Agent Enderun is fully optimized for immediate publication to npmjs:
|
|
222
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.
|
|
223
|
-
* **CLI Source Bundle Inclusion:** Bundles the `"src"` folder in the published package
|
|
213
|
+
* **CLI Source Bundle Inclusion:** Bundles the `"src"` folder in the published package.
|
|
224
214
|
|
|
225
215
|
To test the package locally via npm link:
|
|
226
216
|
```bash
|
|
@@ -242,4 +232,4 @@ npx agent-enderun init gemini
|
|
|
242
232
|
|
|
243
233
|
---
|
|
244
234
|
|
|
245
|
-
Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.
|
|
235
|
+
Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.3**
|
|
@@ -6,7 +6,7 @@ import path from "path";
|
|
|
6
6
|
import { execSync } from "child_process";
|
|
7
7
|
const server = new Server({
|
|
8
8
|
name: "agent-enderun-mcp",
|
|
9
|
-
version: "0.9.
|
|
9
|
+
version: "0.9.3",
|
|
10
10
|
}, {
|
|
11
11
|
capabilities: {
|
|
12
12
|
tools: {},
|
|
@@ -99,6 +99,27 @@ const TOOLS = [
|
|
|
99
99
|
required: ["to", "category", "content", "traceId"],
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: "log_agent_action",
|
|
104
|
+
description: "Log an agent action to the framework logs.",
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: "object",
|
|
107
|
+
properties: {
|
|
108
|
+
agent: { type: "string", description: "The agent name (e.g., @manager, @backend)" },
|
|
109
|
+
action: { type: "string", description: "Action type or name" },
|
|
110
|
+
traceId: { type: "string", description: "The active Trace ID" },
|
|
111
|
+
status: { type: "string", enum: ["SUCCESS", "FAILURE"], description: "The status of the action" },
|
|
112
|
+
summary: { type: "string", description: "Brief description of the action taken" },
|
|
113
|
+
findings: { type: "array", items: { type: "string" }, description: "Optional findings or details" }
|
|
114
|
+
},
|
|
115
|
+
required: ["agent", "action", "traceId", "status", "summary"]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "update_contract_hash",
|
|
120
|
+
description: "Re-generate and synchronize the backend contract SHA-256 hash.",
|
|
121
|
+
inputSchema: { type: "object", properties: {} }
|
|
122
|
+
}
|
|
102
123
|
];
|
|
103
124
|
server.onRequest(ListToolsRequestSchema, async () => {
|
|
104
125
|
return { tools: TOOLS };
|
|
@@ -176,6 +197,42 @@ server.onRequest(CallToolRequestSchema, async (request) => {
|
|
|
176
197
|
fs.appendFileSync(messagePath, JSON.stringify(message) + "\n");
|
|
177
198
|
return { content: [{ type: "text", text: `✅ Message sent to ${to}` }] };
|
|
178
199
|
}
|
|
200
|
+
case "log_agent_action": {
|
|
201
|
+
const { agent, action, traceId, status, summary, findings } = args;
|
|
202
|
+
const candidates = [
|
|
203
|
+
".gemini/antigravity",
|
|
204
|
+
".gemini/antigravity-cli",
|
|
205
|
+
".gemini",
|
|
206
|
+
".claude",
|
|
207
|
+
".agent",
|
|
208
|
+
".enderun",
|
|
209
|
+
];
|
|
210
|
+
let frameworkDir = ".enderun";
|
|
211
|
+
for (const c of candidates) {
|
|
212
|
+
if (fs.existsSync(path.join(projectRoot, c))) {
|
|
213
|
+
frameworkDir = c;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const agentName = agent.replace("@", "");
|
|
218
|
+
const logPath = path.join(projectRoot, frameworkDir, "logs", `${agentName}.json`);
|
|
219
|
+
const logEntry = {
|
|
220
|
+
timestamp: new Date().toISOString(),
|
|
221
|
+
agent,
|
|
222
|
+
action,
|
|
223
|
+
requestId: traceId,
|
|
224
|
+
status,
|
|
225
|
+
summary,
|
|
226
|
+
findings: findings || []
|
|
227
|
+
};
|
|
228
|
+
fs.mkdirSync(path.dirname(logPath), { recursive: true });
|
|
229
|
+
fs.appendFileSync(logPath, JSON.stringify(logEntry) + "\n");
|
|
230
|
+
return { content: [{ type: "text", text: `✅ Action logged for ${agent} to ${path.join(frameworkDir, "logs", `${agentName}.json`)}` }] };
|
|
231
|
+
}
|
|
232
|
+
case "update_contract_hash": {
|
|
233
|
+
const output = execSync("npx agent-enderun update-contract").toString();
|
|
234
|
+
return { content: [{ type: "text", text: output }] };
|
|
235
|
+
}
|
|
179
236
|
default:
|
|
180
237
|
throw new Error(`Unknown tool: ${name}`);
|
|
181
238
|
}
|
|
@@ -11,7 +11,7 @@ import { execSync } from "child_process";
|
|
|
11
11
|
const server = new Server(
|
|
12
12
|
{
|
|
13
13
|
name: "agent-enderun-mcp",
|
|
14
|
-
version: "0.9.
|
|
14
|
+
version: "0.9.3",
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
capabilities: {
|
|
@@ -107,6 +107,27 @@ const TOOLS: any[] = [
|
|
|
107
107
|
required: ["to", "category", "content", "traceId"],
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
|
+
{
|
|
111
|
+
name: "log_agent_action",
|
|
112
|
+
description: "Log an agent action to the framework logs.",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
agent: { type: "string", description: "The agent name (e.g., @manager, @backend)" },
|
|
117
|
+
action: { type: "string", description: "Action type or name" },
|
|
118
|
+
traceId: { type: "string", description: "The active Trace ID" },
|
|
119
|
+
status: { type: "string", enum: ["SUCCESS", "FAILURE"], description: "The status of the action" },
|
|
120
|
+
summary: { type: "string", description: "Brief description of the action taken" },
|
|
121
|
+
findings: { type: "array", items: { type: "string" }, description: "Optional findings or details" }
|
|
122
|
+
},
|
|
123
|
+
required: ["agent", "action", "traceId", "status", "summary"]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "update_contract_hash",
|
|
128
|
+
description: "Re-generate and synchronize the backend contract SHA-256 hash.",
|
|
129
|
+
inputSchema: { type: "object", properties: {} }
|
|
130
|
+
}
|
|
110
131
|
];
|
|
111
132
|
|
|
112
133
|
server.onRequest(ListToolsRequestSchema, async () => {
|
|
@@ -208,6 +229,57 @@ server.onRequest(CallToolRequestSchema, async (request: any) => {
|
|
|
208
229
|
return { content: [{ type: "text", text: `✅ Message sent to ${to}` }] };
|
|
209
230
|
}
|
|
210
231
|
|
|
232
|
+
case "log_agent_action": {
|
|
233
|
+
interface LogAgentActionArgs {
|
|
234
|
+
agent: string;
|
|
235
|
+
action: string;
|
|
236
|
+
traceId: string;
|
|
237
|
+
status: "SUCCESS" | "FAILURE";
|
|
238
|
+
summary: string;
|
|
239
|
+
findings?: string[];
|
|
240
|
+
}
|
|
241
|
+
const { agent, action, traceId, status, summary, findings } = args as any as LogAgentActionArgs;
|
|
242
|
+
|
|
243
|
+
const candidates = [
|
|
244
|
+
".gemini/antigravity",
|
|
245
|
+
".gemini/antigravity-cli",
|
|
246
|
+
".gemini",
|
|
247
|
+
".claude",
|
|
248
|
+
".agent",
|
|
249
|
+
".enderun",
|
|
250
|
+
];
|
|
251
|
+
let frameworkDir = ".enderun";
|
|
252
|
+
for (const c of candidates) {
|
|
253
|
+
if (fs.existsSync(path.join(projectRoot, c))) {
|
|
254
|
+
frameworkDir = c;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const agentName = agent.replace("@", "");
|
|
260
|
+
const logPath = path.join(projectRoot, frameworkDir, "logs", `${agentName}.json`);
|
|
261
|
+
|
|
262
|
+
const logEntry = {
|
|
263
|
+
timestamp: new Date().toISOString(),
|
|
264
|
+
agent,
|
|
265
|
+
action,
|
|
266
|
+
requestId: traceId,
|
|
267
|
+
status,
|
|
268
|
+
summary,
|
|
269
|
+
findings: findings || []
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
fs.mkdirSync(path.dirname(logPath), { recursive: true });
|
|
273
|
+
fs.appendFileSync(logPath, JSON.stringify(logEntry) + "\n");
|
|
274
|
+
|
|
275
|
+
return { content: [{ type: "text", text: `✅ Action logged for ${agent} to ${path.join(frameworkDir, "logs", `${agentName}.json`)}` }] };
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
case "update_contract_hash": {
|
|
279
|
+
const output = execSync("npx agent-enderun update-contract").toString();
|
|
280
|
+
return { content: [{ type: "text", text: output }] };
|
|
281
|
+
}
|
|
282
|
+
|
|
211
283
|
default:
|
|
212
284
|
throw new Error(`Unknown tool: ${name}`);
|
|
213
285
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-enderun",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "The Supreme AI Governance & Orchestration Framework for Enterprise Development",
|
|
5
5
|
"author": "Yusuf BEKAR",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"enderun:status": "agent-enderun status",
|
|
57
57
|
"enderun:trace": "agent-enderun trace:new",
|
|
58
58
|
"enderun:verify": "agent-enderun verify-contract",
|
|
59
|
+
"enderun:update-contract": "agent-enderun update-contract",
|
|
59
60
|
"enderun:check": "agent-enderun check",
|
|
60
61
|
"enderun:lint": "eslint .",
|
|
61
62
|
"lint": "eslint .",
|
package/src/cli/adapters.ts
CHANGED
|
@@ -59,6 +59,8 @@ export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
|
59
59
|
* and internal standards for Antigravity (.gemini/antigravity/).
|
|
60
60
|
*/
|
|
61
61
|
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
62
|
+
".gemini/antigravity",
|
|
63
|
+
".gemini/antigravity-cli",
|
|
62
64
|
".gemini",
|
|
63
65
|
".claude",
|
|
64
66
|
".agent",
|
|
@@ -43,3 +43,43 @@ export function verifyApiContractCommand() {
|
|
|
43
43
|
process.exit(1);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Update and synchronize type safety between backend and frontend contracts.
|
|
49
|
+
*/
|
|
50
|
+
export function updateApiContractCommand() {
|
|
51
|
+
const projectRoot = process.cwd();
|
|
52
|
+
const pathsMap = getConfiguredPaths();
|
|
53
|
+
const sharedDir = path.join(projectRoot, pathsMap.backend, "src/types");
|
|
54
|
+
const contractPath = path.join(projectRoot, pathsMap.backend, "contract.version.json");
|
|
55
|
+
|
|
56
|
+
if (!fs.existsSync(sharedDir)) {
|
|
57
|
+
console.error("❌ Error: API types directory missing.");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const walk = (d: string): string[] => fs.readdirSync(d, { withFileTypes: true }).flatMap((e) => {
|
|
62
|
+
const fullPath = path.join(d, e.name);
|
|
63
|
+
return e.isDirectory() ? walk(fullPath) : (e.name.endsWith(".ts") ? [fullPath] : []);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const hash = crypto.createHash("sha256");
|
|
67
|
+
for (const filePath of walk(sharedDir).sort()) {
|
|
68
|
+
hash.update(path.relative(projectRoot, filePath));
|
|
69
|
+
hash.update("\0");
|
|
70
|
+
hash.update(fs.readFileSync(filePath));
|
|
71
|
+
hash.update("\0");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const currentHash = hash.digest("hex");
|
|
75
|
+
|
|
76
|
+
const contractData = {
|
|
77
|
+
contract_hash: currentHash,
|
|
78
|
+
last_updated: new Date().toISOString()
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
fs.mkdirSync(path.dirname(contractPath), { recursive: true });
|
|
82
|
+
fs.writeFileSync(contractPath, JSON.stringify(contractData, null, 2));
|
|
83
|
+
console.warn(`✅ Contract successfully synchronized. New hash: ${currentHash}`);
|
|
84
|
+
}
|
|
85
|
+
|
package/src/cli/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { statusCommand } from "./commands/status.js";
|
|
|
7
7
|
import { traceNewCommand } from "./commands/trace.js";
|
|
8
8
|
import { updateProjectMemoryCommand } from "./commands/memory.js";
|
|
9
9
|
import { createAppCommand } from "./commands/app.js";
|
|
10
|
-
import { verifyApiContractCommand } from "./commands/contract.js";
|
|
10
|
+
import { verifyApiContractCommand, updateApiContractCommand } from "./commands/contract.js";
|
|
11
11
|
import { orchestrateCommand } from "./commands/orchestrate.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -62,6 +62,10 @@ async function main() {
|
|
|
62
62
|
verifyApiContractCommand();
|
|
63
63
|
break;
|
|
64
64
|
|
|
65
|
+
case "update-contract":
|
|
66
|
+
updateApiContractCommand();
|
|
67
|
+
break;
|
|
68
|
+
|
|
65
69
|
case "version":
|
|
66
70
|
case "-v":
|
|
67
71
|
case "--version":
|
|
@@ -86,6 +90,7 @@ Commands:
|
|
|
86
90
|
create-app <idea> Generate a new full-stack app from natural language
|
|
87
91
|
orchestrate Start the dynamic Hermes agent orchestration loop
|
|
88
92
|
verify-contract Validate type alignment between backend and frontend
|
|
93
|
+
update-contract Generate and synchronize a new contract hash
|
|
89
94
|
version Show version information
|
|
90
95
|
|
|
91
96
|
Supported adapters (one init per IDE — separate folder each):
|