agent-enderun 1.1.2 ā 1.1.3
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/ENDERUN.md ā ENDERUN.md} +25 -25
- package/README.md +6 -6
- package/bin/compile.js +13 -14
- package/bin/enderun-dashboard.js +866 -0
- package/bin/generate-cursor-rules.js +78 -0
- package/bin/test-init-run.js +37 -26
- package/bin/validate-agent-army.js +65 -67
- package/bin/watch-memory.js +54 -0
- package/dist/framework-mcp/src/index.js +1 -1
- package/dist/framework-mcp/src/tools/control_plane/locking.d.ts +15 -0
- package/dist/framework-mcp/src/tools/control_plane/locking.js +65 -0
- package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -0
- package/dist/framework-mcp/src/tools/control_plane/registry.d.ts +12 -0
- package/dist/framework-mcp/src/tools/control_plane/registry.js +35 -0
- package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -0
- package/dist/framework-mcp/src/tools/definitions.js +46 -7
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/write_file.js +16 -2
- package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/index.d.ts +1 -1
- package/dist/framework-mcp/src/tools/index.js +5 -0
- package/dist/framework-mcp/src/tools/index.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.d.ts +1 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.js +2 -4
- package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
- package/dist/framework-mcp/src/utils/metrics.d.ts +10 -0
- package/dist/framework-mcp/src/utils/metrics.js +39 -0
- package/dist/framework-mcp/src/utils/metrics.js.map +1 -0
- package/dist/framework-mcp/src/utils/security.js +7 -3
- package/dist/framework-mcp/src/utils/security.js.map +1 -1
- package/dist/init-adapters/antigravity-cli/.agents/BRAIN_DASHBOARD.md +11 -0
- package/dist/init-adapters/antigravity-cli/.agents/STATUS.md +3 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/analyst/agent.json +28 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/architect/agent.json +30 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/backend/agent.json +30 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/database/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/devops/agent.json +28 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/explorer/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/frontend/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/git/agent.json +28 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/manager/agent.json +30 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/mobile/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/native/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/quality/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/agents/security/agent.json +29 -0
- package/dist/init-adapters/antigravity-cli/.agents/cli-commands.json +32 -0
- package/dist/init-adapters/antigravity-cli/.agents/config.json +12 -0
- package/dist/init-adapters/antigravity-cli/.agents/mcp_config.json +13 -0
- package/dist/init-adapters/antigravity-cli/.agents/memory/PROJECT_MEMORY.md +8 -0
- package/dist/init-adapters/antigravity-cli/.agents/skills/discovery.md +3 -0
- package/dist/init-adapters/antigravity-cli/.agents/skills/editing.md +3 -0
- package/dist/init-adapters/antigravity-cli/.agents/skills/execution.md +4 -0
- package/dist/init-adapters/antigravity-cli/.agents/skills/file_system.md +4 -0
- package/dist/init-adapters/antigravity-cli/.agents/skills/orchestration.md +3 -0
- package/dist/init-adapters/antigravity-cli/AGENTS.md +1 -0
- package/dist/init-adapters/antigravity-cli/ENDERUN.md +263 -0
- package/dist/init-adapters/antigravity-cli/mcp.json +13 -0
- package/dist/init-adapters/antigravity-cli/package.json +5 -0
- package/dist/init-adapters/antigravity-cli/panda.config.ts +2 -0
- package/dist/init-adapters/claude/.claude/BRAIN_DASHBOARD.md +11 -0
- package/dist/init-adapters/claude/.claude/STATUS.md +3 -0
- package/dist/init-adapters/claude/.claude/agents/analyst.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/architect.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/backend.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/database.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/devops.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/explorer.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/frontend.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/git.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/manager.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/mobile.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/native.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/quality.md +15 -0
- package/dist/init-adapters/claude/.claude/agents/security.md +15 -0
- package/dist/init-adapters/claude/.claude/cli-commands.json +32 -0
- package/dist/init-adapters/claude/.claude/config.json +12 -0
- package/dist/init-adapters/claude/.claude/mcp_config.json +13 -0
- package/dist/init-adapters/claude/.claude/memory/PROJECT_MEMORY.md +8 -0
- package/dist/init-adapters/claude/.claude/skills/discovery.md +3 -0
- package/dist/init-adapters/claude/.claude/skills/editing.md +3 -0
- package/dist/init-adapters/claude/.claude/skills/execution.md +4 -0
- package/dist/init-adapters/claude/.claude/skills/file_system.md +4 -0
- package/dist/init-adapters/claude/.claude/skills/orchestration.md +3 -0
- package/dist/init-adapters/claude/.mcp.json +13 -0
- package/dist/init-adapters/claude/CLAUDE.md +1 -0
- package/dist/init-adapters/claude/ENDERUN.md +263 -0
- package/dist/init-adapters/claude/mcp.json +13 -0
- package/dist/init-adapters/claude/package.json +5 -0
- package/dist/init-adapters/claude/panda.config.ts +2 -0
- package/dist/init-adapters/codex/.github/BRAIN_DASHBOARD.md +11 -0
- package/dist/init-adapters/codex/.github/STATUS.md +3 -0
- package/dist/init-adapters/codex/.github/agents/analyst.md +15 -0
- package/dist/init-adapters/codex/.github/agents/architect.md +15 -0
- package/dist/init-adapters/codex/.github/agents/backend.md +15 -0
- package/dist/init-adapters/codex/.github/agents/database.md +15 -0
- package/dist/init-adapters/codex/.github/agents/devops.md +15 -0
- package/dist/init-adapters/codex/.github/agents/explorer.md +15 -0
- package/dist/init-adapters/codex/.github/agents/frontend.md +15 -0
- package/dist/init-adapters/codex/.github/agents/git.md +15 -0
- package/dist/init-adapters/codex/.github/agents/manager.md +15 -0
- package/dist/init-adapters/codex/.github/agents/mobile.md +15 -0
- package/dist/init-adapters/codex/.github/agents/native.md +15 -0
- package/dist/init-adapters/codex/.github/agents/quality.md +15 -0
- package/dist/init-adapters/codex/.github/agents/security.md +15 -0
- package/dist/init-adapters/codex/.github/cli-commands.json +32 -0
- package/dist/init-adapters/codex/.github/config.json +12 -0
- package/dist/init-adapters/codex/.github/mcp_config.json +13 -0
- package/dist/init-adapters/codex/.github/memory/PROJECT_MEMORY.md +8 -0
- package/dist/init-adapters/codex/.github/skills/discovery.md +3 -0
- package/dist/init-adapters/codex/.github/skills/editing.md +3 -0
- package/dist/init-adapters/codex/.github/skills/execution.md +4 -0
- package/dist/init-adapters/codex/.github/skills/file_system.md +4 -0
- package/dist/init-adapters/codex/.github/skills/orchestration.md +3 -0
- package/dist/init-adapters/codex/.mcp.json +13 -0
- package/dist/init-adapters/codex/.vscode/mcp.json +13 -0
- package/dist/init-adapters/codex/ENDERUN.md +263 -0
- package/dist/init-adapters/codex/copilot-instructions.md +1 -0
- package/dist/init-adapters/codex/mcp.json +13 -0
- package/dist/init-adapters/codex/package.json +5 -0
- package/dist/init-adapters/codex/panda.config.ts +2 -0
- package/dist/init-adapters/cursor/.cursor/BRAIN_DASHBOARD.md +11 -0
- package/dist/init-adapters/cursor/.cursor/STATUS.md +3 -0
- package/dist/init-adapters/cursor/.cursor/agents/analyst.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/architect.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/backend.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/database.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/devops.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/explorer.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/frontend.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/git.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/manager.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/mobile.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/native.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/quality.md +15 -0
- package/dist/init-adapters/cursor/.cursor/agents/security.md +15 -0
- package/dist/init-adapters/cursor/.cursor/cli-commands.json +32 -0
- package/dist/init-adapters/cursor/.cursor/config.json +12 -0
- package/dist/init-adapters/cursor/.cursor/mcp.json +13 -0
- package/dist/init-adapters/cursor/.cursor/memory/PROJECT_MEMORY.md +8 -0
- package/dist/init-adapters/cursor/.cursor/skills/discovery.md +3 -0
- package/dist/init-adapters/cursor/.cursor/skills/editing.md +3 -0
- package/dist/init-adapters/cursor/.cursor/skills/execution.md +4 -0
- package/dist/init-adapters/cursor/.cursor/skills/file_system.md +4 -0
- package/dist/init-adapters/cursor/.cursor/skills/orchestration.md +3 -0
- package/dist/init-adapters/cursor/CURSOR.md +1 -0
- package/dist/init-adapters/cursor/ENDERUN.md +263 -0
- package/dist/init-adapters/cursor/mcp.json +13 -0
- package/dist/init-adapters/cursor/package.json +5 -0
- package/dist/init-adapters/cursor/panda.config.ts +2 -0
- package/dist/init-adapters/gemini/.gemini/BRAIN_DASHBOARD.md +11 -0
- package/dist/init-adapters/gemini/.gemini/STATUS.md +3 -0
- package/dist/init-adapters/gemini/.gemini/agents/analyst.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/architect.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/backend.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/database.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/devops.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/explorer.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/frontend.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/git.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/manager.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/mobile.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/native.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/quality.md +15 -0
- package/dist/init-adapters/gemini/.gemini/agents/security.md +15 -0
- package/dist/init-adapters/gemini/.gemini/cli-commands.json +32 -0
- package/dist/init-adapters/gemini/.gemini/config.json +12 -0
- package/dist/init-adapters/gemini/.gemini/mcp.json +13 -0
- package/dist/init-adapters/gemini/.gemini/memory/PROJECT_MEMORY.md +8 -0
- package/dist/init-adapters/gemini/.gemini/skills/discovery.md +3 -0
- package/dist/init-adapters/gemini/.gemini/skills/editing.md +3 -0
- package/dist/init-adapters/gemini/.gemini/skills/execution.md +4 -0
- package/dist/init-adapters/gemini/.gemini/skills/file_system.md +4 -0
- package/dist/init-adapters/gemini/.gemini/skills/orchestration.md +3 -0
- package/dist/init-adapters/gemini/ENDERUN.md +263 -0
- package/dist/init-adapters/gemini/GEMINI.md +1 -0
- package/dist/init-adapters/gemini/mcp.json +13 -0
- package/dist/init-adapters/gemini/package.json +5 -0
- package/dist/init-adapters/gemini/panda.config.ts +2 -0
- package/dist/init-adapters/grok/.grok/BRAIN_DASHBOARD.md +11 -0
- package/dist/init-adapters/grok/.grok/STATUS.md +3 -0
- package/dist/init-adapters/grok/.grok/agents/analyst.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/architect.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/backend.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/database.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/devops.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/explorer.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/frontend.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/git.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/manager.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/mobile.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/native.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/quality.md +15 -0
- package/dist/init-adapters/grok/.grok/agents/security.md +15 -0
- package/dist/init-adapters/grok/.grok/cli-commands.json +32 -0
- package/dist/init-adapters/grok/.grok/config.json +12 -0
- package/{.enderun ā dist/init-adapters/grok/.grok}/mcp_config.json +4 -2
- package/dist/init-adapters/grok/.grok/memory/PROJECT_MEMORY.md +8 -0
- package/dist/init-adapters/grok/.grok/skills/discovery.md +3 -0
- package/dist/init-adapters/grok/.grok/skills/editing.md +3 -0
- package/dist/init-adapters/grok/.grok/skills/execution.md +4 -0
- package/dist/init-adapters/grok/.grok/skills/file_system.md +4 -0
- package/dist/init-adapters/grok/.grok/skills/orchestration.md +3 -0
- package/dist/init-adapters/grok/ENDERUN.md +263 -0
- package/dist/init-adapters/grok/GROK.md +1 -0
- package/{mcp.json ā dist/init-adapters/grok/mcp.json} +4 -2
- package/dist/init-adapters/grok/package.json +5 -0
- package/dist/init-adapters/grok/panda.config.ts +2 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/mcp.json +13 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/mcp_config.json +13 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/analyst/agent.json +28 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/analyst.json +28 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/architect/agent.json +30 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/architect.json +30 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/backend/agent.json +30 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/backend.json +30 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/database/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/database.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/devops/agent.json +28 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/devops.json +28 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/explorer/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/explorer.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/frontend/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/frontend.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/git/agent.json +28 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/git.json +28 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/manager/agent.json +30 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/manager.json +30 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/mobile/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/mobile.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/native/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/native.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/quality/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/quality.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/security/agent.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/agents/security.json +29 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/hooks.json +4 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/mcp.json +13 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/mcp_config.json +13 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/plugin.json +5 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/analyst.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/architect.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/backend.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/database.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/devops.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/explorer.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/frontend.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/git.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/manager.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/mobile.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/native.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/quality.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/rules/security.md +11 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/skills/discovery.md +3 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/skills/editing.md +3 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/skills/execution.md +4 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/skills/file_system.md +4 -0
- package/dist/init-adapters/mock-home/.gemini/antigravity-cli/plugins/agent-enderun/skills/orchestration.md +3 -0
- package/dist/init-adapters/mock-home/Library/Application Support/Claude/claude_desktop_config.json +13 -0
- package/dist/src/cli/adapters/types.d.ts +14 -0
- package/dist/src/cli/adapters/types.js +2 -0
- package/dist/src/cli/adapters/types.js.map +1 -0
- package/dist/src/cli/adapters.d.ts +4 -22
- package/dist/src/cli/adapters.js +123 -141
- package/dist/src/cli/adapters.js.map +1 -1
- package/dist/src/cli/commands/check.d.ts +0 -5
- package/dist/src/cli/commands/check.js +64 -76
- package/dist/src/cli/commands/check.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts +1 -1
- package/dist/src/cli/commands/init.js +154 -319
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/log.d.ts +1 -0
- package/dist/src/cli/commands/log.js.map +1 -1
- package/dist/src/cli/commands/memory.js +2 -69
- package/dist/src/cli/commands/memory.js.map +1 -1
- package/dist/src/cli/commands/orchestrate.d.ts +19 -9
- package/dist/src/cli/commands/orchestrate.js +56 -77
- package/dist/src/cli/commands/orchestrate.js.map +1 -1
- package/dist/src/cli/index.js +112 -30
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/utils/app.d.ts +1 -2
- package/dist/src/cli/utils/app.js +2 -2
- package/dist/src/cli/utils/app.js.map +1 -1
- package/dist/src/cli/utils/config-schema.d.ts +139 -0
- package/dist/src/cli/utils/config-schema.js +43 -0
- package/dist/src/cli/utils/config-schema.js.map +1 -0
- package/dist/src/cli/utils/fs.d.ts +2 -4
- package/dist/src/cli/utils/fs.js +9 -26
- package/dist/src/cli/utils/fs.js.map +1 -1
- package/dist/src/cli/utils/memory.d.ts +4 -3
- package/dist/src/cli/utils/memory.js +135 -116
- package/dist/src/cli/utils/memory.js.map +1 -1
- package/dist/src/cli/utils/pkg.js +4 -4
- package/dist/src/cli/utils/pkg.js.map +1 -1
- package/dist/src/cli/utils/ui.d.ts +30 -0
- package/dist/src/cli/utils/ui.js +56 -0
- package/dist/src/cli/utils/ui.js.map +1 -0
- package/dist/src/modules/adapters/antigravity-cli.d.ts +3 -0
- package/dist/src/modules/adapters/antigravity-cli.js +21 -0
- package/dist/src/modules/adapters/antigravity-cli.js.map +1 -0
- package/dist/src/modules/adapters/claude.d.ts +3 -0
- package/dist/src/modules/adapters/claude.js +36 -0
- package/dist/src/modules/adapters/claude.js.map +1 -0
- package/dist/src/modules/adapters/codex.d.ts +3 -0
- package/dist/src/modules/adapters/codex.js +20 -0
- package/dist/src/modules/adapters/codex.js.map +1 -0
- package/dist/src/modules/adapters/cursor.d.ts +3 -0
- package/dist/src/modules/adapters/cursor.js +20 -0
- package/dist/src/modules/adapters/cursor.js.map +1 -0
- package/dist/src/modules/adapters/gemini.d.ts +3 -0
- package/dist/src/modules/adapters/gemini.js +23 -0
- package/dist/src/modules/adapters/gemini.js.map +1 -0
- package/dist/src/modules/adapters/grok.d.ts +3 -0
- package/dist/src/modules/adapters/grok.js +18 -0
- package/dist/src/modules/adapters/grok.js.map +1 -0
- package/dist/src/modules/adapters/shared.d.ts +1 -0
- package/dist/src/modules/adapters/shared.js +79 -0
- package/dist/src/modules/adapters/shared.js.map +1 -0
- package/dist/src/modules/adapters/types.d.ts +14 -0
- package/dist/src/modules/adapters/types.js +2 -0
- package/dist/src/modules/adapters/types.js.map +1 -0
- package/dist/src/modules/agents/definitions.d.ts +13 -0
- package/dist/src/modules/agents/definitions.js +169 -0
- package/dist/src/modules/agents/definitions.js.map +1 -0
- package/dist/src/modules/skills/definitions.d.ts +31 -0
- package/dist/src/modules/skills/definitions.js +32 -0
- package/dist/src/modules/skills/definitions.js.map +1 -0
- package/dist/src/shared/fs.d.ts +3 -0
- package/dist/src/shared/fs.js +24 -0
- package/dist/src/shared/fs.js.map +1 -0
- package/eslint.config.js +1 -0
- package/framework-mcp/dist/src/index.js +1 -1
- package/framework-mcp/dist/src/tools/control_plane/locking.js +64 -0
- package/framework-mcp/dist/src/tools/control_plane/registry.js +34 -0
- package/framework-mcp/dist/src/tools/definitions.js +46 -7
- package/framework-mcp/dist/src/tools/file_system/write_file.js +16 -2
- package/framework-mcp/dist/src/tools/index.js +5 -0
- package/framework-mcp/dist/src/tools/messaging/send_message.js +2 -4
- package/framework-mcp/dist/src/utils/metrics.js +38 -0
- package/framework-mcp/dist/src/utils/security.js +7 -3
- package/framework-mcp/dist/tests/tools/file_system/file_system_tools.test.js +147 -0
- package/framework-mcp/package.json +1 -1
- package/framework-mcp/src/index.ts +1 -1
- package/framework-mcp/src/tools/control_plane/locking.ts +77 -0
- package/framework-mcp/src/tools/control_plane/registry.ts +44 -0
- package/framework-mcp/src/tools/definitions.ts +46 -7
- package/framework-mcp/src/tools/file_system/write_file.ts +19 -2
- package/framework-mcp/src/tools/index.ts +6 -1
- package/framework-mcp/src/tools/messaging/send_message.ts +2 -3
- package/framework-mcp/src/utils/metrics.ts +53 -0
- package/framework-mcp/src/utils/security.ts +8 -3
- package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +164 -0
- package/framework-mcp/tsconfig.json +2 -1
- package/package.json +12 -11
- package/src/cli/adapters/types.ts +16 -0
- package/src/cli/adapters.ts +130 -156
- package/src/cli/commands/check.ts +61 -77
- package/src/cli/commands/init.ts +163 -312
- package/src/cli/commands/log.ts +1 -1
- package/src/cli/commands/memory.ts +3 -80
- package/src/cli/commands/orchestrate.ts +76 -90
- package/src/cli/index.ts +121 -29
- package/src/cli/utils/app.ts +3 -3
- package/src/cli/utils/config-schema.ts +48 -0
- package/src/cli/utils/fs.ts +10 -27
- package/src/cli/utils/memory.ts +143 -112
- package/src/cli/utils/pkg.ts +4 -4
- package/src/cli/utils/ui.ts +63 -0
- package/src/modules/adapters/antigravity-cli.ts +25 -0
- package/src/modules/adapters/claude.ts +36 -0
- package/src/modules/adapters/codex.ts +22 -0
- package/src/modules/adapters/cursor.ts +22 -0
- package/src/modules/adapters/gemini.ts +27 -0
- package/src/modules/adapters/grok.ts +20 -0
- package/src/modules/adapters/shared.ts +90 -0
- package/src/modules/adapters/types.ts +16 -0
- package/src/modules/agents/definitions.ts +182 -0
- package/src/modules/skills/definitions.ts +32 -0
- package/src/shared/fs.ts +25 -0
- package/.enderun/BRAIN_DASHBOARD.md +0 -46
- package/.enderun/STATUS.md +0 -61
- package/.enderun/agents/agent_army_schema.json +0 -101
- package/.enderun/agents/analyst.json +0 -32
- package/.enderun/agents/backend.json +0 -32
- package/.enderun/agents/database.json +0 -32
- package/.enderun/agents/devops.json +0 -32
- package/.enderun/agents/explorer.json +0 -32
- package/.enderun/agents/frontend.json +0 -32
- package/.enderun/agents/git.json +0 -32
- package/.enderun/agents/manager.json +0 -32
- package/.enderun/agents/mobile.json +0 -32
- package/.enderun/agents/native.json +0 -32
- package/.enderun/agents/quality.json +0 -32
- package/.enderun/agents/schema/agent-lifecycle-schema.json +0 -41
- package/.enderun/agents/security.json +0 -32
- package/.enderun/benchmarks/.gitkeep +0 -0
- package/.enderun/cli-commands.json +0 -76
- package/.enderun/config.json +0 -13
- package/.enderun/knowledge/ARCHITECTURE.md +0 -1
- package/.enderun/knowledge/SECURITY.md +0 -1
- package/.enderun/knowledge/SHIM_TEMPLATE.md +0 -36
- package/.enderun/knowledge/analyst_reference_guide.md +0 -31
- package/.enderun/knowledge/async_error_handling.md +0 -27
- package/.enderun/knowledge/backend_reference_guide.md +0 -165
- package/.enderun/knowledge/blueprint_driven_construction.md +0 -22
- package/.enderun/knowledge/context_boundary_rules.md +0 -57
- package/.enderun/knowledge/corporate-governance/analyst-contract-integrity-guide.md +0 -92
- package/.enderun/knowledge/corporate-governance/audit-logging-standard.md +0 -59
- package/.enderun/knowledge/corporate-governance/backend-high-risk-endpoint-guide.md +0 -125
- package/.enderun/knowledge/corporate-governance/branded-types-law.md +0 -77
- package/.enderun/knowledge/corporate-governance/contract-drift-detection-simulation.md +0 -92
- package/.enderun/knowledge/corporate-governance/corporate-governance-playbook.md +0 -89
- package/.enderun/knowledge/corporate-governance/corporate-project-kickoff-checklist.md +0 -56
- package/.enderun/knowledge/corporate-governance/corporate-project-kickoff-simulation.md +0 -144
- package/.enderun/knowledge/corporate-governance/corporate-project-scaffolding-sop.md +0 -103
- package/.enderun/knowledge/corporate-governance/domain-error-handling-standard.md +0 -75
- package/.enderun/knowledge/corporate-governance/frontend-high-risk-modal-guide.md +0 -211
- package/.enderun/knowledge/corporate-governance/governance-baseline-briefing-template.md +0 -54
- package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow-simulation.md +0 -167
- package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +0 -29
- package/.enderun/knowledge/corporate-governance/high-risk-actions-managerapproval.md +0 -76
- package/.enderun/knowledge/corporate-governance/high-risk-security-modal-hermes-flow.md +0 -49
- package/.enderun/knowledge/corporate-governance/manager-first-30-days-guide.md +0 -112
- package/.enderun/knowledge/corporate-governance/manager-first-three-briefings.md +0 -79
- package/.enderun/knowledge/database_reference_guide.md +0 -38
- package/.enderun/knowledge/devops_reference_guide.md +0 -43
- package/.enderun/knowledge/documentation_ownership.md +0 -53
- package/.enderun/knowledge/eslint-standards.md +0 -63
- package/.enderun/knowledge/evaluation_engine.md +0 -26
- package/.enderun/knowledge/explorer_reference_guide.md +0 -34
- package/.enderun/knowledge/framework_vs_user_project_boundary.md +0 -52
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +0 -108
- package/.enderun/knowledge/frontend_reference_guide.md +0 -64
- package/.enderun/knowledge/git_reference_guide.md +0 -51
- package/.enderun/knowledge/hermes_live_test_guidelines.md +0 -90
- package/.enderun/knowledge/hermes_protocol.md +0 -59
- package/.enderun/knowledge/legacy_onboarding.md +0 -18
- package/.enderun/knowledge/lessons-learned.md +0 -14
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +0 -104
- package/.enderun/knowledge/manager_reference_guide.md +0 -55
- package/.enderun/knowledge/mobile_reference_guide.md +0 -35
- package/.enderun/knowledge/native_reference_guide.md +0 -34
- package/.enderun/knowledge/project_scaffold_guidelines.md +0 -110
- package/.enderun/knowledge/quality_reference_guide.md +0 -42
- package/.enderun/knowledge/reference_application_guidelines.md +0 -101
- package/.enderun/knowledge/responsive_design_standards.md +0 -27
- package/.enderun/knowledge/router_logic.md +0 -29
- package/.enderun/knowledge/security_reference_guide.md +0 -35
- package/.enderun/knowledge/token_economy_and_memory.md +0 -129
- package/.enderun/knowledge/zero_ui_library_policy.md +0 -13
- package/.enderun/logs/manager.json +0 -52
- package/.enderun/memory/BUSINESS_CONTEXT.md +0 -17
- package/.enderun/memory/DECISIONS.md +0 -24
- package/.enderun/memory/LESSONS_LEARNED.md +0 -12
- package/.enderun/memory/PATTERNS.md +0 -17
- package/.enderun/memory/PROJECT_MEMORY.md +0 -69
- package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
- package/.enderun/memory-graph/agent-contexts/backend.json +0 -1
- package/.enderun/memory-graph/agent-contexts/devops.json +0 -1
- package/.enderun/memory-graph/agent-contexts/explorer.json +0 -1
- package/.enderun/memory-graph/agent-contexts/frontend.json +0 -1
- package/.enderun/memory-graph/agent-contexts/git.json +0 -1
- package/.enderun/memory-graph/agent-contexts/manager.json +0 -1
- package/.enderun/memory-graph/agent-contexts/mobile.json +0 -1
- package/.enderun/memory-graph/agent-contexts/native.json +0 -1
- package/.enderun/memory-graph/agent-contexts/quality.json +0 -1
- package/.enderun/memory-graph/agent-contexts/security.json +0 -1
- package/.enderun/memory-graph/graph.json +0 -133
- package/.enderun/memory-graph/shared-facts.json +0 -46
- package/.enderun/monitoring/.gitkeep +0 -0
- package/.enderun/observability/AUDIT_LOG.md +0 -9
- package/.enderun/observability/METRICS.md +0 -10
- package/.enderun/observability/README.md +0 -19
- package/.enderun/observability/TRACE_LOG.md +0 -10
- package/.enderun/queue/README.md +0 -36
- package/.enderun/registry/agents.yaml +0 -69
- package/.enderun/skills/agent_handshake.md +0 -37
- package/.enderun/skills/multi_agent_coordination.md +0 -64
- package/.enderun/skills/subagent_lifecycle.md +0 -48
- package/CLAUDE.md +0 -21
- package/GEMINI.md +0 -24
- package/GROK.md +0 -20
- package/agent.md +0 -25
- package/dist/.keep +0 -1
- package/dist/tests/adapter.test.d.ts +0 -1
- package/dist/tests/adapter.test.js +0 -82
- package/dist/tests/adapter.test.js.map +0 -1
- package/dist/tests/gemini.test.d.ts +0 -1
- package/dist/tests/gemini.test.js +0 -39
- package/dist/tests/gemini.test.js.map +0 -1
- package/dist/tests/initial.test.d.ts +0 -1
- package/dist/tests/initial.test.js +0 -7
- package/dist/tests/initial.test.js.map +0 -1
- package/docs/project_analysis_report.md +0 -69
- package/framework-mcp/dist/index.js +0 -70
- package/framework-mcp/dist/tests/tools/file_system/replace_text.test.js +0 -68
- package/framework-mcp/dist/tools/definitions.js +0 -110
- package/framework-mcp/dist/tools/file_system/patch_file.js +0 -18
- package/framework-mcp/dist/tools/file_system/read_file.js +0 -7
- package/framework-mcp/dist/tools/file_system/replace_text.js +0 -31
- package/framework-mcp/dist/tools/file_system/write_file.js +0 -9
- package/framework-mcp/dist/tools/framework/get_status.js +0 -5
- package/framework-mcp/dist/tools/framework/orchestrate.js +0 -5
- package/framework-mcp/dist/tools/framework/update_contract_hash.js +0 -5
- package/framework-mcp/dist/tools/framework/update_memory.js +0 -8
- package/framework-mcp/dist/tools/index.js +0 -25
- package/framework-mcp/dist/tools/messaging/log_action.js +0 -22
- package/framework-mcp/dist/tools/messaging/send_message.js +0 -23
- package/framework-mcp/dist/tools/types.js +0 -1
- package/framework-mcp/dist/utils/cli.js +0 -20
- package/framework-mcp/dist/utils/security.js +0 -53
- package/framework-mcp/node_modules/@types/node/LICENSE +0 -21
- package/framework-mcp/node_modules/@types/node/README.md +0 -15
- package/framework-mcp/node_modules/@types/node/assert/strict.d.ts +0 -111
- package/framework-mcp/node_modules/@types/node/assert.d.ts +0 -1078
- package/framework-mcp/node_modules/@types/node/async_hooks.d.ts +0 -603
- package/framework-mcp/node_modules/@types/node/buffer.buffer.d.ts +0 -472
- package/framework-mcp/node_modules/@types/node/buffer.d.ts +0 -1934
- package/framework-mcp/node_modules/@types/node/child_process.d.ts +0 -1476
- package/framework-mcp/node_modules/@types/node/cluster.d.ts +0 -578
- package/framework-mcp/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/framework-mcp/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/framework-mcp/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/framework-mcp/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/framework-mcp/node_modules/@types/node/console.d.ts +0 -452
- package/framework-mcp/node_modules/@types/node/constants.d.ts +0 -21
- package/framework-mcp/node_modules/@types/node/crypto.d.ts +0 -4545
- package/framework-mcp/node_modules/@types/node/dgram.d.ts +0 -600
- package/framework-mcp/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
- package/framework-mcp/node_modules/@types/node/dns/promises.d.ts +0 -503
- package/framework-mcp/node_modules/@types/node/dns.d.ts +0 -923
- package/framework-mcp/node_modules/@types/node/domain.d.ts +0 -170
- package/framework-mcp/node_modules/@types/node/events.d.ts +0 -976
- package/framework-mcp/node_modules/@types/node/fs/promises.d.ts +0 -1295
- package/framework-mcp/node_modules/@types/node/fs.d.ts +0 -4461
- package/framework-mcp/node_modules/@types/node/globals.d.ts +0 -172
- package/framework-mcp/node_modules/@types/node/globals.typedarray.d.ts +0 -38
- package/framework-mcp/node_modules/@types/node/http.d.ts +0 -2089
- package/framework-mcp/node_modules/@types/node/http2.d.ts +0 -2721
- package/framework-mcp/node_modules/@types/node/https.d.ts +0 -579
- package/framework-mcp/node_modules/@types/node/index.d.ts +0 -97
- package/framework-mcp/node_modules/@types/node/inspector.d.ts +0 -253
- package/framework-mcp/node_modules/@types/node/inspector.generated.d.ts +0 -4052
- package/framework-mcp/node_modules/@types/node/module.d.ts +0 -891
- package/framework-mcp/node_modules/@types/node/net.d.ts +0 -1076
- package/framework-mcp/node_modules/@types/node/os.d.ts +0 -506
- package/framework-mcp/node_modules/@types/node/package.json +0 -145
- package/framework-mcp/node_modules/@types/node/path.d.ts +0 -200
- package/framework-mcp/node_modules/@types/node/perf_hooks.d.ts +0 -968
- package/framework-mcp/node_modules/@types/node/process.d.ts +0 -2084
- package/framework-mcp/node_modules/@types/node/punycode.d.ts +0 -117
- package/framework-mcp/node_modules/@types/node/querystring.d.ts +0 -152
- package/framework-mcp/node_modules/@types/node/readline/promises.d.ts +0 -161
- package/framework-mcp/node_modules/@types/node/readline.d.ts +0 -594
- package/framework-mcp/node_modules/@types/node/repl.d.ts +0 -428
- package/framework-mcp/node_modules/@types/node/sea.d.ts +0 -153
- package/framework-mcp/node_modules/@types/node/sqlite.d.ts +0 -721
- package/framework-mcp/node_modules/@types/node/stream/consumers.d.ts +0 -38
- package/framework-mcp/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/framework-mcp/node_modules/@types/node/stream/web.d.ts +0 -622
- package/framework-mcp/node_modules/@types/node/stream.d.ts +0 -1687
- package/framework-mcp/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/framework-mcp/node_modules/@types/node/test.d.ts +0 -2163
- package/framework-mcp/node_modules/@types/node/timers/promises.d.ts +0 -108
- package/framework-mcp/node_modules/@types/node/timers.d.ts +0 -287
- package/framework-mcp/node_modules/@types/node/tls.d.ts +0 -1319
- package/framework-mcp/node_modules/@types/node/trace_events.d.ts +0 -197
- package/framework-mcp/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
- package/framework-mcp/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
- package/framework-mcp/node_modules/@types/node/ts5.6/index.d.ts +0 -97
- package/framework-mcp/node_modules/@types/node/tty.d.ts +0 -208
- package/framework-mcp/node_modules/@types/node/url.d.ts +0 -984
- package/framework-mcp/node_modules/@types/node/util.d.ts +0 -2606
- package/framework-mcp/node_modules/@types/node/v8.d.ts +0 -920
- package/framework-mcp/node_modules/@types/node/vm.d.ts +0 -1000
- package/framework-mcp/node_modules/@types/node/wasi.d.ts +0 -181
- package/framework-mcp/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
- package/framework-mcp/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/framework-mcp/node_modules/@types/node/web-globals/events.d.ts +0 -97
- package/framework-mcp/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
- package/framework-mcp/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
- package/framework-mcp/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/framework-mcp/node_modules/@types/node/worker_threads.d.ts +0 -784
- package/framework-mcp/node_modules/@types/node/zlib.d.ts +0 -747
- package/framework-mcp/node_modules/typescript/LICENSE.txt +0 -55
- package/framework-mcp/node_modules/typescript/README.md +0 -50
- package/framework-mcp/node_modules/typescript/SECURITY.md +0 -41
- package/framework-mcp/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
- package/framework-mcp/node_modules/typescript/bin/tsc +0 -2
- package/framework-mcp/node_modules/typescript/bin/tsserver +0 -2
- package/framework-mcp/node_modules/typescript/lib/_tsc.js +0 -133818
- package/framework-mcp/node_modules/typescript/lib/_tsserver.js +0 -659
- package/framework-mcp/node_modules/typescript/lib/_typingsInstaller.js +0 -222
- package/framework-mcp/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/lib.d.ts +0 -22
- package/framework-mcp/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
- package/framework-mcp/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
- package/framework-mcp/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
- package/framework-mcp/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
- package/framework-mcp/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
- package/framework-mcp/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
- package/framework-mcp/node_modules/typescript/lib/lib.es6.d.ts +0 -23
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
- package/framework-mcp/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
- package/framework-mcp/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/tsc.js +0 -8
- package/framework-mcp/node_modules/typescript/lib/tsserver.js +0 -8
- package/framework-mcp/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
- package/framework-mcp/node_modules/typescript/lib/tsserverlibrary.js +0 -21
- package/framework-mcp/node_modules/typescript/lib/typesMap.json +0 -497
- package/framework-mcp/node_modules/typescript/lib/typescript.d.ts +0 -11437
- package/framework-mcp/node_modules/typescript/lib/typescript.js +0 -200276
- package/framework-mcp/node_modules/typescript/lib/typingsInstaller.js +0 -8
- package/framework-mcp/node_modules/typescript/lib/watchGuard.js +0 -53
- package/framework-mcp/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
- package/framework-mcp/node_modules/typescript/package.json +0 -120
- package/framework-mcp/node_modules/undici-types/LICENSE +0 -21
- package/framework-mcp/node_modules/undici-types/README.md +0 -6
- package/framework-mcp/node_modules/undici-types/agent.d.ts +0 -31
- package/framework-mcp/node_modules/undici-types/api.d.ts +0 -43
- package/framework-mcp/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/framework-mcp/node_modules/undici-types/cache.d.ts +0 -36
- package/framework-mcp/node_modules/undici-types/client.d.ts +0 -108
- package/framework-mcp/node_modules/undici-types/connector.d.ts +0 -34
- package/framework-mcp/node_modules/undici-types/content-type.d.ts +0 -21
- package/framework-mcp/node_modules/undici-types/cookies.d.ts +0 -28
- package/framework-mcp/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/framework-mcp/node_modules/undici-types/dispatcher.d.ts +0 -256
- package/framework-mcp/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/framework-mcp/node_modules/undici-types/errors.d.ts +0 -149
- package/framework-mcp/node_modules/undici-types/eventsource.d.ts +0 -61
- package/framework-mcp/node_modules/undici-types/fetch.d.ts +0 -209
- package/framework-mcp/node_modules/undici-types/file.d.ts +0 -39
- package/framework-mcp/node_modules/undici-types/filereader.d.ts +0 -54
- package/framework-mcp/node_modules/undici-types/formdata.d.ts +0 -108
- package/framework-mcp/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/framework-mcp/node_modules/undici-types/global-origin.d.ts +0 -7
- package/framework-mcp/node_modules/undici-types/handlers.d.ts +0 -15
- package/framework-mcp/node_modules/undici-types/header.d.ts +0 -4
- package/framework-mcp/node_modules/undici-types/index.d.ts +0 -71
- package/framework-mcp/node_modules/undici-types/interceptors.d.ts +0 -17
- package/framework-mcp/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/framework-mcp/node_modules/undici-types/mock-client.d.ts +0 -25
- package/framework-mcp/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/framework-mcp/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/framework-mcp/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/framework-mcp/node_modules/undici-types/package.json +0 -55
- package/framework-mcp/node_modules/undici-types/patch.d.ts +0 -33
- package/framework-mcp/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/framework-mcp/node_modules/undici-types/pool.d.ts +0 -39
- package/framework-mcp/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/framework-mcp/node_modules/undici-types/readable.d.ts +0 -65
- package/framework-mcp/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/framework-mcp/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/framework-mcp/node_modules/undici-types/util.d.ts +0 -18
- package/framework-mcp/node_modules/undici-types/webidl.d.ts +0 -228
- package/framework-mcp/node_modules/undici-types/websocket.d.ts +0 -150
- package/framework-mcp/tests/tools/file_system/replace_text.test.js +0 -68
- package/framework-mcp/tests/tools/file_system/replace_text.test.ts +0 -77
- package/panda.config.ts +0 -100
package/src/cli/commands/init.ts
CHANGED
|
@@ -1,354 +1,205 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import
|
|
4
|
-
import { execSync } from "child_process";
|
|
3
|
+
import readline from "readline";
|
|
5
4
|
|
|
6
5
|
import {
|
|
7
6
|
resolveAdapter,
|
|
8
|
-
isAdapterShimFile,
|
|
9
|
-
remapFrameworkContent,
|
|
10
7
|
runAdapterPostInit,
|
|
8
|
+
remapFrameworkContent,
|
|
11
9
|
type AdapterConfig,
|
|
10
|
+
type AdapterId,
|
|
12
11
|
} from "../adapters.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { getPackageRoot, getPackageVersion } from "../utils/pkg.js";
|
|
13
|
+
import { ensureDir, writeJsonFile } from "../utils/fs.js";
|
|
15
14
|
import { initializeMemory } from "../utils/memory.js";
|
|
16
|
-
import { checkCommand } from "./check.js";
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// Import Modular Definitions
|
|
17
|
+
import { ALL_AGENTS, buildAgentJson } from "../../modules/agents/definitions.js";
|
|
18
|
+
import { CORE_SKILLS } from "../../modules/skills/definitions.js";
|
|
21
19
|
|
|
22
|
-
const FRAMEWORK_VERSION = getPackageVersion();
|
|
23
20
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
"mcp.json",
|
|
27
|
-
".env.example",
|
|
28
|
-
"ENDERUN.md",
|
|
29
|
-
"package.json",
|
|
30
|
-
"tsconfig.json",
|
|
31
|
-
"panda.config.ts",
|
|
32
|
-
"vitest.config.ts",
|
|
33
|
-
"framework-mcp",
|
|
34
|
-
"docs",
|
|
35
|
-
"eslint.config.js",
|
|
36
|
-
];
|
|
21
|
+
const FRAMEWORK_NAME = "Enderun Core";
|
|
22
|
+
const FRAMEWORK_VERSION = getPackageVersion();
|
|
37
23
|
|
|
38
24
|
const FRAMEWORK_SUBDIRS = [
|
|
25
|
+
"apps",
|
|
39
26
|
"agents",
|
|
40
|
-
"agents/schema",
|
|
41
27
|
"skills",
|
|
42
28
|
"knowledge",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"memory-graph/agent-contexts",
|
|
49
|
-
"queue",
|
|
50
|
-
"queue/pending",
|
|
51
|
-
"queue/processing",
|
|
52
|
-
"queue/completed",
|
|
53
|
-
"queue/failed",
|
|
54
|
-
"queue/pipelines",
|
|
29
|
+
"memory",
|
|
30
|
+
"router",
|
|
31
|
+
"registry",
|
|
32
|
+
"observability",
|
|
33
|
+
"rules",
|
|
55
34
|
];
|
|
56
35
|
|
|
57
|
-
const
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
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."
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "backend",
|
|
66
|
-
displayName: "Domain Logic & Databases Specialist",
|
|
67
|
-
description: "Responsible for core business logic, database migrations, security standards, API contracts, and server architecture.",
|
|
68
|
-
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."
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "frontend",
|
|
72
|
-
displayName: "Fluid Responsive UI Specialist",
|
|
73
|
-
description: "Builds responsive fluid user interfaces, manages styling tokens with Panda CSS, and implements state machines.",
|
|
74
|
-
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."
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: "quality",
|
|
78
|
-
displayName: "Automated Testing & Quality Specialist",
|
|
79
|
-
description: "Verifies test coverage, audits compliance with the constitution, conducts AST scanning, and verifies CI/CD status.",
|
|
80
|
-
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."
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: "database",
|
|
84
|
-
displayName: "Database Migrations & Tuning Specialist",
|
|
85
|
-
description: "Designs SQL schemas, manages migration scripts via Kysely, optimizes queries, indexes, and seeding logic.",
|
|
86
|
-
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."
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: "devops",
|
|
90
|
-
displayName: "Infrastructure & CI/CD Specialist",
|
|
91
|
-
description: "Handles deployment pipelines, environment variables, system containerization, logging & telemetry integrations.",
|
|
92
|
-
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."
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "explorer",
|
|
96
|
-
displayName: "Codebase Discovery Specialist",
|
|
97
|
-
description: "Maps code dependencies, performs project scans, identifies architectural gaps, and supports legacy onboarding.",
|
|
98
|
-
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."
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "git",
|
|
102
|
-
displayName: "Version Control Specialist",
|
|
103
|
-
description: "Manages commit histories, branches, Trace ID alignment, semantic tagging, and merge conflicts.",
|
|
104
|
-
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."
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: "mobile",
|
|
108
|
-
displayName: "Mobile App Specialist",
|
|
109
|
-
description: "Develops cross-platform mobile apps using React Native and Expo with clean component states.",
|
|
110
|
-
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."
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: "native",
|
|
114
|
-
displayName: "Native OS Integration Specialist",
|
|
115
|
-
description: "Builds lightweight desktop wrappers and system integrations using Tauri or Electron.",
|
|
116
|
-
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."
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "security",
|
|
120
|
-
displayName: "Security & Cryptography Specialist",
|
|
121
|
-
description: "Enforces authentication flows, CSP policies, credential rotation, RLS constraints, and cryptographic safety.",
|
|
122
|
-
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."
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: "analyst",
|
|
126
|
-
displayName: "Contract Verification & Business Analyst",
|
|
127
|
-
description: "Validates business specifications, tests database contract integrity, and audits constitutional compliance.",
|
|
128
|
-
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."
|
|
129
|
-
}
|
|
130
|
-
];
|
|
36
|
+
const COLOR_PALETTES = {
|
|
37
|
+
"Modern Blue": { primary: "#0ea5e9", secondary: "#64748b", accent: "#f43f5e" },
|
|
38
|
+
"Enterprise Slate": { primary: "#334155", secondary: "#94a3b8", accent: "#10b981" },
|
|
39
|
+
"Deep Purple": { primary: "#8b5cf6", secondary: "#d8b4fe", accent: "#f59e0b" }
|
|
40
|
+
};
|
|
131
41
|
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
ensureDir(agentSchemaDir, dryRun);
|
|
42
|
+
async function runInteractiveInit(): Promise<{ selectedDirs: string[], selectedAgents: string[], selectedPalette: string }> {
|
|
43
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
44
|
+
const question = (query: string): Promise<string> => new Promise((resolve) => rl.question(query, resolve));
|
|
136
45
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"type": "object",
|
|
159
|
-
"properties": {
|
|
160
|
-
"customAgent": {
|
|
161
|
-
"type": "object",
|
|
162
|
-
"properties": {
|
|
163
|
-
"systemPromptSections": {
|
|
164
|
-
"type": "array",
|
|
165
|
-
"items": {
|
|
166
|
-
"type": "object",
|
|
167
|
-
"properties": { "title": { "type": "string" }, "content": { "type": "string" } },
|
|
168
|
-
"required": ["title", "content"]
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"toolNames": { "type": "array", "items": { "type": "string" } }
|
|
172
|
-
},
|
|
173
|
-
"required": ["systemPromptSections", "toolNames"]
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
"required": ["customAgent"]
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
writeJsonFile(path.join(agentsBaseDir, "agent_army_schema.json"), agentArmySchema, dryRun);
|
|
46
|
+
try {
|
|
47
|
+
console.warn(`\nš Welcome to ${FRAMEWORK_NAME} Interactive Setup!`);
|
|
48
|
+
console.warn("\nAvailable Framework Directories:");
|
|
49
|
+
FRAMEWORK_SUBDIRS.forEach((d, i) => console.warn(`${i + 1}. ${d}`));
|
|
50
|
+
const dirInput = await question("\nEnter directory numbers to include (e.g. 1,2,3) or Enter for ALL: ");
|
|
51
|
+
const selectedDirs = dirInput ? dirInput.split(",").map(n => FRAMEWORK_SUBDIRS[parseInt(n.trim()) - 1]).filter(Boolean) : [...FRAMEWORK_SUBDIRS];
|
|
52
|
+
|
|
53
|
+
console.warn("\nAvailable Core Agents:");
|
|
54
|
+
ALL_AGENTS.forEach((a, i) => console.warn(`${i + 1}. ${a.name}`));
|
|
55
|
+
const agentInput = await question("\nEnter agent numbers to include (e.g. 1,2) or Enter for ALL: ");
|
|
56
|
+
const selectedAgents = agentInput ? agentInput.split(",").map(n => ALL_AGENTS[parseInt(n.trim()) - 1].name).filter(Boolean) : ALL_AGENTS.map(a => a.name);
|
|
57
|
+
|
|
58
|
+
console.warn("\nAvailable Color Palettes:");
|
|
59
|
+
const palettes = Object.keys(COLOR_PALETTES);
|
|
60
|
+
palettes.forEach((p, i) => console.warn(`${i + 1}. ${p}`));
|
|
61
|
+
const palInput = await question("\nSelect palette (1-3) or Enter for 'Modern Blue': ");
|
|
62
|
+
const selectedPalette = palettes[parseInt(palInput.trim()) - 1] || "Modern Blue";
|
|
63
|
+
|
|
64
|
+
return { selectedDirs, selectedAgents, selectedPalette };
|
|
65
|
+
} finally { rl.close(); }
|
|
66
|
+
}
|
|
181
67
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
"states": {
|
|
190
|
-
"type": "object",
|
|
191
|
-
"patternProperties": {
|
|
192
|
-
"^[a-zA-Z0-9_]+$": {
|
|
193
|
-
"type": "object",
|
|
194
|
-
"properties": {
|
|
195
|
-
"on": { "type": "object", "patternProperties": { "^[a-zA-Z0-9_]+$": { "type": "string" } } },
|
|
196
|
-
"actions": { "type": "array", "items": { "type": "string" } }
|
|
197
|
-
},
|
|
198
|
-
"required": ["on"]
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
68
|
+
function scaffoldConstitution(targetDir: string, frameworkDir: string, adapterId: AdapterId, dryRun: boolean) {
|
|
69
|
+
if (dryRun) return;
|
|
70
|
+
let content = `# šļø ${FRAMEWORK_NAME} ā Constitution (v${FRAMEWORK_VERSION})\n\nDiscipline and Order.`;
|
|
71
|
+
try {
|
|
72
|
+
const templatePath = path.join(getPackageRoot(), "ENDERUN.md");
|
|
73
|
+
if (fs.existsSync(templatePath)) {
|
|
74
|
+
content = fs.readFileSync(templatePath, "utf8");
|
|
202
75
|
}
|
|
203
|
-
}
|
|
204
|
-
|
|
76
|
+
} catch {
|
|
77
|
+
// Fallback to default content
|
|
78
|
+
}
|
|
79
|
+
content = remapFrameworkContent(content, frameworkDir, adapterId);
|
|
80
|
+
fs.writeFileSync(path.join(targetDir, "ENDERUN.md"), content);
|
|
81
|
+
}
|
|
205
82
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
83
|
+
function scaffoldCoreAgents(agentsToScaffold: string[], agentsBaseDir: string, adapterId: string, dryRun: boolean) {
|
|
84
|
+
if (dryRun) return;
|
|
85
|
+
ensureDir(agentsBaseDir, dryRun);
|
|
86
|
+
|
|
87
|
+
for (const name of agentsToScaffold) {
|
|
88
|
+
const ag = ALL_AGENTS.find(a => a.name === name);
|
|
89
|
+
if (!ag) continue;
|
|
90
|
+
|
|
91
|
+
// AGY standard requires nested folders: agents/{name}/agent.md (or .json)
|
|
92
|
+
const isNestedAdapter = adapterId === "antigravity-cli";
|
|
93
|
+
const agentDir = isNestedAdapter ? path.join(agentsBaseDir, name) : agentsBaseDir;
|
|
94
|
+
const agentFileName = isNestedAdapter ? "agent.md" : `${ag.name}.md`;
|
|
95
|
+
|
|
96
|
+
if (isNestedAdapter) ensureDir(agentDir, dryRun);
|
|
97
|
+
|
|
98
|
+
if (isNestedAdapter) {
|
|
99
|
+
if (!dryRun) {
|
|
100
|
+
const jsonContent = buildAgentJson(ag);
|
|
101
|
+
fs.writeFileSync(path.join(agentDir, "agent.json"), jsonContent);
|
|
221
102
|
}
|
|
222
|
-
}
|
|
223
|
-
|
|
103
|
+
} else {
|
|
104
|
+
const mdContent = `---
|
|
105
|
+
name: "${ag.name}"
|
|
106
|
+
description: "${ag.description}"
|
|
107
|
+
capability: ${ag.capability}
|
|
108
|
+
tags: [${ag.tags.map(t => `"${t}"`).join(", ")}]
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
# šļø ${FRAMEWORK_NAME} ā @${ag.name} (${ag.displayName})
|
|
112
|
+
|
|
113
|
+
## š¤ Talimatlar (Instructions)
|
|
114
|
+
${ag.instructions}
|
|
115
|
+
|
|
116
|
+
## š”ļø Ćekirdek Kurallar (Core Mandates)
|
|
117
|
+
- **Traceability:** Her eylem aktif Trace ID'yi miras almalıdır.
|
|
118
|
+
- **Surgical Precision:** Sadece \`replace_text\` veya \`patch_file\` kullanarak dosya düzenleyin.
|
|
119
|
+
`;
|
|
120
|
+
if (!dryRun) {
|
|
121
|
+
fs.writeFileSync(path.join(agentDir, agentFileName), mdContent);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
224
124
|
}
|
|
225
|
-
console.warn(`ā
Scaffolding ${allAgents.length} core agents under ${path.relative(targetDir, agentsBaseDir)}/...`);
|
|
226
125
|
}
|
|
227
126
|
|
|
228
|
-
function
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (process.env.ENDERUN_SKIP_INSTALL !== "1") {
|
|
235
|
-
dirs.push("tests");
|
|
236
|
-
}
|
|
237
|
-
if (adapter.nestedDirs) {
|
|
238
|
-
for (const nested of adapter.nestedDirs) dirs.push(`${adapter.frameworkDir}/${nested}`);
|
|
127
|
+
function scaffoldSkills(skillsBaseDir: string, dryRun: boolean) {
|
|
128
|
+
if (dryRun) return;
|
|
129
|
+
ensureDir(skillsBaseDir, dryRun);
|
|
130
|
+
for (const [key, skill] of Object.entries(CORE_SKILLS)) {
|
|
131
|
+
const mdContent = `# š ļø ${FRAMEWORK_NAME} Skill ā ${skill.name}\n\n${skill.mandates.join("\n")}\n`;
|
|
132
|
+
fs.writeFileSync(path.join(skillsBaseDir, `${key.toLowerCase()}.md`), mdContent);
|
|
239
133
|
}
|
|
240
|
-
if (adapter.shimFile.includes("/")) dirs.push(path.dirname(adapter.shimFile));
|
|
241
|
-
return [...new Set(dirs)];
|
|
242
134
|
}
|
|
243
135
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
const filesToProcess = [...CORE_FILES, shimFile].filter(f => CORE_FILES.includes(f) || f === shimFile || fs.existsSync(path.join(sourceDir, f)));
|
|
257
|
-
|
|
258
|
-
// apps/ directory is intentionally left empty during init.
|
|
259
|
-
// Users create apps via `agent-enderun create-app` command.
|
|
260
|
-
// Contract file is created during app scaffolding, not init.
|
|
261
|
-
|
|
262
|
-
let targetPkg: Record<string, unknown> = {};
|
|
263
|
-
try {
|
|
264
|
-
const targetPkgPath = path.join(targetDir, "package.json");
|
|
265
|
-
if (fs.existsSync(targetPkgPath)) targetPkg = JSON.parse(fs.readFileSync(targetPkgPath, "utf8"));
|
|
266
|
-
} catch { /* ignore */ }
|
|
267
|
-
|
|
268
|
-
const pkgName = typeof targetPkg.name === "string" ? targetPkg.name : "";
|
|
269
|
-
const targetScope = pkgName ? (pkgName.startsWith("@") ? pkgName.split("/")[0] : `@${pkgName}`) : `@${path.basename(targetDir)}`;
|
|
270
|
-
|
|
271
|
-
for (const item of filesToProcess) {
|
|
272
|
-
const src = path.join(sourceDir, item);
|
|
273
|
-
let dest = path.join(targetDir, item);
|
|
274
|
-
const isDevMode = src === dest;
|
|
275
|
-
|
|
276
|
-
if (item === "framework-mcp" && fs.existsSync(dest) && !isDevMode) {
|
|
277
|
-
if (!dryRun) fs.rmSync(dest, { recursive: true, force: true });
|
|
136
|
+
function scaffoldFrameworkConfigs(targetDir: string, fDir: string, adapter: AdapterConfig, dryRun: boolean, selectedPalette: string) {
|
|
137
|
+
if (dryRun) return;
|
|
138
|
+
const frameworkDir = path.join(targetDir, fDir);
|
|
139
|
+
const palette = COLOR_PALETTES[selectedPalette as keyof typeof COLOR_PALETTES] || COLOR_PALETTES["Modern Blue"];
|
|
140
|
+
|
|
141
|
+
const config = {
|
|
142
|
+
name: FRAMEWORK_NAME,
|
|
143
|
+
version: FRAMEWORK_VERSION,
|
|
144
|
+
theme: {
|
|
145
|
+
palette: selectedPalette,
|
|
146
|
+
colors: palette
|
|
278
147
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
148
|
+
};
|
|
149
|
+
writeJsonFile(path.join(frameworkDir, "config.json"), config, dryRun);
|
|
150
|
+
fs.writeFileSync(path.join(frameworkDir, "STATUS.md"), "# šļø Status\n\nStable.\n");
|
|
151
|
+
|
|
152
|
+
// Scaffold cli-commands.json
|
|
153
|
+
const cliCommands = {
|
|
154
|
+
commands: {
|
|
155
|
+
init: { agent: "manager", description: "Initialize Enderun Core structure and AI configuration." },
|
|
156
|
+
check: { agent: "quality", description: "Verify framework files and code quality discipline." },
|
|
157
|
+
status: { agent: "manager", description: "Show the current status of the active project phase." },
|
|
158
|
+
"trace:new": { agent: "manager", description: "Generate a new Trace ID to start a task sequence." },
|
|
159
|
+
orchestrate: { agent: "manager", description: "Execute the Hermes message broker loop." },
|
|
160
|
+
"verify-contract": { agent: "architect", description: "Validate type contracts between backend and frontend." },
|
|
161
|
+
"update-contract": { agent: "architect", description: "Update the contract signature hash." }
|
|
289
162
|
}
|
|
163
|
+
};
|
|
164
|
+
writeJsonFile(path.join(frameworkDir, "cli-commands.json"), cliCommands, dryRun);
|
|
290
165
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (isAdapterShimFile(item)) dest = path.join(targetDir, item);
|
|
294
|
-
|
|
295
|
-
if (!fs.existsSync(src)) continue;
|
|
296
|
-
|
|
297
|
-
if (fs.lstatSync(src).isDirectory()) {
|
|
298
|
-
const skipFiles = item === templateDir ? ["logs", "PROJECT_MEMORY.md", "PROJECT_MEMORY.lock"] : [];
|
|
299
|
-
copyDir(src, dest, new Set(skipFiles), ["docs", templateDir].includes(item), frameworkDir, targetScope, sanitizeJson, adapter.id, dryRun);
|
|
300
|
-
} else {
|
|
301
|
-
if (item === "package.json") continue;
|
|
302
|
-
if (fs.existsSync(dest) && !isAdapterShimFile(item)) continue;
|
|
166
|
+
// Scaffold BRAIN_DASHBOARD.md
|
|
167
|
+
fs.writeFileSync(path.join(frameworkDir, "BRAIN_DASHBOARD.md"), "# š§ Brain Dashboard\n\nActive Trace: T-000\nActive Phase: PHASE_0 (Genesis)\n\n## Ajan Durumları (Agent Statuses)\n- @manager: READY\n- @architect: READY\n- @backend: READY\n- @frontend: READY\n- @quality: READY\n");
|
|
303
168
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
content = remapFrameworkContent(content, frameworkDir, adapter.id);
|
|
308
|
-
if (ext === ".json") {
|
|
309
|
-
try {
|
|
310
|
-
const json = JSON.parse(content);
|
|
311
|
-
content = JSON.stringify(sanitizeJson(json, targetScope), null, 2);
|
|
312
|
-
content = remapFrameworkContent(content, frameworkDir, adapter.id);
|
|
313
|
-
} catch { content = content.replace(/workspace:[^"'\s]*/g, "*"); }
|
|
314
|
-
}
|
|
315
|
-
writeTextFile(dest, content, dryRun);
|
|
316
|
-
} else if (!dryRun) {
|
|
317
|
-
fs.copyFileSync(src, dest);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
169
|
+
if (fDir === adapter.frameworkDir) {
|
|
170
|
+
const entryFileName = adapter.shimFile || `${adapter.id.toUpperCase()}.md`;
|
|
171
|
+
fs.writeFileSync(path.join(targetDir, entryFileName), `# šļø ${FRAMEWORK_NAME} ā ${adapter.id.toUpperCase()} Strategy\n`);
|
|
320
172
|
}
|
|
173
|
+
}
|
|
321
174
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
// Scaffold core agents under the central framework directory
|
|
328
|
-
let agentFolder = "agents";
|
|
329
|
-
if (frameworkDir !== ".enderun") {
|
|
330
|
-
if (adapter.id === "antigravity") {
|
|
331
|
-
agentFolder = "skills";
|
|
332
|
-
} else if (adapter.id === "grok") {
|
|
333
|
-
agentFolder = "plugins";
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
scaffoldCoreAgents(targetDir, path.join(targetFrameworkDir, agentFolder), dryRun);
|
|
175
|
+
export async function initCommand(adapterInput?: string, dryRun = false, isInteractive = false) {
|
|
176
|
+
const selections = isInteractive ? await runInteractiveInit() : { selectedDirs: FRAMEWORK_SUBDIRS, selectedAgents: ALL_AGENTS.map(a => a.name), selectedPalette: "Modern Blue" };
|
|
177
|
+
const targetDir = process.cwd();
|
|
178
|
+
const adapter = resolveAdapter(adapterInput);
|
|
179
|
+
const frameworkDirs = [adapter.frameworkDir];
|
|
337
180
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
181
|
+
for (const fdir of [...new Set(frameworkDirs)]) {
|
|
182
|
+
const base = path.join(targetDir, fdir);
|
|
183
|
+
ensureDir(base, dryRun);
|
|
341
184
|
|
|
342
|
-
|
|
343
|
-
|
|
185
|
+
for (const sub of selections.selectedDirs) ensureDir(path.join(base, sub), dryRun);
|
|
186
|
+
|
|
187
|
+
scaffoldCoreAgents(selections.selectedAgents, path.join(base, "agents"), adapter.id, dryRun);
|
|
188
|
+
scaffoldSkills(path.join(base, "skills"), dryRun);
|
|
189
|
+
scaffoldFrameworkConfigs(targetDir, fdir, adapter, dryRun, selections.selectedPalette);
|
|
344
190
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
checkCommand();
|
|
350
|
-
const validatorPath = getValidatorPath();
|
|
351
|
-
execSync(`node "${validatorPath}"`, { stdio: "inherit" });
|
|
352
|
-
} catch { /* ignore validation report */ }
|
|
191
|
+
// NATIVE TOOL CONFIGURATION (MCP REGISTRATION)
|
|
192
|
+
if (!dryRun) {
|
|
193
|
+
runAdapterPostInit(adapter, targetDir);
|
|
194
|
+
}
|
|
353
195
|
}
|
|
196
|
+
|
|
197
|
+
scaffoldConstitution(targetDir, adapter.frameworkDir, adapter.id, dryRun);
|
|
198
|
+
ensureDir(path.join(targetDir, "apps"), dryRun);
|
|
199
|
+
initializeMemory(path.join(targetDir, adapter.frameworkDir, "memory/PROJECT_MEMORY.md"), adapter.frameworkDir, dryRun);
|
|
200
|
+
const mcpConfig = { mcpServers: { "agent-enderun": { command: "node", args: [path.join(getPackageRoot(), "framework-mcp/dist/index.js")], env: { ENDERUN_PROJECT_ROOT: targetDir } } } };
|
|
201
|
+
fs.writeFileSync(path.join(targetDir, "mcp.json"), JSON.stringify(mcpConfig, null, 2));
|
|
202
|
+
const pandaTemplate = `import { defineConfig } from "@pandacss/dev";\nexport default defineConfig({ theme: { extend: { tokens: { colors: { primary: { value: "${COLOR_PALETTES[selections.selectedPalette as keyof typeof COLOR_PALETTES]?.primary || "#0ea5e9"}" } } } } } });`;
|
|
203
|
+
fs.writeFileSync(path.join(targetDir, "panda.config.ts"), pandaTemplate);
|
|
204
|
+
console.warn(`\n⨠${FRAMEWORK_NAME} scaffolded! (v${FRAMEWORK_VERSION})`);
|
|
354
205
|
}
|
package/src/cli/commands/log.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { normalizeAgentName } from "../utils/string.js";
|
|
|
6
6
|
|
|
7
7
|
const targetDir = process.cwd(); // Assuming targetDir is process.cwd() in the CLI context
|
|
8
8
|
|
|
9
|
-
export function logAgentActionCommand(data: { agent?: unknown; action?: string; requestId?: string; status?: string; summary?: string; files?: string[]; details?: Record<string, unknown> }) {
|
|
9
|
+
export function logAgentActionCommand(data: { agent?: unknown; action?: string; requestId?: string; traceId?: string; status?: string; summary?: string; files?: string[]; details?: Record<string, unknown> }) {
|
|
10
10
|
const frameworkDir = getFrameworkDir();
|
|
11
11
|
const logsDir = path.join(targetDir, frameworkDir, "logs");
|
|
12
12
|
if (!fs.existsSync(logsDir)) {
|
|
@@ -1,83 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import path from "path";
|
|
3
|
-
|
|
4
|
-
import { getMemoryPath, acquireMemoryLock, releaseMemoryLock } from "../utils/memory.js";
|
|
1
|
+
import { updateProjectMemory } from "../utils/memory.js";
|
|
5
2
|
|
|
6
3
|
export function updateProjectMemoryCommand(section: string, content: string) {
|
|
7
|
-
|
|
8
|
-
console.log("DEBUG: updateProjectMemoryCommand - memoryPath:", memoryPath);
|
|
9
|
-
console.log("DEBUG: updateProjectMemoryCommand - section:", section);
|
|
10
|
-
console.log("DEBUG: updateProjectMemoryCommand - content (first 100 chars):", content.substring(0, 100));
|
|
11
|
-
|
|
12
|
-
if (!fs.existsSync(memoryPath)) {
|
|
13
|
-
console.error("ā Error: PROJECT_MEMORY.md not found.");
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const lockPath = `${memoryPath}.lock`;
|
|
18
|
-
if (!acquireMemoryLock(lockPath)) {
|
|
19
|
-
console.error("ā Error: Memory lock timeout.");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
let memoryContent = fs.readFileSync(memoryPath, "utf8");
|
|
25
|
-
console.log("DEBUG: updateProjectMemoryCommand - original memoryContent (first 100 chars):", memoryContent.substring(0, 100));
|
|
26
|
-
|
|
27
|
-
if (section === "HISTORY") {
|
|
28
|
-
const headers = ["## HISTORY (Persistent Memory)", "## HISTORY"];
|
|
29
|
-
let sectionIndex = -1;
|
|
30
|
-
for (const h of headers) {
|
|
31
|
-
sectionIndex = memoryContent.indexOf(h);
|
|
32
|
-
if (sectionIndex !== -1) {
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (sectionIndex === -1) {
|
|
38
|
-
console.error("ā Error: HISTORY section not found.");
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const headerEnd = memoryContent.indexOf("\n", sectionIndex) + 1;
|
|
42
|
-
memoryContent =
|
|
43
|
-
memoryContent.slice(0, headerEnd) +
|
|
44
|
-
`\n${content.trim()}\n` +
|
|
45
|
-
memoryContent.slice(headerEnd);
|
|
46
|
-
|
|
47
|
-
// --- Auto-Prune Logic ---
|
|
48
|
-
const historySplit = memoryContent.split("### ");
|
|
49
|
-
if (historySplit.length > 11) { // Title + 10 entries
|
|
50
|
-
const frameworkDir = path.dirname(memoryPath);
|
|
51
|
-
const archiveDir = path.join(frameworkDir, "archive/history");
|
|
52
|
-
if (!fs.existsSync(archiveDir)) fs.mkdirSync(archiveDir, { recursive: true });
|
|
53
|
-
|
|
54
|
-
const toArchive = historySplit.slice(11); // Keep the first 10 entries (newest)
|
|
55
|
-
const preserved = historySplit.slice(0, 11);
|
|
56
|
-
|
|
57
|
-
const archiveContent = "### " + toArchive.join("### ");
|
|
58
|
-
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
59
|
-
fs.writeFileSync(path.join(archiveDir, `history-${timestamp}.md`), archiveContent);
|
|
60
|
-
|
|
61
|
-
memoryContent = preserved.join("### ").trim() + "\n";
|
|
62
|
-
console.warn(`š¦ Auto-Pruned: ${toArchive.length} old entries moved to archive.`);
|
|
63
|
-
}
|
|
64
|
-
// ------------------------
|
|
65
|
-
} else {
|
|
66
|
-
const escaped = section.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
67
|
-
const sectionRegex = new RegExp(`## ${escaped}[\\s\\S]*?(?=\\n## |$)`, "m");
|
|
68
|
-
if (!sectionRegex.test(memoryContent)) {
|
|
69
|
-
console.error(`ā Error: Section not found: ${section}`);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
memoryContent = memoryContent.replace(
|
|
73
|
-
sectionRegex,
|
|
74
|
-
`## ${section}\n\n${content.trim()}\n`,
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
fs.writeFileSync(memoryPath, memoryContent);
|
|
79
|
-
console.warn(`ā
Section ${section} updated in PROJECT_MEMORY.md`);
|
|
80
|
-
} finally {
|
|
81
|
-
releaseMemoryLock(lockPath);
|
|
82
|
-
}
|
|
4
|
+
updateProjectMemory(section, content);
|
|
83
5
|
}
|
|
6
|
+
|