agent-enderun 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +40 -0
- package/ENDERUN.md +36 -38
- package/README.md +16 -8
- package/bin/validate-agent-army.js +27 -12
- package/dist/framework-mcp/src/index.js +7 -1
- package/dist/framework-mcp/src/index.js.map +1 -1
- package/dist/framework-mcp/src/tools/definitions.js +1 -0
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/patch_file.js +3 -0
- package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/read_file.js +7 -0
- package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/replace_text.js +3 -0
- package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.js +41 -11
- package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
- package/dist/framework-mcp/src/tools/types.d.ts +1 -0
- package/{framework-mcp/dist → dist/framework-mcp}/tests/tools/file_system/file_system_tools.test.js +40 -0
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -0
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +115 -0
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -0
- package/dist/init-adapters/antigravity-cli/.agents/config.json +1 -1
- package/dist/init-adapters/antigravity-cli/.agents/knowledge/agents-manifest.md +79 -0
- package/dist/init-adapters/antigravity-cli/.agents/knowledge/approval-flows.md +61 -0
- package/dist/init-adapters/antigravity-cli/.agents/knowledge/enterprise-architecture.md +69 -0
- package/dist/init-adapters/antigravity-cli/.agents/knowledge/eslint-standards.md +10 -0
- package/dist/init-adapters/antigravity-cli/.agents/memory/DECISIONS.md +10 -0
- package/dist/init-adapters/antigravity-cli/.agents/memory/PROJECT_MEMORY.md +1 -1
- package/dist/init-adapters/antigravity-cli/.agents/observability/audit_log.md +5 -0
- package/dist/init-adapters/antigravity-cli/.agents/observability/telemetry.md +6 -0
- package/dist/init-adapters/antigravity-cli/.agents/registry/agent_registry.md +18 -0
- package/dist/init-adapters/antigravity-cli/.agents/router/routing_rules.md +8 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/analyst.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/architect.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/backend.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/database.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/devops.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/explorer.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/frontend.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/git.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/manager.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/mobile.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/native.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/quality.md +16 -0
- package/dist/init-adapters/antigravity-cli/.agents/rules/security.md +16 -0
- package/dist/init-adapters/antigravity-cli/AGENTS.md +7 -0
- package/dist/init-adapters/antigravity-cli/ENDERUN.md +36 -38
- package/dist/init-adapters/antigravity-cli/docs/README.md +6 -0
- package/dist/init-adapters/antigravity-cli/docs/getting-started.md +4 -0
- package/dist/init-adapters/claude/.claude/agents/analyst.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/architect.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/backend.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/database.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/devops.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/explorer.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/frontend.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/git.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/manager.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/mobile.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/native.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/quality.md +4 -2
- package/dist/init-adapters/claude/.claude/agents/security.md +4 -2
- package/dist/init-adapters/claude/.claude/config.json +1 -1
- package/dist/init-adapters/claude/.claude/knowledge/agents-manifest.md +79 -0
- package/dist/init-adapters/claude/.claude/knowledge/approval-flows.md +61 -0
- package/dist/init-adapters/claude/.claude/knowledge/component-patterns.md +91 -0
- package/dist/init-adapters/claude/.claude/knowledge/data-fetching-patterns.md +13 -0
- package/dist/init-adapters/claude/.claude/knowledge/design-system.md +31 -0
- package/dist/init-adapters/claude/.claude/knowledge/enterprise-architecture.md +69 -0
- package/dist/init-adapters/claude/.claude/knowledge/error-handling.md +74 -0
- package/dist/init-adapters/claude/.claude/knowledge/eslint-standards.md +10 -0
- package/dist/init-adapters/claude/.claude/knowledge/logging.md +7 -0
- package/dist/init-adapters/claude/.claude/knowledge/tech-stack.md +9 -0
- package/dist/init-adapters/claude/.claude/memory/DECISIONS.md +10 -0
- package/dist/init-adapters/claude/.claude/memory/PROJECT_MEMORY.md +1 -1
- package/dist/init-adapters/claude/.claude/observability/audit_log.md +5 -0
- package/dist/init-adapters/claude/.claude/observability/telemetry.md +6 -0
- package/dist/init-adapters/claude/.claude/registry/agent_registry.md +18 -0
- package/dist/init-adapters/claude/.claude/router/routing_rules.md +8 -0
- package/dist/init-adapters/claude/.claude/rules/analyst.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/architect.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/backend.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/database.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/devops.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/explorer.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/frontend.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/git.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/manager.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/mobile.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/native.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/quality.md +16 -0
- package/dist/init-adapters/claude/.claude/rules/security.md +16 -0
- package/dist/init-adapters/claude/CLAUDE.md +7 -0
- package/dist/init-adapters/claude/ENDERUN.md +36 -38
- package/dist/init-adapters/claude/docs/README.md +6 -0
- package/dist/init-adapters/claude/docs/getting-started.md +4 -0
- package/dist/init-adapters/codex/.github/agents/analyst.md +4 -2
- package/dist/init-adapters/codex/.github/agents/architect.md +4 -2
- package/dist/init-adapters/codex/.github/agents/backend.md +4 -2
- package/dist/init-adapters/codex/.github/agents/database.md +4 -2
- package/dist/init-adapters/codex/.github/agents/devops.md +4 -2
- package/dist/init-adapters/codex/.github/agents/explorer.md +4 -2
- package/dist/init-adapters/codex/.github/agents/frontend.md +4 -2
- package/dist/init-adapters/codex/.github/agents/git.md +4 -2
- package/dist/init-adapters/codex/.github/agents/manager.md +4 -2
- package/dist/init-adapters/codex/.github/agents/mobile.md +4 -2
- package/dist/init-adapters/codex/.github/agents/native.md +4 -2
- package/dist/init-adapters/codex/.github/agents/quality.md +4 -2
- package/dist/init-adapters/codex/.github/agents/security.md +4 -2
- package/dist/init-adapters/codex/.github/config.json +1 -1
- package/dist/init-adapters/codex/.github/instructions/agents-manifest.md +79 -0
- package/dist/init-adapters/codex/.github/instructions/analyst.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/approval-flows.md +61 -0
- package/dist/init-adapters/codex/.github/instructions/architect.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/backend.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/component-patterns.md +91 -0
- package/dist/init-adapters/codex/.github/instructions/data-fetching-patterns.md +13 -0
- package/dist/init-adapters/codex/.github/instructions/database.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/design-system.md +31 -0
- package/dist/init-adapters/codex/.github/instructions/devops.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/enterprise-architecture.md +69 -0
- package/dist/init-adapters/codex/.github/instructions/error-handling.md +74 -0
- package/dist/init-adapters/codex/.github/instructions/eslint-standards.md +10 -0
- package/dist/init-adapters/codex/.github/instructions/explorer.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/frontend.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/git.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/logging.md +7 -0
- package/dist/init-adapters/codex/.github/instructions/manager.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/mobile.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/native.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/quality.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/security.md +16 -0
- package/dist/init-adapters/codex/.github/instructions/tech-stack.md +9 -0
- package/dist/init-adapters/codex/.github/memory/DECISIONS.md +10 -0
- package/dist/init-adapters/codex/.github/memory/PROJECT_MEMORY.md +1 -1
- package/dist/init-adapters/codex/.github/observability/audit_log.md +5 -0
- package/dist/init-adapters/codex/.github/observability/telemetry.md +6 -0
- package/dist/init-adapters/codex/.github/registry/agent_registry.md +18 -0
- package/dist/init-adapters/codex/.github/router/routing_rules.md +8 -0
- package/dist/init-adapters/codex/ENDERUN.md +36 -38
- package/dist/init-adapters/codex/copilot-instructions.md +7 -1
- package/dist/init-adapters/codex/docs/README.md +6 -0
- package/dist/init-adapters/codex/docs/getting-started.md +4 -0
- package/dist/init-adapters/cursor/.cursor/agents/analyst.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/architect.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/backend.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/database.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/devops.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/explorer.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/frontend.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/git.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/manager.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/mobile.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/native.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/quality.md +4 -2
- package/dist/init-adapters/cursor/.cursor/agents/security.md +4 -2
- package/dist/init-adapters/cursor/.cursor/config.json +1 -1
- package/dist/init-adapters/cursor/.cursor/knowledge/agents-manifest.md +79 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/approval-flows.md +61 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/component-patterns.md +91 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/data-fetching-patterns.md +13 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/design-system.md +31 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/enterprise-architecture.md +69 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/error-handling.md +74 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/eslint-standards.md +10 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/logging.md +7 -0
- package/dist/init-adapters/cursor/.cursor/knowledge/tech-stack.md +9 -0
- package/dist/init-adapters/cursor/.cursor/memory/DECISIONS.md +10 -0
- package/dist/init-adapters/cursor/.cursor/memory/PROJECT_MEMORY.md +1 -1
- package/dist/init-adapters/cursor/.cursor/observability/audit_log.md +5 -0
- package/dist/init-adapters/cursor/.cursor/observability/telemetry.md +6 -0
- package/dist/init-adapters/cursor/.cursor/registry/agent_registry.md +18 -0
- package/dist/init-adapters/cursor/.cursor/router/routing_rules.md +8 -0
- package/dist/init-adapters/cursor/.cursor/rules/analyst.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/architect.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/backend.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/database.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/devops.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/explorer.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/frontend.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/git.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/manager.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/mobile.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/native.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/quality.mdc +22 -0
- package/dist/init-adapters/cursor/.cursor/rules/security.mdc +22 -0
- package/dist/init-adapters/cursor/CURSOR.md +6 -0
- package/dist/init-adapters/cursor/ENDERUN.md +36 -38
- package/dist/init-adapters/cursor/docs/README.md +6 -0
- package/dist/init-adapters/cursor/docs/getting-started.md +4 -0
- package/dist/init-adapters/gemini/.gemini/agents/analyst.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/architect.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/backend.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/database.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/devops.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/explorer.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/frontend.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/git.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/manager.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/mobile.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/native.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/quality.md +4 -2
- package/dist/init-adapters/gemini/.gemini/agents/security.md +4 -2
- package/dist/init-adapters/gemini/.gemini/config.json +1 -1
- package/dist/init-adapters/gemini/.gemini/knowledge/agents-manifest.md +79 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/approval-flows.md +61 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/component-patterns.md +91 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/data-fetching-patterns.md +13 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/design-system.md +31 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/enterprise-architecture.md +69 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/error-handling.md +74 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/eslint-standards.md +10 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/logging.md +7 -0
- package/dist/init-adapters/gemini/.gemini/knowledge/tech-stack.md +9 -0
- package/dist/init-adapters/gemini/.gemini/memory/DECISIONS.md +10 -0
- package/dist/init-adapters/gemini/.gemini/memory/PROJECT_MEMORY.md +1 -1
- package/dist/init-adapters/gemini/.gemini/observability/audit_log.md +5 -0
- package/dist/init-adapters/gemini/.gemini/observability/telemetry.md +6 -0
- package/dist/init-adapters/gemini/.gemini/registry/agent_registry.md +18 -0
- package/dist/init-adapters/gemini/.gemini/router/routing_rules.md +8 -0
- package/dist/init-adapters/gemini/.gemini/rules/analyst.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/architect.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/backend.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/database.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/devops.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/explorer.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/frontend.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/git.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/manager.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/mobile.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/native.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/quality.md +16 -0
- package/dist/init-adapters/gemini/.gemini/rules/security.md +16 -0
- package/dist/init-adapters/gemini/ENDERUN.md +15 -17
- package/dist/init-adapters/gemini/GEMINI.md +7 -0
- package/dist/init-adapters/gemini/docs/README.md +6 -0
- package/dist/init-adapters/gemini/docs/getting-started.md +4 -0
- package/dist/init-adapters/grok/.grok/agents/analyst.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/architect.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/backend.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/database.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/devops.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/explorer.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/frontend.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/git.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/manager.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/mobile.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/native.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/quality.md +4 -2
- package/dist/init-adapters/grok/.grok/agents/security.md +4 -2
- package/dist/init-adapters/grok/.grok/config.json +1 -1
- package/dist/init-adapters/grok/.grok/knowledge/agents-manifest.md +79 -0
- package/dist/init-adapters/grok/.grok/knowledge/approval-flows.md +61 -0
- package/dist/init-adapters/grok/.grok/knowledge/component-patterns.md +91 -0
- package/dist/init-adapters/grok/.grok/knowledge/data-fetching-patterns.md +13 -0
- package/dist/init-adapters/grok/.grok/knowledge/design-system.md +31 -0
- package/dist/init-adapters/grok/.grok/knowledge/enterprise-architecture.md +69 -0
- package/dist/init-adapters/grok/.grok/knowledge/error-handling.md +74 -0
- package/dist/init-adapters/grok/.grok/knowledge/eslint-standards.md +10 -0
- package/dist/init-adapters/grok/.grok/knowledge/logging.md +7 -0
- package/dist/init-adapters/grok/.grok/knowledge/tech-stack.md +9 -0
- package/dist/init-adapters/grok/.grok/memory/DECISIONS.md +10 -0
- package/dist/init-adapters/grok/.grok/memory/PROJECT_MEMORY.md +1 -1
- package/dist/init-adapters/grok/.grok/observability/audit_log.md +5 -0
- package/dist/init-adapters/grok/.grok/observability/telemetry.md +6 -0
- package/dist/init-adapters/grok/.grok/registry/agent_registry.md +18 -0
- package/dist/init-adapters/grok/.grok/router/routing_rules.md +8 -0
- package/dist/init-adapters/grok/.grok/rules/analyst.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/architect.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/backend.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/database.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/devops.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/explorer.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/frontend.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/git.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/manager.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/mobile.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/native.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/quality.md +16 -0
- package/dist/init-adapters/grok/.grok/rules/security.md +16 -0
- package/dist/init-adapters/grok/ENDERUN.md +36 -38
- package/dist/init-adapters/grok/GROK.md +6 -0
- package/dist/init-adapters/grok/docs/README.md +6 -0
- package/dist/init-adapters/grok/docs/getting-started.md +4 -0
- package/dist/src/cli/adapters.js +11 -10
- package/dist/src/cli/adapters.js.map +1 -1
- package/dist/src/cli/commands/approve.d.ts +1 -0
- package/dist/src/cli/commands/approve.js +64 -0
- package/dist/src/cli/commands/approve.js.map +1 -0
- package/dist/src/cli/commands/check.js +87 -5
- package/dist/src/cli/commands/check.js.map +1 -1
- package/dist/src/cli/commands/contract.js +3 -25
- package/dist/src/cli/commands/contract.js.map +1 -1
- package/dist/src/cli/commands/init.js +167 -10
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/knowledge.js +2 -3
- package/dist/src/cli/commands/knowledge.js.map +1 -1
- package/dist/src/cli/commands/log.js +1 -2
- package/dist/src/cli/commands/log.js.map +1 -1
- package/dist/src/cli/commands/orchestrate.d.ts +43 -9
- package/dist/src/cli/commands/orchestrate.js +161 -16
- package/dist/src/cli/commands/orchestrate.js.map +1 -1
- package/dist/src/cli/commands/status.js +35 -0
- package/dist/src/cli/commands/status.js.map +1 -1
- package/dist/src/cli/index.js +18 -4
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/shims.d.ts +1 -0
- package/dist/src/cli/shims.js +54 -0
- package/dist/src/cli/shims.js.map +1 -0
- package/dist/src/cli/utils/app.js +118 -33
- package/dist/src/cli/utils/app.js.map +1 -1
- package/dist/src/cli/utils/fs.d.ts +1 -0
- package/dist/src/cli/utils/fs.js +15 -0
- package/dist/src/cli/utils/fs.js.map +1 -1
- package/dist/src/cli/utils/memory.js +11 -1
- package/dist/src/cli/utils/memory.js.map +1 -1
- package/dist/src/modules/agents/definitions.js +12 -12
- package/dist/src/modules/agents/definitions.js.map +1 -1
- package/dist/src/modules/skills/definitions.d.ts +19 -2
- package/dist/src/modules/skills/definitions.js +53 -14
- package/dist/src/modules/skills/definitions.js.map +1 -1
- package/dist/src/shared/config.d.ts +41 -0
- package/dist/src/shared/config.js +61 -0
- package/dist/src/shared/config.js.map +1 -0
- package/dist/src/shared/container.d.ts +25 -0
- package/dist/src/shared/container.js +56 -0
- package/dist/src/shared/container.js.map +1 -0
- package/dist/src/shared/errors.d.ts +44 -0
- package/dist/src/shared/errors.js +66 -0
- package/dist/src/shared/errors.js.map +1 -0
- package/dist/src/shared/logger.d.ts +28 -0
- package/dist/src/shared/logger.js +117 -0
- package/dist/src/shared/logger.js.map +1 -0
- package/dist/tests/mock-project/apps/web/panda.config.d.ts +4 -0
- package/dist/tests/mock-project/apps/web/panda.config.js +3 -0
- package/dist/tests/mock-project/apps/web/panda.config.js.map +1 -0
- package/dist/tests/shared.test.d.ts +1 -0
- package/dist/tests/shared.test.js +80 -0
- package/dist/tests/shared.test.js.map +1 -0
- package/eslint.config.js +2 -1
- package/framework-mcp/dist/{src/index.js → index.js} +7 -1
- package/framework-mcp/dist/{src/tools → tools}/definitions.js +1 -0
- package/framework-mcp/dist/{src/tools → tools}/file_system/patch_file.js +3 -0
- package/framework-mcp/dist/{src/tools → tools}/file_system/read_file.js +7 -0
- package/framework-mcp/dist/{src/tools → tools}/file_system/replace_text.js +3 -0
- package/framework-mcp/dist/tools/messaging/send_message.js +74 -0
- package/framework-mcp/dist/tools/types.js +1 -0
- package/framework-mcp/package.json +1 -1
- package/framework-mcp/src/index.ts +8 -1
- package/framework-mcp/src/tools/definitions.ts +1 -0
- package/framework-mcp/src/tools/file_system/patch_file.ts +6 -0
- package/framework-mcp/src/tools/file_system/read_file.ts +7 -1
- package/framework-mcp/src/tools/file_system/replace_text.ts +6 -0
- package/framework-mcp/src/tools/messaging/send_message.ts +39 -12
- package/framework-mcp/src/tools/types.ts +1 -0
- package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +42 -0
- package/framework-mcp/tests/tools/messaging/send_message.test.ts +136 -0
- package/framework-mcp/tsconfig.json +2 -1
- package/package.json +9 -6
- package/src/cli/adapters.ts +13 -11
- package/src/cli/commands/approve.ts +65 -0
- package/src/cli/commands/check.ts +98 -5
- package/src/cli/commands/contract.ts +3 -29
- package/src/cli/commands/init.ts +187 -10
- package/src/cli/commands/knowledge.ts +2 -4
- package/src/cli/commands/log.ts +1 -3
- package/src/cli/commands/orchestrate.ts +164 -29
- package/src/cli/commands/status.ts +33 -0
- package/src/cli/index.ts +180 -163
- package/src/cli/shims.ts +53 -0
- package/src/cli/utils/app.ts +124 -33
- package/src/cli/utils/fs.ts +17 -0
- package/src/cli/utils/memory.ts +11 -1
- package/src/modules/agents/definitions.ts +12 -12
- package/src/modules/skills/definitions.ts +53 -14
- package/src/schema/agent-lifecycle-schema.json +59 -0
- package/src/shared/config.ts +73 -0
- package/src/shared/container.ts +67 -0
- package/src/shared/errors.ts +72 -0
- package/src/shared/logger.ts +139 -0
- package/templates/architecture/agents-manifest.md +79 -0
- package/templates/architecture/enterprise-architecture.md +69 -0
- package/templates/architecture/standards/crud-governance.md +46 -0
- package/templates/architecture/standards/data-fetching-patterns.md +13 -0
- package/templates/architecture/standards/design-system.md +31 -0
- package/templates/architecture/standards/documentation-ownership.md +21 -0
- package/templates/architecture/standards/logging.md +7 -0
- package/templates/architecture/standards/mobile-standards.md +48 -0
- package/templates/architecture/standards/tech-stack.md +9 -0
- package/templates/backend/error-handling.md +74 -0
- package/templates/frontend/component-patterns.md +91 -0
- package/tsconfig.json +1 -0
- package/docs/getting-started.md +0 -22
- package/framework-mcp/dist/src/tools/messaging/send_message.js +0 -44
- /package/{framework-mcp/dist/src/tools/types.js → dist/framework-mcp/tests/tools/file_system/file_system_tools.test.d.ts} +0 -0
- /package/{docs/frontend → dist/init-adapters/antigravity-cli/.agents/knowledge}/component-patterns.md +0 -0
- /package/{docs/architecture/standards → dist/init-adapters/antigravity-cli/.agents/knowledge}/data-fetching-patterns.md +0 -0
- /package/{docs/architecture/standards → dist/init-adapters/antigravity-cli/.agents/knowledge}/design-system.md +0 -0
- /package/{docs/backend → dist/init-adapters/antigravity-cli/.agents/knowledge}/error-handling.md +0 -0
- /package/{docs/architecture/standards → dist/init-adapters/antigravity-cli/.agents/knowledge}/logging.md +0 -0
- /package/{docs/architecture/standards → dist/init-adapters/antigravity-cli/.agents/knowledge}/tech-stack.md +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/control_plane/locking.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/control_plane/registry.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/file_system/write_file.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/framework/get_status.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/framework/orchestrate.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/framework/update_contract_hash.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/framework/update_memory.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/index.js +0 -0
- /package/framework-mcp/dist/{src/tools → tools}/messaging/log_action.js +0 -0
- /package/framework-mcp/dist/{src/utils → utils}/cli.js +0 -0
- /package/framework-mcp/dist/{src/utils → utils}/metrics.js +0 -0
- /package/framework-mcp/dist/{src/utils → utils}/security.js +0 -0
- /package/{docs → templates}/architecture/approval-flows.md +0 -0
package/src/cli/utils/app.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import
|
|
4
|
-
import { ensureDir, writeTextFile, writeJsonFile } from "../utils/fs.js";
|
|
3
|
+
import { ensureDir, writeTextFile, writeJsonFile, computeTypesHash } from "../utils/fs.js";
|
|
5
4
|
import { updateProjectMemory } from "./memory.js";
|
|
6
5
|
import { slugifyName, titleCase } from "../utils/string.js";
|
|
7
6
|
import { getConfiguredPaths, getMemoryPath } from "./memory.js";
|
|
@@ -86,20 +85,10 @@ export function updateContractHashFile() {
|
|
|
86
85
|
const contractPath = path.join(targetDir, pathsMap.backend, "contract.version.json");
|
|
87
86
|
if (!fs.existsSync(sharedDir) || !fs.existsSync(contractPath)) return;
|
|
88
87
|
|
|
89
|
-
const
|
|
90
|
-
const fullPath = path.join(dir, entry.name);
|
|
91
|
-
return entry.isDirectory() ? walk(fullPath) : (entry.name.endsWith(".ts") ? [fullPath] : []);
|
|
92
|
-
});
|
|
93
|
-
const hash = crypto.createHash("sha256");
|
|
94
|
-
for (const filePath of walk(sharedDir).sort()) {
|
|
95
|
-
hash.update(path.relative(targetDir, filePath));
|
|
96
|
-
hash.update("\0");
|
|
97
|
-
hash.update(fs.readFileSync(filePath));
|
|
98
|
-
hash.update("\0");
|
|
99
|
-
}
|
|
88
|
+
const currentHash = computeTypesHash(targetDir, sharedDir);
|
|
100
89
|
|
|
101
90
|
const contract = JSON.parse(fs.readFileSync(contractPath, "utf8"));
|
|
102
|
-
contract.contract_hash =
|
|
91
|
+
contract.contract_hash = currentHash;
|
|
103
92
|
contract.last_updated = new Date().toISOString();
|
|
104
93
|
fs.writeFileSync(contractPath, JSON.stringify(contract, null, 2));
|
|
105
94
|
}
|
|
@@ -339,36 +328,111 @@ export function createBackendFiles(spec: AppSpec) {
|
|
|
339
328
|
include: ["src/**/*.ts"],
|
|
340
329
|
});
|
|
341
330
|
|
|
342
|
-
|
|
343
|
-
|
|
331
|
+
const srcDir = path.join(targetDir, backendDir, "src");
|
|
332
|
+
ensureDir(path.join(srcDir, "database"));
|
|
333
|
+
ensureDir(path.join(srcDir, "repositories"));
|
|
334
|
+
ensureDir(path.join(srcDir, "services"));
|
|
335
|
+
|
|
336
|
+
writeTextFile(path.join(srcDir, "database/memoryDb.ts"), [
|
|
337
|
+
"import type { Customer, ReportMetric, Role, User } from \"../types/index.js\";",
|
|
344
338
|
"",
|
|
345
339
|
"const now = new Date().toISOString();",
|
|
346
340
|
"",
|
|
347
|
-
"export const
|
|
341
|
+
"export const rolesDb: Role[] = [",
|
|
348
342
|
" { id: \"role_admin\" as Role[\"id\"], name: \"Admin\", permissions: [\"users:manage\", \"reports:view\", \"customers:manage\"] },",
|
|
349
343
|
" { id: \"role_manager\" as Role[\"id\"], name: \"Manager\", permissions: [\"reports:view\", \"customers:manage\"] },",
|
|
350
344
|
" { id: \"role_viewer\" as Role[\"id\"], name: \"Viewer\", permissions: [\"reports:view\"] },",
|
|
351
345
|
"];",
|
|
352
346
|
"",
|
|
353
|
-
"export const
|
|
354
|
-
" { id: \"user_1\" as User[\"id\"], email: \"admin@example.com\", fullName: \"Admin User\", role: \"ADMIN\", createdAt: now },",
|
|
355
|
-
" { id: \"user_2\" as User[\"id\"], email: \"manager@example.com\", fullName: \"Sales Manager\", role: \"DEVELOPER\", createdAt: now },",
|
|
347
|
+
"export const usersDb: User[] = [",
|
|
348
|
+
" { id: \"user_1\" as User[\"id\"], email: \"admin@example.com\", fullName: \"Admin User\", role: \"ADMIN\", createdAt: now, updatedAt: now },",
|
|
349
|
+
" { id: \"user_2\" as User[\"id\"], email: \"manager@example.com\", fullName: \"Sales Manager\", role: \"DEVELOPER\", createdAt: now, updatedAt: now },",
|
|
356
350
|
"];",
|
|
357
351
|
"",
|
|
358
|
-
"export const
|
|
359
|
-
" { id: \"customer_1\" as Customer[\"id\"], name: \"Northwind\", ownerId:
|
|
360
|
-
" { id: \"customer_2\" as Customer[\"id\"], name: \"Acme Corp\", ownerId:
|
|
361
|
-
" { id: \"customer_3\" as Customer[\"id\"], name: \"Globex\", ownerId:
|
|
352
|
+
"export const customersDb: Customer[] = [",
|
|
353
|
+
" { id: \"customer_1\" as Customer[\"id\"], name: \"Northwind\", ownerId: usersDb[1].id, status: \"ACTIVE\", annualValue: 125000, createdAt: now, updatedAt: now },",
|
|
354
|
+
" { id: \"customer_2\" as Customer[\"id\"], name: \"Acme Corp\", ownerId: usersDb[1].id, status: \"LEAD\", annualValue: 82000, createdAt: now, updatedAt: now },",
|
|
355
|
+
" { id: \"customer_3\" as Customer[\"id\"], name: \"Globex\", ownerId: usersDb[0].id, status: \"AT_RISK\", annualValue: 54000, createdAt: now, updatedAt: now },",
|
|
362
356
|
"];",
|
|
363
357
|
"",
|
|
364
|
-
"export const
|
|
358
|
+
"export const reportsDb: ReportMetric[] = [",
|
|
365
359
|
" { id: \"report_pipeline\" as ReportMetric[\"id\"], label: \"Pipeline\", value: 261000, trend: \"UP\" },",
|
|
366
360
|
" { id: \"report_active_customers\" as ReportMetric[\"id\"], label: \"Active Customers\", value: 1, trend: \"FLAT\" },",
|
|
367
361
|
" { id: \"report_risk\" as ReportMetric[\"id\"], label: \"At Risk\", value: 1, trend: \"DOWN\" },",
|
|
368
362
|
"];",
|
|
363
|
+
].join("\n"));
|
|
364
|
+
|
|
365
|
+
writeTextFile(path.join(srcDir, "repositories/user.repository.ts"), [
|
|
366
|
+
"import { usersDb } from \"../database/memoryDb.js\";",
|
|
367
|
+
"import type { User } from \"../types/index.js\";",
|
|
369
368
|
"",
|
|
370
|
-
"export
|
|
371
|
-
"
|
|
369
|
+
"export class UserRepository {",
|
|
370
|
+
" async findAll(): Promise<User[]> {",
|
|
371
|
+
" return usersDb.filter(u => !u.deletedAt);",
|
|
372
|
+
" }",
|
|
373
|
+
"",
|
|
374
|
+
" async findByEmail(email: string): Promise<User | null> {",
|
|
375
|
+
" return usersDb.find(u => u.email === email && !u.deletedAt) || null;",
|
|
376
|
+
" }",
|
|
377
|
+
"}",
|
|
378
|
+
].join("\n"));
|
|
379
|
+
|
|
380
|
+
writeTextFile(path.join(srcDir, "repositories/customer.repository.ts"), [
|
|
381
|
+
"import { customersDb } from \"../database/memoryDb.js\";",
|
|
382
|
+
"import type { Customer } from \"../types/index.js\";",
|
|
383
|
+
"",
|
|
384
|
+
"export class CustomerRepository {",
|
|
385
|
+
" async findAll(): Promise<Customer[]> {",
|
|
386
|
+
" return customersDb.filter(c => !c.deletedAt);",
|
|
387
|
+
" }",
|
|
388
|
+
"}",
|
|
389
|
+
].join("\n"));
|
|
390
|
+
|
|
391
|
+
writeTextFile(path.join(srcDir, "repositories/role.repository.ts"), [
|
|
392
|
+
"import { rolesDb } from \"../database/memoryDb.js\";",
|
|
393
|
+
"import type { Role } from \"../types/index.js\";",
|
|
394
|
+
"",
|
|
395
|
+
"export class RoleRepository {",
|
|
396
|
+
" async findAll(): Promise<Role[]> {",
|
|
397
|
+
" return rolesDb;",
|
|
398
|
+
" }",
|
|
399
|
+
"}",
|
|
400
|
+
].join("\n"));
|
|
401
|
+
|
|
402
|
+
writeTextFile(path.join(srcDir, "repositories/report.repository.ts"), [
|
|
403
|
+
"import { reportsDb } from \"../database/memoryDb.js\";",
|
|
404
|
+
"import type { ReportMetric } from \"../types/index.js\";",
|
|
405
|
+
"",
|
|
406
|
+
"export class ReportRepository {",
|
|
407
|
+
" async findAll(): Promise<ReportMetric[]> {",
|
|
408
|
+
" return reportsDb;",
|
|
409
|
+
" }",
|
|
410
|
+
"}",
|
|
411
|
+
].join("\n"));
|
|
412
|
+
|
|
413
|
+
writeTextFile(path.join(srcDir, "services/dashboard.service.ts"), [
|
|
414
|
+
"import { UserRepository } from \"../repositories/user.repository.js\";",
|
|
415
|
+
"import { CustomerRepository } from \"../repositories/customer.repository.js\";",
|
|
416
|
+
"import { RoleRepository } from \"../repositories/role.repository.js\";",
|
|
417
|
+
"import { ReportRepository } from \"../repositories/report.repository.js\";",
|
|
418
|
+
"import type { DashboardSummary } from \"../types/index.js\";",
|
|
419
|
+
"",
|
|
420
|
+
"export class DashboardService {",
|
|
421
|
+
" private userRepo = new UserRepository();",
|
|
422
|
+
" private customerRepo = new CustomerRepository();",
|
|
423
|
+
" private roleRepo = new RoleRepository();",
|
|
424
|
+
" private reportRepo = new ReportRepository();",
|
|
425
|
+
"",
|
|
426
|
+
" async getSummary(): Promise<DashboardSummary> {",
|
|
427
|
+
" const [users, customers, roles, reports] = await Promise.all([",
|
|
428
|
+
" this.userRepo.findAll(),",
|
|
429
|
+
" this.customerRepo.findAll(),",
|
|
430
|
+
" this.roleRepo.findAll(),",
|
|
431
|
+
" this.reportRepo.findAll(),",
|
|
432
|
+
" ]);",
|
|
433
|
+
"",
|
|
434
|
+
" return { users, customers, roles, reports };",
|
|
435
|
+
" }",
|
|
372
436
|
"}",
|
|
373
437
|
].join("\n"));
|
|
374
438
|
|
|
@@ -376,22 +440,45 @@ export function createBackendFiles(spec: AppSpec) {
|
|
|
376
440
|
"import Fastify from \"fastify\";",
|
|
377
441
|
"import cors from \"@fastify/cors\";",
|
|
378
442
|
"import { z } from \"zod\";",
|
|
379
|
-
"import {
|
|
443
|
+
"import { UserRepository } from \"./repositories/user.repository.js\";",
|
|
444
|
+
"import { CustomerRepository } from \"./repositories/customer.repository.js\";",
|
|
445
|
+
"import { RoleRepository } from \"./repositories/role.repository.js\";",
|
|
446
|
+
"import { ReportRepository } from \"./repositories/report.repository.js\";",
|
|
447
|
+
"import { DashboardService } from \"./services/dashboard.service.js\";",
|
|
380
448
|
"",
|
|
381
449
|
"const app = Fastify({ logger: true });",
|
|
382
450
|
"await app.register(cors, { origin: true });",
|
|
383
451
|
"",
|
|
452
|
+
"const userRepo = new UserRepository();",
|
|
453
|
+
"const customerRepo = new CustomerRepository();",
|
|
454
|
+
"const roleRepo = new RoleRepository();",
|
|
455
|
+
"const reportRepo = new ReportRepository();",
|
|
456
|
+
"const dashboardService = new DashboardService();",
|
|
457
|
+
"",
|
|
384
458
|
"app.get(\"/health\", async () => ({ ok: true, service: \"agent-enderun-backend\" }));",
|
|
385
|
-
"app.get(\"/api/v1/dashboard\", async () =>
|
|
386
|
-
"
|
|
387
|
-
"
|
|
388
|
-
"
|
|
459
|
+
"app.get(\"/api/v1/dashboard\", async () => {",
|
|
460
|
+
" const summary = await dashboardService.getSummary();",
|
|
461
|
+
" return { data: summary };",
|
|
462
|
+
"});",
|
|
463
|
+
"app.get(\"/api/v1/users\", async () => {",
|
|
464
|
+
" const users = await userRepo.findAll();",
|
|
465
|
+
" return { data: users };",
|
|
466
|
+
"});",
|
|
467
|
+
"app.get(\"/api/v1/roles\", async () => {",
|
|
468
|
+
" const roles = await roleRepo.findAll();",
|
|
469
|
+
" return { data: roles };",
|
|
470
|
+
"});",
|
|
471
|
+
"app.get(\"/api/v1/customers\", async () => {",
|
|
472
|
+
" const customers = await customerRepo.findAll();",
|
|
473
|
+
" return { data: customers };",
|
|
474
|
+
"});",
|
|
389
475
|
"app.get(\"/api/v1/reports\", async (request, reply) => {",
|
|
390
476
|
" interface QueryParams {",
|
|
391
477
|
" page?: number;",
|
|
392
478
|
" limit?: number;",
|
|
393
479
|
" }",
|
|
394
480
|
" const { page = 1, limit = 10 } = request.query as QueryParams;",
|
|
481
|
+
" const reports = await reportRepo.findAll();",
|
|
395
482
|
" const startIndex = (Number(page) - 1) * Number(limit);",
|
|
396
483
|
" const endIndex = startIndex + Number(limit);",
|
|
397
484
|
" const paginatedReports = reports.slice(startIndex, endIndex);",
|
|
@@ -409,7 +496,11 @@ export function createBackendFiles(spec: AppSpec) {
|
|
|
409
496
|
" const body = z.object({ email: z.string().email(), password: z.string().min(1) }).safeParse(request.body);",
|
|
410
497
|
" if (!body.success) return reply.code(400).send({ error: { code: \"VALIDATION_ERROR\", message: \"Invalid login payload\" } });",
|
|
411
498
|
"",
|
|
412
|
-
" const user =
|
|
499
|
+
" const user = await userRepo.findByEmail(body.data.email);",
|
|
500
|
+
" if (!user) {",
|
|
501
|
+
" const allUsers = await userRepo.findAll();",
|
|
502
|
+
" return { data: { user: allUsers[0], token: \"demo-token\", expiresAt: new Date(Date.now() + 3600000).toISOString() } };",
|
|
503
|
+
" }",
|
|
413
504
|
" return { data: { user, token: \"demo-token\", expiresAt: new Date(Date.now() + 3600000).toISOString() } };",
|
|
414
505
|
"});",
|
|
415
506
|
"",
|
package/src/cli/utils/fs.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
+
import crypto from "crypto";
|
|
3
4
|
|
|
4
5
|
import { remapFrameworkContent } from "../adapters.js"; // Import from the new adapters.js
|
|
5
6
|
import type { AdapterId } from "../adapters.js";
|
|
@@ -156,3 +157,19 @@ export function collectFiles(dir: string, extensions: string[]): string[] {
|
|
|
156
157
|
});
|
|
157
158
|
return results;
|
|
158
159
|
}
|
|
160
|
+
|
|
161
|
+
export function computeTypesHash(projectRoot: string, sharedDir: string): string {
|
|
162
|
+
const walk = (d: string): string[] => fs.readdirSync(d, { withFileTypes: true }).flatMap((e) => {
|
|
163
|
+
const fullPath = path.join(d, e.name);
|
|
164
|
+
return e.isDirectory() ? walk(fullPath) : (e.name.endsWith(".ts") ? [fullPath] : []);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const hash = crypto.createHash("sha256");
|
|
168
|
+
for (const filePath of walk(sharedDir).sort()) {
|
|
169
|
+
hash.update(path.relative(projectRoot, filePath));
|
|
170
|
+
hash.update("\0");
|
|
171
|
+
hash.update(fs.readFileSync(filePath));
|
|
172
|
+
hash.update("\0");
|
|
173
|
+
}
|
|
174
|
+
return hash.digest("hex");
|
|
175
|
+
}
|
package/src/cli/utils/memory.ts
CHANGED
|
@@ -24,7 +24,10 @@ function findFrameworkDir(basePath: string): string | null {
|
|
|
24
24
|
for (const dir of FRAMEWORK_DIR_CANDIDATES) {
|
|
25
25
|
const dirPath = path.join(basePath, dir);
|
|
26
26
|
if (fs.existsSync(dirPath) && fs.lstatSync(dirPath).isDirectory()) {
|
|
27
|
-
|
|
27
|
+
const hasMemory = fs.existsSync(path.join(dirPath, "PROJECT_MEMORY.md")) ||
|
|
28
|
+
fs.existsSync(path.join(dirPath, "memory/PROJECT_MEMORY.md")) ||
|
|
29
|
+
fs.existsSync(path.join(dirPath, "config.json"));
|
|
30
|
+
if (hasMemory) return dirPath;
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
33
|
return null;
|
|
@@ -121,6 +124,13 @@ export function initializeMemory(memoryPath: string, targetBase: string, dryRun
|
|
|
121
124
|
if (!fs.existsSync(parentDir)) fs.mkdirSync(parentDir, { recursive: true });
|
|
122
125
|
fs.writeFileSync(memoryPath, template);
|
|
123
126
|
console.warn("✅ PROJECT_MEMORY.md initialized.");
|
|
127
|
+
|
|
128
|
+
const decisionsPath = path.join(parentDir, "DECISIONS.md");
|
|
129
|
+
if (!fs.existsSync(decisionsPath)) {
|
|
130
|
+
const decisionsTemplate = "# 🏛️ Architectural Decisions Log (ADR)\n\nThis file contains the fixed architectural choices and constraints for this project.\n\n## Decided Constraints\n- **Framework Integration:** Agent Enderun is the primary governance and orchestration layer.\n- **Language & Runtime:** TypeScript on Node.js.\n- **Package Manager:** npm.\n- **Monorepo Structure:** Monorepo using npm workspaces.\n- **Styling:** Panda CSS.\n";
|
|
131
|
+
fs.writeFileSync(decisionsPath, decisionsTemplate);
|
|
132
|
+
console.warn("✅ DECISIONS.md initialized.");
|
|
133
|
+
}
|
|
124
134
|
}
|
|
125
135
|
|
|
126
136
|
export function updateProjectMemory(section: string, content: string) {
|
|
@@ -20,7 +20,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
20
20
|
tags: ["core", "orchestration"],
|
|
21
21
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
22
22
|
tools: ["orchestrate_loop", "send_agent_message", "view_file", "list_dir", "grep_search"],
|
|
23
|
-
instructions: "You represent the Enderun Discipline (Osmanlı Nizami). Your word is the law for the specialists. Delegate tasks with precision."
|
|
23
|
+
instructions: "You represent the Enderun Discipline (Osmanlı Nizami). Your word is the law for the specialists. Delegate tasks with precision using the send_agent_message tool. Enforce the Zero-Mock, Zero-UI-Library, and Branded Types policies strictly. Audit all specialist outputs and handle high-risk actions through the human-in-the-loop approval flow (managerApproval) via the approve command. Always sync active memory in PROJECT_MEMORY.md."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
name: "architect",
|
|
@@ -31,7 +31,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
31
31
|
tags: ["core", "design"],
|
|
32
32
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
33
33
|
tools: ["view_file", "write_file", "replace_text", "list_dir", "grep_search"],
|
|
34
|
-
instructions: "Design the project's foundation. Design must be flawless and adhere to the Nizam."
|
|
34
|
+
instructions: "Design the project's foundation. Design must be flawless and adhere to the Nizam. You possess the Control Plane Governance & Locking skill. Always prioritize reading rules and governance documents before designing contracts. Ensure type contract stability (contract.version.json), strictly forbid 'any' type, and enforce type safety across all boundaries."
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
name: "backend",
|
|
@@ -42,7 +42,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
42
42
|
tags: ["core", "logic"],
|
|
43
43
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
44
44
|
tools: ["view_file", "replace_text", "run_shell_command", "list_dir", "grep_search"],
|
|
45
|
-
instructions: "Focus on server logic and databases. Any deviation from the Ferman is a breach of discipline."
|
|
45
|
+
instructions: "Focus on server logic and databases. Any deviation from the Ferman is a breach of discipline. You possess the Database Management & Migrations skill. Always prioritize reading rules and skills/database_management.md before writing API handlers or database code. Strictly enforce Branded Types for all IDs, use Kysely for queries (strictly forbid raw SQL strings), isolate queries in repository/service layers (forbid direct DB calls in controllers), and use robust try/catch blocks for error handling. You are strictly prohibited from performing High-Risk Administrative Operations (User/role management, bulk deletes, schema alterations, billing changes) autonomously. If requested, you must return a standard refusal, write a managerApproval request via send_agent_message to @manager, and shift to WAITING status."
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
name: "frontend",
|
|
@@ -53,7 +53,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
53
53
|
tags: ["core", "ui"],
|
|
54
54
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
55
55
|
tools: ["view_file", "replace_text", "list_dir", "grep_search"],
|
|
56
|
-
instructions: "Build elegant and
|
|
56
|
+
instructions: "Build elegant, disciplined, and 100% responsive UIs. Always prioritize reading design standards and guidelines (like component-patterns.md) under docs/ or the framework's knowledge directory before starting any UI task. Enforce Mobile-First design, object-based responsive syntax ({ base: '...', md: '...' }), dynamic viewport units (dvh, dvw), and type-safe Panda CSS tokens. Never use external UI libraries. You are strictly prohibited from creating administrative UI elements (user/role management pages, billing pages, raw schema management tools) autonomously. Redirect such requests to @manager and request approval."
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
name: "quality",
|
|
@@ -64,7 +64,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
64
64
|
tags: ["core", "audit"],
|
|
65
65
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
66
66
|
tools: ["run_shell_command", "view_file", "list_dir", "grep_search"],
|
|
67
|
-
instructions: "You are the inspector of the Nizam. Ensure every unit's work is perfect."
|
|
67
|
+
instructions: "You are the inspector of the Nizam. Ensure every unit's work is perfect. You possess the Quality Assurance & Testing skill. Always prioritize reading skills/quality_assurance.md (or equivalent inside the framework's skills directory) before performing audits, running linting, or checking coverage."
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
name: "database",
|
|
@@ -75,7 +75,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
75
75
|
tags: ["core", "data"],
|
|
76
76
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
77
77
|
tools: ["view_file", "replace_text", "run_shell_command", "list_dir"],
|
|
78
|
-
instructions: "Manage data as the empire's treasury. Secure and optimized."
|
|
78
|
+
instructions: "Manage data as the empire's treasury. Secure and optimized. You possess the Database Management & Migrations skill. Always prioritize reading skills/database_management.md (or equivalent inside the framework's skills directory) before modifying databases, designing schemas, or creating migrations."
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
name: "devops",
|
|
@@ -86,7 +86,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
86
86
|
tags: ["core", "infra"],
|
|
87
87
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
88
88
|
tools: ["run_shell_command", "view_file", "list_dir"],
|
|
89
|
-
instructions: "Maintain reliable supply lines and systems like fortresses."
|
|
89
|
+
instructions: "Maintain reliable supply lines and systems like fortresses. You possess the DevOps & Infrastructure skill. Always prioritize reading skills/devops_infrastructure.md (or equivalent inside the framework's skills directory) before managing CI/CD pipelines, containerization, or editing deployment configurations."
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
name: "explorer",
|
|
@@ -97,7 +97,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
97
97
|
tags: ["core", "recon"],
|
|
98
98
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
99
99
|
tools: ["view_file", "list_dir", "grep_search", "glob"],
|
|
100
|
-
instructions: "Gather tactical intelligence and map dependencies for the Manager."
|
|
100
|
+
instructions: "Gather tactical intelligence and map dependencies for the Manager. You possess the Reconnaissance & Context Discovery skill. Strictly execute the Architecture Discovery Protocol (ADP): identify main entry points (index.ts, main.ts), scan domain structures, and map file dependencies. You operate strictly in read-only mode; never suggest, write, or modify codebase files directly."
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
name: "git",
|
|
@@ -108,7 +108,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
108
108
|
tags: ["core", "logistics"],
|
|
109
109
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
110
110
|
tools: ["run_shell_command", "view_file", "list_dir"],
|
|
111
|
-
instructions: "Manage the scrolls of history. Every commit must be atomic and traceable."
|
|
111
|
+
instructions: "Manage the scrolls of history. Every commit must be atomic and traceable. You possess the Version Control skill. Strictly enforce that every git commit message is prefixed with the active Trace ID (e.g., '[TraceId] Description') to maintain traceability, ensure all commits are atomic (containing a single logical change), and follow standard git-flow branching rules."
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
name: "mobile",
|
|
@@ -119,7 +119,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
119
119
|
tags: ["core", "mobile"],
|
|
120
120
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
121
121
|
tools: ["view_file", "replace_text", "list_dir", "grep_search"],
|
|
122
|
-
instructions: "
|
|
122
|
+
instructions: "Build highly performant and responsive React Native / Expo mobile UIs. Always prioritize reading mobile design guidelines (like mobile-standards.md) under docs/ or the framework's knowledge directory before starting. Adhere strictly to Mobile Standards, using dynamic window dimensions calculated via useWindowDimensions hook, Expo SafeAreaProvider and SafeAreaView wrapper integration, and dynamic scaling. Completely forbid hardcoded fixed pixel height/width values in layout structures (except small icons/avatars up to 48px)."
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
name: "native",
|
|
@@ -141,7 +141,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
141
141
|
tags: ["core", "security"],
|
|
142
142
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
143
143
|
tools: ["view_file", "replace_text", "grep_search", "run_shell_command"],
|
|
144
|
-
instructions: "Guardian of the Nizam. block any action that endangers the project."
|
|
144
|
+
instructions: "Guardian of the Nizam. block any action that endangers the project. You possess the Control Plane Governance & Locking skill. Enforce multi-tenant Row Level Security (RLS) policies on the database, ensure strict encryption standards, manage security key rotation, and block any commits or files containing hardcoded secrets (API keys, passwords, private keys)."
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
name: "analyst",
|
|
@@ -152,7 +152,7 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
152
152
|
tags: ["core", "strategy"],
|
|
153
153
|
stateMachine: "../schema/agent-lifecycle-schema.json",
|
|
154
154
|
tools: ["view_file", "list_dir", "grep_search"],
|
|
155
|
-
instructions: "Audit of truth and contracts within the Army."
|
|
155
|
+
instructions: "Audit of truth and contracts within the Army. You possess the Strategy Analysis & Specification Validation skill. Verify that user requirements (from docs/ or specifications) are correctly mapped to API schemas and types, enforce the Contract-First development model strictly before any application code is written, and validate that API versioning changes are correctly registered in contract.version.json."
|
|
156
156
|
}
|
|
157
157
|
];
|
|
158
158
|
|
|
@@ -6,27 +6,66 @@
|
|
|
6
6
|
export const CORE_SKILLS = {
|
|
7
7
|
FILE_SYSTEM: {
|
|
8
8
|
name: "File System Mastery",
|
|
9
|
-
tools: ["
|
|
10
|
-
|
|
9
|
+
tools: ["read_file", "write_file"],
|
|
10
|
+
description: "Enables reading and writing files in the workspace with token efficiency.",
|
|
11
|
+
mandates: [
|
|
12
|
+
"- **Token Efficiency:** When reading large files, always specify `startLine` and `endLine` to avoid loading the entire file content into context.",
|
|
13
|
+
"- **Surgical Changes:** Avoid overwriting entire files for small updates; prefer surgical edit tools."
|
|
14
|
+
]
|
|
11
15
|
},
|
|
12
16
|
EDITING: {
|
|
13
17
|
name: "Surgical Code Modification",
|
|
14
18
|
tools: ["replace_text", "patch_file"],
|
|
15
|
-
|
|
19
|
+
description: "Enables surgical, precise edits to source code files without overwriting the entire content.",
|
|
20
|
+
mandates: [
|
|
21
|
+
"- **Precise Selection:** Ensure `oldText` matches the target string exactly, including all whitespace and indentation.",
|
|
22
|
+
"- **Line-based Replacement:** Use `patch_file` for multi-line block updates, specifying exact 1-indexed start and end lines."
|
|
23
|
+
]
|
|
16
24
|
},
|
|
17
25
|
ORCHESTRATION: {
|
|
18
|
-
name: "Hermes Orchestration",
|
|
19
|
-
tools: ["orchestrate_loop", "send_agent_message", "
|
|
20
|
-
|
|
26
|
+
name: "Hermes Orchestration & Messaging",
|
|
27
|
+
tools: ["orchestrate_loop", "send_agent_message", "get_framework_status", "log_agent_action"],
|
|
28
|
+
description: "Governs inter-agent message passing, task delegation, and execution logs using the Hermes Message Broker.",
|
|
29
|
+
mandates: [
|
|
30
|
+
"- **Traceability:** Always include the active `traceId` in all messages and action logs.",
|
|
31
|
+
"- **Action Logs:** Log critical operations with `log_agent_action` to ensure transparency and accountability.",
|
|
32
|
+
"- **Message Loops:** Run `orchestrate_loop` to process queued messages and trigger state transitions."
|
|
33
|
+
]
|
|
21
34
|
},
|
|
22
|
-
|
|
23
|
-
name: "
|
|
24
|
-
tools: ["
|
|
25
|
-
|
|
35
|
+
GOVERNANCE: {
|
|
36
|
+
name: "Control Plane Governance & Locking",
|
|
37
|
+
tools: ["acquire_lock", "release_lock", "register_agent", "update_contract_hash"],
|
|
38
|
+
description: "Governs access control, resource locking, type contract validation, and agent registration.",
|
|
39
|
+
mandates: [
|
|
40
|
+
"- **Locking Protocol:** Always acquire a lock via `acquire_lock` on shared resources (like memory files) before editing, and release it immediately after writing.",
|
|
41
|
+
"- **Contract Enforcement:** Run `update_contract_hash` to re-sync backend types and check for breaking API changes."
|
|
42
|
+
]
|
|
26
43
|
},
|
|
27
|
-
|
|
28
|
-
name: "
|
|
29
|
-
tools: ["
|
|
30
|
-
|
|
44
|
+
QUALITY_ASSURANCE: {
|
|
45
|
+
name: "Quality Assurance & Testing",
|
|
46
|
+
tools: ["run_shell_command", "view_file"],
|
|
47
|
+
description: "Enforces testing coverage standards, code style compliance, and runs test suites.",
|
|
48
|
+
mandates: [
|
|
49
|
+
"- **Zero-Mock Policy:** Integration tests must use real test database connections or service-compatible backends; do not rely on fake mocks.",
|
|
50
|
+
"- **Coverage Standards:** Ensure new code meets the 80% test coverage threshold before transitioning to release phases."
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
DATABASE_MANAGEMENT: {
|
|
54
|
+
name: "Database Management & Migrations",
|
|
55
|
+
tools: ["view_file", "replace_text", "run_shell_command"],
|
|
56
|
+
description: "Handles database migrations, schema design, and query optimization.",
|
|
57
|
+
mandates: [
|
|
58
|
+
"- **No Direct DB Calls in Controllers:** Database operations must be isolated inside repository or service files; controllers must never perform raw DB calls.",
|
|
59
|
+
"- **No Raw SQL Strings:** Do not write raw SQL query strings; strictly use type-safe query builders like Kysely."
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
DEVOPS_INFRASTRUCTURE: {
|
|
63
|
+
name: "DevOps & Infrastructure",
|
|
64
|
+
tools: ["run_shell_command", "view_file"],
|
|
65
|
+
description: "Manages CI/CD pipelines, container configurations, env files, and deployments.",
|
|
66
|
+
mandates: [
|
|
67
|
+
"- **No Hardcoded Secrets:** Never embed API keys, secrets, or passwords inside configuration files or codebases.",
|
|
68
|
+
"- **Immutable Deploys:** Ensure build steps compile production bundles successfully without configuration side-effects."
|
|
69
|
+
]
|
|
31
70
|
}
|
|
32
71
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Enderun Agent Lifecycle",
|
|
3
|
+
"initialState": "INIT",
|
|
4
|
+
"states": {
|
|
5
|
+
"INIT": {
|
|
6
|
+
"description": "Agent loaded and parsing initial workspace state.",
|
|
7
|
+
"transitions": {
|
|
8
|
+
"RESOLVED": "READY"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"READY": {
|
|
12
|
+
"description": "Agent is idle and listening for Hermes message cues.",
|
|
13
|
+
"transitions": {
|
|
14
|
+
"DELEGATED": "PLANNING"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"PLANNING": {
|
|
18
|
+
"description": "Agent is creating a strategic task division plan.",
|
|
19
|
+
"transitions": {
|
|
20
|
+
"PLAN_READY": "EXECUTING",
|
|
21
|
+
"ABORTED": "FAILED"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"EXECUTING": {
|
|
25
|
+
"description": "Agent is running shell scripts, file tools or code modifications.",
|
|
26
|
+
"transitions": {
|
|
27
|
+
"DELEGATE_REQUIRED": "DELEGATING",
|
|
28
|
+
"RUN_COMPLETE": "VERIFYING",
|
|
29
|
+
"CRASHED": "FAILED"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"DELEGATING": {
|
|
33
|
+
"description": "Agent is blocked waiting for sub-agent results.",
|
|
34
|
+
"transitions": {
|
|
35
|
+
"SUBTASK_RETURNED": "EXECUTING",
|
|
36
|
+
"SUBTASK_TIMEOUT": "FAILED"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"VERIFYING": {
|
|
40
|
+
"description": "Agent runs linting, testing, and compliance on the outputs.",
|
|
41
|
+
"transitions": {
|
|
42
|
+
"COMPLIANT": "COMPLETED",
|
|
43
|
+
"NON_COMPLIANT": "FAILED"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"COMPLETED": {
|
|
47
|
+
"description": "Task sequence finalized successfully.",
|
|
48
|
+
"transitions": {
|
|
49
|
+
"RESET": "READY"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"FAILED": {
|
|
53
|
+
"description": "Validation failed, trace aborted.",
|
|
54
|
+
"transitions": {
|
|
55
|
+
"RETRY": "READY"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ConfigurationError } from "./errors.js";
|
|
3
|
+
|
|
4
|
+
// Define the schema for framework configuration
|
|
5
|
+
const ConfigSchema = z.object({
|
|
6
|
+
nodeEnv: z.enum(["development", "production", "test"]).default("development"),
|
|
7
|
+
logLevel: z.enum(["DEBUG", "INFO", "WARN", "ERROR", "FATAL"]).default("INFO"),
|
|
8
|
+
projectRoot: z.string().default(process.cwd()),
|
|
9
|
+
skipInstall: z.boolean().default(false),
|
|
10
|
+
mcpServerPort: z.preprocess((val) => {
|
|
11
|
+
if (typeof val === "string") {
|
|
12
|
+
const parsed = parseInt(val, 10);
|
|
13
|
+
return isNaN(parsed) ? undefined : parsed;
|
|
14
|
+
}
|
|
15
|
+
return val;
|
|
16
|
+
}, z.number().int().min(1024).max(65535).optional()),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type AppConfig = z.infer<typeof ConfigSchema>;
|
|
20
|
+
|
|
21
|
+
class ConfigurationManager {
|
|
22
|
+
private static instance: ConfigurationManager;
|
|
23
|
+
private config!: AppConfig;
|
|
24
|
+
|
|
25
|
+
private constructor() {
|
|
26
|
+
this.load();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public static getInstance(): ConfigurationManager {
|
|
30
|
+
if (!ConfigurationManager.instance) {
|
|
31
|
+
ConfigurationManager.instance = new ConfigurationManager();
|
|
32
|
+
}
|
|
33
|
+
return ConfigurationManager.instance;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
private load(): void {
|
|
37
|
+
try {
|
|
38
|
+
const rawConfig = {
|
|
39
|
+
nodeEnv: process.env.NODE_ENV,
|
|
40
|
+
logLevel: process.env.LOG_LEVEL || (process.env.NODE_ENV === "production" ? "INFO" : "DEBUG"),
|
|
41
|
+
projectRoot: process.env.ENDERUN_PROJECT_ROOT || process.cwd(),
|
|
42
|
+
skipInstall: process.env.ENDERUN_SKIP_INSTALL === "1" || process.env.ENDERUN_SKIP_INSTALL === "true",
|
|
43
|
+
mcpServerPort: process.env.MCP_SERVER_PORT,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const parsed = ConfigSchema.safeParse(rawConfig);
|
|
47
|
+
if (!parsed.success) {
|
|
48
|
+
throw new ConfigurationError(
|
|
49
|
+
"Failed to validate environment configuration parameters",
|
|
50
|
+
parsed.error.format()
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Freeze the configuration to prevent modifications at runtime
|
|
55
|
+
this.config = Object.freeze(parsed.data);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
if (err instanceof ConfigurationError) {
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
throw new ConfigurationError(`Failed to load system configuration: ${err}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Gets the read-only, validated system configuration object.
|
|
66
|
+
*/
|
|
67
|
+
public get(): AppConfig {
|
|
68
|
+
return this.config;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const configManager = ConfigurationManager.getInstance();
|
|
73
|
+
export const currentConfig = configManager.get();
|