ai-enderun 0.0.13 → 0.1.0

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.
@@ -1,4 +1,4 @@
1
- # AI-Enderun Constitution — v0.0.13 Master
1
+ # AI-Enderun Constitution — v0.1.0 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.13-phase1`).
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.1.0-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.13 MASTER_
72
+ _Generated by AI-Enderun Framework v0.1.0 MASTER_
@@ -1,12 +1,14 @@
1
1
  # PROJECT MEMORY — AI-Enderun
2
2
 
3
- This file is the Single Source of Truth (SSOT) and the persistent memory of the project.
3
+ This file is the Single Source of Truth (SSOT).
4
+ See [[ARCHIVE]] for completed tasks.
5
+ See [[BRAIN_DASHBOARD]] for visualizations.
4
6
 
5
7
  ## CURRENT STATUS
6
8
 
7
9
  | Active Phase | Profile | Last Update | Active Trace ID | Blockers |
8
10
  | :----------- | :------ | :---------- | :-------------- | :------- |
9
- | PHASE_0 | Lightweight | 2026-05-09 | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | NONE |
11
+ | PHASE_1 | Lightweight | 2026-05-09 | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Backend API contract & Auth Architecture |
10
12
 
11
13
  ## PROJECT DEFINITION
12
14
 
@@ -17,20 +19,20 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
17
19
  | Frontend | React 19 + Vite + Zustand + Panda CSS |
18
20
  | Backend | Node.js 20+ + Fastify + Kysely |
19
21
  | DB | PostgreSQL |
20
- | Auth | Not yet defined |
22
+ | Auth | TBD (Phase 1 Task) |
23
+
21
24
  ## ACTIVE TASKS
22
25
 
23
26
  | Trace ID | Task | Agent | Priority | Status |
24
27
  | :--- | :--- | :--- | :--- | :--- |
25
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Framework setup and architecture alignment | @manager | P1 | COMPLETE |
26
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Create core framework structure (.enderun) | @manager | P1 | COMPLETE |
27
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Implement MCP server with dependency analysis | @manager | P1 | COMPLETE |
28
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Define Agent SOPs (8 Specialists) | @manager | P1 | COMPLETE |
29
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Standardize on ULID and Branded Types | @manager | P1 | COMPLETE |
30
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Fix initialization pathing and adapter linker | @manager | P1 | COMPLETE |
31
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Implement automated Git initialization | @manager | P1 | COMPLETE |
32
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Resolve template validation conflicts (entity) | @manager | P1 | COMPLETE |
33
- | — | Begin PHASE_1 Architecture & Contract | @manager | P2 | PENDING |
28
+ | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Define Auth Architecture | @backend | P1 | PENDING |
29
+ | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Phase 1 Architecture & Contract | @manager | P2 | IN_PROGRESS |
30
+
31
+ ## MILESTONES
32
+
33
+ | Milestone | Target Date | Status |
34
+ | :--- | :--- | :--- |
35
+ | PHASE_1 Completion | 2026-05-16 | PENDING |
34
36
 
35
37
  ## CRITICAL DECISIONS
36
38
 
@@ -40,63 +42,14 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
40
42
  - **Multi-AI Compatibility:** Avoid reserved keywords like `resource` in prompt templates.
41
43
  - **Automated Init:** CLI must handle `git init` and scaffolding autonomously.
42
44
 
43
- ## HISTORY
44
-
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)
62
-
63
- - **Agent:** @manager
64
- - **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
65
- - **Action:** Performed final structural cleanup of project memory. Fixed corrupted text fragments, merged duplicate headers, and refactored CLI to use dynamic versioning.
66
- - **Decision:** v0.0.13 is confirmed as the stable baseline.
67
- - **Next Step:** Proceed to PHASE_1 Architecture & Contract.
68
-
69
-
70
- ### 2026-05-08 — v0.0.11 Framework Stabilization (FIX)
71
-
72
- - **Agent:** @manager
73
- - **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
74
- - **Action:** Fixed a critical template validation error in `@backend` SOP. Replaced `${entity}` template literal with string concatenation to prevent Gemini CLI/Claude Code parameter conflicts. Verified MCP server and package health.
75
- - **Decision:** v0.0.11 is now the stable baseline.
76
- - **Next Step:** Proceed to PHASE_1 Architecture & Contract.
77
-
78
- ### 2026-05-08 — v0.0.10 Super-Stabilization (MASTER)
45
+ ## HISTORY (Recent)
79
46
 
