agent-enderun 0.6.0 → 0.6.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.
- package/.enderun/PROJECT_MEMORY.md +117 -3
- package/.enderun/STATUS.md +4 -4
- package/.enderun/agents/analyst.md +98 -12
- package/.enderun/agents/backend.md +258 -14
- package/.enderun/agents/explorer.md +67 -2
- package/.enderun/agents/frontend.md +404 -66
- package/.enderun/agents/git.md +19 -2
- package/.enderun/agents/manager.md +412 -45
- package/.enderun/agents/mobile.md +63 -19
- package/.enderun/agents/native.md +61 -11
- package/.enderun/blueprints/backend/errors/blueprint.json +11 -0
- package/.enderun/blueprints/backend/errors/domain-error.ts +34 -55
- package/.enderun/docs/tech-stack.md +7 -8
- package/.enderun/knowledge/contract_versioning.md +1 -1
- package/.enderun/knowledge/framework_vs_user_project_boundary.md +52 -0
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +108 -0
- package/.enderun/knowledge/hermes_live_test_guidelines.md +90 -0
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +104 -0
- package/.enderun/knowledge/project_scaffold_guidelines.md +99 -0
- package/.enderun/knowledge/reference_application_guidelines.md +90 -0
- package/.enderun/messages/2026-05-23-backend-to-manager-auth-errors-reply.json +23 -0
- package/.enderun/messages/2026-05-23-manager-to-backend-auth-errors.json +26 -0
- package/ENDERUN.md +12 -4
- package/README.md +185 -626
- package/antigravity.md +15 -0
- package/bin/cli.js +105 -30
- package/bin/update-contract.js +2 -2
- package/docs/README.md +33 -3
- package/docs/getting-started.md +497 -0
- package/docs/roadmap.md +200 -0
- package/framework-mcp/README.md +1 -1
- package/framework-mcp/dist/index.js +0 -0
- package/framework-mcp/dist/tools/academy.js +6 -8
- package/framework-mcp/dist/tools/codebase.js +6 -6
- package/framework-mcp/dist/tools/contract.js +94 -4
- package/framework-mcp/dist/tools/database.js +1 -1
- package/framework-mcp/dist/tools/framework.js +8 -12
- package/framework-mcp/dist/tools/git.js +2 -2
- package/framework-mcp/dist/tools/knowledge.js +4 -4
- package/framework-mcp/dist/tools/memory.js +5 -7
- package/framework-mcp/dist/tools/messages.js +6 -6
- package/framework-mcp/dist/tools/repository.js +4 -4
- package/framework-mcp/dist/tools/scaffold.js +6 -3
- package/framework-mcp/dist/tools/security.js +4 -4
- package/framework-mcp/dist/utils.js +2 -2
- package/framework-mcp/package.json +1 -1
- package/framework-mcp/src/schemas.ts +7 -0
- package/framework-mcp/src/tools/academy.ts +5 -9
- package/framework-mcp/src/tools/codebase.ts +6 -6
- package/framework-mcp/src/tools/contract.ts +114 -4
- package/framework-mcp/src/tools/database.ts +1 -1
- package/framework-mcp/src/tools/framework.ts +9 -12
- package/framework-mcp/src/tools/git.ts +2 -2
- package/framework-mcp/src/tools/knowledge.ts +5 -6
- package/framework-mcp/src/tools/memory.ts +5 -6
- package/framework-mcp/src/tools/messages.ts +94 -28
- package/framework-mcp/src/tools/repository.ts +5 -6
- package/framework-mcp/src/tools/scaffold.ts +9 -6
- package/framework-mcp/src/tools/security.ts +4 -4
- package/framework-mcp/src/utils.ts +2 -2
- package/gemini.md +4 -4
- package/package.json +11 -7
- package/panda.config.ts +3 -1
- package/.enderun/benchmarks/.gitkeep +0 -0
- package/.enderun/blueprints/backend/middleware/error-handler.ts +0 -24
- package/.enderun/blueprints/backend/types/api.ts +0 -20
- package/.enderun/blueprints/backend/types/brands.ts +0 -12
- package/.enderun/blueprints/backend/types/constants.ts +0 -34
- package/.enderun/blueprints/backend/types/index.ts +0 -49
- package/.enderun/blueprints/backend/types/logs.ts +0 -16
- package/.enderun/blueprints/backend/types/models.ts +0 -65
- package/.enderun/blueprints/frontend/ui/Button.tsx +0 -60
- package/.enderun/blueprints/frontend/ui/Input.tsx +0 -43
- package/.enderun/monitoring/.gitkeep +0 -0
- package/gemini-extension.json +0 -13
package/antigravity.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Agent Enderun — Antigravity Adapter
|
|
2
|
+
|
|
3
|
+
This file is the entry point for Antigravity CLI. The project's "Supreme Law" and all instructions are located in the following file:
|
|
4
|
+
|
|
5
|
+
👉 **[.antigravitycli/ENDERUN.md](.antigravitycli/ENDERUN.md)**
|
|
6
|
+
|
|
7
|
+
### 🤖 AGENT DIRECTIVE
|
|
8
|
+
You are ALWAYS operating as `@manager` (Team-Lead) by default — on every message, every turn. The user does NOT need to type `@manager`. Typing a specific agent (e.g. `@backend`) explicitly will override this and activate that specialist role directly. You are responsible for analysis and delegation.
|
|
9
|
+
|
|
10
|
+
⚠️ **CRITICAL STARTUP REQUIREMENT:**
|
|
11
|
+
At the start of every new session/conversation or first turn, before you perform any task or respond to the user:
|
|
12
|
+
1. You **MUST** read `.antigravitycli/PROJECT_MEMORY.md` immediately (using the `read_project_memory` tool or the most specific file viewing tool) to restore the project's state, active phase, Trace ID, and recent history.
|
|
13
|
+
2. You **MUST** read `.antigravitycli/agents/manager.md` (or the specialist's md file in `.antigravitycli/agents/` if explicitly overridden) to load your role-specific rules, workflows, and checklists.
|
|
14
|
+
|
|
15
|
+
Please read the Supreme Law thoroughly before taking any action.
|
package/bin/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ function getPackageVersion() {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function getFrameworkDir() {
|
|
25
|
-
const adapters = [".
|
|
25
|
+
const adapters = [".antigravitycli", ".claude", ".cursor", ".enderun", ".codex", ".gemini"];
|
|
26
26
|
for (const adp of adapters) {
|
|
27
27
|
const fullPath = path.join(targetDir, adp);
|
|
28
28
|
if (fs.existsSync(fullPath) && fs.lstatSync(fullPath).isDirectory()) {
|
|
@@ -159,7 +159,7 @@ function mergePackageJson(targetPath, sourcePath) {
|
|
|
159
159
|
"enderun:check": "agent-enderun check",
|
|
160
160
|
"enderun:test": "vitest run",
|
|
161
161
|
"enderun:test:watch": "vitest",
|
|
162
|
-
"enderun:build": `${runCmd} build --prefix
|
|
162
|
+
"enderun:build": `${runCmd} build --prefix framework-mcp`,
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
const sourceDevDeps = sourcePkg.devDependencies || {};
|
|
@@ -183,7 +183,7 @@ function mergePackageJson(targetPath, sourcePath) {
|
|
|
183
183
|
if (!targetPkg.name) targetPkg.name = path.basename(process.cwd());
|
|
184
184
|
if (!targetPkg.version) targetPkg.version = "0.1.0";
|
|
185
185
|
if (!targetPkg.type) targetPkg.type = "module";
|
|
186
|
-
if (!targetPkg.workspaces) targetPkg.workspaces = ["
|
|
186
|
+
if (!targetPkg.workspaces) targetPkg.workspaces = ["apps/*", "framework-mcp"];
|
|
187
187
|
|
|
188
188
|
// Add metadata
|
|
189
189
|
targetPkg.enderun = {
|
|
@@ -225,6 +225,60 @@ function updateGitIgnore(targetPath, frameworkDir = ".enderun") {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Finds the Claude config file path (if it exists).
|
|
230
|
+
*/
|
|
231
|
+
function findClaudeConfigPath() {
|
|
232
|
+
const home = process.env.HOME || process.env.USERPROFILE;
|
|
233
|
+
if (!home) return null;
|
|
234
|
+
|
|
235
|
+
const possiblePaths = [
|
|
236
|
+
path.join(home, ".config", "claude", "config.json"),
|
|
237
|
+
path.join(home, ".claude", "config.json"),
|
|
238
|
+
path.join(home, "Library", "Application Support", "Claude", "config.json"), // macOS Claude Desktop
|
|
239
|
+
path.join(home, "Library", "Application Support", "Claude Code", "config.json"), // macOS Claude Code
|
|
240
|
+
path.join(home, ".config", "Claude", "config.json"), // some Linux setups
|
|
241
|
+
];
|
|
242
|
+
|
|
243
|
+
for (const p of possiblePaths) {
|
|
244
|
+
if (fs.existsSync(p)) {
|
|
245
|
+
return p;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Adds or updates an MCP server entry in Claude's config file.
|
|
253
|
+
*/
|
|
254
|
+
function addMcpServerToClaude(configPath, serverName, serverConfig) {
|
|
255
|
+
try {
|
|
256
|
+
let config = { mcpServers: {} };
|
|
257
|
+
|
|
258
|
+
if (fs.existsSync(configPath)) {
|
|
259
|
+
const content = fs.readFileSync(configPath, "utf8");
|
|
260
|
+
config = JSON.parse(content);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (!config.mcpServers) {
|
|
264
|
+
config.mcpServers = {};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
config.mcpServers[serverName] = serverConfig;
|
|
268
|
+
|
|
269
|
+
// Ensure parent directory exists
|
|
270
|
+
const dir = path.dirname(configPath);
|
|
271
|
+
if (!fs.existsSync(dir)) {
|
|
272
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
276
|
+
return true;
|
|
277
|
+
} catch (err) {
|
|
278
|
+
return false;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
228
282
|
/**
|
|
229
283
|
* Create initial PROJECT_MEMORY.md if missing.
|
|
230
284
|
*/
|
|
@@ -318,13 +372,21 @@ function getPackageManager() {
|
|
|
318
372
|
*/
|
|
319
373
|
async function initCommand(selectedAdapter) {
|
|
320
374
|
const ADAPTERS = {
|
|
321
|
-
|
|
375
|
+
antigravity: ["antigravity.md"],
|
|
322
376
|
claude: ["claude.md"],
|
|
323
377
|
cursor: ["cursor.md"],
|
|
324
378
|
codex: ["codex.md"],
|
|
379
|
+
gemini: ["gemini.md"],
|
|
325
380
|
};
|
|
326
381
|
|
|
327
|
-
|
|
382
|
+
let targetBase;
|
|
383
|
+
if (selectedAdapter === "antigravity") {
|
|
384
|
+
targetBase = ".antigravitycli";
|
|
385
|
+
} else if (selectedAdapter && selectedAdapter !== "codex") {
|
|
386
|
+
targetBase = `.${selectedAdapter}`;
|
|
387
|
+
} else {
|
|
388
|
+
targetBase = ".enderun";
|
|
389
|
+
}
|
|
328
390
|
|
|
329
391
|
const targetFrameworkDir = path.join(targetDir, targetBase);
|
|
330
392
|
|
|
@@ -374,7 +436,7 @@ async function initCommand(selectedAdapter) {
|
|
|
374
436
|
let filesToProcess = [...CORE_FILES];
|
|
375
437
|
if (selectedAdapter) {
|
|
376
438
|
if (!ADAPTERS[selectedAdapter]) {
|
|
377
|
-
console.error(`❌ Invalid adapter: ${selectedAdapter}. Available:
|
|
439
|
+
console.error(`❌ Invalid adapter: ${selectedAdapter}. Available: antigravity, claude, cursor, codex, gemini`);
|
|
378
440
|
process.exit(1);
|
|
379
441
|
}
|
|
380
442
|
filesToProcess.push(...ADAPTERS[selectedAdapter]);
|
|
@@ -382,6 +444,16 @@ async function initCommand(selectedAdapter) {
|
|
|
382
444
|
Object.values(ADAPTERS).forEach(list => filesToProcess.push(...list));
|
|
383
445
|
}
|
|
384
446
|
|
|
447
|
+
// Ensure apps/backend structure for contract file
|
|
448
|
+
ensureDir(path.join(targetDir, "apps/backend"));
|
|
449
|
+
const initContractPath = path.join(targetDir, "apps/backend/contract.version.json");
|
|
450
|
+
if (!fs.existsSync(initContractPath)) {
|
|
451
|
+
writeJsonFile(initContractPath, {
|
|
452
|
+
"contract_hash": "initial_hash_placeholder",
|
|
453
|
+
"last_updated": new Date().toISOString()
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
385
457
|
// Detect target project scope
|
|
386
458
|
let targetPkg = {};
|
|
387
459
|
try {
|
|
@@ -497,30 +569,33 @@ async function initCommand(selectedAdapter) {
|
|
|
497
569
|
console.log("\n🛠️ Running smart configuration for adapters...");
|
|
498
570
|
|
|
499
571
|
|
|
500
|
-
if (selectedAdapter === "
|
|
501
|
-
|
|
502
|
-
const geminiExtPath = path.join(targetDir, "gemini-extension.json");
|
|
503
|
-
try {
|
|
504
|
-
const ext = JSON.parse(fs.readFileSync(geminiExtPath, "utf8"));
|
|
505
|
-
ext.mcpServers = {
|
|
506
|
-
"agent-enderun": {
|
|
507
|
-
command: "node",
|
|
508
|
-
args: ["framework-mcp/dist/index.js"]
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
fs.writeFileSync(geminiExtPath, JSON.stringify(ext, null, 2) + "\n");
|
|
512
|
-
console.log("💎 Gemini: MCP server wired up in gemini-extension.json automatically.");
|
|
513
|
-
} catch (e) {
|
|
514
|
-
console.warn("⚠️ Gemini: Could not patch gemini-extension.json for MCP. Wire it up manually.");
|
|
515
|
-
}
|
|
516
|
-
console.log(`💎 Gemini: Adapter gemini.md and ${targetBase}/ folder are ready.`);
|
|
572
|
+
if (selectedAdapter === "antigravity") {
|
|
573
|
+
console.log(`🚀 Antigravity: Adapter antigravity.md and ${targetBase}/ folder are ready.`);
|
|
517
574
|
}
|
|
518
575
|
|
|
519
576
|
if (selectedAdapter === "claude") {
|
|
520
577
|
const mcpPath = path.join(targetDir, "framework-mcp/src/index.ts");
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
578
|
+
const mcpConfig = {
|
|
579
|
+
command: "npx",
|
|
580
|
+
args: ["tsx", mcpPath]
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
const claudeConfigPath = findClaudeConfigPath() || path.join(
|
|
584
|
+
process.env.HOME || process.env.USERPROFILE || "",
|
|
585
|
+
"Library", "Application Support", "Claude", "config.json"
|
|
586
|
+
); // default macOS path if nothing found
|
|
587
|
+
|
|
588
|
+
const success = addMcpServerToClaude(claudeConfigPath, "agent-enderun", mcpConfig);
|
|
589
|
+
|
|
590
|
+
if (success) {
|
|
591
|
+
console.log("✅ Claude: MCP server 'agent-enderun' automatically configured.");
|
|
592
|
+
console.log(` Config file: ${claudeConfigPath}`);
|
|
593
|
+
console.log(" (File was created if it did not exist)");
|
|
594
|
+
} else {
|
|
595
|
+
console.log("\n📝 Claude Code Setup (Automatic failed):");
|
|
596
|
+
console.log("Please run this command manually:");
|
|
597
|
+
console.log(`\x1b[36mclaude config add agent-enderun npx tsx ${mcpPath}\x1b[0m`);
|
|
598
|
+
}
|
|
524
599
|
}
|
|
525
600
|
|
|
526
601
|
if (selectedAdapter === "cursor") {
|
|
@@ -763,8 +838,8 @@ function copyDir(src, dest, skipSet = new Set(), nonDestructive = false, framewo
|
|
|
763
838
|
|
|
764
839
|
const frameworkBase = frameworkDir.startsWith(".") ? frameworkDir.slice(1) : frameworkDir;
|
|
765
840
|
let currentAdapter = frameworkBase;
|
|
766
|
-
if (entry.name.endsWith(".md") && [ "
|
|
767
|
-
currentAdapter = [ "
|
|
841
|
+
if (entry.name.endsWith(".md") && [ "antigravity", "claude", "cursor", "codex", "gemini" ].some(a => entry.name.startsWith(a))) {
|
|
842
|
+
currentAdapter = [ "antigravity", "claude", "cursor", "codex", "gemini" ].find(a => entry.name.startsWith(a));
|
|
768
843
|
}
|
|
769
844
|
|
|
770
845
|
content = content.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
@@ -1883,7 +1958,7 @@ async function createAppCommand(args) {
|
|
|
1883
1958
|
|
|
1884
1959
|
console.log(`\n✅ Created ${spec.title}`);
|
|
1885
1960
|
console.log("📁 Generated apps/backend and apps/web");
|
|
1886
|
-
console.log("📜 Updated project docs and
|
|
1961
|
+
console.log("📜 Updated project docs and app-local types contract");
|
|
1887
1962
|
console.log("\nNext commands:");
|
|
1888
1963
|
console.log(" npm install");
|
|
1889
1964
|
console.log(" npm run enderun:build");
|
|
@@ -2059,7 +2134,7 @@ async function main() {
|
|
|
2059
2134
|
🤖 Agent Enderun CLI (v${FRAMEWORK_VERSION})
|
|
2060
2135
|
|
|
2061
2136
|
Available Commands:
|
|
2062
|
-
init [adapter] Initialize the framework (
|
|
2137
|
+
init [adapter] Initialize the framework (antigravity, claude, cursor, codex, gemini)
|
|
2063
2138
|
create-app <idea> Generate a full-stack starter from natural language
|
|
2064
2139
|
check Full health check
|
|
2065
2140
|
check:security Run security audit scan
|
package/bin/update-contract.js
CHANGED
|
@@ -12,8 +12,8 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
12
12
|
const __dirname = path.dirname(__filename);
|
|
13
13
|
const projectRoot = path.join(__dirname, "..");
|
|
14
14
|
|
|
15
|
-
const contractPath = path.join(projectRoot, "
|
|
16
|
-
const sharedTypesDir = path.join(projectRoot, "
|
|
15
|
+
const contractPath = path.join(projectRoot, "apps/backend/contract.version.json");
|
|
16
|
+
const sharedTypesDir = path.join(projectRoot, "apps/backend/src/types");
|
|
17
17
|
|
|
18
18
|
function collectTypeFiles(dir) {
|
|
19
19
|
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
package/docs/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Project Documentation
|
|
1
|
+
# Project Documentation / Proje Dokümantasyonu
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
English | [Türkçe](#türkçe)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# English
|
|
8
|
+
|
|
9
|
+
This folder is managed by **Agent Enderun agents** and contains documentation generated for **your project** — not the framework itself.
|
|
5
10
|
|
|
6
11
|
## What Goes Here
|
|
7
12
|
|
|
@@ -21,3 +26,28 @@ generated for **your project** — not the framework itself.
|
|
|
21
26
|
| `/.enderun/docs/` | **Framework** configuration — tech-stack, security policy, privacy policy |
|
|
22
27
|
|
|
23
28
|
> Agents will populate this folder automatically during **PHASE_2 (Core Development)**.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# Türkçe
|
|
33
|
+
|
|
34
|
+
Bu klasör **Agent Enderun ajanları** tarafından yönetilir ve framework'ün kendisi için değil, **sizin projeniz** için oluşturulan dokümanları içerir.
|
|
35
|
+
|
|
36
|
+
## Burada Neler Var?
|
|
37
|
+
|
|
38
|
+
| Dosya | Sahip Ajan | Açıklama |
|
|
39
|
+
| :--- | :--- | :--- |
|
|
40
|
+
| `architecture.md` | @backend | Sistem mimarisi ve veri akış diyagramları |
|
|
41
|
+
| `api-reference.md` | @backend | Genel API uç noktaları ve kullanım örnekleri |
|
|
42
|
+
| `components.md` | @frontend | UI bileşen kataloğu ve kullanım kılavuzları |
|
|
43
|
+
| `deployment.md` | @manager | Dağıtım adımları ve ortam kurulumu |
|
|
44
|
+
| `decisions.md` | @manager | Mimari Karar Kayıtları (ADRs) |
|
|
45
|
+
|
|
46
|
+
## `.enderun/docs/` Klasöründen Farkı
|
|
47
|
+
|
|
48
|
+
| Yol | Amaç |
|
|
49
|
+
| :--- | :--- |
|
|
50
|
+
| `/docs/` | **Sizin projenizin** dokümantasyonu — özellikler geliştirildikçe ajanlar tarafından yazılır |
|
|
51
|
+
| `/.enderun/docs/` | **Framework** konfigürasyonu — tech-stack, güvenlik politikası, gizlilik politikası |
|
|
52
|
+
|
|
53
|
+
> Ajanlar bu klasörü **PHASE_2 (Core Development)** sırasında otomatik olarak dolduracaktır.
|