agent-enderun 0.9.0 → 0.9.2
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/BRAIN_DASHBOARD.md +2 -2
- package/.enderun/PROJECT_MEMORY.md +28 -4
- package/.enderun/STATUS.md +24 -28
- package/.enderun/agents/backend.md +37 -8
- package/.enderun/agents/database.md +55 -0
- package/.enderun/agents/devops.md +28 -14
- package/.enderun/agents/explorer.md +1 -1
- package/.enderun/agents/frontend.md +21 -7
- package/.enderun/agents/git.md +1 -1
- package/.enderun/agents/manager.md +41 -20
- package/.enderun/agents/mobile.md +1 -1
- package/.enderun/agents/native.md +1 -1
- package/.enderun/agents/quality.md +122 -0
- package/.enderun/cli-commands.json +3 -3
- package/.enderun/config.json +7 -1
- package/.enderun/knowledge/context_boundary_rules.md +57 -0
- package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
- package/.enderun/knowledge/documentation_ownership.md +53 -0
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
- package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
- package/.enderun/knowledge/lessons-learned.md +14 -0
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +8 -8
- package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
- package/.enderun/knowledge/reference_application_guidelines.md +6 -6
- package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
- package/.enderun/queue/README.md +13 -13
- package/README.md +204 -102
- package/bin/cli.js +1 -1
- package/bin/init-check.js +69 -0
- package/bin/update-contract.js +24 -2
- package/docs/README.md +21 -32
- package/docs/architecture/README.md +9 -0
- package/docs/architecture/standards/data-fetching-patterns.md +13 -0
- package/docs/architecture/standards/design-system.md +31 -0
- package/docs/architecture/standards/logging.md +7 -0
- package/docs/architecture/standards/tech-stack.md +9 -0
- package/docs/getting-started.md +9 -259
- package/docs/user/README.md +35 -0
- package/docs/user/action-plan-2026.md +9 -0
- package/docs/user/getting-started.md +13 -0
- package/docs/user/roadmap.md +13 -0
- package/eslint.config.js +1 -1
- package/framework-mcp/dist/index.js +7 -13
- package/framework-mcp/node_modules/@types/node/LICENSE +21 -0
- package/framework-mcp/node_modules/@types/node/README.md +15 -0
- package/framework-mcp/node_modules/@types/node/assert/strict.d.ts +111 -0
- package/framework-mcp/node_modules/@types/node/assert.d.ts +1078 -0
- package/framework-mcp/node_modules/@types/node/async_hooks.d.ts +603 -0
- package/framework-mcp/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/framework-mcp/node_modules/@types/node/buffer.d.ts +1934 -0
- package/framework-mcp/node_modules/@types/node/child_process.d.ts +1476 -0
- package/framework-mcp/node_modules/@types/node/cluster.d.ts +578 -0
- package/framework-mcp/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/framework-mcp/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/framework-mcp/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/framework-mcp/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/framework-mcp/node_modules/@types/node/console.d.ts +452 -0
- package/framework-mcp/node_modules/@types/node/constants.d.ts +21 -0
- package/framework-mcp/node_modules/@types/node/crypto.d.ts +4545 -0
- package/framework-mcp/node_modules/@types/node/dgram.d.ts +600 -0
- package/framework-mcp/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/framework-mcp/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/framework-mcp/node_modules/@types/node/dns.d.ts +923 -0
- package/framework-mcp/node_modules/@types/node/domain.d.ts +170 -0
- package/framework-mcp/node_modules/@types/node/events.d.ts +976 -0
- package/framework-mcp/node_modules/@types/node/fs/promises.d.ts +1295 -0
- package/framework-mcp/node_modules/@types/node/fs.d.ts +4461 -0
- package/framework-mcp/node_modules/@types/node/globals.d.ts +172 -0
- package/framework-mcp/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/framework-mcp/node_modules/@types/node/http.d.ts +2089 -0
- package/framework-mcp/node_modules/@types/node/http2.d.ts +2721 -0
- package/framework-mcp/node_modules/@types/node/https.d.ts +579 -0
- package/framework-mcp/node_modules/@types/node/index.d.ts +97 -0
- package/framework-mcp/node_modules/@types/node/inspector.d.ts +253 -0
- package/framework-mcp/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/framework-mcp/node_modules/@types/node/module.d.ts +891 -0
- package/framework-mcp/node_modules/@types/node/net.d.ts +1076 -0
- package/framework-mcp/node_modules/@types/node/os.d.ts +506 -0
- package/framework-mcp/node_modules/@types/node/package.json +145 -0
- package/framework-mcp/node_modules/@types/node/path.d.ts +200 -0
- package/framework-mcp/node_modules/@types/node/perf_hooks.d.ts +968 -0
- package/framework-mcp/node_modules/@types/node/process.d.ts +2084 -0
- package/framework-mcp/node_modules/@types/node/punycode.d.ts +117 -0
- package/framework-mcp/node_modules/@types/node/querystring.d.ts +152 -0
- package/framework-mcp/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/framework-mcp/node_modules/@types/node/readline.d.ts +594 -0
- package/framework-mcp/node_modules/@types/node/repl.d.ts +428 -0
- package/framework-mcp/node_modules/@types/node/sea.d.ts +153 -0
- package/framework-mcp/node_modules/@types/node/sqlite.d.ts +721 -0
- package/framework-mcp/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/framework-mcp/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/framework-mcp/node_modules/@types/node/stream/web.d.ts +622 -0
- package/framework-mcp/node_modules/@types/node/stream.d.ts +1687 -0
- package/framework-mcp/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/framework-mcp/node_modules/@types/node/test.d.ts +2163 -0
- package/framework-mcp/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/framework-mcp/node_modules/@types/node/timers.d.ts +287 -0
- package/framework-mcp/node_modules/@types/node/tls.d.ts +1319 -0
- package/framework-mcp/node_modules/@types/node/trace_events.d.ts +197 -0
- package/framework-mcp/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/framework-mcp/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/framework-mcp/node_modules/@types/node/ts5.6/index.d.ts +97 -0
- package/framework-mcp/node_modules/@types/node/tty.d.ts +208 -0
- package/framework-mcp/node_modules/@types/node/url.d.ts +984 -0
- package/framework-mcp/node_modules/@types/node/util.d.ts +2606 -0
- package/framework-mcp/node_modules/@types/node/v8.d.ts +920 -0
- package/framework-mcp/node_modules/@types/node/vm.d.ts +1000 -0
- package/framework-mcp/node_modules/@types/node/wasi.d.ts +181 -0
- package/framework-mcp/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/framework-mcp/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/framework-mcp/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/framework-mcp/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/framework-mcp/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
- package/framework-mcp/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/framework-mcp/node_modules/@types/node/worker_threads.d.ts +784 -0
- package/framework-mcp/node_modules/@types/node/zlib.d.ts +747 -0
- package/framework-mcp/node_modules/typescript/LICENSE.txt +55 -0
- package/framework-mcp/node_modules/typescript/README.md +50 -0
- package/framework-mcp/node_modules/typescript/SECURITY.md +41 -0
- package/framework-mcp/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/framework-mcp/node_modules/typescript/bin/tsc +2 -0
- package/framework-mcp/node_modules/typescript/bin/tsserver +2 -0
- package/framework-mcp/node_modules/typescript/lib/_tsc.js +133818 -0
- package/framework-mcp/node_modules/typescript/lib/_tsserver.js +659 -0
- package/framework-mcp/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/framework-mcp/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/lib.d.ts +22 -0
- package/framework-mcp/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- package/framework-mcp/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/framework-mcp/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/framework-mcp/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- package/framework-mcp/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- package/framework-mcp/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- package/framework-mcp/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- package/framework-mcp/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/framework-mcp/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- package/framework-mcp/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/tsc.js +8 -0
- package/framework-mcp/node_modules/typescript/lib/tsserver.js +8 -0
- package/framework-mcp/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/framework-mcp/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/framework-mcp/node_modules/typescript/lib/typesMap.json +497 -0
- package/framework-mcp/node_modules/typescript/lib/typescript.d.ts +11437 -0
- package/framework-mcp/node_modules/typescript/lib/typescript.js +200276 -0
- package/framework-mcp/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/framework-mcp/node_modules/typescript/lib/watchGuard.js +53 -0
- package/framework-mcp/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/framework-mcp/node_modules/typescript/package.json +120 -0
- package/framework-mcp/node_modules/undici-types/LICENSE +21 -0
- package/framework-mcp/node_modules/undici-types/README.md +6 -0
- package/framework-mcp/node_modules/undici-types/agent.d.ts +31 -0
- package/framework-mcp/node_modules/undici-types/api.d.ts +43 -0
- package/framework-mcp/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/framework-mcp/node_modules/undici-types/cache.d.ts +36 -0
- package/framework-mcp/node_modules/undici-types/client.d.ts +108 -0
- package/framework-mcp/node_modules/undici-types/connector.d.ts +34 -0
- package/framework-mcp/node_modules/undici-types/content-type.d.ts +21 -0
- package/framework-mcp/node_modules/undici-types/cookies.d.ts +28 -0
- package/framework-mcp/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/framework-mcp/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/framework-mcp/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/framework-mcp/node_modules/undici-types/errors.d.ts +149 -0
- package/framework-mcp/node_modules/undici-types/eventsource.d.ts +61 -0
- package/framework-mcp/node_modules/undici-types/fetch.d.ts +209 -0
- package/framework-mcp/node_modules/undici-types/file.d.ts +39 -0
- package/framework-mcp/node_modules/undici-types/filereader.d.ts +54 -0
- package/framework-mcp/node_modules/undici-types/formdata.d.ts +108 -0
- package/framework-mcp/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/framework-mcp/node_modules/undici-types/global-origin.d.ts +7 -0
- package/framework-mcp/node_modules/undici-types/handlers.d.ts +15 -0
- package/framework-mcp/node_modules/undici-types/header.d.ts +4 -0
- package/framework-mcp/node_modules/undici-types/index.d.ts +71 -0
- package/framework-mcp/node_modules/undici-types/interceptors.d.ts +17 -0
- package/framework-mcp/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/framework-mcp/node_modules/undici-types/mock-client.d.ts +25 -0
- package/framework-mcp/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/framework-mcp/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/framework-mcp/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/framework-mcp/node_modules/undici-types/package.json +55 -0
- package/framework-mcp/node_modules/undici-types/patch.d.ts +33 -0
- package/framework-mcp/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/framework-mcp/node_modules/undici-types/pool.d.ts +39 -0
- package/framework-mcp/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/framework-mcp/node_modules/undici-types/readable.d.ts +65 -0
- package/framework-mcp/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/framework-mcp/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/framework-mcp/node_modules/undici-types/util.d.ts +18 -0
- package/framework-mcp/node_modules/undici-types/webidl.d.ts +228 -0
- package/framework-mcp/node_modules/undici-types/websocket.d.ts +150 -0
- package/framework-mcp/src/declarations.d.ts +3 -0
- package/framework-mcp/src/index.ts +228 -0
- package/package.json +4 -3
- package/src/cli/adapters.ts +208 -0
- package/src/cli/commands/app.ts +38 -0
- package/src/cli/commands/check.ts +87 -0
- package/src/cli/commands/compliance.ts +55 -0
- package/src/cli/commands/contract.ts +45 -0
- package/src/cli/commands/explorer.ts +45 -0
- package/src/cli/commands/git.ts +39 -0
- package/src/cli/commands/init.ts +272 -0
- package/src/cli/commands/knowledge.ts +44 -0
- package/src/cli/commands/lint.ts +25 -0
- package/src/cli/commands/log.ts +37 -0
- package/src/cli/commands/memory.ts +78 -0
- package/src/cli/commands/orchestrate.ts +111 -0
- package/src/cli/commands/script.ts +20 -0
- package/src/cli/commands/security.ts +38 -0
- package/src/cli/commands/status.ts +59 -0
- package/src/cli/commands/trace.ts +46 -0
- package/src/cli/index.ts +107 -0
- package/src/cli/utils/app.ts +764 -0
- package/src/cli/utils/claude.ts +56 -0
- package/src/cli/utils/fs.ts +139 -0
- package/src/cli/utils/memory.ts +141 -0
- package/src/cli/utils/pkg.ts +215 -0
- package/src/cli/utils/string.ts +48 -0
- package/src/cli/utils/time.ts +27 -0
- package/.enderun/agents/analyst.md +0 -236
- package/.enderun/agents/orchestrator.md +0 -172
- package/.enderun/agents/qa.md +0 -121
- package/.enderun/agents/security.md +0 -202
- package/.enderun/knowledge/api_design_rules.md +0 -6
- package/.enderun/knowledge/branded_types_pattern.md +0 -8
- package/.enderun/knowledge/code_review_checklist.md +0 -7
- package/.enderun/knowledge/contract_versioning.md +0 -7
- package/.enderun/knowledge/database_migration.md +0 -6
- package/.enderun/knowledge/deployment_checklist.md +0 -7
- package/.enderun/knowledge/git_commit_strategy.md +0 -10
- package/.enderun/knowledge/monitoring_setup.md +0 -5
- package/.enderun/knowledge/performance_guidelines.md +0 -11
- package/.enderun/knowledge/repository_patterns.md +0 -9
- package/.enderun/knowledge/security_scanning.md +0 -6
- package/.enderun/knowledge/testing_standards.md +0 -7
- package/.enderun/knowledge/troubleshooting_guide.md +0 -5
- package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
- package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
- package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
- package/.enderun/memory-graph/agent-contexts/security.json +0 -1
- package/docs/action-plan-2026.md +0 -119
- package/docs/roadmap.md +0 -142
- package/docs/tech-stack.md +0 -30
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
|
|
4
|
+
import { findClaudeConfigPath, addMcpServerToClaude } from "./utils/claude.js";
|
|
5
|
+
import { writeJsonFile, writeTextFile } from "./utils/fs.js";
|
|
6
|
+
|
|
7
|
+
export const ADAPTER_IDS = ["gemini", "claude", "grok", "antigravity", "antigravity-cli"] as const;
|
|
8
|
+
export type AdapterId = (typeof ADAPTER_IDS)[number];
|
|
9
|
+
|
|
10
|
+
export interface AdapterConfig {
|
|
11
|
+
id: AdapterId;
|
|
12
|
+
/** Runtime framework directory created by init */
|
|
13
|
+
frameworkDir: string;
|
|
14
|
+
/** Root shim file (e.g. gemini.md) */
|
|
15
|
+
shimFile: string;
|
|
16
|
+
/** Package template copied into frameworkDir */
|
|
17
|
+
templateDir: ".enderun";
|
|
18
|
+
/** Extra directories under frameworkDir (gemini only for nested auto-scaffold) */
|
|
19
|
+
nestedDirs?: string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
23
|
+
gemini: {
|
|
24
|
+
id: "gemini",
|
|
25
|
+
frameworkDir: ".gemini",
|
|
26
|
+
shimFile: "gemini.md",
|
|
27
|
+
templateDir: ".enderun",
|
|
28
|
+
nestedDirs: ["antigravity", "antigravity-cli"],
|
|
29
|
+
},
|
|
30
|
+
claude: {
|
|
31
|
+
id: "claude",
|
|
32
|
+
frameworkDir: ".claude",
|
|
33
|
+
shimFile: "claude.md",
|
|
34
|
+
templateDir: ".enderun",
|
|
35
|
+
},
|
|
36
|
+
grok: {
|
|
37
|
+
id: "grok",
|
|
38
|
+
frameworkDir: ".agent", // Future-proof agent-centric directory for Grok/X.ai
|
|
39
|
+
shimFile: "grok.md",
|
|
40
|
+
templateDir: ".enderun",
|
|
41
|
+
},
|
|
42
|
+
antigravity: {
|
|
43
|
+
id: "antigravity",
|
|
44
|
+
frameworkDir: ".gemini/antigravity",
|
|
45
|
+
shimFile: "agent.md",
|
|
46
|
+
templateDir: ".enderun",
|
|
47
|
+
},
|
|
48
|
+
"antigravity-cli": {
|
|
49
|
+
id: "antigravity-cli",
|
|
50
|
+
frameworkDir: ".gemini/antigravity-cli",
|
|
51
|
+
shimFile: "agent.md",
|
|
52
|
+
templateDir: ".enderun",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* All framework runtime directories (for discovery).
|
|
58
|
+
* Verified against 2026 industry standards for Claude Code (.claude/)
|
|
59
|
+
* and internal standards for Antigravity (.gemini/antigravity/).
|
|
60
|
+
*/
|
|
61
|
+
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
62
|
+
".gemini",
|
|
63
|
+
".claude",
|
|
64
|
+
".agent",
|
|
65
|
+
".enderun",
|
|
66
|
+
] as const;
|
|
67
|
+
|
|
68
|
+
const SHIM_FILES = ADAPTER_IDS.map((id) => ADAPTERS[id].shimFile);
|
|
69
|
+
|
|
70
|
+
export function resolveAdapter(input?: string): AdapterConfig {
|
|
71
|
+
const normalized = (input || "gemini").toLowerCase() as AdapterId;
|
|
72
|
+
if (ADAPTER_IDS.includes(normalized)) {
|
|
73
|
+
return ADAPTERS[normalized];
|
|
74
|
+
}
|
|
75
|
+
console.warn(`⚠️ Unknown adapter "${input}". Falling back to gemini (.gemini/).`);
|
|
76
|
+
return ADAPTERS.gemini;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function isAdapterShimFile(fileName: string): boolean {
|
|
80
|
+
return SHIM_FILES.includes(fileName);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function remapFrameworkContent(
|
|
84
|
+
content: string,
|
|
85
|
+
frameworkDir: string,
|
|
86
|
+
adapterId: AdapterId,
|
|
87
|
+
): string {
|
|
88
|
+
let result = content;
|
|
89
|
+
result = result.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
90
|
+
result = result.replace(/\{\{ADAPTER\}\}/g, adapterId);
|
|
91
|
+
result = result.replace(/\.enderun\//g, `${frameworkDir}/`);
|
|
92
|
+
result = result.replace(/`\.enderun`/g, `\`${frameworkDir}\``);
|
|
93
|
+
result = result.replace(/\.enderun(?![\w/-])/g, frameworkDir);
|
|
94
|
+
|
|
95
|
+
// Read config paths dynamically to map directory tokens
|
|
96
|
+
let backend = "apps/backend";
|
|
97
|
+
let frontend = "apps/web";
|
|
98
|
+
let docs = "docs";
|
|
99
|
+
let tests = "tests";
|
|
100
|
+
try {
|
|
101
|
+
const configPath = path.join(process.cwd(), frameworkDir, "config.json");
|
|
102
|
+
if (fs.existsSync(configPath)) {
|
|
103
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
104
|
+
if (config.paths) {
|
|
105
|
+
if (config.paths.backend) backend = config.paths.backend;
|
|
106
|
+
if (config.paths.frontend) frontend = config.paths.frontend;
|
|
107
|
+
if (config.paths.docs) docs = config.paths.docs;
|
|
108
|
+
if (config.paths.tests) tests = config.paths.tests;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
} catch {
|
|
112
|
+
// ignore
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
result = result.replace(/\{\{BACKEND_DIR\}\}/g, backend);
|
|
116
|
+
result = result.replace(/\{\{FRONTEND_DIR\}\}/g, frontend);
|
|
117
|
+
result = result.replace(/\{\{DOCS_DIR\}\}/g, docs);
|
|
118
|
+
result = result.replace(/\{\{TESTS_DIR\}\}/g, tests);
|
|
119
|
+
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function buildMcpServerEntry(projectRoot: string) {
|
|
124
|
+
return {
|
|
125
|
+
command: "node",
|
|
126
|
+
args: [path.join(projectRoot, "framework-mcp/dist/index.js")],
|
|
127
|
+
env: {},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function writeAntigravityScaffold(frameworkDirPath: string): void {
|
|
132
|
+
const antigravityReadme = `# Antigravity IDE — Agent Enderun
|
|
133
|
+
|
|
134
|
+
Antigravity IDE integration for the Gemini adapter.
|
|
135
|
+
|
|
136
|
+
- Framework root: \`${path.basename(frameworkDirPath)}/\`
|
|
137
|
+
- Nested path: \`antigravity/\`
|
|
138
|
+
- Use the parent \`mcp_config.json\` and \`gemini.md\` entrypoint at the project root.
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
const antigravityCliReadme = `# Antigravity CLI — Agent Enderun
|
|
142
|
+
|
|
143
|
+
Antigravity CLI integration for the Gemini adapter.
|
|
144
|
+
|
|
145
|
+
- Framework root: \`${path.basename(frameworkDirPath)}/\`
|
|
146
|
+
- Nested path: \`antigravity-cli/\`
|
|
147
|
+
- Register MCP from the project root \`mcp.json\` or \`.gemini/mcp_config.json\`.
|
|
148
|
+
`;
|
|
149
|
+
|
|
150
|
+
writeTextFile(path.join(frameworkDirPath, "antigravity/README.md"), antigravityReadme);
|
|
151
|
+
writeTextFile(path.join(frameworkDirPath, "antigravity-cli/README.md"), antigravityCliReadme);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Adapter-specific MCP and IDE hooks after scaffold.
|
|
156
|
+
*/
|
|
157
|
+
export function runAdapterPostInit(adapter: AdapterConfig, projectRoot: string): void {
|
|
158
|
+
const mcpEntry = buildMcpServerEntry(projectRoot);
|
|
159
|
+
const mcpBlock = { mcpServers: { "agent-enderun": mcpEntry } };
|
|
160
|
+
|
|
161
|
+
switch (adapter.id) {
|
|
162
|
+
case "gemini": {
|
|
163
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
164
|
+
writeAntigravityScaffold(path.join(projectRoot, adapter.frameworkDir));
|
|
165
|
+
console.warn(`✅ Gemini MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
166
|
+
console.warn(`✅ Antigravity → ${adapter.frameworkDir}/antigravity/ & antigravity-cli/`);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
case "antigravity": {
|
|
170
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
171
|
+
console.warn(`✅ Antigravity IDE MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
case "antigravity-cli": {
|
|
175
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
176
|
+
console.warn(`✅ Antigravity CLI MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case "grok": {
|
|
180
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
181
|
+
console.warn(`✅ Grok MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case "claude": {
|
|
185
|
+
const configPath = findClaudeConfigPath();
|
|
186
|
+
if (configPath) {
|
|
187
|
+
const ok = addMcpServerToClaude(configPath, "agent-enderun", mcpEntry);
|
|
188
|
+
if (ok) {
|
|
189
|
+
console.warn(`✅ Claude MCP registered → ${configPath}`);
|
|
190
|
+
} else {
|
|
191
|
+
console.warn("⚠️ Could not patch Claude config automatically.");
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
console.warn("⚠️ Claude config not found. Add MCP manually (see README).");
|
|
195
|
+
}
|
|
196
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
default:
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Keep root mcp.json in sync when missing or empty
|
|
204
|
+
const rootMcpPath = path.join(projectRoot, "mcp.json");
|
|
205
|
+
if (!fs.existsSync(rootMcpPath)) {
|
|
206
|
+
writeJsonFile(rootMcpPath, mcpBlock);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
import { updateMemoryForGeneratedApp, collectCreateAppDescription, inferAppSpec, createBackendFiles, createWebFiles, updateProjectDocs } from "../utils/app.js";
|
|
4
|
+
import { traceNewCommand } from "./trace.js";
|
|
5
|
+
import { getMemoryPath } from "../utils/memory.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Generate a new application based on natural language input.
|
|
9
|
+
*/
|
|
10
|
+
export async function createAppCommand(args: string[]) {
|
|
11
|
+
const description = await collectCreateAppDescription(args);
|
|
12
|
+
const spec = inferAppSpec(description);
|
|
13
|
+
|
|
14
|
+
console.warn(`🚀 Generating Enterprise App: ${spec.title}...`);
|
|
15
|
+
|
|
16
|
+
createBackendFiles(spec);
|
|
17
|
+
createWebFiles(spec);
|
|
18
|
+
updateProjectDocs(spec);
|
|
19
|
+
|
|
20
|
+
const memoryPath = getMemoryPath();
|
|
21
|
+
let traceId = "01HGT8J5E2N0W0W0W0W0W0W0W0"; // default fallback
|
|
22
|
+
|
|
23
|
+
if (fs.existsSync(memoryPath)) {
|
|
24
|
+
const memory = fs.readFileSync(memoryPath, "utf8");
|
|
25
|
+
const match = memory.match(/- Trace ID: (.*)/);
|
|
26
|
+
if (match) traceId = match[1].trim();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const activeTraceId = traceNewCommand(`Generate ${spec.title} from natural language request`, "manager", "P1") || traceId;
|
|
30
|
+
updateMemoryForGeneratedApp(spec, activeTraceId);
|
|
31
|
+
|
|
32
|
+
console.warn("\n✨ Application scaffolded successfully!");
|
|
33
|
+
console.warn("📜 Updated project docs and app-local types contract");
|
|
34
|
+
console.warn("\nNext commands:");
|
|
35
|
+
console.warn(" npm install");
|
|
36
|
+
console.warn(" npm run enderun:build");
|
|
37
|
+
console.warn(" agent-enderun frontend:dev\n");
|
|
38
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { execSync } from "child_process";
|
|
4
|
+
|
|
5
|
+
import { getFrameworkDir, getConfiguredPaths } from "../utils/memory.js";
|
|
6
|
+
import { getPackageVersion } from "../utils/pkg.js"; // To get FRAMEWORK_VERSION
|
|
7
|
+
|
|
8
|
+
const FRAMEWORK_VERSION = getPackageVersion();
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Check framework health and MCP status.
|
|
12
|
+
*/
|
|
13
|
+
export function checkCommand() {
|
|
14
|
+
console.warn(`🔍 Checking Agent Enderun Health (v${FRAMEWORK_VERSION})...`);
|
|
15
|
+
let issues = 0;
|
|
16
|
+
|
|
17
|
+
const frameworkDir = getFrameworkDir();
|
|
18
|
+
const pathsMap = getConfiguredPaths();
|
|
19
|
+
|
|
20
|
+
const constitutionPath = fs.existsSync(path.join(process.cwd(), "ENDERUN.md"))
|
|
21
|
+
? "ENDERUN.md"
|
|
22
|
+
: path.join(frameworkDir, "ENDERUN.md");
|
|
23
|
+
|
|
24
|
+
const checks = [
|
|
25
|
+
{ name: "Constitution (ENDERUN.md)", path: constitutionPath },
|
|
26
|
+
{ name: "Memory (PROJECT_MEMORY.md)", path: path.join(frameworkDir, "PROJECT_MEMORY.md") },
|
|
27
|
+
{ name: "Command Map (cli-commands.json)", path: path.join(frameworkDir, "cli-commands.json") },
|
|
28
|
+
{ name: "Framework Config (config.json)", path: path.join(frameworkDir, "config.json") },
|
|
29
|
+
{ name: "Agent Status (STATUS.md)", path: path.join(frameworkDir, "STATUS.md") },
|
|
30
|
+
{ name: "MCP Config (mcp.json)", path: "mcp.json" },
|
|
31
|
+
{ name: "ESLint Config (eslint.config.js)", path: "eslint.config.js" },
|
|
32
|
+
{ name: "ESLint Standards", path: path.join(frameworkDir, "knowledge/eslint-standards.md") },
|
|
33
|
+
{ name: "Backend Contract", path: path.join(pathsMap.backend, "contract.version.json") },
|
|
34
|
+
{ name: "MCP Server", path: "framework-mcp/package.json" },
|
|
35
|
+
{ name: "Panda CSS Config", path: "panda.config.ts" },
|
|
36
|
+
{ name: "Brain Dashboard", path: path.join(frameworkDir, "BRAIN_DASHBOARD.md") },
|
|
37
|
+
{ name: "Project Architectural Portal (docs/README.md)", path: path.join(pathsMap.docs, "README.md") },
|
|
38
|
+
{ name: "System Getting Started Guide (docs/getting-started.md)", path: path.join(pathsMap.docs, "getting-started.md") },
|
|
39
|
+
{ name: "Enterprise Approval Flows Protocol", path: path.join(pathsMap.docs, "architecture/approval-flows.md") },
|
|
40
|
+
{ name: "Professional Error Handling Pattern", path: path.join(pathsMap.docs, "backend/error-handling.md") },
|
|
41
|
+
{ name: "Atomic Component Standards", path: path.join(pathsMap.docs, "frontend/component-patterns.md") },
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
for (const check of checks) {
|
|
45
|
+
if (fs.existsSync(path.join(process.cwd(), check.path))) {
|
|
46
|
+
console.warn(`✅ ${check.name} found.`);
|
|
47
|
+
} else {
|
|
48
|
+
console.warn(`❌ ${check.name} MISSING! (${check.path})`);
|
|
49
|
+
issues++;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Dependency Check
|
|
54
|
+
const mcpNodeModules = path.join(process.cwd(), "framework-mcp/node_modules");
|
|
55
|
+
const rootNodeModules = path.join(process.cwd(), "node_modules");
|
|
56
|
+
if (!fs.existsSync(mcpNodeModules) && !fs.existsSync(rootNodeModules)) {
|
|
57
|
+
console.warn("❌ Dependencies MISSING! (Run 'npm install')");
|
|
58
|
+
issues++;
|
|
59
|
+
} else {
|
|
60
|
+
console.warn("✅ Dependencies found.");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// MCP Build Check
|
|
64
|
+
const mcpPath = path.join(process.cwd(), "framework-mcp/dist/index.js");
|
|
65
|
+
if (!fs.existsSync(mcpPath)) {
|
|
66
|
+
console.warn("❌ MCP Build MISSING! (Run 'npm run enderun:build')");
|
|
67
|
+
issues++;
|
|
68
|
+
} else {
|
|
69
|
+
console.warn("✅ MCP Build found.");
|
|
70
|
+
console.warn("⏳ Testing MCP Server syntax...");
|
|
71
|
+
try {
|
|
72
|
+
execSync(`node --check ${mcpPath}`, { stdio: "pipe" });
|
|
73
|
+
console.warn("✅ MCP Server syntax valid.");
|
|
74
|
+
} catch {
|
|
75
|
+
// If --check fails on ESM, we might skip it or use a better check
|
|
76
|
+
console.warn("⚠️ MCP Syntax check skipped (ESM/Environment).");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (issues === 0) {
|
|
81
|
+
console.warn("\n🚀 All systems green! Agent Enderun is ready for orchestration.");
|
|
82
|
+
} else {
|
|
83
|
+
console.warn(`
|
|
84
|
+
⚠️ Found ${issues} issues. Please fix them before starting.`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
import { collectFiles } from "../utils/fs.js";
|
|
5
|
+
|
|
6
|
+
const targetDir = process.cwd(); // Assuming targetDir is process.cwd() in the CLI context
|
|
7
|
+
|
|
8
|
+
export function complianceCheckCommand(targetPath: string) {
|
|
9
|
+
console.warn(`📜 Checking Constitution Compliance: ${targetPath}...`);
|
|
10
|
+
const violations: string[] = [];
|
|
11
|
+
const forbidden = ["@shadcn", "mui", "@chakra-ui", "tailwindcss"];
|
|
12
|
+
|
|
13
|
+
// 1. package.json scan (Blind Spot 5)
|
|
14
|
+
const pkgJsonPath = path.join(targetDir, "package.json");
|
|
15
|
+
if (fs.existsSync(pkgJsonPath)) {
|
|
16
|
+
try {
|
|
17
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8"));
|
|
18
|
+
const allDeps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
|
|
19
|
+
forbidden.forEach(lib => {
|
|
20
|
+
if (allDeps[lib] || Object.keys(allDeps).some(d => d.toLowerCase().includes(lib.toLowerCase()))) {
|
|
21
|
+
violations.push(`package.json: Forbidden library dependency '${lib}' found in package.json.`);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
} catch {
|
|
25
|
+
// ignore
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 2. Source files scan
|
|
30
|
+
const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx", ".js", ".jsx", ".md"]);
|
|
31
|
+
files.forEach(f => {
|
|
32
|
+
const isTypesFile = f.includes("brands.ts") || f.includes("brands.js") || f.includes("brands.tsx") || f.includes("src/types/brands");
|
|
33
|
+
|
|
34
|
+
const content = fs.readFileSync(f, "utf8");
|
|
35
|
+
forbidden.forEach(lib => {
|
|
36
|
+
if (content.includes(lib)) violations.push(`${path.relative(targetDir, f)}: Forbidden library '${lib}' found.`);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Robust Branded Types validation (Blind Spot 4)
|
|
40
|
+
if ((f.endsWith(".ts") || f.endsWith(".tsx")) && !isTypesFile && content.includes("interface")) {
|
|
41
|
+
const plainIdMatches = content.match(/\b\w*(?:id|Id|ID)\??\s*:\s*(?:string|number)\b/g);
|
|
42
|
+
if (plainIdMatches) {
|
|
43
|
+
plainIdMatches.forEach(match => {
|
|
44
|
+
violations.push(`${path.relative(targetDir, f)}: Potential Branded Types violation (plain identifier '${match.trim()}' found inside interface).`);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if (violations.length === 0) {
|
|
51
|
+
console.warn("✅ All systems compliant with ENDERUN.md.");
|
|
52
|
+
} else {
|
|
53
|
+
violations.forEach(v => console.warn(`❌ ${v}`));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import crypto from "crypto";
|
|
4
|
+
import { getConfiguredPaths } from "../utils/memory.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Verify type safety between backend and frontend contracts.
|
|
8
|
+
*/
|
|
9
|
+
export function verifyApiContractCommand() {
|
|
10
|
+
const projectRoot = process.cwd();
|
|
11
|
+
const pathsMap = getConfiguredPaths();
|
|
12
|
+
const sharedDir = path.join(projectRoot, pathsMap.backend, "src/types");
|
|
13
|
+
const contractPath = path.join(projectRoot, pathsMap.backend, "contract.version.json");
|
|
14
|
+
|
|
15
|
+
if (!fs.existsSync(sharedDir) || !fs.existsSync(contractPath)) {
|
|
16
|
+
console.error("❌ Error: API types or contract version file missing.");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const walk = (d: string): string[] => fs.readdirSync(d, { withFileTypes: true }).flatMap((e) => {
|
|
21
|
+
const fullPath = path.join(d, e.name);
|
|
22
|
+
return e.isDirectory() ? walk(fullPath) : (e.name.endsWith(".ts") ? [fullPath] : []);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const hash = crypto.createHash("sha256");
|
|
26
|
+
for (const filePath of walk(sharedDir).sort()) {
|
|
27
|
+
hash.update(path.relative(projectRoot, filePath));
|
|
28
|
+
hash.update("\0");
|
|
29
|
+
hash.update(fs.readFileSync(filePath));
|
|
30
|
+
hash.update("\0");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const currentHash = hash.digest("hex");
|
|
34
|
+
const contract = JSON.parse(fs.readFileSync(contractPath, "utf8"));
|
|
35
|
+
|
|
36
|
+
if (contract.contract_hash === currentHash) {
|
|
37
|
+
console.warn("✅ Contract is valid and synchronized.");
|
|
38
|
+
} else {
|
|
39
|
+
console.error("❌ Error: Contract drift detected!");
|
|
40
|
+
console.error(` Stored: ${contract.contract_hash}`);
|
|
41
|
+
console.error(` Actual: ${currentHash}`);
|
|
42
|
+
console.warn("\n👉 Run 'npm run update-contract' to re-sync.");
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
import { collectFiles } from "../utils/fs.js";
|
|
5
|
+
|
|
6
|
+
const targetDir = process.cwd();
|
|
7
|
+
|
|
8
|
+
export function explorerGraphCommand(targetPath: string) {
|
|
9
|
+
console.warn(`🗺️ Generating Dependency Graph for: ${targetPath}...`);
|
|
10
|
+
const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx"]);
|
|
11
|
+
const edges: string[] = [];
|
|
12
|
+
files.forEach((f) => {
|
|
13
|
+
const content = fs.readFileSync(f, "utf8");
|
|
14
|
+
const name = path.basename(f, path.extname(f));
|
|
15
|
+
const imports = content.match(/from\s+['"]\.\.?\/[^'"]+['"]/g) || [];
|
|
16
|
+
imports.forEach((imp) => {
|
|
17
|
+
const target = path.basename(imp.split(/['"]/)[1]);
|
|
18
|
+
edges.push(`${name} --> ${target}`);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
if (edges.length === 0) {
|
|
22
|
+
console.warn("ℹ️ No internal dependencies found.");
|
|
23
|
+
} else {
|
|
24
|
+
console.warn(
|
|
25
|
+
"```mermaid\ngraph TD\n" + Array.from(new Set(edges)).join("\n") + "\n```",
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function explorerAuditCommand(targetPath: string) {
|
|
31
|
+
console.warn(`🧠 Codebase Intelligence Scan: ${targetPath}...`);
|
|
32
|
+
const files = collectFiles(path.join(targetDir, targetPath), [".ts", ".tsx"]);
|
|
33
|
+
const complexity: string[] = [];
|
|
34
|
+
files.forEach((f) => {
|
|
35
|
+
const content = fs.readFileSync(f, "utf8");
|
|
36
|
+
const lines = content.split("\n").length;
|
|
37
|
+
if (lines > 300) complexity.push(`${path.relative(targetDir, f)} (${lines} lines)`);
|
|
38
|
+
});
|
|
39
|
+
if (complexity.length > 0) {
|
|
40
|
+
console.warn("\n⚠️ Complexity Spikes:");
|
|
41
|
+
complexity.forEach((c) => console.warn(`- ${c}`));
|
|
42
|
+
} else {
|
|
43
|
+
console.warn("✅ Codebase structure looks clean.");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import cp from "child_process";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { getConfiguredPaths } from "../utils/memory.js";
|
|
4
|
+
|
|
5
|
+
export function gitCommitCommand(traceId: string) {
|
|
6
|
+
try {
|
|
7
|
+
const diff = cp.execSync("git diff --staged", { encoding: "utf8" });
|
|
8
|
+
if (!diff) {
|
|
9
|
+
console.warn("ℹ️ No staged changes found. Use 'git add' first.");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const files = cp.execSync("git diff --staged --name-only", { encoding: "utf8" })
|
|
13
|
+
.split("\n")
|
|
14
|
+
.filter(Boolean);
|
|
15
|
+
const pathsMap = getConfiguredPaths();
|
|
16
|
+
const backendTypesPath = path.join(pathsMap.backend, "src/types");
|
|
17
|
+
let type = "feat";
|
|
18
|
+
const scope = "code";
|
|
19
|
+
if (files.some((f) => f.includes(".md"))) type = "docs";
|
|
20
|
+
else if (files.some((f) => f.includes(backendTypesPath))) type = "arch";
|
|
21
|
+
else if (files.some((f) => f.includes("bin/cli.js"))) type = "fix";
|
|
22
|
+
|
|
23
|
+
const summary =
|
|
24
|
+
files.length === 1 ? `update ${path.basename(files[0])}` : `update ${files.length} files`;
|
|
25
|
+
console.warn(`\n### SUGGESTED COMMIT MESSAGE ###\n\n[${traceId}] ${type}(${scope}): ${summary}\n`);
|
|
26
|
+
} catch {
|
|
27
|
+
console.warn("❌ Git command failed.");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function gitSyncCommand() {
|
|
32
|
+
console.warn("🔄 Syncing with remote repository...");
|
|
33
|
+
try {
|
|
34
|
+
cp.execSync("git pull origin main --rebase", { stdio: "inherit" });
|
|
35
|
+
console.warn("✅ Successfully synced and rebased.");
|
|
36
|
+
} catch {
|
|
37
|
+
console.warn("❌ Sync failed. Please resolve conflicts manually.");
|
|
38
|
+
}
|
|
39
|
+
}
|