80
- - **Agent:** @manager
81
- - **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
82
- - **Action:** Consolidated all stabilization fixes into v0.0.10. Fixed init pathing, linker placement, git automation, and Claude Code template validation. Synchronized all 8 agents and packages.
83
- - **Decision:** Released v0.0.10 as the definitive stable baseline for the framework.
84
- - **Next Step:** Ready for production-grade feature development.
85
-
86
- ### 2026-05-08 — Major Structural & Clean Root Transition (v0.0.9)
87
-
88
- - **Agent:** @manager
89
- - **Trace ID:** 01KR46N2B7V1X9Z4M3D5G7H5L1
90
- - **Action:** Decoupled framework documentation from user project instructions. Moved assets to hidden folders.
91
- - **Next Step:** Finalize adapter-specific logic.
92
-
93
- ### 2026-05-08 — Structural Alignment & Trace ID Correction
47
+ ### 2026-05-09 Build Hardening & Reliability
94
48
 
95
49
  - **Agent:** @manager
96
- - **Trace ID:** 01KR43EZD3BWKX08KHQ6EV7DHC
97
- - **Action:** Converted legacy UUIDs to ULID standard.
98
- - **Next Step:** Ready for Phase 1 Architecture.
50
+ - **Action:** Updated package scripts to use `npx tsc -p tsconfig.json`.
51
+ - **Decision:** v0.1.0 is the stable baseline.
52
+ - **Note:** Archive created in [[ARCHIVE.md]].
99
53
 
100
54
  ---
101
-
102
- _Generated by AI-Enderun Framework v0.0.13 MASTER_
55
+ _Generated by AI-Enderun Framework v0.1.0 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.13 Master
6
+ # Project Analyst & QA Gate — v0.1.0 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.13)
175
+ **Agent Completion Report** (v0.1.0)
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.13 Master
6
+ # Backend Architect — v0.1.0 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.13)
236
+ **Agent Completion Report** (v0.1.0)
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.13 Master
6
+ # Codebase Explorer — v0.1.0 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.13)
82
+ **Agent Completion Report** (v0.1.0)
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.13 Master
6
+ # Frontend Architect — v0.1.0 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.13)
138
+ **Agent Completion Report** (v0.1.0)
139
139
  - Mock used? [ ] No / [ ] Yes
140
140
  - shared-types imported? [ ] No / [ ] Yes
