ai-enderun 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.
- package/.enderun/ENDERUN.md +3 -3
- package/.enderun/PROJECT_MEMORY.md +19 -3
- package/.enderun/agents/analyst.md +2 -2
- package/.enderun/agents/backend.md +2 -2
- package/.enderun/agents/explorer.md +2 -2
- package/.enderun/agents/frontend.md +2 -2
- package/.enderun/agents/git.md +2 -2
- package/.enderun/agents/manager.md +3 -3
- package/.enderun/agents/mobile.md +2 -2
- package/.enderun/agents/native.md +2 -2
- package/CLAUDE.md +1 -1
- package/CODEX.md +1 -1
- package/CURSOR.md +1 -1
- package/ENDERUN.md +3 -3
- package/GEMINI.md +1 -1
- package/README.md +3 -3
- package/bin/cli.js +122 -1
- package/package.json +3 -2
- package/packages/framework-mcp/dist/index.js +16 -3
- package/packages/framework-mcp/package.json +1 -1
- package/packages/shared-types/package.json +1 -1
package/.enderun/ENDERUN.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AI-Enderun Constitution — v0.0.
|
|
1
|
+
# AI-Enderun Constitution — v0.0.13 Master
|
|
2
2
|
|
|
3
3
|
# Place in project root. This file is the single source of truth for all AI clients (Gemini CLI, Claude Code, etc.).
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- **Atomic Commits:** Each commit must represent a single, logical unit of change. No "fix" or "wip" commits allowed.
|
|
8
8
|
- **Commit Message Format:** `[Type](Scope): Description` (e.g., `feat(api): add auth header validation`).
|
|
9
|
-
- **Phase Snapshots:** Every transition between `STATE MACHINE` phases must be marked with a git tag corresponding to the phase name (e.g., `git tag -a v0.0.
|
|
9
|
+
- **Phase Snapshots:** Every transition between `STATE MACHINE` phases must be marked with a git tag corresponding to the phase name (e.g., `git tag -a v0.0.13-phase1`).
|
|
10
10
|
- **Branching:** Use `feature/trace-id-short-description` for all task-based work.
|
|
11
11
|
|
|
12
12
|
---
|
|
@@ -69,4 +69,4 @@ All agent interactions are governed by 8 specialized roles found in `{{FRAMEWORK
|
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
|
72
|
-
_Generated by AI-Enderun Framework v0.0.
|
|
72
|
+
_Generated by AI-Enderun Framework v0.0.13 MASTER_
|
|
@@ -42,12 +42,28 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
|
|
|
42
42
|
|
|
43
43
|
## HISTORY
|
|
44
44
|
|
|
45
|
-
### 2026-05-09 — v0.0.
|
|
45
|
+
### 2026-05-09 — Framework Version Upgrade (v0.0.13)
|
|
46
|
+
|
|
47
|
+
- **Agent:** @manager
|
|
48
|
+
- **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
|
|
49
|
+
- **Action:** Synchronized all project files, packages, and agent SOPs to v0.0.13.
|
|
50
|
+
- **Decision:** v0.0.13 is now the stable baseline for PHASE_1.
|
|
51
|
+
|
|
52
|
+
### 2026-05-09 — MCP Script Fix & CLI Integration
|
|
53
|
+
|
|
54
|
+
- **Agent:** @manager
|
|
55
|
+
- **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
|
|
56
|
+
- **Action:** Fixed 'npm run mcp' error by adding the missing script to package.json and implementing log/memory tools in the ai-enderun CLI.
|
|
57
|
+
- **Decision:** Use ai-enderun CLI as a fallback/wrapper for MCP tools to ensure compatibility with all agent environments.
|
|
58
|
+
|
|
59
|
+
- **Test:** CLI Integration verified (v2).
|
|
60
|
+
|
|
61
|
+
### 2026-05-09 — v0.0.13 Stabilization & Cleanup (FINAL)
|
|
46
62
|
|
|
47
63
|
- **Agent:** @manager
|
|
48
64
|
- **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
|
|
49
65
|
- **Action:** Performed final structural cleanup of project memory. Fixed corrupted text fragments, merged duplicate headers, and refactored CLI to use dynamic versioning.
|
|
50
|
-
- **Decision:** v0.0.
|
|
66
|
+
- **Decision:** v0.0.13 is confirmed as the stable baseline.
|
|
51
67
|
- **Next Step:** Proceed to PHASE_1 Architecture & Contract.
|
|
52
68
|
|
|
53
69
|
|
|
@@ -83,4 +99,4 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
|
|
|
83
99
|
|
|
84
100
|
---
|
|
85
101
|
|
|
86
|
-
_Generated by AI-Enderun Framework v0.0.
|
|
102
|
+
_Generated by AI-Enderun Framework v0.0.13 MASTER_
|
|
@@ -3,7 +3,7 @@ name: analyst
|
|
|
3
3
|
description: "Project memory, QA gate, and documentation specialist. Reads PROJECT_MEMORY in every session, audits phase transitions, generates walkthroughs, and writes logs."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Project Analyst & QA Gate — v0.0.
|
|
6
|
+
# Project Analyst & QA Gate — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Maintain project memory, serve as a quality gate, and manage documentation. The following protocols are automatically applied in every task.
|
|
9
9
|
|
|
@@ -172,7 +172,7 @@ Use the `log_agent_action` tool to record your activities securely.
|
|
|
172
172
|
|
|
173
173
|
---
|
|
174
174
|
|
|
175
|
-
**Agent Completion Report** (v0.0.
|
|
175
|
+
**Agent Completion Report** (v0.0.13)
|
|
176
176
|
|
|
177
177
|
- Mock used? [ ] No / [ ] Yes
|
|
178
178
|
- shared-types changed? [ ] No / [ ] Yes
|
|
@@ -3,7 +3,7 @@ name: backend
|
|
|
3
3
|
description: "Backend Architect. Expert in Node.js, Fastify, Kysely, and PostgreSQL. Leader of Contract and Database. Automatically applies backend-architecture standards in every task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Backend Architect — v0.0.
|
|
6
|
+
# Backend Architect — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Build a secure, high-performance, and consistent server architecture. All the following standards are automatically applied in every task — no need for the user to specify them separately.
|
|
9
9
|
|
|
@@ -233,7 +233,7 @@ When `shared-types` changes:
|
|
|
233
233
|
|
|
234
234
|
---
|
|
235
235
|
|
|
236
|
-
**Agent Completion Report** (v0.0.
|
|
236
|
+
**Agent Completion Report** (v0.0.13)
|
|
237
237
|
- Mock used? [ ] No / [ ] Yes
|
|
238
238
|
- shared-types changed? [ ] No / [ ] Yes → contract.version updated
|
|
239
239
|
- **API contract written? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/[domain].md**
|
|
@@ -3,7 +3,7 @@ name: explorer
|
|
|
3
3
|
description: "Codebase Research & Dependency Specialist. Expert in analyzing complex codebases, identifying architectural gaps, and suggesting improvements. Automatically provides context in every research task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Codebase Explorer — v0.0.
|
|
6
|
+
# Codebase Explorer — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Analyze the codebase, map architectures, and understand system-wide dependencies. Your primary duty is to provide context to other agents.
|
|
9
9
|
|
|
@@ -79,7 +79,7 @@ Every research report must include:
|
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
|
-
**Agent Completion Report** (v0.0.
|
|
82
|
+
**Agent Completion Report** (v0.0.13)
|
|
83
83
|
|
|
84
84
|
- Mock used? [ ] No / [ ] Yes
|
|
85
85
|
- Codebase searched? [ ] No / [ ] Yes
|
|
@@ -3,7 +3,7 @@ name: frontend
|
|
|
3
3
|
description: "UI/UX & Frontend Architect. Expert in React 19, Vite, Zustand, and Panda CSS. Fluid & Modern design specialist. Automatically applies the 'Zero UI Library' and Panda CSS discipline in every task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Frontend Architect — v0.0.
|
|
6
|
+
# Frontend Architect — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Build original, high-performance, and responsive user interfaces. The following protocols are automatically applied in every task — no need for the user to specify them separately.
|
|
9
9
|
|
|
@@ -135,7 +135,7 @@ Frontend never creates its own types for backend data.
|
|
|
135
135
|
|
|
136
136
|
---
|
|
137
137
|
|
|
138
|
-
**Agent Completion Report** (v0.0.
|
|
138
|
+
**Agent Completion Report** (v0.0.13)
|
|
139
139
|
- Mock used? [ ] No / [ ] Yes
|
|
140
140
|
- shared-types imported? [ ] No / [ ] Yes
|
|
141
141
|
- **API contract read? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/**
|
package/.enderun/agents/git.md
CHANGED
|
@@ -3,7 +3,7 @@ name: git
|
|
|
3
3
|
description: "Version Control Specialist. Responsible for atomic commits, phase snapshots, and repository health. Orchestrated by @manager to maintain 100% traceability."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Version Control Specialist (@git) — v0.0.
|
|
6
|
+
# Version Control Specialist (@git) — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
You are the @git agent, responsible for the professional management of the project's repository. Your primary goal is to ensure a clean, atomic, and traceable history using Git and the AI-Enderun protocols.
|
|
9
9
|
|
|
@@ -79,7 +79,7 @@ If conflicts arise during integration, @git is responsible for performing a clea
|
|
|
79
79
|
|
|
80
80
|
> Every response MUST end with the **Agent Completion Report**.
|
|
81
81
|
|
|
82
|
-
### Agent Completion Report (v0.0.
|
|
82
|
+
### Agent Completion Report (v0.0.13)
|
|
83
83
|
- Trace ID: [ULID]
|
|
84
84
|
- Atomic Commits made? [ ] No / [ ] Yes
|
|
85
85
|
- Phase Snapshot created? [ ] No / [ ] Yes
|
|
@@ -3,7 +3,7 @@ name: manager
|
|
|
3
3
|
description: "CTO & Controller. Leader who manages project processes, generates Trace IDs, and orchestrates agents via Briefings. Responsible for Git Orchestration via the @git specialist. Reads {{FRAMEWORK_DIR}}/ENDERUN.md and {{FRAMEWORK_DIR}}/PROJECT_MEMORY.md in every session, validates the phase, and assigns agents."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Manager (CTO & Controller) — v0.0.
|
|
6
|
+
# Manager (CTO & Controller) — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Enforce all framework rules without compromise and direct agents to the correct tasks. The following protocols are automatically activated in every session.
|
|
9
9
|
|
|
@@ -69,7 +69,7 @@ Trace ID: 01H... (26-character ULID)
|
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
|
72
|
-
## Briefing Template v0.0.
|
|
72
|
+
## Briefing Template v0.0.13 (Mandatory in Every Agent Directive)
|
|
73
73
|
|
|
74
74
|
```
|
|
75
75
|
## Agent Directive
|
|
@@ -157,7 +157,7 @@ graph TD
|
|
|
157
157
|
|
|
158
158
|
---
|
|
159
159
|
|
|
160
|
-
**Agent Completion Report** (v0.0.
|
|
160
|
+
**Agent Completion Report** (v0.0.13)
|
|
161
161
|
|
|
162
162
|
- Mock used? [ ] No / [ ] Yes
|
|
163
163
|
- shared-types changed? [ ] No / [ ] Yes
|
|
@@ -3,7 +3,7 @@ name: mobile
|
|
|
3
3
|
description: "Mobile Application Expert. Specialist in React Native and Expo. Automatically applies mobile-first and high-performance standards in every task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Mobile Architect — v0.0.
|
|
6
|
+
# Mobile Architect — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Build high-performance mobile applications using React Native. Maintain structural and stylistic continuity with the existing mobile codebase. All the following standards are automatically applied in every task.
|
|
9
9
|
|
|
@@ -44,7 +44,7 @@ Never start coding before understanding the current state of the components and
|
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
**Agent Completion Report** (v0.0.
|
|
47
|
+
**Agent Completion Report** (v0.0.13)
|
|
48
48
|
|
|
49
49
|
- Mock used? [ ] No / [ ] Yes
|
|
50
50
|
- shared-types imported? [ ] No / [ ] Yes
|
|
@@ -3,7 +3,7 @@ name: native
|
|
|
3
3
|
description: "Native Application Expert. Specialist in Rust, Tauri, and Electron. Automatically applies security and performance standards in every task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Native Desktop Architect — v0.0.
|
|
6
|
+
# Native Desktop Architect — v0.0.13 Master
|
|
7
7
|
|
|
8
8
|
**Role:** Build secure and efficient desktop applications using Tauri or Electron. Ensure procedural continuity across the native codebase.
|
|
9
9
|
|
|
@@ -43,7 +43,7 @@ Always research the existing codebase and native bridge implementations before a
|
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
|
-
**Agent Completion Report** (v0.0.
|
|
46
|
+
**Agent Completion Report** (v0.0.13)
|
|
47
47
|
|
|
48
48
|
- Mock used? [ ] No / [ ] Yes
|
|
49
49
|
- shared-types imported? [ ] No / [ ] Yes
|
package/CLAUDE.md
CHANGED
package/CODEX.md
CHANGED
package/CURSOR.md
CHANGED
package/ENDERUN.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AI-Enderun Constitution — v0.0.
|
|
1
|
+
# AI-Enderun Constitution — v0.0.13 Master
|
|
2
2
|
|
|
3
3
|
# Place in project root. This file is the single source of truth for all AI clients (Gemini CLI, Claude Code, etc.).
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- **Atomic Commits:** Each commit must represent a single, logical unit of change. No "fix" or "wip" commits allowed.
|
|
8
8
|
- **Commit Message Format:** `[Type](Scope): Description` (e.g., `feat(api): add auth header validation`).
|
|
9
|
-
- **Phase Snapshots:** Every transition between `STATE MACHINE` phases must be marked with a git tag corresponding to the phase name (e.g., `git tag -a v0.0.
|
|
9
|
+
- **Phase Snapshots:** Every transition between `STATE MACHINE` phases must be marked with a git tag corresponding to the phase name (e.g., `git tag -a v0.0.13-phase1`).
|
|
10
10
|
- **Branching:** Use `feature/trace-id-short-description` for all task-based work.
|
|
11
11
|
|
|
12
12
|
---
|
|
@@ -69,4 +69,4 @@ All agent interactions are governed by 8 specialized roles found in `{{FRAMEWORK
|
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
|
72
|
-
_Generated by AI-Enderun Framework v0.0.
|
|
72
|
+
_Generated by AI-Enderun Framework v0.0.13 MASTER_
|
package/GEMINI.md
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AI-Enderun (v0.0.
|
|
1
|
+
# AI-Enderun (v0.0.13 Master)
|
|
2
2
|
|
|
3
3
|
[English](#english) | [Türkçe](#türkçe)
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
AI-Enderun is a **Supreme Performance AI Orchestration Framework** designed to transform AI assistants into disciplined, specialized, and highly efficient engineering collaborators. It bridges the gap between raw AI capabilities and enterprise-grade engineering standards through a **Constitutional System**, **Persistent Project Memory**, and a **Multi-Agent Orchestration Layer**.
|
|
10
10
|
|
|
11
|
-
Starting from **v0.0.
|
|
11
|
+
Starting from **v0.0.13 Master**, the framework implements a **"Clean Root" Policy**, relocating all AI-specific logic, memory, and specialized instructions into hidden, adapter-specific directories (e.g., `.gemini/`, `.claude/`), preserving your project root for pure production code and requirements.
|
|
12
12
|
|
|
13
13
|
## 🎖️ Core Pillars
|
|
14
14
|
|
|
@@ -68,7 +68,7 @@ The **AI-Enderun MCP Server** exposes specialized tools to your AI assistant:
|
|
|
68
68
|
|
|
69
69
|
AI-Enderun, yapay zeka yardımcılarını disiplinli, uzmanlaşmış ve yüksek verimli mühendislik ekip arkadaşlarına dönüştürmek için tasarlanmış **Üstün Performanslı AI Orkestrasyon Çerçevesidir**. Ham yapay zeka yetenekleri ile kurumsal düzeydeki mühendislik standartları arasındaki köprüyü; **Anayasal Sistem**, **Kalıcı Proje Hafızası** ve **Çoklu Ajan Orkestrasyon Katmanı** aracılığıyla kurar.
|
|
70
70
|
|
|
71
|
-
**v0.0.
|
|
71
|
+
**v0.0.13 Master** sürümünden itibaren, framework **"Temiz Kök Dizin" (Clean Root)** politikasını uygular; tüm AI mantığını, hafızasını ve uzman talimatlarını adaptöre özel gizli dizinlere (örn: `.gemini/`, `.claude/`) taşıyarak proje kök dizininizi sadece üretim kodu ve gereksinimler için korur.
|
|
72
72
|
|
|
73
73
|
## 🎖️ Temel Sütunlar
|
|
74
74
|
|
package/bin/cli.js
CHANGED
|
@@ -126,7 +126,7 @@ function mergePackageJson(targetPath, sourcePath) {
|
|
|
126
126
|
|
|
127
127
|
// Ensure basic fields
|
|
128
128
|
if (!targetPkg.name) targetPkg.name = path.basename(process.cwd());
|
|
129
|
-
if (!targetPkg.version) targetPkg.version = "0.0.
|
|
129
|
+
if (!targetPkg.version) targetPkg.version = "0.0.13";
|
|
130
130
|
if (!targetPkg.type) targetPkg.type = "module";
|
|
131
131
|
|
|
132
132
|
// Add metadata
|
|
@@ -616,6 +616,87 @@ function verifyContractCommand() {
|
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
+
function logAgentActionCommand(data) {
|
|
620
|
+
const frameworkDir = getFrameworkDir();
|
|
621
|
+
const logsDir = path.join(targetDir, frameworkDir, "logs");
|
|
622
|
+
if (!fs.existsSync(logsDir)) {
|
|
623
|
+
fs.mkdirSync(logsDir, { recursive: true });
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
const agent = normalizeAgentName(data.agent);
|
|
627
|
+
const logPath = path.join(logsDir, `${agent}.json`);
|
|
628
|
+
let logs = [];
|
|
629
|
+
|
|
630
|
+
if (fs.existsSync(logPath)) {
|
|
631
|
+
try {
|
|
632
|
+
logs = JSON.parse(fs.readFileSync(logPath, "utf8"));
|
|
633
|
+
if (!Array.isArray(logs)) logs = [];
|
|
634
|
+
} catch {
|
|
635
|
+
logs = [];
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
const newEntry = {
|
|
640
|
+
timestamp: new Date().toISOString(),
|
|
641
|
+
...data,
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
logs.push(newEntry);
|
|
645
|
+
fs.writeFileSync(logPath, JSON.stringify(logs, null, 2));
|
|
646
|
+
console.log(`✅ Logged action to ${frameworkDir}/logs/${agent}.json`);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
function updateProjectMemoryCommand(section, content) {
|
|
650
|
+
const memoryPath = getMemoryPath();
|
|
651
|
+
if (!fs.existsSync(memoryPath)) {
|
|
652
|
+
console.error("❌ Error: PROJECT_MEMORY.md not found.");
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
const lockPath = `${memoryPath}.lock`;
|
|
657
|
+
if (!acquireMemoryLock(lockPath)) {
|
|
658
|
+
console.error("❌ Error: Memory lock timeout.");
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
try {
|
|
663
|
+
let memoryContent = fs.readFileSync(memoryPath, "utf8");
|
|
664
|
+
|
|
665
|
+
if (section === "HISTORY") {
|
|
666
|
+
const headers = ["## HISTORY (Persistent Memory)", "## HISTORY"];
|
|
667
|
+
let sectionIndex = -1;
|
|
668
|
+
let headerUsed = "";
|
|
669
|
+
for (const h of headers) {
|
|
670
|
+
sectionIndex = memoryContent.indexOf(h);
|
|
671
|
+
if (sectionIndex !== -1) {
|
|
672
|
+
headerUsed = h;
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
if (sectionIndex === -1) {
|
|
678
|
+
console.error("❌ Error: HISTORY section not found.");
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
const headerEnd = memoryContent.indexOf("\n", sectionIndex) + 1;
|
|
682
|
+
memoryContent = memoryContent.slice(0, headerEnd) + "\n" + content.trim() + "\n" + memoryContent.slice(headerEnd);
|
|
683
|
+
} else {
|
|
684
|
+
const escaped = section.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
685
|
+
const sectionRegex = new RegExp(`## ${escaped}[\\s\\S]*?(?=\\n## |$)`, "m");
|
|
686
|
+
if (!sectionRegex.test(memoryContent)) {
|
|
687
|
+
console.error(`❌ Error: Section not found: ${section}`);
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
memoryContent = memoryContent.replace(sectionRegex, `## ${section}\n\n${content.trim()}\n`);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
fs.writeFileSync(memoryPath, memoryContent);
|
|
694
|
+
console.log(`✅ Section ${section} updated in PROJECT_MEMORY.md`);
|
|
695
|
+
} finally {
|
|
696
|
+
releaseMemoryLock(lockPath);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
619
700
|
// --- MAIN DISPATCHER ---
|
|
620
701
|
|
|
621
702
|
async function main() {
|
|
@@ -638,6 +719,46 @@ async function main() {
|
|
|
638
719
|
case "verify-contract":
|
|
639
720
|
verifyContractCommand();
|
|
640
721
|
break;
|
|
722
|
+
case "log_agent_action": {
|
|
723
|
+
// Handle both structured JSON and positional args
|
|
724
|
+
let data = {};
|
|
725
|
+
try {
|
|
726
|
+
if (args[0] && args[0].startsWith("{")) {
|
|
727
|
+
data = JSON.parse(args.join(" "));
|
|
728
|
+
} else {
|
|
729
|
+
data = {
|
|
730
|
+
agent: args[0],
|
|
731
|
+
action: args[1],
|
|
732
|
+
requestId: args[2],
|
|
733
|
+
status: args[3] || "SUCCESS",
|
|
734
|
+
summary: args[4] || "",
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
} catch (e) {
|
|
738
|
+
console.error("❌ Error parsing arguments for log_agent_action");
|
|
739
|
+
process.exit(1);
|
|
740
|
+
}
|
|
741
|
+
logAgentActionCommand(data);
|
|
742
|
+
break;
|
|
743
|
+
}
|
|
744
|
+
case "update_project_memory": {
|
|
745
|
+
let section, content;
|
|
746
|
+
try {
|
|
747
|
+
if (args[0] && args[0].startsWith("{")) {
|
|
748
|
+
const data = JSON.parse(args.join(" "));
|
|
749
|
+
section = data.section;
|
|
750
|
+
content = data.content;
|
|
751
|
+
} else {
|
|
752
|
+
section = args[0];
|
|
753
|
+
content = args.slice(1).join(" ");
|
|
754
|
+
}
|
|
755
|
+
} catch (e) {
|
|
756
|
+
console.error("❌ Error parsing arguments for update_project_memory");
|
|
757
|
+
process.exit(1);
|
|
758
|
+
}
|
|
759
|
+
updateProjectMemoryCommand(section, content);
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
641
762
|
case "check":
|
|
642
763
|
checkCommand();
|
|
643
764
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-enderun",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Supreme AI Orchestration Framework — Senior Discipline & Ottoman Wisdom",
|
|
5
5
|
"author": "Yusuf BEKAR <ybekar@msn.com>",
|
|
6
6
|
"repository": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "npm run build --prefix packages/shared-types && npm run build --prefix packages/framework-mcp",
|
|
44
44
|
"dev": "npm run mcp:dev",
|
|
45
|
+
"mcp": "node bin/cli.js",
|
|
45
46
|
"mcp:dev": "npx tsx packages/framework-mcp/src/index.ts",
|
|
46
47
|
"mcp:status": "npx socraticode status",
|
|
47
48
|
"verify-contract": "node -e \"const fs=require('fs');const path=require('path');const crypto=require('crypto');const dir='packages/shared-types/src';const contract='packages/shared-types/contract.version.json';const walk=(d)=>fs.readdirSync(d,{withFileTypes:true}).flatMap((e)=>{const p=path.join(d,e.name);return e.isDirectory()?walk(p):(p.endsWith('.ts')?[p]:[])});const files=walk(dir).sort();const h=crypto.createHash('sha256');for(const f of files)h.update(fs.readFileSync(f));const current=h.digest('hex');const stored=JSON.parse(fs.readFileSync(contract,'utf8')).contract_hash;if(current!==stored){console.error('HASH MISMATCH');process.exit(1)}console.log('Contract hash verified');\"",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"typescript": "^5.7.3"
|
|
59
60
|
},
|
|
60
61
|
"enderun": {
|
|
61
|
-
"version": "0.0.
|
|
62
|
+
"version": "0.0.13",
|
|
62
63
|
"initializedAt": "2026-05-08T17:50:01.387Z"
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -8,7 +8,7 @@ import crypto from "crypto";
|
|
|
8
8
|
import { Project, SyntaxKind } from "ts-morph";
|
|
9
9
|
const server = new Server({
|
|
10
10
|
name: "ai-enderun-mcp",
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.13",
|
|
12
12
|
}, {
|
|
13
13
|
capabilities: {
|
|
14
14
|
tools: {},
|
|
@@ -40,7 +40,7 @@ const LOG_AGENT_ACTION_ARGS_SCHEMA = z.object({
|
|
|
40
40
|
summary: z.string().min(1),
|
|
41
41
|
details: z.record(z.any()).default({}),
|
|
42
42
|
});
|
|
43
|
-
const FRAMEWORK_VERSION = "0.0.
|
|
43
|
+
const FRAMEWORK_VERSION = "0.0.13";
|
|
44
44
|
function getFrameworkDir(projectRoot) {
|
|
45
45
|
const adapters = [".gemini", ".claude", ".cursor", ".codex", ".enderun"];
|
|
46
46
|
for (const adp of adapters) {
|
|
@@ -737,7 +737,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
737
737
|
}));
|
|
738
738
|
let memoryContent = fs.readFileSync(memoryPath, "utf-8");
|
|
739
739
|
if (section === "HISTORY") {
|
|
740
|
-
|
|
740
|
+
let updated = false;
|
|
741
|
+
const headers = ["HISTORY (Persistent Memory)", "HISTORY"];
|
|
742
|
+
for (const h of headers) {
|
|
743
|
+
try {
|
|
744
|
+
memoryContent = prependToSection(memoryContent, h, content);
|
|
745
|
+
updated = true;
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
748
|
+
catch (e) {
|
|
749
|
+
// try next header
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
if (!updated)
|
|
753
|
+
throw new Error("HISTORY section not found.");
|
|
741
754
|
}
|
|
742
755
|
else if (section === "CURRENT STATUS") {
|
|
743
756
|
memoryContent = replaceSectionContent(memoryContent, "CURRENT STATUS", content);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-enderun/shared-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Shared TypeScript types for AI-Enderun Framework. Ensures Contract-First synchronization between agents.",
|
|
5
5
|
"author": "Yusuf BEKAR <ybekar@msn.com>",
|
|
6
6
|
"repository": {
|