This is page 5 of 5. Use http://codebase.md/hongsw/claude-agents-power-mcp-server?lines=true&page={x} to view the full context. # Directory Structure ``` ├── .claude │ └── agents │ ├── devops-engineer.md │ ├── frontend-developer.md │ ├── qa-engineer.md │ ├── README.md │ ├── security-engineer.md │ └── tech-lead.md ├── .gitignore ├── agents │ ├── backend-engineer.md │ ├── data-scientist.md │ ├── devops-engineer.md │ ├── frontend-developer.md │ ├── full-stack-developer.md │ ├── mobile-developer.md │ ├── qa-engineer.md │ ├── README.md │ ├── security-engineer.md │ ├── tech-lead.md │ └── ui-designer.md ├── CHANGELOG.md ├── claude │ └── agents │ ├── company-roles.md │ ├── en │ │ ├── account-manager.md │ │ ├── accountant.md │ │ ├── accounting-manager.md │ │ ├── agile-coach.md │ │ ├── ai-researcher.md │ │ ├── backend-developer.md │ │ ├── backend-engineer.md │ │ ├── bi-developer.md │ │ ├── blockchain-developer.md │ │ ├── brand-manager.md │ │ ├── budget-analyst.md │ │ ├── business-analyst.md │ │ ├── business-developer.md │ │ ├── business-development-manager.md │ │ ├── business-intelligence-analyst.md │ │ ├── business-process-analyst.md │ │ ├── change-management-specialist.md │ │ ├── change-manager.md │ │ ├── chief-data-officer.md │ │ ├── chief-executive-officer.md │ │ ├── chief-financial-officer.md │ │ ├── chief-human-resources-officer.md │ │ ├── chief-information-officer.md │ │ ├── chief-marketing-officer.md │ │ ├── chief-operating-officer.md │ │ ├── chief-product-officer.md │ │ ├── chief-technology-officer.md │ │ ├── clinical-researcher.md │ │ ├── cloud-architect.md │ │ ├── communications-director.md │ │ ├── compensation-benefits-manager.md │ │ ├── compensation-benefits.md │ │ ├── compliance-manager.md │ │ ├── compliance-officer.md │ │ ├── content-creator.md │ │ ├── content-marketer.md │ │ ├── content-marketing-manager.md │ │ ├── contract-manager.md │ │ ├── controller.md │ │ ├── copywriter.md │ │ ├── corporate-trainer.md │ │ ├── creative-director.md │ │ ├── credit-analyst.md │ │ ├── curriculum-developer.md │ │ ├── customer-service-manager.md │ │ ├── customer-success-manager.md │ │ ├── data-analyst.md │ │ ├── data-engineer.md │ │ ├── data-scientist.md │ │ ├── database-administrator.md │ │ ├── design-lead.md │ │ ├── devops-engineer.md │ │ ├── digital-marketer.md │ │ ├── digital-marketing-specialist.md │ │ ├── diversity-inclusion-manager.md │ │ ├── diversity-inclusion.md │ │ ├── embedded-systems-engineer.md │ │ ├── environmental-engineer.md │ │ ├── event-manager.md │ │ ├── executive-assistant.md │ │ ├── facilities-manager.md │ │ ├── facility-manager.md │ │ ├── financial-analyst.md │ │ ├── financial-controller.md │ │ ├── frontend-developer.md │ │ ├── full-stack-developer.md │ │ ├── game-developer.md │ │ ├── graphic-designer.md │ │ ├── growth-hacker.md │ │ ├── growth-marketing-manager.md │ │ ├── health-informatics.md │ │ ├── healthcare-analyst.md │ │ ├── help-desk-specialist.md │ │ ├── hr-manager.md │ │ ├── implementation-consultant.md │ │ ├── innovation-manager.md │ │ ├── instructional-designer.md │ │ ├── interaction-designer.md │ │ ├── internal-auditor.md │ │ ├── investment-analyst.md │ │ ├── investor-relations-manager.md │ │ ├── investor-relations.md │ │ ├── it-administrator.md │ │ ├── learning-development-manager.md │ │ ├── learning-development.md │ │ ├── legal-counsel.md │ │ ├── machine-learning-engineer.md │ │ ├── marketing-analyst.md │ │ ├── marketing-manager.md │ │ ├── medical-writer.md │ │ ├── mobile-developer.md │ │ ├── motion-designer.md │ │ ├── network-engineer.md │ │ ├── office-manager.md │ │ ├── operations-manager.md │ │ ├── organizational-developer.md │ │ ├── organizational-development-manager.md │ │ ├── partnership-manager.md │ │ ├── patent-engineer.md │ │ ├── payroll-manager.md │ │ ├── pr-manager.md │ │ ├── pre-sales-consultant.md │ │ ├── privacy-officer.md │ │ ├── process-engineer.md │ │ ├── procurement-manager.md │ │ ├── procurement-specialist.md │ │ ├── product-designer.md │ │ ├── product-manager.md │ │ ├── product-owner.md │ │ ├── production-manager.md │ │ ├── program-manager.md │ │ ├── project-manager.md │ │ ├── public-relations-manager.md │ │ ├── qa-engineer.md │ │ ├── quality-assurance-manager.md │ │ ├── quality-engineer.md │ │ ├── r-and-d-engineer.md │ │ ├── real-estate-analyst.md │ │ ├── research-scientist.md │ │ ├── risk-manager.md │ │ ├── sales-engineer.md │ │ ├── sales-manager.md │ │ ├── scrum-master.md │ │ ├── security-engineer.md │ │ ├── seo-specialist.md │ │ ├── site-reliability-engineer.md │ │ ├── social-media-manager.md │ │ ├── software-engineer.md │ │ ├── solution-architect.md │ │ ├── strategy-consultant.md │ │ ├── supply-chain-manager.md │ │ ├── sustainability-manager.md │ │ ├── talent-acquisition-specialist.md │ │ ├── talent-acquisition.md │ │ ├── tax-manager.md │ │ ├── tech-lead.md │ │ ├── technical-pm.md │ │ ├── technical-support-engineer.md │ │ ├── technical-support.md │ │ ├── technical-writer.md │ │ ├── training-specialist.md │ │ ├── treasury-manager.md │ │ ├── ui-designer.md │ │ ├── ux-designer.md │ │ ├── ux-researcher.md │ │ └── video-producer.md │ ├── ja │ │ ├── backend-engineer.md │ │ ├── data-scientist.md │ │ ├── devops-engineer.md │ │ ├── frontend-developer.md │ │ └── product-manager.md │ ├── ko │ │ ├── account-manager.md │ │ ├── accountant.md │ │ ├── backend-developer.md │ │ ├── backend-engineer.md │ │ ├── bi-developer.md │ │ ├── blockchain-developer.md │ │ ├── brand-manager.md │ │ ├── budget-analyst.md │ │ ├── business-analyst.md │ │ ├── business-developer.md │ │ ├── change-manager.md │ │ ├── clinical-researcher.md │ │ ├── cloud-architect.md │ │ ├── communications-director.md │ │ ├── compensation-benefits.md │ │ ├── compliance-officer.md │ │ ├── content-creator.md │ │ ├── content-marketer.md │ │ ├── contract-manager.md │ │ ├── controller.md │ │ ├── copywriter.md │ │ ├── corporate-trainer.md │ │ ├── curriculum-developer.md │ │ ├── customer-success-manager.md │ │ ├── data-analyst.md │ │ ├── data-engineer.md │ │ ├── data-scientist.md │ │ ├── devops-engineer.md │ │ ├── digital-marketer.md │ │ ├── diversity-inclusion.md │ │ ├── environmental-engineer.md │ │ ├── event-manager.md │ │ ├── executive-assistant.md │ │ ├── facility-manager.md │ │ ├── financial-analyst.md │ │ ├── frontend-developer.md │ │ ├── full-stack-developer.md │ │ ├── graphic-designer.md │ │ ├── growth-hacker.md │ │ ├── health-informatics.md │ │ ├── healthcare-analyst.md │ │ ├── help-desk-specialist.md │ │ ├── hr-manager.md │ │ ├── innovation-manager.md │ │ ├── instructional-designer.md │ │ ├── internal-auditor.md │ │ ├── investor-relations.md │ │ ├── it-administrator.md │ │ ├── learning-development.md │ │ ├── legal-counsel.md │ │ ├── machine-learning-engineer.md │ │ ├── marketing-analyst.md │ │ ├── medical-writer.md │ │ ├── mobile-developer.md │ │ ├── motion-designer.md │ │ ├── operations-manager.md │ │ ├── organizational-developer.md │ │ ├── patent-engineer.md │ │ ├── pr-manager.md │ │ ├── privacy-officer.md │ │ ├── process-engineer.md │ │ ├── procurement-specialist.md │ │ ├── product-designer.md │ │ ├── product-manager.md │ │ ├── product-owner.md │ │ ├── production-manager.md │ │ ├── project-manager.md │ │ ├── qa-engineer.md │ │ ├── quality-engineer.md │ │ ├── r-and-d-engineer.md │ │ ├── real-estate-analyst.md │ │ ├── research-scientist.md │ │ ├── risk-manager.md │ │ ├── sales-manager.md │ │ ├── scrum-master.md │ │ ├── security-engineer.md │ │ ├── social-media-manager.md │ │ ├── software-engineer.md │ │ ├── strategy-consultant.md │ │ ├── supply-chain-manager.md │ │ ├── sustainability-manager.md │ │ ├── talent-acquisition.md │ │ ├── technical-pm.md │ │ ├── technical-support.md │ │ ├── treasury-manager.md │ │ ├── ui-designer.md │ │ └── ux-designer.md │ └── zh │ ├── backend-engineer.md │ ├── data-scientist.md │ ├── devops-engineer.md │ ├── frontend-developer.md │ ├── product-manager.md │ ├── project-manager.md │ ├── qa-engineer.md │ └── security-engineer.md ├── claude-slash-commands │ ├── agent-download.md │ ├── agents-load.md │ ├── agents-search.md │ ├── agents-suggest.md │ ├── agents-version.md │ └── splash.md ├── CLAUDE.md ├── dist │ ├── agentManager.d.ts │ ├── agentManager.d.ts.map │ ├── agentManager.js │ ├── agentManager.js.map │ ├── githubIntegration.d.ts │ ├── githubIntegration.d.ts.map │ ├── githubIntegration.js │ ├── githubIntegration.js.map │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── index.js.map │ ├── projectAnalyzer.d.ts │ ├── projectAnalyzer.d.ts.map │ ├── projectAnalyzer.js │ └── projectAnalyzer.js.map ├── docs │ ├── company_roles.md │ └── index.html ├── examples │ └── usage.md ├── EXAMPLES.md ├── FIXED.md ├── index.html ├── install-slash-commands.js ├── INSTALL.md ├── INSTALLATION.md ├── LICENSE ├── node_modules │ ├── .bin │ │ ├── esbuild │ │ ├── glob │ │ ├── js-yaml │ │ ├── node-which │ │ ├── tsc │ │ ├── tsserver │ │ └── tsx │ ├── .package-lock.json │ ├── @esbuild │ │ └── darwin-arm64 │ │ ├── bin │ │ │ └── esbuild │ │ ├── package.json │ │ └── README.md │ ├── @isaacs │ │ └── cliui │ │ ├── build │ │ │ ├── index.cjs │ │ │ ├── index.d.cts │ │ │ └── lib │ │ │ └── index.js │ │ ├── index.mjs │ │ ├── LICENSE.txt │ │ ├── package.json │ │ └── README.md │ ├── @modelcontextprotocol │ │ └── sdk │ │ ├── dist │ │ │ ├── cli.d.ts │ │ │ ├── cli.d.ts.map │ │ │ ├── cli.js │ │ │ ├── cli.js.map │ │ │ ├── client │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── index.test.d.ts │ │ │ │ ├── index.test.d.ts.map │ │ │ │ ├── index.test.js │ │ │ │ ├── index.test.js.map │ │ │ │ ├── sse.d.ts │ │ │ │ ├── sse.d.ts.map │ │ │ │ ├── sse.js │ │ │ │ ├── sse.js.map │ │ │ │ ├── stdio.d.ts │ │ │ │ ├── stdio.d.ts.map │ │ │ │ ├── stdio.js │ │ │ │ ├── stdio.js.map │ │ │ │ ├── stdio.test.d.ts │ │ │ │ ├── stdio.test.d.ts.map │ │ │ │ ├── stdio.test.js │ │ │ │ ├── stdio.test.js.map │ │ │ │ ├── websocket.d.ts │ │ │ │ ├── websocket.d.ts.map │ │ │ │ ├── websocket.js │ │ │ │ └── websocket.js.map │ │ │ ├── inMemory.d.ts │ │ │ ├── inMemory.d.ts.map │ │ │ ├── inMemory.js │ │ │ ├── inMemory.js.map │ │ │ ├── inMemory.test.d.ts │ │ │ ├── inMemory.test.d.ts.map │ │ │ ├── inMemory.test.js │ │ │ ├── inMemory.test.js.map │ │ │ ├── server │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── index.test.d.ts │ │ │ │ ├── index.test.d.ts.map │ │ │ │ ├── index.test.js │ │ │ │ ├── index.test.js.map │ │ │ │ ├── sse.d.ts │ │ │ │ ├── sse.d.ts.map │ │ │ │ ├── sse.js │ │ │ │ ├── sse.js.map │ │ │ │ ├── stdio.d.ts │ │ │ │ ├── stdio.d.ts.map │ │ │ │ ├── stdio.js │ │ │ │ ├── stdio.js.map │ │ │ │ ├── stdio.test.d.ts │ │ │ │ ├── stdio.test.d.ts.map │ │ │ │ ├── stdio.test.js │ │ │ │ └── stdio.test.js.map │ │ │ ├── shared │ │ │ │ ├── protocol.d.ts │ │ │ │ ├── protocol.d.ts.map │ │ │ │ ├── protocol.js │ │ │ │ ├── protocol.js.map │ │ │ │ ├── stdio.d.ts │ │ │ │ ├── stdio.d.ts.map │ │ │ │ ├── stdio.js │ │ │ │ ├── stdio.js.map │ │ │ │ ├── stdio.test.d.ts │ │ │ │ ├── stdio.test.d.ts.map │ │ │ │ ├── stdio.test.js │ │ │ │ ├── stdio.test.js.map │ │ │ │ ├── transport.d.ts │ │ │ │ ├── transport.d.ts.map │ │ │ │ ├── transport.js │ │ │ │ └── transport.js.map │ │ │ ├── types.d.ts │ │ │ ├── types.d.ts.map │ │ │ ├── types.js │ │ │ ├── types.js.map │ │ │ ├── utils.d.ts │ │ │ ├── utils.d.ts.map │ │ │ ├── utils.js │ │ │ ├── utils.js.map │ │ │ ├── utils.test.d.ts │ │ │ ├── utils.test.d.ts.map │ │ │ ├── utils.test.js │ │ │ └── utils.test.js.map │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── @pkgjs │ │ └── parseargs │ │ ├── .editorconfig │ │ ├── CHANGELOG.md │ │ ├── examples │ │ │ ├── is-default-value.js │ │ │ ├── limit-long-syntax.js │ │ │ ├── negate.js │ │ │ ├── no-repeated-options.js │ │ │ ├── ordered-options.mjs │ │ │ └── simple-hard-coded.js │ │ ├── index.js │ │ ├── internal │ │ │ ├── errors.js │ │ │ ├── primordials.js │ │ │ ├── util.js │ │ │ └── validators.js │ │ ├── LICENSE │ │ ├── package.json │ │ ├── README.md │ │ └── utils.js │ ├── @types │ │ ├── js-yaml │ │ │ ├── index.d.mts │ │ │ ├── index.d.ts │ │ │ ├── LICENSE │ │ │ ├── package.json │ │ │ └── README.md │ │ └── node │ │ ├── assert │ │ │ └── strict.d.ts │ │ ├── assert.d.ts │ │ ├── async_hooks.d.ts │ │ ├── buffer.buffer.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── compatibility │ │ │ ├── disposable.d.ts │ │ │ ├── index.d.ts │ │ │ ├── indexable.d.ts │ │ │ └── iterators.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── diagnostics_channel.d.ts │ │ ├── dns │ │ │ └── promises.d.ts │ │ ├── dns.d.ts │ │ ├── dom-events.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs │ │ │ └── promises.d.ts │ │ ├── fs.d.ts │ │ ├── globals.d.ts │ │ ├── globals.typedarray.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── LICENSE │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── package.json │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline │ │ │ └── promises.d.ts │ │ ├── readline.d.ts │ │ ├── README.md │ │ ├── repl.d.ts │ │ ├── sea.d.ts │ │ ├── stream │ │ │ ├── consumers.d.ts │ │ │ ├── promises.d.ts │ │ │ └── web.d.ts │ │ ├── stream.d.ts │ │ ├── string_decoder.d.ts │ │ ├── test.d.ts │ │ ├── timers │ │ │ └── promises.d.ts │ │ ├── timers.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── ts5.6 │ │ │ ├── buffer.buffer.d.ts │ │ │ ├── globals.typedarray.d.ts │ │ │ └── index.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── wasi.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts │ ├── ansi-regex │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── ansi-styles │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── argparse │ │ ├── argparse.js │ │ ├── CHANGELOG.md │ │ ├── lib │ │ │ ├── sub.js │ │ │ └── textwrap.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── balanced-match │ │ ├── .github │ │ │ └── FUNDING.yml │ │ ├── index.js │ │ ├── LICENSE.md │ │ ├── package.json │ │ └── README.md │ ├── brace-expansion │ │ ├── .github │ │ │ └── FUNDING.yml │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── bytes │ │ ├── History.md │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── Readme.md │ ├── color-convert │ │ ├── CHANGELOG.md │ │ ├── conversions.js │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ ├── README.md │ │ └── route.js │ ├── color-name │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── commander │ │ ├── esm.mjs │ │ ├── index.js │ │ ├── lib │ │ │ ├── argument.js │ │ │ ├── command.js │ │ │ ├── error.js │ │ │ ├── help.js │ │ │ ├── option.js │ │ │ └── suggestSimilar.js │ │ ├── LICENSE │ │ ├── package-support.json │ │ ├── package.json │ │ ├── Readme.md │ │ └── typings │ │ ├── esm.d.mts │ │ └── index.d.ts │ ├── content-type │ │ ├── HISTORY.md │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── cross-spawn │ │ ├── index.js │ │ ├── lib │ │ │ ├── enoent.js │ │ │ ├── parse.js │ │ │ └── util │ │ │ ├── escape.js │ │ │ ├── readShebang.js │ │ │ └── resolveCommand.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── depd │ │ ├── History.md │ │ ├── index.js │ │ ├── lib │ │ │ └── browser │ │ │ └── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── Readme.md │ ├── eastasianwidth │ │ ├── eastasianwidth.js │ │ ├── package.json │ │ └── README.md │ ├── emoji-regex │ │ ├── es2015 │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── RGI_Emoji.d.ts │ │ │ ├── RGI_Emoji.js │ │ │ ├── text.d.ts │ │ │ └── text.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── LICENSE-MIT.txt │ │ ├── package.json │ │ ├── README.md │ │ ├── RGI_Emoji.d.ts │ │ ├── RGI_Emoji.js │ │ ├── text.d.ts │ │ └── text.js │ ├── esbuild │ │ ├── bin │ │ │ └── esbuild │ │ ├── install.js │ │ ├── lib │ │ │ ├── main.d.ts │ │ │ └── main.js │ │ ├── LICENSE.md │ │ ├── package.json │ │ └── README.md │ ├── foreground-child │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── all-signals.d.ts │ │ │ │ ├── all-signals.d.ts.map │ │ │ │ ├── all-signals.js │ │ │ │ ├── all-signals.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── package.json │ │ │ │ ├── proxy-signals.d.ts │ │ │ │ ├── proxy-signals.d.ts.map │ │ │ │ ├── proxy-signals.js │ │ │ │ ├── proxy-signals.js.map │ │ │ │ ├── watchdog.d.ts │ │ │ │ ├── watchdog.d.ts.map │ │ │ │ ├── watchdog.js │ │ │ │ └── watchdog.js.map │ │ │ └── esm │ │ │ ├── all-signals.d.ts │ │ │ ├── all-signals.d.ts.map │ │ │ ├── all-signals.js │ │ │ ├── all-signals.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── package.json │ │ │ ├── proxy-signals.d.ts │ │ │ ├── proxy-signals.d.ts.map │ │ │ ├── proxy-signals.js │ │ │ ├── proxy-signals.js.map │ │ │ ├── watchdog.d.ts │ │ │ ├── watchdog.d.ts.map │ │ │ ├── watchdog.js │ │ │ └── watchdog.js.map │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── get-tsconfig │ │ ├── dist │ │ │ ├── index.cjs │ │ │ ├── index.d.cts │ │ │ ├── index.d.mts │ │ │ └── index.mjs │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── glob │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── glob.d.ts │ │ │ │ ├── glob.d.ts.map │ │ │ │ ├── glob.js │ │ │ │ ├── glob.js.map │ │ │ │ ├── has-magic.d.ts │ │ │ │ ├── has-magic.d.ts.map │ │ │ │ ├── has-magic.js │ │ │ │ ├── has-magic.js.map │ │ │ │ ├── ignore.d.ts │ │ │ │ ├── ignore.d.ts.map │ │ │ │ ├── ignore.js │ │ │ │ ├── ignore.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── package.json │ │ │ │ ├── pattern.d.ts │ │ │ │ ├── pattern.d.ts.map │ │ │ │ ├── pattern.js │ │ │ │ ├── pattern.js.map │ │ │ │ ├── processor.d.ts │ │ │ │ ├── processor.d.ts.map │ │ │ │ ├── processor.js │ │ │ │ ├── processor.js.map │ │ │ │ ├── walker.d.ts │ │ │ │ ├── walker.d.ts.map │ │ │ │ ├── walker.js │ │ │ │ └── walker.js.map │ │ │ └── esm │ │ │ ├── bin.d.mts │ │ │ ├── bin.d.mts.map │ │ │ ├── bin.mjs │ │ │ ├── bin.mjs.map │ │ │ ├── glob.d.ts │ │ │ ├── glob.d.ts.map │ │ │ ├── glob.js │ │ │ ├── glob.js.map │ │ │ ├── has-magic.d.ts │ │ │ ├── has-magic.d.ts.map │ │ │ ├── has-magic.js │ │ │ ├── has-magic.js.map │ │ │ ├── ignore.d.ts │ │ │ ├── ignore.d.ts.map │ │ │ ├── ignore.js │ │ │ ├── ignore.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── package.json │ │ │ ├── pattern.d.ts │ │ │ ├── pattern.d.ts.map │ │ │ ├── pattern.js │ │ │ ├── pattern.js.map │ │ │ ├── processor.d.ts │ │ │ ├── processor.d.ts.map │ │ │ ├── processor.js │ │ │ ├── processor.js.map │ │ │ ├── walker.d.ts │ │ │ ├── walker.d.ts.map │ │ │ ├── walker.js │ │ │ └── walker.js.map │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── http-errors │ │ ├── HISTORY.md │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── iconv-lite │ │ ├── .github │ │ │ └── dependabot.yml │ │ ├── .idea │ │ │ ├── codeStyles │ │ │ │ ├── codeStyleConfig.xml │ │ │ │ └── Project.xml │ │ │ ├── iconv-lite.iml │ │ │ ├── inspectionProfiles │ │ │ │ └── Project_Default.xml │ │ │ ├── modules.xml │ │ │ └── vcs.xml │ │ ├── Changelog.md │ │ ├── encodings │ │ │ ├── dbcs-codec.js │ │ │ ├── dbcs-data.js │ │ │ ├── index.js │ │ │ ├── internal.js │ │ │ ├── sbcs-codec.js │ │ │ ├── sbcs-data-generated.js │ │ │ ├── sbcs-data.js │ │ │ ├── tables │ │ │ │ ├── big5-added.json │ │ │ │ ├── cp936.json │ │ │ │ ├── cp949.json │ │ │ │ ├── cp950.json │ │ │ │ ├── eucjp.json │ │ │ │ ├── gb18030-ranges.json │ │ │ │ ├── gbk-added.json │ │ │ │ └── shiftjis.json │ │ │ ├── utf16.js │ │ │ ├── utf32.js │ │ │ └── utf7.js │ │ ├── lib │ │ │ ├── bom-handling.js │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── streams.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── inherits │ │ ├── inherits_browser.js │ │ ├── inherits.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── is-fullwidth-code-point │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── isexe │ │ ├── .npmignore │ │ ├── index.js │ │ ├── LICENSE │ │ ├── mode.js │ │ ├── package.json │ │ ├── README.md │ │ ├── test │ │ │ └── basic.js │ │ └── windows.js │ ├── jackspeak │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── package.json │ │ │ │ ├── parse-args-cjs.cjs.map │ │ │ │ ├── parse-args-cjs.d.cts.map │ │ │ │ ├── parse-args.d.ts │ │ │ │ └── parse-args.js │ │ │ └── esm │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── package.json │ │ │ ├── parse-args.d.ts │ │ │ ├── parse-args.d.ts.map │ │ │ ├── parse-args.js │ │ │ └── parse-args.js.map │ │ ├── LICENSE.md │ │ ├── package.json │ │ └── README.md │ ├── js-yaml │ │ ├── bin │ │ │ └── js-yaml.js │ │ ├── CHANGELOG.md │ │ ├── dist │ │ │ ├── js-yaml.js │ │ │ ├── js-yaml.min.js │ │ │ └── js-yaml.mjs │ │ ├── index.js │ │ ├── lib │ │ │ ├── common.js │ │ │ ├── dumper.js │ │ │ ├── exception.js │ │ │ ├── loader.js │ │ │ ├── schema │ │ │ │ ├── core.js │ │ │ │ ├── default.js │ │ │ │ ├── failsafe.js │ │ │ │ └── json.js │ │ │ ├── schema.js │ │ │ ├── snippet.js │ │ │ ├── type │ │ │ │ ├── binary.js │ │ │ │ ├── bool.js │ │ │ │ ├── float.js │ │ │ │ ├── int.js │ │ │ │ ├── map.js │ │ │ │ ├── merge.js │ │ │ │ ├── null.js │ │ │ │ ├── omap.js │ │ │ │ ├── pairs.js │ │ │ │ ├── seq.js │ │ │ │ ├── set.js │ │ │ │ ├── str.js │ │ │ │ └── timestamp.js │ │ │ └── type.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── lru-cache │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── index.min.js │ │ │ │ ├── index.min.js.map │ │ │ │ └── package.json │ │ │ └── esm │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── index.min.js │ │ │ ├── index.min.js.map │ │ │ └── package.json │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── minimatch │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── assert-valid-pattern.d.ts │ │ │ │ ├── assert-valid-pattern.d.ts.map │ │ │ │ ├── assert-valid-pattern.js │ │ │ │ ├── assert-valid-pattern.js.map │ │ │ │ ├── ast.d.ts │ │ │ │ ├── ast.d.ts.map │ │ │ │ ├── ast.js │ │ │ │ ├── ast.js.map │ │ │ │ ├── brace-expressions.d.ts │ │ │ │ ├── brace-expressions.d.ts.map │ │ │ │ ├── brace-expressions.js │ │ │ │ ├── brace-expressions.js.map │ │ │ │ ├── escape.d.ts │ │ │ │ ├── escape.d.ts.map │ │ │ │ ├── escape.js │ │ │ │ ├── escape.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── package.json │ │ │ │ ├── unescape.d.ts │ │ │ │ ├── unescape.d.ts.map │ │ │ │ ├── unescape.js │ │ │ │ └── unescape.js.map │ │ │ └── esm │ │ │ ├── assert-valid-pattern.d.ts │ │ │ ├── assert-valid-pattern.d.ts.map │ │ │ ├── assert-valid-pattern.js │ │ │ ├── assert-valid-pattern.js.map │ │ │ ├── ast.d.ts │ │ │ ├── ast.d.ts.map │ │ │ ├── ast.js │ │ │ ├── ast.js.map │ │ │ ├── brace-expressions.d.ts │ │ │ ├── brace-expressions.d.ts.map │ │ │ ├── brace-expressions.js │ │ │ ├── brace-expressions.js.map │ │ │ ├── escape.d.ts │ │ │ ├── escape.d.ts.map │ │ │ ├── escape.js │ │ │ ├── escape.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── package.json │ │ │ ├── unescape.d.ts │ │ │ ├── unescape.d.ts.map │ │ │ ├── unescape.js │ │ │ └── unescape.js.map │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── minipass │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ └── package.json │ │ │ └── esm │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── package.json │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── package-json-from-dist │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ └── package.json │ │ │ └── esm │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── package.json │ │ ├── LICENSE.md │ │ ├── package.json │ │ └── README.md │ ├── path-key │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── path-scurry │ │ ├── dist │ │ │ ├── commonjs │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ └── package.json │ │ │ └── esm │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── package.json │ │ ├── LICENSE.md │ │ ├── package.json │ │ └── README.md │ ├── raw-body │ │ ├── HISTORY.md │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ ├── README.md │ │ └── SECURITY.md │ ├── resolve-pkg-maps │ │ ├── dist │ │ │ ├── index.cjs │ │ │ ├── index.d.cts │ │ │ ├── index.d.mts │ │ │ └── index.mjs │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── safer-buffer │ │ ├── dangerous.js │ │ ├── LICENSE │ │ ├── package.json │ │ ├── Porting-Buffer.md │ │ ├── Readme.md │ │ ├── safer.js │ │ └── tests.js │ ├── setprototypeof │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ ├── README.md │ │ └── test │ │ └── index.js │ ├── shebang-command │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── shebang-regex │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── signal-exit │ │ ├── dist │ │ │ ├── cjs │ │ │ │ ├── browser.d.ts │ │ │ │ ├── browser.d.ts.map │ │ │ │ ├── browser.js │ │ │ │ ├── browser.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.d.ts.map │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── package.json │ │ │ │ ├── signals.d.ts │ │ │ │ ├── signals.d.ts.map │ │ │ │ ├── signals.js │ │ │ │ └── signals.js.map │ │ │ └── mjs │ │ │ ├── browser.d.ts │ │ │ ├── browser.d.ts.map │ │ │ ├── browser.js │ │ │ ├── browser.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── package.json │ │ │ ├── signals.d.ts │ │ │ ├── signals.d.ts.map │ │ │ ├── signals.js │ │ │ └── signals.js.map │ │ ├── LICENSE.txt │ │ ├── package.json │ │ └── README.md │ ├── statuses │ │ ├── codes.json │ │ ├── HISTORY.md │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── string-width │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── string-width-cjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── node_modules │ │ │ ├── ansi-regex │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── emoji-regex │ │ │ │ ├── es2015 │ │ │ │ │ ├── index.js │ │ │ │ │ └── text.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── LICENSE-MIT.txt │ │ │ │ ├── package.json │ │ │ │ ├── README.md │ │ │ │ └── text.js │ │ │ └── strip-ansi │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── license │ │ │ ├── package.json │ │ │ └── readme.md │ │ ├── package.json │ │ └── readme.md │ ├── strip-ansi │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── strip-ansi-cjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── node_modules │ │ │ └── ansi-regex │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── license │ │ │ ├── package.json │ │ │ └── readme.md │ │ ├── package.json │ │ └── readme.md │ ├── toidentifier │ │ ├── HISTORY.md │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── tsx │ │ ├── dist │ │ │ ├── cjs │ │ │ │ ├── api │ │ │ │ │ ├── index.cjs │ │ │ │ │ ├── index.d.cts │ │ │ │ │ ├── index.d.mts │ │ │ │ │ └── index.mjs │ │ │ │ ├── index.cjs │ │ │ │ └── index.mjs │ │ │ ├── cli.cjs │ │ │ ├── cli.mjs │ │ │ ├── client-BQVF1NaW.mjs │ │ │ ├── client-D6NvIMSC.cjs │ │ │ ├── esm │ │ │ │ ├── api │ │ │ │ │ ├── index.cjs │ │ │ │ │ ├── index.d.cts │ │ │ │ │ ├── index.d.mts │ │ │ │ │ └── index.mjs │ │ │ │ ├── index.cjs │ │ │ │ └── index.mjs │ │ │ ├── get-pipe-path-BHW2eJdv.mjs │ │ │ ├── get-pipe-path-BoR10qr8.cjs │ │ │ ├── index-7AaEi15b.mjs │ │ │ ├── index-BWFBUo6r.cjs │ │ │ ├── index-gbaejti9.mjs │ │ │ ├── index-gckBtVBf.cjs │ │ │ ├── lexer-DgIbo0BU.cjs │ │ │ ├── lexer-DQCqS3nf.mjs │ │ │ ├── loader.cjs │ │ │ ├── loader.mjs │ │ │ ├── node-features-_8ZFwP_x.mjs │ │ │ ├── node-features-roYmp9jK.cjs │ │ │ ├── package-BgRDTLo0.mjs │ │ │ ├── package-BTMRuUqB.cjs │ │ │ ├── patch-repl.cjs │ │ │ ├── patch-repl.mjs │ │ │ ├── preflight.cjs │ │ │ ├── preflight.mjs │ │ │ ├── register-2sWVXuRQ.cjs │ │ │ ├── register-B7jrtLTO.mjs │ │ │ ├── register-CFH5oNdT.mjs │ │ │ ├── register-D46fvsV_.cjs │ │ │ ├── repl.cjs │ │ │ ├── repl.mjs │ │ │ ├── require-D4F1Lv60.cjs │ │ │ ├── require-DQxpCAr4.mjs │ │ │ ├── suppress-warnings.cjs │ │ │ ├── suppress-warnings.mjs │ │ │ ├── temporary-directory-B83uKxJF.cjs │ │ │ ├── temporary-directory-CwHp0_NW.mjs │ │ │ └── types-Cxp8y2TL.d.ts │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── typescript │ │ ├── bin │ │ │ ├── tsc │ │ │ └── tsserver │ │ ├── lib │ │ │ ├── _tsc.js │ │ │ ├── _tsserver.js │ │ │ ├── _typingsInstaller.js │ │ │ ├── cs │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── de │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── es │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── fr │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── it │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── ja │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── ko │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── lib.d.ts │ │ │ ├── lib.decorators.d.ts │ │ │ ├── lib.decorators.legacy.d.ts │ │ │ ├── lib.dom.asynciterable.d.ts │ │ │ ├── lib.dom.d.ts │ │ │ ├── lib.dom.iterable.d.ts │ │ │ ├── lib.es2015.collection.d.ts │ │ │ ├── lib.es2015.core.d.ts │ │ │ ├── lib.es2015.d.ts │ │ │ ├── lib.es2015.generator.d.ts │ │ │ ├── lib.es2015.iterable.d.ts │ │ │ ├── lib.es2015.promise.d.ts │ │ │ ├── lib.es2015.proxy.d.ts │ │ │ ├── lib.es2015.reflect.d.ts │ │ │ ├── lib.es2015.symbol.d.ts │ │ │ ├── lib.es2015.symbol.wellknown.d.ts │ │ │ ├── lib.es2016.array.include.d.ts │ │ │ ├── lib.es2016.d.ts │ │ │ ├── lib.es2016.full.d.ts │ │ │ ├── lib.es2016.intl.d.ts │ │ │ ├── lib.es2017.arraybuffer.d.ts │ │ │ ├── lib.es2017.d.ts │ │ │ ├── lib.es2017.date.d.ts │ │ │ ├── lib.es2017.full.d.ts │ │ │ ├── lib.es2017.intl.d.ts │ │ │ ├── lib.es2017.object.d.ts │ │ │ ├── lib.es2017.sharedmemory.d.ts │ │ │ ├── lib.es2017.string.d.ts │ │ │ ├── lib.es2017.typedarrays.d.ts │ │ │ ├── lib.es2018.asyncgenerator.d.ts │ │ │ ├── lib.es2018.asynciterable.d.ts │ │ │ ├── lib.es2018.d.ts │ │ │ ├── lib.es2018.full.d.ts │ │ │ ├── lib.es2018.intl.d.ts │ │ │ ├── lib.es2018.promise.d.ts │ │ │ ├── lib.es2018.regexp.d.ts │ │ │ ├── lib.es2019.array.d.ts │ │ │ ├── lib.es2019.d.ts │ │ │ ├── lib.es2019.full.d.ts │ │ │ ├── lib.es2019.intl.d.ts │ │ │ ├── lib.es2019.object.d.ts │ │ │ ├── lib.es2019.string.d.ts │ │ │ ├── lib.es2019.symbol.d.ts │ │ │ ├── lib.es2020.bigint.d.ts │ │ │ ├── lib.es2020.d.ts │ │ │ ├── lib.es2020.date.d.ts │ │ │ ├── lib.es2020.full.d.ts │ │ │ ├── lib.es2020.intl.d.ts │ │ │ ├── lib.es2020.number.d.ts │ │ │ ├── lib.es2020.promise.d.ts │ │ │ ├── lib.es2020.sharedmemory.d.ts │ │ │ ├── lib.es2020.string.d.ts │ │ │ ├── lib.es2020.symbol.wellknown.d.ts │ │ │ ├── lib.es2021.d.ts │ │ │ ├── lib.es2021.full.d.ts │ │ │ ├── lib.es2021.intl.d.ts │ │ │ ├── lib.es2021.promise.d.ts │ │ │ ├── lib.es2021.string.d.ts │ │ │ ├── lib.es2021.weakref.d.ts │ │ │ ├── lib.es2022.array.d.ts │ │ │ ├── lib.es2022.d.ts │ │ │ ├── lib.es2022.error.d.ts │ │ │ ├── lib.es2022.full.d.ts │ │ │ ├── lib.es2022.intl.d.ts │ │ │ ├── lib.es2022.object.d.ts │ │ │ ├── lib.es2022.regexp.d.ts │ │ │ ├── lib.es2022.string.d.ts │ │ │ ├── lib.es2023.array.d.ts │ │ │ ├── lib.es2023.collection.d.ts │ │ │ ├── lib.es2023.d.ts │ │ │ ├── lib.es2023.full.d.ts │ │ │ ├── lib.es2023.intl.d.ts │ │ │ ├── lib.es2024.arraybuffer.d.ts │ │ │ ├── lib.es2024.collection.d.ts │ │ │ ├── lib.es2024.d.ts │ │ │ ├── lib.es2024.full.d.ts │ │ │ ├── lib.es2024.object.d.ts │ │ │ ├── lib.es2024.promise.d.ts │ │ │ ├── lib.es2024.regexp.d.ts │ │ │ ├── lib.es2024.sharedmemory.d.ts │ │ │ ├── lib.es2024.string.d.ts │ │ │ ├── lib.es5.d.ts │ │ │ ├── lib.es6.d.ts │ │ │ ├── lib.esnext.array.d.ts │ │ │ ├── lib.esnext.collection.d.ts │ │ │ ├── lib.esnext.d.ts │ │ │ ├── lib.esnext.decorators.d.ts │ │ │ ├── lib.esnext.disposable.d.ts │ │ │ ├── lib.esnext.float16.d.ts │ │ │ ├── lib.esnext.full.d.ts │ │ │ ├── lib.esnext.intl.d.ts │ │ │ ├── lib.esnext.iterator.d.ts │ │ │ ├── lib.esnext.promise.d.ts │ │ │ ├── lib.scripthost.d.ts │ │ │ ├── lib.webworker.asynciterable.d.ts │ │ │ ├── lib.webworker.d.ts │ │ │ ├── lib.webworker.importscripts.d.ts │ │ │ ├── lib.webworker.iterable.d.ts │ │ │ ├── pl │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── pt-br │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── ru │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── tr │ │ │ │ └── diagnosticMessages.generated.json │ │ │ ├── tsc.js │ │ │ ├── tsserver.js │ │ │ ├── tsserverlibrary.d.ts │ │ │ ├── tsserverlibrary.js │ │ │ ├── typescript.d.ts │ │ │ ├── typescript.js │ │ │ ├── typesMap.json │ │ │ ├── typingsInstaller.js │ │ │ ├── watchGuard.js │ │ │ ├── zh-cn │ │ │ │ └── diagnosticMessages.generated.json │ │ │ └── zh-tw │ │ │ └── diagnosticMessages.generated.json │ │ ├── LICENSE.txt │ │ ├── package.json │ │ ├── README.md │ │ ├── SECURITY.md │ │ └── ThirdPartyNoticeText.txt │ ├── undici-types │ │ ├── agent.d.ts │ │ ├── api.d.ts │ │ ├── balanced-pool.d.ts │ │ ├── cache.d.ts │ │ ├── client.d.ts │ │ ├── connector.d.ts │ │ ├── content-type.d.ts │ │ ├── cookies.d.ts │ │ ├── diagnostics-channel.d.ts │ │ ├── dispatcher.d.ts │ │ ├── env-http-proxy-agent.d.ts │ │ ├── errors.d.ts │ │ ├── eventsource.d.ts │ │ ├── fetch.d.ts │ │ ├── file.d.ts │ │ ├── filereader.d.ts │ │ ├── formdata.d.ts │ │ ├── global-dispatcher.d.ts │ │ ├── global-origin.d.ts │ │ ├── handlers.d.ts │ │ ├── header.d.ts │ │ ├── index.d.ts │ │ ├── interceptors.d.ts │ │ ├── LICENSE │ │ ├── mock-agent.d.ts │ │ ├── mock-client.d.ts │ │ ├── mock-errors.d.ts │ │ ├── mock-interceptor.d.ts │ │ ├── mock-pool.d.ts │ │ ├── package.json │ │ ├── patch.d.ts │ │ ├── pool-stats.d.ts │ │ ├── pool.d.ts │ │ ├── proxy-agent.d.ts │ │ ├── readable.d.ts │ │ ├── README.md │ │ ├── retry-agent.d.ts │ │ ├── retry-handler.d.ts │ │ ├── util.d.ts │ │ ├── webidl.d.ts │ │ └── websocket.d.ts │ ├── unpipe │ │ ├── HISTORY.md │ │ ├── index.js │ │ ├── LICENSE │ │ ├── package.json │ │ └── README.md │ ├── which │ │ ├── bin │ │ │ └── node-which │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── package.json │ │ ├── README.md │ │ └── which.js │ ├── wrap-ansi │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── license │ │ ├── package.json │ │ └── readme.md │ ├── wrap-ansi-cjs │ │ ├── index.js │ │ ├── license │ │ ├── node_modules │ │ │ ├── ansi-regex │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── ansi-styles │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── emoji-regex │ │ │ │ ├── es2015 │ │ │ │ │ ├── index.js │ │ │ │ │ └── text.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── LICENSE-MIT.txt │ │ │ │ ├── package.json │ │ │ │ ├── README.md │ │ │ │ └── text.js │ │ │ ├── string-width │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ └── strip-ansi │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── license │ │ │ ├── package.json │ │ │ └── readme.md │ │ ├── package.json │ │ └── readme.md │ └── zod │ ├── index.cjs │ ├── index.d.cts │ ├── index.d.ts │ ├── index.js │ ├── LICENSE │ ├── package.json │ ├── README.md │ ├── src │ │ ├── index.ts │ │ ├── v3 │ │ │ ├── benchmarks │ │ │ │ ├── datetime.ts │ │ │ │ ├── discriminatedUnion.ts │ │ │ │ ├── index.ts │ │ │ │ ├── ipv4.ts │ │ │ │ ├── object.ts │ │ │ │ ├── primitives.ts │ │ │ │ ├── realworld.ts │ │ │ │ ├── string.ts │ │ │ │ └── union.ts │ │ │ ├── errors.ts │ │ │ ├── external.ts │ │ │ ├── helpers │ │ │ │ ├── enumUtil.ts │ │ │ │ ├── errorUtil.ts │ │ │ │ ├── parseUtil.ts │ │ │ │ ├── partialUtil.ts │ │ │ │ ├── typeAliases.ts │ │ │ │ └── util.ts │ │ │ ├── index.ts │ │ │ ├── locales │ │ │ │ └── en.ts │ │ │ ├── standard-schema.ts │ │ │ ├── tests │ │ │ │ ├── all-errors.test.ts │ │ │ │ ├── anyunknown.test.ts │ │ │ │ ├── array.test.ts │ │ │ │ ├── async-parsing.test.ts │ │ │ │ ├── async-refinements.test.ts │ │ │ │ ├── base.test.ts │ │ │ │ ├── bigint.test.ts │ │ │ │ ├── branded.test.ts │ │ │ │ ├── catch.test.ts │ │ │ │ ├── coerce.test.ts │ │ │ │ ├── complex.test.ts │ │ │ │ ├── custom.test.ts │ │ │ │ ├── date.test.ts │ │ │ │ ├── deepmasking.test.ts │ │ │ │ ├── default.test.ts │ │ │ │ ├── description.test.ts │ │ │ │ ├── discriminated-unions.test.ts │ │ │ │ ├── enum.test.ts │ │ │ │ ├── error.test.ts │ │ │ │ ├── firstparty.test.ts │ │ │ │ ├── firstpartyschematypes.test.ts │ │ │ │ ├── function.test.ts │ │ │ │ ├── generics.test.ts │ │ │ │ ├── instanceof.test.ts │ │ │ │ ├── intersection.test.ts │ │ │ │ ├── language-server.source.ts │ │ │ │ ├── language-server.test.ts │ │ │ │ ├── literal.test.ts │ │ │ │ ├── map.test.ts │ │ │ │ ├── masking.test.ts │ │ │ │ ├── mocker.test.ts │ │ │ │ ├── Mocker.ts │ │ │ │ ├── nan.test.ts │ │ │ │ ├── nativeEnum.test.ts │ │ │ │ ├── nullable.test.ts │ │ │ │ ├── number.test.ts │ │ │ │ ├── object-augmentation.test.ts │ │ │ │ ├── object-in-es5-env.test.ts │ │ │ │ ├── object.test.ts │ │ │ │ ├── optional.test.ts │ │ │ │ ├── parser.test.ts │ │ │ │ ├── parseUtil.test.ts │ │ │ │ ├── partials.test.ts │ │ │ │ ├── pickomit.test.ts │ │ │ │ ├── pipeline.test.ts │ │ │ │ ├── preprocess.test.ts │ │ │ │ ├── primitive.test.ts │ │ │ │ ├── promise.test.ts │ │ │ │ ├── readonly.test.ts │ │ │ │ ├── record.test.ts │ │ │ │ ├── recursive.test.ts │ │ │ │ ├── refine.test.ts │ │ │ │ ├── safeparse.test.ts │ │ │ │ ├── set.test.ts │ │ │ │ ├── standard-schema.test.ts │ │ │ │ ├── string.test.ts │ │ │ │ ├── transformer.test.ts │ │ │ │ ├── tuple.test.ts │ │ │ │ ├── unions.test.ts │ │ │ │ ├── validations.test.ts │ │ │ │ └── void.test.ts │ │ │ ├── types.ts │ │ │ └── ZodError.ts │ │ ├── v4 │ │ │ ├── classic │ │ │ │ ├── checks.ts │ │ │ │ ├── coerce.ts │ │ │ │ ├── compat.ts │ │ │ │ ├── errors.ts │ │ │ │ ├── external.ts │ │ │ │ ├── index.ts │ │ │ │ ├── iso.ts │ │ │ │ ├── parse.ts │ │ │ │ ├── schemas.ts │ │ │ │ └── tests │ │ │ │ ├── anyunknown.test.ts │ │ │ │ ├── array.test.ts │ │ │ │ ├── assignability.test.ts │ │ │ │ ├── async-parsing.test.ts │ │ │ │ ├── async-refinements.test.ts │ │ │ │ ├── base.test.ts │ │ │ │ ├── bigint.test.ts │ │ │ │ ├── brand.test.ts │ │ │ │ ├── catch.test.ts │ │ │ │ ├── coalesce.test.ts │ │ │ │ ├── coerce.test.ts │ │ │ │ ├── continuability.test.ts │ │ │ │ ├── custom.test.ts │ │ │ │ ├── date.test.ts │ │ │ │ ├── datetime.test.ts │ │ │ │ ├── default.test.ts │ │ │ │ ├── description.test.ts │ │ │ │ ├── discriminated-unions.test.ts │ │ │ │ ├── enum.test.ts │ │ │ │ ├── error-utils.test.ts │ │ │ │ ├── error.test.ts │ │ │ │ ├── file.test.ts │ │ │ │ ├── firstparty.test.ts │ │ │ │ ├── function.test.ts │ │ │ │ ├── generics.test.ts │ │ │ │ ├── index.test.ts │ │ │ │ ├── instanceof.test.ts │ │ │ │ ├── intersection.test.ts │ │ │ │ ├── json.test.ts │ │ │ │ ├── lazy.test.ts │ │ │ │ ├── literal.test.ts │ │ │ │ ├── map.test.ts │ │ │ │ ├── nan.test.ts │ │ │ │ ├── nested-refine.test.ts │ │ │ │ ├── nonoptional.test.ts │ │ │ │ ├── nullable.test.ts │ │ │ │ ├── number.test.ts │ │ │ │ ├── object.test.ts │ │ │ │ ├── optional.test.ts │ │ │ │ ├── partial.test.ts │ │ │ │ ├── pickomit.test.ts │ │ │ │ ├── pipe.test.ts │ │ │ │ ├── prefault.test.ts │ │ │ │ ├── preprocess.test.ts │ │ │ │ ├── primitive.test.ts │ │ │ │ ├── promise.test.ts │ │ │ │ ├── prototypes.test.ts │ │ │ │ ├── readonly.test.ts │ │ │ │ ├── record.test.ts │ │ │ │ ├── recursive-types.test.ts │ │ │ │ ├── refine.test.ts │ │ │ │ ├── registries.test.ts │ │ │ │ ├── set.test.ts │ │ │ │ ├── standard-schema.test.ts │ │ │ │ ├── string-formats.test.ts │ │ │ │ ├── string.test.ts │ │ │ │ ├── stringbool.test.ts │ │ │ │ ├── template-literal.test.ts │ │ │ │ ├── to-json-schema.test.ts │ │ │ │ ├── transform.test.ts │ │ │ │ ├── tuple.test.ts │ │ │ │ ├── union.test.ts │ │ │ │ ├── validations.test.ts │ │ │ │ └── void.test.ts │ │ │ ├── core │ │ │ │ ├── api.ts │ │ │ │ ├── checks.ts │ │ │ │ ├── config.ts │ │ │ │ ├── core.ts │ │ │ │ ├── doc.ts │ │ │ │ ├── errors.ts │ │ │ │ ├── function.ts │ │ │ │ ├── index.ts │ │ │ │ ├── json-schema.ts │ │ │ │ ├── parse.ts │ │ │ │ ├── regexes.ts │ │ │ │ ├── registries.ts │ │ │ │ ├── schemas.ts │ │ │ │ ├── standard-schema.ts │ │ │ │ ├── tests │ │ │ │ │ ├── index.test.ts │ │ │ │ │ └── locales │ │ │ │ │ ├── be.test.ts │ │ │ │ │ ├── en.test.ts │ │ │ │ │ ├── ru.test.ts │ │ │ │ │ └── tr.test.ts │ │ │ │ ├── to-json-schema.ts │ │ │ │ ├── util.ts │ │ │ │ ├── versions.ts │ │ │ │ └── zsf.ts │ │ │ ├── index.ts │ │ │ ├── locales │ │ │ │ ├── ar.ts │ │ │ │ ├── az.ts │ │ │ │ ├── be.ts │ │ │ │ ├── ca.ts │ │ │ │ ├── cs.ts │ │ │ │ ├── de.ts │ │ │ │ ├── en.ts │ │ │ │ ├── eo.ts │ │ │ │ ├── es.ts │ │ │ │ ├── fa.ts │ │ │ │ ├── fi.ts │ │ │ │ ├── fr-CA.ts │ │ │ │ ├── fr.ts │ │ │ │ ├── he.ts │ │ │ │ ├── hu.ts │ │ │ │ ├── id.ts │ │ │ │ ├── index.ts │ │ │ │ ├── it.ts │ │ │ │ ├── ja.ts │ │ │ │ ├── kh.ts │ │ │ │ ├── ko.ts │ │ │ │ ├── mk.ts │ │ │ │ ├── ms.ts │ │ │ │ ├── nl.ts │ │ │ │ ├── no.ts │ │ │ │ ├── ota.ts │ │ │ │ ├── pl.ts │ │ │ │ ├── ps.ts │ │ │ │ ├── pt.ts │ │ │ │ ├── ru.ts │ │ │ │ ├── sl.ts │ │ │ │ ├── sv.ts │ │ │ │ ├── ta.ts │ │ │ │ ├── th.ts │ │ │ │ ├── tr.ts │ │ │ │ ├── ua.ts │ │ │ │ ├── ur.ts │ │ │ │ ├── vi.ts │ │ │ │ ├── zh-CN.ts │ │ │ │ └── zh-TW.ts │ │ │ └── mini │ │ │ ├── checks.ts │ │ │ ├── coerce.ts │ │ │ ├── external.ts │ │ │ ├── index.ts │ │ │ ├── iso.ts │ │ │ ├── parse.ts │ │ │ ├── schemas.ts │ │ │ └── tests │ │ │ ├── assignability.test.ts │ │ │ ├── brand.test.ts │ │ │ ├── checks.test.ts │ │ │ ├── computed.test.ts │ │ │ ├── error.test.ts │ │ │ ├── functions.test.ts │ │ │ ├── index.test.ts │ │ │ ├── number.test.ts │ │ │ ├── object.test.ts │ │ │ ├── prototypes.test.ts │ │ │ ├── recursive-types.test.ts │ │ │ └── string.test.ts │ │ └── v4-mini │ │ └── index.ts │ ├── v3 │ │ ├── errors.cjs │ │ ├── errors.d.cts │ │ ├── errors.d.ts │ │ ├── errors.js │ │ ├── external.cjs │ │ ├── external.d.cts │ │ ├── external.d.ts │ │ ├── external.js │ │ ├── helpers │ │ │ ├── enumUtil.cjs │ │ │ ├── enumUtil.d.cts │ │ │ ├── enumUtil.d.ts │ │ │ ├── enumUtil.js │ │ │ ├── errorUtil.cjs │ │ │ ├── errorUtil.d.cts │ │ │ ├── errorUtil.d.ts │ │ │ ├── errorUtil.js │ │ │ ├── parseUtil.cjs │ │ │ ├── parseUtil.d.cts │ │ │ ├── parseUtil.d.ts │ │ │ ├── parseUtil.js │ │ │ ├── partialUtil.cjs │ │ │ ├── partialUtil.d.cts │ │ │ ├── partialUtil.d.ts │ │ │ ├── partialUtil.js │ │ │ ├── typeAliases.cjs │ │ │ ├── typeAliases.d.cts │ │ │ ├── typeAliases.d.ts │ │ │ ├── typeAliases.js │ │ │ ├── util.cjs │ │ │ ├── util.d.cts │ │ │ ├── util.d.ts │ │ │ └── util.js │ │ ├── index.cjs │ │ ├── index.d.cts │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── locales │ │ │ ├── en.cjs │ │ │ ├── en.d.cts │ │ │ ├── en.d.ts │ │ │ └── en.js │ │ ├── standard-schema.cjs │ │ ├── standard-schema.d.cts │ │ ├── standard-schema.d.ts │ │ ├── standard-schema.js │ │ ├── types.cjs │ │ ├── types.d.cts │ │ ├── types.d.ts │ │ ├── types.js │ │ ├── ZodError.cjs │ │ ├── ZodError.d.cts │ │ ├── ZodError.d.ts │ │ └── ZodError.js │ ├── v4 │ │ ├── classic │ │ │ ├── checks.cjs │ │ │ ├── checks.d.cts │ │ │ ├── checks.d.ts │ │ │ ├── checks.js │ │ │ ├── coerce.cjs │ │ │ ├── coerce.d.cts │ │ │ ├── coerce.d.ts │ │ │ ├── coerce.js │ │ │ ├── compat.cjs │ │ │ ├── compat.d.cts │ │ │ ├── compat.d.ts │ │ │ ├── compat.js │ │ │ ├── errors.cjs │ │ │ ├── errors.d.cts │ │ │ ├── errors.d.ts │ │ │ ├── errors.js │ │ │ ├── external.cjs │ │ │ ├── external.d.cts │ │ │ ├── external.d.ts │ │ │ ├── external.js │ │ │ ├── index.cjs │ │ │ ├── index.d.cts │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── iso.cjs │ │ │ ├── iso.d.cts │ │ │ ├── iso.d.ts │ │ │ ├── iso.js │ │ │ ├── parse.cjs │ │ │ ├── parse.d.cts │ │ │ ├── parse.d.ts │ │ │ ├── parse.js │ │ │ ├── schemas.cjs │ │ │ ├── schemas.d.cts │ │ │ ├── schemas.d.ts │ │ │ └── schemas.js │ │ ├── core │ │ │ ├── api.cjs │ │ │ ├── api.d.cts │ │ │ ├── api.d.ts │ │ │ ├── api.js │ │ │ ├── checks.cjs │ │ │ ├── checks.d.cts │ │ │ ├── checks.d.ts │ │ │ ├── checks.js │ │ │ ├── core.cjs │ │ │ ├── core.d.cts │ │ │ ├── core.d.ts │ │ │ ├── core.js │ │ │ ├── doc.cjs │ │ │ ├── doc.d.cts │ │ │ ├── doc.d.ts │ │ │ ├── doc.js │ │ │ ├── errors.cjs │ │ │ ├── errors.d.cts │ │ │ ├── errors.d.ts │ │ │ ├── errors.js │ │ │ ├── function.cjs │ │ │ ├── function.d.cts │ │ │ ├── function.d.ts │ │ │ ├── function.js │ │ │ ├── index.cjs │ │ │ ├── index.d.cts │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── json-schema.cjs │ │ │ ├── json-schema.d.cts │ │ │ ├── json-schema.d.ts │ │ │ ├── json-schema.js │ │ │ ├── parse.cjs │ │ │ ├── parse.d.cts │ │ │ ├── parse.d.ts │ │ │ ├── parse.js │ │ │ ├── regexes.cjs │ │ │ ├── regexes.d.cts │ │ │ ├── regexes.d.ts │ │ │ ├── regexes.js │ │ │ ├── registries.cjs │ │ │ ├── registries.d.cts │ │ │ ├── registries.d.ts │ │ │ ├── registries.js │ │ │ ├── schemas.cjs │ │ │ ├── schemas.d.cts │ │ │ ├── schemas.d.ts │ │ │ ├── schemas.js │ │ │ ├── standard-schema.cjs │ │ │ ├── standard-schema.d.cts │ │ │ ├── standard-schema.d.ts │ │ │ ├── standard-schema.js │ │ │ ├── to-json-schema.cjs │ │ │ ├── to-json-schema.d.cts │ │ │ ├── to-json-schema.d.ts │ │ │ ├── to-json-schema.js │ │ │ ├── util.cjs │ │ │ ├── util.d.cts │ │ │ ├── util.d.ts │ │ │ ├── util.js │ │ │ ├── versions.cjs │ │ │ ├── versions.d.cts │ │ │ ├── versions.d.ts │ │ │ └── versions.js │ │ ├── index.cjs │ │ ├── index.d.cts │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── locales │ │ │ ├── ar.cjs │ │ │ ├── ar.d.cts │ │ │ ├── ar.d.ts │ │ │ ├── ar.js │ │ │ ├── az.cjs │ │ │ ├── az.d.cts │ │ │ ├── az.d.ts │ │ │ ├── az.js │ │ │ ├── be.cjs │ │ │ ├── be.d.cts │ │ │ ├── be.d.ts │ │ │ ├── be.js │ │ │ ├── ca.cjs │ │ │ ├── ca.d.cts │ │ │ ├── ca.d.ts │ │ │ ├── ca.js │ │ │ ├── cs.cjs │ │ │ ├── cs.d.cts │ │ │ ├── cs.d.ts │ │ │ ├── cs.js │ │ │ ├── de.cjs │ │ │ ├── de.d.cts │ │ │ ├── de.d.ts │ │ │ ├── de.js │ │ │ ├── en.cjs │ │ │ ├── en.d.cts │ │ │ ├── en.d.ts │ │ │ ├── en.js │ │ │ ├── eo.cjs │ │ │ ├── eo.d.cts │ │ │ ├── eo.d.ts │ │ │ ├── eo.js │ │ │ ├── es.cjs │ │ │ ├── es.d.cts │ │ │ ├── es.d.ts │ │ │ ├── es.js │ │ │ ├── fa.cjs │ │ │ ├── fa.d.cts │ │ │ ├── fa.d.ts │ │ │ ├── fa.js │ │ │ ├── fi.cjs │ │ │ ├── fi.d.cts │ │ │ ├── fi.d.ts │ │ │ ├── fi.js │ │ │ ├── fr-CA.cjs │ │ │ ├── fr-CA.d.cts │ │ │ ├── fr-CA.d.ts │ │ │ ├── fr-CA.js │ │ │ ├── fr.cjs │ │ │ ├── fr.d.cts │ │ │ ├── fr.d.ts │ │ │ ├── fr.js │ │ │ ├── he.cjs │ │ │ ├── he.d.cts │ │ │ ├── he.d.ts │ │ │ ├── he.js │ │ │ ├── hu.cjs │ │ │ ├── hu.d.cts │ │ │ ├── hu.d.ts │ │ │ ├── hu.js │ │ │ ├── id.cjs │ │ │ ├── id.d.cts │ │ │ ├── id.d.ts │ │ │ ├── id.js │ │ │ ├── index.cjs │ │ │ ├── index.d.cts │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── it.cjs │ │ │ ├── it.d.cts │ │ │ ├── it.d.ts │ │ │ ├── it.js │ │ │ ├── ja.cjs │ │ │ ├── ja.d.cts │ │ │ ├── ja.d.ts │ │ │ ├── ja.js │ │ │ ├── kh.cjs │ │ │ ├── kh.d.cts │ │ │ ├── kh.d.ts │ │ │ ├── kh.js │ │ │ ├── ko.cjs │ │ │ ├── ko.d.cts │ │ │ ├── ko.d.ts │ │ │ ├── ko.js │ │ │ ├── mk.cjs │ │ │ ├── mk.d.cts │ │ │ ├── mk.d.ts │ │ │ ├── mk.js │ │ │ ├── ms.cjs │ │ │ ├── ms.d.cts │ │ │ ├── ms.d.ts │ │ │ ├── ms.js │ │ │ ├── nl.cjs │ │ │ ├── nl.d.cts │ │ │ ├── nl.d.ts │ │ │ ├── nl.js │ │ │ ├── no.cjs │ │ │ ├── no.d.cts │ │ │ ├── no.d.ts │ │ │ ├── no.js │ │ │ ├── ota.cjs │ │ │ ├── ota.d.cts │ │ │ ├── ota.d.ts │ │ │ ├── ota.js │ │ │ ├── pl.cjs │ │ │ ├── pl.d.cts │ │ │ ├── pl.d.ts │ │ │ ├── pl.js │ │ │ ├── ps.cjs │ │ │ ├── ps.d.cts │ │ │ ├── ps.d.ts │ │ │ ├── ps.js │ │ │ ├── pt.cjs │ │ │ ├── pt.d.cts │ │ │ ├── pt.d.ts │ │ │ ├── pt.js │ │ │ ├── ru.cjs │ │ │ ├── ru.d.cts │ │ │ ├── ru.d.ts │ │ │ ├── ru.js │ │ │ ├── sl.cjs │ │ │ ├── sl.d.cts │ │ │ ├── sl.d.ts │ │ │ ├── sl.js │ │ │ ├── sv.cjs │ │ │ ├── sv.d.cts │ │ │ ├── sv.d.ts │ │ │ ├── sv.js │ │ │ ├── ta.cjs │ │ │ ├── ta.d.cts │ │ │ ├── ta.d.ts │ │ │ ├── ta.js │ │ │ ├── th.cjs │ │ │ ├── th.d.cts │ │ │ ├── th.d.ts │ │ │ ├── th.js │ │ │ ├── tr.cjs │ │ │ ├── tr.d.cts │ │ │ ├── tr.d.ts │ │ │ ├── tr.js │ │ │ ├── ua.cjs │ │ │ ├── ua.d.cts │ │ │ ├── ua.d.ts │ │ │ ├── ua.js │ │ │ ├── ur.cjs │ │ │ ├── ur.d.cts │ │ │ ├── ur.d.ts │ │ │ ├── ur.js │ │ │ ├── vi.cjs │ │ │ ├── vi.d.cts │ │ │ ├── vi.d.ts │ │ │ ├── vi.js │ │ │ ├── zh-CN.cjs │ │ │ ├── zh-CN.d.cts │ │ │ ├── zh-CN.d.ts │ │ │ ├── zh-CN.js │ │ │ ├── zh-TW.cjs │ │ │ ├── zh-TW.d.cts │ │ │ ├── zh-TW.d.ts │ │ │ └── zh-TW.js │ │ └── mini │ │ ├── checks.cjs │ │ ├── checks.d.cts │ │ ├── checks.d.ts │ │ ├── checks.js │ │ ├── coerce.cjs │ │ ├── coerce.d.cts │ │ ├── coerce.d.ts │ │ ├── coerce.js │ │ ├── external.cjs │ │ ├── external.d.cts │ │ ├── external.d.ts │ │ ├── external.js │ │ ├── index.cjs │ │ ├── index.d.cts │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── iso.cjs │ │ ├── iso.d.cts │ │ ├── iso.d.ts │ │ ├── iso.js │ │ ├── parse.cjs │ │ ├── parse.d.cts │ │ ├── parse.d.ts │ │ ├── parse.js │ │ ├── schemas.cjs │ │ ├── schemas.d.cts │ │ ├── schemas.d.ts │ │ └── schemas.js │ └── v4-mini │ ├── index.cjs │ ├── index.d.cts │ ├── index.d.ts │ └── index.js ├── package-lock.json ├── package.json ├── README.ko.md ├── README.kr.md ├── README.md ├── src │ ├── agentDownloader.ts │ ├── agentManager.ts │ ├── aiAnalysisService.ts │ ├── analytics.ts │ ├── githubIntegration.ts │ ├── index.ts │ ├── projectAnalyzer.ts │ └── splashCommand.ts ├── start.sh ├── test-CLAUDE.md ├── test-server.js ├── TROUBLESHOOTING.md ├── tsconfig.json └── USER_GUIDE.md ``` # Files -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- ```typescript 1 | #!/usr/bin/env node 2 | 3 | import { Server } from '@modelcontextprotocol/sdk/server/index.js'; 4 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; 5 | import { 6 | CallToolRequestSchema, 7 | ListToolsRequestSchema, 8 | ListResourcesRequestSchema, 9 | ReadResourceRequestSchema, 10 | } from '@modelcontextprotocol/sdk/types.js'; 11 | import { Command } from 'commander'; 12 | import { ProjectAnalyzer } from './projectAnalyzer.js'; 13 | import { AgentManager } from './agentManager.js'; 14 | import { initializeAnalytics, trackEvent, AnalyticsEvents, shutdown as shutdownAnalytics } from './analytics.js'; 15 | import path from 'path'; 16 | import { fileURLToPath } from 'url'; 17 | import { dirname } from 'path'; 18 | import fs from 'fs'; 19 | import os from 'os'; 20 | import dotenv from 'dotenv'; 21 | import { AgentDownloader, DownloadOptions } from './agentDownloader.js'; 22 | import { AIAnalysisService, AIAgentRecommendation } from './aiAnalysisService.js'; 23 | import { executeSplashCommand } from './splashCommand.js'; 24 | 25 | // ES module compatibility 26 | const __filename = fileURLToPath(import.meta.url); 27 | const __dirname = dirname(__filename); 28 | 29 | // Load environment variables from .env file 30 | dotenv.config(); 31 | 32 | // Get version from package.json 33 | const packageJsonPath = path.join(__dirname, '../package.json'); 34 | let version = '1.6.0'; // fallback version 35 | try { 36 | const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); 37 | version = packageJson.version; 38 | } catch (error) { 39 | console.error('[MCP Sub-Agents] Could not read package.json version:', error); 40 | } 41 | 42 | // Check for splash and other special commands first (manual parsing to avoid commander issues) 43 | const hasSplash = process.argv.includes('splash') || process.argv.includes('--splash'); 44 | const hasInstall = process.argv.includes('--install'); 45 | const hasInstallSlashCommands = process.argv.includes('--install-slash-commands'); 46 | const hasUninstallSlashCommands = process.argv.includes('--uninstall-slash-commands'); 47 | const hasAgentDownload = process.argv.includes('--agent-download'); 48 | const hasInstallCC = process.argv.includes('--install-cc'); 49 | 50 | // Parse CLI arguments using commander 51 | const program = new Command() 52 | .name('claude-agents-power') 53 | .version(version) 54 | .option('--transport <stdio>', 'transport type', 'stdio') 55 | .option('--debug', 'enable debug logging') 56 | .option('--install', 'install MCP configuration to Claude Desktop') 57 | .option('--install-cc', 'show claude mcp add command for Claude Code') 58 | .option('--install-slash-commands', 'install slash commands to Claude Code') 59 | .option('--uninstall-slash-commands', 'uninstall slash commands from Claude Code') 60 | .option('--agent-download', 'download recommended agents for current project') 61 | .option('--target-dir <dir>', 'target directory for agent files (default: "./agents")') 62 | .option('--claude-md <path>', 'path to CLAUDE.md file (default: "./CLAUDE.md")') 63 | .option('--format <format>', 'agent file format: md, yaml, json (default: "md")') 64 | .option('--language <lang>', 'preferred language: en, ko, ja, zh (default: "en")') 65 | .option('--limit <n>', 'maximum number of agents to download (default: 10)') 66 | .option('--dry-run', 'preview recommendations without downloading') 67 | .option('--overwrite', 'overwrite existing agent files') 68 | .allowUnknownOption(); // let MCP Inspector / other wrappers pass through extra flags 69 | 70 | // Add splash command (only if not already handled by early exit) 71 | if (!hasSplash) { 72 | program 73 | .command('splash') 74 | .description('Quick setup: analyze project and recommend agents') 75 | .action(async () => { 76 | try { 77 | await initializeAnalytics(); 78 | trackEvent(AnalyticsEvents.TOOL_CALLED, { tool_name: 'splash', version }); 79 | 80 | const result = await executeSplashCommand(); 81 | 82 | if (!result.success) { 83 | console.error('❌ Splash command failed:', result.error || result.message); 84 | process.exit(1); 85 | } 86 | 87 | await shutdownAnalytics(); 88 | process.exit(0); 89 | } catch (error) { 90 | console.error('❌ Splash command error:', error); 91 | process.exit(1); 92 | } 93 | }); 94 | } 95 | 96 | // Handle splash command early before parsing 97 | if (hasSplash) { 98 | // Skip to splash command execution 99 | (async () => { 100 | try { 101 | await initializeAnalytics(); 102 | trackEvent(AnalyticsEvents.TOOL_CALLED, { tool_name: 'splash', version }); 103 | 104 | const result = await executeSplashCommand(); 105 | 106 | if (!result.success) { 107 | console.error('❌ Splash command failed:', result.error || result.message); 108 | process.exit(1); 109 | } 110 | 111 | await shutdownAnalytics(); 112 | process.exit(0); 113 | } catch (error) { 114 | console.error('❌ Splash command error:', error); 115 | process.exit(1); 116 | } 117 | })(); 118 | } 119 | 120 | // Early exit for install to avoid commander parsing issues 121 | if (hasInstall) { 122 | console.log('🚀 Claude Agents Power MCP Installer\n'); 123 | 124 | // Get Claude Desktop config path 125 | const configPaths = [ 126 | path.join(os.homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json'), 127 | path.join(os.homedir(), '.config', 'claude', 'claude_desktop_config.json'), 128 | path.join(os.homedir(), 'AppData', 'Roaming', 'Claude', 'claude_desktop_config.json') 129 | ]; 130 | 131 | let configPath = null; 132 | for (const p of configPaths) { 133 | if (fs.existsSync(p)) { 134 | configPath = p; 135 | break; 136 | } 137 | } 138 | 139 | if (!configPath) { 140 | // Try to find Claude config directory 141 | const configDirs = [ 142 | path.join(os.homedir(), 'Library', 'Application Support', 'Claude'), 143 | path.join(os.homedir(), '.config', 'claude'), 144 | path.join(os.homedir(), 'AppData', 'Roaming', 'Claude') 145 | ]; 146 | 147 | for (const dir of configDirs) { 148 | if (fs.existsSync(dir)) { 149 | configPath = path.join(dir, 'claude_desktop_config.json'); 150 | break; 151 | } 152 | } 153 | } 154 | 155 | if (!configPath) { 156 | console.error('❌ Could not find Claude Desktop configuration directory'); 157 | console.log('\nPlease create the config file manually at one of these locations:'); 158 | configPaths.forEach(p => console.log(` - ${p}`)); 159 | process.exit(1); 160 | } 161 | 162 | console.log(`📁 Found Claude config at: ${configPath}`); 163 | 164 | // Read existing config or create new one 165 | let config: any = { mcpServers: {} }; 166 | if (fs.existsSync(configPath)) { 167 | try { 168 | const content = fs.readFileSync(configPath, 'utf8'); 169 | config = JSON.parse(content); 170 | if (!config.mcpServers) { 171 | config.mcpServers = {}; 172 | } 173 | } catch (error) { 174 | console.error('⚠️ Error reading existing config, will create new one'); 175 | } 176 | } 177 | 178 | // Check if already installed 179 | if (config.mcpServers['claude-agents-power']) { 180 | console.log('✅ claude-agents-power is already configured in Claude Desktop'); 181 | console.log('\nTo update, remove the existing entry and run this installer again.'); 182 | process.exit(0); 183 | } 184 | 185 | // Add claude-agents-power to config 186 | config.mcpServers['claude-agents-power'] = { 187 | command: 'npx', 188 | args: ['claude-agents-power'] 189 | }; 190 | 191 | // Write config 192 | try { 193 | // Create directory if it doesn't exist 194 | const dir = path.dirname(configPath); 195 | if (!fs.existsSync(dir)) { 196 | fs.mkdirSync(dir, { recursive: true }); 197 | } 198 | 199 | fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); 200 | console.log('✅ Successfully added claude-agents-power to Claude Desktop configuration'); 201 | 202 | console.log('\n📝 Next steps:'); 203 | console.log('1. Restart Claude Desktop'); 204 | console.log('2. Look for MCP tools starting with "mcp__claude-agents-power__"'); 205 | console.log('\n🎯 Example usage in Claude:'); 206 | console.log(' "claude-agents-power를 이용해서 이 프로젝트를 위한 추천 및 agents/*.md 파일을 다운로드 해줘"'); 207 | 208 | } catch (error: any) { 209 | console.error('❌ Error writing configuration:', error.message); 210 | console.log('\nPlease add this to your claude_desktop_config.json manually:'); 211 | console.log(JSON.stringify({ 212 | mcpServers: { 213 | 'claude-agents-power': { 214 | command: 'npx', 215 | args: ['claude-agents-power'] 216 | } 217 | } 218 | }, null, 2)); 219 | process.exit(1); 220 | } 221 | 222 | process.exit(0); 223 | } 224 | 225 | // Early exit for install-cc to avoid commander parsing issues 226 | if (hasInstallCC) { 227 | (async () => { 228 | console.log('🚀 Claude Agents Power - Claude Code MCP Installation\n'); 229 | 230 | // Check if globally installed via npm 231 | let isGloballyInstalled = false; 232 | 233 | try { 234 | const { execSync } = await import('child_process'); 235 | execSync('npm list -g claude-agents-power', { stdio: 'pipe' }); 236 | isGloballyInstalled = true; 237 | } catch { 238 | // Not globally installed 239 | } 240 | 241 | console.log('📋 Copy and paste one of these commands into Claude Code:\n'); 242 | 243 | if (isGloballyInstalled) { 244 | console.log(' Option 1 (Recommended - NPM global package):'); 245 | console.log(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); 246 | console.log(' claude mcp add claude-agents-power'); 247 | console.log(''); 248 | } 249 | 250 | // Get the current user's home directory and construct the path 251 | const currentDir = process.cwd(); 252 | const homeDir = os.homedir(); 253 | const username = path.basename(homeDir); 254 | 255 | // Determine the actual path to this MCP server 256 | let serverPath: string; 257 | 258 | // Check if we're running from the source directory (development) 259 | if (currentDir.includes('claude-agents-power-mcp-server')) { 260 | serverPath = currentDir; 261 | } else { 262 | // Default to the expected installation location 263 | serverPath = path.join(homeDir, 'Claude', 'claude-agents-power', 'claude-agents-power-mcp-server'); 264 | } 265 | 266 | console.log(' Option 2 (Local file path):'); 267 | console.log(' ━━━━━━━━━━━━━━━━━━━━━━━━━'); 268 | console.log(` claude mcp add file://${serverPath}`); 269 | console.log(''); 270 | 271 | console.log('📍 Installation Details:'); 272 | if (isGloballyInstalled) { 273 | console.log(' ✅ Package is globally installed via NPM'); 274 | } 275 | console.log(` 📁 Local Path: ${serverPath}`); 276 | console.log(` 👤 User: ${username}`); 277 | console.log(''); 278 | 279 | console.log('💡 Usage Tips:'); 280 | console.log(' • Use Option 1 if you installed via npm install -g'); 281 | console.log(' • Use Option 2 if you cloned the repository locally'); 282 | console.log(' • The MCP server will be available immediately after adding'); 283 | console.log(''); 284 | console.log('📝 Next steps after running the command:'); 285 | console.log(' 1. Claude Code will recognize the MCP server'); 286 | console.log(' 2. Use tools like "analyze-project" and "agents" in your conversations'); 287 | console.log(' 3. Get agent recommendations and download them to your projects'); 288 | 289 | process.exit(0); 290 | })(); 291 | } 292 | 293 | program.parse(process.argv); 294 | 295 | const cliOptions = program.opts<{ 296 | transport: string; 297 | debug?: boolean; 298 | install?: boolean; 299 | installCc?: boolean; 300 | installSlashCommands?: boolean; 301 | uninstallSlashCommands?: boolean; 302 | agentDownload?: boolean; 303 | targetDir?: string; 304 | claudeMd?: string; 305 | format?: string; 306 | language?: string; 307 | limit?: string; 308 | dryRun?: boolean; 309 | overwrite?: boolean; 310 | }>(); 311 | 312 | 313 | // Override with manual parsing results 314 | if (hasInstallSlashCommands) { 315 | cliOptions.installSlashCommands = true; 316 | } 317 | if (hasUninstallSlashCommands) { 318 | cliOptions.uninstallSlashCommands = true; 319 | } 320 | if (hasAgentDownload) { 321 | cliOptions.agentDownload = true; 322 | } 323 | if (hasInstallCC) { 324 | cliOptions.installCc = true; 325 | } 326 | 327 | 328 | 329 | // Handle --install-slash-commands flag 330 | if (cliOptions.installSlashCommands) { 331 | console.log('🚀 Claude Agents Power - Slash Commands Installer\n'); 332 | 333 | try { 334 | const claudeDir = path.join(os.homedir(), '.claude'); 335 | const commandsDir = path.join(claudeDir, 'commands'); 336 | const sourceDir = path.join(__dirname, '../claude-slash-commands'); 337 | 338 | // Create directories if they don't exist 339 | if (!fs.existsSync(claudeDir)) { 340 | fs.mkdirSync(claudeDir, { recursive: true }); 341 | console.log(`📁 Created: ${claudeDir}`); 342 | } 343 | 344 | if (!fs.existsSync(commandsDir)) { 345 | fs.mkdirSync(commandsDir, { recursive: true }); 346 | console.log(`📁 Created: ${commandsDir}`); 347 | } 348 | 349 | // Copy command files 350 | console.log('📋 Installing slash commands...'); 351 | const commandFiles = fs.readdirSync(sourceDir); 352 | 353 | for (const file of commandFiles) { 354 | if (file.endsWith('.md')) { 355 | const sourcePath = path.join(sourceDir, file); 356 | const targetPath = path.join(commandsDir, file); 357 | 358 | fs.copyFileSync(sourcePath, targetPath); 359 | console.log(` ✅ Installed: ${file}`); 360 | } 361 | } 362 | 363 | // Create README 364 | const readmeContent = `# Claude Agents Power - Slash Commands 365 | 366 | Available commands: 367 | - /agents:load - Load and display available agents 368 | - /agents:search - Search agents by skills or keywords 369 | - /agents:suggest - Get intelligent agent recommendations 370 | - /agents:version - Check system version and status 371 | 372 | Generated by claude-agents-power v${version} 373 | `; 374 | 375 | fs.writeFileSync(path.join(commandsDir, 'README.md'), readmeContent); 376 | 377 | console.log('\n✅ Slash commands installed successfully!'); 378 | console.log('\nAvailable commands in Claude Code:'); 379 | console.log(' /agents:load - Load and display available agents'); 380 | console.log(' /agents:search - Search agents by skills or keywords'); 381 | console.log(' /agents:suggest - Get intelligent agent recommendations'); 382 | console.log(' /agents:version - Check system version and status'); 383 | console.log('\n💡 Try "/agents:load" in Claude Code to get started!'); 384 | 385 | } catch (error) { 386 | console.error('❌ Installation failed:', error); 387 | process.exit(1); 388 | } 389 | 390 | process.exit(0); 391 | } 392 | 393 | // Handle --uninstall-slash-commands flag 394 | if (cliOptions.uninstallSlashCommands) { 395 | console.log('🗑️ Uninstalling claude-agents-power slash commands...\n'); 396 | 397 | try { 398 | const commandsDir = path.join(os.homedir(), '.claude', 'commands'); 399 | 400 | if (fs.existsSync(commandsDir)) { 401 | const files = fs.readdirSync(commandsDir); 402 | const agentCommandFiles = files.filter(file => file.startsWith('agents-') && file.endsWith('.md')); 403 | 404 | for (const file of agentCommandFiles) { 405 | const filePath = path.join(commandsDir, file); 406 | fs.unlinkSync(filePath); 407 | console.log(` 🗑️ Removed: ${file}`); 408 | } 409 | 410 | // Remove README if it exists 411 | const readmePath = path.join(commandsDir, 'README.md'); 412 | if (fs.existsSync(readmePath)) { 413 | fs.unlinkSync(readmePath); 414 | console.log(' 🗑️ Removed: README.md'); 415 | } 416 | 417 | console.log('\n✅ Slash commands uninstalled successfully!'); 418 | } else { 419 | console.log('No slash commands found to uninstall.'); 420 | } 421 | } catch (error) { 422 | console.error('❌ Uninstallation failed:', error); 423 | process.exit(1); 424 | } 425 | 426 | process.exit(0); 427 | } 428 | 429 | // Handle --agent-download flag 430 | if (cliOptions.agentDownload) { 431 | console.log('🤖 Claude Agents Power - Agent Downloader\n'); 432 | 433 | try { 434 | const downloader = new AgentDownloader(); 435 | 436 | const options: DownloadOptions = { 437 | targetDir: cliOptions.targetDir || './agents', 438 | claudeMdPath: cliOptions.claudeMd || './CLAUDE.md', 439 | format: (cliOptions.format as 'md' | 'yaml' | 'json') || 'md', 440 | language: (cliOptions.language as 'en' | 'ko' | 'ja' | 'zh') || 'en', 441 | limit: cliOptions.limit ? parseInt(cliOptions.limit) : 10, 442 | dryRun: cliOptions.dryRun || false, 443 | overwrite: cliOptions.overwrite || false 444 | }; 445 | 446 | console.log('🔍 Analyzing project...'); 447 | const result = await downloader.downloadAgents(options); 448 | 449 | // Display enhanced AI analysis results 450 | console.log('\n🧠 AI-Powered Project Analysis Results:'); 451 | console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); 452 | console.log(`📊 Project Type: ${result.analysis.projectType}`); 453 | console.log(`🛠️ Technologies: ${result.analysis.technologies.join(', ') || 'None detected'}`); 454 | console.log(`📚 Frameworks: ${result.analysis.frameworks.join(', ') || 'None detected'}`); 455 | console.log(`📈 Complexity: ${result.analysis.complexity}/10`); 456 | console.log(`🚀 Development Phase: ${result.analysis.phase}`); 457 | console.log(`👥 Recommended Team Size: ${result.analysis.teamSize} agents`); 458 | 459 | if (result.analysis.description) { 460 | console.log(`📝 Description: ${result.analysis.description}`); 461 | } 462 | 463 | // Display quality indicators 464 | if (result.analysis.qualityIndicators) { 465 | console.log('\n📋 Quality Assessment:'); 466 | const qi = result.analysis.qualityIndicators; 467 | console.log(` ${qi.hasTests ? '✅' : '❌'} Automated Testing`); 468 | console.log(` ${qi.hasDocumentation ? '✅' : '❌'} Documentation`); 469 | console.log(` ${qi.hasCI ? '✅' : '✅'} CI/CD Pipeline`); 470 | console.log(` ${qi.hasLinting ? '✅' : '❌'} Code Quality Tools`); 471 | console.log(` 📊 Code Complexity: ${qi.codeComplexity}`); 472 | } 473 | 474 | // Display architectural patterns if available 475 | if (result.analysis.architecturalPatterns && result.analysis.architecturalPatterns.length > 0) { 476 | console.log(`\n🏗️ Architectural Patterns: ${result.analysis.architecturalPatterns.join(', ')}`); 477 | } 478 | 479 | // Display development practices if available 480 | if (result.analysis.developmentPractices && result.analysis.developmentPractices.length > 0) { 481 | console.log(`\n⚙️ Development Practices: ${result.analysis.developmentPractices.join(', ')}`); 482 | } 483 | 484 | console.log('\n🏆 AI-Generated Recommendations:'); 485 | console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); 486 | 487 | result.recommendations.forEach((rec, index) => { 488 | const icon = rec.priority === 'essential' ? '⭐' : 489 | rec.priority === 'recommended' ? '🔧' : '💡'; 490 | console.log(`${index + 1}. ${icon} ${rec.name} (${rec.relevanceScore}% match)`); 491 | console.log(` └─ ${rec.reasoning}`); 492 | 493 | // Display specific tasks if available 494 | if (rec.specificTasks && rec.specificTasks.length > 0) { 495 | console.log(` 🎯 Key Tasks: ${rec.specificTasks.slice(0, 2).join(', ')}${rec.specificTasks.length > 2 ? '...' : ''}`); 496 | } 497 | 498 | // Display integration points if available 499 | if (rec.integrationPoints && rec.integrationPoints.length > 0) { 500 | console.log(` 🔗 Integrations: ${rec.integrationPoints.slice(0, 2).join(', ')}${rec.integrationPoints.length > 2 ? '...' : ''}`); 501 | } 502 | }); 503 | 504 | if (options.dryRun) { 505 | console.log('\n💡 This was an AI-powered dry run analysis. Use without --dry-run to download agents.'); 506 | console.log('\n🧠 AI Analysis Features Used:'); 507 | console.log(' • Intelligent project structure analysis'); 508 | console.log(' • Context-aware agent recommendations'); 509 | console.log(' • Dynamic priority assignment'); 510 | console.log(' • Task-specific role matching'); 511 | } else if (result.downloaded && result.downloaded.length > 0) { 512 | console.log('\n📥 Downloaded AI-Recommended Agents:'); 513 | console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); 514 | result.downloaded.forEach(filePath => { 515 | const fileName = path.basename(filePath); 516 | const fileSize = fs.statSync(filePath).size; 517 | const fileSizeKB = (fileSize / 1024).toFixed(1); 518 | console.log(`✅ ${fileName.padEnd(25)} (${fileSizeKB}KB)`); 519 | }); 520 | 521 | console.log('\n📊 AI-Powered Summary:'); 522 | console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); 523 | console.log(`✅ ${result.downloaded.length} agents intelligently selected and downloaded`); 524 | console.log(`📁 Files saved to: ${options.targetDir}`); 525 | console.log(`📋 Enhanced README.md created with AI analysis insights`); 526 | console.log(`🧠 AI Features: Dynamic analysis, context-aware recommendations, smart prioritization`); 527 | console.log(`💡 Next: Try using your AI-recommended agents in your development workflow`); 528 | } 529 | 530 | } catch (error) { 531 | console.error('❌ Agent download failed:', error); 532 | process.exit(1); 533 | } 534 | 535 | process.exit(0); 536 | } 537 | 538 | // Debug logging function 539 | const debug = (...args: any[]) => { 540 | if (cliOptions.debug) { 541 | console.error('[MCP Sub-Agents DEBUG]', ...args); 542 | } 543 | }; 544 | 545 | // Validate transport option 546 | const allowedTransports = ['stdio']; 547 | if (!allowedTransports.includes(cliOptions.transport)) { 548 | console.error( 549 | `Invalid --transport value: '${cliOptions.transport}'. Must be: stdio.` 550 | ); 551 | process.exit(1); 552 | } 553 | 554 | // Transport configuration 555 | const TRANSPORT_TYPE = 'stdio'; 556 | 557 | // Function to create a new server instance with all tools registered 558 | function createServerInstance() { 559 | const server = new Server( 560 | { 561 | name: 'claude-agents-power-mcp-server', 562 | version: version, 563 | }, 564 | { 565 | capabilities: { 566 | tools: {}, 567 | resources: {}, 568 | }, 569 | } 570 | ); 571 | 572 | return server; 573 | } 574 | 575 | // Initialize analytics 576 | initializeAnalytics(); 577 | trackEvent(AnalyticsEvents.SERVER_STARTED, { 578 | debug_mode: cliOptions.debug, 579 | transport: cliOptions.transport, 580 | }); 581 | 582 | // Initialize managers 583 | // Support both development and production paths 584 | const isDevelopment = process.env.NODE_ENV === 'development'; 585 | 586 | // Try multiple possible agent paths 587 | let agentsPath: string; 588 | const possiblePaths = [ 589 | // Development path 590 | path.join(__dirname, '../../claude/agents'), 591 | // Production NPM global install 592 | path.join(__dirname, '../claude/agents'), 593 | // Alternative production path 594 | path.resolve(process.cwd(), 'claude/agents'), 595 | // NPM package structure 596 | path.join(__dirname, '..', '..', 'claude', 'agents'), 597 | ]; 598 | 599 | // Find the first existing path 600 | agentsPath = possiblePaths.find(p => { 601 | const exists = existsSync(p); 602 | if (cliOptions.debug) { 603 | console.error(`[MCP Sub-Agents DEBUG] Checking path: ${p} - ${exists ? 'EXISTS' : 'NOT FOUND'}`); 604 | } 605 | return exists; 606 | }) || possiblePaths[0]; 607 | 608 | debug(`Current working directory: ${process.cwd()}`); 609 | debug(`__dirname: ${__dirname}`); 610 | debug(`Loading agents from: ${agentsPath}`); 611 | 612 | // Check if agents directory exists 613 | import { existsSync } from 'fs'; 614 | if (cliOptions.debug && existsSync(agentsPath)) { 615 | debug(`Agents directory exists: ${agentsPath}`); 616 | const { readdirSync } = await import('fs'); 617 | const files = readdirSync(agentsPath); 618 | debug(`Found ${files.length} files in agents directory`); 619 | } else if (cliOptions.debug) { 620 | debug(`ERROR: Agents directory not found: ${agentsPath}`); 621 | } 622 | 623 | const projectAnalyzer = new ProjectAnalyzer(); 624 | const agentManager = new AgentManager(agentsPath, { 625 | owner: 'baryonlabs', 626 | repo: 'claude-sub-agent-contents', 627 | branch: 'main', 628 | path: 'claude/agents' 629 | }, cliOptions.debug || false); 630 | const aiAnalysisService = new AIAnalysisService(); 631 | 632 | // Function to setup tools for a server instance 633 | function setupTools(server: Server, projectAnalyzer: ProjectAnalyzer, agentManager: AgentManager, aiAnalysisService: AIAnalysisService) { 634 | 635 | // Define resources 636 | server.setRequestHandler(ListResourcesRequestSchema, async () => { 637 | return { 638 | resources: [ 639 | { 640 | uri: 'mcp://claude-agents-power/how-it-works', 641 | name: 'MCP 동작 원리', 642 | description: 'Claude Agents Power MCP 서버의 동작 원리와 구조 설명', 643 | mimeType: 'text/markdown', 644 | }, 645 | { 646 | uri: 'mcp://claude-agents-power/tool-guide', 647 | name: '도구 사용 가이드', 648 | description: '통합된 3개 도구의 사용 방법과 예제', 649 | mimeType: 'text/markdown', 650 | }, 651 | { 652 | uri: 'mcp://claude-agents-power/agent-structure', 653 | name: '에이전트 구조', 654 | description: '에이전트 파일 구조와 다국어 지원 설명', 655 | mimeType: 'text/markdown', 656 | }, 657 | { 658 | uri: 'mcp://claude-agents-power/claude-flow-agents', 659 | name: 'Claude-Flow Agent System', 660 | description: 'Advanced 64-agent system overview with swarm patterns and coordination strategies', 661 | mimeType: 'text/markdown', 662 | }, 663 | { 664 | uri: 'mcp://claude-agents-power/agent-swarm-patterns', 665 | name: 'Agent Swarm Patterns', 666 | description: 'Recommended agent swarm deployment patterns for different use cases', 667 | mimeType: 'text/markdown', 668 | }, 669 | ], 670 | }; 671 | }); 672 | 673 | server.setRequestHandler(ReadResourceRequestSchema, async (request) => { 674 | const { uri } = request.params; 675 | 676 | switch (uri) { 677 | case 'mcp://claude-agents-power/how-it-works': 678 | return { 679 | contents: [ 680 | { 681 | uri, 682 | mimeType: 'text/markdown', 683 | text: `# Claude Agents Power MCP 서버 동작 원리 684 | 685 | ## 개요 686 | Claude Agents Power는 Model Context Protocol(MCP)을 사용하여 100개 이상의 전문 에이전트를 Claude에서 사용할 수 있게 해주는 서버입니다. 687 | 688 | ## MCP (Model Context Protocol) 란? 689 | MCP는 Claude와 같은 LLM이 외부 도구와 리소스에 접근할 수 있게 해주는 표준 프로토콜입니다. 690 | 691 | ### 주요 구성 요소: 692 | 1. **Tools (도구)**: Claude가 실행할 수 있는 함수들 693 | 2. **Resources (리소스)**: Claude가 읽을 수 있는 문서나 데이터 694 | 3. **Prompts (프롬프트)**: 미리 정의된 프롬프트 템플릿 695 | 696 | ## 서버 아키텍처 697 | 698 | ### 1. 에이전트 매니저 (AgentManager) 699 | - 에이전트 파일 로딩 및 캐싱 700 | - 다국어 지원 (en, ko, ja, zh) 701 | - GitHub에서 에이전트 동적 로딩 702 | 703 | ### 2. 프로젝트 분석기 (ProjectAnalyzer) 704 | - 프로젝트 구조 분석 705 | - 적합한 에이전트 추천 706 | - 키워드 기반 매칭 707 | 708 | ### 3. 통합 도구 시스템 709 | 기존 8개 도구를 3개로 통합: 710 | - \`analyze-project\`: 프로젝트 분석 711 | - \`agents\`: 에이전트 검색/목록/상세/추천 712 | - \`manage-agents\`: 설치/통계/새로고침 713 | 714 | ## 데이터 흐름 715 | 716 | \`\`\` 717 | Claude Desktop → MCP Protocol → Agent Manager → Local Files 718 | ↓ 719 | GitHub Repository (fallback) 720 | \`\`\` 721 | 722 | ## 에이전트 로딩 과정 723 | 724 | 1. **시작시**: \`claude/agents/{언어}/\` 디렉토리에서 에이전트 로드 725 | 2. **요청시**: 캐시에서 빠른 검색 726 | 3. **미발견시**: GitHub에서 동적 다운로드 727 | 4. **설치**: 프로젝트 디렉토리에 에이전트 파일 복사 728 | 729 | ## 성능 최적화 730 | 731 | - 메모리 캐싱으로 빠른 응답 732 | - YAML frontmatter 파싱으로 메타데이터 추출 733 | - 언어별 키 매핑으로 효율적인 검색 734 | `, 735 | }, 736 | ], 737 | }; 738 | 739 | case 'mcp://claude-agents-power/tool-guide': 740 | return { 741 | contents: [ 742 | { 743 | uri, 744 | mimeType: 'text/markdown', 745 | text: `# 도구 사용 가이드 746 | 747 | ## 통합된 3개 도구 사용법 748 | 749 | ### 1. analyze-project 750 | 프로젝트 디렉토리를 분석하여 적합한 에이전트를 추천합니다. 751 | 752 | **사용법:** 753 | \`\`\`json 754 | { 755 | "tool": "analyze-project", 756 | "arguments": { 757 | "projectPath": "/path/to/project" 758 | } 759 | } 760 | \`\`\` 761 | 762 | ### 2. agents 763 | 에이전트 관련 모든 작업을 처리하는 통합 도구입니다. 764 | 765 | #### 2.1 검색 (search) 766 | \`\`\`json 767 | { 768 | "tool": "agents", 769 | "arguments": { 770 | "action": "search", 771 | "query": "frontend", 772 | "language": "en" 773 | } 774 | } 775 | \`\`\` 776 | 777 | #### 2.2 목록 조회 (list) 778 | \`\`\`json 779 | { 780 | "tool": "agents", 781 | "arguments": { 782 | "action": "list", 783 | "language": "ko", 784 | "category": "development" 785 | } 786 | } 787 | \`\`\` 788 | 789 | #### 2.3 상세 정보 (details) 790 | \`\`\`json 791 | { 792 | "tool": "agents", 793 | "arguments": { 794 | "action": "details", 795 | "query": "frontend-developer", 796 | "language": "en" 797 | } 798 | } 799 | \`\`\` 800 | 801 | #### 2.4 추천 (recommend) 802 | \`\`\`json 803 | { 804 | "tool": "agents", 805 | "arguments": { 806 | "action": "recommend", 807 | "keywords": ["react", "typescript", "ui"] 808 | } 809 | } 810 | \`\`\` 811 | 812 | #### 2.5 검색 (자동 Issue 생성) 813 | \`\`\`json 814 | { 815 | "tool": "agents", 816 | "arguments": { 817 | "action": "search", 818 | "query": "blockchain-architect", 819 | "language": "en", 820 | "autoCreateIssue": true, 821 | "issueBody": "We need a blockchain architect for smart contract development" 822 | } 823 | } 824 | \`\`\` 825 | 826 | #### 2.6 요청 (request) 827 | \`\`\`json 828 | { 829 | "tool": "agents", 830 | "arguments": { 831 | "action": "request", 832 | "query": "ai-ethics-officer", 833 | "language": "en", 834 | "issueBody": "Need an AI ethics specialist for responsible AI development" 835 | } 836 | } 837 | \`\`\` 838 | 839 | ### 3. manage-agents 840 | 에이전트 관리 작업을 처리합니다. 841 | 842 | #### 3.1 설치 (install) 843 | \`\`\`json 844 | { 845 | "tool": "manage-agents", 846 | "arguments": { 847 | "action": "install", 848 | "agentNames": ["frontend-developer", "backend-engineer"], 849 | "targetPath": "/path/to/project", 850 | "language": "en" 851 | } 852 | } 853 | \`\`\` 854 | 855 | #### 3.2 통계 (stats) 856 | \`\`\`json 857 | { 858 | "tool": "manage-agents", 859 | "arguments": { 860 | "action": "stats", 861 | "limit": 10 862 | } 863 | } 864 | \`\`\` 865 | 866 | #### 3.3 새로고침 (refresh) 867 | \`\`\`json 868 | { 869 | "tool": "manage-agents", 870 | "arguments": { 871 | "action": "refresh" 872 | } 873 | } 874 | \`\`\` 875 | 876 | ## 언어 지원 877 | - \`en\`: English 878 | - \`ko\`: 한국어 879 | - \`ja\`: 日本語 880 | - \`zh\`: 中文 881 | 882 | ## 카테고리 883 | - development, data, design, management 884 | - marketing, operations, hr, finance 885 | - legal, research, healthcare, education 886 | - media, manufacturing, other 887 | `, 888 | }, 889 | ], 890 | }; 891 | 892 | case 'mcp://claude-agents-power/agent-structure': 893 | return { 894 | contents: [ 895 | { 896 | uri, 897 | mimeType: 'text/markdown', 898 | text: `# 에이전트 구조 899 | 900 | ## 파일 구조 901 | \`\`\` 902 | claude/agents/ 903 | ├── en/ # 영어 에이전트 904 | │ ├── frontend-developer.md 905 | │ ├── backend-engineer.md 906 | │ └── ... 907 | ├── ko/ # 한국어 에이전트 908 | │ ├── frontend-developer.md 909 | │ ├── backend-engineer.md 910 | │ └── ... 911 | ├── ja/ # 일본어 에이전트 912 | └── zh/ # 중국어 에이전트 913 | \`\`\` 914 | 915 | ## 에이전트 파일 형식 916 | 917 | 각 에이전트 파일은 YAML frontmatter와 Markdown 콘텐츠로 구성됩니다: 918 | 919 | \`\`\`markdown 920 | --- 921 | name: frontend-developer 922 | description: UI/UX implementation specialist with React, Vue, and modern web technologies expertise. 923 | tools: Read, Write, Edit, MultiEdit, Bash, WebSearch 924 | --- 925 | 926 | You are a frontend engineer specializing in modern web applications. 927 | 928 | Focus areas: 929 | - Build responsive and accessible interfaces 930 | - Implement state management solutions 931 | - Optimize performance and bundle sizes 932 | - Ensure cross-browser compatibility 933 | - Write maintainable component architectures 934 | 935 | Key practices: 936 | - Follow semantic HTML standards 937 | - Implement WCAG accessibility guidelines 938 | - Use modern CSS features (Grid, Flexbox) 939 | - Optimize for Core Web Vitals 940 | - Write comprehensive tests 941 | \`\`\` 942 | 943 | ## 메타데이터 필드 944 | 945 | ### name (필수) 946 | 에이전트의 고유 식별자입니다. 파일명과 일치해야 합니다. 947 | 948 | ### description (필수) 949 | 에이전트의 역할과 전문성을 설명합니다. 검색에 사용됩니다. 950 | 951 | ### tools (필수) 952 | 에이전트가 사용할 수 있는 도구 목록입니다. 953 | 954 | **사용 가능한 도구:** 955 | - Read, Write, Edit, MultiEdit 956 | - Bash, Grep, Glob 957 | - WebSearch, WebFetch 958 | - TodoWrite, Task 959 | - NotebookRead, NotebookEdit 960 | 961 | ## 다국어 지원 962 | 963 | ### 언어별 키 매핑 964 | - 영어: \`agent-name\` 965 | - 기타 언어: \`agent-name-{언어코드}\` 966 | 967 | 예: 968 | - \`frontend-developer\` (영어) 969 | - \`frontend-developer-ko\` (한국어) 970 | - \`frontend-developer-ja\` (일본어) 971 | 972 | ### 언어 감지 973 | 1. 요청된 언어에 따른 에이전트 검색 974 | 2. 해당 언어가 없으면 영어 버전 사용 975 | 3. 모두 없으면 GitHub에서 다운로드 시도 976 | 977 | ## 에이전트 품질 기준 978 | 979 | ### 필수 요소 980 | 1. 명확한 역할 정의 981 | 2. 구체적인 책임 범위 982 | 3. 실용적인 가이드라인 983 | 4. 도구 적절한 선택 984 | 985 | ### 권장 구조 986 | 1. 역할 소개 987 | 2. 핵심 활동/책임 988 | 3. 주요 관행 989 | 4. 품질 기준 990 | 5. 협업 방식 991 | 992 | ## 에이전트 생성 가이드 993 | 994 | 새 에이전트를 만들 때: 995 | 996 | 1. 기존 에이전트 참고 997 | 2. 일관된 형식 유지 998 | 3. 언어별 번역 제공 999 | 4. 적절한 도구 선택 1000 | 5. 구체적이고 실용적인 내용 작성 1001 | `, 1002 | }, 1003 | ], 1004 | }; 1005 | 1006 | case 'mcp://claude-agents-power/claude-flow-agents': 1007 | return { 1008 | contents: [ 1009 | { 1010 | uri, 1011 | mimeType: 'text/markdown', 1012 | text: `# Claude-Flow Agent System Overview 1013 | 1014 | ## 🎯 Introduction 1015 | Claude Agents Power integrates insights from Claude-Flow v2 Alpha's sophisticated 64-agent system designed for enterprise-grade AI orchestration. These specialized agents work together to create intelligent swarms capable of handling complex development tasks through coordinated collaboration. 1016 | 1017 | ## 📊 Agent Categories and Specializations 1018 | 1019 | ### 1. Core Development Agents 1020 | Essential agents for basic development tasks: 1021 | - **coder**: Implementation specialist for clean, efficient code 1022 | - **reviewer**: Code quality assurance and review specialist 1023 | - **tester**: Test creation and validation expert 1024 | - **planner**: Strategic planning and task orchestration 1025 | - **researcher**: Information gathering and analysis specialist 1026 | 1027 | ### 2. Swarm Coordination Patterns 1028 | Advanced coordination patterns for distributed agent networks: 1029 | - **hierarchical-coordinator**: Queen-led coordination with specialized workers (Tree structure) 1030 | - **mesh-coordinator**: Peer-to-peer networks with fault tolerance (Mesh network) 1031 | - **adaptive-coordinator**: Dynamic topology switching based on workload (Adaptive hybrid) 1032 | 1033 | ### 3. Performance & Optimization Agents 1034 | - **load-balancer**: Work-stealing algorithms for task distribution 1035 | - **performance-monitor**: Real-time metrics collection and bottleneck analysis 1036 | - **topology-optimizer**: Dynamic swarm topology reconfiguration 1037 | - **resource-allocator**: Adaptive resource allocation with ML prediction 1038 | - **benchmark-suite**: Automated performance testing and regression detection 1039 | 1040 | ### 4. GitHub & Repository Management 1041 | Complete GitHub workflow automation: 1042 | - **pr-manager**: Pull request lifecycle management 1043 | - **code-review-swarm**: Multi-agent intelligent code reviews 1044 | - **issue-tracker**: Issue management and project coordination 1045 | - **release-manager**: Release coordination and deployment 1046 | - **workflow-automation**: CI/CD pipeline creation and optimization 1047 | 1048 | ### 5. Testing & Validation 1049 | - **tdd-london-swarm**: Mock-driven TDD with London School methodology 1050 | - **production-validator**: Real implementation validation for deployment 1051 | - **integration-tester**: End-to-end integration testing 1052 | - **performance-tester**: Load and stress testing 1053 | 1054 | ### 6. Security & Compliance 1055 | - **security-manager**: Cryptographic security and attack detection 1056 | - **compliance-auditor**: Regulatory compliance validation 1057 | - **vulnerability-scanner**: Security vulnerability detection 1058 | - **access-controller**: Role-based access control management 1059 | 1060 | ## 🎯 Recommended Swarm Patterns 1061 | 1062 | ### Full-Stack Development Swarm (8 agents) 1063 | \`\`\` 1064 | Task("System architecture", "...", "system-architect") 1065 | Task("Backend APIs", "...", "backend-dev") 1066 | Task("Frontend mobile", "...", "mobile-dev") 1067 | Task("Database design", "...", "coder") 1068 | Task("API documentation", "...", "api-docs") 1069 | Task("CI/CD pipeline", "...", "cicd-engineer") 1070 | Task("Performance testing", "...", "performance-benchmarker") 1071 | Task("Production validation", "...", "production-validator") 1072 | \`\`\` 1073 | 1074 | ### Distributed System Swarm (6 agents) 1075 | \`\`\` 1076 | Task("Byzantine consensus", "...", "byzantine-coordinator") 1077 | Task("Raft coordination", "...", "raft-manager") 1078 | Task("Gossip protocols", "...", "gossip-coordinator") 1079 | Task("CRDT synchronization", "...", "crdt-synchronizer") 1080 | Task("Security management", "...", "security-manager") 1081 | Task("Performance monitoring", "...", "performance-monitor") 1082 | \`\`\` 1083 | 1084 | ### GitHub Workflow Swarm (5 agents) 1085 | \`\`\` 1086 | Task("PR management", "...", "pr-manager") 1087 | Task("Code review", "...", "code-review-swarm") 1088 | Task("Issue tracking", "...", "issue-tracker") 1089 | Task("Release coordination", "...", "release-manager") 1090 | Task("Workflow automation", "...", "workflow-automation") 1091 | \`\`\` 1092 | 1093 | ### SPARC TDD Swarm (7 agents) 1094 | \`\`\` 1095 | Task("Requirements spec", "...", "specification") 1096 | Task("Algorithm design", "...", "pseudocode") 1097 | Task("System architecture", "...", "architecture") 1098 | Task("TDD implementation", "...", "sparc-coder") 1099 | Task("London school tests", "...", "tdd-london-swarm") 1100 | Task("Iterative refinement", "...", "refinement") 1101 | Task("Production validation", "...", "production-validator") 1102 | \`\`\` 1103 | 1104 | ## ⚡ Performance Guidelines 1105 | 1106 | ### Agent Selection Strategy 1107 | - **High Priority**: Use 3-5 agents max for critical path 1108 | - **Medium Priority**: Use 5-8 agents for complex features 1109 | - **Large Projects**: Use 8+ agents with proper coordination 1110 | 1111 | ### Memory Management 1112 | - Use memory-coordinator for cross-agent state 1113 | - Implement swarm-memory-manager for distributed coordination 1114 | - Apply collective-intelligence-coordinator for decision-making 1115 | 1116 | ### Coordination Patterns 1117 | - **Hierarchical**: Best for large-scale projects with clear structure 1118 | - **Mesh**: Ideal for fault-tolerant, high-availability systems 1119 | - **Adaptive**: Perfect for dynamic workloads and optimization 1120 | 1121 | ## 🔧 Integration Features 1122 | 1123 | ### Concurrent Agent Deployment 1124 | Claude Agents Power is optimized for concurrent agent deployment: 1125 | 1126 | \`\`\` 1127 | // ✅ CORRECT: Concurrent deployment 1128 | [Single Message]: 1129 | - Task("Agent 1", "full instructions", "agent-type-1") 1130 | - Task("Agent 2", "full instructions", "agent-type-2") 1131 | - Task("Agent 3", "full instructions", "agent-type-3") 1132 | - Task("Agent 4", "full instructions", "agent-type-4") 1133 | - Task("Agent 5", "full instructions", "agent-type-5") 1134 | \`\`\` 1135 | 1136 | ## 📚 Best Practices 1137 | 1. Always use concurrent agent deployment for maximum performance 1138 | 2. Match agent specialization to task requirements for optimal results 1139 | 3. Use coordination agents for complex multi-step workflows 1140 | 4. Apply appropriate topology based on project scale and requirements 1141 | 5. Leverage memory coordination for persistent state across agents 1142 | 6. Monitor performance using dedicated monitoring agents 1143 | 7. Validate production readiness with specialized validation agents 1144 | `, 1145 | }, 1146 | ], 1147 | }; 1148 | 1149 | case 'mcp://claude-agents-power/agent-swarm-patterns': 1150 | return { 1151 | contents: [ 1152 | { 1153 | uri, 1154 | mimeType: 'text/markdown', 1155 | text: `# Agent Swarm Patterns for Claude Agents Power 1156 | 1157 | ## 🎯 Overview 1158 | This guide provides recommended agent swarm deployment patterns optimized for different project types and use cases. 1159 | 1160 | ## 🏗️ Pattern Categories 1161 | 1162 | ### 1. Development Patterns 1163 | 1164 | #### Microservices Development Swarm 1165 | **Use Case**: Building distributed microservices architecture 1166 | **Agents**: 8-10 specialists 1167 | \`\`\` 1168 | - system-architect: Overall architecture design 1169 | - backend-engineer (x3): Service implementation 1170 | - api-designer: API contract design 1171 | - database-architect: Data model design 1172 | - devops-engineer: Container orchestration 1173 | - security-engineer: Service security 1174 | - performance-engineer: Service optimization 1175 | - qa-engineer: Integration testing 1176 | \`\`\` 1177 | 1178 | #### Mobile App Development Swarm 1179 | **Use Case**: Cross-platform mobile application 1180 | **Agents**: 6-8 specialists 1181 | \`\`\` 1182 | - mobile-architect: App architecture 1183 | - frontend-developer: UI implementation 1184 | - backend-engineer: API development 1185 | - ux-designer: User experience 1186 | - performance-optimizer: App optimization 1187 | - qa-mobile: Mobile testing 1188 | - devops-mobile: App deployment 1189 | \`\`\` 1190 | 1191 | ### 2. Data & AI Patterns 1192 | 1193 | #### Machine Learning Pipeline Swarm 1194 | **Use Case**: ML model development and deployment 1195 | **Agents**: 7-9 specialists 1196 | \`\`\` 1197 | - data-scientist: Model development 1198 | - ml-engineer: Pipeline implementation 1199 | - data-engineer: Data preprocessing 1200 | - feature-engineer: Feature extraction 1201 | - mlops-engineer: Model deployment 1202 | - performance-analyst: Model optimization 1203 | - qa-ml: Model validation 1204 | \`\`\` 1205 | 1206 | #### Data Analytics Swarm 1207 | **Use Case**: Business intelligence and analytics 1208 | **Agents**: 5-6 specialists 1209 | \`\`\` 1210 | - data-analyst: Data exploration 1211 | - sql-developer: Query optimization 1212 | - visualization-expert: Dashboard creation 1213 | - etl-engineer: Data pipeline 1214 | - data-quality: Data validation 1215 | \`\`\` 1216 | 1217 | ### 3. Infrastructure Patterns 1218 | 1219 | #### Cloud Migration Swarm 1220 | **Use Case**: Migrating applications to cloud 1221 | **Agents**: 8-10 specialists 1222 | \`\`\` 1223 | - cloud-architect: Cloud design 1224 | - migration-planner: Migration strategy 1225 | - infrastructure-engineer: IaC implementation 1226 | - security-engineer: Cloud security 1227 | - network-engineer: Network design 1228 | - database-migrator: Data migration 1229 | - performance-optimizer: Cloud optimization 1230 | - cost-optimizer: Cloud cost management 1231 | \`\`\` 1232 | 1233 | #### Kubernetes Deployment Swarm 1234 | **Use Case**: Container orchestration setup 1235 | **Agents**: 6-7 specialists 1236 | \`\`\` 1237 | - k8s-architect: Cluster design 1238 | - devops-engineer: Pipeline setup 1239 | - helm-expert: Chart creation 1240 | - security-k8s: Security policies 1241 | - monitoring-engineer: Observability 1242 | - performance-k8s: Cluster optimization 1243 | \`\`\` 1244 | 1245 | ### 4. Security Patterns 1246 | 1247 | #### Security Audit Swarm 1248 | **Use Case**: Comprehensive security assessment 1249 | **Agents**: 7-8 specialists 1250 | \`\`\` 1251 | - security-architect: Security design 1252 | - vulnerability-scanner: Vulnerability assessment 1253 | - penetration-tester: Security testing 1254 | - compliance-auditor: Compliance check 1255 | - crypto-engineer: Encryption implementation 1256 | - access-controller: IAM setup 1257 | - security-monitor: Security monitoring 1258 | \`\`\` 1259 | 1260 | ### 5. Quality Assurance Patterns 1261 | 1262 | #### Comprehensive Testing Swarm 1263 | **Use Case**: Full test coverage implementation 1264 | **Agents**: 6-8 specialists 1265 | \`\`\` 1266 | - test-architect: Test strategy 1267 | - unit-tester: Unit test creation 1268 | - integration-tester: Integration tests 1269 | - e2e-tester: End-to-end tests 1270 | - performance-tester: Load testing 1271 | - security-tester: Security tests 1272 | - automation-engineer: Test automation 1273 | \`\`\` 1274 | 1275 | ## 📊 Swarm Size Recommendations 1276 | 1277 | ### Small Projects (3-5 agents) 1278 | - Simple features or bug fixes 1279 | - Prototype development 1280 | - Documentation updates 1281 | 1282 | ### Medium Projects (5-8 agents) 1283 | - New feature development 1284 | - API implementation 1285 | - Database design 1286 | - Testing implementation 1287 | 1288 | ### Large Projects (8-12 agents) 1289 | - System architecture redesign 1290 | - Full-stack application development 1291 | - Platform migration 1292 | - Enterprise integrations 1293 | 1294 | ### Enterprise Projects (12+ agents) 1295 | - Multi-team coordination 1296 | - Complex distributed systems 1297 | - Large-scale refactoring 1298 | - Production deployment 1299 | 1300 | ## ⚡ Optimization Strategies 1301 | 1302 | ### Concurrent Execution 1303 | - Deploy agents in parallel when possible 1304 | - Use coordination agents for dependencies 1305 | - Implement message queuing for communication 1306 | 1307 | ### Resource Management 1308 | - Monitor agent resource usage 1309 | - Implement agent pooling 1310 | - Use lazy loading for heavy agents 1311 | - Apply circuit breakers for failures 1312 | 1313 | ### Communication Patterns 1314 | - **Direct**: Agent-to-agent direct communication 1315 | - **Broadcast**: One-to-many communication 1316 | - **Pipeline**: Sequential processing chain 1317 | - **Hub-Spoke**: Centralized coordination 1318 | - **Mesh**: Fully connected network 1319 | 1320 | ## 🎯 Selection Criteria 1321 | 1322 | ### Choose Hierarchical Coordination When: 1323 | - Clear project structure exists 1324 | - Team roles are well-defined 1325 | - Sequential dependencies present 1326 | - Central decision-making required 1327 | 1328 | ### Choose Mesh Coordination When: 1329 | - High availability required 1330 | - Fault tolerance critical 1331 | - Distributed decision-making 1332 | - Peer collaboration needed 1333 | 1334 | ### Choose Adaptive Coordination When: 1335 | - Workload varies significantly 1336 | - Project requirements evolving 1337 | - Optimization is priority 1338 | - Mixed coordination needed 1339 | 1340 | ## 📚 Implementation Examples 1341 | 1342 | ### Example 1: E-commerce Platform 1343 | \`\`\`javascript 1344 | const swarm = [ 1345 | { agent: "system-architect", task: "Design microservices architecture" }, 1346 | { agent: "backend-engineer", task: "Implement order service" }, 1347 | { agent: "backend-engineer", task: "Implement payment service" }, 1348 | { agent: "frontend-developer", task: "Build React UI" }, 1349 | { agent: "database-architect", task: "Design data models" }, 1350 | { agent: "security-engineer", task: "Implement authentication" }, 1351 | { agent: "devops-engineer", task: "Setup CI/CD pipeline" }, 1352 | { agent: "qa-engineer", task: "Create test suites" } 1353 | ]; 1354 | \`\`\` 1355 | 1356 | ### Example 2: Real-time Analytics Dashboard 1357 | \`\`\`javascript 1358 | const swarm = [ 1359 | { agent: "data-engineer", task: "Build data pipeline" }, 1360 | { agent: "stream-processor", task: "Implement real-time processing" }, 1361 | { agent: "frontend-developer", task: "Create dashboard UI" }, 1362 | { agent: "websocket-expert", task: "Implement real-time updates" }, 1363 | { agent: "performance-optimizer", task: "Optimize queries" }, 1364 | { agent: "monitoring-engineer", task: "Setup monitoring" } 1365 | ]; 1366 | \`\`\` 1367 | 1368 | ## 🔗 Related Resources 1369 | - Agent Coordination Guide 1370 | - Performance Optimization 1371 | - Distributed Systems Patterns 1372 | - MCP Tool Integration 1373 | `, 1374 | }, 1375 | ], 1376 | }; 1377 | 1378 | default: 1379 | throw new Error(`Unknown resource: ${uri}`); 1380 | } 1381 | }); 1382 | 1383 | // Define tools 1384 | server.setRequestHandler(ListToolsRequestSchema, async () => { 1385 | return { 1386 | tools: [ 1387 | { 1388 | name: 'analyze-project', 1389 | description: 'Analyze a project directory and recommend suitable sub-agents', 1390 | inputSchema: { 1391 | type: 'object', 1392 | properties: { 1393 | projectPath: { 1394 | type: 'string', 1395 | description: 'Path to the project directory to analyze', 1396 | }, 1397 | }, 1398 | required: ['projectPath'], 1399 | }, 1400 | }, 1401 | { 1402 | name: 'ai-analyze-project', 1403 | description: 'Perform AI-powered comprehensive project analysis and agent recommendations', 1404 | inputSchema: { 1405 | type: 'object', 1406 | properties: { 1407 | claudeMdPath: { 1408 | type: 'string', 1409 | description: 'Path to CLAUDE.md file or project description', 1410 | }, 1411 | projectPath: { 1412 | type: 'string', 1413 | description: 'Optional path to project root directory (defaults to CLAUDE.md directory)', 1414 | }, 1415 | generateRecommendations: { 1416 | type: 'boolean', 1417 | description: 'Whether to generate agent recommendations', 1418 | default: true, 1419 | }, 1420 | maxRecommendations: { 1421 | type: 'number', 1422 | description: 'Maximum number of agent recommendations to return', 1423 | default: 10, 1424 | }, 1425 | }, 1426 | required: ['claudeMdPath'], 1427 | }, 1428 | }, 1429 | { 1430 | name: 'agent-download', 1431 | description: 'AI-powered agent downloader - analyze project and download recommended agents', 1432 | inputSchema: { 1433 | type: 'object', 1434 | properties: { 1435 | targetDir: { 1436 | type: 'string', 1437 | description: 'Target directory for agent files', 1438 | default: './.claude/agents', 1439 | }, 1440 | claudeMdPath: { 1441 | type: 'string', 1442 | description: 'Path to CLAUDE.md file', 1443 | default: './CLAUDE.md', 1444 | }, 1445 | format: { 1446 | type: 'string', 1447 | enum: ['md', 'yaml', 'json'], 1448 | description: 'Agent file format', 1449 | default: 'md', 1450 | }, 1451 | language: { 1452 | type: 'string', 1453 | enum: ['en', 'ko', 'ja', 'zh'], 1454 | description: 'Preferred language for agents', 1455 | default: 'en', 1456 | }, 1457 | limit: { 1458 | type: 'number', 1459 | description: 'Maximum number of agents to download', 1460 | default: 10, 1461 | minimum: 1, 1462 | maximum: 20, 1463 | }, 1464 | dryRun: { 1465 | type: 'boolean', 1466 | description: 'Preview recommendations without downloading', 1467 | default: false, 1468 | }, 1469 | overwrite: { 1470 | type: 'boolean', 1471 | description: 'Overwrite existing agent files', 1472 | default: false, 1473 | }, 1474 | }, 1475 | }, 1476 | }, 1477 | { 1478 | name: 'agents', 1479 | description: 'Search, list, get details, recommend agents, or request new ones', 1480 | inputSchema: { 1481 | type: 'object', 1482 | properties: { 1483 | action: { 1484 | type: 'string', 1485 | description: 'Action to perform', 1486 | enum: ['search', 'list', 'details', 'recommend', 'request'], 1487 | }, 1488 | query: { 1489 | type: 'string', 1490 | description: 'Search query (for search action) or agent name (for details action)', 1491 | }, 1492 | keywords: { 1493 | type: 'array', 1494 | items: { type: 'string' }, 1495 | description: 'Keywords for recommendation (for recommend action)', 1496 | }, 1497 | language: { 1498 | type: 'string', 1499 | description: 'Language preference', 1500 | enum: ['en', 'ko', 'ja', 'zh'], 1501 | default: 'en', 1502 | }, 1503 | category: { 1504 | type: 'string', 1505 | description: 'Filter by category (for list action)', 1506 | enum: ['development', 'data', 'design', 'management', 'marketing', 'operations', 'hr', 'finance', 'legal', 'research', 'healthcare', 'education', 'media', 'manufacturing', 'other'], 1507 | }, 1508 | autoCreateIssue: { 1509 | type: 'boolean', 1510 | description: 'Auto-create GitHub issue if no agents found (for search action)', 1511 | default: false, 1512 | }, 1513 | issueBody: { 1514 | type: 'string', 1515 | description: 'Additional details for the issue (when autoCreateIssue is true)', 1516 | }, 1517 | }, 1518 | required: ['action'], 1519 | }, 1520 | }, 1521 | { 1522 | name: 'manage-agents', 1523 | description: 'Install agents, get stats, or refresh from GitHub', 1524 | inputSchema: { 1525 | type: 'object', 1526 | properties: { 1527 | action: { 1528 | type: 'string', 1529 | description: 'Management action to perform', 1530 | enum: ['install', 'stats', 'refresh', 'version'], 1531 | }, 1532 | agentNames: { 1533 | type: 'array', 1534 | items: { type: 'string' }, 1535 | description: 'Agent names to install (for install action)', 1536 | }, 1537 | targetPath: { 1538 | type: 'string', 1539 | description: 'Target directory for installation (for install action)', 1540 | }, 1541 | language: { 1542 | type: 'string', 1543 | description: 'Language preference for agents', 1544 | enum: ['en', 'ko', 'ja', 'zh'], 1545 | default: 'en', 1546 | }, 1547 | limit: { 1548 | type: 'number', 1549 | description: 'Number of top agents to show in stats', 1550 | default: 10, 1551 | }, 1552 | }, 1553 | required: ['action'], 1554 | }, 1555 | }, 1556 | ], 1557 | }; 1558 | }); 1559 | 1560 | // Handle tool calls 1561 | server.setRequestHandler(CallToolRequestSchema, async (request) => { 1562 | const { name, arguments: args } = request.params; 1563 | 1564 | // Track tool usage 1565 | trackEvent(AnalyticsEvents.TOOL_CALLED, { 1566 | tool_name: name, 1567 | args_provided: Object.keys(args || {}), 1568 | }); 1569 | 1570 | switch (name) { 1571 | case 'analyze-project': { 1572 | const { projectPath } = args as { projectPath: string }; 1573 | const analysis = await projectAnalyzer.analyzeProject(projectPath); 1574 | 1575 | // Track project analysis 1576 | trackEvent(AnalyticsEvents.PROJECT_ANALYZED, { 1577 | project_types: analysis.projectType, 1578 | technologies: analysis.technologies, 1579 | recommended_count: analysis.recommendedAgents.length, 1580 | confidence: analysis.confidence, 1581 | }); 1582 | 1583 | return { 1584 | content: [ 1585 | { 1586 | type: 'text', 1587 | text: JSON.stringify({ 1588 | success: true, 1589 | analysis, 1590 | message: `Analyzed project at ${projectPath}. Found ${analysis.projectType.length} project types and recommended ${analysis.recommendedAgents.length} agents.`, 1591 | }, null, 2), 1592 | }, 1593 | ], 1594 | }; 1595 | } 1596 | 1597 | case 'ai-analyze-project': { 1598 | const { claudeMdPath, projectPath, generateRecommendations = true, maxRecommendations = 10 } = args as { 1599 | claudeMdPath: string; 1600 | projectPath?: string; 1601 | generateRecommendations?: boolean; 1602 | maxRecommendations?: number; 1603 | }; 1604 | 1605 | try { 1606 | // Perform AI-powered project analysis 1607 | const analysis = await aiAnalysisService.analyzeProject(claudeMdPath, projectPath); 1608 | 1609 | let recommendations: AIAgentRecommendation[] = []; 1610 | if (generateRecommendations) { 1611 | const allRecommendations = await aiAnalysisService.generateRecommendations(analysis); 1612 | recommendations = allRecommendations.slice(0, maxRecommendations); 1613 | } 1614 | 1615 | // Track AI analysis event 1616 | trackEvent(AnalyticsEvents.PROJECT_ANALYZED, { 1617 | project_types: analysis.projectType, 1618 | technologies: analysis.technologies, 1619 | recommended_count: recommendations.length, 1620 | confidence: analysis.complexity / 10, // Normalize complexity as confidence 1621 | ai_powered: true, 1622 | }); 1623 | 1624 | return { 1625 | content: [ 1626 | { 1627 | type: 'text', 1628 | text: JSON.stringify({ 1629 | success: true, 1630 | analysis: { 1631 | projectType: analysis.projectType, 1632 | technologies: analysis.technologies, 1633 | frameworks: analysis.frameworks, 1634 | complexity: analysis.complexity, 1635 | phase: analysis.phase, 1636 | teamSize: analysis.teamSize, 1637 | description: analysis.description, 1638 | goals: analysis.goals, 1639 | requirements: analysis.requirements, 1640 | architecturalPatterns: analysis.architecturalPatterns, 1641 | developmentPractices: analysis.developmentPractices, 1642 | qualityIndicators: analysis.qualityIndicators, 1643 | }, 1644 | recommendations: recommendations.map(rec => ({ 1645 | name: rec.name, 1646 | description: rec.description, 1647 | relevanceScore: rec.relevanceScore, 1648 | reasoning: rec.reasoning, 1649 | category: rec.category, 1650 | priority: rec.priority, 1651 | tools: rec.tools, 1652 | specificTasks: rec.specificTasks, 1653 | integrationPoints: rec.integrationPoints, 1654 | })), 1655 | message: `AI analysis completed for ${path.basename(claudeMdPath)}. Project type: ${analysis.projectType}, Complexity: ${analysis.complexity}/10, Recommended ${recommendations.length} agents.`, 1656 | aiFeatures: { 1657 | intelligentAnalysis: 'Comprehensive project understanding using AI reasoning', 1658 | contextAwareRecommendations: 'Agent suggestions based on project context and requirements', 1659 | dynamicPrioritization: 'Smart priority assignment based on project needs', 1660 | taskSpecificMatching: 'Agents matched to specific tasks and integration points' 1661 | } 1662 | }, null, 2), 1663 | }, 1664 | ], 1665 | }; 1666 | } catch (error) { 1667 | return { 1668 | content: [ 1669 | { 1670 | type: 'text', 1671 | text: JSON.stringify({ 1672 | success: false, 1673 | error: `AI analysis failed: ${error instanceof Error ? error.message : String(error)}`, 1674 | suggestion: 'Please check the CLAUDE.md file path and project structure', 1675 | }, null, 2), 1676 | }, 1677 | ], 1678 | }; 1679 | } 1680 | } 1681 | 1682 | case 'agent-download': { 1683 | const { 1684 | targetDir = './.claude/agents', 1685 | claudeMdPath = './CLAUDE.md', 1686 | format = 'md', 1687 | language = 'en', 1688 | limit = 10, 1689 | dryRun = false, 1690 | overwrite = false 1691 | } = args as { 1692 | targetDir?: string; 1693 | claudeMdPath?: string; 1694 | format?: 'md' | 'yaml' | 'json'; 1695 | language?: 'en' | 'ko' | 'ja' | 'zh'; 1696 | limit?: number; 1697 | dryRun?: boolean; 1698 | overwrite?: boolean; 1699 | }; 1700 | 1701 | try { 1702 | const downloader = new AgentDownloader(); 1703 | 1704 | const options = { 1705 | targetDir, 1706 | claudeMdPath, 1707 | format, 1708 | language, 1709 | limit, 1710 | dryRun, 1711 | overwrite 1712 | }; 1713 | 1714 | const result = await downloader.downloadAgents(options); 1715 | 1716 | // Track agent download event 1717 | trackEvent(AnalyticsEvents.PROJECT_ANALYZED, { 1718 | project_types: result.analysis.projectType, 1719 | technologies: result.analysis.technologies, 1720 | recommended_count: result.recommendations.length, 1721 | confidence: result.analysis.complexity / 10, 1722 | ai_powered: true, 1723 | dry_run: dryRun, 1724 | downloaded_count: result.downloaded?.length || 0, 1725 | }); 1726 | 1727 | return { 1728 | content: [ 1729 | { 1730 | type: 'text', 1731 | text: JSON.stringify({ 1732 | success: true, 1733 | dryRun, 1734 | analysis: { 1735 | projectType: result.analysis.projectType, 1736 | technologies: result.analysis.technologies, 1737 | frameworks: result.analysis.frameworks, 1738 | complexity: result.analysis.complexity, 1739 | phase: result.analysis.phase, 1740 | teamSize: result.analysis.teamSize, 1741 | description: result.analysis.description, 1742 | qualityIndicators: result.analysis.qualityIndicators, 1743 | architecturalPatterns: result.analysis.architecturalPatterns, 1744 | developmentPractices: result.analysis.developmentPractices, 1745 | }, 1746 | recommendations: result.recommendations.map(rec => ({ 1747 | name: rec.name, 1748 | description: rec.description, 1749 | relevanceScore: rec.relevanceScore, 1750 | reasoning: rec.reasoning, 1751 | category: rec.category, 1752 | priority: rec.priority, 1753 | tools: rec.tools, 1754 | specificTasks: rec.specificTasks, 1755 | integrationPoints: rec.integrationPoints, 1756 | })), 1757 | downloaded: result.downloaded || [], 1758 | message: dryRun 1759 | ? `AI analysis preview completed. Found ${result.recommendations.length} recommended agents for your ${result.analysis.projectType} project.` 1760 | : `Successfully downloaded ${result.downloaded?.length || 0} AI-recommended agents to ${targetDir}.`, 1761 | aiFeatures: { 1762 | intelligentAnalysis: 'Comprehensive project understanding using AI reasoning', 1763 | contextAwareRecommendations: 'Agent suggestions based on project context and requirements', 1764 | dynamicPrioritization: 'Smart priority assignment based on project needs', 1765 | taskSpecificMatching: 'Agents matched to specific tasks and integration points', 1766 | automaticDownload: 'Seamless agent file creation with enhanced documentation' 1767 | } 1768 | }, null, 2), 1769 | }, 1770 | ], 1771 | }; 1772 | } catch (error) { 1773 | return { 1774 | content: [ 1775 | { 1776 | type: 'text', 1777 | text: JSON.stringify({ 1778 | success: false, 1779 | error: `Agent download failed: ${error instanceof Error ? error.message : String(error)}`, 1780 | suggestion: 'Please check the CLAUDE.md file path and ensure write permissions for the target directory', 1781 | }, null, 2), 1782 | }, 1783 | ], 1784 | }; 1785 | } 1786 | } 1787 | 1788 | case 'agents': { 1789 | const { action, query, keywords, language = 'en', category, autoCreateIssue = false, issueBody } = args as { 1790 | action: 'search' | 'list' | 'details' | 'recommend' | 'request'; 1791 | query?: string; 1792 | keywords?: string[]; 1793 | language?: string; 1794 | category?: string; 1795 | autoCreateIssue?: boolean; 1796 | issueBody?: string; 1797 | }; 1798 | 1799 | switch (action) { 1800 | case 'search': { 1801 | if (!query) { 1802 | return { 1803 | content: [ 1804 | { 1805 | type: 'text', 1806 | text: JSON.stringify({ 1807 | success: false, 1808 | error: 'Query is required for search action', 1809 | }, null, 2), 1810 | }, 1811 | ], 1812 | }; 1813 | } 1814 | 1815 | const agents = agentManager.searchAgents(query); 1816 | const filteredAgents = agents.filter( 1817 | agent => !language || agent.language === language 1818 | ); 1819 | 1820 | // Track search event 1821 | trackEvent(AnalyticsEvents.AGENT_SEARCHED, { 1822 | query, 1823 | language, 1824 | found_count: filteredAgents.length, 1825 | auto_create_issue: autoCreateIssue, 1826 | }); 1827 | 1828 | // Auto-create issue if no agents found and autoCreateIssue is true 1829 | if (filteredAgents.length === 0 && autoCreateIssue) { 1830 | const githubToken = process.env.GITHUB_TOKEN; 1831 | if (!githubToken) { 1832 | // Generate GitHub issue creation URL with pre-filled content 1833 | const issueTitle = encodeURIComponent(`[Agent Request] ${query} - New agent needed`); 1834 | const issueBodyContent = encodeURIComponent(`## Agent Request 1835 | 1836 | **Role Name**: ${query} 1837 | **Language**: ${language} 1838 | 1839 | ## Description 1840 | ${issueBody || 'A new agent is needed for this role.'} 1841 | 1842 | ## Use Cases 1843 | - [Please describe specific use cases] 1844 | 1845 | ## Required Tools 1846 | - [List required tools like Read, Write, Edit, etc.] 1847 | 1848 | ## Additional Details 1849 | - No existing agents found matching: "${query}" 1850 | - Please consider adding this agent to help users with this use case.`); 1851 | 1852 | const createIssueUrl = `https://github.com/hongsw/claude-agents-power-mcp-server/issues/new?title=${issueTitle}&body=${issueBodyContent}&labels=agent-request`; 1853 | 1854 | return { 1855 | content: [ 1856 | { 1857 | type: 'text', 1858 | text: JSON.stringify({ 1859 | success: false, 1860 | error: 'No agents found. GitHub token not configured for auto-issue creation.', 1861 | suggestion: 'Click the link below to create an issue manually:', 1862 | createIssueUrl, 1863 | message: `🔍 No agents found for "${query}"\n\n📝 You can create an issue manually by clicking this link:\n${createIssueUrl}\n\n💡 Or set GITHUB_TOKEN environment variable for automatic issue creation.`, 1864 | }, null, 2), 1865 | }, 1866 | ], 1867 | }; 1868 | } 1869 | 1870 | try { 1871 | const issueTitle = `[Agent Request] ${query} - New agent needed`; 1872 | const issueBodyContent = `## Agent Request 1873 | 1874 | **Role Name**: ${query} 1875 | **Language**: ${language} 1876 | 1877 | ## Description 1878 | ${issueBody || 'A new agent is needed for this role.'} 1879 | 1880 | ## Use Cases 1881 | - [Please describe specific use cases] 1882 | 1883 | ## Required Tools 1884 | - [List required tools like Read, Write, Edit, etc.] 1885 | 1886 | ## Additional Details 1887 | - Requested via MCP server auto-issue creation 1888 | - No existing agents found matching: "${query}" 1889 | 1890 | --- 1891 | *This issue was automatically created by claude-agents-power MCP server*`; 1892 | 1893 | const response = await fetch('https://api.github.com/repos/hongsw/claude-agents-power-mcp-server/issues', { 1894 | method: 'POST', 1895 | headers: { 1896 | 'Authorization': `token ${githubToken}`, 1897 | 'Accept': 'application/vnd.github+json', 1898 | 'Content-Type': 'application/json', 1899 | }, 1900 | body: JSON.stringify({ 1901 | title: issueTitle, 1902 | body: issueBodyContent, 1903 | labels: ['agent-request', 'auto-created'], 1904 | }), 1905 | }); 1906 | 1907 | if (!response.ok) { 1908 | throw new Error(`GitHub API error: ${response.status} ${response.statusText}`); 1909 | } 1910 | 1911 | const issue = await response.json(); 1912 | 1913 | // Log to stderr for visibility 1914 | console.error(`[MCP Sub-Agents] ✅ GitHub issue created successfully!`); 1915 | console.error(`[MCP Sub-Agents] Issue #${issue.number}: ${issue.html_url}`); 1916 | 1917 | // Track issue creation 1918 | trackEvent(AnalyticsEvents.AGENT_ISSUE_CREATED, { 1919 | query, 1920 | language, 1921 | issue_number: issue.number, 1922 | issue_url: issue.html_url, 1923 | }); 1924 | 1925 | return { 1926 | content: [ 1927 | { 1928 | type: 'text', 1929 | text: JSON.stringify({ 1930 | success: true, 1931 | count: 0, 1932 | message: `🔍 No agents found for "${query}"\n\n📝 GitHub issue automatically created!\n\n🔗 Issue #${issue.number}: ${issue.title}\n📎 ${issue.html_url}\n\n💡 The maintainers will review and potentially add this agent.\n📚 Meanwhile, you can create your own agent following the guide.`, 1933 | issueUrl: issue.html_url, 1934 | issueNumber: issue.number, 1935 | nextSteps: [ 1936 | 'Wait for maintainers to review the issue', 1937 | 'Create your own agent following the documentation', 1938 | 'Check back later for the new agent' 1939 | ] 1940 | }, null, 2), 1941 | }, 1942 | ], 1943 | }; 1944 | } catch (error) { 1945 | return { 1946 | content: [ 1947 | { 1948 | type: 'text', 1949 | text: JSON.stringify({ 1950 | success: false, 1951 | count: 0, 1952 | error: `Failed to create issue: ${error}`, 1953 | suggestion: 'Visit https://github.com/hongsw/claude-agents-power-mcp-server/issues to manually create an issue', 1954 | }, null, 2), 1955 | }, 1956 | ], 1957 | }; 1958 | } 1959 | } 1960 | 1961 | // If no agents found and autoCreateIssue is false, provide manual creation link 1962 | if (filteredAgents.length === 0) { 1963 | const issueTitle = encodeURIComponent(`[Agent Request] ${query} - New agent needed`); 1964 | const issueBodyContent = encodeURIComponent(`## Agent Request 1965 | 1966 | **Role Name**: ${query} 1967 | **Language**: ${language} 1968 | 1969 | ## Description 1970 | A new agent is needed for this role. 1971 | 1972 | ## Use Cases 1973 | - [Please describe specific use cases] 1974 | 1975 | ## Required Tools 1976 | - [List required tools like Read, Write, Edit, etc.] 1977 | 1978 | ## Additional Details 1979 | - No existing agents found matching: "${query}" 1980 | - Please consider adding this agent to help users with this use case.`); 1981 | 1982 | const createIssueUrl = `https://github.com/hongsw/claude-agents-power-mcp-server/issues/new?title=${issueTitle}&body=${issueBodyContent}&labels=agent-request`; 1983 | 1984 | return { 1985 | content: [ 1986 | { 1987 | type: 'text', 1988 | text: JSON.stringify({ 1989 | success: true, 1990 | count: 0, 1991 | agents: [], 1992 | message: `🔍 No agents found for "${query}"`, 1993 | suggestion: '📝 You can request this agent by creating an issue:', 1994 | createIssueUrl, 1995 | tip: '💡 Set autoCreateIssue=true to automatically create issues when agents are not found.', 1996 | }, null, 2), 1997 | }, 1998 | ], 1999 | }; 2000 | } 2001 | 2002 | return { 2003 | content: [ 2004 | { 2005 | type: 'text', 2006 | text: JSON.stringify({ 2007 | success: true, 2008 | count: filteredAgents.length, 2009 | agents: filteredAgents.map(agent => ({ 2010 | name: agent.name, 2011 | description: agent.description, 2012 | tools: agent.tools, 2013 | language: agent.language, 2014 | })), 2015 | }, null, 2), 2016 | }, 2017 | ], 2018 | }; 2019 | } 2020 | 2021 | case 'list': { 2022 | let agents = agentManager.getAllAgents(language); 2023 | 2024 | if (category) { 2025 | agents = agents.filter(agent => { 2026 | const categoryKeywords: Record<string, string[]> = { 2027 | development: ['developer', 'engineer', 'architect'], 2028 | data: ['data', 'analyst', 'scientist'], 2029 | design: ['designer', 'ux', 'ui'], 2030 | management: ['manager', 'owner', 'master'], 2031 | }; 2032 | 2033 | const keywords = categoryKeywords[category] || []; 2034 | return keywords.some(keyword => 2035 | agent.name.includes(keyword) || 2036 | agent.description.toLowerCase().includes(keyword) 2037 | ); 2038 | }); 2039 | } 2040 | 2041 | return { 2042 | content: [ 2043 | { 2044 | type: 'text', 2045 | text: JSON.stringify({ 2046 | success: true, 2047 | count: agents.length, 2048 | agents: agents.map(agent => ({ 2049 | name: agent.name, 2050 | description: agent.description, 2051 | tools: agent.tools, 2052 | language: agent.language, 2053 | })), 2054 | }, null, 2), 2055 | }, 2056 | ], 2057 | }; 2058 | } 2059 | 2060 | case 'details': { 2061 | if (!query) { 2062 | return { 2063 | content: [ 2064 | { 2065 | type: 'text', 2066 | text: JSON.stringify({ 2067 | success: false, 2068 | error: 'Agent name is required for details action', 2069 | }, null, 2), 2070 | }, 2071 | ], 2072 | }; 2073 | } 2074 | 2075 | const agent = agentManager.getAgent(query, language); 2076 | 2077 | if (!agent) { 2078 | return { 2079 | content: [ 2080 | { 2081 | type: 'text', 2082 | text: JSON.stringify({ 2083 | success: false, 2084 | error: `Agent '${query}' not found in language '${language}'`, 2085 | }, null, 2), 2086 | }, 2087 | ], 2088 | }; 2089 | } 2090 | 2091 | return { 2092 | content: [ 2093 | { 2094 | type: 'text', 2095 | text: JSON.stringify({ 2096 | success: true, 2097 | agent: { 2098 | name: agent.name, 2099 | description: agent.description, 2100 | tools: agent.tools, 2101 | language: agent.language, 2102 | content: agent.content, 2103 | }, 2104 | }, null, 2), 2105 | }, 2106 | ], 2107 | }; 2108 | } 2109 | 2110 | case 'recommend': { 2111 | if (!keywords || keywords.length === 0) { 2112 | return { 2113 | content: [ 2114 | { 2115 | type: 'text', 2116 | text: JSON.stringify({ 2117 | success: false, 2118 | error: 'Keywords are required for recommend action', 2119 | }, null, 2), 2120 | }, 2121 | ], 2122 | }; 2123 | } 2124 | 2125 | const recommendedAgents = await projectAnalyzer.getAgentsByKeywords(keywords); 2126 | 2127 | return { 2128 | content: [ 2129 | { 2130 | type: 'text', 2131 | text: JSON.stringify({ 2132 | success: true, 2133 | keywords, 2134 | recommendedAgents, 2135 | count: recommendedAgents.length, 2136 | }, null, 2), 2137 | }, 2138 | ], 2139 | }; 2140 | } 2141 | 2142 | case 'request': { 2143 | if (!query) { 2144 | return { 2145 | content: [ 2146 | { 2147 | type: 'text', 2148 | text: JSON.stringify({ 2149 | success: false, 2150 | error: 'Agent name is required for request action', 2151 | }, null, 2), 2152 | }, 2153 | ], 2154 | }; 2155 | } 2156 | 2157 | const githubToken = process.env.GITHUB_TOKEN; 2158 | if (!githubToken) { 2159 | return { 2160 | content: [ 2161 | { 2162 | type: 'text', 2163 | text: JSON.stringify({ 2164 | success: false, 2165 | error: 'GitHub token not configured. Set GITHUB_TOKEN environment variable.', 2166 | suggestion: 'Visit https://github.com/hongsw/claude-agents-power-mcp-server/issues to manually create an issue', 2167 | }, null, 2), 2168 | }, 2169 | ], 2170 | }; 2171 | } 2172 | 2173 | try { 2174 | const issueTitle = `[Agent Request] ${query} - New agent needed`; 2175 | const issueBodyContent = `## Agent Request 2176 | 2177 | **Role Name**: ${query} 2178 | **Language**: ${language} 2179 | 2180 | ## Description 2181 | ${issueBody || 'A new agent is needed for this role.'} 2182 | 2183 | ## Use Cases 2184 | - [Please describe specific use cases] 2185 | 2186 | ## Required Tools 2187 | - [List required tools like Read, Write, Edit, etc.] 2188 | 2189 | ## Additional Details 2190 | - Requested via MCP server manual request 2191 | - Agent name: "${query}" 2192 | 2193 | --- 2194 | *This issue was created by claude-agents-power MCP server*`; 2195 | 2196 | const response = await fetch('https://api.github.com/repos/hongsw/claude-agents-power-mcp-server/issues', { 2197 | method: 'POST', 2198 | headers: { 2199 | 'Authorization': `token ${githubToken}`, 2200 | 'Accept': 'application/vnd.github+json', 2201 | 'Content-Type': 'application/json', 2202 | }, 2203 | body: JSON.stringify({ 2204 | title: issueTitle, 2205 | body: issueBodyContent, 2206 | labels: ['agent-request'], 2207 | }), 2208 | }); 2209 | 2210 | if (!response.ok) { 2211 | throw new Error(`GitHub API error: ${response.status} ${response.statusText}`); 2212 | } 2213 | 2214 | const issue = await response.json(); 2215 | 2216 | return { 2217 | content: [ 2218 | { 2219 | type: 'text', 2220 | text: JSON.stringify({ 2221 | success: true, 2222 | message: `Created GitHub issue #${issue.number} for agent "${query}"`, 2223 | issueUrl: issue.html_url, 2224 | issueNumber: issue.number, 2225 | }, null, 2), 2226 | }, 2227 | ], 2228 | }; 2229 | } catch (error) { 2230 | return { 2231 | content: [ 2232 | { 2233 | type: 'text', 2234 | text: JSON.stringify({ 2235 | success: false, 2236 | error: `Failed to create issue: ${error}`, 2237 | suggestion: 'Visit https://github.com/hongsw/claude-agents-power-mcp-server/issues to manually create an issue', 2238 | }, null, 2), 2239 | }, 2240 | ], 2241 | }; 2242 | } 2243 | } 2244 | 2245 | default: 2246 | return { 2247 | content: [ 2248 | { 2249 | type: 'text', 2250 | text: JSON.stringify({ 2251 | success: false, 2252 | error: `Unknown action: ${action}`, 2253 | }, null, 2), 2254 | }, 2255 | ], 2256 | }; 2257 | } 2258 | } 2259 | 2260 | case 'manage-agents': { 2261 | const { action, agentNames, targetPath, language = 'en', limit = 10 } = args as { 2262 | action: 'install' | 'stats' | 'refresh' | 'version'; 2263 | agentNames?: string[]; 2264 | targetPath?: string; 2265 | language?: string; 2266 | limit?: number; 2267 | }; 2268 | 2269 | switch (action) { 2270 | case 'install': { 2271 | if (!agentNames || !targetPath) { 2272 | return { 2273 | content: [ 2274 | { 2275 | type: 'text', 2276 | text: JSON.stringify({ 2277 | success: false, 2278 | error: 'Agent names and target path are required for install action', 2279 | }, null, 2), 2280 | }, 2281 | ], 2282 | }; 2283 | } 2284 | 2285 | try { 2286 | const installedPaths = await agentManager.installMultipleAgents( 2287 | agentNames, 2288 | targetPath, 2289 | language 2290 | ); 2291 | 2292 | return { 2293 | content: [ 2294 | { 2295 | type: 'text', 2296 | text: JSON.stringify({ 2297 | success: true, 2298 | installedCount: installedPaths.length, 2299 | installedPaths, 2300 | message: `Successfully installed ${installedPaths.length} agents to ${targetPath}/claude/agents/`, 2301 | }, null, 2), 2302 | }, 2303 | ], 2304 | }; 2305 | } catch (error) { 2306 | return { 2307 | content: [ 2308 | { 2309 | type: 'text', 2310 | text: JSON.stringify({ 2311 | success: false, 2312 | error: `Failed to install agents: ${error}`, 2313 | }, null, 2), 2314 | }, 2315 | ], 2316 | }; 2317 | } 2318 | } 2319 | 2320 | case 'stats': { 2321 | const stats = agentManager.getMostDownloadedAgents(limit); 2322 | 2323 | return { 2324 | content: [ 2325 | { 2326 | type: 'text', 2327 | text: JSON.stringify({ 2328 | success: true, 2329 | stats, 2330 | message: `Top ${limit} most downloaded agents`, 2331 | }, null, 2), 2332 | }, 2333 | ], 2334 | }; 2335 | } 2336 | 2337 | case 'refresh': { 2338 | try { 2339 | await agentManager.refreshAgentsFromGitHub(); 2340 | const agents = agentManager.getAllAgents(); 2341 | 2342 | return { 2343 | content: [ 2344 | { 2345 | type: 'text', 2346 | text: JSON.stringify({ 2347 | success: true, 2348 | count: agents.length, 2349 | message: `Successfully refreshed agents from GitHub. Total agents: ${agents.length}`, 2350 | }, null, 2), 2351 | }, 2352 | ], 2353 | }; 2354 | } catch (error) { 2355 | return { 2356 | content: [ 2357 | { 2358 | type: 'text', 2359 | text: JSON.stringify({ 2360 | success: false, 2361 | error: `Failed to refresh agents: ${error}`, 2362 | }, null, 2), 2363 | }, 2364 | ], 2365 | }; 2366 | } 2367 | } 2368 | 2369 | case 'version': { 2370 | const agents = agentManager.getAllAgents(); 2371 | const agentsByLanguage = { 2372 | en: agentManager.getAllAgents('en').length, 2373 | ko: agentManager.getAllAgents('ko').length, 2374 | ja: agentManager.getAllAgents('ja').length, 2375 | zh: agentManager.getAllAgents('zh').length, 2376 | }; 2377 | 2378 | return { 2379 | content: [ 2380 | { 2381 | type: 'text', 2382 | text: JSON.stringify({ 2383 | success: true, 2384 | version: version, 2385 | serverName: 'claude-agents-power-mcp-server', 2386 | totalAgents: agents.length, 2387 | agentsByLanguage, 2388 | npmPackage: 'claude-agents-power', 2389 | repository: 'https://github.com/hongsw/claude-agents-power-mcp-server', 2390 | message: `Claude Agents Power MCP Server v${version} - ${agents.length} agents available`, 2391 | }, null, 2), 2392 | }, 2393 | ], 2394 | }; 2395 | } 2396 | 2397 | default: 2398 | return { 2399 | content: [ 2400 | { 2401 | type: 'text', 2402 | text: JSON.stringify({ 2403 | success: false, 2404 | error: `Unknown action: ${action}`, 2405 | }, null, 2), 2406 | }, 2407 | ], 2408 | }; 2409 | } 2410 | } 2411 | 2412 | default: 2413 | return { 2414 | content: [ 2415 | { 2416 | type: 'text', 2417 | text: JSON.stringify({ 2418 | success: false, 2419 | error: `Unknown tool: ${name}`, 2420 | }, null, 2), 2421 | }, 2422 | ], 2423 | }; 2424 | } 2425 | }); 2426 | } 2427 | 2428 | async function main() { 2429 | // Load agents on startup 2430 | try { 2431 | await agentManager.loadAgents(); 2432 | debug(`Agents loaded successfully`); 2433 | } catch (error) { 2434 | if (cliOptions.debug) { 2435 | console.error(`[MCP Sub-Agents] ERROR loading agents:`, error); 2436 | } 2437 | } 2438 | 2439 | // Stdio transport - this is already stateless by nature 2440 | const server = createServerInstance(); 2441 | setupTools(server, projectAnalyzer, agentManager, aiAnalysisService); 2442 | const transport = new StdioServerTransport(); 2443 | await server.connect(transport); 2444 | if (cliOptions.debug) { 2445 | console.error('[MCP Sub-Agents] Server running on stdio'); 2446 | } 2447 | } 2448 | 2449 | // Handle graceful shutdown 2450 | process.on('SIGINT', () => { 2451 | console.error('[MCP Sub-Agents] Shutting down...'); 2452 | shutdownAnalytics(); 2453 | process.exit(0); 2454 | }); 2455 | 2456 | process.on('SIGTERM', () => { 2457 | console.error('[MCP Sub-Agents] Shutting down...'); 2458 | shutdownAnalytics(); 2459 | process.exit(0); 2460 | }); 2461 | 2462 | main().catch((error) => { 2463 | console.error('Fatal error in main():', error); 2464 | trackEvent(AnalyticsEvents.SERVER_ERROR, { 2465 | error: error.message, 2466 | stack: error.stack, 2467 | }); 2468 | shutdownAnalytics(); 2469 | process.exit(1); 2470 | }); ```