agent-enderun 0.8.6 → 0.8.8

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.
Files changed (46) hide show
  1. package/.enderun/BRAIN_DASHBOARD.md +4 -4
  2. package/.enderun/PROJECT_MEMORY.md +7 -7
  3. package/.enderun/STATUS.md +3 -5
  4. package/.enderun/agents/agent_army_schema.json +1 -1
  5. package/.enderun/agents/analyst.md +11 -18
  6. package/.enderun/agents/backend.md +42 -31
  7. package/.enderun/agents/devops.md +9 -18
  8. package/.enderun/agents/explorer.md +7 -16
  9. package/.enderun/agents/frontend.md +75 -91
  10. package/.enderun/agents/git.md +7 -16
  11. package/.enderun/agents/manager.md +38 -25
  12. package/.enderun/agents/mobile.md +7 -16
  13. package/.enderun/agents/orchestrator.md +16 -25
  14. package/.enderun/agents/qa.md +16 -22
  15. package/.enderun/agents/security.md +9 -18
  16. package/.enderun/cli-commands.json +0 -4
  17. package/.enderun/config.json +2 -2
  18. package/.enderun/knowledge/manager_authority_audit_enforcement.md +2 -2
  19. package/.enderun/knowledge/token_economy_and_memory.md +129 -0
  20. package/.enderun/memory-graph/agent-contexts/manager.json +1 -1
  21. package/.enderun/memory-graph/graph.json +1 -2
  22. package/.enderun/memory-graph/shared-facts.json +1 -2
  23. package/ENDERUN.md +1 -1
  24. package/README.md +379 -244
  25. package/docs/roadmap.md +1 -1
  26. package/framework-mcp/dist/schemas.js +0 -34
  27. package/framework-mcp/dist/tools/framework.js +40 -11
  28. package/framework-mcp/dist/tools/governance.js +1 -1
  29. package/framework-mcp/dist/tools/memory.js +24 -7
  30. package/framework-mcp/dist/tools/monitoring.js +6 -6
  31. package/framework-mcp/dist/tools/orchestration.js +9 -8
  32. package/framework-mcp/dist/utils.js +2 -2
  33. package/framework-mcp/package.json +1 -1
  34. package/framework-mcp/src/tools/framework.ts +39 -8
  35. package/framework-mcp/src/tools/memory.ts +20 -5
  36. package/framework-mcp/src/tools/monitoring.ts +6 -6
  37. package/framework-mcp/src/tools/orchestration.ts +9 -8
  38. package/framework-mcp/src/utils.ts +2 -2
  39. package/mcp.json +2 -2
  40. package/package.json +1 -1
  41. package/src/cli/index.ts +30 -2
  42. package/.enderun/agents/native.md +0 -115
  43. package/.enderun/claude.md +0 -19
  44. package/.enderun/cursor.md +0 -19
  45. package/.enderun/gemini.md +0 -19
  46. package/.enderun/memory-graph/agent-contexts/native.json +0 -1
