agent-enderun 1.1.2 → 1.1.4
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 +10 -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/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/index.js +1 -1
- package/framework-mcp/dist/tools/control_plane/locking.js +64 -0
- package/framework-mcp/dist/tools/control_plane/registry.js +34 -0
- package/framework-mcp/dist/tools/definitions.js +49 -8
- package/framework-mcp/dist/tools/file_system/read_file.js +20 -0
- package/framework-mcp/dist/tools/file_system/write_file.js +16 -2
- package/framework-mcp/dist/tools/index.js +5 -0
- package/framework-mcp/dist/tools/messaging/send_message.js +36 -15
- package/framework-mcp/dist/utils/metrics.js +38 -0
- package/framework-mcp/dist/utils/security.js +7 -3
- 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 +4 -2
- 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/mcp_config.json +0 -11
- 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/src/index.js +0 -70
- package/framework-mcp/dist/src/tools/definitions.js +0 -112
- package/framework-mcp/dist/src/tools/file_system/patch_file.js +0 -18
- package/framework-mcp/dist/src/tools/file_system/read_file.js +0 -27
- package/framework-mcp/dist/src/tools/file_system/replace_text.js +0 -31
- package/framework-mcp/dist/src/tools/file_system/write_file.js +0 -9
- package/framework-mcp/dist/src/tools/framework/get_status.js +0 -5
- package/framework-mcp/dist/src/tools/framework/orchestrate.js +0 -5
- package/framework-mcp/dist/src/tools/framework/update_contract_hash.js +0 -5
- package/framework-mcp/dist/src/tools/framework/update_memory.js +0 -8
- package/framework-mcp/dist/src/tools/index.js +0 -25
- package/framework-mcp/dist/src/tools/messaging/log_action.js +0 -22
- package/framework-mcp/dist/src/tools/messaging/send_message.js +0 -46
- package/framework-mcp/dist/src/tools/types.js +0 -1
- package/framework-mcp/dist/src/utils/cli.js +0 -20
- package/framework-mcp/dist/src/utils/security.js +0 -53
- package/framework-mcp/dist/tests/tools/file_system/replace_text.test.js +0 -68
- 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/mcp.json +0 -11
- package/panda.config.ts +0 -100
package/dist/src/cli/adapters.js
CHANGED
|
@@ -1,87 +1,54 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import fs from "fs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export
|
|
3
|
+
import { writeJsonFile } from "./utils/fs.js";
|
|
4
|
+
import { getPackageRoot } from "./utils/pkg.js";
|
|
5
|
+
export { ADAPTER_IDS } from "./adapters/types.js";
|
|
6
|
+
import * as gemini from "../modules/adapters/gemini.js";
|
|
7
|
+
import * as claude from "../modules/adapters/claude.js";
|
|
8
|
+
import * as grok from "../modules/adapters/grok.js";
|
|
9
|
+
import * as cursor from "../modules/adapters/cursor.js";
|
|
10
|
+
import * as codex from "../modules/adapters/codex.js";
|
|
11
|
+
import * as antigravityCli from "../modules/adapters/antigravity-cli.js";
|
|
6
12
|
export const ADAPTERS = {
|
|
7
|
-
gemini:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cursor: {
|
|
22
|
-
id: "cursor",
|
|
23
|
-
frameworkDir: ".enderun",
|
|
24
|
-
shimFile: ".cursor/rules/global.mdc",
|
|
25
|
-
templateDir: ".enderun",
|
|
26
|
-
nestedDirs: ["agents", "skills", "knowledge"],
|
|
27
|
-
},
|
|
28
|
-
codex: {
|
|
29
|
-
id: "codex",
|
|
30
|
-
frameworkDir: ".enderun",
|
|
31
|
-
shimFile: ".github/copilot-instructions.md",
|
|
32
|
-
templateDir: ".enderun",
|
|
33
|
-
nestedDirs: ["agents", "skills", "knowledge"],
|
|
34
|
-
},
|
|
35
|
-
grok: {
|
|
36
|
-
id: "grok",
|
|
37
|
-
frameworkDir: ".enderun",
|
|
38
|
-
shimFile: "GROK.md",
|
|
39
|
-
templateDir: ".enderun",
|
|
40
|
-
nestedDirs: ["agents", "skills", "knowledge"],
|
|
41
|
-
},
|
|
42
|
-
antigravity: {
|
|
43
|
-
id: "antigravity",
|
|
44
|
-
frameworkDir: ".enderun",
|
|
45
|
-
shimFile: "agent.md",
|
|
46
|
-
templateDir: ".enderun",
|
|
47
|
-
nestedDirs: ["agents", "skills", "knowledge"],
|
|
48
|
-
},
|
|
49
|
-
"antigravity-cli": {
|
|
50
|
-
id: "antigravity-cli",
|
|
51
|
-
frameworkDir: ".enderun",
|
|
52
|
-
shimFile: "agent.md",
|
|
53
|
-
templateDir: ".enderun",
|
|
54
|
-
nestedDirs: ["agents", "skills", "knowledge"],
|
|
55
|
-
},
|
|
13
|
+
gemini: gemini.config,
|
|
14
|
+
claude: claude.config,
|
|
15
|
+
grok: grok.config,
|
|
16
|
+
cursor: cursor.config,
|
|
17
|
+
codex: codex.config,
|
|
18
|
+
"antigravity-cli": antigravityCli.config,
|
|
19
|
+
};
|
|
20
|
+
const POST_INIT_MAP = {
|
|
21
|
+
gemini: gemini.postInit,
|
|
22
|
+
claude: claude.postInit,
|
|
23
|
+
grok: grok.postInit,
|
|
24
|
+
cursor: cursor.postInit,
|
|
25
|
+
codex: codex.postInit,
|
|
26
|
+
"antigravity-cli": antigravityCli.postInit,
|
|
56
27
|
};
|
|
57
|
-
/**
|
|
58
|
-
* All framework runtime directories (for discovery).
|
|
59
|
-
* Verified against 2026 industry standards.
|
|
60
|
-
* Includes .agent for direct antigravity adapter installs.
|
|
61
|
-
*/
|
|
62
28
|
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
63
29
|
".enderun",
|
|
30
|
+
".cursor",
|
|
64
31
|
".claude",
|
|
32
|
+
".github",
|
|
65
33
|
".grok",
|
|
34
|
+
".windsurf",
|
|
35
|
+
".antigravity",
|
|
66
36
|
".agent",
|
|
37
|
+
".gemini/antigravity-cli",
|
|
67
38
|
".gemini",
|
|
68
|
-
".agents",
|
|
39
|
+
".agents",
|
|
69
40
|
];
|
|
70
|
-
const SHIM_FILES =
|
|
41
|
+
const SHIM_FILES = Object.keys(ADAPTERS).map((id) => ADAPTERS[id].shimFile);
|
|
71
42
|
export function resolveAdapter(input) {
|
|
72
43
|
const normalized = (input || "gemini").toLowerCase();
|
|
73
44
|
let config;
|
|
74
|
-
if (
|
|
45
|
+
if (normalized in ADAPTERS) {
|
|
75
46
|
config = { ...ADAPTERS[normalized] };
|
|
76
47
|
}
|
|
77
48
|
else {
|
|
78
|
-
console.warn(`⚠️ Unknown adapter "${input}". Falling back to gemini
|
|
49
|
+
console.warn(`⚠️ Unknown adapter "${input}". Falling back to gemini.`);
|
|
79
50
|
config = { ...ADAPTERS.gemini };
|
|
80
51
|
}
|
|
81
|
-
// Dynamic Unified Mode Check:
|
|
82
|
-
// If a root `.enderun` folder exists, --unified flag is passed, or configured in package.json,
|
|
83
|
-
// we override `frameworkDir` to be `.enderun` to avoid folder clutter!
|
|
84
|
-
// We bypass the folder exists check if running unit tests (Vitest) to preserve test integrity.
|
|
85
52
|
const targetDir = process.cwd();
|
|
86
53
|
const enderunExists = fs.existsSync(path.join(targetDir, ".enderun"));
|
|
87
54
|
const hasUnifiedFlag = process.argv.includes("--unified");
|
|
@@ -92,15 +59,12 @@ export function resolveAdapter(input) {
|
|
|
92
59
|
if (fs.existsSync(pkgPath)) {
|
|
93
60
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
94
61
|
if (pkg.enderun && (pkg.enderun.frameworkDir === ".enderun" || pkg.enderun.frameworkDir === "unified")) {
|
|
95
|
-
// Only force enderun if not testing a specific adapter that expects a different frameworkDir
|
|
96
62
|
if (isTesting && config.frameworkDir !== ".enderun") {
|
|
97
|
-
// Do not force .enderun if we are testing adapters that expect a different frameworkDir
|
|
98
|
-
// and this is not a 'unified' adapter.
|
|
99
63
|
if (config.id !== "cursor" && config.id !== "codex") {
|
|
100
64
|
forceEnderun = false;
|
|
101
65
|
}
|
|
102
66
|
else {
|
|
103
|
-
forceEnderun = true;
|
|
67
|
+
forceEnderun = true;
|
|
104
68
|
}
|
|
105
69
|
}
|
|
106
70
|
else {
|
|
@@ -114,7 +78,6 @@ export function resolveAdapter(input) {
|
|
|
114
78
|
}
|
|
115
79
|
if (forceEnderun) {
|
|
116
80
|
config.frameworkDir = ".enderun";
|
|
117
|
-
// Ensure standard folder names inside .enderun for universal access
|
|
118
81
|
config.nestedDirs = ["agents", "skills", "knowledge"];
|
|
119
82
|
}
|
|
120
83
|
return config;
|
|
@@ -124,30 +87,25 @@ export function isAdapterShimFile(fileName) {
|
|
|
124
87
|
}
|
|
125
88
|
export function remapFrameworkContent(content, frameworkDir, adapterId) {
|
|
126
89
|
let result = content;
|
|
127
|
-
|
|
90
|
+
result = result.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
91
|
+
result = result.replace(/\{\{ADAPTER\}\}/g, adapterId);
|
|
128
92
|
let agentFolder = "agents";
|
|
129
93
|
let knowledgeFolder = "knowledge";
|
|
130
94
|
if (frameworkDir !== ".enderun") {
|
|
131
|
-
if (adapterId === "antigravity") {
|
|
132
|
-
agentFolder = "
|
|
95
|
+
if (adapterId === "antigravity-cli") {
|
|
96
|
+
agentFolder = "agents";
|
|
133
97
|
knowledgeFolder = "rules";
|
|
134
98
|
}
|
|
135
99
|
else if (adapterId === "grok") {
|
|
136
100
|
agentFolder = "plugins";
|
|
137
101
|
}
|
|
138
102
|
}
|
|
139
|
-
// 2. Replacements
|
|
140
|
-
result = result.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
141
|
-
result = result.replace(/\{\{ADAPTER\}\}/g, adapterId);
|
|
142
|
-
// Replace standard patterns with adapter-specific ones
|
|
143
103
|
const frameworkPattern = ".enderun/";
|
|
144
104
|
result = result.replace(new RegExp(frameworkPattern + "agents/", "g"), `${frameworkDir}/${agentFolder}/`);
|
|
145
105
|
result = result.replace(new RegExp(frameworkPattern + "knowledge/", "g"), `${frameworkDir}/${knowledgeFolder}/`);
|
|
146
|
-
// Generic fallback for other .enderun/ paths
|
|
147
106
|
result = result.replace(/\.enderun\//g, `${frameworkDir}/`);
|
|
148
107
|
result = result.replace(/`\.enderun`/g, `\`${frameworkDir}\``);
|
|
149
108
|
result = result.replace(/\.enderun(?![\w/-])/g, frameworkDir);
|
|
150
|
-
// Read config paths dynamically to map directory tokens
|
|
151
109
|
let backend = "apps/backend";
|
|
152
110
|
let frontend = "apps/web";
|
|
153
111
|
let docs = "docs";
|
|
@@ -180,84 +138,108 @@ export function remapFrameworkContent(content, frameworkDir, adapterId) {
|
|
|
180
138
|
export function buildMcpServerEntry(projectRoot) {
|
|
181
139
|
return {
|
|
182
140
|
command: "node",
|
|
183
|
-
args: [path.join(
|
|
141
|
+
args: [path.join(getPackageRoot(), "framework-mcp/dist/index.js")],
|
|
184
142
|
env: {
|
|
185
143
|
ENDERUN_PROJECT_ROOT: projectRoot,
|
|
186
144
|
},
|
|
187
145
|
};
|
|
188
146
|
}
|
|
189
|
-
function
|
|
190
|
-
const
|
|
147
|
+
export function generateAdapterAgentRules(projectRoot, frameworkDir, adapterId) {
|
|
148
|
+
const agentsDir = path.join(projectRoot, frameworkDir, "agents");
|
|
149
|
+
if (!fs.existsSync(agentsDir))
|
|
150
|
+
return;
|
|
151
|
+
const adapter = ADAPTERS[adapterId];
|
|
152
|
+
if (!adapter || !adapter.rulesDir || !adapter.rulesExt)
|
|
153
|
+
return;
|
|
154
|
+
const destRulesDir = path.join(projectRoot, adapter.rulesDir);
|
|
155
|
+
const fileExt = adapter.rulesExt;
|
|
156
|
+
try {
|
|
157
|
+
fs.mkdirSync(destRulesDir, { recursive: true });
|
|
158
|
+
const files = fs.readdirSync(agentsDir).filter((f) => f.endsWith(".json") && f !== "agent_army_schema.json");
|
|
159
|
+
const GLOB_MAP = {
|
|
160
|
+
backend: "apps/backend/**/*",
|
|
161
|
+
frontend: "apps/web/**/*",
|
|
162
|
+
database: "apps/backend/src/database/**/*",
|
|
163
|
+
mobile: "apps/mobile/**/*",
|
|
164
|
+
native: "apps/native/**/*",
|
|
165
|
+
quality: "*",
|
|
166
|
+
security: "*",
|
|
167
|
+
devops: "*",
|
|
168
|
+
explorer: "*",
|
|
169
|
+
git: "*",
|
|
170
|
+
analyst: "*",
|
|
171
|
+
manager: "*",
|
|
172
|
+
};
|
|
173
|
+
for (const file of files) {
|
|
174
|
+
const filePath = path.join(agentsDir, file);
|
|
175
|
+
const agent = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
176
|
+
const name = agent.name;
|
|
177
|
+
const displayName = agent.displayName || name;
|
|
178
|
+
const description = agent.description || "";
|
|
179
|
+
const systemPrompt = agent.customAgentSpec?.customAgent?.systemPromptSections?.[0]?.content || "";
|
|
180
|
+
const glob = GLOB_MAP[name] || "*";
|
|
181
|
+
const ruleDestPath = path.join(destRulesDir, `${name}${fileExt}`);
|
|
182
|
+
let mdcContent;
|
|
183
|
+
if (fileExt === ".mdc") {
|
|
184
|
+
mdcContent = `---
|
|
185
|
+
description: Agent Enderun — @${name} rules for ${displayName}. ${description.slice(0, 100)}
|
|
186
|
+
globs: ${glob}
|
|
187
|
+
alwaysApply: false
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
# 🎖️ Agent Enderun — @${name} (${displayName})
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
You are the **${displayName}** of the Agent Enderun Army.
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
## 🏛️ Hierarchy of Authority
|
|
195
|
+
1. **Supreme Law:** [\`${frameworkDir}/ENDERUN.md\`](\`${frameworkDir}/ENDERUN.md\`)
|
|
196
|
+
2. **Global Rules:** [\`${frameworkDir}/knowledge/ARCHITECTURE.md\`](\`${frameworkDir}/knowledge/ARCHITECTURE.md\`), [\`${frameworkDir}/knowledge/SECURITY.md\`](\`${frameworkDir}/knowledge/SECURITY.md\`)
|
|
197
|
+
3. **Project Memory:** [\`${frameworkDir}/memory/PROJECT_MEMORY.md\`](\`${frameworkDir}/memory/PROJECT_MEMORY.md\`)
|
|
198
|
+
|
|
199
|
+
## 🤖 Specialist Directive (Role: @${name})
|
|
200
|
+
${systemPrompt}
|
|
201
|
+
|
|
202
|
+
## 🛡️ Core Mandates
|
|
203
|
+
- **Surgical Precision:** Enforce replace_text / replace_file_content for all code modifications.
|
|
204
|
+
- **Traceability:** Inherit and pass the active Trace ID across all delegations.
|
|
205
|
+
- **Approval Signature:** High-risk actions require manager approval signature.
|
|
197
206
|
`;
|
|
198
|
-
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
mdcContent = `# 🎖️ Agent Enderun — @${name} (${displayName})
|
|
199
210
|
|
|
200
|
-
|
|
211
|
+
You are the **${displayName}** of the Agent Enderun Army.
|
|
201
212
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
213
|
+
## 🏛️ Hierarchy of Authority
|
|
214
|
+
1. **Supreme Law:** [\`${frameworkDir}/ENDERUN.md\`](\`${frameworkDir}/ENDERUN.md\`)
|
|
215
|
+
2. **Global Rules:** [\`${frameworkDir}/knowledge/ARCHITECTURE.md\`](\`${frameworkDir}/knowledge/ARCHITECTURE.md\`), [\`${frameworkDir}/knowledge/SECURITY.md\`](\`${frameworkDir}/knowledge/SECURITY.md\`)
|
|
216
|
+
3. **Project Memory:** [\`${frameworkDir}/memory/PROJECT_MEMORY.md\`](\`${frameworkDir}/memory/PROJECT_MEMORY.md\`)
|
|
217
|
+
|
|
218
|
+
## 🤖 Specialist Directive (Role: @${name})
|
|
219
|
+
${systemPrompt}
|
|
220
|
+
|
|
221
|
+
## 🛡️ Core Mandates
|
|
222
|
+
- **Surgical Precision:** Enforce replace_text / replace_file_content for all code modifications.
|
|
223
|
+
- **Traceability:** Inherit and pass the active Trace ID across all delegations.
|
|
224
|
+
- **Approval Signature:** High-risk actions require manager approval signature.
|
|
205
225
|
`;
|
|
206
|
-
|
|
207
|
-
|
|
226
|
+
}
|
|
227
|
+
fs.writeFileSync(ruleDestPath, mdcContent);
|
|
228
|
+
}
|
|
229
|
+
console.warn(`✅ Generated 12 Agent Rules under ${path.relative(projectRoot, destRulesDir)}/`);
|
|
230
|
+
}
|
|
231
|
+
catch (e) {
|
|
232
|
+
console.warn(`⚠️ Failed to generate Agent rules: ${e}`);
|
|
233
|
+
}
|
|
208
234
|
}
|
|
209
|
-
/**
|
|
210
|
-
* Adapter-specific MCP and IDE hooks after scaffold.
|
|
211
|
-
*/
|
|
212
235
|
export function runAdapterPostInit(adapter, projectRoot) {
|
|
213
236
|
const mcpEntry = buildMcpServerEntry(projectRoot);
|
|
214
237
|
const mcpBlock = { mcpServers: { "agent-enderun": mcpEntry } };
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
console.warn(`✅ Gemini MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
220
|
-
console.warn(`✅ Antigravity → ${adapter.frameworkDir}/antigravity/ & antigravity-cli/`);
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
case "antigravity": {
|
|
224
|
-
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
225
|
-
console.warn(`✅ Antigravity IDE MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
case "antigravity-cli": {
|
|
229
|
-
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
230
|
-
console.warn(`✅ Antigravity CLI MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
case "grok": {
|
|
234
|
-
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
235
|
-
console.warn(`✅ Grok MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
case "claude": {
|
|
239
|
-
const configPath = findClaudeConfigPath();
|
|
240
|
-
if (configPath) {
|
|
241
|
-
const ok = addMcpServerToClaude(configPath, "agent-enderun", mcpEntry);
|
|
242
|
-
if (ok) {
|
|
243
|
-
console.warn(`✅ Claude MCP registered → ${configPath}`);
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
console.warn("⚠️ Could not patch Claude config automatically.");
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
console.warn("⚠️ Claude config not found. Add MCP manually (see README).");
|
|
251
|
-
}
|
|
252
|
-
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
253
|
-
writeJsonFile(path.join(projectRoot, ".mcp.json"), mcpBlock);
|
|
254
|
-
console.warn("✅ Claude Code Project MCP → .mcp.json");
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
default:
|
|
258
|
-
break;
|
|
238
|
+
const postInitFn = POST_INIT_MAP[adapter.id];
|
|
239
|
+
if (postInitFn) {
|
|
240
|
+
postInitFn(projectRoot, mcpBlock);
|
|
241
|
+
generateAdapterAgentRules(projectRoot, adapter.frameworkDir, adapter.id);
|
|
259
242
|
}
|
|
260
|
-
// Keep root mcp.json in sync when missing or empty
|
|
261
243
|
const rootMcpPath = path.join(projectRoot, "mcp.json");
|
|
262
244
|
if (!fs.existsSync(rootMcpPath)) {
|
|
263
245
|
writeJsonFile(rootMcpPath, mcpBlock);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../../src/cli/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../../src/cli/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAwD,MAAM,qBAAqB,CAAC;AAExG,OAAO,KAAK,MAAM,MAAM,+BAA+B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;IAC1E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,CAAC;IAE/D,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7C,IAAI,UAAU,EAAE,CAAC;QACb,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAClC,yBAAyB,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;AACL,CAAC"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
|
-
import { getFrameworkDir,
|
|
5
|
-
import { getPackageVersion, getValidatorPath } from "../utils/pkg.js";
|
|
4
|
+
import { getFrameworkDir, getMemoryPath } from "../utils/memory.js";
|
|
5
|
+
import { getPackageVersion, getValidatorPath } from "../utils/pkg.js";
|
|
6
|
+
import { UI } from "../utils/ui.js";
|
|
6
7
|
const FRAMEWORK_VERSION = getPackageVersion();
|
|
7
|
-
/**
|
|
8
|
-
* Check framework health and MCP status.
|
|
9
|
-
* Now also runs full AL (Agent Lifecycle) army validation so that
|
|
10
|
-
* `agent-enderun check` guarantees that init setups are AL-compliant.
|
|
11
|
-
*/
|
|
12
8
|
export function checkCommand() {
|
|
13
|
-
|
|
9
|
+
UI.intent("Enderun Core Health Check", `Sistem sağlığı ve disiplin kuralları denetleniyor (v${FRAMEWORK_VERSION})...`);
|
|
14
10
|
let issues = 0;
|
|
15
11
|
const frameworkDir = getFrameworkDir();
|
|
16
|
-
const pathsMap = getConfiguredPaths();
|
|
17
12
|
const memoryPath = getMemoryPath();
|
|
18
|
-
|
|
19
|
-
// Determine folder names based on adapter detection (AL + cross-adapter support)
|
|
13
|
+
UI.success(`Using framework dir: ${frameworkDir}`);
|
|
20
14
|
let knowledgeDir = "knowledge";
|
|
21
|
-
if (frameworkDir === ".
|
|
22
|
-
knowledgeDir = "
|
|
23
|
-
|
|
24
|
-
const constitutionPath = fs.existsSync(path.join(process.cwd(), "ENDERUN.md"))
|
|
25
|
-
? "ENDERUN.md"
|
|
26
|
-
: path.join(frameworkDir, "ENDERUN.md");
|
|
15
|
+
if (frameworkDir === ".github")
|
|
16
|
+
knowledgeDir = "instructions";
|
|
17
|
+
const constitutionPath = fs.existsSync(path.join(process.cwd(), "ENDERUN.md")) ? "ENDERUN.md" : path.join(frameworkDir, "ENDERUN.md");
|
|
27
18
|
const checks = [
|
|
28
19
|
{ name: "Constitution (ENDERUN.md)", path: constitutionPath },
|
|
29
20
|
{ name: "Memory (PROJECT_MEMORY.md)", path: path.relative(process.cwd(), memoryPath) },
|
|
@@ -34,88 +25,85 @@ export function checkCommand() {
|
|
|
34
25
|
{ name: "ESLint Config (eslint.config.js)", path: "eslint.config.js" },
|
|
35
26
|
{ name: "ESLint Standards", path: path.join(frameworkDir, `${knowledgeDir}/eslint-standards.md`) },
|
|
36
27
|
{ name: "MCP Server", path: "framework-mcp/package.json" },
|
|
37
|
-
{ name: "Panda CSS Config", path: "panda.config.ts" },
|
|
28
|
+
{ name: "Panda CSS Config", path: "panda.config.ts", optional: true },
|
|
38
29
|
{ name: "Brain Dashboard", path: path.join(frameworkDir, "BRAIN_DASHBOARD.md") },
|
|
39
|
-
{ name: "Project Architectural Portal (docs/README.md)", path: path.join(pathsMap.docs, "README.md") },
|
|
40
|
-
{ name: "System Getting Started Guide (docs/getting-started.md)", path: path.join(pathsMap.docs, "getting-started.md") },
|
|
41
|
-
{ name: "Enterprise Approval Flows Protocol", path: path.join(pathsMap.docs, "architecture/approval-flows.md") },
|
|
42
|
-
{ name: "Professional Error Handling Pattern", path: path.join(pathsMap.docs, "backend/error-handling.md") },
|
|
43
|
-
{ name: "Atomic Component Standards", path: path.join(pathsMap.docs, "frontend/component-patterns.md") },
|
|
44
|
-
];
|
|
45
|
-
// Optional app-level checks (only when apps/ has content)
|
|
46
|
-
const optionalChecks = [
|
|
47
|
-
{ name: "Backend Contract", path: path.join(pathsMap.backend, "contract.version.json") },
|
|
48
30
|
];
|
|
49
31
|
for (const check of checks) {
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
const fullPath = path.isAbsolute(check.path) ? check.path : path.join(process.cwd(), check.path);
|
|
33
|
+
if (fs.existsSync(fullPath)) {
|
|
34
|
+
UI.success(`${check.name} found.`);
|
|
52
35
|
}
|
|
53
36
|
else {
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
if (check.optional) {
|
|
38
|
+
UI.warning(`${check.name} MISSING! (${check.path}) [Optional]`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
UI.error(`${check.name} MISSING! (${check.path})`);
|
|
42
|
+
issues++;
|
|
43
|
+
}
|
|
56
44
|
}
|
|
57
45
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
46
|
+
// Agent Army Check
|
|
47
|
+
console.warn("\n🛡️ Running Agent Army Compliance...");
|
|
48
|
+
try {
|
|
49
|
+
const validatorScript = getValidatorPath();
|
|
50
|
+
execSync(`node "${validatorScript}"`, { stdio: "pipe" });
|
|
51
|
+
UI.success("Agent Army AL validation PASSED.");
|
|
65
52
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
53
|
+
catch (error) {
|
|
54
|
+
const err = error;
|
|
55
|
+
UI.error(`Agent Army AL validation FAILED: ${err.message}`);
|
|
56
|
+
if (err.stderr)
|
|
57
|
+
console.error(err.stderr.toString());
|
|
71
58
|
issues++;
|
|
72
59
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (!fs.existsSync(mcpPath)) {
|
|
79
|
-
console.warn("❌ MCP Build MISSING! (Run 'npm run enderun:build')");
|
|
60
|
+
// Code Quality
|
|
61
|
+
console.warn("\n⚖️ Checking Discipline (Code Quality)...");
|
|
62
|
+
const consoleLogIssues = checkConsoleLogs();
|
|
63
|
+
if (consoleLogIssues.length > 0) {
|
|
64
|
+
UI.error(`Forbidden 'console.log' found in ${consoleLogIssues.length} locations.`);
|
|
80
65
|
issues++;
|
|
81
66
|
}
|
|
82
67
|
else {
|
|
83
|
-
|
|
84
|
-
console.warn("⏳ Testing MCP Server syntax...");
|
|
85
|
-
try {
|
|
86
|
-
execSync(`node --check ${mcpPath}`, { stdio: "pipe" });
|
|
87
|
-
console.warn("✅ MCP Server syntax valid.");
|
|
88
|
-
}
|
|
89
|
-
catch {
|
|
90
|
-
// If --check fails on ESM, we might skip it or use a better check
|
|
91
|
-
console.warn("⚠️ MCP Syntax check skipped (ESM/Environment).");
|
|
92
|
-
}
|
|
68
|
+
UI.success("No forbidden 'console.log' detected.");
|
|
93
69
|
}
|
|
94
|
-
// === AL (Agent Lifecycle) Army Validation ===
|
|
95
|
-
// This makes `agent-enderun check` also enforce that init'ed agents are AL-compliant
|
|
96
|
-
// (stateMachine + tags present and parseable). Works across adapters (skills/plugins/agents).
|
|
97
|
-
// Uses getValidatorPath() so it resolves inside node_modules/... when installed via npm (not just source cwd).
|
|
98
|
-
console.warn("\n🛡️ Running Agent Army AL Compliance (validate-agent-army)...");
|
|
99
70
|
try {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
console.warn("✅ Agent Army AL validation PASSED (all agents have stateMachine + tags).");
|
|
71
|
+
execSync("npx tsc --noEmit", { stdio: "pipe" });
|
|
72
|
+
UI.success("TypeScript type check PASSED.");
|
|
103
73
|
}
|
|
104
74
|
catch {
|
|
105
|
-
|
|
106
|
-
console.warn(" Run manually: agent-enderun validate (or: npx agent-enderun validate-army)");
|
|
107
|
-
console.warn(" This usually means your init used an adapter that remapped agents (e.g. antigravity → skills).");
|
|
108
|
-
console.warn(" The core .md definitions should still be correct; the standalone validator just couldn't locate them.");
|
|
109
|
-
console.warn(" (Note: from npm package, bare 'node bin/...' will not work — use the CLI command above.)");
|
|
75
|
+
UI.error("TypeScript type check FAILED.");
|
|
110
76
|
issues++;
|
|
111
77
|
}
|
|
112
78
|
if (issues === 0) {
|
|
113
|
-
|
|
79
|
+
UI.success("\n🚀 All systems green! Enderun Core is ready.");
|
|
114
80
|
}
|
|
115
81
|
else {
|
|
116
|
-
|
|
117
|
-
⚠️ Found ${issues} issues. Please fix them before starting.`);
|
|
82
|
+
UI.error(`\n⚠️ Found ${issues} issues. Please fix them.`);
|
|
118
83
|
process.exit(1);
|
|
119
84
|
}
|
|
120
85
|
}
|
|
86
|
+
function checkConsoleLogs() {
|
|
87
|
+
const issues = [];
|
|
88
|
+
const srcDir = path.join(process.cwd(), "src");
|
|
89
|
+
if (!fs.existsSync(srcDir))
|
|
90
|
+
return [];
|
|
91
|
+
const walk = (dir) => {
|
|
92
|
+
const files = fs.readdirSync(dir);
|
|
93
|
+
for (const file of files) {
|
|
94
|
+
const fullPath = path.join(dir, file);
|
|
95
|
+
if (fs.statSync(fullPath).isDirectory())
|
|
96
|
+
walk(fullPath);
|
|
97
|
+
else if (file.endsWith(".ts") && !file.includes(".test.")) {
|
|
98
|
+
const content = fs.readFileSync(fullPath, "utf8");
|
|
99
|
+
const target = "console." + "log(";
|
|
100
|
+
if (content.includes(target) && !fullPath.includes("check.ts")) {
|
|
101
|
+
issues.push(fullPath);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
walk(srcDir);
|
|
107
|
+
return issues;
|
|
108
|
+
}
|
|
121
109
|
//# sourceMappingURL=check.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/cli/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/cli/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,iBAAiB,GAAG,iBAAiB,EAAE,CAAC;AAE9C,MAAM,UAAU,YAAY;IACxB,EAAE,CAAC,MAAM,CAAC,2BAA2B,EAAE,uDAAuD,iBAAiB,MAAM,CAAC,CAAC;IACvH,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,EAAE,CAAC,OAAO,CAAC,wBAAwB,YAAY,EAAE,CAAC,CAAC;IAEnD,IAAI,YAAY,GAAG,WAAW,CAAC;IAC/B,IAAI,YAAY,KAAK,SAAS;QAAE,YAAY,GAAG,cAAc,CAAC;IAE9D,MAAM,gBAAgB,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC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