agent-enderun 1.0.8 → 1.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.
- package/.enderun/ARCHITECTURE.md +1 -0
- package/.enderun/BRAIN_DASHBOARD.md +1 -1
- package/.enderun/ENDERUN.md +4 -3
- package/.enderun/SECURITY.md +1 -0
- package/.enderun/STATUS.md +4 -4
- package/.enderun/agents/agent_army_schema.json +71 -77
- package/.enderun/agents/analyst.json +32 -0
- package/.enderun/agents/backend.json +32 -0
- package/.enderun/agents/database.json +32 -0
- package/.enderun/agents/devops.json +32 -0
- package/.enderun/agents/explorer.json +32 -0
- package/.enderun/agents/frontend.json +32 -0
- package/.enderun/agents/git.json +32 -0
- package/.enderun/agents/manager.json +34 -0
- package/.enderun/agents/mobile.json +32 -0
- package/.enderun/agents/native.json +32 -0
- package/.enderun/agents/quality.json +32 -0
- package/.enderun/agents/schema/agent-lifecycle-schema.json +35 -80
- package/.enderun/agents/security.json +32 -0
- package/.enderun/cli-commands.json +7 -5
- package/.enderun/config.json +1 -1
- package/.enderun/knowledge/ARCHITECTURE.md +1 -0
- package/.enderun/knowledge/SECURITY.md +1 -0
- package/.enderun/knowledge/SHIM_TEMPLATE.md +1 -1
- package/.enderun/logs/manager.json +1 -0
- package/.enderun/memory/PROJECT_MEMORY.md +6 -0
- package/.enderun/observability/README.md +1 -1
- package/CLAUDE.md +5 -5
- package/GEMINI.md +8 -5
- package/GROK.md +1 -1
- package/README.md +34 -33
- package/agent.md +1 -1
- package/bin/hermes-sandbox.js +0 -4
- package/bin/init-check.js +0 -1
- package/bin/validate-agent-army.js +34 -92
- package/dist/apps/backend/src/types/index.d.ts +9 -0
- package/dist/apps/backend/src/types/index.js +5 -0
- package/dist/apps/backend/src/types/index.js.map +1 -0
- package/dist/apps/web/src/main.d.ts +1 -0
- package/dist/apps/web/src/main.js +9 -0
- package/dist/apps/web/src/main.js.map +1 -0
- package/dist/apps/web/vite.config.d.ts +2 -0
- package/dist/apps/web/vite.config.js +6 -0
- package/dist/apps/web/vite.config.js.map +1 -0
- package/dist/framework-mcp/src/index.d.ts +1 -0
- package/dist/framework-mcp/src/index.js +71 -0
- package/dist/framework-mcp/src/index.js.map +1 -0
- package/dist/framework-mcp/src/tools/definitions.d.ts +2 -0
- package/dist/framework-mcp/src/tools/definitions.js +111 -0
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -0
- package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +2 -0
- package/dist/framework-mcp/src/tools/file_system/patch_file.js +19 -0
- package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -0
- package/dist/framework-mcp/src/tools/file_system/read_file.d.ts +2 -0
- package/dist/framework-mcp/src/tools/file_system/read_file.js +8 -0
- package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -0
- package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +2 -0
- package/dist/framework-mcp/src/tools/file_system/replace_text.js +32 -0
- package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -0
- package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +2 -0
- package/dist/framework-mcp/src/tools/file_system/write_file.js +10 -0
- package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -0
- package/dist/framework-mcp/src/tools/framework/get_status.d.ts +2 -0
- package/dist/framework-mcp/src/tools/framework/get_status.js +6 -0
- package/dist/framework-mcp/src/tools/framework/get_status.js.map +1 -0
- package/dist/framework-mcp/src/tools/framework/orchestrate.d.ts +2 -0
- package/dist/framework-mcp/src/tools/framework/orchestrate.js +6 -0
- package/dist/framework-mcp/src/tools/framework/orchestrate.js.map +1 -0
- package/dist/framework-mcp/src/tools/framework/update_contract_hash.d.ts +2 -0
- package/dist/framework-mcp/src/tools/framework/update_contract_hash.js +6 -0
- package/dist/framework-mcp/src/tools/framework/update_contract_hash.js.map +1 -0
- package/dist/framework-mcp/src/tools/framework/update_memory.d.ts +2 -0
- package/dist/framework-mcp/src/tools/framework/update_memory.js +9 -0
- package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -0
- package/dist/framework-mcp/src/tools/index.d.ts +5 -0
- package/dist/framework-mcp/src/tools/index.js +26 -0
- package/dist/framework-mcp/src/tools/index.js.map +1 -0
- package/dist/framework-mcp/src/tools/messaging/log_action.d.ts +2 -0
- package/dist/framework-mcp/src/tools/messaging/log_action.js +23 -0
- package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -0
- package/dist/framework-mcp/src/tools/messaging/send_message.d.ts +2 -0
- package/dist/framework-mcp/src/tools/messaging/send_message.js +24 -0
- package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -0
- package/dist/framework-mcp/src/tools/types.d.ts +47 -0
- package/dist/framework-mcp/src/tools/types.js +2 -0
- package/dist/framework-mcp/src/tools/types.js.map +1 -0
- package/dist/framework-mcp/src/utils/cli.d.ts +5 -0
- package/dist/framework-mcp/src/utils/cli.js +21 -0
- package/dist/framework-mcp/src/utils/cli.js.map +1 -0
- package/dist/framework-mcp/src/utils/security.d.ts +12 -0
- package/dist/framework-mcp/src/utils/security.js +54 -0
- package/dist/framework-mcp/src/utils/security.js.map +1 -0
- package/dist/src/cli/adapters.d.ts +32 -0
- package/dist/src/cli/adapters.js +264 -0
- package/dist/src/cli/adapters.js.map +1 -0
- package/dist/src/cli/commands/app.d.ts +4 -0
- package/dist/src/cli/commands/app.js +32 -0
- package/dist/src/cli/commands/app.js.map +1 -0
- package/dist/src/cli/commands/check.d.ts +6 -0
- package/dist/src/cli/commands/check.js +110 -0
- package/dist/src/cli/commands/check.js.map +1 -0
- package/dist/src/cli/commands/compliance.d.ts +1 -0
- package/dist/src/cli/commands/compliance.js +51 -0
- package/dist/src/cli/commands/compliance.js.map +1 -0
- package/dist/src/cli/commands/contract.d.ts +8 -0
- package/dist/src/cli/commands/contract.js +73 -0
- package/dist/src/cli/commands/contract.js.map +1 -0
- package/dist/src/cli/commands/explorer.d.ts +2 -0
- package/dist/src/cli/commands/explorer.js +43 -0
- package/dist/src/cli/commands/explorer.js.map +1 -0
- package/dist/src/cli/commands/git.d.ts +2 -0
- package/dist/src/cli/commands/git.js +41 -0
- package/dist/src/cli/commands/git.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts +1 -0
- package/dist/src/cli/commands/init.js +338 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/commands/knowledge.d.ts +2 -0
- package/dist/src/cli/commands/knowledge.js +43 -0
- package/dist/src/cli/commands/knowledge.js.map +1 -0
- package/dist/src/cli/commands/lint.d.ts +4 -0
- package/dist/src/cli/commands/lint.js +24 -0
- package/dist/src/cli/commands/lint.js.map +1 -0
- package/dist/src/cli/commands/log.d.ts +9 -0
- package/dist/src/cli/commands/log.js +33 -0
- package/dist/src/cli/commands/log.js.map +1 -0
- package/dist/src/cli/commands/memory.d.ts +1 -0
- package/dist/src/cli/commands/memory.js +72 -0
- package/dist/src/cli/commands/memory.js.map +1 -0
- package/dist/src/cli/commands/orchestrate.d.ts +1 -0
- package/dist/src/cli/commands/orchestrate.js +111 -0
- package/dist/src/cli/commands/orchestrate.js.map +1 -0
- package/dist/src/cli/commands/script.d.ts +1 -0
- package/dist/src/cli/commands/script.js +20 -0
- package/dist/src/cli/commands/script.js.map +1 -0
- package/dist/src/cli/commands/security.d.ts +1 -0
- package/dist/src/cli/commands/security.js +37 -0
- package/dist/src/cli/commands/security.js.map +1 -0
- package/dist/src/cli/commands/status.d.ts +4 -0
- package/dist/src/cli/commands/status.js +56 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/trace.d.ts +4 -0
- package/dist/src/cli/commands/trace.js +42 -0
- package/dist/src/cli/commands/trace.js.map +1 -0
- package/dist/src/cli/index.d.ts +2 -0
- package/dist/src/cli/index.js +117 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/utils/app.d.ts +33 -0
- package/dist/src/cli/utils/app.js +710 -0
- package/dist/src/cli/utils/app.js.map +1 -0
- package/dist/src/cli/utils/claude.d.ts +8 -0
- package/dist/src/cli/utils/claude.js +56 -0
- package/dist/src/cli/utils/claude.js.map +1 -0
- package/dist/src/cli/utils/fs.d.ts +11 -0
- package/dist/src/cli/utils/fs.js +144 -0
- package/dist/src/cli/utils/fs.js.map +1 -0
- package/dist/src/cli/utils/memory.d.ts +14 -0
- package/dist/src/cli/utils/memory.js +173 -0
- package/dist/src/cli/utils/memory.js.map +1 -0
- package/dist/src/cli/utils/pkg.d.ts +24 -0
- package/dist/src/cli/utils/pkg.js +254 -0
- package/dist/src/cli/utils/pkg.js.map +1 -0
- package/dist/src/cli/utils/string.d.ts +6 -0
- package/dist/src/cli/utils/string.js +44 -0
- package/dist/src/cli/utils/string.js.map +1 -0
- package/dist/src/cli/utils/time.d.ts +2 -0
- package/dist/src/cli/utils/time.js +28 -0
- package/dist/src/cli/utils/time.js.map +1 -0
- package/dist/tests/adapter.test.d.ts +1 -0
- package/dist/tests/adapter.test.js +80 -0
- package/dist/tests/adapter.test.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/index.d.ts +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/index.js +71 -0
- package/dist/tests/framework-init-test/framework-mcp/src/index.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.js +111 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.js +19 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.js +8 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.js +32 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.js +10 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.js +6 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.js +6 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.js +6 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.js +9 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/index.d.ts +5 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/index.js +26 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/index.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.js +23 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.d.ts +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.js +24 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/types.d.ts +47 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/types.js +2 -0
- package/dist/tests/framework-init-test/framework-mcp/src/tools/types.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.d.ts +5 -0
- package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.js +21 -0
- package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/src/utils/security.d.ts +12 -0
- package/dist/tests/framework-init-test/framework-mcp/src/utils/security.js +54 -0
- package/dist/tests/framework-init-test/framework-mcp/src/utils/security.js.map +1 -0
- package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.d.ts +1 -0
- package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.js +69 -0
- package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.js.map +1 -0
- package/dist/tests/framework-init-test/panda.config.d.ts +4 -0
- package/dist/tests/framework-init-test/panda.config.js +95 -0
- package/dist/tests/framework-init-test/panda.config.js.map +1 -0
- package/dist/tests/framework-init-test/vitest.config.d.ts +2 -0
- package/dist/tests/framework-init-test/vitest.config.js +19 -0
- package/dist/tests/framework-init-test/vitest.config.js.map +1 -0
- package/dist/tests/gemini.test.d.ts +1 -0
- package/dist/tests/gemini.test.js +38 -0
- package/dist/tests/gemini.test.js.map +1 -0
- package/dist/tests/initial.test.d.ts +1 -0
- package/dist/tests/initial.test.js +7 -0
- package/dist/tests/initial.test.js.map +1 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +19 -0
- package/dist/vitest.config.js.map +1 -0
- package/eslint.config.js +1 -1
- package/framework-mcp/dist/index.js +2 -2
- package/framework-mcp/dist/src/index.js +70 -0
- package/framework-mcp/dist/src/tools/definitions.js +110 -0
- package/framework-mcp/dist/src/tools/file_system/patch_file.js +18 -0
- package/framework-mcp/dist/src/tools/file_system/read_file.js +7 -0
- package/framework-mcp/dist/src/tools/file_system/replace_text.js +31 -0
- package/framework-mcp/dist/src/tools/file_system/write_file.js +9 -0
- package/framework-mcp/dist/src/tools/framework/get_status.js +5 -0
- package/framework-mcp/dist/src/tools/framework/orchestrate.js +5 -0
- package/framework-mcp/dist/src/tools/framework/update_contract_hash.js +5 -0
- package/framework-mcp/dist/src/tools/framework/update_memory.js +8 -0
- package/framework-mcp/dist/src/tools/index.js +25 -0
- package/framework-mcp/dist/src/tools/messaging/log_action.js +22 -0
- package/framework-mcp/dist/src/tools/messaging/send_message.js +46 -0
- package/framework-mcp/dist/src/tools/types.js +1 -0
- package/framework-mcp/dist/src/utils/cli.js +20 -0
- package/framework-mcp/dist/src/utils/security.js +53 -0
- package/framework-mcp/dist/tests/tools/file_system/replace_text.test.js +68 -0
- package/framework-mcp/dist/tools/definitions.js +1 -0
- package/framework-mcp/dist/tools/file_system/replace_text.js +18 -1
- package/framework-mcp/dist/tools/framework/get_status.js +2 -2
- package/framework-mcp/dist/tools/framework/orchestrate.js +2 -2
- package/framework-mcp/dist/tools/framework/update_contract_hash.js +2 -2
- package/framework-mcp/dist/tools/framework/update_memory.js +1 -1
- package/framework-mcp/dist/tools/messaging/send_message.js +4 -2
- package/framework-mcp/dist/utils/cli.js +2 -2
- package/framework-mcp/dist/utils/security.js +23 -5
- package/framework-mcp/package.json +3 -3
- package/framework-mcp/src/index.ts +2 -2
- package/framework-mcp/src/tools/definitions.ts +1 -0
- package/framework-mcp/src/tools/file_system/replace_text.ts +21 -1
- package/framework-mcp/src/tools/framework/get_status.ts +3 -3
- package/framework-mcp/src/tools/framework/orchestrate.ts +3 -3
- package/framework-mcp/src/tools/framework/update_contract_hash.ts +3 -3
- package/framework-mcp/src/tools/framework/update_memory.ts +1 -1
- package/framework-mcp/src/tools/messaging/send_message.ts +37 -13
- package/framework-mcp/src/tools/types.ts +3 -0
- package/framework-mcp/src/utils/cli.ts +2 -2
- package/framework-mcp/src/utils/security.ts +23 -5
- package/framework-mcp/tests/tools/file_system/replace_text.test.js +68 -0
- package/framework-mcp/tests/tools/file_system/replace_text.test.ts +77 -0
- package/framework-mcp/tsconfig.json +1 -2
- package/mcp.json +4 -4
- package/package.json +4 -3
- package/src/cli/adapters.ts +16 -9
- package/src/cli/commands/contract.ts +2 -2
- package/src/cli/commands/init.ts +211 -432
- package/src/cli/commands/memory.ts +5 -0
- package/src/cli/commands/orchestrate.ts +53 -0
- package/src/cli/index.ts +99 -19
- package/src/cli/utils/app.ts +19 -16
- package/src/cli/utils/claude.ts +2 -1
- package/src/cli/utils/fs.ts +2 -1
- package/src/cli/utils/memory.ts +2 -2
- package/src/cli/utils/pkg.ts +32 -0
- package/.enderun/agents/analyst.md +0 -32
- package/.enderun/agents/backend.md +0 -49
- package/.enderun/agents/database.md +0 -41
- package/.enderun/agents/devops.md +0 -41
- package/.enderun/agents/explorer.md +0 -40
- package/.enderun/agents/frontend.md +0 -48
- package/.enderun/agents/git.md +0 -41
- package/.enderun/agents/manager.md +0 -43
- package/.enderun/agents/mobile.md +0 -42
- package/.enderun/agents/native.md +0 -41
- package/.enderun/agents/quality.md +0 -40
- package/.enderun/agents/security.md +0 -32
|
@@ -5,6 +5,10 @@ import { getMemoryPath, acquireMemoryLock, releaseMemoryLock } from "../utils/me
|
|
|
5
5
|
|
|
6
6
|
export function updateProjectMemoryCommand(section: string, content: string) {
|
|
7
7
|
const memoryPath = getMemoryPath();
|
|
8
|
+
console.log("DEBUG: updateProjectMemoryCommand - memoryPath:", memoryPath);
|
|
9
|
+
console.log("DEBUG: updateProjectMemoryCommand - section:", section);
|
|
10
|
+
console.log("DEBUG: updateProjectMemoryCommand - content (first 100 chars):", content.substring(0, 100));
|
|
11
|
+
|
|
8
12
|
if (!fs.existsSync(memoryPath)) {
|
|
9
13
|
console.error("❌ Error: PROJECT_MEMORY.md not found.");
|
|
10
14
|
return;
|
|
@@ -18,6 +22,7 @@ export function updateProjectMemoryCommand(section: string, content: string) {
|
|
|
18
22
|
|
|
19
23
|
try {
|
|
20
24
|
let memoryContent = fs.readFileSync(memoryPath, "utf8");
|
|
25
|
+
console.log("DEBUG: updateProjectMemoryCommand - original memoryContent (first 100 chars):", memoryContent.substring(0, 100));
|
|
21
26
|
|
|
22
27
|
if (section === "HISTORY") {
|
|
23
28
|
const headers = ["## HISTORY (Persistent Memory)", "## HISTORY"];
|
|
@@ -88,6 +88,59 @@ export async function orchestrateCommand() {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
export function sendMessage(args: {
|
|
92
|
+
from: string;
|
|
93
|
+
to: string;
|
|
94
|
+
category: string;
|
|
95
|
+
content: string;
|
|
96
|
+
traceId: string;
|
|
97
|
+
}) {
|
|
98
|
+
const frameworkDir = getFrameworkDir();
|
|
99
|
+
const messagesDir = path.join(process.cwd(), frameworkDir, "messages");
|
|
100
|
+
const agentName = args.to.replace("@", "");
|
|
101
|
+
const messagePath = path.join(messagesDir, `${agentName}.json`);
|
|
102
|
+
const lockPath = path.join(messagesDir, ".lock");
|
|
103
|
+
|
|
104
|
+
// Hermes Lock Protocol: Retry 3 times with 500ms delay
|
|
105
|
+
let retries = 3;
|
|
106
|
+
while (retries > 0 && fs.existsSync(lockPath)) {
|
|
107
|
+
const stats = fs.statSync(lockPath);
|
|
108
|
+
// Stale lock check (older than 5 seconds)
|
|
109
|
+
if (Date.now() - stats.mtimeMs > 5000) {
|
|
110
|
+
fs.unlinkSync(lockPath);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
retries--;
|
|
114
|
+
if (retries > 0) {
|
|
115
|
+
// Synchronous sleep for CLI simplicity
|
|
116
|
+
const g = global as unknown as { Atomics: { wait: (ia: Int32Array, index: number, value: number, timeout: number) => string }; SharedArrayBuffer: { new (size: number): ArrayBufferLike } };
|
|
117
|
+
if (g.Atomics && g.SharedArrayBuffer) {
|
|
118
|
+
g.Atomics.wait(new Int32Array(new g.SharedArrayBuffer(4)), 0, 0, 500);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
fs.mkdirSync(messagesDir, { recursive: true });
|
|
125
|
+
fs.writeFileSync(lockPath, `Locked by ${args.from} at ${new Date().toISOString()}`);
|
|
126
|
+
|
|
127
|
+
const message = {
|
|
128
|
+
timestamp: new Date().toISOString(),
|
|
129
|
+
from: args.from,
|
|
130
|
+
to: args.to,
|
|
131
|
+
category: args.category,
|
|
132
|
+
traceId: args.traceId,
|
|
133
|
+
content: args.content,
|
|
134
|
+
status: "PENDING"
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
fs.appendFileSync(messagePath, JSON.stringify(message) + "\n");
|
|
138
|
+
return message;
|
|
139
|
+
} finally {
|
|
140
|
+
if (fs.existsSync(lockPath)) fs.unlinkSync(lockPath);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
91
144
|
function transitionAgentState(agent: string, state: string, task: string) {
|
|
92
145
|
const frameworkDir = getFrameworkDir();
|
|
93
146
|
const statusPath = path.join(process.cwd(), frameworkDir, "STATUS.md");
|
package/src/cli/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { traceNewCommand } from "./commands/trace.js";
|
|
|
8
8
|
import { updateProjectMemoryCommand } from "./commands/memory.js";
|
|
9
9
|
import { createAppCommand } from "./commands/app.js";
|
|
10
10
|
import { verifyApiContractCommand, updateApiContractCommand } from "./commands/contract.js";
|
|
11
|
-
import { orchestrateCommand } from "./commands/orchestrate.js";
|
|
11
|
+
import { orchestrateCommand, sendMessage } from "./commands/orchestrate.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Main CLI entry point.
|
|
@@ -17,6 +17,48 @@ async function main() {
|
|
|
17
17
|
const args = process.argv.slice(2);
|
|
18
18
|
const command = args[0];
|
|
19
19
|
|
|
20
|
+
const KNOWN_COMMANDS = [
|
|
21
|
+
"init", "check", "status", "trace:new", "update_project_memory",
|
|
22
|
+
"create-app", "orchestrate", "verify-contract", "update-contract",
|
|
23
|
+
"validate", "validate-army", "check:al", "version", "-v", "--version", "help", "-h", "--help"
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
// Handle @agent delegation syntax
|
|
27
|
+
if (command?.startsWith("@")) {
|
|
28
|
+
const to = command;
|
|
29
|
+
const content = args.slice(1).join(" ");
|
|
30
|
+
if (!content) {
|
|
31
|
+
console.error(`❌ Error: Missing task content for ${to}.`);
|
|
32
|
+
console.log(`Usage: agent-enderun ${to} "Your task description"`);
|
|
33
|
+
process.exit(64);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const { getMemoryPath } = await import("./utils/memory.js");
|
|
37
|
+
const fs = await import("fs");
|
|
38
|
+
const memoryPath = getMemoryPath();
|
|
39
|
+
|
|
40
|
+
let traceId = "T-000";
|
|
41
|
+
if (fs.default.existsSync(memoryPath)) {
|
|
42
|
+
const content = fs.default.readFileSync(memoryPath, "utf8");
|
|
43
|
+
// More robust regex: look for any ULID-like string in the Active Trace ID column or near the label
|
|
44
|
+
const match = content.match(/Active Trace ID\s*\|.*\|\s*\n\|.*\|.*\|.*\|\s*([A-Z0-9]+)\s*\|/i) ||
|
|
45
|
+
content.match(/Active Trace ID[:\s|]+([A-Z0-9]+)/i);
|
|
46
|
+
if (match) traceId = match[1].trim();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
sendMessage({
|
|
50
|
+
from: "@manager",
|
|
51
|
+
to,
|
|
52
|
+
category: "DELEGATION",
|
|
53
|
+
content,
|
|
54
|
+
traceId
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
console.log(`✅ Task delegated to ${to} (Trace: ${traceId})`);
|
|
58
|
+
console.log("👉 Run \"agent-enderun orchestrate\" to process.");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
20
62
|
switch (command) {
|
|
21
63
|
case "init": {
|
|
22
64
|
const dryRun = args.includes("--dry-run");
|
|
@@ -57,6 +99,13 @@ async function main() {
|
|
|
57
99
|
break;
|
|
58
100
|
|
|
59
101
|
case "orchestrate":
|
|
102
|
+
orchestrateCommand();
|
|
103
|
+
break;
|
|
104
|
+
|
|
105
|
+
case "verify-contract":
|
|
106
|
+
verifyApiContractCommand();
|
|
107
|
+
break;
|
|
108
|
+
|
|
60
109
|
case "update-contract":
|
|
61
110
|
updateApiContractCommand();
|
|
62
111
|
break;
|
|
@@ -64,14 +113,12 @@ async function main() {
|
|
|
64
113
|
case "validate":
|
|
65
114
|
case "validate-army":
|
|
66
115
|
case "check:al": {
|
|
67
|
-
// Dedicated AL (Agent Lifecycle) army validation - can be run independently after init
|
|
68
|
-
// Always resolve via getValidatorPath() so 'agent-enderun validate' works after npm install (cross-adapter too).
|
|
69
116
|
const { execSync } = await import("child_process");
|
|
70
117
|
try {
|
|
71
118
|
const validatorPath = getValidatorPath();
|
|
72
119
|
execSync(`node "${validatorPath}"`, { stdio: "inherit" });
|
|
73
120
|
} catch {
|
|
74
|
-
//
|
|
121
|
+
// handled by validator
|
|
75
122
|
}
|
|
76
123
|
break;
|
|
77
124
|
}
|
|
@@ -85,17 +132,56 @@ async function main() {
|
|
|
85
132
|
case "help":
|
|
86
133
|
case "-h":
|
|
87
134
|
case "--help":
|
|
135
|
+
showHelp();
|
|
136
|
+
break;
|
|
137
|
+
|
|
88
138
|
default:
|
|
89
|
-
|
|
139
|
+
if (command && !KNOWN_COMMANDS.includes(command)) {
|
|
140
|
+
// Natural language request fallback to @manager
|
|
141
|
+
const content = args.join(" ");
|
|
142
|
+
const { getMemoryPath } = await import("./utils/memory.js");
|
|
143
|
+
const fs = await import("fs");
|
|
144
|
+
const memoryPath = getMemoryPath();
|
|
145
|
+
|
|
146
|
+
let traceId = "T-000";
|
|
147
|
+
if (fs.default.existsSync(memoryPath)) {
|
|
148
|
+
const content = fs.default.readFileSync(memoryPath, "utf8");
|
|
149
|
+
// More robust regex: look for any ULID-like string in the Active Trace ID column or near the label
|
|
150
|
+
const match = content.match(/Active Trace ID\s*\|.*\|\s*\n\|.*\|.*\|.*\|\s*([A-Z0-9]+)\s*\|/i) ||
|
|
151
|
+
content.match(/Active Trace ID[:\s|]+([A-Z0-9]+)/i);
|
|
152
|
+
if (match) traceId = match[1].trim();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
sendMessage({
|
|
156
|
+
from: "@user",
|
|
157
|
+
to: "@manager",
|
|
158
|
+
category: "ACTION",
|
|
159
|
+
content,
|
|
160
|
+
traceId
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
console.log(`📡 Request sent to @manager: "${content}" (Trace: ${traceId})`);
|
|
164
|
+
console.log("👉 Run 'agent-enderun orchestrate' to process.");
|
|
165
|
+
} else {
|
|
166
|
+
showHelp();
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function showHelp() {
|
|
173
|
+
console.log(`
|
|
90
174
|
🤖 Agent Enderun CLI — Enterprise AI Orchestration
|
|
91
175
|
|
|
92
176
|
Usage:
|
|
93
177
|
agent-enderun <command> [options]
|
|
178
|
+
agent-enderun @<agent> "task description"
|
|
179
|
+
agent-enderun "natural language request"
|
|
94
180
|
|
|
95
181
|
Commands:
|
|
182
|
+
@<agent> <task> Delegate a task to a specialist agent (e.g. @backend, @frontend)
|
|
96
183
|
init [adapter] Initialize Agent Enderun framework (gemini, claude, grok, etc.)
|
|
97
|
-
check Perform an enterprise-grade system health check
|
|
98
|
-
validate Run dedicated Agent Lifecycle (AL) army validation (validate-agent-army)
|
|
184
|
+
check Perform an enterprise-grade system health check
|
|
99
185
|
status Show active phase, trace ID, and agent statuses
|
|
100
186
|
trace:new <desc> Start a new task chain with a unique Trace ID
|
|
101
187
|
create-app <idea> Generate a new full-stack app from natural language
|
|
@@ -104,20 +190,14 @@ Commands:
|
|
|
104
190
|
update-contract Generate and synchronize a new contract hash
|
|
105
191
|
version Show version information
|
|
106
192
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
- grok → .enderun/ (SSOT) + grok.md
|
|
111
|
-
- antigravity → .enderun/ (SSOT) + agent.md
|
|
193
|
+
Natural Language:
|
|
194
|
+
If you provide a sentence that is not a known command, it will be automatically
|
|
195
|
+
sent to the @manager for orchestration.
|
|
112
196
|
|
|
113
197
|
Example:
|
|
114
|
-
agent-enderun
|
|
115
|
-
agent-enderun
|
|
116
|
-
|
|
117
|
-
agent-enderun trace:new "Auth module design" backend P1
|
|
118
|
-
`);
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
198
|
+
agent-enderun "Projemi denetle"
|
|
199
|
+
agent-enderun @backend "Login sayfasını oluştur"
|
|
200
|
+
`);
|
|
121
201
|
}
|
|
122
202
|
|
|
123
203
|
main().catch(console.error);
|
package/src/cli/utils/app.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ensureDir, writeTextFile, writeJsonFile } from "../utils/fs.js";
|
|
|
5
5
|
import { updateProjectMemoryCommand } from "../commands/memory.js";
|
|
6
6
|
import { slugifyName, titleCase } from "../utils/string.js";
|
|
7
7
|
import { getConfiguredPaths, getMemoryPath } from "./memory.js";
|
|
8
|
+
import { getDependencyVersions } from "./pkg.js";
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
const targetDir = process.cwd(); // Assuming targetDir is process.cwd() in the CLI context
|
|
@@ -293,6 +294,7 @@ interface AppSpec {
|
|
|
293
294
|
export function createBackendFiles(spec: AppSpec) {
|
|
294
295
|
const pathsMap = getConfiguredPaths();
|
|
295
296
|
const backendDir = pathsMap.backend;
|
|
297
|
+
const { fastify, "@fastify/cors": fastifyCors, zod, "@types/node": typesNode, tsx, typescript, "vitest-backend": vitest } = getDependencyVersions();
|
|
296
298
|
|
|
297
299
|
createBaseTypeFiles(path.join(targetDir, backendDir, "src"));
|
|
298
300
|
writeJsonFile(path.join(targetDir, backendDir, "contract.version.json"), {
|
|
@@ -311,15 +313,15 @@ export function createBackendFiles(spec: AppSpec) {
|
|
|
311
313
|
test: "vitest run",
|
|
312
314
|
},
|
|
313
315
|
dependencies: {
|
|
314
|
-
"@fastify/cors":
|
|
315
|
-
fastify:
|
|
316
|
-
zod:
|
|
316
|
+
"@fastify/cors": fastifyCors,
|
|
317
|
+
fastify: fastify,
|
|
318
|
+
zod: zod,
|
|
317
319
|
},
|
|
318
320
|
devDependencies: {
|
|
319
|
-
"@types/node":
|
|
320
|
-
tsx:
|
|
321
|
-
typescript:
|
|
322
|
-
vitest:
|
|
321
|
+
"@types/node": typesNode,
|
|
322
|
+
tsx: tsx,
|
|
323
|
+
typescript: typescript,
|
|
324
|
+
vitest: vitest,
|
|
323
325
|
},
|
|
324
326
|
});
|
|
325
327
|
|
|
@@ -431,6 +433,7 @@ export function createBackendFiles(spec: AppSpec) {
|
|
|
431
433
|
export function createWebFiles(spec: AppSpec) {
|
|
432
434
|
const pathsMap = getConfiguredPaths();
|
|
433
435
|
const frontendDir = pathsMap.frontend;
|
|
436
|
+
const { "@vitejs/plugin-react": vitePluginReact, vite, react, "react-dom": reactDom, "lucide-react": lucideReact, "@types/react": typesReact, "@types/react-dom": typesReactDom, typescript, "vitest-frontend": vitest } = getDependencyVersions();
|
|
434
437
|
|
|
435
438
|
createBaseTypeFiles(path.join(targetDir, frontendDir, "src"));
|
|
436
439
|
writeJsonFile(path.join(targetDir, frontendDir, "package.json"), {
|
|
@@ -445,17 +448,17 @@ export function createWebFiles(spec: AppSpec) {
|
|
|
445
448
|
test: "vitest run",
|
|
446
449
|
},
|
|
447
450
|
dependencies: {
|
|
448
|
-
"@vitejs/plugin-react":
|
|
449
|
-
vite:
|
|
450
|
-
react:
|
|
451
|
-
"react-dom":
|
|
452
|
-
"lucide-react":
|
|
451
|
+
"@vitejs/plugin-react": vitePluginReact,
|
|
452
|
+
vite: vite,
|
|
453
|
+
react: react,
|
|
454
|
+
"react-dom": reactDom,
|
|
455
|
+
"lucide-react": lucideReact,
|
|
453
456
|
},
|
|
454
457
|
devDependencies: {
|
|
455
|
-
"@types/react":
|
|
456
|
-
"@types/react-dom":
|
|
457
|
-
typescript:
|
|
458
|
-
vitest:
|
|
458
|
+
"@types/react": typesReact,
|
|
459
|
+
"@types/react-dom": typesReactDom,
|
|
460
|
+
typescript: typescript,
|
|
461
|
+
vitest: vitest,
|
|
459
462
|
},
|
|
460
463
|
});
|
|
461
464
|
|
package/src/cli/utils/claude.ts
CHANGED
|
@@ -55,7 +55,8 @@ export function addMcpServerToClaude(configPath: string, serverName: string, ser
|
|
|
55
55
|
|
|
56
56
|
fs.writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`);
|
|
57
57
|
return true;
|
|
58
|
-
} catch {
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.error(`⚠️ Failed to add MCP server to Claude config at ${configPath}:`, e);
|
|
59
60
|
return false;
|
|
60
61
|
}
|
|
61
62
|
}
|
package/src/cli/utils/fs.ts
CHANGED
|
@@ -131,13 +131,14 @@ export function copyDir(
|
|
|
131
131
|
try {
|
|
132
132
|
const json = JSON.parse(content);
|
|
133
133
|
content = JSON.stringify(sanitizeJson(json, targetScope), null, 2);
|
|
134
|
-
content = remapFrameworkContent(content, frameworkDir, adapterId); // Remap again after JSON.stringify for any placeholders
|
|
135
134
|
} catch {
|
|
136
135
|
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
137
136
|
}
|
|
138
137
|
} else {
|
|
139
138
|
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
140
139
|
}
|
|
140
|
+
content = remapFrameworkContent(content, frameworkDir, adapterId); // Apply remap once to the final content
|
|
141
|
+
|
|
141
142
|
|
|
142
143
|
if (dryRun) {
|
|
143
144
|
console.warn(`[DRY RUN] Would process and write: ${destPath}`);
|
package/src/cli/utils/memory.ts
CHANGED
|
@@ -20,7 +20,7 @@ export function getFrameworkDir(): string {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
} catch {
|
|
23
|
-
// ignore
|
|
23
|
+
// ignore: non-critical parsing errors
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// 2. Fall back to dynamic candidate scanning
|
|
@@ -74,7 +74,7 @@ export function getConfiguredPaths(): { backend: string; frontend: string; docs:
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
} catch {
|
|
77
|
-
// ignore
|
|
77
|
+
// ignore: non-critical parsing errors
|
|
78
78
|
}
|
|
79
79
|
return { backend, frontend, docs, tests };
|
|
80
80
|
}
|
package/src/cli/utils/pkg.ts
CHANGED
|
@@ -62,6 +62,38 @@ export function getValidatorPath(): string {
|
|
|
62
62
|
return path.join(getPackageRoot(), "bin", "validate-agent-army.js");
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
export function getDependencyVersions() {
|
|
66
|
+
const root = getPackageRoot();
|
|
67
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
|
68
|
+
const devDependencies = pkg.devDependencies || {};
|
|
69
|
+
const dependencies = pkg.dependencies || {};
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
// Backend dependencies
|
|
73
|
+
"fastify": dependencies["fastify"] || "^5.0.0",
|
|
74
|
+
"@fastify/cors": dependencies["@fastify/cors"] || "^11.0.0",
|
|
75
|
+
"zod": dependencies["zod"] || "^3.24.2",
|
|
76
|
+
|
|
77
|
+
// Backend devDependencies
|
|
78
|
+
"@types/node": devDependencies["@types/node"] || "^22.13.4",
|
|
79
|
+
"tsx": devDependencies["tsx"] || "^4.19.4",
|
|
80
|
+
"typescript": devDependencies["typescript"] || "^5.9.3",
|
|
81
|
+
"vitest-backend": devDependencies["vitest"] || "^3.0.5", // Renamed to avoid conflict
|
|
82
|
+
|
|
83
|
+
// Frontend dependencies
|
|
84
|
+
"@vitejs/plugin-react": dependencies["@vitejs/plugin-react"] || "^5.0.0",
|
|
85
|
+
"vite": dependencies["vite"] || "^7.0.0",
|
|
86
|
+
"react": dependencies["react"] || "^19.0.0",
|
|
87
|
+
"react-dom": dependencies["react-dom"] || "^19.0.0",
|
|
88
|
+
"lucide-react": dependencies["lucide-react"] || "^0.468.0",
|
|
89
|
+
|
|
90
|
+
// Frontend devDependencies
|
|
91
|
+
"@types/react": devDependencies["@types/react"] || "^19.0.0",
|
|
92
|
+
"@types/react-dom": devDependencies["@types/react-dom"] || "^19.0.0",
|
|
93
|
+
"vitest-frontend": devDependencies["vitest"] || "^3.0.5", // Renamed to avoid conflict
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
65
97
|
interface PackageJson {
|
|
66
98
|
name?: string;
|
|
67
99
|
version?: string;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: analyst
|
|
3
|
-
description: "Contract Verification & Business Analyst Agent for Agent Enderun"
|
|
4
|
-
role: "Contract Verification & Business Analyst"
|
|
5
|
-
capability: 9
|
|
6
|
-
stateMachine:
|
|
7
|
-
schemaRef: "../schema/agent-lifecycle-schema.json"
|
|
8
|
-
tags: ["specialist", "quality", "governance"]
|
|
9
|
-
permittedTools: ["read_file", "search_codebase"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# @analyst — Contract Verification & Business Analyst (STRICT_RULES)
|
|
13
|
-
|
|
14
|
-
- **Identity:** Contract Integrity & Governance Auditor.
|
|
15
|
-
- **Role:** Contract Verification & Business Analyst
|
|
16
|
-
- **Capability Score:** 9
|
|
17
|
-
- **Permitted Directories:** `["*", ".enderun", "docs"]`
|
|
18
|
-
- **Hermes Channels:** `["@analyst->*", "@analyst->@manager"]`
|
|
19
|
-
- **Goal:** Independently verify compliance with contracts and specifications between frontend, backend, and the constitution.
|
|
20
|
-
|
|
21
|
-
## 🛑 NON-NEGOTIABLE CORE RULES
|
|
22
|
-
- **Independent Stance:** Act as an objective verification gate.
|
|
23
|
-
- **Contract-First Law:** Ensure `contract.version.json` perfectly matches types.
|
|
24
|
-
- **Escalation Priority:** Report all contract drift to `@manager` immediately.
|
|
25
|
-
- **Surgical Edits:** Use `replace_text` for all document updates.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
**Agent Completion Report**
|
|
29
|
-
- Contract drift audited? [ ] No / [ ] Yes
|
|
30
|
-
- Governance rules validated? [ ] No / [ ] Yes
|
|
31
|
-
- PROJECT_MEMORY updated? [ ] No / [ ] Yes
|
|
32
|
-
---
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: backend
|
|
3
|
-
description: "Domain Logic & Databases Specialist Agent for Agent Enderun"
|
|
4
|
-
role: "Domain Logic & Databases Specialist"
|
|
5
|
-
capability: 9
|
|
6
|
-
stateMachine:
|
|
7
|
-
schemaRef: "../schema/agent-lifecycle-schema.json"
|
|
8
|
-
tags: ["core", "specialist"]
|
|
9
|
-
permittedTools: ["read_file", "replace_text", "write_file", "search_codebase", "run_tests"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# @backend — Domain Logic & Databases (STRICT_RULES)
|
|
13
|
-
|
|
14
|
-
- **Identity:** Domain Logic & Databases Specialist.
|
|
15
|
-
- **Role:** Domain Logic & Databases Specialist
|
|
16
|
-
- **Capability Score:** 9
|
|
17
|
-
- **Permitted Directories:** `["apps/backend", ".enderun", "docs"]`
|
|
18
|
-
- **Hermes Channels:** `["@backend->*", "@backend->@manager"]`
|
|
19
|
-
- **Goal:** Build secure, high-performance, and consistent server architecture.
|
|
20
|
-
|
|
21
|
-
## 🛑 NON-NEGOTIABLE CORE RULES
|
|
22
|
-
- **No UI:** Never implement UI or frontend logic.
|
|
23
|
-
- **Contract-First:** Define shared contracts/branded types BEFORE any consumer code.
|
|
24
|
-
- **Branded Types Law:** ALL IDs must use branded types (e.g., `UserID`). Plain strings are forbidden.
|
|
25
|
-
- **Zero Mock Policy:** Use real endpoints/contracts only.
|
|
26
|
-
- **Surgical Edits:** Use `replace_text` for all code changes.
|
|
27
|
-
- **Audit Logging:** Every state-mutating operation (POST, PUT, PATCH, DELETE) MUST trigger `AuditService.log()`.
|
|
28
|
-
- **Async Safety:** Error handling (try/catch) is mandatory for every async block.
|
|
29
|
-
- **Logging Standard:** `console.log` is FORBIDDEN. Use centralized Logger service.
|
|
30
|
-
|
|
31
|
-
## 🔌 SESSION PROTOCOL
|
|
32
|
-
1. **Restore:** Read `PROJECT_MEMORY.md`.
|
|
33
|
-
2. **Context:** Search codebase for existing patterns before editing.
|
|
34
|
-
3. **Reference:** If implementing architecture, READ `.enderun/knowledge/backend_reference_guide.md` once.
|
|
35
|
-
4. **Log:** Update `PROJECT_MEMORY.md` and log action at the end of every turn.
|
|
36
|
-
|
|
37
|
-
## 🏗️ ARCHITECTURE (Summary)
|
|
38
|
-
- **Layered:** Route -> Controller -> Service -> Repository -> DB (Kysely only).
|
|
39
|
-
- **Errors:** Use `DomainError` hierarchy only.
|
|
40
|
-
- **Contract:** Sync `apps/backend/src/types` and update `contract.version.json`.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
**Agent Completion Report**
|
|
44
|
-
- Reference Guide read? [ ] No / [ ] Yes
|
|
45
|
-
- App types changed? [ ] No / [ ] Yes
|
|
46
|
-
- API contract written? [ ] No / [ ] Yes → .enderun/docs/api/
|
|
47
|
-
- PROJECT_MEMORY updated? [ ] No / [ ] Yes
|
|
48
|
-
- Log written? [ ] No / [ ] Yes
|
|
49
|
-
---
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: database
|
|
3
|
-
description: "Database Architecture, Performance Tuning & Seeding Authority"
|
|
4
|
-
role: "Database Migrations & Tuning Specialist"
|
|
5
|
-
capability: 9
|
|
6
|
-
stateMachine:
|
|
7
|
-
schemaRef: "../schema/agent-lifecycle-schema.json"
|
|
8
|
-
tags: ["infrastructure", "specialist"]
|
|
9
|
-
permittedTools: ["read_file", "write_file", "run_migration"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# @database — Database Architecture (STRICT_RULES)
|
|
13
|
-
|
|
14
|
-
- **Identity:** Database Architecture & Multi-Engine Authority.
|
|
15
|
-
- **Role:** Database Migrations & Tuning Specialist
|
|
16
|
-
- **Capability Score:** 9
|
|
17
|
-
- **Permitted Directories:** `["apps/backend/src/database", ".enderun", "docs"]`
|
|
18
|
-
- **Hermes Channels:** `["@database->*", "@database->@manager"]`
|
|
19
|
-
- **Goal:** Build secure, optimized, and scalable data layers.
|
|
20
|
-
|
|
21
|
-
## 🛑 NON-NEGOTIABLE CORE RULES
|
|
22
|
-
- **Self-Contained DB:** Every backend application MUST manage its own schema/migrations/seeds in its own `src/database/` directory.
|
|
23
|
-
- **Contract-First:** All schemas MUST be derived from branded types.
|
|
24
|
-
- **Kysely Standard:** Use Kysely for application queries. Raw SQL is forbidden.
|
|
25
|
-
- **Zero Mock Policy:** Realistic, contract-aware seed data only.
|
|
26
|
-
- **Audit Logging:** Log every configuration/tuning action to `.enderun/logs/database.json`.
|
|
27
|
-
- **Surgical Edits:** Use `replace_text` for all schema/migration changes.
|
|
28
|
-
|
|
29
|
-
## 🔌 SESSION PROTOCOL
|
|
30
|
-
1. **Restore:** Read `PROJECT_MEMORY.md`.
|
|
31
|
-
2. **Context:** Read existing migration patterns before creating new ones.
|
|
32
|
-
3. **Reference:** If designing schemas or tuning, READ `.enderun/knowledge/database_reference_guide.md` once.
|
|
33
|
-
4. **Log:** Update `PROJECT_MEMORY.md` and log action at the end of every turn.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
**Agent Completion Report**
|
|
37
|
-
- Reference Guide read? [ ] No / [ ] Yes
|
|
38
|
-
- Contract-First applied? [ ] No / [ ] Yes
|
|
39
|
-
- PROJECT_MEMORY updated? [ ] No / [ ] Yes
|
|
40
|
-
- Log written? [ ] No / [ ] Yes
|
|
41
|
-
---
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devops
|
|
3
|
-
description: "Infrastructure & Deployment Orchestration Specialist Agent for Agent Enderun"
|
|
4
|
-
role: "Infrastructure & CI/CD Specialist"
|
|
5
|
-
capability: 9
|
|
6
|
-
stateMachine:
|
|
7
|
-
schemaRef: "../schema/agent-lifecycle-schema.json"
|
|
8
|
-
tags: ["infrastructure", "specialist"]
|
|
9
|
-
permittedTools: ["read_file", "write_file", "run_pipeline", "deploy_staging"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# @devops — Infrastructure & Deployment (STRICT_RULES)
|
|
13
|
-
|
|
14
|
-
- **Identity:** Infrastructure & Deployment Orchestration Specialist.
|
|
15
|
-
- **Role:** Infrastructure & CI/CD Specialist
|
|
16
|
-
- **Capability Score:** 8
|
|
17
|
-
- **Permitted Directories:** `["apps", ".enderun", "docs"]`
|
|
18
|
-
- **Hermes Channels:** `["@devops->*", "@devops->@manager"]`
|
|
19
|
-
- **Goal:** Ensure reliable execution in every environment with strict quality gates.
|
|
20
|
-
|
|
21
|
-
## 🛑 NON-NEGOTIABLE CORE RULES
|
|
22
|
-
- **Gate Approvals:** NEVER deploy to production without @quality gate approval.
|
|
23
|
-
- **No Docker Policy:** Prefer native Node.js unless explicitly overridden by @manager.
|
|
24
|
-
- **Environment Parity:** Identical configs across dev/staging/prod (except secrets).
|
|
25
|
-
- **Secrets Security:** NEVER hardcode secrets. Use environment variables.
|
|
26
|
-
- **Rollback First:** Deployment is BLOCKED if no documented rollback plan exists.
|
|
27
|
-
- **Health Checks:** Mandatory for every deployed service.
|
|
28
|
-
- **Audit Logging:** Log every deployment to `.enderun/logs/devops.json`.
|
|
29
|
-
|
|
30
|
-
## 🔌 SESSION PROTOCOL
|
|
31
|
-
1. **Restore:** Read `PROJECT_MEMORY.md`.
|
|
32
|
-
2. **Reference:** If designing pipelines or deploying, READ `.enderun/knowledge/devops_reference_guide.md` once.
|
|
33
|
-
3. **Log:** Update `PROJECT_MEMORY.md` and log action at the end of every turn.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
**Agent Completion Report**
|
|
37
|
-
- Reference Guide read? [ ] No / [ ] Yes
|
|
38
|
-
- Gate approvals checked? [ ] No / [ ] Yes
|
|
39
|
-
- Rollback plan documented? [ ] No / [ ] Yes
|
|
40
|
-
- PROJECT_MEMORY updated? [ ] No / [ ] Yes
|
|
41
|
-
---
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explorer
|
|
3
|
-
description: "Codebase Discovery & Architecture Specialist Agent for Agent Enderun"
|
|
4
|
-
role: "Codebase Discovery Specialist"
|
|
5
|
-
capability: 9
|
|
6
|
-
stateMachine:
|
|
7
|
-
schemaRef: "../schema/agent-lifecycle-schema.json"
|
|
8
|
-
tags: ["core", "specialist"]
|
|
9
|
-
permittedTools: ["read_file", "search_codebase"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# @explorer — Research & Discovery (STRICT_RULES)
|
|
13
|
-
|
|
14
|
-
- **Identity:** Codebase Discovery & Architecture Specialist.
|
|
15
|
-
- **Role:** Codebase Discovery Specialist
|
|
16
|
-
- **Capability Score:** 8
|
|
17
|
-
- **Permitted Directories:** `["*", ".enderun", "docs"]`
|
|
18
|
-
- **Hermes Channels:** `["@explorer->*", "@explorer->@manager"]`
|
|
19
|
-
- **Goal:** Map project structure and provide deep context to other agents.
|
|
20
|
-
|
|
21
|
-
## 🛑 NON-NEGOTIABLE CORE RULES
|
|
22
|
-
- **Read-Only:** Never write production code. Only discover, map, and report.
|
|
23
|
-
- **Search-First:** Always use `search_codebase` before reading large files.
|
|
24
|
-
- **Surgical Discovery:** Focus on entry points and core domain logic.
|
|
25
|
-
- **Zero Mock Policy:** Analyze real system state only.
|
|
26
|
-
- **Traceability:** All findings must be linked to a Trace ID.
|
|
27
|
-
|
|
28
|
-
## 🔌 SESSION PROTOCOL
|
|
29
|
-
1. **Restore:** Read `PROJECT_MEMORY.md`. If empty, trigger `bootstrap_legacy_memory`.
|
|
30
|
-
2. **Scan:** Identify core folders (`apps/`, `docs/`) and configs.
|
|
31
|
-
3. **Reference:** If performing deep analysis, READ `.enderun/knowledge/explorer_reference_guide.md` once.
|
|
32
|
-
4. **Log:** Update `PROJECT_MEMORY.md` and log action at the end of every turn.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
**Agent Completion Report**
|
|
36
|
-
- Reference Guide read? [ ] No / [ ] Yes
|
|
37
|
-
- Codebase searched? [ ] No / [ ] Yes
|
|
38
|
-
- Dependencies analyzed? [ ] No / [ ] Yes
|
|
39
|
-
- PROJECT_MEMORY updated? [ ] No / [ ] Yes
|
|
40
|
-
---
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend
|
|
3
|
-
description: "Fluid Responsive UI Specialist Agent for Agent Enderun"
|
|
4
|
-
role: "Fluid Responsive UI Specialist"
|
|
5
|
-
capability: 9
|
|
6
|
-
stateMachine:
|
|
7
|
-
schemaRef: "../schema/agent-lifecycle-schema.json"
|
|
8
|
-
tags: ["core", "specialist"]
|
|
9
|
-
permittedTools: ["read_file", "write_file", "replace_text"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# @frontend — Fluid Responsive UI (STRICT_RULES)
|
|
13
|
-
|
|
14
|
-
- **Identity:** Fluid Responsive UI Specialist.
|
|
15
|
-
- **Role:** Fluid Responsive UI Specialist
|
|
16
|
-
- **Capability Score:** 9
|
|
17
|
-
- **Permitted Directories:** `["apps/web", ".enderun", "docs"]`
|
|
18
|
-
- **Hermes Channels:** `["@frontend->*", "@frontend->@manager"]`
|
|
19
|
-
- **Goal:** Build original, high-performance, and responsive user interfaces.
|
|
20
|
-
|
|
21
|
-
## 🛑 NON-NEGOTIABLE CORE RULES
|
|
22
|
-
- **Responsive-First:** Mobile-First (320px) is mandatory. Fixed-width is forbidden.
|
|
23
|
-
- **Zero UI Library Policy:** No `shadcn/ui`, `MUI`, etc. Build everything with Panda CSS.
|
|
24
|
-
- **Zero Mock Policy:** Use real endpoints/contracts only.
|
|
25
|
-
- **Contract-First:** Use branded types from `apps/backend/src/types`.
|
|
26
|
-
- **No Native Alerts:** Use integrated Toaster/Modal components.
|
|
27
|
-
- **Surgical Edits:** Use `replace_text` for all code changes.
|
|
28
|
-
- **Consistency:** Follow existing architectural and stylistic patterns.
|
|
29
|
-
|
|
30
|
-
## 🔌 SESSION PROTOCOL
|
|
31
|
-
1. **Restore:** Read `PROJECT_MEMORY.md`.
|
|
32
|
-
2. **Contract:** READ `.enderun/docs/api/` written by @backend before coding.
|
|
33
|
-
3. **Reference:** If building UI, READ `.enderun/knowledge/frontend_reference_guide.md` once.
|
|
34
|
-
4. **Log:** Update `PROJECT_MEMORY.md` and log action at the end of every turn.
|
|
35
|
-
|
|
36
|
-
## 🏗️ ARCHITECTURE (Summary)
|
|
37
|
-
- **Styling:** Panda CSS tokens only.
|
|
38
|
-
- **Logic:** Hook-based API architecture (useListPage, useDetailPage, useFormPage).
|
|
39
|
-
- **State:** Zustand for global state.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
**Agent Completion Report**
|
|
43
|
-
- Reference Guide read? [ ] No / [ ] Yes
|
|
44
|
-
- API contract read? [ ] No / [ ] Yes
|
|
45
|
-
- Zero UI Library Policy applied? [ ] No / [ ] Yes
|
|
46
|
-
- PROJECT_MEMORY updated? [ ] No / [ ] Yes
|
|
47
|
-
- Log written? [ ] No / [ ] Yes
|
|
48
|
-
---
|