agent-enderun 0.8.8 → 0.9.1
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/BRAIN_DASHBOARD.md +5 -5
- package/{ENDERUN.md → .enderun/ENDERUN.md} +4 -2
- package/.enderun/PROJECT_MEMORY.md +32 -43
- package/.enderun/STATUS.md +25 -28
- package/.enderun/agents/agent_army_schema.json +29 -7
- package/.enderun/agents/backend.md +48 -39
- package/.enderun/agents/database.md +55 -0
- package/.enderun/agents/devops.md +30 -17
- package/.enderun/agents/explorer.md +5 -5
- package/.enderun/agents/frontend.md +97 -76
- package/.enderun/agents/git.md +4 -4
- package/.enderun/agents/manager.md +68 -59
- package/.enderun/agents/mobile.md +4 -4
- package/.enderun/agents/native.md +106 -0
- package/.enderun/agents/quality.md +122 -0
- package/.enderun/agents/schema/agent-lifecycle-schema.json +29 -8
- package/.enderun/cli-commands.json +7 -3
- package/.enderun/config.json +8 -2
- package/.enderun/knowledge/SHIM_TEMPLATE.md +25 -0
- package/.enderun/knowledge/context_boundary_rules.md +57 -0
- package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
- package/.enderun/knowledge/documentation_ownership.md +53 -0
- package/.enderun/knowledge/eslint-standards.md +63 -0
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
- package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
- package/.enderun/knowledge/hermes_protocol.md +1 -1
- package/.enderun/knowledge/lessons-learned.md +14 -0
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +10 -10
- package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
- package/.enderun/knowledge/reference_application_guidelines.md +6 -6
- package/.enderun/mcp_config.json +9 -0
- package/.enderun/memory-graph/agent-contexts/backend.json +1 -1
- package/.enderun/memory-graph/agent-contexts/devops.json +1 -1
- package/.enderun/memory-graph/agent-contexts/explorer.json +1 -1
- package/.enderun/memory-graph/agent-contexts/frontend.json +1 -1
- package/.enderun/memory-graph/agent-contexts/git.json +1 -1
- package/.enderun/memory-graph/agent-contexts/manager.json +1 -1
- package/.enderun/memory-graph/agent-contexts/mobile.json +1 -1
- package/.enderun/memory-graph/agent-contexts/native.json +1 -0
- package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
- package/.enderun/memory-graph/graph.json +123 -15
- package/.enderun/memory-graph/shared-facts.json +26 -31
- package/.enderun/queue/README.md +13 -13
- package/README.md +171 -393
- package/agent.md +25 -0
- package/bin/cli.js +10 -10
- package/bin/init-check.js +69 -0
- package/bin/update-contract.js +57 -38
- package/bin/validate-agent-army.js +38 -13
- package/claude.md +14 -8
- package/docs/README.md +24 -16
- package/docs/architecture/README.md +9 -0
- package/docs/architecture/standards/data-fetching-patterns.md +13 -0
- package/docs/architecture/standards/design-system.md +31 -0
- package/docs/architecture/standards/logging.md +7 -0
- package/docs/architecture/standards/tech-stack.md +9 -0
- package/docs/getting-started.md +9 -259
- package/docs/user/README.md +35 -0
- package/docs/user/action-plan-2026.md +9 -0
- package/docs/user/getting-started.md +13 -0
- package/docs/user/roadmap.md +13 -0
- package/eslint.config.js +68 -0
- package/framework-mcp/dist/index.js +178 -24
- package/framework-mcp/package.json +6 -33
- package/framework-mcp/tsconfig.json +3 -6
- package/gemini.md +12 -6
- package/grok.md +25 -0
- package/package.json +13 -5
- package/panda.config.ts +86 -86
- package/src/cli/adapters.ts +208 -0
- package/src/cli/commands/app.ts +38 -0
- package/src/cli/commands/check.ts +87 -0
- package/src/cli/commands/compliance.ts +55 -0
- package/src/cli/commands/contract.ts +45 -0
- package/src/cli/commands/explorer.ts +45 -0
- package/src/cli/commands/git.ts +39 -0
- package/src/cli/commands/init.ts +272 -0
- package/src/cli/commands/knowledge.ts +44 -0
- package/src/cli/commands/lint.ts +25 -0
- package/src/cli/commands/log.ts +37 -0
- package/src/cli/commands/memory.ts +78 -0
- package/src/cli/commands/orchestrate.ts +111 -0
- package/src/cli/commands/script.ts +20 -0
- package/src/cli/commands/security.ts +38 -0
- package/src/cli/commands/status.ts +59 -0
- package/src/cli/commands/trace.ts +46 -0
- package/src/cli/index.ts +74 -2155
- package/src/cli/utils/app.ts +764 -0
- package/src/cli/utils/claude.ts +56 -0
- package/src/cli/utils/fs.ts +139 -0
- package/src/cli/utils/memory.ts +141 -0
- package/src/cli/utils/pkg.ts +215 -0
- package/src/cli/utils/string.ts +48 -0
- package/src/cli/utils/time.ts +27 -0
- package/tsconfig.json +9 -0
- package/.enderun/agents/analyst.md +0 -238
- package/.enderun/agents/orchestrator.md +0 -172
- package/.enderun/agents/qa.md +0 -124
- package/.enderun/agents/security.md +0 -202
- package/.enderun/knowledge/api_design_rules.md +0 -6
- package/.enderun/knowledge/branded_types_pattern.md +0 -8
- package/.enderun/knowledge/code_review_checklist.md +0 -7
- package/.enderun/knowledge/contract_versioning.md +0 -7
- package/.enderun/knowledge/database_migration.md +0 -6
- package/.enderun/knowledge/deployment_checklist.md +0 -7
- package/.enderun/knowledge/git_commit_strategy.md +0 -10
- package/.enderun/knowledge/monitoring_setup.md +0 -5
- package/.enderun/knowledge/performance_guidelines.md +0 -11
- package/.enderun/knowledge/repository_patterns.md +0 -9
- package/.enderun/knowledge/security_scanning.md +0 -6
- package/.enderun/knowledge/testing_standards.md +0 -7
- package/.enderun/knowledge/troubleshooting_guide.md +0 -5
- package/.enderun/logs/analyst.json +0 -1
- package/.enderun/logs/backend.json +0 -1
- package/.enderun/logs/devops.json +0 -1
- package/.enderun/logs/explorer.json +0 -1
- package/.enderun/logs/frontend.json +0 -1
- package/.enderun/logs/git.json +0 -1
- package/.enderun/logs/manager.json +0 -1
- package/.enderun/logs/mobile.json +0 -1
- package/.enderun/logs/native.json +0 -1
- package/.enderun/logs/orchestrator.json +0 -1
- package/.enderun/logs/qa.json +0 -1
- package/.enderun/logs/security.json +0 -1
- package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
- package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
- package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
- package/.enderun/memory-graph/agent-contexts/security.json +0 -1
- package/.env.example +0 -10
- package/cursor.md +0 -19
- package/docs/action-plan-2026.md +0 -119
- package/docs/roadmap.md +0 -142
- package/framework-mcp/README.md +0 -55
- package/framework-mcp/dist/schemas.js +0 -84
- package/framework-mcp/dist/tools/codebase.js +0 -294
- package/framework-mcp/dist/tools/contract.js +0 -197
- package/framework-mcp/dist/tools/framework.js +0 -225
- package/framework-mcp/dist/tools/git.js +0 -51
- package/framework-mcp/dist/tools/governance.js +0 -696
- package/framework-mcp/dist/tools/index.js +0 -47
- package/framework-mcp/dist/tools/knowledge.js +0 -133
- package/framework-mcp/dist/tools/memory.js +0 -217
- package/framework-mcp/dist/tools/messages.js +0 -193
- package/framework-mcp/dist/tools/monitoring.js +0 -294
- package/framework-mcp/dist/tools/orchestration.js +0 -369
- package/framework-mcp/dist/tools/pipeline.js +0 -267
- package/framework-mcp/dist/tools/security.js +0 -137
- package/framework-mcp/dist/utils.js +0 -121
- package/framework-mcp/src/index.ts +0 -49
- package/framework-mcp/src/schemas.ts +0 -106
- package/framework-mcp/src/tools/codebase.ts +0 -284
- package/framework-mcp/src/tools/contract.ts +0 -221
- package/framework-mcp/src/tools/framework.ts +0 -223
- package/framework-mcp/src/tools/git.ts +0 -42
- package/framework-mcp/src/tools/governance.ts +0 -891
- package/framework-mcp/src/tools/index.ts +0 -50
- package/framework-mcp/src/tools/knowledge.ts +0 -141
- package/framework-mcp/src/tools/memory.ts +0 -207
- package/framework-mcp/src/tools/messages.ts +0 -213
- package/framework-mcp/src/tools/monitoring.ts +0 -351
- package/framework-mcp/src/tools/orchestration.ts +0 -440
- package/framework-mcp/src/tools/pipeline.ts +0 -353
- package/framework-mcp/src/tools/security.ts +0 -143
- package/framework-mcp/src/utils.ts +0 -130
|
@@ -1,46 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"author": "Yusuf BEKAR",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"readme": "README.md",
|
|
2
|
+
"name": "@agent-enderun/mcp",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Agent Enderun Model Context Protocol (MCP) Server",
|
|
8
5
|
"type": "module",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/ysf-bkr/Agent-Enderun.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/ysf-bkr/Agent-Enderun/issues"
|
|
15
|
-
},
|
|
16
|
-
"homepage": "https://github.com/ysf-bkr/Agent-Enderun#readme",
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"module": "dist/index.js",
|
|
19
|
-
"types": "dist/index.js",
|
|
20
|
-
"bin": {
|
|
21
|
-
"framework-mcp": "dist/index.js"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"src",
|
|
25
|
-
"dist",
|
|
26
|
-
"README.md"
|
|
27
|
-
],
|
|
28
|
-
"publishConfig": {
|
|
29
|
-
"access": "public"
|
|
30
|
-
},
|
|
31
6
|
"scripts": {
|
|
32
|
-
"build": "tsc
|
|
7
|
+
"build": "npx tsc",
|
|
33
8
|
"start": "node dist/index.js",
|
|
34
9
|
"dev": "tsx src/index.ts"
|
|
35
10
|
},
|
|
36
11
|
"dependencies": {
|
|
37
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
38
|
-
"ts-morph": "^28.0.0",
|
|
12
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
39
13
|
"zod": "^3.24.2"
|
|
40
14
|
},
|
|
41
15
|
"devDependencies": {
|
|
42
|
-
"@types/node": "^
|
|
43
|
-
"tsx": "^4.19.4",
|
|
16
|
+
"@types/node": "^22.19.19",
|
|
44
17
|
"typescript": "^5.9.3"
|
|
45
18
|
}
|
|
46
19
|
}
|
|
@@ -4,13 +4,10 @@
|
|
|
4
4
|
"module": "NodeNext",
|
|
5
5
|
"moduleResolution": "NodeNext",
|
|
6
6
|
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
7
8
|
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
9
|
"skipLibCheck": true,
|
|
10
|
-
"
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"types": ["node"]
|
|
10
|
+
"esModuleInterop": true
|
|
13
11
|
},
|
|
14
|
-
"include": ["src
|
|
15
|
-
"exclude": ["node_modules", "dist"]
|
|
12
|
+
"include": ["src/**/*.ts"]
|
|
16
13
|
}
|
package/gemini.md
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
# Agent Enderun — Gemini CLI Adapter
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This is the primary entry point when using Agent Enderun within the Gemini CLI ecosystem.
|
|
4
4
|
|
|
5
|
-
The framework
|
|
5
|
+
The framework operates under a unified governance structure located in the `.enderun/` directory.
|
|
6
6
|
|
|
7
7
|
### Primary Constitution
|
|
8
8
|
All governance rules, agent checklists, and project memory live here:
|
|
9
9
|
|
|
10
10
|
👉 **[.enderun/ENDERUN.md](.enderun/ENDERUN.md)**
|
|
11
11
|
|
|
12
|
-
### 🤖 Agent Directive
|
|
12
|
+
### 🤖 Agent Directive
|
|
13
13
|
You are operating under the Agent Enderun governance framework.
|
|
14
14
|
|
|
15
15
|
At the **start of every session**, before any work:
|
|
16
|
-
1. Read `.enderun/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
|
|
17
|
-
2. Read the relevant agent definition under `.enderun/agents/{agent}.md` (
|
|
16
|
+
1. **Restore Memory:** Read `.enderun/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
|
|
17
|
+
2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.md` (default to `@manager`).
|
|
18
|
+
3. **Internalize Knowledge:** Reference the `.enderun/knowledge/` base for architectural and coding standards.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
### 🛡️ Core Mandates
|
|
21
|
+
- **Surgical Edits:** Use `replace_text` or `patch_file` via MCP for precise changes.
|
|
22
|
+
- **Traceability:** Every action must inherit the active Trace ID from memory.
|
|
23
|
+
- **Contract First:** No implementation without verified types.
|
|
24
|
+
|
|
25
|
+
All paths and references inside the project must comply with the Supreme Constitution located at `.enderun/ENDERUN.md`.
|
package/grok.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Agent Enderun — Grok / X.ai Adapter
|
|
2
|
+
|
|
3
|
+
This is the primary entry point when using Agent Enderun within the Grok / X.ai ecosystem.
|
|
4
|
+
|
|
5
|
+
The framework operates under a unified governance structure located in the `.enderun/` directory.
|
|
6
|
+
|
|
7
|
+
### Primary Constitution
|
|
8
|
+
All governance rules, agent checklists, and project memory live here:
|
|
9
|
+
|
|
10
|
+
👉 **[.enderun/ENDERUN.md](.enderun/ENDERUN.md)**
|
|
11
|
+
|
|
12
|
+
### 🤖 Agent Directive
|
|
13
|
+
You are operating under the Agent Enderun governance framework.
|
|
14
|
+
|
|
15
|
+
At the **start of every session**, before any work:
|
|
16
|
+
1. **Restore Memory:** Read `.enderun/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
|
|
17
|
+
2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.md` (default to `@manager`).
|
|
18
|
+
3. **Internalize Knowledge:** Reference the `.enderun/knowledge/` base for architectural and coding standards.
|
|
19
|
+
|
|
20
|
+
### 🛡️ Core Mandates
|
|
21
|
+
- **Surgical Edits:** Use `replace_text` or `patch_file` via MCP for precise changes.
|
|
22
|
+
- **Traceability:** Every action must inherit the active Trace ID from memory.
|
|
23
|
+
- **Contract First:** No implementation without verified types.
|
|
24
|
+
|
|
25
|
+
All paths and references inside the project must comply with the Supreme Constitution located at `.enderun/ENDERUN.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-enderun",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "The Supreme AI Governance & Orchestration Framework for Enterprise Development",
|
|
5
5
|
"author": "Yusuf BEKAR",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,20 +33,21 @@
|
|
|
33
33
|
"files": [
|
|
34
34
|
"bin",
|
|
35
35
|
"src",
|
|
36
|
+
"dist",
|
|
36
37
|
"framework-mcp/dist",
|
|
37
|
-
"framework-mcp/src",
|
|
38
38
|
"framework-mcp/package.json",
|
|
39
39
|
".enderun",
|
|
40
40
|
"ENDERUN.md",
|
|
41
41
|
"README.md",
|
|
42
42
|
"LICENSE",
|
|
43
43
|
"mcp.json",
|
|
44
|
-
".env.example",
|
|
45
44
|
"tsconfig.json",
|
|
45
|
+
"eslint.config.js",
|
|
46
46
|
"panda.config.ts",
|
|
47
47
|
"gemini.md",
|
|
48
48
|
"claude.md",
|
|
49
|
-
"
|
|
49
|
+
"grok.md",
|
|
50
|
+
"agent.md",
|
|
50
51
|
"docs"
|
|
51
52
|
],
|
|
52
53
|
"scripts": {
|
|
@@ -57,8 +58,10 @@
|
|
|
57
58
|
"enderun:trace": "agent-enderun trace:new",
|
|
58
59
|
"enderun:verify": "agent-enderun verify-contract",
|
|
59
60
|
"enderun:check": "agent-enderun check",
|
|
61
|
+
"enderun:lint": "eslint .",
|
|
60
62
|
"lint": "eslint .",
|
|
61
|
-
"
|
|
63
|
+
"prepublishOnly": "npm run enderun:build",
|
|
64
|
+
"clean": "rm -rf node_modules apps/*/node_modules framework-mcp/node_modules apps/*/dist framework-mcp/dist"
|
|
62
65
|
},
|
|
63
66
|
"publishConfig": {
|
|
64
67
|
"access": "public"
|
|
@@ -70,11 +73,16 @@
|
|
|
70
73
|
"@types/node": "^25.9.1",
|
|
71
74
|
"concurrently": "^9.2.1",
|
|
72
75
|
"eslint": "^10.4.0",
|
|
76
|
+
"globals": "^17.6.0",
|
|
73
77
|
"ts-morph": "^28.0.0",
|
|
74
78
|
"tsx": "^4.22.3",
|
|
75
79
|
"typescript": "^6.0.3",
|
|
76
80
|
"typescript-eslint": "^8.60.0",
|
|
77
81
|
"vitest": "^4.1.7",
|
|
78
82
|
"zod": "^3.24.2"
|
|
83
|
+
},
|
|
84
|
+
"enderun": {
|
|
85
|
+
"version": "0.9.0",
|
|
86
|
+
"initializedAt": "2026-05-29T13:21:18.516Z"
|
|
79
87
|
}
|
|
80
88
|
}
|
package/panda.config.ts
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
import { defineConfig } from "@pandacss/dev";
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
// Whether to use css reset
|
|
5
|
+
preflight: true,
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
// Where to look for your css declarations
|
|
8
|
+
include: [
|
|
9
|
+
"./src/**/*.{js,jsx,ts,tsx}",
|
|
10
|
+
"./pages/**/*.{js,jsx,ts,tsx}",
|
|
11
|
+
"./apps/**/*.{js,jsx,ts,tsx}",
|
|
12
|
+
// Project-internal UI components only (no packages/ui by default)
|
|
13
|
+
"./apps/**/src/components/**/*.{ts,tsx}",
|
|
14
|
+
"./apps/**/src/ui/**/*.{ts,tsx}",
|
|
15
|
+
],
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
// Files to exclude
|
|
18
|
+
exclude: [],
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
// Conditions for Dark Mode and other states
|
|
21
|
+
conditions: {
|
|
22
|
+
extend: {
|
|
23
|
+
dark: ".dark &, [data-theme='dark'] &",
|
|
24
|
+
light: ".light &, [data-theme='light'] &",
|
|
25
|
+
},
|
|
25
26
|
},
|
|
26
|
-
},
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
// Semantic Tokens (Theme Aware)
|
|
53
|
-
semanticTokens: {
|
|
54
|
-
colors: {
|
|
55
|
-
bg: {
|
|
56
|
-
canvas: {
|
|
57
|
-
value: { base: "{colors.white}", _dark: "{colors.brand.950}" },
|
|
58
|
-
},
|
|
59
|
-
surface: {
|
|
60
|
-
value: { base: "{colors.gray.50}", _dark: "{colors.brand.900}" },
|
|
61
|
-
},
|
|
62
|
-
muted: {
|
|
63
|
-
value: { base: "{colors.gray.100}", _dark: "{colors.brand.800}" },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
text: {
|
|
67
|
-
default: {
|
|
68
|
-
value: { base: "{colors.gray.900}", _dark: "{colors.white}" },
|
|
69
|
-
},
|
|
70
|
-
muted: {
|
|
71
|
-
value: { base: "{colors.gray.500}", _dark: "{colors.gray.400}" },
|
|
72
|
-
},
|
|
73
|
-
brand: {
|
|
74
|
-
value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
accent: {
|
|
78
|
-
default: {
|
|
79
|
-
value: { base: "{colors.brand.500}", _dark: "{colors.brand.500}" },
|
|
80
|
-
},
|
|
81
|
-
emphasis: {
|
|
82
|
-
value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
|
|
83
|
-
},
|
|
84
|
-
fg: {
|
|
85
|
-
value: { base: "{colors.white}", _dark: "{colors.white}" },
|
|
28
|
+
// Theme Customization
|
|
29
|
+
theme: {
|
|
30
|
+
extend: {
|
|
31
|
+
// Base Tokens (Absolute Values)
|
|
32
|
+
tokens: {
|
|
33
|
+
colors: {
|
|
34
|
+
brand: {
|
|
35
|
+
50: { value: "#eef2ff" },
|
|
36
|
+
100: { value: "#e0e7ff" },
|
|
37
|
+
200: { value: "#c7d2fe" },
|
|
38
|
+
300: { value: "#a5b4fc" },
|
|
39
|
+
400: { value: "#818cf8" },
|
|
40
|
+
500: { value: "#6366f1" },
|
|
41
|
+
600: { value: "#4f46e5" },
|
|
42
|
+
700: { value: "#4338ca" },
|
|
43
|
+
800: { value: "#3730a3" },
|
|
44
|
+
900: { value: "#312e81" },
|
|
45
|
+
950: { value: "#1e1b4b" },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
spacing: {
|
|
49
|
+
container: { value: "1200px" },
|
|
50
|
+
},
|
|
86
51
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
52
|
+
// Semantic Tokens (Theme Aware)
|
|
53
|
+
semanticTokens: {
|
|
54
|
+
colors: {
|
|
55
|
+
bg: {
|
|
56
|
+
canvas: {
|
|
57
|
+
value: { base: "{colors.white}", _dark: "{colors.brand.950}" },
|
|
58
|
+
},
|
|
59
|
+
surface: {
|
|
60
|
+
value: { base: "{colors.gray.50}", _dark: "{colors.brand.900}" },
|
|
61
|
+
},
|
|
62
|
+
muted: {
|
|
63
|
+
value: { base: "{colors.gray.100}", _dark: "{colors.brand.800}" },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
text: {
|
|
67
|
+
default: {
|
|
68
|
+
value: { base: "{colors.gray.900}", _dark: "{colors.white}" },
|
|
69
|
+
},
|
|
70
|
+
muted: {
|
|
71
|
+
value: { base: "{colors.gray.500}", _dark: "{colors.gray.400}" },
|
|
72
|
+
},
|
|
73
|
+
brand: {
|
|
74
|
+
value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
accent: {
|
|
78
|
+
default: {
|
|
79
|
+
value: { base: "{colors.brand.500}", _dark: "{colors.brand.500}" },
|
|
80
|
+
},
|
|
81
|
+
emphasis: {
|
|
82
|
+
value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
|
|
83
|
+
},
|
|
84
|
+
fg: {
|
|
85
|
+
value: { base: "{colors.white}", _dark: "{colors.white}" },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
border: {
|
|
89
|
+
default: {
|
|
90
|
+
value: { base: "{colors.gray.200}", _dark: "{colors.brand.800}" },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
91
94
|
},
|
|
92
|
-
},
|
|
93
95
|
},
|
|
94
|
-
},
|
|
95
96
|
},
|
|
96
|
-
},
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// The output directory for your css system
|
|
99
|
+
outdir: "styled-system",
|
|
100
100
|
});
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
|
|
4
|
+
import { findClaudeConfigPath, addMcpServerToClaude } from "./utils/claude.js";
|
|
5
|
+
import { writeJsonFile, writeTextFile } from "./utils/fs.js";
|
|
6
|
+
|
|
7
|
+
export const ADAPTER_IDS = ["gemini", "claude", "grok", "antigravity", "antigravity-cli"] as const;
|
|
8
|
+
export type AdapterId = (typeof ADAPTER_IDS)[number];
|
|
9
|
+
|
|
10
|
+
export interface AdapterConfig {
|
|
11
|
+
id: AdapterId;
|
|
12
|
+
/** Runtime framework directory created by init */
|
|
13
|
+
frameworkDir: string;
|
|
14
|
+
/** Root shim file (e.g. gemini.md) */
|
|
15
|
+
shimFile: string;
|
|
16
|
+
/** Package template copied into frameworkDir */
|
|
17
|
+
templateDir: ".enderun";
|
|
18
|
+
/** Extra directories under frameworkDir (gemini only for nested auto-scaffold) */
|
|
19
|
+
nestedDirs?: string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
23
|
+
gemini: {
|
|
24
|
+
id: "gemini",
|
|
25
|
+
frameworkDir: ".gemini",
|
|
26
|
+
shimFile: "gemini.md",
|
|
27
|
+
templateDir: ".enderun",
|
|
28
|
+
nestedDirs: ["antigravity", "antigravity-cli"],
|
|
29
|
+
},
|
|
30
|
+
claude: {
|
|
31
|
+
id: "claude",
|
|
32
|
+
frameworkDir: ".claude",
|
|
33
|
+
shimFile: "claude.md",
|
|
34
|
+
templateDir: ".enderun",
|
|
35
|
+
},
|
|
36
|
+
grok: {
|
|
37
|
+
id: "grok",
|
|
38
|
+
frameworkDir: ".agent", // Future-proof agent-centric directory for Grok/X.ai
|
|
39
|
+
shimFile: "grok.md",
|
|
40
|
+
templateDir: ".enderun",
|
|
41
|
+
},
|
|
42
|
+
antigravity: {
|
|
43
|
+
id: "antigravity",
|
|
44
|
+
frameworkDir: ".gemini/antigravity",
|
|
45
|
+
shimFile: "agent.md",
|
|
46
|
+
templateDir: ".enderun",
|
|
47
|
+
},
|
|
48
|
+
"antigravity-cli": {
|
|
49
|
+
id: "antigravity-cli",
|
|
50
|
+
frameworkDir: ".gemini/antigravity-cli",
|
|
51
|
+
shimFile: "agent.md",
|
|
52
|
+
templateDir: ".enderun",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* All framework runtime directories (for discovery).
|
|
58
|
+
* Verified against 2026 industry standards for Claude Code (.claude/)
|
|
59
|
+
* and internal standards for Antigravity (.gemini/antigravity/).
|
|
60
|
+
*/
|
|
61
|
+
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
62
|
+
".gemini",
|
|
63
|
+
".claude",
|
|
64
|
+
".agent",
|
|
65
|
+
".enderun",
|
|
66
|
+
] as const;
|
|
67
|
+
|
|
68
|
+
const SHIM_FILES = ADAPTER_IDS.map((id) => ADAPTERS[id].shimFile);
|
|
69
|
+
|
|
70
|
+
export function resolveAdapter(input?: string): AdapterConfig {
|
|
71
|
+
const normalized = (input || "gemini").toLowerCase() as AdapterId;
|
|
72
|
+
if (ADAPTER_IDS.includes(normalized)) {
|
|
73
|
+
return ADAPTERS[normalized];
|
|
74
|
+
}
|
|
75
|
+
console.warn(`⚠️ Unknown adapter "${input}". Falling back to gemini (.gemini/).`);
|
|
76
|
+
return ADAPTERS.gemini;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function isAdapterShimFile(fileName: string): boolean {
|
|
80
|
+
return SHIM_FILES.includes(fileName);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function remapFrameworkContent(
|
|
84
|
+
content: string,
|
|
85
|
+
frameworkDir: string,
|
|
86
|
+
adapterId: AdapterId,
|
|
87
|
+
): string {
|
|
88
|
+
let result = content;
|
|
89
|
+
result = result.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
90
|
+
result = result.replace(/\{\{ADAPTER\}\}/g, adapterId);
|
|
91
|
+
result = result.replace(/\.enderun\//g, `${frameworkDir}/`);
|
|
92
|
+
result = result.replace(/`\.enderun`/g, `\`${frameworkDir}\``);
|
|
93
|
+
result = result.replace(/\.enderun(?![\w/-])/g, frameworkDir);
|
|
94
|
+
|
|
95
|
+
// Read config paths dynamically to map directory tokens
|
|
96
|
+
let backend = "apps/backend";
|
|
97
|
+
let frontend = "apps/web";
|
|
98
|
+
let docs = "docs";
|
|
99
|
+
let tests = "tests";
|
|
100
|
+
try {
|
|
101
|
+
const configPath = path.join(process.cwd(), frameworkDir, "config.json");
|
|
102
|
+
if (fs.existsSync(configPath)) {
|
|
103
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
104
|
+
if (config.paths) {
|
|
105
|
+
if (config.paths.backend) backend = config.paths.backend;
|
|
106
|
+
if (config.paths.frontend) frontend = config.paths.frontend;
|
|
107
|
+
if (config.paths.docs) docs = config.paths.docs;
|
|
108
|
+
if (config.paths.tests) tests = config.paths.tests;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
} catch {
|
|
112
|
+
// ignore
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
result = result.replace(/\{\{BACKEND_DIR\}\}/g, backend);
|
|
116
|
+
result = result.replace(/\{\{FRONTEND_DIR\}\}/g, frontend);
|
|
117
|
+
result = result.replace(/\{\{DOCS_DIR\}\}/g, docs);
|
|
118
|
+
result = result.replace(/\{\{TESTS_DIR\}\}/g, tests);
|
|
119
|
+
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function buildMcpServerEntry(projectRoot: string) {
|
|
124
|
+
return {
|
|
125
|
+
command: "node",
|
|
126
|
+
args: [path.join(projectRoot, "framework-mcp/dist/index.js")],
|
|
127
|
+
env: {},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function writeAntigravityScaffold(frameworkDirPath: string): void {
|
|
132
|
+
const antigravityReadme = `# Antigravity IDE — Agent Enderun
|
|
133
|
+
|
|
134
|
+
Antigravity IDE integration for the Gemini adapter.
|
|
135
|
+
|
|
136
|
+
- Framework root: \`${path.basename(frameworkDirPath)}/\`
|
|
137
|
+
- Nested path: \`antigravity/\`
|
|
138
|
+
- Use the parent \`mcp_config.json\` and \`gemini.md\` entrypoint at the project root.
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
const antigravityCliReadme = `# Antigravity CLI — Agent Enderun
|
|
142
|
+
|
|
143
|
+
Antigravity CLI integration for the Gemini adapter.
|
|
144
|
+
|
|
145
|
+
- Framework root: \`${path.basename(frameworkDirPath)}/\`
|
|
146
|
+
- Nested path: \`antigravity-cli/\`
|
|
147
|
+
- Register MCP from the project root \`mcp.json\` or \`.gemini/mcp_config.json\`.
|
|
148
|
+
`;
|
|
149
|
+
|
|
150
|
+
writeTextFile(path.join(frameworkDirPath, "antigravity/README.md"), antigravityReadme);
|
|
151
|
+
writeTextFile(path.join(frameworkDirPath, "antigravity-cli/README.md"), antigravityCliReadme);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Adapter-specific MCP and IDE hooks after scaffold.
|
|
156
|
+
*/
|
|
157
|
+
export function runAdapterPostInit(adapter: AdapterConfig, projectRoot: string): void {
|
|
158
|
+
const mcpEntry = buildMcpServerEntry(projectRoot);
|
|
159
|
+
const mcpBlock = { mcpServers: { "agent-enderun": mcpEntry } };
|
|
160
|
+
|
|
161
|
+
switch (adapter.id) {
|
|
162
|
+
case "gemini": {
|
|
163
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
164
|
+
writeAntigravityScaffold(path.join(projectRoot, adapter.frameworkDir));
|
|
165
|
+
console.warn(`✅ Gemini MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
166
|
+
console.warn(`✅ Antigravity → ${adapter.frameworkDir}/antigravity/ & antigravity-cli/`);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
case "antigravity": {
|
|
170
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
171
|
+
console.warn(`✅ Antigravity IDE MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
case "antigravity-cli": {
|
|
175
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
176
|
+
console.warn(`✅ Antigravity CLI MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case "grok": {
|
|
180
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
181
|
+
console.warn(`✅ Grok MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case "claude": {
|
|
185
|
+
const configPath = findClaudeConfigPath();
|
|
186
|
+
if (configPath) {
|
|
187
|
+
const ok = addMcpServerToClaude(configPath, "agent-enderun", mcpEntry);
|
|
188
|
+
if (ok) {
|
|
189
|
+
console.warn(`✅ Claude MCP registered → ${configPath}`);
|
|
190
|
+
} else {
|
|
191
|
+
console.warn("⚠️ Could not patch Claude config automatically.");
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
console.warn("⚠️ Claude config not found. Add MCP manually (see README).");
|
|
195
|
+
}
|
|
196
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
default:
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Keep root mcp.json in sync when missing or empty
|
|
204
|
+
const rootMcpPath = path.join(projectRoot, "mcp.json");
|
|
205
|
+
if (!fs.existsSync(rootMcpPath)) {
|
|
206
|
+
writeJsonFile(rootMcpPath, mcpBlock);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
import { updateMemoryForGeneratedApp, collectCreateAppDescription, inferAppSpec, createBackendFiles, createWebFiles, updateProjectDocs } from "../utils/app.js";
|
|
4
|
+
import { traceNewCommand } from "./trace.js";
|
|
5
|
+
import { getMemoryPath } from "../utils/memory.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Generate a new application based on natural language input.
|
|
9
|
+
*/
|
|
10
|
+
export async function createAppCommand(args: string[]) {
|
|
11
|
+
const description = await collectCreateAppDescription(args);
|
|
12
|
+
const spec = inferAppSpec(description);
|
|
13
|
+
|
|
14
|
+
console.warn(`🚀 Generating Enterprise App: ${spec.title}...`);
|
|
15
|
+
|
|
16
|
+
createBackendFiles(spec);
|
|
17
|
+
createWebFiles(spec);
|
|
18
|
+
updateProjectDocs(spec);
|
|
19
|
+
|
|
20
|
+
const memoryPath = getMemoryPath();
|
|
21
|
+
let traceId = "01HGT8J5E2N0W0W0W0W0W0W0W0"; // default fallback
|
|
22
|
+
|
|
23
|
+
if (fs.existsSync(memoryPath)) {
|
|
24
|
+
const memory = fs.readFileSync(memoryPath, "utf8");
|
|
25
|
+
const match = memory.match(/- Trace ID: (.*)/);
|
|
26
|
+
if (match) traceId = match[1].trim();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const activeTraceId = traceNewCommand(`Generate ${spec.title} from natural language request`, "manager", "P1") || traceId;
|
|
30
|
+
updateMemoryForGeneratedApp(spec, activeTraceId);
|
|
31
|
+
|
|
32
|
+
console.warn("\n✨ Application scaffolded successfully!");
|
|
33
|
+
console.warn("📜 Updated project docs and app-local types contract");
|
|
34
|
+
console.warn("\nNext commands:");
|
|
35
|
+
console.warn(" npm install");
|
|
36
|
+
console.warn(" npm run enderun:build");
|
|
37
|
+
console.warn(" agent-enderun frontend:dev\n");
|
|
38
|
+
}
|