atabey 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ATABEY.md +4 -4
- package/README.md +35 -33
- package/bin/cli.js +2 -2
- package/bin/validate-agent-army.js +6 -6
- package/dist/framework-mcp/src/constants.js +1 -1
- package/dist/framework-mcp/src/constants.js.map +1 -1
- package/dist/framework-mcp/src/index.js +29 -5
- package/dist/framework-mcp/src/index.js.map +1 -1
- package/dist/framework-mcp/src/resources/index.d.ts +10 -0
- package/dist/framework-mcp/src/resources/index.js +59 -0
- package/dist/framework-mcp/src/resources/index.js.map +1 -0
- package/dist/framework-mcp/src/tools/control_plane/locking.js +3 -3
- package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -1
- package/dist/framework-mcp/src/tools/control_plane/registry.js +3 -2
- package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -1
- package/dist/framework-mcp/src/tools/definitions.js +33 -1
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js +8 -3
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/patch_file.js +8 -3
- 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 +3 -3
- package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/replace_text.js +8 -3
- package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/write_file.js +10 -5
- package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/audit_deps.js +2 -2
- package/dist/framework-mcp/src/tools/framework/audit_deps.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/run_tests.js +2 -2
- package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/submit_plan.d.ts +10 -0
- package/dist/framework-mcp/src/tools/framework/submit_plan.js +14 -0
- package/dist/framework-mcp/src/tools/framework/submit_plan.js.map +1 -0
- package/dist/framework-mcp/src/tools/framework/update_memory.js +1 -1
- package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -1
- package/dist/framework-mcp/src/tools/index.js +2 -0
- package/dist/framework-mcp/src/tools/index.js.map +1 -1
- package/dist/framework-mcp/src/tools/memory/get_insights.js +1 -1
- package/dist/framework-mcp/src/tools/memory/get_insights.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/log_action.js +1 -1
- package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.js +5 -5
- package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
- package/dist/framework-mcp/src/tools/observability/check_ports.js +1 -1
- package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
- package/dist/framework-mcp/src/tools/quality/check_lint.js +2 -2
- package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/get_gaps.js +1 -1
- package/dist/framework-mcp/src/tools/search/get_gaps.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/grep_search.js +3 -3
- package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -1
- package/dist/framework-mcp/src/tools/types.d.ts +1 -0
- package/dist/framework-mcp/src/utils/compliance.d.ts +6 -0
- package/dist/framework-mcp/src/utils/compliance.js +158 -5
- package/dist/framework-mcp/src/utils/compliance.js.map +1 -1
- package/dist/framework-mcp/src/utils/permissions.d.ts +12 -0
- package/dist/framework-mcp/src/utils/permissions.js +72 -0
- package/dist/framework-mcp/src/utils/permissions.js.map +1 -0
- package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js +84 -0
- package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js.map +1 -0
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +31 -31
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -1
- package/dist/framework-mcp/tests/tools/file_system/permissions.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/file_system/permissions.test.js +92 -0
- package/dist/framework-mcp/tests/tools/file_system/permissions.test.js.map +1 -0
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +5 -5
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -1
- package/dist/src/cli/adapters/core.js +13 -20
- package/dist/src/cli/adapters/core.js.map +1 -1
- package/dist/src/cli/adapters/scaffold.js +2 -2
- package/dist/src/cli/adapters/scaffold.js.map +1 -1
- package/dist/src/cli/commands/check.js +5 -3
- package/dist/src/cli/commands/check.js.map +1 -1
- package/dist/src/cli/commands/compliance.js +2 -2
- package/dist/src/cli/commands/compliance.js.map +1 -1
- package/dist/src/cli/commands/contract.js +2 -2
- package/dist/src/cli/commands/contract.js.map +1 -1
- package/dist/src/cli/commands/dashboard.d.ts +5 -0
- package/dist/src/cli/commands/dashboard.js +124 -0
- package/dist/src/cli/commands/dashboard.js.map +1 -0
- package/dist/src/cli/commands/explorer.js +3 -3
- package/dist/src/cli/commands/explorer.js.map +1 -1
- package/dist/src/cli/commands/git.js +3 -3
- package/dist/src/cli/commands/git.js.map +1 -1
- package/dist/src/cli/commands/init/create-agent.d.ts +4 -0
- package/dist/src/cli/commands/init/create-agent.js +59 -0
- package/dist/src/cli/commands/init/create-agent.js.map +1 -0
- package/dist/src/cli/commands/init/scaffold-core.d.ts +1 -0
- package/dist/src/cli/commands/init/scaffold-core.js +11 -7
- package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-docs.d.ts +1 -0
- package/dist/src/cli/commands/init/scaffold-docs.js +4 -6
- package/dist/src/cli/commands/init/scaffold-docs.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-ops.js +4 -4
- package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-standards.js +10 -8
- package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -1
- package/dist/src/cli/commands/init.js +26 -10
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/knowledge.js +3 -3
- package/dist/src/cli/commands/knowledge.js.map +1 -1
- package/dist/src/cli/commands/lint.js +2 -2
- package/dist/src/cli/commands/lint.js.map +1 -1
- package/dist/src/cli/commands/log.js +6 -28
- package/dist/src/cli/commands/log.js.map +1 -1
- package/dist/src/cli/commands/orchestrate.d.ts +10 -17
- package/dist/src/cli/commands/orchestrate.js +92 -341
- package/dist/src/cli/commands/orchestrate.js.map +1 -1
- package/dist/src/cli/commands/plan.d.ts +5 -0
- package/dist/src/cli/commands/plan.js +80 -59
- package/dist/src/cli/commands/plan.js.map +1 -1
- package/dist/src/cli/commands/script.js +3 -3
- package/dist/src/cli/commands/script.js.map +1 -1
- package/dist/src/cli/commands/security.js +2 -2
- package/dist/src/cli/commands/security.js.map +1 -1
- package/dist/src/cli/commands/status.js +65 -8
- package/dist/src/cli/commands/status.js.map +1 -1
- package/dist/src/cli/commands/trace.d.ts +4 -0
- package/dist/src/cli/commands/trace.js +83 -2
- package/dist/src/cli/commands/trace.js.map +1 -1
- package/dist/src/cli/index.js +68 -18
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/shims.js +14 -14
- package/dist/src/cli/utils/claude.js +1 -1
- package/dist/src/cli/utils/claude.js.map +1 -1
- package/dist/src/cli/utils/compliance.js +7 -1
- package/dist/src/cli/utils/compliance.js.map +1 -1
- package/dist/src/cli/utils/fs.js +1 -1
- package/dist/src/cli/utils/fs.js.map +1 -1
- package/dist/src/cli/utils/i18n.d.ts +1 -0
- package/dist/src/cli/utils/i18n.js +2 -0
- package/dist/src/cli/utils/i18n.js.map +1 -1
- package/dist/src/cli/utils/memory.d.ts +12 -3
- package/dist/src/cli/utils/memory.js +39 -31
- package/dist/src/cli/utils/memory.js.map +1 -1
- package/dist/src/cli/utils/pkg.js +2 -2
- package/dist/src/cli/utils/pkg.js.map +1 -1
- package/dist/src/cli/utils/schemas.d.ts +8 -8
- package/dist/src/cli/utils/ui.js +4 -4
- package/dist/src/cli/utils/ui.js.map +1 -1
- package/dist/src/contracts/tasks.d.ts +2 -2
- package/dist/src/dashboard/vite.config.d.ts +2 -0
- package/dist/src/dashboard/vite.config.js +16 -0
- package/dist/src/dashboard/vite.config.js.map +1 -0
- package/dist/src/modules/adapters/definitions.js +10 -10
- package/dist/src/modules/adapters/definitions.js.map +1 -1
- package/dist/src/modules/adapters/shared.js +4 -4
- package/dist/src/modules/adapters/shared.js.map +1 -1
- package/dist/src/modules/agents/definitions.d.ts +19 -0
- package/dist/src/modules/agents/definitions.js +74 -21
- package/dist/src/modules/agents/definitions.js.map +1 -1
- package/dist/src/modules/agents/registry/backend.js +8 -0
- package/dist/src/modules/agents/registry/backend.js.map +1 -1
- package/dist/src/modules/agents/registry/database.js +7 -0
- package/dist/src/modules/agents/registry/database.js.map +1 -1
- package/dist/src/modules/agents/registry/devops.js +6 -0
- package/dist/src/modules/agents/registry/devops.js.map +1 -1
- package/dist/src/modules/agents/registry/frontend.js +8 -0
- package/dist/src/modules/agents/registry/frontend.js.map +1 -1
- package/dist/src/modules/agents/registry/security.js +6 -0
- package/dist/src/modules/agents/registry/security.js.map +1 -1
- package/dist/src/modules/agents/types.d.ts +2 -0
- package/dist/src/modules/engines/evaluation-engine.d.ts +11 -0
- package/dist/src/modules/engines/evaluation-engine.js +103 -0
- package/dist/src/modules/engines/evaluation-engine.js.map +1 -0
- package/dist/src/modules/engines/health-engine.d.ts +16 -0
- package/dist/src/modules/engines/health-engine.js +50 -0
- package/dist/src/modules/engines/health-engine.js.map +1 -0
- package/dist/src/modules/engines/planning-engine.d.ts +25 -0
- package/dist/src/modules/engines/planning-engine.js +79 -0
- package/dist/src/modules/engines/planning-engine.js.map +1 -0
- package/dist/src/modules/engines/risk-engine.d.ts +18 -0
- package/dist/src/modules/engines/risk-engine.js +106 -0
- package/dist/src/modules/engines/risk-engine.js.map +1 -0
- package/dist/src/modules/engines/routing-engine.d.ts +11 -0
- package/dist/src/modules/engines/routing-engine.js +74 -0
- package/dist/src/modules/engines/routing-engine.js.map +1 -0
- package/dist/src/modules/engines/types.d.ts +47 -0
- package/dist/src/modules/engines/types.js +2 -0
- package/dist/src/modules/engines/types.js.map +1 -0
- package/dist/src/shared/constants.d.ts +6 -2
- package/dist/src/shared/constants.js +5 -1
- package/dist/src/shared/constants.js.map +1 -1
- package/dist/src/shared/fs.d.ts +1 -0
- package/dist/src/shared/fs.js +4 -0
- package/dist/src/shared/fs.js.map +1 -1
- package/dist/src/shared/storage.d.ts +60 -0
- package/dist/src/shared/storage.js +208 -0
- package/dist/src/shared/storage.js.map +1 -0
- package/dist/tests/adapter.test.js +3 -2
- package/dist/tests/adapter.test.js.map +1 -1
- package/dist/tests/agent-memory-v2.test.d.ts +1 -0
- package/dist/tests/agent-memory-v2.test.js +68 -0
- package/dist/tests/agent-memory-v2.test.js.map +1 -0
- package/dist/tests/agents-definitions.test.js +42 -0
- package/dist/tests/agents-definitions.test.js.map +1 -1
- package/dist/tests/integration/hermes_locking.test.js +7 -10
- package/dist/tests/integration/hermes_locking.test.js.map +1 -1
- package/dist/tests/orchestrate.test.js +5 -1
- package/dist/tests/orchestrate.test.js.map +1 -1
- package/dist/tests/orchestrator-dependencies.test.d.ts +1 -0
- package/dist/tests/orchestrator-dependencies.test.js +52 -0
- package/dist/tests/orchestrator-dependencies.test.js.map +1 -0
- package/dist/tests/plan.test.d.ts +1 -0
- package/dist/tests/plan.test.js +63 -0
- package/dist/tests/plan.test.js.map +1 -0
- package/dist/tests/planning-engine.test.d.ts +1 -0
- package/dist/tests/planning-engine.test.js +50 -0
- package/dist/tests/planning-engine.test.js.map +1 -0
- package/dist/tests/status-cost.test.d.ts +1 -0
- package/dist/tests/status-cost.test.js +54 -0
- package/dist/tests/status-cost.test.js.map +1 -0
- package/dist/tests/status.test.js +8 -7
- package/dist/tests/status.test.js.map +1 -1
- package/dist/tests/trace-replay.test.d.ts +1 -0
- package/dist/tests/trace-replay.test.js +65 -0
- package/dist/tests/trace-replay.test.js.map +1 -0
- package/dist/tests/trace.test.js +14 -7
- package/dist/tests/trace.test.js.map +1 -1
- package/dist/ui/assets/index-Bkt7APzu.css +1 -0
- package/dist/ui/assets/index-CeX-06mI.js +49 -0
- package/dist/ui/index.html +14 -0
- package/framework-mcp/dist/constants.js +1 -1
- package/framework-mcp/{src/constants.ts → dist/framework-mcp/src/constants.js} +4 -18
- package/framework-mcp/{src/index.ts → dist/framework-mcp/src/index.js} +52 -53
- package/framework-mcp/dist/framework-mcp/src/resources/index.js +58 -0
- package/framework-mcp/{src/tools/control_plane/locking.ts → dist/framework-mcp/src/tools/control_plane/locking.js} +14 -21
- package/framework-mcp/{src/tools/control_plane/registry.ts → dist/framework-mcp/src/tools/control_plane/registry.js} +8 -11
- package/framework-mcp/{src/tools/definitions.ts → dist/framework-mcp/src/tools/definitions.js} +35 -5
- package/framework-mcp/{src/tools/file_system/batch_surgical_edit.ts → dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js} +16 -31
- package/framework-mcp/{src/tools/file_system/patch_file.ts → dist/framework-mcp/src/tools/file_system/patch_file.js} +9 -14
- package/framework-mcp/{src/tools/file_system/read_file.ts → dist/framework-mcp/src/tools/file_system/read_file.js} +9 -16
- package/framework-mcp/{src/tools/file_system/replace_text.ts → dist/framework-mcp/src/tools/file_system/replace_text.js} +13 -17
- package/framework-mcp/{src/tools/file_system/write_file.ts → dist/framework-mcp/src/tools/file_system/write_file.js} +14 -16
- package/framework-mcp/{src/tools/framework/audit_deps.ts → dist/framework-mcp/src/tools/framework/audit_deps.js} +9 -17
- package/framework-mcp/{src/tools/framework/get_status.ts → dist/framework-mcp/src/tools/framework/get_status.js} +1 -3
- package/framework-mcp/{src/tools/framework/orchestrate.ts → dist/framework-mcp/src/tools/framework/orchestrate.js} +1 -3
- package/framework-mcp/{src/tools/framework/run_tests.ts → dist/framework-mcp/src/tools/framework/run_tests.js} +9 -12
- package/framework-mcp/dist/framework-mcp/src/tools/framework/submit_plan.js +13 -0
- package/framework-mcp/{src/tools/framework/update_contract_hash.ts → dist/framework-mcp/src/tools/framework/update_contract_hash.js} +1 -3
- package/framework-mcp/{src/tools/framework/update_memory.ts → dist/framework-mcp/src/tools/framework/update_memory.js} +2 -4
- package/framework-mcp/{src/tools/index.ts → dist/framework-mcp/src/tools/index.js} +5 -7
- package/framework-mcp/{src/tools/memory/get_insights.ts → dist/framework-mcp/src/tools/memory/get_insights.js} +4 -11
- package/framework-mcp/{src/tools/memory/read_memory.ts → dist/framework-mcp/src/tools/memory/read_memory.js} +3 -6
- package/framework-mcp/{src/tools/messaging/log_action.ts → dist/framework-mcp/src/tools/messaging/log_action.js} +2 -8
- package/framework-mcp/{src/tools/messaging/send_message.ts → dist/framework-mcp/src/tools/messaging/send_message.js} +19 -22
- package/framework-mcp/{src/tools/observability/check_ports.ts → dist/framework-mcp/src/tools/observability/check_ports.js} +6 -10
- package/framework-mcp/{src/tools/observability/get_health.ts → dist/framework-mcp/src/tools/observability/get_health.js} +1 -6
- package/framework-mcp/{src/tools/quality/check_lint.ts → dist/framework-mcp/src/tools/quality/check_lint.js} +3 -9
- package/framework-mcp/{src/tools/search/get_gaps.ts → dist/framework-mcp/src/tools/search/get_gaps.js} +12 -18
- package/framework-mcp/{src/tools/search/get_map.ts → dist/framework-mcp/src/tools/search/get_map.js} +14 -19
- package/framework-mcp/{src/tools/search/grep_search.ts → dist/framework-mcp/src/tools/search/grep_search.js} +26 -26
- package/framework-mcp/{src/tools/search/list_dir.ts → dist/framework-mcp/src/tools/search/list_dir.js} +4 -10
- package/framework-mcp/{src/tools/shell/run_command.ts → dist/framework-mcp/src/tools/shell/run_command.js} +1 -11
- package/framework-mcp/dist/framework-mcp/src/tools/types.js +1 -0
- package/framework-mcp/{src/utils/cli.ts → dist/framework-mcp/src/utils/cli.js} +25 -19
- package/framework-mcp/dist/framework-mcp/src/utils/compliance.js +231 -0
- package/framework-mcp/{src/utils/fs.ts → dist/framework-mcp/src/utils/fs.js} +9 -10
- package/framework-mcp/{src/utils/metrics.ts → dist/framework-mcp/src/utils/metrics.js} +11 -28
- package/framework-mcp/dist/framework-mcp/src/utils/permissions.js +71 -0
- package/framework-mcp/{src/utils/security.ts → dist/framework-mcp/src/utils/security.js} +9 -15
- package/framework-mcp/dist/index.js +29 -5
- package/framework-mcp/dist/resources/index.js +58 -0
- package/{src/cli/adapters/core.ts → framework-mcp/dist/src/cli/adapters/core.js} +21 -41
- package/{src/cli/adapters/index.ts → framework-mcp/dist/src/cli/adapters/index.js} +1 -1
- package/{src/cli/adapters/paths.ts → framework-mcp/dist/src/cli/adapters/paths.js} +19 -53
- package/{src/cli/adapters/scaffold.ts → framework-mcp/dist/src/cli/adapters/scaffold.js} +18 -42
- package/{src/cli/adapters/utils.ts → framework-mcp/dist/src/cli/adapters/utils.js} +19 -31
- package/{src/cli/commands/approve.ts → framework-mcp/dist/src/cli/commands/approve.js} +15 -25
- package/{src/cli/commands/check.ts → framework-mcp/dist/src/cli/commands/check.js} +36 -43
- package/{src/cli/commands/compliance.ts → framework-mcp/dist/src/cli/commands/compliance.js} +10 -15
- package/{src/cli/commands/contract.ts → framework-mcp/dist/src/cli/commands/contract.js} +13 -31
- package/framework-mcp/dist/src/cli/commands/dashboard.js +123 -0
- package/{src/cli/commands/explorer.ts → framework-mcp/dist/src/cli/commands/explorer.js} +14 -17
- package/{src/cli/commands/git.ts → framework-mcp/dist/src/cli/commands/git.js} +15 -14
- package/framework-mcp/dist/src/cli/commands/init/create-agent.js +58 -0
- package/{src/cli/commands/init/scaffold-core.ts → framework-mcp/dist/src/cli/commands/init/scaffold-core.js} +35 -59
- package/framework-mcp/dist/src/cli/commands/init/scaffold-docs.js +34 -0
- package/{src/cli/commands/init/scaffold-ops.ts → framework-mcp/dist/src/cli/commands/init/scaffold-ops.js} +19 -22
- package/{src/cli/commands/init/scaffold-standards.ts → framework-mcp/dist/src/cli/commands/init/scaffold-standards.js} +20 -20
- package/{src/cli/commands/init.ts → framework-mcp/dist/src/cli/commands/init.js} +51 -77
- package/{src/cli/commands/knowledge.ts → framework-mcp/dist/src/cli/commands/knowledge.js} +9 -11
- package/{src/cli/commands/lint.ts → framework-mcp/dist/src/cli/commands/lint.js} +5 -6
- package/framework-mcp/dist/src/cli/commands/log.js +10 -0
- package/{src/cli/commands/memory.ts → framework-mcp/dist/src/cli/commands/memory.js} +1 -3
- package/framework-mcp/dist/src/cli/commands/orchestrate.js +159 -0
- package/framework-mcp/dist/src/cli/commands/plan.js +117 -0
- package/{src/cli/commands/script.ts → framework-mcp/dist/src/cli/commands/script.js} +6 -7
- package/{src/cli/commands/security.ts → framework-mcp/dist/src/cli/commands/security.js} +6 -8
- package/framework-mcp/dist/src/cli/commands/status.js +97 -0
- package/framework-mcp/dist/src/cli/commands/trace.js +109 -0
- package/{src/cli/index.ts → framework-mcp/dist/src/cli/index.js} +80 -64
- package/{src/cli/shims.ts → framework-mcp/dist/src/cli/shims.js} +15 -15
- package/{src/cli/utils/claude.ts → framework-mcp/dist/src/cli/utils/claude.js} +8 -15
- package/{src/cli/utils/compliance.ts → framework-mcp/dist/src/cli/utils/compliance.js} +18 -36
- package/{src/cli/utils/config-schema.ts → framework-mcp/dist/src/cli/utils/config-schema.js} +0 -6
- package/{src/cli/utils/fs.ts → framework-mcp/dist/src/cli/utils/fs.js} +34 -67
- package/{src/cli/utils/i18n.ts → framework-mcp/dist/src/cli/utils/i18n.js} +3 -17
- package/{src/cli/utils/memory.ts → framework-mcp/dist/src/cli/utils/memory.js} +87 -114
- package/{src/cli/utils/pkg.ts → framework-mcp/dist/src/cli/utils/pkg.js} +120 -155
- package/{src/cli/utils/schemas.ts → framework-mcp/dist/src/cli/utils/schemas.js} +0 -3
- package/{src/cli/utils/string.ts → framework-mcp/dist/src/cli/utils/string.js} +18 -24
- package/{src/cli/utils/time.ts → framework-mcp/dist/src/cli/utils/time.js} +4 -4
- package/{src/cli/utils/ui.ts → framework-mcp/dist/src/cli/utils/ui.js} +9 -17
- package/{src/contracts/tasks.ts → framework-mcp/dist/src/contracts/tasks.js} +0 -6
- package/framework-mcp/dist/src/dashboard/vite.config.js +15 -0
- package/framework-mcp/dist/src/modules/adapters/definitions.js +140 -0
- package/framework-mcp/dist/src/modules/adapters/registry.js +18 -0
- package/{src/modules/adapters/shared.ts → framework-mcp/dist/src/modules/adapters/shared.js} +9 -25
- package/framework-mcp/dist/src/modules/adapters/types.js +1 -0
- package/{src/modules/agents/definitions.ts → framework-mcp/dist/src/modules/agents/definitions.js} +158 -161
- package/{src/modules/agents/registry/analyst.ts → framework-mcp/dist/src/modules/agents/registry/analyst.js} +9 -14
- package/{src/modules/agents/registry/architect.ts → framework-mcp/dist/src/modules/agents/registry/architect.js} +9 -14
- package/{src/modules/agents/registry/backend.ts → framework-mcp/dist/src/modules/agents/registry/backend.js} +16 -13
- package/{src/modules/agents/registry/database.ts → framework-mcp/dist/src/modules/agents/registry/database.js} +16 -14
- package/{src/modules/agents/registry/devops.ts → framework-mcp/dist/src/modules/agents/registry/devops.js} +15 -14
- package/{src/modules/agents/registry/explorer.ts → framework-mcp/dist/src/modules/agents/registry/explorer.js} +9 -14
- package/{src/modules/agents/registry/frontend.ts → framework-mcp/dist/src/modules/agents/registry/frontend.js} +17 -14
- package/{src/modules/agents/registry/git.ts → framework-mcp/dist/src/modules/agents/registry/git.js} +9 -14
- package/{src/modules/agents/registry/manager.ts → framework-mcp/dist/src/modules/agents/registry/manager.js} +10 -15
- package/{src/modules/agents/registry/mobile.ts → framework-mcp/dist/src/modules/agents/registry/mobile.js} +9 -14
- package/{src/modules/agents/registry/native.ts → framework-mcp/dist/src/modules/agents/registry/native.js} +9 -14
- package/{src/modules/agents/registry/quality.ts → framework-mcp/dist/src/modules/agents/registry/quality.js} +9 -14
- package/{src/modules/agents/registry/security.ts → framework-mcp/dist/src/modules/agents/registry/security.js} +15 -14
- package/framework-mcp/dist/src/modules/agents/types.js +1 -0
- package/framework-mcp/dist/src/modules/engines/evaluation-engine.js +102 -0
- package/framework-mcp/dist/src/modules/engines/health-engine.js +49 -0
- package/framework-mcp/dist/src/modules/engines/planning-engine.js +78 -0
- package/framework-mcp/dist/src/modules/engines/risk-engine.js +105 -0
- package/framework-mcp/dist/src/modules/engines/routing-engine.js +73 -0
- package/framework-mcp/dist/src/modules/engines/types.js +1 -0
- package/{src/modules/skills/definitions.ts → framework-mcp/dist/src/modules/skills/definitions.js} +0 -1
- package/{src/shared/constants.ts → framework-mcp/dist/src/shared/constants.js} +40 -71
- package/{src/shared/errors.ts → framework-mcp/dist/src/shared/errors.js} +10 -17
- package/{src/shared/fs.ts → framework-mcp/dist/src/shared/fs.js} +14 -13
- package/{src/shared/logger.ts → framework-mcp/dist/src/shared/logger.js} +28 -51
- package/framework-mcp/dist/src/shared/storage.js +207 -0
- package/framework-mcp/dist/src/shared/types.js +12 -0
- package/framework-mcp/dist/tools/control_plane/locking.js +3 -3
- package/framework-mcp/dist/tools/control_plane/registry.js +3 -2
- package/framework-mcp/dist/tools/definitions.js +33 -1
- package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +8 -3
- package/framework-mcp/dist/tools/file_system/patch_file.js +8 -3
- package/framework-mcp/dist/tools/file_system/read_file.js +3 -3
- package/framework-mcp/dist/tools/file_system/replace_text.js +8 -3
- package/framework-mcp/dist/tools/file_system/write_file.js +10 -5
- package/framework-mcp/dist/tools/framework/audit_deps.js +2 -2
- package/framework-mcp/dist/tools/framework/run_tests.js +2 -2
- package/framework-mcp/dist/tools/framework/submit_plan.js +13 -0
- package/framework-mcp/dist/tools/framework/update_memory.js +1 -1
- package/framework-mcp/dist/tools/index.js +2 -0
- package/framework-mcp/dist/tools/memory/get_insights.js +1 -1
- package/framework-mcp/dist/tools/messaging/log_action.js +1 -1
- package/framework-mcp/dist/tools/messaging/send_message.js +5 -5
- package/framework-mcp/dist/tools/observability/check_ports.js +1 -1
- package/framework-mcp/dist/tools/quality/check_lint.js +2 -2
- package/framework-mcp/dist/tools/search/get_gaps.js +1 -1
- package/framework-mcp/dist/tools/search/grep_search.js +3 -3
- package/framework-mcp/dist/utils/compliance.js +158 -5
- package/framework-mcp/dist/utils/permissions.js +71 -0
- package/framework-mcp/package.json +7 -1
- package/mcp.json +1 -1
- package/package.json +10 -6
- package/templates/prompts/contract-design-recipe.md +1 -1
- package/templates/prompts/db-management-recipe.md +3 -3
- package/templates/prompts/deployment-recipe.md +3 -3
- package/templates/prompts/performance-optimization-recipe.md +3 -3
- package/templates/prompts/pull-request-template.md +2 -2
- package/templates/prompts/security-audit-recipe.md +3 -3
- package/templates/standards/crud-governance.md +1 -1
- package/templates/standards/deployment-standards.md +1 -1
- package/templates/standards/governance-standards.md +1 -1
- package/templates/standards/llm-governance.md +1 -1
- package/templates/standards/nextjs-standards.md +13 -0
- package/templates/standards/observability-standards.md +1 -1
- package/templates/standards/security-audit-standards.md +1 -1
- package/templates/standards/security-standards.md +1 -1
- package/templates/standards/testing-standards.md +1 -1
- package/templates/standards/vite-standards.md +13 -0
- package/framework-mcp/package-lock.json +0 -1191
- package/framework-mcp/src/declarations.d.ts +0 -17
- package/framework-mcp/src/tools/types.ts +0 -89
- package/framework-mcp/src/utils/compliance.ts +0 -95
- package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +0 -212
- package/framework-mcp/tests/tools/messaging/send_message.test.ts +0 -136
- package/framework-mcp/tests/tools/quality/check_lint.test.ts +0 -46
- package/framework-mcp/tests/tools/shell/run_command.test.ts +0 -55
- package/framework-mcp/tsconfig.json +0 -14
- package/src/cli/commands/init/scaffold-docs.ts +0 -44
- package/src/cli/commands/log.ts +0 -37
- package/src/cli/commands/orchestrate.ts +0 -450
- package/src/cli/commands/plan.ts +0 -113
- package/src/cli/commands/status.ts +0 -44
- package/src/cli/commands/trace.ts +0 -31
- package/src/modules/adapters/definitions.ts +0 -171
- package/src/modules/adapters/registry.ts +0 -27
- package/src/modules/adapters/types.ts +0 -16
- package/src/modules/agents/types.ts +0 -37
- package/src/schema/agent-lifecycle-schema.json +0 -59
- package/src/shared/types.ts +0 -20
- /package/{src/contracts/index.ts → framework-mcp/dist/src/contracts/index.js} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { getFrameworkDir } from "../../cli/utils/memory.js";
|
|
4
|
+
import { ensureDir, writeJsonFile } from "../../shared/fs.js";
|
|
5
|
+
/**
|
|
6
|
+
* [DATA] Evaluation & Health Engine
|
|
7
|
+
* Rates agent performance and tracks overall project stability.
|
|
8
|
+
*/
|
|
9
|
+
export class HealthEngine {
|
|
10
|
+
/**
|
|
11
|
+
* Records a post-task evaluation.
|
|
12
|
+
*/
|
|
13
|
+
static async recordEvaluation(result) {
|
|
14
|
+
const evalDir = path.join(getFrameworkDir(), "memory", "evaluations");
|
|
15
|
+
ensureDir(evalDir);
|
|
16
|
+
const filePath = path.join(evalDir, `${result.traceId}_${result.agent}.json`);
|
|
17
|
+
writeJsonFile(filePath, result);
|
|
18
|
+
// Trigger health update
|
|
19
|
+
await this.updateProjectHealth();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Aggregates all data to calculate the overall Project Health.
|
|
23
|
+
*/
|
|
24
|
+
static async updateProjectHealth() {
|
|
25
|
+
// This would normally read compliance reports, test results, and recent evaluations
|
|
26
|
+
// Prototyping with semi-static values for now
|
|
27
|
+
const health = {
|
|
28
|
+
score: 85,
|
|
29
|
+
codeQuality: 90,
|
|
30
|
+
security: 80,
|
|
31
|
+
architecture: 85,
|
|
32
|
+
lastUpdated: new Date().toISOString()
|
|
33
|
+
};
|
|
34
|
+
const healthFile = path.join(getFrameworkDir(), "memory", "HEALTH.json");
|
|
35
|
+
writeJsonFile(healthFile, health);
|
|
36
|
+
return health;
|
|
37
|
+
}
|
|
38
|
+
static getHealth() {
|
|
39
|
+
try {
|
|
40
|
+
const healthFile = path.join(getFrameworkDir(), "memory", "HEALTH.json");
|
|
41
|
+
if (!fs.existsSync(healthFile))
|
|
42
|
+
return null;
|
|
43
|
+
return JSON.parse(fs.readFileSync(healthFile, "utf8"));
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { generateULID } from "../../cli/utils/time.js";
|
|
2
|
+
import { RoutingEngine } from "./routing-engine.js";
|
|
3
|
+
/**
|
|
4
|
+
* 🗺️ Planning Engine (The Strategist)
|
|
5
|
+
* Responsible for decomposing complex requests into a DAG of atomic tasks.
|
|
6
|
+
*/
|
|
7
|
+
export class PlanningEngine {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new Plan structure.
|
|
10
|
+
* In a real enterprise scenario, this would be fueled by an LLM prompt.
|
|
11
|
+
* For now, it provides the structural backbone.
|
|
12
|
+
*/
|
|
13
|
+
static createPlan(rawTasks) {
|
|
14
|
+
const planId = generateULID();
|
|
15
|
+
const tasks = rawTasks.map((t, index) => {
|
|
16
|
+
const id = t.id || `TASK_${String(index + 1).padStart(2, "0")}`;
|
|
17
|
+
return {
|
|
18
|
+
id,
|
|
19
|
+
agent: t.agent || RoutingEngine.resolveAgent(t.task),
|
|
20
|
+
task: t.task,
|
|
21
|
+
dependencies: t.dependencies || []
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
planId,
|
|
26
|
+
tasks
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Validates a plan's integrity (no circular dependencies, all agents valid).
|
|
31
|
+
*/
|
|
32
|
+
static validatePlan(plan) {
|
|
33
|
+
const errors = [];
|
|
34
|
+
const taskIds = new Set(plan.tasks.map(t => t.id));
|
|
35
|
+
for (const task of plan.tasks) {
|
|
36
|
+
// Check dependencies exist
|
|
37
|
+
for (const dep of task.dependencies) {
|
|
38
|
+
if (!taskIds.has(dep)) {
|
|
39
|
+
errors.push(`Task ${task.id} has non-existent dependency: ${dep}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Check circular dependencies (simple check for now)
|
|
43
|
+
if (task.dependencies.includes(task.id)) {
|
|
44
|
+
errors.push(`Task ${task.id} cannot depend on itself.`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Circular dependency detection using DFS
|
|
48
|
+
const visited = new Set();
|
|
49
|
+
const recStack = new Set();
|
|
50
|
+
const hasCycle = (taskId) => {
|
|
51
|
+
if (recStack.has(taskId))
|
|
52
|
+
return true;
|
|
53
|
+
if (visited.has(taskId))
|
|
54
|
+
return false;
|
|
55
|
+
visited.add(taskId);
|
|
56
|
+
recStack.add(taskId);
|
|
57
|
+
const task = plan.tasks.find(t => t.id === taskId);
|
|
58
|
+
if (task) {
|
|
59
|
+
for (const dep of task.dependencies) {
|
|
60
|
+
if (hasCycle(dep))
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
recStack.delete(taskId);
|
|
65
|
+
return false;
|
|
66
|
+
};
|
|
67
|
+
for (const task of plan.tasks) {
|
|
68
|
+
if (hasCycle(task.id)) {
|
|
69
|
+
errors.push("Circular dependency detected in plan.");
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
valid: errors.length === 0,
|
|
75
|
+
errors
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [SECURITY] Risk Engine (The Guardian)
|
|
3
|
+
* Calculates the danger level of a proposed task or operation.
|
|
4
|
+
*/
|
|
5
|
+
export class RiskEngine {
|
|
6
|
+
static HIGH_RISK_KEYWORDS = [
|
|
7
|
+
{ word: "delete", weight: 40 },
|
|
8
|
+
{ word: "drop", weight: 50 },
|
|
9
|
+
{ word: "truncate", weight: 50 },
|
|
10
|
+
{ word: "rm -rf", weight: 60 },
|
|
11
|
+
{ word: "purge", weight: 40 },
|
|
12
|
+
{ word: "format", weight: 50 },
|
|
13
|
+
{ word: "force", weight: 20 },
|
|
14
|
+
];
|
|
15
|
+
static SENSITIVE_PATHS = [
|
|
16
|
+
{ pattern: /\.env/, weight: 50 },
|
|
17
|
+
{ pattern: /config/, weight: 20 },
|
|
18
|
+
{ pattern: /database\//, weight: 30 },
|
|
19
|
+
{ pattern: /auth\//, weight: 30 },
|
|
20
|
+
{ pattern: /security/, weight: 30 },
|
|
21
|
+
{ pattern: /atabey/, weight: 40 }, // Framework protection
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* Assesses the risk of a natural language task or command string.
|
|
25
|
+
*/
|
|
26
|
+
static assessTaskRisk(task) {
|
|
27
|
+
const factors = [];
|
|
28
|
+
let totalScore = 0;
|
|
29
|
+
// 1. Keyword Analysis
|
|
30
|
+
for (const { word, weight } of this.HIGH_RISK_KEYWORDS) {
|
|
31
|
+
if (new RegExp(`\\b${word}\\b`, "i").test(task)) {
|
|
32
|
+
factors.push({
|
|
33
|
+
factor: `Keyword: ${word}`,
|
|
34
|
+
score: weight,
|
|
35
|
+
description: `Detected high-risk keyword '${word}' in task description.`
|
|
36
|
+
});
|
|
37
|
+
totalScore += weight;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// 2. Path Sensitivity (if paths are mentioned in the task)
|
|
41
|
+
for (const { pattern, weight } of this.SENSITIVE_PATHS) {
|
|
42
|
+
if (pattern.test(task)) {
|
|
43
|
+
factors.push({
|
|
44
|
+
factor: `Sensitive Path: ${pattern.source}`,
|
|
45
|
+
score: weight,
|
|
46
|
+
description: `Task involves access to sensitive path or pattern: ${pattern.source}`
|
|
47
|
+
});
|
|
48
|
+
totalScore += weight;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// 3. Complexity Risk (Length of task as a proxy)
|
|
52
|
+
if (task.length > 300) {
|
|
53
|
+
const score = 10;
|
|
54
|
+
factors.push({
|
|
55
|
+
factor: "High Complexity",
|
|
56
|
+
score,
|
|
57
|
+
description: "Task description is unusually long, increasing the chance of misunderstanding."
|
|
58
|
+
});
|
|
59
|
+
totalScore += score;
|
|
60
|
+
}
|
|
61
|
+
return this.finalizeAssessment(totalScore, factors);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Assesses risk based on a proposed file change.
|
|
65
|
+
*/
|
|
66
|
+
static assessChangeRisk(filePath, operation) {
|
|
67
|
+
const factors = [];
|
|
68
|
+
let totalScore = 0;
|
|
69
|
+
// 1. Operation Weight
|
|
70
|
+
const opWeights = { write: 30, replace: 5, patch: 10 };
|
|
71
|
+
totalScore += opWeights[operation];
|
|
72
|
+
factors.push({
|
|
73
|
+
factor: `Operation: ${operation}`,
|
|
74
|
+
score: opWeights[operation],
|
|
75
|
+
description: `A '${operation}' operation is inherently riskier than a surgical 'replace'.`
|
|
76
|
+
});
|
|
77
|
+
// 2. File Path Risk
|
|
78
|
+
for (const { pattern, weight } of this.SENSITIVE_PATHS) {
|
|
79
|
+
if (pattern.test(filePath)) {
|
|
80
|
+
factors.push({
|
|
81
|
+
factor: `Sensitive File: ${filePath}`,
|
|
82
|
+
score: weight,
|
|
83
|
+
description: "Modifying a sensitive file is high risk."
|
|
84
|
+
});
|
|
85
|
+
totalScore += weight;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return this.finalizeAssessment(totalScore, factors);
|
|
89
|
+
}
|
|
90
|
+
static finalizeAssessment(totalScore, factors) {
|
|
91
|
+
let severity = "LOW";
|
|
92
|
+
if (totalScore >= 80)
|
|
93
|
+
severity = "CRITICAL";
|
|
94
|
+
else if (totalScore >= 50)
|
|
95
|
+
severity = "HIGH";
|
|
96
|
+
else if (totalScore >= 20)
|
|
97
|
+
severity = "MEDIUM";
|
|
98
|
+
return {
|
|
99
|
+
totalScore: Math.min(totalScore, 100),
|
|
100
|
+
severity,
|
|
101
|
+
factors,
|
|
102
|
+
requiresApproval: totalScore >= 60
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { getFrameworkDir } from "../../cli/utils/memory.js";
|
|
4
|
+
import { ALL_AGENTS } from "../agents/definitions.js";
|
|
5
|
+
export class RoutingEngine {
|
|
6
|
+
/**
|
|
7
|
+
* Finds the best agent for a given task description based on capability scores and specialties.
|
|
8
|
+
*/
|
|
9
|
+
static resolveAgent(taskDescription) {
|
|
10
|
+
const textLower = taskDescription.toLowerCase();
|
|
11
|
+
const candidates = this.getCandidates();
|
|
12
|
+
let bestAgent = "@backend"; // Default fallback
|
|
13
|
+
let bestScore = 0;
|
|
14
|
+
for (const candidate of candidates) {
|
|
15
|
+
let candidateScore = 0;
|
|
16
|
+
for (const [specialty, weight] of Object.entries(candidate.specialties)) {
|
|
17
|
+
const specLower = specialty.toLowerCase();
|
|
18
|
+
if (textLower.includes(specLower)) {
|
|
19
|
+
candidateScore += weight;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (candidateScore > bestScore) {
|
|
23
|
+
bestScore = candidateScore;
|
|
24
|
+
bestAgent = candidate.agent;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// Static fallback keywords if no specialty match found
|
|
28
|
+
if (bestScore === 0) {
|
|
29
|
+
if (textLower.includes("frontend") || textLower.includes("ui") || textLower.includes("page") || textLower.includes("css") || textLower.includes("html") || textLower.includes("react")) {
|
|
30
|
+
bestAgent = "@frontend";
|
|
31
|
+
}
|
|
32
|
+
else if (textLower.includes("security") || textLower.includes("audit") || textLower.includes("auth") || textLower.includes("token")) {
|
|
33
|
+
bestAgent = "@security";
|
|
34
|
+
}
|
|
35
|
+
else if (textLower.includes("database") || textLower.includes("migration") || textLower.includes("sql") || textLower.includes("schema") || textLower.includes("postgres")) {
|
|
36
|
+
bestAgent = "@database";
|
|
37
|
+
}
|
|
38
|
+
else if (textLower.includes("docker") || textLower.includes("ci") || textLower.includes("deploy") || textLower.includes("devops")) {
|
|
39
|
+
bestAgent = "@devops";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return bestAgent;
|
|
43
|
+
}
|
|
44
|
+
static getCandidates() {
|
|
45
|
+
const frameworkDir = getFrameworkDir();
|
|
46
|
+
const registryDir = path.join(frameworkDir, "registry");
|
|
47
|
+
let candidates = [];
|
|
48
|
+
// 1. Try Control Plane Registry first (active registered agents)
|
|
49
|
+
if (fs.existsSync(registryDir)) {
|
|
50
|
+
const registryFiles = fs.readdirSync(registryDir).filter(f => f.endsWith("_active.json"));
|
|
51
|
+
for (const file of registryFiles) {
|
|
52
|
+
try {
|
|
53
|
+
const data = JSON.parse(fs.readFileSync(path.join(registryDir, file), "utf8"));
|
|
54
|
+
if (data.agent && data.specialties) {
|
|
55
|
+
candidates.push({
|
|
56
|
+
agent: data.agent,
|
|
57
|
+
specialties: data.specialties
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch { /* ignore */ }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// 2. Fallback to built-in agent definitions
|
|
65
|
+
if (candidates.length === 0) {
|
|
66
|
+
candidates = ALL_AGENTS.map(ag => ({
|
|
67
|
+
agent: ag.name.startsWith("@") ? ag.name : `@${ag.name}`,
|
|
68
|
+
specialties: ag.specialties || {}
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
return candidates;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Agent Atabey — Single Source of Truth for framework constants.
|
|
3
3
|
* Import from here instead of hardcoding paths, phases, or directory names.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
5
|
// ─── Framework identity ───────────────────────────────────────────────────────
|
|
7
|
-
|
|
8
6
|
export const FRAMEWORK = {
|
|
9
7
|
NAME: "Agent Atabey",
|
|
10
8
|
CORE_DIR: ".atabey",
|
|
@@ -13,29 +11,26 @@ export const FRAMEWORK = {
|
|
|
13
11
|
DEFAULT_TRACE_ID: "T-000",
|
|
14
12
|
DEFAULT_PHASE: "PHASE_0",
|
|
15
13
|
DEFAULT_MANAGER_STATE: "ACTIVE",
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
DASHBOARD_PORT: 5858,
|
|
15
|
+
};
|
|
18
16
|
export const PROJECT_PHASES = [
|
|
19
17
|
"PHASE_0",
|
|
20
18
|
"PHASE_1",
|
|
21
19
|
"PHASE_2",
|
|
22
20
|
"PHASE_3",
|
|
23
21
|
"PHASE_4",
|
|
24
|
-
]
|
|
25
|
-
|
|
22
|
+
];
|
|
26
23
|
// ─── Adapter platform directories (native / legacy) ───────────────────────────
|
|
27
|
-
|
|
28
24
|
export const ADAPTER_DIRS = {
|
|
29
25
|
GEMINI: ".gemini",
|
|
30
26
|
CLAUDE: ".claude",
|
|
31
27
|
GROK: ".grok",
|
|
32
28
|
CURSOR: ".cursor",
|
|
33
29
|
CODEX: ".agents",
|
|
34
|
-
ANTIGRAVITY: ".
|
|
30
|
+
ANTIGRAVITY: ".agents",
|
|
35
31
|
LOCAL: ".atabey",
|
|
36
32
|
LEGACY_AGENT: ".agent",
|
|
37
|
-
}
|
|
38
|
-
|
|
33
|
+
};
|
|
39
34
|
/** Priority order for framework directory resolution (CLI + MCP). */
|
|
40
35
|
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
41
36
|
FRAMEWORK.CORE_DIR,
|
|
@@ -46,8 +41,7 @@ export const FRAMEWORK_DIR_CANDIDATES = [
|
|
|
46
41
|
ADAPTER_DIRS.CURSOR,
|
|
47
42
|
ADAPTER_DIRS.ANTIGRAVITY,
|
|
48
43
|
ADAPTER_DIRS.LOCAL,
|
|
49
|
-
]
|
|
50
|
-
|
|
44
|
+
];
|
|
51
45
|
/** Slug under `.agents/{slug}/` for each adapter in unified mode. */
|
|
52
46
|
export const UNIFIED_ADAPTER_SLUG = {
|
|
53
47
|
gemini: "gemini",
|
|
@@ -57,12 +51,8 @@ export const UNIFIED_ADAPTER_SLUG = {
|
|
|
57
51
|
codex: "codex",
|
|
58
52
|
local: "local",
|
|
59
53
|
"antigravity-cli": "antigravity",
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type UnifiedAdapterSlug = keyof typeof UNIFIED_ADAPTER_SLUG;
|
|
63
|
-
|
|
54
|
+
};
|
|
64
55
|
// ─── Native agent instruction paths (legacy tool compatibility) ───────────────
|
|
65
|
-
|
|
66
56
|
export const NATIVE_AGENT_PATHS = {
|
|
67
57
|
gemini: pathJoin(ADAPTER_DIRS.GEMINI, "agents"),
|
|
68
58
|
claude: pathJoin(ADAPTER_DIRS.CLAUDE, "agents"),
|
|
@@ -71,8 +61,7 @@ export const NATIVE_AGENT_PATHS = {
|
|
|
71
61
|
codex: pathJoin(ADAPTER_DIRS.CODEX, "instructions"),
|
|
72
62
|
local: pathJoin(ADAPTER_DIRS.LOCAL, "agents"),
|
|
73
63
|
"antigravity-cli": pathJoin(ADAPTER_DIRS.ANTIGRAVITY, "agents"),
|
|
74
|
-
}
|
|
75
|
-
|
|
64
|
+
};
|
|
76
65
|
/** Legacy layout bases used by `check` and discovery (non-unified installs). */
|
|
77
66
|
export const LEGACY_AGENT_LAYOUT_BASES = [
|
|
78
67
|
NATIVE_AGENT_PATHS.gemini,
|
|
@@ -82,10 +71,8 @@ export const LEGACY_AGENT_LAYOUT_BASES = [
|
|
|
82
71
|
NATIVE_AGENT_PATHS.codex,
|
|
83
72
|
NATIVE_AGENT_PATHS.local,
|
|
84
73
|
NATIVE_AGENT_PATHS["antigravity-cli"],
|
|
85
|
-
]
|
|
86
|
-
|
|
74
|
+
];
|
|
87
75
|
// ─── Framework internal subdirectories (under `.atabey/`) ──────────────────
|
|
88
|
-
|
|
89
76
|
export const FRAMEWORK_SUBDIRS = {
|
|
90
77
|
AGENTS: "agents",
|
|
91
78
|
SKILLS: "skills",
|
|
@@ -99,8 +86,9 @@ export const FRAMEWORK_SUBDIRS = {
|
|
|
99
86
|
MESSAGES: "messages",
|
|
100
87
|
LOGS: "logs",
|
|
101
88
|
MEMORY_GRAPH: "memory-graph",
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
DASHBOARD: "dashboard",
|
|
90
|
+
UI_DIST: "ui",
|
|
91
|
+
};
|
|
104
92
|
export const CORE_SCAFFOLD_SUBDIRS = [
|
|
105
93
|
FRAMEWORK_SUBDIRS.KNOWLEDGE,
|
|
106
94
|
FRAMEWORK_SUBDIRS.PROMPTS,
|
|
@@ -109,71 +97,61 @@ export const CORE_SCAFFOLD_SUBDIRS = [
|
|
|
109
97
|
FRAMEWORK_SUBDIRS.REGISTRY,
|
|
110
98
|
FRAMEWORK_SUBDIRS.OBSERVABILITY,
|
|
111
99
|
FRAMEWORK_SUBDIRS.RULES,
|
|
112
|
-
]
|
|
113
|
-
|
|
100
|
+
];
|
|
114
101
|
export const RUNTIME_SUBDIRS = [
|
|
115
102
|
FRAMEWORK_SUBDIRS.MESSAGES,
|
|
116
103
|
FRAMEWORK_SUBDIRS.LOGS,
|
|
117
104
|
FRAMEWORK_SUBDIRS.MEMORY_GRAPH,
|
|
118
|
-
]
|
|
119
|
-
|
|
105
|
+
];
|
|
120
106
|
export const MEMORY_SUBDIRS = {
|
|
121
107
|
TASKS: "tasks",
|
|
122
108
|
HISTORY: "history",
|
|
123
|
-
}
|
|
124
|
-
|
|
109
|
+
};
|
|
125
110
|
export const MEMORY_FILES = {
|
|
126
111
|
STATE: "state.json",
|
|
127
112
|
STATUS: "status.json",
|
|
128
113
|
PROJECT_MEMORY: "PROJECT_MEMORY.md",
|
|
129
114
|
SHARED_FACTS: "shared-facts.json",
|
|
130
|
-
}
|
|
131
|
-
|
|
115
|
+
};
|
|
132
116
|
// ─── Monorepo default paths ───────────────────────────────────────────────────
|
|
133
|
-
|
|
134
117
|
export const DEFAULT_MONOREPO_PATHS = {
|
|
135
118
|
backend: "apps/backend",
|
|
136
119
|
frontend: "apps/web",
|
|
137
120
|
mobile: "apps/mobile",
|
|
138
121
|
docs: "docs",
|
|
139
122
|
tests: "tests",
|
|
140
|
-
}
|
|
141
|
-
|
|
123
|
+
};
|
|
142
124
|
/** Cursor rule globs per agent role (enterprise monorepo layout). */
|
|
143
|
-
export const CURSOR_AGENT_GLOBS
|
|
144
|
-
manager:
|
|
145
|
-
security:
|
|
125
|
+
export const CURSOR_AGENT_GLOBS = {
|
|
126
|
+
manager: "**/*",
|
|
127
|
+
security: "**/*",
|
|
146
128
|
architect: "**/*",
|
|
147
|
-
backend:
|
|
148
|
-
frontend:
|
|
149
|
-
mobile:
|
|
150
|
-
native:
|
|
151
|
-
database:
|
|
152
|
-
devops:
|
|
153
|
-
quality:
|
|
154
|
-
analyst:
|
|
155
|
-
explorer:
|
|
156
|
-
git:
|
|
129
|
+
backend: `${DEFAULT_MONOREPO_PATHS.backend}/**/*`,
|
|
130
|
+
frontend: `${DEFAULT_MONOREPO_PATHS.frontend}/**/*`,
|
|
131
|
+
mobile: `${DEFAULT_MONOREPO_PATHS.mobile}/**/*`,
|
|
132
|
+
native: "apps/native/**/*",
|
|
133
|
+
database: `${DEFAULT_MONOREPO_PATHS.backend}/src/database/**/*`,
|
|
134
|
+
devops: "{.github,docker,infra,scripts,*.yml,*.yaml,Dockerfile*}",
|
|
135
|
+
quality: "**/*",
|
|
136
|
+
analyst: "{docs,specs,contracts}/**/*",
|
|
137
|
+
explorer: "**/*",
|
|
138
|
+
git: "**/*",
|
|
157
139
|
};
|
|
158
|
-
|
|
159
140
|
// ─── MCP & environment ──────────────────────────────────────────────────────
|
|
160
|
-
|
|
161
141
|
export const MCP = {
|
|
162
142
|
SERVER_NAME: "atabey",
|
|
163
143
|
ROOT_CONFIG_FILE: "mcp.json",
|
|
164
144
|
PROJECT_ROOT_ENV: "ATABEY_PROJECT_ROOT",
|
|
165
145
|
TEST_DIR_ENV: "ATABEY_TEST_DIR",
|
|
166
|
-
|
|
167
|
-
|
|
146
|
+
SERVER_DIST_PATH: "framework-mcp/dist/index.js",
|
|
147
|
+
};
|
|
168
148
|
export const ROOT_CONFIG_FILES = {
|
|
169
149
|
MCP: MCP.ROOT_CONFIG_FILE,
|
|
170
150
|
DOT_MCP: ".mcp.json",
|
|
171
151
|
ENV_EXAMPLE: ".env.example",
|
|
172
152
|
VSCODE_MCP: ".vscode/mcp.json",
|
|
173
|
-
}
|
|
174
|
-
|
|
153
|
+
};
|
|
175
154
|
// ─── Shim template placeholders ───────────────────────────────────────────────
|
|
176
|
-
|
|
177
155
|
export const TEMPLATE_PLACEHOLDERS = {
|
|
178
156
|
FRAMEWORK_DIR: "{{FRAMEWORK_DIR}}",
|
|
179
157
|
ADAPTER: "{{ADAPTER}}",
|
|
@@ -181,37 +159,28 @@ export const TEMPLATE_PLACEHOLDERS = {
|
|
|
181
159
|
FRONTEND_DIR: "{{FRONTEND_DIR}}",
|
|
182
160
|
DOCS_DIR: "{{DOCS_DIR}}",
|
|
183
161
|
TESTS_DIR: "{{TESTS_DIR}}",
|
|
184
|
-
}
|
|
185
|
-
|
|
162
|
+
};
|
|
186
163
|
// ─── File extensions ─────────────────────────────────────────────────────────
|
|
187
|
-
|
|
188
164
|
export const AGENT_FILE_EXT = {
|
|
189
165
|
MARKDOWN: ".md",
|
|
190
166
|
CURSOR_RULE: ".mdc",
|
|
191
|
-
}
|
|
192
|
-
|
|
167
|
+
};
|
|
193
168
|
// ─── Path helpers ─────────────────────────────────────────────────────────────
|
|
194
|
-
|
|
195
|
-
export function pathJoin(...segments: string[]): string {
|
|
169
|
+
export function pathJoin(...segments) {
|
|
196
170
|
return segments.filter(Boolean).join("/");
|
|
197
171
|
}
|
|
198
|
-
|
|
199
|
-
export function corePath(...segments: string[]): string {
|
|
172
|
+
export function corePath(...segments) {
|
|
200
173
|
return pathJoin(FRAMEWORK.CORE_DIR, ...segments);
|
|
201
174
|
}
|
|
202
|
-
|
|
203
|
-
export function unifiedHubPath(...segments: string[]): string {
|
|
175
|
+
export function unifiedHubPath(...segments) {
|
|
204
176
|
return pathJoin(FRAMEWORK.UNIFIED_HUB_DIR, ...segments);
|
|
205
177
|
}
|
|
206
|
-
|
|
207
|
-
export function unifiedAdapterPath(slug: string, ...segments: string[]): string {
|
|
178
|
+
export function unifiedAdapterPath(slug, ...segments) {
|
|
208
179
|
return unifiedHubPath(slug, ...segments);
|
|
209
180
|
}
|
|
210
|
-
|
|
211
|
-
export function knowledgePath(filename: string): string {
|
|
181
|
+
export function knowledgePath(filename) {
|
|
212
182
|
return corePath(FRAMEWORK_SUBDIRS.KNOWLEDGE, filename);
|
|
213
183
|
}
|
|
214
|
-
|
|
215
184
|
/** Backward-compatible aliases */
|
|
216
185
|
export const CORE_FRAMEWORK_DIR = FRAMEWORK.CORE_DIR;
|
|
217
186
|
export const UNIFIED_HUB_DIR = FRAMEWORK.UNIFIED_HUB_DIR;
|
|
@@ -2,30 +2,27 @@
|
|
|
2
2
|
* Enterprise Base Error class for the Agent Atabey Framework.
|
|
3
3
|
*/
|
|
4
4
|
export class AtabeyBaseError extends Error {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
constructor(message: string, code = "ATABEY_INTERNAL_ERROR", details?: unknown, solution?: string) {
|
|
5
|
+
code;
|
|
6
|
+
timestamp;
|
|
7
|
+
details;
|
|
8
|
+
solution;
|
|
9
|
+
constructor(message, code = "ATABEY_INTERNAL_ERROR", details, solution) {
|
|
11
10
|
super(message);
|
|
12
11
|
this.name = this.constructor.name;
|
|
13
12
|
this.code = code;
|
|
14
13
|
this.timestamp = new Date();
|
|
15
14
|
this.details = details;
|
|
16
15
|
this.solution = solution;
|
|
17
|
-
|
|
18
16
|
// Ensure proper prototype chain and capture stack trace
|
|
19
17
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
20
18
|
if (Error.captureStackTrace) {
|
|
21
19
|
Error.captureStackTrace(this, this.constructor);
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
/**
|
|
26
23
|
* Converts the error into a structured JSON log format.
|
|
27
24
|
*/
|
|
28
|
-
|
|
25
|
+
toJSON() {
|
|
29
26
|
return {
|
|
30
27
|
name: this.name,
|
|
31
28
|
message: this.message,
|
|
@@ -37,39 +34,35 @@ export class AtabeyBaseError extends Error {
|
|
|
37
34
|
};
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
/**
|
|
42
38
|
* Thrown when configuration loading or validation fails.
|
|
43
39
|
*/
|
|
44
40
|
export class ConfigurationError extends AtabeyBaseError {
|
|
45
|
-
constructor(message
|
|
41
|
+
constructor(message, details, solution) {
|
|
46
42
|
super(message, "CONFIGURATION_ERROR", details, solution);
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
|
-
|
|
50
45
|
/**
|
|
51
46
|
* Thrown when data schema or payload validation fails.
|
|
52
47
|
*/
|
|
53
48
|
export class ValidationError extends AtabeyBaseError {
|
|
54
|
-
constructor(message
|
|
49
|
+
constructor(message, details, solution) {
|
|
55
50
|
super(message, "VALIDATION_ERROR", details, solution);
|
|
56
51
|
}
|
|
57
52
|
}
|
|
58
|
-
|
|
59
53
|
/**
|
|
60
54
|
* Thrown when adapter initialization or execution fails.
|
|
61
55
|
*/
|
|
62
56
|
export class AdapterError extends AtabeyBaseError {
|
|
63
|
-
constructor(message
|
|
57
|
+
constructor(message, adapterId, details, solution) {
|
|
64
58
|
super(`Adapter '${adapterId}' failure: ${message}`, "ADAPTER_ERROR", details, solution);
|
|
65
59
|
}
|
|
66
60
|
}
|
|
67
|
-
|
|
68
61
|
/**
|
|
69
62
|
* Thrown when orchestration or agent communication fails.
|
|
70
63
|
*/
|
|
71
64
|
export class OrchestrationError extends AtabeyBaseError {
|
|
72
|
-
constructor(message
|
|
65
|
+
constructor(message, details, solution) {
|
|
73
66
|
super(message, "ORCHESTRATION_ERROR", details, solution);
|
|
74
67
|
}
|
|
75
68
|
}
|