claude-code-session-manager 0.104.1 → 0.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/bin/cli.cjs +0 -5
- package/dist/assets/AgentLibrary-BDtr4oI-.js +2 -0
- package/dist/assets/Button-CuXBCQDp.js +1 -0
- package/dist/assets/DataModel-DmvRipT5.js +1 -0
- package/dist/assets/{History-BP6KKda_.js → History-B-v9pwwr.js} +2 -2
- package/dist/assets/Hooks-S_0oHHlr.js +3 -0
- package/dist/assets/{Library-BprXNJCG.js → Library-BcbGJxQ3.js} +5 -5
- package/dist/assets/ListDetail-DtqHqJHt.js +1 -0
- package/dist/assets/{MarkdownEditor-1KlkRAqT.js → MarkdownEditor-B56sPp_l.js} +1 -1
- package/dist/assets/{McpServers-FUDN7EnU.js → McpServers-D5VnmxAn.js} +2 -2
- package/dist/assets/{Memory-DryJweXu.js → Memory-0yGZLyRP.js} +6 -6
- package/dist/assets/Panel-NoAADJwx.js +1 -0
- package/dist/assets/Permissions-D2Dh-ee8.js +3 -0
- package/dist/assets/Plugins-kGoUgS9b.js +2 -0
- package/dist/assets/{ProvenanceBadge-6Hj42klQ.js → ProvenanceBadge-CHwDFTX7.js} +1 -1
- package/dist/assets/{SaveBar-xSfjUPiu.js → SaveBar-BtKNMIYK.js} +1 -1
- package/dist/assets/{Scheduler-Beh3Vj-Z.js → Scheduler-B0_kMMDs.js} +7 -7
- package/dist/assets/{ScopeSwitcher-9R1ANwns.js → ScopeSwitcher-BusohWZ5.js} +1 -1
- package/dist/assets/Settings-DuRJntaE.js +3 -0
- package/dist/assets/{SkillReferenceGraph-CYLTGabR.js → SkillReferenceGraph-BHOdIpsy.js} +1 -1
- package/dist/assets/Skills-DSTLZimI.js +3 -0
- package/dist/assets/SystemPrompt-BG7wFWdb.js +1 -0
- package/dist/assets/TagLibrary-Bx27aE3_.js +1 -0
- package/dist/assets/{TiptapBody-l-BMtrPd.js → TiptapBody-j0O8J7YI.js} +1 -1
- package/dist/assets/{Toggle-Bj2Ia7AE.js → Toggle-DzVZ6rC7.js} +1 -1
- package/dist/assets/ViewTabs-BizjuynT.js +1 -0
- package/dist/assets/claude-settings-schema-COigsajx.js +3 -0
- package/dist/assets/{index-D89EUizB.css → index-BLVzrc4k.css} +1 -1
- package/dist/assets/index-CLIaYljt.js +3073 -0
- package/dist/assets/monaco-editor-BsIlgG7c.js +917 -0
- package/dist/assets/monaco-editor-Cu5D__1H.css +1 -0
- package/dist/assets/settingsSchema-7MRAxaJk.js +1 -0
- package/dist/assets/useAgentsDirWatch-BUwfU2Kq.js +1 -0
- package/dist/assets/useConfigDirWatch-ot0VYwQC.js +1 -0
- package/dist/index.html +4 -4
- package/package.json +12 -14
- package/plugins/session-manager-dev/skills/builder/3-publish/SKILL.md +12 -0
- package/plugins/session-manager-dev/skills/develop/SKILL.md +4 -2
- package/scripts/scheduler-mcp-server.cjs +7 -17
- package/src/main/build-info.json +4 -4
- package/src/main/chatRunner.cjs +4 -4
- package/src/main/historyAggregator.cjs +7 -1
- package/src/main/index.cjs +34 -1
- package/src/main/lib/activeSessions.cjs +263 -71
- package/src/main/lib/agentPersonaSchema.cjs +8 -1
- package/src/main/lib/appRuntime.cjs +57 -0
- package/src/main/lib/childWithLog.cjs +10 -10
- package/src/main/lib/claudeBin.cjs +40 -16
- package/src/main/lib/cleanEnv.cjs +29 -6
- package/src/main/lib/defaultShell.cjs +36 -0
- package/src/main/lib/definitionOfDone.cjs +6 -2
- package/src/main/lib/delegationReadiness.cjs +13 -5
- package/src/main/lib/gitWorktree.cjs +6 -3
- package/src/main/lib/insideHome.cjs +15 -4
- package/src/main/lib/killTree.cjs +80 -0
- package/src/main/lib/loadGate.cjs +16 -0
- package/src/main/lib/loginShellPath.cjs +82 -0
- package/src/main/lib/machineProfile.cjs +4 -2
- package/src/main/lib/mcpStdioServer.cjs +127 -0
- package/src/main/lib/openExternalApp.cjs +62 -11
- package/src/main/lib/otlpTraceExporter.cjs +147 -0
- package/src/main/lib/prdMigration.cjs +64 -1
- package/src/main/lib/prereqs.cjs +145 -0
- package/src/main/lib/procIdentity.cjs +37 -2
- package/src/main/lib/queueHistory.cjs +97 -26
- package/src/main/lib/rcaReport.cjs +1 -0
- package/src/main/lib/reaperHelpers.cjs +5 -2
- package/src/main/lib/shippedPersonaSeeds.cjs +10 -0
- package/src/main/lib/timeoutShimScript.cjs +14 -2
- package/src/main/lib/updateCheck.cjs +41 -11
- package/src/main/lib/watchdogHelpers.cjs +23 -3
- package/src/main/lib/winSpawn.cjs +67 -0
- package/src/main/otel.cjs +18 -62
- package/src/main/pty.cjs +82 -12
- package/src/main/runVerify.cjs +42 -2
- package/src/main/scheduler.cjs +105 -20
- package/src/main/seedSchedulerMcp.cjs +11 -2
- package/src/main/usage.cjs +4 -1
- package/src/preload/api.d.ts +14 -0
- package/src/preload/index.cjs +2 -0
- package/src/seed/agents/validator.md +2 -2
- package/dist/assets/DataModel-BHcPa2nA.js +0 -1
- package/dist/assets/Hooks-CnJnddP6.js +0 -3
- package/dist/assets/Permissions-Df-LWvdk.js +0 -3
- package/dist/assets/Plugins-CIUOw9B2.js +0 -2
- package/dist/assets/Settings-gkp0WfEm.js +0 -3
- package/dist/assets/Skills-Dw5Am-f-.js +0 -3
- package/dist/assets/SystemPrompt-B3GwTLqh.js +0 -1
- package/dist/assets/TagLibrary-Dj46gOG2.js +0 -1
- package/dist/assets/ViewTabs-BQ_HbQFq.js +0 -1
- package/dist/assets/abap-DLDM7-KI.js +0 -1
- package/dist/assets/apex-DNDY2TF8.js +0 -1
- package/dist/assets/azcli-Y6nb8tq_.js +0 -1
- package/dist/assets/bat-BwHxbl9M.js +0 -1
- package/dist/assets/bicep-CFznDFnq.js +0 -2
- package/dist/assets/cameligo-Bf6VGUru.js +0 -1
- package/dist/assets/clojure-Dnu-v4kV.js +0 -1
- package/dist/assets/coffee-Bd8akH9Z.js +0 -1
- package/dist/assets/cpp-BbWJElDN.js +0 -1
- package/dist/assets/csharp-Co3qMtFm.js +0 -1
- package/dist/assets/csp-D-4FJmMZ.js +0 -1
- package/dist/assets/css-DdJfP1eB.js +0 -3
- package/dist/assets/css.worker-B4z49cGk.js +0 -93
- package/dist/assets/cssMode-DfqZGMQs.js +0 -1
- package/dist/assets/cypher-cTPe9QuQ.js +0 -1
- package/dist/assets/dart-BOtBlQCF.js +0 -1
- package/dist/assets/dockerfile-BG73LgW2.js +0 -1
- package/dist/assets/ecl-BEgZUVRK.js +0 -1
- package/dist/assets/elixir-BkW5O-1t.js +0 -1
- package/dist/assets/flow9-BeJ5waoc.js +0 -1
- package/dist/assets/freemarker2-XTPYh37h.js +0 -3
- package/dist/assets/fsharp-PahG7c26.js +0 -1
- package/dist/assets/go-acbASCJo.js +0 -1
- package/dist/assets/graphql-BxJiqAUM.js +0 -1
- package/dist/assets/handlebars-DKUF5VyH.js +0 -1
- package/dist/assets/hcl-DtV1sZF8.js +0 -1
- package/dist/assets/html-uqoqsIeI.js +0 -1
- package/dist/assets/html.worker-DtiGdgqp.js +0 -470
- package/dist/assets/htmlMode-aMTQs1su.js +0 -1
- package/dist/assets/index-DbR91Z5j.js +0 -3076
- package/dist/assets/ini-Kd9XrMLS.js +0 -1
- package/dist/assets/java-CXBNlu9o.js +0 -1
- package/dist/assets/javascript-BVxRZMds.js +0 -1
- package/dist/assets/jsonMode-D04xP2s5.js +0 -7
- package/dist/assets/julia-cl7-CwDS.js +0 -1
- package/dist/assets/kotlin-s7OhZKlX.js +0 -1
- package/dist/assets/less-9HpZscsL.js +0 -2
- package/dist/assets/lexon-OrD6JF1K.js +0 -1
- package/dist/assets/liquid-BkQHTH2P.js +0 -1
- package/dist/assets/lspLanguageFeatures-By9uLznH.js +0 -4
- package/dist/assets/lua-Cyyb5UIc.js +0 -1
- package/dist/assets/m3-B8OfTtLu.js +0 -1
- package/dist/assets/markdown-BFxVWTOG.js +0 -1
- package/dist/assets/mdx-Du1IlbjV.js +0 -1
- package/dist/assets/mips-CiqrrVzr.js +0 -1
- package/dist/assets/monaco-editor-BTnBOi8r.css +0 -1
- package/dist/assets/monaco-editor-BW5C4Iv1.js +0 -908
- package/dist/assets/msdax-DmeGPVcC.js +0 -1
- package/dist/assets/mysql-C_tMU-Nz.js +0 -1
- package/dist/assets/objective-c-BDtDVThU.js +0 -1
- package/dist/assets/pascal-vHIfCaH5.js +0 -1
- package/dist/assets/pascaligo-DtZ0uQbO.js +0 -1
- package/dist/assets/perl-Ub6l9XKa.js +0 -1
- package/dist/assets/pgsql-BlNEE0v7.js +0 -1
- package/dist/assets/php-BBUBE1dy.js +0 -1
- package/dist/assets/pla-DSh2-awV.js +0 -1
- package/dist/assets/postiats-CocnycG-.js +0 -1
- package/dist/assets/powerquery-tScXyioY.js +0 -1
- package/dist/assets/powershell-COWaemsV.js +0 -1
- package/dist/assets/protobuf-Brw8urJB.js +0 -2
- package/dist/assets/pug-8SOpv6rk.js +0 -1
- package/dist/assets/python-DSlImqXd.js +0 -1
- package/dist/assets/qsharp-Bw9ernYp.js +0 -1
- package/dist/assets/r-j7ic8hl3.js +0 -1
- package/dist/assets/razor-BmUVyvSK.js +0 -1
- package/dist/assets/redis-Bu5POkcn.js +0 -1
- package/dist/assets/redshift-Bs9aos_-.js +0 -1
- package/dist/assets/restructuredtext-CqXO7rUv.js +0 -1
- package/dist/assets/ruby-zBfavPgS.js +0 -1
- package/dist/assets/rust-BzKRNQWT.js +0 -1
- package/dist/assets/sb-BBc9UKZt.js +0 -1
- package/dist/assets/scala-D9hQfWCl.js +0 -1
- package/dist/assets/scheme-BPhDTwHR.js +0 -1
- package/dist/assets/scss-CBJaRo0y.js +0 -3
- package/dist/assets/settingsSchema-cR833AB2.js +0 -1
- package/dist/assets/shell-DiJ1NA_G.js +0 -1
- package/dist/assets/solidity-Db0IVjzk.js +0 -1
- package/dist/assets/sophia-CnS9iZB_.js +0 -1
- package/dist/assets/sparql-CJmd_6j2.js +0 -1
- package/dist/assets/sql-ClhHkBeG.js +0 -1
- package/dist/assets/st-CHwy0fLd.js +0 -1
- package/dist/assets/swift-Bqt4WxQ4.js +0 -3
- package/dist/assets/systemverilog-Bs9z6M-B.js +0 -1
- package/dist/assets/tcl-Dm6ycUr_.js +0 -1
- package/dist/assets/ts.worker-59MjiAqk.js +0 -67731
- package/dist/assets/tsMode-Btj0TTH7.js +0 -11
- package/dist/assets/twig-Csy3S7wG.js +0 -1
- package/dist/assets/typescript-Bzelq9vO.js +0 -1
- package/dist/assets/typespec-Btyra-wh.js +0 -1
- package/dist/assets/vb-Db0cS2oM.js +0 -1
- package/dist/assets/wgsl-BTesnYfV.js +0 -298
- package/dist/assets/xml-Whd9EaSd.js +0 -1
- package/dist/assets/yaml-QYf0-IN8.js +0 -1
- package/dist/vad/ort-wasm-simd-threaded.asyncify.mjs +0 -112
- package/dist/vad/ort-wasm-simd-threaded.asyncify.wasm +0 -0
- package/dist/vad/ort-wasm-simd-threaded.jsep.mjs +0 -106
- package/dist/vad/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/vad/ort-wasm-simd-threaded.jspi.mjs +0 -107
- package/dist/vad/ort-wasm-simd-threaded.jspi.wasm +0 -0
- package/scripts/postinstall.cjs +0 -52
- package/src/preload/__tests__/preload-surface.test.cjs +0 -68
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{aU as D,ax as g,ai as e,m as N,a as C,c as O,aL as T}from"./index-DbR91Z5j.js";const q=[{id:"filesystem",name:"Filesystem",description:"Secure file operations with configurable access controls",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem",config:{command:"npx",args:["-y","@modelcontextprotocol/server-filesystem","<path>"]},envVars:[]},{id:"fetch",name:"Fetch",description:"Web content fetching and conversion for efficient LLM usage",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/fetch",config:{command:"uvx",args:["mcp-server-fetch"]},envVars:[]},{id:"memory",name:"Memory",description:"Knowledge graph-based persistent memory system",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/memory",config:{command:"npx",args:["-y","@modelcontextprotocol/server-memory"]},envVars:[]},{id:"sequential-thinking",name:"Sequential Thinking",description:"Dynamic and reflective problem-solving through thought sequences",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking",config:{command:"npx",args:["-y","@modelcontextprotocol/server-sequential-thinking"]},envVars:[]},{id:"git",name:"Git",description:"Tools to read, search, and manipulate Git repositories",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/git",config:{command:"uvx",args:["mcp-server-git","--repository","<path>"]},envVars:[]},{id:"time",name:"Time",description:"Time and timezone conversion capabilities",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/time",config:{command:"uvx",args:["mcp-server-time"]},envVars:[]},{id:"everything",name:"Everything",description:"Reference/test server with prompts, resources, and tools",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/everything",config:{command:"npx",args:["-y","@modelcontextprotocol/server-everything"]},envVars:[]},{id:"github",name:"GitHub",description:"Official GitHub repository, issues, and PR management",official:!1,homepage:"https://github.com/github/github-mcp-server",config:{command:"docker",args:["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"]},envVars:["GITHUB_PERSONAL_ACCESS_TOKEN"]},{id:"gitlab",name:"GitLab",description:"GitLab API integration for projects, issues, and merge requests",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/gitlab",config:{command:"npx",args:["-y","@modelcontextprotocol/server-gitlab"]},envVars:["GITLAB_PERSONAL_ACCESS_TOKEN","GITLAB_API_URL"]},{id:"postgres",name:"PostgreSQL",description:"Read-only database access with schema inspection",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres",config:{command:"npx",args:["-y","@modelcontextprotocol/server-postgres","<connection-string>"]},envVars:[]},{id:"sqlite",name:"SQLite",description:"Database interaction and business intelligence over SQLite",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/sqlite",config:{command:"uvx",args:["mcp-server-sqlite","--db-path","<path>"]},envVars:[]},{id:"slack",name:"Slack",description:"Channel management and messaging for Slack workspaces",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/slack",config:{command:"npx",args:["-y","@modelcontextprotocol/server-slack"]},envVars:["SLACK_BOT_TOKEN","SLACK_TEAM_ID"]},{id:"google-drive",name:"Google Drive",description:"File access and search for Google Drive",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/gdrive",config:{command:"npx",args:["-y","@modelcontextprotocol/server-gdrive"]},envVars:["GDRIVE_CREDENTIALS_PATH"]},{id:"google-maps",name:"Google Maps",description:"Location services, directions, and place details",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/google-maps",config:{command:"npx",args:["-y","@modelcontextprotocol/server-google-maps"]},envVars:["GOOGLE_MAPS_API_KEY"]},{id:"puppeteer",name:"Puppeteer",description:"Browser automation and web scraping via Puppeteer",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/puppeteer",config:{command:"npx",args:["-y","@modelcontextprotocol/server-puppeteer"]},envVars:[]},{id:"playwright",name:"Playwright",description:"Cross-browser automation for navigation, screenshots, and data extraction",official:!1,homepage:"https://github.com/microsoft/playwright-mcp",config:{command:"npx",args:["-y","@playwright/mcp@latest"]},envVars:[]},{id:"brave-search",name:"Brave Search",description:"Web and local search using the Brave Search API",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/brave-search",config:{command:"npx",args:["-y","@modelcontextprotocol/server-brave-search"]},envVars:["BRAVE_API_KEY"]},{id:"redis",name:"Redis",description:"Interact with Redis key-value stores",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/redis",config:{command:"npx",args:["-y","@modelcontextprotocol/server-redis","<redis-url>"]},envVars:[]},{id:"sentry",name:"Sentry",description:"Retrieve and analyze Sentry error tracking issues",official:!1,homepage:"https://github.com/getsentry/sentry-mcp",config:{command:"npx",args:["-y","@sentry/mcp-server@latest"]},envVars:["SENTRY_AUTH_TOKEN"]},{id:"linear",name:"Linear",description:"Issue tracking and project management for Linear",official:!1,homepage:"https://linear.app/docs/mcp",config:{command:"npx",args:["-y","mcp-remote","https://mcp.linear.app/sse"]},envVars:[]},{id:"notion",name:"Notion",description:"Notion workspace page and database management",official:!1,homepage:"https://github.com/makenotion/notion-mcp-server",config:{command:"npx",args:["-y","@notionhq/notion-mcp-server"]},envVars:["NOTION_API_KEY"]},{id:"stripe",name:"Stripe",description:"Payment processing, customers, and invoices via Stripe API",official:!1,homepage:"https://github.com/stripe/agent-toolkit",config:{command:"npx",args:["-y","@stripe/mcp","--tools=all"]},envVars:["STRIPE_SECRET_KEY"]},{id:"cloudflare",name:"Cloudflare",description:"Manage Cloudflare Workers, KV, R2, D1, and Workers AI",official:!1,homepage:"https://github.com/cloudflare/mcp-server-cloudflare",config:{command:"npx",args:["-y","mcp-remote","https://observability.mcp.cloudflare.com/sse"]},envVars:[]},{id:"context7",name:"Context7",description:"Up-to-date version-specific library docs injected into prompts",official:!1,homepage:"https://github.com/upstash/context7",config:{command:"npx",args:["-y","@upstash/context7-mcp@latest"]},envVars:[]},{id:"tavily",name:"Tavily",description:"AI-optimized web search with clean structured results",official:!1,homepage:"https://github.com/tavily-ai/tavily-mcp",config:{command:"npx",args:["-y","tavily-mcp@latest"]},envVars:["TAVILY_API_KEY"]},{id:"perplexity",name:"Perplexity",description:"Answer-engine search with deep research and reasoning",official:!1,homepage:"https://github.com/ppl-ai/modelcontextprotocol",config:{command:"npx",args:["-y","server-perplexity-ask"]},envVars:["PERPLEXITY_API_KEY"]},{id:"figma",name:"Figma Dev Mode",description:"First-party Figma design-to-code bridge exposing node tree",official:!1,homepage:"https://help.figma.com/hc/en-us/articles/32132100833559",config:{url:"http://127.0.0.1:3845/sse"},envVars:[]},{id:"supabase",name:"Supabase",description:"Manage Supabase projects, tables, and SQL queries",official:!1,homepage:"https://github.com/supabase-community/supabase-mcp",config:{command:"npx",args:["-y","@supabase/mcp-server-supabase@latest"]},envVars:["SUPABASE_ACCESS_TOKEN"]},{id:"atlassian",name:"Atlassian (Jira/Confluence)",description:"Official Jira and Confluence integration",official:!1,homepage:"https://www.atlassian.com/platform/remote-mcp-server",config:{command:"npx",args:["-y","mcp-remote","https://mcp.atlassian.com/v1/sse"]},envVars:[]},{id:"aws",name:"AWS",description:"AWS services access and best-practice guidance",official:!1,homepage:"https://github.com/awslabs/mcp",config:{command:"uvx",args:["awslabs.core-mcp-server@latest"]},envVars:["AWS_PROFILE","AWS_REGION"]},{id:"obsidian",name:"Obsidian",description:"Read and search notes in an Obsidian vault",official:!1,homepage:"https://github.com/MarkusPfundstein/mcp-obsidian",config:{command:"uvx",args:["mcp-obsidian"]},envVars:["OBSIDIAN_API_KEY"]}],M=[{id:"pdf",name:"PDF",description:"Create, edit, and extract content from PDF documents",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/pdf"},{id:"docx",name:"DOCX",description:"Create and edit Microsoft Word documents",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/docx"},{id:"xlsx",name:"XLSX",description:"Create and edit Excel spreadsheets with formulas and formatting",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/xlsx"},{id:"pptx",name:"PPTX",description:"Create and edit PowerPoint presentations",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/pptx"},{id:"webapp-testing",name:"Webapp Testing",description:"Test web applications using Playwright-driven browser automation",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/webapp-testing"},{id:"playwright-e2e",name:"Playwright E2E",description:"End-to-end browser tests — navigation, forms, assertions, waiting strategies",official:!1,source:"local"},{id:"playwright-visual-testing",name:"Playwright Visual Testing",description:"Visual regression testing — screenshot comparison, pixel diffs, responsive layouts",official:!1,source:"local"},{id:"playwright-accessibility",name:"Playwright Accessibility",description:"Accessibility testing — WCAG compliance, axe-core scans, keyboard navigation",official:!1,source:"local"},{id:"playwright-api-testing",name:"Playwright API Testing",description:"API testing with Playwright request context — REST endpoints, auth flows, contracts",official:!1,source:"local"},{id:"playwright-debug",name:"Playwright Debug",description:"Debug failing tests — trace viewer, inspector, headed mode, flaky test fixes",official:!1,source:"local"},{id:"web-artifacts-builder",name:"Web Artifacts Builder",description:"Build polished interactive web artifacts and demos",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/web-artifacts-builder"},{id:"frontend-design",name:"Frontend Design",description:"Apply frontend UI/UX design patterns and visual polish",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/frontend-design"},{id:"canvas-design",name:"Canvas Design",description:"Canvas-based graphic design and composition techniques",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/canvas-design"},{id:"algorithmic-art",name:"Algorithmic Art",description:"Create generative and algorithmic art",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/algorithmic-art"},{id:"brand-guidelines",name:"Brand Guidelines",description:"Apply brand identity and style guideline specifications",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/brand-guidelines"},{id:"theme-factory",name:"Theme Factory",description:"Generate and customize visual themes",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/theme-factory"},{id:"slack-gif-creator",name:"Slack GIF Creator",description:"Create animated GIFs suitable for Slack",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/slack-gif-creator"},{id:"doc-coauthoring",name:"Doc Coauthoring",description:"Collaborative document authoring and editing workflows",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/doc-coauthoring"},{id:"internal-comms",name:"Internal Comms",description:"Internal communications templates and drafting",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/internal-comms"},{id:"claude-api",name:"Claude API",description:"Build apps with the Claude API and Anthropic SDKs",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/claude-api"},{id:"mcp-builder",name:"MCP Builder",description:"Scaffold and build new Model Context Protocol servers",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/mcp-builder"},{id:"skill-creator",name:"Skill Creator",description:"Scaffold and create new Claude Code skills",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/skill-creator"}],F=[{id:"session-manager-dev",name:"Session Manager Dev",description:"Default end-to-end dev skillset: /develop + /prd (decompose → scheduler PRDs), /process-feedback + /my-feedback (cross-project intake), /project-status + /optimize-kpi + /local-project-health (status & KPI loop), /requesting-code-review + /security-review (review gate), /explain-to-me (HUMAN_LEARN docs).",official:!1,source:"https://github.com/StanislavBG/claude-code-session-manager/tree/main/plugins/session-manager-dev",bundles:["skills"],marketplace:{add:"bundled",name:"session-manager"}},{id:"code-review",name:"Code Review",description:"Comprehensive code review with best practices and improvement suggestions",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-review",bundles:["commands","agents"]},{id:"pr-review-toolkit",name:"PR Review Toolkit",description:"Pull request review automation and workflows",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/pr-review-toolkit",bundles:["commands","agents"]},{id:"commit-commands",name:"Commit Commands",description:"Git commit workflow shortcuts with conventional commit formatting",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/commit-commands",bundles:["commands"]},{id:"feature-dev",name:"Feature Dev",description:"Feature development assistance from spec to implementation",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/feature-dev",bundles:["commands","agents"]},{id:"security-guidance",name:"Security Guidance",description:"Security best-practice review and enforcement",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/security-guidance",bundles:["commands","agents"]},{id:"agent-sdk-dev",name:"Agent SDK Dev",description:"Development tools for building with the Claude Agent SDK",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/agent-sdk-dev",bundles:["commands","skills"]},{id:"plugin-dev",name:"Plugin Dev",description:"Scaffolding and tooling for authoring Claude Code plugins",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev",bundles:["commands","skills"]},{id:"mcp-server-dev",name:"MCP Server Dev",description:"Develop and test Model Context Protocol servers",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/mcp-server-dev",bundles:["commands","skills"]},{id:"skill-creator",name:"Skill Creator",description:"Framework for creating and iterating on new skills",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/skill-creator",bundles:["commands","skills"]},{id:"claude-md-management",name:"CLAUDE.md Management",description:"Manage and maintain CLAUDE.md project memory files",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/claude-md-management",bundles:["commands"]},{id:"typescript-lsp",name:"TypeScript LSP",description:"TypeScript/JavaScript language server integration",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/typescript-lsp",bundles:["hooks","commands"]},{id:"pyright-lsp",name:"Pyright LSP",description:"Python language server integration via Pyright",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/pyright-lsp",bundles:["hooks","commands"]},{id:"rust-analyzer-lsp",name:"Rust Analyzer LSP",description:"Rust language server integration via rust-analyzer",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/rust-analyzer-lsp",bundles:["hooks","commands"]},{id:"gopls-lsp",name:"Go LSP (gopls)",description:"Go language server integration via gopls",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/gopls-lsp",bundles:["hooks","commands"]},{id:"code-simplifier",name:"Code Simplifier",description:"Review changed code for reuse, quality, and efficiency then fix issues",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier",bundles:["commands","agents"]},{id:"hookify",name:"Hookify",description:"Utilities and templates for authoring Claude Code hooks",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify",bundles:["commands","skills"]},{id:"frontend-design-plugin",name:"Frontend Design Plugin",description:"Frontend design assistance and visual polish workflows",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/frontend-design",bundles:["commands","skills","agents"]},{id:"clangd-lsp",name:"clangd-lsp",description:"C/C++ diagnostics via clangd. Requires clangd on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/clangd-lsp",bundles:["hooks","commands"]},{id:"csharp-lsp",name:"csharp-lsp",description:"C# diagnostics. Requires OmniSharp or Roslyn LSP on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/csharp-lsp",bundles:["hooks","commands"]},{id:"jdtls-lsp",name:"jdtls-lsp",description:"Java diagnostics via Eclipse JDT LS. Requires jdtls on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/jdtls-lsp",bundles:["hooks","commands"]},{id:"kotlin-lsp",name:"kotlin-lsp",description:"Kotlin diagnostics. Requires kotlin-language-server on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/kotlin-lsp",bundles:["hooks","commands"]},{id:"lua-lsp",name:"lua-lsp",description:"Lua diagnostics. Requires lua-language-server on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/lua-lsp",bundles:["hooks","commands"]},{id:"php-lsp",name:"php-lsp",description:"PHP diagnostics. Requires intelephense or phpactor on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/php-lsp",bundles:["hooks","commands"]},{id:"swift-lsp",name:"swift-lsp",description:"Swift diagnostics via sourcekit-lsp. Requires sourcekit-lsp on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/swift-lsp",bundles:["hooks","commands"]},{id:"github",name:"github",description:"GitHub PRs, issues, gh-style flows.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/github",bundles:["mcp"]},{id:"gitlab",name:"gitlab",description:"GitLab MRs, issues, pipelines.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/gitlab",bundles:["mcp"]},{id:"atlassian",name:"atlassian",description:"Jira / Confluence search and updates.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/atlassian",bundles:["mcp"]},{id:"asana",name:"asana",description:"Asana task and project ops.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/asana",bundles:["mcp"]},{id:"linear",name:"linear",description:"Linear issue tracking — pairs with the Tasks tab.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/linear",bundles:["mcp"]},{id:"notion",name:"notion",description:"Notion document lookup and edits.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/notion",bundles:["mcp"]},{id:"figma",name:"figma",description:"Figma file inspection for UI work.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/figma",bundles:["mcp"]},{id:"vercel",name:"vercel",description:"Vercel deploy diagnostics.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/vercel",bundles:["mcp"]},{id:"firebase",name:"firebase",description:"Firebase project + Firestore ops.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/firebase",bundles:["mcp"]},{id:"supabase",name:"supabase",description:"Supabase database operations.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/supabase",bundles:["mcp"]},{id:"slack",name:"slack",description:"Slack DM / channel posting from agents.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/slack",bundles:["mcp"]},{id:"sentry",name:"sentry",description:"Sentry bug triage and event lookup.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/sentry",bundles:["mcp"]}],_=[{id:"prettier-on-write",name:"Prettier on Write",description:"Auto-format JS/TS/JSON/MD files after edit via prettier",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.(js|jsx|ts|tsx|json|md|css|html|yaml|yml)$' | xargs -r -I{} npx --no-install prettier --write {} 2>/dev/null || true"},{id:"black-on-write",name:"Black on Write (Python)",description:"Auto-format Python files after edit via black",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.py$' | xargs -r black -q 2>/dev/null || true"},{id:"rustfmt-on-write",name:"rustfmt on Write",description:"Auto-format Rust files after edit via rustfmt",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.rs$' | xargs -r rustfmt 2>/dev/null || true"},{id:"gofmt-on-write",name:"gofmt on Write",description:"Auto-format Go files after edit via gofmt",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.go$' | xargs -r gofmt -w 2>/dev/null || true"},{id:"block-secret-writes",name:"Block Writes to Secrets",description:"Deny edits to .env, credentials, key files",event:"PreToolUse",matcher:"Write|Edit",command:`path=$(jq -r '.tool_input.file_path // empty'); echo "$path" | grep -qE '(^|/)(\\.env|\\.env\\..+|id_rsa|id_ed25519|.*\\.pem|.*\\.key|credentials\\.json|\\.aws/credentials)$' && { echo '{"decision":"block","reason":"refusing to edit secret file"}'; exit 2; } || true`},{id:"notify-on-stop",name:"Desktop Notify on Stop",description:"Send a desktop notification when Claude finishes a turn",event:"Stop",command:`command -v notify-send >/dev/null && notify-send "Claude Code" "Session ready" || (command -v osascript >/dev/null && osascript -e 'display notification "Session ready" with title "Claude Code"') || true`},{id:"bell-on-notification",name:"Terminal Bell on Notification",description:"Ring the terminal bell on permission prompts / idle notifications",event:"Notification",command:"printf '\\a'"},{id:"log-tool-calls",name:"Log Tool Calls (JSONL)",description:"Append every tool call to ~/.claude/logs/tool-calls.jsonl for audit",event:"PreToolUse",command:"mkdir -p ~/.claude/logs && cat >> ~/.claude/logs/tool-calls.jsonl"},{id:"auto-stage-edits",name:"Auto-stage Edited Files",description:"git add each file Claude edits (inside a repo)",event:"PostToolUse",matcher:"Write|Edit",command:`path=$(jq -r '.tool_input.file_path // empty'); [ -n "$path" ] && git -C "$(dirname "$path")" add "$path" 2>/dev/null || true`},{id:"block-dangerous-bash",name:"Block Dangerous Bash",description:"Refuse rm -rf /, fork bombs, curl|sh pipes",event:"PreToolUse",matcher:"Bash",command:`cmd=$(jq -r '.tool_input.command // empty'); echo "$cmd" | grep -qE '(rm -rf /|:\\(\\)\\{.*\\};|curl.*\\|\\s*(bash|sh)|wget.*\\|\\s*(bash|sh)|mkfs\\.|dd if=.*of=/dev/)' && { echo '{"decision":"block","reason":"dangerous command pattern"}'; exit 2; } || true`},{id:"prepend-cwd-to-prompt",name:"Prepend CWD to Prompt",description:"Add cwd context to every user prompt automatically",event:"UserPromptSubmit",command:'echo "{\\"additionalContext\\":\\"cwd: $(pwd)\\"}"'},{id:"archive-transcript",name:"Archive Transcript on SessionEnd",description:"Copy the session jsonl to ~/.claude/archive/ when done",event:"SessionEnd",command:`src=$(jq -r '.transcript_path // empty'); [ -n "$src" ] && mkdir -p ~/.claude/archive && cp "$src" ~/.claude/archive/ 2>/dev/null || true`}],P=(t,n,r,s)=>`---
|
|
1
|
+
import{aS as D,aw as g,ah as e,m as N,a as C,aL as T}from"./index-CLIaYljt.js";import{B as O}from"./Button-CuXBCQDp.js";const q=[{id:"filesystem",name:"Filesystem",description:"Secure file operations with configurable access controls",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem",config:{command:"npx",args:["-y","@modelcontextprotocol/server-filesystem","<path>"]},envVars:[]},{id:"fetch",name:"Fetch",description:"Web content fetching and conversion for efficient LLM usage",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/fetch",config:{command:"uvx",args:["mcp-server-fetch"]},envVars:[]},{id:"memory",name:"Memory",description:"Knowledge graph-based persistent memory system",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/memory",config:{command:"npx",args:["-y","@modelcontextprotocol/server-memory"]},envVars:[]},{id:"sequential-thinking",name:"Sequential Thinking",description:"Dynamic and reflective problem-solving through thought sequences",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking",config:{command:"npx",args:["-y","@modelcontextprotocol/server-sequential-thinking"]},envVars:[]},{id:"git",name:"Git",description:"Tools to read, search, and manipulate Git repositories",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/git",config:{command:"uvx",args:["mcp-server-git","--repository","<path>"]},envVars:[]},{id:"time",name:"Time",description:"Time and timezone conversion capabilities",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/time",config:{command:"uvx",args:["mcp-server-time"]},envVars:[]},{id:"everything",name:"Everything",description:"Reference/test server with prompts, resources, and tools",official:!0,homepage:"https://github.com/modelcontextprotocol/servers/tree/main/src/everything",config:{command:"npx",args:["-y","@modelcontextprotocol/server-everything"]},envVars:[]},{id:"github",name:"GitHub",description:"Official GitHub repository, issues, and PR management",official:!1,homepage:"https://github.com/github/github-mcp-server",config:{command:"docker",args:["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"]},envVars:["GITHUB_PERSONAL_ACCESS_TOKEN"]},{id:"gitlab",name:"GitLab",description:"GitLab API integration for projects, issues, and merge requests",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/gitlab",config:{command:"npx",args:["-y","@modelcontextprotocol/server-gitlab"]},envVars:["GITLAB_PERSONAL_ACCESS_TOKEN","GITLAB_API_URL"]},{id:"postgres",name:"PostgreSQL",description:"Read-only database access with schema inspection",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres",config:{command:"npx",args:["-y","@modelcontextprotocol/server-postgres","<connection-string>"]},envVars:[]},{id:"sqlite",name:"SQLite",description:"Database interaction and business intelligence over SQLite",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/sqlite",config:{command:"uvx",args:["mcp-server-sqlite","--db-path","<path>"]},envVars:[]},{id:"slack",name:"Slack",description:"Channel management and messaging for Slack workspaces",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/slack",config:{command:"npx",args:["-y","@modelcontextprotocol/server-slack"]},envVars:["SLACK_BOT_TOKEN","SLACK_TEAM_ID"]},{id:"google-drive",name:"Google Drive",description:"File access and search for Google Drive",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/gdrive",config:{command:"npx",args:["-y","@modelcontextprotocol/server-gdrive"]},envVars:["GDRIVE_CREDENTIALS_PATH"]},{id:"google-maps",name:"Google Maps",description:"Location services, directions, and place details",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/google-maps",config:{command:"npx",args:["-y","@modelcontextprotocol/server-google-maps"]},envVars:["GOOGLE_MAPS_API_KEY"]},{id:"puppeteer",name:"Puppeteer",description:"Browser automation and web scraping via Puppeteer",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/puppeteer",config:{command:"npx",args:["-y","@modelcontextprotocol/server-puppeteer"]},envVars:[]},{id:"playwright",name:"Playwright",description:"Cross-browser automation for navigation, screenshots, and data extraction",official:!1,homepage:"https://github.com/microsoft/playwright-mcp",config:{command:"npx",args:["-y","@playwright/mcp@latest"]},envVars:[]},{id:"brave-search",name:"Brave Search",description:"Web and local search using the Brave Search API",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/brave-search",config:{command:"npx",args:["-y","@modelcontextprotocol/server-brave-search"]},envVars:["BRAVE_API_KEY"]},{id:"redis",name:"Redis",description:"Interact with Redis key-value stores",official:!1,homepage:"https://github.com/modelcontextprotocol/servers-archived/tree/main/src/redis",config:{command:"npx",args:["-y","@modelcontextprotocol/server-redis","<redis-url>"]},envVars:[]},{id:"sentry",name:"Sentry",description:"Retrieve and analyze Sentry error tracking issues",official:!1,homepage:"https://github.com/getsentry/sentry-mcp",config:{command:"npx",args:["-y","@sentry/mcp-server@latest"]},envVars:["SENTRY_AUTH_TOKEN"]},{id:"linear",name:"Linear",description:"Issue tracking and project management for Linear",official:!1,homepage:"https://linear.app/docs/mcp",config:{command:"npx",args:["-y","mcp-remote","https://mcp.linear.app/sse"]},envVars:[]},{id:"notion",name:"Notion",description:"Notion workspace page and database management",official:!1,homepage:"https://github.com/makenotion/notion-mcp-server",config:{command:"npx",args:["-y","@notionhq/notion-mcp-server"]},envVars:["NOTION_API_KEY"]},{id:"stripe",name:"Stripe",description:"Payment processing, customers, and invoices via Stripe API",official:!1,homepage:"https://github.com/stripe/agent-toolkit",config:{command:"npx",args:["-y","@stripe/mcp","--tools=all"]},envVars:["STRIPE_SECRET_KEY"]},{id:"cloudflare",name:"Cloudflare",description:"Manage Cloudflare Workers, KV, R2, D1, and Workers AI",official:!1,homepage:"https://github.com/cloudflare/mcp-server-cloudflare",config:{command:"npx",args:["-y","mcp-remote","https://observability.mcp.cloudflare.com/sse"]},envVars:[]},{id:"context7",name:"Context7",description:"Up-to-date version-specific library docs injected into prompts",official:!1,homepage:"https://github.com/upstash/context7",config:{command:"npx",args:["-y","@upstash/context7-mcp@latest"]},envVars:[]},{id:"tavily",name:"Tavily",description:"AI-optimized web search with clean structured results",official:!1,homepage:"https://github.com/tavily-ai/tavily-mcp",config:{command:"npx",args:["-y","tavily-mcp@latest"]},envVars:["TAVILY_API_KEY"]},{id:"perplexity",name:"Perplexity",description:"Answer-engine search with deep research and reasoning",official:!1,homepage:"https://github.com/ppl-ai/modelcontextprotocol",config:{command:"npx",args:["-y","server-perplexity-ask"]},envVars:["PERPLEXITY_API_KEY"]},{id:"figma",name:"Figma Dev Mode",description:"First-party Figma design-to-code bridge exposing node tree",official:!1,homepage:"https://help.figma.com/hc/en-us/articles/32132100833559",config:{url:"http://127.0.0.1:3845/sse"},envVars:[]},{id:"supabase",name:"Supabase",description:"Manage Supabase projects, tables, and SQL queries",official:!1,homepage:"https://github.com/supabase-community/supabase-mcp",config:{command:"npx",args:["-y","@supabase/mcp-server-supabase@latest"]},envVars:["SUPABASE_ACCESS_TOKEN"]},{id:"atlassian",name:"Atlassian (Jira/Confluence)",description:"Official Jira and Confluence integration",official:!1,homepage:"https://www.atlassian.com/platform/remote-mcp-server",config:{command:"npx",args:["-y","mcp-remote","https://mcp.atlassian.com/v1/sse"]},envVars:[]},{id:"aws",name:"AWS",description:"AWS services access and best-practice guidance",official:!1,homepage:"https://github.com/awslabs/mcp",config:{command:"uvx",args:["awslabs.core-mcp-server@latest"]},envVars:["AWS_PROFILE","AWS_REGION"]},{id:"obsidian",name:"Obsidian",description:"Read and search notes in an Obsidian vault",official:!1,homepage:"https://github.com/MarkusPfundstein/mcp-obsidian",config:{command:"uvx",args:["mcp-obsidian"]},envVars:["OBSIDIAN_API_KEY"]}],M=[{id:"pdf",name:"PDF",description:"Create, edit, and extract content from PDF documents",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/pdf"},{id:"docx",name:"DOCX",description:"Create and edit Microsoft Word documents",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/docx"},{id:"xlsx",name:"XLSX",description:"Create and edit Excel spreadsheets with formulas and formatting",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/xlsx"},{id:"pptx",name:"PPTX",description:"Create and edit PowerPoint presentations",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/pptx"},{id:"webapp-testing",name:"Webapp Testing",description:"Test web applications using Playwright-driven browser automation",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/webapp-testing"},{id:"playwright-e2e",name:"Playwright E2E",description:"End-to-end browser tests — navigation, forms, assertions, waiting strategies",official:!1,source:"local"},{id:"playwright-visual-testing",name:"Playwright Visual Testing",description:"Visual regression testing — screenshot comparison, pixel diffs, responsive layouts",official:!1,source:"local"},{id:"playwright-accessibility",name:"Playwright Accessibility",description:"Accessibility testing — WCAG compliance, axe-core scans, keyboard navigation",official:!1,source:"local"},{id:"playwright-api-testing",name:"Playwright API Testing",description:"API testing with Playwright request context — REST endpoints, auth flows, contracts",official:!1,source:"local"},{id:"playwright-debug",name:"Playwright Debug",description:"Debug failing tests — trace viewer, inspector, headed mode, flaky test fixes",official:!1,source:"local"},{id:"web-artifacts-builder",name:"Web Artifacts Builder",description:"Build polished interactive web artifacts and demos",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/web-artifacts-builder"},{id:"frontend-design",name:"Frontend Design",description:"Apply frontend UI/UX design patterns and visual polish",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/frontend-design"},{id:"canvas-design",name:"Canvas Design",description:"Canvas-based graphic design and composition techniques",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/canvas-design"},{id:"algorithmic-art",name:"Algorithmic Art",description:"Create generative and algorithmic art",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/algorithmic-art"},{id:"brand-guidelines",name:"Brand Guidelines",description:"Apply brand identity and style guideline specifications",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/brand-guidelines"},{id:"theme-factory",name:"Theme Factory",description:"Generate and customize visual themes",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/theme-factory"},{id:"slack-gif-creator",name:"Slack GIF Creator",description:"Create animated GIFs suitable for Slack",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/slack-gif-creator"},{id:"doc-coauthoring",name:"Doc Coauthoring",description:"Collaborative document authoring and editing workflows",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/doc-coauthoring"},{id:"internal-comms",name:"Internal Comms",description:"Internal communications templates and drafting",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/internal-comms"},{id:"claude-api",name:"Claude API",description:"Build apps with the Claude API and Anthropic SDKs",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/claude-api"},{id:"mcp-builder",name:"MCP Builder",description:"Scaffold and build new Model Context Protocol servers",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/mcp-builder"},{id:"skill-creator",name:"Skill Creator",description:"Scaffold and create new Claude Code skills",official:!0,source:"https://github.com/anthropics/skills/tree/main/skills/skill-creator"}],F=[{id:"session-manager-dev",name:"Session Manager Dev",description:"Default end-to-end dev skillset: /develop + /prd (decompose → scheduler PRDs), /process-feedback + /my-feedback (cross-project intake), /project-status + /optimize-kpi + /local-project-health (status & KPI loop), /requesting-code-review + /security-review (review gate), /explain-to-me (HUMAN_LEARN docs).",official:!1,source:"https://github.com/StanislavBG/claude-code-session-manager/tree/main/plugins/session-manager-dev",bundles:["skills"],marketplace:{add:"bundled",name:"session-manager"}},{id:"code-review",name:"Code Review",description:"Comprehensive code review with best practices and improvement suggestions",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-review",bundles:["commands","agents"]},{id:"pr-review-toolkit",name:"PR Review Toolkit",description:"Pull request review automation and workflows",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/pr-review-toolkit",bundles:["commands","agents"]},{id:"commit-commands",name:"Commit Commands",description:"Git commit workflow shortcuts with conventional commit formatting",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/commit-commands",bundles:["commands"]},{id:"feature-dev",name:"Feature Dev",description:"Feature development assistance from spec to implementation",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/feature-dev",bundles:["commands","agents"]},{id:"security-guidance",name:"Security Guidance",description:"Security best-practice review and enforcement",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/security-guidance",bundles:["commands","agents"]},{id:"agent-sdk-dev",name:"Agent SDK Dev",description:"Development tools for building with the Claude Agent SDK",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/agent-sdk-dev",bundles:["commands","skills"]},{id:"plugin-dev",name:"Plugin Dev",description:"Scaffolding and tooling for authoring Claude Code plugins",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev",bundles:["commands","skills"]},{id:"mcp-server-dev",name:"MCP Server Dev",description:"Develop and test Model Context Protocol servers",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/mcp-server-dev",bundles:["commands","skills"]},{id:"skill-creator",name:"Skill Creator",description:"Framework for creating and iterating on new skills",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/skill-creator",bundles:["commands","skills"]},{id:"claude-md-management",name:"CLAUDE.md Management",description:"Manage and maintain CLAUDE.md project memory files",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/claude-md-management",bundles:["commands"]},{id:"typescript-lsp",name:"TypeScript LSP",description:"TypeScript/JavaScript language server integration",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/typescript-lsp",bundles:["hooks","commands"]},{id:"pyright-lsp",name:"Pyright LSP",description:"Python language server integration via Pyright",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/pyright-lsp",bundles:["hooks","commands"]},{id:"rust-analyzer-lsp",name:"Rust Analyzer LSP",description:"Rust language server integration via rust-analyzer",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/rust-analyzer-lsp",bundles:["hooks","commands"]},{id:"gopls-lsp",name:"Go LSP (gopls)",description:"Go language server integration via gopls",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/gopls-lsp",bundles:["hooks","commands"]},{id:"code-simplifier",name:"Code Simplifier",description:"Review changed code for reuse, quality, and efficiency then fix issues",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier",bundles:["commands","agents"]},{id:"hookify",name:"Hookify",description:"Utilities and templates for authoring Claude Code hooks",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify",bundles:["commands","skills"]},{id:"frontend-design-plugin",name:"Frontend Design Plugin",description:"Frontend design assistance and visual polish workflows",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/frontend-design",bundles:["commands","skills","agents"]},{id:"clangd-lsp",name:"clangd-lsp",description:"C/C++ diagnostics via clangd. Requires clangd on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/clangd-lsp",bundles:["hooks","commands"]},{id:"csharp-lsp",name:"csharp-lsp",description:"C# diagnostics. Requires OmniSharp or Roslyn LSP on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/csharp-lsp",bundles:["hooks","commands"]},{id:"jdtls-lsp",name:"jdtls-lsp",description:"Java diagnostics via Eclipse JDT LS. Requires jdtls on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/jdtls-lsp",bundles:["hooks","commands"]},{id:"kotlin-lsp",name:"kotlin-lsp",description:"Kotlin diagnostics. Requires kotlin-language-server on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/kotlin-lsp",bundles:["hooks","commands"]},{id:"lua-lsp",name:"lua-lsp",description:"Lua diagnostics. Requires lua-language-server on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/lua-lsp",bundles:["hooks","commands"]},{id:"php-lsp",name:"php-lsp",description:"PHP diagnostics. Requires intelephense or phpactor on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/php-lsp",bundles:["hooks","commands"]},{id:"swift-lsp",name:"swift-lsp",description:"Swift diagnostics via sourcekit-lsp. Requires sourcekit-lsp on $PATH.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/swift-lsp",bundles:["hooks","commands"]},{id:"github",name:"github",description:"GitHub PRs, issues, gh-style flows.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/github",bundles:["mcp"]},{id:"gitlab",name:"gitlab",description:"GitLab MRs, issues, pipelines.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/gitlab",bundles:["mcp"]},{id:"atlassian",name:"atlassian",description:"Jira / Confluence search and updates.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/atlassian",bundles:["mcp"]},{id:"asana",name:"asana",description:"Asana task and project ops.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/asana",bundles:["mcp"]},{id:"linear",name:"linear",description:"Linear issue tracking — pairs with the Tasks tab.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/linear",bundles:["mcp"]},{id:"notion",name:"notion",description:"Notion document lookup and edits.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/notion",bundles:["mcp"]},{id:"figma",name:"figma",description:"Figma file inspection for UI work.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/figma",bundles:["mcp"]},{id:"vercel",name:"vercel",description:"Vercel deploy diagnostics.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/vercel",bundles:["mcp"]},{id:"firebase",name:"firebase",description:"Firebase project + Firestore ops.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/firebase",bundles:["mcp"]},{id:"supabase",name:"supabase",description:"Supabase database operations.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/supabase",bundles:["mcp"]},{id:"slack",name:"slack",description:"Slack DM / channel posting from agents.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/slack",bundles:["mcp"]},{id:"sentry",name:"sentry",description:"Sentry bug triage and event lookup.",official:!0,source:"https://github.com/anthropics/claude-plugins-official/tree/main/plugins/sentry",bundles:["mcp"]}],_=[{id:"prettier-on-write",name:"Prettier on Write",description:"Auto-format JS/TS/JSON/MD files after edit via prettier",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.(js|jsx|ts|tsx|json|md|css|html|yaml|yml)$' | xargs -r -I{} npx --no-install prettier --write {} 2>/dev/null || true"},{id:"black-on-write",name:"Black on Write (Python)",description:"Auto-format Python files after edit via black",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.py$' | xargs -r black -q 2>/dev/null || true"},{id:"rustfmt-on-write",name:"rustfmt on Write",description:"Auto-format Rust files after edit via rustfmt",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.rs$' | xargs -r rustfmt 2>/dev/null || true"},{id:"gofmt-on-write",name:"gofmt on Write",description:"Auto-format Go files after edit via gofmt",event:"PostToolUse",matcher:"Write|Edit",command:"jq -r '.tool_input.file_path // empty' | grep -E '\\.go$' | xargs -r gofmt -w 2>/dev/null || true"},{id:"block-secret-writes",name:"Block Writes to Secrets",description:"Deny edits to .env, credentials, key files",event:"PreToolUse",matcher:"Write|Edit",command:`path=$(jq -r '.tool_input.file_path // empty'); echo "$path" | grep -qE '(^|/)(\\.env|\\.env\\..+|id_rsa|id_ed25519|.*\\.pem|.*\\.key|credentials\\.json|\\.aws/credentials)$' && { echo '{"decision":"block","reason":"refusing to edit secret file"}'; exit 2; } || true`},{id:"notify-on-stop",name:"Desktop Notify on Stop",description:"Send a desktop notification when Claude finishes a turn",event:"Stop",command:`command -v notify-send >/dev/null && notify-send "Claude Code" "Session ready" || (command -v osascript >/dev/null && osascript -e 'display notification "Session ready" with title "Claude Code"') || true`},{id:"bell-on-notification",name:"Terminal Bell on Notification",description:"Ring the terminal bell on permission prompts / idle notifications",event:"Notification",command:"printf '\\a'"},{id:"log-tool-calls",name:"Log Tool Calls (JSONL)",description:"Append every tool call to ~/.claude/logs/tool-calls.jsonl for audit",event:"PreToolUse",command:"mkdir -p ~/.claude/logs && cat >> ~/.claude/logs/tool-calls.jsonl"},{id:"auto-stage-edits",name:"Auto-stage Edited Files",description:"git add each file Claude edits (inside a repo)",event:"PostToolUse",matcher:"Write|Edit",command:`path=$(jq -r '.tool_input.file_path // empty'); [ -n "$path" ] && git -C "$(dirname "$path")" add "$path" 2>/dev/null || true`},{id:"block-dangerous-bash",name:"Block Dangerous Bash",description:"Refuse rm -rf /, fork bombs, curl|sh pipes",event:"PreToolUse",matcher:"Bash",command:`cmd=$(jq -r '.tool_input.command // empty'); echo "$cmd" | grep -qE '(rm -rf /|:\\(\\)\\{.*\\};|curl.*\\|\\s*(bash|sh)|wget.*\\|\\s*(bash|sh)|mkfs\\.|dd if=.*of=/dev/)' && { echo '{"decision":"block","reason":"dangerous command pattern"}'; exit 2; } || true`},{id:"prepend-cwd-to-prompt",name:"Prepend CWD to Prompt",description:"Add cwd context to every user prompt automatically",event:"UserPromptSubmit",command:'echo "{\\"additionalContext\\":\\"cwd: $(pwd)\\"}"'},{id:"archive-transcript",name:"Archive Transcript on SessionEnd",description:"Copy the session jsonl to ~/.claude/archive/ when done",event:"SessionEnd",command:`src=$(jq -r '.transcript_path // empty'); [ -n "$src" ] && mkdir -p ~/.claude/archive && cp "$src" ~/.claude/archive/ 2>/dev/null || true`}],P=(t,n,r,s)=>`---
|
|
2
2
|
name: ${t}
|
|
3
3
|
description: ${n}
|
|
4
4
|
tools: ${r}
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
${s}
|
|
8
|
-
`,
|
|
8
|
+
`,de=[{id:"code-reviewer",name:"Code Reviewer",description:"Review staged changes for bugs, style, and maintainability",tools:"Read, Grep, Glob, Bash",content:P("code-reviewer","Review staged changes for bugs, style, and maintainability","Read, Grep, Glob, Bash",`You are a senior code reviewer. Read the user's staged diff (via \`git diff --staged\`), walk each change, and report:
|
|
9
9
|
- correctness issues (bugs, edge cases, race conditions)
|
|
10
10
|
- security issues (injection, auth, secrets)
|
|
11
11
|
- maintainability issues (naming, duplication, abstractions)
|
|
@@ -41,6 +41,6 @@ ${t.replace(/^\s+/,"")}`:r+`
|
|
|
41
41
|
|
|
42
42
|
`);return f.endsWith(`
|
|
43
43
|
`)?f:f+`
|
|
44
|
-
`}function se(t,n,r){const s=W(t);if(s.includes(n.id))return 0;const a=new Map(r.map(o=>[o.id,o])),c=n.section.trim().toLowerCase();return s.map(o=>a.get(o)).filter(o=>!!o).filter(o=>o.section.trim().toLowerCase()===c).length}function I(t,...n){if(!t.trim())return!0;const r=t.toLowerCase();return n.some(s=>s.toLowerCase().includes(r))}function
|
|
45
|
-
${y}`:y;return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:i.name}),i.official&&e.jsx(C,{children:"official"}),f&&e.jsx(C,{tone:"accent",children:"installed"}),i.bundles.map(v=>e.jsx(C,{tone:"dim",children:v},v))]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:i.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:y})]}),e.jsxs("div",{className:"flex gap-1 shrink-0 items-start",children:[e.jsx(G,{href:i.source,children:"source"}),e.jsx(V,{text:m,label:"copy"}),e.jsx(re,{id:i.id,marketplace:i.marketplace,installed:f,onDone:c})]})]},i.id)}),o.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}function ne(t,n){return(t[n.event]??[]).some(s=>(s.hooks??[]).some(a=>a.type==="command"&&a.command===n.command))}function pe(){const t=D(),[n,r]=g.useState({}),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),m=t?`${t}/.claude/settings.json`:null,h=async()=>{if(!m)return;const l=await window.api.config.readJson(m),w=(l.data&&typeof l.data=="object"?l.data:{})??{};r(w.hooks??{})};g.useEffect(()=>{h()},[m]);const v=g.useMemo(()=>_.filter(l=>I(u,l.id,l.name,l.description,l.event)),[u]),S=async l=>{if(!m)return;a(l.id),f(null);const w=await window.api.config.readJson(m),d=(w.data&&typeof w.data=="object"?w.data:{})??{},x={...d.hooks??{}},j=(x[l.event]??[]).slice();j.push({...l.matcher?{matcher:l.matcher}:{},hooks:[{type:"command",command:l.command,...l.timeout?{timeout:l.timeout}:{}}]}),x[l.event]=j;const p=await window.api.config.writeJson(m,{...d,hooks:x});if(a(null),!p.ok){f(p.error??"write failed");return}o(`installed ${l.id}`),setTimeout(()=>o(null),2500),h()},b=async l=>{if(!m)return;a(l.id),f(null);const w=await window.api.config.readJson(m),d=(w.data&&typeof w.data=="object"?w.data:{})??{},x={...d.hooks??{}},j=(x[l.event]??[]).map(k=>({...k,hooks:(k.hooks??[]).filter(A=>!(A.type==="command"&&A.command===l.command))})).filter(k=>(k.hooks??[]).length>0);j.length?x[l.event]=j:delete x[l.event];const p=await window.api.config.writeJson(m,{...d,hooks:x});if(a(null),!p.ok){f(p.error??"write failed");return}h()};return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:u,onQueryChange:y,count:v.length,total:_.length}),(c||i)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${i?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:i??c}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[v.map(l=>{const w=ne(n,l);return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:l.name}),e.jsx(C,{tone:"dim",children:l.event}),l.matcher&&e.jsxs(C,{tone:"dim",children:["match: ",l.matcher]}),w&&e.jsx(C,{tone:"accent",children:"installed"})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:l.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:l.command})]}),e.jsx("div",{className:"flex gap-1 shrink-0",children:w?e.jsx("button",{disabled:s===l.id,onClick:()=>b(l),className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-red-400",children:"remove"}):e.jsx("button",{disabled:s===l.id,onClick:()=>S(l),className:"px-2 py-0.5 text-xs border border-accent rounded text-accent hover:bg-accent hover:text-bg",children:s===l.id?"…":"install"})})]},l.id)}),v.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}function ge(){const t=D(),[n,r]=g.useState(""),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),m=t?`${t}/.claude/settings.json`:null,h=async()=>{if(!m)return;const b=await window.api.config.readJson(m),l=(b.data&&typeof b.data=="object"?b.data:{})??{};r(JSON.stringify(l.permissions??{}))};g.useEffect(()=>{h()},[m]);const v=g.useMemo(()=>z.filter(b=>I(u,b.id,b.name,b.description)),[u]),S=async b=>{if(!m)return;a(b.id),f(null);const l=await window.api.config.readJson(m),w=(l.data&&typeof l.data=="object"?l.data:{})??{},d=await window.api.config.writeJson(m,{...w,permissions:b.permissions});if(a(null),!d.ok){f(d.error??"write failed");return}o(`applied ${b.id} — replaces existing permissions block`),setTimeout(()=>o(null),3e3),h()};return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:u,onQueryChange:y,count:v.length,total:z.length}),(c||i)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${i?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:i??c}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[v.map(b=>{const l=n===JSON.stringify(b.permissions),w=[];return b.permissions.allow&&w.push(`${b.permissions.allow.length} allow`),b.permissions.deny&&w.push(`${b.permissions.deny.length} deny`),b.permissions.ask&&w.push(`${b.permissions.ask.length} ask`),b.permissions.defaultMode&&w.push(`mode: ${b.permissions.defaultMode}`),e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:b.name}),l&&e.jsx(C,{tone:"accent",children:"active"}),e.jsx(C,{tone:"warn",children:"replaces permissions"})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:b.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:w.join(" · ")})]}),e.jsx("div",{className:"flex gap-1 shrink-0",children:e.jsx("button",{disabled:s===b.id,onClick:()=>S(b),className:"px-2 py-0.5 text-xs border border-accent rounded text-accent hover:bg-accent hover:text-bg",children:s===b.id?"…":"apply"})})]},b.id)}),v.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}const ae={communication:"Communication","working-style":"Working style",security:"Security",testing:"Testing",review:"Code review",documentation:"Documentation",debugging:"Debugging",architecture:"Architecture",refactoring:"Refactoring",performance:"Performance",collaboration:"Collaboration",domain:"Domain / stack"};function he(){const t=D(),[n,r]=g.useState(""),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),m=t?`${t}/.claude/CLAUDE.md`:null,h=async()=>{if(!m)return;const p=await window.api.config.readText(m);r(p.text)};g.useEffect(()=>{h()},[m]);const v=g.useMemo(()=>new Set(W(n)),[n]),S=g.useMemo(()=>te(n,R),[n]),b=async()=>{if(!m||S.length===0)return;f(null);const p=ie(n,S),k=await window.api.config.writeText(m,p);if(!k.ok){f(k.error??"write failed");return}o(`removed ${S.length} unmanaged section(s)`),setTimeout(()=>o(null),3e3),h()},l=g.useMemo(()=>R.filter(p=>I(u,p.id,p.name,p.description,p.section,...p.tags??[])),[u]),w=g.useMemo(()=>{const p=new Map;for(const k of l){const A=p.get(k.category)??[];A.push(k),p.set(k.category,A)}return p},[l]),d=async p=>{if(!m)return;a(p.id),f(null);const k=ee(n,p.id,R),A=await window.api.config.writeText(m,k);if(a(null),!A.ok){f(A.error??"write failed");return}const B=!v.has(p.id);o(B?`enabled "${p.name}"`:`disabled "${p.name}"`),setTimeout(()=>o(null),2500),h()};if(!t)return e.jsx(N,{title:"loading…"});const x=v.size,j=["communication","working-style","testing","review","security","debugging","architecture","refactoring","performance","documentation","collaboration","domain"];return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"shrink-0 border-b border-line bg-bg-elev px-3 py-1.5 flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-fg-faint",children:x>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-fg-dim font-medium",children:x})," active · managed in"," ",e.jsx("code",{className:"text-fg-faint",children:"~/.claude/CLAUDE.md"})]}):e.jsx(e.Fragment,{children:"nothing active — toggle presets below to stack them in your CLAUDE.md"})}),e.jsx("div",{className:"flex-1"}),e.jsx("span",{className:"text-fg-faint",children:l.length===R.length?`${R.length} available`:`${l.length} of ${R.length}`}),e.jsx("input",{value:u,onChange:p=>y(p.target.value),placeholder:"search presets…",className:"bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg w-56"})]}),(c||i)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${i?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:i??c}),S.length>0&&e.jsxs("div",{className:"px-4 py-2 text-xs border-b border-line bg-yellow-950/20 flex items-start gap-3",children:[e.jsxs("div",{className:"flex-1 text-yellow-500/90",children:[e.jsx("div",{className:"font-medium",children:"Your CLAUDE.md has unmanaged sections that will collide with presets:"}),e.jsx("div",{className:"text-yellow-500/70 mt-0.5",children:S.map(p=>`# ${p}`).join(" · ")}),e.jsx("div",{className:"text-fg-faint mt-1",children:"These were probably added before presets were toggleable. Clean them out so the managed block owns those sections."})]}),e.jsxs("button",{onClick:b,className:"shrink-0 px-3 py-1 text-xs border border-yellow-600/60 rounded text-yellow-400 hover:bg-yellow-600 hover:text-bg",children:["remove ",S.length," section",S.length>1?"s":""]})]}),e.jsxs("div",{className:"flex-1 overflow-auto",children:[j.map(p=>({cat:p,presets:w.get(p)??[]})).filter(p=>p.presets.length>0).map(({cat:p,presets:k})=>e.jsx(oe,{title:ae[p],presets:k,activeIds:v,existing:n,busy:s,onToggle:d},p)),l.length===0&&e.jsx(N,{title:"no matches"})]})]})}function oe({title:t,presets:n,activeIds:r,existing:s,busy:a,onToggle:c}){const[o,i]=g.useState(!0),f=n.filter(u=>r.has(u.id)).length;return e.jsxs("section",{className:"border-b border-line",children:[e.jsxs("header",{className:"px-4 py-2 bg-bg-elev/40 cursor-pointer hover:bg-bg-elev flex items-center gap-3",onClick:()=>i(!o),children:[e.jsx("span",{className:"text-fg-faint w-3",children:o?"▾":"▸"}),e.jsx("h2",{className:"text-fg text-sm font-medium flex-1",children:t}),e.jsx("span",{className:"text-fg-faint text-xs",children:f>0?`${f}/${n.length} active`:`${n.length}`})]}),o&&e.jsx("div",{className:"divide-y divide-line/60",children:n.map(u=>{const y=r.has(u.id),m=se(s,u,R);return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/20",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-fg text-sm",children:u.name}),y&&e.jsx(C,{tone:"accent",children:"active"}),e.jsxs("span",{className:"text-[10px] px-1 py-0 rounded border border-line bg-bg-elev text-fg-faint uppercase tracking-wide",children:["→ # ",u.section]}),!y&&m>0&&e.jsxs("span",{className:"text-[10px] px-1 py-0 rounded border border-yellow-900/40 bg-yellow-950/30 text-yellow-500/80 uppercase tracking-wide",children:["merges with ",m]})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:u.description}),e.jsxs("ul",{className:"text-fg-faint text-[11px] mt-1 space-y-0.5 list-disc list-inside",children:[u.bullets.slice(0,2).map((h,v)=>e.jsx("li",{className:"truncate",children:h},v)),u.bullets.length>2&&e.jsxs("li",{className:"text-fg-faint italic",children:["+",u.bullets.length-2," more"]})]})]}),e.jsx("div",{className:"flex gap-1 shrink-0",children:e.jsx("button",{disabled:a===u.id,onClick:()=>c(u),className:`px-3 py-0.5 text-xs rounded border transition-colors ${y?"bg-accent text-bg border-accent hover:bg-transparent hover:text-fg-dim":"bg-bg-elev text-fg-dim border-line hover:text-fg hover:bg-bg-hi"}`,title:y?"remove from CLAUDE.md":"add to CLAUDE.md",children:a===u.id?"…":y?"on":"off"})})]},u.id)})})]})}function fe({active:t,onChange:n,installedLabel:r="Installed",libraryLabel:s="Library"}){return e.jsx("div",{className:"flex rounded border border-line overflow-hidden",children:[["installed",r],["library",s]].map(([a,c])=>e.jsx("button",{onClick:()=>n(a),className:`px-2 py-0.5 text-xs ${t===a?"bg-bg-hi text-fg":"text-fg-dim hover:text-fg hover:bg-bg-hi"}`,children:c},a))})}function L({query:t,onQueryChange:n,count:r,total:s}){return e.jsxs("div",{className:"shrink-0 border-b border-line bg-bg-elev px-3 py-1.5 flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-fg-faint",children:r===s?`${s} available`:`${r} of ${s}`}),e.jsx("div",{className:"flex-1"}),e.jsx("input",{value:t,onChange:a=>n(a.target.value),placeholder:"filter…",className:"bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg w-48"})]})}function G({href:t,children:n}){return e.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi",children:n})}function re({id:t,marketplace:n,installed:r,onDone:s}){const[a,c]=g.useState("idle"),[o,i]=g.useState([]),[f,u]=g.useState(!1),y=g.useRef(!0);g.useEffect(()=>()=>{y.current=!1},[]),g.useEffect(()=>{const h=window.api.plugins.onInstallProgress(({slug:v,line:S})=>{v===t&&i(b=>{const l=[...b,S];return l.length>200?l.slice(l.length-200):l})});return()=>h()},[t]);const m=async()=>{c("running"),i([]),u(!0);try{const h=await window.api.plugins.install({slug:t,marketplace:n});if(!y.current){h.ok?(T.info(`Installed ${t}`),s()):T.error(`Install failed: ${t} (exit ${h.exitCode})${h.error?` — ${h.error}`:""}`);return}h.ok?(c("idle"),T.info(`Installed ${t}`),s()):(c("error"),T.error(`Install failed: ${t} (exit ${h.exitCode})${h.error?` — ${h.error}`:""}`))}catch(h){if(!y.current){T.error(`Install error: ${t} — ${h instanceof Error?h.message:String(h)}`);return}c("error"),T.error(`Install error: ${t} — ${h instanceof Error?h.message:String(h)}`)}};return r?e.jsx("button",{disabled:!0,className:"px-2 py-0.5 text-xs border border-line rounded text-fg-faint bg-bg-elev cursor-default",children:"installed"}):e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsx("button",{onClick:m,disabled:a==="running",className:`px-2 py-0.5 text-xs border rounded ${a==="running"?"border-line text-fg-faint bg-bg-elev cursor-not-allowed":"border-accent/50 text-accent hover:bg-accent hover:text-bg"}`,children:a==="running"?"installing…":a==="error"?"retry":"install"}),o.length>0&&e.jsx("button",{onClick:()=>u(h=>!h),className:"text-[10px] text-fg-faint hover:text-fg-dim",children:f?"hide log":"show log"}),f&&o.length>0&&e.jsx("pre",{className:"mt-0.5 max-h-40 w-72 overflow-auto bg-bg-elev border border-line rounded p-2 text-fg-faint font-mono text-[10px] whitespace-pre-wrap text-left",children:o.join(`
|
|
46
|
-
`)})]})}function V({text:t,label:n}){const[r,s]=g.useState(!1);return e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)},className:"px-2 py-0.5 text-xs border border-accent/50 rounded text-accent hover:bg-accent hover:text-bg",children:r?"copied!":n})}export{
|
|
44
|
+
`}function se(t,n,r){const s=W(t);if(s.includes(n.id))return 0;const a=new Map(r.map(o=>[o.id,o])),c=n.section.trim().toLowerCase();return s.map(o=>a.get(o)).filter(o=>!!o).filter(o=>o.section.trim().toLowerCase()===c).length}function I(t,...n){if(!t.trim())return!0;const r=t.toLowerCase();return n.some(s=>s.toLowerCase().includes(r))}function ue(){const t=D(),[n,r]=g.useState(new Set),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),[m,h]=g.useState(null),v=async()=>{var j;if(!t)return;const x=((j=(await window.api.config.readJson(`${t}/.claude.json`)).data)==null?void 0:j.mcpServers)??{};r(new Set(Object.keys(x)))};g.useEffect(()=>{v()},[t]);const S=g.useMemo(()=>q.filter(d=>I(u,d.id,d.name,d.description)),[u]),b=d=>{const x=J(d.config);if(x.length>0){o(null),h({m:d,fields:x,values:{}});return}return l(d,d.config)},l=async(d,x)=>{if(!t)return;a(d.id),o(null);const j=`${t}/.claude.json`,p=await window.api.config.readJson(j),k=(p.data&&typeof p.data=="object"?p.data:{})??{},A={...k.mcpServers??{}};A[d.id]={..."command"in x?{type:"stdio"}:{},...x};const B=await window.api.config.writeJson(j,{...k,mcpServers:A});if(a(null),!B.ok){o(B.error??"write failed");return}h(null),f(`installed ${d.id}`),setTimeout(()=>f(null),4e3),v()},w=async d=>{if(!t)return;a(d),o(null);const x=`${t}/.claude.json`,j=await window.api.config.readJson(x),p=(j.data&&typeof j.data=="object"?j.data:{})??{},k={...p.mcpServers??{}};delete k[d];const A=await window.api.config.writeJson(x,{...p,mcpServers:k});if(a(null),!A.ok){o(A.error??"write failed");return}v()};return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:u,onQueryChange:y,count:S.length,total:q.length}),(i||c)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${c?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:c??i}),m&&e.jsxs("div",{className:"px-4 py-3 border-b border-line bg-bg-elev space-y-2","data-testid":"mcp-placeholder-form",children:[e.jsxs("div",{className:"text-xs text-fg",children:["Configure ",e.jsx("span",{className:"font-medium",children:m.m.name})," — fill in every value before installing"]}),m.fields.map(d=>e.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-64 shrink-0 text-fg-faint font-mono truncate",title:d.label,children:d.label}),e.jsx("input",{required:!0,"aria-label":d.token,value:m.values[d.token]??"",onChange:x=>{const j=x.target.value;h(p=>p&&{...p,values:{...p.values,[d.token]:j}})},placeholder:d.token,className:"flex-1 bg-bg border border-line rounded px-2 py-1 text-xs text-fg font-mono"})]},d.token)),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(O,{variant:"primary",disabled:s===m.m.id||m.fields.some(d=>!(m.values[d.token]??"").trim()),onClick:()=>l(m.m,Y(m.m.config,m.values)),children:"install"}),e.jsx(O,{onClick:()=>h(null),children:"cancel"})]})]}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[S.map(d=>{const x=n.has(d.id);return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:d.name}),d.official&&e.jsx(C,{children:"official"}),x&&e.jsx(C,{tone:"accent",children:"installed"}),d.envVars.length>0&&e.jsxs(C,{tone:"warn",children:[d.envVars.length," env"]})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:d.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:"command"in d.config?`${d.config.command} ${(d.config.args??[]).join(" ")}`:d.config.url})]}),e.jsxs("div",{className:"flex gap-1 shrink-0",children:[e.jsx(G,{href:d.homepage,children:"docs"}),x?e.jsx("button",{disabled:s===d.id,onClick:()=>w(d.id),className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-red-400",children:"remove"}):e.jsx("button",{disabled:s===d.id,onClick:()=>b(d),className:"px-2 py-0.5 text-xs border border-accent rounded text-accent hover:bg-accent hover:text-bg",children:s===d.id?"…":"install"})]})]},d.id)}),S.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}function me(){const t=D(),[n,r]=g.useState(new Set),[s,a]=g.useState(""),c=async()=>{if(!t)return;const i=await window.api.config.listDir(`${t}/.claude/skills`,{dirsOnly:!0});r(new Set(i.entries.map(f=>f.name)))};g.useEffect(()=>{c()},[t]);const o=g.useMemo(()=>M.filter(i=>I(s,i.id,i.name,i.description)),[s]);return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:s,onQueryChange:a,count:o.length,total:M.length}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[o.map(i=>{const f=n.has(i.id),u=i.source==="local",y=u?"":`mkdir -p ~/.claude/skills && cd ~/.claude/skills && git clone --depth 1 --filter=blob:none --sparse https://github.com/anthropics/skills _tmp-${i.id} && cd _tmp-${i.id} && git sparse-checkout set skills/${i.id} && mv skills/${i.id} ../${i.id} && cd .. && rm -rf _tmp-${i.id}`;return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:i.name}),i.official&&e.jsx(C,{children:"official"}),u&&e.jsx(C,{tone:"warn",children:"local"}),f&&e.jsx(C,{tone:"accent",children:"installed"})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:i.description}),e.jsxs("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:["~/.claude/skills/",i.id,"/"]})]}),e.jsxs("div",{className:"flex gap-1 shrink-0",children:[!u&&e.jsx(G,{href:i.source,children:"source"}),!u&&e.jsx(V,{text:y,label:f?"reinstall cmd":"copy install"})]})]},i.id)}),o.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}function pe(){const t=D(),[n,r]=g.useState(new Set),[s,a]=g.useState(""),c=async()=>{var u;if(!t)return;const i=new Set,f=await window.api.config.listDir(`${t}/.claude/plugins`,{dirsOnly:!0});for(const y of f.entries)i.add(y.name);try{const m=(u=(await window.api.config.readJson(`${t}/.claude/settings.json`)).data)==null?void 0:u.enabledPlugins;if(m)for(const[h,v]of Object.entries(m))v&&i.add(h.split("@")[0])}catch{}r(i)};g.useEffect(()=>{c()},[t]);const o=g.useMemo(()=>F.filter(i=>I(s,i.id,i.name,i.description)),[s]);return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:s,onQueryChange:a,count:o.length,total:F.length}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[o.map(i=>{var h;const f=n.has(i.id),u=((h=i.marketplace)==null?void 0:h.name)??"anthropics/claude-plugins-official",y=`/plugin install ${i.id}@${u}`,m=i.marketplace&&i.marketplace.add!=="bundled"?`/plugin marketplace add ${i.marketplace.add}
|
|
45
|
+
${y}`:y;return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:i.name}),i.official&&e.jsx(C,{children:"official"}),f&&e.jsx(C,{tone:"accent",children:"installed"}),i.bundles.map(v=>e.jsx(C,{tone:"dim",children:v},v))]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:i.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:y})]}),e.jsxs("div",{className:"flex gap-1 shrink-0 items-start",children:[e.jsx(G,{href:i.source,children:"source"}),e.jsx(V,{text:m,label:"copy"}),e.jsx(re,{id:i.id,marketplace:i.marketplace,installed:f,onDone:c})]})]},i.id)}),o.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}function ne(t,n){return(t[n.event]??[]).some(s=>(s.hooks??[]).some(a=>a.type==="command"&&a.command===n.command))}function ge(){const t=D(),[n,r]=g.useState({}),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),m=t?`${t}/.claude/settings.json`:null,h=async()=>{if(!m)return;const l=await window.api.config.readJson(m),w=(l.data&&typeof l.data=="object"?l.data:{})??{};r(w.hooks??{})};g.useEffect(()=>{h()},[m]);const v=g.useMemo(()=>_.filter(l=>I(u,l.id,l.name,l.description,l.event)),[u]),S=async l=>{if(!m)return;a(l.id),f(null);const w=await window.api.config.readJson(m),d=(w.data&&typeof w.data=="object"?w.data:{})??{},x={...d.hooks??{}},j=(x[l.event]??[]).slice();j.push({...l.matcher?{matcher:l.matcher}:{},hooks:[{type:"command",command:l.command,...l.timeout?{timeout:l.timeout}:{}}]}),x[l.event]=j;const p=await window.api.config.writeJson(m,{...d,hooks:x});if(a(null),!p.ok){f(p.error??"write failed");return}o(`installed ${l.id}`),setTimeout(()=>o(null),2500),h()},b=async l=>{if(!m)return;a(l.id),f(null);const w=await window.api.config.readJson(m),d=(w.data&&typeof w.data=="object"?w.data:{})??{},x={...d.hooks??{}},j=(x[l.event]??[]).map(k=>({...k,hooks:(k.hooks??[]).filter(A=>!(A.type==="command"&&A.command===l.command))})).filter(k=>(k.hooks??[]).length>0);j.length?x[l.event]=j:delete x[l.event];const p=await window.api.config.writeJson(m,{...d,hooks:x});if(a(null),!p.ok){f(p.error??"write failed");return}h()};return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:u,onQueryChange:y,count:v.length,total:_.length}),(c||i)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${i?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:i??c}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[v.map(l=>{const w=ne(n,l);return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:l.name}),e.jsx(C,{tone:"dim",children:l.event}),l.matcher&&e.jsxs(C,{tone:"dim",children:["match: ",l.matcher]}),w&&e.jsx(C,{tone:"accent",children:"installed"})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:l.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:l.command})]}),e.jsx("div",{className:"flex gap-1 shrink-0",children:w?e.jsx("button",{disabled:s===l.id,onClick:()=>b(l),className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-red-400",children:"remove"}):e.jsx("button",{disabled:s===l.id,onClick:()=>S(l),className:"px-2 py-0.5 text-xs border border-accent rounded text-accent hover:bg-accent hover:text-bg",children:s===l.id?"…":"install"})})]},l.id)}),v.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}function he(){const t=D(),[n,r]=g.useState(""),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),m=t?`${t}/.claude/settings.json`:null,h=async()=>{if(!m)return;const b=await window.api.config.readJson(m),l=(b.data&&typeof b.data=="object"?b.data:{})??{};r(JSON.stringify(l.permissions??{}))};g.useEffect(()=>{h()},[m]);const v=g.useMemo(()=>z.filter(b=>I(u,b.id,b.name,b.description)),[u]),S=async b=>{if(!m)return;a(b.id),f(null);const l=await window.api.config.readJson(m),w=(l.data&&typeof l.data=="object"?l.data:{})??{},d=await window.api.config.writeJson(m,{...w,permissions:b.permissions});if(a(null),!d.ok){f(d.error??"write failed");return}o(`applied ${b.id} — replaces existing permissions block`),setTimeout(()=>o(null),3e3),h()};return t?e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(L,{query:u,onQueryChange:y,count:v.length,total:z.length}),(c||i)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${i?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:i??c}),e.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-line",children:[v.map(b=>{const l=n===JSON.stringify(b.permissions),w=[];return b.permissions.allow&&w.push(`${b.permissions.allow.length} allow`),b.permissions.deny&&w.push(`${b.permissions.deny.length} deny`),b.permissions.ask&&w.push(`${b.permissions.ask.length} ask`),b.permissions.defaultMode&&w.push(`mode: ${b.permissions.defaultMode}`),e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-fg text-xs font-medium",children:b.name}),l&&e.jsx(C,{tone:"accent",children:"active"}),e.jsx(C,{tone:"warn",children:"replaces permissions"})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:b.description}),e.jsx("div",{className:"text-fg-faint text-[10px] font-mono mt-1 truncate",children:w.join(" · ")})]}),e.jsx("div",{className:"flex gap-1 shrink-0",children:e.jsx("button",{disabled:s===b.id,onClick:()=>S(b),className:"px-2 py-0.5 text-xs border border-accent rounded text-accent hover:bg-accent hover:text-bg",children:s===b.id?"…":"apply"})})]},b.id)}),v.length===0&&e.jsx(N,{title:"no matches"})]})]}):e.jsx(N,{title:"loading…"})}const ae={communication:"Communication","working-style":"Working style",security:"Security",testing:"Testing",review:"Code review",documentation:"Documentation",debugging:"Debugging",architecture:"Architecture",refactoring:"Refactoring",performance:"Performance",collaboration:"Collaboration",domain:"Domain / stack"};function fe(){const t=D(),[n,r]=g.useState(""),[s,a]=g.useState(null),[c,o]=g.useState(null),[i,f]=g.useState(null),[u,y]=g.useState(""),m=t?`${t}/.claude/CLAUDE.md`:null,h=async()=>{if(!m)return;const p=await window.api.config.readText(m);r(p.text)};g.useEffect(()=>{h()},[m]);const v=g.useMemo(()=>new Set(W(n)),[n]),S=g.useMemo(()=>te(n,R),[n]),b=async()=>{if(!m||S.length===0)return;f(null);const p=ie(n,S),k=await window.api.config.writeText(m,p);if(!k.ok){f(k.error??"write failed");return}o(`removed ${S.length} unmanaged section(s)`),setTimeout(()=>o(null),3e3),h()},l=g.useMemo(()=>R.filter(p=>I(u,p.id,p.name,p.description,p.section,...p.tags??[])),[u]),w=g.useMemo(()=>{const p=new Map;for(const k of l){const A=p.get(k.category)??[];A.push(k),p.set(k.category,A)}return p},[l]),d=async p=>{if(!m)return;a(p.id),f(null);const k=ee(n,p.id,R),A=await window.api.config.writeText(m,k);if(a(null),!A.ok){f(A.error??"write failed");return}const B=!v.has(p.id);o(B?`enabled "${p.name}"`:`disabled "${p.name}"`),setTimeout(()=>o(null),2500),h()};if(!t)return e.jsx(N,{title:"loading…"});const x=v.size,j=["communication","working-style","testing","review","security","debugging","architecture","refactoring","performance","documentation","collaboration","domain"];return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"shrink-0 border-b border-line bg-bg-elev px-3 py-1.5 flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-fg-faint",children:x>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-fg-dim font-medium",children:x})," active · managed in"," ",e.jsx("code",{className:"text-fg-faint",children:"~/.claude/CLAUDE.md"})]}):e.jsx(e.Fragment,{children:"nothing active — toggle presets below to stack them in your CLAUDE.md"})}),e.jsx("div",{className:"flex-1"}),e.jsx("span",{className:"text-fg-faint",children:l.length===R.length?`${R.length} available`:`${l.length} of ${R.length}`}),e.jsx("input",{value:u,onChange:p=>y(p.target.value),placeholder:"search presets…",className:"bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg w-56"})]}),(c||i)&&e.jsx("div",{className:`px-4 py-2 text-xs border-b border-line ${i?"text-red-400 bg-red-950/20":"text-accent bg-bg-elev"}`,children:i??c}),S.length>0&&e.jsxs("div",{className:"px-4 py-2 text-xs border-b border-line bg-yellow-950/20 flex items-start gap-3",children:[e.jsxs("div",{className:"flex-1 text-yellow-500/90",children:[e.jsx("div",{className:"font-medium",children:"Your CLAUDE.md has unmanaged sections that will collide with presets:"}),e.jsx("div",{className:"text-yellow-500/70 mt-0.5",children:S.map(p=>`# ${p}`).join(" · ")}),e.jsx("div",{className:"text-fg-faint mt-1",children:"These were probably added before presets were toggleable. Clean them out so the managed block owns those sections."})]}),e.jsxs("button",{onClick:b,className:"shrink-0 px-3 py-1 text-xs border border-yellow-600/60 rounded text-yellow-400 hover:bg-yellow-600 hover:text-bg",children:["remove ",S.length," section",S.length>1?"s":""]})]}),e.jsxs("div",{className:"flex-1 overflow-auto",children:[j.map(p=>({cat:p,presets:w.get(p)??[]})).filter(p=>p.presets.length>0).map(({cat:p,presets:k})=>e.jsx(oe,{title:ae[p],presets:k,activeIds:v,existing:n,busy:s,onToggle:d},p)),l.length===0&&e.jsx(N,{title:"no matches"})]})]})}function oe({title:t,presets:n,activeIds:r,existing:s,busy:a,onToggle:c}){const[o,i]=g.useState(!0),f=n.filter(u=>r.has(u.id)).length;return e.jsxs("section",{className:"border-b border-line",children:[e.jsxs("header",{className:"px-4 py-2 bg-bg-elev/40 cursor-pointer hover:bg-bg-elev flex items-center gap-3",onClick:()=>i(!o),children:[e.jsx("span",{className:"text-fg-faint w-3",children:o?"▾":"▸"}),e.jsx("h2",{className:"text-fg text-sm font-medium flex-1",children:t}),e.jsx("span",{className:"text-fg-faint text-xs",children:f>0?`${f}/${n.length} active`:`${n.length}`})]}),o&&e.jsx("div",{className:"divide-y divide-line/60",children:n.map(u=>{const y=r.has(u.id),m=se(s,u,R);return e.jsxs("div",{className:"px-4 py-3 flex items-start gap-3 hover:bg-bg-elev/20",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-fg text-sm",children:u.name}),y&&e.jsx(C,{tone:"accent",children:"active"}),e.jsxs("span",{className:"text-[10px] px-1 py-0 rounded border border-line bg-bg-elev text-fg-faint uppercase tracking-wide",children:["→ # ",u.section]}),!y&&m>0&&e.jsxs("span",{className:"text-[10px] px-1 py-0 rounded border border-yellow-900/40 bg-yellow-950/30 text-yellow-500/80 uppercase tracking-wide",children:["merges with ",m]})]}),e.jsx("div",{className:"text-fg-dim text-xs mt-0.5",children:u.description}),e.jsxs("ul",{className:"text-fg-faint text-[11px] mt-1 space-y-0.5 list-disc list-inside",children:[u.bullets.slice(0,2).map((h,v)=>e.jsx("li",{className:"truncate",children:h},v)),u.bullets.length>2&&e.jsxs("li",{className:"text-fg-faint italic",children:["+",u.bullets.length-2," more"]})]})]}),e.jsx("div",{className:"flex gap-1 shrink-0",children:e.jsx("button",{disabled:a===u.id,onClick:()=>c(u),className:`px-3 py-0.5 text-xs rounded border transition-colors ${y?"bg-accent text-bg border-accent hover:bg-transparent hover:text-fg-dim":"bg-bg-elev text-fg-dim border-line hover:text-fg hover:bg-bg-hi"}`,title:y?"remove from CLAUDE.md":"add to CLAUDE.md",children:a===u.id?"…":y?"on":"off"})})]},u.id)})})]})}function be({active:t,onChange:n,installedLabel:r="Installed",libraryLabel:s="Library"}){return e.jsx("div",{className:"flex rounded border border-line overflow-hidden",children:[["installed",r],["library",s]].map(([a,c])=>e.jsx("button",{onClick:()=>n(a),className:`px-2 py-0.5 text-xs ${t===a?"bg-bg-hi text-fg":"text-fg-dim hover:text-fg hover:bg-bg-hi"}`,children:c},a))})}function L({query:t,onQueryChange:n,count:r,total:s}){return e.jsxs("div",{className:"shrink-0 border-b border-line bg-bg-elev px-3 py-1.5 flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-fg-faint",children:r===s?`${s} available`:`${r} of ${s}`}),e.jsx("div",{className:"flex-1"}),e.jsx("input",{value:t,onChange:a=>n(a.target.value),placeholder:"filter…",className:"bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg w-48"})]})}function G({href:t,children:n}){return e.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi",children:n})}function re({id:t,marketplace:n,installed:r,onDone:s}){const[a,c]=g.useState("idle"),[o,i]=g.useState([]),[f,u]=g.useState(!1),y=g.useRef(!0);g.useEffect(()=>()=>{y.current=!1},[]),g.useEffect(()=>{const h=window.api.plugins.onInstallProgress(({slug:v,line:S})=>{v===t&&i(b=>{const l=[...b,S];return l.length>200?l.slice(l.length-200):l})});return()=>h()},[t]);const m=async()=>{c("running"),i([]),u(!0);try{const h=await window.api.plugins.install({slug:t,marketplace:n});if(!y.current){h.ok?(T.info(`Installed ${t}`),s()):T.error(`Install failed: ${t} (exit ${h.exitCode})${h.error?` — ${h.error}`:""}`);return}h.ok?(c("idle"),T.info(`Installed ${t}`),s()):(c("error"),T.error(`Install failed: ${t} (exit ${h.exitCode})${h.error?` — ${h.error}`:""}`))}catch(h){if(!y.current){T.error(`Install error: ${t} — ${h instanceof Error?h.message:String(h)}`);return}c("error"),T.error(`Install error: ${t} — ${h instanceof Error?h.message:String(h)}`)}};return r?e.jsx("button",{disabled:!0,className:"px-2 py-0.5 text-xs border border-line rounded text-fg-faint bg-bg-elev cursor-default",children:"installed"}):e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsx("button",{onClick:m,disabled:a==="running",className:`px-2 py-0.5 text-xs border rounded ${a==="running"?"border-line text-fg-faint bg-bg-elev cursor-not-allowed":"border-accent/50 text-accent hover:bg-accent hover:text-bg"}`,children:a==="running"?"installing…":a==="error"?"retry":"install"}),o.length>0&&e.jsx("button",{onClick:()=>u(h=>!h),className:"text-[10px] text-fg-faint hover:text-fg-dim",children:f?"hide log":"show log"}),f&&o.length>0&&e.jsx("pre",{className:"mt-0.5 max-h-40 w-72 overflow-auto bg-bg-elev border border-line rounded p-2 text-fg-faint font-mono text-[10px] whitespace-pre-wrap text-left",children:o.join(`
|
|
46
|
+
`)})]})}function V({text:t,label:n}){const[r,s]=g.useState(!1);return e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)},className:"px-2 py-0.5 text-xs border border-accent/50 rounded text-accent hover:bg-accent hover:text-bg",children:r?"copied!":n})}export{de as C,ge as H,ue as M,he as P,me as S,be as V,_ as a,q as b,F as c,M as d,pe as e,fe as f,J as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ah as e}from"./index-CLIaYljt.js";function o({sidebar:r,detail:s,sidebarWidth:i="18rem"}){return e.jsxs("div",{className:"h-full flex",children:[e.jsx("div",{className:"shrink-0 border-r border-line overflow-y-auto",style:{width:i},children:r}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:s})]})}export{o as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ah as i,F as r}from"./index-CLIaYljt.js";function l({value:e,onChange:n,path:o,readOnly:a}){return i.jsx(r,{path:`file://${o}`,defaultLanguage:"markdown",value:e,onChange:t=>n(t??""),theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:13,fontFamily:"JetBrains Mono, ui-monospace, Menlo, monospace",lineNumbers:"on",renderLineHighlight:"line",scrollBeyondLastLine:!1,tabSize:2,wordWrap:"on",readOnly:a,automaticLayout:!0}})}export{l as M};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`}function Te(l){let t=Object.keys(l).length+1,a=`server-${t}`;for(;l[a];)t+=1,a=`server-${t}`;return a}function Re(){const l=xe(),t=ue(),a=(t==null?void 0:t.cwd)??null,d=pe(s=>s.navFace),f=c.useRef(!1),b=c.useRef(d),[o,j]=c.useState(()=>d==="project"&&a?"project":"user"),[r,g]=c.useState(null),[x,u]=c.useState("installed"),[C,B]=c.useState("");c.useEffect(()=>{if(b.current!==d){if(b.current=d,f.current){f.current=!1;return}j(d==="project"&&a?"project":"user")}},[d,a]);const p=c.useMemo(()=>l?Ce(o,l,a):null,[l,o,a]),k=S(s=>s.files),n=S(s=>s.loadJson),v=S(s=>s.setDraft),m=S(s=>s.saveJson),K=S(s=>s.revert),R=S(s=>s.watchFile),se=S(s=>s.unwatchFile);c.useEffect(()=>{if(p)return k[p]||n(p),R(p),()=>se(p)},[p]);const[ae,F]=c.useState(null),[q,U]=c.useState(null),[D,Y]=c.useState(!1),M=c.useRef(0),O=c.useRef(!0);c.useEffect(()=>()=>{O.current=!1},[]);const V=async()=>{const s=++M.current;Y(!0);try{const i=await window.api.mcp.status();if(!O.current||s!==M.current)return;U(i),i.ok||G.error(i.error??"MCP status probe failed")}catch(i){if(!O.current||s!==M.current)return;U(null),G.error(i.message||"MCP status probe failed")}finally{O.current&&s===M.current&&Y(!1)}};if(c.useEffect(()=>{V()},[]),!l)return e.jsx(_,{title:"loading…"});if(x==="library")return e.jsx(J,{toolbar:e.jsx(I,{active:x,onChange:u}),children:e.jsx(ge,{})});if(o==="project"&&!a)return e.jsx(J,{toolbar:e.jsxs(e.Fragment,{children:[e.jsx(I,{active:x,onChange:u}),e.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),e.jsx(H,{scopes:["user","project"],active:o,onChange:s=>{f.current=!0,j(s)}})]}),children:e.jsx(_,{title:"no active project"})});if(!p)return e.jsx(_,{title:"loading…"});const w=k[p],{full:ne,servers:h,err:le}=w?ke(w.draftRaw):{full:{},servers:{},err:null},A=Object.keys(h).sort(),L=r?h[r]:null,$=s=>{F(null),v(p,Ee(ne,s))},re=()=>{const s=Te(h);$({...h,[s]:{type:"stdio",command:"",args:[]}}),g(s)},oe=s=>{const i={...h};delete i[s],$(i),r===s&&g(null)},ie=(s,i)=>{if(!i||i===s||h[i])return;const y={};for(const N of Object.keys(h))y[N===s?i:N]=h[N];$(y),g(i)},ce=(s,i)=>{$({...h,[s]:i})};return e.jsx(J,{toolbar:e.jsxs(e.Fragment,{children:[e.jsx(I,{active:x,onChange:u}),e.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),e.jsx(H,{scopes:["user","project"],active:o,onChange:s=>{f.current=!0,j(s)}}),e.jsxs("span",{className:"ml-3 px-1.5 py-0.5 text-[10px] rounded border border-line text-fg-faint",children:[A.length," server",A.length===1?"":"s"]}),e.jsx("span",{className:"ml-2 text-fg-faint truncate",children:p}),e.jsx("div",{className:"flex-1"}),r&&L&&e.jsx(W,{scope:o,input:X(r,L),className:"mr-2"}),e.jsx("button",{onClick:V,disabled:D,className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi disabled:opacity-50 mr-2",children:D?"checking…":"⟳ test connections"}),e.jsx("button",{onClick:re,className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi",children:"+ new server"})]}),footer:w?e.jsx(he,{dirty:w.dirty,busy:w.busy,parseError:ae||le||w.parseError,lastSavedAt:w.lastSavedAt,onSave:async()=>{var y;F(null);const s=((y=w.diskData)==null?void 0:y.mcpServers)??{};for(const[N,E]of Object.entries(h)){if(JSON.stringify(E)===JSON.stringify(s[N]))continue;const P=Z(E);if(P.length>0){me.getState().show("error",`Not saved: "${N}" still contains placeholder ${P.map(de=>de.token).join(", ")} — replace it with a real value`);return}}const i=await m(p);i.ok||F(i.error??"save failed")},onRevert:()=>{F(null),K(p)}}):null,children:e.jsx(fe,{sidebar:e.jsxs("div",{className:"py-2",children:[e.jsx("div",{className:"px-2 pb-1",children:e.jsx("input",{value:C,onChange:s=>B(s.target.value),placeholder:"filter…",className:"w-full bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg"})}),A.length===0?e.jsx("div",{className:"px-3 py-1 text-xs text-fg-faint italic",children:"no servers"}):A.filter(s=>!C||s.toLowerCase().includes(C.toLowerCase())).map(s=>{var N;const i=Q(s,q),y=(N=h[s].description)==null?void 0:N.trim();return e.jsxs("button",{onClick:()=>g(s),className:`w-full text-left px-3 py-1 text-xs flex flex-col gap-0.5 ${r===s?"bg-bg-hi text-fg":"text-fg-dim hover:text-fg hover:bg-bg-hi"}`,children:[e.jsxs("span",{className:"flex items-center gap-2 justify-between w-full",children:[e.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(te,{state:i.dotState,title:i.label}),e.jsx("span",{className:"truncate",children:s})]}),e.jsxs("span",{className:"ml-2 flex items-center gap-2 shrink-0",children:[(()=>{const E=Z(h[s]);return E.length>0?e.jsxs(z,{tone:"warn",title:`${o} scope · ${p}`,children:["unconfigured placeholder: ",E.map(P=>P.token).join(", ")]}):null})(),e.jsx(z,{tone:i.badgeTone,children:i.label}),e.jsx(W,{interactive:!1,scope:o,input:X(s,h[s])}),e.jsx("span",{className:"text-fg-faint",children:h[s].type??"stdio"})]})]}),y?e.jsx("span",{className:"pl-5 text-fg-faint truncate",title:y,children:y}):null]},s)})]}),detail:r&&L?e.jsx(Fe,{name:r,server:L,connection:Q(r,q),onTestConnection:V,testing:D,onRename:s=>ie(r,s),onChange:s=>ce(r,s),onRemove:()=>oe(r)}):e.jsx(_,{title:"select a server or click + new"})})})}const _e=c.memo(Re);function Fe({name:l,server:t,connection:a,onTestConnection:d,testing:f,onRename:b,onChange:o,onRemove:j}){var k;const r=t.type??"stdio",g=we.has(l),x=Se.has(l),u=(k=t.permissions)==null?void 0:k.tools,C=u===void 0?"inherit":u==="allow"?"allow":u==="deny"?"deny":"list",B=Array.isArray(u)?u:[],p=(t.disabledTools??[]).join(", ");return e.jsxs("div",{className:"p-4 space-y-4 max-w-2xl",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{state:a.dotState,size:"md",title:a.label}),e.jsx(z,{tone:a.badgeTone,children:a.label}),e.jsx("button",{onClick:d,disabled:f,className:"ml-auto px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi disabled:opacity-50",children:f?"checking…":"test connection"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"name"}),e.jsx("input",{defaultValue:l,onBlur:n=>b(n.target.value.trim()),className:"flex-1 bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg font-mono"}),e.jsx("button",{onClick:j,className:"text-xs text-fg-faint hover:text-red-400 px-2 py-1 border border-line rounded",children:"delete"})]}),e.jsx(T,{label:"description",value:t.description??"",onChange:n=>o({...t,description:n||void 0}),placeholder:"what this server does…"}),g?e.jsxs("div",{className:"text-xs px-2 py-1 border border-red-500/50 rounded text-red-300 bg-red-500/5",children:["⚠ ",e.jsx("span",{className:"font-mono",children:l})," is a reserved name — Claude Code will refuse to load this server (v2.1.128+)."]}):x?e.jsxs("div",{className:"text-xs px-2 py-1 border border-yellow-600/50 rounded text-yellow-200 bg-yellow-500/5",children:["⚠ ",e.jsx("span",{className:"font-mono",children:l})," collides with a commonly-bundled MCP name; expect surprises in other tools."]}):null,e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"type"}),e.jsx("select",{value:r,onChange:n=>o({...t,type:n.target.value}),className:"bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg",children:Ne.map(n=>e.jsx("option",{value:n,children:n},n))}),r==="sse"?e.jsx("span",{className:"text-xs text-yellow-400/80",children:"sse is deprecated — prefer streamable-http"}):null]}),r==="stdio"?e.jsxs(e.Fragment,{children:[e.jsx(T,{label:"command",value:t.command??"",onChange:n=>o({...t,command:n}),placeholder:"npx / node / python …"}),e.jsx(T,{label:"args",value:(t.args??[]).join(" "),onChange:n=>o({...t,args:n.split(/\s+/).filter(Boolean)}),placeholder:"space-separated args"}),e.jsx(ee,{label:"env",value:t.env??{},onChange:n=>o({...t,env:n})})]}):e.jsxs(e.Fragment,{children:[e.jsx(T,{label:"url",value:t.url??"",onChange:n=>o({...t,url:n}),placeholder:"https://…"}),e.jsx(ee,{label:"headers",value:t.headers??{},onChange:n=>o({...t,headers:n})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"alwaysLoad"}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-fg",children:[e.jsx("input",{type:"checkbox",checked:t.alwaysLoad===!0,onChange:n=>o({...t,alwaysLoad:n.target.checked||void 0})}),e.jsx("span",{className:"text-fg-dim",children:"bypass tool-search deferral (v2.1.121+)"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"enabled"}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-fg",children:[e.jsx("input",{type:"checkbox",checked:t.enabled!==!1,onChange:n=>o({...t,enabled:n.target.checked?void 0:!1})}),e.jsx("span",{className:"text-fg-dim",children:"load this server in new sessions"})]})]}),e.jsx(T,{label:"disabledTools",value:p,onChange:n=>{const v=n.split(",").map(m=>m.trim()).filter(Boolean);o({...t,disabledTools:v.length?v:void 0})},placeholder:"comma-separated tool names to hide"}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20 pt-1",children:"permissions"}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsxs("select",{value:C,onChange:n=>{const v=n.target.value,m={...t};if(v==="inherit"){if(m.permissions){const{tools:K,...R}=m.permissions;m.permissions=Object.keys(R).length?R:void 0}}else v==="list"?m.permissions={...m.permissions??{},tools:[]}:m.permissions={...m.permissions??{},tools:v};o(m)},className:"bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg",children:[e.jsx("option",{value:"inherit",children:"inherit (default)"}),e.jsx("option",{value:"allow",children:"allow all tools"}),e.jsx("option",{value:"deny",children:"deny all tools"}),e.jsx("option",{value:"list",children:"allowlist…"})]}),C==="list"?e.jsx("input",{value:B.join(", "),onChange:n=>{const v=n.target.value.split(",").map(m=>m.trim()).filter(Boolean);o({...t,permissions:{...t.permissions??{},tools:v}})},placeholder:"comma-separated tool names",className:"w-full bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg font-mono"}):null]})]})]})}function T({label:l,value:t,onChange:a,placeholder:d}){return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:l}),e.jsx("input",{value:t,onChange:f=>a(f.target.value),placeholder:d,className:"flex-1 bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg font-mono"})]})}function ee({label:l,value:t,onChange:a}){const[d,f]=c.useState(""),[b,o]=c.useState(""),j=Object.entries(t);return e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20 pt-1",children:l}),e.jsxs("div",{className:"flex-1 space-y-1",children:[j.map(([r,g])=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:r,onChange:x=>{const u={...t};delete u[r],u[x.target.value]=g,a(u)},className:"w-32 bg-bg-elev border border-line rounded px-2 py-0.5 text-xs text-fg font-mono"}),e.jsx("input",{value:g,onChange:x=>a({...t,[r]:x.target.value}),className:"flex-1 bg-bg-elev border border-line rounded px-2 py-0.5 text-xs text-fg font-mono"}),e.jsx("button",{onClick:()=>{const x={...t};delete x[r],a(x)},className:"text-fg-faint hover:text-red-400 text-xs px-1",children:"×"})]},r)),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:d,onChange:r=>f(r.target.value),placeholder:"key",className:"w-32 bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg-dim font-mono"}),e.jsx("input",{value:b,onChange:r=>o(r.target.value),placeholder:"value",className:"flex-1 bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg-dim font-mono"}),e.jsx("button",{onClick:()=>{d.trim()&&(a({...t,[d.trim()]:b}),f(""),o(""))},className:"px-2 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi",children:"+"})]})]})]})}export{_e as McpServers,Te as nextServerName};
|
|
1
|
+
import{ah as e,aw as c,aS as xe,aM as ue,aU as pe,aN as S,m as _,a as z,b1 as fe,aL as G}from"./index-CLIaYljt.js";import{P as J}from"./Panel-NoAADJwx.js";import{L as me}from"./ListDetail-DtqHqJHt.js";import{S as he}from"./SaveBar-BtKNMIYK.js";import{S as H}from"./ScopeSwitcher-BusohWZ5.js";import{P as Z}from"./ProvenanceBadge-CHwDFTX7.js";import{M as ge,V as I,g as Q}from"./Library-BcbGJxQ3.js";import"./monaco-editor-BsIlgG7c.js";import"./Button-CuXBCQDp.js";const be={live:"bg-emerald-400",idle:"bg-amber-400",offline:"bg-fg-faint",attention:"bg-accent",paused:"bg-zinc-500"},je={sm:"w-1.5 h-1.5",md:"w-2 h-2"},ve={on:"live",off:"offline",warn:"attention",live:"live",idle:"idle"};function te({state:l,kind:t,pulse:a=!1,size:d="sm",className:f="",title:b,"aria-label":o}){const j=l??(t?ve[t]:"idle"),r=be[j],g=je[d],x=a?"animate-pulse":"",u=o??b??j;return e.jsx("span",{role:"img","aria-label":u,className:`inline-block rounded-full ${g} ${r} ${x} ${f}`.trim(),title:b})}const ye={failed:"Failed","needs-auth":"Needs auth",pending:"Pending approval"};function W(l,t){const a=t!=null&&t.ok?t.servers.find(d=>d.name===l):void 0;return!a||a.status==="unknown"?{state:"unprobed",label:"Not checked",probeStatus:(a==null?void 0:a.status)??null,badgeTone:"dim",dotState:"offline"}:a.status==="connected"?{state:"ready",label:"Ready",probeStatus:a.status,badgeTone:"good",dotState:"live"}:{state:"not-ready",label:ye[a.status],probeStatus:a.status,badgeTone:"warn",dotState:"attention"}}const X=(l,t)=>({type:"mcp",name:l,command:t.command,args:t.args,url:t.url}),Ne=["stdio","http","streamable-http","sse","ws"],we=new Set(["workspace"]),Se=new Set(["ide","tasks"]);function Ce(l,t,a){return l==="user"?`${t}/.claude.json`:a?`${a}/.mcp.json`:null}function ke(l){if(l.trim()==="")return{full:{},servers:{},err:null};try{const t=JSON.parse(l),a=t.mcpServers??{};return{full:t,servers:a,err:null}}catch(t){return{full:{},servers:{},err:t.message}}}function Ee(l,t){return JSON.stringify({...l,mcpServers:t},null,2)+`
|
|
2
|
+
`}function Te(l){let t=Object.keys(l).length+1,a=`server-${t}`;for(;l[a];)t+=1,a=`server-${t}`;return a}function Re(){const l=xe(),t=ue(),a=(t==null?void 0:t.cwd)??null,d=pe(s=>s.navFace),f=c.useRef(!1),b=c.useRef(d),[o,j]=c.useState(()=>d==="project"&&a?"project":"user"),[r,g]=c.useState(null),[x,u]=c.useState("installed"),[C,B]=c.useState("");c.useEffect(()=>{if(b.current!==d){if(b.current=d,f.current){f.current=!1;return}j(d==="project"&&a?"project":"user")}},[d,a]);const p=c.useMemo(()=>l?Ce(o,l,a):null,[l,o,a]),k=S(s=>s.files),n=S(s=>s.loadJson),v=S(s=>s.setDraft),m=S(s=>s.saveJson),K=S(s=>s.revert),R=S(s=>s.watchFile),se=S(s=>s.unwatchFile);c.useEffect(()=>{if(p)return k[p]||n(p),R(p),()=>se(p)},[p]);const[ae,F]=c.useState(null),[q,U]=c.useState(null),[D,Y]=c.useState(!1),L=c.useRef(0),M=c.useRef(!0);c.useEffect(()=>()=>{M.current=!1},[]);const V=async()=>{const s=++L.current;Y(!0);try{const i=await window.api.mcp.status();if(!M.current||s!==L.current)return;U(i),i.ok||G.error(i.error??"MCP status probe failed")}catch(i){if(!M.current||s!==L.current)return;U(null),G.error(i.message||"MCP status probe failed")}finally{M.current&&s===L.current&&Y(!1)}};if(c.useEffect(()=>{V()},[]),!l)return e.jsx(_,{title:"loading…"});if(x==="library")return e.jsx(J,{toolbar:e.jsx(I,{active:x,onChange:u}),children:e.jsx(ge,{})});if(o==="project"&&!a)return e.jsx(J,{toolbar:e.jsxs(e.Fragment,{children:[e.jsx(I,{active:x,onChange:u}),e.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),e.jsx(H,{scopes:["user","project"],active:o,onChange:s=>{f.current=!0,j(s)}})]}),children:e.jsx(_,{title:"no active project"})});if(!p)return e.jsx(_,{title:"loading…"});const w=k[p],{full:ne,servers:h,err:le}=w?ke(w.draftRaw):{full:{},servers:{},err:null},A=Object.keys(h).sort(),O=r?h[r]:null,P=s=>{F(null),v(p,Ee(ne,s))},re=()=>{const s=Te(h);P({...h,[s]:{type:"stdio",command:"",args:[]}}),g(s)},oe=s=>{const i={...h};delete i[s],P(i),r===s&&g(null)},ie=(s,i)=>{if(!i||i===s||h[i])return;const y={};for(const N of Object.keys(h))y[N===s?i:N]=h[N];P(y),g(i)},ce=(s,i)=>{P({...h,[s]:i})};return e.jsx(J,{toolbar:e.jsxs(e.Fragment,{children:[e.jsx(I,{active:x,onChange:u}),e.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),e.jsx(H,{scopes:["user","project"],active:o,onChange:s=>{f.current=!0,j(s)}}),e.jsxs("span",{className:"ml-3 px-1.5 py-0.5 text-[10px] rounded border border-line text-fg-faint",children:[A.length," server",A.length===1?"":"s"]}),e.jsx("span",{className:"ml-2 text-fg-faint truncate",children:p}),e.jsx("div",{className:"flex-1"}),r&&O&&e.jsx(Z,{scope:o,input:X(r,O),className:"mr-2"}),e.jsx("button",{onClick:V,disabled:D,className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi disabled:opacity-50 mr-2",children:D?"checking…":"⟳ test connections"}),e.jsx("button",{onClick:re,className:"px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi",children:"+ new server"})]}),footer:w?e.jsx(he,{dirty:w.dirty,busy:w.busy,parseError:ae||le||w.parseError,lastSavedAt:w.lastSavedAt,onSave:async()=>{var y;F(null);const s=((y=w.diskData)==null?void 0:y.mcpServers)??{};for(const[N,E]of Object.entries(h)){if(JSON.stringify(E)===JSON.stringify(s[N]))continue;const $=Q(E);if($.length>0){fe.getState().show("error",`Not saved: "${N}" still contains placeholder ${$.map(de=>de.token).join(", ")} — replace it with a real value`);return}}const i=await m(p);i.ok||F(i.error??"save failed")},onRevert:()=>{F(null),K(p)}}):null,children:e.jsx(me,{sidebar:e.jsxs("div",{className:"py-2",children:[e.jsx("div",{className:"px-2 pb-1",children:e.jsx("input",{value:C,onChange:s=>B(s.target.value),placeholder:"filter…",className:"w-full bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg"})}),A.length===0?e.jsx("div",{className:"px-3 py-1 text-xs text-fg-faint italic",children:"no servers"}):A.filter(s=>!C||s.toLowerCase().includes(C.toLowerCase())).map(s=>{var N;const i=W(s,q),y=(N=h[s].description)==null?void 0:N.trim();return e.jsxs("button",{onClick:()=>g(s),className:`w-full text-left px-3 py-1 text-xs flex flex-col gap-0.5 ${r===s?"bg-bg-hi text-fg":"text-fg-dim hover:text-fg hover:bg-bg-hi"}`,children:[e.jsxs("span",{className:"flex items-center gap-2 justify-between w-full",children:[e.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(te,{state:i.dotState,title:i.label}),e.jsx("span",{className:"truncate",children:s})]}),e.jsxs("span",{className:"ml-2 flex items-center gap-2 shrink-0",children:[(()=>{const E=Q(h[s]);return E.length>0?e.jsxs(z,{tone:"warn",title:`${o} scope · ${p}`,children:["unconfigured placeholder: ",E.map($=>$.token).join(", ")]}):null})(),e.jsx(z,{tone:i.badgeTone,children:i.label}),e.jsx(Z,{interactive:!1,scope:o,input:X(s,h[s])}),e.jsx("span",{className:"text-fg-faint",children:h[s].type??"stdio"})]})]}),y?e.jsx("span",{className:"pl-5 text-fg-faint truncate",title:y,children:y}):null]},s)})]}),detail:r&&O?e.jsx(Fe,{name:r,server:O,connection:W(r,q),onTestConnection:V,testing:D,onRename:s=>ie(r,s),onChange:s=>ce(r,s),onRemove:()=>oe(r)}):e.jsx(_,{title:"select a server or click + new"})})})}const Ve=c.memo(Re);function Fe({name:l,server:t,connection:a,onTestConnection:d,testing:f,onRename:b,onChange:o,onRemove:j}){var k;const r=t.type??"stdio",g=we.has(l),x=Se.has(l),u=(k=t.permissions)==null?void 0:k.tools,C=u===void 0?"inherit":u==="allow"?"allow":u==="deny"?"deny":"list",B=Array.isArray(u)?u:[],p=(t.disabledTools??[]).join(", ");return e.jsxs("div",{className:"p-4 space-y-4 max-w-2xl",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{state:a.dotState,size:"md",title:a.label}),e.jsx(z,{tone:a.badgeTone,children:a.label}),e.jsx("button",{onClick:d,disabled:f,className:"ml-auto px-2 py-0.5 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi disabled:opacity-50",children:f?"checking…":"test connection"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"name"}),e.jsx("input",{defaultValue:l,onBlur:n=>b(n.target.value.trim()),className:"flex-1 bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg font-mono"}),e.jsx("button",{onClick:j,className:"text-xs text-fg-faint hover:text-red-400 px-2 py-1 border border-line rounded",children:"delete"})]}),e.jsx(T,{label:"description",value:t.description??"",onChange:n=>o({...t,description:n||void 0}),placeholder:"what this server does…"}),g?e.jsxs("div",{className:"text-xs px-2 py-1 border border-red-500/50 rounded text-red-300 bg-red-500/5",children:["⚠ ",e.jsx("span",{className:"font-mono",children:l})," is a reserved name — Claude Code will refuse to load this server (v2.1.128+)."]}):x?e.jsxs("div",{className:"text-xs px-2 py-1 border border-yellow-600/50 rounded text-yellow-200 bg-yellow-500/5",children:["⚠ ",e.jsx("span",{className:"font-mono",children:l})," collides with a commonly-bundled MCP name; expect surprises in other tools."]}):null,e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"type"}),e.jsx("select",{value:r,onChange:n=>o({...t,type:n.target.value}),className:"bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg",children:Ne.map(n=>e.jsx("option",{value:n,children:n},n))}),r==="sse"?e.jsx("span",{className:"text-xs text-yellow-400/80",children:"sse is deprecated — prefer streamable-http"}):null]}),r==="stdio"?e.jsxs(e.Fragment,{children:[e.jsx(T,{label:"command",value:t.command??"",onChange:n=>o({...t,command:n}),placeholder:"npx / node / python …"}),e.jsx(T,{label:"args",value:(t.args??[]).join(" "),onChange:n=>o({...t,args:n.split(/\s+/).filter(Boolean)}),placeholder:"space-separated args"}),e.jsx(ee,{label:"env",value:t.env??{},onChange:n=>o({...t,env:n})})]}):e.jsxs(e.Fragment,{children:[e.jsx(T,{label:"url",value:t.url??"",onChange:n=>o({...t,url:n}),placeholder:"https://…"}),e.jsx(ee,{label:"headers",value:t.headers??{},onChange:n=>o({...t,headers:n})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"alwaysLoad"}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-fg",children:[e.jsx("input",{type:"checkbox",checked:t.alwaysLoad===!0,onChange:n=>o({...t,alwaysLoad:n.target.checked||void 0})}),e.jsx("span",{className:"text-fg-dim",children:"bypass tool-search deferral (v2.1.121+)"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:"enabled"}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-fg",children:[e.jsx("input",{type:"checkbox",checked:t.enabled!==!1,onChange:n=>o({...t,enabled:n.target.checked?void 0:!1})}),e.jsx("span",{className:"text-fg-dim",children:"load this server in new sessions"})]})]}),e.jsx(T,{label:"disabledTools",value:p,onChange:n=>{const v=n.split(",").map(m=>m.trim()).filter(Boolean);o({...t,disabledTools:v.length?v:void 0})},placeholder:"comma-separated tool names to hide"}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20 pt-1",children:"permissions"}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsxs("select",{value:C,onChange:n=>{const v=n.target.value,m={...t};if(v==="inherit"){if(m.permissions){const{tools:K,...R}=m.permissions;m.permissions=Object.keys(R).length?R:void 0}}else v==="list"?m.permissions={...m.permissions??{},tools:[]}:m.permissions={...m.permissions??{},tools:v};o(m)},className:"bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg",children:[e.jsx("option",{value:"inherit",children:"inherit (default)"}),e.jsx("option",{value:"allow",children:"allow all tools"}),e.jsx("option",{value:"deny",children:"deny all tools"}),e.jsx("option",{value:"list",children:"allowlist…"})]}),C==="list"?e.jsx("input",{value:B.join(", "),onChange:n=>{const v=n.target.value.split(",").map(m=>m.trim()).filter(Boolean);o({...t,permissions:{...t.permissions??{},tools:v}})},placeholder:"comma-separated tool names",className:"w-full bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg font-mono"}):null]})]})]})}function T({label:l,value:t,onChange:a,placeholder:d}){return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20",children:l}),e.jsx("input",{value:t,onChange:f=>a(f.target.value),placeholder:d,className:"flex-1 bg-bg-elev border border-line rounded px-2 py-1 text-xs text-fg font-mono"})]})}function ee({label:l,value:t,onChange:a}){const[d,f]=c.useState(""),[b,o]=c.useState(""),j=Object.entries(t);return e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("label",{className:"text-xs text-fg-faint w-20 pt-1",children:l}),e.jsxs("div",{className:"flex-1 space-y-1",children:[j.map(([r,g])=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:r,onChange:x=>{const u={...t};delete u[r],u[x.target.value]=g,a(u)},className:"w-32 bg-bg-elev border border-line rounded px-2 py-0.5 text-xs text-fg font-mono"}),e.jsx("input",{value:g,onChange:x=>a({...t,[r]:x.target.value}),className:"flex-1 bg-bg-elev border border-line rounded px-2 py-0.5 text-xs text-fg font-mono"}),e.jsx("button",{onClick:()=>{const x={...t};delete x[r],a(x)},className:"text-fg-faint hover:text-red-400 text-xs px-1",children:"×"})]},r)),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:d,onChange:r=>f(r.target.value),placeholder:"key",className:"w-32 bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg-dim font-mono"}),e.jsx("input",{value:b,onChange:r=>o(r.target.value),placeholder:"value",className:"flex-1 bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg-dim font-mono"}),e.jsx("button",{onClick:()=>{d.trim()&&(a({...t,[d.trim()]:b}),f(""),o(""))},className:"px-2 text-xs border border-line rounded text-fg-dim hover:text-fg hover:bg-bg-hi",children:"+"})]})]})]})}export{Ve as McpServers,Te as nextServerName};
|