141
141
  - **API contract read? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/**
@@ -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.13 Master
6
+ # Version Control Specialist (@git) — v0.1.0 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.13)
82
+ ### Agent Completion Report (v0.1.0)
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.13 Master
6
+ # Manager (CTO & Controller) — v0.1.0 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.13 (Mandatory in Every Agent Directive)
72
+ ## Briefing Template v0.1.0 (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.13)
160
+ **Agent Completion Report** (v0.1.0)
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.13 Master
6
+ # Mobile Architect — v0.1.0 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.13)
47
+ **Agent Completion Report** (v0.1.0)
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.13 Master
6
+ # Native Desktop Architect — v0.1.0 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.13)
46
+ **Agent Completion Report** (v0.1.0)
47
47
 
48
48
  - Mock used? [ ] No / [ ] Yes
49
49
  - shared-types imported? [ ] No / [ ] Yes
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Claude Code Adapter (v0.0.13)
1
+ # AI-Enderun — Claude Code Adapter (v0.1.0)
2
2
 
3
3
  This file is the Claude Code adapter layer.
4
4
  Core framework rules and agent capabilities are defined in `{{FRAMEWORK_DIR}}/ENDERUN.md`.
package/CODEX.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Codex Adapter (v0.0.13)
1
+ # AI-Enderun — Codex Adapter (v0.1.0)
2
2
 
3
3
  This file is the Codex adapter layer.
4
4
  Core framework rules and agent capabilities are defined in `{{FRAMEWORK_DIR}}/ENDERUN.md`.
package/CURSOR.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Cursor Adapter (v0.0.13)
1
+ # AI-Enderun — Cursor Adapter (v0.1.0)
2
2
 
3
3
  This file is the Cursor adapter layer.
4
4
  Core framework rules and agent capabilities are defined in `{{FRAMEWORK_DIR}}/ENDERUN.md`.
package/ENDERUN.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun Constitution — v0.0.13 Master
1
+ # AI-Enderun Constitution — v0.1.0 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.13-phase1`).
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.1.0-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.13 MASTER_
72
+ _Generated by AI-Enderun Framework v0.1.0 MASTER_
package/GEMINI.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — General Agent Adapter (v0.0.13)
1
+ # AI-Enderun — General Agent Adapter (v0.1.0)
2
2
 
3
3
  This file is the general adapter layer for AI agents (Gemini, GPT-4o, etc.).
4
4
  Core framework rules and agent capabilities are defined in `{{FRAMEWORK_DIR}}/ENDERUN.md`.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun (v0.0.13 Master)
1
+ # AI-Enderun (v0.1.0 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.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.
11
+ Starting from **v0.1.0 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.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.
71
+ **v0.1.0 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
 
@@ -122,6 +122,8 @@ AI-Enderun, `.<adapter>/agents/` dizininde bulunan 8 uzman rolü yönetir:
122
122
  - **`verify_api_contract`:** Kodun paylaşılan API dökümantasyonuyla uyumunu doğrular.
123
123
  - **`log_agent_action`:** İzlenebilirlik için yapılandırılmış JSON logları kaydeder.
124
124
 
125
+ > 💡 **Akıllı Entegrasyon:** Tüm MCP araçlarına `ai-enderun` CLI üzerinden de erişilebilir (örn: `npm run mcp log_agent_action ...`); bu, kısıtlı ortamlardaki ajanlar için sağlam bir yedek mekanizma sağlar.
126
+
125
127
  ---
126
128
 
127
129
  ## License
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.13";
129
+ if (!targetPkg.version) targetPkg.version = "0.1.0";
130
130
  if (!targetPkg.type) targetPkg.type = "module";
131
131
 
132
132
  // Add metadata
@@ -0,0 +1,23 @@
1
+ # API Documentation
2
+
3
+ ## Authentication Architecture
4
+
5
+ **Decision:** Stateless JWT (JSON Web Token) with Short-Lived Access Tokens and Long-Lived Refresh Tokens.
6
+
7
+ ### Reasoning
8
+ - **Scalability:** Stateless authentication is highly scalable and fits well with Fastify.
9
+ - **Security:** Access tokens are short-lived (e.g., 15 minutes) and stored in memory on the frontend. Refresh tokens are HTTP-only, Secure cookies.
10
+
11
+ ### Endpoints (Draft)
12
+
13
+ - `POST /api/auth/register` (Body: `RegisterDTO`, Response: `AuthResponseDTO`)
14
+ - `POST /api/auth/login` (Body: `LoginDTO`, Response: `AuthResponseDTO`)
15
+ - `POST /api/auth/refresh` (Cookie: `refreshToken`, Response: `AuthResponseDTO`)
16
+ - `POST /api/auth/logout` (Clears cookies)
17
+ - `GET /api/users/me` (Header: `Authorization: Bearer <accessToken>`, Response: `User`)
18
+
19
+ ### Data Contracts
20
+ Defined in `packages/shared-types/src/index.ts`.
21
+
22
+ ---
23
+ *Updated: 2026-05-09*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-enderun",
3
- "version": "0.0.13",
3
+ "version": "0.1.0",
4
4
  "description": "Supreme AI Orchestration Framework — Senior Discipline & Ottoman Wisdom",
5
5
  "author": "Yusuf BEKAR <ybekar@msn.com>",
6
6
  "repository": {
@@ -23,6 +23,10 @@
23
23
  "bin": {
24
24
  "ai-enderun": "bin/cli.js"
25
25
  },
26
+ "workspaces": [
27
+ "apps/*",
28
+ "packages/*"
29
+ ],
26
30
  "files": [
27
31
  "bin",
28
32
  "docs",
@@ -45,7 +49,9 @@
45
49
  "mcp": "node bin/cli.js",
46
50
  "mcp:dev": "npx tsx packages/framework-mcp/src/index.ts",
47
51
  "mcp:status": "npx socraticode status",
52
+ "contract:update": "node -e \"const fs=require('fs');const path=require('path');const crypto=require('crypto');const dir='packages/shared-types/src';const contractPath='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 newHash=h.digest('hex');const contractData=JSON.parse(fs.readFileSync(contractPath,'utf8'));contractData.contract_hash=newHash;contractData.updated_at=new Date().toISOString();fs.writeFileSync(contractPath,JSON.stringify(contractData,null,2));console.log('Contract hash updated to:',newHash);\"",
48
53
  "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');\"",
54
+ "postinstall": "npm run build",
49
55
  "prepublishOnly": "npm run build",
50
56
  "version": "npm run build && git add .",
51
57
  "postversion": "git push && git push --tags",
@@ -56,10 +62,10 @@
56
62
  },
57
63
  "devDependencies": {
58
64
  "tsx": "^4.19.4",
59
- "typescript": "^5.7.3"
65
+ "typescript": "^5.9.3"
60
66
  },
61
67
  "enderun": {
62
- "version": "0.0.13",
68
+ "version": "0.1.0",
63
69
  "initializedAt": "2026-05-08T17:50:01.387Z"
64
70
  }
65
- }
71
+ }
@@ -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.13",
11
+ version: "0.1.0",
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.13";
43
+ const FRAMEWORK_VERSION = "0.1.0";
44
44
  function getFrameworkDir(projectRoot) {
45
45
  const adapters = [".gemini", ".claude", ".cursor", ".codex", ".enderun"];
46
46
  for (const adp of adapters) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-enderun-mcp",
3
- "version": "0.0.13",
3
+ "version": "0.1.0",
4
4
  "description": "Enterprise-grade MCP Server for AI Agent Framework — Memory, Security & AST Intelligence",
5
5
  "author": "Yusuf BEKAR <ybekar@msn.com>",
6
6
  "repository": {
@@ -20,7 +20,7 @@
20
20
  "README.md"
21
21
  ],
22
22
  "scripts": {
23
- "build": "tsc",
23
+ "build": "npx tsc -p tsconfig.json",
24
24
  "prepublishOnly": "npm run build",
25
25
  "start": "node dist/index.js",
26
26
  "dev": "tsx src/index.ts"
@@ -33,4 +33,29 @@ export interface ApiError {
33
33
  statusCode: number;
34
34
  }
35
35
  export type ApiResponse<T> = ApiSuccess<T> | ApiError;
36
+ export interface User {
37
+ id: UserID;
38
+ email: string;
39
+ name: string;
40
+ role: 'admin' | 'user';
41
+ createdAt: string;
42
+ updatedAt: string;
43
+ }
44
+ export interface AuthResponseDTO {
45
+ user: User;
46
+ accessToken: string;
47
+ refreshToken: string;
48
+ }
49
+ export interface LoginDTO {
50
+ email: string;
51
+ password: string;
52
+ }
53
+ export interface RegisterDTO {
54
+ email: string;
55
+ name: string;
56
+ password: string;
57
+ }
58
+ export interface RefreshTokenDTO {
59
+ refreshToken: string;
60
+ }
36
61
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;CAAE,CAAC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ClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -22,22 +22,4 @@ export const createULID = (seedTime = Date.now()) => {
22
22
  // ─── ID Generators (Runtime) ──────────────────────────────────────────────────
23
23
  export const createUserID = () => createULID();
24
24
  export const createSessionID = () => createULID();
25
- // ─── Domain Types (Add here when project development starts) ──────────────────
26
- // Example:
27
- // export interface User {
28
- // id: UserID;
29
- // email: string;
30
- // name: string;
31
- // createdAt: string; // ISO-8601
32
- // }
33
- //
34
- // export interface CreateUserDTO {
35
- // email: string;
36
- // name: string;
37
- // password: string;
38
- // }
39
- //
40
- // export interface UpdateUserDTO {
41
- // name?: string;
42
- // }
43
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,kFAAkF;AAClF,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AACpD,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;AAErC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,WAAmB,IAAI,CAAC,GAAG,EAAE,EAAU,EAAE;IAClE,IAAI,IAAI,GAAG,QAAQ,CAAC;IACpB,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,SAAS,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,YAAY,CAAC,CAAC;QACpD,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,YAAY,CAAC,CAAC;IACzC,CAAC;IACD,MAA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CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,SAAS,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,YAAY,CAAC,CAAC;QACpD,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,YAAY,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;IAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,WAAW,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC,CAAC;AAKF,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAW,EAAE,CAAC,UAAU,EAAY,CAAC;AACjE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAc,EAAE,CAAC,UAAU,EAAe,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-enderun/shared-types",
3
- "version": "0.0.13",
3
+ "version": "0.1.0",
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": {
@@ -16,9 +16,9 @@
16
16
  "README.md"
17
17
  ],
18
18
  "scripts": {
19
- "build": "tsc",
20
- "build:watch": "tsc --watch",
21
- "typecheck": "tsc --noEmit"
19
+ "build": "npx tsc -p tsconfig.json",
20
+ "build:watch": "npx tsc -p tsconfig.json --watch",
21
+ "typecheck": "npx tsc -p tsconfig.json --noEmit"
22
22
  },
23
23
  "keywords": [
24
24
  "typescript",