agent-enderun 1.0.8 ā 1.0.9
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 +2 -2
- 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 +32 -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/README.md +32 -31
- 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 +23 -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 +5 -2
- 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/index.ts +7 -0
- 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
package/src/cli/commands/init.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
runAdapterPostInit,
|
|
11
11
|
type AdapterConfig,
|
|
12
12
|
} from "../adapters.js";
|
|
13
|
-
import {
|
|
13
|
+
import { mergePackageJson, deepCleanProtocols, sanitizeJson, getPackageVersion, getValidatorPath } from "../utils/pkg.js";
|
|
14
14
|
import { updateGitIgnore, ensureDir, writeJsonFile, copyDir, writeTextFile } from "../utils/fs.js";
|
|
15
15
|
import { initializeMemory } from "../utils/memory.js";
|
|
16
16
|
import { checkCommand } from "./check.js";
|
|
@@ -55,512 +55,291 @@ const FRAMEWORK_SUBDIRS = [
|
|
|
55
55
|
"queue/pipelines",
|
|
56
56
|
];
|
|
57
57
|
|
|
58
|
+
const allAgents = [
|
|
59
|
+
{
|
|
60
|
+
name: "manager",
|
|
61
|
+
displayName: "Orchestration & Governance (Team-Lead)",
|
|
62
|
+
description: "CTO, Lead Architect, and Orchestrator for Agent Enderun.",
|
|
63
|
+
instructions: "You are the manager agent. Orchestrate workspace tasks, manage DAG dependency graphs, handle phase transitions, and enforce architectural standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Single Point of Authority: You are the sole entry point. No specialist acts without your briefing.\n- Traceability: Every action MUST inherit the active Trace ID.\n- Memory Discipline: MUST update PROJECT_MEMORY.md and log actions at the end of EVERY turn."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "backend",
|
|
67
|
+
displayName: "Domain Logic & Databases Specialist",
|
|
68
|
+
description: "Responsible for core business logic, database migrations, security standards, API contracts, and server architecture.",
|
|
69
|
+
instructions: "You are the backend agent. Build secure, high-performance, and consistent server architecture.\n\nš NON-NEGOTIABLE CORE RULES:\n- No UI: Never implement UI or frontend logic.\n- Contract-First: Define shared contracts/branded types BEFORE any consumer code.\n- Branded Types Law: ALL IDs must use branded types (e.g., UserID). Plain strings are forbidden.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Surgical Edits: Use replace_text for all code changes."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "frontend",
|
|
73
|
+
displayName: "Fluid Responsive UI Specialist",
|
|
74
|
+
description: "Builds responsive fluid user interfaces, manages styling tokens with Panda CSS, and implements state machines.",
|
|
75
|
+
instructions: "You are the frontend agent. Build original, high-performance, and responsive user interfaces.\n\nš NON-NEGOTIABLE CORE RULES:\n- Responsive-First: Mobile-First (320px) is mandatory. Fixed-width is forbidden.\n- Zero UI Library Policy: No shadcn/ui, MUI, etc. Build everything with Panda CSS.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Contract-First: Use branded types from apps/backend/src/types.\n- No Native Alerts: Use integrated Toaster/Modal components."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "quality",
|
|
79
|
+
displayName: "Automated Testing & Quality Specialist",
|
|
80
|
+
description: "Verifies test coverage, audits compliance with the constitution, conducts AST scanning, and verifies CI/CD status.",
|
|
81
|
+
instructions: "You are the quality agent. Ensure no code is merged or deployed without meeting standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Final Gate: No code merges or deploys proceed without quality sign-off.\n- Verification-First: Audit lint, typecheck, contract drift, and branded types before sign-off.\n- Never Implement: Audit and assess only. Never write application features.\n- Zero Mock Policy: Integration tests must use real/service-compatible backends.\n- Coverage Gate: Reject approvals if coverage falls below >80% threshold in core."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "database",
|
|
85
|
+
displayName: "Database Migrations & Tuning Specialist",
|
|
86
|
+
description: "Designs SQL schemas, manages migration scripts via Kysely, optimizes queries, indexes, and seeding logic.",
|
|
87
|
+
instructions: "You are the database agent. Build secure, optimized, and scalable data layers.\n\nš NON-NEGOTIABLE CORE RULES:\n- Self-Contained DB: Every backend application MUST manage its own schema/migrations/seeds in its own src/database/ directory.\n- Contract-First: All schemas MUST be derived from branded types.\n- Kysely Standard: Use Kysely for application queries. Raw SQL is forbidden.\n- Zero Mock Policy: Realistic, contract-aware seed data only.\n- Surgical Edits: Use replace_text for all schema/migration changes."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "devops",
|
|
91
|
+
displayName: "Infrastructure & CI/CD Specialist",
|
|
92
|
+
description: "Handles deployment pipelines, environment variables, system containerization, logging & telemetry integrations.",
|
|
93
|
+
instructions: "You are the devops agent. Ensure reliable execution in every environment with strict quality gates.\n\nš NON-NEGOTIABLE CORE RULES:\n- Gate Approvals: NEVER deploy to production without quality gate approval.\n- No Docker Policy: Prefer native Node.js unless explicitly overridden by manager.\n- Environment Parity: Identical configs across dev/staging/prod (except secrets).\n- Secrets Security: NEVER hardcode secrets. Use environment variables.\n- Rollback First: Deployment is BLOCKED if no documented rollback plan exists."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "explorer",
|
|
97
|
+
displayName: "Codebase Discovery Specialist",
|
|
98
|
+
description: "Maps code dependencies, performs project scans, identifies architectural gaps, and supports legacy onboarding.",
|
|
99
|
+
instructions: "You are the explorer agent. Map project structure and provide deep context to other agents.\n\nš NON-NEGOTIABLE CORE RULES:\n- Read-Only: Never write production code. Only discover, map, and report.\n- Search-First: Always use search_codebase before reading large files.\n- Surgical Discovery: Focus on entry points and core domain logic.\n- Zero Mock Policy: Analyze real system state only.\n- Traceability: All findings must be linked to a Trace ID."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "git",
|
|
103
|
+
displayName: "Version Control Specialist",
|
|
104
|
+
description: "Manages commit histories, branches, Trace ID alignment, semantic tagging, and merge conflicts.",
|
|
105
|
+
instructions: "You are the git agent. Ensure a clean, atomic, and traceable repository history.\n\nš NON-NEGOTIABLE CORE RULES:\n- Trace ID Tagging: EVERY commit must include the active Trace ID in the message.\n- Atomic Integrity: Every commit must represent exactly one logical change.\n- Health-First: Never commit code that fails build or basic tests.\n- No Push: Do not run git push without explicit USER approval.\n- No Force: Never use git push --force on public branches."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "mobile",
|
|
109
|
+
displayName: "Mobile App Specialist",
|
|
110
|
+
description: "Develops cross-platform mobile apps using React Native and Expo with clean component states.",
|
|
111
|
+
instructions: "You are the mobile agent. Build high-performance, responsive mobile apps (React Native/Expo).\n\nš NON-NEGOTIABLE CORE RULES:\n- Zero UI Library: Same discipline as web. Build UI from scratch.\n- Contract-First: Use shared types from apps/backend/src/types.\n- Responsive-First: Mobile-First approach is mandatory.\n- Safe Area: Handle iOS/Android safe area insets on every screen.\n- Performance: Target 60 FPS."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "native",
|
|
115
|
+
displayName: "Native OS Integration Specialist",
|
|
116
|
+
description: "Builds lightweight desktop wrappers and system integrations using Tauri or Electron.",
|
|
117
|
+
instructions: "You are the native agent. Build secure, efficient desktop apps (Tauri/Electron).\n\nš NON-NEGOTIABLE CORE RULES:\n- Security-First: No remote code execution. Mandatory sandboxing and strict CSP.\n- Secure Storage: Use Keychain/Credential Manager for sensitive data.\n- IPC Contract: All communication between frontend and native MUST be typed.\n- Contract-First: Define IPC and data contracts before implementation.\n- Surgical Edits: Use replace_text for all code changes."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "security",
|
|
121
|
+
displayName: "Security & Cryptography Specialist",
|
|
122
|
+
description: "Enforces authentication flows, CSP policies, credential rotation, RLS constraints, and cryptographic safety.",
|
|
123
|
+
instructions: "You are the security agent. Ensure all endpoints, database connections, and authentication flows satisfy strict enterprise compliance policies.\n\nš NON-NEGOTIABLE CORE RULES:\n- Sandboxed Security First: Enforce Row Level Security (RLS) on all database tables.\n- Credential Rotation Policy: Credentials, keys, and tokens must never be hardcoded. Use vault/env variables.\n- CSP & CORS Strictness: Never open wildcards (*) for CORS or CSP policies.\n- Surgical Edits: Use replace_text for all security patches."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "analyst",
|
|
127
|
+
displayName: "Contract Verification & Business Analyst",
|
|
128
|
+
description: "Validates business specifications, tests database contract integrity, and audits constitutional compliance.",
|
|
129
|
+
instructions: "You are the analyst agent. Independently verify compliance with contracts and specifications between frontend, backend, and the constitution.\n\nš NON-NEGOTIABLE CORE RULES:\n- Independent Stance: Act as an objective verification gate.\n- Contract-First Law: Ensure contract.version.json perfectly matches types.\n- Escalation Priority: Report all contract drift to manager immediately.\n- Surgical Edits: Use replace_text for all document updates."
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
function scaffoldCoreAgents(agentsBaseDir: string, dryRun: boolean) {
|
|
134
|
+
ensureDir(agentsBaseDir, dryRun);
|
|
135
|
+
const agentSchemaDir = path.join(agentsBaseDir, "schema");
|
|
136
|
+
ensureDir(agentSchemaDir, dryRun);
|
|
137
|
+
|
|
138
|
+
const agentArmySchema = {
|
|
139
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
140
|
+
"title": "Agent Lifecycle (AL) Agent Army Schema",
|
|
141
|
+
"description": "Defines the required fields for an AL-compliant agent definition (e.g. agent.json or agent.md YAML frontmatter).",
|
|
142
|
+
"type": "object",
|
|
143
|
+
"required": ["name", "description", "role", "capability", "stateMachine", "tags"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"name": { "type": "string" },
|
|
146
|
+
"description": { "type": "string" },
|
|
147
|
+
"role": { "type": "string" },
|
|
148
|
+
"capability": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
149
|
+
"stateMachine": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"required": ["schemaRef"],
|
|
152
|
+
"properties": { "schemaRef": { "type": "string" } }
|
|
153
|
+
},
|
|
154
|
+
"tags": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
155
|
+
"permittedTools": { "type": "array", "items": { "type": "string" } },
|
|
156
|
+
"hidden": { "type": "boolean" },
|
|
157
|
+
"displayName": { "type": "string" },
|
|
158
|
+
"customAgentSpec": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"customAgent": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"systemPromptSections": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"properties": { "title": { "type": "string" }, "content": { "type": "string" } },
|
|
169
|
+
"required": ["title", "content"]
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"toolNames": { "type": "array", "items": { "type": "string" } }
|
|
173
|
+
},
|
|
174
|
+
"required": ["systemPromptSections", "toolNames"]
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": ["customAgent"]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
writeJsonFile(path.join(agentsBaseDir, "agent_army_schema.json"), agentArmySchema, dryRun);
|
|
182
|
+
|
|
183
|
+
const agentLifecycleSchema = {
|
|
184
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
185
|
+
"title": "Agent Lifecycle State Machine Schema",
|
|
186
|
+
"type": "object",
|
|
187
|
+
"required": ["initialState", "states"],
|
|
188
|
+
"properties": {
|
|
189
|
+
"initialState": { "type": "string" },
|
|
190
|
+
"states": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"patternProperties": {
|
|
193
|
+
"^[a-zA-Z0-9_]+$": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"on": { "type": "object", "patternProperties": { "^[a-zA-Z0-9_]+$": { "type": "string" } } },
|
|
197
|
+
"actions": { "type": "array", "items": { "type": "string" } }
|
|
198
|
+
},
|
|
199
|
+
"required": ["on"]
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
writeJsonFile(path.join(agentSchemaDir, "agent-lifecycle-schema.json"), agentLifecycleSchema, dryRun);
|
|
206
|
+
|
|
207
|
+
for (const ag of allAgents) {
|
|
208
|
+
const payload = {
|
|
209
|
+
name: ag.name,
|
|
210
|
+
displayName: ag.displayName,
|
|
211
|
+
description: ag.description,
|
|
212
|
+
role: ag.displayName.split(" (")[0],
|
|
213
|
+
capability: 9,
|
|
214
|
+
hidden: false,
|
|
215
|
+
stateMachine: { schemaRef: "../schema/agent-lifecycle-schema.json" },
|
|
216
|
+
tags: ["core"],
|
|
217
|
+
customAgentSpec: {
|
|
218
|
+
customAgent: {
|
|
219
|
+
systemPromptSections: [{ title: "Instructions", content: ag.instructions }],
|
|
220
|
+
toolNames: ["view_file", "replace_file_content", "write_to_file", "run_command", "grep_search", "list_dir"]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
writeJsonFile(path.join(agentsBaseDir, `${ag.name}.json`), payload, dryRun);
|
|
225
|
+
}
|
|
226
|
+
console.warn(`ā
Scaffolding ${allAgents.length} core agents under ${path.relative(targetDir, agentsBaseDir)}/...`);
|
|
227
|
+
}
|
|
228
|
+
|
|
58
229
|
function buildDirsToCreate(adapter: AdapterConfig): string[] {
|
|
59
230
|
const dirs = [
|
|
60
231
|
adapter.frameworkDir,
|
|
61
232
|
...FRAMEWORK_SUBDIRS.map((d) => `${adapter.frameworkDir}/${d}`),
|
|
62
|
-
"apps/web",
|
|
63
|
-
"apps/backend",
|
|
64
|
-
"docs",
|
|
65
|
-
"framework-mcp",
|
|
66
|
-
"tests",
|
|
233
|
+
"apps/web", "apps/backend", "docs", "framework-mcp", "tests",
|
|
67
234
|
];
|
|
68
235
|
if (adapter.nestedDirs) {
|
|
69
|
-
for (const nested of adapter.nestedDirs) {
|
|
70
|
-
dirs.push(`${adapter.frameworkDir}/${nested}`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// Add logic for shimFile directory if it's nested (like .cursor/rules/)
|
|
74
|
-
if (adapter.shimFile.includes("/")) {
|
|
75
|
-
dirs.push(path.dirname(adapter.shimFile));
|
|
236
|
+
for (const nested of adapter.nestedDirs) dirs.push(`${adapter.frameworkDir}/${nested}`);
|
|
76
237
|
}
|
|
238
|
+
if (adapter.shimFile.includes("/")) dirs.push(path.dirname(adapter.shimFile));
|
|
77
239
|
return [...new Set(dirs)];
|
|
78
240
|
}
|
|
79
241
|
|
|
80
|
-
/**
|
|
81
|
-
* Scaffold the framework for a specific IDE adapter (separate runtime folder per IDE).
|
|
82
|
-
*/
|
|
83
242
|
export async function initCommand(adapterInput?: string, dryRun = false) {
|
|
84
243
|
const adapter = resolveAdapter(adapterInput);
|
|
85
244
|
const { frameworkDir, shimFile, templateDir } = adapter;
|
|
86
245
|
const targetFrameworkDir = path.join(targetDir, frameworkDir);
|
|
87
246
|
|
|
88
|
-
if (dryRun)
|
|
89
|
-
console.warn("\nš DRY RUN MODE ACTIVE - No changes will be made to the filesystem.\n");
|
|
90
|
-
}
|
|
91
|
-
|
|
247
|
+
if (dryRun) console.warn("\nš DRY RUN MODE ACTIVE\n");
|
|
92
248
|
console.warn(`š Installing Agent Enderun (Adapter: ${adapter.id} ā ${frameworkDir}/)...`);
|
|
93
249
|
|
|
94
250
|
ensureDir(targetFrameworkDir, dryRun);
|
|
251
|
+
for (const dir of buildDirsToCreate(adapter)) ensureDir(path.join(targetDir, dir), dryRun);
|
|
95
252
|
|
|
96
|
-
|
|
97
|
-
ensureDir(path.join(targetDir, dir), dryRun);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const filesToProcess = [
|
|
101
|
-
...CORE_FILES,
|
|
102
|
-
shimFile,
|
|
103
|
-
].filter(
|
|
104
|
-
(f) =>
|
|
105
|
-
CORE_FILES.includes(f) ||
|
|
106
|
-
f === shimFile ||
|
|
107
|
-
fs.existsSync(path.join(sourceDir, f)),
|
|
108
|
-
);
|
|
253
|
+
const filesToProcess = [...CORE_FILES, shimFile].filter(f => CORE_FILES.includes(f) || f === shimFile || fs.existsSync(path.join(sourceDir, f)));
|
|
109
254
|
|
|
110
255
|
ensureDir(path.join(targetDir, "apps/backend"), dryRun);
|
|
111
256
|
const initContractPath = path.join(targetDir, "apps/backend/contract.version.json");
|
|
112
257
|
if (!fs.existsSync(initContractPath)) {
|
|
113
|
-
writeJsonFile(initContractPath, {
|
|
114
|
-
contract_hash: "initial_hash_placeholder",
|
|
115
|
-
last_updated: new Date().toISOString(),
|
|
116
|
-
}, dryRun);
|
|
258
|
+
writeJsonFile(initContractPath, { contract_hash: "initial_hash_placeholder", last_updated: new Date().toISOString() }, dryRun);
|
|
117
259
|
}
|
|
118
260
|
|
|
119
261
|
let targetPkg: Record<string, unknown> = {};
|
|
120
262
|
try {
|
|
121
263
|
const targetPkgPath = path.join(targetDir, "package.json");
|
|
122
|
-
if (fs.existsSync(targetPkgPath))
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
} catch {
|
|
126
|
-
// ignore
|
|
127
|
-
}
|
|
264
|
+
if (fs.existsSync(targetPkgPath)) targetPkg = JSON.parse(fs.readFileSync(targetPkgPath, "utf8"));
|
|
265
|
+
} catch { /* ignore */ }
|
|
128
266
|
|
|
129
267
|
const pkgName = typeof targetPkg.name === "string" ? targetPkg.name : "";
|
|
130
|
-
const targetScope = pkgName
|
|
131
|
-
? pkgName.startsWith("@")
|
|
132
|
-
? pkgName.split("/")[0]
|
|
133
|
-
: `@${pkgName}`
|
|
134
|
-
: `@${path.basename(targetDir)}`;
|
|
268
|
+
const targetScope = pkgName ? (pkgName.startsWith("@") ? pkgName.split("/")[0] : `@${pkgName}`) : `@${path.basename(targetDir)}`;
|
|
135
269
|
|
|
136
270
|
for (const item of filesToProcess) {
|
|
137
271
|
const src = path.join(sourceDir, item);
|
|
138
272
|
let dest = path.join(targetDir, item);
|
|
139
|
-
|
|
140
|
-
// Safeguard: Do not delete or overwrite if we are in the framework's own development directory
|
|
141
273
|
const isDevMode = src === dest;
|
|
142
274
|
|
|
143
275
|
if (item === "framework-mcp" && fs.existsSync(dest) && !isDevMode) {
|
|
144
|
-
|
|
145
|
-
if (dryRun) {
|
|
146
|
-
console.warn(`[DRY RUN] Would remove existing directory: ${dest}`);
|
|
147
|
-
} else {
|
|
148
|
-
fs.rmSync(dest, { recursive: true, force: true });
|
|
149
|
-
}
|
|
150
|
-
} catch {
|
|
151
|
-
// ignore
|
|
152
|
-
}
|
|
276
|
+
if (!dryRun) fs.rmSync(dest, { recursive: true, force: true });
|
|
153
277
|
}
|
|
154
278
|
|
|
155
279
|
if (item === templateDir || item.startsWith(`${templateDir}/`)) {
|
|
156
280
|
let relativePath = item.replace(templateDir, "").replace(/^\//, "");
|
|
157
|
-
|
|
158
|
-
// Adapter-specific agent/skill folder remapping
|
|
159
281
|
if (relativePath.startsWith("agents")) {
|
|
160
|
-
if (adapter.id === "antigravity")
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
} else if (relativePath.startsWith("knowledge")) {
|
|
166
|
-
if (adapter.id === "antigravity") {
|
|
167
|
-
relativePath = relativePath.replace("knowledge", "rules");
|
|
168
|
-
}
|
|
282
|
+
if (adapter.id === "antigravity") relativePath = relativePath.replace("agents", "skills");
|
|
283
|
+
else if (adapter.id === "grok") relativePath = relativePath.replace("agents", "plugins");
|
|
284
|
+
} else if (relativePath.startsWith("knowledge") && adapter.id === "antigravity") {
|
|
285
|
+
relativePath = relativePath.replace("knowledge", "rules");
|
|
169
286
|
}
|
|
170
|
-
|
|
171
287
|
dest = path.join(targetDir, frameworkDir, relativePath);
|
|
172
288
|
}
|
|
173
|
-
|
|
174
|
-
// Skip if src and dest are same and it's not a shim or specific file that needs re-mapping
|
|
175
|
-
if (isDevMode && !isAdapterShimFile(item) && item !== "package.json") {
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
if (item === "ENDERUN.md") {
|
|
179
|
-
dest = path.join(targetFrameworkDir, "ENDERUN.md");
|
|
180
|
-
}
|
|
181
|
-
if (isAdapterShimFile(item)) {
|
|
182
|
-
dest = path.join(targetDir, item);
|
|
183
|
-
}
|
|
184
289
|
|
|
185
|
-
if (!
|
|
186
|
-
|
|
187
|
-
|
|
290
|
+
if (isDevMode && !isAdapterShimFile(item) && item !== "package.json") continue;
|
|
291
|
+
if (item === "ENDERUN.md") dest = path.join(targetFrameworkDir, "ENDERUN.md");
|
|
292
|
+
if (isAdapterShimFile(item)) dest = path.join(targetDir, item);
|
|
188
293
|
|
|
189
|
-
if (fs.
|
|
190
|
-
const skipFiles =
|
|
191
|
-
item === templateDir ? ["logs", "PROJECT_MEMORY.md", "PROJECT_MEMORY.lock"] : [];
|
|
192
|
-
const nonDestructive = ["docs", templateDir].includes(item);
|
|
294
|
+
if (!fs.existsSync(src)) continue;
|
|
193
295
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
copyDir(
|
|
199
|
-
src,
|
|
200
|
-
dest,
|
|
201
|
-
new Set(skipFiles),
|
|
202
|
-
nonDestructive,
|
|
203
|
-
frameworkDir,
|
|
204
|
-
targetScope,
|
|
205
|
-
sanitizeJson,
|
|
206
|
-
adapter.id,
|
|
207
|
-
dryRun,
|
|
208
|
-
);
|
|
209
|
-
|
|
210
|
-
if (item === templateDir && adapter.id === "grok") {
|
|
211
|
-
const grokAgentsDest = path.join(targetDir, frameworkDir, "agents");
|
|
212
|
-
ensureDir(grokAgentsDest, dryRun);
|
|
213
|
-
copyDir(
|
|
214
|
-
path.join(src, "agents"),
|
|
215
|
-
grokAgentsDest,
|
|
216
|
-
new Set(skipFiles),
|
|
217
|
-
nonDestructive,
|
|
218
|
-
frameworkDir,
|
|
219
|
-
targetScope,
|
|
220
|
-
sanitizeJson,
|
|
221
|
-
adapter.id,
|
|
222
|
-
dryRun,
|
|
223
|
-
);
|
|
224
|
-
}
|
|
296
|
+
if (fs.lstatSync(src).isDirectory()) {
|
|
297
|
+
const skipFiles = item === templateDir ? ["logs", "PROJECT_MEMORY.md", "PROJECT_MEMORY.lock"] : [];
|
|
298
|
+
copyDir(src, dest, new Set(skipFiles), ["docs", templateDir].includes(item), frameworkDir, targetScope, sanitizeJson, adapter.id, dryRun);
|
|
225
299
|
} else {
|
|
226
300
|
if (item === "package.json") continue;
|
|
227
|
-
|
|
228
|
-
if (fs.existsSync(dest) && !isAdapterShimFile(item)) {
|
|
229
|
-
console.warn(`ā¹ļø Skipping existing file: ${item}`);
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
301
|
+
if (fs.existsSync(dest) && !isAdapterShimFile(item)) continue;
|
|
232
302
|
|
|
233
303
|
const ext = path.extname(item);
|
|
234
|
-
|
|
235
|
-
if (textExtensions.includes(ext)) {
|
|
304
|
+
if ([".md", ".json", ".js", ".ts", ".txt", ""].includes(ext)) {
|
|
236
305
|
let content = fs.readFileSync(src, "utf8");
|
|
237
306
|
content = remapFrameworkContent(content, frameworkDir, adapter.id);
|
|
238
|
-
|
|
239
307
|
if (ext === ".json") {
|
|
240
308
|
try {
|
|
241
309
|
const json = JSON.parse(content);
|
|
242
310
|
content = JSON.stringify(sanitizeJson(json, targetScope), null, 2);
|
|
243
311
|
content = remapFrameworkContent(content, frameworkDir, adapter.id);
|
|
244
|
-
} catch {
|
|
245
|
-
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
246
|
-
}
|
|
312
|
+
} catch { content = content.replace(/workspace:[^"'\s]*/g, "*"); }
|
|
247
313
|
}
|
|
248
|
-
|
|
249
314
|
writeTextFile(dest, content, dryRun);
|
|
250
|
-
} else {
|
|
251
|
-
|
|
252
|
-
console.warn(`[DRY RUN] Would copy binary file: ${dest}`);
|
|
253
|
-
} else {
|
|
254
|
-
fs.copyFileSync(src, dest);
|
|
255
|
-
}
|
|
315
|
+
} else if (!dryRun) {
|
|
316
|
+
fs.copyFileSync(src, dest);
|
|
256
317
|
}
|
|
257
318
|
}
|
|
258
|
-
console.warn(`ā
${item} processed -> ${path.relative(targetDir, dest)}`);
|
|
259
319
|
}
|
|
260
320
|
|
|
261
|
-
if (!dryRun)
|
|
262
|
-
mergePackageJson(path.join(targetDir, "package.json"), path.join(sourceDir, "package.json"));
|
|
263
|
-
} else {
|
|
264
|
-
console.warn("[DRY RUN] Would merge package.json content.");
|
|
265
|
-
}
|
|
266
|
-
|
|
321
|
+
if (!dryRun) mergePackageJson(path.join(targetDir, "package.json"), path.join(sourceDir, "package.json"));
|
|
267
322
|
updateGitIgnore(path.join(targetDir, ".gitignore"), frameworkDir, dryRun);
|
|
323
|
+
initializeMemory(path.join(targetFrameworkDir, "memory/PROJECT_MEMORY.md"), frameworkDir, dryRun);
|
|
324
|
+
if (!dryRun) deepCleanProtocols(targetDir, targetScope);
|
|
268
325
|
|
|
269
|
-
|
|
270
|
-
|
|
326
|
+
// Scaffold core agents under the central framework directory
|
|
327
|
+
scaffoldCoreAgents(path.join(targetFrameworkDir, "agents"), dryRun);
|
|
271
328
|
|
|
272
|
-
if (!dryRun) {
|
|
273
|
-
|
|
274
|
-
} else {
|
|
275
|
-
console.warn("[DRY RUN] Would clean specific workspace protocols.");
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const sampleTestPath = path.join(targetDir, "tests/initial.test.ts");
|
|
279
|
-
if (!fs.existsSync(sampleTestPath)) {
|
|
280
|
-
writeTextFile(
|
|
281
|
-
sampleTestPath,
|
|
282
|
-
`import { describe, it, expect } from "vitest";
|
|
283
|
-
|
|
284
|
-
describe("Initial Setup", () => {
|
|
285
|
-
it("should verify the testing environment is active", () => {
|
|
286
|
-
expect(true).toBe(true);
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
`,
|
|
290
|
-
dryRun,
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const cursorRulesPath = path.join(targetDir, ".cursorrules");
|
|
295
|
-
if (!fs.existsSync(cursorRulesPath)) {
|
|
296
|
-
writeTextFile(
|
|
297
|
-
cursorRulesPath,
|
|
298
|
-
`# Agent Enderun ā Cursor IDE Rules
|
|
299
|
-
|
|
300
|
-
This is the primary entry point when using Agent Enderun within the Cursor IDE (Chat & Composer).
|
|
301
|
-
|
|
302
|
-
The framework operates under a unified governance structure located in the ${frameworkDir}/ directory.
|
|
303
|
-
|
|
304
|
-
### Primary Constitution
|
|
305
|
-
All governance rules, agent checklists, and project memory live here:
|
|
306
|
-
|
|
307
|
-
š **[${frameworkDir}/ENDERUN.md](${frameworkDir}/ENDERUN.md)**
|
|
308
|
-
|
|
309
|
-
### š¤ Agent Directive
|
|
310
|
-
You are operating under the Agent Enderun governance framework.
|
|
311
|
-
|
|
312
|
-
At the **start of every session**, before any work:
|
|
313
|
-
1. **Restore Memory:** Read ${frameworkDir}/PROJECT_MEMORY.md to restore state, active Trace ID, and history.
|
|
314
|
-
2. **Load Identity:** Read the relevant agent definition under ${frameworkDir}/agents/{agent}.md (default to @manager).
|
|
315
|
-
3. **Internalize Knowledge:** Reference the ${frameworkDir}/knowledge/ base for architectural and coding standards.
|
|
316
|
-
|
|
317
|
-
### š¾ Memory Tiers
|
|
318
|
-
- **Project Memory (Shared):** ${frameworkDir}/PROJECT_MEMORY.md is the source of truth for task history, Trace IDs, and architectural decisions. **Update this at the end of every turn.**
|
|
319
|
-
- **Private Memory (User-Specific):** Use the local .gitignored memory directory (e.g. ${frameworkDir}/memory/) for personal workflows or user-specific notes that should not be committed to Git. Never use the system's /tmp directory.
|
|
320
|
-
- **Project Instructions:** This .cursorrules file contains the "Supreme Law" and coding standards.
|
|
321
|
-
|
|
322
|
-
### š”ļø Core Mandates
|
|
323
|
-
- **Surgical Edits:** Use replace_text or patch_file via MCP for precise changes.
|
|
324
|
-
- **Traceability:** Every action must inherit the active Trace ID from memory.
|
|
325
|
-
- **Contract First:** No implementation without verified types.
|
|
326
|
-
- **NEVER FORGET:** @manager MUST update ${frameworkDir}/PROJECT_MEMORY.md at the end of EVERY session without exception. This is a non-negotiable process integrity rule.
|
|
327
|
-
|
|
328
|
-
All paths and references inside the project must comply with the Supreme Constitution located at ${frameworkDir}/ENDERUN.md`.trim() + "\n",
|
|
329
|
-
dryRun,
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
if (!fs.existsSync(path.join(targetDir, ".git"))) {
|
|
334
|
-
try {
|
|
335
|
-
if (dryRun) {
|
|
336
|
-
console.warn("[DRY RUN] Would initialize git repository.");
|
|
337
|
-
} else {
|
|
338
|
-
execSync("git init", { cwd: targetDir, stdio: "ignore" });
|
|
339
|
-
console.warn("ā
Git repository initialized.");
|
|
340
|
-
}
|
|
341
|
-
} catch {
|
|
342
|
-
// ignore
|
|
343
|
-
}
|
|
329
|
+
if (!fs.existsSync(path.join(targetDir, ".git")) && !dryRun) {
|
|
330
|
+
try { execSync("git init", { cwd: targetDir, stdio: "ignore" }); } catch { /* ignore */ }
|
|
344
331
|
}
|
|
345
332
|
|
|
346
333
|
console.warn(`\nš ļø Running ${adapter.id} adapter configuration...`);
|
|
347
|
-
if (!dryRun)
|
|
348
|
-
runAdapterPostInit(adapter, targetDir);
|
|
349
|
-
} else {
|
|
350
|
-
console.warn(`[DRY RUN] Would run post-init steps for ${adapter.id}`);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Always scaffold Antigravity (.agents/) workspace directory for cross-compatibility with agy CLI
|
|
354
|
-
if (adapter.id === "antigravity" || adapter.id === "antigravity-cli" || adapter.id === "gemini") {
|
|
355
|
-
const agentsFrameworkDir = path.join(targetDir, ".agents");
|
|
356
|
-
if (!dryRun) {
|
|
357
|
-
try {
|
|
358
|
-
fs.mkdirSync(agentsFrameworkDir, { recursive: true });
|
|
359
|
-
const agentsSubdir = path.join(agentsFrameworkDir, "agents");
|
|
360
|
-
fs.mkdirSync(agentsSubdir, { recursive: true });
|
|
361
|
-
|
|
362
|
-
// Create other standard Antigravity directories for custom workspace customizations
|
|
363
|
-
fs.mkdirSync(path.join(agentsFrameworkDir, "skills"), { recursive: true });
|
|
364
|
-
fs.mkdirSync(path.join(agentsFrameworkDir, "rules"), { recursive: true });
|
|
365
|
-
fs.mkdirSync(path.join(agentsFrameworkDir, "workflows"), { recursive: true });
|
|
366
|
-
|
|
367
|
-
// Write workspace-specific MCP config
|
|
368
|
-
const mcpBlock = {
|
|
369
|
-
mcpServers: {
|
|
370
|
-
"agent-enderun": {
|
|
371
|
-
command: "node",
|
|
372
|
-
args: [path.join(targetDir, "framework-mcp/dist/index.js")],
|
|
373
|
-
env: {
|
|
374
|
-
"ENDERUN_PROJECT_ROOT": targetDir
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
fs.writeFileSync(
|
|
380
|
-
path.join(agentsFrameworkDir, "mcp_config.json"),
|
|
381
|
-
JSON.stringify(mcpBlock, null, 2),
|
|
382
|
-
"utf8"
|
|
383
|
-
);
|
|
384
|
-
|
|
385
|
-
// Write AGENTS.md at the project root for prepended global rules
|
|
386
|
-
const agentsMdPath = path.join(targetDir, "AGENTS.md");
|
|
387
|
-
if (!fs.existsSync(agentsMdPath)) {
|
|
388
|
-
fs.writeFileSync(
|
|
389
|
-
agentsMdPath,
|
|
390
|
-
`# Agent Enderun Workspace Instructions
|
|
391
|
-
|
|
392
|
-
You are operating under the Agent Enderun AI governance and orchestration framework.
|
|
393
|
-
|
|
394
|
-
### š”ļø Critical Guidelines
|
|
395
|
-
1. **Traceability First:** Every action or execution MUST inherit the active Trace ID from \`${frameworkDir}/PROJECT_MEMORY.md\`.
|
|
396
|
-
2. **Surgical Operations:** Use precise file replacements or patches. NEVER rewrite entire source files unnecessarily.
|
|
397
|
-
3. **Contract-First Design:** Backend models and type contracts must be locked and verified before frontend components are created.
|
|
398
|
-
4. **Memory Synchronization:** All agent runs must update the project memory logs before concluding the session.
|
|
399
|
-
|
|
400
|
-
All rules and constraints defined in \`${frameworkDir}/ENDERUN.md\` are strictly binding.
|
|
401
|
-
`.trim() + "\n",
|
|
402
|
-
"utf8"
|
|
403
|
-
);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
// Write the 12 agent folders and agent.json files
|
|
407
|
-
const allAgents = [
|
|
408
|
-
{
|
|
409
|
-
name: "manager",
|
|
410
|
-
displayName: "Orchestration & Governance (Team-Lead)",
|
|
411
|
-
description: "CTO, Lead Architect, and Orchestrator for Agent Enderun.",
|
|
412
|
-
instructions: "You are the manager agent. Orchestrate workspace tasks, manage DAG dependency graphs, handle phase transitions, and enforce architectural standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Single Point of Authority: You are the sole entry point. No specialist acts without your briefing.\n- Traceability: Every action MUST inherit the active Trace ID.\n- Memory Discipline: MUST update PROJECT_MEMORY.md and log actions at the end of EVERY turn."
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
name: "backend",
|
|
416
|
-
displayName: "Domain Logic & Databases Specialist",
|
|
417
|
-
description: "Responsible for core business logic, database migrations, security standards, API contracts, and server architecture.",
|
|
418
|
-
instructions: "You are the backend agent. Build secure, high-performance, and consistent server architecture.\n\nš NON-NEGOTIABLE CORE RULES:\n- No UI: Never implement UI or frontend logic.\n- Contract-First: Define shared contracts/branded types BEFORE any consumer code.\n- Branded Types Law: ALL IDs must use branded types (e.g., UserID). Plain strings are forbidden.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Surgical Edits: Use replace_text for all code changes."
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
name: "frontend",
|
|
422
|
-
displayName: "Fluid Responsive UI Specialist",
|
|
423
|
-
description: "Builds responsive fluid user interfaces, manages styling tokens with Panda CSS, and implements state machines.",
|
|
424
|
-
instructions: "You are the frontend agent. Build original, high-performance, and responsive user interfaces.\n\nš NON-NEGOTIABLE CORE RULES:\n- Responsive-First: Mobile-First (320px) is mandatory. Fixed-width is forbidden.\n- Zero UI Library Policy: No shadcn/ui, MUI, etc. Build everything with Panda CSS.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Contract-First: Use branded types from apps/backend/src/types.\n- No Native Alerts: Use integrated Toaster/Modal components."
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
name: "quality",
|
|
428
|
-
displayName: "Automated Testing & Quality Specialist",
|
|
429
|
-
description: "Verifies test coverage, audits compliance with the constitution, conducts AST scanning, and verifies CI/CD status.",
|
|
430
|
-
instructions: "You are the quality agent. Ensure no code is merged or deployed without meeting standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Final Gate: No code merges or deploys proceed without quality sign-off.\n- Verification-First: Audit lint, typecheck, contract drift, and branded types before sign-off.\n- Never Implement: Audit and assess only. Never write application features.\n- Zero Mock Policy: Integration tests must use real/service-compatible backends.\n- Coverage Gate: Reject approvals if coverage falls below >80% threshold in core."
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
name: "database",
|
|
434
|
-
displayName: "Database Migrations & Tuning Specialist",
|
|
435
|
-
description: "Designs SQL schemas, manages migration scripts via Kysely, optimizes queries, indexes, and seeding logic.",
|
|
436
|
-
instructions: "You are the database agent. Build secure, optimized, and scalable data layers.\n\nš NON-NEGOTIABLE CORE RULES:\n- Self-Contained DB: Every backend application MUST manage its own schema/migrations/seeds in its own src/database/ directory.\n- Contract-First: All schemas MUST be derived from branded types.\n- Kysely Standard: Use Kysely for application queries. Raw SQL is forbidden.\n- Zero Mock Policy: Realistic, contract-aware seed data only.\n- Surgical Edits: Use replace_text for all schema/migration changes."
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
name: "devops",
|
|
440
|
-
displayName: "Infrastructure & CI/CD Specialist",
|
|
441
|
-
description: "Handles deployment pipelines, environment variables, system containerization, logging & telemetry integrations.",
|
|
442
|
-
instructions: "You are the devops agent. Ensure reliable execution in every environment with strict quality gates.\n\nš NON-NEGOTIABLE CORE RULES:\n- Gate Approvals: NEVER deploy to production without quality gate approval.\n- No Docker Policy: Prefer native Node.js unless explicitly overridden by manager.\n- Environment Parity: Identical configs across dev/staging/prod (except secrets).\n- Secrets Security: NEVER hardcode secrets. Use environment variables.\n- Rollback First: Deployment is BLOCKED if no documented rollback plan exists."
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
name: "explorer",
|
|
446
|
-
displayName: "Codebase Discovery Specialist",
|
|
447
|
-
description: "Maps code dependencies, performs project scans, identifies architectural gaps, and supports legacy onboarding.",
|
|
448
|
-
instructions: "You are the explorer agent. Map project structure and provide deep context to other agents.\n\nš NON-NEGOTIABLE CORE RULES:\n- Read-Only: Never write production code. Only discover, map, and report.\n- Search-First: Always use search_codebase before reading large files.\n- Surgical Discovery: Focus on entry points and core domain logic.\n- Zero Mock Policy: Analyze real system state only.\n- Traceability: All findings must be linked to a Trace ID."
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
name: "git",
|
|
452
|
-
displayName: "Version Control Specialist",
|
|
453
|
-
description: "Manages commit histories, branches, Trace ID alignment, semantic tagging, and merge conflicts.",
|
|
454
|
-
instructions: "You are the git agent. Ensure a clean, atomic, and traceable repository history.\n\nš NON-NEGOTIABLE CORE RULES:\n- Trace ID Tagging: EVERY commit must include the active Trace ID in the message.\n- Atomic Integrity: Every commit must represent exactly one logical change.\n- Health-First: Never commit code that fails build or basic tests.\n- No Push: Do not run git push without explicit USER approval.\n- No Force: Never use git push --force on public branches."
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
name: "mobile",
|
|
458
|
-
displayName: "Mobile App Specialist",
|
|
459
|
-
description: "Develops cross-platform mobile apps using React Native and Expo with clean component states.",
|
|
460
|
-
instructions: "You are the mobile agent. Build high-performance, responsive mobile apps (React Native/Expo).\n\nš NON-NEGOTIABLE CORE RULES:\n- Zero UI Library: Same discipline as web. Build UI from scratch.\n- Contract-First: Use shared types from apps/backend/src/types.\n- Responsive-First: Mobile-First approach is mandatory.\n- Safe Area: Handle iOS/Android safe area insets on every screen.\n- Performance: Target 60 FPS."
|
|
461
|
-
},
|
|
462
|
-
{
|
|
463
|
-
name: "native",
|
|
464
|
-
displayName: "Native OS Integration Specialist",
|
|
465
|
-
description: "Builds lightweight desktop wrappers and system integrations using Tauri or Electron.",
|
|
466
|
-
instructions: "You are the native agent. Build secure, efficient desktop apps (Tauri/Electron).\n\nš NON-NEGOTIABLE CORE RULES:\n- Security-First: No remote code execution. Mandatory sandboxing and strict CSP.\n- Secure Storage: Use Keychain/Credential Manager for sensitive data.\n- IPC Contract: All communication between frontend and native MUST be typed.\n- Contract-First: Define IPC and data contracts before implementation.\n- Surgical Edits: Use replace_text for all code changes."
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
name: "security",
|
|
470
|
-
displayName: "Security & Cryptography Specialist",
|
|
471
|
-
description: "Enforces authentication flows, CSP policies, credential rotation, RLS constraints, and cryptographic safety.",
|
|
472
|
-
instructions: "You are the security agent. Ensure all endpoints, database connections, and authentication flows satisfy strict enterprise compliance policies.\n\nš NON-NEGOTIABLE CORE RULES:\n- Sandboxed Security First: Enforce Row Level Security (RLS) on all database tables.\n- Credential Rotation Policy: Credentials, keys, and tokens must never be hardcoded. Use vault/env variables.\n- CSP & CORS Strictness: Never open wildcards (*) for CORS or CSP policies.\n- Surgical Edits: Use replace_text for all security patches."
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
name: "analyst",
|
|
476
|
-
displayName: "Contract Verification & Business Analyst",
|
|
477
|
-
description: "Validates business specifications, tests database contract integrity, and audits constitutional compliance.",
|
|
478
|
-
instructions: "You are the analyst agent. Independently verify compliance with contracts and specifications between frontend, backend, and the constitution.\n\nš NON-NEGOTIABLE CORE RULES:\n- Independent Stance: Act as an objective verification gate.\n- Contract-First Law: Ensure contract.version.json perfectly matches types.\n- Escalation Priority: Report all contract drift to manager immediately.\n- Surgical Edits: Use replace_text for all document updates."
|
|
479
|
-
}
|
|
480
|
-
];
|
|
481
|
-
|
|
482
|
-
for (const ag of allAgents) {
|
|
483
|
-
const agentDir = path.join(agentsSubdir, ag.name);
|
|
484
|
-
fs.mkdirSync(agentDir, { recursive: true });
|
|
485
|
-
|
|
486
|
-
const payload = {
|
|
487
|
-
name: ag.name,
|
|
488
|
-
displayName: ag.displayName,
|
|
489
|
-
description: ag.description,
|
|
490
|
-
hidden: false,
|
|
491
|
-
customAgentSpec: {
|
|
492
|
-
customAgent: {
|
|
493
|
-
systemPromptSections: [
|
|
494
|
-
{
|
|
495
|
-
title: "Instructions",
|
|
496
|
-
content: ag.instructions
|
|
497
|
-
}
|
|
498
|
-
],
|
|
499
|
-
toolNames: [
|
|
500
|
-
"view_file",
|
|
501
|
-
"replace_file_content",
|
|
502
|
-
"write_to_file",
|
|
503
|
-
"run_command",
|
|
504
|
-
"grep_search",
|
|
505
|
-
"list_dir"
|
|
506
|
-
]
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
fs.writeFileSync(
|
|
512
|
-
path.join(agentDir, "agent.json"),
|
|
513
|
-
JSON.stringify(payload, null, 2),
|
|
514
|
-
"utf8"
|
|
515
|
-
);
|
|
516
|
-
}
|
|
517
|
-
console.warn(`ā
Scaffolding ${allAgents.length} Antigravity agents under .agents/agents/...`);
|
|
518
|
-
} catch {
|
|
519
|
-
// fallback
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
console.warn(`\nā ${adapter.id.toUpperCase()}: Setup complete.`);
|
|
525
|
-
console.warn(` ⢠Framework runtime: ${frameworkDir}/`);
|
|
526
|
-
console.warn(` ⢠Entrypoint shim: ${shimFile}`);
|
|
527
|
-
if (adapter.nestedDirs?.length) {
|
|
528
|
-
console.warn(` ⢠Nested: ${adapter.nestedDirs.map((d) => `${frameworkDir}/${d}/`).join(", ")}`);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
const pkgMgr = getPackageManager();
|
|
532
|
-
const installCmd = pkgMgr === "npm" ? "npm install" : `${pkgMgr} install`;
|
|
533
|
-
const buildCmd = pkgMgr === "npm" ? "npm run enderun:build" : `${pkgMgr} run enderun:build`;
|
|
334
|
+
if (!dryRun) runAdapterPostInit(adapter, targetDir);
|
|
534
335
|
|
|
535
336
|
console.warn(`\n⨠Framework scaffolded! (v${FRAMEWORK_VERSION})`);
|
|
536
|
-
|
|
537
|
-
console.warn(" Run `agent-enderun check` (or the validate script) to confirm all agents have proper stateMachine + tags.");
|
|
538
|
-
|
|
539
|
-
if (dryRun || process.env.ENDERUN_SKIP_INSTALL === "1") {
|
|
540
|
-
console.warn(`\nāļø Skipping install steps (${dryRun ? "Dry-Run" : "ENDERUN_SKIP_INSTALL=1"}).`);
|
|
541
|
-
return;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
try {
|
|
545
|
-
console.warn("\nš Step 3/3: Running 'agent-enderun check' (includes AL validation)...");
|
|
546
|
-
checkCommand();
|
|
547
|
-
|
|
548
|
-
// Automatic dedicated AL (Agent Lifecycle) check after init
|
|
549
|
-
console.warn("\nš”ļø Automatic post-init AL Army Validation (validate-agent-army)...");
|
|
337
|
+
if (!dryRun && process.env.ENDERUN_SKIP_INSTALL !== "1") {
|
|
550
338
|
try {
|
|
339
|
+
console.warn("\nš Running health check...");
|
|
340
|
+
checkCommand();
|
|
551
341
|
const validatorPath = getValidatorPath();
|
|
552
342
|
execSync(`node "${validatorPath}"`, { stdio: "inherit" });
|
|
553
|
-
|
|
554
|
-
} catch {
|
|
555
|
-
console.warn("ā ļø Automatic AL validation reported issues (see above in check output).");
|
|
556
|
-
console.warn(" You can re-run manually: agent-enderun validate or agent-enderun check");
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
console.warn("\nš Agent Enderun is fully installed and verified!");
|
|
560
|
-
} catch (e: unknown) {
|
|
561
|
-
const message = e instanceof Error ? e.message : String(e);
|
|
562
|
-
console.error("\nā Automatic installation failed. Run manually:");
|
|
563
|
-
console.warn(`š ${installCmd} && ${buildCmd}`);
|
|
564
|
-
console.error(message);
|
|
343
|
+
} catch { /* ignore validation report */ }
|
|
565
344
|
}
|
|
566
345
|
}
|