package/src/cli/index.ts CHANGED
@@ -998,16 +998,44 @@ function complianceCheckCommand(targetPath) {
998
998
  console.warn(`📜 Checking Constitution Compliance: ${targetPath}...`);
999
999
  const violations = [];
1000
1000
  const forbidden = ["@shadcn", "mui", "@chakra-ui", "tailwindcss"];
1001
+
1002
+ // 1. package.json scan (Blind Spot 5)
1003
+ const pkgJsonPath = path.join(targetDir, "package.json");
1004
+ if (fs.existsSync(pkgJsonPath)) {
1005
+ try {
1006
+ const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8"));
1007
+ const allDeps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
1008
+ forbidden.forEach(lib => {
1009
+ if (allDeps[lib] || Object.keys(allDeps).some(d => d.toLowerCase().includes(lib.toLowerCase()))) {
1010
+ violations.push(`package.json: Forbidden library dependency '${lib}' found in package.json.`);
1011
+ }
1012
+ });
1013
+ } catch {
1014
+ // ignore
1015
+ }
1016
+ }
1017
+
1018
+ // 2. Source files scan
1001
1019
  const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx", ".js", ".jsx", ".md"]);
1002
1020
  files.forEach(f => {
1021
+ const isTypesFile = f.includes("brands.ts") || f.includes("brands.js") || f.includes("brands.tsx") || f.includes("src/types/brands");
1022
+
1003
1023
  const content = fs.readFileSync(f, "utf8");
1004
1024
  forbidden.forEach(lib => {
1005
1025
  if (content.includes(lib)) violations.push(`${path.relative(targetDir, f)}: Forbidden library '${lib}' found.`);
1006
1026
  });
1007
- if (f.endsWith(".ts") && content.includes("interface") && content.match(/ID\s*:\s*string/)) {
1008
- violations.push(`${path.relative(targetDir, f)}: Potential Branded Types violation (ID typed as string).`);
1027
+
1028
+ // Robust Branded Types validation (Blind Spot 4)
1029
+ if ((f.endsWith(".ts") || f.endsWith(".tsx")) && !isTypesFile && content.includes("interface")) {
1030
+ const plainIdMatches = content.match(/\b\w*(?:id|Id|ID)\??\s*:\s*(?:string|number)\b/g);
1031
+ if (plainIdMatches) {
1032
+ plainIdMatches.forEach(match => {
1033
+ violations.push(`${path.relative(targetDir, f)}: Potential Branded Types violation (plain identifier '${match.trim()}' found inside interface).`);
1034
+ });
1035
+ }
1009
1036
  }
1010
1037
  });
1038
+
1011
1039
  if (violations.length === 0) {
1012
1040
  console.warn("✅ All systems compliant with ENDERUN.md.");
1013
1041
  } else {
@@ -1,115 +0,0 @@
1
- ---
2
- name: native
3
- description: "Native Platform Desktop Specialist Agent for Agent Enderun"
4
- ---
5
-
6
- # @native — native (v0.8.6)
7
-
8
- - **Name:** native
9
- - **Capability:** 9.0
10
- - **Role:** native
11
- - **State Machine:** `../schema/agent-lifecycle-schema.json`
12
-
13
- ---
14
-
15
- # @native — Native Capabilities (v0.8.6)
16
-
17
- - **Name:** @native
18
- - **Capability:** 8.9
19
- - **Role:** Native Capabilities
20
- - **Specialization:** Swift/Kotlin, native integrations, deep links, platform-specific high-risk flows
21
- - **Permitted Directories:**
22
- - `apps/native/`
23
- - `{{FRAMEWORK_DIR}}/knowledge/`
24
- - **Hermes Channels:**
25
- - `@native->@manager`
26
- - `@native->@orchestrator`
27
- - **Tags:** specialist
28
- - **State Machine:** `../schema/agent-lifecycle-schema.json`
29
-
30
- ## Core Rules
31
- - All native work must be preceded by contract definition and manager briefing.
32
- - Security-sensitive native code requires extra audit logging.
33
-
34
- ---
35
-
36
- # Native Desktop Architect — v0.8.6 Master
37
-
38
- **Role:** Build secure and efficient desktop applications using Tauri or Electron. Ensure procedural continuity across the native codebase.
39
-
40
- ---
41
-
42
- ## 🎯 Core Principle: Search Before Reading
43
-
44
- Always research the existing codebase and native bridge implementations before adding new native functionality.
45
-
46
- ---
47
-
48
- ## 🔌 SESSION STARTUP PROTOCOL (Mandatory)
49
-
50
- 1. Read `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → Understand the current project state.
51
- 2. Read `{{FRAMEWORK_DIR}}/docs/api/` → Align with the contracts.
52
- 3. Check `apps/backend/src/types/` → Use the standardized types.
53
-
54
- > ✅ **End of Session:** Update `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` HISTORY (via `update_project_memory`) + log action via `log_agent_action`. Every turn MUST end with an automated log and memory update.
55
-
56
- ---
57
-
58
- ## Native Standards (Golden Rules)
59
-
60
- - **Tauri (Recommended):** High security + small bundle size (Rust backend preferred).
61
- - **Electron:** For complex Node.js integration or legacy needs.
62
- - **Security:** Strict CSP, no remote code execution, sandboxing mandatory.
63
- - **IPC:** Typed and secure communication (frontend ↔ native layer). For Rust side, `tauri::command` is recommended.
64
- - **Window & Menu Management:** Native menu, tray, and window state management should be standardized.
65
- - **Auto Update:** Use Tauri built-in updater or electron-updater for Electron.
66
-
67
- ---
68
-
69
- ## Native Checklist (Mandatory on Every Task)
70
-
71
- - [ ] Minimal memory footprint and performance?
72
- - [ ] Typed and secure IPC communication?
73
- - [ ] Security (CSP, sandbox, no remote execution) checked?
74
- - [ ] Auto-update and versioning considered?
75
- - [ ] Platform-specific behaviors (Windows/macOS/Linux) documented?
76
- - [ ] Error handling and crash reporting present?
77
-
78
- ## 🖥️ Native Capability Growth (Mandatory)
79
-
80
- - On every task, **at least one** native UX or security improvement must be made (native menu, tray, secure storage, auto-update, window state, etc.).
81
- - When a new IPC pattern or native feature is developed, it is added to this agent's knowledge and becomes the project standard.
82
-
83
- ## 🖥️ Native Component & Logic Standards
84
-
85
- - **Tauri (Recommended):** Rust backend + typed IPC (`tauri::command`).
86
- - **Electron:** For complex Node.js integration. Strict CSP and sandbox mandatory.
87
- - **State Management:** Frontend uses Zustand or project standard. Native side synchronization must be handled carefully.
88
- - **IPC:** Typed and secure communication is mandatory. A contract must be defined between frontend and native.
89
- - **Security:** No remote code execution, strict CSP, secure storage (keychain / credential manager) must be used.
90
- - **Auto Update:** Tauri updater or electron-updater should be considered for automatic updates.
91
- - **Window & Menu:** Native menu, tray icon, and window state management should be standardized.
92
-
93
- ## 🖥️ Native Agent Completion Report (v0.8.6 - Zorunlu)
94
-
95
- - [ ] Mock used? [ ] No / [ ] Yes
96
- - [ ] App types imported? [ ] No / [ ] Yes
97
- - [ ] Typed IPC used? [ ] No / [ ] Yes
98
- - [ ] Security (CSP, sandbox, secure storage) checked? [ ] No / [ ] Yes
99
- - [ ] Auto-update and versioning considered? [ ] No / [ ] Yes
100
- - [ ] Performance and memory footprint checked? [ ] No / [ ] Yes
101
- - [ ] Log written? [ ] No / [ ] Yes → via log_agent_action tool
102
- - [ ] PROJECT_MEMORY HISTORY updated? [ ] No / [ ] Yes
103
- - Next step: [what needs to be done]
104
- - Blockers: [write if any, otherwise "NONE"]
105
- - [ ] Proper error handling at the native layer?
106
- - [ ] Cross-platform (Mac, Windows, Linux) compatibility checked?
107
-
108
- ## 🖥️ Native Capability Growth
109
-
110
- - **Security Improvement:** Add one security hardening note if native code touches IPC, file access, or shell commands.
111
- - **Performance Growth:** Measure and record the impact of any native bridge or runtime change.
112
- - **Platform Notes:** Capture platform-specific constraints in the project memory for future reference.
113
- - **Developer Experience:** Document any native tooling or setup requirements so the next agent can onboard faster.
114
-
115
- ---
@@ -1,19 +0,0 @@
1
- # Agent Enderun — Claude Code CLI Adapter
2
-
3
- This file is the entry point when using Agent Enderun with Claude Code CLI.
4
-
5
- The framework installs into the `.claude/` folder for Claude users.
6
-
7
- ### Primary Constitution
8
- All governance rules, agent checklists, and project memory live here:
9
-
10
- 👉 **[.claude/ENDERUN.md](.claude/ENDERUN.md)**
11
-
12
- ### 🤖 Agent Directive (Claude Code CLI users)
13
- You are operating under the Agent Enderun governance framework.
14
-
15
- At the **start of every session**, before any work:
16
- 1. Read `.claude/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
17
- 2. Read the relevant agent definition under `.claude/agents/{agent}.md` (especially `@manager`).
18
-
19
- All paths and references inside `.claude/` use the Claude adapter structure. No migration to other CLIs is required.
@@ -1,19 +0,0 @@
1
- # Agent Enderun — Cursor / Codex Adapter
2
-
3
- This file is the entry point when using Agent Enderun with Cursor Composer / Codex CLI.
4
-
5
- The framework installs into the `.cursor/` folder for Cursor users.
6
-
7
- ### Primary Constitution
8
- All governance rules, agent checklists, and project memory live here:
9
-
10
- 👉 **[.cursor/ENDERUN.md](.cursor/ENDERUN.md)**
11
-
12
- ### 🤖 Agent Directive (Cursor users)
13
- You are operating under the Agent Enderun governance framework.
14
-
15
- At the **start of every session**, before any work:
16
- 1. Read `.cursor/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
17
- 2. Read the relevant agent definition under `.cursor/agents/{agent}.md` (especially `@manager`).
18
-
19
- All paths and references inside `.cursor/` use the Cursor adapter structure. No migration to other CLIs is required.
@@ -1,19 +0,0 @@
1
- # Agent Enderun — Gemini CLI Adapter
2
-
3
- This file is the entry point when using Agent Enderun with Gemini CLI.
4
-
5
- The framework installs into the `.enderun/` folder for Gemini users.
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 (Gemini CLI users)
13
- You are operating under the Agent Enderun governance framework.
14
-
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` (especially `@manager`).
18
-
19
- All paths and references inside `.enderun/` use the Enderun adapter structure. No migration to other CLIs is required.
@@ -1 +0,0 @@
1
- { "agent": "@native", "version": "1.0.0", "lastUpdated": "2026-05-25T17:00:00Z", "sessionHistory": [], "knownContracts": [], "recentDecisions": [], "watchedFiles": [], "pendingTasks": [], "notes": "Context initialized." }